@x-plat/design-system 0.5.7 → 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);
@@ -2103,25 +2108,65 @@ var CardTab_default = CardTab;
2103
2108
  // src/components/Chart/Chart.tsx
2104
2109
  var import_react5 = __toESM(require("react"), 1);
2105
2110
  var import_jsx_runtime305 = require("react/jsx-runtime");
2106
- var LINE_BAR_PALETTES = [
2107
- ["var(--primitive-red-100)", "var(--primitive-red-200)", "var(--primitive-red-300)", "var(--primitive-red-400)", "var(--primitive-red-500)", "var(--primitive-red-600)"],
2108
- ["var(--primitive-orange-100)", "var(--primitive-orange-200)", "var(--primitive-orange-300)", "var(--primitive-orange-400)", "var(--primitive-orange-500)", "var(--primitive-orange-600)"],
2109
- ["var(--primitive-yellow-100)", "var(--primitive-yellow-200)", "var(--primitive-yellow-300)", "var(--primitive-yellow-400)", "var(--primitive-yellow-500)", "var(--primitive-yellow-600)"],
2110
- ["var(--primitive-green-100)", "var(--primitive-green-200)", "var(--primitive-green-300)", "var(--primitive-green-400)", "var(--primitive-green-500)", "var(--primitive-green-600)"],
2111
- ["var(--primitive-blue-100)", "var(--primitive-blue-200)", "var(--primitive-blue-300)", "var(--primitive-blue-400)", "var(--primitive-blue-500)", "var(--primitive-blue-600)"],
2112
- ["var(--primitive-light-blue-100)", "var(--primitive-light-blue-200)", "var(--primitive-light-blue-300)", "var(--primitive-light-blue-400)", "var(--primitive-light-blue-500)", "var(--primitive-light-blue-600)"],
2113
- ["var(--primitive-purple-100)", "var(--primitive-purple-200)", "var(--primitive-purple-300)", "var(--primitive-purple-400)", "var(--primitive-purple-500)", "var(--primitive-purple-600)"],
2114
- ["var(--primitive-pink-100)", "var(--primitive-pink-200)", "var(--primitive-pink-300)", "var(--primitive-pink-400)", "var(--primitive-pink-500)", "var(--primitive-pink-600)"]
2115
- ];
2116
- var PIE_PALETTES = [
2117
- ["var(--primitive-orange-300)", "var(--primitive-red-300)", "var(--primitive-yellow-300)", "var(--primitive-green-300)", "var(--primitive-blue-300)", "var(--primitive-light-blue-300)"],
2118
- ["var(--primitive-orange-400)", "var(--primitive-red-400)", "var(--primitive-yellow-400)", "var(--primitive-green-400)", "var(--primitive-blue-400)", "var(--primitive-light-blue-400)"],
2119
- ["var(--primitive-orange-500)", "var(--primitive-red-500)", "var(--primitive-yellow-500)", "var(--primitive-green-500)", "var(--primitive-blue-500)", "var(--primitive-light-blue-500)"]
2120
- ];
2121
- var getPalette = (palettes, index) => {
2122
- return palettes[index % palettes.length];
2111
+ var CATEGORICAL_COUNT2 = 8;
2112
+ var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
2113
+ const n = i + 1;
2114
+ return [
2115
+ `var(--semantic-categorical-${n}-bg)`,
2116
+ `var(--semantic-categorical-${n}-area)`,
2117
+ `var(--semantic-categorical-${n}-fill)`,
2118
+ `var(--semantic-categorical-${n}-text)`
2119
+ ];
2120
+ });
2121
+ var PIE_COLORS = Array.from(
2122
+ { length: CATEGORICAL_COUNT2 },
2123
+ (_, i) => `var(--semantic-categorical-${i + 1}-fill)`
2124
+ );
2125
+ var hashString = (str) => {
2126
+ let hash = 0;
2127
+ for (let i = 0; i < str.length; i++) {
2128
+ hash = (hash << 5) - hash + str.charCodeAt(i) | 0;
2129
+ }
2130
+ return Math.abs(hash);
2131
+ };
2132
+ var getPalette = (palettes, index, key) => {
2133
+ const offset = key ? hashString(key) : 0;
2134
+ return palettes[(index + offset) % palettes.length];
2123
2135
  };
