@x-plat/design-system 0.5.8 → 0.5.10

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/index.cjs CHANGED
@@ -72,6 +72,7 @@ __export(index_exports, {
72
72
  BookIcon: () => BookIcon_default,
73
73
  BookOpenIcon: () => BookOpenIcon_default,
74
74
  BookmarkIcon: () => BookmarkIcon_default,
75
+ Box: () => Box_default,
75
76
  BoxIcon: () => BoxIcon_default,
76
77
  Breadcrumb: () => Breadcrumb_default,
77
78
  BriefcaseIcon: () => BriefcaseIcon_default,
@@ -88,7 +89,6 @@ __export(index_exports, {
88
89
  CallOutgoingIcon: () => CallOutgoingIcon_default,
89
90
  CameraIcon: () => CameraIcon_default,
90
91
  CameraOffIcon: () => CameraOffIcon_default,
91
- Card: () => Card_default,
92
92
  CardTab: () => CardTab_default,
93
93
  CastIcon: () => CastIcon_default,
94
94
  Chart: () => Chart_default,
@@ -6432,16 +6432,21 @@ var Calendar = (props) => {
6432
6432
  Calendar.displayName = "Calendar";
6433
6433
  var Calendar_default = Calendar;
6434
6434
 
6435
- // src/components/Card/Card.tsx
6435
+ // src/components/Box/Box.tsx
6436
6436
  var import_jsx_runtime302 = require("react/jsx-runtime");
6437
- var Card = ({ children, title }) => {
6438
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "lib-xplat-card", children: [
6439
- title && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "title", children: title }),
6440
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "content", children })
6437
+ var Box = ({
6438
+ children,
6439
+ title,
6440
+ variant = "outlined",
6441
+ padding = "md"
6442
+ }) => {
6443
+ return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
6444
+ title && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "box-title", children: title }),
6445
+ /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "box-content", children })
6441
6446
  ] });
6442
6447
  };
6443
- Card.displayName = "Card";
6444
- var Card_default = Card;
6448
+ Box.displayName = "Box";
6449
+ var Box_default = Box;
6445
6450
 
6446
6451
  // src/components/CardTab/CardTab.tsx
6447
6452
  var import_react4 = __toESM(require("react"), 1);
@@ -6540,6 +6545,39 @@ var getPalette = (palettes, index, key) => {
6540
6545
  return palettes[(index + offset) % palettes.length];
6541
6546
  };
6542
6547
  var PADDING = { top: 20, right: 20, bottom: 30, left: 40 };
6548
+ var toSmoothPath = (points) => {
6549
+ if (points.length < 2) return "";
6550
+ const p = points;
6551
+ let d = `M ${p[0].x} ${p[0].y}`;
6552
+ for (let i = 0; i < p.length - 1; i++) {
6553
+ const p0 = p[Math.max(0, i - 1)];
6554
+ const p1 = p[i];
6555
+ const p2 = p[i + 1];
6556
+ const p3 = p[Math.min(p.length - 1, i + 2)];
6557
+ const cp1x = p1.x + (p2.x - p0.x) / 6;
6558
+ const cp1y = p1.y + (p2.y - p0.y) / 6;
6559
+ const cp2x = p2.x - (p3.x - p1.x) / 6;
6560
+ const cp2y = p2.y - (p3.y - p1.y) / 6;
6561
+ d += ` C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p2.x} ${p2.y}`;
6562
+ }
6563
+ return d;
6564
+ };
6565
+ var useChartSize = (ref) => {
6566
+ const [size, setSize] = import_react5.default.useState({ width: 0, height: 0 });
6567
+ import_react5.default.useEffect(() => {
6568
+ const el = ref.current;
6569
+ if (!el) return;
6570
+ const observer = new ResizeObserver((entries) => {
6571
+ const entry = entries[0];
6572
+ if (!entry) return;
6573
+ const { width, height } = entry.contentRect;
6574
+ setSize({ width: Math.floor(width), height: Math.floor(height) });
6575
+ });
6576
+ observer.observe(el);
6577
+ return () => observer.disconnect();
6578
+ }, [ref]);
6579
+ return size;
6580
+ };
6543
6581
  var useChartTooltip = (enabled) => {
6544
6582
  const [tooltip, setTooltip] = import_react5.default.useState({
6545
6583
  visible: false,
@@ -6574,15 +6612,15 @@ var useChartTooltip = (enabled) => {
6574
6612
  }, []);
6575
6613
  return { tooltip, show, hide, move, containerRef };
6576
6614
  };
6577
- var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLeave }) => {
6615
+ var LineChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6578
6616
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
6579
6617
  const maxVal = import_react5.default.useMemo(() => {
6580
6618
  const allValues = entries.flatMap(([, v]) => v);
6581
6619
  return Math.max(...allValues) * 1.2 || 1;
6582
6620
  }, [entries]);
6583
6621
  const count = labels.length;
6584
- const chartW = 600 - PADDING.left - PADDING.right;
6585
- const chartH = 300 - PADDING.top - PADDING.bottom;
6622
+ const chartW = width - PADDING.left - PADDING.right;
6623
+ const chartH = height - PADDING.top - PADDING.bottom;
6586
6624
  const seriesPoints = import_react5.default.useMemo(
6587
6625
  () => entries.map(
6588
6626
  ([, values]) => values.map((v, i) => ({
@@ -6593,18 +6631,18 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
6593
6631
  ),
6594
6632
  [entries, count, chartW, chartH, maxVal]
6595
6633
  );
6596
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
6634
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6597
6635
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6598
6636
  const y = PADDING.top + (1 - ratio) * chartH;
6599
6637
  const val = Math.round(maxVal * ratio);
6600
6638
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6601
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
6639
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6602
6640
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6603
6641
  ] }, ratio);
6604
6642
  }),
6605
6643
  labels.map((label, i) => {
6606
6644
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
6607
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: 300 - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6645
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6608
6646
  }),
6609
6647
  entries.map(([key], di) => {
6610
6648
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
@@ -6639,7 +6677,73 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
6639
6677
  ] });
6640
6678
  });
6641
6679
  LineChart.displayName = "LineChart";
6642
- var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLeave }) => {
6680
+ var CurveChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6681
+ const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
6682
+ const maxVal = import_react5.default.useMemo(() => {
6683
+ const allValues = entries.flatMap(([, v]) => v);
6684
+ return Math.max(...allValues) * 1.2 || 1;
6685
+ }, [entries]);
6686
+ const count = labels.length;
6687
+ const chartW = width - PADDING.left - PADDING.right;
6688
+ const chartH = height - PADDING.top - PADDING.bottom;
6689
+ const seriesPoints = import_react5.default.useMemo(
6690
+ () => entries.map(
6691
+ ([, values]) => values.map((v, i) => ({
6692
+ x: PADDING.left + i / (count - 1 || 1) * chartW,
6693
+ y: PADDING.top + (1 - v / maxVal) * chartH,
6694
+ v
6695
+ }))
6696
+ ),
6697
+ [entries, count, chartW, chartH, maxVal]
6698
+ );
6699
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6700
+ [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6701
+ const y = PADDING.top + (1 - ratio) * chartH;
6702
+ const val = Math.round(maxVal * ratio);
6703
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6704
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6705
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6706
+ ] }, ratio);
6707
+ }),
6708
+ labels.map((label, i) => {
6709
+ const x = PADDING.left + i / (count - 1 || 1) * chartW;
6710
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6711
+ }),
6712
+ entries.map(([key], di) => {
6713
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
6714
+ const color = palette[2];
6715
+ const areaColor = palette[0];
6716
+ const points = seriesPoints[di];
6717
+ const gradientId = `curve-gradient-${di}`;
6718
+ const linePath = toSmoothPath(points);
6719
+ const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
6720
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6721
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6722
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
6723
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
6724
+ ] }) }),
6725
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
6726
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" }),
6727
+ points.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
6728
+ "circle",
6729
+ {
6730
+ cx: p.x,
6731
+ cy: p.y,
6732
+ r: "4",
6733
+ fill: color,
6734
+ className: "chart-point",
6735
+ onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${p.v}`),
6736
+ onMouseMove: onMove,
6737
+ onMouseLeave: onLeave
6738
+ },
6739
+ i
6740
+ ))
6741
+ ] }, di);
6742
+ })
6743
+ ] });
6744
+ });
6745
+ CurveChart.displayName = "CurveChart";
6746
+ var BarChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6643
6747
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
6644
6748
  const maxVal = import_react5.default.useMemo(() => {
6645
6749
  const allValues = entries.flatMap(([, v]) => v);
@@ -6647,8 +6751,8 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
6647
6751
  }, [entries]);
6648
6752
  const count = labels.length;
6649
6753
  const groupCount = entries.length;
6650
- const chartW = 600 - PADDING.left - PADDING.right;
6651
- const chartH = 300 - PADDING.top - PADDING.bottom;
6754
+ const chartW = width - PADDING.left - PADDING.right;
6755
+ const chartH = height - PADDING.top - PADDING.bottom;
6652
6756
  const groupW = chartW / count;
6653
6757
  const barW = Math.min(32, groupW * 0.7 / groupCount);
6654
6758
  const bars = import_react5.default.useMemo(
@@ -6662,16 +6766,16 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
6662
6766
  ),
6663
6767
  [entries, maxVal, chartH, groupW, barW, groupCount]
6664
6768
  );
6665
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
6769
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6666
6770
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6667
6771
  const y = PADDING.top + (1 - ratio) * chartH;
6668
6772
  const val = Math.round(maxVal * ratio);
6669
6773
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6670
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
6774
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6671
6775
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6672
6776
  ] }, ratio);
6673
6777
  }),
6674
- labels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: 300 - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i)),
6778
+ labels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i)),
6675
6779
  entries.map(([key], di) => {
6676
6780
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
6677
6781
  const color = palette[2];
@@ -6682,7 +6786,7 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
6682
6786
  y: b.y,
6683
6787
  width: b.w,
6684
6788
  height: b.h,
6685
- rx: "2",
6789
+ rx: Math.min(4, b.w / 2),
6686
6790
  fill: color,
6687
6791
  className: "chart-bar",
6688
6792
  onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${b.v}`),
@@ -6696,14 +6800,15 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
6696
6800
  });
6697
6801
  BarChart.displayName = "BarChart";
