@x-plat/design-system 0.1.5 → 0.2.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-BG91q_uV.d.cts → colors-DmMsWD7G.d.cts} +20 -4
- package/dist/{colors-BG91q_uV.d.ts → colors-DmMsWD7G.d.ts} +20 -4
- package/dist/components/Accordion/index.cjs +25 -14
- package/dist/components/Accordion/index.css +6 -6
- package/dist/components/Accordion/index.d.cts +16 -3
- package/dist/components/Accordion/index.d.ts +16 -3
- package/dist/components/Accordion/index.js +25 -14
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.css +16 -16
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.css +3 -279
- package/dist/components/Avatar/index.d.cts +2 -118
- package/dist/components/Avatar/index.d.ts +2 -118
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/index.cjs +3 -2
- package/dist/components/Badge/index.css +23 -279
- package/dist/components/Badge/index.d.cts +4 -118
- package/dist/components/Badge/index.d.ts +4 -118
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Breadcrumb/index.cjs +1 -1
- package/dist/components/Breadcrumb/index.css +4 -4
- package/dist/components/Breadcrumb/index.js +1 -1
- package/dist/components/Button/index.cjs +3 -2
- package/dist/components/Button/index.css +26 -1214
- package/dist/components/Button/index.d.cts +4 -118
- package/dist/components/Button/index.d.ts +4 -118
- package/dist/components/Button/index.js +3 -2
- package/dist/components/Card/index.cjs +1 -1
- package/dist/components/Card/index.css +3 -3
- package/dist/components/Card/index.js +1 -1
- package/dist/components/CardTab/index.cjs +124 -0
- package/dist/components/CardTab/index.css +78 -0
- package/dist/components/CardTab/index.d.cts +44 -0
- package/dist/components/CardTab/index.d.ts +44 -0
- package/dist/components/CardTab/index.js +87 -0
- package/dist/components/CheckBox/index.cjs +3 -2
- package/dist/components/CheckBox/index.css +27 -563
- package/dist/components/CheckBox/index.d.cts +5 -119
- package/dist/components/CheckBox/index.d.ts +5 -119
- package/dist/components/CheckBox/index.js +3 -2
- package/dist/components/Chip/index.cjs +3 -2
- package/dist/components/Chip/index.css +21 -1209
- package/dist/components/Chip/index.d.cts +4 -118
- package/dist/components/Chip/index.d.ts +4 -118
- package/dist/components/Chip/index.js +3 -2
- package/dist/components/DatePicker/index.cjs +5 -3
- package/dist/components/DatePicker/index.css +62 -1239
- package/dist/components/DatePicker/index.d.cts +3 -235
- package/dist/components/DatePicker/index.d.ts +3 -235
- package/dist/components/DatePicker/index.js +5 -3
- package/dist/components/Divider/index.cjs +1 -1
- package/dist/components/Divider/index.css +2 -2
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.css +5 -5
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Dropdown/index.cjs +1 -1
- package/dist/components/Dropdown/index.css +7 -7
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.css +3 -3
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/FileUpload/index.cjs +1 -1
- package/dist/components/FileUpload/index.css +8 -8
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/HtmlTypeWriter/index.css +1 -1
- package/dist/components/ImageSelector/index.css +9 -9
- package/dist/components/Input/index.cjs +3 -2
- package/dist/components/Input/index.css +21 -10
- package/dist/components/Input/index.d.cts +6 -2
- package/dist/components/Input/index.d.ts +6 -2
- package/dist/components/Input/index.js +3 -2
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Pagination/index.cjs +3 -2
- package/dist/components/Pagination/index.css +33 -283
- package/dist/components/Pagination/index.d.cts +4 -118
- package/dist/components/Pagination/index.d.ts +4 -118
- package/dist/components/Pagination/index.js +3 -2
- package/dist/components/PopOver/index.cjs +1 -1
- package/dist/components/PopOver/index.js +1 -1
- package/dist/components/Progress/index.cjs +1 -1
- package/dist/components/Progress/index.css +3 -281
- package/dist/components/Progress/index.d.cts +2 -118
- package/dist/components/Progress/index.d.ts +2 -118
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/Radio/index.cjs +4 -1
- package/dist/components/Radio/index.css +36 -747
- package/dist/components/Radio/index.d.cts +6 -119
- package/dist/components/Radio/index.d.ts +6 -119
- package/dist/components/Radio/index.js +4 -1
- package/dist/components/Select/index.cjs +4 -2
- package/dist/components/Select/index.css +38 -18
- package/dist/components/Select/index.d.cts +3 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.js +4 -2
- package/dist/components/Skeleton/index.cjs +1 -1
- package/dist/components/Skeleton/index.css +1 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/Spinner/index.css +2 -280
- package/dist/components/Spinner/index.d.cts +2 -118
- package/dist/components/Spinner/index.d.ts +2 -118
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/Steps/index.cjs +1 -1
- package/dist/components/Steps/index.css +14 -846
- package/dist/components/Steps/index.d.cts +2 -118
- package/dist/components/Steps/index.d.ts +2 -118
- package/dist/components/Steps/index.js +1 -1
- package/dist/components/Switch/index.cjs +1 -1
- package/dist/components/Switch/index.css +9 -745
- package/dist/components/Switch/index.d.cts +2 -118
- package/dist/components/Switch/index.d.ts +2 -118
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tab/index.cjs +3 -3
- package/dist/components/Tab/index.css +20 -9
- package/dist/components/Tab/index.d.cts +2 -0
- package/dist/components/Tab/index.d.ts +2 -0
- package/dist/components/Tab/index.js +3 -3
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.css +47 -4003
- package/dist/components/Table/index.d.cts +2 -118
- package/dist/components/Table/index.d.ts +2 -118
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/index.cjs +3 -2
- package/dist/components/Tag/index.css +27 -467
- package/dist/components/Tag/index.d.cts +4 -118
- package/dist/components/Tag/index.d.ts +4 -118
- package/dist/components/Tag/index.js +3 -2
- package/dist/components/TextArea/index.cjs +1 -1
- package/dist/components/TextArea/index.css +4 -4
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.css +8 -8
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/index.cjs +1 -1
- package/dist/components/Tooltip/index.css +4 -560
- package/dist/components/Tooltip/index.d.cts +2 -118
- package/dist/components/Tooltip/index.d.ts +2 -118
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Video/index.cjs +1 -1
- package/dist/components/Video/index.css +3 -3
- package/dist/components/Video/index.js +1 -1
- package/dist/components/index.cjs +441 -347
- package/dist/components/index.css +1278 -12638
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +439 -346
- package/dist/index.cjs +466 -371
- package/dist/index.css +1281 -12641
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +466 -370
- package/dist/layout/Grid/FullGrid/index.cjs +1 -1
- package/dist/layout/Grid/FullGrid/index.js +1 -1
- package/dist/layout/Grid/FullScreen/index.cjs +1 -1
- package/dist/layout/Grid/FullScreen/index.js +1 -1
- package/dist/layout/Grid/Item/index.cjs +1 -1
- package/dist/layout/Grid/Item/index.js +1 -1
- package/dist/layout/Grid/index.cjs +1 -1
- package/dist/layout/Grid/index.js +1 -1
- package/dist/layout/Header/index.css +2 -2
- package/dist/layout/Layout/index.css +1 -1
- package/dist/layout/SideBar/index.cjs +1 -1
- package/dist/layout/SideBar/index.js +1 -1
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.css +3 -3
- package/dist/layout/index.js +1 -1
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/package.json +12 -12
- package/README.md +0 -123
package/dist/index.cjs
CHANGED
|
@@ -88,6 +88,7 @@ __export(index_exports, {
|
|
|
88
88
|
CameraIcon: () => CameraIcon_default,
|
|
89
89
|
CameraOffIcon: () => CameraOffIcon_default,
|
|
90
90
|
Card: () => Card_default,
|
|
91
|
+
CardTab: () => CardTab_default,
|
|
91
92
|
CastIcon: () => CastIcon_default,
|
|
92
93
|
Chart: () => Chart_default,
|
|
93
94
|
CheckBox: () => CheckBox_default,
|
|
@@ -386,6 +387,7 @@ __export(index_exports, {
|
|
|
386
387
|
useToast: () => useToast
|
|
387
388
|
});
|
|
388
389
|
module.exports = __toCommonJS(index_exports);
|
|
390
|
+
var import_tokens2 = require("@x-plat/tokens-default/tokens.css");
|
|
389
391
|
|
|
390
392
|
// src/components/Accordion/Accordion.tsx
|
|
391
393
|
var import_react = __toESM(require("react"), 1);
|
|
@@ -5858,7 +5860,7 @@ var SuccessIcon = () => /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
|
|
|
5858
5860
|
);
|
|
5859
5861
|
var SuccessIcon_default = SuccessIcon;
|
|
5860
5862
|
|
|
5861
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
5863
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
5862
5864
|
function r(e) {
|
|
5863
5865
|
var t, f, n = "";
|
|
5864
5866
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -5909,26 +5911,37 @@ var AccordionItem = ({ item, isOpen, onToggle }) => {
|
|
|
5909
5911
|
] });
|
|
5910
5912
|
};
|
|
5911
5913
|
var Accordion = (props) => {
|
|
5912
|
-
const { items,
|
|
5913
|
-
const
|
|
5914
|
-
|
|
5914
|
+
const { items, className } = props;
|
|
5915
|
+
const isMultiple = props.multiple === true;
|
|
5916
|
+
const controlledKeys = isMultiple ? props.activeKeys : props.activeKey !== void 0 ? props.activeKey !== null ? [props.activeKey] : [] : void 0;
|
|
5917
|
+
const defaultKeys = isMultiple ? props.defaultActiveKeys ?? [] : props.defaultActiveKey ? [props.defaultActiveKey] : [];
|
|
5918
|
+
const isControlled = controlledKeys !== void 0;
|
|
5919
|
+
const [uncontrolledKeys, setUncontrolledKeys] = import_react.default.useState(
|
|
5920
|
+
new Set(defaultKeys)
|
|
5915
5921
|
);
|
|
5922
|
+
const currentKeys = isControlled ? new Set(controlledKeys) : uncontrolledKeys;
|
|
5916
5923
|
const toggle = (key) => {
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
}
|
|
5924
|
+
const next = new Set(isMultiple ? currentKeys : []);
|
|
5925
|
+
if (currentKeys.has(key)) {
|
|
5926
|
+
next.delete(key);
|
|
5927
|
+
} else {
|
|
5928
|
+
next.add(key);
|
|
5929
|
+
}
|
|
5930
|
+
if (!isControlled) {
|
|
5931
|
+
setUncontrolledKeys(next);
|
|
5932
|
+
}
|
|
5933
|
+
if (isMultiple) {
|
|
5934
|
+
props.onChange?.([...next]);
|
|
5935
|
+
} else {
|
|
5936
|
+
const first = [...next][0] ?? null;
|
|
5937
|
+
props.onChange?.(first);
|
|
5938
|
+
}
|
|
5926
5939
|
};
|
|
5927
5940
|
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: clsx_default("lib-xplat-accordion", className), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
5928
5941
|
AccordionItem,
|
|
5929
5942
|
{
|
|
5930
5943
|
item,
|
|
5931
|
-
isOpen:
|
|
5944
|
+
isOpen: currentKeys.has(item.key),
|
|
5932
5945
|
onToggle: () => toggle(item.key)
|
|
5933
5946
|
},
|
|
5934
5947
|
item.key
|
|
@@ -6123,6 +6136,7 @@ var Badge = (props) => {
|
|
|
6123
6136
|
count,
|
|
6124
6137
|
maxCount = 99,
|
|
6125
6138
|
dot = false,
|
|
6139
|
+
size = "md",
|
|
6126
6140
|
colorNamespace = "xplat",
|
|
6127
6141
|
color = "red",
|
|
6128
6142
|
colorDepth,
|
|
@@ -6135,7 +6149,7 @@ var Badge = (props) => {
|
|
|
6135
6149
|
);
|
|
6136
6150
|
const showBadge = dot || count !== void 0 && count > 0;
|
|
6137
6151
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
6138
|
-
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: clsx_default("lib-xplat-badge", className), children: [
|
|
6152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: clsx_default("lib-xplat-badge", size, className), children: [
|
|
6139
6153
|
children,
|
|
6140
6154
|
showBadge && /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("span", { className: clsx_default("badge-indicator", colorClass, { dot }), children: !dot && displayCount })
|
|
6141
6155
|
] });
|
|
@@ -6164,6 +6178,7 @@ var Button = (props) => {
|
|
|
6164
6178
|
const {
|
|
6165
6179
|
children,
|
|
6166
6180
|
type = "primary",
|
|
6181
|
+
size = "md",
|
|
6167
6182
|
colorNamespace = "xplat",
|
|
6168
6183
|
color = "black",
|
|
6169
6184
|
colorDepth,
|
|
@@ -6179,7 +6194,7 @@ var Button = (props) => {
|
|
|
6179
6194
|
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
6180
6195
|
"button",
|
|
6181
6196
|
{
|
|
6182
|
-
className: clsx_default("lib-xplat-button", type, colorClass, className),
|
|
6197
|
+
className: clsx_default("lib-xplat-button", type, size, colorClass, className),
|
|
6183
6198
|
disabled,
|
|
6184
6199
|
...rest,
|
|
6185
6200
|
children
|
|
@@ -6200,8 +6215,77 @@ var Card = ({ children, title, className }) => {
|
|
|
6200
6215
|
Card.displayName = "Card";
|
|
6201
6216
|
var Card_default = Card;
|
|
6202
6217
|
|
|
6203
|
-
// src/components/
|
|
6218
|
+
// src/components/CardTab/CardTab.tsx
|
|
6204
6219
|
var import_react2 = __toESM(require("react"), 1);
|
|
6220
|
+
|
|
6221
|
+
// src/components/CardTab/CardTabPanel.tsx
|
|
6222
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
6223
|
+
var CardTabPanel = (props) => {
|
|
6224
|
+
const { children, columns = 3, className } = props;
|
|
6225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6226
|
+
"div",
|
|
6227
|
+
{
|
|
6228
|
+
className: clsx_default("card-tab-panel", className),
|
|
6229
|
+
style: { "--card-tab-columns": columns },
|
|
6230
|
+
children
|
|
6231
|
+
}
|
|
6232
|
+
);
|
|
6233
|
+
};
|
|
6234
|
+
CardTabPanel.displayName = "CardTab.Panel";
|
|
6235
|
+
var CardTabPanel_default = CardTabPanel;
|
|
6236
|
+
|
|
6237
|
+
// src/components/CardTab/CardTab.tsx
|
|
6238
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
6239
|
+
var CardTabRoot = (props) => {
|
|
6240
|
+
const {
|
|
6241
|
+
tabs,
|
|
6242
|
+
activeValue: activeValueProp,
|
|
6243
|
+
onChange,
|
|
6244
|
+
size = "md",
|
|
6245
|
+
children,
|
|
6246
|
+
className
|
|
6247
|
+
} = props;
|
|
6248
|
+
const isControlled = activeValueProp !== void 0;
|
|
6249
|
+
const [uncontrolledValue, setUncontrolledValue] = import_react2.default.useState(tabs[0]?.value ?? "");
|
|
6250
|
+
const activeValue = isControlled ? activeValueProp : uncontrolledValue;
|
|
6251
|
+
const handleTabClick = (tab) => {
|
|
6252
|
+
if (!isControlled) {
|
|
6253
|
+
setUncontrolledValue(tab.value);
|
|
6254
|
+
}
|
|
6255
|
+
onChange?.(tab);
|
|
6256
|
+
};
|
|
6257
|
+
const panels = import_react2.default.Children.toArray(children).filter(
|
|
6258
|
+
(child) => import_react2.default.isValidElement(child) && child.type === CardTabPanel_default
|
|
6259
|
+
);
|
|
6260
|
+
const activePanel = panels.find(
|
|
6261
|
+
(panel) => panel.props.value === activeValue
|
|
6262
|
+
);
|
|
6263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: clsx_default("lib-xplat-card-tab", size, className), children: [
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
6265
|
+
const isActive = tab.value === activeValue;
|
|
6266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6267
|
+
"button",
|
|
6268
|
+
{
|
|
6269
|
+
className: clsx_default("card-tab-trigger", isActive && "active"),
|
|
6270
|
+
onClick: () => handleTabClick(tab),
|
|
6271
|
+
role: "tab",
|
|
6272
|
+
"aria-selected": isActive,
|
|
6273
|
+
children: tab.title
|
|
6274
|
+
},
|
|
6275
|
+
tab.value
|
|
6276
|
+
);
|
|
6277
|
+
}) }),
|
|
6278
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "card-tab-body", children: activePanel })
|
|
6279
|
+
] });
|
|
6280
|
+
};
|
|
6281
|
+
CardTabRoot.displayName = "CardTab";
|
|
6282
|
+
var CardTab = Object.assign(CardTabRoot, {
|
|
6283
|
+
Panel: CardTabPanel_default
|
|
6284
|
+
});
|
|
6285
|
+
var CardTab_default = CardTab;
|
|
6286
|
+
|
|
6287
|
+
// src/components/Chart/Chart.tsx
|
|
6288
|
+
var import_react3 = __toESM(require("react"), 1);
|
|
6205
6289
|
var import_chart = require("chart.js");
|
|
6206
6290
|
var import_chartjs_plugin_datalabels = __toESM(require("chartjs-plugin-datalabels"), 1);
|
|
6207
6291
|
var import_react_chartjs_2 = require("react-chartjs-2");
|
|
@@ -6333,7 +6417,7 @@ var getIndexColorByPreset = (preset, index) => {
|
|
|
6333
6417
|
};
|
|
6334
6418
|
|
|
6335
6419
|
// src/components/Chart/Chart.tsx
|
|
6336
|
-
var
|
|
6420
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
6337
6421
|
import_chart.Chart.register(
|
|
6338
6422
|
import_chart.CategoryScale,
|
|
6339
6423
|
import_chart.LinearScale,
|
|
@@ -6348,12 +6432,12 @@ import_chart.Chart.register(
|
|
|
6348
6432
|
);
|
|
6349
6433
|
var Chart = (props) => {
|
|
6350
6434
|
const { type, data, labels } = props;
|
|
6351
|
-
const chartInstanceRef =
|
|
6352
|
-
const containerRef =
|
|
6353
|
-
const chartRef =
|
|
6435
|
+
const chartInstanceRef = import_react3.default.useRef(null);
|
|
6436
|
+
const containerRef = import_react3.default.useRef(null);
|
|
6437
|
+
const chartRef = import_react3.default.useCallback((instance) => {
|
|
6354
6438
|
chartInstanceRef.current = instance ?? null;
|
|
6355
6439
|
}, []);
|
|
6356
|
-
const datasets =
|
|
6440
|
+
const datasets = import_react3.default.useMemo(() => {
|
|
6357
6441
|
const pallette = getChartColorPreset(type);
|
|
6358
6442
|
return Object.entries(data).map(([key, values], index) => {
|
|
6359
6443
|
const uniqueColors = getIndexColorByPreset(pallette, index);
|
|
@@ -6407,21 +6491,21 @@ var Chart = (props) => {
|
|
|
6407
6491
|
formatter: (value) => `${value}`
|
|
6408
6492
|
};
|
|
6409
6493
|
}
|
|
6410
|
-
const renderChart =
|
|
6494
|
+
const renderChart = import_react3.default.useMemo(() => {
|
|
6411
6495
|
switch (type) {
|
|
6412
6496
|
case "line":
|
|
6413
|
-
return /* @__PURE__ */ (0,
|
|
6497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_react_chartjs_2.Line, { ref: chartRef, data: chartData, options });
|
|
6414
6498
|
case "bar":
|
|
6415
|
-
return /* @__PURE__ */ (0,
|
|
6499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_react_chartjs_2.Bar, { ref: chartRef, data: chartData, options });
|
|
6416
6500
|
case "pie":
|
|
6417
|
-
return /* @__PURE__ */ (0,
|
|
6501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_react_chartjs_2.Pie, { ref: chartRef, data: chartData, options });
|
|
6418
6502
|
case "doughnut":
|
|
6419
|
-
return /* @__PURE__ */ (0,
|
|
6503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_react_chartjs_2.Doughnut, { ref: chartRef, data: chartData, options });
|
|
6420
6504
|
default:
|
|
6421
6505
|
return null;
|
|
6422
6506
|
}
|
|
6423
6507
|
}, [chartData, options, type]);
|
|
6424
|
-
|
|
6508
|
+
import_react3.default.useEffect(() => {
|
|
6425
6509
|
if (!containerRef.current || !chartInstanceRef.current) return;
|
|
6426
6510
|
const observer = new ResizeObserver(() => {
|
|
6427
6511
|
requestAnimationFrame(() => {
|
|
@@ -6431,7 +6515,7 @@ var Chart = (props) => {
|
|
|
6431
6515
|
observer.observe(containerRef.current);
|
|
6432
6516
|
return () => observer.disconnect();
|
|
6433
6517
|
}, []);
|
|
6434
|
-
return /* @__PURE__ */ (0,
|
|
6518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "lib-xplat-chart", ref: containerRef, children: renderChart });
|
|
6435
6519
|
};
|
|
6436
6520
|
Chart.displayName = "Chart";
|
|
6437
6521
|
var Chart_default = Chart;
|
|
@@ -6450,7 +6534,7 @@ var gridColumns = {
|
|
|
6450
6534
|
};
|
|
6451
6535
|
|
|
6452
6536
|
// src/components/CheckBox/CheckBox.tsx
|
|
6453
|
-
var
|
|
6537
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
6454
6538
|
var CheckBox = (props) => {
|
|
6455
6539
|
const {
|
|
6456
6540
|
colorNamespace = "xplat",
|
|
@@ -6461,6 +6545,7 @@ var CheckBox = (props) => {
|
|
|
6461
6545
|
onChange,
|
|
6462
6546
|
className,
|
|
6463
6547
|
disabled,
|
|
6548
|
+
size = "md",
|
|
6464
6549
|
...rest
|
|
6465
6550
|
} = props;
|
|
6466
6551
|
const handleChange = (e) => {
|
|
@@ -6475,8 +6560,8 @@ var CheckBox = (props) => {
|
|
|
6475
6560
|
const checkedClasses = `checked ${mainColor}`;
|
|
6476
6561
|
const disabledClasses = "disabled";
|
|
6477
6562
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
6478
|
-
return /* @__PURE__ */ (0,
|
|
6479
|
-
/* @__PURE__ */ (0,
|
|
6563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, className), children: [
|
|
6564
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6480
6565
|
"input",
|
|
6481
6566
|
{
|
|
6482
6567
|
type: "checkbox",
|
|
@@ -6486,15 +6571,15 @@ var CheckBox = (props) => {
|
|
|
6486
6571
|
...rest
|
|
6487
6572
|
}
|
|
6488
6573
|
),
|
|
6489
|
-
/* @__PURE__ */ (0,
|
|
6490
|
-
label && /* @__PURE__ */ (0,
|
|
6574
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(CheckIcon_default, {}) }) }),
|
|
6575
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "label", children: label })
|
|
6491
6576
|
] });
|
|
6492
6577
|
};
|
|
6493
6578
|
CheckBox.displayName = "CheckBox";
|
|
6494
6579
|
var CheckBox_default = CheckBox;
|
|
6495
6580
|
|
|
6496
6581
|
// src/components/Chip/Chip.tsx
|
|
6497
|
-
var
|
|
6582
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
6498
6583
|
var Chip = (props) => {
|
|
6499
6584
|
const {
|
|
6500
6585
|
children,
|
|
@@ -6502,6 +6587,7 @@ var Chip = (props) => {
|
|
|
6502
6587
|
color = "black",
|
|
6503
6588
|
colorDepth,
|
|
6504
6589
|
type = "primary",
|
|
6590
|
+
size = "md",
|
|
6505
6591
|
className
|
|
6506
6592
|
} = props;
|
|
6507
6593
|
const colorClass = getColorClass(
|
|
@@ -6509,29 +6595,29 @@ var Chip = (props) => {
|
|
|
6509
6595
|
color,
|
|
6510
6596
|
colorDepth ?? 500
|
|
6511
6597
|
);
|
|
6512
|
-
return /* @__PURE__ */ (0,
|
|
6598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size, colorClass, className), children });
|
|
6513
6599
|
};
|
|
6514
6600
|
Chip.displayName = "Chip";
|
|
6515
6601
|
var Chip_default = Chip;
|
|
6516
6602
|
|
|
6517
6603
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6518
|
-
var
|
|
6604
|
+
var import_react7 = __toESM(require("react"), 1);
|
|
6519
6605
|
|
|
6520
6606
|
// src/components/Input/Input.tsx
|
|
6521
|
-
var
|
|
6607
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
6522
6608
|
|
|
6523
6609
|
// src/components/Input/InputValidations.tsx
|
|
6524
|
-
var
|
|
6610
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
6525
6611
|
var InputValidations = (props) => {
|
|
6526
6612
|
const { message, status = "default" } = props;
|
|
6527
|
-
return /* @__PURE__ */ (0,
|
|
6528
|
-
/* @__PURE__ */ (0,
|
|
6529
|
-
status === "default" && /* @__PURE__ */ (0,
|
|
6530
|
-
status === "success" && /* @__PURE__ */ (0,
|
|
6531
|
-
status === "warning" && /* @__PURE__ */ (0,
|
|
6532
|
-
status === "error" && /* @__PURE__ */ (0,
|
|
6613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: "icon", children: [
|
|
6615
|
+
status === "default" && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(InfoIcon_default, {}),
|
|
6616
|
+
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(SuccessIcon_default, {}),
|
|
6617
|
+
status === "warning" && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(InfoIcon_default, {}),
|
|
6618
|
+
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(ErrorIcon_default, {})
|
|
6533
6619
|
] }),
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6620
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: "message", children: message })
|
|
6535
6621
|
] });
|
|
6536
6622
|
};
|
|
6537
6623
|
InputValidations.displayName = "InputValidations";
|
|
@@ -6572,8 +6658,8 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
6572
6658
|
};
|
|
6573
6659
|
|
|
6574
6660
|
// src/components/Input/Input.tsx
|
|
6575
|
-
var
|
|
6576
|
-
var
|
|
6661
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
6662
|
+
var import_react5 = require("react");
|
|
6577
6663
|
var formatValue = (type, value) => {
|
|
6578
6664
|
if (value === null || value === void 0) return "";
|
|
6579
6665
|
const strValue = Array.isArray(value) ? String(value[0] ?? "") : String(value);
|
|
@@ -6621,11 +6707,12 @@ var parseValue = (type, value) => {
|
|
|
6621
6707
|
return value;
|
|
6622
6708
|
}
|
|
6623
6709
|
};
|
|
6624
|
-
var Input =
|
|
6710
|
+
var Input = import_react4.default.forwardRef((props, ref) => {
|
|
6625
6711
|
const {
|
|
6626
6712
|
value,
|
|
6627
6713
|
onChange,
|
|
6628
6714
|
type = "text",
|
|
6715
|
+
size = "md",
|
|
6629
6716
|
suffix,
|
|
6630
6717
|
className,
|
|
6631
6718
|
disabled,
|
|
@@ -6647,13 +6734,13 @@ var Input = import_react3.default.forwardRef((props, ref) => {
|
|
|
6647
6734
|
onChange(event);
|
|
6648
6735
|
}
|
|
6649
6736
|
};
|
|
6650
|
-
return /* @__PURE__ */ (0,
|
|
6651
|
-
/* @__PURE__ */ (0,
|
|
6737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("div", { className: clsx_default("lib-xplat-input-wrap", className), children: [
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(
|
|
6652
6739
|
"div",
|
|
6653
6740
|
{
|
|
6654
|
-
className: clsx_default("lib-xplat-input", disabled ? "disabled" : void 0),
|
|
6741
|
+
className: clsx_default("lib-xplat-input", size, disabled ? "disabled" : void 0),
|
|
6655
6742
|
children: [
|
|
6656
|
-
/* @__PURE__ */ (0,
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
6657
6744
|
"input",
|
|
6658
6745
|
{
|
|
6659
6746
|
...inputProps,
|
|
@@ -6664,11 +6751,11 @@ var Input = import_react3.default.forwardRef((props, ref) => {
|
|
|
6664
6751
|
onChange: handleChange
|
|
6665
6752
|
}
|
|
6666
6753
|
),
|
|
6667
|
-
suffix && /* @__PURE__ */ (0,
|
|
6754
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("div", { className: "suffix", children: suffix })
|
|
6668
6755
|
]
|
|
6669
6756
|
}
|
|
6670
6757
|
),
|
|
6671
|
-
validations && /* @__PURE__ */ (0,
|
|
6758
|
+
validations && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ (0, import_react5.createElement)(
|
|
6672
6759
|
InputValidations_default,
|
|
6673
6760
|
{
|
|
6674
6761
|
...validation,
|
|
@@ -6681,20 +6768,20 @@ Input.displayName = "Input";
|
|
|
6681
6768
|
var Input_default = Input;
|
|
6682
6769
|
|
|
6683
6770
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
6684
|
-
var
|
|
6685
|
-
var
|
|
6686
|
-
var PasswordInput =
|
|
6771
|
+
var import_react6 = __toESM(require("react"), 1);
|
|
6772
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
6773
|
+
var PasswordInput = import_react6.default.forwardRef(
|
|
6687
6774
|
(props, ref) => {
|
|
6688
6775
|
const { reg: _reg, ...inputProps } = props;
|
|
6689
|
-
const [isView, setIsView] =
|
|
6776
|
+
const [isView, setIsView] = import_react6.default.useState(false);
|
|
6690
6777
|
const handleChangeView = () => {
|
|
6691
6778
|
setIsView((prev) => !prev);
|
|
6692
6779
|
};
|
|
6693
|
-
return /* @__PURE__ */ (0,
|
|
6780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
6694
6781
|
Input_default,
|
|
6695
6782
|
{
|
|
6696
6783
|
...inputProps,
|
|
6697
|
-
suffix: /* @__PURE__ */ (0,
|
|
6784
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(OpenEyeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(CloseEyeIcon_default, {}) }),
|
|
6698
6785
|
type: isView ? "text" : "password",
|
|
6699
6786
|
ref
|
|
6700
6787
|
}
|
|
@@ -6707,8 +6794,8 @@ var PasswordInput_default = PasswordInput;
|
|
|
6707
6794
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6708
6795
|
var import_react_datepicker = __toESM(require("react-datepicker"), 1);
|
|
6709
6796
|
var import_react_datepicker2 = require("react-datepicker/dist/react-datepicker.css");
|
|
6710
|
-
var
|
|
6711
|
-
var Suffix = () => /* @__PURE__ */ (0,
|
|
6797
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
6798
|
+
var Suffix = () => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(CalenderIcon_default, {}) });
|
|
6712
6799
|
var InputDatePicker = (props) => {
|
|
6713
6800
|
const { value, onChange, disabled, ...rest } = props;
|
|
6714
6801
|
const handleChange = (date) => {
|
|
@@ -6722,22 +6809,22 @@ var InputDatePicker = (props) => {
|
|
|
6722
6809
|
const d = String(date.getDate()).padStart(2, "0");
|
|
6723
6810
|
return `${y}/${m}/${d}`;
|
|
6724
6811
|
};
|
|
6725
|
-
const CustomInput =
|
|
6812
|
+
const CustomInput = import_react7.default.forwardRef(({ onClick }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { onClick, children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
6726
6813
|
Input_default,
|
|
6727
6814
|
{
|
|
6728
6815
|
value: formatDate(value),
|
|
6729
|
-
suffix: /* @__PURE__ */ (0,
|
|
6816
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Suffix, {}),
|
|
6730
6817
|
disabled
|
|
6731
6818
|
}
|
|
6732
6819
|
) }));
|
|
6733
6820
|
CustomInput.displayName = "InputDatePickerCustomInput";
|
|
6734
|
-
return /* @__PURE__ */ (0,
|
|
6821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "lib-xplat-datepicker", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
6735
6822
|
import_react_datepicker.default,
|
|
6736
6823
|
{
|
|
6737
6824
|
selected: value,
|
|
6738
6825
|
onChange: handleChange,
|
|
6739
6826
|
...rest,
|
|
6740
|
-
customInput: /* @__PURE__ */ (0,
|
|
6827
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(CustomInput, {}),
|
|
6741
6828
|
dateFormat: "YYYY/MM/dd"
|
|
6742
6829
|
}
|
|
6743
6830
|
) });
|
|
@@ -6746,18 +6833,18 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
6746
6833
|
var InputDatePicker_default = InputDatePicker;
|
|
6747
6834
|
|
|
6748
6835
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
6749
|
-
var
|
|
6836
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
6750
6837
|
|
|
6751
6838
|
// src/components/Modal/Modal.tsx
|
|
6752
|
-
var
|
|
6839
|
+
var import_react8 = __toESM(require("react"), 1);
|
|
6753
6840
|
var import_react_dom = require("react-dom");
|
|
6754
|
-
var
|
|
6841
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
6755
6842
|
var ANIMATION_DURATION_MS = 200;
|
|
6756
6843
|
var Modal = (props) => {
|
|
6757
6844
|
const { isOpen, onClose, children } = props;
|
|
6758
|
-
const [mounted, setMounted] =
|
|
6759
|
-
const [visible, setVisible] =
|
|
6760
|
-
|
|
6845
|
+
const [mounted, setMounted] = import_react8.default.useState(false);
|
|
6846
|
+
const [visible, setVisible] = import_react8.default.useState(false);
|
|
6847
|
+
import_react8.default.useEffect(() => {
|
|
6761
6848
|
if (isOpen) {
|
|
6762
6849
|
setMounted(true);
|
|
6763
6850
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6771,12 +6858,12 @@ var Modal = (props) => {
|
|
|
6771
6858
|
if (!mounted) return null;
|
|
6772
6859
|
const stateClass = visible ? "enter" : "exit";
|
|
6773
6860
|
return (0, import_react_dom.createPortal)(
|
|
6774
|
-
/* @__PURE__ */ (0,
|
|
6861
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
6775
6862
|
"div",
|
|
6776
6863
|
{
|
|
6777
6864
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
6778
6865
|
onClick: onClose,
|
|
6779
|
-
children: /* @__PURE__ */ (0,
|
|
6866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
6780
6867
|
"div",
|
|
6781
6868
|
{
|
|
6782
6869
|
className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
|
|
@@ -6797,7 +6884,7 @@ var Modal_default = Modal;
|
|
|
6797
6884
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
6798
6885
|
var import_react_datepicker3 = __toESM(require("react-datepicker"), 1);
|
|
6799
6886
|
var import_react_datepicker4 = require("react-datepicker/dist/react-datepicker.css");
|
|
6800
|
-
var
|
|
6887
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
6801
6888
|
function getColorValue(ns, color, depth) {
|
|
6802
6889
|
const nsColors = colors[ns];
|
|
6803
6890
|
const colorEntry = nsColors[color];
|
|
@@ -6823,12 +6910,12 @@ var SingleDatePicker = (props) => {
|
|
|
6823
6910
|
color,
|
|
6824
6911
|
colorDepth ?? 500
|
|
6825
6912
|
);
|
|
6826
|
-
return /* @__PURE__ */ (0,
|
|
6913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
6827
6914
|
"div",
|
|
6828
6915
|
{
|
|
6829
6916
|
className: "lib-xplat-datepicker",
|
|
6830
6917
|
style: { "--datepicker-active-color": activeColor },
|
|
6831
|
-
children: /* @__PURE__ */ (0,
|
|
6918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
6832
6919
|
import_react_datepicker3.default,
|
|
6833
6920
|
{
|
|
6834
6921
|
selected: value,
|
|
@@ -6845,10 +6932,10 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
6845
6932
|
var SingleDatePicker_default = SingleDatePicker;
|
|
6846
6933
|
|
|
6847
6934
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
6848
|
-
var
|
|
6935
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
6849
6936
|
var PopupPicker = (props) => {
|
|
6850
6937
|
const { component, type } = props;
|
|
6851
|
-
const [isOpen, setIsOpen] =
|
|
6938
|
+
const [isOpen, setIsOpen] = import_react9.default.useState(false);
|
|
6852
6939
|
const handleClick = () => setIsOpen(true);
|
|
6853
6940
|
const handleClose = () => setIsOpen(false);
|
|
6854
6941
|
const handleSingleChange = (date) => {
|
|
@@ -6856,11 +6943,11 @@ var PopupPicker = (props) => {
|
|
|
6856
6943
|
props.onChange?.(date);
|
|
6857
6944
|
handleClose();
|
|
6858
6945
|
};
|
|
6859
|
-
return /* @__PURE__ */ (0,
|
|
6860
|
-
|
|
6861
|
-
/* @__PURE__ */ (0,
|
|
6862
|
-
/* @__PURE__ */ (0,
|
|
6863
|
-
type === "single" && /* @__PURE__ */ (0,
|
|
6946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
6947
|
+
import_react9.default.cloneElement(component, { onClick: handleClick }),
|
|
6948
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
6949
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
6950
|
+
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
6864
6951
|
SingleDatePicker_default,
|
|
6865
6952
|
{
|
|
6866
6953
|
value: props.value,
|
|
@@ -6869,7 +6956,7 @@ var PopupPicker = (props) => {
|
|
|
6869
6956
|
maxDate: props.maxDate
|
|
6870
6957
|
}
|
|
6871
6958
|
),
|
|
6872
|
-
type === "range" && /* @__PURE__ */ (0,
|
|
6959
|
+
type === "range" && /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
6873
6960
|
RangePicker_default,
|
|
6874
6961
|
{
|
|
6875
6962
|
startDate: props.startDate,
|
|
@@ -6880,8 +6967,8 @@ var PopupPicker = (props) => {
|
|
|
6880
6967
|
}
|
|
6881
6968
|
)
|
|
6882
6969
|
] }),
|
|
6883
|
-
/* @__PURE__ */ (0,
|
|
6884
|
-
/* @__PURE__ */ (0,
|
|
6970
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "popup-datepicker-footer", children: [
|
|
6971
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
6885
6972
|
Button_default,
|
|
6886
6973
|
{
|
|
6887
6974
|
type: "secondary",
|
|
@@ -6891,7 +6978,7 @@ var PopupPicker = (props) => {
|
|
|
6891
6978
|
children: "\uCDE8\uC18C"
|
|
6892
6979
|
}
|
|
6893
6980
|
),
|
|
6894
|
-
/* @__PURE__ */ (0,
|
|
6981
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
6895
6982
|
] })
|
|
6896
6983
|
] }) })
|
|
6897
6984
|
] });
|
|
@@ -6900,8 +6987,8 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
6900
6987
|
var PopupPicker_default = PopupPicker;
|
|
6901
6988
|
|
|
6902
6989
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
6903
|
-
var
|
|
6904
|
-
var
|
|
6990
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
6991
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
6905
6992
|
function getDatesBetween(start, end) {
|
|
6906
6993
|
const dates = [];
|
|
6907
6994
|
const current = new Date(start);
|
|
@@ -6925,7 +7012,7 @@ var RangePicker = (props) => {
|
|
|
6925
7012
|
color,
|
|
6926
7013
|
colorDepth
|
|
6927
7014
|
} = props;
|
|
6928
|
-
const rangeDates =
|
|
7015
|
+
const rangeDates = import_react10.default.useMemo(
|
|
6929
7016
|
() => getDatesBetween(startDate, endDate),
|
|
6930
7017
|
[startDate, endDate]
|
|
6931
7018
|
);
|
|
@@ -6934,10 +7021,10 @@ var RangePicker = (props) => {
|
|
|
6934
7021
|
...color !== void 0 && { color },
|
|
6935
7022
|
...colorDepth !== void 0 && { colorDepth }
|
|
6936
7023
|
};
|
|
6937
|
-
return /* @__PURE__ */ (0,
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
6940
|
-
/* @__PURE__ */ (0,
|
|
7024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "lib-xplat-range-datepicker", children: [
|
|
7025
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "lib-xplat-range-datepicker-from", children: [
|
|
7026
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
|
|
7027
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
6941
7028
|
SingleDatePicker_default,
|
|
6942
7029
|
{
|
|
6943
7030
|
value: startDate,
|
|
@@ -6949,9 +7036,9 @@ var RangePicker = (props) => {
|
|
|
6949
7036
|
}
|
|
6950
7037
|
)
|
|
6951
7038
|
] }),
|
|
6952
|
-
/* @__PURE__ */ (0,
|
|
6953
|
-
/* @__PURE__ */ (0,
|
|
6954
|
-
/* @__PURE__ */ (0,
|
|
7039
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "lib-xplat-range-datepicker-to", children: [
|
|
7040
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "lib-xplat-range-datepicker-label", children: "\uC885\uB8CC" }),
|
|
7041
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
6955
7042
|
SingleDatePicker_default,
|
|
6956
7043
|
{
|
|
6957
7044
|
value: endDate,
|
|
@@ -6969,10 +7056,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
6969
7056
|
var RangePicker_default = RangePicker;
|
|
6970
7057
|
|
|
6971
7058
|
// src/components/Divider/Divider.tsx
|
|
6972
|
-
var
|
|
7059
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
6973
7060
|
var Divider = (props) => {
|
|
6974
7061
|
const { orientation = "horizontal", className } = props;
|
|
6975
|
-
return /* @__PURE__ */ (0,
|
|
7062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
6976
7063
|
"div",
|
|
6977
7064
|
{
|
|
6978
7065
|
className: clsx_default("lib-xplat-divider", orientation, className),
|
|
@@ -6985,15 +7072,15 @@ Divider.displayName = "Divider";
|
|
|
6985
7072
|
var Divider_default = Divider;
|
|
6986
7073
|
|
|
6987
7074
|
// src/components/Drawer/Drawer.tsx
|
|
6988
|
-
var
|
|
7075
|
+
var import_react11 = __toESM(require("react"), 1);
|
|
6989
7076
|
var import_react_dom2 = require("react-dom");
|
|
6990
|
-
var
|
|
7077
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
6991
7078
|
var ANIMATION_DURATION_MS2 = 250;
|
|
6992
7079
|
var Drawer = (props) => {
|
|
6993
7080
|
const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
|
|
6994
|
-
const [mounted, setMounted] =
|
|
6995
|
-
const [visible, setVisible] =
|
|
6996
|
-
|
|
7081
|
+
const [mounted, setMounted] = import_react11.default.useState(false);
|
|
7082
|
+
const [visible, setVisible] = import_react11.default.useState(false);
|
|
7083
|
+
import_react11.default.useEffect(() => {
|
|
6997
7084
|
if (isOpen) {
|
|
6998
7085
|
setMounted(true);
|
|
6999
7086
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7008,12 +7095,12 @@ var Drawer = (props) => {
|
|
|
7008
7095
|
const stateClass = visible ? "enter" : "exit";
|
|
7009
7096
|
const widthValue = typeof width === "number" ? `${width}px` : width;
|
|
7010
7097
|
return (0, import_react_dom2.createPortal)(
|
|
7011
|
-
/* @__PURE__ */ (0,
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
7012
7099
|
"div",
|
|
7013
7100
|
{
|
|
7014
7101
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
7015
7102
|
onClick: onClose,
|
|
7016
|
-
children: /* @__PURE__ */ (0,
|
|
7103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)(
|
|
7017
7104
|
"div",
|
|
7018
7105
|
{
|
|
7019
7106
|
className: clsx_default("lib-xplat-drawer", placement, stateClass),
|
|
@@ -7022,11 +7109,11 @@ var Drawer = (props) => {
|
|
|
7022
7109
|
"aria-modal": "true",
|
|
7023
7110
|
onClick: (e) => e.stopPropagation(),
|
|
7024
7111
|
children: [
|
|
7025
|
-
title && /* @__PURE__ */ (0,
|
|
7026
|
-
/* @__PURE__ */ (0,
|
|
7027
|
-
/* @__PURE__ */ (0,
|
|
7112
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "drawer-header", children: [
|
|
7113
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("span", { className: "drawer-title", children: title }),
|
|
7114
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
7028
7115
|
] }),
|
|
7029
|
-
/* @__PURE__ */ (0,
|
|
7116
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "drawer-body", children })
|
|
7030
7117
|
]
|
|
7031
7118
|
}
|
|
7032
7119
|
)
|
|
@@ -7039,16 +7126,16 @@ Drawer.displayName = "Drawer";
|
|
|
7039
7126
|
var Drawer_default = Drawer;
|
|
7040
7127
|
|
|
7041
7128
|
// src/components/Dropdown/Dropdown.tsx
|
|
7042
|
-
var
|
|
7129
|
+
var import_react14 = __toESM(require("react"), 1);
|
|
7043
7130
|
|
|
7044
7131
|
// src/tokens/hooks/useAutoPosition.ts
|
|
7045
|
-
var
|
|
7132
|
+
var import_react12 = __toESM(require("react"), 1);
|
|
7046
7133
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
7047
|
-
const [position, setPosition] =
|
|
7134
|
+
const [position, setPosition] = import_react12.default.useState({
|
|
7048
7135
|
position: {},
|
|
7049
7136
|
direction: "bottom"
|
|
7050
7137
|
});
|
|
7051
|
-
const calculatePosition =
|
|
7138
|
+
const calculatePosition = import_react12.default.useCallback(() => {
|
|
7052
7139
|
if (!triggerRef.current || !popRef.current) return;
|
|
7053
7140
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
7054
7141
|
const popRect = popRef.current.getBoundingClientRect();
|
|
@@ -7070,7 +7157,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
7070
7157
|
direction
|
|
7071
7158
|
});
|
|
7072
7159
|
}, [triggerRef, popRef]);
|
|
7073
|
-
|
|
7160
|
+
import_react12.default.useEffect(() => {
|
|
7074
7161
|
calculatePosition();
|
|
7075
7162
|
window.addEventListener("resize", calculatePosition);
|
|
7076
7163
|
return () => window.removeEventListener("resize", calculatePosition);
|
|
@@ -7080,9 +7167,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
7080
7167
|
var useAutoPosition_default = useAutoPosition;
|
|
7081
7168
|
|
|
7082
7169
|
// src/tokens/hooks/useClickOutside.ts
|
|
7083
|
-
var
|
|
7170
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
7084
7171
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
7085
|
-
|
|
7172
|
+
import_react13.default.useEffect(() => {
|
|
7086
7173
|
if (!enabled) return;
|
|
7087
7174
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
7088
7175
|
const listener = (event) => {
|
|
@@ -7105,17 +7192,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
7105
7192
|
var useClickOutside_default = useClickOutside;
|
|
7106
7193
|
|
|
7107
7194
|
// src/components/Dropdown/Dropdown.tsx
|
|
7108
|
-
var
|
|
7195
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
7109
7196
|
var Dropdown = (props) => {
|
|
7110
7197
|
const { items, children, className } = props;
|
|
7111
|
-
const [isOpen, setIsOpen] =
|
|
7112
|
-
const [mounted, setMounted] =
|
|
7113
|
-
const [visible, setVisible] =
|
|
7114
|
-
const triggerRef =
|
|
7115
|
-
const menuRef =
|
|
7198
|
+
const [isOpen, setIsOpen] = import_react14.default.useState(false);
|
|
7199
|
+
const [mounted, setMounted] = import_react14.default.useState(false);
|
|
7200
|
+
const [visible, setVisible] = import_react14.default.useState(false);
|
|
7201
|
+
const triggerRef = import_react14.default.useRef(null);
|
|
7202
|
+
const menuRef = import_react14.default.useRef(null);
|
|
7116
7203
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
|
|
7117
7204
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
|
|
7118
|
-
|
|
7205
|
+
import_react14.default.useEffect(() => {
|
|
7119
7206
|
if (isOpen) {
|
|
7120
7207
|
setMounted(true);
|
|
7121
7208
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7130,8 +7217,8 @@ var Dropdown = (props) => {
|
|
|
7130
7217
|
item.onClick?.();
|
|
7131
7218
|
setIsOpen(false);
|
|
7132
7219
|
};
|
|
7133
|
-
return /* @__PURE__ */ (0,
|
|
7134
|
-
/* @__PURE__ */ (0,
|
|
7220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: clsx_default("lib-xplat-dropdown", className), children: [
|
|
7221
|
+
/* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7135
7222
|
"div",
|
|
7136
7223
|
{
|
|
7137
7224
|
ref: triggerRef,
|
|
@@ -7140,14 +7227,14 @@ var Dropdown = (props) => {
|
|
|
7140
7227
|
children
|
|
7141
7228
|
}
|
|
7142
7229
|
),
|
|
7143
|
-
mounted && /* @__PURE__ */ (0,
|
|
7230
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7144
7231
|
"div",
|
|
7145
7232
|
{
|
|
7146
7233
|
ref: menuRef,
|
|
7147
7234
|
className: clsx_default("dropdown-menu", direction, { visible }),
|
|
7148
7235
|
style: { top: position.top, left: position.left },
|
|
7149
7236
|
role: "menu",
|
|
7150
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
7237
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7151
7238
|
"button",
|
|
7152
7239
|
{
|
|
7153
7240
|
className: clsx_default("dropdown-item", {
|
|
@@ -7169,23 +7256,23 @@ Dropdown.displayName = "Dropdown";
|
|
|
7169
7256
|
var Dropdown_default = Dropdown;
|
|
7170
7257
|
|
|
7171
7258
|
// src/components/EmptyState/EmptyState.tsx
|
|
7172
|
-
var
|
|
7259
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
7173
7260
|
var EmptyState = (props) => {
|
|
7174
7261
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action, className } = props;
|
|
7175
|
-
return /* @__PURE__ */ (0,
|
|
7176
|
-
icon && /* @__PURE__ */ (0,
|
|
7177
|
-
!icon && /* @__PURE__ */ (0,
|
|
7178
|
-
/* @__PURE__ */ (0,
|
|
7179
|
-
description && /* @__PURE__ */ (0,
|
|
7180
|
-
action && /* @__PURE__ */ (0,
|
|
7262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: clsx_default("lib-xplat-empty-state", className), children: [
|
|
7263
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "empty-icon", children: icon }),
|
|
7264
|
+
!icon && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("path", { d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" }) }) }),
|
|
7265
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)("p", { className: "empty-title", children: title }),
|
|
7266
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("p", { className: "empty-description", children: description }),
|
|
7267
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "empty-action", children: action })
|
|
7181
7268
|
] });
|
|
7182
7269
|
};
|
|
7183
7270
|
EmptyState.displayName = "EmptyState";
|
|
7184
7271
|
var EmptyState_default = EmptyState;
|
|
7185
7272
|
|
|
7186
7273
|
// src/components/FileUpload/FileUpload.tsx
|
|
7187
|
-
var
|
|
7188
|
-
var
|
|
7274
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
7275
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
7189
7276
|
var FileUpload = (props) => {
|
|
7190
7277
|
const {
|
|
7191
7278
|
accept,
|
|
@@ -7196,8 +7283,8 @@ var FileUpload = (props) => {
|
|
|
7196
7283
|
description,
|
|
7197
7284
|
className
|
|
7198
7285
|
} = props;
|
|
7199
|
-
const [isDragOver, setIsDragOver] =
|
|
7200
|
-
const inputRef =
|
|
7286
|
+
const [isDragOver, setIsDragOver] = import_react15.default.useState(false);
|
|
7287
|
+
const inputRef = import_react15.default.useRef(null);
|
|
7201
7288
|
const handleFiles = (fileList) => {
|
|
7202
7289
|
let files = Array.from(fileList);
|
|
7203
7290
|
if (maxSize) {
|
|
@@ -7227,7 +7314,7 @@ var FileUpload = (props) => {
|
|
|
7227
7314
|
handleFiles(e.target.files);
|
|
7228
7315
|
}
|
|
7229
7316
|
};
|
|
7230
|
-
return /* @__PURE__ */ (0,
|
|
7317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
|
|
7231
7318
|
"div",
|
|
7232
7319
|
{
|
|
7233
7320
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }, className),
|
|
@@ -7236,7 +7323,7 @@ var FileUpload = (props) => {
|
|
|
7236
7323
|
onDragLeave: handleDragLeave,
|
|
7237
7324
|
onClick: () => inputRef.current?.click(),
|
|
7238
7325
|
children: [
|
|
7239
|
-
/* @__PURE__ */ (0,
|
|
7326
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
7240
7327
|
"input",
|
|
7241
7328
|
{
|
|
7242
7329
|
ref: inputRef,
|
|
@@ -7246,9 +7333,9 @@ var FileUpload = (props) => {
|
|
|
7246
7333
|
onChange: handleChange
|
|
7247
7334
|
}
|
|
7248
7335
|
),
|
|
7249
|
-
/* @__PURE__ */ (0,
|
|
7250
|
-
/* @__PURE__ */ (0,
|
|
7251
|
-
description && /* @__PURE__ */ (0,
|
|
7336
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(UploadIcon_default, {}) }),
|
|
7337
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "upload-label", children: label }),
|
|
7338
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "upload-description", children: description })
|
|
7252
7339
|
]
|
|
7253
7340
|
}
|
|
7254
7341
|
);
|
|
@@ -7257,19 +7344,19 @@ FileUpload.displayName = "FileUpload";
|
|
|
7257
7344
|
var FileUpload_default = FileUpload;
|
|
7258
7345
|
|
|
7259
7346
|
// src/components/Select/Select.tsx
|
|
7260
|
-
var
|
|
7347
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
7261
7348
|
|
|
7262
7349
|
// src/components/Select/context.ts
|
|
7263
|
-
var
|
|
7264
|
-
var SelectContext =
|
|
7350
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
7351
|
+
var SelectContext = import_react16.default.createContext(null);
|
|
7265
7352
|
var context_default = SelectContext;
|
|
7266
7353
|
|
|
7267
7354
|
// src/components/Select/SelectItem.tsx
|
|
7268
|
-
var
|
|
7269
|
-
var
|
|
7355
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
7356
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
7270
7357
|
var SelectItem = (props) => {
|
|
7271
7358
|
const { children, value, onClick, disabled = false, className } = props;
|
|
7272
|
-
const ctx =
|
|
7359
|
+
const ctx = import_react17.default.useContext(context_default);
|
|
7273
7360
|
const handleClick = (e) => {
|
|
7274
7361
|
e.preventDefault();
|
|
7275
7362
|
e.stopPropagation();
|
|
@@ -7278,7 +7365,7 @@ var SelectItem = (props) => {
|
|
|
7278
7365
|
ctx?.close();
|
|
7279
7366
|
onClick?.();
|
|
7280
7367
|
};
|
|
7281
|
-
return /* @__PURE__ */ (0,
|
|
7368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
7282
7369
|
"div",
|
|
7283
7370
|
{
|
|
7284
7371
|
className: clsx_default("select-item", disabled && "disabled", className),
|
|
@@ -7299,7 +7386,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
7299
7386
|
var SelectItem_default = SelectItem;
|
|
7300
7387
|
|
|
7301
7388
|
// src/components/Select/Select.tsx
|
|
7302
|
-
var
|
|
7389
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
7303
7390
|
var ANIMATION_DURATION_MS3 = 200;
|
|
7304
7391
|
var SelectRoot = (props) => {
|
|
7305
7392
|
const {
|
|
@@ -7308,28 +7395,29 @@ var SelectRoot = (props) => {
|
|
|
7308
7395
|
onChange,
|
|
7309
7396
|
children,
|
|
7310
7397
|
disabled = false,
|
|
7311
|
-
error = false
|
|
7398
|
+
error = false,
|
|
7399
|
+
size = "md"
|
|
7312
7400
|
} = props;
|
|
7313
|
-
const itemChildren =
|
|
7314
|
-
(child) =>
|
|
7401
|
+
const itemChildren = import_react18.default.Children.toArray(children).filter(
|
|
7402
|
+
(child) => import_react18.default.isValidElement(child) && child.type === SelectItem_default
|
|
7315
7403
|
);
|
|
7316
7404
|
const isControlled = valueProp !== void 0;
|
|
7317
|
-
const [isOpen, setOpen] =
|
|
7318
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
7319
|
-
const controlledLabel =
|
|
7405
|
+
const [isOpen, setOpen] = import_react18.default.useState(false);
|
|
7406
|
+
const [uncontrolledLabel, setUncontrolledLabel] = import_react18.default.useState(null);
|
|
7407
|
+
const controlledLabel = import_react18.default.useMemo(() => {
|
|
7320
7408
|
if (!isControlled) return null;
|
|
7321
7409
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
7322
7410
|
return match ? match.props.children : null;
|
|
7323
7411
|
}, [isControlled, valueProp, itemChildren]);
|
|
7324
7412
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
7325
|
-
const triggerRef =
|
|
7326
|
-
const contentRef =
|
|
7327
|
-
const [mounted, setMounted] =
|
|
7328
|
-
const [visible, setVisible] =
|
|
7329
|
-
|
|
7413
|
+
const triggerRef = import_react18.default.useRef(null);
|
|
7414
|
+
const contentRef = import_react18.default.useRef(null);
|
|
7415
|
+
const [mounted, setMounted] = import_react18.default.useState(false);
|
|
7416
|
+
const [visible, setVisible] = import_react18.default.useState(false);
|
|
7417
|
+
import_react18.default.useEffect(() => {
|
|
7330
7418
|
if (disabled && isOpen) setOpen(false);
|
|
7331
7419
|
}, [disabled, isOpen]);
|
|
7332
|
-
|
|
7420
|
+
import_react18.default.useEffect(() => {
|
|
7333
7421
|
if (isOpen) {
|
|
7334
7422
|
setMounted(true);
|
|
7335
7423
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7339,12 +7427,12 @@ var SelectRoot = (props) => {
|
|
|
7339
7427
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
7340
7428
|
return () => clearTimeout(t);
|
|
7341
7429
|
}, [isOpen]);
|
|
7342
|
-
const open =
|
|
7343
|
-
const close =
|
|
7344
|
-
const toggle =
|
|
7430
|
+
const open = import_react18.default.useCallback(() => setOpen(true), []);
|
|
7431
|
+
const close = import_react18.default.useCallback(() => setOpen(false), []);
|
|
7432
|
+
const toggle = import_react18.default.useCallback(() => setOpen((prev) => !prev), []);
|
|
7345
7433
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
7346
7434
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
7347
|
-
const setSelected =
|
|
7435
|
+
const setSelected = import_react18.default.useCallback(
|
|
7348
7436
|
(label, itemValue) => {
|
|
7349
7437
|
if (!isControlled) {
|
|
7350
7438
|
setUncontrolledLabel(label);
|
|
@@ -7353,7 +7441,7 @@ var SelectRoot = (props) => {
|
|
|
7353
7441
|
},
|
|
7354
7442
|
[isControlled, onChange]
|
|
7355
7443
|
);
|
|
7356
|
-
const ctxValue =
|
|
7444
|
+
const ctxValue = import_react18.default.useMemo(
|
|
7357
7445
|
() => ({
|
|
7358
7446
|
isOpen,
|
|
7359
7447
|
mounted,
|
|
@@ -7374,17 +7462,18 @@ var SelectRoot = (props) => {
|
|
|
7374
7462
|
if (disabled) return;
|
|
7375
7463
|
toggle();
|
|
7376
7464
|
};
|
|
7377
|
-
return /* @__PURE__ */ (0,
|
|
7465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
|
|
7378
7466
|
"div",
|
|
7379
7467
|
{
|
|
7380
7468
|
className: clsx_default(
|
|
7381
7469
|
"lib-xplat-select",
|
|
7470
|
+
size,
|
|
7382
7471
|
disabled && "disabled",
|
|
7383
7472
|
error && "error",
|
|
7384
7473
|
mounted && "is-open"
|
|
7385
7474
|
),
|
|
7386
7475
|
children: [
|
|
7387
|
-
/* @__PURE__ */ (0,
|
|
7476
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
|
|
7388
7477
|
"div",
|
|
7389
7478
|
{
|
|
7390
7479
|
ref: triggerRef,
|
|
@@ -7408,7 +7497,7 @@ var SelectRoot = (props) => {
|
|
|
7408
7497
|
}
|
|
7409
7498
|
},
|
|
7410
7499
|
children: [
|
|
7411
|
-
/* @__PURE__ */ (0,
|
|
7500
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
|
|
7412
7501
|
"span",
|
|
7413
7502
|
{
|
|
7414
7503
|
className: clsx_default(
|
|
@@ -7418,18 +7507,18 @@ var SelectRoot = (props) => {
|
|
|
7418
7507
|
children: selectedLabel ?? placeholder
|
|
7419
7508
|
}
|
|
7420
7509
|
),
|
|
7421
|
-
/* @__PURE__ */ (0,
|
|
7510
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
|
|
7422
7511
|
"span",
|
|
7423
7512
|
{
|
|
7424
7513
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
7425
7514
|
"aria-hidden": true,
|
|
7426
|
-
children: /* @__PURE__ */ (0,
|
|
7515
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(ChevronDownIcon_default, {})
|
|
7427
7516
|
}
|
|
7428
7517
|
)
|
|
7429
7518
|
]
|
|
7430
7519
|
}
|
|
7431
7520
|
),
|
|
7432
|
-
mounted && /* @__PURE__ */ (0,
|
|
7521
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
|
|
7433
7522
|
"div",
|
|
7434
7523
|
{
|
|
7435
7524
|
className: clsx_default("select-content", position.direction, stateClass),
|
|
@@ -7450,10 +7539,10 @@ var Select = Object.assign(SelectRoot, {
|
|
|
7450
7539
|
var Select_default = Select;
|
|
7451
7540
|
|
|
7452
7541
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7453
|
-
var
|
|
7542
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
7454
7543
|
|
|
7455
7544
|
// src/components/HtmlTypeWriter/utils.ts
|
|
7456
|
-
var
|
|
7545
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
7457
7546
|
var voidTags = /* @__PURE__ */ new Set([
|
|
7458
7547
|
"br",
|
|
7459
7548
|
"img",
|
|
@@ -7521,40 +7610,40 @@ function convertNodeToReactWithRange(node, typedLen, rangeMap) {
|
|
|
7521
7610
|
props[attr.name] = attr.value;
|
|
7522
7611
|
});
|
|
7523
7612
|
if (voidTags.has(tag)) {
|
|
7524
|
-
return
|
|
7613
|
+
return import_react19.default.createElement(tag, props);
|
|
7525
7614
|
}
|
|
7526
7615
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
7527
|
-
return
|
|
7616
|
+
return import_react19.default.createElement(tag, props, ...children);
|
|
7528
7617
|
}
|
|
7529
7618
|
function htmlToReactProgressive(root, typedLen, rangeMap) {
|
|
7530
7619
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
7531
7620
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
7532
|
-
return node == null ? null :
|
|
7621
|
+
return node == null ? null : import_react19.default.createElement(import_react19.default.Fragment, { key: idx }, node);
|
|
7533
7622
|
}).filter(Boolean);
|
|
7534
7623
|
return nodes.length === 0 ? null : nodes;
|
|
7535
7624
|
}
|
|
7536
7625
|
|
|
7537
7626
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7538
|
-
var
|
|
7627
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
7539
7628
|
var HtmlTypeWriter = ({
|
|
7540
7629
|
html,
|
|
7541
7630
|
duration = 20,
|
|
7542
7631
|
onDone,
|
|
7543
7632
|
onChange
|
|
7544
7633
|
}) => {
|
|
7545
|
-
const [typedLen, setTypedLen] =
|
|
7546
|
-
const doneCalledRef =
|
|
7547
|
-
const { doc, rangeMap, totalLength } =
|
|
7634
|
+
const [typedLen, setTypedLen] = import_react20.default.useState(0);
|
|
7635
|
+
const doneCalledRef = import_react20.default.useRef(false);
|
|
7636
|
+
const { doc, rangeMap, totalLength } = import_react20.default.useMemo(() => {
|
|
7548
7637
|
const decoded = decodeHtmlEntities(html);
|
|
7549
7638
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
7550
7639
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
7551
7640
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
7552
7641
|
}, [html]);
|
|
7553
|
-
|
|
7642
|
+
import_react20.default.useEffect(() => {
|
|
7554
7643
|
setTypedLen(0);
|
|
7555
7644
|
doneCalledRef.current = false;
|
|
7556
7645
|
}, [html]);
|
|
7557
|
-
|
|
7646
|
+
import_react20.default.useEffect(() => {
|
|
7558
7647
|
if (!totalLength) return;
|
|
7559
7648
|
if (typedLen >= totalLength) return;
|
|
7560
7649
|
const timer = window.setInterval(() => {
|
|
@@ -7562,33 +7651,33 @@ var HtmlTypeWriter = ({
|
|
|
7562
7651
|
}, duration);
|
|
7563
7652
|
return () => window.clearInterval(timer);
|
|
7564
7653
|
}, [typedLen, totalLength, duration]);
|
|
7565
|
-
|
|
7654
|
+
import_react20.default.useEffect(() => {
|
|
7566
7655
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
7567
7656
|
onChange?.();
|
|
7568
7657
|
}
|
|
7569
7658
|
}, [typedLen, totalLength, onChange]);
|
|
7570
|
-
|
|
7659
|
+
import_react20.default.useEffect(() => {
|
|
7571
7660
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
7572
7661
|
doneCalledRef.current = true;
|
|
7573
7662
|
onDone?.();
|
|
7574
7663
|
}
|
|
7575
7664
|
}, [typedLen, totalLength, onDone]);
|
|
7576
|
-
const parsed =
|
|
7665
|
+
const parsed = import_react20.default.useMemo(
|
|
7577
7666
|
() => htmlToReactProgressive(doc.body, typedLen, rangeMap),
|
|
7578
7667
|
[doc.body, typedLen, rangeMap]
|
|
7579
7668
|
);
|
|
7580
|
-
return /* @__PURE__ */ (0,
|
|
7669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
7581
7670
|
};
|
|
7582
7671
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
7583
7672
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
7584
7673
|
|
|
7585
7674
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
7586
|
-
var
|
|
7587
|
-
var
|
|
7675
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
7676
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
7588
7677
|
var ImageSelector = (props) => {
|
|
7589
7678
|
const { value, label, onChange } = props;
|
|
7590
|
-
const [previewUrl, setPreviewUrl] =
|
|
7591
|
-
|
|
7679
|
+
const [previewUrl, setPreviewUrl] = import_react21.default.useState();
|
|
7680
|
+
import_react21.default.useEffect(() => {
|
|
7592
7681
|
if (!value) {
|
|
7593
7682
|
setPreviewUrl(void 0);
|
|
7594
7683
|
return;
|
|
@@ -7597,7 +7686,7 @@ var ImageSelector = (props) => {
|
|
|
7597
7686
|
setPreviewUrl(url);
|
|
7598
7687
|
return () => URL.revokeObjectURL(url);
|
|
7599
7688
|
}, [value]);
|
|
7600
|
-
const inputRef =
|
|
7689
|
+
const inputRef = import_react21.default.useRef(null);
|
|
7601
7690
|
const handleFileChange = (e) => {
|
|
7602
7691
|
const selectedFile = e.target.files?.[0];
|
|
7603
7692
|
if (selectedFile) {
|
|
@@ -7610,8 +7699,8 @@ var ImageSelector = (props) => {
|
|
|
7610
7699
|
const handleOpenFileDialog = () => {
|
|
7611
7700
|
inputRef.current?.click();
|
|
7612
7701
|
};
|
|
7613
|
-
return /* @__PURE__ */ (0,
|
|
7614
|
-
/* @__PURE__ */ (0,
|
|
7702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
7703
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
7615
7704
|
"input",
|
|
7616
7705
|
{
|
|
7617
7706
|
type: "file",
|
|
@@ -7621,13 +7710,13 @@ var ImageSelector = (props) => {
|
|
|
7621
7710
|
ref: inputRef
|
|
7622
7711
|
}
|
|
7623
7712
|
),
|
|
7624
|
-
value && /* @__PURE__ */ (0,
|
|
7625
|
-
/* @__PURE__ */ (0,
|
|
7626
|
-
/* @__PURE__ */ (0,
|
|
7713
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: "action-bar", children: [
|
|
7714
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(UploadIcon_default, {}) }),
|
|
7715
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(DeleteIcon_default, {}) })
|
|
7627
7716
|
] }),
|
|
7628
|
-
/* @__PURE__ */ (0,
|
|
7629
|
-
/* @__PURE__ */ (0,
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
7718
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ImageIcon_default, {}) }),
|
|
7719
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
7631
7720
|
] }) })
|
|
7632
7721
|
] });
|
|
7633
7722
|
};
|
|
@@ -7635,7 +7724,7 @@ ImageSelector.displayName = "ImageSelector";
|
|
|
7635
7724
|
var ImageSelector_default = ImageSelector;
|
|
7636
7725
|
|
|
7637
7726
|
// src/components/Pagination/Pagination.tsx
|
|
7638
|
-
var
|
|
7727
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
7639
7728
|
function getPageRange(current, totalPages, siblingCount) {
|
|
7640
7729
|
const totalNumbers = siblingCount * 2 + 5;
|
|
7641
7730
|
if (totalPages <= totalNumbers) {
|
|
@@ -7668,6 +7757,7 @@ var Pagination = (props) => {
|
|
|
7668
7757
|
pageSize = 10,
|
|
7669
7758
|
siblingCount = 1,
|
|
7670
7759
|
onChange,
|
|
7760
|
+
size = "md",
|
|
7671
7761
|
colorNamespace = "xplat",
|
|
7672
7762
|
color = "blue",
|
|
7673
7763
|
colorDepth,
|
|
@@ -7685,19 +7775,19 @@ var Pagination = (props) => {
|
|
|
7685
7775
|
onChange?.(page);
|
|
7686
7776
|
}
|
|
7687
7777
|
};
|
|
7688
|
-
return /* @__PURE__ */ (0,
|
|
7689
|
-
/* @__PURE__ */ (0,
|
|
7778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, className), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
7779
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
7690
7780
|
"button",
|
|
7691
7781
|
{
|
|
7692
7782
|
className: "page-btn prev",
|
|
7693
7783
|
disabled: current <= 1,
|
|
7694
7784
|
onClick: () => handleClick(current - 1),
|
|
7695
7785
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
7696
|
-
children: /* @__PURE__ */ (0,
|
|
7786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(ChevronLeftIcon_default, {})
|
|
7697
7787
|
}
|
|
7698
7788
|
),
|
|
7699
7789
|
pages.map(
|
|
7700
|
-
(page, i) => page === "..." ? /* @__PURE__ */ (0,
|
|
7790
|
+
(page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
7701
7791
|
"button",
|
|
7702
7792
|
{
|
|
7703
7793
|
className: clsx_default("page-btn", colorClass, { active: page === current }),
|
|
@@ -7708,14 +7798,14 @@ var Pagination = (props) => {
|
|
|
7708
7798
|
page
|
|
7709
7799
|
)
|
|
7710
7800
|
),
|
|
7711
|
-
/* @__PURE__ */ (0,
|
|
7801
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
7712
7802
|
"button",
|
|
7713
7803
|
{
|
|
7714
7804
|
className: "page-btn next",
|
|
7715
7805
|
disabled: current >= totalPages,
|
|
7716
7806
|
onClick: () => handleClick(current + 1),
|
|
7717
7807
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
7718
|
-
children: /* @__PURE__ */ (0,
|
|
7808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(ChevronRightIcon_default, {})
|
|
7719
7809
|
}
|
|
7720
7810
|
)
|
|
7721
7811
|
] });
|
|
@@ -7724,17 +7814,17 @@ Pagination.displayName = "Pagination";
|
|
|
7724
7814
|
var Pagination_default = Pagination;
|
|
7725
7815
|
|
|
7726
7816
|
// src/components/PopOver/PopOver.tsx
|
|
7727
|
-
var
|
|
7728
|
-
var
|
|
7817
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
7818
|
+
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
7729
7819
|
var PopOver = (props) => {
|
|
7730
7820
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
7731
|
-
const popRef =
|
|
7732
|
-
const triggerRef =
|
|
7733
|
-
const [localOpen, setLocalOpen] =
|
|
7734
|
-
const [eventTrigger, setEventTrigger] =
|
|
7821
|
+
const popRef = import_react22.default.useRef(null);
|
|
7822
|
+
const triggerRef = import_react22.default.useRef(null);
|
|
7823
|
+
const [localOpen, setLocalOpen] = import_react22.default.useState(false);
|
|
7824
|
+
const [eventTrigger, setEventTrigger] = import_react22.default.useState(false);
|
|
7735
7825
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
7736
7826
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
7737
|
-
|
|
7827
|
+
import_react22.default.useEffect(() => {
|
|
7738
7828
|
if (isOpen) {
|
|
7739
7829
|
setLocalOpen(isOpen);
|
|
7740
7830
|
setTimeout(() => {
|
|
@@ -7747,7 +7837,7 @@ var PopOver = (props) => {
|
|
|
7747
7837
|
}, 200);
|
|
7748
7838
|
}
|
|
7749
7839
|
}, [isOpen]);
|
|
7750
|
-
return /* @__PURE__ */ (0,
|
|
7840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
|
|
7751
7841
|
"div",
|
|
7752
7842
|
{
|
|
7753
7843
|
className: "lib-xplat-pop-over",
|
|
@@ -7757,7 +7847,7 @@ var PopOver = (props) => {
|
|
|
7757
7847
|
},
|
|
7758
7848
|
children: [
|
|
7759
7849
|
children,
|
|
7760
|
-
localOpen && /* @__PURE__ */ (0,
|
|
7850
|
+
localOpen && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
7761
7851
|
"div",
|
|
7762
7852
|
{
|
|
7763
7853
|
className: clsx_default(
|
|
@@ -7780,7 +7870,7 @@ PopOver.displayName = "PopOver";
|
|
|
7780
7870
|
var PopOver_default = PopOver;
|
|
7781
7871
|
|
|
7782
7872
|
// src/components/Progress/Progress.tsx
|
|
7783
|
-
var
|
|
7873
|
+
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
7784
7874
|
var Progress = (props) => {
|
|
7785
7875
|
const {
|
|
7786
7876
|
value,
|
|
@@ -7798,8 +7888,8 @@ var Progress = (props) => {
|
|
|
7798
7888
|
colorDepth ?? 500
|
|
7799
7889
|
);
|
|
7800
7890
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
7801
|
-
return /* @__PURE__ */ (0,
|
|
7802
|
-
/* @__PURE__ */ (0,
|
|
7891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, className), children: [
|
|
7892
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
7803
7893
|
"div",
|
|
7804
7894
|
{
|
|
7805
7895
|
className: "track",
|
|
@@ -7807,7 +7897,7 @@ var Progress = (props) => {
|
|
|
7807
7897
|
"aria-valuenow": value,
|
|
7808
7898
|
"aria-valuemin": 0,
|
|
7809
7899
|
"aria-valuemax": max,
|
|
7810
|
-
children: /* @__PURE__ */ (0,
|
|
7900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
7811
7901
|
"div",
|
|
7812
7902
|
{
|
|
7813
7903
|
className: clsx_default("bar", colorClass),
|
|
@@ -7816,7 +7906,7 @@ var Progress = (props) => {
|
|
|
7816
7906
|
)
|
|
7817
7907
|
}
|
|
7818
7908
|
),
|
|
7819
|
-
showLabel && /* @__PURE__ */ (0,
|
|
7909
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("span", { className: "label", children: [
|
|
7820
7910
|
Math.round(percentage),
|
|
7821
7911
|
"%"
|
|
7822
7912
|
] })
|
|
@@ -7826,17 +7916,17 @@ Progress.displayName = "Progress";
|
|
|
7826
7916
|
var Progress_default = Progress;
|
|
7827
7917
|
|
|
7828
7918
|
// src/components/Radio/RadioGroupContext.tsx
|
|
7829
|
-
var
|
|
7830
|
-
var RadioGroupContext =
|
|
7919
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
7920
|
+
var RadioGroupContext = import_react23.default.createContext(
|
|
7831
7921
|
null
|
|
7832
7922
|
);
|
|
7833
7923
|
var useRadioGroupContext = () => {
|
|
7834
|
-
return
|
|
7924
|
+
return import_react23.default.useContext(RadioGroupContext);
|
|
7835
7925
|
};
|
|
7836
7926
|
var RadioGroupContext_default = RadioGroupContext;
|
|
7837
7927
|
|
|
7838
7928
|
// src/components/Radio/Radio.tsx
|
|
7839
|
-
var
|
|
7929
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
7840
7930
|
var Radio = (props) => {
|
|
7841
7931
|
const {
|
|
7842
7932
|
label,
|
|
@@ -7845,9 +7935,11 @@ var Radio = (props) => {
|
|
|
7845
7935
|
colorNamespace = "xplat",
|
|
7846
7936
|
color = "blue",
|
|
7847
7937
|
colorDepth,
|
|
7938
|
+
size: sizeProp,
|
|
7848
7939
|
...rest
|
|
7849
7940
|
} = props;
|
|
7850
7941
|
const context = useRadioGroupContext();
|
|
7942
|
+
const size = sizeProp ?? context?.size ?? "md";
|
|
7851
7943
|
const isGroup = !!context;
|
|
7852
7944
|
const localChecked = isGroup ? context.value === value : rest.checked ?? false;
|
|
7853
7945
|
const inputProps = context ? { name: context.name, value, onChange: context.onChange } : {
|
|
@@ -7860,17 +7952,18 @@ var Radio = (props) => {
|
|
|
7860
7952
|
color,
|
|
7861
7953
|
colorDepth ?? 500
|
|
7862
7954
|
);
|
|
7863
|
-
return /* @__PURE__ */ (0,
|
|
7955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
7864
7956
|
"label",
|
|
7865
7957
|
{
|
|
7866
7958
|
className: clsx_default(
|
|
7867
7959
|
"lib-xplat-radio",
|
|
7960
|
+
size,
|
|
7868
7961
|
localChecked ? "checked" : void 0,
|
|
7869
7962
|
className
|
|
7870
7963
|
),
|
|
7871
7964
|
children: [
|
|
7872
|
-
/* @__PURE__ */ (0,
|
|
7873
|
-
/* @__PURE__ */ (0,
|
|
7965
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
7966
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
7874
7967
|
"div",
|
|
7875
7968
|
{
|
|
7876
7969
|
className: clsx_default(
|
|
@@ -7878,10 +7971,10 @@ var Radio = (props) => {
|
|
|
7878
7971
|
localChecked ? "checked" : void 0,
|
|
7879
7972
|
colorClass
|
|
7880
7973
|
),
|
|
7881
|
-
children: localChecked && /* @__PURE__ */ (0,
|
|
7974
|
+
children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "inner-circle" })
|
|
7882
7975
|
}
|
|
7883
7976
|
),
|
|
7884
|
-
label && /* @__PURE__ */ (0,
|
|
7977
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("span", { children: label })
|
|
7885
7978
|
]
|
|
7886
7979
|
}
|
|
7887
7980
|
);
|
|
@@ -7890,23 +7983,23 @@ Radio.displayName = "Radio";
|
|
|
7890
7983
|
var Radio_default = Radio;
|
|
7891
7984
|
|
|
7892
7985
|
// src/components/Radio/RadioGroup.tsx
|
|
7893
|
-
var
|
|
7986
|
+
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
7894
7987
|
var RadioGroup = (props) => {
|
|
7895
7988
|
const { children, ...rest } = props;
|
|
7896
|
-
return /* @__PURE__ */ (0,
|
|
7989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(import_jsx_runtime328.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
7897
7990
|
};
|
|
7898
7991
|
RadioGroup.displayName = "RadioGroup";
|
|
7899
7992
|
var RadioGroup_default = RadioGroup;
|
|
7900
7993
|
|
|
7901
7994
|
// src/components/Skeleton/Skeleton.tsx
|
|
7902
|
-
var
|
|
7995
|
+
var import_jsx_runtime329 = require("react/jsx-runtime");
|
|
7903
7996
|
var Skeleton = (props) => {
|
|
7904
7997
|
const { variant = "text", width, height, className } = props;
|
|
7905
7998
|
const style = {
|
|
7906
7999
|
width: typeof width === "number" ? `${width}px` : width,
|
|
7907
8000
|
height: typeof height === "number" ? `${height}px` : height
|
|
7908
8001
|
};
|
|
7909
|
-
return /* @__PURE__ */ (0,
|
|
8002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
|
|
7910
8003
|
"div",
|
|
7911
8004
|
{
|
|
7912
8005
|
className: clsx_default("lib-xplat-skeleton", variant, className),
|
|
@@ -7919,7 +8012,7 @@ Skeleton.displayName = "Skeleton";
|
|
|
7919
8012
|
var Skeleton_default = Skeleton;
|
|
7920
8013
|
|
|
7921
8014
|
// src/components/Spinner/Spinner.tsx
|
|
7922
|
-
var
|
|
8015
|
+
var import_jsx_runtime330 = require("react/jsx-runtime");
|
|
7923
8016
|
var Spinner = (props) => {
|
|
7924
8017
|
const {
|
|
7925
8018
|
size = "md",
|
|
@@ -7933,14 +8026,14 @@ var Spinner = (props) => {
|
|
|
7933
8026
|
color,
|
|
7934
8027
|
colorDepth ?? 500
|
|
7935
8028
|
);
|
|
7936
|
-
return /* @__PURE__ */ (0,
|
|
8029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
|
|
7937
8030
|
"div",
|
|
7938
8031
|
{
|
|
7939
8032
|
className: clsx_default("lib-xplat-spinner", size, colorClass, className),
|
|
7940
8033
|
role: "status",
|
|
7941
8034
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
7942
|
-
children: /* @__PURE__ */ (0,
|
|
7943
|
-
/* @__PURE__ */ (0,
|
|
8035
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
8036
|
+
/* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
|
|
7944
8037
|
"circle",
|
|
7945
8038
|
{
|
|
7946
8039
|
className: "track",
|
|
@@ -7950,7 +8043,7 @@ var Spinner = (props) => {
|
|
|
7950
8043
|
strokeWidth: "3"
|
|
7951
8044
|
}
|
|
7952
8045
|
),
|
|
7953
|
-
/* @__PURE__ */ (0,
|
|
8046
|
+
/* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
|
|
7954
8047
|
"circle",
|
|
7955
8048
|
{
|
|
7956
8049
|
className: "indicator",
|
|
@@ -7969,7 +8062,7 @@ Spinner.displayName = "Spinner";
|
|
|
7969
8062
|
var Spinner_default = Spinner;
|
|
7970
8063
|
|
|
7971
8064
|
// src/components/Steps/Steps.tsx
|
|
7972
|
-
var
|
|
8065
|
+
var import_jsx_runtime331 = require("react/jsx-runtime");
|
|
7973
8066
|
var Steps = (props) => {
|
|
7974
8067
|
const {
|
|
7975
8068
|
items,
|
|
@@ -7984,16 +8077,16 @@ var Steps = (props) => {
|
|
|
7984
8077
|
color,
|
|
7985
8078
|
colorDepth ?? 500
|
|
7986
8079
|
);
|
|
7987
|
-
return /* @__PURE__ */ (0,
|
|
8080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index) => {
|
|
7988
8081
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
7989
|
-
return /* @__PURE__ */ (0,
|
|
7990
|
-
/* @__PURE__ */ (0,
|
|
7991
|
-
/* @__PURE__ */ (0,
|
|
7992
|
-
index < items.length - 1 && /* @__PURE__ */ (0,
|
|
8082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
8083
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("div", { className: "step-indicator", children: [
|
|
8084
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsx)("div", { className: clsx_default("step-circle", colorClass), children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("span", { children: index + 1 }) }),
|
|
8085
|
+
index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("div", { className: clsx_default("step-line", colorClass) })
|
|
7993
8086
|
] }),
|
|
7994
|
-
/* @__PURE__ */ (0,
|
|
7995
|
-
/* @__PURE__ */ (0,
|
|
7996
|
-
item.description && /* @__PURE__ */ (0,
|
|
8087
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("div", { className: "step-content", children: [
|
|
8088
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsx)("span", { className: "step-title", children: item.title }),
|
|
8089
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("span", { className: "step-description", children: item.description })
|
|
7997
8090
|
] })
|
|
7998
8091
|
] }, index);
|
|
7999
8092
|
}) });
|
|
@@ -8002,8 +8095,8 @@ Steps.displayName = "Steps";
|
|
|
8002
8095
|
var Steps_default = Steps;
|
|
8003
8096
|
|
|
8004
8097
|
// src/components/Switch/Switch.tsx
|
|
8005
|
-
var
|
|
8006
|
-
var
|
|
8098
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
8099
|
+
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
8007
8100
|
var KNOB_TRANSITION_MS = 250;
|
|
8008
8101
|
var Switch = (props) => {
|
|
8009
8102
|
const {
|
|
@@ -8016,9 +8109,9 @@ var Switch = (props) => {
|
|
|
8016
8109
|
colorDepth,
|
|
8017
8110
|
className
|
|
8018
8111
|
} = props;
|
|
8019
|
-
const [isAnimating, setIsAnimating] =
|
|
8020
|
-
const timeoutRef =
|
|
8021
|
-
|
|
8112
|
+
const [isAnimating, setIsAnimating] = import_react24.default.useState(false);
|
|
8113
|
+
const timeoutRef = import_react24.default.useRef(null);
|
|
8114
|
+
import_react24.default.useEffect(() => {
|
|
8022
8115
|
return () => {
|
|
8023
8116
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8024
8117
|
};
|
|
@@ -8038,7 +8131,7 @@ var Switch = (props) => {
|
|
|
8038
8131
|
color,
|
|
8039
8132
|
colorDepth ?? 500
|
|
8040
8133
|
);
|
|
8041
|
-
return /* @__PURE__ */ (0,
|
|
8134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
8042
8135
|
"div",
|
|
8043
8136
|
{
|
|
8044
8137
|
className: clsx_default(
|
|
@@ -8052,7 +8145,7 @@ var Switch = (props) => {
|
|
|
8052
8145
|
),
|
|
8053
8146
|
onClick: handleClick,
|
|
8054
8147
|
"aria-disabled": disabled || isAnimating,
|
|
8055
|
-
children: /* @__PURE__ */ (0,
|
|
8148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
8056
8149
|
}
|
|
8057
8150
|
);
|
|
8058
8151
|
};
|
|
@@ -8060,14 +8153,14 @@ Switch.displayName = "Switch";
|
|
|
8060
8153
|
var Switch_default = Switch;
|
|
8061
8154
|
|
|
8062
8155
|
// src/components/Tab/Tab.tsx
|
|
8063
|
-
var
|
|
8156
|
+
var import_react26 = __toESM(require("react"), 1);
|
|
8064
8157
|
|
|
8065
8158
|
// src/components/Tab/TabItem.tsx
|
|
8066
|
-
var
|
|
8067
|
-
var
|
|
8068
|
-
var TabItem =
|
|
8159
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
8160
|
+
var import_jsx_runtime333 = require("react/jsx-runtime");
|
|
8161
|
+
var TabItem = import_react25.default.forwardRef((props, ref) => {
|
|
8069
8162
|
const { isActive, title, onClick } = props;
|
|
8070
|
-
return /* @__PURE__ */ (0,
|
|
8163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
|
|
8071
8164
|
"div",
|
|
8072
8165
|
{
|
|
8073
8166
|
ref,
|
|
@@ -8081,25 +8174,25 @@ TabItem.displayName = "TabItem";
|
|
|
8081
8174
|
var TabItem_default = TabItem;
|
|
8082
8175
|
|
|
8083
8176
|
// src/components/Tab/Tab.tsx
|
|
8084
|
-
var
|
|
8177
|
+
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
8085
8178
|
var Tab = (props) => {
|
|
8086
|
-
const { activeIndex, onChange, tabs, type } = props;
|
|
8087
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
8179
|
+
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
8180
|
+
const [underlineStyle, setUnderlineStyle] = import_react26.default.useState({
|
|
8088
8181
|
left: 0,
|
|
8089
8182
|
width: 0
|
|
8090
8183
|
});
|
|
8091
|
-
const itemRefs =
|
|
8184
|
+
const itemRefs = import_react26.default.useRef([]);
|
|
8092
8185
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
8093
8186
|
onChange(tabItem, tabIdx);
|
|
8094
8187
|
};
|
|
8095
|
-
|
|
8188
|
+
import_react26.default.useEffect(() => {
|
|
8096
8189
|
const el = itemRefs.current[activeIndex];
|
|
8097
8190
|
if (el) {
|
|
8098
8191
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
8099
8192
|
}
|
|
8100
8193
|
}, [activeIndex, tabs.length]);
|
|
8101
|
-
return /* @__PURE__ */ (0,
|
|
8102
|
-
tabs.map((tab, idx) => /* @__PURE__ */ (0,
|
|
8194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
8195
|
+
tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
8103
8196
|
TabItem_default,
|
|
8104
8197
|
{
|
|
8105
8198
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -8111,7 +8204,7 @@ var Tab = (props) => {
|
|
|
8111
8204
|
},
|
|
8112
8205
|
`${tab.value}_${idx}`
|
|
8113
8206
|
)),
|
|
8114
|
-
type === "toggle" && /* @__PURE__ */ (0,
|
|
8207
|
+
type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
8115
8208
|
"div",
|
|
8116
8209
|
{
|
|
8117
8210
|
className: "tab-toggle-underline",
|
|
@@ -8127,17 +8220,17 @@ Tab.displayName = "Tab";
|
|
|
8127
8220
|
var Tab_default = Tab;
|
|
8128
8221
|
|
|
8129
8222
|
// src/components/Table/TableContext.tsx
|
|
8130
|
-
var
|
|
8131
|
-
var TableContext =
|
|
8223
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
8224
|
+
var TableContext = import_react27.default.createContext(null);
|
|
8132
8225
|
var useTableContext = () => {
|
|
8133
|
-
const ctx =
|
|
8226
|
+
const ctx = import_react27.default.useContext(TableContext);
|
|
8134
8227
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
8135
8228
|
return ctx;
|
|
8136
8229
|
};
|
|
8137
8230
|
var TableContext_default = TableContext;
|
|
8138
8231
|
|
|
8139
8232
|
// src/components/Table/Table.tsx
|
|
8140
|
-
var
|
|
8233
|
+
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
8141
8234
|
var Table = (props) => {
|
|
8142
8235
|
const {
|
|
8143
8236
|
className,
|
|
@@ -8147,7 +8240,7 @@ var Table = (props) => {
|
|
|
8147
8240
|
headerSticky = false,
|
|
8148
8241
|
stickyShadow = true
|
|
8149
8242
|
} = props;
|
|
8150
|
-
return /* @__PURE__ */ (0,
|
|
8243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
|
|
8151
8244
|
TableContext_default.Provider,
|
|
8152
8245
|
{
|
|
8153
8246
|
value: {
|
|
@@ -8156,7 +8249,7 @@ var Table = (props) => {
|
|
|
8156
8249
|
headerSticky,
|
|
8157
8250
|
stickyShadow
|
|
8158
8251
|
},
|
|
8159
|
-
children: /* @__PURE__ */ (0,
|
|
8252
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("table", { className: "lib-xplat-table", children })
|
|
8160
8253
|
}
|
|
8161
8254
|
) });
|
|
8162
8255
|
};
|
|
@@ -8164,40 +8257,40 @@ Table.displayName = "Table";
|
|
|
8164
8257
|
var Table_default = Table;
|
|
8165
8258
|
|
|
8166
8259
|
// src/components/Table/TableBody.tsx
|
|
8167
|
-
var
|
|
8260
|
+
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
8168
8261
|
var TableBody = (props) => {
|
|
8169
8262
|
const { children, className } = props;
|
|
8170
|
-
return /* @__PURE__ */ (0,
|
|
8263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("tbody", { className, children });
|
|
8171
8264
|
};
|
|
8172
8265
|
TableBody.displayName = "TableBody";
|
|
8173
8266
|
var TableBody_default = TableBody;
|
|
8174
8267
|
|
|
8175
8268
|
// src/components/Table/TableCell.tsx
|
|
8176
|
-
var
|
|
8269
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
8177
8270
|
|
|
8178
8271
|
// src/components/Table/TableHeadContext.tsx
|
|
8179
|
-
var
|
|
8180
|
-
var TableHeadContext =
|
|
8272
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
8273
|
+
var TableHeadContext = import_react28.default.createContext(
|
|
8181
8274
|
null
|
|
8182
8275
|
);
|
|
8183
8276
|
var useTableHeadContext = () => {
|
|
8184
|
-
const ctx =
|
|
8277
|
+
const ctx = import_react28.default.useContext(TableHeadContext);
|
|
8185
8278
|
return ctx;
|
|
8186
8279
|
};
|
|
8187
8280
|
var TableHeadContext_default = TableHeadContext;
|
|
8188
8281
|
|
|
8189
8282
|
// src/components/Table/TableRowContext.tsx
|
|
8190
|
-
var
|
|
8191
|
-
var TableRowContext =
|
|
8283
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
8284
|
+
var TableRowContext = import_react29.default.createContext(null);
|
|
8192
8285
|
var useTableRowContext = () => {
|
|
8193
|
-
const ctx =
|
|
8286
|
+
const ctx = import_react29.default.useContext(TableRowContext);
|
|
8194
8287
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
8195
8288
|
return ctx;
|
|
8196
8289
|
};
|
|
8197
8290
|
var TableRowContext_default = TableRowContext;
|
|
8198
8291
|
|
|
8199
8292
|
// src/components/Table/TableCell.tsx
|
|
8200
|
-
var
|
|
8293
|
+
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
8201
8294
|
var TableCell = (props) => {
|
|
8202
8295
|
const {
|
|
8203
8296
|
children,
|
|
@@ -8209,9 +8302,9 @@ var TableCell = (props) => {
|
|
|
8209
8302
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
8210
8303
|
const { stickyShadow } = useTableContext();
|
|
8211
8304
|
const headContext = useTableHeadContext();
|
|
8212
|
-
const [left, setLeft] =
|
|
8213
|
-
const cellRef =
|
|
8214
|
-
const calculateLeft =
|
|
8305
|
+
const [left, setLeft] = import_react30.default.useState(0);
|
|
8306
|
+
const cellRef = import_react30.default.useRef(null);
|
|
8307
|
+
const calculateLeft = import_react30.default.useCallback(() => {
|
|
8215
8308
|
if (!cellRef.current) return 0;
|
|
8216
8309
|
let totalLeft = 0;
|
|
8217
8310
|
for (const ref of stickyCells) {
|
|
@@ -8220,7 +8313,7 @@ var TableCell = (props) => {
|
|
|
8220
8313
|
}
|
|
8221
8314
|
return totalLeft;
|
|
8222
8315
|
}, [stickyCells]);
|
|
8223
|
-
|
|
8316
|
+
import_react30.default.useEffect(() => {
|
|
8224
8317
|
if (!isSticky || !cellRef.current) return;
|
|
8225
8318
|
registerStickyCell(cellRef);
|
|
8226
8319
|
setLeft(calculateLeft());
|
|
@@ -8238,7 +8331,7 @@ var TableCell = (props) => {
|
|
|
8238
8331
|
const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
|
|
8239
8332
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
8240
8333
|
const enableHover = headContext && headContext.cellHover;
|
|
8241
|
-
return /* @__PURE__ */ (0,
|
|
8334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
8242
8335
|
CellTag,
|
|
8243
8336
|
{
|
|
8244
8337
|
ref: cellRef,
|
|
@@ -8260,21 +8353,21 @@ TableCell.displayName = "TableCell";
|
|
|
8260
8353
|
var TableCell_default = TableCell;
|
|
8261
8354
|
|
|
8262
8355
|
// src/components/Table/TableHead.tsx
|
|
8263
|
-
var
|
|
8356
|
+
var import_jsx_runtime338 = require("react/jsx-runtime");
|
|
8264
8357
|
var TableHead = ({
|
|
8265
8358
|
children,
|
|
8266
8359
|
className = "",
|
|
8267
8360
|
cellHover = false
|
|
8268
8361
|
}) => {
|
|
8269
8362
|
const { headerSticky } = useTableContext();
|
|
8270
|
-
return /* @__PURE__ */ (0,
|
|
8363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
|
|
8271
8364
|
};
|
|
8272
8365
|
TableHead.displayName = "TableHead";
|
|
8273
8366
|
var TableHead_default = TableHead;
|
|
8274
8367
|
|
|
8275
8368
|
// src/components/Table/TableRow.tsx
|
|
8276
|
-
var
|
|
8277
|
-
var
|
|
8369
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
8370
|
+
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
8278
8371
|
var TableRow = (props) => {
|
|
8279
8372
|
const {
|
|
8280
8373
|
children,
|
|
@@ -8287,7 +8380,7 @@ var TableRow = (props) => {
|
|
|
8287
8380
|
onClick
|
|
8288
8381
|
} = props;
|
|
8289
8382
|
const { rowBorderUse } = useTableContext();
|
|
8290
|
-
const [stickyCells, setStickyCells] =
|
|
8383
|
+
const [stickyCells, setStickyCells] = import_react31.default.useState([]);
|
|
8291
8384
|
const registerStickyCell = (ref) => {
|
|
8292
8385
|
setStickyCells((prev) => {
|
|
8293
8386
|
if (prev.includes(ref)) return prev;
|
|
@@ -8299,7 +8392,7 @@ var TableRow = (props) => {
|
|
|
8299
8392
|
color,
|
|
8300
8393
|
colorDepth ?? 500
|
|
8301
8394
|
);
|
|
8302
|
-
return /* @__PURE__ */ (0,
|
|
8395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
8303
8396
|
"tr",
|
|
8304
8397
|
{
|
|
8305
8398
|
className: clsx_default(
|
|
@@ -8319,11 +8412,12 @@ TableRow.displayName = "TableRow";
|
|
|
8319
8412
|
var TableRow_default = TableRow;
|
|
8320
8413
|
|
|
8321
8414
|
// src/components/Tag/Tag.tsx
|
|
8322
|
-
var
|
|
8415
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
8323
8416
|
var Tag = (props) => {
|
|
8324
8417
|
const {
|
|
8325
8418
|
children,
|
|
8326
8419
|
onClose,
|
|
8420
|
+
size = "md",
|
|
8327
8421
|
colorNamespace = "xplat",
|
|
8328
8422
|
color = "neutral",
|
|
8329
8423
|
colorDepth,
|
|
@@ -8334,21 +8428,21 @@ var Tag = (props) => {
|
|
|
8334
8428
|
color,
|
|
8335
8429
|
colorDepth ?? 500
|
|
8336
8430
|
);
|
|
8337
|
-
return /* @__PURE__ */ (0,
|
|
8338
|
-
/* @__PURE__ */ (0,
|
|
8339
|
-
onClose && /* @__PURE__ */ (0,
|
|
8431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)("span", { className: clsx_default("lib-xplat-tag", size, colorClass, className), children: [
|
|
8432
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)("span", { className: "tag-label", children }),
|
|
8433
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(XIcon_default, {}) })
|
|
8340
8434
|
] });
|
|
8341
8435
|
};
|
|
8342
8436
|
Tag.displayName = "Tag";
|
|
8343
8437
|
var Tag_default = Tag;
|
|
8344
8438
|
|
|
8345
8439
|
// src/components/TextArea/TextArea.tsx
|
|
8346
|
-
var
|
|
8347
|
-
var
|
|
8348
|
-
var TextArea =
|
|
8440
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
8441
|
+
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
8442
|
+
var TextArea = import_react32.default.forwardRef(
|
|
8349
8443
|
(props, ref) => {
|
|
8350
8444
|
const { value, onChange, className, disabled, ...textareaProps } = props;
|
|
8351
|
-
const localRef =
|
|
8445
|
+
const localRef = import_react32.default.useRef(null);
|
|
8352
8446
|
const setRefs = (el) => {
|
|
8353
8447
|
localRef.current = el;
|
|
8354
8448
|
if (!ref) return;
|
|
@@ -8368,21 +8462,21 @@ var TextArea = import_react31.default.forwardRef(
|
|
|
8368
8462
|
onChange(event);
|
|
8369
8463
|
}
|
|
8370
8464
|
};
|
|
8371
|
-
|
|
8465
|
+
import_react32.default.useEffect(() => {
|
|
8372
8466
|
const el = localRef.current;
|
|
8373
8467
|
if (!el) return;
|
|
8374
8468
|
el.style.height = "0px";
|
|
8375
8469
|
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
8376
8470
|
el.style.height = `${nextHeight}px`;
|
|
8377
8471
|
}, [value]);
|
|
8378
|
-
return /* @__PURE__ */ (0,
|
|
8472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
8379
8473
|
"div",
|
|
8380
8474
|
{
|
|
8381
8475
|
className: clsx_default(
|
|
8382
8476
|
"lib-xplat-textarea",
|
|
8383
8477
|
disabled ? "disabled" : void 0
|
|
8384
8478
|
),
|
|
8385
|
-
children: /* @__PURE__ */ (0,
|
|
8479
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
8386
8480
|
"textarea",
|
|
8387
8481
|
{
|
|
8388
8482
|
...textareaProps,
|
|
@@ -8400,25 +8494,25 @@ TextArea.displayName = "TextArea";
|
|
|
8400
8494
|
var TextArea_default = TextArea;
|
|
8401
8495
|
|
|
8402
8496
|
// src/components/Toast/Toast.tsx
|
|
8403
|
-
var
|
|
8497
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
8404
8498
|
var import_react_dom3 = require("react-dom");
|
|
8405
|
-
var
|
|
8406
|
-
var ToastContext =
|
|
8499
|
+
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
8500
|
+
var ToastContext = import_react33.default.createContext(null);
|
|
8407
8501
|
var useToast = () => {
|
|
8408
|
-
const ctx =
|
|
8502
|
+
const ctx = import_react33.default.useContext(ToastContext);
|
|
8409
8503
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
8410
8504
|
return ctx;
|
|
8411
8505
|
};
|
|
8412
8506
|
var EXIT_DURATION = 300;
|
|
8413
8507
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
8414
|
-
const ref =
|
|
8415
|
-
const [height, setHeight] =
|
|
8416
|
-
|
|
8508
|
+
const ref = import_react33.default.useRef(null);
|
|
8509
|
+
const [height, setHeight] = import_react33.default.useState(void 0);
|
|
8510
|
+
import_react33.default.useEffect(() => {
|
|
8417
8511
|
if (ref.current && !isExiting) {
|
|
8418
8512
|
setHeight(ref.current.offsetHeight);
|
|
8419
8513
|
}
|
|
8420
8514
|
}, [isExiting]);
|
|
8421
|
-
return /* @__PURE__ */ (0,
|
|
8515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
8422
8516
|
"div",
|
|
8423
8517
|
{
|
|
8424
8518
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -8426,15 +8520,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
8426
8520
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
8427
8521
|
marginBottom: isExiting ? 0 : void 0
|
|
8428
8522
|
},
|
|
8429
|
-
children: /* @__PURE__ */ (0,
|
|
8523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)(
|
|
8430
8524
|
"div",
|
|
8431
8525
|
{
|
|
8432
8526
|
ref,
|
|
8433
8527
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
8434
8528
|
role: "alert",
|
|
8435
8529
|
children: [
|
|
8436
|
-
/* @__PURE__ */ (0,
|
|
8437
|
-
/* @__PURE__ */ (0,
|
|
8530
|
+
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)("span", { className: "message", children: item.message }),
|
|
8531
|
+
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
8438
8532
|
]
|
|
8439
8533
|
}
|
|
8440
8534
|
)
|
|
@@ -8445,13 +8539,13 @@ var ToastProvider = ({
|
|
|
8445
8539
|
children,
|
|
8446
8540
|
position = "top-right"
|
|
8447
8541
|
}) => {
|
|
8448
|
-
const [toasts, setToasts] =
|
|
8449
|
-
const [removing, setRemoving] =
|
|
8450
|
-
const [mounted, setMounted] =
|
|
8451
|
-
|
|
8542
|
+
const [toasts, setToasts] = import_react33.default.useState([]);
|
|
8543
|
+
const [removing, setRemoving] = import_react33.default.useState(/* @__PURE__ */ new Set());
|
|
8544
|
+
const [mounted, setMounted] = import_react33.default.useState(false);
|
|
8545
|
+
import_react33.default.useEffect(() => {
|
|
8452
8546
|
setMounted(true);
|
|
8453
8547
|
}, []);
|
|
8454
|
-
const remove =
|
|
8548
|
+
const remove = import_react33.default.useCallback((id) => {
|
|
8455
8549
|
setRemoving((prev) => new Set(prev).add(id));
|
|
8456
8550
|
setTimeout(() => {
|
|
8457
8551
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -8462,7 +8556,7 @@ var ToastProvider = ({
|
|
|
8462
8556
|
});
|
|
8463
8557
|
}, EXIT_DURATION);
|
|
8464
8558
|
}, []);
|
|
8465
|
-
const toast =
|
|
8559
|
+
const toast = import_react33.default.useCallback(
|
|
8466
8560
|
(type, message, duration = 3e3) => {
|
|
8467
8561
|
const id = `${Date.now()}-${Math.random()}`;
|
|
8468
8562
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -8472,10 +8566,10 @@ var ToastProvider = ({
|
|
|
8472
8566
|
},
|
|
8473
8567
|
[remove]
|
|
8474
8568
|
);
|
|
8475
|
-
return /* @__PURE__ */ (0,
|
|
8569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)(ToastContext.Provider, { value: { toast }, children: [
|
|
8476
8570
|
children,
|
|
8477
8571
|
mounted && (0, import_react_dom3.createPortal)(
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8572
|
+
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
8479
8573
|
ToastItemComponent,
|
|
8480
8574
|
{
|
|
8481
8575
|
item: t,
|
|
@@ -8491,8 +8585,8 @@ var ToastProvider = ({
|
|
|
8491
8585
|
ToastProvider.displayName = "ToastProvider";
|
|
8492
8586
|
|
|
8493
8587
|
// src/components/Tooltip/Tooltip.tsx
|
|
8494
|
-
var
|
|
8495
|
-
var
|
|
8588
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
8589
|
+
var import_jsx_runtime343 = require("react/jsx-runtime");
|
|
8496
8590
|
var Tooltip2 = (props) => {
|
|
8497
8591
|
const {
|
|
8498
8592
|
type = "primary",
|
|
@@ -8502,24 +8596,24 @@ var Tooltip2 = (props) => {
|
|
|
8502
8596
|
description,
|
|
8503
8597
|
children
|
|
8504
8598
|
} = props;
|
|
8505
|
-
const iconRef =
|
|
8599
|
+
const iconRef = import_react34.default.useRef(null);
|
|
8506
8600
|
const colorClass = getColorClass(
|
|
8507
8601
|
colorNamespace,
|
|
8508
8602
|
color,
|
|
8509
8603
|
colorDepth ?? 500
|
|
8510
8604
|
);
|
|
8511
|
-
return /* @__PURE__ */ (0,
|
|
8512
|
-
/* @__PURE__ */ (0,
|
|
8513
|
-
/* @__PURE__ */ (0,
|
|
8605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)("div", { className: "lib-xplat-tooltip", children: [
|
|
8606
|
+
/* @__PURE__ */ (0, import_jsx_runtime343.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
8607
|
+
/* @__PURE__ */ (0, import_jsx_runtime343.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
|
|
8514
8608
|
] });
|
|
8515
8609
|
};
|
|
8516
8610
|
Tooltip2.displayName = "Tooltip";
|
|
8517
8611
|
var Tooltip_default = Tooltip2;
|
|
8518
8612
|
|
|
8519
8613
|
// src/components/Video/Video.tsx
|
|
8520
|
-
var
|
|
8521
|
-
var
|
|
8522
|
-
var Video =
|
|
8614
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
8615
|
+
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
8616
|
+
var Video = import_react35.default.forwardRef((props, ref) => {
|
|
8523
8617
|
const {
|
|
8524
8618
|
src,
|
|
8525
8619
|
poster,
|
|
@@ -8533,10 +8627,10 @@ var Video = import_react34.default.forwardRef((props, ref) => {
|
|
|
8533
8627
|
onPause,
|
|
8534
8628
|
...rest
|
|
8535
8629
|
} = props;
|
|
8536
|
-
const videoRef =
|
|
8537
|
-
const [isPlaying, setIsPlaying] =
|
|
8538
|
-
const [isLoaded, setIsLoaded] =
|
|
8539
|
-
const setRefs =
|
|
8630
|
+
const videoRef = import_react35.default.useRef(null);
|
|
8631
|
+
const [isPlaying, setIsPlaying] = import_react35.default.useState(Boolean(autoPlay));
|
|
8632
|
+
const [isLoaded, setIsLoaded] = import_react35.default.useState(false);
|
|
8633
|
+
const setRefs = import_react35.default.useCallback(
|
|
8540
8634
|
(el) => {
|
|
8541
8635
|
videoRef.current = el;
|
|
8542
8636
|
if (typeof ref === "function") ref(el);
|
|
@@ -8564,7 +8658,7 @@ var Video = import_react34.default.forwardRef((props, ref) => {
|
|
|
8564
8658
|
}
|
|
8565
8659
|
};
|
|
8566
8660
|
const showCustomOverlay = !controls;
|
|
8567
|
-
return /* @__PURE__ */ (0,
|
|
8661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(
|
|
8568
8662
|
"div",
|
|
8569
8663
|
{
|
|
8570
8664
|
className: clsx_default(
|
|
@@ -8573,7 +8667,7 @@ var Video = import_react34.default.forwardRef((props, ref) => {
|
|
|
8573
8667
|
className
|
|
8574
8668
|
),
|
|
8575
8669
|
children: [
|
|
8576
|
-
/* @__PURE__ */ (0,
|
|
8670
|
+
/* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
8577
8671
|
"video",
|
|
8578
8672
|
{
|
|
8579
8673
|
ref: setRefs,
|
|
@@ -8590,7 +8684,7 @@ var Video = import_react34.default.forwardRef((props, ref) => {
|
|
|
8590
8684
|
...rest
|
|
8591
8685
|
}
|
|
8592
8686
|
),
|
|
8593
|
-
showCustomOverlay && /* @__PURE__ */ (0,
|
|
8687
|
+
showCustomOverlay && /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
8594
8688
|
"button",
|
|
8595
8689
|
{
|
|
8596
8690
|
type: "button",
|
|
@@ -8601,7 +8695,7 @@ var Video = import_react34.default.forwardRef((props, ref) => {
|
|
|
8601
8695
|
),
|
|
8602
8696
|
onClick: togglePlay,
|
|
8603
8697
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
8604
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
8698
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("span", { className: "play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(PlayCircleIcon_default, {}) })
|
|
8605
8699
|
}
|
|
8606
8700
|
)
|
|
8607
8701
|
]
|
|
@@ -8612,25 +8706,25 @@ Video.displayName = "Video";
|
|
|
8612
8706
|
var Video_default = Video;
|
|
8613
8707
|
|
|
8614
8708
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
8615
|
-
var
|
|
8709
|
+
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
8616
8710
|
var FullGrid = (props) => {
|
|
8617
8711
|
const { children, className } = props;
|
|
8618
|
-
return /* @__PURE__ */ (0,
|
|
8712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: clsx_default("lib-xplat-full-grid", className), children });
|
|
8619
8713
|
};
|
|
8620
8714
|
FullGrid.displayName = "FullGrid";
|
|
8621
8715
|
var FullGrid_default = FullGrid;
|
|
8622
8716
|
|
|
8623
8717
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
8624
|
-
var
|
|
8718
|
+
var import_jsx_runtime346 = require("react/jsx-runtime");
|
|
8625
8719
|
var FullScreen = (props) => {
|
|
8626
8720
|
const { children, className } = props;
|
|
8627
|
-
return /* @__PURE__ */ (0,
|
|
8721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: clsx_default("lib-xplat-full-screen", className), children });
|
|
8628
8722
|
};
|
|
8629
8723
|
FullScreen.displayName = "FullScreen";
|
|
8630
8724
|
var FullScreen_default = FullScreen;
|
|
8631
8725
|
|
|
8632
8726
|
// src/layout/Grid/Item/Item.tsx
|
|
8633
|
-
var
|
|
8727
|
+
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
8634
8728
|
var calculateSpans = (column) => {
|
|
8635
8729
|
const spans = {};
|
|
8636
8730
|
let inherited = column.default;
|
|
@@ -8647,35 +8741,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
8647
8741
|
Object.entries(spans).forEach(([key, value]) => {
|
|
8648
8742
|
style[`--column-${key}`] = value;
|
|
8649
8743
|
});
|
|
8650
|
-
return /* @__PURE__ */ (0,
|
|
8744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
8651
8745
|
};
|
|
8652
8746
|
GridItem.displayName = "GridItem";
|
|
8653
8747
|
var Item_default = GridItem;
|
|
8654
8748
|
|
|
8655
8749
|
// src/layout/Header/Header.tsx
|
|
8656
|
-
var
|
|
8750
|
+
var import_jsx_runtime348 = require("react/jsx-runtime");
|
|
8657
8751
|
var Header = ({
|
|
8658
8752
|
logo,
|
|
8659
8753
|
centerContent,
|
|
8660
8754
|
rightContent
|
|
8661
8755
|
}) => {
|
|
8662
|
-
return /* @__PURE__ */ (0,
|
|
8663
|
-
/* @__PURE__ */ (0,
|
|
8664
|
-
/* @__PURE__ */ (0,
|
|
8665
|
-
/* @__PURE__ */ (0,
|
|
8756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)("div", { className: "lib-xplat-layout-header", children: [
|
|
8757
|
+
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { children: logo }),
|
|
8758
|
+
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { children: centerContent }),
|
|
8759
|
+
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { children: rightContent })
|
|
8666
8760
|
] });
|
|
8667
8761
|
};
|
|
8668
8762
|
Header.displayName = "Header";
|
|
8669
8763
|
var Header_default = Header;
|
|
8670
8764
|
|
|
8671
8765
|
// src/layout/Layout/Layout.tsx
|
|
8672
|
-
var
|
|
8766
|
+
var import_jsx_runtime349 = require("react/jsx-runtime");
|
|
8673
8767
|
var Layout = (props) => {
|
|
8674
8768
|
const { header, sideBar, children } = props;
|
|
8675
|
-
return /* @__PURE__ */ (0,
|
|
8676
|
-
sideBar && /* @__PURE__ */ (0,
|
|
8677
|
-
/* @__PURE__ */ (0,
|
|
8678
|
-
header && /* @__PURE__ */ (0,
|
|
8769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
8770
|
+
sideBar && /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(import_jsx_runtime349.Fragment, { children: sideBar }),
|
|
8771
|
+
/* @__PURE__ */ (0, import_jsx_runtime349.jsxs)("div", { className: "lib-xplat-layout-content", children: [
|
|
8772
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
8679
8773
|
children
|
|
8680
8774
|
] })
|
|
8681
8775
|
] }) });
|
|
@@ -8684,31 +8778,31 @@ Layout.displayName = "Layout";
|
|
|
8684
8778
|
var Layout_default = Layout;
|
|
8685
8779
|
|
|
8686
8780
|
// src/layout/SideBar/SideBar.tsx
|
|
8687
|
-
var
|
|
8781
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
8688
8782
|
|
|
8689
8783
|
// src/layout/SideBar/SideBarContext.tsx
|
|
8690
|
-
var
|
|
8691
|
-
var SideBarContext =
|
|
8784
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
8785
|
+
var SideBarContext = import_react36.default.createContext(null);
|
|
8692
8786
|
var useSideBarContext = () => {
|
|
8693
|
-
const ctx =
|
|
8787
|
+
const ctx = import_react36.default.useContext(SideBarContext);
|
|
8694
8788
|
if (!ctx) throw new Error("Error");
|
|
8695
8789
|
return ctx;
|
|
8696
8790
|
};
|
|
8697
8791
|
var SideBarContext_default = SideBarContext;
|
|
8698
8792
|
|
|
8699
8793
|
// src/layout/SideBar/SideBar.tsx
|
|
8700
|
-
var
|
|
8794
|
+
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
8701
8795
|
var SideBar = (props) => {
|
|
8702
8796
|
const { children, className } = props;
|
|
8703
|
-
const [isOpen, setIsOpen] =
|
|
8797
|
+
const [isOpen, setIsOpen] = import_react37.default.useState(true);
|
|
8704
8798
|
const handleSwitchSideBar = () => {
|
|
8705
8799
|
setIsOpen((prev) => !prev);
|
|
8706
8800
|
};
|
|
8707
|
-
return /* @__PURE__ */ (0,
|
|
8801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
8708
8802
|
SideBarContext_default.Provider,
|
|
8709
8803
|
{
|
|
8710
8804
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
8711
|
-
children: /* @__PURE__ */ (0,
|
|
8805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
8712
8806
|
"div",
|
|
8713
8807
|
{
|
|
8714
8808
|
className: clsx_default(
|
|
@@ -8784,6 +8878,7 @@ var SideBar_default = SideBar;
|
|
|
8784
8878
|
CameraIcon,
|
|
8785
8879
|
CameraOffIcon,
|
|
8786
8880
|
Card,
|
|
8881
|
+
CardTab,
|
|
8787
8882
|
CastIcon,
|
|
8788
8883
|
Chart,
|
|
8789
8884
|
CheckBox,
|