2124
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
+ };
2125
2170
  var useChartTooltip = (enabled) => {
2126
2171
  const [tooltip, setTooltip] = import_react5.default.useState({
2127
2172
  visible: false,
@@ -2156,15 +2201,15 @@ var useChartTooltip = (enabled) => {
2156
2201
  }, []);
2157
2202
  return { tooltip, show, hide, move, containerRef };
2158
2203
  };
2159
- 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 }) => {
2160
2205
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2161
2206
  const maxVal = import_react5.default.useMemo(() => {
2162
2207
  const allValues = entries.flatMap(([, v]) => v);
2163
2208
  return Math.max(...allValues) * 1.2 || 1;
2164
2209
  }, [entries]);
2165
2210
  const count = labels.length;
2166
- const chartW = 600 - PADDING.left - PADDING.right;
2167
- const chartH = 300 - PADDING.top - PADDING.bottom;
2211
+ const chartW = width - PADDING.left - PADDING.right;
2212
+ const chartH = height - PADDING.top - PADDING.bottom;
2168
2213
  const seriesPoints = import_react5.default.useMemo(
2169
2214
  () => entries.map(
2170
2215
  ([, values]) => values.map((v, i) => ({
@@ -2175,22 +2220,22 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
2175
2220
  ),
2176
2221
  [entries, count, chartW, chartH, maxVal]
2177
2222
  );
2178
- 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: [
2179
2224
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2180
2225
  const y = PADDING.top + (1 - ratio) * chartH;
2181
2226
  const val = Math.round(maxVal * ratio);
2182
2227
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2183
- /* @__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" }),
2184
2229
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2185
2230
  ] }, ratio);
2186
2231
  }),
2187
2232
  labels.map((label, i) => {
2188
2233
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
2189
- 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);
2190
2235
  }),
2191
2236
  entries.map(([key], di) => {
2192
- const palette = getPalette(LINE_BAR_PALETTES, di);
2193
- const color = palette[4];
2237
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
2238
+ const color = palette[2];
2194
2239
  const points = seriesPoints[di];
2195
2240
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2196
2241
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
@@ -2221,7 +2266,73 @@ var LineChart = import_react5.default.memo(({ data, labels, onHover, onMove, onL
2221
2266
  ] });
2222
2267
  });
2223
2268
  LineChart.displayName = "LineChart";
2224
- 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 }) => {
2225
2336
  const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2226
2337
  const maxVal = import_react5.default.useMemo(() => {
2227
2338
  const allValues = entries.flatMap(([, v]) => v);
@@ -2229,8 +2340,8 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2229
2340
  }, [entries]);
2230
2341
  const count = labels.length;
2231
2342
  const groupCount = entries.length;
2232
- const chartW = 600 - PADDING.left - PADDING.right;
2233
- const chartH = 300 - PADDING.top - PADDING.bottom;
2343
+ const chartW = width - PADDING.left - PADDING.right;
2344
+ const chartH = height - PADDING.top - PADDING.bottom;
2234
2345
  const groupW = chartW / count;
2235
2346
  const barW = Math.min(32, groupW * 0.7 / groupCount);
2236
2347
  const bars = import_react5.default.useMemo(
@@ -2244,19 +2355,19 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2244
2355
  ),
2245
2356
  [entries, maxVal, chartH, groupW, barW, groupCount]
2246
2357
  );
2247
- 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: [
2248
2359
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
2249
2360
  const y = PADDING.top + (1 - ratio) * chartH;
2250
2361
  const val = Math.round(maxVal * ratio);
2251
2362
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
2252
- /* @__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" }),
2253
2364
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
2254
2365
  ] }, ratio);
2255
2366
  }),
2256
- 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)),
2257
2368
  entries.map(([key], di) => {
2258
- const palette = getPalette(LINE_BAR_PALETTES, di);
2259
- const color = palette[4];
2369
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
2370
+ const color = palette[2];
2260
2371
  return bars[di].map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2261
2372
  "rect",
2262
2373
  {
@@ -2264,7 +2375,7 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2264
2375
  y: b.y,
2265
2376
  width: b.w,
2266
2377
  height: b.h,
2267
- rx: "2",
2378
+ rx: Math.min(4, b.w / 2),
2268
2379
  fill: color,
2269
2380
  className: "chart-bar",
2270
2381
  onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${b.v}`),
@@ -2278,14 +2389,17 @@ var BarChart = import_react5.default.memo(({ data, labels, onHover, onMove, onLe
2278
2389
  });
2279
2390
  BarChart.displayName = "BarChart";
2280
2391
  var PieDonutChart = import_react5.default.memo(
2281
- ({ data, labels, isDoughnut, onHover, onMove, onLeave }) => {
2282
- const values = import_react5.default.useMemo(() => Object.entries(data).flatMap(([, v]) => v), [data]);
2392
+ ({ data, labels, width, height, isDoughnut, onHover, onMove, onLeave }) => {
2393
+ const entries = import_react5.default.useMemo(() => Object.entries(data), [data]);
2394
+ const values = import_react5.default.useMemo(() => entries.flatMap(([, v]) => v), [entries]);
2283
2395
  const total = import_react5.default.useMemo(() => values.reduce((a, b) => a + b, 0) || 1, [values]);
2284
- const cx = 150;
2285
- const cy = 150;
2286
- const r2 = 120;
2287
- const innerR = isDoughnut ? 60 : 0;
2288
- const palette = getPalette(PIE_PALETTES, 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;
2401
+ const firstKey = entries[0]?.[0] ?? "";
2402
+ const colorOffset = hashString(firstKey);
2289
2403
  const sliceData = import_react5.default.useMemo(() => {
2290
2404
  let angle0 = -Math.PI / 2;
2291
2405
  return values.map((v, i) => {
@@ -2314,13 +2428,13 @@ var PieDonutChart = import_react5.default.memo(
2314
2428
  angle0 = endAngle;
2315
2429
  return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}` };
2316
2430
  });
2317
- }, [values, total, innerR, labels]);
2318
- 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: [
2319
2433
  /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2320
2434
  "path",
2321
2435
  {
2322
2436
  d: s.d,
2323
- fill: palette[i % palette.length],
2437
+ fill: PIE_COLORS[(i + colorOffset) % PIE_COLORS.length],
2324
2438
  className: "chart-slice",
2325
2439
  onMouseEnter: (e) => onHover(e, `${s.label}: ${s.v} (${s.pct}%)`),
2326
2440
  onMouseMove: onMove,
@@ -2332,22 +2446,42 @@ var PieDonutChart = import_react5.default.memo(
2332
2446
  }
2333
2447
  );
2334
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
+ };
2335
2473
  var Chart = (props) => {
2336
2474
  const { type, data, labels, tooltip: showTooltip = true } = props;
2337
2475
  const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
2476
+ const { width, height } = useChartSize(containerRef);
2477
+ const ready = width > 0 && height > 0;
2338
2478
  return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
2339
- type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2340
- type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2341
- type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
2342
- type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data, labels, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
2343
- tooltip.visible && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
2344
- "div",
2345
- {
2346
- className: "chart-tooltip",
2347
- style: { left: tooltip.x, top: tooltip.y },
2348
- children: tooltip.content
2349
- }
2350
- )
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 })
2351
2485
  ] });
2352
2486
  };
2353
2487
  Chart.displayName = "Chart";
@@ -2599,42 +2733,66 @@ var PasswordInput = import_react8.default.forwardRef(
2599
2733
  PasswordInput.displayName = "PasswordInput";
2600
2734
  var PasswordInput_default = PasswordInput;
2601
2735
 
2602
- // src/tokens/hooks/useClickOutside.ts
2736
+ // src/components/Modal/Modal.tsx
2603
2737
  var import_react9 = __toESM(require("react"), 1);
2604
- 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);
2605
2745
  import_react9.default.useEffect(() => {
2606
- if (!enabled) return;
2607
- const refArray = Array.isArray(refs) ? refs : [refs];
2608
- const listener = (event) => {
2609
- const target = event.target;
2610
- const isInside = refArray.some(
2611
- (ref) => ref.current && ref.current.contains(target)
2612
- );
2613
- if (!isInside) {
2614
- 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
+ )
2615
2774
  }
2616
- };
2617
- document.addEventListener("mousedown", listener);
2618
- document.addEventListener("touchstart", listener);
2619
- return () => {
2620
- document.removeEventListener("mousedown", listener);
2621
- document.removeEventListener("touchstart", listener);
2622
- };
2623
- }, [refs, handler, enabled]);
2775
+ ),
2776
+ document.body
2777
+ );
2624
2778
  };
2625
- var useClickOutside_default = useClickOutside;
2779
+ Modal.displayName = "Modal";
2780
+ var Modal_default = Modal;
2626
2781
 
2627
2782
  // src/components/DatePicker/SingleDatePicker/index.tsx
2628
2783
  var import_react10 = __toESM(require("react"), 1);
2629
- var import_jsx_runtime311 = require("react/jsx-runtime");
2784
+ var import_jsx_runtime312 = require("react/jsx-runtime");
2630
2785
  var DayCell2 = import_react10.default.memo(
2631
2786
  ({
2632
2787
  day,
2633
2788
  disabled,
2634
2789
  selected,
2635
2790
  highlighted,
2791
+ isStart,
2792
+ isEnd,
2793
+ inRange,
2636
2794
  onSelect
2637
- }) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2795
+ }) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2638
2796
  "button",
2639
2797
  {
2640
2798
  type: "button",
@@ -2642,8 +2800,9 @@ var DayCell2 = import_react10.default.memo(
2642
2800
  "datepicker-day",
2643
2801
  !day.isCurrentMonth && "outside",
2644
2802
  disabled && "disabled",
2645
- selected && "selected",
2803
+ (selected || isStart || isEnd) && "selected",
2646
2804
  highlighted && !selected && "highlighted",
2805
+ inRange && !isStart && !isEnd && "in-range",
2647
2806
  day.isToday && "today",
2648
2807
  day.isSunday && "sunday",
2649
2808
  day.isSaturday && "saturday"
@@ -2655,7 +2814,7 @@ var DayCell2 = import_react10.default.memo(
2655
2814
  children: day.day
2656
2815
  }
2657
2816
  ),
2658
- (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
2659
2818
  );
2660
2819
  DayCell2.displayName = "DayCell";
2661
2820
  var SingleDatePicker = (props) => {
@@ -2665,7 +2824,9 @@ var SingleDatePicker = (props) => {
2665
2824
  minDate,
2666
2825
  maxDate,
2667
2826
  highlightDates = [],
2668
- locale = "ko"
2827
+ locale = "ko",
2828
+ rangeStart,
2829
+ rangeEnd
2669
2830
  } = props;
2670
2831
  const initialYear = value?.getFullYear();
2671
2832
  const initialMonth = value?.getMonth();
@@ -2713,6 +2874,8 @@ var SingleDatePicker = (props) => {
2713
2874
  else if (pickerMode === "months") {
2714
2875
  setYearRangeStart(Math.floor(year / 12) * 12);
2715
2876
  setPickerMode("years");
2877
+ } else {
2878
+ setPickerMode("days");
2716
2879
  }
2717
2880
  };
2718
2881
  const handleMonthSelect = (m) => {
@@ -2726,71 +2889,80 @@ var SingleDatePicker = (props) => {
2726
2889
  const weekdays = WEEKDAY_LABELS[locale];
2727
2890
  const monthLabels = MONTH_LABELS[locale];
2728
2891
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
2729
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
2892
+ const hasRange = rangeStart != null && rangeEnd != null;
2893
+ return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
2730
2894
  "div",
2731
2895
  {
2732
2896
  className: clsx_default("lib-xplat-datepicker", "single"),
2733
2897
  children: [
2734
- /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: "datepicker-header", children: [
2735
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(ChevronLeftIcon_default, {}) }),
2736
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
2737
- /* @__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, {}) })
2738
2902
  ] }),
2739
- pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
2740
- const y = yearRangeStart + i;
2741
- 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)(
2742
2918
  "button",
2743
2919
  {
2744
2920
  type: "button",
2745
- className: clsx_default("datepicker-picker-cell", y === year && "active"),
2746
- onClick: () => handleYearSelect(y),
2747
- children: y
2748
- },
2749
- y
2750
- );
2751
- }) }),
2752
- pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2753
- "button",
2754
- {
2755
- type: "button",
2756
- className: clsx_default("datepicker-picker-cell", i === month && "active"),
2757
- onClick: () => handleMonthSelect(i),
2758
- children: label
2759
- },
2760
- i
2761
- )) }),
2762
- pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_jsx_runtime311.Fragment, { children: [
2763
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2764
- "div",
2765
- {
2766
- className: clsx_default(
2767
- "datepicker-weekday",
2768
- i === 0 && "sunday",
2769
- i === 6 && "saturday"
2770
- ),
2921
+ className: clsx_default("datepicker-picker-cell", i === month && "active"),
2922
+ onClick: () => handleMonthSelect(i),
2771
2923
  children: label
2772
2924
  },
2773
- label
2925
+ i
2774
2926
  )) }),
2775
- /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
2776
- const t = day.date.getTime();
2777
- const disabled = t < minTime || t > maxTime;
2778
- const selected = value ? isSameDay(day.date, value) : false;
2779
- const highlighted = highlightSet.has(
2780
- `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
2781
- );
2782
- return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
2783
- 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",
2784
2930
  {
2785
- day,
2786
- disabled,
2787
- selected,
2788
- highlighted,
2789
- onSelect: handleSelect
2931
+ className: clsx_default(
2932
+ "datepicker-weekday",
2933
+ i === 0 && "sunday",
2934
+ i === 6 && "saturday"
2935
+ ),
2936
+ children: label
2790
2937
  },
2791
- idx
2792
- );
2793
- }) })
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
+ ] })
2794
2966
  ] })
2795
2967
  ]
2796
2968
  }
@@ -2800,7 +2972,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
2800
2972
  var SingleDatePicker_default = SingleDatePicker;
2801
2973
 
2802
2974
  // src/components/DatePicker/InputDatePicker/index.tsx
2803
- var import_jsx_runtime312 = require("react/jsx-runtime");
2975
+ var import_jsx_runtime313 = require("react/jsx-runtime");
2804
2976
  var formatDate = (date) => {
2805
2977
  if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
2806
2978
  const y = date.getFullYear();
@@ -2809,137 +2981,131 @@ var formatDate = (date) => {
2809
2981
  return `${y}/${m}/${d}`;
2810
2982
  };
2811
2983
  var InputDatePicker = (props) => {
2812
- const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
2984
+ const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
2813
2985
  const [isOpen, setIsOpen] = import_react11.default.useState(false);
2814
- const containerRef = import_react11.default.useRef(null);
2815
- const calendarRef = import_react11.default.useRef(null);
2816
- 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
+ };
2817
2992
  const handleSelect = (date) => {
2818
- if (!date) return;
2819
- onChange?.(date);
2993
+ if (date) setTempDate(date);
2994
+ };
2995
+ const handleApply = () => {
2996
+ onChange?.(tempDate);
2820
2997
  setIsOpen(false);
2821
2998
  };
2822
- return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
2823
- "div",
2824
- {
2825
- className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
2826
- ref: containerRef,
2827
- children: [
2828
- /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2829
- "div",
2830
- {
2831
- className: "input-datepicker-trigger",
2832
- onClick: () => !disabled && setIsOpen((o) => !o),
2833
- children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2834
- Input_default,
2835
- {
2836
- value: formatDate(value),
2837
- placeholder,
2838
- suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CalenderIcon_default, {}),
2839
- disabled,
2840
- readOnly: true
2841
- }
2842
- )
2843
- }
2844
- ),
2845
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
2846
- SingleDatePicker_default,
2847
- {
2848
- value: value ?? /* @__PURE__ */ new Date(),
2849
- onChange: handleSelect,
2850
- minDate,
2851
- maxDate,
2852
- locale
2853
- }
2854
- ) })
2855
- ]
2856
- }
2857
- );
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
+ ] });
2858
3030
  };
