@x-plat/design-system 0.4.6 → 0.5.1
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 +4 -4
- package/dist/components/Accordion/index.css +11 -11
- package/dist/components/Accordion/index.js +4 -4
- package/dist/components/Alert/index.css +19 -19
- package/dist/components/Avatar/index.cjs +11 -5
- package/dist/components/Avatar/index.css +41 -11
- package/dist/components/Avatar/index.d.cts +1 -2
- package/dist/components/Avatar/index.d.ts +1 -2
- package/dist/components/Avatar/index.js +11 -5
- package/dist/components/Badge/index.cjs +3 -4
- package/dist/components/Badge/index.css +32 -19
- package/dist/components/Badge/index.d.cts +3 -2
- package/dist/components/Badge/index.d.ts +3 -2
- package/dist/components/Badge/index.js +3 -4
- package/dist/components/Breadcrumb/index.css +6 -6
- package/dist/components/Button/index.cjs +1 -3
- 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 -3
- package/dist/components/Calendar/index.cjs +10 -10
- package/dist/components/Calendar/index.css +51 -52
- package/dist/components/Calendar/index.d.cts +3 -3
- package/dist/components/Calendar/index.d.ts +3 -3
- package/dist/components/Calendar/index.js +10 -10
- package/dist/components/Card/index.css +6 -6
- package/dist/components/CardTab/index.css +28 -28
- 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 +13 -8
- package/dist/components/CheckBox/index.css +50 -27
- package/dist/components/CheckBox/index.d.cts +3 -2
- package/dist/components/CheckBox/index.d.ts +3 -2
- package/dist/components/CheckBox/index.js +13 -8
- package/dist/components/Chip/index.cjs +1 -3
- package/dist/components/Chip/index.css +35 -23
- package/dist/components/Chip/index.d.cts +2 -3
- package/dist/components/Chip/index.d.ts +2 -3
- package/dist/components/Chip/index.js +1 -3
- package/dist/components/DatePicker/index.cjs +37 -46
- 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 +37 -46
- package/dist/components/Divider/index.css +2 -2
- package/dist/components/Drawer/index.css +7 -7
- package/dist/components/Dropdown/index.css +10 -10
- package/dist/components/EmptyState/index.css +8 -9
- package/dist/components/FileUpload/index.cjs +4 -4
- package/dist/components/FileUpload/index.css +13 -14
- package/dist/components/FileUpload/index.js +4 -4
- 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 +4 -4
- package/dist/components/ImageSelector/index.css +15 -15
- package/dist/components/ImageSelector/index.js +4 -4
- package/dist/components/Input/index.css +37 -26
- package/dist/components/Modal/index.css +5 -4
- package/dist/components/Pagination/index.cjs +9 -10
- package/dist/components/Pagination/index.css +37 -26
- package/dist/components/Pagination/index.d.cts +3 -2
- package/dist/components/Pagination/index.d.ts +3 -2
- package/dist/components/Pagination/index.js +9 -10
- package/dist/components/PopOver/index.css +3 -3
- package/dist/components/Progress/index.cjs +4 -5
- package/dist/components/Progress/index.css +23 -9
- package/dist/components/Progress/index.d.cts +3 -2
- package/dist/components/Progress/index.d.ts +3 -2
- package/dist/components/Progress/index.js +4 -5
- package/dist/components/Radio/index.cjs +3 -4
- package/dist/components/Radio/index.css +61 -29
- package/dist/components/Radio/index.d.cts +3 -2
- package/dist/components/Radio/index.d.ts +3 -2
- package/dist/components/Radio/index.js +3 -4
- package/dist/components/Select/index.cjs +4 -4
- package/dist/components/Select/index.css +46 -40
- package/dist/components/Select/index.js +4 -4
- package/dist/components/Skeleton/index.css +3 -3
- package/dist/components/Spinner/index.cjs +2 -3
- package/dist/components/Spinner/index.css +22 -8
- package/dist/components/Spinner/index.d.cts +3 -2
- package/dist/components/Spinner/index.d.ts +3 -2
- package/dist/components/Spinner/index.js +2 -3
- package/dist/components/Steps/index.cjs +8 -9
- package/dist/components/Steps/index.css +77 -22
- package/dist/components/Steps/index.d.cts +3 -2
- package/dist/components/Steps/index.d.ts +3 -2
- package/dist/components/Steps/index.js +8 -9
- package/dist/components/Swiper/index.css +10 -10
- package/dist/components/Switch/index.cjs +4 -5
- package/dist/components/Switch/index.css +58 -26
- package/dist/components/Switch/index.d.cts +3 -2
- package/dist/components/Switch/index.d.ts +3 -2
- package/dist/components/Switch/index.js +4 -5
- package/dist/components/Tab/index.css +15 -15
- package/dist/components/Table/index.cjs +0 -3
- package/dist/components/Table/index.css +15 -15
- package/dist/components/Table/index.d.cts +1 -2
- package/dist/components/Table/index.d.ts +1 -2
- package/dist/components/Table/index.js +0 -3
- package/dist/components/Tag/index.cjs +23 -10
- package/dist/components/Tag/index.css +58 -17
- package/dist/components/Tag/index.d.cts +5 -2
- package/dist/components/Tag/index.d.ts +5 -2
- package/dist/components/Tag/index.js +23 -10
- package/dist/components/TextArea/index.css +20 -9
- 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.css +5 -5
- package/dist/components/index.cjs +970 -15289
- 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 +871 -15192
- package/dist/index.cjs +1077 -15378
- package/dist/index.css +2164 -1058
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +877 -15182
- 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 +33 -142
- package/dist/tokens/index.d.cts +23 -6
- package/dist/tokens/index.d.ts +23 -6
- package/dist/tokens/index.js +29 -140
- package/guidelines/Guidelines.md +57 -0
- package/guidelines/components/accordion.md +72 -0
- package/guidelines/components/avatar.md +35 -0
- package/guidelines/components/button.md +58 -0
- package/guidelines/components/card.md +28 -0
- package/guidelines/components/chart.md +58 -0
- package/guidelines/components/chip-tag.md +49 -0
- package/guidelines/components/data-display.md +96 -0
- package/guidelines/components/datepicker.md +60 -0
- package/guidelines/components/dropdown.md +49 -0
- package/guidelines/components/feedback.md +64 -0
- package/guidelines/components/file-media.md +95 -0
- package/guidelines/components/form.md +60 -0
- package/guidelines/components/html-typewriter.md +38 -0
- package/guidelines/components/input.md +55 -0
- package/guidelines/components/navigation.md +80 -0
- package/guidelines/components/overlay.md +72 -0
- package/guidelines/components/select.md +44 -0
- package/guidelines/components/swiper.md +84 -0
- package/guidelines/components/table.md +62 -0
- package/guidelines/composition/grid.md +95 -0
- package/guidelines/composition/layout.md +30 -0
- package/guidelines/foundations/color.md +81 -0
- package/guidelines/foundations/icons.md +55 -0
- package/guidelines/foundations/spacing.md +51 -0
- package/guidelines/foundations/typography.md +63 -0
- package/guidelines/setup.md +42 -0
- package/package.json +5 -5
- 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
|
@@ -24,6 +24,9 @@ __export(CheckBox_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(CheckBox_exports);
|
|
26
26
|
|
|
27
|
+
// src/tokens/colors.ts
|
|
28
|
+
var import_tokens_core = require("@x-plat/tokens-core");
|
|
29
|
+
|
|
27
30
|
// src/tokens/svg/action/CopyIcon.tsx
|
|
28
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
|
|
@@ -405,10 +408,10 @@ var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
|
405
408
|
// src/tokens/svg/file/BookIcon.tsx
|
|
406
409
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
407
410
|
|
|
408
|
-
// src/tokens/svg/file/
|
|
411
|
+
// src/tokens/svg/file/BookmarkIcon.tsx
|
|
409
412
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
410
413
|
|
|
411
|
-
// src/tokens/svg/file/
|
|
414
|
+
// src/tokens/svg/file/BookOpenIcon.tsx
|
|
412
415
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
413
416
|
|
|
414
417
|
// src/tokens/svg/file/ClipboardIcon.tsx
|
|
@@ -882,10 +885,10 @@ var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
|
882
885
|
// src/tokens/svg/user/UserPlusIcon.tsx
|
|
883
886
|
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
884
887
|
|
|
885
|
-
// src/tokens/svg/user/
|
|
888
|
+
// src/tokens/svg/user/UsersIcon.tsx
|
|
886
889
|
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
887
890
|
|
|
888
|
-
// src/tokens/svg/user/
|
|
891
|
+
// src/tokens/svg/user/UserXIcon.tsx
|
|
889
892
|
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
890
893
|
|
|
891
894
|
// src/tokens/svg/weather/CloudDrizzleIcon.tsx
|
|
@@ -924,6 +927,9 @@ var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
|
924
927
|
// src/tokens/svg/weather/WindIcon.tsx
|
|
925
928
|
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
926
929
|
|
|
930
|
+
// src/tokens/index.ts
|
|
931
|
+
var import_tokens_core2 = require("@x-plat/tokens-core");
|
|
932
|
+
|
|
927
933
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
928
934
|
function r(e) {
|
|
929
935
|
var t, f, n = "";
|
|
@@ -944,23 +950,22 @@ var clsx_default = clsx;
|
|
|
944
950
|
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
945
951
|
var CheckBox = (props) => {
|
|
946
952
|
const {
|
|
947
|
-
color = "xplat-blue-500",
|
|
948
953
|
checked,
|
|
949
954
|
label,
|
|
950
955
|
onChange,
|
|
951
956
|
disabled,
|
|
952
957
|
size = "md",
|
|
958
|
+
type = "brand",
|
|
953
959
|
...rest
|
|
954
960
|
} = props;
|
|
955
961
|
const handleChange = (e) => {
|
|
956
962
|
if (onChange) onChange(e);
|
|
957
963
|
};
|
|
958
|
-
const mainColor = color;
|
|
959
964
|
const uncheckedClasses = `unchecked`;
|
|
960
|
-
const checkedClasses = `checked
|
|
965
|
+
const checkedClasses = `checked`;
|
|
961
966
|
const disabledClasses = "disabled";
|
|
962
967
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size), children: [
|
|
968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, type), children: [
|
|
964
969
|
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
965
970
|
"input",
|
|
966
971
|
{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.lib-xplat-checkbox {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
|
-
gap:
|
|
5
|
+
gap: var(--spacing-space-2);
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
user-select: none;
|
|
8
8
|
width: fit-content;
|
|
@@ -12,43 +12,30 @@
|
|
|
12
12
|
pointer-events: none;
|
|
13
13
|
}
|
|
14
14
|
.lib-xplat-checkbox.sm > .checkbox {
|
|
15
|
-
width:
|
|
16
|
-
height:
|
|
15
|
+
width: var(--spacing-space-4);
|
|
16
|
+
height: var(--spacing-space-4);
|
|
17
17
|
}
|
|
18
18
|
.lib-xplat-checkbox.md > .checkbox {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
19
|
+
width: var(--spacing-space-5);
|
|
20
|
+
height: var(--spacing-space-5);
|
|
21
21
|
}
|
|
22
22
|
.lib-xplat-checkbox.lg > .checkbox {
|
|
23
|
-
width:
|
|
24
|
-
height:
|
|
23
|
+
width: var(--spacing-space-6);
|
|
24
|
+
height: var(--spacing-space-6);
|
|
25
25
|
}
|
|
26
26
|
.lib-xplat-checkbox.sm > .label {
|
|
27
|
-
font-size:
|
|
27
|
+
font-size: 14px;
|
|
28
28
|
}
|
|
29
29
|
.lib-xplat-checkbox.lg > .label {
|
|
30
|
-
font-size:
|
|
30
|
+
font-size: 18px;
|
|
31
31
|
}
|
|
32
32
|
.lib-xplat-checkbox > .checkbox {
|
|
33
33
|
display: flex;
|
|
34
34
|
align-items: center;
|
|
35
35
|
justify-content: center;
|
|
36
|
-
border-radius:
|
|
36
|
+
border-radius: var(--spacing-radius-sm);
|
|
37
37
|
transition: border-color 0.12s ease-out, background-color 0.12s ease-out;
|
|
38
38
|
}
|
|
39
|
-
.lib-xplat-checkbox > .checkbox.unchecked {
|
|
40
|
-
border: 1px solid var(--xplat-neutral-400);
|
|
41
|
-
}
|
|
42
|
-
.lib-xplat-checkbox:hover .lib-xplat-checkbox > .checkbox.unchecked {
|
|
43
|
-
border-color: var(--xplat-neutral-600);
|
|
44
|
-
background-color: var(--xplat-neutral-100);
|
|
45
|
-
}
|
|
46
|
-
.lib-xplat-checkbox > .checkbox.checked {
|
|
47
|
-
background-color: var(--ds-color);
|
|
48
|
-
}
|
|
49
|
-
.lib-xplat-checkbox > .checkbox.checked:hover {
|
|
50
|
-
background-color: color-mix(in srgb, var(--ds-color), black 15%);
|
|
51
|
-
}
|
|
52
39
|
.lib-xplat-checkbox > .checkbox .check-icon {
|
|
53
40
|
display: flex;
|
|
54
41
|
align-items: center;
|
|
@@ -61,14 +48,50 @@
|
|
|
61
48
|
opacity: 1;
|
|
62
49
|
transform: scale(1);
|
|
63
50
|
}
|
|
51
|
+
.lib-xplat-checkbox > .checkbox.unchecked {
|
|
52
|
+
border: 1px solid var(--semantic-border-strong);
|
|
53
|
+
}
|
|
54
|
+
.lib-xplat-checkbox:hover > .checkbox.unchecked {
|
|
55
|
+
background-color: var(--semantic-surface-neutral-disabled);
|
|
56
|
+
}
|
|
57
|
+
.lib-xplat-checkbox.brand > .checkbox.checked {
|
|
58
|
+
background-color: var(--semantic-surface-brand-default);
|
|
59
|
+
}
|
|
60
|
+
.lib-xplat-checkbox.success > .checkbox.checked {
|
|
61
|
+
background-color: var(--semantic-surface-success-default);
|
|
62
|
+
}
|
|
63
|
+
.lib-xplat-checkbox.error > .checkbox.checked {
|
|
64
|
+
background-color: var(--semantic-surface-error-default);
|
|
65
|
+
}
|
|
66
|
+
.lib-xplat-checkbox.warning > .checkbox.checked {
|
|
67
|
+
background-color: var(--semantic-surface-warning-default);
|
|
68
|
+
}
|
|
69
|
+
.lib-xplat-checkbox.info > .checkbox.checked {
|
|
70
|
+
background-color: var(--semantic-surface-info-default);
|
|
71
|
+
}
|
|
72
|
+
.lib-xplat-checkbox:hover.brand > .checkbox.checked {
|
|
73
|
+
background-color: var(--semantic-surface-brand-strong);
|
|
74
|
+
}
|
|
75
|
+
.lib-xplat-checkbox:hover.success > .checkbox.checked {
|
|
76
|
+
background-color: var(--semantic-surface-success-strong);
|
|
77
|
+
}
|
|
78
|
+
.lib-xplat-checkbox:hover.error > .checkbox.checked {
|
|
79
|
+
background-color: var(--semantic-surface-error-strong);
|
|
80
|
+
}
|
|
81
|
+
.lib-xplat-checkbox:hover.warning > .checkbox.checked {
|
|
82
|
+
background-color: var(--semantic-surface-warning-strong);
|
|
83
|
+
}
|
|
84
|
+
.lib-xplat-checkbox:hover.info > .checkbox.checked {
|
|
85
|
+
background-color: var(--semantic-surface-info-strong);
|
|
86
|
+
}
|
|
64
87
|
.lib-xplat-checkbox > .checkbox.disabled {
|
|
65
88
|
cursor: not-allowed;
|
|
66
|
-
background-color: var(--
|
|
67
|
-
border-color: var(--
|
|
89
|
+
background-color: var(--semantic-surface-neutral-disabled) !important;
|
|
90
|
+
border-color: var(--semantic-surface-neutral-disabled) !important;
|
|
68
91
|
}
|
|
69
92
|
.lib-xplat-checkbox > .label {
|
|
70
|
-
color: var(--
|
|
93
|
+
color: var(--semantic-text-strong);
|
|
71
94
|
font-weight: 400;
|
|
72
95
|
line-height: 1em;
|
|
73
|
-
padding-top:
|
|
96
|
+
padding-top: 1px;
|
|
74
97
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { I as InputAttributes } from '../../attributes-DJIWir_0.cjs';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.cjs';
|
|
4
3
|
import 'react';
|
|
5
4
|
|
|
6
5
|
type CheckBoxSize = "sm" | "md" | "lg";
|
|
7
|
-
|
|
6
|
+
type CheckBoxType = "brand" | "success" | "error" | "warning" | "info";
|
|
7
|
+
interface CheckBoxProps extends Omit<InputAttributes, "size" | "className"> {
|
|
8
8
|
label?: string;
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
size?: CheckBoxSize;
|
|
11
|
+
type?: CheckBoxType;
|
|
11
12
|
}
|
|
12
13
|
declare const CheckBox: {
|
|
13
14
|
(props: CheckBoxProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { I as InputAttributes } from '../../attributes-DJIWir_0.js';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.js';
|
|
4
3
|
import 'react';
|
|
5
4
|
|
|
6
5
|
type CheckBoxSize = "sm" | "md" | "lg";
|
|
7
|
-
|
|
6
|
+
type CheckBoxType = "brand" | "success" | "error" | "warning" | "info";
|
|
7
|
+
interface CheckBoxProps extends Omit<InputAttributes, "size" | "className"> {
|
|
8
8
|
label?: string;
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
size?: CheckBoxSize;
|
|
11
|
+
type?: CheckBoxType;
|
|
11
12
|
}
|
|
12
13
|
declare const CheckBox: {
|
|
13
14
|
(props: CheckBoxProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/tokens/colors.ts
|
|
2
|
+
import { primitive, semantic } from "@x-plat/tokens-core";
|
|
3
|
+
|
|
1
4
|
// src/tokens/svg/action/CopyIcon.tsx
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
|
|
@@ -379,10 +382,10 @@ import { jsx as jsx126, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
|
379
382
|
// src/tokens/svg/file/BookIcon.tsx
|
|
380
383
|
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
381
384
|
|
|
382
|
-
// src/tokens/svg/file/
|
|
385
|
+
// src/tokens/svg/file/BookmarkIcon.tsx
|
|
383
386
|
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
384
387
|
|
|
385
|
-
// src/tokens/svg/file/
|
|
388
|
+
// src/tokens/svg/file/BookOpenIcon.tsx
|
|
386
389
|
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
387
390
|
|
|
388
391
|
// src/tokens/svg/file/ClipboardIcon.tsx
|
|
@@ -856,10 +859,10 @@ import { jsx as jsx279, jsxs as jsxs177 } from "react/jsx-runtime";
|
|
|
856
859
|
// src/tokens/svg/user/UserPlusIcon.tsx
|
|
857
860
|
import { jsx as jsx280, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
858
861
|
|
|
859
|
-
// src/tokens/svg/user/
|
|
862
|
+
// src/tokens/svg/user/UsersIcon.tsx
|
|
860
863
|
import { jsx as jsx281, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
861
864
|
|
|
862
|
-
// src/tokens/svg/user/
|
|
865
|
+
// src/tokens/svg/user/UserXIcon.tsx
|
|
863
866
|
import { jsx as jsx282, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
864
867
|
|
|
865
868
|
// src/tokens/svg/weather/CloudDrizzleIcon.tsx
|
|
@@ -898,6 +901,9 @@ import { jsx as jsx293, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
|
898
901
|
// src/tokens/svg/weather/WindIcon.tsx
|
|
899
902
|
import { jsx as jsx294, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
900
903
|
|
|
904
|
+
// src/tokens/index.ts
|
|
905
|
+
import { cssVar } from "@x-plat/tokens-core";
|
|
906
|
+
|
|
901
907
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
902
908
|
function r(e) {
|
|
903
909
|
var t, f, n = "";
|
|
@@ -918,23 +924,22 @@ var clsx_default = clsx;
|
|
|
918
924
|
import { jsx as jsx295, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
919
925
|
var CheckBox = (props) => {
|
|
920
926
|
const {
|
|
921
|
-
color = "xplat-blue-500",
|
|
922
927
|
checked,
|
|
923
928
|
label,
|
|
924
929
|
onChange,
|
|
925
930
|
disabled,
|
|
926
931
|
size = "md",
|
|
932
|
+
type = "brand",
|
|
927
933
|
...rest
|
|
928
934
|
} = props;
|
|
929
935
|
const handleChange = (e) => {
|
|
930
936
|
if (onChange) onChange(e);
|
|
931
937
|
};
|
|
932
|
-
const mainColor = color;
|
|
933
938
|
const uncheckedClasses = `unchecked`;
|
|
934
|
-
const checkedClasses = `checked
|
|
939
|
+
const checkedClasses = `checked`;
|
|
935
940
|
const disabledClasses = "disabled";
|
|
936
941
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
937
|
-
return /* @__PURE__ */ jsxs189("label", { className: clsx_default("lib-xplat-checkbox", size), children: [
|
|
942
|
+
return /* @__PURE__ */ jsxs189("label", { className: clsx_default("lib-xplat-checkbox", size, type), children: [
|
|
938
943
|
/* @__PURE__ */ jsx295(
|
|
939
944
|
"input",
|
|
940
945
|
{
|
|
@@ -45,12 +45,10 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
45
45
|
var Chip = (props) => {
|
|
46
46
|
const {
|
|
47
47
|
children,
|
|
48
|
-
color = "xplat-black",
|
|
49
48
|
type = "primary",
|
|
50
49
|
size = "md"
|
|
51
50
|
} = props;
|
|
52
|
-
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size, colorClass), children });
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
54
52
|
};
|
|
55
53
|
Chip.displayName = "Chip";
|
|
56
54
|
var Chip_default = Chip;
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
/* src/components/Chip/chip.scss */
|
|
2
2
|
.lib-xplat-chip {
|
|
3
|
-
border-radius:
|
|
3
|
+
border-radius: var(--spacing-radius-full);
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
user-select: none;
|
|
8
|
+
transition: background-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
4
9
|
}
|
|
5
10
|
.lib-xplat-chip.sm {
|
|
6
|
-
padding:
|
|
11
|
+
padding: 1px var(--spacing-space-2);
|
|
7
12
|
font-size: 12px;
|
|
8
13
|
}
|
|
9
14
|
.lib-xplat-chip.md {
|
|
10
|
-
padding:
|
|
15
|
+
padding: 2px var(--spacing-space-3);
|
|
11
16
|
font-size: 14px;
|
|
12
17
|
}
|
|
13
18
|
.lib-xplat-chip.lg {
|
|
14
|
-
padding:
|
|
19
|
+
padding: var(--spacing-space-1) var(--spacing-space-4);
|
|
15
20
|
font-size: 16px;
|
|
16
21
|
}
|
|
17
|
-
.lib-xplat-chip {
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
user-select: none;
|
|
22
|
-
transition: background-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
23
|
-
}
|
|
24
22
|
.lib-xplat-chip.primary {
|
|
25
|
-
color: var(--
|
|
26
|
-
background-color: var(--
|
|
27
|
-
}
|
|
28
|
-
.lib-xplat-chip.primary:hover {
|
|
29
|
-
background-color: color-mix(in srgb, var(--ds-color), black 12%);
|
|
23
|
+
color: var(--semantic-text-inverse);
|
|
24
|
+
background-color: var(--semantic-surface-brand-default);
|
|
30
25
|
}
|
|
31
26
|
.lib-xplat-chip.secondary {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
background-color:
|
|
27
|
+
color: var(--semantic-surface-brand-default);
|
|
28
|
+
background-color: var(--semantic-surface-neutral-default);
|
|
29
|
+
border: 1px solid var(--semantic-border-default);
|
|
30
|
+
}
|
|
31
|
+
.lib-xplat-chip.neutral {
|
|
32
|
+
color: var(--semantic-text-subtle);
|
|
33
|
+
background-color: var(--semantic-surface-neutral-subtle);
|
|
34
|
+
border: 1px solid var(--semantic-border-default);
|
|
35
|
+
}
|
|
36
|
+
.lib-xplat-chip.success {
|
|
37
|
+
color: var(--semantic-text-success);
|
|
38
|
+
background-color: var(--semantic-surface-success-subtle);
|
|
39
|
+
}
|
|
40
|
+
.lib-xplat-chip.error {
|
|
41
|
+
color: var(--semantic-text-error);
|
|
42
|
+
background-color: var(--semantic-surface-error-subtle);
|
|
43
|
+
}
|
|
44
|
+
.lib-xplat-chip.warning {
|
|
45
|
+
color: var(--semantic-text-warning);
|
|
46
|
+
background-color: var(--semantic-surface-warning-subtle);
|
|
47
|
+
}
|
|
48
|
+
.lib-xplat-chip.info {
|
|
49
|
+
color: var(--semantic-text-info);
|
|
50
|
+
background-color: var(--semantic-surface-info-subtle);
|
|
39
51
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.cjs';
|
|
4
3
|
|
|
5
|
-
type ChipType = "primary" | "secondary";
|
|
4
|
+
type ChipType = "primary" | "secondary" | "neutral" | "success" | "error" | "warning" | "info";
|
|
6
5
|
type ChipSize = "sm" | "md" | "lg";
|
|
7
|
-
interface ChipProps
|
|
6
|
+
interface ChipProps {
|
|
8
7
|
children: React.ReactNode;
|
|
9
8
|
type?: ChipType;
|
|
10
9
|
size?: ChipSize;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { a as ColorProps } from '../../colors-CY4JXVHj.js';
|
|
4
3
|
|
|
5
|
-
type ChipType = "primary" | "secondary";
|
|
4
|
+
type ChipType = "primary" | "secondary" | "neutral" | "success" | "error" | "warning" | "info";
|
|
6
5
|
type ChipSize = "sm" | "md" | "lg";
|
|
7
|
-
interface ChipProps
|
|
6
|
+
interface ChipProps {
|
|
8
7
|
children: React.ReactNode;
|
|
9
8
|
type?: ChipType;
|
|
10
9
|
size?: ChipSize;
|
|
@@ -19,12 +19,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
19
19
|
var Chip = (props) => {
|
|
20
20
|
const {
|
|
21
21
|
children,
|
|
22
|
-
color = "xplat-black",
|
|
23
22
|
type = "primary",
|
|
24
23
|
size = "md"
|
|
25
24
|
} = props;
|
|
26
|
-
|
|
27
|
-
return /* @__PURE__ */ jsx("div", { className: clsx_default("lib-xplat-chip", type, size, colorClass), children });
|
|
25
|
+
return /* @__PURE__ */ jsx("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
28
26
|
};
|
|
29
27
|
Chip.displayName = "Chip";
|
|
30
28
|
var Chip_default = Chip;
|
|
@@ -408,6 +408,31 @@ var PasswordInput = import_react3.default.forwardRef(
|
|
|
408
408
|
);
|
|
409
409
|
PasswordInput.displayName = "PasswordInput";
|
|
410
410
|
|
|
411
|
+
// src/tokens/hooks/useClickOutside.ts
|
|
412
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
413
|
+
var useClickOutside = (refs, handler, enabled = true) => {
|
|
414
|
+
import_react4.default.useEffect(() => {
|
|
415
|
+
if (!enabled) return;
|
|
416
|
+
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
417
|
+
const listener = (event) => {
|
|
418
|
+
const target = event.target;
|
|
419
|
+
const isInside = refArray.some(
|
|
420
|
+
(ref) => ref.current && ref.current.contains(target)
|
|
421
|
+
);
|
|
422
|
+
if (!isInside) {
|
|
423
|
+
handler();
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
document.addEventListener("mousedown", listener);
|
|
427
|
+
document.addEventListener("touchstart", listener);
|
|
428
|
+
return () => {
|
|
429
|
+
document.removeEventListener("mousedown", listener);
|
|
430
|
+
document.removeEventListener("touchstart", listener);
|
|
431
|
+
};
|
|
432
|
+
}, [refs, handler, enabled]);
|
|
433
|
+
};
|
|
434
|
+
var useClickOutside_default = useClickOutside;
|
|
435
|
+
|
|
411
436
|
// src/tokens/svg/action/CopyIcon.tsx
|
|
412
437
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
413
438
|
|
|
@@ -833,10 +858,10 @@ var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
|
833
858
|
// src/tokens/svg/file/BookIcon.tsx
|
|
834
859
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
835
860
|
|
|
836
|
-
// src/tokens/svg/file/
|
|
861
|
+
// src/tokens/svg/file/BookmarkIcon.tsx
|
|
837
862
|
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
838
863
|
|
|
839
|
-
// src/tokens/svg/file/
|
|
864
|
+
// src/tokens/svg/file/BookOpenIcon.tsx
|
|
840
865
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
841
866
|
|
|
842
867
|
// src/tokens/svg/file/ClipboardIcon.tsx
|
|
@@ -1277,10 +1302,10 @@ var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
|
1277
1302
|
// src/tokens/svg/user/UserPlusIcon.tsx
|
|
1278
1303
|
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
1279
1304
|
|
|
1280
|
-
// src/tokens/svg/user/
|
|
1305
|
+
// src/tokens/svg/user/UsersIcon.tsx
|
|
1281
1306
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
1282
1307
|
|
|
1283
|
-
// src/tokens/svg/user/
|
|
1308
|
+
// src/tokens/svg/user/UserXIcon.tsx
|
|
1284
1309
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
1285
1310
|
|
|
1286
1311
|
// src/tokens/svg/weather/CloudDrizzleIcon.tsx
|
|
@@ -1319,37 +1344,12 @@ var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
|
1319
1344
|
// src/tokens/svg/weather/WindIcon.tsx
|
|
1320
1345
|
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
1321
1346
|
|
|
1322
|
-
// src/tokens/hooks/useClickOutside.ts
|
|
1323
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
1324
|
-
var useClickOutside = (refs, handler, enabled = true) => {
|
|
1325
|
-
import_react4.default.useEffect(() => {
|
|
1326
|
-
if (!enabled) return;
|
|
1327
|
-
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
1328
|
-
const listener = (event) => {
|
|
1329
|
-
const target = event.target;
|
|
1330
|
-
const isInside = refArray.some(
|
|
1331
|
-
(ref) => ref.current && ref.current.contains(target)
|
|
1332
|
-
);
|
|
1333
|
-
if (!isInside) {
|
|
1334
|
-
handler();
|
|
1335
|
-
}
|
|
1336
|
-
};
|
|
1337
|
-
document.addEventListener("mousedown", listener);
|
|
1338
|
-
document.addEventListener("touchstart", listener);
|
|
1339
|
-
return () => {
|
|
1340
|
-
document.removeEventListener("mousedown", listener);
|
|
1341
|
-
document.removeEventListener("touchstart", listener);
|
|
1342
|
-
};
|
|
1343
|
-
}, [refs, handler, enabled]);
|
|
1344
|
-
};
|
|
1345
|
-
var useClickOutside_default = useClickOutside;
|
|
1346
|
-
|
|
1347
1347
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
1348
1348
|
var import_react6 = __toESM(require("react"), 1);
|
|
1349
1349
|
|
|
1350
1350
|
// src/components/Calendar/useCalendar.ts
|
|
1351
1351
|
var import_react5 = __toESM(require("react"), 1);
|
|
1352
|
-
|
|
1352
|
+
var useCalendar = (initialYear, initialMonth) => {
|
|
1353
1353
|
const today = /* @__PURE__ */ new Date();
|
|
1354
1354
|
const [year, setYear] = import_react5.default.useState(initialYear ?? today.getFullYear());
|
|
1355
1355
|
const [month, setMonth] = import_react5.default.useState(initialMonth ?? today.getMonth());
|
|
@@ -1428,16 +1428,16 @@ function useCalendar(initialYear, initialMonth) {
|
|
|
1428
1428
|
setYear,
|
|
1429
1429
|
setMonth
|
|
1430
1430
|
};
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1431
|
+
};
|
|
1432
|
+
var isSameDay = (a, b) => {
|
|
1433
1433
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1434
|
+
};
|
|
1435
|
+
var isInRange = (date, start, end) => {
|
|
1436
1436
|
const d = date.getTime();
|
|
1437
1437
|
const s = new Date(start.getFullYear(), start.getMonth(), start.getDate()).getTime();
|
|
1438
1438
|
const e = new Date(end.getFullYear(), end.getMonth(), end.getDate()).getTime();
|
|
1439
1439
|
return d >= s && d <= e;
|
|
1440
|
-
}
|
|
1440
|
+
};
|
|
1441
1441
|
var WEEKDAY_LABELS = {
|
|
1442
1442
|
ko: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
|
|
1443
1443
|
en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
|
|
@@ -1484,7 +1484,6 @@ var SingleDatePicker = (props) => {
|
|
|
1484
1484
|
const {
|
|
1485
1485
|
value,
|
|
1486
1486
|
onChange,
|
|
1487
|
-
color = "xplat-blue-500",
|
|
1488
1487
|
minDate,
|
|
1489
1488
|
maxDate,
|
|
1490
1489
|
highlightDates = [],
|
|
@@ -1553,7 +1552,6 @@ var SingleDatePicker = (props) => {
|
|
|
1553
1552
|
"div",
|
|
1554
1553
|
{
|
|
1555
1554
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
1556
|
-
style: { "--datepicker-active-color": `var(--${color})` },
|
|
1557
1555
|
children: [
|
|
1558
1556
|
/* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: "datepicker-header", children: [
|
|
1559
1557
|
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(ChevronLeftIcon_default, {}) }),
|
|
@@ -1677,15 +1675,13 @@ var Button = (props) => {
|
|
|
1677
1675
|
children,
|
|
1678
1676
|
type = "primary",
|
|
1679
1677
|
size = "md",
|
|
1680
|
-
color = "xplat-black",
|
|
1681
1678
|
disabled,
|
|
1682
1679
|
...rest
|
|
1683
1680
|
} = props;
|
|
1684
|
-
const colorClass = color;
|
|
1685
1681
|
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
1686
1682
|
"button",
|
|
1687
1683
|
{
|
|
1688
|
-
className: clsx_default("lib-xplat-button", type, size
|
|
1684
|
+
className: clsx_default("lib-xplat-button", type, size),
|
|
1689
1685
|
disabled,
|
|
1690
1686
|
...rest,
|
|
1691
1687
|
children
|
|
@@ -1749,7 +1745,6 @@ var RangePicker = (props) => {
|
|
|
1749
1745
|
startDate,
|
|
1750
1746
|
endDate,
|
|
1751
1747
|
onChange,
|
|
1752
|
-
color = "xplat-blue-500",
|
|
1753
1748
|
minDate,
|
|
1754
1749
|
maxDate,
|
|
1755
1750
|
locale = "ko"
|
|
@@ -1857,9 +1852,6 @@ var RangePicker = (props) => {
|
|
|
1857
1852
|
"div",
|
|
1858
1853
|
{
|
|
1859
1854
|
className: clsx_default("lib-xplat-datepicker", "range"),
|
|
1860
|
-
style: {
|
|
1861
|
-
"--datepicker-active-color": `var(--${color})`
|
|
1862
|
-
},
|
|
1863
1855
|
children: [
|
|
1864
1856
|
/* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "datepicker-range-tabs", children: [
|
|
1865
1857
|
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
@@ -1936,12 +1928,11 @@ var PopupPicker = (props) => {
|
|
|
1936
1928
|
Button_default,
|
|
1937
1929
|
{
|
|
1938
1930
|
type: "secondary",
|
|
1939
|
-
color: "xplat-neutral-400",
|
|
1940
1931
|
onClick: handleClose,
|
|
1941
1932
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
1942
1933
|
}
|
|
1943
1934
|
),
|
|
1944
|
-
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Button_default, { type: "primary",
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
1945
1936
|
] })
|
|
1946
1937
|
] }) })
|
|
1947
1938
|
] });
|