@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.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import "@x-plat/tokens-default/tokens.css";
|
|
3
|
+
|
|
1
4
|
// src/components/Accordion/Accordion.tsx
|
|
2
5
|
import React from "react";
|
|
3
6
|
|
|
@@ -5469,7 +5472,7 @@ var SuccessIcon = () => /* @__PURE__ */ jsx294(
|
|
|
5469
5472
|
);
|
|
5470
5473
|
var SuccessIcon_default = SuccessIcon;
|
|
5471
5474
|
|
|
5472
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
5475
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
5473
5476
|
function r(e) {
|
|
5474
5477
|
var t, f, n = "";
|
|
5475
5478
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -5520,26 +5523,37 @@ var AccordionItem = ({ item, isOpen, onToggle }) => {
|
|
|
5520
5523
|
] });
|
|
5521
5524
|
};
|
|
5522
5525
|
var Accordion = (props) => {
|
|
5523
|
-
const { items,
|
|
5524
|
-
const
|
|
5525
|
-
|
|
5526
|
+
const { items, className } = props;
|
|
5527
|
+
const isMultiple = props.multiple === true;
|
|
5528
|
+
const controlledKeys = isMultiple ? props.activeKeys : props.activeKey !== void 0 ? props.activeKey !== null ? [props.activeKey] : [] : void 0;
|
|
5529
|
+
const defaultKeys = isMultiple ? props.defaultActiveKeys ?? [] : props.defaultActiveKey ? [props.defaultActiveKey] : [];
|
|
5530
|
+
const isControlled = controlledKeys !== void 0;
|
|
5531
|
+
const [uncontrolledKeys, setUncontrolledKeys] = React.useState(
|
|
5532
|
+
new Set(defaultKeys)
|
|
5526
5533
|
);
|
|
5534
|
+
const currentKeys = isControlled ? new Set(controlledKeys) : uncontrolledKeys;
|
|
5527
5535
|
const toggle = (key) => {
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
}
|
|
5536
|
+
const next = new Set(isMultiple ? currentKeys : []);
|
|
5537
|
+
if (currentKeys.has(key)) {
|
|
5538
|
+
next.delete(key);
|
|
5539
|
+
} else {
|
|
5540
|
+
next.add(key);
|
|
5541
|
+
}
|
|
5542
|
+
if (!isControlled) {
|
|
5543
|
+
setUncontrolledKeys(next);
|
|
5544
|
+
}
|
|
5545
|
+
if (isMultiple) {
|
|
5546
|
+
props.onChange?.([...next]);
|
|
5547
|
+
} else {
|
|
5548
|
+
const first = [...next][0] ?? null;
|
|
5549
|
+
props.onChange?.(first);
|
|
5550
|
+
}
|
|
5537
5551
|
};
|
|
5538
5552
|
return /* @__PURE__ */ jsx295("div", { className: clsx_default("lib-xplat-accordion", className), children: items.map((item) => /* @__PURE__ */ jsx295(
|
|
5539
5553
|
AccordionItem,
|
|
5540
5554
|
{
|
|
5541
5555
|
item,
|
|
5542
|
-
isOpen:
|
|
5556
|
+
isOpen: currentKeys.has(item.key),
|
|
5543
5557
|
onToggle: () => toggle(item.key)
|
|
5544
5558
|
},
|
|
5545
5559
|
item.key
|
|
@@ -5734,6 +5748,7 @@ var Badge = (props) => {
|
|
|
5734
5748
|
count,
|
|
5735
5749
|
maxCount = 99,
|
|
5736
5750
|
dot = false,
|
|
5751
|
+
size = "md",
|
|
5737
5752
|
colorNamespace = "xplat",
|
|
5738
5753
|
color = "red",
|
|
5739
5754
|
colorDepth,
|
|
@@ -5746,7 +5761,7 @@ var Badge = (props) => {
|
|
|
5746
5761
|
);
|
|
5747
5762
|
const showBadge = dot || count !== void 0 && count > 0;
|
|
5748
5763
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
5749
|
-
return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-badge", className), children: [
|
|
5764
|
+
return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-badge", size, className), children: [
|
|
5750
5765
|
children,
|
|
5751
5766
|
showBadge && /* @__PURE__ */ jsx298("span", { className: clsx_default("badge-indicator", colorClass, { dot }), children: !dot && displayCount })
|
|
5752
5767
|
] });
|
|
@@ -5775,6 +5790,7 @@ var Button = (props) => {
|
|
|
5775
5790
|
const {
|
|
5776
5791
|
children,
|
|
5777
5792
|
type = "primary",
|
|
5793
|
+
size = "md",
|
|
5778
5794
|
colorNamespace = "xplat",
|
|
5779
5795
|
color = "black",
|
|
5780
5796
|
colorDepth,
|
|
@@ -5790,7 +5806,7 @@ var Button = (props) => {
|
|
|
5790
5806
|
return /* @__PURE__ */ jsx300(
|
|
5791
5807
|
"button",
|
|
5792
5808
|
{
|
|
5793
|
-
className: clsx_default("lib-xplat-button", type, colorClass, className),
|
|
5809
|
+
className: clsx_default("lib-xplat-button", type, size, colorClass, className),
|
|
5794
5810
|
disabled,
|
|
5795
5811
|
...rest,
|
|
5796
5812
|
children
|
|
@@ -5811,8 +5827,77 @@ var Card = ({ children, title, className }) => {
|
|
|
5811
5827
|
Card.displayName = "Card";
|
|
5812
5828
|
var Card_default = Card;
|
|
5813
5829
|
|
|
5814
|
-
// src/components/
|
|
5830
|
+
// src/components/CardTab/CardTab.tsx
|
|
5815
5831
|
import React2 from "react";
|
|
5832
|
+
|
|
5833
|
+
// src/components/CardTab/CardTabPanel.tsx
|
|
5834
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
5835
|
+
var CardTabPanel = (props) => {
|
|
5836
|
+
const { children, columns = 3, className } = props;
|
|
5837
|
+
return /* @__PURE__ */ jsx302(
|
|
5838
|
+
"div",
|
|
5839
|
+
{
|
|
5840
|
+
className: clsx_default("card-tab-panel", className),
|
|
5841
|
+
style: { "--card-tab-columns": columns },
|
|
5842
|
+
children
|
|
5843
|
+
}
|
|
5844
|
+
);
|
|
5845
|
+
};
|
|
5846
|
+
CardTabPanel.displayName = "CardTab.Panel";
|
|
5847
|
+
var CardTabPanel_default = CardTabPanel;
|
|
5848
|
+
|
|
5849
|
+
// src/components/CardTab/CardTab.tsx
|
|
5850
|
+
import { jsx as jsx303, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
5851
|
+
var CardTabRoot = (props) => {
|
|
5852
|
+
const {
|
|
5853
|
+
tabs,
|
|
5854
|
+
activeValue: activeValueProp,
|
|
5855
|
+
onChange,
|
|
5856
|
+
size = "md",
|
|
5857
|
+
children,
|
|
5858
|
+
className
|
|
5859
|
+
} = props;
|
|
5860
|
+
const isControlled = activeValueProp !== void 0;
|
|
5861
|
+
const [uncontrolledValue, setUncontrolledValue] = React2.useState(tabs[0]?.value ?? "");
|
|
5862
|
+
const activeValue = isControlled ? activeValueProp : uncontrolledValue;
|
|
5863
|
+
const handleTabClick = (tab) => {
|
|
5864
|
+
if (!isControlled) {
|
|
5865
|
+
setUncontrolledValue(tab.value);
|
|
5866
|
+
}
|
|
5867
|
+
onChange?.(tab);
|
|
5868
|
+
};
|
|
5869
|
+
const panels = React2.Children.toArray(children).filter(
|
|
5870
|
+
(child) => React2.isValidElement(child) && child.type === CardTabPanel_default
|
|
5871
|
+
);
|
|
5872
|
+
const activePanel = panels.find(
|
|
5873
|
+
(panel) => panel.props.value === activeValue
|
|
5874
|
+
);
|
|
5875
|
+
return /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-card-tab", size, className), children: [
|
|
5876
|
+
/* @__PURE__ */ jsx303("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
5877
|
+
const isActive = tab.value === activeValue;
|
|
5878
|
+
return /* @__PURE__ */ jsx303(
|
|
5879
|
+
"button",
|
|
5880
|
+
{
|
|
5881
|
+
className: clsx_default("card-tab-trigger", isActive && "active"),
|
|
5882
|
+
onClick: () => handleTabClick(tab),
|
|
5883
|
+
role: "tab",
|
|
5884
|
+
"aria-selected": isActive,
|
|
5885
|
+
children: tab.title
|
|
5886
|
+
},
|
|
5887
|
+
tab.value
|
|
5888
|
+
);
|
|
5889
|
+
}) }),
|
|
5890
|
+
/* @__PURE__ */ jsx303("div", { className: "card-tab-body", children: activePanel })
|
|
5891
|
+
] });
|
|
5892
|
+
};
|
|
5893
|
+
CardTabRoot.displayName = "CardTab";
|
|
5894
|
+
var CardTab = Object.assign(CardTabRoot, {
|
|
5895
|
+
Panel: CardTabPanel_default
|
|
5896
|
+
});
|
|
5897
|
+
var CardTab_default = CardTab;
|
|
5898
|
+
|
|
5899
|
+
// src/components/Chart/Chart.tsx
|
|
5900
|
+
import React3 from "react";
|
|
5816
5901
|
import {
|
|
5817
5902
|
ArcElement,
|
|
5818
5903
|
BarElement,
|
|
@@ -5955,7 +6040,7 @@ var getIndexColorByPreset = (preset, index) => {
|
|
|
5955
6040
|
};
|
|
5956
6041
|
|
|
5957
6042
|
// src/components/Chart/Chart.tsx
|
|
5958
|
-
import { jsx as
|
|
6043
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
5959
6044
|
ChartJS.register(
|
|
5960
6045
|
CategoryScale,
|
|
5961
6046
|
LinearScale,
|
|
@@ -5970,12 +6055,12 @@ ChartJS.register(
|
|
|
5970
6055
|
);
|
|
5971
6056
|
var Chart = (props) => {
|
|
5972
6057
|
const { type, data, labels } = props;
|
|
5973
|
-
const chartInstanceRef =
|
|
5974
|
-
const containerRef =
|
|
5975
|
-
const chartRef =
|
|
6058
|
+
const chartInstanceRef = React3.useRef(null);
|
|
6059
|
+
const containerRef = React3.useRef(null);
|
|
6060
|
+
const chartRef = React3.useCallback((instance) => {
|
|
5976
6061
|
chartInstanceRef.current = instance ?? null;
|
|
5977
6062
|
}, []);
|
|
5978
|
-
const datasets =
|
|
6063
|
+
const datasets = React3.useMemo(() => {
|
|
5979
6064
|
const pallette = getChartColorPreset(type);
|
|
5980
6065
|
return Object.entries(data).map(([key, values], index) => {
|
|
5981
6066
|
const uniqueColors = getIndexColorByPreset(pallette, index);
|
|
@@ -6029,21 +6114,21 @@ var Chart = (props) => {
|
|
|
6029
6114
|
formatter: (value) => `${value}`
|
|
6030
6115
|
};
|
|
6031
6116
|
}
|
|
6032
|
-
const renderChart =
|
|
6117
|
+
const renderChart = React3.useMemo(() => {
|
|
6033
6118
|
switch (type) {
|
|
6034
6119
|
case "line":
|
|
6035
|
-
return /* @__PURE__ */
|
|
6120
|
+
return /* @__PURE__ */ jsx304(Line, { ref: chartRef, data: chartData, options });
|
|
6036
6121
|
case "bar":
|
|
6037
|
-
return /* @__PURE__ */
|
|
6122
|
+
return /* @__PURE__ */ jsx304(Bar, { ref: chartRef, data: chartData, options });
|
|
6038
6123
|
case "pie":
|
|
6039
|
-
return /* @__PURE__ */
|
|
6124
|
+
return /* @__PURE__ */ jsx304(Pie, { ref: chartRef, data: chartData, options });
|
|
6040
6125
|
case "doughnut":
|
|
6041
|
-
return /* @__PURE__ */
|
|
6126
|
+
return /* @__PURE__ */ jsx304(Doughnut, { ref: chartRef, data: chartData, options });
|
|
6042
6127
|
default:
|
|
6043
6128
|
return null;
|
|
6044
6129
|
}
|
|
6045
6130
|
}, [chartData, options, type]);
|
|
6046
|
-
|
|
6131
|
+
React3.useEffect(() => {
|
|
6047
6132
|
if (!containerRef.current || !chartInstanceRef.current) return;
|
|
6048
6133
|
const observer = new ResizeObserver(() => {
|
|
6049
6134
|
requestAnimationFrame(() => {
|
|
@@ -6053,7 +6138,7 @@ var Chart = (props) => {
|
|
|
6053
6138
|
observer.observe(containerRef.current);
|
|
6054
6139
|
return () => observer.disconnect();
|
|
6055
6140
|
}, []);
|
|
6056
|
-
return /* @__PURE__ */
|
|
6141
|
+
return /* @__PURE__ */ jsx304("div", { className: "lib-xplat-chart", ref: containerRef, children: renderChart });
|
|
6057
6142
|
};
|
|
6058
6143
|
Chart.displayName = "Chart";
|
|
6059
6144
|
var Chart_default = Chart;
|
|
@@ -6072,7 +6157,7 @@ var gridColumns = {
|
|
|
6072
6157
|
};
|
|
6073
6158
|
|
|
6074
6159
|
// src/components/CheckBox/CheckBox.tsx
|
|
6075
|
-
import { jsx as
|
|
6160
|
+
import { jsx as jsx305, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
6076
6161
|
var CheckBox = (props) => {
|
|
6077
6162
|
const {
|
|
6078
6163
|
colorNamespace = "xplat",
|
|
@@ -6083,6 +6168,7 @@ var CheckBox = (props) => {
|
|
|
6083
6168
|
onChange,
|
|
6084
6169
|
className,
|
|
6085
6170
|
disabled,
|
|
6171
|
+
size = "md",
|
|
6086
6172
|
...rest
|
|
6087
6173
|
} = props;
|
|
6088
6174
|
const handleChange = (e) => {
|
|
@@ -6097,8 +6183,8 @@ var CheckBox = (props) => {
|
|
|
6097
6183
|
const checkedClasses = `checked ${mainColor}`;
|
|
6098
6184
|
const disabledClasses = "disabled";
|
|
6099
6185
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
6100
|
-
return /* @__PURE__ */
|
|
6101
|
-
/* @__PURE__ */
|
|
6186
|
+
return /* @__PURE__ */ jsxs195("label", { className: clsx_default("lib-xplat-checkbox", size, className), children: [
|
|
6187
|
+
/* @__PURE__ */ jsx305(
|
|
6102
6188
|
"input",
|
|
6103
6189
|
{
|
|
6104
6190
|
type: "checkbox",
|
|
@@ -6108,15 +6194,15 @@ var CheckBox = (props) => {
|
|
|
6108
6194
|
...rest
|
|
6109
6195
|
}
|
|
6110
6196
|
),
|
|
6111
|
-
/* @__PURE__ */
|
|
6112
|
-
label && /* @__PURE__ */
|
|
6197
|
+
/* @__PURE__ */ jsx305("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ jsx305("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ jsx305(CheckIcon_default, {}) }) }),
|
|
6198
|
+
label && /* @__PURE__ */ jsx305("span", { className: "label", children: label })
|
|
6113
6199
|
] });
|
|
6114
6200
|
};
|
|
6115
6201
|
CheckBox.displayName = "CheckBox";
|
|
6116
6202
|
var CheckBox_default = CheckBox;
|
|
6117
6203
|
|
|
6118
6204
|
// src/components/Chip/Chip.tsx
|
|
6119
|
-
import { jsx as
|
|
6205
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
6120
6206
|
var Chip = (props) => {
|
|
6121
6207
|
const {
|
|
6122
6208
|
children,
|
|
@@ -6124,6 +6210,7 @@ var Chip = (props) => {
|
|
|
6124
6210
|
color = "black",
|
|
6125
6211
|
colorDepth,
|
|
6126
6212
|
type = "primary",
|
|
6213
|
+
size = "md",
|
|
6127
6214
|
className
|
|
6128
6215
|
} = props;
|
|
6129
6216
|
const colorClass = getColorClass(
|
|
@@ -6131,29 +6218,29 @@ var Chip = (props) => {
|
|
|
6131
6218
|
color,
|
|
6132
6219
|
colorDepth ?? 500
|
|
6133
6220
|
);
|
|
6134
|
-
return /* @__PURE__ */
|
|
6221
|
+
return /* @__PURE__ */ jsx306("div", { className: clsx_default("lib-xplat-chip", type, size, colorClass, className), children });
|
|
6135
6222
|
};
|
|
6136
6223
|
Chip.displayName = "Chip";
|
|
6137
6224
|
var Chip_default = Chip;
|
|
6138
6225
|
|
|
6139
6226
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6140
|
-
import
|
|
6227
|
+
import React6 from "react";
|
|
6141
6228
|
|
|
6142
6229
|
// src/components/Input/Input.tsx
|
|
6143
|
-
import
|
|
6230
|
+
import React4 from "react";
|
|
6144
6231
|
|
|
6145
6232
|
// src/components/Input/InputValidations.tsx
|
|
6146
|
-
import { jsx as
|
|
6233
|
+
import { jsx as jsx307, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
6147
6234
|
var InputValidations = (props) => {
|
|
6148
6235
|
const { message, status = "default" } = props;
|
|
6149
|
-
return /* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6151
|
-
status === "default" && /* @__PURE__ */
|
|
6152
|
-
status === "success" && /* @__PURE__ */
|
|
6153
|
-
status === "warning" && /* @__PURE__ */
|
|
6154
|
-
status === "error" && /* @__PURE__ */
|
|
6236
|
+
return /* @__PURE__ */ jsxs196("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
6237
|
+
/* @__PURE__ */ jsxs196("div", { className: "icon", children: [
|
|
6238
|
+
status === "default" && /* @__PURE__ */ jsx307(InfoIcon_default, {}),
|
|
6239
|
+
status === "success" && /* @__PURE__ */ jsx307(SuccessIcon_default, {}),
|
|
6240
|
+
status === "warning" && /* @__PURE__ */ jsx307(InfoIcon_default, {}),
|
|
6241
|
+
status === "error" && /* @__PURE__ */ jsx307(ErrorIcon_default, {})
|
|
6155
6242
|
] }),
|
|
6156
|
-
/* @__PURE__ */
|
|
6243
|
+
/* @__PURE__ */ jsx307("div", { className: "message", children: message })
|
|
6157
6244
|
] });
|
|
6158
6245
|
};
|
|
6159
6246
|
InputValidations.displayName = "InputValidations";
|
|
@@ -6194,7 +6281,7 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
6194
6281
|
};
|
|
6195
6282
|
|
|
6196
6283
|
// src/components/Input/Input.tsx
|
|
6197
|
-
import { jsx as
|
|
6284
|
+
import { jsx as jsx308, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
6198
6285
|
import { createElement } from "react";
|
|
6199
6286
|
var formatValue = (type, value) => {
|
|
6200
6287
|
if (value === null || value === void 0) return "";
|
|
@@ -6243,11 +6330,12 @@ var parseValue = (type, value) => {
|
|
|
6243
6330
|
return value;
|
|
6244
6331
|
}
|
|
6245
6332
|
};
|
|
6246
|
-
var Input =
|
|
6333
|
+
var Input = React4.forwardRef((props, ref) => {
|
|
6247
6334
|
const {
|
|
6248
6335
|
value,
|
|
6249
6336
|
onChange,
|
|
6250
6337
|
type = "text",
|
|
6338
|
+
size = "md",
|
|
6251
6339
|
suffix,
|
|
6252
6340
|
className,
|
|
6253
6341
|
disabled,
|
|
@@ -6269,13 +6357,13 @@ var Input = React3.forwardRef((props, ref) => {
|
|
|
6269
6357
|
onChange(event);
|
|
6270
6358
|
}
|
|
6271
6359
|
};
|
|
6272
|
-
return /* @__PURE__ */
|
|
6273
|
-
/* @__PURE__ */
|
|
6360
|
+
return /* @__PURE__ */ jsxs197("div", { className: clsx_default("lib-xplat-input-wrap", className), children: [
|
|
6361
|
+
/* @__PURE__ */ jsxs197(
|
|
6274
6362
|
"div",
|
|
6275
6363
|
{
|
|
6276
|
-
className: clsx_default("lib-xplat-input", disabled ? "disabled" : void 0),
|
|
6364
|
+
className: clsx_default("lib-xplat-input", size, disabled ? "disabled" : void 0),
|
|
6277
6365
|
children: [
|
|
6278
|
-
/* @__PURE__ */
|
|
6366
|
+
/* @__PURE__ */ jsx308(
|
|
6279
6367
|
"input",
|
|
6280
6368
|
{
|
|
6281
6369
|
...inputProps,
|
|
@@ -6286,11 +6374,11 @@ var Input = React3.forwardRef((props, ref) => {
|
|
|
6286
6374
|
onChange: handleChange
|
|
6287
6375
|
}
|
|
6288
6376
|
),
|
|
6289
|
-
suffix && /* @__PURE__ */
|
|
6377
|
+
suffix && /* @__PURE__ */ jsx308("div", { className: "suffix", children: suffix })
|
|
6290
6378
|
]
|
|
6291
6379
|
}
|
|
6292
6380
|
),
|
|
6293
|
-
validations && /* @__PURE__ */
|
|
6381
|
+
validations && /* @__PURE__ */ jsx308("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ createElement(
|
|
6294
6382
|
InputValidations_default,
|
|
6295
6383
|
{
|
|
6296
6384
|
...validation,
|
|
@@ -6303,20 +6391,20 @@ Input.displayName = "Input";
|
|
|
6303
6391
|
var Input_default = Input;
|
|
6304
6392
|
|
|
6305
6393
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
6306
|
-
import
|
|
6307
|
-
import { jsx as
|
|
6308
|
-
var PasswordInput =
|
|
6394
|
+
import React5 from "react";
|
|
6395
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
6396
|
+
var PasswordInput = React5.forwardRef(
|
|
6309
6397
|
(props, ref) => {
|
|
6310
6398
|
const { reg: _reg, ...inputProps } = props;
|
|
6311
|
-
const [isView, setIsView] =
|
|
6399
|
+
const [isView, setIsView] = React5.useState(false);
|
|
6312
6400
|
const handleChangeView = () => {
|
|
6313
6401
|
setIsView((prev) => !prev);
|
|
6314
6402
|
};
|
|
6315
|
-
return /* @__PURE__ */
|
|
6403
|
+
return /* @__PURE__ */ jsx309(
|
|
6316
6404
|
Input_default,
|
|
6317
6405
|
{
|
|
6318
6406
|
...inputProps,
|
|
6319
|
-
suffix: /* @__PURE__ */
|
|
6407
|
+
suffix: /* @__PURE__ */ jsx309("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ jsx309(OpenEyeIcon_default, {}) : /* @__PURE__ */ jsx309(CloseEyeIcon_default, {}) }),
|
|
6320
6408
|
type: isView ? "text" : "password",
|
|
6321
6409
|
ref
|
|
6322
6410
|
}
|
|
@@ -6329,8 +6417,8 @@ var PasswordInput_default = PasswordInput;
|
|
|
6329
6417
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6330
6418
|
import DatePicker from "react-datepicker";
|
|
6331
6419
|
import "react-datepicker/dist/react-datepicker.css";
|
|
6332
|
-
import { jsx as
|
|
6333
|
-
var Suffix = () => /* @__PURE__ */
|
|
6420
|
+
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
6421
|
+
var Suffix = () => /* @__PURE__ */ jsx310("div", { children: /* @__PURE__ */ jsx310(CalenderIcon_default, {}) });
|
|
6334
6422
|
var InputDatePicker = (props) => {
|
|
6335
6423
|
const { value, onChange, disabled, ...rest } = props;
|
|
6336
6424
|
const handleChange = (date) => {
|
|
@@ -6344,22 +6432,22 @@ var InputDatePicker = (props) => {
|
|
|
6344
6432
|
const d = String(date.getDate()).padStart(2, "0");
|
|
6345
6433
|
return `${y}/${m}/${d}`;
|
|
6346
6434
|
};
|
|
6347
|
-
const CustomInput =
|
|
6435
|
+
const CustomInput = React6.forwardRef(({ onClick }, _ref) => /* @__PURE__ */ jsx310("div", { onClick, children: /* @__PURE__ */ jsx310(
|
|
6348
6436
|
Input_default,
|
|
6349
6437
|
{
|
|
6350
6438
|
value: formatDate(value),
|
|
6351
|
-
suffix: /* @__PURE__ */
|
|
6439
|
+
suffix: /* @__PURE__ */ jsx310(Suffix, {}),
|
|
6352
6440
|
disabled
|
|
6353
6441
|
}
|
|
6354
6442
|
) }));
|
|
6355
6443
|
CustomInput.displayName = "InputDatePickerCustomInput";
|
|
6356
|
-
return /* @__PURE__ */
|
|
6444
|
+
return /* @__PURE__ */ jsx310("div", { className: "lib-xplat-datepicker", children: /* @__PURE__ */ jsx310(
|
|
6357
6445
|
DatePicker,
|
|
6358
6446
|
{
|
|
6359
6447
|
selected: value,
|
|
6360
6448
|
onChange: handleChange,
|
|
6361
6449
|
...rest,
|
|
6362
|
-
customInput: /* @__PURE__ */
|
|
6450
|
+
customInput: /* @__PURE__ */ jsx310(CustomInput, {}),
|
|
6363
6451
|
dateFormat: "YYYY/MM/dd"
|
|
6364
6452
|
}
|
|
6365
6453
|
) });
|
|
@@ -6368,18 +6456,18 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
6368
6456
|
var InputDatePicker_default = InputDatePicker;
|
|
6369
6457
|
|
|
6370
6458
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
6371
|
-
import
|
|
6459
|
+
import React8 from "react";
|
|
6372
6460
|
|
|
6373
6461
|
// src/components/Modal/Modal.tsx
|
|
6374
|
-
import
|
|
6462
|
+
import React7 from "react";
|
|
6375
6463
|
import { createPortal } from "react-dom";
|
|
6376
|
-
import { jsx as
|
|
6464
|
+
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
6377
6465
|
var ANIMATION_DURATION_MS = 200;
|
|
6378
6466
|
var Modal = (props) => {
|
|
6379
6467
|
const { isOpen, onClose, children } = props;
|
|
6380
|
-
const [mounted, setMounted] =
|
|
6381
|
-
const [visible, setVisible] =
|
|
6382
|
-
|
|
6468
|
+
const [mounted, setMounted] = React7.useState(false);
|
|
6469
|
+
const [visible, setVisible] = React7.useState(false);
|
|
6470
|
+
React7.useEffect(() => {
|
|
6383
6471
|
if (isOpen) {
|
|
6384
6472
|
setMounted(true);
|
|
6385
6473
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6393,12 +6481,12 @@ var Modal = (props) => {
|
|
|
6393
6481
|
if (!mounted) return null;
|
|
6394
6482
|
const stateClass = visible ? "enter" : "exit";
|
|
6395
6483
|
return createPortal(
|
|
6396
|
-
/* @__PURE__ */
|
|
6484
|
+
/* @__PURE__ */ jsx311(
|
|
6397
6485
|
"div",
|
|
6398
6486
|
{
|
|
6399
6487
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
6400
6488
|
onClick: onClose,
|
|
6401
|
-
children: /* @__PURE__ */
|
|
6489
|
+
children: /* @__PURE__ */ jsx311(
|
|
6402
6490
|
"div",
|
|
6403
6491
|
{
|
|
6404
6492
|
className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
|
|
@@ -6419,7 +6507,7 @@ var Modal_default = Modal;
|
|
|
6419
6507
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
6420
6508
|
import DatePicker2 from "react-datepicker";
|
|
6421
6509
|
import "react-datepicker/dist/react-datepicker.css";
|
|
6422
|
-
import { jsx as
|
|
6510
|
+
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
6423
6511
|
function getColorValue(ns, color, depth) {
|
|
6424
6512
|
const nsColors = colors[ns];
|
|
6425
6513
|
const colorEntry = nsColors[color];
|
|
@@ -6445,12 +6533,12 @@ var SingleDatePicker = (props) => {
|
|
|
6445
6533
|
color,
|
|
6446
6534
|
colorDepth ?? 500
|
|
6447
6535
|
);
|
|
6448
|
-
return /* @__PURE__ */
|
|
6536
|
+
return /* @__PURE__ */ jsx312(
|
|
6449
6537
|
"div",
|
|
6450
6538
|
{
|
|
6451
6539
|
className: "lib-xplat-datepicker",
|
|
6452
6540
|
style: { "--datepicker-active-color": activeColor },
|
|
6453
|
-
children: /* @__PURE__ */
|
|
6541
|
+
children: /* @__PURE__ */ jsx312(
|
|
6454
6542
|
DatePicker2,
|
|
6455
6543
|
{
|
|
6456
6544
|
selected: value,
|
|
@@ -6467,10 +6555,10 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
6467
6555
|
var SingleDatePicker_default = SingleDatePicker;
|
|
6468
6556
|
|
|
6469
6557
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
6470
|
-
import { jsx as
|
|
6558
|
+
import { jsx as jsx313, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
6471
6559
|
var PopupPicker = (props) => {
|
|
6472
6560
|
const { component, type } = props;
|
|
6473
|
-
const [isOpen, setIsOpen] =
|
|
6561
|
+
const [isOpen, setIsOpen] = React8.useState(false);
|
|
6474
6562
|
const handleClick = () => setIsOpen(true);
|
|
6475
6563
|
const handleClose = () => setIsOpen(false);
|
|
6476
6564
|
const handleSingleChange = (date) => {
|
|
@@ -6478,11 +6566,11 @@ var PopupPicker = (props) => {
|
|
|
6478
6566
|
props.onChange?.(date);
|
|
6479
6567
|
handleClose();
|
|
6480
6568
|
};
|
|
6481
|
-
return /* @__PURE__ */
|
|
6482
|
-
|
|
6483
|
-
/* @__PURE__ */
|
|
6484
|
-
/* @__PURE__ */
|
|
6485
|
-
type === "single" && /* @__PURE__ */
|
|
6569
|
+
return /* @__PURE__ */ jsxs198("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
6570
|
+
React8.cloneElement(component, { onClick: handleClick }),
|
|
6571
|
+
/* @__PURE__ */ jsx313(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs198("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
6572
|
+
/* @__PURE__ */ jsxs198("div", { className: "popup-datepicker-content", children: [
|
|
6573
|
+
type === "single" && /* @__PURE__ */ jsx313(
|
|
6486
6574
|
SingleDatePicker_default,
|
|
6487
6575
|
{
|
|
6488
6576
|
value: props.value,
|
|
@@ -6491,7 +6579,7 @@ var PopupPicker = (props) => {
|
|
|
6491
6579
|
maxDate: props.maxDate
|
|
6492
6580
|
}
|
|
6493
6581
|
),
|
|
6494
|
-
type === "range" && /* @__PURE__ */
|
|
6582
|
+
type === "range" && /* @__PURE__ */ jsx313(
|
|
6495
6583
|
RangePicker_default,
|
|
6496
6584
|
{
|
|
6497
6585
|
startDate: props.startDate,
|
|
@@ -6502,8 +6590,8 @@ var PopupPicker = (props) => {
|
|
|
6502
6590
|
}
|
|
6503
6591
|
)
|
|
6504
6592
|
] }),
|
|
6505
|
-
/* @__PURE__ */
|
|
6506
|
-
/* @__PURE__ */
|
|
6593
|
+
/* @__PURE__ */ jsxs198("div", { className: "popup-datepicker-footer", children: [
|
|
6594
|
+
/* @__PURE__ */ jsx313(
|
|
6507
6595
|
Button_default,
|
|
6508
6596
|
{
|
|
6509
6597
|
type: "secondary",
|
|
@@ -6513,7 +6601,7 @@ var PopupPicker = (props) => {
|
|
|
6513
6601
|
children: "\uCDE8\uC18C"
|
|
6514
6602
|
}
|
|
6515
6603
|
),
|
|
6516
|
-
/* @__PURE__ */
|
|
6604
|
+
/* @__PURE__ */ jsx313(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
|
|
6517
6605
|
] })
|
|
6518
6606
|
] }) })
|
|
6519
6607
|
] });
|
|
@@ -6522,8 +6610,8 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
6522
6610
|
var PopupPicker_default = PopupPicker;
|
|
6523
6611
|
|
|
6524
6612
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
6525
|
-
import
|
|
6526
|
-
import { jsx as
|
|
6613
|
+
import React9 from "react";
|
|
6614
|
+
import { jsx as jsx314, jsxs as jsxs199 } from "react/jsx-runtime";
|
|
6527
6615
|
function getDatesBetween(start, end) {
|
|
6528
6616
|
const dates = [];
|
|
6529
6617
|
const current = new Date(start);
|
|
@@ -6547,7 +6635,7 @@ var RangePicker = (props) => {
|
|
|
6547
6635
|
color,
|
|
6548
6636
|
colorDepth
|
|
6549
6637
|
} = props;
|
|
6550
|
-
const rangeDates =
|
|
6638
|
+
const rangeDates = React9.useMemo(
|
|
6551
6639
|
() => getDatesBetween(startDate, endDate),
|
|
6552
6640
|
[startDate, endDate]
|
|
6553
6641
|
);
|
|
@@ -6556,10 +6644,10 @@ var RangePicker = (props) => {
|
|
|
6556
6644
|
...color !== void 0 && { color },
|
|
6557
6645
|
...colorDepth !== void 0 && { colorDepth }
|
|
6558
6646
|
};
|
|
6559
|
-
return /* @__PURE__ */
|
|
6560
|
-
/* @__PURE__ */
|
|
6561
|
-
/* @__PURE__ */
|
|
6562
|
-
/* @__PURE__ */
|
|
6647
|
+
return /* @__PURE__ */ jsxs199("div", { className: "lib-xplat-range-datepicker", children: [
|
|
6648
|
+
/* @__PURE__ */ jsxs199("div", { className: "lib-xplat-range-datepicker-from", children: [
|
|
6649
|
+
/* @__PURE__ */ jsx314("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
|
|
6650
|
+
/* @__PURE__ */ jsx314(
|
|
6563
6651
|
SingleDatePicker_default,
|
|
6564
6652
|
{
|
|
6565
6653
|
value: startDate,
|
|
@@ -6571,9 +6659,9 @@ var RangePicker = (props) => {
|
|
|
6571
6659
|
}
|
|
6572
6660
|
)
|
|
6573
6661
|
] }),
|
|
6574
|
-
/* @__PURE__ */
|
|
6575
|
-
/* @__PURE__ */
|
|
6576
|
-
/* @__PURE__ */
|
|
6662
|
+
/* @__PURE__ */ jsxs199("div", { className: "lib-xplat-range-datepicker-to", children: [
|
|
6663
|
+
/* @__PURE__ */ jsx314("span", { className: "lib-xplat-range-datepicker-label", children: "\uC885\uB8CC" }),
|
|
6664
|
+
/* @__PURE__ */ jsx314(
|
|
6577
6665
|
SingleDatePicker_default,
|
|
6578
6666
|
{
|
|
6579
6667
|
value: endDate,
|
|
@@ -6591,10 +6679,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
6591
6679
|
var RangePicker_default = RangePicker;
|
|
6592
6680
|
|
|
6593
6681
|
// src/components/Divider/Divider.tsx
|
|
6594
|
-
import { jsx as
|
|
6682
|
+
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
6595
6683
|
var Divider = (props) => {
|
|
6596
6684
|
const { orientation = "horizontal", className } = props;
|
|
6597
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsx315(
|
|
6598
6686
|
"div",
|
|
6599
6687
|
{
|
|
6600
6688
|
className: clsx_default("lib-xplat-divider", orientation, className),
|
|
@@ -6607,15 +6695,15 @@ Divider.displayName = "Divider";
|
|
|
6607
6695
|
var Divider_default = Divider;
|
|
6608
6696
|
|
|
6609
6697
|
// src/components/Drawer/Drawer.tsx
|
|
6610
|
-
import
|
|
6698
|
+
import React10 from "react";
|
|
6611
6699
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6612
|
-
import { jsx as
|
|
6700
|
+
import { jsx as jsx316, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
6613
6701
|
var ANIMATION_DURATION_MS2 = 250;
|
|
6614
6702
|
var Drawer = (props) => {
|
|
6615
6703
|
const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
|
|
6616
|
-
const [mounted, setMounted] =
|
|
6617
|
-
const [visible, setVisible] =
|
|
6618
|
-
|
|
6704
|
+
const [mounted, setMounted] = React10.useState(false);
|
|
6705
|
+
const [visible, setVisible] = React10.useState(false);
|
|
6706
|
+
React10.useEffect(() => {
|
|
6619
6707
|
if (isOpen) {
|
|
6620
6708
|
setMounted(true);
|
|
6621
6709
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6630,12 +6718,12 @@ var Drawer = (props) => {
|
|
|
6630
6718
|
const stateClass = visible ? "enter" : "exit";
|
|
6631
6719
|
const widthValue = typeof width === "number" ? `${width}px` : width;
|
|
6632
6720
|
return createPortal2(
|
|
6633
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsx316(
|
|
6634
6722
|
"div",
|
|
6635
6723
|
{
|
|
6636
6724
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
6637
6725
|
onClick: onClose,
|
|
6638
|
-
children: /* @__PURE__ */
|
|
6726
|
+
children: /* @__PURE__ */ jsxs200(
|
|
6639
6727
|
"div",
|
|
6640
6728
|
{
|
|
6641
6729
|
className: clsx_default("lib-xplat-drawer", placement, stateClass),
|
|
@@ -6644,11 +6732,11 @@ var Drawer = (props) => {
|
|
|
6644
6732
|
"aria-modal": "true",
|
|
6645
6733
|
onClick: (e) => e.stopPropagation(),
|
|
6646
6734
|
children: [
|
|
6647
|
-
title && /* @__PURE__ */
|
|
6648
|
-
/* @__PURE__ */
|
|
6649
|
-
/* @__PURE__ */
|
|
6735
|
+
title && /* @__PURE__ */ jsxs200("div", { className: "drawer-header", children: [
|
|
6736
|
+
/* @__PURE__ */ jsx316("span", { className: "drawer-title", children: title }),
|
|
6737
|
+
/* @__PURE__ */ jsx316("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
6650
6738
|
] }),
|
|
6651
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx316("div", { className: "drawer-body", children })
|
|
6652
6740
|
]
|
|
6653
6741
|
}
|
|
6654
6742
|
)
|
|
@@ -6661,16 +6749,16 @@ Drawer.displayName = "Drawer";
|
|
|
6661
6749
|
var Drawer_default = Drawer;
|
|
6662
6750
|
|
|
6663
6751
|
// src/components/Dropdown/Dropdown.tsx
|
|
6664
|
-
import
|
|
6752
|
+
import React13 from "react";
|
|
6665
6753
|
|
|
6666
6754
|
// src/tokens/hooks/useAutoPosition.ts
|
|
6667
|
-
import
|
|
6755
|
+
import React11 from "react";
|
|
6668
6756
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
6669
|
-
const [position, setPosition] =
|
|
6757
|
+
const [position, setPosition] = React11.useState({
|
|
6670
6758
|
position: {},
|
|
6671
6759
|
direction: "bottom"
|
|
6672
6760
|
});
|
|
6673
|
-
const calculatePosition =
|
|
6761
|
+
const calculatePosition = React11.useCallback(() => {
|
|
6674
6762
|
if (!triggerRef.current || !popRef.current) return;
|
|
6675
6763
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
6676
6764
|
const popRect = popRef.current.getBoundingClientRect();
|
|
@@ -6692,7 +6780,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
6692
6780
|
direction
|
|
6693
6781
|
});
|
|
6694
6782
|
}, [triggerRef, popRef]);
|
|
6695
|
-
|
|
6783
|
+
React11.useEffect(() => {
|
|
6696
6784
|
calculatePosition();
|
|
6697
6785
|
window.addEventListener("resize", calculatePosition);
|
|
6698
6786
|
return () => window.removeEventListener("resize", calculatePosition);
|
|
@@ -6702,9 +6790,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
6702
6790
|
var useAutoPosition_default = useAutoPosition;
|
|
6703
6791
|
|
|
6704
6792
|
// src/tokens/hooks/useClickOutside.ts
|
|
6705
|
-
import
|
|
6793
|
+
import React12 from "react";
|
|
6706
6794
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
6707
|
-
|
|
6795
|
+
React12.useEffect(() => {
|
|
6708
6796
|
if (!enabled) return;
|
|
6709
6797
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
6710
6798
|
const listener = (event) => {
|
|
@@ -6727,17 +6815,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
6727
6815
|
var useClickOutside_default = useClickOutside;
|
|
6728
6816
|
|
|
6729
6817
|
// src/components/Dropdown/Dropdown.tsx
|
|
6730
|
-
import { jsx as
|
|
6818
|
+
import { jsx as jsx317, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
6731
6819
|
var Dropdown = (props) => {
|
|
6732
6820
|
const { items, children, className } = props;
|
|
6733
|
-
const [isOpen, setIsOpen] =
|
|
6734
|
-
const [mounted, setMounted] =
|
|
6735
|
-
const [visible, setVisible] =
|
|
6736
|
-
const triggerRef =
|
|
6737
|
-
const menuRef =
|
|
6821
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
6822
|
+
const [mounted, setMounted] = React13.useState(false);
|
|
6823
|
+
const [visible, setVisible] = React13.useState(false);
|
|
6824
|
+
const triggerRef = React13.useRef(null);
|
|
6825
|
+
const menuRef = React13.useRef(null);
|
|
6738
6826
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
|
|
6739
6827
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
|
|
6740
|
-
|
|
6828
|
+
React13.useEffect(() => {
|
|
6741
6829
|
if (isOpen) {
|
|
6742
6830
|
setMounted(true);
|
|
6743
6831
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6752,8 +6840,8 @@ var Dropdown = (props) => {
|
|
|
6752
6840
|
item.onClick?.();
|
|
6753
6841
|
setIsOpen(false);
|
|
6754
6842
|
};
|
|
6755
|
-
return /* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
6843
|
+
return /* @__PURE__ */ jsxs201("div", { className: clsx_default("lib-xplat-dropdown", className), children: [
|
|
6844
|
+
/* @__PURE__ */ jsx317(
|
|
6757
6845
|
"div",
|
|
6758
6846
|
{
|
|
6759
6847
|
ref: triggerRef,
|
|
@@ -6762,14 +6850,14 @@ var Dropdown = (props) => {
|
|
|
6762
6850
|
children
|
|
6763
6851
|
}
|
|
6764
6852
|
),
|
|
6765
|
-
mounted && /* @__PURE__ */
|
|
6853
|
+
mounted && /* @__PURE__ */ jsx317(
|
|
6766
6854
|
"div",
|
|
6767
6855
|
{
|
|
6768
6856
|
ref: menuRef,
|
|
6769
6857
|
className: clsx_default("dropdown-menu", direction, { visible }),
|
|
6770
6858
|
style: { top: position.top, left: position.left },
|
|
6771
6859
|
role: "menu",
|
|
6772
|
-
children: items.map((item) => /* @__PURE__ */
|
|
6860
|
+
children: items.map((item) => /* @__PURE__ */ jsx317(
|
|
6773
6861
|
"button",
|
|
6774
6862
|
{
|
|
6775
6863
|
className: clsx_default("dropdown-item", {
|
|
@@ -6791,23 +6879,23 @@ Dropdown.displayName = "Dropdown";
|
|
|
6791
6879
|
var Dropdown_default = Dropdown;
|
|
6792
6880
|
|
|
6793
6881
|
// src/components/EmptyState/EmptyState.tsx
|
|
6794
|
-
import { jsx as
|
|
6882
|
+
import { jsx as jsx318, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
6795
6883
|
var EmptyState = (props) => {
|
|
6796
6884
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action, className } = props;
|
|
6797
|
-
return /* @__PURE__ */
|
|
6798
|
-
icon && /* @__PURE__ */
|
|
6799
|
-
!icon && /* @__PURE__ */
|
|
6800
|
-
/* @__PURE__ */
|
|
6801
|
-
description && /* @__PURE__ */
|
|
6802
|
-
action && /* @__PURE__ */
|
|
6885
|
+
return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-empty-state", className), children: [
|
|
6886
|
+
icon && /* @__PURE__ */ jsx318("div", { className: "empty-icon", children: icon }),
|
|
6887
|
+
!icon && /* @__PURE__ */ jsx318("div", { className: "empty-icon", children: /* @__PURE__ */ jsx318("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx318("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" }) }) }),
|
|
6888
|
+
/* @__PURE__ */ jsx318("p", { className: "empty-title", children: title }),
|
|
6889
|
+
description && /* @__PURE__ */ jsx318("p", { className: "empty-description", children: description }),
|
|
6890
|
+
action && /* @__PURE__ */ jsx318("div", { className: "empty-action", children: action })
|
|
6803
6891
|
] });
|
|
6804
6892
|
};
|
|
6805
6893
|
EmptyState.displayName = "EmptyState";
|
|
6806
6894
|
var EmptyState_default = EmptyState;
|
|
6807
6895
|
|
|
6808
6896
|
// src/components/FileUpload/FileUpload.tsx
|
|
6809
|
-
import
|
|
6810
|
-
import { jsx as
|
|
6897
|
+
import React14 from "react";
|
|
6898
|
+
import { jsx as jsx319, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
6811
6899
|
var FileUpload = (props) => {
|
|
6812
6900
|
const {
|
|
6813
6901
|
accept,
|
|
@@ -6818,8 +6906,8 @@ var FileUpload = (props) => {
|
|
|
6818
6906
|
description,
|
|
6819
6907
|
className
|
|
6820
6908
|
} = props;
|
|
6821
|
-
const [isDragOver, setIsDragOver] =
|
|
6822
|
-
const inputRef =
|
|
6909
|
+
const [isDragOver, setIsDragOver] = React14.useState(false);
|
|
6910
|
+
const inputRef = React14.useRef(null);
|
|
6823
6911
|
const handleFiles = (fileList) => {
|
|
6824
6912
|
let files = Array.from(fileList);
|
|
6825
6913
|
if (maxSize) {
|
|
@@ -6849,7 +6937,7 @@ var FileUpload = (props) => {
|
|
|
6849
6937
|
handleFiles(e.target.files);
|
|
6850
6938
|
}
|
|
6851
6939
|
};
|
|
6852
|
-
return /* @__PURE__ */
|
|
6940
|
+
return /* @__PURE__ */ jsxs203(
|
|
6853
6941
|
"div",
|
|
6854
6942
|
{
|
|
6855
6943
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }, className),
|
|
@@ -6858,7 +6946,7 @@ var FileUpload = (props) => {
|
|
|
6858
6946
|
onDragLeave: handleDragLeave,
|
|
6859
6947
|
onClick: () => inputRef.current?.click(),
|
|
6860
6948
|
children: [
|
|
6861
|
-
/* @__PURE__ */
|
|
6949
|
+
/* @__PURE__ */ jsx319(
|
|
6862
6950
|
"input",
|
|
6863
6951
|
{
|
|
6864
6952
|
ref: inputRef,
|
|
@@ -6868,9 +6956,9 @@ var FileUpload = (props) => {
|
|
|
6868
6956
|
onChange: handleChange
|
|
6869
6957
|
}
|
|
6870
6958
|
),
|
|
6871
|
-
/* @__PURE__ */
|
|
6872
|
-
/* @__PURE__ */
|
|
6873
|
-
description && /* @__PURE__ */
|
|
6959
|
+
/* @__PURE__ */ jsx319("div", { className: "upload-icon", children: /* @__PURE__ */ jsx319(UploadIcon_default, {}) }),
|
|
6960
|
+
/* @__PURE__ */ jsx319("p", { className: "upload-label", children: label }),
|
|
6961
|
+
description && /* @__PURE__ */ jsx319("p", { className: "upload-description", children: description })
|
|
6874
6962
|
]
|
|
6875
6963
|
}
|
|
6876
6964
|
);
|
|
@@ -6879,19 +6967,19 @@ FileUpload.displayName = "FileUpload";
|
|
|
6879
6967
|
var FileUpload_default = FileUpload;
|
|
6880
6968
|
|
|
6881
6969
|
// src/components/Select/Select.tsx
|
|
6882
|
-
import
|
|
6970
|
+
import React17 from "react";
|
|
6883
6971
|
|
|
6884
6972
|
// src/components/Select/context.ts
|
|
6885
|
-
import
|
|
6886
|
-
var SelectContext =
|
|
6973
|
+
import React15 from "react";
|
|
6974
|
+
var SelectContext = React15.createContext(null);
|
|
6887
6975
|
var context_default = SelectContext;
|
|
6888
6976
|
|
|
6889
6977
|
// src/components/Select/SelectItem.tsx
|
|
6890
|
-
import
|
|
6891
|
-
import { jsx as
|
|
6978
|
+
import React16 from "react";
|
|
6979
|
+
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
6892
6980
|
var SelectItem = (props) => {
|
|
6893
6981
|
const { children, value, onClick, disabled = false, className } = props;
|
|
6894
|
-
const ctx =
|
|
6982
|
+
const ctx = React16.useContext(context_default);
|
|
6895
6983
|
const handleClick = (e) => {
|
|
6896
6984
|
e.preventDefault();
|
|
6897
6985
|
e.stopPropagation();
|
|
@@ -6900,7 +6988,7 @@ var SelectItem = (props) => {
|
|
|
6900
6988
|
ctx?.close();
|
|
6901
6989
|
onClick?.();
|
|
6902
6990
|
};
|
|
6903
|
-
return /* @__PURE__ */
|
|
6991
|
+
return /* @__PURE__ */ jsx320(
|
|
6904
6992
|
"div",
|
|
6905
6993
|
{
|
|
6906
6994
|
className: clsx_default("select-item", disabled && "disabled", className),
|
|
@@ -6921,7 +7009,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
6921
7009
|
var SelectItem_default = SelectItem;
|
|
6922
7010
|
|
|
6923
7011
|
// src/components/Select/Select.tsx
|
|
6924
|
-
import { jsx as
|
|
7012
|
+
import { jsx as jsx321, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
6925
7013
|
var ANIMATION_DURATION_MS3 = 200;
|
|
6926
7014
|
var SelectRoot = (props) => {
|
|
6927
7015
|
const {
|
|
@@ -6930,28 +7018,29 @@ var SelectRoot = (props) => {
|
|
|
6930
7018
|
onChange,
|
|
6931
7019
|
children,
|
|
6932
7020
|
disabled = false,
|
|
6933
|
-
error = false
|
|
7021
|
+
error = false,
|
|
7022
|
+
size = "md"
|
|
6934
7023
|
} = props;
|
|
6935
|
-
const itemChildren =
|
|
6936
|
-
(child) =>
|
|
7024
|
+
const itemChildren = React17.Children.toArray(children).filter(
|
|
7025
|
+
(child) => React17.isValidElement(child) && child.type === SelectItem_default
|
|
6937
7026
|
);
|
|
6938
7027
|
const isControlled = valueProp !== void 0;
|
|
6939
|
-
const [isOpen, setOpen] =
|
|
6940
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
6941
|
-
const controlledLabel =
|
|
7028
|
+
const [isOpen, setOpen] = React17.useState(false);
|
|
7029
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React17.useState(null);
|
|
7030
|
+
const controlledLabel = React17.useMemo(() => {
|
|
6942
7031
|
if (!isControlled) return null;
|
|
6943
7032
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
6944
7033
|
return match ? match.props.children : null;
|
|
6945
7034
|
}, [isControlled, valueProp, itemChildren]);
|
|
6946
7035
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
6947
|
-
const triggerRef =
|
|
6948
|
-
const contentRef =
|
|
6949
|
-
const [mounted, setMounted] =
|
|
6950
|
-
const [visible, setVisible] =
|
|
6951
|
-
|
|
7036
|
+
const triggerRef = React17.useRef(null);
|
|
7037
|
+
const contentRef = React17.useRef(null);
|
|
7038
|
+
const [mounted, setMounted] = React17.useState(false);
|
|
7039
|
+
const [visible, setVisible] = React17.useState(false);
|
|
7040
|
+
React17.useEffect(() => {
|
|
6952
7041
|
if (disabled && isOpen) setOpen(false);
|
|
6953
7042
|
}, [disabled, isOpen]);
|
|
6954
|
-
|
|
7043
|
+
React17.useEffect(() => {
|
|
6955
7044
|
if (isOpen) {
|
|
6956
7045
|
setMounted(true);
|
|
6957
7046
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6961,12 +7050,12 @@ var SelectRoot = (props) => {
|
|
|
6961
7050
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
6962
7051
|
return () => clearTimeout(t);
|
|
6963
7052
|
}, [isOpen]);
|
|
6964
|
-
const open =
|
|
6965
|
-
const close =
|
|
6966
|
-
const toggle =
|
|
7053
|
+
const open = React17.useCallback(() => setOpen(true), []);
|
|
7054
|
+
const close = React17.useCallback(() => setOpen(false), []);
|
|
7055
|
+
const toggle = React17.useCallback(() => setOpen((prev) => !prev), []);
|
|
6967
7056
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
6968
7057
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
6969
|
-
const setSelected =
|
|
7058
|
+
const setSelected = React17.useCallback(
|
|
6970
7059
|
(label, itemValue) => {
|
|
6971
7060
|
if (!isControlled) {
|
|
6972
7061
|
setUncontrolledLabel(label);
|
|
@@ -6975,7 +7064,7 @@ var SelectRoot = (props) => {
|
|
|
6975
7064
|
},
|
|
6976
7065
|
[isControlled, onChange]
|
|
6977
7066
|
);
|
|
6978
|
-
const ctxValue =
|
|
7067
|
+
const ctxValue = React17.useMemo(
|
|
6979
7068
|
() => ({
|
|
6980
7069
|
isOpen,
|
|
6981
7070
|
mounted,
|
|
@@ -6996,17 +7085,18 @@ var SelectRoot = (props) => {
|
|
|
6996
7085
|
if (disabled) return;
|
|
6997
7086
|
toggle();
|
|
6998
7087
|
};
|
|
6999
|
-
return /* @__PURE__ */
|
|
7088
|
+
return /* @__PURE__ */ jsx321(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs204(
|
|
7000
7089
|
"div",
|
|
7001
7090
|
{
|
|
7002
7091
|
className: clsx_default(
|
|
7003
7092
|
"lib-xplat-select",
|
|
7093
|
+
size,
|
|
7004
7094
|
disabled && "disabled",
|
|
7005
7095
|
error && "error",
|
|
7006
7096
|
mounted && "is-open"
|
|
7007
7097
|
),
|
|
7008
7098
|
children: [
|
|
7009
|
-
/* @__PURE__ */
|
|
7099
|
+
/* @__PURE__ */ jsxs204(
|
|
7010
7100
|
"div",
|
|
7011
7101
|
{
|
|
7012
7102
|
ref: triggerRef,
|
|
@@ -7030,7 +7120,7 @@ var SelectRoot = (props) => {
|
|
|
7030
7120
|
}
|
|
7031
7121
|
},
|
|
7032
7122
|
children: [
|
|
7033
|
-
/* @__PURE__ */
|
|
7123
|
+
/* @__PURE__ */ jsx321(
|
|
7034
7124
|
"span",
|
|
7035
7125
|
{
|
|
7036
7126
|
className: clsx_default(
|
|
@@ -7040,18 +7130,18 @@ var SelectRoot = (props) => {
|
|
|
7040
7130
|
children: selectedLabel ?? placeholder
|
|
7041
7131
|
}
|
|
7042
7132
|
),
|
|
7043
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ jsx321(
|
|
7044
7134
|
"span",
|
|
7045
7135
|
{
|
|
7046
7136
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
7047
7137
|
"aria-hidden": true,
|
|
7048
|
-
children: /* @__PURE__ */
|
|
7138
|
+
children: /* @__PURE__ */ jsx321(ChevronDownIcon_default, {})
|
|
7049
7139
|
}
|
|
7050
7140
|
)
|
|
7051
7141
|
]
|
|
7052
7142
|
}
|
|
7053
7143
|
),
|
|
7054
|
-
mounted && /* @__PURE__ */
|
|
7144
|
+
mounted && /* @__PURE__ */ jsx321(
|
|
7055
7145
|
"div",
|
|
7056
7146
|
{
|
|
7057
7147
|
className: clsx_default("select-content", position.direction, stateClass),
|
|
@@ -7072,10 +7162,10 @@ var Select = Object.assign(SelectRoot, {
|
|
|
7072
7162
|
var Select_default = Select;
|
|
7073
7163
|
|
|
7074
7164
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7075
|
-
import
|
|
7165
|
+
import React19 from "react";
|
|
7076
7166
|
|
|
7077
7167
|
// src/components/HtmlTypeWriter/utils.ts
|
|
7078
|
-
import
|
|
7168
|
+
import React18 from "react";
|
|
7079
7169
|
var voidTags = /* @__PURE__ */ new Set([
|
|
7080
7170
|
"br",
|
|
7081
7171
|
"img",
|
|
@@ -7143,40 +7233,40 @@ function convertNodeToReactWithRange(node, typedLen, rangeMap) {
|
|
|
7143
7233
|
props[attr.name] = attr.value;
|
|
7144
7234
|
});
|
|
7145
7235
|
if (voidTags.has(tag)) {
|
|
7146
|
-
return
|
|
7236
|
+
return React18.createElement(tag, props);
|
|
7147
7237
|
}
|
|
7148
7238
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
7149
|
-
return
|
|
7239
|
+
return React18.createElement(tag, props, ...children);
|
|
7150
7240
|
}
|
|
7151
7241
|
function htmlToReactProgressive(root, typedLen, rangeMap) {
|
|
7152
7242
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
7153
7243
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
7154
|
-
return node == null ? null :
|
|
7244
|
+
return node == null ? null : React18.createElement(React18.Fragment, { key: idx }, node);
|
|
7155
7245
|
}).filter(Boolean);
|
|
7156
7246
|
return nodes.length === 0 ? null : nodes;
|
|
7157
7247
|
}
|
|
7158
7248
|
|
|
7159
7249
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7160
|
-
import { jsx as
|
|
7250
|
+
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
7161
7251
|
var HtmlTypeWriter = ({
|
|
7162
7252
|
html,
|
|
7163
7253
|
duration = 20,
|
|
7164
7254
|
onDone,
|
|
7165
7255
|
onChange
|
|
7166
7256
|
}) => {
|
|
7167
|
-
const [typedLen, setTypedLen] =
|
|
7168
|
-
const doneCalledRef =
|
|
7169
|
-
const { doc, rangeMap, totalLength } =
|
|
7257
|
+
const [typedLen, setTypedLen] = React19.useState(0);
|
|
7258
|
+
const doneCalledRef = React19.useRef(false);
|
|
7259
|
+
const { doc, rangeMap, totalLength } = React19.useMemo(() => {
|
|
7170
7260
|
const decoded = decodeHtmlEntities(html);
|
|
7171
7261
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
7172
7262
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
7173
7263
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
7174
7264
|
}, [html]);
|
|
7175
|
-
|
|
7265
|
+
React19.useEffect(() => {
|
|
7176
7266
|
setTypedLen(0);
|
|
7177
7267
|
doneCalledRef.current = false;
|
|
7178
7268
|
}, [html]);
|
|
7179
|
-
|
|
7269
|
+
React19.useEffect(() => {
|
|
7180
7270
|
if (!totalLength) return;
|
|
7181
7271
|
if (typedLen >= totalLength) return;
|
|
7182
7272
|
const timer = window.setInterval(() => {
|
|
@@ -7184,33 +7274,33 @@ var HtmlTypeWriter = ({
|
|
|
7184
7274
|
}, duration);
|
|
7185
7275
|
return () => window.clearInterval(timer);
|
|
7186
7276
|
}, [typedLen, totalLength, duration]);
|
|
7187
|
-
|
|
7277
|
+
React19.useEffect(() => {
|
|
7188
7278
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
7189
7279
|
onChange?.();
|
|
7190
7280
|
}
|
|
7191
7281
|
}, [typedLen, totalLength, onChange]);
|
|
7192
|
-
|
|
7282
|
+
React19.useEffect(() => {
|
|
7193
7283
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
7194
7284
|
doneCalledRef.current = true;
|
|
7195
7285
|
onDone?.();
|
|
7196
7286
|
}
|
|
7197
7287
|
}, [typedLen, totalLength, onDone]);
|
|
7198
|
-
const parsed =
|
|
7288
|
+
const parsed = React19.useMemo(
|
|
7199
7289
|
() => htmlToReactProgressive(doc.body, typedLen, rangeMap),
|
|
7200
7290
|
[doc.body, typedLen, rangeMap]
|
|
7201
7291
|
);
|
|
7202
|
-
return /* @__PURE__ */
|
|
7292
|
+
return /* @__PURE__ */ jsx322("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
7203
7293
|
};
|
|
7204
7294
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
7205
7295
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
7206
7296
|
|
|
7207
7297
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
7208
|
-
import
|
|
7209
|
-
import { jsx as
|
|
7298
|
+
import React20 from "react";
|
|
7299
|
+
import { jsx as jsx323, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
7210
7300
|
var ImageSelector = (props) => {
|
|
7211
7301
|
const { value, label, onChange } = props;
|
|
7212
|
-
const [previewUrl, setPreviewUrl] =
|
|
7213
|
-
|
|
7302
|
+
const [previewUrl, setPreviewUrl] = React20.useState();
|
|
7303
|
+
React20.useEffect(() => {
|
|
7214
7304
|
if (!value) {
|
|
7215
7305
|
setPreviewUrl(void 0);
|
|
7216
7306
|
return;
|
|
@@ -7219,7 +7309,7 @@ var ImageSelector = (props) => {
|
|
|
7219
7309
|
setPreviewUrl(url);
|
|
7220
7310
|
return () => URL.revokeObjectURL(url);
|
|
7221
7311
|
}, [value]);
|
|
7222
|
-
const inputRef =
|
|
7312
|
+
const inputRef = React20.useRef(null);
|
|
7223
7313
|
const handleFileChange = (e) => {
|
|
7224
7314
|
const selectedFile = e.target.files?.[0];
|
|
7225
7315
|
if (selectedFile) {
|
|
@@ -7232,8 +7322,8 @@ var ImageSelector = (props) => {
|
|
|
7232
7322
|
const handleOpenFileDialog = () => {
|
|
7233
7323
|
inputRef.current?.click();
|
|
7234
7324
|
};
|
|
7235
|
-
return /* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7325
|
+
return /* @__PURE__ */ jsxs205("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
7326
|
+
/* @__PURE__ */ jsx323(
|
|
7237
7327
|
"input",
|
|
7238
7328
|
{
|
|
7239
7329
|
type: "file",
|
|
@@ -7243,13 +7333,13 @@ var ImageSelector = (props) => {
|
|
|
7243
7333
|
ref: inputRef
|
|
7244
7334
|
}
|
|
7245
7335
|
),
|
|
7246
|
-
value && /* @__PURE__ */
|
|
7247
|
-
/* @__PURE__ */
|
|
7248
|
-
/* @__PURE__ */
|
|
7336
|
+
value && /* @__PURE__ */ jsxs205("div", { className: "action-bar", children: [
|
|
7337
|
+
/* @__PURE__ */ jsx323("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx323(UploadIcon_default, {}) }),
|
|
7338
|
+
/* @__PURE__ */ jsx323("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx323(DeleteIcon_default, {}) })
|
|
7249
7339
|
] }),
|
|
7250
|
-
/* @__PURE__ */
|
|
7251
|
-
/* @__PURE__ */
|
|
7252
|
-
/* @__PURE__ */
|
|
7340
|
+
/* @__PURE__ */ jsx323("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx323("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs205("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
7341
|
+
/* @__PURE__ */ jsx323("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx323(ImageIcon_default, {}) }),
|
|
7342
|
+
/* @__PURE__ */ jsx323("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
7253
7343
|
] }) })
|
|
7254
7344
|
] });
|
|
7255
7345
|
};
|
|
@@ -7257,7 +7347,7 @@ ImageSelector.displayName = "ImageSelector";
|
|
|
7257
7347
|
var ImageSelector_default = ImageSelector;
|
|
7258
7348
|
|
|
7259
7349
|
// src/components/Pagination/Pagination.tsx
|
|
7260
|
-
import { jsx as
|
|
7350
|
+
import { jsx as jsx324, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
7261
7351
|
function getPageRange(current, totalPages, siblingCount) {
|
|
7262
7352
|
const totalNumbers = siblingCount * 2 + 5;
|
|
7263
7353
|
if (totalPages <= totalNumbers) {
|
|
@@ -7290,6 +7380,7 @@ var Pagination = (props) => {
|
|
|
7290
7380
|
pageSize = 10,
|
|
7291
7381
|
siblingCount = 1,
|
|
7292
7382
|
onChange,
|
|
7383
|
+
size = "md",
|
|
7293
7384
|
colorNamespace = "xplat",
|
|
7294
7385
|
color = "blue",
|
|
7295
7386
|
colorDepth,
|
|
@@ -7307,19 +7398,19 @@ var Pagination = (props) => {
|
|
|
7307
7398
|
onChange?.(page);
|
|
7308
7399
|
}
|
|
7309
7400
|
};
|
|
7310
|
-
return /* @__PURE__ */
|
|
7311
|
-
/* @__PURE__ */
|
|
7401
|
+
return /* @__PURE__ */ jsxs206("nav", { className: clsx_default("lib-xplat-pagination", size, className), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
7402
|
+
/* @__PURE__ */ jsx324(
|
|
7312
7403
|
"button",
|
|
7313
7404
|
{
|
|
7314
7405
|
className: "page-btn prev",
|
|
7315
7406
|
disabled: current <= 1,
|
|
7316
7407
|
onClick: () => handleClick(current - 1),
|
|
7317
7408
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
7318
|
-
children: /* @__PURE__ */
|
|
7409
|
+
children: /* @__PURE__ */ jsx324(ChevronLeftIcon_default, {})
|
|
7319
7410
|
}
|
|
7320
7411
|
),
|
|
7321
7412
|
pages.map(
|
|
7322
|
-
(page, i) => page === "..." ? /* @__PURE__ */
|
|
7413
|
+
(page, i) => page === "..." ? /* @__PURE__ */ jsx324("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx324(
|
|
7323
7414
|
"button",
|
|
7324
7415
|
{
|
|
7325
7416
|
className: clsx_default("page-btn", colorClass, { active: page === current }),
|
|
@@ -7330,14 +7421,14 @@ var Pagination = (props) => {
|
|
|
7330
7421
|
page
|
|
7331
7422
|
)
|
|
7332
7423
|
),
|
|
7333
|
-
/* @__PURE__ */
|
|
7424
|
+
/* @__PURE__ */ jsx324(
|
|
7334
7425
|
"button",
|
|
7335
7426
|
{
|
|
7336
7427
|
className: "page-btn next",
|
|
7337
7428
|
disabled: current >= totalPages,
|
|
7338
7429
|
onClick: () => handleClick(current + 1),
|
|
7339
7430
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
7340
|
-
children: /* @__PURE__ */
|
|
7431
|
+
children: /* @__PURE__ */ jsx324(ChevronRightIcon_default, {})
|
|
7341
7432
|
}
|
|
7342
7433
|
)
|
|
7343
7434
|
] });
|
|
@@ -7346,17 +7437,17 @@ Pagination.displayName = "Pagination";
|
|
|
7346
7437
|
var Pagination_default = Pagination;
|
|
7347
7438
|
|
|
7348
7439
|
// src/components/PopOver/PopOver.tsx
|
|
7349
|
-
import
|
|
7350
|
-
import { jsx as
|
|
7440
|
+
import React21 from "react";
|
|
7441
|
+
import { jsx as jsx325, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
7351
7442
|
var PopOver = (props) => {
|
|
7352
7443
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
7353
|
-
const popRef =
|
|
7354
|
-
const triggerRef =
|
|
7355
|
-
const [localOpen, setLocalOpen] =
|
|
7356
|
-
const [eventTrigger, setEventTrigger] =
|
|
7444
|
+
const popRef = React21.useRef(null);
|
|
7445
|
+
const triggerRef = React21.useRef(null);
|
|
7446
|
+
const [localOpen, setLocalOpen] = React21.useState(false);
|
|
7447
|
+
const [eventTrigger, setEventTrigger] = React21.useState(false);
|
|
7357
7448
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
7358
7449
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
7359
|
-
|
|
7450
|
+
React21.useEffect(() => {
|
|
7360
7451
|
if (isOpen) {
|
|
7361
7452
|
setLocalOpen(isOpen);
|
|
7362
7453
|
setTimeout(() => {
|
|
@@ -7369,7 +7460,7 @@ var PopOver = (props) => {
|
|
|
7369
7460
|
}, 200);
|
|
7370
7461
|
}
|
|
7371
7462
|
}, [isOpen]);
|
|
7372
|
-
return /* @__PURE__ */
|
|
7463
|
+
return /* @__PURE__ */ jsxs207(
|
|
7373
7464
|
"div",
|
|
7374
7465
|
{
|
|
7375
7466
|
className: "lib-xplat-pop-over",
|
|
@@ -7379,7 +7470,7 @@ var PopOver = (props) => {
|
|
|
7379
7470
|
},
|
|
7380
7471
|
children: [
|
|
7381
7472
|
children,
|
|
7382
|
-
localOpen && /* @__PURE__ */
|
|
7473
|
+
localOpen && /* @__PURE__ */ jsx325(
|
|
7383
7474
|
"div",
|
|
7384
7475
|
{
|
|
7385
7476
|
className: clsx_default(
|
|
@@ -7402,7 +7493,7 @@ PopOver.displayName = "PopOver";
|
|
|
7402
7493
|
var PopOver_default = PopOver;
|
|
7403
7494
|
|
|
7404
7495
|
// src/components/Progress/Progress.tsx
|
|
7405
|
-
import { jsx as
|
|
7496
|
+
import { jsx as jsx326, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
7406
7497
|
var Progress = (props) => {
|
|
7407
7498
|
const {
|
|
7408
7499
|
value,
|
|
@@ -7420,8 +7511,8 @@ var Progress = (props) => {
|
|
|
7420
7511
|
colorDepth ?? 500
|
|
7421
7512
|
);
|
|
7422
7513
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
7423
|
-
return /* @__PURE__ */
|
|
7424
|
-
/* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ jsxs208("div", { className: clsx_default("lib-xplat-progress", size, className), children: [
|
|
7515
|
+
/* @__PURE__ */ jsx326(
|
|
7425
7516
|
"div",
|
|
7426
7517
|
{
|
|
7427
7518
|
className: "track",
|
|
@@ -7429,7 +7520,7 @@ var Progress = (props) => {
|
|
|
7429
7520
|
"aria-valuenow": value,
|
|
7430
7521
|
"aria-valuemin": 0,
|
|
7431
7522
|
"aria-valuemax": max,
|
|
7432
|
-
children: /* @__PURE__ */
|
|
7523
|
+
children: /* @__PURE__ */ jsx326(
|
|
7433
7524
|
"div",
|
|
7434
7525
|
{
|
|
7435
7526
|
className: clsx_default("bar", colorClass),
|
|
@@ -7438,7 +7529,7 @@ var Progress = (props) => {
|
|
|
7438
7529
|
)
|
|
7439
7530
|
}
|
|
7440
7531
|
),
|
|
7441
|
-
showLabel && /* @__PURE__ */
|
|
7532
|
+
showLabel && /* @__PURE__ */ jsxs208("span", { className: "label", children: [
|
|
7442
7533
|
Math.round(percentage),
|
|
7443
7534
|
"%"
|
|
7444
7535
|
] })
|
|
@@ -7448,17 +7539,17 @@ Progress.displayName = "Progress";
|
|
|
7448
7539
|
var Progress_default = Progress;
|
|
7449
7540
|
|
|
7450
7541
|
// src/components/Radio/RadioGroupContext.tsx
|
|
7451
|
-
import
|
|
7452
|
-
var RadioGroupContext =
|
|
7542
|
+
import React22 from "react";
|
|
7543
|
+
var RadioGroupContext = React22.createContext(
|
|
7453
7544
|
null
|
|
7454
7545
|
);
|
|
7455
7546
|
var useRadioGroupContext = () => {
|
|
7456
|
-
return
|
|
7547
|
+
return React22.useContext(RadioGroupContext);
|
|
7457
7548
|
};
|
|
7458
7549
|
var RadioGroupContext_default = RadioGroupContext;
|
|
7459
7550
|
|
|
7460
7551
|
// src/components/Radio/Radio.tsx
|
|
7461
|
-
import { jsx as
|
|
7552
|
+
import { jsx as jsx327, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
7462
7553
|
var Radio = (props) => {
|
|
7463
7554
|
const {
|
|
7464
7555
|
label,
|
|
@@ -7467,9 +7558,11 @@ var Radio = (props) => {
|
|
|
7467
7558
|
colorNamespace = "xplat",
|
|
7468
7559
|
color = "blue",
|
|
7469
7560
|
colorDepth,
|
|
7561
|
+
size: sizeProp,
|
|
7470
7562
|
...rest
|
|
7471
7563
|
} = props;
|
|
7472
7564
|
const context = useRadioGroupContext();
|
|
7565
|
+
const size = sizeProp ?? context?.size ?? "md";
|
|
7473
7566
|
const isGroup = !!context;
|
|
7474
7567
|
const localChecked = isGroup ? context.value === value : rest.checked ?? false;
|
|
7475
7568
|
const inputProps = context ? { name: context.name, value, onChange: context.onChange } : {
|
|
@@ -7482,17 +7575,18 @@ var Radio = (props) => {
|
|
|
7482
7575
|
color,
|
|
7483
7576
|
colorDepth ?? 500
|
|
7484
7577
|
);
|
|
7485
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsxs209(
|
|
7486
7579
|
"label",
|
|
7487
7580
|
{
|
|
7488
7581
|
className: clsx_default(
|
|
7489
7582
|
"lib-xplat-radio",
|
|
7583
|
+
size,
|
|
7490
7584
|
localChecked ? "checked" : void 0,
|
|
7491
7585
|
className
|
|
7492
7586
|
),
|
|
7493
7587
|
children: [
|
|
7494
|
-
/* @__PURE__ */
|
|
7495
|
-
/* @__PURE__ */
|
|
7588
|
+
/* @__PURE__ */ jsx327("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
7589
|
+
/* @__PURE__ */ jsx327(
|
|
7496
7590
|
"div",
|
|
7497
7591
|
{
|
|
7498
7592
|
className: clsx_default(
|
|
@@ -7500,10 +7594,10 @@ var Radio = (props) => {
|
|
|
7500
7594
|
localChecked ? "checked" : void 0,
|
|
7501
7595
|
colorClass
|
|
7502
7596
|
),
|
|
7503
|
-
children: localChecked && /* @__PURE__ */
|
|
7597
|
+
children: localChecked && /* @__PURE__ */ jsx327("div", { className: "inner-circle" })
|
|
7504
7598
|
}
|
|
7505
7599
|
),
|
|
7506
|
-
label && /* @__PURE__ */
|
|
7600
|
+
label && /* @__PURE__ */ jsx327("span", { children: label })
|
|
7507
7601
|
]
|
|
7508
7602
|
}
|
|
7509
7603
|
);
|
|
@@ -7512,23 +7606,23 @@ Radio.displayName = "Radio";
|
|
|
7512
7606
|
var Radio_default = Radio;
|
|
7513
7607
|
|
|
7514
7608
|
// src/components/Radio/RadioGroup.tsx
|
|
7515
|
-
import { Fragment, jsx as
|
|
7609
|
+
import { Fragment, jsx as jsx328 } from "react/jsx-runtime";
|
|
7516
7610
|
var RadioGroup = (props) => {
|
|
7517
7611
|
const { children, ...rest } = props;
|
|
7518
|
-
return /* @__PURE__ */
|
|
7612
|
+
return /* @__PURE__ */ jsx328(Fragment, { children: /* @__PURE__ */ jsx328(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
7519
7613
|
};
|
|
7520
7614
|
RadioGroup.displayName = "RadioGroup";
|
|
7521
7615
|
var RadioGroup_default = RadioGroup;
|
|
7522
7616
|
|
|
7523
7617
|
// src/components/Skeleton/Skeleton.tsx
|
|
7524
|
-
import { jsx as
|
|
7618
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
7525
7619
|
var Skeleton = (props) => {
|
|
7526
7620
|
const { variant = "text", width, height, className } = props;
|
|
7527
7621
|
const style = {
|
|
7528
7622
|
width: typeof width === "number" ? `${width}px` : width,
|
|
7529
7623
|
height: typeof height === "number" ? `${height}px` : height
|
|
7530
7624
|
};
|
|
7531
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ jsx329(
|
|
7532
7626
|
"div",
|
|
7533
7627
|
{
|
|
7534
7628
|
className: clsx_default("lib-xplat-skeleton", variant, className),
|
|
@@ -7541,7 +7635,7 @@ Skeleton.displayName = "Skeleton";
|
|
|
7541
7635
|
var Skeleton_default = Skeleton;
|
|
7542
7636
|
|
|
7543
7637
|
// src/components/Spinner/Spinner.tsx
|
|
7544
|
-
import { jsx as
|
|
7638
|
+
import { jsx as jsx330, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
7545
7639
|
var Spinner = (props) => {
|
|
7546
7640
|
const {
|
|
7547
7641
|
size = "md",
|
|
@@ -7555,14 +7649,14 @@ var Spinner = (props) => {
|
|
|
7555
7649
|
color,
|
|
7556
7650
|
colorDepth ?? 500
|
|
7557
7651
|
);
|
|
7558
|
-
return /* @__PURE__ */
|
|
7652
|
+
return /* @__PURE__ */ jsx330(
|
|
7559
7653
|
"div",
|
|
7560
7654
|
{
|
|
7561
7655
|
className: clsx_default("lib-xplat-spinner", size, colorClass, className),
|
|
7562
7656
|
role: "status",
|
|
7563
7657
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
7564
|
-
children: /* @__PURE__ */
|
|
7565
|
-
/* @__PURE__ */
|
|
7658
|
+
children: /* @__PURE__ */ jsxs210("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
7659
|
+
/* @__PURE__ */ jsx330(
|
|
7566
7660
|
"circle",
|
|
7567
7661
|
{
|
|
7568
7662
|
className: "track",
|
|
@@ -7572,7 +7666,7 @@ var Spinner = (props) => {
|
|
|
7572
7666
|
strokeWidth: "3"
|
|
7573
7667
|
}
|
|
7574
7668
|
),
|
|
7575
|
-
/* @__PURE__ */
|
|
7669
|
+
/* @__PURE__ */ jsx330(
|
|
7576
7670
|
"circle",
|
|
7577
7671
|
{
|
|
7578
7672
|
className: "indicator",
|
|
@@ -7591,7 +7685,7 @@ Spinner.displayName = "Spinner";
|
|
|
7591
7685
|
var Spinner_default = Spinner;
|
|
7592
7686
|
|
|
7593
7687
|
// src/components/Steps/Steps.tsx
|
|
7594
|
-
import { jsx as
|
|
7688
|
+
import { jsx as jsx331, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
7595
7689
|
var Steps = (props) => {
|
|
7596
7690
|
const {
|
|
7597
7691
|
items,
|
|
@@ -7606,16 +7700,16 @@ var Steps = (props) => {
|
|
|
7606
7700
|
color,
|
|
7607
7701
|
colorDepth ?? 500
|
|
7608
7702
|
);
|
|
7609
|
-
return /* @__PURE__ */
|
|
7703
|
+
return /* @__PURE__ */ jsx331("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index) => {
|
|
7610
7704
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
7611
|
-
return /* @__PURE__ */
|
|
7612
|
-
/* @__PURE__ */
|
|
7613
|
-
/* @__PURE__ */
|
|
7614
|
-
index < items.length - 1 && /* @__PURE__ */
|
|
7705
|
+
return /* @__PURE__ */ jsxs211("div", { className: clsx_default("step-item", status), children: [
|
|
7706
|
+
/* @__PURE__ */ jsxs211("div", { className: "step-indicator", children: [
|
|
7707
|
+
/* @__PURE__ */ jsx331("div", { className: clsx_default("step-circle", colorClass), children: status === "completed" ? /* @__PURE__ */ jsx331(CheckIcon_default, {}) : /* @__PURE__ */ jsx331("span", { children: index + 1 }) }),
|
|
7708
|
+
index < items.length - 1 && /* @__PURE__ */ jsx331("div", { className: clsx_default("step-line", colorClass) })
|
|
7615
7709
|
] }),
|
|
7616
|
-
/* @__PURE__ */
|
|
7617
|
-
/* @__PURE__ */
|
|
7618
|
-
item.description && /* @__PURE__ */
|
|
7710
|
+
/* @__PURE__ */ jsxs211("div", { className: "step-content", children: [
|
|
7711
|
+
/* @__PURE__ */ jsx331("span", { className: "step-title", children: item.title }),
|
|
7712
|
+
item.description && /* @__PURE__ */ jsx331("span", { className: "step-description", children: item.description })
|
|
7619
7713
|
] })
|
|
7620
7714
|
] }, index);
|
|
7621
7715
|
}) });
|
|
@@ -7624,8 +7718,8 @@ Steps.displayName = "Steps";
|
|
|
7624
7718
|
var Steps_default = Steps;
|
|
7625
7719
|
|
|
7626
7720
|
// src/components/Switch/Switch.tsx
|
|
7627
|
-
import
|
|
7628
|
-
import { jsx as
|
|
7721
|
+
import React23 from "react";
|
|
7722
|
+
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
7629
7723
|
var KNOB_TRANSITION_MS = 250;
|
|
7630
7724
|
var Switch = (props) => {
|
|
7631
7725
|
const {
|
|
@@ -7638,9 +7732,9 @@ var Switch = (props) => {
|
|
|
7638
7732
|
colorDepth,
|
|
7639
7733
|
className
|
|
7640
7734
|
} = props;
|
|
7641
|
-
const [isAnimating, setIsAnimating] =
|
|
7642
|
-
const timeoutRef =
|
|
7643
|
-
|
|
7735
|
+
const [isAnimating, setIsAnimating] = React23.useState(false);
|
|
7736
|
+
const timeoutRef = React23.useRef(null);
|
|
7737
|
+
React23.useEffect(() => {
|
|
7644
7738
|
return () => {
|
|
7645
7739
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
7646
7740
|
};
|
|
@@ -7660,7 +7754,7 @@ var Switch = (props) => {
|
|
|
7660
7754
|
color,
|
|
7661
7755
|
colorDepth ?? 500
|
|
7662
7756
|
);
|
|
7663
|
-
return /* @__PURE__ */
|
|
7757
|
+
return /* @__PURE__ */ jsx332(
|
|
7664
7758
|
"div",
|
|
7665
7759
|
{
|
|
7666
7760
|
className: clsx_default(
|
|
@@ -7674,7 +7768,7 @@ var Switch = (props) => {
|
|
|
7674
7768
|
),
|
|
7675
7769
|
onClick: handleClick,
|
|
7676
7770
|
"aria-disabled": disabled || isAnimating,
|
|
7677
|
-
children: /* @__PURE__ */
|
|
7771
|
+
children: /* @__PURE__ */ jsx332("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
7678
7772
|
}
|
|
7679
7773
|
);
|
|
7680
7774
|
};
|
|
@@ -7682,14 +7776,14 @@ Switch.displayName = "Switch";
|
|
|
7682
7776
|
var Switch_default = Switch;
|
|
7683
7777
|
|
|
7684
7778
|
// src/components/Tab/Tab.tsx
|
|
7685
|
-
import
|
|
7779
|
+
import React25 from "react";
|
|
7686
7780
|
|
|
7687
7781
|
// src/components/Tab/TabItem.tsx
|
|
7688
|
-
import
|
|
7689
|
-
import { jsx as
|
|
7690
|
-
var TabItem =
|
|
7782
|
+
import React24 from "react";
|
|
7783
|
+
import { jsx as jsx333 } from "react/jsx-runtime";
|
|
7784
|
+
var TabItem = React24.forwardRef((props, ref) => {
|
|
7691
7785
|
const { isActive, title, onClick } = props;
|
|
7692
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsx333(
|
|
7693
7787
|
"div",
|
|
7694
7788
|
{
|
|
7695
7789
|
ref,
|
|
@@ -7703,25 +7797,25 @@ TabItem.displayName = "TabItem";
|
|
|
7703
7797
|
var TabItem_default = TabItem;
|
|
7704
7798
|
|
|
7705
7799
|
// src/components/Tab/Tab.tsx
|
|
7706
|
-
import { jsx as
|
|
7800
|
+
import { jsx as jsx334, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
7707
7801
|
var Tab = (props) => {
|
|
7708
|
-
const { activeIndex, onChange, tabs, type } = props;
|
|
7709
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
7802
|
+
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
7803
|
+
const [underlineStyle, setUnderlineStyle] = React25.useState({
|
|
7710
7804
|
left: 0,
|
|
7711
7805
|
width: 0
|
|
7712
7806
|
});
|
|
7713
|
-
const itemRefs =
|
|
7807
|
+
const itemRefs = React25.useRef([]);
|
|
7714
7808
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
7715
7809
|
onChange(tabItem, tabIdx);
|
|
7716
7810
|
};
|
|
7717
|
-
|
|
7811
|
+
React25.useEffect(() => {
|
|
7718
7812
|
const el = itemRefs.current[activeIndex];
|
|
7719
7813
|
if (el) {
|
|
7720
7814
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
7721
7815
|
}
|
|
7722
7816
|
}, [activeIndex, tabs.length]);
|
|
7723
|
-
return /* @__PURE__ */
|
|
7724
|
-
tabs.map((tab, idx) => /* @__PURE__ */
|
|
7817
|
+
return /* @__PURE__ */ jsxs212("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
7818
|
+
tabs.map((tab, idx) => /* @__PURE__ */ jsx334(
|
|
7725
7819
|
TabItem_default,
|
|
7726
7820
|
{
|
|
7727
7821
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -7733,7 +7827,7 @@ var Tab = (props) => {
|
|
|
7733
7827
|
},
|
|
7734
7828
|
`${tab.value}_${idx}`
|
|
7735
7829
|
)),
|
|
7736
|
-
type === "toggle" && /* @__PURE__ */
|
|
7830
|
+
type === "toggle" && /* @__PURE__ */ jsx334(
|
|
7737
7831
|
"div",
|
|
7738
7832
|
{
|
|
7739
7833
|
className: "tab-toggle-underline",
|
|
@@ -7749,17 +7843,17 @@ Tab.displayName = "Tab";
|
|
|
7749
7843
|
var Tab_default = Tab;
|
|
7750
7844
|
|
|
7751
7845
|
// src/components/Table/TableContext.tsx
|
|
7752
|
-
import
|
|
7753
|
-
var TableContext =
|
|
7846
|
+
import React26 from "react";
|
|
7847
|
+
var TableContext = React26.createContext(null);
|
|
7754
7848
|
var useTableContext = () => {
|
|
7755
|
-
const ctx =
|
|
7849
|
+
const ctx = React26.useContext(TableContext);
|
|
7756
7850
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
7757
7851
|
return ctx;
|
|
7758
7852
|
};
|
|
7759
7853
|
var TableContext_default = TableContext;
|
|
7760
7854
|
|
|
7761
7855
|
// src/components/Table/Table.tsx
|
|
7762
|
-
import { jsx as
|
|
7856
|
+
import { jsx as jsx335 } from "react/jsx-runtime";
|
|
7763
7857
|
var Table = (props) => {
|
|
7764
7858
|
const {
|
|
7765
7859
|
className,
|
|
@@ -7769,7 +7863,7 @@ var Table = (props) => {
|
|
|
7769
7863
|
headerSticky = false,
|
|
7770
7864
|
stickyShadow = true
|
|
7771
7865
|
} = props;
|
|
7772
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ jsx335("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ jsx335(
|
|
7773
7867
|
TableContext_default.Provider,
|
|
7774
7868
|
{
|
|
7775
7869
|
value: {
|
|
@@ -7778,7 +7872,7 @@ var Table = (props) => {
|
|
|
7778
7872
|
headerSticky,
|
|
7779
7873
|
stickyShadow
|
|
7780
7874
|
},
|
|
7781
|
-
children: /* @__PURE__ */
|
|
7875
|
+
children: /* @__PURE__ */ jsx335("table", { className: "lib-xplat-table", children })
|
|
7782
7876
|
}
|
|
7783
7877
|
) });
|
|
7784
7878
|
};
|
|
@@ -7786,40 +7880,40 @@ Table.displayName = "Table";
|
|
|
7786
7880
|
var Table_default = Table;
|
|
7787
7881
|
|
|
7788
7882
|
// src/components/Table/TableBody.tsx
|
|
7789
|
-
import { jsx as
|
|
7883
|
+
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
7790
7884
|
var TableBody = (props) => {
|
|
7791
7885
|
const { children, className } = props;
|
|
7792
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ jsx336("tbody", { className, children });
|
|
7793
7887
|
};
|
|
7794
7888
|
TableBody.displayName = "TableBody";
|
|
7795
7889
|
var TableBody_default = TableBody;
|
|
7796
7890
|
|
|
7797
7891
|
// src/components/Table/TableCell.tsx
|
|
7798
|
-
import
|
|
7892
|
+
import React29 from "react";
|
|
7799
7893
|
|
|
7800
7894
|
// src/components/Table/TableHeadContext.tsx
|
|
7801
|
-
import
|
|
7802
|
-
var TableHeadContext =
|
|
7895
|
+
import React27 from "react";
|
|
7896
|
+
var TableHeadContext = React27.createContext(
|
|
7803
7897
|
null
|
|
7804
7898
|
);
|
|
7805
7899
|
var useTableHeadContext = () => {
|
|
7806
|
-
const ctx =
|
|
7900
|
+
const ctx = React27.useContext(TableHeadContext);
|
|
7807
7901
|
return ctx;
|
|
7808
7902
|
};
|
|
7809
7903
|
var TableHeadContext_default = TableHeadContext;
|
|
7810
7904
|
|
|
7811
7905
|
// src/components/Table/TableRowContext.tsx
|
|
7812
|
-
import
|
|
7813
|
-
var TableRowContext =
|
|
7906
|
+
import React28 from "react";
|
|
7907
|
+
var TableRowContext = React28.createContext(null);
|
|
7814
7908
|
var useTableRowContext = () => {
|
|
7815
|
-
const ctx =
|
|
7909
|
+
const ctx = React28.useContext(TableRowContext);
|
|
7816
7910
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
7817
7911
|
return ctx;
|
|
7818
7912
|
};
|
|
7819
7913
|
var TableRowContext_default = TableRowContext;
|
|
7820
7914
|
|
|
7821
7915
|
// src/components/Table/TableCell.tsx
|
|
7822
|
-
import { jsx as
|
|
7916
|
+
import { jsx as jsx337 } from "react/jsx-runtime";
|
|
7823
7917
|
var TableCell = (props) => {
|
|
7824
7918
|
const {
|
|
7825
7919
|
children,
|
|
@@ -7831,9 +7925,9 @@ var TableCell = (props) => {
|
|
|
7831
7925
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
7832
7926
|
const { stickyShadow } = useTableContext();
|
|
7833
7927
|
const headContext = useTableHeadContext();
|
|
7834
|
-
const [left, setLeft] =
|
|
7835
|
-
const cellRef =
|
|
7836
|
-
const calculateLeft =
|
|
7928
|
+
const [left, setLeft] = React29.useState(0);
|
|
7929
|
+
const cellRef = React29.useRef(null);
|
|
7930
|
+
const calculateLeft = React29.useCallback(() => {
|
|
7837
7931
|
if (!cellRef.current) return 0;
|
|
7838
7932
|
let totalLeft = 0;
|
|
7839
7933
|
for (const ref of stickyCells) {
|
|
@@ -7842,7 +7936,7 @@ var TableCell = (props) => {
|
|
|
7842
7936
|
}
|
|
7843
7937
|
return totalLeft;
|
|
7844
7938
|
}, [stickyCells]);
|
|
7845
|
-
|
|
7939
|
+
React29.useEffect(() => {
|
|
7846
7940
|
if (!isSticky || !cellRef.current) return;
|
|
7847
7941
|
registerStickyCell(cellRef);
|
|
7848
7942
|
setLeft(calculateLeft());
|
|
@@ -7860,7 +7954,7 @@ var TableCell = (props) => {
|
|
|
7860
7954
|
const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
|
|
7861
7955
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
7862
7956
|
const enableHover = headContext && headContext.cellHover;
|
|
7863
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ jsx337(
|
|
7864
7958
|
CellTag,
|
|
7865
7959
|
{
|
|
7866
7960
|
ref: cellRef,
|
|
@@ -7882,21 +7976,21 @@ TableCell.displayName = "TableCell";
|
|
|
7882
7976
|
var TableCell_default = TableCell;
|
|
7883
7977
|
|
|
7884
7978
|
// src/components/Table/TableHead.tsx
|
|
7885
|
-
import { jsx as
|
|
7979
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
7886
7980
|
var TableHead = ({
|
|
7887
7981
|
children,
|
|
7888
7982
|
className = "",
|
|
7889
7983
|
cellHover = false
|
|
7890
7984
|
}) => {
|
|
7891
7985
|
const { headerSticky } = useTableContext();
|
|
7892
|
-
return /* @__PURE__ */
|
|
7986
|
+
return /* @__PURE__ */ jsx338(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx338("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
|
|
7893
7987
|
};
|
|
7894
7988
|
TableHead.displayName = "TableHead";
|
|
7895
7989
|
var TableHead_default = TableHead;
|
|
7896
7990
|
|
|
7897
7991
|
// src/components/Table/TableRow.tsx
|
|
7898
|
-
import
|
|
7899
|
-
import { jsx as
|
|
7992
|
+
import React30 from "react";
|
|
7993
|
+
import { jsx as jsx339 } from "react/jsx-runtime";
|
|
7900
7994
|
var TableRow = (props) => {
|
|
7901
7995
|
const {
|
|
7902
7996
|
children,
|
|
@@ -7909,7 +8003,7 @@ var TableRow = (props) => {
|
|
|
7909
8003
|
onClick
|
|
7910
8004
|
} = props;
|
|
7911
8005
|
const { rowBorderUse } = useTableContext();
|
|
7912
|
-
const [stickyCells, setStickyCells] =
|
|
8006
|
+
const [stickyCells, setStickyCells] = React30.useState([]);
|
|
7913
8007
|
const registerStickyCell = (ref) => {
|
|
7914
8008
|
setStickyCells((prev) => {
|
|
7915
8009
|
if (prev.includes(ref)) return prev;
|
|
@@ -7921,7 +8015,7 @@ var TableRow = (props) => {
|
|
|
7921
8015
|
color,
|
|
7922
8016
|
colorDepth ?? 500
|
|
7923
8017
|
);
|
|
7924
|
-
return /* @__PURE__ */
|
|
8018
|
+
return /* @__PURE__ */ jsx339(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx339(
|
|
7925
8019
|
"tr",
|
|
7926
8020
|
{
|
|
7927
8021
|
className: clsx_default(
|
|
@@ -7941,11 +8035,12 @@ TableRow.displayName = "TableRow";
|
|
|
7941
8035
|
var TableRow_default = TableRow;
|
|
7942
8036
|
|
|
7943
8037
|
// src/components/Tag/Tag.tsx
|
|
7944
|
-
import { jsx as
|
|
8038
|
+
import { jsx as jsx340, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
7945
8039
|
var Tag = (props) => {
|
|
7946
8040
|
const {
|
|
7947
8041
|
children,
|
|
7948
8042
|
onClose,
|
|
8043
|
+
size = "md",
|
|
7949
8044
|
colorNamespace = "xplat",
|
|
7950
8045
|
color = "neutral",
|
|
7951
8046
|
colorDepth,
|
|
@@ -7956,21 +8051,21 @@ var Tag = (props) => {
|
|
|
7956
8051
|
color,
|
|
7957
8052
|
colorDepth ?? 500
|
|
7958
8053
|
);
|
|
7959
|
-
return /* @__PURE__ */
|
|
7960
|
-
/* @__PURE__ */
|
|
7961
|
-
onClose && /* @__PURE__ */
|
|
8054
|
+
return /* @__PURE__ */ jsxs213("span", { className: clsx_default("lib-xplat-tag", size, colorClass, className), children: [
|
|
8055
|
+
/* @__PURE__ */ jsx340("span", { className: "tag-label", children }),
|
|
8056
|
+
onClose && /* @__PURE__ */ jsx340("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ jsx340(XIcon_default, {}) })
|
|
7962
8057
|
] });
|
|
7963
8058
|
};
|
|
7964
8059
|
Tag.displayName = "Tag";
|
|
7965
8060
|
var Tag_default = Tag;
|
|
7966
8061
|
|
|
7967
8062
|
// src/components/TextArea/TextArea.tsx
|
|
7968
|
-
import
|
|
7969
|
-
import { jsx as
|
|
7970
|
-
var TextArea =
|
|
8063
|
+
import React31 from "react";
|
|
8064
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
8065
|
+
var TextArea = React31.forwardRef(
|
|
7971
8066
|
(props, ref) => {
|
|
7972
8067
|
const { value, onChange, className, disabled, ...textareaProps } = props;
|
|
7973
|
-
const localRef =
|
|
8068
|
+
const localRef = React31.useRef(null);
|
|
7974
8069
|
const setRefs = (el) => {
|
|
7975
8070
|
localRef.current = el;
|
|
7976
8071
|
if (!ref) return;
|
|
@@ -7990,21 +8085,21 @@ var TextArea = React30.forwardRef(
|
|
|
7990
8085
|
onChange(event);
|
|
7991
8086
|
}
|
|
7992
8087
|
};
|
|
7993
|
-
|
|
8088
|
+
React31.useEffect(() => {
|
|
7994
8089
|
const el = localRef.current;
|
|
7995
8090
|
if (!el) return;
|
|
7996
8091
|
el.style.height = "0px";
|
|
7997
8092
|
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
7998
8093
|
el.style.height = `${nextHeight}px`;
|
|
7999
8094
|
}, [value]);
|
|
8000
|
-
return /* @__PURE__ */
|
|
8095
|
+
return /* @__PURE__ */ jsx341("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ jsx341(
|
|
8001
8096
|
"div",
|
|
8002
8097
|
{
|
|
8003
8098
|
className: clsx_default(
|
|
8004
8099
|
"lib-xplat-textarea",
|
|
8005
8100
|
disabled ? "disabled" : void 0
|
|
8006
8101
|
),
|
|
8007
|
-
children: /* @__PURE__ */
|
|
8102
|
+
children: /* @__PURE__ */ jsx341(
|
|
8008
8103
|
"textarea",
|
|
8009
8104
|
{
|
|
8010
8105
|
...textareaProps,
|
|
@@ -8022,25 +8117,25 @@ TextArea.displayName = "TextArea";
|
|
|
8022
8117
|
var TextArea_default = TextArea;
|
|
8023
8118
|
|
|
8024
8119
|
// src/components/Toast/Toast.tsx
|
|
8025
|
-
import
|
|
8120
|
+
import React32 from "react";
|
|
8026
8121
|
import { createPortal as createPortal3 } from "react-dom";
|
|
8027
|
-
import { jsx as
|
|
8028
|
-
var ToastContext =
|
|
8122
|
+
import { jsx as jsx342, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
8123
|
+
var ToastContext = React32.createContext(null);
|
|
8029
8124
|
var useToast = () => {
|
|
8030
|
-
const ctx =
|
|
8125
|
+
const ctx = React32.useContext(ToastContext);
|
|
8031
8126
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
8032
8127
|
return ctx;
|
|
8033
8128
|
};
|
|
8034
8129
|
var EXIT_DURATION = 300;
|
|
8035
8130
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
8036
|
-
const ref =
|
|
8037
|
-
const [height, setHeight] =
|
|
8038
|
-
|
|
8131
|
+
const ref = React32.useRef(null);
|
|
8132
|
+
const [height, setHeight] = React32.useState(void 0);
|
|
8133
|
+
React32.useEffect(() => {
|
|
8039
8134
|
if (ref.current && !isExiting) {
|
|
8040
8135
|
setHeight(ref.current.offsetHeight);
|
|
8041
8136
|
}
|
|
8042
8137
|
}, [isExiting]);
|
|
8043
|
-
return /* @__PURE__ */
|
|
8138
|
+
return /* @__PURE__ */ jsx342(
|
|
8044
8139
|
"div",
|
|
8045
8140
|
{
|
|
8046
8141
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -8048,15 +8143,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
8048
8143
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
8049
8144
|
marginBottom: isExiting ? 0 : void 0
|
|
8050
8145
|
},
|
|
8051
|
-
children: /* @__PURE__ */
|
|
8146
|
+
children: /* @__PURE__ */ jsxs214(
|
|
8052
8147
|
"div",
|
|
8053
8148
|
{
|
|
8054
8149
|
ref,
|
|
8055
8150
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
8056
8151
|
role: "alert",
|
|
8057
8152
|
children: [
|
|
8058
|
-
/* @__PURE__ */
|
|
8059
|
-
/* @__PURE__ */
|
|
8153
|
+
/* @__PURE__ */ jsx342("span", { className: "message", children: item.message }),
|
|
8154
|
+
/* @__PURE__ */ jsx342("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
8060
8155
|
]
|
|
8061
8156
|
}
|
|
8062
8157
|
)
|
|
@@ -8067,13 +8162,13 @@ var ToastProvider = ({
|
|
|
8067
8162
|
children,
|
|
8068
8163
|
position = "top-right"
|
|
8069
8164
|
}) => {
|
|
8070
|
-
const [toasts, setToasts] =
|
|
8071
|
-
const [removing, setRemoving] =
|
|
8072
|
-
const [mounted, setMounted] =
|
|
8073
|
-
|
|
8165
|
+
const [toasts, setToasts] = React32.useState([]);
|
|
8166
|
+
const [removing, setRemoving] = React32.useState(/* @__PURE__ */ new Set());
|
|
8167
|
+
const [mounted, setMounted] = React32.useState(false);
|
|
8168
|
+
React32.useEffect(() => {
|
|
8074
8169
|
setMounted(true);
|
|
8075
8170
|
}, []);
|
|
8076
|
-
const remove =
|
|
8171
|
+
const remove = React32.useCallback((id) => {
|
|
8077
8172
|
setRemoving((prev) => new Set(prev).add(id));
|
|
8078
8173
|
setTimeout(() => {
|
|
8079
8174
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -8084,7 +8179,7 @@ var ToastProvider = ({
|
|
|
8084
8179
|
});
|
|
8085
8180
|
}, EXIT_DURATION);
|
|
8086
8181
|
}, []);
|
|
8087
|
-
const toast =
|
|
8182
|
+
const toast = React32.useCallback(
|
|
8088
8183
|
(type, message, duration = 3e3) => {
|
|
8089
8184
|
const id = `${Date.now()}-${Math.random()}`;
|
|
8090
8185
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -8094,10 +8189,10 @@ var ToastProvider = ({
|
|
|
8094
8189
|
},
|
|
8095
8190
|
[remove]
|
|
8096
8191
|
);
|
|
8097
|
-
return /* @__PURE__ */
|
|
8192
|
+
return /* @__PURE__ */ jsxs214(ToastContext.Provider, { value: { toast }, children: [
|
|
8098
8193
|
children,
|
|
8099
8194
|
mounted && createPortal3(
|
|
8100
|
-
/* @__PURE__ */
|
|
8195
|
+
/* @__PURE__ */ jsx342("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx342(
|
|
8101
8196
|
ToastItemComponent,
|
|
8102
8197
|
{
|
|
8103
8198
|
item: t,
|
|
@@ -8113,8 +8208,8 @@ var ToastProvider = ({
|
|
|
8113
8208
|
ToastProvider.displayName = "ToastProvider";
|
|
8114
8209
|
|
|
8115
8210
|
// src/components/Tooltip/Tooltip.tsx
|
|
8116
|
-
import
|
|
8117
|
-
import { jsx as
|
|
8211
|
+
import React33 from "react";
|
|
8212
|
+
import { jsx as jsx343, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
8118
8213
|
var Tooltip2 = (props) => {
|
|
8119
8214
|
const {
|
|
8120
8215
|
type = "primary",
|
|
@@ -8124,24 +8219,24 @@ var Tooltip2 = (props) => {
|
|
|
8124
8219
|
description,
|
|
8125
8220
|
children
|
|
8126
8221
|
} = props;
|
|
8127
|
-
const iconRef =
|
|
8222
|
+
const iconRef = React33.useRef(null);
|
|
8128
8223
|
const colorClass = getColorClass(
|
|
8129
8224
|
colorNamespace,
|
|
8130
8225
|
color,
|
|
8131
8226
|
colorDepth ?? 500
|
|
8132
8227
|
);
|
|
8133
|
-
return /* @__PURE__ */
|
|
8134
|
-
/* @__PURE__ */
|
|
8135
|
-
/* @__PURE__ */
|
|
8228
|
+
return /* @__PURE__ */ jsxs215("div", { className: "lib-xplat-tooltip", children: [
|
|
8229
|
+
/* @__PURE__ */ jsx343("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
8230
|
+
/* @__PURE__ */ jsx343("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
|
|
8136
8231
|
] });
|
|
8137
8232
|
};
|
|
8138
8233
|
Tooltip2.displayName = "Tooltip";
|
|
8139
8234
|
var Tooltip_default = Tooltip2;
|
|
8140
8235
|
|
|
8141
8236
|
// src/components/Video/Video.tsx
|
|
8142
|
-
import
|
|
8143
|
-
import { jsx as
|
|
8144
|
-
var Video =
|
|
8237
|
+
import React34 from "react";
|
|
8238
|
+
import { jsx as jsx344, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
8239
|
+
var Video = React34.forwardRef((props, ref) => {
|
|
8145
8240
|
const {
|
|
8146
8241
|
src,
|
|
8147
8242
|
poster,
|
|
@@ -8155,10 +8250,10 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8155
8250
|
onPause,
|
|
8156
8251
|
...rest
|
|
8157
8252
|
} = props;
|
|
8158
|
-
const videoRef =
|
|
8159
|
-
const [isPlaying, setIsPlaying] =
|
|
8160
|
-
const [isLoaded, setIsLoaded] =
|
|
8161
|
-
const setRefs =
|
|
8253
|
+
const videoRef = React34.useRef(null);
|
|
8254
|
+
const [isPlaying, setIsPlaying] = React34.useState(Boolean(autoPlay));
|
|
8255
|
+
const [isLoaded, setIsLoaded] = React34.useState(false);
|
|
8256
|
+
const setRefs = React34.useCallback(
|
|
8162
8257
|
(el) => {
|
|
8163
8258
|
videoRef.current = el;
|
|
8164
8259
|
if (typeof ref === "function") ref(el);
|
|
@@ -8186,7 +8281,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8186
8281
|
}
|
|
8187
8282
|
};
|
|
8188
8283
|
const showCustomOverlay = !controls;
|
|
8189
|
-
return /* @__PURE__ */
|
|
8284
|
+
return /* @__PURE__ */ jsxs216(
|
|
8190
8285
|
"div",
|
|
8191
8286
|
{
|
|
8192
8287
|
className: clsx_default(
|
|
@@ -8195,7 +8290,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8195
8290
|
className
|
|
8196
8291
|
),
|
|
8197
8292
|
children: [
|
|
8198
|
-
/* @__PURE__ */
|
|
8293
|
+
/* @__PURE__ */ jsx344(
|
|
8199
8294
|
"video",
|
|
8200
8295
|
{
|
|
8201
8296
|
ref: setRefs,
|
|
@@ -8212,7 +8307,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8212
8307
|
...rest
|
|
8213
8308
|
}
|
|
8214
8309
|
),
|
|
8215
|
-
showCustomOverlay && /* @__PURE__ */
|
|
8310
|
+
showCustomOverlay && /* @__PURE__ */ jsx344(
|
|
8216
8311
|
"button",
|
|
8217
8312
|
{
|
|
8218
8313
|
type: "button",
|
|
@@ -8223,7 +8318,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8223
8318
|
),
|
|
8224
8319
|
onClick: togglePlay,
|
|
8225
8320
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
8226
|
-
children: isPlaying ? /* @__PURE__ */
|
|
8321
|
+
children: isPlaying ? /* @__PURE__ */ jsx344(PauseIcon_default, {}) : /* @__PURE__ */ jsx344("span", { className: "play-icon", children: /* @__PURE__ */ jsx344(PlayCircleIcon_default, {}) })
|
|
8227
8322
|
}
|
|
8228
8323
|
)
|
|
8229
8324
|
]
|
|
@@ -8234,25 +8329,25 @@ Video.displayName = "Video";
|
|
|
8234
8329
|
var Video_default = Video;
|
|
8235
8330
|
|
|
8236
8331
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
8237
|
-
import { jsx as
|
|
8332
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
8238
8333
|
var FullGrid = (props) => {
|
|
8239
8334
|
const { children, className } = props;
|
|
8240
|
-
return /* @__PURE__ */
|
|
8335
|
+
return /* @__PURE__ */ jsx345("div", { className: clsx_default("lib-xplat-full-grid", className), children });
|
|
8241
8336
|
};
|
|
8242
8337
|
FullGrid.displayName = "FullGrid";
|
|
8243
8338
|
var FullGrid_default = FullGrid;
|
|
8244
8339
|
|
|
8245
8340
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
8246
|
-
import { jsx as
|
|
8341
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
8247
8342
|
var FullScreen = (props) => {
|
|
8248
8343
|
const { children, className } = props;
|
|
8249
|
-
return /* @__PURE__ */
|
|
8344
|
+
return /* @__PURE__ */ jsx346("div", { className: clsx_default("lib-xplat-full-screen", className), children });
|
|
8250
8345
|
};
|
|
8251
8346
|
FullScreen.displayName = "FullScreen";
|
|
8252
8347
|
var FullScreen_default = FullScreen;
|
|
8253
8348
|
|
|
8254
8349
|
// src/layout/Grid/Item/Item.tsx
|
|
8255
|
-
import { jsx as
|
|
8350
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
8256
8351
|
var calculateSpans = (column) => {
|
|
8257
8352
|
const spans = {};
|
|
8258
8353
|
let inherited = column.default;
|
|
@@ -8269,35 +8364,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
8269
8364
|
Object.entries(spans).forEach(([key, value]) => {
|
|
8270
8365
|
style[`--column-${key}`] = value;
|
|
8271
8366
|
});
|
|
8272
|
-
return /* @__PURE__ */
|
|
8367
|
+
return /* @__PURE__ */ jsx347("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
8273
8368
|
};
|
|
8274
8369
|
GridItem.displayName = "GridItem";
|
|
8275
8370
|
var Item_default = GridItem;
|
|
8276
8371
|
|
|
8277
8372
|
// src/layout/Header/Header.tsx
|
|
8278
|
-
import { jsx as
|
|
8373
|
+
import { jsx as jsx348, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
8279
8374
|
var Header = ({
|
|
8280
8375
|
logo,
|
|
8281
8376
|
centerContent,
|
|
8282
8377
|
rightContent
|
|
8283
8378
|
}) => {
|
|
8284
|
-
return /* @__PURE__ */
|
|
8285
|
-
/* @__PURE__ */
|
|
8286
|
-
/* @__PURE__ */
|
|
8287
|
-
/* @__PURE__ */
|
|
8379
|
+
return /* @__PURE__ */ jsxs217("div", { className: "lib-xplat-layout-header", children: [
|
|
8380
|
+
/* @__PURE__ */ jsx348("div", { children: logo }),
|
|
8381
|
+
/* @__PURE__ */ jsx348("div", { children: centerContent }),
|
|
8382
|
+
/* @__PURE__ */ jsx348("div", { children: rightContent })
|
|
8288
8383
|
] });
|
|
8289
8384
|
};
|
|
8290
8385
|
Header.displayName = "Header";
|
|
8291
8386
|
var Header_default = Header;
|
|
8292
8387
|
|
|
8293
8388
|
// src/layout/Layout/Layout.tsx
|
|
8294
|
-
import { Fragment as Fragment2, jsx as
|
|
8389
|
+
import { Fragment as Fragment2, jsx as jsx349, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
8295
8390
|
var Layout = (props) => {
|
|
8296
8391
|
const { header, sideBar, children } = props;
|
|
8297
|
-
return /* @__PURE__ */
|
|
8298
|
-
sideBar && /* @__PURE__ */
|
|
8299
|
-
/* @__PURE__ */
|
|
8300
|
-
header && /* @__PURE__ */
|
|
8392
|
+
return /* @__PURE__ */ jsx349("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs218("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
8393
|
+
sideBar && /* @__PURE__ */ jsx349(Fragment2, { children: sideBar }),
|
|
8394
|
+
/* @__PURE__ */ jsxs218("div", { className: "lib-xplat-layout-content", children: [
|
|
8395
|
+
header && /* @__PURE__ */ jsx349("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
8301
8396
|
children
|
|
8302
8397
|
] })
|
|
8303
8398
|
] }) });
|
|
@@ -8306,31 +8401,31 @@ Layout.displayName = "Layout";
|
|
|
8306
8401
|
var Layout_default = Layout;
|
|
8307
8402
|
|
|
8308
8403
|
// src/layout/SideBar/SideBar.tsx
|
|
8309
|
-
import
|
|
8404
|
+
import React36 from "react";
|
|
8310
8405
|
|
|
8311
8406
|
// src/layout/SideBar/SideBarContext.tsx
|
|
8312
|
-
import
|
|
8313
|
-
var SideBarContext =
|
|
8407
|
+
import React35 from "react";
|
|
8408
|
+
var SideBarContext = React35.createContext(null);
|
|
8314
8409
|
var useSideBarContext = () => {
|
|
8315
|
-
const ctx =
|
|
8410
|
+
const ctx = React35.useContext(SideBarContext);
|
|
8316
8411
|
if (!ctx) throw new Error("Error");
|
|
8317
8412
|
return ctx;
|
|
8318
8413
|
};
|
|
8319
8414
|
var SideBarContext_default = SideBarContext;
|
|
8320
8415
|
|
|
8321
8416
|
// src/layout/SideBar/SideBar.tsx
|
|
8322
|
-
import { jsx as
|
|
8417
|
+
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
8323
8418
|
var SideBar = (props) => {
|
|
8324
8419
|
const { children, className } = props;
|
|
8325
|
-
const [isOpen, setIsOpen] =
|
|
8420
|
+
const [isOpen, setIsOpen] = React36.useState(true);
|
|
8326
8421
|
const handleSwitchSideBar = () => {
|
|
8327
8422
|
setIsOpen((prev) => !prev);
|
|
8328
8423
|
};
|
|
8329
|
-
return /* @__PURE__ */
|
|
8424
|
+
return /* @__PURE__ */ jsx350(
|
|
8330
8425
|
SideBarContext_default.Provider,
|
|
8331
8426
|
{
|
|
8332
8427
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
8333
|
-
children: /* @__PURE__ */
|
|
8428
|
+
children: /* @__PURE__ */ jsx350(
|
|
8334
8429
|
"div",
|
|
8335
8430
|
{
|
|
8336
8431
|
className: clsx_default(
|
|
@@ -8405,6 +8500,7 @@ export {
|
|
|
8405
8500
|
CameraIcon_default as CameraIcon,
|
|
8406
8501
|
CameraOffIcon_default as CameraOffIcon,
|
|
8407
8502
|
Card_default as Card,
|
|
8503
|
+
CardTab_default as CardTab,
|
|
8408
8504
|
CastIcon_default as CastIcon,
|
|
8409
8505
|
Chart_default as Chart,
|
|
8410
8506
|
CheckBox_default as CheckBox,
|