@x-plat/design-system 0.5.8 → 0.5.9

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.
@@ -34,10 +34,10 @@ __export(components_exports, {
34
34
  Alert: () => Alert_default,
35
35
  Avatar: () => Avatar_default,
36
36
  Badge: () => Badge_default,
37
+ Box: () => Box_default,
37
38
  Breadcrumb: () => Breadcrumb_default,
38
39
  Button: () => Button_default,
39
40
  Calendar: () => Calendar_default,
40
- Card: () => Card_default,
41
41
  CardTab: () => CardTab_default,
42
42
  Chart: () => Chart_default,
43
43
  CheckBox: () => CheckBox_default,
@@ -2021,16 +2021,21 @@ var Calendar = (props) => {
2021
2021
  Calendar.displayName = "Calendar";
2022
2022
  var Calendar_default = Calendar;
2023
2023
 
2024
- // src/components/Card/Card.tsx
2024
+ // src/components/Box/Box.tsx
2025
2025
  var import_jsx_runtime302 = require("react/jsx-runtime");
2026
- var Card = ({ children, title }) => {
2027
- return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "lib-xplat-card", children: [
2028
- title && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "title", children: title }),
2029
- /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "content", children })
2026
+ var Box = ({
2027
+ children,
2028
+ title,
2029
+ variant = "outlined",
2030
+ padding = "md"
2031
+ }) => {
2032
+ return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
2033
+ title && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "box-title", children: title }),
2034
+ /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "box-content", children })
2030
2035
  ] });
2031
2036
  };
2032
- Card.displayName = "Card";
2033
- var Card_default = Card;
2037
+ Box.displayName = "Box";
2038
+ var Box_default = Box;
2034
2039
 
2035
2040
  // src/components/CardTab/CardTab.tsx
2036
2041
  var import_react4 = __toESM(require("react"), 1);
@@ -2129,6 +2134,39 @@ var getPalette = (palettes, index, key) => {
2129
2134
  return palettes[(index + offset) % palettes.length];
2130
2135
  };
2131
2136
  var PADDING = { top: 20, right: 20, bottom: 30, left: 40 };
2137
+ var toSmoothPath = (points) => {
2138
+ if (points.length < 2) return "";
2139
+ const p = points;
2140
+ let d = `M ${p[0].x} ${p[0].y}`;
2141
+ for (let i = 0; i < p.length - 1; i++) {
2142
+ const p0 = p[Math.max(0, i - 1)];
2143
+ const p1 = p[i];
2144
+ const p2 = p[i + 1];
2145
+ const p3 = p[Math.min(p.length - 1, i + 2)];
2146
+ const cp1x = p1.x + (p2.x - p0.x) / 6;
2147
+ const cp1y = p1.y + (p2.y - p0.y) / 6;
2148
+ const cp2x = p2.x - (p3.x - p1.x) / 6;
2149
+ const cp2y = p2.y - (p3.y - p1.y) / 6;
2150
+ d += ` C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p2.x} ${p2.y}`;
2151
+ }
2152
+ return d;
2153
+ };
2154
+ var useChartSize = (ref) => {
2155
+ const [size, setSize] = import_react5.default.useState({ width: 0, height: 0 });
2156
+ import_react5.default.useEffect(() => {
2157
+ const el = ref.current;
2158
+ if (!el) return;
2159
+ const observer = new ResizeObserver((entries) => {
2160
+ const entry = entries[0];
2161
+ if (!entry) return;
2162
+ const { width, height } = entry.contentRect;
2163
+ setSize({ width: Math.floor(width), height: Math.floor(height) });
2164
+ });
2165
+ observer.observe(el);
2166
+ return () => observer.disconnect();
2167
+ }, [ref]);
2168
+ return size;
2169
+ };
2132
2170
  var useChartTooltip = (enabled) => {
2133
2171
  const [tooltip, setTooltip] = import_react5.default.useState({
2134
2172
  visible: false,
@@ -2163,15 +2201,15 @@ var useChartTooltip = (enabled) => {
2163
2201
  }, []);
2164
2202
  return { tooltip, show, hide, move, containerRef };
2165
2203
  };
2166
- var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLeave }) => {
2204
+ var LineChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
2167
2205
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2168
2206
  const maxVal = import_react5.default.useMemo(() => {
2169
2207
  const allValues = entries.flatMap(([, v]) => v);
2170
2208
  return Math.max(...allValues) * 1.2 || 1;
2171
2209
  }, [entries]);
2172
2210
  const count = labels.length;
2173
- const chartW = 600 - PADDING.left - PADDING.right;
2174
- const chartH = 300 - PADDING.top - PADDING.bottom;
2211
+ const chartW = width - PADDING.left - PADDING.right;
2212
+ const chartH = height - PADDING.top - PADDING.bottom;
2175
2213
  const seriesPoints = import_react5.default.useMemo(
2176
2214
  () => entries.map(
2177
2215
  ([, values]) => values.map((v, i) => ({
@@ -2182,18 +2220,18 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
2182
2220
  ),
2183
2221
  [entries, count, chartW, chartH, maxVal]
2184
2222
  );
2185
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
2223
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
2186
2224
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2187
2225
  const y = PADDING.top + (1 - ratio) * chartH;
2188
2226
  const val = Math.round(maxVal * ratio);
2189
2227
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2190
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
2228
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
2191
2229
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2192
2230
  ] }, ratio);
2193
2231
  }),
2194
2232
  labels.map((label, i) => {
2195
2233
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
2196
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: 300 - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2234
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2197
2235
  }),
2198
2236
  entries.map(([key], di) => {
2199
2237
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
@@ -2228,7 +2266,73 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
2228
2266
  ] });
2229
2267
  });
2230
2268
  LineChart.displayName = "LineChart";