2859
3031
  InputDatePicker.displayName = "InputDatePicker";
2860
3032
  var InputDatePicker_default = InputDatePicker;
2861
3033
 
2862
3034
  // src/components/DatePicker/PopupPicker/index.tsx
2863
- var import_react14 = __toESM(require("react"), 1);
2864
-
2865
- // src/components/Modal/Modal.tsx
2866
- var import_react12 = __toESM(require("react"), 1);
2867
- var import_react_dom = require("react-dom");
2868
- var import_jsx_runtime313 = require("react/jsx-runtime");
2869
- var ANIMATION_DURATION_MS = 200;
2870
- var Modal = (props) => {
2871
- const { isOpen, onClose, children } = props;
2872
- const [mounted, setMounted] = import_react12.default.useState(false);
2873
- const [visible, setVisible] = import_react12.default.useState(false);
2874
- import_react12.default.useEffect(() => {
2875
- if (isOpen) {
2876
- setMounted(true);
2877
- const t2 = setTimeout(() => setVisible(true), 1);
2878
- return () => clearTimeout(t2);
2879
- }
2880
- setVisible(false);
2881
- const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
2882
- return () => clearTimeout(t);
2883
- }, [isOpen]);
2884
- if (typeof document === "undefined") return null;
2885
- if (!mounted) return null;
2886
- const stateClass = visible ? "enter" : "exit";
2887
- return (0, import_react_dom.createPortal)(
2888
- /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
2889
- "div",
2890
- {
2891
- className: clsx_default("lib-xplat-modal", "dim", stateClass),
2892
- onClick: onClose,
2893
- children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
2894
- "div",
2895
- {
2896
- className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
2897
- role: "dialog",
2898
- "aria-modal": "true",
2899
- onClick: (e) => e.stopPropagation(),
2900
- children
2901
- }
2902
- )
2903
- }
2904
- ),
2905
- document.body
2906
- );
2907
- };
2908
- Modal.displayName = "Modal";
2909
- var Modal_default = Modal;
3035
+ var import_react15 = __toESM(require("react"), 1);
2910
3036
 
2911
3037
  // src/components/DatePicker/RangePicker/index.tsx
3038
+ var import_react14 = __toESM(require("react"), 1);
3039
+
3040
+ // src/components/Tab/Tab.tsx
2912
3041
  var import_react13 = __toESM(require("react"), 1);
3042
+
3043
+ // src/components/Tab/TabItem.tsx
3044
+ var import_react12 = __toESM(require("react"), 1);
2913
3045
  var import_jsx_runtime314 = require("react/jsx-runtime");
2914
- var RangeDayCell = import_react13.default.memo(
2915
- ({
2916
- day,
2917
- disabled,
2918
- isStart,
2919
- isEnd,
2920
- inRange,
2921
- onClick
2922
- }) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
2923
- "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",
2924
3050
  {
2925
- type: "button",
2926
- className: clsx_default(
2927
- "datepicker-day",
2928
- !day.isCurrentMonth && "outside",
2929
- disabled && "disabled",
2930
- (isStart || isEnd) && "selected",
2931
- inRange && !isStart && !isEnd && "in-range",
2932
- day.isToday && "today",
2933
- day.isSunday && "sunday",
2934
- day.isSaturday && "saturday"
2935
- ),
2936
- disabled: disabled || !day.isCurrentMonth,
3051
+ ref,
3052
+ className: clsx_default("tab-item", isActive ? "active" : null),
2937
3053
  onClick,
2938
- children: day.day
3054
+ children: title
2939
3055
  }
2940
- )
2941
- );
2942
- 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");
2943
3109
  var RangePicker = (props) => {
2944
3110
  const {
2945
3111
  startDate,
@@ -2949,139 +3115,92 @@ var RangePicker = (props) => {
2949
3115
  maxDate,
2950
3116
  locale = "ko"
2951
3117
  } = props;
2952
- const [activeTab, setActiveTab] = import_react13.default.useState("start");
2953
- const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
2954
- const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
2955
- const isDisabled = (date, type) => {
2956
- const d = date.getTime();
2957
- if (minDate) {
2958
- const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime();
2959
- if (d < min) return true;
2960
- }
2961
- if (maxDate) {
2962
- const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime();
2963
- if (d > max) return true;
2964
- }
2965
- if (type === "end") {
2966
- const start = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate()).getTime();
2967
- if (d < start) return true;
2968
- }
2969
- if (type === "start") {
2970
- const end = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate()).getTime();
2971
- if (d > end) return true;
2972
- }
2973
- 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 });
2974
3123
  };
