@x-plat/design-system 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/index.cjs +908 -18
- package/dist/components/Accordion/index.js +908 -18
- package/dist/components/Avatar/index.css +1 -0
- package/dist/components/CheckBox/index.cjs +1 -1
- package/dist/components/CheckBox/index.css +13 -1
- package/dist/components/CheckBox/index.js +1 -1
- package/dist/components/DatePicker/index.cjs +75 -5
- package/dist/components/DatePicker/index.css +20 -2
- package/dist/components/DatePicker/index.d.cts +245 -4
- package/dist/components/DatePicker/index.d.ts +245 -4
- package/dist/components/DatePicker/index.js +75 -5
- package/dist/components/Drawer/index.cjs +111 -0
- package/dist/components/Drawer/index.css +70 -0
- package/dist/components/Drawer/index.d.cts +14 -0
- package/dist/components/Drawer/index.d.ts +14 -0
- package/dist/components/Drawer/index.js +74 -0
- package/dist/components/Dropdown/index.cjs +185 -0
- package/dist/components/Dropdown/index.css +54 -0
- package/dist/components/Dropdown/index.d.cts +17 -0
- package/dist/components/Dropdown/index.d.ts +17 -0
- package/dist/components/Dropdown/index.js +148 -0
- package/dist/components/EmptyState/index.cjs +60 -0
- package/dist/components/EmptyState/index.css +32 -0
- package/dist/components/EmptyState/index.d.cts +12 -0
- package/dist/components/EmptyState/index.d.ts +12 -0
- package/dist/components/EmptyState/index.js +33 -0
- package/dist/components/FileUpload/index.cjs +1039 -0
- package/dist/components/FileUpload/index.css +42 -0
- package/dist/components/FileUpload/index.d.cts +14 -0
- package/dist/components/FileUpload/index.d.ts +14 -0
- package/dist/components/FileUpload/index.js +1002 -0
- package/dist/components/Pagination/index.cjs +913 -7
- package/dist/components/Pagination/index.js +913 -7
- package/dist/components/Radio/index.css +1 -1
- package/dist/components/Select/index.cjs +17 -7
- package/dist/components/Select/index.d.cts +2 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.js +17 -7
- package/dist/components/Steps/index.cjs +1105 -0
- package/dist/components/Steps/index.css +918 -0
- package/dist/components/Steps/index.d.cts +134 -0
- package/dist/components/Steps/index.d.ts +134 -0
- package/dist/components/Steps/index.js +1078 -0
- package/dist/components/Switch/index.cjs +2 -0
- package/dist/components/Switch/index.css +34 -8
- package/dist/components/Switch/index.d.cts +2 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Tag/index.cjs +1090 -0
- package/dist/components/Tag/index.css +498 -0
- package/dist/components/Tag/index.d.cts +131 -0
- package/dist/components/Tag/index.d.ts +131 -0
- package/dist/components/Tag/index.js +1063 -0
- package/dist/components/Toast/index.cjs +150 -0
- package/dist/components/Toast/index.css +111 -0
- package/dist/components/Toast/index.d.cts +15 -0
- package/dist/components/Toast/index.d.ts +15 -0
- package/dist/components/Toast/index.js +112 -0
- package/dist/components/Tooltip/index.css +3 -0
- package/dist/components/index.cjs +1669 -1188
- package/dist/components/index.css +5803 -4011
- package/dist/components/index.d.cts +7 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +1635 -1162
- package/dist/index.cjs +2689 -2244
- package/dist/index.css +5803 -4011
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2758 -2321
- package/package.json +2 -2
|
@@ -186,6 +186,7 @@ var KNOB_TRANSITION_MS = 250;
|
|
|
186
186
|
var Switch = (props) => {
|
|
187
187
|
const {
|
|
188
188
|
value,
|
|
189
|
+
size = "md",
|
|
189
190
|
disabled,
|
|
190
191
|
onChange,
|
|
191
192
|
colorNamespace = "xplat",
|
|
@@ -220,6 +221,7 @@ var Switch = (props) => {
|
|
|
220
221
|
{
|
|
221
222
|
className: clsx_default(
|
|
222
223
|
"lib-xplat-switch",
|
|
224
|
+
size,
|
|
223
225
|
value ? "checked" : void 0,
|
|
224
226
|
disabled && "disabled",
|
|
225
227
|
isAnimating && "animating",
|
|
@@ -1,15 +1,46 @@
|
|
|
1
1
|
/* src/components/Switch/switch.scss */
|
|
2
2
|
.lib-xplat-switch {
|
|
3
3
|
position: relative;
|
|
4
|
-
|
|
5
|
-
height: 2rem;
|
|
6
|
-
border-radius: 1rem;
|
|
4
|
+
border-radius: 9999px;
|
|
7
5
|
cursor: pointer;
|
|
8
6
|
transition: background-color 0.2s, border-color 0.2s;
|
|
9
7
|
border: 1px solid transparent;
|
|
10
8
|
background-color: #D4D4D4;
|
|
11
9
|
border-color: #D4D4D4;
|
|
12
10
|
}
|
|
11
|
+
.lib-xplat-switch.sm {
|
|
12
|
+
width: 2rem;
|
|
13
|
+
height: 1.125rem;
|
|
14
|
+
}
|
|
15
|
+
.lib-xplat-switch.sm > .knob {
|
|
16
|
+
width: 0.875rem;
|
|
17
|
+
height: 0.875rem;
|
|
18
|
+
}
|
|
19
|
+
.lib-xplat-switch.sm > .knob.checked {
|
|
20
|
+
transform: translateY(-50%) translateX(0.875rem);
|
|
21
|
+
}
|
|
22
|
+
.lib-xplat-switch.md {
|
|
23
|
+
width: 3rem;
|
|
24
|
+
height: 1.625rem;
|
|
25
|
+
}
|
|
26
|
+
.lib-xplat-switch.md > .knob {
|
|
27
|
+
width: 1.375rem;
|
|
28
|
+
height: 1.375rem;
|
|
29
|
+
}
|
|
30
|
+
.lib-xplat-switch.md > .knob.checked {
|
|
31
|
+
transform: translateY(-50%) translateX(1.375rem);
|
|
32
|
+
}
|
|
33
|
+
.lib-xplat-switch.lg {
|
|
34
|
+
width: 3.5rem;
|
|
35
|
+
height: 1.875rem;
|
|
36
|
+
}
|
|
37
|
+
.lib-xplat-switch.lg > .knob {
|
|
38
|
+
width: 1.625rem;
|
|
39
|
+
height: 1.625rem;
|
|
40
|
+
}
|
|
41
|
+
.lib-xplat-switch.lg > .knob.checked {
|
|
42
|
+
transform: translateY(-50%) translateX(1.625rem);
|
|
43
|
+
}
|
|
13
44
|
.lib-xplat-switch.disabled {
|
|
14
45
|
opacity: 0.5;
|
|
15
46
|
cursor: not-allowed;
|
|
@@ -767,14 +798,9 @@
|
|
|
767
798
|
position: absolute;
|
|
768
799
|
top: 50%;
|
|
769
800
|
left: 0;
|
|
770
|
-
width: 1.75rem;
|
|
771
|
-
height: 1.75rem;
|
|
772
801
|
background-color: #FFFFFF;
|
|
773
802
|
border-radius: 9999px;
|
|
774
803
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
775
804
|
transform: translateY(-50%);
|
|
776
805
|
transition: transform 0.25s;
|
|
777
806
|
}
|
|
778
|
-
.lib-xplat-switch > .knob.checked {
|
|
779
|
-
transform: translateY(-50%) translateX(2rem);
|
|
780
|
-
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { C as ColorNamespace, a as ColorName, d as ColorProps } from '../../colors-BG91q_uV.cjs';
|
|
3
3
|
|
|
4
|
+
type SwitchSize = "sm" | "md" | "lg";
|
|
4
5
|
interface SwitchProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> extends ColorProps<N, C> {
|
|
5
6
|
value: boolean;
|
|
7
|
+
size?: SwitchSize;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
className?: string;
|
|
8
10
|
onChange?: (value: boolean) => void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { C as ColorNamespace, a as ColorName, d as ColorProps } from '../../colors-BG91q_uV.js';
|
|
3
3
|
|
|
4
|
+
type SwitchSize = "sm" | "md" | "lg";
|
|
4
5
|
interface SwitchProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> extends ColorProps<N, C> {
|
|
5
6
|
value: boolean;
|
|
7
|
+
size?: SwitchSize;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
className?: string;
|
|
8
10
|
onChange?: (value: boolean) => void;
|
|
@@ -150,6 +150,7 @@ var KNOB_TRANSITION_MS = 250;
|
|
|
150
150
|
var Switch = (props) => {
|
|
151
151
|
const {
|
|
152
152
|
value,
|
|
153
|
+
size = "md",
|
|
153
154
|
disabled,
|
|
154
155
|
onChange,
|
|
155
156
|
colorNamespace = "xplat",
|
|
@@ -184,6 +185,7 @@ var Switch = (props) => {
|
|
|
184
185
|
{
|
|
185
186
|
className: clsx_default(
|
|
186
187
|
"lib-xplat-switch",
|
|
188
|
+
size,
|
|
187
189
|
value ? "checked" : void 0,
|
|
188
190
|
disabled && "disabled",
|
|
189
191
|
isAnimating && "animating",
|