2231
- var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLeave }) => {
2269
+ var CurveChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
2270
+ const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2271
+ const maxVal = import_react5.default.useMemo(() => {
2272
+ const allValues = entries.flatMap(([, v]) => v);
2273
+ return Math.max(...allValues) * 1.2 || 1;
2274
+ }, [entries]);
2275
+ const count = labels.length;
2276
+ const chartW = width - PADDING.left - PADDING.right;
2277
+ const chartH = height - PADDING.top - PADDING.bottom;
2278
+ const seriesPoints = import_react5.default.useMemo(
2279
+ () => entries.map(
2280
+ ([, values]) => values.map((v, i) => ({
2281
+ x: PADDING.left + i / (count - 1 || 1) * chartW,
2282
+ y: PADDING.top + (1 - v / maxVal) * chartH,
2283
+ v
2284
+ }))
2285
+ ),
2286
+ [entries, count, chartW, chartH, maxVal]
2287
+ );
2288
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
2289
+ [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2290
+ const y = PADDING.top + (1 - ratio) * chartH;
2291
+ const val = Math.round(maxVal * ratio);
2292
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2293
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
2294
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2295
+ ] }, ratio);
2296
+ }),
2297
+ labels.map((label, i) => {
2298
+ const x = PADDING.left + i / (count - 1 || 1) * chartW;
2299
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
2300
+ }),
2301
+ entries.map(([key], di) => {
2302
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
2303
+ const color = palette[2];
2304
+ const areaColor = palette[0];
2305
+ const points = seriesPoints[di];
2306
+ const gradientId = `curve-gradient-${di}`;
2307
+ const linePath = toSmoothPath(points);
2308
+ const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
2309
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2310
+ /* @__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: [
2311
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
2312
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
2313
+ ] }) }),
2314
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
2315
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" }),
2316
+ points.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2317
+ "circle",
2318
+ {
2319
+ cx: p.x,
2320
+ cy: p.y,
2321
+ r: "4",
2322
+ fill: color,
2323
+ className: "chart-point",
2324
+ onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${p.v}`),
2325
+ onMouseMove: onMove,
2326
+ onMouseLeave: onLeave
2327
+ },
2328
+ i
2329
+ ))
2330
+ ] }, di);
2331
+ })
2332
+ ] });
2333
+ });
2334
+ CurveChart.displayName = "CurveChart";
2335
+ var BarChart = import_react5.default.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
2232
2336
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2233
2337
  const maxVal = import_react5.default.useMemo(() => {
2234
2338
  const allValues = entries.flatMap(([, v]) => v);
@@ -2236,8 +2340,8 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2236
2340
  }, [entries]);
2237
2341
  const count = labels.length;
2238
2342
  const groupCount = entries.length;
2239
- const chartW = 600 - PADDING.left - PADDING.right;
2240
- const chartH = 300 - PADDING.top - PADDING.bottom;
2343
+ const chartW = width - PADDING.left - PADDING.right;
2344
+ const chartH = height - PADDING.top - PADDING.bottom;
2241
2345
  const groupW = chartW / count;
2242
2346
  const barW = Math.min(32, groupW * 0.7 / groupCount);
2243
2347
  const bars = import_react5.default.useMemo(
@@ -2251,16 +2355,16 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2251
2355
  ),
2252
2356
  [entries, maxVal, chartH, groupW, barW, groupCount]
2253
2357
  );
2254
- return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
2358
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
2255
2359
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2256
2360
  const y = PADDING.top + (1 - ratio) * chartH;
2257
2361
  const val = Math.round(maxVal * ratio);
2258
2362
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2259
- /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
2363
+ /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
2260
2364
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2261
2365
  ] }, ratio);
2262
2366
  }),
2263
- 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)),
2367
+ 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)),
2264
2368
  entries.map(([key], di) => {
2265
2369
  const palette = getPalette(LINE_BAR_PALETTES, di, key);
2266
2370
  const color = palette[2];
@@ -2271,7 +2375,7 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2271
2375
  y: b.y,
2272
2376
  width: b.w,
2273
2377
  height: b.h,
2274
- rx: "2",
2378
+ rx: Math.min(4, b.w / 2),
2275
2379
  fill: color,
2276
2380
  className: "chart-bar",
2277
2381
  onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${b.v}`),
@@ -2285,14 +2389,15 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2285
2389
  });
2286
2390
  BarChart.displayName = "BarChart";
2287
2391
  var PieDonutChart = import_react5.default.memo(
2288
- ({ data, labels, isDoughnut, onHover, onMove, onLeave }) => {
2392
+ ({ data, labels, width, height, isDoughnut, onHover, onMove, onLeave }) => {
2289
2393
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2290
2394
  const values = import_react5.default.useMemo(() => entries.flatMap(([, v]) => v), [entries]);
2291
2395
  const total = import_react5.default.useMemo(() => values.reduce((a, b) => a + b, 0) || 1, [values]);
2292
- const cx = 150;
2293
- const cy = 150;
2294
- const r2 = 120;
2295
- const innerR = isDoughnut ? 60 : 0;
2396
+ const size = Math.min(width, height);
2397
+ const cx = size / 2;
2398
+ const cy = size / 2;
2399
+ const r2 = size * 0.4;
2400
+ const innerR = isDoughnut ? r2 * 0.5 : 0;
2296
2401
  const firstKey = entries[0]?.[0] ?? "";
2297
2402
  const colorOffset = hashString(firstKey);
2298
2403
  const sliceData = import_react5.default.useMemo(() => {
@@ -2323,8 +2428,8 @@ var PieDonutChart = import_react5.default.memo(
2323
2428
  angle0 = endAngle;
2324
2429
  return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}` };
2325
2430
  });
2326
- }, [values, total, innerR, labels]);
2327
- 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: [
2431
+ }, [values, total, cx, cy, r2, innerR, labels]);
2432
+ 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: [
2328
2433
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2329
2434
  "path",
2330
2435
  {
@@ -2341,22 +2446,42 @@ var PieDonutChart = import_react5.default.memo(
2341
2446
  }
2342
2447
  );
2343
2448
  PieDonutChart.displayName = "PieDonutChart";
2449
+ var TooltipBubble = ({ x, y, containerWidth, children }) => {
2450
+ const ref = import_react5.default.useRef(null);
2451
+ const [adjustedX, setAdjustedX] = import_react5.default.useState(x);
2452
+ import_react5.default.useEffect(() => {
2453
+ const el = ref.current;
2454
+ if (!el) return;
2455
+ const w = el.offsetWidth;
2456
+ const half = w / 2;
2457
+ const margin = 8;
2458
+ let nx = x;
2459
+ if (x - half < margin) nx = half + margin;
2460
+ else if (x + half > containerWidth - margin) nx = containerWidth - half - margin;
2461
+ setAdjustedX(nx);
2462
+ }, [x, containerWidth]);
2463
+ return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2464
+ "div",
2465
+ {
2466
+ ref,
2467
+ className: "chart-tooltip",
2468
+ style: { left: adjustedX, top: y },
2469
+ children
2470
+ }
2471
+ );
2472
+ };
2344
2473
  var Chart = (props) => {
2345
2474
  const { type, data, labels, tooltip: showTooltip = true } = props;
2346
2475
  const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
2476
+ const { width, height } = useChartSize(containerRef);
2477
+ const ready = width > 0 && height > 0;
2347
2478
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
2348
- type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2349
- type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2350
- type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2351
- type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
2352
- tooltip.visible && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2353
- "div",
2354
- {
2355
- className: "chart-tooltip",
2356
- style: { left: tooltip.x, top: tooltip.y },
2357
- children: tooltip.content
2358
- }
2359
- )
2479
+ ready && type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
2480
+ ready && type === "curve" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(CurveChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
2481
+ ready && type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
2482
+ ready && type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
2483
+ ready && type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, width, height, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
2484
+ tooltip.visible && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(TooltipBubble, { x: tooltip.x, y: tooltip.y, containerWidth: width, children: tooltip.content })
2360
2485
  ] });
2361
2486
  };
2362
2487
  Chart.displayName = "Chart";
@@ -2608,42 +2733,66 @@ var PasswordInput = import_react8.default.forwardRef(
2608
2733
  PasswordInput.displayName = "PasswordInput";
2609
2734
  var PasswordInput_default = PasswordInput;
2610
2735
 
2611
- // src/tokens/hooks/useClickOutside.ts
2736
+ // src/components/Modal/Modal.tsx
2612
2737
  var import_react9 = __toESM(require("react"), 1);
2613
- var useClickOutside = (refs, handler, enabled = true) => {
2738
+ var import_react_dom = require("react-dom");
2739
+ var import_jsx_runtime311 = require("react/jsx-runtime");
2740
+ var ANIMATION_DURATION_MS = 200;
2741
+ var Modal = (props) => {
2742
+ const { isOpen, onClose, children } = props;
2743
+ const [mounted, setMounted] = import_react9.default.useState(false);
2744
+ const [visible, setVisible] = import_react9.default.useState(false);
2614
2745
  import_react9.default.useEffect(() => {
2615
- if (!enabled) return;
2616
- const refArray = Array.isArray(refs) ? refs : [refs];
2617
- const listener = (event) => {
2618
- const target = event.target;
2619
- const isInside = refArray.some(
2620
- (ref) => ref.current && ref.current.contains(target)
2621
- );
2622
- if (!isInside) {
2623
- handler();
2746
+ if (isOpen) {
2747
+ setMounted(true);
2748
+ const t2 = setTimeout(() => setVisible(true), 1);
2749
+ return () => clearTimeout(t2);
2750
+ }
2751
+ setVisible(false);
2752
+ const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
2753
+ return () => clearTimeout(t);
2754
+ }, [isOpen]);
2755
+ if (typeof document === "undefined") return null;
2756
+ if (!mounted) return null;
2757
+ const stateClass = visible ? "enter" : "exit";
2758
+ return (0, import_react_dom.createPortal)(
2759
+ /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2760
+ "div",
2761
+ {
2762
+ className: clsx_default("lib-xplat-modal", "dim", stateClass),
2763
+ onClick: onClose,
2764
+ children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2765
+ "div",
2766
+ {
2767
+ className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
2768
+ role: "dialog",
2769
+ "aria-modal": "true",
2770
+ onClick: (e) => e.stopPropagation(),
2771
+ children
2772
+ }
2773
+ )
2624
2774
  }
2625
- };
2626
- document.addEventListener("mousedown", listener);
2627
- document.addEventListener("touchstart", listener);
2628
- return () => {
2629
- document.removeEventListener("mousedown", listener);
2630
- document.removeEventListener("touchstart", listener);
2631
- };
2632
- }, [refs, handler, enabled]);
2775
+ ),
2776
+ document.body
2777
+ );
2633
2778
  };
2634
- var useClickOutside_default = useClickOutside;
2779
+ Modal.displayName = "Modal";
2780
+ var Modal_default = Modal;
2635
2781
 
2636
2782
  // src/components/DatePicker/SingleDatePicker/index.tsx
2637
2783
  var import_react10 = __toESM(require("react"), 1);
2638
- var import_jsx_runtime311 = require("react/jsx-runtime");
2784
+ var import_jsx_runtime312 = require("react/jsx-runtime");
2639
2785
  var DayCell2 = import_react10.default.memo(
2640
2786
  ({
2641
2787
  day,
2642
2788
  disabled,
2643
2789
  selected,
2644
2790
  highlighted,
2791
+ isStart,
2792
+ isEnd,
2793
+ inRange,
2645
2794
  onSelect
2646
- }) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2795
+ }) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2647
2796
  "button",
2648
2797
  {
2649
2798
  type: "button",
@@ -2651,8 +2800,9 @@ var DayCell2 = import_react10.default.memo(
2651
2800
  "datepicker-day",
2652
2801
  !day.isCurrentMonth && "outside",
2653
2802
  disabled && "disabled",
2654
- selected && "selected",
2803
+ (selected || isStart || isEnd) && "selected",
2655
2804
  highlighted && !selected && "highlighted",
2805
+ inRange && !isStart && !isEnd && "in-range",
2656
2806
  day.isToday && "today",
2657
2807
  day.isSunday && "sunday",
2658
2808
  day.isSaturday && "saturday"
@@ -2664,7 +2814,7 @@ var DayCell2 = import_react10.default.memo(
2664
2814
  children: day.day
2665
2815
  }
2666
2816
  ),
2667
- (prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
2817
+ (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
2668
2818
  );
2669
2819
  DayCell2.displayName = "DayCell";
2670
2820
  var SingleDatePicker = (props) => {
@@ -2674,7 +2824,9 @@ var SingleDatePicker = (props) => {
2674
2824
  minDate,
2675
2825
  maxDate,
2676
2826
  highlightDates = [],
2677
- locale = "ko"
2827
+ locale = "ko",
2828
+ rangeStart,
2829
+ rangeEnd
2678
2830
  } = props;
2679
2831
  const initialYear = value?.getFullYear();
2680
2832
  const initialMonth = value?.getMonth();
@@ -2722,6 +2874,8 @@ var SingleDatePicker = (props) => {
2722
2874
  else if (pickerMode === "months") {
2723
2875
  setYearRangeStart(Math.floor(year / 12) * 12);
2724
2876
  setPickerMode("years");
2877
+ } else {
2878
+ setPickerMode("days");
2725
2879
  }
2726
2880
  };
2727
2881
  const handleMonthSelect = (m) => {
@@ -2735,71 +2889,80 @@ var SingleDatePicker = (props) => {
2735
2889
  const weekdays = WEEKDAY_LABELS[locale];
2736
2890
  const monthLabels = MONTH_LABELS[locale];
2737
2891
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
2738
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
2892
+ const hasRange = rangeStart != null && rangeEnd != null;
2893
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
2739
2894
  "div",
2740
2895
  {
2741
2896
  className: clsx_default("lib-xplat-datepicker", "single"),
2742
2897
  children: [
2743
- /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: "datepicker-header", children: [
2744
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(ChevronLeftIcon_default, {}) }),
2745
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
2746
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(ChevronRightIcon_default, {}) })
2898
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("div", { className: "datepicker-header", children: [
2899
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronLeftIcon_default, {}) }),
2900
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
2901
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRightIcon_default, {}) })
2747
2902
  ] }),
2748
- pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
2749
- const y = yearRangeStart + i;
2750
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2903
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("div", { className: "datepicker-body", children: [
2904
+ pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
2905
+ const y = yearRangeStart + i;
2906
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2907
+ "button",
2908
+ {
2909
+ type: "button",
2910
+ className: clsx_default("datepicker-picker-cell", y === year && "active"),
2911
+ onClick: () => handleYearSelect(y),
2912
+ children: y
2913
+ },
2914
+ y
2915
+ );
2916
+ }) }),
2917
+ pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2751
2918
  "button",
2752
2919
  {
2753
2920
  type: "button",
2754
- className: clsx_default("datepicker-picker-cell", y === year && "active"),
2755
- onClick: () => handleYearSelect(y),
2756
- children: y
2757
- },
2758
- y
2759
- );
2760
- }) }),
2761
- pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2762
- "button",
2763
- {
2764
- type: "button",
2765
- className: clsx_default("datepicker-picker-cell", i === month && "active"),
2766
- onClick: () => handleMonthSelect(i),
2767
- children: label
2768
- },
2769
- i
2770
- )) }),
2771
- pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_jsx_runtime311.Fragment, { children: [
2772
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2773
- "div",
2774
- {
2775
- className: clsx_default(
2776
- "datepicker-weekday",
2777
- i === 0 && "sunday",
2778
- i === 6 && "saturday"
2779
- ),
2921
+ className: clsx_default("datepicker-picker-cell", i === month && "active"),
2922
+ onClick: () => handleMonthSelect(i),
2780
2923
  children: label
2781
2924
  },
2782
- label
2925
+ i
2783
2926
  )) }),
2784
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
2785
- const t = day.date.getTime();
2786
- const disabled = t < minTime || t > maxTime;
2787
- const selected = value ? isSameDay(day.date, value) : false;
2788
- const highlighted = highlightSet.has(
2789
- `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
2790
- );
2791
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2792
- DayCell2,
2927
+ pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
2928
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2929
+ "div",
2793
2930
  {
2794
- day,
2795
- disabled,
2796
- selected,
2797
- highlighted,
2798
- onSelect: handleSelect
2931
+ className: clsx_default(
2932
+ "datepicker-weekday",
2933
+ i === 0 && "sunday",
2934
+ i === 6 && "saturday"
2935
+ ),
2936
+ children: label
2799
2937
  },
2800
- idx
2801
- );
2802
- }) })
2938
+ label
2939
+ )) }),
2940
+ /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
2941
+ const t = day.date.getTime();
2942
+ const disabled = t < minTime || t > maxTime;
2943
+ const selected = value ? isSameDay(day.date, value) : false;
2944
+ const highlighted = highlightSet.has(
2945
+ `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
2946
+ );
2947
+ const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
2948
+ const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
2949
+ const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
2950
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2951
+ DayCell2,
2952
+ {
2953
+ day,
2954
+ disabled,
2955
+ selected,
2956
+ highlighted,
2957
+ isStart,
2958
+ isEnd,
2959
+ inRange: inRangeVal,
2960
+ onSelect: handleSelect
2961
+ },
2962
+ idx
2963
+ );
2964
+ }) })
2965
+ ] })
2803
2966
  ] })
2804
2967
  ]
2805
2968
  }
@@ -2809,7 +2972,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
2809
2972
  var SingleDatePicker_default = SingleDatePicker;
2810
2973
 
2811
2974
  // src/components/DatePicker/InputDatePicker/index.tsx
2812
- var import_jsx_runtime312 = require("react/jsx-runtime");
2975
+ var import_jsx_runtime313 = require("react/jsx-runtime");
2813
2976
  var formatDate = (date) => {
2814
2977
  if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
2815
2978
  const y = date.getFullYear();
@@ -2818,137 +2981,131 @@ var formatDate = (date) => {
2818
2981
  return `${y}/${m}/${d}`;
2819
2982
  };
2820
2983
  var InputDatePicker = (props) => {
2821
- const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
2984
+ const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
2822
2985
  const [isOpen, setIsOpen] = import_react11.default.useState(false);
2823
- const containerRef = import_react11.default.useRef(null);
2824
- const calendarRef = import_react11.default.useRef(null);
2825
- useClickOutside_default([containerRef], () => setIsOpen(false), isOpen);
2986
+ const [tempDate, setTempDate] = import_react11.default.useState(value ?? /* @__PURE__ */ new Date());
2987
+ const handleOpen = () => {
2988
+ if (disabled) return;
2989
+ setTempDate(value ?? /* @__PURE__ */ new Date());
2990
+ setIsOpen(true);
2991
+ };
2826
2992
  const handleSelect = (date) => {
2827
- if (!date) return;
2828
- onChange?.(date);
2993
+ if (date) setTempDate(date);
2994
+ };
2995
+ const handleApply = () => {
2996
+ onChange?.(tempDate);
2829
2997
  setIsOpen(false);
2830
2998
  };
2831
- return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
2832
- "div",
2833
- {
2834
- className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
2835
- ref: containerRef,
2836
- children: [
2837
- /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2838
- "div",
2839
- {
2840
- className: "input-datepicker-trigger",
2841
- onClick: () => !disabled && setIsOpen((o) => !o),
2842
- children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2843
- Input_default,
2844
- {
2845
- value: formatDate(value),
2846
- placeholder,
2847
- suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CalenderIcon_default, {}),
2848
- disabled,
2849
- readOnly: true
2850
- }
2851
- )
2852
- }
2853
- ),
2854
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2855
- SingleDatePicker_default,
2856
- {
2857
- value: value ?? /* @__PURE__ */ new Date(),
2858
- onChange: handleSelect,
2859
- minDate,
2860
- maxDate,
2861
- locale
2862
- }
2863
- ) })
2864
- ]
2865
- }
2866
- );
2999
+ const handleClose = () => {
3000
+ setIsOpen(false);
3001
+ };
3002
+ return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
3003
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
3004
+ Input_default,
3005
+ {
3006
+ value: formatDate(value),
3007
+ placeholder,
3008
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(CalenderIcon_default, {}),
3009
+ disabled,
3010
+ readOnly: true
3011
+ }
3012
+ ) }),
3013
+ /* @__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: [
3014
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
3015
+ SingleDatePicker_default,
3016
+ {
3017
+ value: tempDate,
3018
+ onChange: handleSelect,
3019
+ minDate,
3020
+ maxDate,
3021
+ locale
3022
+ }
3023
+ ) }),
3024
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "popup-datepicker-footer", children: [
3025
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
3026
+ /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
3027
+ ] })
3028
+ ] }) })
3029
+ ] });
2867
3030
  };
2868
3031
  InputDatePicker.displayName = "InputDatePicker";
2869
3032
  var InputDatePicker_default = InputDatePicker;
2870
3033
 
2871
3034
  // src/components/DatePicker/PopupPicker/index.tsx
2872
- var import_react14 = __toESM(require("react"), 1);
2873
-
2874
- // src/components/Modal/Modal.tsx
2875
- var import_react12 = __toESM(require("react"), 1);
2876
- var import_react_dom = require("react-dom");
2877
- var import_jsx_runtime313 = require("react/jsx-runtime");
2878
- var ANIMATION_DURATION_MS = 200;
2879
- var Modal = (props) => {
2880
- const { isOpen, onClose, children } = props;
2881
- const [mounted, setMounted] = import_react12.default.useState(false);
2882
- const [visible, setVisible] = import_react12.default.useState(false);
2883
- import_react12.default.useEffect(() => {
2884
- if (isOpen) {
2885
- setMounted(true);
2886
- const t2 = setTimeout(() => setVisible(true), 1);
2887
- return () => clearTimeout(t2);
2888
- }
2889
- setVisible(false);
2890
- const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
2891
- return () => clearTimeout(t);
2892
- }, [isOpen]);
2893
- if (typeof document === "undefined") return null;
2894
- if (!mounted) return null;
2895
- const stateClass = visible ? "enter" : "exit";
2896
- return (0, import_react_dom.createPortal)(
2897
- /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
2898
- "div",
2899
- {
2900
- className: clsx_default("lib-xplat-modal", "dim", stateClass),
2901
- onClick: onClose,
2902
- children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
2903
- "div",
2904
- {
2905
- className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
2906
- role: "dialog",
2907
- "aria-modal": "true",
2908
- onClick: (e) => e.stopPropagation(),
2909
- children
2910
- }
2911
- )
2912
- }
2913
- ),
2914
- document.body
2915
- );
2916
- };
2917
- Modal.displayName = "Modal";
2918
- var Modal_default = Modal;
3035
+ var import_react15 = __toESM(require("react"), 1);
2919
3036
 
2920
3037
  // src/components/DatePicker/RangePicker/index.tsx
3038
+ var import_react14 = __toESM(require("react"), 1);
3039
+
3040
+ // src/components/Tab/Tab.tsx
2921
3041
  var import_react13 = __toESM(require("react"), 1);
3042
+
3043
+ // src/components/Tab/TabItem.tsx
3044
+ var import_react12 = __toESM(require("react"), 1);
2922
3045
  var import_jsx_runtime314 = require("react/jsx-runtime");
2923
- var RangeDayCell = import_react13.default.memo(
2924
- ({
2925
- day,
2926
- disabled,
2927
- isStart,
2928
- isEnd,
2929
- inRange,
2930
- onClick
2931
- }) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
2932
- "button",
3046
+ var TabItem = import_react12.default.forwardRef((props, ref) => {
3047
+ const { isActive, title, onClick } = props;
3048
+ return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3049
+ "div",
2933
3050
  {
2934
- type: "button",
2935
- className: clsx_default(
2936
- "datepicker-day",
2937
- !day.isCurrentMonth && "outside",
2938
- disabled && "disabled",
2939
- (isStart || isEnd) && "selected",
2940
- inRange && !isStart && !isEnd && "in-range",
2941
- day.isToday && "today",
2942
- day.isSunday && "sunday",
2943
- day.isSaturday && "saturday"
2944
- ),
2945
- disabled: disabled || !day.isCurrentMonth,
3051
+ ref,
3052
+ className: clsx_default("tab-item", isActive ? "active" : null),
2946
3053
  onClick,
2947
- children: day.day
3054
+ children: title
2948
3055
  }
2949
- )
2950
- );
2951
- RangeDayCell.displayName = "RangeDayCell";
3056
+ );
3057
+ });
3058
+ TabItem.displayName = "TabItem";
3059
+ var TabItem_default = TabItem;
3060
+
3061
+ // src/components/Tab/Tab.tsx
3062
+ var import_jsx_runtime315 = require("react/jsx-runtime");
3063
+ var Tab = (props) => {
3064
+ const { activeIndex, onChange, tabs, type, size = "md" } = props;
3065
+ const [underlineStyle, setUnderlineStyle] = import_react13.default.useState({
3066
+ left: 0,
3067
+ width: 0
3068
+ });
3069
+ const itemRefs = import_react13.default.useRef([]);
3070
+ const handleChangeActiveTab = (tabItem, tabIdx) => {
3071
+ onChange(tabItem, tabIdx);
3072
+ };
3073
+ import_react13.default.useEffect(() => {
3074
+ const el = itemRefs.current[activeIndex];
3075
+ if (el) {
3076
+ setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
3077
+ }
3078
+ }, [activeIndex, tabs.length]);
3079
+ return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
3080
+ tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3081
+ TabItem_default,
3082
+ {
3083
+ onClick: () => handleChangeActiveTab(tab, idx),
3084
+ isActive: activeIndex === idx,
3085
+ ref: (el) => {
3086
+ itemRefs.current[idx] = el;
3087
+ },
3088
+ title: tab.title
3089
+ },
3090
+ `${tab.value}_${idx}`
3091
+ )),
3092
+ type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3093
+ "div",
3094
+ {
3095
+ className: "tab-toggle-underline",
3096
+ style: {
3097
+ left: underlineStyle.left,
3098
+ width: underlineStyle.width
3099
+ }
3100
+ }
3101
+ )
3102
+ ] });
3103
+ };
3104
+ Tab.displayName = "Tab";
3105
+ var Tab_default = Tab;
3106
+
3107
+ // src/components/DatePicker/RangePicker/index.tsx
3108
+ var import_jsx_runtime316 = require("react/jsx-runtime");
2952
3109
  var RangePicker = (props) => {
2953
3110
  const {
2954
3111
  startDate,
@@ -2958,139 +3115,92 @@ var RangePicker = (props) => {
2958
3115
  maxDate,
2959
3116
  locale = "ko"
2960
3117
  } = props;
2961
- const [activeTab, setActiveTab] = import_react13.default.useState("start");
2962
- const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
2963
- const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
2964
- const isDisabled = (date, type) => {
2965
- const d = date.getTime();
2966
- if (minDate) {
2967
- const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime();
2968
- if (d < min) return true;
2969
- }
2970
- if (maxDate) {
2971
- const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime();
2972
- if (d > max) return true;
2973
- }
2974
- if (type === "end") {
2975
- const start = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate()).getTime();
2976
- if (d < start) return true;
2977
- }
2978
- if (type === "start") {
2979
- const end = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate()).getTime();
2980
- if (d > end) return true;
2981
- }
2982
- return false;
3118
+ const [activeTab, setActiveTab] = import_react14.default.useState("start");
3119
+ const handleStartChange = (date) => {
3120
+ if (!date) return;
3121
+ const newStart = date > endDate ? endDate : date;
3122
+ onChange?.({ startDate: newStart, endDate });
2983
3123
  };
2984
- const weekdays = WEEKDAY_LABELS[locale];
2985
- const renderCalendar = (cal, type) => {
2986
- const label = type === "start" ? locale === "ko" ? "\uC2DC\uC791" : "Start" : locale === "ko" ? "\uC885\uB8CC" : "End";
2987
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panel", children: [
2988
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "datepicker-range-label", children: label }),
2989
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-header", children: [
2990
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
2991
- "button",
2992
- {
2993
- className: "datepicker-nav",
2994
- onClick: cal.goToPrevMonth,
2995
- type: "button",
2996
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronLeftIcon_default, {})
2997
- }
2998
- ),
2999
- /* @__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}` }),
3000
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3001
- "button",
3002
- {
3003
- className: "datepicker-nav",
3004
- onClick: cal.goToNextMonth,
3005
- type: "button",
3006
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronRightIcon_default, {})
3007
- }
3008
- )
3009
- ] }),
3010
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3011
- "div",
3012
- {
3013
- className: clsx_default(
3014
- "datepicker-weekday",
3015
- i === 0 && "sunday",
3016
- i === 6 && "saturday"
3017
- ),
3018
- children: w
3019
- },
3020
- w
3021
- )) }),
3022
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-grid", children: cal.days.map((day, idx) => {
3023
- const disabled = isDisabled(day.date, type);
3024
- const isStart = isSameDay(day.date, startDate);
3025
- const isEnd = isSameDay(day.date, endDate);
3026
- const inRange = isInRange(day.date, startDate, endDate);
3027
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3028
- RangeDayCell,
3029
- {
3030
- day,
3031
- disabled,
3032
- isStart,
3033
- isEnd,
3034
- inRange,
3035
- onClick: () => {
3036
- if (!disabled && day.isCurrentMonth) {
3037
- if (type === "start") {
3038
- const newStart = day.date > endDate ? endDate : day.date;
3039
- onChange?.({ startDate: newStart, endDate });
3040
- } else {
3041
- const newEnd = day.date < startDate ? startDate : day.date;
3042
- onChange?.({ startDate, endDate: newEnd });
3043
- }
3044
- }
3045
- }
3046
- },
3047
- idx
3048
- );
3049
- }) })
3050
- ] });
3124
+ const handleEndChange = (date) => {
3125
+ if (!date) return;
3126
+ const newEnd = date < startDate ? startDate : date;
3127
+ onChange?.({ startDate, endDate: newEnd });
3051
3128
  };
3052
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
3053
- "div",
3054
- {
3055
- className: clsx_default("lib-xplat-datepicker", "range"),
3056
- children: [
3057
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-tabs", children: [
3058
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3059
- "button",
3060
- {
3061
- type: "button",
3062
- className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
3063
- onClick: () => setActiveTab("start"),
3064
- children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
3065
- }
3066
- ),
3067
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3068
- "button",
3069
- {
3070
- type: "button",
3071
- className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
3072
- onClick: () => setActiveTab("end"),
3073
- children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
3074
- }
3075
- )
3076
- ] }),
3077
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panels", children: [
3078
- renderCalendar(startCal, "start"),
3079
- renderCalendar(endCal, "end")
3080
- ] }),
3081
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
3082
- ]
3083
- }
3084
- );
3129
+ const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
3130
+ const endMinDate = minDate && startDate > minDate ? startDate : startDate;
3131
+ return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
3132
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3133
+ Tab_default,
3134
+ {
3135
+ activeIndex: activeTab === "start" ? 0 : 1,
3136
+ tabs: [
3137
+ { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
3138
+ { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
3139
+ ],
3140
+ onChange: (tab) => setActiveTab(tab.value),
3141
+ type: "toggle",
3142
+ size: "sm"
3143
+ }
3144
+ ) }),
3145
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "datepicker-range-panels", children: [
3146
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3147
+ SingleDatePicker_default,
3148
+ {
3149
+ value: startDate,
3150
+ onChange: handleStartChange,
3151
+ minDate,
3152
+ maxDate: startMaxDate,
3153
+ rangeStart: startDate,
3154
+ rangeEnd: endDate,
3155
+ locale
3156
+ }
3157
+ ),
3158
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3159
+ SingleDatePicker_default,
3160
+ {
3161
+ value: endDate,
3162
+ onChange: handleEndChange,
3163
+ minDate: endMinDate,
3164
+ maxDate,
3165
+ rangeStart: startDate,
3166
+ rangeEnd: endDate,
3167
+ locale
3168
+ }
3169
+ )
3170
+ ] }),
3171
+ /* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3172
+ SingleDatePicker_default,
3173
+ {
3174
+ value: startDate,
3175
+ onChange: handleStartChange,
3176
+ minDate,
3177
+ maxDate: startMaxDate,
3178
+ rangeStart: startDate,
3179
+ rangeEnd: endDate,
3180
+ locale
3181
+ }
3182
+ ) : /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3183
+ SingleDatePicker_default,
3184
+ {
3185
+ value: endDate,
3186
+ onChange: handleEndChange,
3187
+ minDate: endMinDate,
3188
+ maxDate,
3189
+ rangeStart: startDate,
3190
+ rangeEnd: endDate,
3191
+ locale
3192
+ }
3193
+ ) })
3194
+ ] });
3085
3195
  };
3086
3196
  RangePicker.displayName = "RangePicker";
3087
3197
  var RangePicker_default = RangePicker;
3088
3198
 
3089
3199
  // src/components/DatePicker/PopupPicker/index.tsx
3090
- var import_jsx_runtime315 = require("react/jsx-runtime");
3200
+ var import_jsx_runtime317 = require("react/jsx-runtime");
3091
3201
  var PopupPicker = (props) => {
3092
3202
  const { component, type, locale } = props;
3093
- const [isOpen, setIsOpen] = import_react14.default.useState(false);
3203
+ const [isOpen, setIsOpen] = import_react15.default.useState(false);
3094
3204
  const handleClick = () => setIsOpen(true);
3095
3205
  const handleClose = () => setIsOpen(false);
3096
3206
  const handleSingleChange = (date) => {
@@ -3098,11 +3208,11 @@ var PopupPicker = (props) => {
3098
3208
  props.onChange?.(date);
3099
3209
  handleClose();
3100
3210
  };
3101
- return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
3102
- import_react14.default.cloneElement(component, { onClick: handleClick }),
3103
- /* @__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: [
3104
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-content", children: [
3105
- type === "single" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3211
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
3212
+ import_react15.default.cloneElement(component, { onClick: handleClick }),
3213
+ /* @__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: [
3214
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "popup-datepicker-content", children: [
3215
+ type === "single" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3106
3216
  SingleDatePicker_default,
3107
3217
  {
3108
3218
  value: props.value,
@@ -3112,7 +3222,7 @@ var PopupPicker = (props) => {
3112
3222
  locale
3113
3223
  }
3114
3224
  ),
3115
- type === "range" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3225
+ type === "range" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3116
3226
  RangePicker_default,
3117
3227
  {
3118
3228
  startDate: props.startDate,
@@ -3124,8 +3234,8 @@ var PopupPicker = (props) => {
3124
3234
  }
3125
3235
  )
3126
3236
  ] }),
3127
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-footer", children: [
3128
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3237
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "popup-datepicker-footer", children: [
3238
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3129
3239
  Button_default,
3130
3240
  {
3131
3241
  type: "secondary",
@@ -3133,7 +3243,7 @@ var PopupPicker = (props) => {
3133
3243
  children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
3134
3244
  }
3135
3245
  ),
3136
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
3246
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
3137
3247
  ] })
3138
3248
  ] }) })
3139
3249
  ] });
@@ -3142,10 +3252,10 @@ PopupPicker.displayName = "PopupPicker";
3142
3252
  var PopupPicker_default = PopupPicker;
3143
3253
 
3144
3254
  // src/components/Divider/Divider.tsx
3145
- var import_jsx_runtime316 = require("react/jsx-runtime");
3255
+ var import_jsx_runtime318 = require("react/jsx-runtime");
3146
3256
  var Divider = (props) => {
3147
3257
  const { orientation = "horizontal" } = props;
3148
- return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3258
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3149
3259
  "div",
3150
3260
  {
3151
3261
  className: clsx_default("lib-xplat-divider", orientation),
@@ -3158,15 +3268,15 @@ Divider.displayName = "Divider";
3158
3268
  var Divider_default = Divider;
3159
3269
 
3160
3270
  // src/components/Drawer/Drawer.tsx
3161
- var import_react15 = __toESM(require("react"), 1);
3271
+ var import_react16 = __toESM(require("react"), 1);
3162
3272
  var import_react_dom2 = require("react-dom");
3163
- var import_jsx_runtime317 = require("react/jsx-runtime");
3273
+ var import_jsx_runtime319 = require("react/jsx-runtime");
3164
3274
  var ANIMATION_DURATION_MS2 = 250;
3165
3275
  var Drawer = (props) => {
3166
3276
  const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
3167
- const [mounted, setMounted] = import_react15.default.useState(false);
3168
- const [visible, setVisible] = import_react15.default.useState(false);
3169
- import_react15.default.useEffect(() => {
3277
+ const [mounted, setMounted] = import_react16.default.useState(false);
3278
+ const [visible, setVisible] = import_react16.default.useState(false);
3279
+ import_react16.default.useEffect(() => {
3170
3280
  if (isOpen) {
3171
3281
  setMounted(true);
3172
3282
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3181,12 +3291,12 @@ var Drawer = (props) => {
3181
3291
  const stateClass = visible ? "enter" : "exit";
3182
3292
  const widthValue = typeof width === "number" ? `${width}px` : width;
3183
3293
  return (0, import_react_dom2.createPortal)(
3184
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3294
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
3185
3295
  "div",
3186
3296
  {
3187
3297
  className: clsx_default("lib-xplat-drawer-overlay", stateClass),
3188
3298
  onClick: onClose,
3189
- children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
3299
+ children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
3190
3300
  "div",
3191
3301
  {
3192
3302
  className: clsx_default("lib-xplat-drawer", placement, stateClass),
@@ -3195,11 +3305,11 @@ var Drawer = (props) => {
3195
3305
  "aria-modal": "true",
3196
3306
  onClick: (e) => e.stopPropagation(),
3197
3307
  children: [
3198
- title && /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "drawer-header", children: [
3199
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", { className: "drawer-title", children: title }),
3200
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
3308
+ title && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "drawer-header", children: [
3309
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { className: "drawer-title", children: title }),
3310
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
3201
3311
  ] }),
3202
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "drawer-body", children })
3312
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "drawer-body", children })
3203
3313
  ]
3204
3314
  }
3205
3315
  )
@@ -3212,16 +3322,16 @@ Drawer.displayName = "Drawer";
3212
3322
  var Drawer_default = Drawer;
3213
3323
 
3214
3324
  // src/components/Dropdown/Dropdown.tsx
3215
- var import_react17 = __toESM(require("react"), 1);
3325
+ var import_react19 = __toESM(require("react"), 1);
3216
3326
 
3217
3327
  // src/tokens/hooks/useAutoPosition.ts
3218
- var import_react16 = __toESM(require("react"), 1);
3328
+ var import_react17 = __toESM(require("react"), 1);
3219
3329
  var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3220
- const [position, setPosition] = import_react16.default.useState({
3330
+ const [position, setPosition] = import_react17.default.useState({
3221
3331
  position: {},
3222
3332
  direction: "bottom"
3223
3333
  });
3224
- const calculatePosition = import_react16.default.useCallback(() => {
3334
+ const calculatePosition = import_react17.default.useCallback(() => {
3225
3335
  if (!triggerRef.current || !popRef.current) return;
3226
3336
  const triggerRect = triggerRef.current.getBoundingClientRect();
3227
3337
  const popRect = popRef.current.getBoundingClientRect();
@@ -3243,7 +3353,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3243
3353
  direction
3244
3354
  });
3245
3355
  }, [triggerRef, popRef]);
3246
- import_react16.default.useEffect(() => {
3356
+ import_react17.default.useEffect(() => {
3247
3357
  calculatePosition();
3248
3358
  window.addEventListener("resize", calculatePosition);
3249
3359
  return () => window.removeEventListener("resize", calculatePosition);
@@ -3252,18 +3362,43 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3252
3362
  };
3253
3363
  var useAutoPosition_default = useAutoPosition;
3254
3364
 
3365
+ // src/tokens/hooks/useClickOutside.ts
3366
+ var import_react18 = __toESM(require("react"), 1);
3367
+ var useClickOutside = (refs, handler, enabled = true) => {
3368
+ import_react18.default.useEffect(() => {
3369
+ if (!enabled) return;
3370
+ const refArray = Array.isArray(refs) ? refs : [refs];
3371
+ const listener = (event) => {
3372
+ const target = event.target;
3373
+ const isInside = refArray.some(
3374
+ (ref) => ref.current && ref.current.contains(target)
3375
+ );
3376
+ if (!isInside) {
3377
+ handler();
3378
+ }
3379
+ };
3380
+ document.addEventListener("mousedown", listener);
3381
+ document.addEventListener("touchstart", listener);
3382
+ return () => {
3383
+ document.removeEventListener("mousedown", listener);
3384
+ document.removeEventListener("touchstart", listener);
3385
+ };
3386
+ }, [refs, handler, enabled]);
3387
+ };
3388
+ var useClickOutside_default = useClickOutside;
3389
+
3255
3390
  // src/components/Dropdown/Dropdown.tsx
3256
- var import_jsx_runtime318 = require("react/jsx-runtime");
3391
+ var import_jsx_runtime320 = require("react/jsx-runtime");
3257
3392
  var Dropdown = (props) => {
3258
3393
  const { items, children } = props;
3259
- const [isOpen, setIsOpen] = import_react17.default.useState(false);
3260
- const [mounted, setMounted] = import_react17.default.useState(false);
3261
- const [visible, setVisible] = import_react17.default.useState(false);
3262
- const triggerRef = import_react17.default.useRef(null);
3263
- const menuRef = import_react17.default.useRef(null);
3394
+ const [isOpen, setIsOpen] = import_react19.default.useState(false);
3395
+ const [mounted, setMounted] = import_react19.default.useState(false);
3396
+ const [visible, setVisible] = import_react19.default.useState(false);
3397
+ const triggerRef = import_react19.default.useRef(null);
3398
+ const menuRef = import_react19.default.useRef(null);
3264
3399
  const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
3265
3400
  useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
3266
- import_react17.default.useEffect(() => {
3401
+ import_react19.default.useEffect(() => {
3267
3402
  if (isOpen) {
3268
3403
  setMounted(true);
3269
3404
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3278,8 +3413,8 @@ var Dropdown = (props) => {
3278
3413
  item.onClick?.();
3279
3414
  setIsOpen(false);
3280
3415
  };
3281
- return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: "lib-xplat-dropdown", children: [
3282
- /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3416
+ return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "lib-xplat-dropdown", children: [
3417
+ /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3283
3418
  "div",
3284
3419
  {
3285
3420
  ref: triggerRef,
@@ -3288,14 +3423,14 @@ var Dropdown = (props) => {
3288
3423
  children
3289
3424
  }
3290
3425
  ),
3291
- mounted && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3426
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3292
3427
  "div",
3293
3428
  {
3294
3429
  ref: menuRef,
3295
3430
  className: clsx_default("dropdown-menu", direction, { visible }),
3296
3431
  style: { top: position.top, left: position.left },
3297
3432
  role: "menu",
3298
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3433
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3299
3434
  "button",
3300
3435
  {
3301
3436
  className: clsx_default("dropdown-item", {
@@ -3317,23 +3452,23 @@ Dropdown.displayName = "Dropdown";
3317
3452
  var Dropdown_default = Dropdown;
3318
3453
 
3319
3454
  // src/components/EmptyState/EmptyState.tsx
3320
- var import_jsx_runtime319 = require("react/jsx-runtime");
3455
+ var import_jsx_runtime321 = require("react/jsx-runtime");
3321
3456
  var EmptyState = (props) => {
3322
3457
  const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
3323
- return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-empty-state", children: [
3324
- icon && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-icon", children: icon }),
3325
- !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" }) }) }),
3326
- /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-title", children: title }),
3327
- description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-description", children: description }),
3328
- action && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-action", children: action })
3458
+ return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("div", { className: "lib-xplat-empty-state", children: [
3459
+ icon && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "empty-icon", children: icon }),
3460
+ !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" }) }) }),
3461
+ /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("p", { className: "empty-title", children: title }),
3462
+ description && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("p", { className: "empty-description", children: description }),
3463
+ action && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "empty-action", children: action })
3329
3464
  ] });
3330
3465
  };
3331
3466
  EmptyState.displayName = "EmptyState";
3332
3467
  var EmptyState_default = EmptyState;
3333
3468
 
3334
3469
  // src/components/FileUpload/FileUpload.tsx
3335
- var import_react18 = __toESM(require("react"), 1);
3336
- var import_jsx_runtime320 = require("react/jsx-runtime");
3470
+ var import_react20 = __toESM(require("react"), 1);
3471
+ var import_jsx_runtime322 = require("react/jsx-runtime");
3337
3472
  var FileUpload = (props) => {
3338
3473
  const {
3339
3474
  accept,
@@ -3343,8 +3478,8 @@ var FileUpload = (props) => {
3343
3478
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
3344
3479
  description
3345
3480
  } = props;
3346
- const [isDragOver, setIsDragOver] = import_react18.default.useState(false);
3347
- const inputRef = import_react18.default.useRef(null);
3481
+ const [isDragOver, setIsDragOver] = import_react20.default.useState(false);
3482
+ const inputRef = import_react20.default.useRef(null);
3348
3483
  const handleFiles = (fileList) => {
3349
3484
  let files = Array.from(fileList);
3350
3485
  if (maxSize) {
@@ -3374,7 +3509,7 @@ var FileUpload = (props) => {
3374
3509
  handleFiles(e.target.files);
3375
3510
  }
3376
3511
  };
3377
- return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)(
3512
+ return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
3378
3513
  "div",
3379
3514
  {
3380
3515
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -3383,7 +3518,7 @@ var FileUpload = (props) => {
3383
3518
  onDragLeave: handleDragLeave,
3384
3519
  onClick: () => inputRef.current?.click(),
3385
3520
  children: [
3386
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3521
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
3387
3522
  "input",
3388
3523
  {
3389
3524
  ref: inputRef,
@@ -3393,9 +3528,9 @@ var FileUpload = (props) => {
3393
3528
  onChange: handleChange
3394
3529
  }
3395
3530
  ),
3396
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(UploadIcon_default, {}) }),
3397
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("p", { className: "upload-label", children: label }),
3398
- description && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("p", { className: "upload-description", children: description })
3531
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(UploadIcon_default, {}) }),
3532
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("p", { className: "upload-label", children: label }),
3533
+ description && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("p", { className: "upload-description", children: description })
3399
3534
  ]
3400
3535
  }
3401
3536
  );
@@ -3404,10 +3539,10 @@ FileUpload.displayName = "FileUpload";
3404
3539
  var FileUpload_default = FileUpload;
3405
3540
 
3406
3541
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
3407
- var import_react20 = __toESM(require("react"), 1);
3542
+ var import_react22 = __toESM(require("react"), 1);
3408
3543
 
3409
3544
  // src/components/HtmlTypeWriter/utils.ts
3410
- var import_react19 = __toESM(require("react"), 1);
3545
+ var import_react21 = __toESM(require("react"), 1);
3411
3546
  var voidTags = /* @__PURE__ */ new Set([
3412
3547
  "br",
3413
3548
  "img",
@@ -3475,41 +3610,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
3475
3610
  props[attr.name] = attr.value;
3476
3611
  });
