@x-plat/design-system 0.4.5 → 0.5.0
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 +294 -294
- package/dist/components/Accordion/index.css +11 -11
- package/dist/components/Accordion/index.d.cts +0 -1
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/Accordion/index.js +491 -491
- package/dist/components/Alert/index.cjs +2 -2
- package/dist/components/Alert/index.css +19 -19
- package/dist/components/Alert/index.d.cts +0 -1
- package/dist/components/Alert/index.d.ts +0 -1
- package/dist/components/Alert/index.js +2 -2
- package/dist/components/Avatar/index.cjs +11 -6
- package/dist/components/Avatar/index.css +41 -11
- package/dist/components/Avatar/index.d.cts +1 -3
- package/dist/components/Avatar/index.d.ts +1 -3
- package/dist/components/Avatar/index.js +11 -6
- package/dist/components/Badge/index.cjs +4 -6
- package/dist/components/Badge/index.css +32 -19
- package/dist/components/Badge/index.d.cts +3 -3
- package/dist/components/Badge/index.d.ts +3 -3
- package/dist/components/Badge/index.js +4 -6
- package/dist/components/Breadcrumb/index.cjs +2 -18
- package/dist/components/Breadcrumb/index.css +6 -6
- package/dist/components/Breadcrumb/index.d.cts +0 -1
- package/dist/components/Breadcrumb/index.d.ts +0 -1
- package/dist/components/Breadcrumb/index.js +2 -18
- package/dist/components/Button/index.cjs +1 -4
- package/dist/components/Button/index.css +67 -23
- package/dist/components/Button/index.d.cts +2 -3
- package/dist/components/Button/index.d.ts +2 -3
- package/dist/components/Button/index.js +1 -4
- package/dist/components/Calendar/index.cjs +306 -307
- package/dist/components/Calendar/index.css +51 -52
- package/dist/components/Calendar/index.d.cts +3 -4
- package/dist/components/Calendar/index.d.ts +3 -4
- package/dist/components/Calendar/index.js +503 -504
- package/dist/components/Card/index.cjs +2 -18
- package/dist/components/Card/index.css +6 -6
- package/dist/components/Card/index.d.cts +0 -4
- package/dist/components/Card/index.d.ts +0 -4
- package/dist/components/Card/index.js +2 -18
- package/dist/components/CardTab/index.cjs +4 -5
- package/dist/components/CardTab/index.css +28 -28
- package/dist/components/CardTab/index.d.cts +0 -2
- package/dist/components/CardTab/index.d.ts +0 -2
- package/dist/components/CardTab/index.js +4 -5
- package/dist/components/Chart/index.cjs +228 -14548
- package/dist/components/Chart/index.css +57 -0
- package/dist/components/Chart/index.d.cts +3 -2
- package/dist/components/Chart/index.d.ts +3 -2
- package/dist/components/Chart/index.js +219 -14541
- package/dist/components/CheckBox/index.cjs +301 -297
- package/dist/components/CheckBox/index.css +50 -27
- package/dist/components/CheckBox/index.d.cts +3 -3
- package/dist/components/CheckBox/index.d.ts +3 -3
- package/dist/components/CheckBox/index.js +486 -482
- package/dist/components/Chip/index.cjs +2 -5
- package/dist/components/Chip/index.css +35 -23
- package/dist/components/Chip/index.d.cts +2 -4
- package/dist/components/Chip/index.d.ts +2 -4
- package/dist/components/Chip/index.js +2 -5
- package/dist/components/DatePicker/index.cjs +348 -359
- package/dist/components/DatePicker/index.css +175 -122
- package/dist/components/DatePicker/index.d.cts +2 -3
- package/dist/components/DatePicker/index.d.ts +2 -3
- package/dist/components/DatePicker/index.js +525 -536
- package/dist/components/Divider/index.cjs +2 -2
- package/dist/components/Divider/index.css +2 -2
- package/dist/components/Divider/index.d.cts +0 -1
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Divider/index.js +2 -2
- package/dist/components/Drawer/index.css +7 -7
- package/dist/components/Dropdown/index.cjs +2 -2
- package/dist/components/Dropdown/index.css +10 -10
- package/dist/components/Dropdown/index.d.cts +0 -1
- package/dist/components/Dropdown/index.d.ts +0 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/EmptyState/index.cjs +2 -18
- package/dist/components/EmptyState/index.css +8 -9
- package/dist/components/EmptyState/index.d.cts +0 -1
- package/dist/components/EmptyState/index.d.ts +0 -1
- package/dist/components/EmptyState/index.js +2 -18
- package/dist/components/FileUpload/index.cjs +280 -281
- package/dist/components/FileUpload/index.css +13 -14
- package/dist/components/FileUpload/index.d.cts +0 -1
- package/dist/components/FileUpload/index.d.ts +0 -1
- package/dist/components/FileUpload/index.js +476 -477
- package/dist/components/HtmlTypeWriter/index.cjs +10 -10
- package/dist/components/HtmlTypeWriter/index.css +3 -3
- package/dist/components/HtmlTypeWriter/index.js +10 -10
- package/dist/components/ImageSelector/index.cjs +309 -309
- package/dist/components/ImageSelector/index.css +15 -15
- package/dist/components/ImageSelector/index.js +477 -477
- package/dist/components/Input/index.cjs +6 -7
- package/dist/components/Input/index.css +37 -26
- package/dist/components/Input/index.d.cts +2 -2
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/index.js +6 -7
- package/dist/components/Modal/index.css +5 -4
- package/dist/components/Pagination/index.cjs +303 -305
- package/dist/components/Pagination/index.css +37 -26
- package/dist/components/Pagination/index.d.cts +3 -3
- package/dist/components/Pagination/index.d.ts +3 -3
- package/dist/components/Pagination/index.js +500 -502
- package/dist/components/PopOver/index.css +3 -3
- package/dist/components/Progress/index.cjs +4 -6
- package/dist/components/Progress/index.css +23 -9
- package/dist/components/Progress/index.d.cts +3 -3
- package/dist/components/Progress/index.d.ts +3 -3
- package/dist/components/Progress/index.js +4 -6
- package/dist/components/Radio/index.cjs +4 -7
- package/dist/components/Radio/index.css +61 -29
- package/dist/components/Radio/index.d.cts +3 -3
- package/dist/components/Radio/index.d.ts +3 -3
- package/dist/components/Radio/index.js +4 -7
- package/dist/components/Select/index.cjs +294 -294
- package/dist/components/Select/index.css +46 -40
- package/dist/components/Select/index.d.cts +0 -1
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Select/index.js +491 -491
- package/dist/components/Skeleton/index.cjs +2 -2
- package/dist/components/Skeleton/index.css +3 -3
- package/dist/components/Skeleton/index.d.cts +0 -1
- package/dist/components/Skeleton/index.d.ts +0 -1
- package/dist/components/Skeleton/index.js +2 -2
- package/dist/components/Spinner/index.cjs +2 -4
- package/dist/components/Spinner/index.css +22 -8
- package/dist/components/Spinner/index.d.cts +3 -3
- package/dist/components/Spinner/index.d.ts +3 -3
- package/dist/components/Spinner/index.js +2 -4
- package/dist/components/Steps/index.cjs +296 -298
- package/dist/components/Steps/index.css +77 -22
- package/dist/components/Steps/index.d.cts +3 -3
- package/dist/components/Steps/index.d.ts +3 -3
- package/dist/components/Steps/index.js +481 -483
- package/dist/components/Swiper/index.cjs +2 -3
- package/dist/components/Swiper/index.css +10 -10
- package/dist/components/Swiper/index.d.cts +0 -1
- package/dist/components/Swiper/index.d.ts +0 -1
- package/dist/components/Swiper/index.js +2 -3
- package/dist/components/Switch/index.cjs +4 -7
- package/dist/components/Switch/index.css +58 -26
- package/dist/components/Switch/index.d.cts +3 -3
- package/dist/components/Switch/index.d.ts +3 -3
- package/dist/components/Switch/index.js +4 -7
- package/dist/components/Tab/index.css +15 -15
- package/dist/components/Table/index.cjs +22 -31
- package/dist/components/Table/index.css +15 -15
- package/dist/components/Table/index.d.cts +2 -8
- package/dist/components/Table/index.d.ts +2 -8
- package/dist/components/Table/index.js +22 -31
- package/dist/components/Tag/index.cjs +305 -293
- package/dist/components/Tag/index.css +58 -17
- package/dist/components/Tag/index.d.cts +5 -3
- package/dist/components/Tag/index.d.ts +5 -3
- package/dist/components/Tag/index.js +492 -480
- package/dist/components/TextArea/index.cjs +2 -2
- package/dist/components/TextArea/index.css +20 -9
- package/dist/components/TextArea/index.d.cts +2 -1
- package/dist/components/TextArea/index.d.ts +2 -1
- package/dist/components/TextArea/index.js +2 -2
- package/dist/components/Toast/index.css +22 -22
- package/dist/components/Tooltip/index.cjs +1 -3
- package/dist/components/Tooltip/index.css +6 -6
- package/dist/components/Tooltip/index.d.cts +1 -2
- package/dist/components/Tooltip/index.d.ts +1 -2
- package/dist/components/Tooltip/index.js +1 -3
- package/dist/components/Video/index.cjs +1 -3
- package/dist/components/Video/index.css +5 -5
- package/dist/components/Video/index.d.cts +0 -2
- package/dist/components/Video/index.d.ts +0 -2
- package/dist/components/Video/index.js +1 -3
- package/dist/components/index.cjs +1604 -15950
- package/dist/components/index.css +2167 -1061
- package/dist/components/index.d.cts +1 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +1478 -15826
- package/dist/index.cjs +2941 -17269
- package/dist/index.css +2164 -1058
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2837 -17169
- package/dist/layout/Grid/FullGrid/index.cjs +9 -18
- package/dist/layout/Grid/FullGrid/index.d.cts +1 -1
- package/dist/layout/Grid/FullGrid/index.d.ts +1 -1
- package/dist/layout/Grid/FullGrid/index.js +9 -18
- package/dist/layout/Grid/FullScreen/index.cjs +9 -18
- package/dist/layout/Grid/FullScreen/index.d.cts +3 -3
- package/dist/layout/Grid/FullScreen/index.d.ts +3 -3
- package/dist/layout/Grid/FullScreen/index.js +9 -18
- package/dist/layout/Grid/index.cjs +34 -20
- package/dist/layout/Grid/index.js +34 -20
- package/dist/layout/index.cjs +34 -20
- package/dist/layout/index.css +1000 -295
- package/dist/layout/index.js +34 -20
- package/dist/tokens/index.cjs +1861 -1970
- package/dist/tokens/index.d.cts +209 -192
- package/dist/tokens/index.d.ts +209 -192
- package/dist/tokens/index.js +2048 -2159
- package/package.json +2 -4
- package/dist/colors-CY4JXVHj.d.cts +0 -137
- package/dist/colors-CY4JXVHj.d.ts +0 -137
- package/dist/layout/Grid/GapGrid/index.cjs +0 -32
- package/dist/layout/Grid/GapGrid/index.d.cts +0 -12
- package/dist/layout/Grid/GapGrid/index.d.ts +0 -12
- package/dist/layout/Grid/GapGrid/index.js +0 -11
|
@@ -69,8 +69,7 @@ var Swiper = (props) => {
|
|
|
69
69
|
speed = 300,
|
|
70
70
|
slideBy = 1,
|
|
71
71
|
index: indexProp,
|
|
72
|
-
onChange
|
|
73
|
-
className
|
|
72
|
+
onChange
|
|
74
73
|
} = props;
|
|
75
74
|
const items = maxItems ? renderItems.slice(0, maxItems) : renderItems;
|
|
76
75
|
const totalSlides = items.length;
|
|
@@ -258,7 +257,7 @@ var Swiper = (props) => {
|
|
|
258
257
|
Math.floor(realIndex / slideBy),
|
|
259
258
|
totalSteps - 1
|
|
260
259
|
);
|
|
261
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
262
261
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
263
262
|
"div",
|
|
264
263
|
{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
}
|
|
26
26
|
.lib-xplat-swiper__progress {
|
|
27
|
-
margin-top:
|
|
27
|
+
margin-top: var(--spacing-space-4);
|
|
28
28
|
display: flex;
|
|
29
29
|
justify-content: center;
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
width: 100%;
|
|
34
34
|
max-width: 580px;
|
|
35
35
|
height: 2px;
|
|
36
|
-
background-color: var(--
|
|
36
|
+
background-color: var(--semantic-surface-neutral-disabled);
|
|
37
37
|
border-radius: 1px;
|
|
38
38
|
}
|
|
39
39
|
.lib-xplat-swiper__progress-fill {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
top: 0;
|
|
42
42
|
left: 0;
|
|
43
43
|
height: 100%;
|
|
44
|
-
background-color: var(--
|
|
44
|
+
background-color: var(--semantic-text-muted);
|
|
45
45
|
border-radius: 1px;
|
|
46
46
|
transition-property: width;
|
|
47
47
|
transition-timing-function: ease;
|
|
@@ -49,22 +49,22 @@
|
|
|
49
49
|
.lib-xplat-swiper__dots {
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
|
-
gap:
|
|
53
|
-
margin-top:
|
|
52
|
+
gap: var(--spacing-space-2);
|
|
53
|
+
margin-top: var(--spacing-space-4);
|
|
54
54
|
}
|
|
55
55
|
.lib-xplat-swiper__dot {
|
|
56
|
-
width:
|
|
57
|
-
height:
|
|
56
|
+
width: var(--spacing-space-2);
|
|
57
|
+
height: var(--spacing-space-2);
|
|
58
58
|
border-radius: 50%;
|
|
59
59
|
border: none;
|
|
60
60
|
padding: 0;
|
|
61
61
|
cursor: pointer;
|
|
62
|
-
background-color: var(--
|
|
62
|
+
background-color: var(--semantic-border-default);
|
|
63
63
|
transition: background-color 0.2s;
|
|
64
64
|
}
|
|
65
65
|
.lib-xplat-swiper__dot.active {
|
|
66
|
-
background-color: var(--
|
|
66
|
+
background-color: var(--semantic-text-subtle);
|
|
67
67
|
}
|
|
68
68
|
.lib-xplat-swiper__dot:hover:not(.active) {
|
|
69
|
-
background-color: var(--
|
|
69
|
+
background-color: var(--semantic-text-disabled);
|
|
70
70
|
}
|
|
@@ -33,8 +33,7 @@ var Swiper = (props) => {
|
|
|
33
33
|
speed = 300,
|
|
34
34
|
slideBy = 1,
|
|
35
35
|
index: indexProp,
|
|
36
|
-
onChange
|
|
37
|
-
className
|
|
36
|
+
onChange
|
|
38
37
|
} = props;
|
|
39
38
|
const items = maxItems ? renderItems.slice(0, maxItems) : renderItems;
|
|
40
39
|
const totalSlides = items.length;
|
|
@@ -222,7 +221,7 @@ var Swiper = (props) => {
|
|
|
222
221
|
Math.floor(realIndex / slideBy),
|
|
223
222
|
totalSteps - 1
|
|
224
223
|
);
|
|
225
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
224
|
+
return /* @__PURE__ */ jsxs("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
226
225
|
/* @__PURE__ */ jsx(
|
|
227
226
|
"div",
|
|
228
227
|
{
|
|
@@ -60,10 +60,9 @@ var Switch = (props) => {
|
|
|
60
60
|
const {
|
|
61
61
|
value,
|
|
62
62
|
size = "md",
|
|
63
|
+
type = "brand",
|
|
63
64
|
disabled,
|
|
64
|
-
onChange
|
|
65
|
-
color = "xplat-blue-500",
|
|
66
|
-
className
|
|
65
|
+
onChange
|
|
67
66
|
} = props;
|
|
68
67
|
const [isAnimating, setIsAnimating] = import_react.default.useState(false);
|
|
69
68
|
const timeoutRef = import_react.default.useRef(null);
|
|
@@ -82,18 +81,16 @@ var Switch = (props) => {
|
|
|
82
81
|
timeoutRef.current = null;
|
|
83
82
|
}, KNOB_TRANSITION_MS);
|
|
84
83
|
};
|
|
85
|
-
const colorClass = color;
|
|
86
84
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
85
|
"div",
|
|
88
86
|
{
|
|
89
87
|
className: clsx_default(
|
|
90
88
|
"lib-xplat-switch",
|
|
91
89
|
size,
|
|
90
|
+
type,
|
|
92
91
|
value ? "checked" : void 0,
|
|
93
92
|
disabled && "disabled",
|
|
94
|
-
isAnimating && "animating"
|
|
95
|
-
colorClass,
|
|
96
|
-
className
|
|
93
|
+
isAnimating && "animating"
|
|
97
94
|
),
|
|
98
95
|
onClick: handleClick,
|
|
99
96
|
"aria-disabled": disabled || isAnimating,
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
/* src/components/Switch/switch.scss */
|
|
2
2
|
.lib-xplat-switch {
|
|
3
3
|
position: relative;
|
|
4
|
-
border-radius:
|
|
4
|
+
border-radius: var(--spacing-radius-full);
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
transition: background-color 0.2s, border-color 0.2s;
|
|
7
7
|
border: 1px solid transparent;
|
|
8
|
-
background-color: var(--
|
|
9
|
-
border-color: var(--
|
|
8
|
+
background-color: var(--semantic-border-default);
|
|
9
|
+
border-color: var(--semantic-border-default);
|
|
10
10
|
}
|
|
11
11
|
.lib-xplat-switch.sm {
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
12
|
+
width: var(--spacing-space-8);
|
|
13
|
+
height: var(--spacing-space-4);
|
|
14
14
|
}
|
|
15
15
|
.lib-xplat-switch.sm > .knob {
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
16
|
+
width: var(--spacing-space-4);
|
|
17
|
+
height: var(--spacing-space-4);
|
|
18
18
|
}
|
|
19
19
|
.lib-xplat-switch.sm > .knob.checked {
|
|
20
|
-
transform: translateY(-50%) translateX(
|
|
20
|
+
transform: translateY(-50%) translateX(14px);
|
|
21
21
|
}
|
|
22
22
|
.lib-xplat-switch.md {
|
|
23
|
-
width:
|
|
24
|
-
height:
|
|
23
|
+
width: var(--spacing-space-11);
|
|
24
|
+
height: var(--spacing-space-6);
|
|
25
25
|
}
|
|
26
26
|
.lib-xplat-switch.md > .knob {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
27
|
+
width: var(--spacing-space-6);
|
|
28
|
+
height: var(--spacing-space-6);
|
|
29
29
|
}
|
|
30
30
|
.lib-xplat-switch.md > .knob.checked {
|
|
31
|
-
transform: translateY(-50%) translateX(
|
|
31
|
+
transform: translateY(-50%) translateX(22px);
|
|
32
32
|
}
|
|
33
33
|
.lib-xplat-switch.lg {
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
34
|
+
width: var(--spacing-space-11);
|
|
35
|
+
height: var(--spacing-space-8);
|
|
36
36
|
}
|
|
37
37
|
.lib-xplat-switch.lg > .knob {
|
|
38
|
-
width:
|
|
39
|
-
height:
|
|
38
|
+
width: var(--spacing-space-6);
|
|
39
|
+
height: var(--spacing-space-6);
|
|
40
40
|
}
|
|
41
41
|
.lib-xplat-switch.lg > .knob.checked {
|
|
42
|
-
transform: translateY(-50%) translateX(
|
|
42
|
+
transform: translateY(-50%) translateX(26px);
|
|
43
43
|
}
|
|
44
44
|
.lib-xplat-switch.disabled {
|
|
45
45
|
opacity: 0.5;
|
|
@@ -50,20 +50,52 @@
|
|
|
50
50
|
pointer-events: none;
|
|
51
51
|
cursor: wait;
|
|
52
52
|
}
|
|
53
|
-
.lib-xplat-switch.checked {
|
|
54
|
-
background-color: var(--
|
|
55
|
-
border-color: var(--
|
|
53
|
+
.lib-xplat-switch.brand.checked {
|
|
54
|
+
background-color: var(--semantic-surface-brand-default);
|
|
55
|
+
border-color: var(--semantic-surface-brand-default);
|
|
56
56
|
}
|
|
57
|
-
.lib-xplat-switch.checked:hover:not(.disabled):not(.animating) {
|
|
58
|
-
background-color:
|
|
59
|
-
border-color:
|
|
57
|
+
.lib-xplat-switch.brand.checked:hover:not(.disabled):not(.animating) {
|
|
58
|
+
background-color: var(--semantic-surface-brand-strong);
|
|
59
|
+
border-color: var(--semantic-surface-brand-strong);
|
|
60
|
+
}
|
|
61
|
+
.lib-xplat-switch.success.checked {
|
|
62
|
+
background-color: var(--semantic-surface-success-default);
|
|
63
|
+
border-color: var(--semantic-surface-success-default);
|
|
64
|
+
}
|
|
65
|
+
.lib-xplat-switch.success.checked:hover:not(.disabled):not(.animating) {
|
|
66
|
+
background-color: var(--semantic-surface-success-strong);
|
|
67
|
+
border-color: var(--semantic-surface-success-strong);
|
|
68
|
+
}
|
|
69
|
+
.lib-xplat-switch.error.checked {
|
|
70
|
+
background-color: var(--semantic-surface-error-default);
|
|
71
|
+
border-color: var(--semantic-surface-error-default);
|
|
72
|
+
}
|
|
73
|
+
.lib-xplat-switch.error.checked:hover:not(.disabled):not(.animating) {
|
|
74
|
+
background-color: var(--semantic-surface-error-strong);
|
|
75
|
+
border-color: var(--semantic-surface-error-strong);
|
|
76
|
+
}
|
|
77
|
+
.lib-xplat-switch.warning.checked {
|
|
78
|
+
background-color: var(--semantic-surface-warning-default);
|
|
79
|
+
border-color: var(--semantic-surface-warning-default);
|
|
80
|
+
}
|
|
81
|
+
.lib-xplat-switch.warning.checked:hover:not(.disabled):not(.animating) {
|
|
82
|
+
background-color: var(--semantic-surface-warning-strong);
|
|
83
|
+
border-color: var(--semantic-surface-warning-strong);
|
|
84
|
+
}
|
|
85
|
+
.lib-xplat-switch.info.checked {
|
|
86
|
+
background-color: var(--semantic-surface-info-default);
|
|
87
|
+
border-color: var(--semantic-surface-info-default);
|
|
88
|
+
}
|
|
89
|
+
.lib-xplat-switch.info.checked:hover:not(.disabled):not(.animating) {
|
|
90
|
+
background-color: var(--semantic-surface-info-strong);
|
|
91
|
+
border-color: var(--semantic-surface-info-strong);
|
|
60
92
|
}
|
|
61
93
|
.lib-xplat-switch > .knob {
|
|
62
94
|
position: absolute;
|
|
63
95
|
top: 50%;
|
|
64
96
|
left: 0;
|
|
65
|
-
background-color: var(--
|
|
66
|
-
border-radius:
|
|
97
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
98
|
+
border-radius: var(--spacing-radius-full);
|
|
67
99
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
68
100
|
transform: translateY(-50%);
|
|
69
101
|
transition: transform 0.25s;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.cjs';
|
|
3
2
|
|
|
4
3
|
type SwitchSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
4
|
+
type SwitchType = "brand" | "success" | "error" | "warning" | "info";
|
|
5
|
+
interface SwitchProps {
|
|
6
6
|
value: boolean;
|
|
7
7
|
size?: SwitchSize;
|
|
8
|
+
type?: SwitchType;
|
|
8
9
|
disabled?: boolean;
|
|
9
|
-
className?: string;
|
|
10
10
|
onChange?: (value: boolean) => void;
|
|
11
11
|
}
|
|
12
12
|
declare const Switch: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.js';
|
|
3
2
|
|
|
4
3
|
type SwitchSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
4
|
+
type SwitchType = "brand" | "success" | "error" | "warning" | "info";
|
|
5
|
+
interface SwitchProps {
|
|
6
6
|
value: boolean;
|
|
7
7
|
size?: SwitchSize;
|
|
8
|
+
type?: SwitchType;
|
|
8
9
|
disabled?: boolean;
|
|
9
|
-
className?: string;
|
|
10
10
|
onChange?: (value: boolean) => void;
|
|
11
11
|
}
|
|
12
12
|
declare const Switch: {
|
|
@@ -24,10 +24,9 @@ var Switch = (props) => {
|
|
|
24
24
|
const {
|
|
25
25
|
value,
|
|
26
26
|
size = "md",
|
|
27
|
+
type = "brand",
|
|
27
28
|
disabled,
|
|
28
|
-
onChange
|
|
29
|
-
color = "xplat-blue-500",
|
|
30
|
-
className
|
|
29
|
+
onChange
|
|
31
30
|
} = props;
|
|
32
31
|
const [isAnimating, setIsAnimating] = React.useState(false);
|
|
33
32
|
const timeoutRef = React.useRef(null);
|
|
@@ -46,18 +45,16 @@ var Switch = (props) => {
|
|
|
46
45
|
timeoutRef.current = null;
|
|
47
46
|
}, KNOB_TRANSITION_MS);
|
|
48
47
|
};
|
|
49
|
-
const colorClass = color;
|
|
50
48
|
return /* @__PURE__ */ jsx(
|
|
51
49
|
"div",
|
|
52
50
|
{
|
|
53
51
|
className: clsx_default(
|
|
54
52
|
"lib-xplat-switch",
|
|
55
53
|
size,
|
|
54
|
+
type,
|
|
56
55
|
value ? "checked" : void 0,
|
|
57
56
|
disabled && "disabled",
|
|
58
|
-
isAnimating && "animating"
|
|
59
|
-
colorClass,
|
|
60
|
-
className
|
|
57
|
+
isAnimating && "animating"
|
|
61
58
|
),
|
|
62
59
|
onClick: handleClick,
|
|
63
60
|
"aria-disabled": disabled || isAnimating,
|
|
@@ -7,45 +7,45 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
}
|
|
9
9
|
.lib-xplat-tab.sm {
|
|
10
|
-
height:
|
|
10
|
+
height: var(--spacing-control-height-sm);
|
|
11
11
|
font-size: 14px;
|
|
12
12
|
}
|
|
13
13
|
.lib-xplat-tab.md {
|
|
14
|
-
height:
|
|
14
|
+
height: var(--spacing-control-height-md);
|
|
15
15
|
font-size: 16px;
|
|
16
16
|
}
|
|
17
17
|
.lib-xplat-tab.lg {
|
|
18
|
-
height:
|
|
18
|
+
height: var(--spacing-control-height-lg);
|
|
19
19
|
font-size: 18px;
|
|
20
20
|
}
|
|
21
21
|
.lib-xplat-tab.type-default {
|
|
22
|
-
background-color: var(--
|
|
23
|
-
border-radius:
|
|
22
|
+
background-color: var(--semantic-surface-neutral-strong);
|
|
23
|
+
border-radius: var(--spacing-radius-md);
|
|
24
24
|
}
|
|
25
25
|
.lib-xplat-tab.type-default > .tab-item {
|
|
26
|
-
padding:
|
|
26
|
+
padding: var(--spacing-space-1) var(--spacing-space-6);
|
|
27
27
|
height: 100%;
|
|
28
28
|
display: flex;
|
|
29
29
|
align-items: center;
|
|
30
30
|
cursor: pointer;
|
|
31
|
-
border-right: 1px solid var(--
|
|
32
|
-
color: var(--
|
|
31
|
+
border-right: 1px solid var(--semantic-border-strong);
|
|
32
|
+
color: var(--semantic-text-inverse);
|
|
33
33
|
}
|
|
34
34
|
.lib-xplat-tab.type-default > .tab-item:last-child {
|
|
35
35
|
border-right: none;
|
|
36
36
|
}
|
|
37
37
|
.lib-xplat-tab.type-default > .tab-item.active {
|
|
38
|
-
background-color: var(--
|
|
38
|
+
background-color: var(--semantic-surface-brand-default);
|
|
39
39
|
}
|
|
40
40
|
.lib-xplat-tab.type-toggle {
|
|
41
|
-
border-bottom: 1px solid var(--
|
|
42
|
-
gap:
|
|
41
|
+
border-bottom: 1px solid var(--semantic-border-default);
|
|
42
|
+
gap: var(--spacing-space-6);
|
|
43
43
|
}
|
|
44
44
|
.lib-xplat-tab.type-toggle > .tab-item {
|
|
45
45
|
position: relative;
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
|
-
padding: 0
|
|
48
|
+
padding: 0 var(--spacing-space-3);
|
|
49
49
|
font-size: 16px;
|
|
50
50
|
font-weight: 500;
|
|
51
51
|
height: 100%;
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
border: none;
|
|
54
54
|
cursor: pointer;
|
|
55
55
|
transition: color 0.2s;
|
|
56
|
-
color: var(--
|
|
56
|
+
color: var(--semantic-text-muted);
|
|
57
57
|
}
|
|
58
58
|
.lib-xplat-tab.type-toggle > .tab-item.active {
|
|
59
|
-
color: var(--
|
|
59
|
+
color: var(--semantic-surface-brand-default);
|
|
60
60
|
}
|
|
61
61
|
.lib-xplat-tab.type-toggle > .tab-toggle-underline {
|
|
62
62
|
position: absolute;
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
right: 0;
|
|
65
65
|
bottom: -1px;
|
|
66
66
|
height: 2px;
|
|
67
|
-
background-color: var(--
|
|
67
|
+
background-color: var(--semantic-surface-brand-default);
|
|
68
68
|
transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
|
69
69
|
will-change: left, width;
|
|
70
70
|
}
|
|
@@ -38,22 +38,6 @@ __export(Table_exports, {
|
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(Table_exports);
|
|
40
40
|
|
|
41
|
-
// ../../node_modules/clsx/dist/clsx.mjs
|
|
42
|
-
function r(e) {
|
|
43
|
-
var t, f, n = "";
|
|
44
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
45
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
46
|
-
var o = e.length;
|
|
47
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
48
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
49
|
-
return n;
|
|
50
|
-
}
|
|
51
|
-
function clsx() {
|
|
52
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
53
|
-
return n;
|
|
54
|
-
}
|
|
55
|
-
var clsx_default = clsx;
|
|
56
|
-
|
|
57
41
|
// src/components/Table/TableContext.tsx
|
|
58
42
|
var import_react = __toESM(require("react"), 1);
|
|
59
43
|
var TableContext = import_react.default.createContext(null);
|
|
@@ -68,14 +52,13 @@ var TableContext_default = TableContext;
|
|
|
68
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
69
53
|
var Table = (props) => {
|
|
70
54
|
const {
|
|
71
|
-
className,
|
|
72
55
|
children,
|
|
73
56
|
rowBorderUse = true,
|
|
74
57
|
colBorderUse = true,
|
|
75
58
|
headerSticky = false,
|
|
76
59
|
stickyShadow = true
|
|
77
60
|
} = props;
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className:
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "lib-xplat-table-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
62
|
TableContext_default.Provider,
|
|
80
63
|
{
|
|
81
64
|
value: {
|
|
@@ -94,8 +77,8 @@ var Table_default = Table;
|
|
|
94
77
|
// src/components/Table/TableBody.tsx
|
|
95
78
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
79
|
var TableBody = (props) => {
|
|
97
|
-
const { children
|
|
98
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", {
|
|
80
|
+
const { children } = props;
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { children });
|
|
99
82
|
};
|
|
100
83
|
TableBody.displayName = "TableBody";
|
|
101
84
|
var TableBody_default = TableBody;
|
|
@@ -103,6 +86,22 @@ var TableBody_default = TableBody;
|
|
|
103
86
|
// src/components/Table/TableCell.tsx
|
|
104
87
|
var import_react4 = __toESM(require("react"), 1);
|
|
105
88
|
|
|
89
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
90
|
+
function r(e) {
|
|
91
|
+
var t, f, n = "";
|
|
92
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
93
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
94
|
+
var o = e.length;
|
|
95
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
96
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
97
|
+
return n;
|
|
98
|
+
}
|
|
99
|
+
function clsx() {
|
|
100
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
101
|
+
return n;
|
|
102
|
+
}
|
|
103
|
+
var clsx_default = clsx;
|
|
104
|
+
|
|
106
105
|
// src/components/Table/TableHeadContext.tsx
|
|
107
106
|
var import_react2 = __toESM(require("react"), 1);
|
|
108
107
|
var TableHeadContext = import_react2.default.createContext(
|
|
@@ -130,7 +129,6 @@ var TableCell = (props) => {
|
|
|
130
129
|
const {
|
|
131
130
|
children,
|
|
132
131
|
align = "center",
|
|
133
|
-
className,
|
|
134
132
|
isSticky = false,
|
|
135
133
|
onClick
|
|
136
134
|
} = props;
|
|
@@ -175,8 +173,7 @@ var TableCell = (props) => {
|
|
|
175
173
|
isSticky && "table-sticky",
|
|
176
174
|
isLastSticky && stickyShadow && "right-shadow",
|
|
177
175
|
onClick && "clickable",
|
|
178
|
-
enableHover && "cell-hover"
|
|
179
|
-
className
|
|
176
|
+
enableHover && "cell-hover"
|
|
180
177
|
),
|
|
181
178
|
style: isSticky ? { left } : void 0,
|
|
182
179
|
onClick,
|
|
@@ -191,11 +188,10 @@ var TableCell_default = TableCell;
|
|
|
191
188
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
192
189
|
var TableHead = ({
|
|
193
190
|
children,
|
|
194
|
-
className = "",
|
|
195
191
|
cellHover = false
|
|
196
192
|
}) => {
|
|
197
193
|
const { headerSticky } = useTableContext();
|
|
198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
199
195
|
};
|
|
200
196
|
TableHead.displayName = "TableHead";
|
|
201
197
|
var TableHead_default = TableHead;
|
|
@@ -206,8 +202,6 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
206
202
|
var TableRow = (props) => {
|
|
207
203
|
const {
|
|
208
204
|
children,
|
|
209
|
-
className,
|
|
210
|
-
color = "xplat-neutral-900",
|
|
211
205
|
type = "secondary",
|
|
212
206
|
isHover,
|
|
213
207
|
onClick
|
|
@@ -220,17 +214,14 @@ var TableRow = (props) => {
|
|
|
220
214
|
return [...prev, ref];
|
|
221
215
|
});
|
|
222
216
|
};
|
|
223
|
-
const colorClass = color;
|
|
224
217
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
225
218
|
"tr",
|
|
226
219
|
{
|
|
227
220
|
className: clsx_default(
|
|
228
221
|
rowBorderUse ? "table-bottom-border" : null,
|
|
229
222
|
type,
|
|
230
|
-
colorClass,
|
|
231
223
|
isHover && "hover",
|
|
232
|
-
onClick && "clickable"
|
|
233
|
-
className
|
|
224
|
+
onClick && "clickable"
|
|
234
225
|
),
|
|
235
226
|
onClick,
|
|
236
227
|
children
|
|
@@ -14,54 +14,54 @@
|
|
|
14
14
|
}
|
|
15
15
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.table-bottom-border,
|
|
16
16
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.table-bottom-border {
|
|
17
|
-
border-bottom: 1px solid var(--
|
|
17
|
+
border-bottom: 1px solid var(--semantic-border-default);
|
|
18
18
|
}
|
|
19
19
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary,
|
|
20
20
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary {
|
|
21
|
-
background-color: var(--
|
|
21
|
+
background-color: var(--semantic-surface-brand-default);
|
|
22
22
|
}
|
|
23
23
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary > td,
|
|
24
24
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary > th,
|
|
25
25
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary > td,
|
|
26
26
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary > th {
|
|
27
|
-
color: var(--
|
|
28
|
-
background-color: var(--
|
|
27
|
+
color: var(--semantic-text-inverse);
|
|
28
|
+
background-color: var(--semantic-surface-brand-default);
|
|
29
29
|
}
|
|
30
30
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary > td.cell-hover:hover,
|
|
31
31
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary > th.cell-hover:hover,
|
|
32
32
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary > td.cell-hover:hover,
|
|
33
33
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary > th.cell-hover:hover {
|
|
34
|
-
background-color:
|
|
34
|
+
background-color: var(--semantic-surface-brand-strong);
|
|
35
35
|
}
|
|
36
36
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary.hover:hover > td,
|
|
37
37
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.primary.hover:hover > th,
|
|
38
38
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary.hover:hover > td,
|
|
39
39
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.primary.hover:hover > th {
|
|
40
|
-
color: var(--
|
|
41
|
-
background-color:
|
|
40
|
+
color: var(--semantic-text-inverse);
|
|
41
|
+
background-color: var(--semantic-surface-brand-strong);
|
|
42
42
|
}
|
|
43
43
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary,
|
|
44
44
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary {
|
|
45
|
-
background-color: var(--
|
|
45
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
46
46
|
}
|
|
47
47
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary > td,
|
|
48
48
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary > th,
|
|
49
49
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary > td,
|
|
50
50
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary > th {
|
|
51
|
-
background-color: var(--
|
|
52
|
-
color: var(--
|
|
51
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
52
|
+
color: var(--semantic-text-strong);
|
|
53
53
|
}
|
|
54
54
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary > td.cell-hover:hover,
|
|
55
55
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary > th.cell-hover:hover,
|
|
56
56
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary > td.cell-hover:hover,
|
|
57
57
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary > th.cell-hover:hover {
|
|
58
|
-
background-color:
|
|
58
|
+
background-color: var(--semantic-surface-neutral-subtle);
|
|
59
59
|
}
|
|
60
60
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary.hover:hover > td,
|
|
61
61
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.secondary.hover:hover > th,
|
|
62
62
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary.hover:hover > td,
|
|
63
63
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.secondary.hover:hover > th {
|
|
64
|
-
background-color:
|
|
64
|
+
background-color: var(--semantic-surface-neutral-subtle);
|
|
65
65
|
}
|
|
66
66
|
.lib-xplat-table-wrapper > .lib-xplat-table > thead > tr.clickable,
|
|
67
67
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr.clickable {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr > td,
|
|
73
73
|
.lib-xplat-table-wrapper > .lib-xplat-table > tbody > tr > th {
|
|
74
74
|
min-width: 80px;
|
|
75
|
-
padding:
|
|
75
|
+
padding: var(--spacing-space-2);
|
|
76
76
|
vertical-align: middle;
|
|
77
77
|
transition: background-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
78
78
|
}
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
content: "";
|
|
126
126
|
position: absolute;
|
|
127
127
|
top: 0;
|
|
128
|
-
right: -
|
|
129
|
-
width:
|
|
128
|
+
right: calc(var(--spacing-space-2) * -1);
|
|
129
|
+
width: var(--spacing-space-2);
|
|
130
130
|
height: 100%;
|
|
131
131
|
background:
|
|
132
132
|
linear-gradient(
|