@x-plat/design-system 0.2.3 → 0.3.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/{colors-BNxEsOY3.d.cts → colors-BgzpjYfN.d.cts} +10 -5
- package/dist/{colors-BNxEsOY3.d.ts → colors-BgzpjYfN.d.ts} +10 -5
- package/dist/components/Avatar/index.cjs +2 -13
- package/dist/components/Avatar/index.d.cts +3 -235
- package/dist/components/Avatar/index.d.ts +3 -235
- package/dist/components/Avatar/index.js +2 -13
- package/dist/components/Badge/index.cjs +2 -13
- package/dist/components/Badge/index.d.cts +3 -235
- package/dist/components/Badge/index.d.ts +3 -235
- package/dist/components/Badge/index.js +2 -13
- package/dist/components/Button/index.cjs +2 -13
- package/dist/components/Button/index.d.cts +3 -235
- package/dist/components/Button/index.d.ts +3 -235
- package/dist/components/Button/index.js +2 -13
- package/dist/components/CheckBox/index.cjs +2 -13
- package/dist/components/CheckBox/index.d.cts +3 -235
- package/dist/components/CheckBox/index.d.ts +3 -235
- package/dist/components/CheckBox/index.js +2 -13
- package/dist/components/Chip/index.cjs +2 -13
- package/dist/components/Chip/index.d.cts +3 -235
- package/dist/components/Chip/index.d.ts +3 -235
- package/dist/components/Chip/index.js +2 -13
- package/dist/components/DatePicker/index.cjs +9 -160
- package/dist/components/DatePicker/index.d.cts +5 -469
- package/dist/components/DatePicker/index.d.ts +5 -469
- package/dist/components/DatePicker/index.js +9 -160
- package/dist/components/Pagination/index.cjs +2 -13
- package/dist/components/Pagination/index.d.cts +3 -235
- package/dist/components/Pagination/index.d.ts +3 -235
- package/dist/components/Pagination/index.js +2 -13
- package/dist/components/Progress/index.cjs +2 -13
- package/dist/components/Progress/index.d.cts +3 -235
- package/dist/components/Progress/index.d.ts +3 -235
- package/dist/components/Progress/index.js +2 -13
- package/dist/components/Radio/index.cjs +2 -13
- package/dist/components/Radio/index.d.cts +3 -235
- package/dist/components/Radio/index.d.ts +3 -235
- package/dist/components/Radio/index.js +2 -13
- package/dist/components/Spinner/index.cjs +2 -13
- package/dist/components/Spinner/index.d.cts +3 -235
- package/dist/components/Spinner/index.d.ts +3 -235
- package/dist/components/Spinner/index.js +2 -13
- package/dist/components/Steps/index.cjs +2 -13
- package/dist/components/Steps/index.d.cts +3 -235
- package/dist/components/Steps/index.d.ts +3 -235
- package/dist/components/Steps/index.js +2 -13
- package/dist/components/Switch/index.cjs +2 -13
- package/dist/components/Switch/index.d.cts +3 -235
- package/dist/components/Switch/index.d.ts +3 -235
- package/dist/components/Switch/index.js +2 -13
- package/dist/components/Table/index.cjs +2 -15
- package/dist/components/Table/index.d.cts +3 -235
- package/dist/components/Table/index.d.ts +3 -235
- package/dist/components/Table/index.js +2 -15
- package/dist/components/Tag/index.cjs +2 -13
- package/dist/components/Tag/index.d.cts +3 -235
- package/dist/components/Tag/index.d.ts +3 -235
- package/dist/components/Tag/index.js +2 -13
- package/dist/components/Tooltip/index.cjs +2 -13
- package/dist/components/Tooltip/index.d.cts +3 -238
- package/dist/components/Tooltip/index.d.ts +3 -238
- package/dist/components/Tooltip/index.js +2 -13
- package/dist/components/index.cjs +35 -145
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +35 -145
- package/dist/index.cjs +35 -145
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +35 -145
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,249 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { b as ColorNamespace, d as ColorName, a as CustomNamespaces, C as CustomColors, f as ColorProps, e as ColorDepth } from '../../colors-BNxEsOY3.js';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import { g as ColorProps } from '../../colors-BgzpjYfN.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
interface TooltipProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> extends ColorProps<N, C> {
|
|
5
|
+
interface TooltipProps extends ColorProps {
|
|
7
6
|
type?: "primary" | "secondary";
|
|
8
7
|
description: React.ReactNode;
|
|
9
|
-
color?: TooltipColor;
|
|
10
|
-
colorDepth?: ColorDepth<ColorNamespace, TooltipColor>;
|
|
11
8
|
children?: React.ReactNode;
|
|
12
9
|
}
|
|
13
10
|
declare const Tooltip: {
|
|
14
|
-
|
|
15
|
-
readonly xplat: {
|
|
16
|
-
readonly red: {
|
|
17
|
-
readonly 50: "#FFF0F0";
|
|
18
|
-
readonly 100: "#FFDDDE";
|
|
19
|
-
readonly 200: "#FFC1C2";
|
|
20
|
-
readonly 300: "#FF9698";
|
|
21
|
-
readonly 400: "#FF5A5D";
|
|
22
|
-
readonly 500: "#FF272B";
|
|
23
|
-
readonly 600: "#F80409";
|
|
24
|
-
readonly 700: "#D40105";
|
|
25
|
-
readonly 800: "#AE0609";
|
|
26
|
-
readonly 900: "#900C0F";
|
|
27
|
-
};
|
|
28
|
-
readonly green: {
|
|
29
|
-
readonly 50: "#E5F6EA";
|
|
30
|
-
readonly 100: "#C1E7CC";
|
|
31
|
-
readonly 200: "#98D8AC";
|
|
32
|
-
readonly 300: "#6CCA8B";
|
|
33
|
-
readonly 400: "#47BE72";
|
|
34
|
-
readonly 500: "#10B259";
|
|
35
|
-
readonly 600: "#00A34F";
|
|
36
|
-
readonly 700: "#009143";
|
|
37
|
-
readonly 800: "#007F38";
|
|
38
|
-
readonly 900: "#006024";
|
|
39
|
-
};
|
|
40
|
-
readonly orange: {
|
|
41
|
-
readonly 50: "#FFF8EC";
|
|
42
|
-
readonly 100: "#FFF0D3";
|
|
43
|
-
readonly 200: "#FFDDA5";
|
|
44
|
-
readonly 300: "#FFC46D";
|
|
45
|
-
readonly 400: "#FF9F32";
|
|
46
|
-
readonly 500: "#FF820A";
|
|
47
|
-
readonly 600: "#FF6900";
|
|
48
|
-
readonly 700: "#CC4B02";
|
|
49
|
-
readonly 800: "#A13A0B";
|
|
50
|
-
readonly 900: "#82320C";
|
|
51
|
-
};
|
|
52
|
-
readonly yellow: {
|
|
53
|
-
readonly 50: "#FFFDE7";
|
|
54
|
-
readonly 100: "#FFFAC1";
|
|
55
|
-
readonly 200: "#FFF186";
|
|
56
|
-
readonly 300: "#FFE041";
|
|
57
|
-
readonly 400: "#FFCC0D";
|
|
58
|
-
readonly 500: "#F0B100";
|
|
59
|
-
readonly 600: "#D18800";
|
|
60
|
-
readonly 700: "#A66002";
|
|
61
|
-
readonly 800: "#894B0A";
|
|
62
|
-
readonly 900: "#743D0F";
|
|
63
|
-
};
|
|
64
|
-
readonly blue: {
|
|
65
|
-
readonly 50: "#F1F4FD";
|
|
66
|
-
readonly 100: "#DFE7FA";
|
|
67
|
-
readonly 200: "#C5D4F8";
|
|
68
|
-
readonly 300: "#9EB8F2";
|
|
69
|
-
readonly 400: "#7093EA";
|
|
70
|
-
readonly 500: "#4D6DE3";
|
|
71
|
-
readonly 600: "#3950D7";
|
|
72
|
-
readonly 700: "#303EC5";
|
|
73
|
-
readonly 800: "#2D35A0";
|
|
74
|
-
readonly 900: "#29317F";
|
|
75
|
-
};
|
|
76
|
-
readonly lightblue: {
|
|
77
|
-
readonly 50: "#EEFAFF";
|
|
78
|
-
readonly 100: "#D9F4FF";
|
|
79
|
-
readonly 200: "#BBEDFF";
|
|
80
|
-
readonly 300: "#8DE3FF";
|
|
81
|
-
readonly 400: "#57D0FF";
|
|
82
|
-
readonly 500: "#30B6FF";
|
|
83
|
-
readonly 600: "#1999F7";
|
|
84
|
-
readonly 700: "#1280E3";
|
|
85
|
-
readonly 800: "#1566B8";
|
|
86
|
-
readonly 900: "#175791";
|
|
87
|
-
};
|
|
88
|
-
readonly purple: {
|
|
89
|
-
readonly 50: "#FBF6FE";
|
|
90
|
-
readonly 100: "#F5EAFD";
|
|
91
|
-
readonly 200: "#EDD8FC";
|
|
92
|
-
readonly 300: "#E0BAF8";
|
|
93
|
-
readonly 400: "#CD8DF3";
|
|
94
|
-
readonly 500: "#B961EB";
|
|
95
|
-
readonly 600: "#A541DC";
|
|
96
|
-
readonly 700: "#9230C5";
|
|
97
|
-
readonly 800: "#782B9E";
|
|
98
|
-
readonly 900: "#62247F";
|
|
99
|
-
};
|
|
100
|
-
readonly pink: {
|
|
101
|
-
readonly 50: "#FFF4FE";
|
|
102
|
-
readonly 100: "#FFE7FD";
|
|
103
|
-
readonly 200: "#FFCFFA";
|
|
104
|
-
readonly 300: "#FEA9F1";
|
|
105
|
-
readonly 400: "#FD75E7";
|
|
106
|
-
readonly 500: "#F553DA";
|
|
107
|
-
readonly 600: "#D821B6";
|
|
108
|
-
readonly 700: "#B31892";
|
|
109
|
-
readonly 800: "#921676";
|
|
110
|
-
readonly 900: "#781761";
|
|
111
|
-
};
|
|
112
|
-
readonly neutral: {
|
|
113
|
-
readonly 50: "#FAFAFA";
|
|
114
|
-
readonly 100: "#F5F5F5";
|
|
115
|
-
readonly 200: "#E5E5E5";
|
|
116
|
-
readonly 300: "#D4D4D4";
|
|
117
|
-
readonly 400: "#A1A1A1";
|
|
118
|
-
readonly 500: "#737373";
|
|
119
|
-
readonly 600: "#525252";
|
|
120
|
-
readonly 700: "#404040";
|
|
121
|
-
readonly 800: "#262626";
|
|
122
|
-
readonly 900: "#171717";
|
|
123
|
-
};
|
|
124
|
-
readonly black: "#000000";
|
|
125
|
-
readonly white: "#FFFFFF";
|
|
126
|
-
};
|
|
127
|
-
readonly test: {
|
|
128
|
-
readonly default: "#ffffff";
|
|
129
|
-
};
|
|
130
|
-
}[N] & CustomNamespaces[N] & (N extends "xplat" ? CustomColors : {}) : {
|
|
131
|
-
readonly xplat: {
|
|
132
|
-
readonly red: {
|
|
133
|
-
readonly 50: "#FFF0F0";
|
|
134
|
-
readonly 100: "#FFDDDE";
|
|
135
|
-
readonly 200: "#FFC1C2";
|
|
136
|
-
readonly 300: "#FF9698";
|
|
137
|
-
readonly 400: "#FF5A5D";
|
|
138
|
-
readonly 500: "#FF272B";
|
|
139
|
-
readonly 600: "#F80409";
|
|
140
|
-
readonly 700: "#D40105";
|
|
141
|
-
readonly 800: "#AE0609";
|
|
142
|
-
readonly 900: "#900C0F";
|
|
143
|
-
};
|
|
144
|
-
readonly green: {
|
|
145
|
-
readonly 50: "#E5F6EA";
|
|
146
|
-
readonly 100: "#C1E7CC";
|
|
147
|
-
readonly 200: "#98D8AC";
|
|
148
|
-
readonly 300: "#6CCA8B";
|
|
149
|
-
readonly 400: "#47BE72";
|
|
150
|
-
readonly 500: "#10B259";
|
|
151
|
-
readonly 600: "#00A34F";
|
|
152
|
-
readonly 700: "#009143";
|
|
153
|
-
readonly 800: "#007F38";
|
|
154
|
-
readonly 900: "#006024";
|
|
155
|
-
};
|
|
156
|
-
readonly orange: {
|
|
157
|
-
readonly 50: "#FFF8EC";
|
|
158
|
-
readonly 100: "#FFF0D3";
|
|
159
|
-
readonly 200: "#FFDDA5";
|
|
160
|
-
readonly 300: "#FFC46D";
|
|
161
|
-
readonly 400: "#FF9F32";
|
|
162
|
-
readonly 500: "#FF820A";
|
|
163
|
-
readonly 600: "#FF6900";
|
|
164
|
-
readonly 700: "#CC4B02";
|
|
165
|
-
readonly 800: "#A13A0B";
|
|
166
|
-
readonly 900: "#82320C";
|
|
167
|
-
};
|
|
168
|
-
readonly yellow: {
|
|
169
|
-
readonly 50: "#FFFDE7";
|
|
170
|
-
readonly 100: "#FFFAC1";
|
|
171
|
-
readonly 200: "#FFF186";
|
|
172
|
-
readonly 300: "#FFE041";
|
|
173
|
-
readonly 400: "#FFCC0D";
|
|
174
|
-
readonly 500: "#F0B100";
|
|
175
|
-
readonly 600: "#D18800";
|
|
176
|
-
readonly 700: "#A66002";
|
|
177
|
-
readonly 800: "#894B0A";
|
|
178
|
-
readonly 900: "#743D0F";
|
|
179
|
-
};
|
|
180
|
-
readonly blue: {
|
|
181
|
-
readonly 50: "#F1F4FD";
|
|
182
|
-
readonly 100: "#DFE7FA";
|
|
183
|
-
readonly 200: "#C5D4F8";
|
|
184
|
-
readonly 300: "#9EB8F2";
|
|
185
|
-
readonly 400: "#7093EA";
|
|
186
|
-
readonly 500: "#4D6DE3";
|
|
187
|
-
readonly 600: "#3950D7";
|
|
188
|
-
readonly 700: "#303EC5";
|
|
189
|
-
readonly 800: "#2D35A0";
|
|
190
|
-
readonly 900: "#29317F";
|
|
191
|
-
};
|
|
192
|
-
readonly lightblue: {
|
|
193
|
-
readonly 50: "#EEFAFF";
|
|
194
|
-
readonly 100: "#D9F4FF";
|
|
195
|
-
readonly 200: "#BBEDFF";
|
|
196
|
-
readonly 300: "#8DE3FF";
|
|
197
|
-
readonly 400: "#57D0FF";
|
|
198
|
-
readonly 500: "#30B6FF";
|
|
199
|
-
readonly 600: "#1999F7";
|
|
200
|
-
readonly 700: "#1280E3";
|
|
201
|
-
readonly 800: "#1566B8";
|
|
202
|
-
readonly 900: "#175791";
|
|
203
|
-
};
|
|
204
|
-
readonly purple: {
|
|
205
|
-
readonly 50: "#FBF6FE";
|
|
206
|
-
readonly 100: "#F5EAFD";
|
|
207
|
-
readonly 200: "#EDD8FC";
|
|
208
|
-
readonly 300: "#E0BAF8";
|
|
209
|
-
readonly 400: "#CD8DF3";
|
|
210
|
-
readonly 500: "#B961EB";
|
|
211
|
-
readonly 600: "#A541DC";
|
|
212
|
-
readonly 700: "#9230C5";
|
|
213
|
-
readonly 800: "#782B9E";
|
|
214
|
-
readonly 900: "#62247F";
|
|
215
|
-
};
|
|
216
|
-
readonly pink: {
|
|
217
|
-
readonly 50: "#FFF4FE";
|
|
218
|
-
readonly 100: "#FFE7FD";
|
|
219
|
-
readonly 200: "#FFCFFA";
|
|
220
|
-
readonly 300: "#FEA9F1";
|
|
221
|
-
readonly 400: "#FD75E7";
|
|
222
|
-
readonly 500: "#F553DA";
|
|
223
|
-
readonly 600: "#D821B6";
|
|
224
|
-
readonly 700: "#B31892";
|
|
225
|
-
readonly 800: "#921676";
|
|
226
|
-
readonly 900: "#781761";
|
|
227
|
-
};
|
|
228
|
-
readonly neutral: {
|
|
229
|
-
readonly 50: "#FAFAFA";
|
|
230
|
-
readonly 100: "#F5F5F5";
|
|
231
|
-
readonly 200: "#E5E5E5";
|
|
232
|
-
readonly 300: "#D4D4D4";
|
|
233
|
-
readonly 400: "#A1A1A1";
|
|
234
|
-
readonly 500: "#737373";
|
|
235
|
-
readonly 600: "#525252";
|
|
236
|
-
readonly 700: "#404040";
|
|
237
|
-
readonly 800: "#262626";
|
|
238
|
-
readonly 900: "#171717";
|
|
239
|
-
};
|
|
240
|
-
readonly black: "#000000";
|
|
241
|
-
readonly white: "#FFFFFF";
|
|
242
|
-
};
|
|
243
|
-
readonly test: {
|
|
244
|
-
readonly default: "#ffffff";
|
|
245
|
-
};
|
|
246
|
-
}[N] & (N extends "xplat" ? CustomColors : {}) : N extends never ? CustomNamespaces[N] : {})>(props: TooltipProps<N, C>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
247
12
|
displayName: string;
|
|
248
13
|
};
|
|
249
14
|
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// src/components/Tooltip/Tooltip.tsx
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
|
-
// src/util/getColor.ts
|
|
5
|
-
var getColorClass = (namespace, palette, shade) => {
|
|
6
|
-
return `${String(namespace)}-${String(palette)}${shade !== void 0 ? `-${String(shade)}` : ""}`;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
4
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
10
5
|
function r(e) {
|
|
11
6
|
var t, f, n = "";
|
|
@@ -27,18 +22,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
27
22
|
var Tooltip = (props) => {
|
|
28
23
|
const {
|
|
29
24
|
type = "primary",
|
|
30
|
-
|
|
31
|
-
color = "blue",
|
|
32
|
-
colorDepth,
|
|
25
|
+
color = "xplat-neutral-900",
|
|
33
26
|
description,
|
|
34
27
|
children
|
|
35
28
|
} = props;
|
|
36
29
|
const iconRef = React.useRef(null);
|
|
37
|
-
const colorClass =
|
|
38
|
-
colorNamespace,
|
|
39
|
-
color,
|
|
40
|
-
colorDepth ?? 500
|
|
41
|
-
);
|
|
30
|
+
const colorClass = color;
|
|
42
31
|
return /* @__PURE__ */ jsxs("div", { className: "lib-xplat-tooltip", children: [
|
|
43
32
|
/* @__PURE__ */ jsx("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
44
33
|
/* @__PURE__ */ jsx("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
|
|
@@ -1453,11 +1453,6 @@ var Alert = (props) => {
|
|
|
1453
1453
|
Alert.displayName = "Alert";
|
|
1454
1454
|
var Alert_default = Alert;
|
|
1455
1455
|
|
|
1456
|
-
// src/util/getColor.ts
|
|
1457
|
-
var getColorClass = (namespace, palette, shade) => {
|
|
1458
|
-
return `${String(namespace)}-${String(palette)}${shade !== void 0 ? `-${String(shade)}` : ""}`;
|
|
1459
|
-
};
|
|
1460
|
-
|
|
1461
1456
|
// src/components/Avatar/Avatar.tsx
|
|
1462
1457
|
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
1463
1458
|
var Avatar = (props) => {
|
|
@@ -1466,16 +1461,10 @@ var Avatar = (props) => {
|
|
|
1466
1461
|
alt,
|
|
1467
1462
|
name,
|
|
1468
1463
|
size: size4 = "md",
|
|
1469
|
-
|
|
1470
|
-
color: color2 = "blue",
|
|
1471
|
-
colorDepth,
|
|
1464
|
+
color: color2 = "xplat-blue-500",
|
|
1472
1465
|
className
|
|
1473
1466
|
} = props;
|
|
1474
|
-
const colorClass =
|
|
1475
|
-
colorNamespace,
|
|
1476
|
-
color2,
|
|
1477
|
-
colorDepth ?? 500
|
|
1478
|
-
);
|
|
1467
|
+
const colorClass = color2;
|
|
1479
1468
|
const initials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
|
|
1480
1469
|
return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("lib-xplat-avatar", size4, className), children: src ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("fallback", colorClass), children: initials || /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) }) });
|
|
1481
1470
|
};
|
|
@@ -1491,16 +1480,10 @@ var Badge = (props) => {
|
|
|
1491
1480
|
maxCount = 99,
|
|
1492
1481
|
dot = false,
|
|
1493
1482
|
size: size4 = "md",
|
|
1494
|
-
|
|
1495
|
-
color: color2 = "red",
|
|
1496
|
-
colorDepth,
|
|
1483
|
+
color: color2 = "xplat-red-500",
|
|
1497
1484
|
className
|
|
1498
1485
|
} = props;
|
|
1499
|
-
const colorClass =
|
|
1500
|
-
colorNamespace,
|
|
1501
|
-
color2,
|
|
1502
|
-
colorDepth ?? 500
|
|
1503
|
-
);
|
|
1486
|
+
const colorClass = color2;
|
|
1504
1487
|
const showBadge = dot || count2 !== void 0 && count2 > 0;
|
|
1505
1488
|
const displayCount = count2 !== void 0 && count2 > maxCount ? `${maxCount}+` : count2;
|
|
1506
1489
|
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: clsx_default("lib-xplat-badge", size4, className), children: [
|
|
@@ -1533,18 +1516,12 @@ var Button = (props) => {
|
|
|
1533
1516
|
children,
|
|
1534
1517
|
type = "primary",
|
|
1535
1518
|
size: size4 = "md",
|
|
1536
|
-
|
|
1537
|
-
color: color2 = "black",
|
|
1538
|
-
colorDepth,
|
|
1519
|
+
color: color2 = "xplat-black",
|
|
1539
1520
|
disabled,
|
|
1540
1521
|
className,
|
|
1541
1522
|
...rest
|
|
1542
1523
|
} = props;
|
|
1543
|
-
const colorClass =
|
|
1544
|
-
colorNamespace,
|
|
1545
|
-
color2,
|
|
1546
|
-
colorDepth ?? 500
|
|
1547
|
-
);
|
|
1524
|
+
const colorClass = color2;
|
|
1548
1525
|
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
1549
1526
|
"button",
|
|
1550
1527
|
{
|
|
@@ -16162,9 +16139,7 @@ var Chart_default = Chart3;
|
|
|
16162
16139
|
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
16163
16140
|
var CheckBox = (props) => {
|
|
16164
16141
|
const {
|
|
16165
|
-
|
|
16166
|
-
color: color2 = "blue",
|
|
16167
|
-
colorDepth,
|
|
16142
|
+
color: color2 = "xplat-blue-500",
|
|
16168
16143
|
checked,
|
|
16169
16144
|
label,
|
|
16170
16145
|
onChange,
|
|
@@ -16176,11 +16151,7 @@ var CheckBox = (props) => {
|
|
|
16176
16151
|
const handleChange = (e) => {
|
|
16177
16152
|
if (onChange) onChange(e);
|
|
16178
16153
|
};
|
|
16179
|
-
const mainColor =
|
|
16180
|
-
colorNamespace,
|
|
16181
|
-
color2,
|
|
16182
|
-
colorDepth ?? 500
|
|
16183
|
-
);
|
|
16154
|
+
const mainColor = color2;
|
|
16184
16155
|
const uncheckedClasses = `unchecked`;
|
|
16185
16156
|
const checkedClasses = `checked ${mainColor}`;
|
|
16186
16157
|
const disabledClasses = "disabled";
|
|
@@ -16208,18 +16179,12 @@ var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
|
16208
16179
|
var Chip = (props) => {
|
|
16209
16180
|
const {
|
|
16210
16181
|
children,
|
|
16211
|
-
|
|
16212
|
-
color: color2 = "black",
|
|
16213
|
-
colorDepth,
|
|
16182
|
+
color: color2 = "xplat-black",
|
|
16214
16183
|
type = "primary",
|
|
16215
16184
|
size: size4 = "md",
|
|
16216
16185
|
className
|
|
16217
16186
|
} = props;
|
|
16218
|
-
const colorClass =
|
|
16219
|
-
colorNamespace,
|
|
16220
|
-
color2,
|
|
16221
|
-
colorDepth ?? 500
|
|
16222
|
-
);
|
|
16187
|
+
const colorClass = color2;
|
|
16223
16188
|
return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size4, colorClass, className), children });
|
|
16224
16189
|
};
|
|
16225
16190
|
Chip.displayName = "Chip";
|
|
@@ -27213,19 +27178,11 @@ var Modal_default = Modal;
|
|
|
27213
27178
|
|
|
27214
27179
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
27215
27180
|
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
27216
|
-
function getColorValue(ns, color2, depth) {
|
|
27217
|
-
const nsColors = colors[ns];
|
|
27218
|
-
const colorEntry = nsColors[color2];
|
|
27219
|
-
if (typeof colorEntry === "string") return colorEntry;
|
|
27220
|
-
return colorEntry[String(depth)] ?? "";
|
|
27221
|
-
}
|
|
27222
27181
|
var SingleDatePicker = (props) => {
|
|
27223
27182
|
const {
|
|
27224
27183
|
value,
|
|
27225
27184
|
onChange,
|
|
27226
|
-
|
|
27227
|
-
color: color2 = "blue",
|
|
27228
|
-
colorDepth,
|
|
27185
|
+
color: color2 = "xplat-blue-500",
|
|
27229
27186
|
highlightDates,
|
|
27230
27187
|
...rest
|
|
27231
27188
|
} = props;
|
|
@@ -27233,16 +27190,11 @@ var SingleDatePicker = (props) => {
|
|
|
27233
27190
|
if (Array.isArray(date)) return;
|
|
27234
27191
|
onChange?.(date);
|
|
27235
27192
|
};
|
|
27236
|
-
const activeColor = getColorValue(
|
|
27237
|
-
colorNamespace,
|
|
27238
|
-
color2,
|
|
27239
|
-
colorDepth ?? 500
|
|
27240
|
-
);
|
|
27241
27193
|
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
27242
27194
|
"div",
|
|
27243
27195
|
{
|
|
27244
27196
|
className: "lib-xplat-datepicker",
|
|
27245
|
-
style: { "--datepicker-active-color":
|
|
27197
|
+
style: { "--datepicker-active-color": `var(--${color2})` },
|
|
27246
27198
|
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
27247
27199
|
DatePicker,
|
|
27248
27200
|
{
|
|
@@ -27300,13 +27252,12 @@ var PopupPicker = (props) => {
|
|
|
27300
27252
|
Button_default,
|
|
27301
27253
|
{
|
|
27302
27254
|
type: "secondary",
|
|
27303
|
-
color: "neutral",
|
|
27304
|
-
colorDepth: 400,
|
|
27255
|
+
color: "xplat-neutral-400",
|
|
27305
27256
|
onClick: handleClose,
|
|
27306
27257
|
children: "\uCDE8\uC18C"
|
|
27307
27258
|
}
|
|
27308
27259
|
),
|
|
27309
|
-
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
27260
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", color: "xplat-blue-500", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
27310
27261
|
] })
|
|
27311
27262
|
] }) })
|
|
27312
27263
|
] });
|
|
@@ -27336,19 +27287,12 @@ var RangePicker = (props) => {
|
|
|
27336
27287
|
onChange,
|
|
27337
27288
|
minDate,
|
|
27338
27289
|
maxDate,
|
|
27339
|
-
|
|
27340
|
-
color: color2,
|
|
27341
|
-
colorDepth
|
|
27290
|
+
color: color2
|
|
27342
27291
|
} = props;
|
|
27343
27292
|
const rangeDates = import_react15.default.useMemo(
|
|
27344
27293
|
() => getDatesBetween(startDate, endDate),
|
|
27345
27294
|
[startDate, endDate]
|
|
27346
27295
|
);
|
|
27347
|
-
const colorProps = {
|
|
27348
|
-
...colorNamespace !== void 0 && { colorNamespace },
|
|
27349
|
-
...color2 !== void 0 && { color: color2 },
|
|
27350
|
-
...colorDepth !== void 0 && { colorDepth }
|
|
27351
|
-
};
|
|
27352
27296
|
return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-range-datepicker", children: [
|
|
27353
27297
|
/* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-range-datepicker-from", children: [
|
|
27354
27298
|
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
|
|
@@ -27360,7 +27304,7 @@ var RangePicker = (props) => {
|
|
|
27360
27304
|
minDate,
|
|
27361
27305
|
maxDate: endDate,
|
|
27362
27306
|
highlightDates: rangeDates,
|
|
27363
|
-
|
|
27307
|
+
color: color2
|
|
27364
27308
|
}
|
|
27365
27309
|
)
|
|
27366
27310
|
] }),
|
|
@@ -27374,7 +27318,7 @@ var RangePicker = (props) => {
|
|
|
27374
27318
|
minDate: startDate,
|
|
27375
27319
|
maxDate,
|
|
27376
27320
|
highlightDates: rangeDates,
|
|
27377
|
-
|
|
27321
|
+
color: color2
|
|
27378
27322
|
}
|
|
27379
27323
|
)
|
|
27380
27324
|
] })
|
|
@@ -28086,16 +28030,10 @@ var Pagination = (props) => {
|
|
|
28086
28030
|
siblingCount = 1,
|
|
28087
28031
|
onChange,
|
|
28088
28032
|
size: size4 = "md",
|
|
28089
|
-
|
|
28090
|
-
color: color2 = "blue",
|
|
28091
|
-
colorDepth,
|
|
28033
|
+
color: color2 = "xplat-blue-500",
|
|
28092
28034
|
className
|
|
28093
28035
|
} = props;
|
|
28094
|
-
const colorClass =
|
|
28095
|
-
colorNamespace,
|
|
28096
|
-
color2,
|
|
28097
|
-
colorDepth ?? 500
|
|
28098
|
-
);
|
|
28036
|
+
const colorClass = color2;
|
|
28099
28037
|
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
28100
28038
|
const pages = getPageRange(current, totalPages, siblingCount);
|
|
28101
28039
|
const handleClick = (page) => {
|
|
@@ -28205,16 +28143,10 @@ var Progress = (props) => {
|
|
|
28205
28143
|
max: max3 = 100,
|
|
28206
28144
|
size: size4 = "md",
|
|
28207
28145
|
showLabel = false,
|
|
28208
|
-
|
|
28209
|
-
color: color2 = "blue",
|
|
28210
|
-
colorDepth,
|
|
28146
|
+
color: color2 = "xplat-blue-500",
|
|
28211
28147
|
className
|
|
28212
28148
|
} = props;
|
|
28213
|
-
const colorClass =
|
|
28214
|
-
colorNamespace,
|
|
28215
|
-
color2,
|
|
28216
|
-
colorDepth ?? 500
|
|
28217
|
-
);
|
|
28149
|
+
const colorClass = color2;
|
|
28218
28150
|
const percentage = Math.min(100, Math.max(0, value / max3 * 100));
|
|
28219
28151
|
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: clsx_default("lib-xplat-progress", size4, className), children: [
|
|
28220
28152
|
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
@@ -28260,9 +28192,7 @@ var Radio = (props) => {
|
|
|
28260
28192
|
label,
|
|
28261
28193
|
value,
|
|
28262
28194
|
className,
|
|
28263
|
-
|
|
28264
|
-
color: color2 = "blue",
|
|
28265
|
-
colorDepth,
|
|
28195
|
+
color: color2 = "xplat-blue-500",
|
|
28266
28196
|
size: sizeProp,
|
|
28267
28197
|
...rest
|
|
28268
28198
|
} = props;
|
|
@@ -28275,11 +28205,7 @@ var Radio = (props) => {
|
|
|
28275
28205
|
value,
|
|
28276
28206
|
onChange: rest.onChange
|
|
28277
28207
|
};
|
|
28278
|
-
const colorClass =
|
|
28279
|
-
colorNamespace,
|
|
28280
|
-
color2,
|
|
28281
|
-
colorDepth ?? 500
|
|
28282
|
-
);
|
|
28208
|
+
const colorClass = color2;
|
|
28283
28209
|
return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
|
|
28284
28210
|
"label",
|
|
28285
28211
|
{
|
|
@@ -28344,16 +28270,10 @@ var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
|
28344
28270
|
var Spinner = (props) => {
|
|
28345
28271
|
const {
|
|
28346
28272
|
size: size4 = "md",
|
|
28347
|
-
|
|
28348
|
-
color: color2 = "blue",
|
|
28349
|
-
colorDepth,
|
|
28273
|
+
color: color2 = "xplat-blue-500",
|
|
28350
28274
|
className
|
|
28351
28275
|
} = props;
|
|
28352
|
-
const colorClass =
|
|
28353
|
-
colorNamespace,
|
|
28354
|
-
color2,
|
|
28355
|
-
colorDepth ?? 500
|
|
28356
|
-
);
|
|
28276
|
+
const colorClass = color2;
|
|
28357
28277
|
return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
28358
28278
|
"div",
|
|
28359
28279
|
{
|
|
@@ -28395,16 +28315,10 @@ var Steps = (props) => {
|
|
|
28395
28315
|
const {
|
|
28396
28316
|
items,
|
|
28397
28317
|
current,
|
|
28398
|
-
|
|
28399
|
-
color: color2 = "blue",
|
|
28400
|
-
colorDepth,
|
|
28318
|
+
color: color2 = "xplat-blue-500",
|
|
28401
28319
|
className
|
|
28402
28320
|
} = props;
|
|
28403
|
-
const colorClass =
|
|
28404
|
-
colorNamespace,
|
|
28405
|
-
color2,
|
|
28406
|
-
colorDepth ?? 500
|
|
28407
|
-
);
|
|
28321
|
+
const colorClass = color2;
|
|
28408
28322
|
return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index3) => {
|
|
28409
28323
|
const status = index3 < current ? "completed" : index3 === current ? "active" : "pending";
|
|
28410
28324
|
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
@@ -28432,9 +28346,7 @@ var Switch = (props) => {
|
|
|
28432
28346
|
size: size4 = "md",
|
|
28433
28347
|
disabled,
|
|
28434
28348
|
onChange,
|
|
28435
|
-
|
|
28436
|
-
color: color2 = "blue",
|
|
28437
|
-
colorDepth,
|
|
28349
|
+
color: color2 = "xplat-blue-500",
|
|
28438
28350
|
className
|
|
28439
28351
|
} = props;
|
|
28440
28352
|
const [isAnimating, setIsAnimating] = import_react29.default.useState(false);
|
|
@@ -28454,11 +28366,7 @@ var Switch = (props) => {
|
|
|
28454
28366
|
timeoutRef.current = null;
|
|
28455
28367
|
}, KNOB_TRANSITION_MS);
|
|
28456
28368
|
};
|
|
28457
|
-
const colorClass =
|
|
28458
|
-
colorNamespace,
|
|
28459
|
-
color2,
|
|
28460
|
-
colorDepth ?? 500
|
|
28461
|
-
);
|
|
28369
|
+
const colorClass = color2;
|
|
28462
28370
|
return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28463
28371
|
"div",
|
|
28464
28372
|
{
|
|
@@ -28700,9 +28608,7 @@ var TableRow = (props) => {
|
|
|
28700
28608
|
const {
|
|
28701
28609
|
children,
|
|
28702
28610
|
className,
|
|
28703
|
-
|
|
28704
|
-
color: color2 = "black",
|
|
28705
|
-
colorDepth,
|
|
28611
|
+
color: color2 = "xplat-blue-500",
|
|
28706
28612
|
type = "secondary",
|
|
28707
28613
|
isHover,
|
|
28708
28614
|
onClick
|
|
@@ -28715,11 +28621,7 @@ var TableRow = (props) => {
|
|
|
28715
28621
|
return [...prev, ref];
|
|
28716
28622
|
});
|
|
28717
28623
|
};
|
|
28718
|
-
const colorClass =
|
|
28719
|
-
colorNamespace,
|
|
28720
|
-
color2,
|
|
28721
|
-
colorDepth ?? 500
|
|
28722
|
-
);
|
|
28624
|
+
const colorClass = color2;
|
|
28723
28625
|
return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
28724
28626
|
"tr",
|
|
28725
28627
|
{
|
|
@@ -28746,16 +28648,10 @@ var Tag = (props) => {
|
|
|
28746
28648
|
children,
|
|
28747
28649
|
onClose,
|
|
28748
28650
|
size: size4 = "md",
|
|
28749
|
-
|
|
28750
|
-
color: color2 = "neutral",
|
|
28751
|
-
colorDepth,
|
|
28651
|
+
color: color2 = "xplat-neutral-500",
|
|
28752
28652
|
className
|
|
28753
28653
|
} = props;
|
|
28754
|
-
const colorClass =
|
|
28755
|
-
colorNamespace,
|
|
28756
|
-
color2,
|
|
28757
|
-
colorDepth ?? 500
|
|
28758
|
-
);
|
|
28654
|
+
const colorClass = color2;
|
|
28759
28655
|
return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
|
|
28760
28656
|
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)("span", { className: "tag-label", children }),
|
|
28761
28657
|
onClose && /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(XIcon_default, {}) })
|
|
@@ -28918,18 +28814,12 @@ var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
|
28918
28814
|
var Tooltip2 = (props) => {
|
|
28919
28815
|
const {
|
|
28920
28816
|
type = "primary",
|
|
28921
|
-
|
|
28922
|
-
color: color2 = "blue",
|
|
28923
|
-
colorDepth,
|
|
28817
|
+
color: color2 = "xplat-neutral-900",
|
|
28924
28818
|
description,
|
|
28925
28819
|
children
|
|
28926
28820
|
} = props;
|
|
28927
28821
|
const iconRef = import_react39.default.useRef(null);
|
|
28928
|
-
const colorClass =
|
|
28929
|
-
colorNamespace,
|
|
28930
|
-
color2,
|
|
28931
|
-
colorDepth ?? 500
|
|
28932
|
-
);
|
|
28822
|
+
const colorClass = color2;
|
|
28933
28823
|
return /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: "lib-xplat-tooltip", children: [
|
|
28934
28824
|
/* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
28935
28825
|
/* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
|
|
@@ -37,5 +37,5 @@ export { Tooltip } from './Tooltip/index.cjs';
|
|
|
37
37
|
export { Video, VideoProps } from './Video/index.cjs';
|
|
38
38
|
import 'react';
|
|
39
39
|
import 'react/jsx-runtime';
|
|
40
|
-
import '../colors-
|
|
40
|
+
import '../colors-BgzpjYfN.cjs';
|
|
41
41
|
import '../attributes-DJIWir_0.cjs';
|