3477
3612
  if (voidTags.has(tag)) {
3478
- return import_react19.default.createElement(tag, props);
3613
+ return import_react21.default.createElement(tag, props);
3479
3614
  }
3480
3615
  const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
3481
- return import_react19.default.createElement(tag, props, ...children);
3616
+ return import_react21.default.createElement(tag, props, ...children);
3482
3617
  };
3483
3618
  var htmlToReactProgressive = (root, typedLen, rangeMap) => {
3484
3619
  const nodes = Array.from(root.childNodes).map((child, idx) => {
3485
3620
  const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
3486
- return node == null ? null : import_react19.default.createElement(import_react19.default.Fragment, { key: idx }, node);
3621
+ return node == null ? null : import_react21.default.createElement(import_react21.default.Fragment, { key: idx }, node);
3487
3622
  }).filter(Boolean);
3488
3623
  return nodes.length === 0 ? null : nodes;
3489
3624
  };
3490
3625
 
3491
3626
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
3492
- var import_jsx_runtime321 = require("react/jsx-runtime");
3627
+ var import_jsx_runtime323 = require("react/jsx-runtime");
3493
3628
  var HtmlTypeWriter = ({
3494
3629
  html,
3495
3630
  duration = 20,
3496
3631
  onDone,
3497
3632
  onChange
3498
3633
  }) => {
3499
- const [typedLen, setTypedLen] = import_react20.default.useState(0);
3500
- const doneCalledRef = import_react20.default.useRef(false);
3501
- const { doc, rangeMap, totalLength } = import_react20.default.useMemo(() => {
3634
+ const [typedLen, setTypedLen] = import_react22.default.useState(0);
3635
+ const doneCalledRef = import_react22.default.useRef(false);
3636
+ const { doc, rangeMap, totalLength } = import_react22.default.useMemo(() => {
3502
3637
  if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
3503
3638
  const decoded = decodeHtmlEntities(html);
3504
3639
  const doc2 = new DOMParser().parseFromString(decoded, "text/html");
3505
3640
  const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
3506
3641
  return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
3507
3642
  }, [html]);
3508
- import_react20.default.useEffect(() => {
3643
+ import_react22.default.useEffect(() => {
3509
3644
  setTypedLen(0);
3510
3645
  doneCalledRef.current = false;
3511
3646
  }, [html]);
3512
- import_react20.default.useEffect(() => {
3647
+ import_react22.default.useEffect(() => {
3513
3648
  if (!totalLength) return;
3514
3649
  if (typedLen >= totalLength) return;
3515
3650
  const timer = window.setInterval(() => {
@@ -3517,33 +3652,33 @@ var HtmlTypeWriter = ({
3517
3652
  }, duration);
3518
3653
  return () => window.clearInterval(timer);
3519
3654
  }, [typedLen, totalLength, duration]);
3520
- import_react20.default.useEffect(() => {
3655
+ import_react22.default.useEffect(() => {
3521
3656
  if (typedLen > 0 && typedLen < totalLength) {
3522
3657
  onChange?.();
3523
3658
  }
3524
3659
  }, [typedLen, totalLength, onChange]);
3525
- import_react20.default.useEffect(() => {
3660
+ import_react22.default.useEffect(() => {
3526
3661
  if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
3527
3662
  doneCalledRef.current = true;
3528
3663
  onDone?.();
3529
3664
  }
3530
3665
  }, [typedLen, totalLength, onDone]);
3531
- const parsed = import_react20.default.useMemo(
3666
+ const parsed = import_react22.default.useMemo(
3532
3667
  () => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
3533
3668
  [doc, typedLen, rangeMap]
3534
3669
  );
3535
- return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
3670
+ return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
3536
3671
  };
3537
3672
  HtmlTypeWriter.displayName = "HtmlTypeWriter";
3538
3673
  var HtmlTypeWriter_default = HtmlTypeWriter;
3539
3674
 
3540
3675
  // src/components/ImageSelector/ImageSelector.tsx
3541
- var import_react21 = __toESM(require("react"), 1);
3542
- var import_jsx_runtime322 = require("react/jsx-runtime");
3676
+ var import_react23 = __toESM(require("react"), 1);
3677
+ var import_jsx_runtime324 = require("react/jsx-runtime");
3543
3678
  var ImageSelector = (props) => {
3544
3679
  const { value, label, onChange } = props;
3545
- const [previewUrl, setPreviewUrl] = import_react21.default.useState();
3546
- import_react21.default.useEffect(() => {
3680
+ const [previewUrl, setPreviewUrl] = import_react23.default.useState();
3681
+ import_react23.default.useEffect(() => {
3547
3682
  if (!value) {
3548
3683
  setPreviewUrl(void 0);
3549
3684
  return;
@@ -3552,7 +3687,7 @@ var ImageSelector = (props) => {
3552
3687
  setPreviewUrl(url);
3553
3688
  return () => URL.revokeObjectURL(url);
3554
3689
  }, [value]);
3555
- const inputRef = import_react21.default.useRef(null);
3690
+ const inputRef = import_react23.default.useRef(null);
3556
3691
  const handleFileChange = (e) => {
3557
3692
  const selectedFile = e.target.files?.[0];
3558
3693
  if (selectedFile) {
@@ -3565,8 +3700,8 @@ var ImageSelector = (props) => {
3565
3700
  const handleOpenFileDialog = () => {
3566
3701
  inputRef.current?.click();
3567
3702
  };
3568
- return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
3569
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
3703
+ return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
3704
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
3570
3705
  "input",
3571
3706
  {
3572
3707
  type: "file",
@@ -3576,13 +3711,13 @@ var ImageSelector = (props) => {
3576
3711
  ref: inputRef
3577
3712
  }
3578
3713
  ),
3579
- value && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "action-bar", children: [
3580
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(UploadIcon_default, {}) }),
3581
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(DeleteIcon_default, {}) })
3714
+ value && /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: "action-bar", children: [
3715
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(UploadIcon_default, {}) }),
3716
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(DeleteIcon_default, {}) })
3582
3717
  ] }),
3583
- /* @__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: [
3584
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ImageIcon_default, {}) }),
3585
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
3718
+ /* @__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: [
3719
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(ImageIcon_default, {}) }),
3720
+ /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
3586
3721
  ] }) })
3587
3722
  ] });
3588
3723
  };
@@ -3590,7 +3725,7 @@ ImageSelector.displayName = "ImageSelector";
3590
3725
  var ImageSelector_default = ImageSelector;
3591
3726
 
3592
3727
  // src/components/Pagination/Pagination.tsx
3593
- var import_jsx_runtime323 = require("react/jsx-runtime");
3728
+ var import_jsx_runtime325 = require("react/jsx-runtime");
3594
3729
  var getPageRange = (current, totalPages, siblingCount) => {
3595
3730
  const totalNumbers = siblingCount * 2 + 5;
3596
3731
  if (totalPages <= totalNumbers) {
@@ -3633,19 +3768,19 @@ var Pagination = (props) => {
3633
3768
  onChange?.(page);
3634
3769
  }
3635
3770
  };
3636
- 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: [
3637
- /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
3771
+ 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: [
3772
+ /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3638
3773
  "button",
3639
3774
  {
3640
3775
  className: "page-btn prev",
3641
3776
  disabled: current <= 1,
3642
3777
  onClick: () => handleClick(current - 1),
3643
3778
  "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
3644
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronLeftIcon_default, {})
3779
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronLeftIcon_default, {})
3645
3780
  }
3646
3781
  ),
3647
3782
  pages.map(
3648
- (page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
3783
+ (page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3649
3784
  "button",
3650
3785
  {
3651
3786
  className: clsx_default("page-btn", { active: page === current }),
@@ -3656,14 +3791,14 @@ var Pagination = (props) => {
3656
3791
  page
3657
3792
  )
3658
3793
  ),
3659
- /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
3794
+ /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3660
3795
  "button",
3661
3796
  {
3662
3797
  className: "page-btn next",
3663
3798
  disabled: current >= totalPages,
3664
3799
  onClick: () => handleClick(current + 1),
3665
3800
  "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
3666
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronRightIcon_default, {})
3801
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronRightIcon_default, {})
3667
3802
  }
3668
3803
  )
3669
3804
  ] });
@@ -3672,17 +3807,17 @@ Pagination.displayName = "Pagination";
3672
3807
  var Pagination_default = Pagination;
3673
3808
 
3674
3809
  // src/components/PopOver/PopOver.tsx
3675
- var import_react22 = __toESM(require("react"), 1);
3676
- var import_jsx_runtime324 = require("react/jsx-runtime");
3810
+ var import_react24 = __toESM(require("react"), 1);
3811
+ var import_jsx_runtime326 = require("react/jsx-runtime");
3677
3812
  var PopOver = (props) => {
3678
3813
  const { children, isOpen, onClose, PopOverEl } = props;
3679
- const popRef = import_react22.default.useRef(null);
3680
- const triggerRef = import_react22.default.useRef(null);
3681
- const [localOpen, setLocalOpen] = import_react22.default.useState(false);
3682
- const [eventTrigger, setEventTrigger] = import_react22.default.useState(false);
3814
+ const popRef = import_react24.default.useRef(null);
3815
+ const triggerRef = import_react24.default.useRef(null);
3816
+ const [localOpen, setLocalOpen] = import_react24.default.useState(false);
3817
+ const [eventTrigger, setEventTrigger] = import_react24.default.useState(false);
3683
3818
  useClickOutside_default([popRef, triggerRef], onClose, isOpen);
3684
3819
  const position = useAutoPosition_default(triggerRef, popRef, localOpen);
3685
- import_react22.default.useEffect(() => {
3820
+ import_react24.default.useEffect(() => {
3686
3821
  if (isOpen) {
3687
3822
  setLocalOpen(isOpen);
3688
3823
  setTimeout(() => {
@@ -3695,7 +3830,7 @@ var PopOver = (props) => {
3695
3830
  }, 200);
3696
3831
  }
3697
3832
  }, [isOpen]);
3698
- return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
3833
+ return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
3699
3834
  "div",
3700
3835
  {
3701
3836
  className: "lib-xplat-pop-over",
@@ -3705,7 +3840,7 @@ var PopOver = (props) => {
3705
3840
  },
3706
3841
  children: [
3707
3842
  children,
3708
- localOpen && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
3843
+ localOpen && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
3709
3844
  "div",
3710
3845
  {
3711
3846
  className: clsx_default(
@@ -3728,7 +3863,7 @@ PopOver.displayName = "PopOver";
3728
3863
  var PopOver_default = PopOver;
3729
3864
 
3730
3865
  // src/components/Progress/Progress.tsx
3731
- var import_jsx_runtime325 = require("react/jsx-runtime");
3866
+ var import_jsx_runtime327 = require("react/jsx-runtime");
3732
3867
  var Progress = (props) => {
3733
3868
  const {
3734
3869
  value,
@@ -3738,8 +3873,8 @@ var Progress = (props) => {
3738
3873
  showLabel = false
3739
3874
  } = props;
3740
3875
  const percentage = Math.min(100, Math.max(0, value / max * 100));
3741
- return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
3742
- /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3876
+ return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
3877
+ /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
3743
3878
  "div",
3744
3879
  {
3745
3880
  className: "track",
@@ -3747,7 +3882,7 @@ var Progress = (props) => {
3747
3882
  "aria-valuenow": value,
3748
3883
  "aria-valuemin": 0,
3749
3884
  "aria-valuemax": max,
3750
- children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3885
+ children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
3751
3886
  "div",
3752
3887
  {
3753
3888
  className: "bar",
@@ -3756,7 +3891,7 @@ var Progress = (props) => {
3756
3891
  )
3757
3892
  }
3758
3893
  ),
3759
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("span", { className: "label", children: [
3894
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("span", { className: "label", children: [
3760
3895
  Math.round(percentage),
3761
3896
  "%"
3762
3897
  ] })
@@ -3766,17 +3901,17 @@ Progress.displayName = "Progress";
3766
3901
  var Progress_default = Progress;
3767
3902
 
3768
3903
  // src/components/Radio/RadioGroupContext.tsx
3769
- var import_react23 = __toESM(require("react"), 1);
3770
- var RadioGroupContext = import_react23.default.createContext(
3904
+ var import_react25 = __toESM(require("react"), 1);
3905
+ var RadioGroupContext = import_react25.default.createContext(
3771
3906
  null
3772
3907
  );
3773
3908
  var useRadioGroupContext = () => {
3774
- return import_react23.default.useContext(RadioGroupContext);
3909
+ return import_react25.default.useContext(RadioGroupContext);
3775
3910
  };
3776
3911
  var RadioGroupContext_default = RadioGroupContext;
3777
3912
 
3778
3913
  // src/components/Radio/Radio.tsx
3779
- var import_jsx_runtime326 = require("react/jsx-runtime");
3914
+ var import_jsx_runtime328 = require("react/jsx-runtime");
3780
3915
  var Radio = (props) => {
3781
3916
  const {
3782
3917
  label,
@@ -3794,7 +3929,7 @@ var Radio = (props) => {
3794
3929
  value,
3795
3930
  onChange: rest.onChange
3796
3931
  };
3797
- return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
3932
+ return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
3798
3933
  "label",
3799
3934
  {
3800
3935
  className: clsx_default(
@@ -3804,18 +3939,18 @@ var Radio = (props) => {
3804
3939
  localChecked ? "checked" : void 0
3805
3940
  ),
3806
3941
  children: [
3807
- /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
3808
- /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
3942
+ /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
3943
+ /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
3809
3944
  "div",
3810
3945
  {
3811
3946
  className: clsx_default(
3812
3947
  "circle",
3813
3948
  localChecked ? "checked" : void 0
3814
3949
  ),
3815
- children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "inner-circle" })
3950
+ children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "inner-circle" })
3816
3951
  }
3817
3952
  ),
3818
- label && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("span", { children: label })
3953
+ label && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("span", { children: label })
3819
3954
  ]
3820
3955
  }
3821
3956
  );
@@ -3824,28 +3959,28 @@ Radio.displayName = "Radio";
3824
3959
  var Radio_default = Radio;
3825
3960
 
3826
3961
  // src/components/Radio/RadioGroup.tsx
3827
- var import_jsx_runtime327 = require("react/jsx-runtime");
3962
+ var import_jsx_runtime329 = require("react/jsx-runtime");
3828
3963
  var RadioGroup = (props) => {
3829
3964
  const { children, ...rest } = props;
3830
- return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(import_jsx_runtime327.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
3965
+ return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_jsx_runtime329.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
3831
3966
  };
3832
3967
  RadioGroup.displayName = "RadioGroup";
3833
3968
  var RadioGroup_default = RadioGroup;
3834
3969
 
3835
3970
  // src/components/Select/Select.tsx
3836
- var import_react26 = __toESM(require("react"), 1);
3971
+ var import_react28 = __toESM(require("react"), 1);
3837
3972
 
3838
3973
  // src/components/Select/context.ts
3839
- var import_react24 = __toESM(require("react"), 1);
3840
- var SelectContext = import_react24.default.createContext(null);
3974
+ var import_react26 = __toESM(require("react"), 1);
3975
+ var SelectContext = import_react26.default.createContext(null);
3841
3976
  var context_default = SelectContext;
3842
3977
 
3843
3978
  // src/components/Select/SelectItem.tsx
3844
- var import_react25 = __toESM(require("react"), 1);
3845
- var import_jsx_runtime328 = require("react/jsx-runtime");
3979
+ var import_react27 = __toESM(require("react"), 1);
3980
+ var import_jsx_runtime330 = require("react/jsx-runtime");
3846
3981
  var SelectItem = (props) => {
3847
3982
  const { children, value, onClick, disabled = false } = props;
3848
- const ctx = import_react25.default.useContext(context_default);
3983
+ const ctx = import_react27.default.useContext(context_default);
3849
3984
  const handleClick = (e) => {
3850
3985
  e.preventDefault();
3851
3986
  e.stopPropagation();
@@ -3854,7 +3989,7 @@ var SelectItem = (props) => {
3854
3989
  ctx?.close();
3855
3990
  onClick?.();
3856
3991
  };
3857
- return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
3992
+ return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
3858
3993
  "div",
3859
3994
  {
3860
3995
  className: clsx_default("select-item", disabled && "disabled"),
@@ -3875,7 +4010,7 @@ SelectItem.displayName = "Select.Item";
3875
4010
  var SelectItem_default = SelectItem;
3876
4011
 
3877
4012
  // src/components/Select/Select.tsx
3878
- var import_jsx_runtime329 = require("react/jsx-runtime");
4013
+ var import_jsx_runtime331 = require("react/jsx-runtime");
3879
4014
  var ANIMATION_DURATION_MS3 = 200;
3880
4015
  var SelectRoot = (props) => {
3881
4016
  const {
@@ -3887,26 +4022,26 @@ var SelectRoot = (props) => {
3887
4022
  error = false,
3888
4023
  size = "md"
3889
4024
  } = props;
3890
- const itemChildren = import_react26.default.Children.toArray(children).filter(
3891
- (child) => import_react26.default.isValidElement(child) && child.type === SelectItem_default
4025
+ const itemChildren = import_react28.default.Children.toArray(children).filter(
4026
+ (child) => import_react28.default.isValidElement(child) && child.type === SelectItem_default
3892
4027
  );
3893
4028
  const isControlled = valueProp !== void 0;
3894
- const [isOpen, setOpen] = import_react26.default.useState(false);
3895
- const [uncontrolledLabel, setUncontrolledLabel] = import_react26.default.useState(null);
3896
- const controlledLabel = import_react26.default.useMemo(() => {
4029
+ const [isOpen, setOpen] = import_react28.default.useState(false);
4030
+ const [uncontrolledLabel, setUncontrolledLabel] = import_react28.default.useState(null);
4031
+ const controlledLabel = import_react28.default.useMemo(() => {
3897
4032
  if (!isControlled) return null;
3898
4033
  const match = itemChildren.find((child) => child.props.value === valueProp);
3899
4034
  return match ? match.props.children : null;
3900
4035
  }, [isControlled, valueProp, itemChildren]);
3901
4036
  const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
3902
- const triggerRef = import_react26.default.useRef(null);
3903
- const contentRef = import_react26.default.useRef(null);
3904
- const [mounted, setMounted] = import_react26.default.useState(false);
3905
- const [visible, setVisible] = import_react26.default.useState(false);
3906
- import_react26.default.useEffect(() => {
4037
+ const triggerRef = import_react28.default.useRef(null);
4038
+ const contentRef = import_react28.default.useRef(null);
4039
+ const [mounted, setMounted] = import_react28.default.useState(false);
4040
+ const [visible, setVisible] = import_react28.default.useState(false);
4041
+ import_react28.default.useEffect(() => {
3907
4042
  if (disabled && isOpen) setOpen(false);
3908
4043
  }, [disabled, isOpen]);
3909
- import_react26.default.useEffect(() => {
4044
+ import_react28.default.useEffect(() => {
3910
4045
  if (isOpen) {
3911
4046
  setMounted(true);
3912
4047
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3916,12 +4051,12 @@ var SelectRoot = (props) => {
3916
4051
  const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
3917
4052
  return () => clearTimeout(t);
3918
4053
  }, [isOpen]);
3919
- const open = import_react26.default.useCallback(() => setOpen(true), []);
3920
- const close = import_react26.default.useCallback(() => setOpen(false), []);
3921
- const toggle = import_react26.default.useCallback(() => setOpen((prev) => !prev), []);
4054
+ const open = import_react28.default.useCallback(() => setOpen(true), []);
4055
+ const close = import_react28.default.useCallback(() => setOpen(false), []);
4056
+ const toggle = import_react28.default.useCallback(() => setOpen((prev) => !prev), []);
3922
4057
  useClickOutside_default([contentRef, triggerRef], close, isOpen);
3923
4058
  const position = useAutoPosition_default(triggerRef, contentRef, mounted);
3924
- const setSelected = import_react26.default.useCallback(
4059
+ const setSelected = import_react28.default.useCallback(
3925
4060
  (label, itemValue) => {
3926
4061
  if (!isControlled) {
3927
4062
  setUncontrolledLabel(label);
@@ -3930,7 +4065,7 @@ var SelectRoot = (props) => {
3930
4065
  },
3931
4066
  [isControlled, onChange]
3932
4067
  );
3933
- const ctxValue = import_react26.default.useMemo(
4068
+ const ctxValue = import_react28.default.useMemo(
3934
4069
  () => ({
3935
4070
  isOpen,
3936
4071
  mounted,
@@ -3951,7 +4086,7 @@ var SelectRoot = (props) => {
3951
4086
  if (disabled) return;
3952
4087
  toggle();
3953
4088
  };
3954
- return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
4089
+ return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(
3955
4090
  "div",
3956
4091
  {
3957
4092
  className: clsx_default(
@@ -3962,7 +4097,7 @@ var SelectRoot = (props) => {
3962
4097
  mounted && "is-open"
3963
4098
  ),
3964
4099
  children: [
3965
- /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
4100
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(
3966
4101
  "div",
3967
4102
  {
3968
4103
  ref: triggerRef,
@@ -3986,7 +4121,7 @@ var SelectRoot = (props) => {
3986
4121
  }
3987
4122
  },
3988
4123
  children: [
3989
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4124
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
3990
4125
  "span",
3991
4126
  {
3992
4127
  className: clsx_default(
@@ -3996,18 +4131,18 @@ var SelectRoot = (props) => {
3996
4131
  children: selectedLabel ?? placeholder
3997
4132
  }
3998
4133
  ),
3999
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4134
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4000
4135
  "span",
4001
4136
  {
4002
4137
  className: clsx_default("select-trigger-icon", isOpen && "open"),
4003
4138
  "aria-hidden": true,
4004
- children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(ChevronDownIcon_default, {})
4139
+ children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ChevronDownIcon_default, {})
4005
4140
  }
4006
4141
  )
4007
4142
  ]
4008
4143
  }
4009
4144
  ),
4010
- mounted && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4145
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4011
4146
  "div",
4012
4147
  {
4013
4148
  className: clsx_default("select-content", position.direction, stateClass),
@@ -4028,14 +4163,14 @@ var Select = Object.assign(SelectRoot, {
4028
4163
  var Select_default = Select;
4029
4164
 
4030
4165
  // src/components/Skeleton/Skeleton.tsx
4031
- var import_jsx_runtime330 = require("react/jsx-runtime");
4166
+ var import_jsx_runtime332 = require("react/jsx-runtime");
4032
4167
  var Skeleton = (props) => {
4033
4168
  const { variant = "text", width, height } = props;
4034
4169
  const style = {
4035
4170
  width: typeof width === "number" ? `${width}px` : width,
4036
4171
  height: typeof height === "number" ? `${height}px` : height
4037
4172
  };
4038
- return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
4173
+ return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
4039
4174
  "div",
4040
4175
  {
4041
4176
  className: clsx_default("lib-xplat-skeleton", variant),
@@ -4048,20 +4183,20 @@ Skeleton.displayName = "Skeleton";
4048
4183
  var Skeleton_default = Skeleton;
4049
4184
 
4050
4185
  // src/components/Spinner/Spinner.tsx
4051
- var import_jsx_runtime331 = require("react/jsx-runtime");
4186
+ var import_jsx_runtime333 = require("react/jsx-runtime");
4052
4187
  var Spinner = (props) => {
4053
4188
  const {
4054
4189
  size = "md",
4055
4190
  type = "brand"
4056
4191
  } = props;
4057
- return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4192
+ return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4058
4193
  "div",
4059
4194
  {
4060
4195
  className: clsx_default("lib-xplat-spinner", size, type),
4061
4196
  role: "status",
4062
4197
  "aria-label": "\uB85C\uB529 \uC911",
4063
- children: /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4064
- /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4198
+ children: /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4199
+ /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4065
4200
  "circle",
4066
4201
  {
4067
4202
  className: "track",
@@ -4071,7 +4206,7 @@ var Spinner = (props) => {
4071
4206
  strokeWidth: "3"
4072
4207
  }
4073
4208
  ),
4074
- /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4209
+ /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4075
4210
  "circle",
4076
4211
  {
4077
4212
  className: "indicator",
@@ -4090,20 +4225,20 @@ Spinner.displayName = "Spinner";
4090
4225
  var Spinner_default = Spinner;
4091
4226
 
4092
4227
  // src/components/Steps/Steps.tsx
4093
- var import_jsx_runtime332 = require("react/jsx-runtime");
4228
+ var import_jsx_runtime334 = require("react/jsx-runtime");
4094
4229
  var Steps = (props) => {
4095
4230
  const {
4096
4231
  items,
4097
4232
  current,
4098
4233
  type = "brand"
4099
4234
  } = props;
4100
- return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
4235
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
4101
4236
  const status = index < current ? "completed" : index === current ? "active" : "pending";
4102
- return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: clsx_default("step-item", status), children: [
4103
- /* @__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 }) }),
4104
- /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: "step-content", children: [
4105
- /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "step-title", children: item.title }),
4106
- item.description && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "step-description", children: item.description })
4237
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("step-item", status), children: [
4238
+ /* @__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 }) }),
4239
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "step-content", children: [
4240
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "step-title", children: item.title }),
4241
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "step-description", children: item.description })
4107
4242
  ] })
4108
4243
  ] }, index);
4109
4244
  }) });
@@ -4112,8 +4247,8 @@ Steps.displayName = "Steps";
4112
4247
  var Steps_default = Steps;
4113
4248
 
4114
4249
  // src/components/Swiper/Swiper.tsx
4115
- var import_react27 = __toESM(require("react"), 1);
4116
- var import_jsx_runtime333 = require("react/jsx-runtime");
4250
+ var import_react29 = __toESM(require("react"), 1);
4251
+ var import_jsx_runtime335 = require("react/jsx-runtime");
4117
4252
  var Swiper = (props) => {
4118
4253
  const {
4119
4254
  auto = false,
@@ -4136,23 +4271,23 @@ var Swiper = (props) => {
4136
4271
  const maxIndex = Math.max(0, totalSlides - viewItemCount);
4137
4272
  const useLoop = loop && canSlide;
4138
4273
  const cloneCount = useLoop ? totalSlides : 0;
4139
- const extendedItems = import_react27.default.useMemo(() => {
4274
+ const extendedItems = import_react29.default.useMemo(() => {
4140
4275
  if (!useLoop) return items;
4141
4276
  return [...items, ...items, ...items];
4142
4277
  }, [items, useLoop]);
4143
4278
  const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
4144
- const [innerIndex, setInnerIndex] = import_react27.default.useState(
4279
+ const [innerIndex, setInnerIndex] = import_react29.default.useState(
4145
4280
  useLoop ? cloneCount + initialIdx : initialIdx
4146
4281
  );
4147
- const [isDragging, setIsDragging] = import_react27.default.useState(false);
4148
- const [dragOffset, setDragOffset] = import_react27.default.useState(0);
4149
- const [animated, setAnimated] = import_react27.default.useState(true);
4150
- const [containerWidth, setContainerWidth] = import_react27.default.useState(0);
4151
- const containerRef = import_react27.default.useRef(null);
4152
- const startXRef = import_react27.default.useRef(0);
4153
- const startTimeRef = import_react27.default.useRef(0);
4154
- const autoplayTimerRef = import_react27.default.useRef(null);
4155
- import_react27.default.useEffect(() => {
4282
+ const [isDragging, setIsDragging] = import_react29.default.useState(false);
4283
+ const [dragOffset, setDragOffset] = import_react29.default.useState(0);
4284
+ const [animated, setAnimated] = import_react29.default.useState(true);
4285
+ const [containerWidth, setContainerWidth] = import_react29.default.useState(0);
4286
+ const containerRef = import_react29.default.useRef(null);
4287
+ const startXRef = import_react29.default.useRef(0);
4288
+ const startTimeRef = import_react29.default.useRef(0);
4289
+ const autoplayTimerRef = import_react29.default.useRef(null);
4290
+ import_react29.default.useEffect(() => {
4156
4291
  const el = containerRef.current;
4157
4292
  if (!el) return;
4158
4293
  const ro = new ResizeObserver((entries) => {
@@ -4171,7 +4306,7 @@ var Swiper = (props) => {
4171
4306
  return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
4172
4307
  };
4173
4308
  const realIndex = getRealIndex(innerIndex);
4174
- const moveToInner = import_react27.default.useCallback(
4309
+ const moveToInner = import_react29.default.useCallback(
4175
4310
  (idx, withAnim = true) => {
4176
4311
  if (!useLoop) {
4177
4312
  setAnimated(withAnim);
@@ -4199,7 +4334,7 @@ var Swiper = (props) => {
4199
4334
  },
4200
4335
  [useLoop, cloneCount, totalSlides]
4201
4336
  );
4202
- const handleTransitionEnd = import_react27.default.useCallback(() => {
4337
+ const handleTransitionEnd = import_react29.default.useCallback(() => {
4203
4338
  if (!useLoop) return;
4204
4339
  const real = getRealIndex(innerIndex);
4205
4340
  const canonical = cloneCount + real;
@@ -4209,7 +4344,7 @@ var Swiper = (props) => {
4209
4344
  }
4210
4345
  onChange?.(Math.min(real, maxIndex));
4211
4346
  }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
4212
- const slideTo = import_react27.default.useCallback(
4347
+ const slideTo = import_react29.default.useCallback(
4213
4348
  (logicalIndex) => {
4214
4349
  if (!canSlide) return;
4215
4350
  const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
@@ -4219,7 +4354,7 @@ var Swiper = (props) => {
4219
4354
  },
4220
4355
  [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
4221
4356
  );
4222
- const slideNext = import_react27.default.useCallback(() => {
4357
+ const slideNext = import_react29.default.useCallback(() => {
4223
4358
  if (!canSlide) return;
4224
4359
  const nextInner = innerIndex + slideBy;
4225
4360
  if (useLoop) {
@@ -4228,7 +4363,7 @@ var Swiper = (props) => {
4228
4363
  moveToInner(Math.min(nextInner, maxIndex), true);
4229
4364
  }
4230
4365
  }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
4231
- const slidePrev = import_react27.default.useCallback(() => {
4366
+ const slidePrev = import_react29.default.useCallback(() => {
4232
4367
  if (!canSlide) return;
4233
4368
  const prevInner = innerIndex - slideBy;
4234
4369
  if (useLoop) {
@@ -4237,7 +4372,7 @@ var Swiper = (props) => {
4237
4372
  moveToInner(Math.max(prevInner, 0), true);
4238
4373
  }
4239
4374
  }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
4240
- import_react27.default.useEffect(() => {
4375
+ import_react29.default.useEffect(() => {
4241
4376
  if (indexProp === void 0) return;
4242
4377
  const clamped = Math.max(0, Math.min(indexProp, maxIndex));
4243
4378
  const target = useLoop ? cloneCount + clamped : clamped;
@@ -4245,12 +4380,12 @@ var Swiper = (props) => {
4245
4380
  moveToInner(target, true);
4246
4381
  }
4247
4382
  }, [indexProp]);
4248
- import_react27.default.useImperativeHandle(swiperRef, () => ({
4383
+ import_react29.default.useImperativeHandle(swiperRef, () => ({
4249
4384
  slidePrev,
4250
4385
  slideNext,
4251
4386
  slideTo
4252
4387
  }));
4253
- import_react27.default.useEffect(() => {
4388
+ import_react29.default.useEffect(() => {
4254
4389
  if (!auto || !canSlide) return;
4255
4390
  autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
4256
4391
  return () => {
@@ -4273,7 +4408,7 @@ var Swiper = (props) => {
4273
4408
  startXRef.current = getClientX(e);
4274
4409
  startTimeRef.current = Date.now();
4275
4410
  };
4276
- import_react27.default.useEffect(() => {
4411
+ import_react29.default.useEffect(() => {
4277
4412
  if (!isDragging) return;
4278
4413
  const handleMove = (e) => {
4279
4414
  setDragOffset(getClientX(e) - startXRef.current);
@@ -4311,8 +4446,8 @@ var Swiper = (props) => {
4311
4446
  }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
4312
4447
  const slideWidthPercent = 100 / viewItemCount;
4313
4448
  const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
4314
- const slideElements = import_react27.default.useMemo(
4315
- () => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4449
+ const slideElements = import_react29.default.useMemo(
4450
+ () => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4316
4451
  "div",
4317
4452
  {
4318
4453
  className: "lib-xplat-swiper__slide",
@@ -4331,14 +4466,14 @@ var Swiper = (props) => {
4331
4466
  Math.floor(realIndex / slideBy),
4332
4467
  totalSteps - 1
4333
4468
  );
4334
- return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
4335
- /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4469
+ return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
4470
+ /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4336
4471
  "div",
4337
4472
  {
4338
4473
  className: "lib-xplat-swiper__viewport",
4339
4474
  onMouseDown: handleDragStart,
4340
4475
  onTouchStart: handleDragStart,
4341
- children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4476
+ children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4342
4477
  "div",
4343
4478
  {
4344
4479
  className: clsx_default(
@@ -4356,7 +4491,7 @@ var Swiper = (props) => {
4356
4491
  )
4357
4492
  }
4358
4493
  ),
4359
- 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)(
4494
+ 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)(
4360
4495
  "span",
4361
4496
  {
4362
4497
  className: "lib-xplat-swiper__progress-fill",
@@ -4366,7 +4501,7 @@ var Swiper = (props) => {
4366
4501
  }
4367
4502
  }
4368
4503
  ) }) }),
4369
- 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)(
4504
+ 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)(
4370
4505
  "button",
4371
4506
  {
4372
4507
  className: clsx_default(
@@ -4384,8 +4519,8 @@ Swiper.displayName = "Swiper";
4384
4519
  var Swiper_default = Swiper;
4385
4520
 
4386
4521
  // src/components/Switch/Switch.tsx
4387
- var import_react28 = __toESM(require("react"), 1);
4388
- var import_jsx_runtime334 = require("react/jsx-runtime");
4522
+ var import_react30 = __toESM(require("react"), 1);
4523
+ var import_jsx_runtime336 = require("react/jsx-runtime");
4389
4524
  var KNOB_TRANSITION_MS = 250;
4390
4525
  var Switch = (props) => {
4391
4526
  const {
@@ -4395,9 +4530,9 @@ var Switch = (props) => {
4395
4530
  disabled,
4396
4531
  onChange
4397
4532
  } = props;
4398
- const [isAnimating, setIsAnimating] = import_react28.default.useState(false);
4399
- const timeoutRef = import_react28.default.useRef(null);
4400
- import_react28.default.useEffect(() => {
4533
+ const [isAnimating, setIsAnimating] = import_react30.default.useState(false);
4534
+ const timeoutRef = import_react30.default.useRef(null);
4535
+ import_react30.default.useEffect(() => {
4401
4536
  return () => {
4402
4537
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4403
4538
  };
@@ -4412,7 +4547,7 @@ var Switch = (props) => {
4412
4547
  timeoutRef.current = null;
4413
4548
  }, KNOB_TRANSITION_MS);
4414
4549
  };
4415
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
4550
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4416
4551
  "div",
4417
4552
  {
4418
4553
  className: clsx_default(
@@ -4425,80 +4560,13 @@ var Switch = (props) => {
4425
4560
  ),
4426
4561
  onClick: handleClick,
4427
4562
  "aria-disabled": disabled || isAnimating,
4428
- children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
4563
+ children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
4429
4564
  }
4430
4565
  );
4431
4566
  };
4432
4567
  Switch.displayName = "Switch";
4433
4568
  var Switch_default = Switch;
4434
4569
 
4435
- // src/components/Tab/Tab.tsx
4436
- var import_react30 = __toESM(require("react"), 1);
4437
-
4438
- // src/components/Tab/TabItem.tsx
4439
- var import_react29 = __toESM(require("react"), 1);
4440
- var import_jsx_runtime335 = require("react/jsx-runtime");
4441
- var TabItem = import_react29.default.forwardRef((props, ref) => {
4442
- const { isActive, title, onClick } = props;
4443
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4444
- "div",
4445
- {
4446
- ref,
4447
- className: clsx_default("tab-item", isActive ? "active" : null),
4448
- onClick,
4449
- children: title
4450
- }
4451
- );
4452
- });
4453
- TabItem.displayName = "TabItem";
4454
- var TabItem_default = TabItem;
4455
-
4456
- // src/components/Tab/Tab.tsx
4457
- var import_jsx_runtime336 = require("react/jsx-runtime");
4458
- var Tab = (props) => {
4459
- const { activeIndex, onChange, tabs, type, size = "md" } = props;
4460
- const [underlineStyle, setUnderlineStyle] = import_react30.default.useState({
4461
- left: 0,
4462
- width: 0
4463
- });
4464
- const itemRefs = import_react30.default.useRef([]);
4465
- const handleChangeActiveTab = (tabItem, tabIdx) => {
4466
- onChange(tabItem, tabIdx);
4467
- };
4468
- import_react30.default.useEffect(() => {
4469
- const el = itemRefs.current[activeIndex];
4470
- if (el) {
4471
- setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
4472
- }
4473
- }, [activeIndex, tabs.length]);
4474
- return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
4475
- tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4476
- TabItem_default,
4477
- {
4478
- onClick: () => handleChangeActiveTab(tab, idx),
4479
- isActive: activeIndex === idx,
4480
- ref: (el) => {
4481
- itemRefs.current[idx] = el;
4482
- },
4483
- title: tab.title
4484
- },
4485
- `${tab.value}_${idx}`
4486
- )),
4487
- type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4488
- "div",
4489
- {
4490
- className: "tab-toggle-underline",
4491
- style: {
4492
- left: underlineStyle.left,
4493
- width: underlineStyle.width
4494
- }
4495
- }
4496
- )
4497
- ] });
4498
- };
4499
- Tab.displayName = "Tab";
4500
- var Tab_default = Tab;
4501
-
4502
4570
  // src/components/Table/TableContext.tsx
4503
4571
  var import_react31 = __toESM(require("react"), 1);
4504
4572
  var TableContext = import_react31.default.createContext(null);
@@ -5246,10 +5314,10 @@ var Video_default = Video;
5246
5314
  Alert,
5247
5315
  Avatar,
5248
5316
  Badge,
5317
+ Box,
5249
5318
  Breadcrumb,
5250
5319
  Button,
5251
5320
  Calendar,
5252
- Card,
5253
5321
  CardTab,
5254
5322
  Chart,
5255
5323
  CheckBox,