6698
6802
  var PieDonutChart = import_react5.default.memo(
6699
- ({ data, labels, isDoughnut, onHover, onMove, onLeave }) => {
6803
+ ({ data, labels, width, height, isDoughnut, onHover, onMove, onLeave }) => {
6700
6804
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
6701
6805
  const values = import_react5.default.useMemo(() => entries.flatMap(([, v]) => v), [entries]);
6702
6806
  const total = import_react5.default.useMemo(() => values.reduce((a, b) => a + b, 0) || 1, [values]);
6703
- const cx = 150;
6704
- const cy = 150;
6705
- const r2 = 120;
6706
- const innerR = isDoughnut ? 60 : 0;
6807
+ const size = Math.min(width, height);
6808
+ const cx = size / 2;
6809
+ const cy = size / 2;
6810
+ const r2 = size * 0.4;
6811
+ const innerR = isDoughnut ? r2 * 0.5 : 0;
6707
6812
  const firstKey = entries[0]?.[0] ?? "";
6708
6813
  const colorOffset = hashString(firstKey);
6709
6814
  const sliceData = import_react5.default.useMemo(() => {
@@ -6734,8 +6839,8 @@ var PieDonutChart = import_react5.default.memo(
6734
6839
  angle0 = endAngle;
6735
6840
  return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}` };
6736
6841
  });
6737
- }, [values, total, innerR, labels]);
6738
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("svg", { viewBox: "0 0 300 300", className: "chart-svg chart-pie", children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6842
+ }, [values, total, cx, cy, r2, innerR, labels]);
6843
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
6739
6844
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
6740
6845
  "path",
6741
6846
  {
@@ -6752,22 +6857,42 @@ var PieDonutChart = import_react5.default.memo(
6752
6857
  }
6753
6858
  );
6754
6859
  PieDonutChart.displayName = "PieDonutChart";
6860
+ var TooltipBubble = ({ x, y, containerWidth, children }) => {
6861
+ const ref = import_react5.default.useRef(null);
6862
+ const [adjustedX, setAdjustedX] = import_react5.default.useState(x);
6863
+ import_react5.default.useEffect(() => {
6864
+ const el = ref.current;
6865
+ if (!el) return;
6866
+ const w = el.offsetWidth;
6867
+ const half = w / 2;
6868
+ const margin = 8;
6869
+ let nx = x;
6870
+ if (x - half < margin) nx = half + margin;
6871
+ else if (x + half > containerWidth - margin) nx = containerWidth - half - margin;
6872
+ setAdjustedX(nx);
6873
+ }, [x, containerWidth]);
6874
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
6875
+ "div",
6876
+ {
6877
+ ref,
6878
+ className: "chart-tooltip",
6879
+ style: { left: adjustedX, top: y },
6880
+ children
6881
+ }
6882
+ );
6883
+ };
6755
6884
  var Chart = (props) => {
6756
6885
  const { type, data, labels, tooltip: showTooltip = true } = props;
6757
6886
  const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
6887
+ const { width, height } = useChartSize(containerRef);
6888
+ const ready = width > 0 && height > 0;
6758
6889
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
6759
- type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6760
- type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6761
- type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6762
- type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6763
- tooltip.visible && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
6764
- "div",
6765
- {
6766
- className: "chart-tooltip",
6767
- style: { left: tooltip.x, top: tooltip.y },
6768
- children: tooltip.content
6769
- }
6770
- )
6890
+ ready && type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6891
+ ready && type === "curve" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(CurveChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6892
+ ready && type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6893
+ ready && type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6894
+ ready && type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, width, height, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6895
+ tooltip.visible && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(TooltipBubble, { x: tooltip.x, y: tooltip.y, containerWidth: width, children: tooltip.content })
6771
6896
  ] });
6772
6897
  };
6773
6898
  Chart.displayName = "Chart";
@@ -7032,42 +7157,66 @@ var PasswordInput = import_react8.default.forwardRef(
7032
7157
  PasswordInput.displayName = "PasswordInput";
7033
7158
  var PasswordInput_default = PasswordInput;
7034
7159
 
7035
- // src/tokens/hooks/useClickOutside.ts
7160
+ // src/components/Modal/Modal.tsx
7036
7161
  var import_react9 = __toESM(require("react"), 1);
7037
- var useClickOutside = (refs, handler, enabled = true) => {
7162
+ var import_react_dom = require("react-dom");
7163
+ var import_jsx_runtime311 = require("react/jsx-runtime");
7164
+ var ANIMATION_DURATION_MS = 200;
7165
+ var Modal = (props) => {
7166
+ const { isOpen, onClose, children } = props;
7167
+ const [mounted, setMounted] = import_react9.default.useState(false);
7168
+ const [visible, setVisible] = import_react9.default.useState(false);
7038
7169
  import_react9.default.useEffect(() => {
7039
- if (!enabled) return;
7040
- const refArray = Array.isArray(refs) ? refs : [refs];
7041
- const listener = (event) => {
7042
- const target = event.target;
7043
- const isInside = refArray.some(
7044
- (ref) => ref.current && ref.current.contains(target)
7045
- );
7046
- if (!isInside) {
7047
- handler();
7170
+ if (isOpen) {
7171
+ setMounted(true);
7172
+ const t2 = setTimeout(() => setVisible(true), 1);
7173
+ return () => clearTimeout(t2);
7174
+ }
7175
+ setVisible(false);
7176
+ const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
7177
+ return () => clearTimeout(t);
7178
+ }, [isOpen]);
7179
+ if (typeof document === "undefined") return null;
7180
+ if (!mounted) return null;
7181
+ const stateClass = visible ? "enter" : "exit";
7182
+ return (0, import_react_dom.createPortal)(
7183
+ /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7184
+ "div",
7185
+ {
7186
+ className: clsx_default("lib-xplat-modal", "dim", stateClass),
7187
+ onClick: onClose,
7188
+ children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7189
+ "div",
7190
+ {
7191
+ className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
7192
+ role: "dialog",
7193
+ "aria-modal": "true",
7194
+ onClick: (e) => e.stopPropagation(),
7195
+ children
7196
+ }
7197
+ )
7048
7198
  }
7049
- };
7050
- document.addEventListener("mousedown", listener);
7051
- document.addEventListener("touchstart", listener);
7052
- return () => {
7053
- document.removeEventListener("mousedown", listener);
7054
- document.removeEventListener("touchstart", listener);
7055
- };
7056
- }, [refs, handler, enabled]);
7199
+ ),
7200
+ document.body
7201
+ );
7057
7202
  };
7058
- var useClickOutside_default = useClickOutside;
7203
+ Modal.displayName = "Modal";
7204
+ var Modal_default = Modal;
7059
7205
 
7060
7206
  // src/components/DatePicker/SingleDatePicker/index.tsx
7061
7207
  var import_react10 = __toESM(require("react"), 1);
7062
- var import_jsx_runtime311 = require("react/jsx-runtime");
7208
+ var import_jsx_runtime312 = require("react/jsx-runtime");
7063
7209
  var DayCell2 = import_react10.default.memo(
7064
7210
  ({
7065
7211
  day,
7066
7212
  disabled,
7067
7213
  selected,
7068
7214
  highlighted,
7215
+ isStart,
7216
+ isEnd,
7217
+ inRange,
7069
7218
  onSelect
7070
- }) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7219
+ }) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7071
7220
  "button",
7072
7221
  {
7073
7222
  type: "button",
@@ -7075,8 +7224,9 @@ var DayCell2 = import_react10.default.memo(
7075
7224
  "datepicker-day",
7076
7225
  !day.isCurrentMonth && "outside",
7077
7226
  disabled && "disabled",
7078
- selected && "selected",
7227
+ (selected || isStart || isEnd) && "selected",
7079
7228
  highlighted && !selected && "highlighted",
7229
+ inRange && !isStart && !isEnd && "in-range",
7080
7230
  day.isToday && "today",
7081
7231
  day.isSunday && "sunday",
7082
7232
  day.isSaturday && "saturday"
@@ -7088,7 +7238,7 @@ var DayCell2 = import_react10.default.memo(
7088
7238
  children: day.day
7089
7239
  }
7090
7240
  ),
7091
- (prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
7241
+ (prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.isStart === next.isStart && prev.isEnd === next.isEnd && prev.inRange === next.inRange && prev.day === next.day
7092
7242
  );
7093
7243
  DayCell2.displayName = "DayCell";
7094
7244
  var SingleDatePicker = (props) => {
@@ -7098,7 +7248,9 @@ var SingleDatePicker = (props) => {
7098
7248
  minDate,
7099
7249
  maxDate,
7100
7250
  highlightDates = [],
7101
- locale = "ko"
7251
+ locale = "ko",
7252
+ rangeStart,
7253
+ rangeEnd
7102
7254
  } = props;
7103
7255
  const initialYear = value?.getFullYear();
7104
7256
  const initialMonth = value?.getMonth();
@@ -7146,6 +7298,8 @@ var SingleDatePicker = (props) => {
7146
7298
  else if (pickerMode === "months") {
7147
7299
  setYearRangeStart(Math.floor(year / 12) * 12);
7148
7300
  setPickerMode("years");
7301
+ } else {
7302
+ setPickerMode("days");
7149
7303
  }
7150
7304
  };
7151
7305
  const handleMonthSelect = (m) => {
@@ -7159,71 +7313,80 @@ var SingleDatePicker = (props) => {
7159
7313
  const weekdays = WEEKDAY_LABELS[locale];
7160
7314
  const monthLabels = MONTH_LABELS[locale];
7161
7315
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
7162
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
7316
+ const hasRange = rangeStart != null && rangeEnd != null;
7317
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
7163
7318
  "div",
7164
7319
  {
7165
7320
  className: clsx_default("lib-xplat-datepicker", "single"),
7166
7321
  children: [
7167
- /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: "datepicker-header", children: [
7168
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(ChevronLeftIcon_default, {}) }),
7169
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
7170
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(ChevronRightIcon_default, {}) })
7322
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("div", { className: "datepicker-header", children: [
7323
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronLeftIcon_default, {}) }),
7324
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
7325
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRightIcon_default, {}) })
7171
7326
  ] }),
7172
- pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
7173
- const y = yearRangeStart + i;
7174
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7327
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("div", { className: "datepicker-body", children: [
7328
+ pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
7329
+ const y = yearRangeStart + i;
7330
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7331
+ "button",
7332
+ {
7333
+ type: "button",
7334
+ className: clsx_default("datepicker-picker-cell", y === year && "active"),
7335
+ onClick: () => handleYearSelect(y),
7336
+ children: y
7337
+ },
7338
+ y
7339
+ );
7340
+ }) }),
7341
+ pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7175
7342
  "button",
7176
7343
  {
7177
7344
  type: "button",
7178
- className: clsx_default("datepicker-picker-cell", y === year && "active"),
7179
- onClick: () => handleYearSelect(y),
7180
- children: y
7181
- },
7182
- y
7183
- );
7184
- }) }),
7185
- pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7186
- "button",
7187
- {
7188
- type: "button",
7189
- className: clsx_default("datepicker-picker-cell", i === month && "active"),
7190
- onClick: () => handleMonthSelect(i),
7191
- children: label
7192
- },
7193
- i
7194
- )) }),
7195
- pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_jsx_runtime311.Fragment, { children: [
7196
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7197
- "div",
7198
- {
7199
- className: clsx_default(
7200
- "datepicker-weekday",
7201
- i === 0 && "sunday",
7202
- i === 6 && "saturday"
7203
- ),
7345
+ className: clsx_default("datepicker-picker-cell", i === month && "active"),
7346
+ onClick: () => handleMonthSelect(i),
7204
7347
  children: label
7205
7348
  },
7206
- label
7349
+ i
7207
7350
  )) }),
7208
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
7209
- const t = day.date.getTime();
7210
- const disabled = t < minTime || t > maxTime;
7211
- const selected = value ? isSameDay(day.date, value) : false;
7212
- const highlighted = highlightSet.has(
7213
- `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
7214
- );
7215
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
7216
- DayCell2,
7351
+ pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
7352
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7353
+ "div",
7217
7354
  {
7218
- day,
7219
- disabled,
7220
- selected,
7221
- highlighted,
7222
- onSelect: handleSelect
7355
+ className: clsx_default(
7356
+ "datepicker-weekday",
7357
+ i === 0 && "sunday",
7358
+ i === 6 && "saturday"
7359
+ ),
7360
+ children: label
7223
7361
  },
7224
- idx
7225
- );
7226
- }) })
7362
+ label
7363
+ )) }),
7364
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
7365
+ const t = day.date.getTime();
7366
+ const disabled = t < minTime || t > maxTime;
7367
+ const selected = value ? isSameDay(day.date, value) : false;
7368
+ const highlighted = highlightSet.has(
7369
+ `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
7370
+ );
7371
+ const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
7372
+ const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
7373
+ const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
7374
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7375
+ DayCell2,
7376
+ {
7377
+ day,
7378
+ disabled,
7379
+ selected,
7380
+ highlighted,
7381
+ isStart,
7382
+ isEnd,
7383
+ inRange: inRangeVal,
7384
+ onSelect: handleSelect
7385
+ },
7386
+ idx
7387
+ );
7388
+ }) })
7389
+ ] })
7227
7390
  ] })
7228
7391
  ]
7229
7392
  }
@@ -7233,7 +7396,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
7233
7396
  var SingleDatePicker_default = SingleDatePicker;
7234
7397
 
7235
7398
  // src/components/DatePicker/InputDatePicker/index.tsx
7236
- var import_jsx_runtime312 = require("react/jsx-runtime");
7399
+ var import_jsx_runtime313 = require("react/jsx-runtime");
7237
7400
  var formatDate = (date) => {
7238
7401
  if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
7239
7402
  const y = date.getFullYear();
@@ -7242,137 +7405,131 @@ var formatDate = (date) => {
7242
7405
  return `${y}/${m}/${d}`;
7243
7406
  };
7244
7407
  var InputDatePicker = (props) => {
7245
- const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
7408
+ const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
7246
7409
  const [isOpen, setIsOpen] = import_react11.default.useState(false);
7247
- const containerRef = import_react11.default.useRef(null);
7248
- const calendarRef = import_react11.default.useRef(null);
7249
- useClickOutside_default([containerRef], () => setIsOpen(false), isOpen);
7410
+ const [tempDate, setTempDate] = import_react11.default.useState(value ?? /* @__PURE__ */ new Date());
7411
+ const handleOpen = () => {
7412
+ if (disabled) return;
7413
+ setTempDate(value ?? /* @__PURE__ */ new Date());
7414
+ setIsOpen(true);
7415
+ };
7250
7416
  const handleSelect = (date) => {
7251
- if (!date) return;
7252
- onChange?.(date);
7417
+ if (date) setTempDate(date);
7418
+ };
7419
+ const handleApply = () => {
7420
+ onChange?.(tempDate);
7253
7421
  setIsOpen(false);
7254
7422
  };
7255
- return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
7256
- "div",
7257
- {
7258
- className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
7259
- ref: containerRef,
7260
- children: [
7261
- /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7262
- "div",
7263
- {
7264
- className: "input-datepicker-trigger",
7265
- onClick: () => !disabled && setIsOpen((o) => !o),
7266
- children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7267
- Input_default,
7268
- {
7269
- value: formatDate(value),
7270
- placeholder,
7271
- suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CalenderIcon_default, {}),
7272
- disabled,
7273
- readOnly: true
7274
- }
7275
- )
7276
- }
7277
- ),
7278
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
7279
- SingleDatePicker_default,
7280
- {
7281
- value: value ?? /* @__PURE__ */ new Date(),
7282
- onChange: handleSelect,
7283
- minDate,
7284
- maxDate,
7285
- locale
7286
- }
7287
- ) })
7288
- ]
7289
- }
7290
- );
7423
+ const handleClose = () => {
7424
+ setIsOpen(false);
7425
+ };
7426
+ return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
7427
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
7428
+ Input_default,
7429
+ {
7430
+ value: formatDate(value),
7431
+ placeholder,
7432
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(CalenderIcon_default, {}),
7433
+ disabled,
7434
+ readOnly: true
7435
+ }
7436
+ ) }),
7437
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "lib-xplat-popup-datepicker-card", children: [
7438
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
7439
+ SingleDatePicker_default,
7440
+ {
7441
+ value: tempDate,
7442
+ onChange: handleSelect,
7443
+ minDate,
7444
+ maxDate,
7445
+ locale
7446
+ }
7447
+ ) }),
7448
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "popup-datepicker-footer", children: [
7449
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
7450
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7451
+ ] })
7452
+ ] }) })
7453
+ ] });
7291
7454
  };
7292
7455
  InputDatePicker.displayName = "InputDatePicker";
7293
7456
  var InputDatePicker_default = InputDatePicker;
7294
7457
 
7295
7458
  // src/components/DatePicker/PopupPicker/index.tsx
7296
- var import_react14 = __toESM(require("react"), 1);
7297
-
7298
- // src/components/Modal/Modal.tsx
7299
- var import_react12 = __toESM(require("react"), 1);
7300
- var import_react_dom = require("react-dom");
7301
- var import_jsx_runtime313 = require("react/jsx-runtime");
7302
- var ANIMATION_DURATION_MS = 200;
7303
- var Modal = (props) => {
7304
- const { isOpen, onClose, children } = props;
7305
- const [mounted, setMounted] = import_react12.default.useState(false);
7306
- const [visible, setVisible] = import_react12.default.useState(false);
7307
- import_react12.default.useEffect(() => {
7308
- if (isOpen) {
7309
- setMounted(true);
7310
- const t2 = setTimeout(() => setVisible(true), 1);
7311
- return () => clearTimeout(t2);
7312
- }
7313
- setVisible(false);
7314
- const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
7315
- return () => clearTimeout(t);
7316
- }, [isOpen]);
7317
- if (typeof document === "undefined") return null;
7318
- if (!mounted) return null;
7319
- const stateClass = visible ? "enter" : "exit";
7320
- return (0, import_react_dom.createPortal)(
7321
- /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
7322
- "div",
7323
- {
7324
- className: clsx_default("lib-xplat-modal", "dim", stateClass),
7325
- onClick: onClose,
7326
- children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
7327
- "div",
7328
- {
7329
- className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
7330
- role: "dialog",
7331
- "aria-modal": "true",
7332
- onClick: (e) => e.stopPropagation(),
7333
- children
7334
- }
7335
- )
7336
- }
7337
- ),
7338
- document.body
7339
- );
7340
- };
7341
- Modal.displayName = "Modal";
7342
- var Modal_default = Modal;
7459
+ var import_react15 = __toESM(require("react"), 1);
7343
7460
 
7344
7461
  // src/components/DatePicker/RangePicker/index.tsx
7462
+ var import_react14 = __toESM(require("react"), 1);
7463
+
7464
+ // src/components/Tab/Tab.tsx
7345
7465
  var import_react13 = __toESM(require("react"), 1);
7466
+
7467
+ // src/components/Tab/TabItem.tsx
7468
+ var import_react12 = __toESM(require("react"), 1);
7346
7469
  var import_jsx_runtime314 = require("react/jsx-runtime");
7347
- var RangeDayCell = import_react13.default.memo(
7348
- ({
7349
- day,
7350
- disabled,
7351
- isStart,
7352
- isEnd,
7353
- inRange,
7354
- onClick
7355
- }) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7356
- "button",
7470
+ var TabItem = import_react12.default.forwardRef((props, ref) => {
7471
+ const { isActive, title, onClick } = props;
7472
+ return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7473
+ "div",
7357
7474
  {
7358
- type: "button",
7359
- className: clsx_default(
7360
- "datepicker-day",
7361
- !day.isCurrentMonth && "outside",
7362
- disabled && "disabled",
7363
- (isStart || isEnd) && "selected",
7364
- inRange && !isStart && !isEnd && "in-range",
7365
- day.isToday && "today",
7366
- day.isSunday && "sunday",
7367
- day.isSaturday && "saturday"
7368
- ),
7369
- disabled: disabled || !day.isCurrentMonth,
7475
+ ref,
7476
+ className: clsx_default("tab-item", isActive ? "active" : null),
7370
7477
  onClick,
7371
- children: day.day
7478
+ children: title
7372
7479
  }
7373
- )
7374
- );
7375
- RangeDayCell.displayName = "RangeDayCell";
7480
+ );
7481
+ });
7482
+ TabItem.displayName = "TabItem";
7483
+ var TabItem_default = TabItem;
7484
+
7485
+ // src/components/Tab/Tab.tsx
7486
+ var import_jsx_runtime315 = require("react/jsx-runtime");
7487
+ var Tab = (props) => {
7488
+ const { activeIndex, onChange, tabs, type, size = "md" } = props;
7489
+ const [underlineStyle, setUnderlineStyle] = import_react13.default.useState({
7490
+ left: 0,
7491
+ width: 0
7492
+ });
7493
+ const itemRefs = import_react13.default.useRef([]);
7494
+ const handleChangeActiveTab = (tabItem, tabIdx) => {
7495
+ onChange(tabItem, tabIdx);
7496
+ };
7497
+ import_react13.default.useEffect(() => {
7498
+ const el = itemRefs.current[activeIndex];
7499
+ if (el) {
7500
+ setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
7501
+ }
7502
+ }, [activeIndex, tabs.length]);
7503
+ return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
7504
+ tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
7505
+ TabItem_default,
7506
+ {
7507
+ onClick: () => handleChangeActiveTab(tab, idx),
7508
+ isActive: activeIndex === idx,
7509
+ ref: (el) => {
7510
+ itemRefs.current[idx] = el;
7511
+ },
7512
+ title: tab.title
7513
+ },
7514
+ `${tab.value}_${idx}`
7515
+ )),
7516
+ type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
7517
+ "div",
7518
+ {
7519
+ className: "tab-toggle-underline",
7520
+ style: {
7521
+ left: underlineStyle.left,
7522
+ width: underlineStyle.width
7523
+ }
7524
+ }
7525
+ )
7526
+ ] });
7527
+ };
7528
+ Tab.displayName = "Tab";
7529
+ var Tab_default = Tab;
7530
+
7531
+ // src/components/DatePicker/RangePicker/index.tsx
7532
+ var import_jsx_runtime316 = require("react/jsx-runtime");
7376
7533
  var RangePicker = (props) => {
7377
7534
  const {
7378
7535
  startDate,
@@ -7382,139 +7539,92 @@ var RangePicker = (props) => {
7382
7539
  maxDate,
7383
7540
  locale = "ko"
7384
7541
  } = props;
7385
- const [activeTab, setActiveTab] = import_react13.default.useState("start");
7386
- const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
7387
- const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
7388
- const isDisabled = (date, type) => {
7389
- const d = date.getTime();
7390
- if (minDate) {
7391
- const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime();
7392
- if (d < min) return true;
7393
- }
7394
- if (maxDate) {
7395
- const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime();
7396
- if (d > max) return true;
7397
- }
7398
- if (type === "end") {
7399
- const start = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate()).getTime();
7400
- if (d < start) return true;
7401
- }
7402
- if (type === "start") {
7403
- const end = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate()).getTime();
7404
- if (d > end) return true;
7405
- }
7406
- return false;
7542
+ const [activeTab, setActiveTab] = import_react14.default.useState("start");
7543
+ const handleStartChange = (date) => {
7544
+ if (!date) return;
7545
+ const newStart = date > endDate ? endDate : date;
7546
+ onChange?.({ startDate: newStart, endDate });
7407
7547
  };
7408
- const weekdays = WEEKDAY_LABELS[locale];
7409
- const renderCalendar = (cal, type) => {
7410
- const label = type === "start" ? locale === "ko" ? "\uC2DC\uC791" : "Start" : locale === "ko" ? "\uC885\uB8CC" : "End";
7411
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panel", children: [
7412
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "datepicker-range-label", children: label }),
7413
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-header", children: [
7414
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7415
- "button",
7416
- {
7417
- className: "datepicker-nav",
7418
- onClick: cal.goToPrevMonth,
7419
- type: "button",
7420
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronLeftIcon_default, {})
7421
- }
7422
- ),
7423
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "datepicker-title", children: locale === "ko" ? `${cal.year}\uB144 ${MONTH_LABELS.ko[cal.month]}` : `${MONTH_LABELS.en[cal.month]} ${cal.year}` }),
7424
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7425
- "button",
7426
- {
7427
- className: "datepicker-nav",
7428
- onClick: cal.goToNextMonth,
7429
- type: "button",
7430
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronRightIcon_default, {})
7431
- }
7432
- )
7433
- ] }),
7434
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7435
- "div",
7436
- {
7437
- className: clsx_default(
7438
- "datepicker-weekday",
7439
- i === 0 && "sunday",
7440
- i === 6 && "saturday"
7441
- ),
7442
- children: w
7443
- },
7444
- w
7445
- )) }),
7446
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-grid", children: cal.days.map((day, idx) => {
7447
- const disabled = isDisabled(day.date, type);
7448
- const isStart = isSameDay(day.date, startDate);
7449
- const isEnd = isSameDay(day.date, endDate);
7450
- const inRange = isInRange(day.date, startDate, endDate);
7451
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7452
- RangeDayCell,
7453
- {
7454
- day,
7455
- disabled,
7456
- isStart,
7457
- isEnd,
7458
- inRange,
7459
- onClick: () => {
7460
- if (!disabled && day.isCurrentMonth) {
7461
- if (type === "start") {
7462
- const newStart = day.date > endDate ? endDate : day.date;
7463
- onChange?.({ startDate: newStart, endDate });
7464
- } else {
7465
- const newEnd = day.date < startDate ? startDate : day.date;
7466
- onChange?.({ startDate, endDate: newEnd });
7467
- }
7468
- }
7469
- }
7470
- },
7471
- idx
7472
- );
7473
- }) })
7474
- ] });
7548
+ const handleEndChange = (date) => {
7549
+ if (!date) return;
7550
+ const newEnd = date < startDate ? startDate : date;
7551
+ onChange?.({ startDate, endDate: newEnd });
7475
7552
  };
7476
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
7477
- "div",
7478
- {
7479
- className: clsx_default("lib-xplat-datepicker", "range"),
7480
- children: [
7481
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-tabs", children: [
7482
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7483
- "button",
7484
- {
7485
- type: "button",
7486
- className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
7487
- onClick: () => setActiveTab("start"),
7488
- children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
7489
- }
7490
- ),
7491
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
7492
- "button",
7493
- {
7494
- type: "button",
7495
- className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
7496
- onClick: () => setActiveTab("end"),
7497
- children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
7498
- }
7499
- )
7500
- ] }),
7501
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panels", children: [
7502
- renderCalendar(startCal, "start"),
7503
- renderCalendar(endCal, "end")
7504
- ] }),
7505
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
7506
- ]
7507
- }
7508
- );
7553
+ const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
7554
+ const endMinDate = minDate && startDate > minDate ? startDate : startDate;
7555
+ return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
7556
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7557
+ Tab_default,
7558
+ {
7559
+ activeIndex: activeTab === "start" ? 0 : 1,
7560
+ tabs: [
7561
+ { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
7562
+ { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
7563
+ ],
7564
+ onChange: (tab) => setActiveTab(tab.value),
7565
+ type: "toggle",
7566
+ size: "sm"
7567
+ }
7568
+ ) }),
7569
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "datepicker-range-panels", children: [
7570
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7571
+ SingleDatePicker_default,
7572
+ {
7573
+ value: startDate,
7574
+ onChange: handleStartChange,
7575
+ minDate,
7576
+ maxDate: startMaxDate,
7577
+ rangeStart: startDate,
7578
+ rangeEnd: endDate,
7579
+ locale
7580
+ }
7581
+ ),
7582
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7583
+ SingleDatePicker_default,
7584
+ {
7585
+ value: endDate,
7586
+ onChange: handleEndChange,
7587
+ minDate: endMinDate,
7588
+ maxDate,
7589
+ rangeStart: startDate,
7590
+ rangeEnd: endDate,
7591
+ locale
7592
+ }
7593
+ )
7594
+ ] }),
7595
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7596
+ SingleDatePicker_default,
7597
+ {
7598
+ value: startDate,
7599
+ onChange: handleStartChange,
7600
+ minDate,
7601
+ maxDate: startMaxDate,
7602
+ rangeStart: startDate,
7603
+ rangeEnd: endDate,
7604
+ locale
7605
+ }
7606
+ ) : /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7607
+ SingleDatePicker_default,
7608
+ {
7609
+ value: endDate,
7610
+ onChange: handleEndChange,
7611
+ minDate: endMinDate,
7612
+ maxDate,
7613
+ rangeStart: startDate,
7614
+ rangeEnd: endDate,
7615
+ locale
7616
+ }
7617
+ ) })
7618
+ ] });
7509
7619
  };
7510
7620
  RangePicker.displayName = "RangePicker";
7511
7621
  var RangePicker_default = RangePicker;
7512
7622
 
7513
7623
  // src/components/DatePicker/PopupPicker/index.tsx
7514
- var import_jsx_runtime315 = require("react/jsx-runtime");
7624
+ var import_jsx_runtime317 = require("react/jsx-runtime");
7515
7625
  var PopupPicker = (props) => {
7516
7626
  const { component, type, locale } = props;
7517
- const [isOpen, setIsOpen] = import_react14.default.useState(false);
7627
+ const [isOpen, setIsOpen] = import_react15.default.useState(false);
7518
7628
  const handleClick = () => setIsOpen(true);
7519
7629
  const handleClose = () => setIsOpen(false);
7520
7630
  const handleSingleChange = (date) => {
@@ -7522,11 +7632,11 @@ var PopupPicker = (props) => {
7522
7632
  props.onChange?.(date);
7523
7633
  handleClose();
7524
7634
  };
7525
- return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
7526
- import_react14.default.cloneElement(component, { onClick: handleClick }),
7527
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
7528
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-content", children: [
7529
- type === "single" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
7635
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
7636
+ import_react15.default.cloneElement(component, { onClick: handleClick }),
7637
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
7638
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "popup-datepicker-content", children: [
7639
+ type === "single" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
7530
7640
  SingleDatePicker_default,
7531
7641
  {
7532
7642
  value: props.value,
@@ -7536,7 +7646,7 @@ var PopupPicker = (props) => {
7536
7646
  locale
7537
7647
  }
7538
7648
  ),
7539
- type === "range" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
7649
+ type === "range" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
7540
7650
  RangePicker_default,
7541
7651
  {
7542
7652
  startDate: props.startDate,
@@ -7548,8 +7658,8 @@ var PopupPicker = (props) => {
7548
7658
  }
7549
7659
  )
7550
7660
  ] }),
7551
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-footer", children: [
7552
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
7661
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "popup-datepicker-footer", children: [
7662
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
7553
7663
  Button_default,
7554
7664
  {
7555
7665
  type: "secondary",
@@ -7557,7 +7667,7 @@ var PopupPicker = (props) => {
7557
7667
  children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
7558
7668
  }
7559
7669
  ),
7560
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7670
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7561
7671
  ] })
7562
7672
  ] }) })
7563
7673
  ] });
@@ -7566,10 +7676,10 @@ PopupPicker.displayName = "PopupPicker";
7566
7676
  var PopupPicker_default = PopupPicker;
7567
7677
 
7568
7678
  // src/components/Divider/Divider.tsx
7569
- var import_jsx_runtime316 = require("react/jsx-runtime");
7679
+ var import_jsx_runtime318 = require("react/jsx-runtime");
7570
7680
  var Divider = (props) => {
7571
7681
  const { orientation = "horizontal" } = props;
7572
- return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
7682
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
7573
7683
  "div",
7574
7684
  {
7575
7685
  className: clsx_default("lib-xplat-divider", orientation),
@@ -7582,15 +7692,15 @@ Divider.displayName = "Divider";
7582
7692
  var Divider_default = Divider;
7583
7693
 
7584
7694
  // src/components/Drawer/Drawer.tsx
7585
- var import_react15 = __toESM(require("react"), 1);
7695
+ var import_react16 = __toESM(require("react"), 1);
7586
7696
  var import_react_dom2 = require("react-dom");
7587
- var import_jsx_runtime317 = require("react/jsx-runtime");
7697
+ var import_jsx_runtime319 = require("react/jsx-runtime");
7588
7698
  var ANIMATION_DURATION_MS2 = 250;
7589
7699
  var Drawer = (props) => {
7590
7700
  const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
7591
- const [mounted, setMounted] = import_react15.default.useState(false);
7592
- const [visible, setVisible] = import_react15.default.useState(false);
7593
- import_react15.default.useEffect(() => {
7701
+ const [mounted, setMounted] = import_react16.default.useState(false);
7702
+ const [visible, setVisible] = import_react16.default.useState(false);
7703
+ import_react16.default.useEffect(() => {
7594
7704
  if (isOpen) {
7595
7705
  setMounted(true);
7596
7706
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -7605,12 +7715,12 @@ var Drawer = (props) => {
7605
7715
  const stateClass = visible ? "enter" : "exit";
7606
7716
  const widthValue = typeof width === "number" ? `${width}px` : width;
7607
7717
  return (0, import_react_dom2.createPortal)(
7608
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
7718
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
7609
7719
  "div",
7610
7720
  {
7611
7721
  className: clsx_default("lib-xplat-drawer-overlay", stateClass),
7612
7722
  onClick: onClose,
7613
- children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
7723
+ children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
7614
7724
  "div",
7615
7725
  {
7616
7726
  className: clsx_default("lib-xplat-drawer", placement, stateClass),
@@ -7619,11 +7729,11 @@ var Drawer = (props) => {
7619
7729
  "aria-modal": "true",
7620
7730
  onClick: (e) => e.stopPropagation(),
7621
7731
  children: [
7622
- title && /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "drawer-header", children: [
7623
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", { className: "drawer-title", children: title }),
7624
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
7732
+ title && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "drawer-header", children: [
7733
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { className: "drawer-title", children: title }),
7734
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
7625
7735
  ] }),
7626
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "drawer-body", children })
7736
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "drawer-body", children })
7627
7737
  ]
7628
7738
  }
7629
7739
  )
@@ -7636,16 +7746,16 @@ Drawer.displayName = "Drawer";
7636
7746
  var Drawer_default = Drawer;
7637
7747
 
7638
7748
  // src/components/Dropdown/Dropdown.tsx
7639
- var import_react17 = __toESM(require("react"), 1);
7749
+ var import_react19 = __toESM(require("react"), 1);
7640
7750
 
7641
7751
  // src/tokens/hooks/useAutoPosition.ts
7642
- var import_react16 = __toESM(require("react"), 1);
7752
+ var import_react17 = __toESM(require("react"), 1);
7643
7753
  var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7644
- const [position, setPosition] = import_react16.default.useState({
7754
+ const [position, setPosition] = import_react17.default.useState({
7645
7755
  position: {},
7646
7756
  direction: "bottom"
7647
7757
  });
7648
- const calculatePosition = import_react16.default.useCallback(() => {
7758
+ const calculatePosition = import_react17.default.useCallback(() => {
7649
7759
  if (!triggerRef.current || !popRef.current) return;
7650
7760
  const triggerRect = triggerRef.current.getBoundingClientRect();
7651
7761
  const popRect = popRef.current.getBoundingClientRect();
@@ -7667,7 +7777,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7667
7777
  direction
7668
7778
  });
7669
7779
  }, [triggerRef, popRef]);
7670
- import_react16.default.useEffect(() => {
7780
+ import_react17.default.useEffect(() => {
7671
7781
  calculatePosition();
7672
7782
  window.addEventListener("resize", calculatePosition);
7673
7783
  return () => window.removeEventListener("resize", calculatePosition);
@@ -7676,18 +7786,43 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7676
7786
  };
7677
7787
  var useAutoPosition_default = useAutoPosition;
7678
7788
 
7789
+ // src/tokens/hooks/useClickOutside.ts
7790
+ var import_react18 = __toESM(require("react"), 1);
7791
+ var useClickOutside = (refs, handler, enabled = true) => {
7792
+ import_react18.default.useEffect(() => {
7793
+ if (!enabled) return;
7794
+ const refArray = Array.isArray(refs) ? refs : [refs];
7795
+ const listener = (event) => {
7796
+ const target = event.target;
7797
+ const isInside = refArray.some(
7798
+ (ref) => ref.current && ref.current.contains(target)
7799
+ );
7800
+ if (!isInside) {
7801
+ handler();
7802
+ }
7803
+ };
7804
+ document.addEventListener("mousedown", listener);
7805
+ document.addEventListener("touchstart", listener);
7806
+ return () => {
7807
+ document.removeEventListener("mousedown", listener);
7808
+ document.removeEventListener("touchstart", listener);
7809
+ };
7810
+ }, [refs, handler, enabled]);
7811
+ };
7812
+ var useClickOutside_default = useClickOutside;
7813
+
7679
7814
  // src/components/Dropdown/Dropdown.tsx
7680
- var import_jsx_runtime318 = require("react/jsx-runtime");
7815
+ var import_jsx_runtime320 = require("react/jsx-runtime");
7681
7816
  var Dropdown = (props) => {
7682
7817
  const { items, children } = props;
7683
- const [isOpen, setIsOpen] = import_react17.default.useState(false);
7684
- const [mounted, setMounted] = import_react17.default.useState(false);
7685
- const [visible, setVisible] = import_react17.default.useState(false);
7686
- const triggerRef = import_react17.default.useRef(null);
7687
- const menuRef = import_react17.default.useRef(null);
7818
+ const [isOpen, setIsOpen] = import_react19.default.useState(false);
7819
+ const [mounted, setMounted] = import_react19.default.useState(false);
7820
+ const [visible, setVisible] = import_react19.default.useState(false);
7821
+ const triggerRef = import_react19.default.useRef(null);
7822
+ const menuRef = import_react19.default.useRef(null);
7688
7823
  const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
7689
7824
  useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
7690
- import_react17.default.useEffect(() => {
7825
+ import_react19.default.useEffect(() => {
7691
7826
  if (isOpen) {
7692
7827
  setMounted(true);
7693
7828
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -7702,8 +7837,8 @@ var Dropdown = (props) => {
7702
7837
  item.onClick?.();
7703
7838
  setIsOpen(false);
7704
7839
  };
7705
- return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: "lib-xplat-dropdown", children: [
7706
- /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
7840
+ return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "lib-xplat-dropdown", children: [
7841
+ /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
7707
7842
  "div",
7708
7843
  {
7709
7844
  ref: triggerRef,
@@ -7712,14 +7847,14 @@ var Dropdown = (props) => {
7712
7847
  children
7713
7848
  }
7714
7849
  ),
7715
- mounted && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
7850
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
7716
7851
  "div",
7717
7852
  {
7718
7853
  ref: menuRef,
7719
7854
  className: clsx_default("dropdown-menu", direction, { visible }),
7720
7855
  style: { top: position.top, left: position.left },
7721
7856
  role: "menu",
7722
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
7857
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
7723
7858
  "button",
7724
7859
  {
7725
7860
  className: clsx_default("dropdown-item", {
@@ -7741,23 +7876,23 @@ Dropdown.displayName = "Dropdown";
7741
7876
  var Dropdown_default = Dropdown;
7742
7877
 
7743
7878
  // src/components/EmptyState/EmptyState.tsx
7744
- var import_jsx_runtime319 = require("react/jsx-runtime");
7879
+ var import_jsx_runtime321 = require("react/jsx-runtime");
7745
7880
  var EmptyState = (props) => {
7746
7881
  const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
7747
- return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-empty-state", children: [
7748
- icon && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-icon", children: icon }),
7749
- !icon && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("path", { d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" }) }) }),
7750
- /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-title", children: title }),
7751
- description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-description", children: description }),
7752
- action && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-action", children: action })
7882
+ return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("div", { className: "lib-xplat-empty-state", children: [
7883
+ icon && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "empty-icon", children: icon }),
7884
+ !icon && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("path", { d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" }) }) }),
7885
+ /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("p", { className: "empty-title", children: title }),
7886
+ description && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("p", { className: "empty-description", children: description }),
7887
+ action && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "empty-action", children: action })
7753
7888
  ] });
7754
7889
  };
7755
7890
  EmptyState.displayName = "EmptyState";
7756
7891
  var EmptyState_default = EmptyState;
7757
7892
 
7758
7893
  // src/components/FileUpload/FileUpload.tsx
7759
- var import_react18 = __toESM(require("react"), 1);
7760
- var import_jsx_runtime320 = require("react/jsx-runtime");
7894
+ var import_react20 = __toESM(require("react"), 1);
7895
+ var import_jsx_runtime322 = require("react/jsx-runtime");
7761
7896
  var FileUpload = (props) => {
7762
7897
  const {
7763
7898
  accept,
@@ -7767,8 +7902,8 @@ var FileUpload = (props) => {
7767
7902
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
7768
7903
  description
7769
7904
  } = props;
7770
- const [isDragOver, setIsDragOver] = import_react18.default.useState(false);
7771
- const inputRef = import_react18.default.useRef(null);
7905
+ const [isDragOver, setIsDragOver] = import_react20.default.useState(false);
7906
+ const inputRef = import_react20.default.useRef(null);
7772
7907
  const handleFiles = (fileList) => {
7773
7908
  let files = Array.from(fileList);
7774
7909
  if (maxSize) {
@@ -7798,7 +7933,7 @@ var FileUpload = (props) => {
7798
7933
  handleFiles(e.target.files);
7799
7934
  }
7800
7935
  };
7801
- return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)(
7936
+ return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
7802
7937
  "div",
7803
7938
  {
7804
7939
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -7807,7 +7942,7 @@ var FileUpload = (props) => {
7807
7942
  onDragLeave: handleDragLeave,
7808
7943
  onClick: () => inputRef.current?.click(),
7809
7944
  children: [
7810
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
7945
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
7811
7946
  "input",
7812
7947
  {
7813
7948
  ref: inputRef,
@@ -7817,9 +7952,9 @@ var FileUpload = (props) => {
7817
7952
  onChange: handleChange
7818
7953
  }
7819
7954
  ),
7820
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(UploadIcon_default, {}) }),
7821
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("p", { className: "upload-label", children: label }),
7822
- description && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("p", { className: "upload-description", children: description })
7955
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(UploadIcon_default, {}) }),
7956
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("p", { className: "upload-label", children: label }),
7957
+ description && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("p", { className: "upload-description", children: description })
7823
7958
  ]
7824
7959
  }
7825
7960
  );
@@ -7828,10 +7963,10 @@ FileUpload.displayName = "FileUpload";
7828
7963
  var FileUpload_default = FileUpload;
7829
7964
 
7830
7965
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
7831
- var import_react20 = __toESM(require("react"), 1);
7966
+ var import_react22 = __toESM(require("react"), 1);
7832
7967
 
7833
7968
  // src/components/HtmlTypeWriter/utils.ts
7834
- var import_react19 = __toESM(require("react"), 1);
7969
+ var import_react21 = __toESM(require("react"), 1);
7835
7970
  var voidTags = /* @__PURE__ */ new Set([
7836
7971
  "br",
7837
7972
  "img",
@@ -7899,41 +8034,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
7899
8034
  props[attr.name] = attr.value;
7900
8035
  });
7901
8036
  if (voidTags.has(tag)) {
7902
- return import_react19.default.createElement(tag, props);
8037
+ return import_react21.default.createElement(tag, props);
7903
8038
  }
7904
8039
  const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
7905
- return import_react19.default.createElement(tag, props, ...children);
8040
+ return import_react21.default.createElement(tag, props, ...children);
7906
8041
  };
7907
8042
  var htmlToReactProgressive = (root, typedLen, rangeMap) => {
7908
8043
  const nodes = Array.from(root.childNodes).map((child, idx) => {
7909
8044
  const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
7910
- return node == null ? null : import_react19.default.createElement(import_react19.default.Fragment, { key: idx }, node);
8045
+ return node == null ? null : import_react21.default.createElement(import_react21.default.Fragment, { key: idx }, node);
7911
8046
  }).filter(Boolean);
7912
8047
  return nodes.length === 0 ? null : nodes;
7913
8048
  };
7914
8049
 
7915
8050
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
7916
- var import_jsx_runtime321 = require("react/jsx-runtime");
8051
+ var import_jsx_runtime323 = require("react/jsx-runtime");
7917
8052
  var HtmlTypeWriter = ({
7918
8053
  html,
7919
8054
  duration = 20,
7920
8055
  onDone,
7921
8056
  onChange
7922
8057
  }) => {
7923
- const [typedLen, setTypedLen] = import_react20.default.useState(0);
7924
- const doneCalledRef = import_react20.default.useRef(false);
7925
- const { doc, rangeMap, totalLength } = import_react20.default.useMemo(() => {
8058
+ const [typedLen, setTypedLen] = import_react22.default.useState(0);
8059
+ const doneCalledRef = import_react22.default.useRef(false);
8060
+ const { doc, rangeMap, totalLength } = import_react22.default.useMemo(() => {
7926
8061
  if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
7927
8062
  const decoded = decodeHtmlEntities(html);
7928
8063
  const doc2 = new DOMParser().parseFromString(decoded, "text/html");
7929
8064
  const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
7930
8065
  return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
7931
8066
  }, [html]);
7932
- import_react20.default.useEffect(() => {
8067
+ import_react22.default.useEffect(() => {
7933
8068
  setTypedLen(0);
7934
8069
  doneCalledRef.current = false;
7935
8070
  }, [html]);
7936
- import_react20.default.useEffect(() => {
8071
+ import_react22.default.useEffect(() => {
7937
8072
  if (!totalLength) return;
7938
8073
  if (typedLen >= totalLength) return;
7939
8074
  const timer = window.setInterval(() => {
@@ -7941,33 +8076,33 @@ var HtmlTypeWriter = ({
7941
8076
  }, duration);
7942
8077
  return () => window.clearInterval(timer);
7943
8078
  }, [typedLen, totalLength, duration]);
7944
- import_react20.default.useEffect(() => {
8079
+ import_react22.default.useEffect(() => {
7945
8080
  if (typedLen > 0 && typedLen < totalLength) {
7946
8081
  onChange?.();
7947
8082
  }
7948
8083
  }, [typedLen, totalLength, onChange]);
7949
- import_react20.default.useEffect(() => {
8084
+ import_react22.default.useEffect(() => {
7950
8085
  if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
7951
8086
  doneCalledRef.current = true;
7952
8087
  onDone?.();
7953
8088
  }
7954
8089
  }, [typedLen, totalLength, onDone]);
7955
- const parsed = import_react20.default.useMemo(
8090
+ const parsed = import_react22.default.useMemo(
7956
8091
  () => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
7957
8092
  [doc, typedLen, rangeMap]
7958
8093
  );
7959
- return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
8094
+ return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
7960
8095
  };
7961
8096
  HtmlTypeWriter.displayName = "HtmlTypeWriter";
7962
8097
  var HtmlTypeWriter_default = HtmlTypeWriter;
7963
8098
 
7964
8099
  // src/components/ImageSelector/ImageSelector.tsx
7965
- var import_react21 = __toESM(require("react"), 1);
7966
- var import_jsx_runtime322 = require("react/jsx-runtime");
8100
+ var import_react23 = __toESM(require("react"), 1);
8101
+ var import_jsx_runtime324 = require("react/jsx-runtime");
7967
8102
  var ImageSelector = (props) => {
7968
8103
  const { value, label, onChange } = props;
7969
- const [previewUrl, setPreviewUrl] = import_react21.default.useState();
7970
- import_react21.default.useEffect(() => {
8104
+ const [previewUrl, setPreviewUrl] = import_react23.default.useState();
8105
+ import_react23.default.useEffect(() => {
7971
8106
  if (!value) {
7972
8107
  setPreviewUrl(void 0);
7973
8108
  return;
@@ -7976,7 +8111,7 @@ var ImageSelector = (props) => {
7976
8111
  setPreviewUrl(url);
7977
8112
  return () => URL.revokeObjectURL(url);
7978
8113
  }, [value]);
7979
- const inputRef = import_react21.default.useRef(null);
8114
+ const inputRef = import_react23.default.useRef(null);
7980
8115
  const handleFileChange = (e) => {
7981
8116
  const selectedFile = e.target.files?.[0];
7982
8117
  if (selectedFile) {
@@ -7989,8 +8124,8 @@ var ImageSelector = (props) => {
7989
8124
  const handleOpenFileDialog = () => {
7990
8125
  inputRef.current?.click();
7991
8126
  };
7992
- return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
7993
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
8127
+ return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
8128
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
7994
8129
  "input",
7995
8130
  {
7996
8131
  type: "file",
@@ -8000,13 +8135,13 @@ var ImageSelector = (props) => {
8000
8135
  ref: inputRef
8001
8136
  }
8002
8137
  ),
8003
- value && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "action-bar", children: [
8004
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(UploadIcon_default, {}) }),
8005
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(DeleteIcon_default, {}) })
8138
+ value && /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: "action-bar", children: [
8139
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(UploadIcon_default, {}) }),
8140
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(DeleteIcon_default, {}) })
8006
8141
  ] }),
8007
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
8008
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ImageIcon_default, {}) }),
8009
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
8142
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
8143
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(ImageIcon_default, {}) }),
8144
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
8010
8145
  ] }) })
8011
8146
  ] });
8012
8147
  };
@@ -8014,7 +8149,7 @@ ImageSelector.displayName = "ImageSelector";
8014
8149
  var ImageSelector_default = ImageSelector;
8015
8150
 
8016
8151
  // src/components/Pagination/Pagination.tsx
8017
- var import_jsx_runtime323 = require("react/jsx-runtime");
8152
+ var import_jsx_runtime325 = require("react/jsx-runtime");
8018
8153
  var getPageRange = (current, totalPages, siblingCount) => {
8019
8154
  const totalNumbers = siblingCount * 2 + 5;
8020
8155
  if (totalPages <= totalNumbers) {
@@ -8057,19 +8192,19 @@ var Pagination = (props) => {
8057
8192
  onChange?.(page);
8058
8193
  }
8059
8194
  };
8060
- return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
8061
- /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
8195
+ return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
8196
+ /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
8062
8197
  "button",
8063
8198
  {
8064
8199
  className: "page-btn prev",
8065
8200
  disabled: current <= 1,
8066
8201
  onClick: () => handleClick(current - 1),
8067
8202
  "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
8068
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronLeftIcon_default, {})
8203
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronLeftIcon_default, {})
8069
8204
  }
8070
8205
  ),
8071
8206
  pages.map(
8072
- (page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
8207
+ (page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
8073
8208
  "button",
8074
8209
  {
8075
8210
  className: clsx_default("page-btn", { active: page === current }),
@@ -8080,14 +8215,14 @@ var Pagination = (props) => {
8080
8215
  page
8081
8216
  )
8082
8217
  ),
8083
- /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
8218
+ /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
8084
8219
  "button",
8085
8220
  {
8086
8221
  className: "page-btn next",
8087
8222
  disabled: current >= totalPages,
8088
8223
  onClick: () => handleClick(current + 1),
8089
8224
  "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
8090
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronRightIcon_default, {})
8225
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronRightIcon_default, {})
8091
8226
  }
8092
8227
  )
8093
8228
  ] });
@@ -8096,17 +8231,17 @@ Pagination.displayName = "Pagination";
8096
8231
  var Pagination_default = Pagination;
8097
8232
 
8098
8233
  // src/components/PopOver/PopOver.tsx
8099
- var import_react22 = __toESM(require("react"), 1);
8100
- var import_jsx_runtime324 = require("react/jsx-runtime");
8234
+ var import_react24 = __toESM(require("react"), 1);
8235
+ var import_jsx_runtime326 = require("react/jsx-runtime");
8101
8236
  var PopOver = (props) => {
8102
8237
  const { children, isOpen, onClose, PopOverEl } = props;
8103
- const popRef = import_react22.default.useRef(null);
8104
- const triggerRef = import_react22.default.useRef(null);
8105
- const [localOpen, setLocalOpen] = import_react22.default.useState(false);
8106
- const [eventTrigger, setEventTrigger] = import_react22.default.useState(false);
8238
+ const popRef = import_react24.default.useRef(null);
8239
+ const triggerRef = import_react24.default.useRef(null);
8240
+ const [localOpen, setLocalOpen] = import_react24.default.useState(false);
8241
+ const [eventTrigger, setEventTrigger] = import_react24.default.useState(false);
8107
8242
  useClickOutside_default([popRef, triggerRef], onClose, isOpen);
8108
8243
  const position = useAutoPosition_default(triggerRef, popRef, localOpen);
8109
- import_react22.default.useEffect(() => {
8244
+ import_react24.default.useEffect(() => {
8110
8245
  if (isOpen) {
8111
8246
  setLocalOpen(isOpen);
8112
8247
  setTimeout(() => {
@@ -8119,7 +8254,7 @@ var PopOver = (props) => {
8119
8254
  }, 200);
8120
8255
  }
8121
8256
  }, [isOpen]);
8122
- return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
8257
+ return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
8123
8258
  "div",
8124
8259
  {
8125
8260
  className: "lib-xplat-pop-over",
@@ -8129,7 +8264,7 @@ var PopOver = (props) => {
8129
8264
  },
8130
8265
  children: [
8131
8266
  children,
8132
- localOpen && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
8267
+ localOpen && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
8133
8268
  "div",
8134
8269
  {
8135
8270
  className: clsx_default(
@@ -8152,7 +8287,7 @@ PopOver.displayName = "PopOver";
8152
8287
  var PopOver_default = PopOver;
8153
8288
 
8154
8289
  // src/components/Progress/Progress.tsx
8155
- var import_jsx_runtime325 = require("react/jsx-runtime");
8290
+ var import_jsx_runtime327 = require("react/jsx-runtime");
8156
8291
  var Progress = (props) => {
8157
8292
  const {
8158
8293
  value,
@@ -8162,8 +8297,8 @@ var Progress = (props) => {
8162
8297
  showLabel = false
8163
8298
  } = props;
8164
8299
  const percentage = Math.min(100, Math.max(0, value / max * 100));
8165
- return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
8166
- /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
8300
+ return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
8301
+ /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
8167
8302
  "div",
8168
8303
  {
8169
8304
  className: "track",
@@ -8171,7 +8306,7 @@ var Progress = (props) => {
8171
8306
  "aria-valuenow": value,
8172
8307
  "aria-valuemin": 0,
8173
8308
  "aria-valuemax": max,
8174
- children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
8309
+ children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
8175
8310
  "div",
8176
8311
  {
8177
8312
  className: "bar",
@@ -8180,7 +8315,7 @@ var Progress = (props) => {
8180
8315
  )
8181
8316
  }
8182
8317
  ),
8183
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("span", { className: "label", children: [
8318
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("span", { className: "label", children: [
8184
8319
  Math.round(percentage),
8185
8320
  "%"
8186
8321
  ] })
@@ -8190,17 +8325,17 @@ Progress.displayName = "Progress";
8190
8325
  var Progress_default = Progress;
8191
8326
 
8192
8327
  // src/components/Radio/RadioGroupContext.tsx
8193
- var import_react23 = __toESM(require("react"), 1);
8194
- var RadioGroupContext = import_react23.default.createContext(
8328
+ var import_react25 = __toESM(require("react"), 1);
8329
+ var RadioGroupContext = import_react25.default.createContext(
8195
8330
  null
8196
8331
  );
8197
8332
  var useRadioGroupContext = () => {
8198
- return import_react23.default.useContext(RadioGroupContext);
8333
+ return import_react25.default.useContext(RadioGroupContext);
8199
8334
  };
8200
8335
  var RadioGroupContext_default = RadioGroupContext;
8201
8336
 
8202
8337
  // src/components/Radio/Radio.tsx
8203
- var import_jsx_runtime326 = require("react/jsx-runtime");
8338
+ var import_jsx_runtime328 = require("react/jsx-runtime");
8204
8339
  var Radio = (props) => {
8205
8340
  const {
8206
8341
  label,
@@ -8218,7 +8353,7 @@ var Radio = (props) => {
8218
8353
  value,
8219
8354
  onChange: rest.onChange
8220
8355
  };
8221
- return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
8356
+ return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
8222
8357
  "label",
8223
8358
  {
8224
8359
  className: clsx_default(
@@ -8228,18 +8363,18 @@ var Radio = (props) => {
8228
8363
  localChecked ? "checked" : void 0
8229
8364
  ),
8230
8365
  children: [
8231
- /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
8232
- /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
8366
+ /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
8367
+ /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
8233
8368
  "div",
8234
8369
  {
8235
8370
  className: clsx_default(
8236
8371
  "circle",
8237
8372
  localChecked ? "checked" : void 0
8238
8373
  ),
8239
- children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "inner-circle" })
8374
+ children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "inner-circle" })
8240
8375
  }
8241
8376
  ),
8242
- label && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("span", { children: label })
8377
+ label && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("span", { children: label })
8243
8378
  ]
8244
8379
  }
8245
8380
  );
@@ -8248,28 +8383,28 @@ Radio.displayName = "Radio";
8248
8383
  var Radio_default = Radio;
8249
8384
 
8250
8385
  // src/components/Radio/RadioGroup.tsx
8251
- var import_jsx_runtime327 = require("react/jsx-runtime");
8386
+ var import_jsx_runtime329 = require("react/jsx-runtime");
8252
8387
  var RadioGroup = (props) => {
8253
8388
  const { children, ...rest } = props;
8254
- return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(import_jsx_runtime327.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
8389
+ return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_jsx_runtime329.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
8255
8390
  };
8256
8391
  RadioGroup.displayName = "RadioGroup";
8257
8392
  var RadioGroup_default = RadioGroup;
8258
8393
 
8259
8394
  // src/components/Select/Select.tsx
8260
- var import_react26 = __toESM(require("react"), 1);
8395
+ var import_react28 = __toESM(require("react"), 1);
8261
8396
 
8262
8397
  // src/components/Select/context.ts
8263
- var import_react24 = __toESM(require("react"), 1);
8264
- var SelectContext = import_react24.default.createContext(null);
8398
+ var import_react26 = __toESM(require("react"), 1);
8399
+ var SelectContext = import_react26.default.createContext(null);
8265
8400
  var context_default = SelectContext;
8266
8401
 
8267
8402
  // src/components/Select/SelectItem.tsx
8268
- var import_react25 = __toESM(require("react"), 1);
8269
- var import_jsx_runtime328 = require("react/jsx-runtime");
8403
+ var import_react27 = __toESM(require("react"), 1);
8404
+ var import_jsx_runtime330 = require("react/jsx-runtime");
8270
8405
  var SelectItem = (props) => {
8271
8406
  const { children, value, onClick, disabled = false } = props;
8272
- const ctx = import_react25.default.useContext(context_default);
8407
+ const ctx = import_react27.default.useContext(context_default);
8273
8408
  const handleClick = (e) => {
8274
8409
  e.preventDefault();
8275
8410
  e.stopPropagation();
@@ -8278,7 +8413,7 @@ var SelectItem = (props) => {
8278
8413
  ctx?.close();
8279
8414
  onClick?.();
8280
8415
  };
8281
- return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
8416
+ return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
8282
8417
  "div",
8283
8418
  {
8284
8419
  className: clsx_default("select-item", disabled && "disabled"),
@@ -8299,7 +8434,7 @@ SelectItem.displayName = "Select.Item";
8299
8434
  var SelectItem_default = SelectItem;
8300
8435
 
8301
8436
  // src/components/Select/Select.tsx
8302
- var import_jsx_runtime329 = require("react/jsx-runtime");
8437
+ var import_jsx_runtime331 = require("react/jsx-runtime");
8303
8438
  var ANIMATION_DURATION_MS3 = 200;
8304
8439
  var SelectRoot = (props) => {
8305
8440
  const {
@@ -8311,26 +8446,26 @@ var SelectRoot = (props) => {
8311
8446
  error = false,
8312
8447
  size = "md"
8313
8448
  } = props;
8314
- const itemChildren = import_react26.default.Children.toArray(children).filter(
8315
- (child) => import_react26.default.isValidElement(child) && child.type === SelectItem_default
8449
+ const itemChildren = import_react28.default.Children.toArray(children).filter(
8450
+ (child) => import_react28.default.isValidElement(child) && child.type === SelectItem_default
8316
8451
  );
8317
8452
  const isControlled = valueProp !== void 0;
8318
- const [isOpen, setOpen] = import_react26.default.useState(false);
8319
- const [uncontrolledLabel, setUncontrolledLabel] = import_react26.default.useState(null);
8320
- const controlledLabel = import_react26.default.useMemo(() => {
8453
+ const [isOpen, setOpen] = import_react28.default.useState(false);
8454
+ const [uncontrolledLabel, setUncontrolledLabel] = import_react28.default.useState(null);
8455
+ const controlledLabel = import_react28.default.useMemo(() => {
8321
8456
  if (!isControlled) return null;
8322
8457
  const match = itemChildren.find((child) => child.props.value === valueProp);
8323
8458
  return match ? match.props.children : null;
8324
8459
  }, [isControlled, valueProp, itemChildren]);
8325
8460
  const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
8326
- const triggerRef = import_react26.default.useRef(null);
8327
- const contentRef = import_react26.default.useRef(null);
8328
- const [mounted, setMounted] = import_react26.default.useState(false);
8329
- const [visible, setVisible] = import_react26.default.useState(false);
8330
- import_react26.default.useEffect(() => {
8461
+ const triggerRef = import_react28.default.useRef(null);
8462
+ const contentRef = import_react28.default.useRef(null);
8463
+ const [mounted, setMounted] = import_react28.default.useState(false);
8464
+ const [visible, setVisible] = import_react28.default.useState(false);
8465
+ import_react28.default.useEffect(() => {
8331
8466
  if (disabled && isOpen) setOpen(false);
8332
8467
  }, [disabled, isOpen]);
8333
- import_react26.default.useEffect(() => {
8468
+ import_react28.default.useEffect(() => {
8334
8469
  if (isOpen) {
8335
8470
  setMounted(true);
8336
8471
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -8340,12 +8475,12 @@ var SelectRoot = (props) => {
8340
8475
  const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
8341
8476
  return () => clearTimeout(t);
8342
8477
  }, [isOpen]);
8343
- const open = import_react26.default.useCallback(() => setOpen(true), []);
8344
- const close = import_react26.default.useCallback(() => setOpen(false), []);
8345
- const toggle = import_react26.default.useCallback(() => setOpen((prev) => !prev), []);
8478
+ const open = import_react28.default.useCallback(() => setOpen(true), []);
8479
+ const close = import_react28.default.useCallback(() => setOpen(false), []);
8480
+ const toggle = import_react28.default.useCallback(() => setOpen((prev) => !prev), []);
8346
8481
  useClickOutside_default([contentRef, triggerRef], close, isOpen);
8347
8482
  const position = useAutoPosition_default(triggerRef, contentRef, mounted);
8348
- const setSelected = import_react26.default.useCallback(
8483
+ const setSelected = import_react28.default.useCallback(
8349
8484
  (label, itemValue) => {
8350
8485
  if (!isControlled) {
8351
8486
  setUncontrolledLabel(label);
@@ -8354,7 +8489,7 @@ var SelectRoot = (props) => {
8354
8489
  },
8355
8490
  [isControlled, onChange]
8356
8491
  );
8357
- const ctxValue = import_react26.default.useMemo(
8492
+ const ctxValue = import_react28.default.useMemo(
8358
8493
  () => ({
8359
8494
  isOpen,
8360
8495
  mounted,
@@ -8375,7 +8510,7 @@ var SelectRoot = (props) => {
8375
8510
  if (disabled) return;
8376
8511
  toggle();
8377
8512
  };
8378
- return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
8513
+ return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(
8379
8514
  "div",
8380
8515
  {
8381
8516
  className: clsx_default(
@@ -8386,7 +8521,7 @@ var SelectRoot = (props) => {
8386
8521
  mounted && "is-open"
8387
8522
  ),
8388
8523
  children: [
8389
- /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
8524
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(
8390
8525
  "div",
8391
8526
  {
8392
8527
  ref: triggerRef,
@@ -8410,7 +8545,7 @@ var SelectRoot = (props) => {
8410
8545
  }
8411
8546
  },
8412
8547
  children: [
8413
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
8548
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8414
8549
  "span",
8415
8550
  {
8416
8551
  className: clsx_default(
@@ -8420,18 +8555,18 @@ var SelectRoot = (props) => {
8420
8555
  children: selectedLabel ?? placeholder
8421
8556
  }
8422
8557
  ),
8423
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
8558
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8424
8559
  "span",
8425
8560
  {
8426
8561
  className: clsx_default("select-trigger-icon", isOpen && "open"),
8427
8562
  "aria-hidden": true,
8428
- children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(ChevronDownIcon_default, {})
8563
+ children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ChevronDownIcon_default, {})
8429
8564
  }
8430
8565
  )
8431
8566
  ]
8432
8567
  }
8433
8568
  ),
8434
- mounted && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
8569
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8435
8570
  "div",
8436
8571
  {
8437
8572
  className: clsx_default("select-content", position.direction, stateClass),
@@ -8452,14 +8587,14 @@ var Select = Object.assign(SelectRoot, {
8452
8587
  var Select_default = Select;
8453
8588
 
8454
8589
  // src/components/Skeleton/Skeleton.tsx
8455
- var import_jsx_runtime330 = require("react/jsx-runtime");
8590
+ var import_jsx_runtime332 = require("react/jsx-runtime");
8456
8591
  var Skeleton = (props) => {
8457
8592
  const { variant = "text", width, height } = props;
8458
8593
  const style = {
8459
8594
  width: typeof width === "number" ? `${width}px` : width,
8460
8595
  height: typeof height === "number" ? `${height}px` : height
8461
8596
  };
8462
- return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
8597
+ return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
8463
8598
  "div",
8464
8599
  {
8465
8600
  className: clsx_default("lib-xplat-skeleton", variant),
@@ -8472,20 +8607,20 @@ Skeleton.displayName = "Skeleton";
8472
8607
  var Skeleton_default = Skeleton;
8473
8608
 
8474
8609
  // src/components/Spinner/Spinner.tsx
8475
- var import_jsx_runtime331 = require("react/jsx-runtime");
8610
+ var import_jsx_runtime333 = require("react/jsx-runtime");
8476
8611
  var Spinner = (props) => {
8477
8612
  const {
8478
8613
  size = "md",
8479
8614
  type = "brand"
8480
8615
  } = props;
8481
- return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8616
+ return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8482
8617
  "div",
8483
8618
  {
8484
8619
  className: clsx_default("lib-xplat-spinner", size, type),
8485
8620
  role: "status",
8486
8621
  "aria-label": "\uB85C\uB529 \uC911",
8487
- children: /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8488
- /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8622
+ children: /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8623
+ /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8489
8624
  "circle",
8490
8625
  {
8491
8626
  className: "track",
@@ -8495,7 +8630,7 @@ var Spinner = (props) => {
8495
8630
  strokeWidth: "3"
8496
8631
  }
8497
8632
  ),
8498
- /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
8633
+ /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8499
8634
  "circle",
8500
8635
  {
8501
8636
  className: "indicator",
@@ -8514,20 +8649,20 @@ Spinner.displayName = "Spinner";
8514
8649
  var Spinner_default = Spinner;
8515
8650
 
8516
8651
  // src/components/Steps/Steps.tsx
8517
- var import_jsx_runtime332 = require("react/jsx-runtime");
8652
+ var import_jsx_runtime334 = require("react/jsx-runtime");
8518
8653
  var Steps = (props) => {
8519
8654
  const {
8520
8655
  items,
8521
8656
  current,
8522
8657
  type = "brand"
8523
8658
  } = props;
8524
- return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
8659
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
8525
8660
  const status = index < current ? "completed" : index === current ? "active" : "pending";
8526
- return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: clsx_default("step-item", status), children: [
8527
- /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { children: index + 1 }) }),
8528
- /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: "step-content", children: [
8529
- /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "step-title", children: item.title }),
8530
- item.description && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "step-description", children: item.description })
8661
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("step-item", status), children: [
8662
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { children: index + 1 }) }),
8663
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "step-content", children: [
8664
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "step-title", children: item.title }),
8665
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "step-description", children: item.description })
8531
8666
  ] })
8532
8667
  ] }, index);
8533
8668
  }) });
@@ -8536,8 +8671,8 @@ Steps.displayName = "Steps";
8536
8671
  var Steps_default = Steps;
8537
8672
 
8538
8673
  // src/components/Swiper/Swiper.tsx
8539
- var import_react27 = __toESM(require("react"), 1);
8540
- var import_jsx_runtime333 = require("react/jsx-runtime");
8674
+ var import_react29 = __toESM(require("react"), 1);
8675
+ var import_jsx_runtime335 = require("react/jsx-runtime");
8541
8676
  var Swiper = (props) => {
8542
8677
  const {
8543
8678
  auto = false,
@@ -8560,23 +8695,23 @@ var Swiper = (props) => {
8560
8695
  const maxIndex = Math.max(0, totalSlides - viewItemCount);
8561
8696
  const useLoop = loop && canSlide;
8562
8697
  const cloneCount = useLoop ? totalSlides : 0;
8563
- const extendedItems = import_react27.default.useMemo(() => {
8698
+ const extendedItems = import_react29.default.useMemo(() => {
8564
8699
  if (!useLoop) return items;
8565
8700
  return [...items, ...items, ...items];
8566
8701
  }, [items, useLoop]);
8567
8702
  const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
8568
- const [innerIndex, setInnerIndex] = import_react27.default.useState(
8703
+ const [innerIndex, setInnerIndex] = import_react29.default.useState(
8569
8704
  useLoop ? cloneCount + initialIdx : initialIdx
8570
8705
  );
8571
- const [isDragging, setIsDragging] = import_react27.default.useState(false);
8572
- const [dragOffset, setDragOffset] = import_react27.default.useState(0);
8573
- const [animated, setAnimated] = import_react27.default.useState(true);
8574
- const [containerWidth, setContainerWidth] = import_react27.default.useState(0);
8575
- const containerRef = import_react27.default.useRef(null);
8576
- const startXRef = import_react27.default.useRef(0);
8577
- const startTimeRef = import_react27.default.useRef(0);
8578
- const autoplayTimerRef = import_react27.default.useRef(null);
8579
- import_react27.default.useEffect(() => {
8706
+ const [isDragging, setIsDragging] = import_react29.default.useState(false);
8707
+ const [dragOffset, setDragOffset] = import_react29.default.useState(0);
8708
+ const [animated, setAnimated] = import_react29.default.useState(true);
8709
+ const [containerWidth, setContainerWidth] = import_react29.default.useState(0);
8710
+ const containerRef = import_react29.default.useRef(null);
8711
+ const startXRef = import_react29.default.useRef(0);
8712
+ const startTimeRef = import_react29.default.useRef(0);
8713
+ const autoplayTimerRef = import_react29.default.useRef(null);
8714
+ import_react29.default.useEffect(() => {
8580
8715
  const el = containerRef.current;
8581
8716
  if (!el) return;
8582
8717
  const ro = new ResizeObserver((entries) => {
@@ -8595,7 +8730,7 @@ var Swiper = (props) => {
8595
8730
  return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
8596
8731
  };
8597
8732
  const realIndex = getRealIndex(innerIndex);
8598
- const moveToInner = import_react27.default.useCallback(
8733
+ const moveToInner = import_react29.default.useCallback(
8599
8734
  (idx, withAnim = true) => {
8600
8735
  if (!useLoop) {
8601
8736
  setAnimated(withAnim);
@@ -8623,7 +8758,7 @@ var Swiper = (props) => {
8623
8758
  },
8624
8759
  [useLoop, cloneCount, totalSlides]
8625
8760
  );
8626
- const handleTransitionEnd = import_react27.default.useCallback(() => {
8761
+ const handleTransitionEnd = import_react29.default.useCallback(() => {
8627
8762
  if (!useLoop) return;
8628
8763
  const real = getRealIndex(innerIndex);
8629
8764
  const canonical = cloneCount + real;
@@ -8633,7 +8768,7 @@ var Swiper = (props) => {
8633
8768
  }
8634
8769
  onChange?.(Math.min(real, maxIndex));
8635
8770
  }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
8636
- const slideTo = import_react27.default.useCallback(
8771
+ const slideTo = import_react29.default.useCallback(
8637
8772
  (logicalIndex) => {
8638
8773
  if (!canSlide) return;
8639
8774
  const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
@@ -8643,7 +8778,7 @@ var Swiper = (props) => {
8643
8778
  },
8644
8779
  [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
8645
8780
  );
8646
- const slideNext = import_react27.default.useCallback(() => {
8781
+ const slideNext = import_react29.default.useCallback(() => {
8647
8782
  if (!canSlide) return;
8648
8783
  const nextInner = innerIndex + slideBy;
8649
8784
  if (useLoop) {
@@ -8652,7 +8787,7 @@ var Swiper = (props) => {
8652
8787
  moveToInner(Math.min(nextInner, maxIndex), true);
8653
8788
  }
8654
8789
  }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
8655
- const slidePrev = import_react27.default.useCallback(() => {
8790
+ const slidePrev = import_react29.default.useCallback(() => {
8656
8791
  if (!canSlide) return;
8657
8792
  const prevInner = innerIndex - slideBy;
8658
8793
  if (useLoop) {
@@ -8661,7 +8796,7 @@ var Swiper = (props) => {
8661
8796
  moveToInner(Math.max(prevInner, 0), true);
8662
8797
  }
8663
8798
  }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
8664
- import_react27.default.useEffect(() => {
8799
+ import_react29.default.useEffect(() => {
8665
8800
  if (indexProp === void 0) return;
8666
8801
  const clamped = Math.max(0, Math.min(indexProp, maxIndex));
8667
8802
  const target = useLoop ? cloneCount + clamped : clamped;
@@ -8669,12 +8804,12 @@ var Swiper = (props) => {
8669
8804
  moveToInner(target, true);
8670
8805
  }
8671
8806
  }, [indexProp]);
8672
- import_react27.default.useImperativeHandle(swiperRef, () => ({
8807
+ import_react29.default.useImperativeHandle(swiperRef, () => ({
8673
8808
  slidePrev,
8674
8809
  slideNext,
8675
8810
  slideTo
8676
8811
  }));
8677
- import_react27.default.useEffect(() => {
8812
+ import_react29.default.useEffect(() => {
8678
8813
  if (!auto || !canSlide) return;
8679
8814
  autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
8680
8815
  return () => {
@@ -8697,7 +8832,7 @@ var Swiper = (props) => {
8697
8832
  startXRef.current = getClientX(e);
8698
8833
  startTimeRef.current = Date.now();
8699
8834
  };
8700
- import_react27.default.useEffect(() => {
8835
+ import_react29.default.useEffect(() => {
8701
8836
  if (!isDragging) return;
8702
8837
  const handleMove = (e) => {
8703
8838
  setDragOffset(getClientX(e) - startXRef.current);
@@ -8735,8 +8870,8 @@ var Swiper = (props) => {
8735
8870
  }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
8736
8871
  const slideWidthPercent = 100 / viewItemCount;
8737
8872
  const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
8738
- const slideElements = import_react27.default.useMemo(
8739
- () => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8873
+ const slideElements = import_react29.default.useMemo(
8874
+ () => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8740
8875
  "div",
8741
8876
  {
8742
8877
  className: "lib-xplat-swiper__slide",
@@ -8755,14 +8890,14 @@ var Swiper = (props) => {
8755
8890
  Math.floor(realIndex / slideBy),
8756
8891
  totalSteps - 1
8757
8892
  );
8758
- return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
8759
- /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8893
+ return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
8894
+ /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8760
8895
  "div",
8761
8896
  {
8762
8897
  className: "lib-xplat-swiper__viewport",
8763
8898
  onMouseDown: handleDragStart,
8764
8899
  onTouchStart: handleDragStart,
8765
- children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8900
+ children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8766
8901
  "div",
8767
8902
  {
8768
8903
  className: clsx_default(
@@ -8780,7 +8915,7 @@ var Swiper = (props) => {
8780
8915
  )
8781
8916
  }
8782
8917
  ),
8783
- showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8918
+ showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8784
8919
  "span",
8785
8920
  {
8786
8921
  className: "lib-xplat-swiper__progress-fill",
@@ -8790,7 +8925,7 @@ var Swiper = (props) => {
8790
8925
  }
8791
8926
  }
8792
8927
  ) }) }),
8793
- canSlide && /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
8928
+ canSlide && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8794
8929
  "button",
8795
8930
  {
8796
8931
  className: clsx_default(
@@ -8808,8 +8943,8 @@ Swiper.displayName = "Swiper";
8808
8943
  var Swiper_default = Swiper;
8809
8944
 
8810
8945
  // src/components/Switch/Switch.tsx
8811
- var import_react28 = __toESM(require("react"), 1);
8812
- var import_jsx_runtime334 = require("react/jsx-runtime");
8946
+ var import_react30 = __toESM(require("react"), 1);
8947
+ var import_jsx_runtime336 = require("react/jsx-runtime");
8813
8948
  var KNOB_TRANSITION_MS = 250;
8814
8949
  var Switch = (props) => {
8815
8950
  const {
@@ -8819,9 +8954,9 @@ var Switch = (props) => {
8819
8954
  disabled,
8820
8955
  onChange
8821
8956
  } = props;
8822
- const [isAnimating, setIsAnimating] = import_react28.default.useState(false);
8823
- const timeoutRef = import_react28.default.useRef(null);
8824
- import_react28.default.useEffect(() => {
8957
+ const [isAnimating, setIsAnimating] = import_react30.default.useState(false);
8958
+ const timeoutRef = import_react30.default.useRef(null);
8959
+ import_react30.default.useEffect(() => {
8825
8960
  return () => {
8826
8961
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8827
8962
  };
@@ -8836,7 +8971,7 @@ var Switch = (props) => {
8836
8971
  timeoutRef.current = null;
8837
8972
  }, KNOB_TRANSITION_MS);
8838
8973
  };
8839
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
8974
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
8840
8975
  "div",
8841
8976
  {
8842
8977
  className: clsx_default(
@@ -8849,80 +8984,13 @@ var Switch = (props) => {
8849
8984
  ),
8850
8985
  onClick: handleClick,
8851
8986
  "aria-disabled": disabled || isAnimating,
8852
- children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
8987
+ children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
8853
8988
  }
8854
8989
  );
8855
8990
  };
8856
8991
  Switch.displayName = "Switch";
8857
8992
  var Switch_default = Switch;
8858
8993
 
8859
- // src/components/Tab/Tab.tsx
8860
- var import_react30 = __toESM(require("react"), 1);
8861
-
8862
- // src/components/Tab/TabItem.tsx
8863
- var import_react29 = __toESM(require("react"), 1);
8864
- var import_jsx_runtime335 = require("react/jsx-runtime");
8865
- var TabItem = import_react29.default.forwardRef((props, ref) => {
8866
- const { isActive, title, onClick } = props;
8867
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
8868
- "div",
8869
- {
8870
- ref,
8871
- className: clsx_default("tab-item", isActive ? "active" : null),
8872
- onClick,
8873
- children: title
8874
- }
8875
- );
8876
- });
8877
- TabItem.displayName = "TabItem";
8878
- var TabItem_default = TabItem;
8879
-
8880
- // src/components/Tab/Tab.tsx
8881
- var import_jsx_runtime336 = require("react/jsx-runtime");
8882
- var Tab = (props) => {
8883
- const { activeIndex, onChange, tabs, type, size = "md" } = props;
8884
- const [underlineStyle, setUnderlineStyle] = import_react30.default.useState({
8885
- left: 0,
8886
- width: 0
8887
- });
8888
- const itemRefs = import_react30.default.useRef([]);
8889
- const handleChangeActiveTab = (tabItem, tabIdx) => {
8890
- onChange(tabItem, tabIdx);
8891
- };
8892
- import_react30.default.useEffect(() => {
8893
- const el = itemRefs.current[activeIndex];
8894
- if (el) {
8895
- setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
8896
- }
8897
- }, [activeIndex, tabs.length]);
8898
- return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
8899
- tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
8900
- TabItem_default,
8901
- {
8902
- onClick: () => handleChangeActiveTab(tab, idx),
8903
- isActive: activeIndex === idx,
8904
- ref: (el) => {
8905
- itemRefs.current[idx] = el;
8906
- },
8907
- title: tab.title
8908
- },
8909
- `${tab.value}_${idx}`
8910
- )),
8911
- type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
8912
- "div",
8913
- {
8914
- className: "tab-toggle-underline",
8915
- style: {
8916
- left: underlineStyle.left,
8917
- width: underlineStyle.width
8918
- }
8919
- }
8920
- )
8921
- ] });
8922
- };
8923
- Tab.displayName = "Tab";
8924
- var Tab_default = Tab;
8925
-
8926
8994
  // src/components/Table/TableContext.tsx
8927
8995
  var import_react31 = __toESM(require("react"), 1);
8928
8996
  var TableContext = import_react31.default.createContext(null);
@@ -9836,6 +9904,7 @@ var SideBar_default = SideBar;
9836
9904
  BookIcon,
9837
9905
  BookOpenIcon,
9838
9906
  BookmarkIcon,
9907
+ Box,
9839
9908
  BoxIcon,
9840
9909
  Breadcrumb,
9841
9910
  BriefcaseIcon,
@@ -9852,7 +9921,6 @@ var SideBar_default = SideBar;
9852
9921
  CallOutgoingIcon,
9853
9922
  CameraIcon,
9854
9923
  CameraOffIcon,
9855
- Card,
9856
9924
  CardTab,
9857
9925
  CastIcon,
9858
9926
  Chart,