2975
- const weekdays = WEEKDAY_LABELS[locale];
2976
- const renderCalendar = (cal, type) => {
2977
- const label = type === "start" ? locale === "ko" ? "\uC2DC\uC791" : "Start" : locale === "ko" ? "\uC885\uB8CC" : "End";
2978
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panel", children: [
2979
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "datepicker-range-label", children: label }),
2980
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-header", children: [
2981
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
2982
- "button",
2983
- {
2984
- className: "datepicker-nav",
2985
- onClick: cal.goToPrevMonth,
2986
- type: "button",
2987
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronLeftIcon_default, {})
2988
- }
2989
- ),
2990
- /* @__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}` }),
2991
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
2992
- "button",
2993
- {
2994
- className: "datepicker-nav",
2995
- onClick: cal.goToNextMonth,
2996
- type: "button",
2997
- children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronRightIcon_default, {})
2998
- }
2999
- )
3000
- ] }),
3001
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3002
- "div",
3003
- {
3004
- className: clsx_default(
3005
- "datepicker-weekday",
3006
- i === 0 && "sunday",
3007
- i === 6 && "saturday"
3008
- ),
3009
- children: w
3010
- },
3011
- w
3012
- )) }),
3013
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-grid", children: cal.days.map((day, idx) => {
3014
- const disabled = isDisabled(day.date, type);
3015
- const isStart = isSameDay(day.date, startDate);
3016
- const isEnd = isSameDay(day.date, endDate);
3017
- const inRange = isInRange(day.date, startDate, endDate);
3018
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3019
- RangeDayCell,
3020
- {
3021
- day,
3022
- disabled,
3023
- isStart,
3024
- isEnd,
3025
- inRange,
3026
- onClick: () => {
3027
- if (!disabled && day.isCurrentMonth) {
3028
- if (type === "start") {
3029
- const newStart = day.date > endDate ? endDate : day.date;
3030
- onChange?.({ startDate: newStart, endDate });
3031
- } else {
3032
- const newEnd = day.date < startDate ? startDate : day.date;
3033
- onChange?.({ startDate, endDate: newEnd });
3034
- }
3035
- }
3036
- }
3037
- },
3038
- idx
3039
- );
3040
- }) })
3041
- ] });
3124
+ const handleEndChange = (date) => {
3125
+ if (!date) return;
3126
+ const newEnd = date < startDate ? startDate : date;
3127
+ onChange?.({ startDate, endDate: newEnd });
3042
3128
  };
3043
- return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
3044
- "div",
3045
- {
3046
- className: clsx_default("lib-xplat-datepicker", "range"),
3047
- children: [
3048
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-tabs", children: [
3049
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3050
- "button",
3051
- {
3052
- type: "button",
3053
- className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
3054
- onClick: () => setActiveTab("start"),
3055
- children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
3056
- }
3057
- ),
3058
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
3059
- "button",
3060
- {
3061
- type: "button",
3062
- className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
3063
- onClick: () => setActiveTab("end"),
3064
- children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
3065
- }
3066
- )
3067
- ] }),
3068
- /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-range-panels", children: [
3069
- renderCalendar(startCal, "start"),
3070
- renderCalendar(endCal, "end")
3071
- ] }),
3072
- /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
3073
- ]
3074
- }
3075
- );
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
+ ] });
3076
3195
  };
3077
3196
  RangePicker.displayName = "RangePicker";
3078
3197
  var RangePicker_default = RangePicker;
3079
3198
 
3080
3199
  // src/components/DatePicker/PopupPicker/index.tsx
3081
- var import_jsx_runtime315 = require("react/jsx-runtime");
3200
+ var import_jsx_runtime317 = require("react/jsx-runtime");
3082
3201
  var PopupPicker = (props) => {
3083
3202
  const { component, type, locale } = props;
3084
- const [isOpen, setIsOpen] = import_react14.default.useState(false);
3203
+ const [isOpen, setIsOpen] = import_react15.default.useState(false);
3085
3204
  const handleClick = () => setIsOpen(true);
3086
3205
  const handleClose = () => setIsOpen(false);
3087
3206
  const handleSingleChange = (date) => {
@@ -3089,11 +3208,11 @@ var PopupPicker = (props) => {
3089
3208
  props.onChange?.(date);
3090
3209
  handleClose();
3091
3210
  };
3092
- return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
3093
- import_react14.default.cloneElement(component, { onClick: handleClick }),
3094
- /* @__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: [
3095
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-content", children: [
3096
- 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)(
3097
3216
  SingleDatePicker_default,
3098
3217
  {
3099
3218
  value: props.value,
@@ -3103,7 +3222,7 @@ var PopupPicker = (props) => {
3103
3222
  locale
3104
3223
  }
3105
3224
  ),
3106
- type === "range" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
3225
+ type === "range" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3107
3226
  RangePicker_default,
3108
3227
  {
3109
3228
  startDate: props.startDate,
@@ -3115,8 +3234,8 @@ var PopupPicker = (props) => {
3115
3234
  }
3116
3235
  )
3117
3236
  ] }),
3118
- /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-footer", children: [
3119
- /* @__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)(
3120
3239
  Button_default,
3121
3240
  {
3122
3241
  type: "secondary",
@@ -3124,7 +3243,7 @@ var PopupPicker = (props) => {
3124
3243
  children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
3125
3244
  }
3126
3245
  ),
3127
- /* @__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" })
3128
3247
  ] })
3129
3248
  ] }) })
3130
3249
  ] });
@@ -3133,10 +3252,10 @@ PopupPicker.displayName = "PopupPicker";
3133
3252
  var PopupPicker_default = PopupPicker;
3134
3253
 
3135
3254
  // src/components/Divider/Divider.tsx
3136
- var import_jsx_runtime316 = require("react/jsx-runtime");
3255
+ var import_jsx_runtime318 = require("react/jsx-runtime");
3137
3256
  var Divider = (props) => {
3138
3257
  const { orientation = "horizontal" } = props;
3139
- return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
3258
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3140
3259
  "div",
3141
3260
  {
3142
3261
  className: clsx_default("lib-xplat-divider", orientation),
@@ -3149,15 +3268,15 @@ Divider.displayName = "Divider";
3149
3268
  var Divider_default = Divider;
3150
3269
 
3151
3270
  // src/components/Drawer/Drawer.tsx
3152
- var import_react15 = __toESM(require("react"), 1);
3271
+ var import_react16 = __toESM(require("react"), 1);
3153
3272
  var import_react_dom2 = require("react-dom");
3154
- var import_jsx_runtime317 = require("react/jsx-runtime");
3273
+ var import_jsx_runtime319 = require("react/jsx-runtime");
3155
3274
  var ANIMATION_DURATION_MS2 = 250;
3156
3275
  var Drawer = (props) => {
3157
3276
  const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
3158
- const [mounted, setMounted] = import_react15.default.useState(false);
3159
- const [visible, setVisible] = import_react15.default.useState(false);
3160
- 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(() => {
3161
3280
  if (isOpen) {
3162
3281
  setMounted(true);
3163
3282
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3172,12 +3291,12 @@ var Drawer = (props) => {
3172
3291
  const stateClass = visible ? "enter" : "exit";
3173
3292
  const widthValue = typeof width === "number" ? `${width}px` : width;
3174
3293
  return (0, import_react_dom2.createPortal)(
3175
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
3294
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
3176
3295
  "div",
3177
3296
  {
3178
3297
  className: clsx_default("lib-xplat-drawer-overlay", stateClass),
3179
3298
  onClick: onClose,
3180
- children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
3299
+ children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
3181
3300
  "div",
3182
3301
  {
3183
3302
  className: clsx_default("lib-xplat-drawer", placement, stateClass),
@@ -3186,11 +3305,11 @@ var Drawer = (props) => {
3186
3305
  "aria-modal": "true",
3187
3306
  onClick: (e) => e.stopPropagation(),
3188
3307
  children: [
3189
- title && /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: "drawer-header", children: [
3190
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", { className: "drawer-title", children: title }),
3191
- /* @__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" })
3192
3311
  ] }),
3193
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "drawer-body", children })
3312
+ /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "drawer-body", children })
3194
3313
  ]
3195
3314
  }
3196
3315
  )
@@ -3203,16 +3322,16 @@ Drawer.displayName = "Drawer";
3203
3322
  var Drawer_default = Drawer;
3204
3323
 
3205
3324
  // src/components/Dropdown/Dropdown.tsx
3206
- var import_react17 = __toESM(require("react"), 1);
3325
+ var import_react19 = __toESM(require("react"), 1);
3207
3326
 
3208
3327
  // src/tokens/hooks/useAutoPosition.ts
3209
- var import_react16 = __toESM(require("react"), 1);
3328
+ var import_react17 = __toESM(require("react"), 1);
3210
3329
  var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3211
- const [position, setPosition] = import_react16.default.useState({
3330
+ const [position, setPosition] = import_react17.default.useState({
3212
3331
  position: {},
3213
3332
  direction: "bottom"
3214
3333
  });
3215
- const calculatePosition = import_react16.default.useCallback(() => {
3334
+ const calculatePosition = import_react17.default.useCallback(() => {
3216
3335
  if (!triggerRef.current || !popRef.current) return;
3217
3336
  const triggerRect = triggerRef.current.getBoundingClientRect();
3218
3337
  const popRect = popRef.current.getBoundingClientRect();
@@ -3234,7 +3353,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3234
3353
  direction
3235
3354
  });
3236
3355
  }, [triggerRef, popRef]);
3237
- import_react16.default.useEffect(() => {
3356
+ import_react17.default.useEffect(() => {
3238
3357
  calculatePosition();
3239
3358
  window.addEventListener("resize", calculatePosition);
3240
3359
  return () => window.removeEventListener("resize", calculatePosition);
@@ -3243,18 +3362,43 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
3243
3362
  };
3244
3363
  var useAutoPosition_default = useAutoPosition;
3245
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
+
3246
3390
  // src/components/Dropdown/Dropdown.tsx
3247
- var import_jsx_runtime318 = require("react/jsx-runtime");
3391
+ var import_jsx_runtime320 = require("react/jsx-runtime");
3248
3392
  var Dropdown = (props) => {
3249
3393
  const { items, children } = props;
3250
- const [isOpen, setIsOpen] = import_react17.default.useState(false);
3251
- const [mounted, setMounted] = import_react17.default.useState(false);
3252
- const [visible, setVisible] = import_react17.default.useState(false);
3253
- const triggerRef = import_react17.default.useRef(null);
3254
- 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);
3255
3399
  const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
3256
3400
  useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
3257
- import_react17.default.useEffect(() => {
3401
+ import_react19.default.useEffect(() => {
3258
3402
  if (isOpen) {
3259
3403
  setMounted(true);
3260
3404
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3269,8 +3413,8 @@ var Dropdown = (props) => {
3269
3413
  item.onClick?.();
3270
3414
  setIsOpen(false);
3271
3415
  };
3272
- return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: "lib-xplat-dropdown", children: [
3273
- /* @__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)(
3274
3418
  "div",
3275
3419
  {
3276
3420
  ref: triggerRef,
@@ -3279,14 +3423,14 @@ var Dropdown = (props) => {
3279
3423
  children
3280
3424
  }
3281
3425
  ),
3282
- mounted && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3426
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3283
3427
  "div",
3284
3428
  {
3285
3429
  ref: menuRef,
3286
3430
  className: clsx_default("dropdown-menu", direction, { visible }),
3287
3431
  style: { top: position.top, left: position.left },
3288
3432
  role: "menu",
3289
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
3433
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3290
3434
  "button",
3291
3435
  {
3292
3436
  className: clsx_default("dropdown-item", {
@@ -3308,23 +3452,23 @@ Dropdown.displayName = "Dropdown";
3308
3452
  var Dropdown_default = Dropdown;
3309
3453
 
3310
3454
  // src/components/EmptyState/EmptyState.tsx
3311
- var import_jsx_runtime319 = require("react/jsx-runtime");
3455
+ var import_jsx_runtime321 = require("react/jsx-runtime");
3312
3456
  var EmptyState = (props) => {
3313
3457
  const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
3314
- return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-empty-state", children: [
3315
- icon && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "empty-icon", children: icon }),
3316
- !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" }) }) }),
3317
- /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-title", children: title }),
3318
- description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("p", { className: "empty-description", children: description }),
3319
- 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 })
3320
3464
  ] });
3321
3465
  };
3322
3466
  EmptyState.displayName = "EmptyState";
3323
3467
  var EmptyState_default = EmptyState;
3324
3468
 
3325
3469
  // src/components/FileUpload/FileUpload.tsx
3326
- var import_react18 = __toESM(require("react"), 1);
3327
- 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");
3328
3472
  var FileUpload = (props) => {
3329
3473
  const {
3330
3474
  accept,
@@ -3334,8 +3478,8 @@ var FileUpload = (props) => {
3334
3478
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
3335
3479
  description
3336
3480
  } = props;
3337
- const [isDragOver, setIsDragOver] = import_react18.default.useState(false);
3338
- const inputRef = import_react18.default.useRef(null);
3481
+ const [isDragOver, setIsDragOver] = import_react20.default.useState(false);
3482
+ const inputRef = import_react20.default.useRef(null);
3339
3483
  const handleFiles = (fileList) => {
3340
3484
  let files = Array.from(fileList);
3341
3485
  if (maxSize) {
@@ -3365,7 +3509,7 @@ var FileUpload = (props) => {
3365
3509
  handleFiles(e.target.files);
3366
3510
  }
3367
3511
  };
3368
- return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)(
3512
+ return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
3369
3513
  "div",
3370
3514
  {
3371
3515
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -3374,7 +3518,7 @@ var FileUpload = (props) => {
3374
3518
  onDragLeave: handleDragLeave,
3375
3519
  onClick: () => inputRef.current?.click(),
3376
3520
  children: [
3377
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
3521
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
3378
3522
  "input",
3379
3523
  {
3380
3524
  ref: inputRef,
@@ -3384,9 +3528,9 @@ var FileUpload = (props) => {
3384
3528
  onChange: handleChange
3385
3529
  }
3386
3530
  ),
3387
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(UploadIcon_default, {}) }),
3388
- /* @__PURE__ */ (0, import_jsx_runtime320.jsx)("p", { className: "upload-label", children: label }),
3389
- 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 })
3390
3534
  ]
