@x-plat/design-system 0.1.4 → 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 +21 -9
- package/dist/components/Select/index.css +38 -18
- package/dist/components/Select/index.d.cts +5 -0
- package/dist/components/Select/index.d.ts +5 -0
- package/dist/components/Select/index.js +21 -9
- 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 +3 -1
- package/dist/components/Switch/index.css +41 -751
- package/dist/components/Switch/index.d.cts +4 -118
- package/dist/components/Switch/index.d.ts +4 -118
- package/dist/components/Switch/index.js +3 -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 +456 -350
- package/dist/components/index.css +1278 -12612
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +454 -349
- package/dist/index.cjs +481 -374
- package/dist/index.css +1281 -12615
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +481 -373
- 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,29 +7009,38 @@ 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 {
|
|
6928
7016
|
placeholder = "\uC120\uD0DD\uD558\uC138\uC694",
|
|
7017
|
+
value: valueProp,
|
|
6929
7018
|
onChange,
|
|
6930
7019
|
children,
|
|
6931
7020
|
disabled = false,
|
|
6932
|
-
error = false
|
|
7021
|
+
error = false,
|
|
7022
|
+
size = "md"
|
|
6933
7023
|
} = props;
|
|
6934
|
-
const itemChildren =
|
|
6935
|
-
(child) =>
|
|
7024
|
+
const itemChildren = React17.Children.toArray(children).filter(
|
|
7025
|
+
(child) => React17.isValidElement(child) && child.type === SelectItem_default
|
|
6936
7026
|
);
|
|
6937
|
-
const
|
|
6938
|
-
const [
|
|
6939
|
-
const
|
|
6940
|
-
const
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
7027
|
+
const isControlled = valueProp !== void 0;
|
|
7028
|
+
const [isOpen, setOpen] = React17.useState(false);
|
|
7029
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React17.useState(null);
|
|
7030
|
+
const controlledLabel = React17.useMemo(() => {
|
|
7031
|
+
if (!isControlled) return null;
|
|
7032
|
+
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
7033
|
+
return match ? match.props.children : null;
|
|
7034
|
+
}, [isControlled, valueProp, itemChildren]);
|
|
7035
|
+
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
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(() => {
|
|
6944
7041
|
if (disabled && isOpen) setOpen(false);
|
|
6945
7042
|
}, [disabled, isOpen]);
|
|
6946
|
-
|
|
7043
|
+
React17.useEffect(() => {
|
|
6947
7044
|
if (isOpen) {
|
|
6948
7045
|
setMounted(true);
|
|
6949
7046
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6953,19 +7050,21 @@ var SelectRoot = (props) => {
|
|
|
6953
7050
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
6954
7051
|
return () => clearTimeout(t);
|
|
6955
7052
|
}, [isOpen]);
|
|
6956
|
-
const open =
|
|
6957
|
-
const close =
|
|
6958
|
-
const toggle =
|
|
7053
|
+
const open = React17.useCallback(() => setOpen(true), []);
|
|
7054
|
+
const close = React17.useCallback(() => setOpen(false), []);
|
|
7055
|
+
const toggle = React17.useCallback(() => setOpen((prev) => !prev), []);
|
|
6959
7056
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
6960
7057
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
6961
|
-
const setSelected =
|
|
6962
|
-
(label,
|
|
6963
|
-
|
|
6964
|
-
|
|
7058
|
+
const setSelected = React17.useCallback(
|
|
7059
|
+
(label, itemValue) => {
|
|
7060
|
+
if (!isControlled) {
|
|
7061
|
+
setUncontrolledLabel(label);
|
|
7062
|
+
}
|
|
7063
|
+
onChange?.(itemValue, label);
|
|
6965
7064
|
},
|
|
6966
|
-
[onChange]
|
|
7065
|
+
[isControlled, onChange]
|
|
6967
7066
|
);
|
|
6968
|
-
const
|
|
7067
|
+
const ctxValue = React17.useMemo(
|
|
6969
7068
|
() => ({
|
|
6970
7069
|
isOpen,
|
|
6971
7070
|
mounted,
|
|
@@ -6986,17 +7085,18 @@ var SelectRoot = (props) => {
|
|
|
6986
7085
|
if (disabled) return;
|
|
6987
7086
|
toggle();
|
|
6988
7087
|
};
|
|
6989
|
-
return /* @__PURE__ */
|
|
7088
|
+
return /* @__PURE__ */ jsx321(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs204(
|
|
6990
7089
|
"div",
|
|
6991
7090
|
{
|
|
6992
7091
|
className: clsx_default(
|
|
6993
7092
|
"lib-xplat-select",
|
|
7093
|
+
size,
|
|
6994
7094
|
disabled && "disabled",
|
|
6995
7095
|
error && "error",
|
|
6996
7096
|
mounted && "is-open"
|
|
6997
7097
|
),
|
|
6998
7098
|
children: [
|
|
6999
|
-
/* @__PURE__ */
|
|
7099
|
+
/* @__PURE__ */ jsxs204(
|
|
7000
7100
|
"div",
|
|
7001
7101
|
{
|
|
7002
7102
|
ref: triggerRef,
|
|
@@ -7020,7 +7120,7 @@ var SelectRoot = (props) => {
|
|
|
7020
7120
|
}
|
|
7021
7121
|
},
|
|
7022
7122
|
children: [
|
|
7023
|
-
/* @__PURE__ */
|
|
7123
|
+
/* @__PURE__ */ jsx321(
|
|
7024
7124
|
"span",
|
|
7025
7125
|
{
|
|
7026
7126
|
className: clsx_default(
|
|
@@ -7030,18 +7130,18 @@ var SelectRoot = (props) => {
|
|
|
7030
7130
|
children: selectedLabel ?? placeholder
|
|
7031
7131
|
}
|
|
7032
7132
|
),
|
|
7033
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ jsx321(
|
|
7034
7134
|
"span",
|
|
7035
7135
|
{
|
|
7036
7136
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
7037
7137
|
"aria-hidden": true,
|
|
7038
|
-
children: /* @__PURE__ */
|
|
7138
|
+
children: /* @__PURE__ */ jsx321(ChevronDownIcon_default, {})
|
|
7039
7139
|
}
|
|
7040
7140
|
)
|
|
7041
7141
|
]
|
|
7042
7142
|
}
|
|
7043
7143
|
),
|
|
7044
|
-
mounted && /* @__PURE__ */
|
|
7144
|
+
mounted && /* @__PURE__ */ jsx321(
|
|
7045
7145
|
"div",
|
|
7046
7146
|
{
|
|
7047
7147
|
className: clsx_default("select-content", position.direction, stateClass),
|
|
@@ -7062,10 +7162,10 @@ var Select = Object.assign(SelectRoot, {
|
|
|
7062
7162
|
var Select_default = Select;
|
|
7063
7163
|
|
|
7064
7164
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7065
|
-
import
|
|
7165
|
+
import React19 from "react";
|
|
7066
7166
|
|
|
7067
7167
|
// src/components/HtmlTypeWriter/utils.ts
|
|
7068
|
-
import
|
|
7168
|
+
import React18 from "react";
|
|
7069
7169
|
var voidTags = /* @__PURE__ */ new Set([
|
|
7070
7170
|
"br",
|
|
7071
7171
|
"img",
|
|
@@ -7133,40 +7233,40 @@ function convertNodeToReactWithRange(node, typedLen, rangeMap) {
|
|
|
7133
7233
|
props[attr.name] = attr.value;
|
|
7134
7234
|
});
|
|
7135
7235
|
if (voidTags.has(tag)) {
|
|
7136
|
-
return
|
|
7236
|
+
return React18.createElement(tag, props);
|
|
7137
7237
|
}
|
|
7138
7238
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
7139
|
-
return
|
|
7239
|
+
return React18.createElement(tag, props, ...children);
|
|
7140
7240
|
}
|
|
7141
7241
|
function htmlToReactProgressive(root, typedLen, rangeMap) {
|
|
7142
7242
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
7143
7243
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
7144
|
-
return node == null ? null :
|
|
7244
|
+
return node == null ? null : React18.createElement(React18.Fragment, { key: idx }, node);
|
|
7145
7245
|
}).filter(Boolean);
|
|
7146
7246
|
return nodes.length === 0 ? null : nodes;
|
|
7147
7247
|
}
|
|
7148
7248
|
|
|
7149
7249
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
7150
|
-
import { jsx as
|
|
7250
|
+
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
7151
7251
|
var HtmlTypeWriter = ({
|
|
7152
7252
|
html,
|
|
7153
7253
|
duration = 20,
|
|
7154
7254
|
onDone,
|
|
7155
7255
|
onChange
|
|
7156
7256
|
}) => {
|
|
7157
|
-
const [typedLen, setTypedLen] =
|
|
7158
|
-
const doneCalledRef =
|
|
7159
|
-
const { doc, rangeMap, totalLength } =
|
|
7257
|
+
const [typedLen, setTypedLen] = React19.useState(0);
|
|
7258
|
+
const doneCalledRef = React19.useRef(false);
|
|
7259
|
+
const { doc, rangeMap, totalLength } = React19.useMemo(() => {
|
|
7160
7260
|
const decoded = decodeHtmlEntities(html);
|
|
7161
7261
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
7162
7262
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
7163
7263
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
7164
7264
|
}, [html]);
|
|
7165
|
-
|
|
7265
|
+
React19.useEffect(() => {
|
|
7166
7266
|
setTypedLen(0);
|
|
7167
7267
|
doneCalledRef.current = false;
|
|
7168
7268
|
}, [html]);
|
|
7169
|
-
|
|
7269
|
+
React19.useEffect(() => {
|
|
7170
7270
|
if (!totalLength) return;
|
|
7171
7271
|
if (typedLen >= totalLength) return;
|
|
7172
7272
|
const timer = window.setInterval(() => {
|
|
@@ -7174,33 +7274,33 @@ var HtmlTypeWriter = ({
|
|
|
7174
7274
|
}, duration);
|
|
7175
7275
|
return () => window.clearInterval(timer);
|
|
7176
7276
|
}, [typedLen, totalLength, duration]);
|
|
7177
|
-
|
|
7277
|
+
React19.useEffect(() => {
|
|
7178
7278
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
7179
7279
|
onChange?.();
|
|
7180
7280
|
}
|
|
7181
7281
|
}, [typedLen, totalLength, onChange]);
|
|
7182
|
-
|
|
7282
|
+
React19.useEffect(() => {
|
|
7183
7283
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
7184
7284
|
doneCalledRef.current = true;
|
|
7185
7285
|
onDone?.();
|
|
7186
7286
|
}
|
|
7187
7287
|
}, [typedLen, totalLength, onDone]);
|
|
7188
|
-
const parsed =
|
|
7288
|
+
const parsed = React19.useMemo(
|
|
7189
7289
|
() => htmlToReactProgressive(doc.body, typedLen, rangeMap),
|
|
7190
7290
|
[doc.body, typedLen, rangeMap]
|
|
7191
7291
|
);
|
|
7192
|
-
return /* @__PURE__ */
|
|
7292
|
+
return /* @__PURE__ */ jsx322("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
7193
7293
|
};
|
|
7194
7294
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
7195
7295
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
7196
7296
|
|
|
7197
7297
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
7198
|
-
import
|
|
7199
|
-
import { jsx as
|
|
7298
|
+
import React20 from "react";
|
|
7299
|
+
import { jsx as jsx323, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
7200
7300
|
var ImageSelector = (props) => {
|
|
7201
7301
|
const { value, label, onChange } = props;
|
|
7202
|
-
const [previewUrl, setPreviewUrl] =
|
|
7203
|
-
|
|
7302
|
+
const [previewUrl, setPreviewUrl] = React20.useState();
|
|
7303
|
+
React20.useEffect(() => {
|
|
7204
7304
|
if (!value) {
|
|
7205
7305
|
setPreviewUrl(void 0);
|
|
7206
7306
|
return;
|
|
@@ -7209,7 +7309,7 @@ var ImageSelector = (props) => {
|
|
|
7209
7309
|
setPreviewUrl(url);
|
|
7210
7310
|
return () => URL.revokeObjectURL(url);
|
|
7211
7311
|
}, [value]);
|
|
7212
|
-
const inputRef =
|
|
7312
|
+
const inputRef = React20.useRef(null);
|
|
7213
7313
|
const handleFileChange = (e) => {
|
|
7214
7314
|
const selectedFile = e.target.files?.[0];
|
|
7215
7315
|
if (selectedFile) {
|
|
@@ -7222,8 +7322,8 @@ var ImageSelector = (props) => {
|
|
|
7222
7322
|
const handleOpenFileDialog = () => {
|
|
7223
7323
|
inputRef.current?.click();
|
|
7224
7324
|
};
|
|
7225
|
-
return /* @__PURE__ */
|
|
7226
|
-
/* @__PURE__ */
|
|
7325
|
+
return /* @__PURE__ */ jsxs205("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
7326
|
+
/* @__PURE__ */ jsx323(
|
|
7227
7327
|
"input",
|
|
7228
7328
|
{
|
|
7229
7329
|
type: "file",
|
|
@@ -7233,13 +7333,13 @@ var ImageSelector = (props) => {
|
|
|
7233
7333
|
ref: inputRef
|
|
7234
7334
|
}
|
|
7235
7335
|
),
|
|
7236
|
-
value && /* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
/* @__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, {}) })
|
|
7239
7339
|
] }),
|
|
7240
|
-
/* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7242
|
-
/* @__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" })
|
|
7243
7343
|
] }) })
|
|
7244
7344
|
] });
|
|
7245
7345
|
};
|
|
@@ -7247,7 +7347,7 @@ ImageSelector.displayName = "ImageSelector";
|
|
|
7247
7347
|
var ImageSelector_default = ImageSelector;
|
|
7248
7348
|
|
|
7249
7349
|
// src/components/Pagination/Pagination.tsx
|
|
7250
|
-
import { jsx as
|
|
7350
|
+
import { jsx as jsx324, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
7251
7351
|
function getPageRange(current, totalPages, siblingCount) {
|
|
7252
7352
|
const totalNumbers = siblingCount * 2 + 5;
|
|
7253
7353
|
if (totalPages <= totalNumbers) {
|
|
@@ -7280,6 +7380,7 @@ var Pagination = (props) => {
|
|
|
7280
7380
|
pageSize = 10,
|
|
7281
7381
|
siblingCount = 1,
|
|
7282
7382
|
onChange,
|
|
7383
|
+
size = "md",
|
|
7283
7384
|
colorNamespace = "xplat",
|
|
7284
7385
|
color = "blue",
|
|
7285
7386
|
colorDepth,
|
|
@@ -7297,19 +7398,19 @@ var Pagination = (props) => {
|
|
|
7297
7398
|
onChange?.(page);
|
|
7298
7399
|
}
|
|
7299
7400
|
};
|
|
7300
|
-
return /* @__PURE__ */
|
|
7301
|
-
/* @__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(
|
|
7302
7403
|
"button",
|
|
7303
7404
|
{
|
|
7304
7405
|
className: "page-btn prev",
|
|
7305
7406
|
disabled: current <= 1,
|
|
7306
7407
|
onClick: () => handleClick(current - 1),
|
|
7307
7408
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
7308
|
-
children: /* @__PURE__ */
|
|
7409
|
+
children: /* @__PURE__ */ jsx324(ChevronLeftIcon_default, {})
|
|
7309
7410
|
}
|
|
7310
7411
|
),
|
|
7311
7412
|
pages.map(
|
|
7312
|
-
(page, i) => page === "..." ? /* @__PURE__ */
|
|
7413
|
+
(page, i) => page === "..." ? /* @__PURE__ */ jsx324("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx324(
|
|
7313
7414
|
"button",
|
|
7314
7415
|
{
|
|
7315
7416
|
className: clsx_default("page-btn", colorClass, { active: page === current }),
|
|
@@ -7320,14 +7421,14 @@ var Pagination = (props) => {
|
|
|
7320
7421
|
page
|
|
7321
7422
|
)
|
|
7322
7423
|
),
|
|
7323
|
-
/* @__PURE__ */
|
|
7424
|
+
/* @__PURE__ */ jsx324(
|
|
7324
7425
|
"button",
|
|
7325
7426
|
{
|
|
7326
7427
|
className: "page-btn next",
|
|
7327
7428
|
disabled: current >= totalPages,
|
|
7328
7429
|
onClick: () => handleClick(current + 1),
|
|
7329
7430
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
7330
|
-
children: /* @__PURE__ */
|
|
7431
|
+
children: /* @__PURE__ */ jsx324(ChevronRightIcon_default, {})
|
|
7331
7432
|
}
|
|
7332
7433
|
)
|
|
7333
7434
|
] });
|
|
@@ -7336,17 +7437,17 @@ Pagination.displayName = "Pagination";
|
|
|
7336
7437
|
var Pagination_default = Pagination;
|
|
7337
7438
|
|
|
7338
7439
|
// src/components/PopOver/PopOver.tsx
|
|
7339
|
-
import
|
|
7340
|
-
import { jsx as
|
|
7440
|
+
import React21 from "react";
|
|
7441
|
+
import { jsx as jsx325, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
7341
7442
|
var PopOver = (props) => {
|
|
7342
7443
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
7343
|
-
const popRef =
|
|
7344
|
-
const triggerRef =
|
|
7345
|
-
const [localOpen, setLocalOpen] =
|
|
7346
|
-
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);
|
|
7347
7448
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
7348
7449
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
7349
|
-
|
|
7450
|
+
React21.useEffect(() => {
|
|
7350
7451
|
if (isOpen) {
|
|
7351
7452
|
setLocalOpen(isOpen);
|
|
7352
7453
|
setTimeout(() => {
|
|
@@ -7359,7 +7460,7 @@ var PopOver = (props) => {
|
|
|
7359
7460
|
}, 200);
|
|
7360
7461
|
}
|
|
7361
7462
|
}, [isOpen]);
|
|
7362
|
-
return /* @__PURE__ */
|
|
7463
|
+
return /* @__PURE__ */ jsxs207(
|
|
7363
7464
|
"div",
|
|
7364
7465
|
{
|
|
7365
7466
|
className: "lib-xplat-pop-over",
|
|
@@ -7369,7 +7470,7 @@ var PopOver = (props) => {
|
|
|
7369
7470
|
},
|
|
7370
7471
|
children: [
|
|
7371
7472
|
children,
|
|
7372
|
-
localOpen && /* @__PURE__ */
|
|
7473
|
+
localOpen && /* @__PURE__ */ jsx325(
|
|
7373
7474
|
"div",
|
|
7374
7475
|
{
|
|
7375
7476
|
className: clsx_default(
|
|
@@ -7392,7 +7493,7 @@ PopOver.displayName = "PopOver";
|
|
|
7392
7493
|
var PopOver_default = PopOver;
|
|
7393
7494
|
|
|
7394
7495
|
// src/components/Progress/Progress.tsx
|
|
7395
|
-
import { jsx as
|
|
7496
|
+
import { jsx as jsx326, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
7396
7497
|
var Progress = (props) => {
|
|
7397
7498
|
const {
|
|
7398
7499
|
value,
|
|
@@ -7410,8 +7511,8 @@ var Progress = (props) => {
|
|
|
7410
7511
|
colorDepth ?? 500
|
|
7411
7512
|
);
|
|
7412
7513
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
7413
|
-
return /* @__PURE__ */
|
|
7414
|
-
/* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ jsxs208("div", { className: clsx_default("lib-xplat-progress", size, className), children: [
|
|
7515
|
+
/* @__PURE__ */ jsx326(
|
|
7415
7516
|
"div",
|
|
7416
7517
|
{
|
|
7417
7518
|
className: "track",
|
|
@@ -7419,7 +7520,7 @@ var Progress = (props) => {
|
|
|
7419
7520
|
"aria-valuenow": value,
|
|
7420
7521
|
"aria-valuemin": 0,
|
|
7421
7522
|
"aria-valuemax": max,
|
|
7422
|
-
children: /* @__PURE__ */
|
|
7523
|
+
children: /* @__PURE__ */ jsx326(
|
|
7423
7524
|
"div",
|
|
7424
7525
|
{
|
|
7425
7526
|
className: clsx_default("bar", colorClass),
|
|
@@ -7428,7 +7529,7 @@ var Progress = (props) => {
|
|
|
7428
7529
|
)
|
|
7429
7530
|
}
|
|
7430
7531
|
),
|
|
7431
|
-
showLabel && /* @__PURE__ */
|
|
7532
|
+
showLabel && /* @__PURE__ */ jsxs208("span", { className: "label", children: [
|
|
7432
7533
|
Math.round(percentage),
|
|
7433
7534
|
"%"
|
|
7434
7535
|
] })
|
|
@@ -7438,17 +7539,17 @@ Progress.displayName = "Progress";
|
|
|
7438
7539
|
var Progress_default = Progress;
|
|
7439
7540
|
|
|
7440
7541
|
// src/components/Radio/RadioGroupContext.tsx
|
|
7441
|
-
import
|
|
7442
|
-
var RadioGroupContext =
|
|
7542
|
+
import React22 from "react";
|
|
7543
|
+
var RadioGroupContext = React22.createContext(
|
|
7443
7544
|
null
|
|
7444
7545
|
);
|
|
7445
7546
|
var useRadioGroupContext = () => {
|
|
7446
|
-
return
|
|
7547
|
+
return React22.useContext(RadioGroupContext);
|
|
7447
7548
|
};
|
|
7448
7549
|
var RadioGroupContext_default = RadioGroupContext;
|
|
7449
7550
|
|
|
7450
7551
|
// src/components/Radio/Radio.tsx
|
|
7451
|
-
import { jsx as
|
|
7552
|
+
import { jsx as jsx327, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
7452
7553
|
var Radio = (props) => {
|
|
7453
7554
|
const {
|
|
7454
7555
|
label,
|
|
@@ -7457,9 +7558,11 @@ var Radio = (props) => {
|
|
|
7457
7558
|
colorNamespace = "xplat",
|
|
7458
7559
|
color = "blue",
|
|
7459
7560
|
colorDepth,
|
|
7561
|
+
size: sizeProp,
|
|
7460
7562
|
...rest
|
|
7461
7563
|
} = props;
|
|
7462
7564
|
const context = useRadioGroupContext();
|
|
7565
|
+
const size = sizeProp ?? context?.size ?? "md";
|
|
7463
7566
|
const isGroup = !!context;
|
|
7464
7567
|
const localChecked = isGroup ? context.value === value : rest.checked ?? false;
|
|
7465
7568
|
const inputProps = context ? { name: context.name, value, onChange: context.onChange } : {
|
|
@@ -7472,17 +7575,18 @@ var Radio = (props) => {
|
|
|
7472
7575
|
color,
|
|
7473
7576
|
colorDepth ?? 500
|
|
7474
7577
|
);
|
|
7475
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsxs209(
|
|
7476
7579
|
"label",
|
|
7477
7580
|
{
|
|
7478
7581
|
className: clsx_default(
|
|
7479
7582
|
"lib-xplat-radio",
|
|
7583
|
+
size,
|
|
7480
7584
|
localChecked ? "checked" : void 0,
|
|
7481
7585
|
className
|
|
7482
7586
|
),
|
|
7483
7587
|
children: [
|
|
7484
|
-
/* @__PURE__ */
|
|
7485
|
-
/* @__PURE__ */
|
|
7588
|
+
/* @__PURE__ */ jsx327("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
7589
|
+
/* @__PURE__ */ jsx327(
|
|
7486
7590
|
"div",
|
|
7487
7591
|
{
|
|
7488
7592
|
className: clsx_default(
|
|
@@ -7490,10 +7594,10 @@ var Radio = (props) => {
|
|
|
7490
7594
|
localChecked ? "checked" : void 0,
|
|
7491
7595
|
colorClass
|
|
7492
7596
|
),
|
|
7493
|
-
children: localChecked && /* @__PURE__ */
|
|
7597
|
+
children: localChecked && /* @__PURE__ */ jsx327("div", { className: "inner-circle" })
|
|
7494
7598
|
}
|
|
7495
7599
|
),
|
|
7496
|
-
label && /* @__PURE__ */
|
|
7600
|
+
label && /* @__PURE__ */ jsx327("span", { children: label })
|
|
7497
7601
|
]
|
|
7498
7602
|
}
|
|
7499
7603
|
);
|
|
@@ -7502,23 +7606,23 @@ Radio.displayName = "Radio";
|
|
|
7502
7606
|
var Radio_default = Radio;
|
|
7503
7607
|
|
|
7504
7608
|
// src/components/Radio/RadioGroup.tsx
|
|
7505
|
-
import { Fragment, jsx as
|
|
7609
|
+
import { Fragment, jsx as jsx328 } from "react/jsx-runtime";
|
|
7506
7610
|
var RadioGroup = (props) => {
|
|
7507
7611
|
const { children, ...rest } = props;
|
|
7508
|
-
return /* @__PURE__ */
|
|
7612
|
+
return /* @__PURE__ */ jsx328(Fragment, { children: /* @__PURE__ */ jsx328(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
7509
7613
|
};
|
|
7510
7614
|
RadioGroup.displayName = "RadioGroup";
|
|
7511
7615
|
var RadioGroup_default = RadioGroup;
|
|
7512
7616
|
|
|
7513
7617
|
// src/components/Skeleton/Skeleton.tsx
|
|
7514
|
-
import { jsx as
|
|
7618
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
7515
7619
|
var Skeleton = (props) => {
|
|
7516
7620
|
const { variant = "text", width, height, className } = props;
|
|
7517
7621
|
const style = {
|
|
7518
7622
|
width: typeof width === "number" ? `${width}px` : width,
|
|
7519
7623
|
height: typeof height === "number" ? `${height}px` : height
|
|
7520
7624
|
};
|
|
7521
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ jsx329(
|
|
7522
7626
|
"div",
|
|
7523
7627
|
{
|
|
7524
7628
|
className: clsx_default("lib-xplat-skeleton", variant, className),
|
|
@@ -7531,7 +7635,7 @@ Skeleton.displayName = "Skeleton";
|
|
|
7531
7635
|
var Skeleton_default = Skeleton;
|
|
7532
7636
|
|
|
7533
7637
|
// src/components/Spinner/Spinner.tsx
|
|
7534
|
-
import { jsx as
|
|
7638
|
+
import { jsx as jsx330, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
7535
7639
|
var Spinner = (props) => {
|
|
7536
7640
|
const {
|
|
7537
7641
|
size = "md",
|
|
@@ -7545,14 +7649,14 @@ var Spinner = (props) => {
|
|
|
7545
7649
|
color,
|
|
7546
7650
|
colorDepth ?? 500
|
|
7547
7651
|
);
|
|
7548
|
-
return /* @__PURE__ */
|
|
7652
|
+
return /* @__PURE__ */ jsx330(
|
|
7549
7653
|
"div",
|
|
7550
7654
|
{
|
|
7551
7655
|
className: clsx_default("lib-xplat-spinner", size, colorClass, className),
|
|
7552
7656
|
role: "status",
|
|
7553
7657
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
7554
|
-
children: /* @__PURE__ */
|
|
7555
|
-
/* @__PURE__ */
|
|
7658
|
+
children: /* @__PURE__ */ jsxs210("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
7659
|
+
/* @__PURE__ */ jsx330(
|
|
7556
7660
|
"circle",
|
|
7557
7661
|
{
|
|
7558
7662
|
className: "track",
|
|
@@ -7562,7 +7666,7 @@ var Spinner = (props) => {
|
|
|
7562
7666
|
strokeWidth: "3"
|
|
7563
7667
|
}
|
|
7564
7668
|
),
|
|
7565
|
-
/* @__PURE__ */
|
|
7669
|
+
/* @__PURE__ */ jsx330(
|
|
7566
7670
|
"circle",
|
|
7567
7671
|
{
|
|
7568
7672
|
className: "indicator",
|
|
@@ -7581,7 +7685,7 @@ Spinner.displayName = "Spinner";
|
|
|
7581
7685
|
var Spinner_default = Spinner;
|
|
7582
7686
|
|
|
7583
7687
|
// src/components/Steps/Steps.tsx
|
|
7584
|
-
import { jsx as
|
|
7688
|
+
import { jsx as jsx331, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
7585
7689
|
var Steps = (props) => {
|
|
7586
7690
|
const {
|
|
7587
7691
|
items,
|
|
@@ -7596,16 +7700,16 @@ var Steps = (props) => {
|
|
|
7596
7700
|
color,
|
|
7597
7701
|
colorDepth ?? 500
|
|
7598
7702
|
);
|
|
7599
|
-
return /* @__PURE__ */
|
|
7703
|
+
return /* @__PURE__ */ jsx331("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index) => {
|
|
7600
7704
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
7601
|
-
return /* @__PURE__ */
|
|
7602
|
-
/* @__PURE__ */
|
|
7603
|
-
/* @__PURE__ */
|
|
7604
|
-
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) })
|
|
7605
7709
|
] }),
|
|
7606
|
-
/* @__PURE__ */
|
|
7607
|
-
/* @__PURE__ */
|
|
7608
|
-
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 })
|
|
7609
7713
|
] })
|
|
7610
7714
|
] }, index);
|
|
7611
7715
|
}) });
|
|
@@ -7614,12 +7718,13 @@ Steps.displayName = "Steps";
|
|
|
7614
7718
|
var Steps_default = Steps;
|
|
7615
7719
|
|
|
7616
7720
|
// src/components/Switch/Switch.tsx
|
|
7617
|
-
import
|
|
7618
|
-
import { jsx as
|
|
7721
|
+
import React23 from "react";
|
|
7722
|
+
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
7619
7723
|
var KNOB_TRANSITION_MS = 250;
|
|
7620
7724
|
var Switch = (props) => {
|
|
7621
7725
|
const {
|
|
7622
7726
|
value,
|
|
7727
|
+
size = "md",
|
|
7623
7728
|
disabled,
|
|
7624
7729
|
onChange,
|
|
7625
7730
|
colorNamespace = "xplat",
|
|
@@ -7627,9 +7732,9 @@ var Switch = (props) => {
|
|
|
7627
7732
|
colorDepth,
|
|
7628
7733
|
className
|
|
7629
7734
|
} = props;
|
|
7630
|
-
const [isAnimating, setIsAnimating] =
|
|
7631
|
-
const timeoutRef =
|
|
7632
|
-
|
|
7735
|
+
const [isAnimating, setIsAnimating] = React23.useState(false);
|
|
7736
|
+
const timeoutRef = React23.useRef(null);
|
|
7737
|
+
React23.useEffect(() => {
|
|
7633
7738
|
return () => {
|
|
7634
7739
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
7635
7740
|
};
|
|
@@ -7649,11 +7754,12 @@ var Switch = (props) => {
|
|
|
7649
7754
|
color,
|
|
7650
7755
|
colorDepth ?? 500
|
|
7651
7756
|
);
|
|
7652
|
-
return /* @__PURE__ */
|
|
7757
|
+
return /* @__PURE__ */ jsx332(
|
|
7653
7758
|
"div",
|
|
7654
7759
|
{
|
|
7655
7760
|
className: clsx_default(
|
|
7656
7761
|
"lib-xplat-switch",
|
|
7762
|
+
size,
|
|
7657
7763
|
value ? "checked" : void 0,
|
|
7658
7764
|
disabled && "disabled",
|
|
7659
7765
|
isAnimating && "animating",
|
|
@@ -7662,7 +7768,7 @@ var Switch = (props) => {
|
|
|
7662
7768
|
),
|
|
7663
7769
|
onClick: handleClick,
|
|
7664
7770
|
"aria-disabled": disabled || isAnimating,
|
|
7665
|
-
children: /* @__PURE__ */
|
|
7771
|
+
children: /* @__PURE__ */ jsx332("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
7666
7772
|
}
|
|
7667
7773
|
);
|
|
7668
7774
|
};
|
|
@@ -7670,14 +7776,14 @@ Switch.displayName = "Switch";
|
|
|
7670
7776
|
var Switch_default = Switch;
|
|
7671
7777
|
|
|
7672
7778
|
// src/components/Tab/Tab.tsx
|
|
7673
|
-
import
|
|
7779
|
+
import React25 from "react";
|
|
7674
7780
|
|
|
7675
7781
|
// src/components/Tab/TabItem.tsx
|
|
7676
|
-
import
|
|
7677
|
-
import { jsx as
|
|
7678
|
-
var TabItem =
|
|
7782
|
+
import React24 from "react";
|
|
7783
|
+
import { jsx as jsx333 } from "react/jsx-runtime";
|
|
7784
|
+
var TabItem = React24.forwardRef((props, ref) => {
|
|
7679
7785
|
const { isActive, title, onClick } = props;
|
|
7680
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsx333(
|
|
7681
7787
|
"div",
|
|
7682
7788
|
{
|
|
7683
7789
|
ref,
|
|
@@ -7691,25 +7797,25 @@ TabItem.displayName = "TabItem";
|
|
|
7691
7797
|
var TabItem_default = TabItem;
|
|
7692
7798
|
|
|
7693
7799
|
// src/components/Tab/Tab.tsx
|
|
7694
|
-
import { jsx as
|
|
7800
|
+
import { jsx as jsx334, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
7695
7801
|
var Tab = (props) => {
|
|
7696
|
-
const { activeIndex, onChange, tabs, type } = props;
|
|
7697
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
7802
|
+
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
7803
|
+
const [underlineStyle, setUnderlineStyle] = React25.useState({
|
|
7698
7804
|
left: 0,
|
|
7699
7805
|
width: 0
|
|
7700
7806
|
});
|
|
7701
|
-
const itemRefs =
|
|
7807
|
+
const itemRefs = React25.useRef([]);
|
|
7702
7808
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
7703
7809
|
onChange(tabItem, tabIdx);
|
|
7704
7810
|
};
|
|
7705
|
-
|
|
7811
|
+
React25.useEffect(() => {
|
|
7706
7812
|
const el = itemRefs.current[activeIndex];
|
|
7707
7813
|
if (el) {
|
|
7708
7814
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
7709
7815
|
}
|
|
7710
7816
|
}, [activeIndex, tabs.length]);
|
|
7711
|
-
return /* @__PURE__ */
|
|
7712
|
-
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(
|
|
7713
7819
|
TabItem_default,
|
|
7714
7820
|
{
|
|
7715
7821
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -7721,7 +7827,7 @@ var Tab = (props) => {
|
|
|
7721
7827
|
},
|
|
7722
7828
|
`${tab.value}_${idx}`
|
|
7723
7829
|
)),
|
|
7724
|
-
type === "toggle" && /* @__PURE__ */
|
|
7830
|
+
type === "toggle" && /* @__PURE__ */ jsx334(
|
|
7725
7831
|
"div",
|
|
7726
7832
|
{
|
|
7727
7833
|
className: "tab-toggle-underline",
|
|
@@ -7737,17 +7843,17 @@ Tab.displayName = "Tab";
|
|
|
7737
7843
|
var Tab_default = Tab;
|
|
7738
7844
|
|
|
7739
7845
|
// src/components/Table/TableContext.tsx
|
|
7740
|
-
import
|
|
7741
|
-
var TableContext =
|
|
7846
|
+
import React26 from "react";
|
|
7847
|
+
var TableContext = React26.createContext(null);
|
|
7742
7848
|
var useTableContext = () => {
|
|
7743
|
-
const ctx =
|
|
7849
|
+
const ctx = React26.useContext(TableContext);
|
|
7744
7850
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
7745
7851
|
return ctx;
|
|
7746
7852
|
};
|
|
7747
7853
|
var TableContext_default = TableContext;
|
|
7748
7854
|
|
|
7749
7855
|
// src/components/Table/Table.tsx
|
|
7750
|
-
import { jsx as
|
|
7856
|
+
import { jsx as jsx335 } from "react/jsx-runtime";
|
|
7751
7857
|
var Table = (props) => {
|
|
7752
7858
|
const {
|
|
7753
7859
|
className,
|
|
@@ -7757,7 +7863,7 @@ var Table = (props) => {
|
|
|
7757
7863
|
headerSticky = false,
|
|
7758
7864
|
stickyShadow = true
|
|
7759
7865
|
} = props;
|
|
7760
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ jsx335("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ jsx335(
|
|
7761
7867
|
TableContext_default.Provider,
|
|
7762
7868
|
{
|
|
7763
7869
|
value: {
|
|
@@ -7766,7 +7872,7 @@ var Table = (props) => {
|
|
|
7766
7872
|
headerSticky,
|
|
7767
7873
|
stickyShadow
|
|
7768
7874
|
},
|
|
7769
|
-
children: /* @__PURE__ */
|
|
7875
|
+
children: /* @__PURE__ */ jsx335("table", { className: "lib-xplat-table", children })
|
|
7770
7876
|
}
|
|
7771
7877
|
) });
|
|
7772
7878
|
};
|
|
@@ -7774,40 +7880,40 @@ Table.displayName = "Table";
|
|
|
7774
7880
|
var Table_default = Table;
|
|
7775
7881
|
|
|
7776
7882
|
// src/components/Table/TableBody.tsx
|
|
7777
|
-
import { jsx as
|
|
7883
|
+
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
7778
7884
|
var TableBody = (props) => {
|
|
7779
7885
|
const { children, className } = props;
|
|
7780
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ jsx336("tbody", { className, children });
|
|
7781
7887
|
};
|
|
7782
7888
|
TableBody.displayName = "TableBody";
|
|
7783
7889
|
var TableBody_default = TableBody;
|
|
7784
7890
|
|
|
7785
7891
|
// src/components/Table/TableCell.tsx
|
|
7786
|
-
import
|
|
7892
|
+
import React29 from "react";
|
|
7787
7893
|
|
|
7788
7894
|
// src/components/Table/TableHeadContext.tsx
|
|
7789
|
-
import
|
|
7790
|
-
var TableHeadContext =
|
|
7895
|
+
import React27 from "react";
|
|
7896
|
+
var TableHeadContext = React27.createContext(
|
|
7791
7897
|
null
|
|
7792
7898
|
);
|
|
7793
7899
|
var useTableHeadContext = () => {
|
|
7794
|
-
const ctx =
|
|
7900
|
+
const ctx = React27.useContext(TableHeadContext);
|
|
7795
7901
|
return ctx;
|
|
7796
7902
|
};
|
|
7797
7903
|
var TableHeadContext_default = TableHeadContext;
|
|
7798
7904
|
|
|
7799
7905
|
// src/components/Table/TableRowContext.tsx
|
|
7800
|
-
import
|
|
7801
|
-
var TableRowContext =
|
|
7906
|
+
import React28 from "react";
|
|
7907
|
+
var TableRowContext = React28.createContext(null);
|
|
7802
7908
|
var useTableRowContext = () => {
|
|
7803
|
-
const ctx =
|
|
7909
|
+
const ctx = React28.useContext(TableRowContext);
|
|
7804
7910
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
7805
7911
|
return ctx;
|
|
7806
7912
|
};
|
|
7807
7913
|
var TableRowContext_default = TableRowContext;
|
|
7808
7914
|
|
|
7809
7915
|
// src/components/Table/TableCell.tsx
|
|
7810
|
-
import { jsx as
|
|
7916
|
+
import { jsx as jsx337 } from "react/jsx-runtime";
|
|
7811
7917
|
var TableCell = (props) => {
|
|
7812
7918
|
const {
|
|
7813
7919
|
children,
|
|
@@ -7819,9 +7925,9 @@ var TableCell = (props) => {
|
|
|
7819
7925
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
7820
7926
|
const { stickyShadow } = useTableContext();
|
|
7821
7927
|
const headContext = useTableHeadContext();
|
|
7822
|
-
const [left, setLeft] =
|
|
7823
|
-
const cellRef =
|
|
7824
|
-
const calculateLeft =
|
|
7928
|
+
const [left, setLeft] = React29.useState(0);
|
|
7929
|
+
const cellRef = React29.useRef(null);
|
|
7930
|
+
const calculateLeft = React29.useCallback(() => {
|
|
7825
7931
|
if (!cellRef.current) return 0;
|
|
7826
7932
|
let totalLeft = 0;
|
|
7827
7933
|
for (const ref of stickyCells) {
|
|
@@ -7830,7 +7936,7 @@ var TableCell = (props) => {
|
|
|
7830
7936
|
}
|
|
7831
7937
|
return totalLeft;
|
|
7832
7938
|
}, [stickyCells]);
|
|
7833
|
-
|
|
7939
|
+
React29.useEffect(() => {
|
|
7834
7940
|
if (!isSticky || !cellRef.current) return;
|
|
7835
7941
|
registerStickyCell(cellRef);
|
|
7836
7942
|
setLeft(calculateLeft());
|
|
@@ -7848,7 +7954,7 @@ var TableCell = (props) => {
|
|
|
7848
7954
|
const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
|
|
7849
7955
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
7850
7956
|
const enableHover = headContext && headContext.cellHover;
|
|
7851
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ jsx337(
|
|
7852
7958
|
CellTag,
|
|
7853
7959
|
{
|
|
7854
7960
|
ref: cellRef,
|
|
@@ -7870,21 +7976,21 @@ TableCell.displayName = "TableCell";
|
|
|
7870
7976
|
var TableCell_default = TableCell;
|
|
7871
7977
|
|
|
7872
7978
|
// src/components/Table/TableHead.tsx
|
|
7873
|
-
import { jsx as
|
|
7979
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
7874
7980
|
var TableHead = ({
|
|
7875
7981
|
children,
|
|
7876
7982
|
className = "",
|
|
7877
7983
|
cellHover = false
|
|
7878
7984
|
}) => {
|
|
7879
7985
|
const { headerSticky } = useTableContext();
|
|
7880
|
-
return /* @__PURE__ */
|
|
7986
|
+
return /* @__PURE__ */ jsx338(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx338("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
|
|
7881
7987
|
};
|
|
7882
7988
|
TableHead.displayName = "TableHead";
|
|
7883
7989
|
var TableHead_default = TableHead;
|
|
7884
7990
|
|
|
7885
7991
|
// src/components/Table/TableRow.tsx
|
|
7886
|
-
import
|
|
7887
|
-
import { jsx as
|
|
7992
|
+
import React30 from "react";
|
|
7993
|
+
import { jsx as jsx339 } from "react/jsx-runtime";
|
|
7888
7994
|
var TableRow = (props) => {
|
|
7889
7995
|
const {
|
|
7890
7996
|
children,
|
|
@@ -7897,7 +8003,7 @@ var TableRow = (props) => {
|
|
|
7897
8003
|
onClick
|
|
7898
8004
|
} = props;
|
|
7899
8005
|
const { rowBorderUse } = useTableContext();
|
|
7900
|
-
const [stickyCells, setStickyCells] =
|
|
8006
|
+
const [stickyCells, setStickyCells] = React30.useState([]);
|
|
7901
8007
|
const registerStickyCell = (ref) => {
|
|
7902
8008
|
setStickyCells((prev) => {
|
|
7903
8009
|
if (prev.includes(ref)) return prev;
|
|
@@ -7909,7 +8015,7 @@ var TableRow = (props) => {
|
|
|
7909
8015
|
color,
|
|
7910
8016
|
colorDepth ?? 500
|
|
7911
8017
|
);
|
|
7912
|
-
return /* @__PURE__ */
|
|
8018
|
+
return /* @__PURE__ */ jsx339(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx339(
|
|
7913
8019
|
"tr",
|
|
7914
8020
|
{
|
|
7915
8021
|
className: clsx_default(
|
|
@@ -7929,11 +8035,12 @@ TableRow.displayName = "TableRow";
|
|
|
7929
8035
|
var TableRow_default = TableRow;
|
|
7930
8036
|
|
|
7931
8037
|
// src/components/Tag/Tag.tsx
|
|
7932
|
-
import { jsx as
|
|
8038
|
+
import { jsx as jsx340, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
7933
8039
|
var Tag = (props) => {
|
|
7934
8040
|
const {
|
|
7935
8041
|
children,
|
|
7936
8042
|
onClose,
|
|
8043
|
+
size = "md",
|
|
7937
8044
|
colorNamespace = "xplat",
|
|
7938
8045
|
color = "neutral",
|
|
7939
8046
|
colorDepth,
|
|
@@ -7944,21 +8051,21 @@ var Tag = (props) => {
|
|
|
7944
8051
|
color,
|
|
7945
8052
|
colorDepth ?? 500
|
|
7946
8053
|
);
|
|
7947
|
-
return /* @__PURE__ */
|
|
7948
|
-
/* @__PURE__ */
|
|
7949
|
-
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, {}) })
|
|
7950
8057
|
] });
|
|
7951
8058
|
};
|
|
7952
8059
|
Tag.displayName = "Tag";
|
|
7953
8060
|
var Tag_default = Tag;
|
|
7954
8061
|
|
|
7955
8062
|
// src/components/TextArea/TextArea.tsx
|
|
7956
|
-
import
|
|
7957
|
-
import { jsx as
|
|
7958
|
-
var TextArea =
|
|
8063
|
+
import React31 from "react";
|
|
8064
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
8065
|
+
var TextArea = React31.forwardRef(
|
|
7959
8066
|
(props, ref) => {
|
|
7960
8067
|
const { value, onChange, className, disabled, ...textareaProps } = props;
|
|
7961
|
-
const localRef =
|
|
8068
|
+
const localRef = React31.useRef(null);
|
|
7962
8069
|
const setRefs = (el) => {
|
|
7963
8070
|
localRef.current = el;
|
|
7964
8071
|
if (!ref) return;
|
|
@@ -7978,21 +8085,21 @@ var TextArea = React30.forwardRef(
|
|
|
7978
8085
|
onChange(event);
|
|
7979
8086
|
}
|
|
7980
8087
|
};
|
|
7981
|
-
|
|
8088
|
+
React31.useEffect(() => {
|
|
7982
8089
|
const el = localRef.current;
|
|
7983
8090
|
if (!el) return;
|
|
7984
8091
|
el.style.height = "0px";
|
|
7985
8092
|
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
7986
8093
|
el.style.height = `${nextHeight}px`;
|
|
7987
8094
|
}, [value]);
|
|
7988
|
-
return /* @__PURE__ */
|
|
8095
|
+
return /* @__PURE__ */ jsx341("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ jsx341(
|
|
7989
8096
|
"div",
|
|
7990
8097
|
{
|
|
7991
8098
|
className: clsx_default(
|
|
7992
8099
|
"lib-xplat-textarea",
|
|
7993
8100
|
disabled ? "disabled" : void 0
|
|
7994
8101
|
),
|
|
7995
|
-
children: /* @__PURE__ */
|
|
8102
|
+
children: /* @__PURE__ */ jsx341(
|
|
7996
8103
|
"textarea",
|
|
7997
8104
|
{
|
|
7998
8105
|
...textareaProps,
|
|
@@ -8010,25 +8117,25 @@ TextArea.displayName = "TextArea";
|
|
|
8010
8117
|
var TextArea_default = TextArea;
|
|
8011
8118
|
|
|
8012
8119
|
// src/components/Toast/Toast.tsx
|
|
8013
|
-
import
|
|
8120
|
+
import React32 from "react";
|
|
8014
8121
|
import { createPortal as createPortal3 } from "react-dom";
|
|
8015
|
-
import { jsx as
|
|
8016
|
-
var ToastContext =
|
|
8122
|
+
import { jsx as jsx342, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
8123
|
+
var ToastContext = React32.createContext(null);
|
|
8017
8124
|
var useToast = () => {
|
|
8018
|
-
const ctx =
|
|
8125
|
+
const ctx = React32.useContext(ToastContext);
|
|
8019
8126
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
8020
8127
|
return ctx;
|
|
8021
8128
|
};
|
|
8022
8129
|
var EXIT_DURATION = 300;
|
|
8023
8130
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
8024
|
-
const ref =
|
|
8025
|
-
const [height, setHeight] =
|
|
8026
|
-
|
|
8131
|
+
const ref = React32.useRef(null);
|
|
8132
|
+
const [height, setHeight] = React32.useState(void 0);
|
|
8133
|
+
React32.useEffect(() => {
|
|
8027
8134
|
if (ref.current && !isExiting) {
|
|
8028
8135
|
setHeight(ref.current.offsetHeight);
|
|
8029
8136
|
}
|
|
8030
8137
|
}, [isExiting]);
|
|
8031
|
-
return /* @__PURE__ */
|
|
8138
|
+
return /* @__PURE__ */ jsx342(
|
|
8032
8139
|
"div",
|
|
8033
8140
|
{
|
|
8034
8141
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -8036,15 +8143,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
8036
8143
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
8037
8144
|
marginBottom: isExiting ? 0 : void 0
|
|
8038
8145
|
},
|
|
8039
|
-
children: /* @__PURE__ */
|
|
8146
|
+
children: /* @__PURE__ */ jsxs214(
|
|
8040
8147
|
"div",
|
|
8041
8148
|
{
|
|
8042
8149
|
ref,
|
|
8043
8150
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
8044
8151
|
role: "alert",
|
|
8045
8152
|
children: [
|
|
8046
|
-
/* @__PURE__ */
|
|
8047
|
-
/* @__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" })
|
|
8048
8155
|
]
|
|
8049
8156
|
}
|
|
8050
8157
|
)
|
|
@@ -8055,13 +8162,13 @@ var ToastProvider = ({
|
|
|
8055
8162
|
children,
|
|
8056
8163
|
position = "top-right"
|
|
8057
8164
|
}) => {
|
|
8058
|
-
const [toasts, setToasts] =
|
|
8059
|
-
const [removing, setRemoving] =
|
|
8060
|
-
const [mounted, setMounted] =
|
|
8061
|
-
|
|
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(() => {
|
|
8062
8169
|
setMounted(true);
|
|
8063
8170
|
}, []);
|
|
8064
|
-
const remove =
|
|
8171
|
+
const remove = React32.useCallback((id) => {
|
|
8065
8172
|
setRemoving((prev) => new Set(prev).add(id));
|
|
8066
8173
|
setTimeout(() => {
|
|
8067
8174
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -8072,7 +8179,7 @@ var ToastProvider = ({
|
|
|
8072
8179
|
});
|
|
8073
8180
|
}, EXIT_DURATION);
|
|
8074
8181
|
}, []);
|
|
8075
|
-
const toast =
|
|
8182
|
+
const toast = React32.useCallback(
|
|
8076
8183
|
(type, message, duration = 3e3) => {
|
|
8077
8184
|
const id = `${Date.now()}-${Math.random()}`;
|
|
8078
8185
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -8082,10 +8189,10 @@ var ToastProvider = ({
|
|
|
8082
8189
|
},
|
|
8083
8190
|
[remove]
|
|
8084
8191
|
);
|
|
8085
|
-
return /* @__PURE__ */
|
|
8192
|
+
return /* @__PURE__ */ jsxs214(ToastContext.Provider, { value: { toast }, children: [
|
|
8086
8193
|
children,
|
|
8087
8194
|
mounted && createPortal3(
|
|
8088
|
-
/* @__PURE__ */
|
|
8195
|
+
/* @__PURE__ */ jsx342("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx342(
|
|
8089
8196
|
ToastItemComponent,
|
|
8090
8197
|
{
|
|
8091
8198
|
item: t,
|
|
@@ -8101,8 +8208,8 @@ var ToastProvider = ({
|
|
|
8101
8208
|
ToastProvider.displayName = "ToastProvider";
|
|
8102
8209
|
|
|
8103
8210
|
// src/components/Tooltip/Tooltip.tsx
|
|
8104
|
-
import
|
|
8105
|
-
import { jsx as
|
|
8211
|
+
import React33 from "react";
|
|
8212
|
+
import { jsx as jsx343, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
8106
8213
|
var Tooltip2 = (props) => {
|
|
8107
8214
|
const {
|
|
8108
8215
|
type = "primary",
|
|
@@ -8112,24 +8219,24 @@ var Tooltip2 = (props) => {
|
|
|
8112
8219
|
description,
|
|
8113
8220
|
children
|
|
8114
8221
|
} = props;
|
|
8115
|
-
const iconRef =
|
|
8222
|
+
const iconRef = React33.useRef(null);
|
|
8116
8223
|
const colorClass = getColorClass(
|
|
8117
8224
|
colorNamespace,
|
|
8118
8225
|
color,
|
|
8119
8226
|
colorDepth ?? 500
|
|
8120
8227
|
);
|
|
8121
|
-
return /* @__PURE__ */
|
|
8122
|
-
/* @__PURE__ */
|
|
8123
|
-
/* @__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 })
|
|
8124
8231
|
] });
|
|
8125
8232
|
};
|
|
8126
8233
|
Tooltip2.displayName = "Tooltip";
|
|
8127
8234
|
var Tooltip_default = Tooltip2;
|
|
8128
8235
|
|
|
8129
8236
|
// src/components/Video/Video.tsx
|
|
8130
|
-
import
|
|
8131
|
-
import { jsx as
|
|
8132
|
-
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) => {
|
|
8133
8240
|
const {
|
|
8134
8241
|
src,
|
|
8135
8242
|
poster,
|
|
@@ -8143,10 +8250,10 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8143
8250
|
onPause,
|
|
8144
8251
|
...rest
|
|
8145
8252
|
} = props;
|
|
8146
|
-
const videoRef =
|
|
8147
|
-
const [isPlaying, setIsPlaying] =
|
|
8148
|
-
const [isLoaded, setIsLoaded] =
|
|
8149
|
-
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(
|
|
8150
8257
|
(el) => {
|
|
8151
8258
|
videoRef.current = el;
|
|
8152
8259
|
if (typeof ref === "function") ref(el);
|
|
@@ -8174,7 +8281,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8174
8281
|
}
|
|
8175
8282
|
};
|
|
8176
8283
|
const showCustomOverlay = !controls;
|
|
8177
|
-
return /* @__PURE__ */
|
|
8284
|
+
return /* @__PURE__ */ jsxs216(
|
|
8178
8285
|
"div",
|
|
8179
8286
|
{
|
|
8180
8287
|
className: clsx_default(
|
|
@@ -8183,7 +8290,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8183
8290
|
className
|
|
8184
8291
|
),
|
|
8185
8292
|
children: [
|
|
8186
|
-
/* @__PURE__ */
|
|
8293
|
+
/* @__PURE__ */ jsx344(
|
|
8187
8294
|
"video",
|
|
8188
8295
|
{
|
|
8189
8296
|
ref: setRefs,
|
|
@@ -8200,7 +8307,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8200
8307
|
...rest
|
|
8201
8308
|
}
|
|
8202
8309
|
),
|
|
8203
|
-
showCustomOverlay && /* @__PURE__ */
|
|
8310
|
+
showCustomOverlay && /* @__PURE__ */ jsx344(
|
|
8204
8311
|
"button",
|
|
8205
8312
|
{
|
|
8206
8313
|
type: "button",
|
|
@@ -8211,7 +8318,7 @@ var Video = React33.forwardRef((props, ref) => {
|
|
|
8211
8318
|
),
|
|
8212
8319
|
onClick: togglePlay,
|
|
8213
8320
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
8214
|
-
children: isPlaying ? /* @__PURE__ */
|
|
8321
|
+
children: isPlaying ? /* @__PURE__ */ jsx344(PauseIcon_default, {}) : /* @__PURE__ */ jsx344("span", { className: "play-icon", children: /* @__PURE__ */ jsx344(PlayCircleIcon_default, {}) })
|
|
8215
8322
|
}
|
|
8216
8323
|
)
|
|
8217
8324
|
]
|
|
@@ -8222,25 +8329,25 @@ Video.displayName = "Video";
|
|
|
8222
8329
|
var Video_default = Video;
|
|
8223
8330
|
|
|
8224
8331
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
8225
|
-
import { jsx as
|
|
8332
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
8226
8333
|
var FullGrid = (props) => {
|
|
8227
8334
|
const { children, className } = props;
|
|
8228
|
-
return /* @__PURE__ */
|
|
8335
|
+
return /* @__PURE__ */ jsx345("div", { className: clsx_default("lib-xplat-full-grid", className), children });
|
|
8229
8336
|
};
|
|
8230
8337
|
FullGrid.displayName = "FullGrid";
|
|
8231
8338
|
var FullGrid_default = FullGrid;
|
|
8232
8339
|
|
|
8233
8340
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
8234
|
-
import { jsx as
|
|
8341
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
8235
8342
|
var FullScreen = (props) => {
|
|
8236
8343
|
const { children, className } = props;
|
|
8237
|
-
return /* @__PURE__ */
|
|
8344
|
+
return /* @__PURE__ */ jsx346("div", { className: clsx_default("lib-xplat-full-screen", className), children });
|
|
8238
8345
|
};
|
|
8239
8346
|
FullScreen.displayName = "FullScreen";
|
|
8240
8347
|
var FullScreen_default = FullScreen;
|
|
8241
8348
|
|
|
8242
8349
|
// src/layout/Grid/Item/Item.tsx
|
|
8243
|
-
import { jsx as
|
|
8350
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
8244
8351
|
var calculateSpans = (column) => {
|
|
8245
8352
|
const spans = {};
|
|
8246
8353
|
let inherited = column.default;
|
|
@@ -8257,35 +8364,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
8257
8364
|
Object.entries(spans).forEach(([key, value]) => {
|
|
8258
8365
|
style[`--column-${key}`] = value;
|
|
8259
8366
|
});
|
|
8260
|
-
return /* @__PURE__ */
|
|
8367
|
+
return /* @__PURE__ */ jsx347("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
8261
8368
|
};
|
|
8262
8369
|
GridItem.displayName = "GridItem";
|
|
8263
8370
|
var Item_default = GridItem;
|
|
8264
8371
|
|
|
8265
8372
|
// src/layout/Header/Header.tsx
|
|
8266
|
-
import { jsx as
|
|
8373
|
+
import { jsx as jsx348, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
8267
8374
|
var Header = ({
|
|
8268
8375
|
logo,
|
|
8269
8376
|
centerContent,
|
|
8270
8377
|
rightContent
|
|
8271
8378
|
}) => {
|
|
8272
|
-
return /* @__PURE__ */
|
|
8273
|
-
/* @__PURE__ */
|
|
8274
|
-
/* @__PURE__ */
|
|
8275
|
-
/* @__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 })
|
|
8276
8383
|
] });
|
|
8277
8384
|
};
|
|
8278
8385
|
Header.displayName = "Header";
|
|
8279
8386
|
var Header_default = Header;
|
|
8280
8387
|
|
|
8281
8388
|
// src/layout/Layout/Layout.tsx
|
|
8282
|
-
import { Fragment as Fragment2, jsx as
|
|
8389
|
+
import { Fragment as Fragment2, jsx as jsx349, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
8283
8390
|
var Layout = (props) => {
|
|
8284
8391
|
const { header, sideBar, children } = props;
|
|
8285
|
-
return /* @__PURE__ */
|
|
8286
|
-
sideBar && /* @__PURE__ */
|
|
8287
|
-
/* @__PURE__ */
|
|
8288
|
-
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 }),
|
|
8289
8396
|
children
|
|
8290
8397
|
] })
|
|
8291
8398
|
] }) });
|
|
@@ -8294,31 +8401,31 @@ Layout.displayName = "Layout";
|
|
|
8294
8401
|
var Layout_default = Layout;
|
|
8295
8402
|
|
|
8296
8403
|
// src/layout/SideBar/SideBar.tsx
|
|
8297
|
-
import
|
|
8404
|
+
import React36 from "react";
|
|
8298
8405
|
|
|
8299
8406
|
// src/layout/SideBar/SideBarContext.tsx
|
|
8300
|
-
import
|
|
8301
|
-
var SideBarContext =
|
|
8407
|
+
import React35 from "react";
|
|
8408
|
+
var SideBarContext = React35.createContext(null);
|
|
8302
8409
|
var useSideBarContext = () => {
|
|
8303
|
-
const ctx =
|
|
8410
|
+
const ctx = React35.useContext(SideBarContext);
|
|
8304
8411
|
if (!ctx) throw new Error("Error");
|
|
8305
8412
|
return ctx;
|
|
8306
8413
|
};
|
|
8307
8414
|
var SideBarContext_default = SideBarContext;
|
|
8308
8415
|
|
|
8309
8416
|
// src/layout/SideBar/SideBar.tsx
|
|
8310
|
-
import { jsx as
|
|
8417
|
+
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
8311
8418
|
var SideBar = (props) => {
|
|
8312
8419
|
const { children, className } = props;
|
|
8313
|
-
const [isOpen, setIsOpen] =
|
|
8420
|
+
const [isOpen, setIsOpen] = React36.useState(true);
|
|
8314
8421
|
const handleSwitchSideBar = () => {
|
|
8315
8422
|
setIsOpen((prev) => !prev);
|
|
8316
8423
|
};
|
|
8317
|
-
return /* @__PURE__ */
|
|
8424
|
+
return /* @__PURE__ */ jsx350(
|
|
8318
8425
|
SideBarContext_default.Provider,
|
|
8319
8426
|
{
|
|
8320
8427
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
8321
|
-
children: /* @__PURE__ */
|
|
8428
|
+
children: /* @__PURE__ */ jsx350(
|
|
8322
8429
|
"div",
|
|
8323
8430
|
{
|
|
8324
8431
|
className: clsx_default(
|
|
@@ -8393,6 +8500,7 @@ export {
|
|
|
8393
8500
|
CameraIcon_default as CameraIcon,
|
|
8394
8501
|
CameraOffIcon_default as CameraOffIcon,
|
|
8395
8502
|
Card_default as Card,
|
|
8503
|
+
CardTab_default as CardTab,
|
|
8396
8504
|
CastIcon_default as CastIcon,
|
|
8397
8505
|
Chart_default as Chart,
|
|
8398
8506
|
CheckBox_default as CheckBox,
|