Skip to content

Commit c48162a

Browse files
committed
feat(Separator): remove deprecated spacing values
BREAKING CHANGE: deprecated sideOffset prop values were removed.
1 parent e1c2c33 commit c48162a

File tree

3 files changed

+10
-40
lines changed

3 files changed

+10
-40
lines changed

packages/orbit-components/src/Separator/README.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ The table below contains all types of props available in the Separator component
2828

2929
### enum
3030

31-
| sideOffset | align | type | spaceAfter |
32-
| :----------------------------------------- | :--------- | :--------- | :----------- |
33-
| `"none"` | `"left"` | `"solid"` | `"none"` |
34-
| `"small"` - **deprecated (use `"300"`)** | `"right"` | `"dashed"` | `"smallest"` |
35-
| `"medium"` - **deprecated (use `"400"`)** | `"center"` | `"dotted"` | `"small"` |
36-
| `"large"` - **deprecated (use `"600"`)** | | `"double"` | `"normal"` |
37-
| `"XLarge"` - **deprecated (use `"800"`)** | | `"none"` | `"medium"` |
38-
| `"XXLarge"` - **deprecated (use`"1000"`)** | | | `"large"` |
39-
| `"300"` | | | `"largest"` |
40-
| `"400"` | | | |
41-
| `"600"` | | | |
42-
| `"800"` | | | |
43-
| `"1000"` | | | |
31+
| sideOffset | align | type | spaceAfter |
32+
| :--------- | :--------- | :--------- | :----------- |
33+
| `"none"` | `"left"` | `"solid"` | `"none"` |
34+
| `"300"` | `"right"` | `"dashed"` | `"smallest"` |
35+
| `"400"` | `"center"` | `"dotted"` | `"small"` |
36+
| `"600"` | | `"double"` | `"normal"` |
37+
| `"800"` | | `"none"` | `"medium"` |
38+
| `"1000"` | | | `"large"` |
39+
| | | | `"largest"` |

packages/orbit-components/src/Separator/index.tsx

-15
Original file line numberDiff line numberDiff line change
@@ -33,41 +33,26 @@ function getSideOffsetAmount(indent: SideOffset, align: Align) {
3333
left: {
3434
[Indent.none]: "w-full",
3535
[Indent.THREE_HUNDRED]: "w-[calc(100%_-_theme(spacing.300))]",
36-
[Indent.small]: "w-[calc(100%_-_theme(spacing.300))]", // deprecated
3736
[Indent.FOUR_HUNDRED]: "w-[calc(100%_-_theme(spacing.400))]",
38-
[Indent.medium]: "w-[calc(100%_-_theme(spacing.400))]", // deprecated
3937
[Indent.SIX_HUNDRED]: "w-[calc(100%_-_theme(spacing.600))]",
40-
[Indent.large]: "w-[calc(100%_-_theme(spacing.600))]", // deprecated
4138
[Indent.EIGHT_HUNDRED]: "w-[calc(100%_-_theme(spacing.800))]",
42-
[Indent.XLarge]: "w-[calc(100%_-_theme(spacing.800))]", // deprecated
4339
[Indent.ONE_THOUSAND]: "w-[calc(100%_-_theme(spacing.1000))]",
44-
[Indent.XXLarge]: "w-[calc(100%_-_theme(spacing.1000))]", // deprecated
4540
},
4641
right: {
4742
[Indent.none]: "w-full",
4843
[Indent.THREE_HUNDRED]: "ms-300 w-[calc(100%_-_theme(spacing.300))]",
49-
[Indent.small]: "ms-300 w-[calc(100%_-_theme(spacing.300))]", // deprecated
5044
[Indent.FOUR_HUNDRED]: "ms-400 w-[calc(100%_-_theme(spacing.400))]",
51-
[Indent.medium]: "ms-400 w-[calc(100%_-_theme(spacing.400))]", // deprecated
5245
[Indent.SIX_HUNDRED]: "ms-600 w-[calc(100%_-_theme(spacing.600))]",
53-
[Indent.large]: "ms-600 w-[calc(100%_-_theme(spacing.600))]", // deprecated
5446
[Indent.EIGHT_HUNDRED]: "ms-800 w-[calc(100%_-_theme(spacing.800))]",
55-
[Indent.XLarge]: "ms-800 w-[calc(100%_-_theme(spacing.800))]", // deprecated
5647
[Indent.ONE_THOUSAND]: "ms-1000 w-[calc(100%_-_theme(spacing.1000))]",
57-
[Indent.XXLarge]: "ms-1000 w-[calc(100%_-_theme(spacing.1000))]", // deprecated
5848
},
5949
center: {
6050
[Indent.none]: "w-full",
6151
[Indent.THREE_HUNDRED]: "ms-300 w-[calc(100%_-_theme(spacing.300)*2)]",
62-
[Indent.small]: "ms-300 w-[calc(100%_-_theme(spacing.300)*2)]", // deprecated
6352
[Indent.FOUR_HUNDRED]: "ms-400 w-[calc(100%_-_theme(spacing.400)*2)]",
64-
[Indent.medium]: "ms-400 w-[calc(100%_-_theme(spacing.400)*2)]", // deprecated
6553
[Indent.SIX_HUNDRED]: "ms-600 w-[calc(100%_-_theme(spacing.600)*2)]",
66-
[Indent.large]: "ms-600 w-[calc(100%_-_theme(spacing.600)*2)]", // deprecated
6754
[Indent.EIGHT_HUNDRED]: "ms-800 w-[calc(100%_-_theme(spacing.800)*2)]",
68-
[Indent.XLarge]: "ms-800 w-[calc(100%_-_theme(spacing.800)*2)]", // deprecated
6955
[Indent.ONE_THOUSAND]: "ms-1000 w-[calc(100%_-_theme(spacing.1000)*2)]",
70-
[Indent.XXLarge]: "ms-1000 w-[calc(100%_-_theme(spacing.1000)*2)]", // deprecated
7156
},
7257
};
7358

packages/orbit-components/src/Separator/types.d.ts

+1-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,7 @@ import type { ReactNode } from "react";
44

55
import type * as Common from "../common/types";
66

7-
export type SideOffset =
8-
| "none"
9-
| "small"
10-
| "medium"
11-
| "large"
12-
| "XLarge"
13-
| "XXLarge"
14-
| "300"
15-
| "400"
16-
| "600"
17-
| "800"
18-
| "1000";
7+
export type SideOffset = "none" | "300" | "400" | "600" | "800" | "1000";
198
export type Align = "left" | "center" | "right";
209

2110
export type BorderColorClass =

0 commit comments

Comments
 (0)