3391
3535
  }
3392
3536
  );
@@ -3395,10 +3539,10 @@ FileUpload.displayName = "FileUpload";
3395
3539
  var FileUpload_default = FileUpload;
3396
3540
 
3397
3541
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
3398
- var import_react20 = __toESM(require("react"), 1);
3542
+ var import_react22 = __toESM(require("react"), 1);
3399
3543
 
3400
3544
  // src/components/HtmlTypeWriter/utils.ts
3401
- var import_react19 = __toESM(require("react"), 1);
3545
+ var import_react21 = __toESM(require("react"), 1);
3402
3546
  var voidTags = /* @__PURE__ */ new Set([
3403
3547
  "br",
3404
3548
  "img",
@@ -3466,41 +3610,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
3466
3610
  props[attr.name] = attr.value;
3467
3611
  });
3468
3612
  if (voidTags.has(tag)) {
3469
- return import_react19.default.createElement(tag, props);
3613
+ return import_react21.default.createElement(tag, props);
3470
3614
  }
3471
3615
  const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
3472
- return import_react19.default.createElement(tag, props, ...children);
3616
+ return import_react21.default.createElement(tag, props, ...children);
3473
3617
  };
3474
3618
  var htmlToReactProgressive = (root, typedLen, rangeMap) => {
3475
3619
  const nodes = Array.from(root.childNodes).map((child, idx) => {
3476
3620
  const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
3477
- 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);
3478
3622
  }).filter(Boolean);
3479
3623
  return nodes.length === 0 ? null : nodes;
3480
3624
  };
3481
3625
 
