@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.
package/dist/index.js CHANGED
@@ -6035,16 +6035,21 @@ var Calendar = (props) => {
6035
6035
  Calendar.displayName = "Calendar";
6036
6036
  var Calendar_default = Calendar;
6037
6037
 
6038
- // src/components/Card/Card.tsx
6038
+ // src/components/Box/Box.tsx
6039
6039
  import { jsx as jsx302, jsxs as jsxs194 } from "react/jsx-runtime";
6040
- var Card = ({ children, title }) => {
6041
- return /* @__PURE__ */ jsxs194("div", { className: "lib-xplat-card", children: [
6042
- title && /* @__PURE__ */ jsx302("div", { className: "title", children: title }),
6043
- /* @__PURE__ */ jsx302("div", { className: "content", children })
6040
+ var Box = ({
6041
+ children,
6042
+ title,
6043
+ variant = "outlined",
6044
+ padding = "md"
6045
+ }) => {
6046
+ return /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
6047
+ title && /* @__PURE__ */ jsx302("div", { className: "box-title", children: title }),
6048
+ /* @__PURE__ */ jsx302("div", { className: "box-content", children })
6044
6049
  ] });
6045
6050
  };
6046
- Card.displayName = "Card";
6047
- var Card_default = Card;
6051
+ Box.displayName = "Box";
6052
+ var Box_default = Box;
6048
6053
 
6049
6054
  // src/components/CardTab/CardTab.tsx
6050
6055
  import React4 from "react";
@@ -6117,25 +6122,65 @@ var CardTab_default = CardTab;
6117
6122
  // src/components/Chart/Chart.tsx
6118
6123
  import React5 from "react";
6119
6124
  import { jsx as jsx305, jsxs as jsxs196 } from "react/jsx-runtime";
6120
- var LINE_BAR_PALETTES = [
6121
- ["var(--primitive-red-100)", "var(--primitive-red-200)", "var(--primitive-red-300)", "var(--primitive-red-400)", "var(--primitive-red-500)", "var(--primitive-red-600)"],
6122
- ["var(--primitive-orange-100)", "var(--primitive-orange-200)", "var(--primitive-orange-300)", "var(--primitive-orange-400)", "var(--primitive-orange-500)", "var(--primitive-orange-600)"],
6123
- ["var(--primitive-yellow-100)", "var(--primitive-yellow-200)", "var(--primitive-yellow-300)", "var(--primitive-yellow-400)", "var(--primitive-yellow-500)", "var(--primitive-yellow-600)"],
6124
- ["var(--primitive-green-100)", "var(--primitive-green-200)", "var(--primitive-green-300)", "var(--primitive-green-400)", "var(--primitive-green-500)", "var(--primitive-green-600)"],
6125
- ["var(--primitive-blue-100)", "var(--primitive-blue-200)", "var(--primitive-blue-300)", "var(--primitive-blue-400)", "var(--primitive-blue-500)", "var(--primitive-blue-600)"],
6126
- ["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)"],
6127
- ["var(--primitive-purple-100)", "var(--primitive-purple-200)", "var(--primitive-purple-300)", "var(--primitive-purple-400)", "var(--primitive-purple-500)", "var(--primitive-purple-600)"],
6128
- ["var(--primitive-pink-100)", "var(--primitive-pink-200)", "var(--primitive-pink-300)", "var(--primitive-pink-400)", "var(--primitive-pink-500)", "var(--primitive-pink-600)"]
6129
- ];
6130
- var PIE_PALETTES = [
6131
- ["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)"],
6132
- ["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)"],
6133
- ["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)"]
6134
- ];
6135
- var getPalette = (palettes, index) => {
6136
- return palettes[index % palettes.length];
6125
+ var CATEGORICAL_COUNT2 = 8;
6126
+ var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
6127
+ const n = i + 1;
6128
+ return [
6129
+ `var(--semantic-categorical-${n}-bg)`,
6130
+ `var(--semantic-categorical-${n}-area)`,
6131
+ `var(--semantic-categorical-${n}-fill)`,
6132
+ `var(--semantic-categorical-${n}-text)`
6133
+ ];
6134
+ });
6135
+ var PIE_COLORS = Array.from(
6136
+ { length: CATEGORICAL_COUNT2 },
6137
+ (_, i) => `var(--semantic-categorical-${i + 1}-fill)`
6138
+ );
6139
+ var hashString = (str) => {
6140
+ let hash = 0;
6141
+ for (let i = 0; i < str.length; i++) {
6142
+ hash = (hash << 5) - hash + str.charCodeAt(i) | 0;
6143
+ }
6144
+ return Math.abs(hash);
6145
+ };
6146
+ var getPalette = (palettes, index, key) => {
6147
+ const offset = key ? hashString(key) : 0;
6148
+ return palettes[(index + offset) % palettes.length];
6137
6149
  };
6138
6150
  var PADDING = { top: 20, right: 20, bottom: 30, left: 40 };
6151
+ var toSmoothPath = (points) => {
6152
+ if (points.length < 2) return "";
6153
+ const p = points;
6154
+ let d = `M ${p[0].x} ${p[0].y}`;
6155
+ for (let i = 0; i < p.length - 1; i++) {
6156
+ const p0 = p[Math.max(0, i - 1)];
6157
+ const p1 = p[i];
6158
+ const p2 = p[i + 1];
6159
+ const p3 = p[Math.min(p.length - 1, i + 2)];
6160
+ const cp1x = p1.x + (p2.x - p0.x) / 6;
6161
+ const cp1y = p1.y + (p2.y - p0.y) / 6;
6162
+ const cp2x = p2.x - (p3.x - p1.x) / 6;
6163
+ const cp2y = p2.y - (p3.y - p1.y) / 6;
6164
+ d += ` C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p2.x} ${p2.y}`;
6165
+ }
6166
+ return d;
6167
+ };
6168
+ var useChartSize = (ref) => {
6169
+ const [size, setSize] = React5.useState({ width: 0, height: 0 });
6170
+ React5.useEffect(() => {
6171
+ const el = ref.current;
6172
+ if (!el) return;
6173
+ const observer = new ResizeObserver((entries) => {
6174
+ const entry = entries[0];
6175
+ if (!entry) return;
6176
+ const { width, height } = entry.contentRect;
6177
+ setSize({ width: Math.floor(width), height: Math.floor(height) });
6178
+ });
6179
+ observer.observe(el);
6180
+ return () => observer.disconnect();
6181
+ }, [ref]);
6182
+ return size;
6183
+ };
6139
6184
  var useChartTooltip = (enabled) => {
6140
6185
  const [tooltip, setTooltip] = React5.useState({
6141
6186
  visible: false,
@@ -6170,15 +6215,15 @@ var useChartTooltip = (enabled) => {
6170
6215
  }, []);
6171
6216
  return { tooltip, show, hide, move, containerRef };
6172
6217
  };
6173
- var LineChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6218
+ var LineChart = React5.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6174
6219
  const entries = React5.useMemo(() => Object.entries(data), [data]);
6175
6220
  const maxVal = React5.useMemo(() => {
6176
6221
  const allValues = entries.flatMap(([, v]) => v);
6177
6222
  return Math.max(...allValues) * 1.2 || 1;
6178
6223
  }, [entries]);
6179
6224
  const count = labels.length;
6180
- const chartW = 600 - PADDING.left - PADDING.right;
6181
- const chartH = 300 - PADDING.top - PADDING.bottom;
6225
+ const chartW = width - PADDING.left - PADDING.right;
6226
+ const chartH = height - PADDING.top - PADDING.bottom;
6182
6227
  const seriesPoints = React5.useMemo(
6183
6228
  () => entries.map(
6184
6229
  ([, values]) => values.map((v, i) => ({
@@ -6189,22 +6234,22 @@ var LineChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6189
6234
  ),
6190
6235
  [entries, count, chartW, chartH, maxVal]
6191
6236
  );
6192
- return /* @__PURE__ */ jsxs196("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
6237
+ return /* @__PURE__ */ jsxs196("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6193
6238
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6194
6239
  const y = PADDING.top + (1 - ratio) * chartH;
6195
6240
  const val = Math.round(maxVal * ratio);
6196
6241
  return /* @__PURE__ */ jsxs196("g", { children: [
6197
- /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
6242
+ /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6198
6243
  /* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6199
6244
  ] }, ratio);
6200
6245
  }),
6201
6246
  labels.map((label, i) => {
6202
6247
  const x = PADDING.left + i / (count - 1 || 1) * chartW;
6203
- return /* @__PURE__ */ jsx305("text", { x, y: 300 - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6248
+ return /* @__PURE__ */ jsx305("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6204
6249
  }),
6205
6250
  entries.map(([key], di) => {
6206
- const palette = getPalette(LINE_BAR_PALETTES, di);
6207
- const color = palette[4];
6251
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
6252
+ const color = palette[2];
6208
6253
  const points = seriesPoints[di];
6209
6254
  return /* @__PURE__ */ jsxs196("g", { children: [
6210
6255
  /* @__PURE__ */ jsx305(
@@ -6235,7 +6280,73 @@ var LineChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6235
6280
  ] });
6236
6281
  });
6237
6282
  LineChart.displayName = "LineChart";
6238
- var BarChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6283
+ var CurveChart = React5.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6284
+ const entries = React5.useMemo(() => Object.entries(data), [data]);
6285
+ const maxVal = React5.useMemo(() => {
6286
+ const allValues = entries.flatMap(([, v]) => v);
6287
+ return Math.max(...allValues) * 1.2 || 1;
6288
+ }, [entries]);
6289
+ const count = labels.length;
6290
+ const chartW = width - PADDING.left - PADDING.right;
6291
+ const chartH = height - PADDING.top - PADDING.bottom;
6292
+ const seriesPoints = React5.useMemo(
6293
+ () => entries.map(
6294
+ ([, values]) => values.map((v, i) => ({
6295
+ x: PADDING.left + i / (count - 1 || 1) * chartW,
6296
+ y: PADDING.top + (1 - v / maxVal) * chartH,
6297
+ v
6298
+ }))
6299
+ ),
6300
+ [entries, count, chartW, chartH, maxVal]
6301
+ );
6302
+ return /* @__PURE__ */ jsxs196("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6303
+ [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6304
+ const y = PADDING.top + (1 - ratio) * chartH;
6305
+ const val = Math.round(maxVal * ratio);
6306
+ return /* @__PURE__ */ jsxs196("g", { children: [
6307
+ /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6308
+ /* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6309
+ ] }, ratio);
6310
+ }),
6311
+ labels.map((label, i) => {
6312
+ const x = PADDING.left + i / (count - 1 || 1) * chartW;
6313
+ return /* @__PURE__ */ jsx305("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
6314
+ }),
6315
+ entries.map(([key], di) => {
6316
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
6317
+ const color = palette[2];
6318
+ const areaColor = palette[0];
6319
+ const points = seriesPoints[di];
6320
+ const gradientId = `curve-gradient-${di}`;
6321
+ const linePath = toSmoothPath(points);
6322
+ const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
6323
+ return /* @__PURE__ */ jsxs196("g", { children: [
6324
+ /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsxs196("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6325
+ /* @__PURE__ */ jsx305("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
6326
+ /* @__PURE__ */ jsx305("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
6327
+ ] }) }),
6328
+ /* @__PURE__ */ jsx305("path", { d: areaPath, fill: `url(#${gradientId})` }),
6329
+ /* @__PURE__ */ jsx305("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" }),
6330
+ points.map((p, i) => /* @__PURE__ */ jsx305(
6331
+ "circle",
6332
+ {
6333
+ cx: p.x,
6334
+ cy: p.y,
6335
+ r: "4",
6336
+ fill: color,
6337
+ className: "chart-point",
6338
+ onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${p.v}`),
6339
+ onMouseMove: onMove,
6340
+ onMouseLeave: onLeave
6341
+ },
6342
+ i
6343
+ ))
6344
+ ] }, di);
6345
+ })
6346
+ ] });
6347
+ });
6348
+ CurveChart.displayName = "CurveChart";
6349
+ var BarChart = React5.memo(({ data, labels, width, height, onHover, onMove, onLeave }) => {
6239
6350
  const entries = React5.useMemo(() => Object.entries(data), [data]);
6240
6351
  const maxVal = React5.useMemo(() => {
6241
6352
  const allValues = entries.flatMap(([, v]) => v);
@@ -6243,8 +6354,8 @@ var BarChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6243
6354
  }, [entries]);
6244
6355
  const count = labels.length;
6245
6356
  const groupCount = entries.length;
6246
- const chartW = 600 - PADDING.left - PADDING.right;
6247
- const chartH = 300 - PADDING.top - PADDING.bottom;
6357
+ const chartW = width - PADDING.left - PADDING.right;
6358
+ const chartH = height - PADDING.top - PADDING.bottom;
6248
6359
  const groupW = chartW / count;
6249
6360
  const barW = Math.min(32, groupW * 0.7 / groupCount);
6250
6361
  const bars = React5.useMemo(
@@ -6258,19 +6369,19 @@ var BarChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6258
6369
  ),
6259
6370
  [entries, maxVal, chartH, groupW, barW, groupCount]
6260
6371
  );
6261
- return /* @__PURE__ */ jsxs196("svg", { viewBox: "0 0 600 300", className: "chart-svg", children: [
6372
+ return /* @__PURE__ */ jsxs196("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
6262
6373
  [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
6263
6374
  const y = PADDING.top + (1 - ratio) * chartH;
6264
6375
  const val = Math.round(maxVal * ratio);
6265
6376
  return /* @__PURE__ */ jsxs196("g", { children: [
6266
- /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: 600 - PADDING.right, y2: y, className: "chart-grid" }),
6377
+ /* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
6267
6378
  /* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
6268
6379
  ] }, ratio);
6269
6380
  }),
6270
- labels.map((label, i) => /* @__PURE__ */ jsx305("text", { x: PADDING.left + groupW * i + groupW / 2, y: 300 - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i)),
6381
+ labels.map((label, i) => /* @__PURE__ */ jsx305("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i)),
6271
6382
  entries.map(([key], di) => {
6272
- const palette = getPalette(LINE_BAR_PALETTES, di);
6273
- const color = palette[4];
6383
+ const palette = getPalette(LINE_BAR_PALETTES, di, key);
6384
+ const color = palette[2];
6274
6385
  return bars[di].map((b, i) => /* @__PURE__ */ jsx305(
6275
6386
  "rect",
6276
6387
  {
@@ -6278,7 +6389,7 @@ var BarChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6278
6389
  y: b.y,
6279
6390
  width: b.w,
6280
6391
  height: b.h,
6281
- rx: "2",
6392
+ rx: Math.min(4, b.w / 2),
6282
6393
  fill: color,
6283
6394
  className: "chart-bar",
6284
6395
  onMouseEnter: (e) => onHover(e, `${key}: ${labels[i]} \u2014 ${b.v}`),
@@ -6292,14 +6403,17 @@ var BarChart = React5.memo(({ data, labels, onHover, onMove, onLeave }) => {
6292
6403
  });
6293
6404
  BarChart.displayName = "BarChart";
6294
6405
  var PieDonutChart = React5.memo(
6295
- ({ data, labels, isDoughnut, onHover, onMove, onLeave }) => {
6296
- const values = React5.useMemo(() => Object.entries(data).flatMap(([, v]) => v), [data]);
6406
+ ({ data, labels, width, height, isDoughnut, onHover, onMove, onLeave }) => {
6407
+ const entries = React5.useMemo(() => Object.entries(data), [data]);
6408
+ const values = React5.useMemo(() => entries.flatMap(([, v]) => v), [entries]);
6297
6409
  const total = React5.useMemo(() => values.reduce((a, b) => a + b, 0) || 1, [values]);
6298
- const cx = 150;
6299
- const cy = 150;
6300
- const r2 = 120;
6301
- const innerR = isDoughnut ? 60 : 0;
6302
- const palette = getPalette(PIE_PALETTES, 0);
6410
+ const size = Math.min(width, height);
6411
+ const cx = size / 2;
6412
+ const cy = size / 2;
6413
+ const r2 = size * 0.4;
6414
+ const innerR = isDoughnut ? r2 * 0.5 : 0;
6415
+ const firstKey = entries[0]?.[0] ?? "";
6416
+ const colorOffset = hashString(firstKey);
6303
6417
  const sliceData = React5.useMemo(() => {
6304
6418
  let angle0 = -Math.PI / 2;
6305
6419
  return values.map((v, i) => {
@@ -6328,13 +6442,13 @@ var PieDonutChart = React5.memo(
6328
6442
  angle0 = endAngle;
6329
6443
  return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}` };
6330
6444
  });
6331
- }, [values, total, innerR, labels]);
6332
- return /* @__PURE__ */ jsx305("svg", { viewBox: "0 0 300 300", className: "chart-svg chart-pie", children: sliceData.map((s, i) => /* @__PURE__ */ jsxs196("g", { children: [
6445
+ }, [values, total, cx, cy, r2, innerR, labels]);
6446
+ return /* @__PURE__ */ jsx305("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: sliceData.map((s, i) => /* @__PURE__ */ jsxs196("g", { children: [
6333
6447
  /* @__PURE__ */ jsx305(
6334
6448
  "path",
6335
6449
  {
6336
6450
  d: s.d,
6337
- fill: palette[i % palette.length],
6451
+ fill: PIE_COLORS[(i + colorOffset) % PIE_COLORS.length],
6338
6452
  className: "chart-slice",
6339
6453
  onMouseEnter: (e) => onHover(e, `${s.label}: ${s.v} (${s.pct}%)`),
6340
6454
  onMouseMove: onMove,
@@ -6346,22 +6460,42 @@ var PieDonutChart = React5.memo(
6346
6460
  }
6347
6461
  );
6348
6462
  PieDonutChart.displayName = "PieDonutChart";
6463
+ var TooltipBubble = ({ x, y, containerWidth, children }) => {
6464
+ const ref = React5.useRef(null);
6465
+ const [adjustedX, setAdjustedX] = React5.useState(x);
6466
+ React5.useEffect(() => {
6467
+ const el = ref.current;
6468
+ if (!el) return;
6469
+ const w = el.offsetWidth;
6470
+ const half = w / 2;
6471
+ const margin = 8;
6472
+ let nx = x;
6473
+ if (x - half < margin) nx = half + margin;
6474
+ else if (x + half > containerWidth - margin) nx = containerWidth - half - margin;
6475
+ setAdjustedX(nx);
6476
+ }, [x, containerWidth]);
6477
+ return /* @__PURE__ */ jsx305(
6478
+ "div",
6479
+ {
6480
+ ref,
6481
+ className: "chart-tooltip",
6482
+ style: { left: adjustedX, top: y },
6483
+ children
6484
+ }
6485
+ );
6486
+ };
6349
6487
  var Chart = (props) => {
6350
6488
  const { type, data, labels, tooltip: showTooltip = true } = props;
6351
6489
  const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
6490
+ const { width, height } = useChartSize(containerRef);
6491
+ const ready = width > 0 && height > 0;
6352
6492
  return /* @__PURE__ */ jsxs196("div", { className: "lib-xplat-chart", ref: containerRef, children: [
6353
- type === "line" && /* @__PURE__ */ jsx305(LineChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6354
- type === "bar" && /* @__PURE__ */ jsx305(BarChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6355
- type === "pie" && /* @__PURE__ */ jsx305(PieDonutChart, { data, labels, onHover: show, onMove: move, onLeave: hide }),
6356
- type === "doughnut" && /* @__PURE__ */ jsx305(PieDonutChart, { data, labels, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6357
- tooltip.visible && /* @__PURE__ */ jsx305(
6358
- "div",
6359
- {
6360
- className: "chart-tooltip",
6361
- style: { left: tooltip.x, top: tooltip.y },
6362
- children: tooltip.content
6363
- }
6364
- )
6493
+ ready && type === "line" && /* @__PURE__ */ jsx305(LineChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6494
+ ready && type === "curve" && /* @__PURE__ */ jsx305(CurveChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6495
+ ready && type === "bar" && /* @__PURE__ */ jsx305(BarChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6496
+ ready && type === "pie" && /* @__PURE__ */ jsx305(PieDonutChart, { data, labels, width, height, onHover: show, onMove: move, onLeave: hide }),
6497
+ ready && type === "doughnut" && /* @__PURE__ */ jsx305(PieDonutChart, { data, labels, width, height, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
6498
+ tooltip.visible && /* @__PURE__ */ jsx305(TooltipBubble, { x: tooltip.x, y: tooltip.y, containerWidth: width, children: tooltip.content })
6365
6499
  ] });
6366
6500
  };
6367
6501
  Chart.displayName = "Chart";
@@ -6626,42 +6760,66 @@ var PasswordInput = React7.forwardRef(
6626
6760
  PasswordInput.displayName = "PasswordInput";
6627
6761
  var PasswordInput_default = PasswordInput;
6628
6762
 
6629
- // src/tokens/hooks/useClickOutside.ts
6763
+ // src/components/Modal/Modal.tsx
6630
6764
  import React8 from "react";
6631
- var useClickOutside = (refs, handler, enabled = true) => {
6765
+ import { createPortal } from "react-dom";
6766
+ import { jsx as jsx311 } from "react/jsx-runtime";
6767
+ var ANIMATION_DURATION_MS = 200;
6768
+ var Modal = (props) => {
6769
+ const { isOpen, onClose, children } = props;
6770
+ const [mounted, setMounted] = React8.useState(false);
6771
+ const [visible, setVisible] = React8.useState(false);
6632
6772
  React8.useEffect(() => {
6633
- if (!enabled) return;
6634
- const refArray = Array.isArray(refs) ? refs : [refs];
6635
- const listener = (event) => {
6636
- const target = event.target;
6637
- const isInside = refArray.some(
6638
- (ref) => ref.current && ref.current.contains(target)
6639
- );
6640
- if (!isInside) {
6641
- handler();
6773
+ if (isOpen) {
6774
+ setMounted(true);
6775
+ const t2 = setTimeout(() => setVisible(true), 1);
6776
+ return () => clearTimeout(t2);
6777
+ }
6778
+ setVisible(false);
6779
+ const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
6780
+ return () => clearTimeout(t);
6781
+ }, [isOpen]);
6782
+ if (typeof document === "undefined") return null;
6783
+ if (!mounted) return null;
6784
+ const stateClass = visible ? "enter" : "exit";
6785
+ return createPortal(
6786
+ /* @__PURE__ */ jsx311(
6787
+ "div",
6788
+ {
6789
+ className: clsx_default("lib-xplat-modal", "dim", stateClass),
6790
+ onClick: onClose,
6791
+ children: /* @__PURE__ */ jsx311(
6792
+ "div",
6793
+ {
6794
+ className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
6795
+ role: "dialog",
6796
+ "aria-modal": "true",
6797
+ onClick: (e) => e.stopPropagation(),
6798
+ children
6799
+ }
6800
+ )
6642
6801
  }
6643
- };
6644
- document.addEventListener("mousedown", listener);
6645
- document.addEventListener("touchstart", listener);
6646
- return () => {
6647
- document.removeEventListener("mousedown", listener);
6648
- document.removeEventListener("touchstart", listener);
6649
- };
6650
- }, [refs, handler, enabled]);
6802
+ ),
6803
+ document.body
6804
+ );
6651
6805
  };
6652
- var useClickOutside_default = useClickOutside;
6806
+ Modal.displayName = "Modal";
6807
+ var Modal_default = Modal;
6653
6808
 
6654
6809
  // src/components/DatePicker/SingleDatePicker/index.tsx
6655
6810
  import React9 from "react";
6656
- import { Fragment as Fragment2, jsx as jsx311, jsxs as jsxs200 } from "react/jsx-runtime";
6811
+ import { Fragment as Fragment2, jsx as jsx312, jsxs as jsxs200 } from "react/jsx-runtime";
6657
6812
  var DayCell2 = React9.memo(
6658
6813
  ({
6659
6814
  day,
6660
6815
  disabled,
6661
6816
  selected,
6662
6817
  highlighted,
6818
+ isStart,
6819
+ isEnd,
6820
+ inRange,
6663
6821
  onSelect
6664
- }) => /* @__PURE__ */ jsx311(
6822
+ }) => /* @__PURE__ */ jsx312(
6665
6823
  "button",
6666
6824
  {
6667
6825
  type: "button",
@@ -6669,8 +6827,9 @@ var DayCell2 = React9.memo(
6669
6827
  "datepicker-day",
6670
6828
  !day.isCurrentMonth && "outside",
6671
6829
  disabled && "disabled",
6672
- selected && "selected",
6830
+ (selected || isStart || isEnd) && "selected",
6673
6831
  highlighted && !selected && "highlighted",
6832
+ inRange && !isStart && !isEnd && "in-range",
6674
6833
  day.isToday && "today",
6675
6834
  day.isSunday && "sunday",
6676
6835
  day.isSaturday && "saturday"
@@ -6682,7 +6841,7 @@ var DayCell2 = React9.memo(
6682
6841
  children: day.day
6683
6842
  }
6684
6843
  ),
6685
- (prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
6844
+ (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
6686
6845
  );
6687
6846
  DayCell2.displayName = "DayCell";
6688
6847
  var SingleDatePicker = (props) => {
@@ -6692,7 +6851,9 @@ var SingleDatePicker = (props) => {
6692
6851
  minDate,
6693
6852
  maxDate,
6694
6853
  highlightDates = [],
6695
- locale = "ko"
6854
+ locale = "ko",
6855
+ rangeStart,
6856
+ rangeEnd
6696
6857
  } = props;
6697
6858
  const initialYear = value?.getFullYear();
6698
6859
  const initialMonth = value?.getMonth();
@@ -6740,6 +6901,8 @@ var SingleDatePicker = (props) => {
6740
6901
  else if (pickerMode === "months") {
6741
6902
  setYearRangeStart(Math.floor(year / 12) * 12);
6742
6903
  setPickerMode("years");
6904
+ } else {
6905
+ setPickerMode("days");
6743
6906
  }
6744
6907
  };
6745
6908
  const handleMonthSelect = (m) => {
@@ -6753,71 +6916,80 @@ var SingleDatePicker = (props) => {
6753
6916
  const weekdays = WEEKDAY_LABELS[locale];
6754
6917
  const monthLabels = MONTH_LABELS[locale];
6755
6918
  const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
6919
+ const hasRange = rangeStart != null && rangeEnd != null;
6756
6920
  return /* @__PURE__ */ jsxs200(
6757
6921
  "div",
6758
6922
  {
6759
6923
  className: clsx_default("lib-xplat-datepicker", "single"),
6760
6924
  children: [
6761
6925
  /* @__PURE__ */ jsxs200("div", { className: "datepicker-header", children: [
6762
- /* @__PURE__ */ jsx311("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx311(ChevronLeftIcon_default, {}) }),
6763
- /* @__PURE__ */ jsx311("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
6764
- /* @__PURE__ */ jsx311("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx311(ChevronRightIcon_default, {}) })
6926
+ /* @__PURE__ */ jsx312("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx312(ChevronLeftIcon_default, {}) }),
6927
+ /* @__PURE__ */ jsx312("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
6928
+ /* @__PURE__ */ jsx312("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx312(ChevronRightIcon_default, {}) })
6765
6929
  ] }),
6766
- pickerMode === "years" && /* @__PURE__ */ jsx311("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
6767
- const y = yearRangeStart + i;
6768
- return /* @__PURE__ */ jsx311(
6930
+ /* @__PURE__ */ jsxs200("div", { className: "datepicker-body", children: [
6931
+ pickerMode === "years" && /* @__PURE__ */ jsx312("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
6932
+ const y = yearRangeStart + i;
6933
+ return /* @__PURE__ */ jsx312(
6934
+ "button",
6935
+ {
6936
+ type: "button",
6937
+ className: clsx_default("datepicker-picker-cell", y === year && "active"),
6938
+ onClick: () => handleYearSelect(y),
6939
+ children: y
6940
+ },
6941
+ y
6942
+ );
6943
+ }) }),
6944
+ pickerMode === "months" && /* @__PURE__ */ jsx312("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx312(
6769
6945
  "button",
6770
6946
  {
6771
6947
  type: "button",
6772
- className: clsx_default("datepicker-picker-cell", y === year && "active"),
6773
- onClick: () => handleYearSelect(y),
6774
- children: y
6775
- },
6776
- y
6777
- );
6778
- }) }),
6779
- pickerMode === "months" && /* @__PURE__ */ jsx311("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx311(
6780
- "button",
6781
- {
6782
- type: "button",
6783
- className: clsx_default("datepicker-picker-cell", i === month && "active"),
6784
- onClick: () => handleMonthSelect(i),
6785
- children: label
6786
- },
6787
- i
6788
- )) }),
6789
- pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment2, { children: [
6790
- /* @__PURE__ */ jsx311("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx311(
6791
- "div",
6792
- {
6793
- className: clsx_default(
6794
- "datepicker-weekday",
6795
- i === 0 && "sunday",
6796
- i === 6 && "saturday"
6797
- ),
6948
+ className: clsx_default("datepicker-picker-cell", i === month && "active"),
6949
+ onClick: () => handleMonthSelect(i),
6798
6950
  children: label
6799
6951
  },
6800
- label
6952
+ i
6801
6953
  )) }),
6802
- /* @__PURE__ */ jsx311("div", { className: "datepicker-grid", children: days.map((day, idx) => {
6803
- const t = day.date.getTime();
6804
- const disabled = t < minTime || t > maxTime;
6805
- const selected = value ? isSameDay(day.date, value) : false;
6806
- const highlighted = highlightSet.has(
6807
- `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
6808
- );
6809
- return /* @__PURE__ */ jsx311(
6810
- DayCell2,
6954
+ pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment2, { children: [
6955
+ /* @__PURE__ */ jsx312("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx312(
6956
+ "div",
6811
6957
  {
6812
- day,
6813
- disabled,
6814
- selected,
6815
- highlighted,
6816
- onSelect: handleSelect
6958
+ className: clsx_default(
6959
+ "datepicker-weekday",
6960
+ i === 0 && "sunday",
6961
+ i === 6 && "saturday"
6962
+ ),
6963
+ children: label
6817
6964
  },
6818
- idx
6819
- );
6820
- }) })
6965
+ label
6966
+ )) }),
6967
+ /* @__PURE__ */ jsx312("div", { className: "datepicker-grid", children: days.map((day, idx) => {
6968
+ const t = day.date.getTime();
6969
+ const disabled = t < minTime || t > maxTime;
6970
+ const selected = value ? isSameDay(day.date, value) : false;
6971
+ const highlighted = highlightSet.has(
6972
+ `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
6973
+ );
6974
+ const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
6975
+ const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
6976
+ const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
6977
+ return /* @__PURE__ */ jsx312(
6978
+ DayCell2,
6979
+ {
6980
+ day,
6981
+ disabled,
6982
+ selected,
6983
+ highlighted,
6984
+ isStart,
6985
+ isEnd,
6986
+ inRange: inRangeVal,
6987
+ onSelect: handleSelect
6988
+ },
6989
+ idx
6990
+ );
6991
+ }) })
6992
+ ] })
6821
6993
  ] })
6822
6994
  ]
6823
6995
  }
@@ -6827,7 +6999,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
6827
6999
  var SingleDatePicker_default = SingleDatePicker;
6828
7000
 
6829
7001
  // src/components/DatePicker/InputDatePicker/index.tsx
6830
- import { jsx as jsx312, jsxs as jsxs201 } from "react/jsx-runtime";
7002
+ import { jsx as jsx313, jsxs as jsxs201 } from "react/jsx-runtime";
6831
7003
  var formatDate = (date) => {
6832
7004
  if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
6833
7005
  const y = date.getFullYear();
@@ -6836,137 +7008,131 @@ var formatDate = (date) => {
6836
7008
  return `${y}/${m}/${d}`;
6837
7009
  };
6838
7010
  var InputDatePicker = (props) => {
6839
- const { value, onChange, minDate, maxDate, disabled, locale, placeholder } = props;
7011
+ const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
6840
7012
  const [isOpen, setIsOpen] = React10.useState(false);
6841
- const containerRef = React10.useRef(null);
6842
- const calendarRef = React10.useRef(null);
6843
- useClickOutside_default([containerRef], () => setIsOpen(false), isOpen);
7013
+ const [tempDate, setTempDate] = React10.useState(value ?? /* @__PURE__ */ new Date());
7014
+ const handleOpen = () => {
7015
+ if (disabled) return;
7016
+ setTempDate(value ?? /* @__PURE__ */ new Date());
7017
+ setIsOpen(true);
7018
+ };
6844
7019
  const handleSelect = (date) => {
6845
- if (!date) return;
6846
- onChange?.(date);
7020
+ if (date) setTempDate(date);
7021
+ };
7022
+ const handleApply = () => {
7023
+ onChange?.(tempDate);
6847
7024
  setIsOpen(false);
6848
7025
  };
6849
- return /* @__PURE__ */ jsxs201(
6850
- "div",
6851
- {
6852
- className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"),
6853
- ref: containerRef,
6854
- children: [
6855
- /* @__PURE__ */ jsx312(
6856
- "div",
6857
- {
6858
- className: "input-datepicker-trigger",
6859
- onClick: () => !disabled && setIsOpen((o) => !o),
6860
- children: /* @__PURE__ */ jsx312(
6861
- Input_default,
6862
- {
6863
- value: formatDate(value),
6864
- placeholder,
6865
- suffix: /* @__PURE__ */ jsx312(CalenderIcon_default, {}),
6866
- disabled,
6867
- readOnly: true
6868
- }
6869
- )
6870
- }
6871
- ),
6872
- isOpen && /* @__PURE__ */ jsx312("div", { className: "input-datepicker-dropdown", ref: calendarRef, children: /* @__PURE__ */ jsx312(
6873
- SingleDatePicker_default,
6874
- {
6875
- value: value ?? /* @__PURE__ */ new Date(),
6876
- onChange: handleSelect,
6877
- minDate,
6878
- maxDate,
6879
- locale
6880
- }
6881
- ) })
6882
- ]
6883
- }
6884
- );
7026
+ const handleClose = () => {
7027
+ setIsOpen(false);
7028
+ };
7029
+ return /* @__PURE__ */ jsxs201("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
7030
+ /* @__PURE__ */ jsx313("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ jsx313(
7031
+ Input_default,
7032
+ {
7033
+ value: formatDate(value),
7034
+ placeholder,
7035
+ suffix: /* @__PURE__ */ jsx313(CalenderIcon_default, {}),
7036
+ disabled,
7037
+ readOnly: true
7038
+ }
7039
+ ) }),
7040
+ /* @__PURE__ */ jsx313(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs201("div", { className: "lib-xplat-popup-datepicker-card", children: [
7041
+ /* @__PURE__ */ jsx313("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ jsx313(
7042
+ SingleDatePicker_default,
7043
+ {
7044
+ value: tempDate,
7045
+ onChange: handleSelect,
7046
+ minDate,
7047
+ maxDate,
7048
+ locale
7049
+ }
7050
+ ) }),
7051
+ /* @__PURE__ */ jsxs201("div", { className: "popup-datepicker-footer", children: [
7052
+ /* @__PURE__ */ jsx313(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
7053
+ /* @__PURE__ */ jsx313(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7054
+ ] })
7055
+ ] }) })
7056
+ ] });
6885
7057
  };
6886
7058
  InputDatePicker.displayName = "InputDatePicker";
6887
7059
  var InputDatePicker_default = InputDatePicker;
6888
7060
 
6889
7061
  // src/components/DatePicker/PopupPicker/index.tsx
7062
+ import React14 from "react";
7063
+
7064
+ // src/components/DatePicker/RangePicker/index.tsx
6890
7065
  import React13 from "react";
6891
7066
 
6892
- // src/components/Modal/Modal.tsx
7067
+ // src/components/Tab/Tab.tsx
7068
+ import React12 from "react";
7069
+
7070
+ // src/components/Tab/TabItem.tsx
6893
7071
  import React11 from "react";
6894
- import { createPortal } from "react-dom";
6895
- import { jsx as jsx313 } from "react/jsx-runtime";
6896
- var ANIMATION_DURATION_MS = 200;
6897
- var Modal = (props) => {
6898
- const { isOpen, onClose, children } = props;
6899
- const [mounted, setMounted] = React11.useState(false);
6900
- const [visible, setVisible] = React11.useState(false);
6901
- React11.useEffect(() => {
6902
- if (isOpen) {
6903
- setMounted(true);
6904
- const t2 = setTimeout(() => setVisible(true), 1);
6905
- return () => clearTimeout(t2);
7072
+ import { jsx as jsx314 } from "react/jsx-runtime";
7073
+ var TabItem = React11.forwardRef((props, ref) => {
7074
+ const { isActive, title, onClick } = props;
7075
+ return /* @__PURE__ */ jsx314(
7076
+ "div",
7077
+ {
7078
+ ref,
7079
+ className: clsx_default("tab-item", isActive ? "active" : null),
7080
+ onClick,
7081
+ children: title
6906
7082
  }
6907
- setVisible(false);
6908
- const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
6909
- return () => clearTimeout(t);
6910
- }, [isOpen]);
6911
- if (typeof document === "undefined") return null;
6912
- if (!mounted) return null;
6913
- const stateClass = visible ? "enter" : "exit";
6914
- return createPortal(
6915
- /* @__PURE__ */ jsx313(
7083
+ );
7084
+ });
7085
+ TabItem.displayName = "TabItem";
7086
+ var TabItem_default = TabItem;
7087
+
7088
+ // src/components/Tab/Tab.tsx
7089
+ import { jsx as jsx315, jsxs as jsxs202 } from "react/jsx-runtime";
7090
+ var Tab = (props) => {
7091
+ const { activeIndex, onChange, tabs, type, size = "md" } = props;
7092
+ const [underlineStyle, setUnderlineStyle] = React12.useState({
7093
+ left: 0,
7094
+ width: 0
7095
+ });
7096
+ const itemRefs = React12.useRef([]);
7097
+ const handleChangeActiveTab = (tabItem, tabIdx) => {
7098
+ onChange(tabItem, tabIdx);
7099
+ };
7100
+ React12.useEffect(() => {
7101
+ const el = itemRefs.current[activeIndex];
7102
+ if (el) {
7103
+ setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
7104
+ }
7105
+ }, [activeIndex, tabs.length]);
7106
+ return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
7107
+ tabs.map((tab, idx) => /* @__PURE__ */ jsx315(
7108
+ TabItem_default,
7109
+ {
7110
+ onClick: () => handleChangeActiveTab(tab, idx),
7111
+ isActive: activeIndex === idx,
7112
+ ref: (el) => {
7113
+ itemRefs.current[idx] = el;
7114
+ },
7115
+ title: tab.title
7116
+ },
7117
+ `${tab.value}_${idx}`
7118
+ )),
7119
+ type === "toggle" && /* @__PURE__ */ jsx315(
6916
7120
  "div",
6917
7121
  {
6918
- className: clsx_default("lib-xplat-modal", "dim", stateClass),
6919
- onClick: onClose,
6920
- children: /* @__PURE__ */ jsx313(
6921
- "div",
6922
- {
6923
- className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
6924
- role: "dialog",
6925
- "aria-modal": "true",
6926
- onClick: (e) => e.stopPropagation(),
6927
- children
6928
- }
6929
- )
7122
+ className: "tab-toggle-underline",
7123
+ style: {
7124
+ left: underlineStyle.left,
7125
+ width: underlineStyle.width
7126
+ }
6930
7127
  }
6931
- ),
6932
- document.body
6933
- );
7128
+ )
7129
+ ] });
6934
7130
  };
6935
- Modal.displayName = "Modal";
6936
- var Modal_default = Modal;
7131
+ Tab.displayName = "Tab";
7132
+ var Tab_default = Tab;
6937
7133
 
6938
7134
  // src/components/DatePicker/RangePicker/index.tsx
6939
- import React12 from "react";
6940
- import { jsx as jsx314, jsxs as jsxs202 } from "react/jsx-runtime";
6941
- var RangeDayCell = React12.memo(
6942
- ({
6943
- day,
6944
- disabled,
6945
- isStart,
6946
- isEnd,
6947
- inRange,
6948
- onClick
6949
- }) => /* @__PURE__ */ jsx314(
6950
- "button",
6951
- {
6952
- type: "button",
6953
- className: clsx_default(
6954
- "datepicker-day",
6955
- !day.isCurrentMonth && "outside",
6956
- disabled && "disabled",
6957
- (isStart || isEnd) && "selected",
6958
- inRange && !isStart && !isEnd && "in-range",
6959
- day.isToday && "today",
6960
- day.isSunday && "sunday",
6961
- day.isSaturday && "saturday"
6962
- ),
6963
- disabled: disabled || !day.isCurrentMonth,
6964
- onClick,
6965
- children: day.day
6966
- }
6967
- )
6968
- );
6969
- RangeDayCell.displayName = "RangeDayCell";
7135
+ import { jsx as jsx316, jsxs as jsxs203 } from "react/jsx-runtime";
6970
7136
  var RangePicker = (props) => {
6971
7137
  const {
6972
7138
  startDate,
@@ -6976,139 +7142,92 @@ var RangePicker = (props) => {
6976
7142
  maxDate,
6977
7143
  locale = "ko"
6978
7144
  } = props;
6979
- const [activeTab, setActiveTab] = React12.useState("start");
6980
- const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
6981
- const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
6982
- const isDisabled = (date, type) => {
6983
- const d = date.getTime();
6984
- if (minDate) {
6985
- const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime();
6986
- if (d < min) return true;
6987
- }
6988
- if (maxDate) {
6989
- const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime();
6990
- if (d > max) return true;
6991
- }
6992
- if (type === "end") {
6993
- const start = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate()).getTime();
6994
- if (d < start) return true;
6995
- }
6996
- if (type === "start") {
6997
- const end = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate()).getTime();
6998
- if (d > end) return true;
6999
- }
7000
- return false;
7145
+ const [activeTab, setActiveTab] = React13.useState("start");
7146
+ const handleStartChange = (date) => {
7147
+ if (!date) return;
7148
+ const newStart = date > endDate ? endDate : date;
7149
+ onChange?.({ startDate: newStart, endDate });
7001
7150
  };
7002
- const weekdays = WEEKDAY_LABELS[locale];
7003
- const renderCalendar = (cal, type) => {
7004
- const label = type === "start" ? locale === "ko" ? "\uC2DC\uC791" : "Start" : locale === "ko" ? "\uC885\uB8CC" : "End";
7005
- return /* @__PURE__ */ jsxs202("div", { className: "datepicker-range-panel", children: [
7006
- /* @__PURE__ */ jsx314("span", { className: "datepicker-range-label", children: label }),
7007
- /* @__PURE__ */ jsxs202("div", { className: "datepicker-header", children: [
7008
- /* @__PURE__ */ jsx314(
7009
- "button",
7010
- {
7011
- className: "datepicker-nav",
7012
- onClick: cal.goToPrevMonth,
7013
- type: "button",
7014
- children: /* @__PURE__ */ jsx314(ChevronLeftIcon_default, {})
7015
- }
7016
- ),
7017
- /* @__PURE__ */ jsx314("span", { className: "datepicker-title", children: locale === "ko" ? `${cal.year}\uB144 ${MONTH_LABELS.ko[cal.month]}` : `${MONTH_LABELS.en[cal.month]} ${cal.year}` }),
7018
- /* @__PURE__ */ jsx314(
7019
- "button",
7020
- {
7021
- className: "datepicker-nav",
7022
- onClick: cal.goToNextMonth,
7023
- type: "button",
7024
- children: /* @__PURE__ */ jsx314(ChevronRightIcon_default, {})
7025
- }
7026
- )
7027
- ] }),
7028
- /* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((w, i) => /* @__PURE__ */ jsx314(
7029
- "div",
7030
- {
7031
- className: clsx_default(
7032
- "datepicker-weekday",
7033
- i === 0 && "sunday",
7034
- i === 6 && "saturday"
7035
- ),
7036
- children: w
7037
- },
7038
- w
7039
- )) }),
7040
- /* @__PURE__ */ jsx314("div", { className: "datepicker-grid", children: cal.days.map((day, idx) => {
7041
- const disabled = isDisabled(day.date, type);
7042
- const isStart = isSameDay(day.date, startDate);
7043
- const isEnd = isSameDay(day.date, endDate);
7044
- const inRange = isInRange(day.date, startDate, endDate);
7045
- return /* @__PURE__ */ jsx314(
7046
- RangeDayCell,
7047
- {
7048
- day,
7049
- disabled,
7050
- isStart,
7051
- isEnd,
7052
- inRange,
7053
- onClick: () => {
7054
- if (!disabled && day.isCurrentMonth) {
7055
- if (type === "start") {
7056
- const newStart = day.date > endDate ? endDate : day.date;
7057
- onChange?.({ startDate: newStart, endDate });
7058
- } else {
7059
- const newEnd = day.date < startDate ? startDate : day.date;
7060
- onChange?.({ startDate, endDate: newEnd });
7061
- }
7062
- }
7063
- }
7064
- },
7065
- idx
7066
- );
7067
- }) })
7068
- ] });
7151
+ const handleEndChange = (date) => {
7152
+ if (!date) return;
7153
+ const newEnd = date < startDate ? startDate : date;
7154
+ onChange?.({ startDate, endDate: newEnd });
7069
7155
  };
7070
- return /* @__PURE__ */ jsxs202(
7071
- "div",
7072
- {
7073
- className: clsx_default("lib-xplat-datepicker", "range"),
7074
- children: [
7075
- /* @__PURE__ */ jsxs202("div", { className: "datepicker-range-tabs", children: [
7076
- /* @__PURE__ */ jsx314(
7077
- "button",
7078
- {
7079
- type: "button",
7080
- className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
7081
- onClick: () => setActiveTab("start"),
7082
- children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
7083
- }
7084
- ),
7085
- /* @__PURE__ */ jsx314(
7086
- "button",
7087
- {
7088
- type: "button",
7089
- className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
7090
- onClick: () => setActiveTab("end"),
7091
- children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
7092
- }
7093
- )
7094
- ] }),
7095
- /* @__PURE__ */ jsxs202("div", { className: "datepicker-range-panels", children: [
7096
- renderCalendar(startCal, "start"),
7097
- renderCalendar(endCal, "end")
7098
- ] }),
7099
- /* @__PURE__ */ jsx314("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
7100
- ]
7101
- }
7102
- );
7156
+ const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
7157
+ const endMinDate = minDate && startDate > minDate ? startDate : startDate;
7158
+ return /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
7159
+ /* @__PURE__ */ jsx316("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx316(
7160
+ Tab_default,
7161
+ {
7162
+ activeIndex: activeTab === "start" ? 0 : 1,
7163
+ tabs: [
7164
+ { value: "start", title: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start" },
7165
+ { value: "end", title: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End" }
7166
+ ],
7167
+ onChange: (tab) => setActiveTab(tab.value),
7168
+ type: "toggle",
7169
+ size: "sm"
7170
+ }
7171
+ ) }),
7172
+ /* @__PURE__ */ jsxs203("div", { className: "datepicker-range-panels", children: [
7173
+ /* @__PURE__ */ jsx316(
7174
+ SingleDatePicker_default,
7175
+ {
7176
+ value: startDate,
7177
+ onChange: handleStartChange,
7178
+ minDate,
7179
+ maxDate: startMaxDate,
7180
+ rangeStart: startDate,
7181
+ rangeEnd: endDate,
7182
+ locale
7183
+ }
7184
+ ),
7185
+ /* @__PURE__ */ jsx316(
7186
+ SingleDatePicker_default,
7187
+ {
7188
+ value: endDate,
7189
+ onChange: handleEndChange,
7190
+ minDate: endMinDate,
7191
+ maxDate,
7192
+ rangeStart: startDate,
7193
+ rangeEnd: endDate,
7194
+ locale
7195
+ }
7196
+ )
7197
+ ] }),
7198
+ /* @__PURE__ */ jsx316("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx316(
7199
+ SingleDatePicker_default,
7200
+ {
7201
+ value: startDate,
7202
+ onChange: handleStartChange,
7203
+ minDate,
7204
+ maxDate: startMaxDate,
7205
+ rangeStart: startDate,
7206
+ rangeEnd: endDate,
7207
+ locale
7208
+ }
7209
+ ) : /* @__PURE__ */ jsx316(
7210
+ SingleDatePicker_default,
7211
+ {
7212
+ value: endDate,
7213
+ onChange: handleEndChange,
7214
+ minDate: endMinDate,
7215
+ maxDate,
7216
+ rangeStart: startDate,
7217
+ rangeEnd: endDate,
7218
+ locale
7219
+ }
7220
+ ) })
7221
+ ] });
7103
7222
  };
7104
7223
  RangePicker.displayName = "RangePicker";
7105
7224
  var RangePicker_default = RangePicker;
7106
7225
 
7107
7226
  // src/components/DatePicker/PopupPicker/index.tsx
7108
- import { jsx as jsx315, jsxs as jsxs203 } from "react/jsx-runtime";
7227
+ import { jsx as jsx317, jsxs as jsxs204 } from "react/jsx-runtime";
7109
7228
  var PopupPicker = (props) => {
7110
7229
  const { component, type, locale } = props;
7111
- const [isOpen, setIsOpen] = React13.useState(false);
7230
+ const [isOpen, setIsOpen] = React14.useState(false);
7112
7231
  const handleClick = () => setIsOpen(true);
7113
7232
  const handleClose = () => setIsOpen(false);
7114
7233
  const handleSingleChange = (date) => {
@@ -7116,11 +7235,11 @@ var PopupPicker = (props) => {
7116
7235
  props.onChange?.(date);
7117
7236
  handleClose();
7118
7237
  };
7119
- return /* @__PURE__ */ jsxs203("div", { className: "lib-xplat-popup-datepicker", children: [
7120
- React13.cloneElement(component, { onClick: handleClick }),
7121
- /* @__PURE__ */ jsx315(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
7122
- /* @__PURE__ */ jsxs203("div", { className: "popup-datepicker-content", children: [
7123
- type === "single" && /* @__PURE__ */ jsx315(
7238
+ return /* @__PURE__ */ jsxs204("div", { className: "lib-xplat-popup-datepicker", children: [
7239
+ React14.cloneElement(component, { onClick: handleClick }),
7240
+ /* @__PURE__ */ jsx317(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs204("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
7241
+ /* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-content", children: [
7242
+ type === "single" && /* @__PURE__ */ jsx317(
7124
7243
  SingleDatePicker_default,
7125
7244
  {
7126
7245
  value: props.value,
@@ -7130,7 +7249,7 @@ var PopupPicker = (props) => {
7130
7249
  locale
7131
7250
  }
7132
7251
  ),
7133
- type === "range" && /* @__PURE__ */ jsx315(
7252
+ type === "range" && /* @__PURE__ */ jsx317(
7134
7253
  RangePicker_default,
7135
7254
  {
7136
7255
  startDate: props.startDate,
@@ -7142,8 +7261,8 @@ var PopupPicker = (props) => {
7142
7261
  }
7143
7262
  )
7144
7263
  ] }),
7145
- /* @__PURE__ */ jsxs203("div", { className: "popup-datepicker-footer", children: [
7146
- /* @__PURE__ */ jsx315(
7264
+ /* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-footer", children: [
7265
+ /* @__PURE__ */ jsx317(
7147
7266
  Button_default,
7148
7267
  {
7149
7268
  type: "secondary",
@@ -7151,7 +7270,7 @@ var PopupPicker = (props) => {
7151
7270
  children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
7152
7271
  }
7153
7272
  ),
7154
- /* @__PURE__ */ jsx315(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7273
+ /* @__PURE__ */ jsx317(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
7155
7274
  ] })
7156
7275
  ] }) })
7157
7276
  ] });
@@ -7160,10 +7279,10 @@ PopupPicker.displayName = "PopupPicker";
7160
7279
  var PopupPicker_default = PopupPicker;
7161
7280
 
7162
7281
  // src/components/Divider/Divider.tsx
7163
- import { jsx as jsx316 } from "react/jsx-runtime";
7282
+ import { jsx as jsx318 } from "react/jsx-runtime";
7164
7283
  var Divider = (props) => {
7165
7284
  const { orientation = "horizontal" } = props;
7166
- return /* @__PURE__ */ jsx316(
7285
+ return /* @__PURE__ */ jsx318(
7167
7286
  "div",
7168
7287
  {
7169
7288
  className: clsx_default("lib-xplat-divider", orientation),
@@ -7176,15 +7295,15 @@ Divider.displayName = "Divider";
7176
7295
  var Divider_default = Divider;
7177
7296
 
7178
7297
  // src/components/Drawer/Drawer.tsx
7179
- import React14 from "react";
7298
+ import React15 from "react";
7180
7299
  import { createPortal as createPortal2 } from "react-dom";
7181
- import { jsx as jsx317, jsxs as jsxs204 } from "react/jsx-runtime";
7300
+ import { jsx as jsx319, jsxs as jsxs205 } from "react/jsx-runtime";
7182
7301
  var ANIMATION_DURATION_MS2 = 250;
7183
7302
  var Drawer = (props) => {
7184
7303
  const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
7185
- const [mounted, setMounted] = React14.useState(false);
7186
- const [visible, setVisible] = React14.useState(false);
7187
- React14.useEffect(() => {
7304
+ const [mounted, setMounted] = React15.useState(false);
7305
+ const [visible, setVisible] = React15.useState(false);
7306
+ React15.useEffect(() => {
7188
7307
  if (isOpen) {
7189
7308
  setMounted(true);
7190
7309
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -7199,12 +7318,12 @@ var Drawer = (props) => {
7199
7318
  const stateClass = visible ? "enter" : "exit";
7200
7319
  const widthValue = typeof width === "number" ? `${width}px` : width;
7201
7320
  return createPortal2(
7202
- /* @__PURE__ */ jsx317(
7321
+ /* @__PURE__ */ jsx319(
7203
7322
  "div",
7204
7323
  {
7205
7324
  className: clsx_default("lib-xplat-drawer-overlay", stateClass),
7206
7325
  onClick: onClose,
7207
- children: /* @__PURE__ */ jsxs204(
7326
+ children: /* @__PURE__ */ jsxs205(
7208
7327
  "div",
7209
7328
  {
7210
7329
  className: clsx_default("lib-xplat-drawer", placement, stateClass),
@@ -7213,11 +7332,11 @@ var Drawer = (props) => {
7213
7332
  "aria-modal": "true",
7214
7333
  onClick: (e) => e.stopPropagation(),
7215
7334
  children: [
7216
- title && /* @__PURE__ */ jsxs204("div", { className: "drawer-header", children: [
7217
- /* @__PURE__ */ jsx317("span", { className: "drawer-title", children: title }),
7218
- /* @__PURE__ */ jsx317("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
7335
+ title && /* @__PURE__ */ jsxs205("div", { className: "drawer-header", children: [
7336
+ /* @__PURE__ */ jsx319("span", { className: "drawer-title", children: title }),
7337
+ /* @__PURE__ */ jsx319("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
7219
7338
  ] }),
7220
- /* @__PURE__ */ jsx317("div", { className: "drawer-body", children })
7339
+ /* @__PURE__ */ jsx319("div", { className: "drawer-body", children })
7221
7340
  ]
7222
7341
  }
7223
7342
  )
@@ -7230,16 +7349,16 @@ Drawer.displayName = "Drawer";
7230
7349
  var Drawer_default = Drawer;
7231
7350
 
7232
7351
  // src/components/Dropdown/Dropdown.tsx
7233
- import React16 from "react";
7352
+ import React18 from "react";
7234
7353
 
7235
7354
  // src/tokens/hooks/useAutoPosition.ts
7236
- import React15 from "react";
7355
+ import React16 from "react";
7237
7356
  var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7238
- const [position, setPosition] = React15.useState({
7357
+ const [position, setPosition] = React16.useState({
7239
7358
  position: {},
7240
7359
  direction: "bottom"
7241
7360
  });
7242
- const calculatePosition = React15.useCallback(() => {
7361
+ const calculatePosition = React16.useCallback(() => {
7243
7362
  if (!triggerRef.current || !popRef.current) return;
7244
7363
  const triggerRect = triggerRef.current.getBoundingClientRect();
7245
7364
  const popRect = popRef.current.getBoundingClientRect();
@@ -7261,7 +7380,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7261
7380
  direction
7262
7381
  });
7263
7382
  }, [triggerRef, popRef]);
7264
- React15.useEffect(() => {
7383
+ React16.useEffect(() => {
7265
7384
  calculatePosition();
7266
7385
  window.addEventListener("resize", calculatePosition);
7267
7386
  return () => window.removeEventListener("resize", calculatePosition);
@@ -7270,18 +7389,43 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
7270
7389
  };
7271
7390
  var useAutoPosition_default = useAutoPosition;
7272
7391
 
7392
+ // src/tokens/hooks/useClickOutside.ts
7393
+ import React17 from "react";
7394
+ var useClickOutside = (refs, handler, enabled = true) => {
7395
+ React17.useEffect(() => {
7396
+ if (!enabled) return;
7397
+ const refArray = Array.isArray(refs) ? refs : [refs];
7398
+ const listener = (event) => {
7399
+ const target = event.target;
7400
+ const isInside = refArray.some(
7401
+ (ref) => ref.current && ref.current.contains(target)
7402
+ );
7403
+ if (!isInside) {
7404
+ handler();
7405
+ }
7406
+ };
7407
+ document.addEventListener("mousedown", listener);
7408
+ document.addEventListener("touchstart", listener);
7409
+ return () => {
7410
+ document.removeEventListener("mousedown", listener);
7411
+ document.removeEventListener("touchstart", listener);
7412
+ };
7413
+ }, [refs, handler, enabled]);
7414
+ };
7415
+ var useClickOutside_default = useClickOutside;
7416
+
7273
7417
  // src/components/Dropdown/Dropdown.tsx
7274
- import { jsx as jsx318, jsxs as jsxs205 } from "react/jsx-runtime";
7418
+ import { jsx as jsx320, jsxs as jsxs206 } from "react/jsx-runtime";
7275
7419
  var Dropdown = (props) => {
7276
7420
  const { items, children } = props;
7277
- const [isOpen, setIsOpen] = React16.useState(false);
7278
- const [mounted, setMounted] = React16.useState(false);
7279
- const [visible, setVisible] = React16.useState(false);
7280
- const triggerRef = React16.useRef(null);
7281
- const menuRef = React16.useRef(null);
7421
+ const [isOpen, setIsOpen] = React18.useState(false);
7422
+ const [mounted, setMounted] = React18.useState(false);
7423
+ const [visible, setVisible] = React18.useState(false);
7424
+ const triggerRef = React18.useRef(null);
7425
+ const menuRef = React18.useRef(null);
7282
7426
  const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
7283
7427
  useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
7284
- React16.useEffect(() => {
7428
+ React18.useEffect(() => {
7285
7429
  if (isOpen) {
7286
7430
  setMounted(true);
7287
7431
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -7296,8 +7440,8 @@ var Dropdown = (props) => {
7296
7440
  item.onClick?.();
7297
7441
  setIsOpen(false);
7298
7442
  };
7299
- return /* @__PURE__ */ jsxs205("div", { className: "lib-xplat-dropdown", children: [
7300
- /* @__PURE__ */ jsx318(
7443
+ return /* @__PURE__ */ jsxs206("div", { className: "lib-xplat-dropdown", children: [
7444
+ /* @__PURE__ */ jsx320(
7301
7445
  "div",
7302
7446
  {
7303
7447
  ref: triggerRef,
@@ -7306,14 +7450,14 @@ var Dropdown = (props) => {
7306
7450
  children
7307
7451
  }
7308
7452
  ),
7309
- mounted && /* @__PURE__ */ jsx318(
7453
+ mounted && /* @__PURE__ */ jsx320(
7310
7454
  "div",
7311
7455
  {
7312
7456
  ref: menuRef,
7313
7457
  className: clsx_default("dropdown-menu", direction, { visible }),
7314
7458
  style: { top: position.top, left: position.left },
7315
7459
  role: "menu",
7316
- children: items.map((item) => /* @__PURE__ */ jsx318(
7460
+ children: items.map((item) => /* @__PURE__ */ jsx320(
7317
7461
  "button",
7318
7462
  {
7319
7463
  className: clsx_default("dropdown-item", {
@@ -7335,23 +7479,23 @@ Dropdown.displayName = "Dropdown";
7335
7479
  var Dropdown_default = Dropdown;
7336
7480
 
7337
7481
  // src/components/EmptyState/EmptyState.tsx
7338
- import { jsx as jsx319, jsxs as jsxs206 } from "react/jsx-runtime";
7482
+ import { jsx as jsx321, jsxs as jsxs207 } from "react/jsx-runtime";
7339
7483
  var EmptyState = (props) => {
7340
7484
  const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
7341
- return /* @__PURE__ */ jsxs206("div", { className: "lib-xplat-empty-state", children: [
7342
- icon && /* @__PURE__ */ jsx319("div", { className: "empty-icon", children: icon }),
7343
- !icon && /* @__PURE__ */ jsx319("div", { className: "empty-icon", children: /* @__PURE__ */ jsx319("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx319("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" }) }) }),
7344
- /* @__PURE__ */ jsx319("p", { className: "empty-title", children: title }),
7345
- description && /* @__PURE__ */ jsx319("p", { className: "empty-description", children: description }),
7346
- action && /* @__PURE__ */ jsx319("div", { className: "empty-action", children: action })
7485
+ return /* @__PURE__ */ jsxs207("div", { className: "lib-xplat-empty-state", children: [
7486
+ icon && /* @__PURE__ */ jsx321("div", { className: "empty-icon", children: icon }),
7487
+ !icon && /* @__PURE__ */ jsx321("div", { className: "empty-icon", children: /* @__PURE__ */ jsx321("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx321("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" }) }) }),
7488
+ /* @__PURE__ */ jsx321("p", { className: "empty-title", children: title }),
7489
+ description && /* @__PURE__ */ jsx321("p", { className: "empty-description", children: description }),
7490
+ action && /* @__PURE__ */ jsx321("div", { className: "empty-action", children: action })
7347
7491
  ] });
7348
7492
  };
7349
7493
  EmptyState.displayName = "EmptyState";
7350
7494
  var EmptyState_default = EmptyState;
7351
7495
 
7352
7496
  // src/components/FileUpload/FileUpload.tsx
7353
- import React17 from "react";
7354
- import { jsx as jsx320, jsxs as jsxs207 } from "react/jsx-runtime";
7497
+ import React19 from "react";
7498
+ import { jsx as jsx322, jsxs as jsxs208 } from "react/jsx-runtime";
7355
7499
  var FileUpload = (props) => {
7356
7500
  const {
7357
7501
  accept,
@@ -7361,8 +7505,8 @@ var FileUpload = (props) => {
7361
7505
  label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
7362
7506
  description
7363
7507
  } = props;
7364
- const [isDragOver, setIsDragOver] = React17.useState(false);
7365
- const inputRef = React17.useRef(null);
7508
+ const [isDragOver, setIsDragOver] = React19.useState(false);
7509
+ const inputRef = React19.useRef(null);
7366
7510
  const handleFiles = (fileList) => {
7367
7511
  let files = Array.from(fileList);
7368
7512
  if (maxSize) {
@@ -7392,7 +7536,7 @@ var FileUpload = (props) => {
7392
7536
  handleFiles(e.target.files);
7393
7537
  }
7394
7538
  };
7395
- return /* @__PURE__ */ jsxs207(
7539
+ return /* @__PURE__ */ jsxs208(
7396
7540
  "div",
7397
7541
  {
7398
7542
  className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
@@ -7401,7 +7545,7 @@ var FileUpload = (props) => {
7401
7545
  onDragLeave: handleDragLeave,
7402
7546
  onClick: () => inputRef.current?.click(),
7403
7547
  children: [
7404
- /* @__PURE__ */ jsx320(
7548
+ /* @__PURE__ */ jsx322(
7405
7549
  "input",
7406
7550
  {
7407
7551
  ref: inputRef,
@@ -7411,9 +7555,9 @@ var FileUpload = (props) => {
7411
7555
  onChange: handleChange
7412
7556
  }
7413
7557
  ),
7414
- /* @__PURE__ */ jsx320("div", { className: "upload-icon", children: /* @__PURE__ */ jsx320(UploadIcon_default, {}) }),
7415
- /* @__PURE__ */ jsx320("p", { className: "upload-label", children: label }),
7416
- description && /* @__PURE__ */ jsx320("p", { className: "upload-description", children: description })
7558
+ /* @__PURE__ */ jsx322("div", { className: "upload-icon", children: /* @__PURE__ */ jsx322(UploadIcon_default, {}) }),
7559
+ /* @__PURE__ */ jsx322("p", { className: "upload-label", children: label }),
7560
+ description && /* @__PURE__ */ jsx322("p", { className: "upload-description", children: description })
7417
7561
  ]
7418
7562
  }
7419
7563
  );
@@ -7422,10 +7566,10 @@ FileUpload.displayName = "FileUpload";
7422
7566
  var FileUpload_default = FileUpload;
7423
7567
 
7424
7568
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
7425
- import React19 from "react";
7569
+ import React21 from "react";
7426
7570
 
7427
7571
  // src/components/HtmlTypeWriter/utils.ts
7428
- import React18 from "react";
7572
+ import React20 from "react";
7429
7573
  var voidTags = /* @__PURE__ */ new Set([
7430
7574
  "br",
7431
7575
  "img",
@@ -7493,41 +7637,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
7493
7637
  props[attr.name] = attr.value;
7494
7638
  });
7495
7639
  if (voidTags.has(tag)) {
7496
- return React18.createElement(tag, props);
7640
+ return React20.createElement(tag, props);
7497
7641
  }
7498
7642
  const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
7499
- return React18.createElement(tag, props, ...children);
7643
+ return React20.createElement(tag, props, ...children);
7500
7644
  };
7501
7645
  var htmlToReactProgressive = (root, typedLen, rangeMap) => {
7502
7646
  const nodes = Array.from(root.childNodes).map((child, idx) => {
7503
7647
  const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
7504
- return node == null ? null : React18.createElement(React18.Fragment, { key: idx }, node);
7648
+ return node == null ? null : React20.createElement(React20.Fragment, { key: idx }, node);
7505
7649
  }).filter(Boolean);
7506
7650
  return nodes.length === 0 ? null : nodes;
7507
7651
  };
7508
7652
 
7509
7653
  // src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
7510
- import { jsx as jsx321 } from "react/jsx-runtime";
7654
+ import { jsx as jsx323 } from "react/jsx-runtime";
7511
7655
  var HtmlTypeWriter = ({
7512
7656
  html,
7513
7657
  duration = 20,
7514
7658
  onDone,
7515
7659
  onChange
7516
7660
  }) => {
7517
- const [typedLen, setTypedLen] = React19.useState(0);
7518
- const doneCalledRef = React19.useRef(false);
7519
- const { doc, rangeMap, totalLength } = React19.useMemo(() => {
7661
+ const [typedLen, setTypedLen] = React21.useState(0);
7662
+ const doneCalledRef = React21.useRef(false);
7663
+ const { doc, rangeMap, totalLength } = React21.useMemo(() => {
7520
7664
  if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
7521
7665
  const decoded = decodeHtmlEntities(html);
7522
7666
  const doc2 = new DOMParser().parseFromString(decoded, "text/html");
7523
7667
  const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
7524
7668
  return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
7525
7669
  }, [html]);
7526
- React19.useEffect(() => {
7670
+ React21.useEffect(() => {
7527
7671
  setTypedLen(0);
7528
7672
  doneCalledRef.current = false;
7529
7673
  }, [html]);
7530
- React19.useEffect(() => {
7674
+ React21.useEffect(() => {
7531
7675
  if (!totalLength) return;
7532
7676
  if (typedLen >= totalLength) return;
7533
7677
  const timer = window.setInterval(() => {
@@ -7535,33 +7679,33 @@ var HtmlTypeWriter = ({
7535
7679
  }, duration);
7536
7680
  return () => window.clearInterval(timer);
7537
7681
  }, [typedLen, totalLength, duration]);
7538
- React19.useEffect(() => {
7682
+ React21.useEffect(() => {
7539
7683
  if (typedLen > 0 && typedLen < totalLength) {
7540
7684
  onChange?.();
7541
7685
  }
7542
7686
  }, [typedLen, totalLength, onChange]);
7543
- React19.useEffect(() => {
7687
+ React21.useEffect(() => {
7544
7688
  if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
7545
7689
  doneCalledRef.current = true;
7546
7690
  onDone?.();
7547
7691
  }
7548
7692
  }, [typedLen, totalLength, onDone]);
7549
- const parsed = React19.useMemo(
7693
+ const parsed = React21.useMemo(
7550
7694
  () => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
7551
7695
  [doc, typedLen, rangeMap]
7552
7696
  );
7553
- return /* @__PURE__ */ jsx321("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
7697
+ return /* @__PURE__ */ jsx323("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
7554
7698
  };
7555
7699
  HtmlTypeWriter.displayName = "HtmlTypeWriter";
7556
7700
  var HtmlTypeWriter_default = HtmlTypeWriter;
7557
7701
 
7558
7702
  // src/components/ImageSelector/ImageSelector.tsx
7559
- import React20 from "react";
7560
- import { jsx as jsx322, jsxs as jsxs208 } from "react/jsx-runtime";
7703
+ import React22 from "react";
7704
+ import { jsx as jsx324, jsxs as jsxs209 } from "react/jsx-runtime";
7561
7705
  var ImageSelector = (props) => {
7562
7706
  const { value, label, onChange } = props;
7563
- const [previewUrl, setPreviewUrl] = React20.useState();
7564
- React20.useEffect(() => {
7707
+ const [previewUrl, setPreviewUrl] = React22.useState();
7708
+ React22.useEffect(() => {
7565
7709
  if (!value) {
7566
7710
  setPreviewUrl(void 0);
7567
7711
  return;
@@ -7570,7 +7714,7 @@ var ImageSelector = (props) => {
7570
7714
  setPreviewUrl(url);
7571
7715
  return () => URL.revokeObjectURL(url);
7572
7716
  }, [value]);
7573
- const inputRef = React20.useRef(null);
7717
+ const inputRef = React22.useRef(null);
7574
7718
  const handleFileChange = (e) => {
7575
7719
  const selectedFile = e.target.files?.[0];
7576
7720
  if (selectedFile) {
@@ -7583,8 +7727,8 @@ var ImageSelector = (props) => {
7583
7727
  const handleOpenFileDialog = () => {
7584
7728
  inputRef.current?.click();
7585
7729
  };
7586
- return /* @__PURE__ */ jsxs208("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
7587
- /* @__PURE__ */ jsx322(
7730
+ return /* @__PURE__ */ jsxs209("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
7731
+ /* @__PURE__ */ jsx324(
7588
7732
  "input",
7589
7733
  {
7590
7734
  type: "file",
@@ -7594,13 +7738,13 @@ var ImageSelector = (props) => {
7594
7738
  ref: inputRef
7595
7739
  }
7596
7740
  ),
7597
- value && /* @__PURE__ */ jsxs208("div", { className: "action-bar", children: [
7598
- /* @__PURE__ */ jsx322("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx322(UploadIcon_default, {}) }),
7599
- /* @__PURE__ */ jsx322("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx322(DeleteIcon_default, {}) })
7741
+ value && /* @__PURE__ */ jsxs209("div", { className: "action-bar", children: [
7742
+ /* @__PURE__ */ jsx324("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx324(UploadIcon_default, {}) }),
7743
+ /* @__PURE__ */ jsx324("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx324(DeleteIcon_default, {}) })
7600
7744
  ] }),
7601
- /* @__PURE__ */ jsx322("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx322("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs208("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
7602
- /* @__PURE__ */ jsx322("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx322(ImageIcon_default, {}) }),
7603
- /* @__PURE__ */ jsx322("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
7745
+ /* @__PURE__ */ jsx324("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx324("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs209("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
7746
+ /* @__PURE__ */ jsx324("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx324(ImageIcon_default, {}) }),
7747
+ /* @__PURE__ */ jsx324("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
7604
7748
  ] }) })
7605
7749
  ] });
7606
7750
  };
@@ -7608,7 +7752,7 @@ ImageSelector.displayName = "ImageSelector";
7608
7752
  var ImageSelector_default = ImageSelector;
7609
7753
 
7610
7754
  // src/components/Pagination/Pagination.tsx
7611
- import { jsx as jsx323, jsxs as jsxs209 } from "react/jsx-runtime";
7755
+ import { jsx as jsx325, jsxs as jsxs210 } from "react/jsx-runtime";
7612
7756
  var getPageRange = (current, totalPages, siblingCount) => {
7613
7757
  const totalNumbers = siblingCount * 2 + 5;
7614
7758
  if (totalPages <= totalNumbers) {
@@ -7651,19 +7795,19 @@ var Pagination = (props) => {
7651
7795
  onChange?.(page);
7652
7796
  }
7653
7797
  };
7654
- return /* @__PURE__ */ jsxs209("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
7655
- /* @__PURE__ */ jsx323(
7798
+ return /* @__PURE__ */ jsxs210("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
7799
+ /* @__PURE__ */ jsx325(
7656
7800
  "button",
7657
7801
  {
7658
7802
  className: "page-btn prev",
7659
7803
  disabled: current <= 1,
7660
7804
  onClick: () => handleClick(current - 1),
7661
7805
  "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
7662
- children: /* @__PURE__ */ jsx323(ChevronLeftIcon_default, {})
7806
+ children: /* @__PURE__ */ jsx325(ChevronLeftIcon_default, {})
7663
7807
  }
7664
7808
  ),
7665
7809
  pages.map(
7666
- (page, i) => page === "..." ? /* @__PURE__ */ jsx323("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx323(
7810
+ (page, i) => page === "..." ? /* @__PURE__ */ jsx325("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx325(
7667
7811
  "button",
7668
7812
  {
7669
7813
  className: clsx_default("page-btn", { active: page === current }),
@@ -7674,14 +7818,14 @@ var Pagination = (props) => {
7674
7818
  page
7675
7819
  )
7676
7820
  ),
7677
- /* @__PURE__ */ jsx323(
7821
+ /* @__PURE__ */ jsx325(
7678
7822
  "button",
7679
7823
  {
7680
7824
  className: "page-btn next",
7681
7825
  disabled: current >= totalPages,
7682
7826
  onClick: () => handleClick(current + 1),
7683
7827
  "aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
7684
- children: /* @__PURE__ */ jsx323(ChevronRightIcon_default, {})
7828
+ children: /* @__PURE__ */ jsx325(ChevronRightIcon_default, {})
7685
7829
  }
7686
7830
  )
7687
7831
  ] });
@@ -7690,17 +7834,17 @@ Pagination.displayName = "Pagination";
7690
7834
  var Pagination_default = Pagination;
7691
7835
 
7692
7836
  // src/components/PopOver/PopOver.tsx
7693
- import React21 from "react";
7694
- import { jsx as jsx324, jsxs as jsxs210 } from "react/jsx-runtime";
7837
+ import React23 from "react";
7838
+ import { jsx as jsx326, jsxs as jsxs211 } from "react/jsx-runtime";
7695
7839
  var PopOver = (props) => {
7696
7840
  const { children, isOpen, onClose, PopOverEl } = props;
7697
- const popRef = React21.useRef(null);
7698
- const triggerRef = React21.useRef(null);
7699
- const [localOpen, setLocalOpen] = React21.useState(false);
7700
- const [eventTrigger, setEventTrigger] = React21.useState(false);
7841
+ const popRef = React23.useRef(null);
7842
+ const triggerRef = React23.useRef(null);
7843
+ const [localOpen, setLocalOpen] = React23.useState(false);
7844
+ const [eventTrigger, setEventTrigger] = React23.useState(false);
7701
7845
  useClickOutside_default([popRef, triggerRef], onClose, isOpen);
7702
7846
  const position = useAutoPosition_default(triggerRef, popRef, localOpen);
7703
- React21.useEffect(() => {
7847
+ React23.useEffect(() => {
7704
7848
  if (isOpen) {
7705
7849
  setLocalOpen(isOpen);
7706
7850
  setTimeout(() => {
@@ -7713,7 +7857,7 @@ var PopOver = (props) => {
7713
7857
  }, 200);
7714
7858
  }
7715
7859
  }, [isOpen]);
7716
- return /* @__PURE__ */ jsxs210(
7860
+ return /* @__PURE__ */ jsxs211(
7717
7861
  "div",
7718
7862
  {
7719
7863
  className: "lib-xplat-pop-over",
@@ -7723,7 +7867,7 @@ var PopOver = (props) => {
7723
7867
  },
7724
7868
  children: [
7725
7869
  children,
7726
- localOpen && /* @__PURE__ */ jsx324(
7870
+ localOpen && /* @__PURE__ */ jsx326(
7727
7871
  "div",
7728
7872
  {
7729
7873
  className: clsx_default(
@@ -7746,7 +7890,7 @@ PopOver.displayName = "PopOver";
7746
7890
  var PopOver_default = PopOver;
7747
7891
 
7748
7892
  // src/components/Progress/Progress.tsx
7749
- import { jsx as jsx325, jsxs as jsxs211 } from "react/jsx-runtime";
7893
+ import { jsx as jsx327, jsxs as jsxs212 } from "react/jsx-runtime";
7750
7894
  var Progress = (props) => {
7751
7895
  const {
7752
7896
  value,
@@ -7756,8 +7900,8 @@ var Progress = (props) => {
7756
7900
  showLabel = false
7757
7901
  } = props;
7758
7902
  const percentage = Math.min(100, Math.max(0, value / max * 100));
7759
- return /* @__PURE__ */ jsxs211("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
7760
- /* @__PURE__ */ jsx325(
7903
+ return /* @__PURE__ */ jsxs212("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
7904
+ /* @__PURE__ */ jsx327(
7761
7905
  "div",
7762
7906
  {
7763
7907
  className: "track",
@@ -7765,7 +7909,7 @@ var Progress = (props) => {
7765
7909
  "aria-valuenow": value,
7766
7910
  "aria-valuemin": 0,
7767
7911
  "aria-valuemax": max,
7768
- children: /* @__PURE__ */ jsx325(
7912
+ children: /* @__PURE__ */ jsx327(
7769
7913
  "div",
7770
7914
  {
7771
7915
  className: "bar",
@@ -7774,7 +7918,7 @@ var Progress = (props) => {
7774
7918
  )
7775
7919
  }
7776
7920
  ),
7777
- showLabel && /* @__PURE__ */ jsxs211("span", { className: "label", children: [
7921
+ showLabel && /* @__PURE__ */ jsxs212("span", { className: "label", children: [
7778
7922
  Math.round(percentage),
7779
7923
  "%"
7780
7924
  ] })
@@ -7784,17 +7928,17 @@ Progress.displayName = "Progress";
7784
7928
  var Progress_default = Progress;
7785
7929
 
7786
7930
  // src/components/Radio/RadioGroupContext.tsx
7787
- import React22 from "react";
7788
- var RadioGroupContext = React22.createContext(
7931
+ import React24 from "react";
7932
+ var RadioGroupContext = React24.createContext(
7789
7933
  null
7790
7934
  );
7791
7935
  var useRadioGroupContext = () => {
7792
- return React22.useContext(RadioGroupContext);
7936
+ return React24.useContext(RadioGroupContext);
7793
7937
  };
7794
7938
  var RadioGroupContext_default = RadioGroupContext;
7795
7939
 
7796
7940
  // src/components/Radio/Radio.tsx
7797
- import { jsx as jsx326, jsxs as jsxs212 } from "react/jsx-runtime";
7941
+ import { jsx as jsx328, jsxs as jsxs213 } from "react/jsx-runtime";
7798
7942
  var Radio = (props) => {
7799
7943
  const {
7800
7944
  label,
@@ -7812,7 +7956,7 @@ var Radio = (props) => {
7812
7956
  value,
7813
7957
  onChange: rest.onChange
7814
7958
  };
7815
- return /* @__PURE__ */ jsxs212(
7959
+ return /* @__PURE__ */ jsxs213(
7816
7960
  "label",
7817
7961
  {
7818
7962
  className: clsx_default(
@@ -7822,18 +7966,18 @@ var Radio = (props) => {
7822
7966
  localChecked ? "checked" : void 0
7823
7967
  ),
7824
7968
  children: [
7825
- /* @__PURE__ */ jsx326("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
7826
- /* @__PURE__ */ jsx326(
7969
+ /* @__PURE__ */ jsx328("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
7970
+ /* @__PURE__ */ jsx328(
7827
7971
  "div",
7828
7972
  {
7829
7973
  className: clsx_default(
7830
7974
  "circle",
7831
7975
  localChecked ? "checked" : void 0
7832
7976
  ),
7833
- children: localChecked && /* @__PURE__ */ jsx326("div", { className: "inner-circle" })
7977
+ children: localChecked && /* @__PURE__ */ jsx328("div", { className: "inner-circle" })
7834
7978
  }
7835
7979
  ),
7836
- label && /* @__PURE__ */ jsx326("span", { children: label })
7980
+ label && /* @__PURE__ */ jsx328("span", { children: label })
7837
7981
  ]
7838
7982
  }
7839
7983
  );
@@ -7842,28 +7986,28 @@ Radio.displayName = "Radio";
7842
7986
  var Radio_default = Radio;
7843
7987
 
7844
7988
  // src/components/Radio/RadioGroup.tsx
7845
- import { Fragment as Fragment3, jsx as jsx327 } from "react/jsx-runtime";
7989
+ import { Fragment as Fragment3, jsx as jsx329 } from "react/jsx-runtime";
7846
7990
  var RadioGroup = (props) => {
7847
7991
  const { children, ...rest } = props;
7848
- return /* @__PURE__ */ jsx327(Fragment3, { children: /* @__PURE__ */ jsx327(RadioGroupContext_default.Provider, { value: rest, children }) });
7992
+ return /* @__PURE__ */ jsx329(Fragment3, { children: /* @__PURE__ */ jsx329(RadioGroupContext_default.Provider, { value: rest, children }) });
7849
7993
  };
7850
7994
  RadioGroup.displayName = "RadioGroup";
7851
7995
  var RadioGroup_default = RadioGroup;
7852
7996
 
7853
7997
  // src/components/Select/Select.tsx
7854
- import React25 from "react";
7998
+ import React27 from "react";
7855
7999
 
7856
8000
  // src/components/Select/context.ts
7857
- import React23 from "react";
7858
- var SelectContext = React23.createContext(null);
8001
+ import React25 from "react";
8002
+ var SelectContext = React25.createContext(null);
7859
8003
  var context_default = SelectContext;
7860
8004
 
7861
8005
  // src/components/Select/SelectItem.tsx
7862
- import React24 from "react";
7863
- import { jsx as jsx328 } from "react/jsx-runtime";
8006
+ import React26 from "react";
8007
+ import { jsx as jsx330 } from "react/jsx-runtime";
7864
8008
  var SelectItem = (props) => {
7865
8009
  const { children, value, onClick, disabled = false } = props;
7866
- const ctx = React24.useContext(context_default);
8010
+ const ctx = React26.useContext(context_default);
7867
8011
  const handleClick = (e) => {
7868
8012
  e.preventDefault();
7869
8013
  e.stopPropagation();
@@ -7872,7 +8016,7 @@ var SelectItem = (props) => {
7872
8016
  ctx?.close();
7873
8017
  onClick?.();
7874
8018
  };
7875
- return /* @__PURE__ */ jsx328(
8019
+ return /* @__PURE__ */ jsx330(
7876
8020
  "div",
7877
8021
  {
7878
8022
  className: clsx_default("select-item", disabled && "disabled"),
@@ -7893,7 +8037,7 @@ SelectItem.displayName = "Select.Item";
7893
8037
  var SelectItem_default = SelectItem;
7894
8038
 
7895
8039
  // src/components/Select/Select.tsx
7896
- import { jsx as jsx329, jsxs as jsxs213 } from "react/jsx-runtime";
8040
+ import { jsx as jsx331, jsxs as jsxs214 } from "react/jsx-runtime";
7897
8041
  var ANIMATION_DURATION_MS3 = 200;
7898
8042
  var SelectRoot = (props) => {
7899
8043
  const {
@@ -7905,26 +8049,26 @@ var SelectRoot = (props) => {
7905
8049
  error = false,
7906
8050
  size = "md"
7907
8051
  } = props;
7908
- const itemChildren = React25.Children.toArray(children).filter(
7909
- (child) => React25.isValidElement(child) && child.type === SelectItem_default
8052
+ const itemChildren = React27.Children.toArray(children).filter(
8053
+ (child) => React27.isValidElement(child) && child.type === SelectItem_default
7910
8054
  );
7911
8055
  const isControlled = valueProp !== void 0;
7912
- const [isOpen, setOpen] = React25.useState(false);
7913
- const [uncontrolledLabel, setUncontrolledLabel] = React25.useState(null);
7914
- const controlledLabel = React25.useMemo(() => {
8056
+ const [isOpen, setOpen] = React27.useState(false);
8057
+ const [uncontrolledLabel, setUncontrolledLabel] = React27.useState(null);
8058
+ const controlledLabel = React27.useMemo(() => {
7915
8059
  if (!isControlled) return null;
7916
8060
  const match = itemChildren.find((child) => child.props.value === valueProp);
7917
8061
  return match ? match.props.children : null;
7918
8062
  }, [isControlled, valueProp, itemChildren]);
7919
8063
  const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
7920
- const triggerRef = React25.useRef(null);
7921
- const contentRef = React25.useRef(null);
7922
- const [mounted, setMounted] = React25.useState(false);
7923
- const [visible, setVisible] = React25.useState(false);
7924
- React25.useEffect(() => {
8064
+ const triggerRef = React27.useRef(null);
8065
+ const contentRef = React27.useRef(null);
8066
+ const [mounted, setMounted] = React27.useState(false);
8067
+ const [visible, setVisible] = React27.useState(false);
8068
+ React27.useEffect(() => {
7925
8069
  if (disabled && isOpen) setOpen(false);
7926
8070
  }, [disabled, isOpen]);
7927
- React25.useEffect(() => {
8071
+ React27.useEffect(() => {
7928
8072
  if (isOpen) {
7929
8073
  setMounted(true);
7930
8074
  const t2 = setTimeout(() => setVisible(true), 1);
@@ -7934,12 +8078,12 @@ var SelectRoot = (props) => {
7934
8078
  const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
7935
8079
  return () => clearTimeout(t);
7936
8080
  }, [isOpen]);
7937
- const open = React25.useCallback(() => setOpen(true), []);
7938
- const close = React25.useCallback(() => setOpen(false), []);
7939
- const toggle = React25.useCallback(() => setOpen((prev) => !prev), []);
8081
+ const open = React27.useCallback(() => setOpen(true), []);
8082
+ const close = React27.useCallback(() => setOpen(false), []);
8083
+ const toggle = React27.useCallback(() => setOpen((prev) => !prev), []);
7940
8084
  useClickOutside_default([contentRef, triggerRef], close, isOpen);
7941
8085
  const position = useAutoPosition_default(triggerRef, contentRef, mounted);
7942
- const setSelected = React25.useCallback(
8086
+ const setSelected = React27.useCallback(
7943
8087
  (label, itemValue) => {
7944
8088
  if (!isControlled) {
7945
8089
  setUncontrolledLabel(label);
@@ -7948,7 +8092,7 @@ var SelectRoot = (props) => {
7948
8092
  },
7949
8093
  [isControlled, onChange]
7950
8094
  );
7951
- const ctxValue = React25.useMemo(
8095
+ const ctxValue = React27.useMemo(
7952
8096
  () => ({
7953
8097
  isOpen,
7954
8098
  mounted,
@@ -7969,7 +8113,7 @@ var SelectRoot = (props) => {
7969
8113
  if (disabled) return;
7970
8114
  toggle();
7971
8115
  };
7972
- return /* @__PURE__ */ jsx329(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs213(
8116
+ return /* @__PURE__ */ jsx331(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs214(
7973
8117
  "div",
7974
8118
  {
7975
8119
  className: clsx_default(
@@ -7980,7 +8124,7 @@ var SelectRoot = (props) => {
7980
8124
  mounted && "is-open"
7981
8125
  ),
7982
8126
  children: [
7983
- /* @__PURE__ */ jsxs213(
8127
+ /* @__PURE__ */ jsxs214(
7984
8128
  "div",
7985
8129
  {
7986
8130
  ref: triggerRef,
@@ -8004,7 +8148,7 @@ var SelectRoot = (props) => {
8004
8148
  }
8005
8149
  },
8006
8150
  children: [
8007
- /* @__PURE__ */ jsx329(
8151
+ /* @__PURE__ */ jsx331(
8008
8152
  "span",
8009
8153
  {
8010
8154
  className: clsx_default(
@@ -8014,18 +8158,18 @@ var SelectRoot = (props) => {
8014
8158
  children: selectedLabel ?? placeholder
8015
8159
  }
8016
8160
  ),
8017
- /* @__PURE__ */ jsx329(
8161
+ /* @__PURE__ */ jsx331(
8018
8162
  "span",
8019
8163
  {
8020
8164
  className: clsx_default("select-trigger-icon", isOpen && "open"),
8021
8165
  "aria-hidden": true,
8022
- children: /* @__PURE__ */ jsx329(ChevronDownIcon_default, {})
8166
+ children: /* @__PURE__ */ jsx331(ChevronDownIcon_default, {})
8023
8167
  }
8024
8168
  )
8025
8169
  ]
8026
8170
  }
8027
8171
  ),
8028
- mounted && /* @__PURE__ */ jsx329(
8172
+ mounted && /* @__PURE__ */ jsx331(
8029
8173
  "div",
8030
8174
  {
8031
8175
  className: clsx_default("select-content", position.direction, stateClass),
@@ -8046,14 +8190,14 @@ var Select = Object.assign(SelectRoot, {
8046
8190
  var Select_default = Select;
8047
8191
 
8048
8192
  // src/components/Skeleton/Skeleton.tsx
8049
- import { jsx as jsx330 } from "react/jsx-runtime";
8193
+ import { jsx as jsx332 } from "react/jsx-runtime";
8050
8194
  var Skeleton = (props) => {
8051
8195
  const { variant = "text", width, height } = props;
8052
8196
  const style = {
8053
8197
  width: typeof width === "number" ? `${width}px` : width,
8054
8198
  height: typeof height === "number" ? `${height}px` : height
8055
8199
  };
8056
- return /* @__PURE__ */ jsx330(
8200
+ return /* @__PURE__ */ jsx332(
8057
8201
  "div",
8058
8202
  {
8059
8203
  className: clsx_default("lib-xplat-skeleton", variant),
@@ -8066,20 +8210,20 @@ Skeleton.displayName = "Skeleton";
8066
8210
  var Skeleton_default = Skeleton;
8067
8211
 
8068
8212
  // src/components/Spinner/Spinner.tsx
8069
- import { jsx as jsx331, jsxs as jsxs214 } from "react/jsx-runtime";
8213
+ import { jsx as jsx333, jsxs as jsxs215 } from "react/jsx-runtime";
8070
8214
  var Spinner = (props) => {
8071
8215
  const {
8072
8216
  size = "md",
8073
8217
  type = "brand"
8074
8218
  } = props;
8075
- return /* @__PURE__ */ jsx331(
8219
+ return /* @__PURE__ */ jsx333(
8076
8220
  "div",
8077
8221
  {
8078
8222
  className: clsx_default("lib-xplat-spinner", size, type),
8079
8223
  role: "status",
8080
8224
  "aria-label": "\uB85C\uB529 \uC911",
8081
- children: /* @__PURE__ */ jsxs214("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8082
- /* @__PURE__ */ jsx331(
8225
+ children: /* @__PURE__ */ jsxs215("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8226
+ /* @__PURE__ */ jsx333(
8083
8227
  "circle",
8084
8228
  {
8085
8229
  className: "track",
@@ -8089,7 +8233,7 @@ var Spinner = (props) => {
8089
8233
  strokeWidth: "3"
8090
8234
  }
8091
8235
  ),
8092
- /* @__PURE__ */ jsx331(
8236
+ /* @__PURE__ */ jsx333(
8093
8237
  "circle",
8094
8238
  {
8095
8239
  className: "indicator",
@@ -8108,20 +8252,20 @@ Spinner.displayName = "Spinner";
8108
8252
  var Spinner_default = Spinner;
8109
8253
 
8110
8254
  // src/components/Steps/Steps.tsx
8111
- import { jsx as jsx332, jsxs as jsxs215 } from "react/jsx-runtime";
8255
+ import { jsx as jsx334, jsxs as jsxs216 } from "react/jsx-runtime";
8112
8256
  var Steps = (props) => {
8113
8257
  const {
8114
8258
  items,
8115
8259
  current,
8116
8260
  type = "brand"
8117
8261
  } = props;
8118
- return /* @__PURE__ */ jsx332("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
8262
+ return /* @__PURE__ */ jsx334("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
8119
8263
  const status = index < current ? "completed" : index === current ? "active" : "pending";
8120
- return /* @__PURE__ */ jsxs215("div", { className: clsx_default("step-item", status), children: [
8121
- /* @__PURE__ */ jsx332("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx332(CheckIcon_default, {}) : /* @__PURE__ */ jsx332("span", { children: index + 1 }) }),
8122
- /* @__PURE__ */ jsxs215("div", { className: "step-content", children: [
8123
- /* @__PURE__ */ jsx332("span", { className: "step-title", children: item.title }),
8124
- item.description && /* @__PURE__ */ jsx332("span", { className: "step-description", children: item.description })
8264
+ return /* @__PURE__ */ jsxs216("div", { className: clsx_default("step-item", status), children: [
8265
+ /* @__PURE__ */ jsx334("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx334(CheckIcon_default, {}) : /* @__PURE__ */ jsx334("span", { children: index + 1 }) }),
8266
+ /* @__PURE__ */ jsxs216("div", { className: "step-content", children: [
8267
+ /* @__PURE__ */ jsx334("span", { className: "step-title", children: item.title }),
8268
+ item.description && /* @__PURE__ */ jsx334("span", { className: "step-description", children: item.description })
8125
8269
  ] })
8126
8270
  ] }, index);
8127
8271
  }) });
@@ -8130,8 +8274,8 @@ Steps.displayName = "Steps";
8130
8274
  var Steps_default = Steps;
8131
8275
 
8132
8276
  // src/components/Swiper/Swiper.tsx
8133
- import React26 from "react";
8134
- import { jsx as jsx333, jsxs as jsxs216 } from "react/jsx-runtime";
8277
+ import React28 from "react";
8278
+ import { jsx as jsx335, jsxs as jsxs217 } from "react/jsx-runtime";
8135
8279
  var Swiper = (props) => {
8136
8280
  const {
8137
8281
  auto = false,
@@ -8154,23 +8298,23 @@ var Swiper = (props) => {
8154
8298
  const maxIndex = Math.max(0, totalSlides - viewItemCount);
8155
8299
  const useLoop = loop && canSlide;
8156
8300
  const cloneCount = useLoop ? totalSlides : 0;
8157
- const extendedItems = React26.useMemo(() => {
8301
+ const extendedItems = React28.useMemo(() => {
8158
8302
  if (!useLoop) return items;
8159
8303
  return [...items, ...items, ...items];
8160
8304
  }, [items, useLoop]);
8161
8305
  const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
8162
- const [innerIndex, setInnerIndex] = React26.useState(
8306
+ const [innerIndex, setInnerIndex] = React28.useState(
8163
8307
  useLoop ? cloneCount + initialIdx : initialIdx
8164
8308
  );
8165
- const [isDragging, setIsDragging] = React26.useState(false);
8166
- const [dragOffset, setDragOffset] = React26.useState(0);
8167
- const [animated, setAnimated] = React26.useState(true);
8168
- const [containerWidth, setContainerWidth] = React26.useState(0);
8169
- const containerRef = React26.useRef(null);
8170
- const startXRef = React26.useRef(0);
8171
- const startTimeRef = React26.useRef(0);
8172
- const autoplayTimerRef = React26.useRef(null);
8173
- React26.useEffect(() => {
8309
+ const [isDragging, setIsDragging] = React28.useState(false);
8310
+ const [dragOffset, setDragOffset] = React28.useState(0);
8311
+ const [animated, setAnimated] = React28.useState(true);
8312
+ const [containerWidth, setContainerWidth] = React28.useState(0);
8313
+ const containerRef = React28.useRef(null);
8314
+ const startXRef = React28.useRef(0);
8315
+ const startTimeRef = React28.useRef(0);
8316
+ const autoplayTimerRef = React28.useRef(null);
8317
+ React28.useEffect(() => {
8174
8318
  const el = containerRef.current;
8175
8319
  if (!el) return;
8176
8320
  const ro = new ResizeObserver((entries) => {
@@ -8189,7 +8333,7 @@ var Swiper = (props) => {
8189
8333
  return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
8190
8334
  };
8191
8335
  const realIndex = getRealIndex(innerIndex);
8192
- const moveToInner = React26.useCallback(
8336
+ const moveToInner = React28.useCallback(
8193
8337
  (idx, withAnim = true) => {
8194
8338
  if (!useLoop) {
8195
8339
  setAnimated(withAnim);
@@ -8217,7 +8361,7 @@ var Swiper = (props) => {
8217
8361
  },
8218
8362
  [useLoop, cloneCount, totalSlides]
8219
8363
  );
8220
- const handleTransitionEnd = React26.useCallback(() => {
8364
+ const handleTransitionEnd = React28.useCallback(() => {
8221
8365
  if (!useLoop) return;
8222
8366
  const real = getRealIndex(innerIndex);
8223
8367
  const canonical = cloneCount + real;
@@ -8227,7 +8371,7 @@ var Swiper = (props) => {
8227
8371
  }
8228
8372
  onChange?.(Math.min(real, maxIndex));
8229
8373
  }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
8230
- const slideTo = React26.useCallback(
8374
+ const slideTo = React28.useCallback(
8231
8375
  (logicalIndex) => {
8232
8376
  if (!canSlide) return;
8233
8377
  const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
@@ -8237,7 +8381,7 @@ var Swiper = (props) => {
8237
8381
  },
8238
8382
  [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
8239
8383
  );
8240
- const slideNext = React26.useCallback(() => {
8384
+ const slideNext = React28.useCallback(() => {
8241
8385
  if (!canSlide) return;
8242
8386
  const nextInner = innerIndex + slideBy;
8243
8387
  if (useLoop) {
@@ -8246,7 +8390,7 @@ var Swiper = (props) => {
8246
8390
  moveToInner(Math.min(nextInner, maxIndex), true);
8247
8391
  }
8248
8392
  }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
8249
- const slidePrev = React26.useCallback(() => {
8393
+ const slidePrev = React28.useCallback(() => {
8250
8394
  if (!canSlide) return;
8251
8395
  const prevInner = innerIndex - slideBy;
8252
8396
  if (useLoop) {
@@ -8255,7 +8399,7 @@ var Swiper = (props) => {
8255
8399
  moveToInner(Math.max(prevInner, 0), true);
8256
8400
  }
8257
8401
  }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
8258
- React26.useEffect(() => {
8402
+ React28.useEffect(() => {
8259
8403
  if (indexProp === void 0) return;
8260
8404
  const clamped = Math.max(0, Math.min(indexProp, maxIndex));
8261
8405
  const target = useLoop ? cloneCount + clamped : clamped;
@@ -8263,12 +8407,12 @@ var Swiper = (props) => {
8263
8407
  moveToInner(target, true);
8264
8408
  }
8265
8409
  }, [indexProp]);
8266
- React26.useImperativeHandle(swiperRef, () => ({
8410
+ React28.useImperativeHandle(swiperRef, () => ({
8267
8411
  slidePrev,
8268
8412
  slideNext,
8269
8413
  slideTo
8270
8414
  }));
8271
- React26.useEffect(() => {
8415
+ React28.useEffect(() => {
8272
8416
  if (!auto || !canSlide) return;
8273
8417
  autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
8274
8418
  return () => {
@@ -8291,7 +8435,7 @@ var Swiper = (props) => {
8291
8435
  startXRef.current = getClientX(e);
8292
8436
  startTimeRef.current = Date.now();
8293
8437
  };
8294
- React26.useEffect(() => {
8438
+ React28.useEffect(() => {
8295
8439
  if (!isDragging) return;
8296
8440
  const handleMove = (e) => {
8297
8441
  setDragOffset(getClientX(e) - startXRef.current);
@@ -8329,8 +8473,8 @@ var Swiper = (props) => {
8329
8473
  }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
8330
8474
  const slideWidthPercent = 100 / viewItemCount;
8331
8475
  const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
8332
- const slideElements = React26.useMemo(
8333
- () => extendedItems.map((item, idx) => /* @__PURE__ */ jsx333(
8476
+ const slideElements = React28.useMemo(
8477
+ () => extendedItems.map((item, idx) => /* @__PURE__ */ jsx335(
8334
8478
  "div",
8335
8479
  {
8336
8480
  className: "lib-xplat-swiper__slide",
@@ -8349,14 +8493,14 @@ var Swiper = (props) => {
8349
8493
  Math.floor(realIndex / slideBy),
8350
8494
  totalSteps - 1
8351
8495
  );
8352
- return /* @__PURE__ */ jsxs216("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
8353
- /* @__PURE__ */ jsx333(
8496
+ return /* @__PURE__ */ jsxs217("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
8497
+ /* @__PURE__ */ jsx335(
8354
8498
  "div",
8355
8499
  {
8356
8500
  className: "lib-xplat-swiper__viewport",
8357
8501
  onMouseDown: handleDragStart,
8358
8502
  onTouchStart: handleDragStart,
8359
- children: /* @__PURE__ */ jsx333(
8503
+ children: /* @__PURE__ */ jsx335(
8360
8504
  "div",
8361
8505
  {
8362
8506
  className: clsx_default(
@@ -8374,7 +8518,7 @@ var Swiper = (props) => {
8374
8518
  )
8375
8519
  }
8376
8520
  ),
8377
- showProgress && canSlide && /* @__PURE__ */ jsx333("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx333("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx333(
8521
+ showProgress && canSlide && /* @__PURE__ */ jsx335("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx335("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx335(
8378
8522
  "span",
8379
8523
  {
8380
8524
  className: "lib-xplat-swiper__progress-fill",
@@ -8384,7 +8528,7 @@ var Swiper = (props) => {
8384
8528
  }
8385
8529
  }
8386
8530
  ) }) }),
8387
- canSlide && /* @__PURE__ */ jsx333("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx333(
8531
+ canSlide && /* @__PURE__ */ jsx335("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx335(
8388
8532
  "button",
8389
8533
  {
8390
8534
  className: clsx_default(
@@ -8402,8 +8546,8 @@ Swiper.displayName = "Swiper";
8402
8546
  var Swiper_default = Swiper;
8403
8547
 
8404
8548
  // src/components/Switch/Switch.tsx
8405
- import React27 from "react";
8406
- import { jsx as jsx334 } from "react/jsx-runtime";
8549
+ import React29 from "react";
8550
+ import { jsx as jsx336 } from "react/jsx-runtime";
8407
8551
  var KNOB_TRANSITION_MS = 250;
8408
8552
  var Switch = (props) => {
8409
8553
  const {
@@ -8413,9 +8557,9 @@ var Switch = (props) => {
8413
8557
  disabled,
8414
8558
  onChange
8415
8559
  } = props;
8416
- const [isAnimating, setIsAnimating] = React27.useState(false);
8417
- const timeoutRef = React27.useRef(null);
8418
- React27.useEffect(() => {
8560
+ const [isAnimating, setIsAnimating] = React29.useState(false);
8561
+ const timeoutRef = React29.useRef(null);
8562
+ React29.useEffect(() => {
8419
8563
  return () => {
8420
8564
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8421
8565
  };
@@ -8430,7 +8574,7 @@ var Switch = (props) => {
8430
8574
  timeoutRef.current = null;
8431
8575
  }, KNOB_TRANSITION_MS);
8432
8576
  };
8433
- return /* @__PURE__ */ jsx334(
8577
+ return /* @__PURE__ */ jsx336(
8434
8578
  "div",
8435
8579
  {
8436
8580
  className: clsx_default(
@@ -8443,80 +8587,13 @@ var Switch = (props) => {
8443
8587
  ),
8444
8588
  onClick: handleClick,
8445
8589
  "aria-disabled": disabled || isAnimating,
8446
- children: /* @__PURE__ */ jsx334("div", { className: clsx_default("knob", value ? "checked" : void 0) })
8590
+ children: /* @__PURE__ */ jsx336("div", { className: clsx_default("knob", value ? "checked" : void 0) })
8447
8591
  }
8448
8592
  );
8449
8593
  };
8450
8594
  Switch.displayName = "Switch";
8451
8595
  var Switch_default = Switch;
8452
8596
 
8453
- // src/components/Tab/Tab.tsx
8454
- import React29 from "react";
8455
-
8456
- // src/components/Tab/TabItem.tsx
8457
- import React28 from "react";
8458
- import { jsx as jsx335 } from "react/jsx-runtime";
8459
- var TabItem = React28.forwardRef((props, ref) => {
8460
- const { isActive, title, onClick } = props;
8461
- return /* @__PURE__ */ jsx335(
8462
- "div",
8463
- {
8464
- ref,
8465
- className: clsx_default("tab-item", isActive ? "active" : null),
8466
- onClick,
8467
- children: title
8468
- }
8469
- );
8470
- });
8471
- TabItem.displayName = "TabItem";
8472
- var TabItem_default = TabItem;
8473
-
8474
- // src/components/Tab/Tab.tsx
8475
- import { jsx as jsx336, jsxs as jsxs217 } from "react/jsx-runtime";
8476
- var Tab = (props) => {
8477
- const { activeIndex, onChange, tabs, type, size = "md" } = props;
8478
- const [underlineStyle, setUnderlineStyle] = React29.useState({
8479
- left: 0,
8480
- width: 0
8481
- });
8482
- const itemRefs = React29.useRef([]);
8483
- const handleChangeActiveTab = (tabItem, tabIdx) => {
8484
- onChange(tabItem, tabIdx);
8485
- };
8486
- React29.useEffect(() => {
8487
- const el = itemRefs.current[activeIndex];
8488
- if (el) {
8489
- setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
8490
- }
8491
- }, [activeIndex, tabs.length]);
8492
- return /* @__PURE__ */ jsxs217("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
8493
- tabs.map((tab, idx) => /* @__PURE__ */ jsx336(
8494
- TabItem_default,
8495
- {
8496
- onClick: () => handleChangeActiveTab(tab, idx),
8497
- isActive: activeIndex === idx,
8498
- ref: (el) => {
8499
- itemRefs.current[idx] = el;
8500
- },
8501
- title: tab.title
8502
- },
8503
- `${tab.value}_${idx}`
8504
- )),
8505
- type === "toggle" && /* @__PURE__ */ jsx336(
8506
- "div",
8507
- {
8508
- className: "tab-toggle-underline",
8509
- style: {
8510
- left: underlineStyle.left,
8511
- width: underlineStyle.width
8512
- }
8513
- }
8514
- )
8515
- ] });
8516
- };
8517
- Tab.displayName = "Tab";
8518
- var Tab_default = Tab;
8519
-
8520
8597
  // src/components/Table/TableContext.tsx
8521
8598
  import React30 from "react";
8522
8599
  var TableContext = React30.createContext(null);
@@ -9429,6 +9506,7 @@ export {
9429
9506
  BookIcon_default as BookIcon,
9430
9507
  BookOpenIcon_default as BookOpenIcon,
9431
9508
  BookmarkIcon_default as BookmarkIcon,
9509
+ Box_default as Box,
9432
9510
  BoxIcon_default as BoxIcon,
9433
9511
  Breadcrumb_default as Breadcrumb,
9434
9512
  BriefcaseIcon_default as BriefcaseIcon,
@@ -9445,7 +9523,6 @@ export {
9445
9523
  CallOutgoingIcon_default as CallOutgoingIcon,
9446
9524
  CameraIcon_default as CameraIcon,
9447
9525
  CameraOffIcon_default as CameraOffIcon,
9448
- Card_default as Card,
9449
9526
  CardTab_default as CardTab,
9450
9527
  CastIcon_default as CastIcon,
9451
9528
  Chart_default as Chart,