3482
3626
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
3483
- var import_jsx_runtime321 = require("react/jsx-runtime");
3627
+ var import_jsx_runtime323 = require("react/jsx-runtime");
3484
3628
  var HtmlTypeWriter = ({
3485
3629
  html,
3486
3630
  duration = 20,
3487
3631
  onDone,
3488
3632
  onChange
3489
3633
  }) => {
3490
- const [typedLen, setTypedLen] = import_react20.default.useState(0);
3491
- const doneCalledRef = import_react20.default.useRef(false);
3492
- 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(() => {
3493
3637
  if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
3494
3638
  const decoded = decodeHtmlEntities(html);
3495
3639
  const doc2 = new DOMParser().parseFromString(decoded, "text/html");
3496
3640
  const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
3497
3641
  return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
3498
3642
  }, [html]);
3499
- import_react20.default.useEffect(() => {
3643
+ import_react22.default.useEffect(() => {
3500
3644
  setTypedLen(0);
3501
3645
  doneCalledRef.current = false;
3502
3646
  }, [html]);
3503
- import_react20.default.useEffect(() => {
3647
+ import_react22.default.useEffect(() => {
3504
3648
  if (!totalLength) return;
3505
3649
  if (typedLen >= totalLength) return;
3506
3650
  const timer = window.setInterval(() => {
@@ -3508,33 +3652,33 @@ var HtmlTypeWriter = ({
3508
3652
  }, duration);
3509
3653
  return () => window.clearInterval(timer);
3510
3654
  }, [typedLen, totalLength, duration]);
3511
- import_react20.default.useEffect(() => {
3655
+ import_react22.default.useEffect(() => {
3512
3656
  if (typedLen > 0 && typedLen < totalLength) {
3513
3657
  onChange?.();
3514
3658
  }
3515
3659
  }, [typedLen, totalLength, onChange]);
3516
- import_react20.default.useEffect(() => {
3660
+ import_react22.default.useEffect(() => {
3517
3661
  if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
3518
3662
  doneCalledRef.current = true;
3519
3663
  onDone?.();
3520
3664
  }
3521
3665
  }, [typedLen, totalLength, onDone]);
3522
- const parsed = import_react20.default.useMemo(
3666
+ const parsed = import_react22.default.useMemo(
3523
3667
  () => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
3524
3668
  [doc, typedLen, rangeMap]
3525
3669
  );
3526
- 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 });
3527
3671
  };
3528
3672
  HtmlTypeWriter.displayName = "HtmlTypeWriter";
3529
3673
  var HtmlTypeWriter_default = HtmlTypeWriter;
3530
3674
 
3531
3675
  // src/components/ImageSelector/ImageSelector.tsx
3532
- var import_react21 = __toESM(require("react"), 1);
3533
- 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");
3534
3678
  var ImageSelector = (props) => {
3535
3679
  const { value, label, onChange } = props;
3536
- const [previewUrl, setPreviewUrl] = import_react21.default.useState();
3537
- import_react21.default.useEffect(() => {
3680
+ const [previewUrl, setPreviewUrl] = import_react23.default.useState();
3681
+ import_react23.default.useEffect(() => {
3538
3682
  if (!value) {
3539
3683
  setPreviewUrl(void 0);
3540
3684
  return;
@@ -3543,7 +3687,7 @@ var ImageSelector = (props) => {
3543
3687
  setPreviewUrl(url);
3544
3688
  return () => URL.revokeObjectURL(url);
3545
3689
  }, [value]);
3546
- const inputRef = import_react21.default.useRef(null);
3690
+ const inputRef = import_react23.default.useRef(null);
3547
3691
  const handleFileChange = (e) => {
3548
3692
  const selectedFile = e.target.files?.[0];
3549
3693
  if (selectedFile) {
@@ -3556,8 +3700,8 @@ var ImageSelector = (props) => {
3556
3700
  const handleOpenFileDialog = () => {
3557
3701
  inputRef.current?.click();
3558
3702
  };
3559
- return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
3560
- /* @__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)(
3561
3705
  "input",
3562
3706
  {
3563
3707
  type: "file",
@@ -3567,13 +3711,13 @@ var ImageSelector = (props) => {
3567
3711
  ref: inputRef
3568
3712
  }
3569
3713
  ),
3570
- value && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "action-bar", children: [
3571
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(UploadIcon_default, {}) }),
3572
- /* @__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, {}) })
3573
3717
  ] }),
3574
- /* @__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: [
3575
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ImageIcon_default, {}) }),
3576
- /* @__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" })
3577
3721
  ] }) })
3578
3722
  ] });
3579
3723
  };
@@ -3581,7 +3725,7 @@ ImageSelector.displayName = "ImageSelector";
3581
3725
  var ImageSelector_default = ImageSelector;
3582
3726
 
3583
3727
  // src/components/Pagination/Pagination.tsx
3584
- var import_jsx_runtime323 = require("react/jsx-runtime");
3728
+ var import_jsx_runtime325 = require("react/jsx-runtime");
3585
3729
  var getPageRange = (current, totalPages, siblingCount) => {
3586
3730
  const totalNumbers = siblingCount * 2 + 5;
3587
3731
  if (totalPages <= totalNumbers) {
@@ -3624,19 +3768,19 @@ var Pagination = (props) => {
3624
3768
  onChange?.(page);
3625
3769
  }
3626
3770
  };
3627
- 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: [
3628
- /* @__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)(
3629
3773
  "button",
3630
3774
  {
3631
3775
  className: "page-btn prev",
3632
3776
  disabled: current <= 1,
3633
3777
  onClick: () => handleClick(current - 1),
3634
3778
  "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
3635
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronLeftIcon_default, {})
3779
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronLeftIcon_default, {})
3636
3780
  }
3637
3781
  ),
3638
3782
  pages.map(
3639
- (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)(
3640
3784
  "button",
3641
3785
  {
3642
3786
  className: clsx_default("page-btn", { active: page === current }),
@@ -3647,14 +3791,14 @@ var Pagination = (props) => {
3647
3791
  page
3648
3792
  )
3649
3793
  ),
3650
- /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
3794
+ /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3651
3795
  "button",
3652
3796
  {
3653
3797
  className: "page-btn next",
3654
3798
  disabled: current >= totalPages,
3655
3799
  onClick: () => handleClick(current + 1),
3656
3800
  "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
3657
- children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ChevronRightIcon_default, {})
3801
+ children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ChevronRightIcon_default, {})
3658
3802
  }
3659
3803
  )
3660
3804
  ] });
@@ -3663,17 +3807,17 @@ Pagination.displayName = "Pagination";
3663
3807
  var Pagination_default = Pagination;
3664
3808
 
3665
3809
  // src/components/PopOver/PopOver.tsx
3666
- var import_react22 = __toESM(require("react"), 1);
3667
- 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");
3668
3812
  var PopOver = (props) => {
3669
3813
  const { children, isOpen, onClose, PopOverEl } = props;
3670
- const popRef = import_react22.default.useRef(null);
3671
- const triggerRef = import_react22.default.useRef(null);
3672
- const [localOpen, setLocalOpen] = import_react22.default.useState(false);
3673
- 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);
3674
3818
  useClickOutside_default([popRef, triggerRef], onClose, isOpen);
3675
3819
  const position = useAutoPosition_default(triggerRef, popRef, localOpen);
3676
- import_react22.default.useEffect(() => {
3820
+ import_react24.default.useEffect(() => {
3677
3821
  if (isOpen) {
3678
3822
  setLocalOpen(isOpen);
3679
3823
  setTimeout(() => {
@@ -3686,7 +3830,7 @@ var PopOver = (props) => {
3686
3830
  }, 200);
3687
3831
  }
3688
3832
  }, [isOpen]);
3689
- return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
3833
+ return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
3690
3834
  "div",
3691
3835
  {
3692
3836
  className: "lib-xplat-pop-over",
@@ -3696,7 +3840,7 @@ var PopOver = (props) => {
3696
3840
  },
3697
3841
  children: [
3698
3842
  children,
3699
- localOpen && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
3843
+ localOpen && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
3700
3844
  "div",
3701
3845
  {
3702
3846
  className: clsx_default(
@@ -3719,7 +3863,7 @@ PopOver.displayName = "PopOver";
3719
3863
  var PopOver_default = PopOver;
3720
3864
 
3721
3865
  // src/components/Progress/Progress.tsx
3722
- var import_jsx_runtime325 = require("react/jsx-runtime");
3866
+ var import_jsx_runtime327 = require("react/jsx-runtime");
3723
3867
  var Progress = (props) => {
3724
3868
  const {
3725
3869
  value,
@@ -3729,8 +3873,8 @@ var Progress = (props) => {
3729
3873
  showLabel = false
3730
3874
  } = props;
3731
3875
  const percentage = Math.min(100, Math.max(0, value / max * 100));
3732
- return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
3733
- /* @__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)(
3734
3878
  "div",
3735
3879
  {
3736
3880
  className: "track",
@@ -3738,7 +3882,7 @@ var Progress = (props) => {
3738
3882
  "aria-valuenow": value,
3739
3883
  "aria-valuemin": 0,
3740
3884
  "aria-valuemax": max,
3741
- children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
3885
+ children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
3742
3886
  "div",
3743
3887
  {
3744
3888
  className: "bar",
@@ -3747,7 +3891,7 @@ var Progress = (props) => {
3747
3891
  )
3748
3892
  }
3749
3893
  ),
3750
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("span", { className: "label", children: [
3894
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("span", { className: "label", children: [
3751
3895
  Math.round(percentage),
3752
3896
  "%"
3753
3897
  ] })
@@ -3757,17 +3901,17 @@ Progress.displayName = "Progress";
3757
3901
  var Progress_default = Progress;
3758
3902
 
3759
3903
  // src/components/Radio/RadioGroupContext.tsx
3760
- var import_react23 = __toESM(require("react"), 1);
3761
- var RadioGroupContext = import_react23.default.createContext(
3904
+ var import_react25 = __toESM(require("react"), 1);
3905
+ var RadioGroupContext = import_react25.default.createContext(
3762
3906
  null
3763
3907
  );
3764
3908
  var useRadioGroupContext = () => {
3765
- return import_react23.default.useContext(RadioGroupContext);
3909
+ return import_react25.default.useContext(RadioGroupContext);
3766
3910
  };
3767
3911
  var RadioGroupContext_default = RadioGroupContext;
3768
3912
 
3769
3913
  // src/components/Radio/Radio.tsx
3770
- var import_jsx_runtime326 = require("react/jsx-runtime");
3914
+ var import_jsx_runtime328 = require("react/jsx-runtime");
3771
3915
  var Radio = (props) => {
3772
3916
  const {
3773
3917
  label,
@@ -3785,7 +3929,7 @@ var Radio = (props) => {
3785
3929
  value,
3786
3930
  onChange: rest.onChange
3787
3931
  };
3788
- return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
3932
+ return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
3789
3933
  "label",
3790
3934
  {
3791
3935
  className: clsx_default(
@@ -3795,18 +3939,18 @@ var Radio = (props) => {
3795
3939
  localChecked ? "checked" : void 0
3796
3940
  ),
3797
3941
  children: [
3798
- /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
3799
- /* @__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)(
3800
3944
  "div",
3801
3945
  {
3802
3946
  className: clsx_default(
3803
3947
  "circle",
3804
3948
  localChecked ? "checked" : void 0
3805
3949
  ),
3806
- 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" })
3807
3951
  }
3808
3952
  ),
3809
- label && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("span", { children: label })
3953
+ label && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("span", { children: label })
3810
3954
  ]
3811
3955
  }
3812
3956
  );
@@ -3815,28 +3959,28 @@ Radio.displayName = "Radio";
3815
3959
  var Radio_default = Radio;
3816
3960
 
3817
3961
  // src/components/Radio/RadioGroup.tsx
3818
- var import_jsx_runtime327 = require("react/jsx-runtime");
3962
+ var import_jsx_runtime329 = require("react/jsx-runtime");
3819
3963
  var RadioGroup = (props) => {
3820
3964
  const { children, ...rest } = props;
3821
- 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 }) });
3822
3966
  };
3823
3967
  RadioGroup.displayName = "RadioGroup";
3824
3968
  var RadioGroup_default = RadioGroup;
3825
3969
 
3826
3970
  // src/components/Select/Select.tsx
3827
- var import_react26 = __toESM(require("react"), 1);
3971
+ var import_react28 = __toESM(require("react"), 1);
3828
3972
 
3829
3973
  // src/components/Select/context.ts
3830
- var import_react24 = __toESM(require("react"), 1);
3831
- var SelectContext = import_react24.default.createContext(null);
3974
+ var import_react26 = __toESM(require("react"), 1);
3975
+ var SelectContext = import_react26.default.createContext(null);
3832
3976
  var context_default = SelectContext;
3833
3977
 
3834
3978
  // src/components/Select/SelectItem.tsx
3835
- var import_react25 = __toESM(require("react"), 1);
3836
- 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");
3837
3981
  var SelectItem = (props) => {
3838
3982
  const { children, value, onClick, disabled = false } = props;
3839
- const ctx = import_react25.default.useContext(context_default);
3983
+ const ctx = import_react27.default.useContext(context_default);
3840
3984
  const handleClick = (e) => {
3841
3985
  e.preventDefault();
3842
3986
  e.stopPropagation();
@@ -3845,7 +3989,7 @@ var SelectItem = (props) => {
3845
3989
  ctx?.close();
3846
3990
  onClick?.();
3847
3991
  };
3848
- return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
3992
+ return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
3849
3993
  "div",
3850
3994
  {
3851
3995
  className: clsx_default("select-item", disabled && "disabled"),
@@ -3866,7 +4010,7 @@ SelectItem.displayName = "Select.Item";
3866
4010
  var SelectItem_default = SelectItem;
3867
4011
 
3868
4012
  // src/components/Select/Select.tsx
3869
- var import_jsx_runtime329 = require("react/jsx-runtime");
4013
+ var import_jsx_runtime331 = require("react/jsx-runtime");
3870
4014
  var ANIMATION_DURATION_MS3 = 200;
3871
4015
  var SelectRoot = (props) => {
3872
4016
  const {
@@ -3878,26 +4022,26 @@ var SelectRoot = (props) => {
3878
4022
  error = false,
3879
4023
  size = "md"
3880
4024
  } = props;
3881
- const itemChildren = import_react26.default.Children.toArray(children).filter(
3882
- (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
3883
4027
  );
3884
4028
  const isControlled = valueProp !== void 0;
3885
- const [isOpen, setOpen] = import_react26.default.useState(false);
3886
- const [uncontrolledLabel, setUncontrolledLabel] = import_react26.default.useState(null);
3887
- 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(() => {
3888
4032
  if (!isControlled) return null;
3889
4033
  const match = itemChildren.find((child) => child.props.value === valueProp);
3890
4034
  return match ? match.props.children : null;
3891
4035
  }, [isControlled, valueProp, itemChildren]);
3892
4036
  const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
3893
- const triggerRef = import_react26.default.useRef(null);
3894
- const contentRef = import_react26.default.useRef(null);
3895
- const [mounted, setMounted] = import_react26.default.useState(false);
3896
- const [visible, setVisible] = import_react26.default.useState(false);
3897
- 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(() => {
3898
4042
  if (disabled && isOpen) setOpen(false);
3899
4043
  }, [disabled, isOpen]);
3900
- import_react26.default.useEffect(() => {
4044
+ import_react28.default.useEffect(() => {
3901
4045
  if (isOpen) {
3902
4046
  setMounted(true);
3903
4047
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -3907,12 +4051,12 @@ var SelectRoot = (props) => {
3907
4051
  const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
3908
4052
  return () => clearTimeout(t);
3909
4053
  }, [isOpen]);
3910
- const open = import_react26.default.useCallback(() => setOpen(true), []);
3911
- const close = import_react26.default.useCallback(() => setOpen(false), []);
3912
- 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), []);
3913
4057
  useClickOutside_default([contentRef, triggerRef], close, isOpen);
3914
4058
  const position = useAutoPosition_default(triggerRef, contentRef, mounted);
3915
- const setSelected = import_react26.default.useCallback(
4059
+ const setSelected = import_react28.default.useCallback(
3916
4060
  (label, itemValue) => {
3917
4061
  if (!isControlled) {
3918
4062
  setUncontrolledLabel(label);
@@ -3921,7 +4065,7 @@ var SelectRoot = (props) => {
3921
4065
  },
3922
4066
  [isControlled, onChange]
3923
4067
  );
3924
- const ctxValue = import_react26.default.useMemo(
4068
+ const ctxValue = import_react28.default.useMemo(
3925
4069
  () => ({
3926
4070
  isOpen,
3927
4071
  mounted,
@@ -3942,7 +4086,7 @@ var SelectRoot = (props) => {
3942
4086
  if (disabled) return;
3943
4087
  toggle();
3944
4088
  };
3945
- 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)(
3946
4090
  "div",
3947
4091
  {
3948
4092
  className: clsx_default(
@@ -3953,7 +4097,7 @@ var SelectRoot = (props) => {
3953
4097
  mounted && "is-open"
3954
4098
  ),
3955
4099
  children: [
3956
- /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
4100
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(
3957
4101
  "div",
3958
4102
  {
3959
4103
  ref: triggerRef,
@@ -3977,7 +4121,7 @@ var SelectRoot = (props) => {
3977
4121
  }
3978
4122
  },
3979
4123
  children: [
3980
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4124
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
3981
4125
  "span",
3982
4126
  {
3983
4127
  className: clsx_default(
@@ -3987,18 +4131,18 @@ var SelectRoot = (props) => {
3987
4131
  children: selectedLabel ?? placeholder
3988
4132
  }
3989
4133
  ),
3990
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4134
+ /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
3991
4135
  "span",
3992
4136
  {
3993
4137
  className: clsx_default("select-trigger-icon", isOpen && "open"),
3994
4138
  "aria-hidden": true,
3995
- children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(ChevronDownIcon_default, {})
4139
+ children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ChevronDownIcon_default, {})
3996
4140
  }
3997
4141
  )
3998
4142
  ]
3999
4143
  }
4000
4144
  ),
4001
- mounted && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
4145
+ mounted && /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4002
4146
  "div",
4003
4147
  {
4004
4148
  className: clsx_default("select-content", position.direction, stateClass),
@@ -4019,14 +4163,14 @@ var Select = Object.assign(SelectRoot, {
4019
4163
  var Select_default = Select;
4020
4164
 
4021
4165
  // src/components/Skeleton/Skeleton.tsx
4022
- var import_jsx_runtime330 = require("react/jsx-runtime");
4166
+ var import_jsx_runtime332 = require("react/jsx-runtime");
4023
4167
  var Skeleton = (props) => {
4024
4168
  const { variant = "text", width, height } = props;
4025
4169
  const style = {
4026
4170
  width: typeof width === "number" ? `${width}px` : width,
4027
4171
  height: typeof height === "number" ? `${height}px` : height
4028
4172
  };
4029
- return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
4173
+ return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
4030
4174
  "div",
4031
4175
  {
4032
4176
  className: clsx_default("lib-xplat-skeleton", variant),
@@ -4039,20 +4183,20 @@ Skeleton.displayName = "Skeleton";
4039
4183
  var Skeleton_default = Skeleton;
4040
4184
 
4041
4185
  // src/components/Spinner/Spinner.tsx
4042
- var import_jsx_runtime331 = require("react/jsx-runtime");
4186
+ var import_jsx_runtime333 = require("react/jsx-runtime");
4043
4187
  var Spinner = (props) => {
4044
4188
  const {
4045
4189
  size = "md",
4046
4190
  type = "brand"
4047
4191
  } = props;
4048
- return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4192
+ return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4049
4193
  "div",
4050
4194
  {
4051
4195
  className: clsx_default("lib-xplat-spinner", size, type),
4052
4196
  role: "status",
4053
4197
  "aria-label": "\uB85C\uB529 \uC911",
4054
- children: /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4055
- /* @__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)(
4056
4200
  "circle",
4057
4201
  {
4058
4202
  className: "track",
@@ -4062,7 +4206,7 @@ var Spinner = (props) => {
4062
4206
  strokeWidth: "3"
4063
4207
  }
4064
4208
  ),
4065
- /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
4209
+ /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4066
4210
  "circle",
4067
4211
  {
4068
4212
  className: "indicator",
@@ -4081,20 +4225,20 @@ Spinner.displayName = "Spinner";
4081
4225
  var Spinner_default = Spinner;
4082
4226
 
4083
4227
  // src/components/Steps/Steps.tsx
4084
- var import_jsx_runtime332 = require("react/jsx-runtime");
4228
+ var import_jsx_runtime334 = require("react/jsx-runtime");
4085
4229
  var Steps = (props) => {
4086
4230
  const {
4087
4231
  items,
4088
4232
  current,
4089
4233
  type = "brand"
4090
4234
  } = props;
4091
- 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) => {
4092
4236
  const status = index < current ? "completed" : index === current ? "active" : "pending";
4093
- return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: clsx_default("step-item", status), children: [
4094
- /* @__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 }) }),
4095
- /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: "step-content", children: [
4096
- /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("span", { className: "step-title", children: item.title }),
4097
- 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 })
4098
4242
  ] })
4099
4243
  ] }, index);
4100
4244
  }) });
@@ -4103,8 +4247,8 @@ Steps.displayName = "Steps";
4103
4247
  var Steps_default = Steps;
4104
4248
 
4105
4249
  // src/components/Swiper/Swiper.tsx
4106
- var import_react27 = __toESM(require("react"), 1);
4107
- 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");
4108
4252
  var Swiper = (props) => {
4109
4253
  const {
4110
4254
  auto = false,
@@ -4127,23 +4271,23 @@ var Swiper = (props) => {
4127
4271
  const maxIndex = Math.max(0, totalSlides - viewItemCount);
4128
4272
  const useLoop = loop && canSlide;
4129
4273
  const cloneCount = useLoop ? totalSlides : 0;
4130
- const extendedItems = import_react27.default.useMemo(() => {
4274
+ const extendedItems = import_react29.default.useMemo(() => {
4131
4275
  if (!useLoop) return items;
4132
4276
  return [...items, ...items, ...items];
4133
4277
  }, [items, useLoop]);
4134
4278
  const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
4135
- const [innerIndex, setInnerIndex] = import_react27.default.useState(
4279
+ const [innerIndex, setInnerIndex] = import_react29.default.useState(
4136
4280
  useLoop ? cloneCount + initialIdx : initialIdx
4137
4281
  );
4138
- const [isDragging, setIsDragging] = import_react27.default.useState(false);
4139
- const [dragOffset, setDragOffset] = import_react27.default.useState(0);
4140
- const [animated, setAnimated] = import_react27.default.useState(true);
4141
- const [containerWidth, setContainerWidth] = import_react27.default.useState(0);
4142
- const containerRef = import_react27.default.useRef(null);
4143
- const startXRef = import_react27.default.useRef(0);
4144
- const startTimeRef = import_react27.default.useRef(0);
4145
- const autoplayTimerRef = import_react27.default.useRef(null);
4146
- 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(() => {
4147
4291
  const el = containerRef.current;
4148
4292
  if (!el) return;
4149
4293
  const ro = new ResizeObserver((entries) => {
@@ -4162,7 +4306,7 @@ var Swiper = (props) => {
4162
4306
  return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
4163
4307
  };
4164
4308
  const realIndex = getRealIndex(innerIndex);
4165
- const moveToInner = import_react27.default.useCallback(
4309
+ const moveToInner = import_react29.default.useCallback(
4166
4310
  (idx, withAnim = true) => {
4167
4311
  if (!useLoop) {
4168
4312
  setAnimated(withAnim);
@@ -4190,7 +4334,7 @@ var Swiper = (props) => {
4190
4334
  },
4191
4335
  [useLoop, cloneCount, totalSlides]
4192
4336
  );
4193
- const handleTransitionEnd = import_react27.default.useCallback(() => {
4337
+ const handleTransitionEnd = import_react29.default.useCallback(() => {
4194
4338
  if (!useLoop) return;
4195
4339
  const real = getRealIndex(innerIndex);
4196
4340
  const canonical = cloneCount + real;
@@ -4200,7 +4344,7 @@ var Swiper = (props) => {
4200
4344
  }
4201
4345
  onChange?.(Math.min(real, maxIndex));
4202
4346
  }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
4203
- const slideTo = import_react27.default.useCallback(
4347
+ const slideTo = import_react29.default.useCallback(
4204
4348
  (logicalIndex) => {
4205
4349
  if (!canSlide) return;
4206
4350
  const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
@@ -4210,7 +4354,7 @@ var Swiper = (props) => {
4210
4354
  },
4211
4355
  [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
4212
4356
  );
4213
- const slideNext = import_react27.default.useCallback(() => {
4357
+ const slideNext = import_react29.default.useCallback(() => {
4214
4358
  if (!canSlide) return;
4215
4359
  const nextInner = innerIndex + slideBy;
4216
4360
  if (useLoop) {
@@ -4219,7 +4363,7 @@ var Swiper = (props) => {
4219
4363
  moveToInner(Math.min(nextInner, maxIndex), true);
4220
4364
  }
4221
4365
  }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
4222
- const slidePrev = import_react27.default.useCallback(() => {
4366
+ const slidePrev = import_react29.default.useCallback(() => {
4223
4367
  if (!canSlide) return;
4224
4368
  const prevInner = innerIndex - slideBy;
4225
4369
  if (useLoop) {
@@ -4228,7 +4372,7 @@ var Swiper = (props) => {
4228
4372
  moveToInner(Math.max(prevInner, 0), true);
4229
4373
  }
4230
4374
  }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
4231
- import_react27.default.useEffect(() => {
4375
+ import_react29.default.useEffect(() => {
4232
4376
  if (indexProp === void 0) return;
4233
4377
  const clamped = Math.max(0, Math.min(indexProp, maxIndex));
4234
4378
  const target = useLoop ? cloneCount + clamped : clamped;
@@ -4236,12 +4380,12 @@ var Swiper = (props) => {
4236
4380
  moveToInner(target, true);
4237
4381
  }
4238
4382
  }, [indexProp]);
4239
- import_react27.default.useImperativeHandle(swiperRef, () => ({
4383
+ import_react29.default.useImperativeHandle(swiperRef, () => ({
4240
4384
  slidePrev,
4241
4385
  slideNext,
4242
4386
  slideTo
4243
4387
  }));
4244
- import_react27.default.useEffect(() => {
4388
+ import_react29.default.useEffect(() => {
4245
4389
  if (!auto || !canSlide) return;
4246
4390
  autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
4247
4391
  return () => {
@@ -4264,7 +4408,7 @@ var Swiper = (props) => {
4264
4408
  startXRef.current = getClientX(e);
4265
4409
  startTimeRef.current = Date.now();
4266
4410
  };
4267
- import_react27.default.useEffect(() => {
4411
+ import_react29.default.useEffect(() => {
4268
4412
  if (!isDragging) return;
4269
4413
  const handleMove = (e) => {
4270
4414
  setDragOffset(getClientX(e) - startXRef.current);
@@ -4302,8 +4446,8 @@ var Swiper = (props) => {
4302
4446
  }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
4303
4447
  const slideWidthPercent = 100 / viewItemCount;
4304
4448
  const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
4305
- const slideElements = import_react27.default.useMemo(
4306
- () => 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)(
4307
4451
  "div",
4308
4452
  {
4309
4453
  className: "lib-xplat-swiper__slide",
@@ -4322,14 +4466,14 @@ var Swiper = (props) => {
4322
4466
  Math.floor(realIndex / slideBy),
4323
4467
  totalSteps - 1
4324
4468
  );
4325
- return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
4326
- /* @__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)(
4327
4471
  "div",
4328
4472
  {
4329
4473
  className: "lib-xplat-swiper__viewport",
4330
4474
  onMouseDown: handleDragStart,
4331
4475
  onTouchStart: handleDragStart,
4332
- children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
4476
+ children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4333
4477
  "div",
4334
4478
  {
4335
4479
  className: clsx_default(
@@ -4347,7 +4491,7 @@ var Swiper = (props) => {
4347
4491
  )
4348
4492
  }
4349
4493
  ),
4350
- 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)(
4351
4495
  "span",
4352
4496
  {
4353
4497
  className: "lib-xplat-swiper__progress-fill",
@@ -4357,7 +4501,7 @@ var Swiper = (props) => {
4357
4501
  }
4358
4502
  }
4359
4503
  ) }) }),
4360
- 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)(
4361
4505
  "button",
4362
4506
  {
4363
4507
  className: clsx_default(
@@ -4375,8 +4519,8 @@ Swiper.displayName = "Swiper";
4375
4519
  var Swiper_default = Swiper;
4376
4520
 
4377
4521
  // src/components/Switch/Switch.tsx
4378
- var import_react28 = __toESM(require("react"), 1);
4379
- 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");
4380
4524
  var KNOB_TRANSITION_MS = 250;
4381
4525
  var Switch = (props) => {
4382
4526
  const {
@@ -4386,9 +4530,9 @@ var Switch = (props) => {
4386
4530
  disabled,
4387
4531
  onChange
4388
4532
  } = props;
4389
- const [isAnimating, setIsAnimating] = import_react28.default.useState(false);
4390
- const timeoutRef = import_react28.default.useRef(null);
4391
- 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(() => {
4392
4536
  return () => {
4393
4537
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4394
4538
  };
@@ -4403,7 +4547,7 @@ var Switch = (props) => {
4403
4547
  timeoutRef.current = null;
4404
4548
  }, KNOB_TRANSITION_MS);
4405
4549
  };
4406
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
4550
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4407
4551
  "div",
4408
4552
  {
4409
4553
  className: clsx_default(
@@ -4416,80 +4560,13 @@ var Switch = (props) => {
4416
4560
  ),
4417
4561
  onClick: handleClick,
4418
4562
  "aria-disabled": disabled || isAnimating,
4419
- 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) })
4420
4564
  }
4421
4565
  );
4422
4566
  };
4423
4567
  Switch.displayName = "Switch";
4424
4568
  var Switch_default = Switch;
4425
4569
 
4426
- // src/components/Tab/Tab.tsx
4427
- var import_react30 = __toESM(require("react"), 1);
4428
-
4429
- // src/components/Tab/TabItem.tsx
4430
- var import_react29 = __toESM(require("react"), 1);
4431
- var import_jsx_runtime335 = require("react/jsx-runtime");
4432
- var TabItem = import_react29.default.forwardRef((props, ref) => {
4433
- const { isActive, title, onClick } = props;
4434
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
4435
- "div",
4436
- {
4437
- ref,
4438
- className: clsx_default("tab-item", isActive ? "active" : null),
4439
- onClick,
4440
- children: title
4441
- }
4442
- );
4443
- });
4444
- TabItem.displayName = "TabItem";
4445
- var TabItem_default = TabItem;
4446
-
4447
- // src/components/Tab/Tab.tsx
4448
- var import_jsx_runtime336 = require("react/jsx-runtime");
4449
- var Tab = (props) => {
4450
- const { activeIndex, onChange, tabs, type, size = "md" } = props;
4451
- const [underlineStyle, setUnderlineStyle] = import_react30.default.useState({
4452
- left: 0,
4453
- width: 0
4454
- });
4455
- const itemRefs = import_react30.default.useRef([]);
4456
- const handleChangeActiveTab = (tabItem, tabIdx) => {
4457
- onChange(tabItem, tabIdx);
4458
- };
4459
- import_react30.default.useEffect(() => {
4460
- const el = itemRefs.current[activeIndex];
4461
- if (el) {
4462
- setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
4463
- }
4464
- }, [activeIndex, tabs.length]);
4465
- return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
4466
- tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4467
- TabItem_default,
4468
- {
4469
- onClick: () => handleChangeActiveTab(tab, idx),
4470
- isActive: activeIndex === idx,
4471
- ref: (el) => {
4472
- itemRefs.current[idx] = el;
4473
- },
4474
- title: tab.title
4475
- },
4476
- `${tab.value}_${idx}`
4477
- )),
4478
- type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
4479
- "div",
4480
- {
4481
- className: "tab-toggle-underline",
4482
- style: {
4483
- left: underlineStyle.left,
4484
- width: underlineStyle.width
4485
- }
4486
- }
4487
- )
4488
- ] });
4489
- };
4490
- Tab.displayName = "Tab";
4491
- var Tab_default = Tab;
4492
-
4493
4570
  // src/components/Table/TableContext.tsx
4494
4571
  var import_react31 = __toESM(require("react"), 1);
4495
4572
  var TableContext = import_react31.default.createContext(null);
@@ -5237,10 +5314,10 @@ var Video_default = Video;
5237
5314
  Alert,
5238
5315
  Avatar,
5239
5316
  Badge,
5317
+ Box,
5240
5318
  Breadcrumb,
5241
5319
  Button,
5242
5320
  Calendar,
5243
- Card,
5244
5321
  CardTab,
5245
5322
  Chart,
5246
5323
  CheckBox,