@x-plat/design-system 0.2.4 → 0.3.2

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.
Files changed (80) hide show
  1. package/dist/{colors-cxE7RsuF.d.cts → colors-BgzpjYfN.d.cts} +3 -6
  2. package/dist/{colors-cxE7RsuF.d.ts → colors-BgzpjYfN.d.ts} +3 -6
  3. package/dist/components/Avatar/index.cjs +2 -14
  4. package/dist/components/Avatar/index.d.cts +3 -235
  5. package/dist/components/Avatar/index.d.ts +3 -235
  6. package/dist/components/Avatar/index.js +2 -14
  7. package/dist/components/Badge/index.cjs +2 -14
  8. package/dist/components/Badge/index.d.cts +3 -235
  9. package/dist/components/Badge/index.d.ts +3 -235
  10. package/dist/components/Badge/index.js +2 -14
  11. package/dist/components/Button/index.cjs +2 -14
  12. package/dist/components/Button/index.d.cts +3 -235
  13. package/dist/components/Button/index.d.ts +3 -235
  14. package/dist/components/Button/index.js +2 -14
  15. package/dist/components/CheckBox/index.cjs +2 -14
  16. package/dist/components/CheckBox/index.d.cts +3 -235
  17. package/dist/components/CheckBox/index.d.ts +3 -235
  18. package/dist/components/CheckBox/index.js +2 -14
  19. package/dist/components/Chip/index.cjs +2 -14
  20. package/dist/components/Chip/index.d.cts +3 -235
  21. package/dist/components/Chip/index.d.ts +3 -235
  22. package/dist/components/Chip/index.js +2 -14
  23. package/dist/components/DatePicker/index.cjs +9 -161
  24. package/dist/components/DatePicker/index.d.cts +5 -469
  25. package/dist/components/DatePicker/index.d.ts +5 -469
  26. package/dist/components/DatePicker/index.js +9 -161
  27. package/dist/components/Pagination/index.cjs +2 -14
  28. package/dist/components/Pagination/index.d.cts +3 -235
  29. package/dist/components/Pagination/index.d.ts +3 -235
  30. package/dist/components/Pagination/index.js +2 -14
  31. package/dist/components/Progress/index.cjs +2 -14
  32. package/dist/components/Progress/index.d.cts +3 -235
  33. package/dist/components/Progress/index.d.ts +3 -235
  34. package/dist/components/Progress/index.js +2 -14
  35. package/dist/components/Radio/index.cjs +2 -14
  36. package/dist/components/Radio/index.d.cts +3 -235
  37. package/dist/components/Radio/index.d.ts +3 -235
  38. package/dist/components/Radio/index.js +2 -14
  39. package/dist/components/Spinner/index.cjs +2 -14
  40. package/dist/components/Spinner/index.d.cts +3 -235
  41. package/dist/components/Spinner/index.d.ts +3 -235
  42. package/dist/components/Spinner/index.js +2 -14
  43. package/dist/components/Steps/index.cjs +2 -14
  44. package/dist/components/Steps/index.d.cts +3 -235
  45. package/dist/components/Steps/index.d.ts +3 -235
  46. package/dist/components/Steps/index.js +2 -14
  47. package/dist/components/Swiper/index.cjs +257 -5939
  48. package/dist/components/Swiper/index.css +52 -211
  49. package/dist/components/Swiper/index.d.cts +35 -16
  50. package/dist/components/Swiper/index.d.ts +35 -16
  51. package/dist/components/Swiper/index.js +251 -5944
  52. package/dist/components/Switch/index.cjs +2 -14
  53. package/dist/components/Switch/index.d.cts +3 -235
  54. package/dist/components/Switch/index.d.ts +3 -235
  55. package/dist/components/Switch/index.js +2 -14
  56. package/dist/components/Table/index.cjs +2 -16
  57. package/dist/components/Table/index.d.cts +3 -235
  58. package/dist/components/Table/index.d.ts +3 -235
  59. package/dist/components/Table/index.js +2 -16
  60. package/dist/components/Tag/index.cjs +2 -14
  61. package/dist/components/Tag/index.d.cts +3 -235
  62. package/dist/components/Tag/index.d.ts +3 -235
  63. package/dist/components/Tag/index.js +2 -14
  64. package/dist/components/Tooltip/index.cjs +2 -14
  65. package/dist/components/Tooltip/index.d.cts +3 -238
  66. package/dist/components/Tooltip/index.d.ts +3 -238
  67. package/dist/components/Tooltip/index.js +2 -14
  68. package/dist/components/index.cjs +390 -251
  69. package/dist/components/index.css +71 -0
  70. package/dist/components/index.d.cts +2 -1
  71. package/dist/components/index.d.ts +2 -1
  72. package/dist/components/index.js +390 -252
  73. package/dist/index.cjs +414 -275
  74. package/dist/index.css +71 -0
  75. package/dist/index.d.cts +2 -1
  76. package/dist/index.d.ts +2 -1
  77. package/dist/index.js +414 -276
  78. package/dist/tokens/index.d.cts +1 -1
  79. package/dist/tokens/index.d.ts +1 -1
  80. package/package.json +3 -9
@@ -67,6 +67,7 @@ __export(components_exports, {
67
67
  Skeleton: () => Skeleton_default,
68
68
  Spinner: () => Spinner_default,
69
69
  Steps: () => Steps_default,
70
+ Swiper: () => Swiper_default,
70
71
  Switch: () => Switch_default,
71
72
  Tab: () => Tab_default,
72
73
  Table: () => Table_default,
@@ -1453,11 +1454,6 @@ var Alert = (props) => {
1453
1454
  Alert.displayName = "Alert";
1454
1455
  var Alert_default = Alert;
1455
1456
 
1456
- // src/util/getColor.ts
1457
- var getColorClass = (namespace, palette, shade) => {
1458
- return `${String(namespace)}-${String(palette)}${shade !== void 0 ? `-${String(shade)}` : ""}`;
1459
- };
1460
-
1461
1457
  // src/components/Avatar/Avatar.tsx
1462
1458
  var import_jsx_runtime297 = require("react/jsx-runtime");
1463
1459
  var Avatar = (props) => {
@@ -1466,17 +1462,10 @@ var Avatar = (props) => {
1466
1462
  alt,
1467
1463
  name,
1468
1464
  size: size4 = "md",
1469
- colorNamespace = "xplat",
1470
- color: color2 = "blue",
1471
- colorDepth,
1472
- colorToken,
1465
+ color: color2 = "xplat-blue-500",
1473
1466
  className
1474
1467
  } = props;
1475
- const colorClass = colorToken ?? getColorClass(
1476
- colorNamespace,
1477
- color2,
1478
- colorDepth ?? 500
1479
- );
1468
+ const colorClass = color2;
1480
1469
  const initials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
1481
1470
  return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("lib-xplat-avatar", size4, className), children: src ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: clsx_default("fallback", colorClass), children: initials || /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) }) });
1482
1471
  };
@@ -1492,17 +1481,10 @@ var Badge = (props) => {
1492
1481
  maxCount = 99,
1493
1482
  dot = false,
1494
1483
  size: size4 = "md",
1495
- colorNamespace = "xplat",
1496
- color: color2 = "red",
1497
- colorDepth,
1498
- colorToken,
1484
+ color: color2 = "xplat-red-500",
1499
1485
  className
1500
1486
  } = props;
1501
- const colorClass = colorToken ?? getColorClass(
1502
- colorNamespace,
1503
- color2,
1504
- colorDepth ?? 500
1505
- );
1487
+ const colorClass = color2;
1506
1488
  const showBadge = dot || count2 !== void 0 && count2 > 0;
1507
1489
  const displayCount = count2 !== void 0 && count2 > maxCount ? `${maxCount}+` : count2;
1508
1490
  return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: clsx_default("lib-xplat-badge", size4, className), children: [
@@ -1535,19 +1517,12 @@ var Button = (props) => {
1535
1517
  children,
1536
1518
  type = "primary",
1537
1519
  size: size4 = "md",
1538
- colorNamespace = "xplat",
1539
- color: color2 = "black",
1540
- colorDepth,
1541
- colorToken,
1520
+ color: color2 = "xplat-black",
1542
1521
  disabled,
1543
1522
  className,
1544
1523
  ...rest
1545
1524
  } = props;
1546
- const colorClass = colorToken ?? getColorClass(
1547
- colorNamespace,
1548
- color2,
1549
- colorDepth ?? 500
1550
- );
1525
+ const colorClass = color2;
1551
1526
  return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
1552
1527
  "button",
1553
1528
  {
@@ -16165,10 +16140,7 @@ var Chart_default = Chart3;
16165
16140
  var import_jsx_runtime306 = require("react/jsx-runtime");
16166
16141
  var CheckBox = (props) => {
16167
16142
  const {
16168
- colorNamespace = "xplat",
16169
- color: color2 = "blue",
16170
- colorDepth,
16171
- colorToken,
16143
+ color: color2 = "xplat-blue-500",
16172
16144
  checked,
16173
16145
  label,
16174
16146
  onChange,
@@ -16180,11 +16152,7 @@ var CheckBox = (props) => {
16180
16152
  const handleChange = (e) => {
16181
16153
  if (onChange) onChange(e);
16182
16154
  };
16183
- const mainColor = colorToken ?? getColorClass(
16184
- colorNamespace,
16185
- color2,
16186
- colorDepth ?? 500
16187
- );
16155
+ const mainColor = color2;
16188
16156
  const uncheckedClasses = `unchecked`;
16189
16157
  const checkedClasses = `checked ${mainColor}`;
16190
16158
  const disabledClasses = "disabled";
@@ -16212,19 +16180,12 @@ var import_jsx_runtime307 = require("react/jsx-runtime");
16212
16180
  var Chip = (props) => {
16213
16181
  const {
16214
16182
  children,
16215
- colorNamespace = "xplat",
16216
- color: color2 = "black",
16217
- colorDepth,
16218
- colorToken,
16183
+ color: color2 = "xplat-black",
16219
16184
  type = "primary",
16220
16185
  size: size4 = "md",
16221
16186
  className
16222
16187
  } = props;
16223
- const colorClass = colorToken ?? getColorClass(
16224
- colorNamespace,
16225
- color2,
16226
- colorDepth ?? 500
16227
- );
16188
+ const colorClass = color2;
16228
16189
  return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size4, colorClass, className), children });
16229
16190
  };
16230
16191
  Chip.displayName = "Chip";
@@ -27218,19 +27179,11 @@ var Modal_default = Modal;
27218
27179
 
27219
27180
  // src/components/DatePicker/SingleDatePicker/index.tsx
27220
27181
  var import_jsx_runtime314 = require("react/jsx-runtime");
27221
- function getColorValue(ns, color2, depth) {
27222
- const nsColors = colors[ns];
27223
- const colorEntry = nsColors[color2];
27224
- if (typeof colorEntry === "string") return colorEntry;
27225
- return colorEntry[String(depth)] ?? "";
27226
- }
27227
27182
  var SingleDatePicker = (props) => {
27228
27183
  const {
27229
27184
  value,
27230
27185
  onChange,
27231
- colorNamespace = "xplat",
27232
- color: color2 = "blue",
27233
- colorDepth,
27186
+ color: color2 = "xplat-blue-500",
27234
27187
  highlightDates,
27235
27188
  ...rest
27236
27189
  } = props;
@@ -27238,16 +27191,11 @@ var SingleDatePicker = (props) => {
27238
27191
  if (Array.isArray(date)) return;
27239
27192
  onChange?.(date);
27240
27193
  };
27241
- const activeColor = getColorValue(
27242
- colorNamespace,
27243
- color2,
27244
- colorDepth ?? 500
27245
- );
27246
27194
  return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
27247
27195
  "div",
27248
27196
  {
27249
27197
  className: "lib-xplat-datepicker",
27250
- style: { "--datepicker-active-color": activeColor },
27198
+ style: { "--datepicker-active-color": `var(--${color2})` },
27251
27199
  children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
27252
27200
  DatePicker,
27253
27201
  {
@@ -27305,13 +27253,12 @@ var PopupPicker = (props) => {
27305
27253
  Button_default,
27306
27254
  {
27307
27255
  type: "secondary",
27308
- color: "neutral",
27309
- colorDepth: 400,
27256
+ color: "xplat-neutral-400",
27310
27257
  onClick: handleClose,
27311
27258
  children: "\uCDE8\uC18C"
27312
27259
  }
27313
27260
  ),
27314
- /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
27261
+ /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", color: "xplat-blue-500", onClick: handleClose, children: "\uC801\uC6A9" })
27315
27262
  ] })
27316
27263
  ] }) })
27317
27264
  ] });
@@ -27341,19 +27288,12 @@ var RangePicker = (props) => {
27341
27288
  onChange,
27342
27289
  minDate,
27343
27290
  maxDate,
27344
- colorNamespace,
27345
- color: color2,
27346
- colorDepth
27291
+ color: color2
27347
27292
  } = props;
27348
27293
  const rangeDates = import_react15.default.useMemo(
27349
27294
  () => getDatesBetween(startDate, endDate),
27350
27295
  [startDate, endDate]
27351
27296
  );
27352
- const colorProps = {
27353
- ...colorNamespace !== void 0 && { colorNamespace },
27354
- ...color2 !== void 0 && { color: color2 },
27355
- ...colorDepth !== void 0 && { colorDepth }
27356
- };
27357
27297
  return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-range-datepicker", children: [
27358
27298
  /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-range-datepicker-from", children: [
27359
27299
  /* @__PURE__ */ (0, import_jsx_runtime316.jsx)("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
@@ -27365,7 +27305,7 @@ var RangePicker = (props) => {
27365
27305
  minDate,
27366
27306
  maxDate: endDate,
27367
27307
  highlightDates: rangeDates,
27368
- ...colorProps
27308
+ color: color2
27369
27309
  }
27370
27310
  )
27371
27311
  ] }),
@@ -27379,7 +27319,7 @@ var RangePicker = (props) => {
27379
27319
  minDate: startDate,
27380
27320
  maxDate,
27381
27321
  highlightDates: rangeDates,
27382
- ...colorProps
27322
+ color: color2
27383
27323
  }
27384
27324
  )
27385
27325
  ] })
@@ -28091,17 +28031,10 @@ var Pagination = (props) => {
28091
28031
  siblingCount = 1,
28092
28032
  onChange,
28093
28033
  size: size4 = "md",
28094
- colorNamespace = "xplat",
28095
- color: color2 = "blue",
28096
- colorDepth,
28097
- colorToken,
28034
+ color: color2 = "xplat-blue-500",
28098
28035
  className
28099
28036
  } = props;
28100
- const colorClass = colorToken ?? getColorClass(
28101
- colorNamespace,
28102
- color2,
28103
- colorDepth ?? 500
28104
- );
28037
+ const colorClass = color2;
28105
28038
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
28106
28039
  const pages = getPageRange(current, totalPages, siblingCount);
28107
28040
  const handleClick = (page) => {
@@ -28211,17 +28144,10 @@ var Progress = (props) => {
28211
28144
  max: max3 = 100,
28212
28145
  size: size4 = "md",
28213
28146
  showLabel = false,
28214
- colorNamespace = "xplat",
28215
- color: color2 = "blue",
28216
- colorDepth,
28217
- colorToken,
28147
+ color: color2 = "xplat-blue-500",
28218
28148
  className
28219
28149
  } = props;
28220
- const colorClass = colorToken ?? getColorClass(
28221
- colorNamespace,
28222
- color2,
28223
- colorDepth ?? 500
28224
- );
28150
+ const colorClass = color2;
28225
28151
  const percentage = Math.min(100, Math.max(0, value / max3 * 100));
28226
28152
  return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: clsx_default("lib-xplat-progress", size4, className), children: [
28227
28153
  /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
@@ -28267,10 +28193,7 @@ var Radio = (props) => {
28267
28193
  label,
28268
28194
  value,
28269
28195
  className,
28270
- colorNamespace = "xplat",
28271
- color: color2 = "blue",
28272
- colorDepth,
28273
- colorToken,
28196
+ color: color2 = "xplat-blue-500",
28274
28197
  size: sizeProp,
28275
28198
  ...rest
28276
28199
  } = props;
@@ -28283,11 +28206,7 @@ var Radio = (props) => {
28283
28206
  value,
28284
28207
  onChange: rest.onChange
28285
28208
  };
28286
- const colorClass = colorToken ?? getColorClass(
28287
- colorNamespace,
28288
- color2,
28289
- colorDepth ?? 500
28290
- );
28209
+ const colorClass = color2;
28291
28210
  return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
28292
28211
  "label",
28293
28212
  {
@@ -28352,17 +28271,10 @@ var import_jsx_runtime332 = require("react/jsx-runtime");
28352
28271
  var Spinner = (props) => {
28353
28272
  const {
28354
28273
  size: size4 = "md",
28355
- colorNamespace = "xplat",
28356
- color: color2 = "blue",
28357
- colorDepth,
28358
- colorToken,
28274
+ color: color2 = "xplat-blue-500",
28359
28275
  className
28360
28276
  } = props;
28361
- const colorClass = colorToken ?? getColorClass(
28362
- colorNamespace,
28363
- color2,
28364
- colorDepth ?? 500
28365
- );
28277
+ const colorClass = color2;
28366
28278
  return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
28367
28279
  "div",
28368
28280
  {
@@ -28404,17 +28316,10 @@ var Steps = (props) => {
28404
28316
  const {
28405
28317
  items,
28406
28318
  current,
28407
- colorNamespace = "xplat",
28408
- color: color2 = "blue",
28409
- colorDepth,
28410
- colorToken,
28319
+ color: color2 = "xplat-blue-500",
28411
28320
  className
28412
28321
  } = props;
28413
- const colorClass = colorToken ?? getColorClass(
28414
- colorNamespace,
28415
- color2,
28416
- colorDepth ?? 500
28417
- );
28322
+ const colorClass = color2;
28418
28323
  return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index3) => {
28419
28324
  const status = index3 < current ? "completed" : index3 === current ? "active" : "pending";
28420
28325
  return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: clsx_default("step-item", status), children: [
@@ -28432,9 +28337,270 @@ var Steps = (props) => {
28432
28337
  Steps.displayName = "Steps";
28433
28338
  var Steps_default = Steps;
28434
28339
 
28435
- // src/components/Switch/Switch.tsx
28340
+ // src/components/Swiper/Swiper.tsx
28436
28341
  var import_react29 = __toESM(require("react"), 1);
28437
28342
  var import_jsx_runtime334 = require("react/jsx-runtime");
28343
+ var Swiper = (props) => {
28344
+ const {
28345
+ auto = false,
28346
+ swiperRef,
28347
+ renderItems = [],
28348
+ viewItemCount = 1,
28349
+ maxItems,
28350
+ loop = false,
28351
+ spaceBetween = 16,
28352
+ showProgress = false,
28353
+ autoplayDelay = 3e3,
28354
+ speed = 300,
28355
+ slideBy = 1,
28356
+ index: indexProp,
28357
+ onChange,
28358
+ className
28359
+ } = props;
28360
+ const items = maxItems ? renderItems.slice(0, maxItems) : renderItems;
28361
+ const totalSlides = items.length;
28362
+ const canSlide = totalSlides > viewItemCount;
28363
+ const maxIndex = Math.max(0, totalSlides - viewItemCount);
28364
+ const useLoop = loop && canSlide;
28365
+ const cloneCount = useLoop ? totalSlides : 0;
28366
+ const extendedItems = import_react29.default.useMemo(() => {
28367
+ if (!useLoop) return items;
28368
+ return [...items, ...items, ...items];
28369
+ }, [items, useLoop]);
28370
+ const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
28371
+ const [innerIndex, setInnerIndex] = import_react29.default.useState(
28372
+ useLoop ? cloneCount + initialIdx : initialIdx
28373
+ );
28374
+ const [isDragging, setIsDragging] = import_react29.default.useState(false);
28375
+ const [dragOffset, setDragOffset] = import_react29.default.useState(0);
28376
+ const [animated, setAnimated] = import_react29.default.useState(true);
28377
+ const [containerWidth, setContainerWidth] = import_react29.default.useState(0);
28378
+ const containerRef = import_react29.default.useRef(null);
28379
+ const startXRef = import_react29.default.useRef(0);
28380
+ const startTimeRef = import_react29.default.useRef(0);
28381
+ const autoplayTimerRef = import_react29.default.useRef(null);
28382
+ import_react29.default.useEffect(() => {
28383
+ const el = containerRef.current;
28384
+ if (!el) return;
28385
+ const ro = new ResizeObserver((entries) => {
28386
+ for (const entry of entries) {
28387
+ setContainerWidth(entry.contentRect.width);
28388
+ }
28389
+ });
28390
+ ro.observe(el);
28391
+ setContainerWidth(el.offsetWidth);
28392
+ return () => ro.disconnect();
28393
+ }, []);
28394
+ const slideStep = containerWidth > 0 ? (containerWidth - (viewItemCount - 1) * spaceBetween) / viewItemCount + spaceBetween : 0;
28395
+ const transformPx = -(innerIndex * slideStep) + dragOffset;
28396
+ const getRealIndex = (inner) => {
28397
+ if (!useLoop) return inner;
28398
+ return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
28399
+ };
28400
+ const realIndex = getRealIndex(innerIndex);
28401
+ const moveToInner = import_react29.default.useCallback(
28402
+ (idx, withAnim = true) => {
28403
+ if (useLoop) {
28404
+ setInnerIndex((prev) => {
28405
+ const real = ((prev - cloneCount) % totalSlides + totalSlides) % totalSlides;
28406
+ const canonical = cloneCount + real;
28407
+ if (prev !== canonical) {
28408
+ const delta = idx - prev;
28409
+ setAnimated(withAnim);
28410
+ return canonical + delta;
28411
+ }
28412
+ setAnimated(withAnim);
28413
+ return idx;
28414
+ });
28415
+ } else {
28416
+ setAnimated(withAnim);
28417
+ setInnerIndex(idx);
28418
+ }
28419
+ },
28420
+ [useLoop, cloneCount, totalSlides]
28421
+ );
28422
+ const handleTransitionEnd = import_react29.default.useCallback(() => {
28423
+ if (!useLoop) return;
28424
+ const real = getRealIndex(innerIndex);
28425
+ const canonical = cloneCount + real;
28426
+ if (innerIndex !== canonical) {
28427
+ moveToInner(canonical, false);
28428
+ }
28429
+ onChange?.(Math.min(real, maxIndex));
28430
+ }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange, moveToInner]);
28431
+ const slideTo = import_react29.default.useCallback(
28432
+ (logicalIndex) => {
28433
+ if (!canSlide) return;
28434
+ const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
28435
+ const target = useLoop ? cloneCount + clamped : clamped;
28436
+ moveToInner(target, true);
28437
+ if (!useLoop) onChange?.(clamped);
28438
+ },
28439
+ [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
28440
+ );
28441
+ const slideNext = import_react29.default.useCallback(() => {
28442
+ if (!canSlide) return;
28443
+ const nextInner = innerIndex + slideBy;
28444
+ if (useLoop) {
28445
+ moveToInner(nextInner, true);
28446
+ } else {
28447
+ moveToInner(Math.min(nextInner, maxIndex), true);
28448
+ }
28449
+ }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
28450
+ const slidePrev = import_react29.default.useCallback(() => {
28451
+ if (!canSlide) return;
28452
+ const prevInner = innerIndex - slideBy;
28453
+ if (useLoop) {
28454
+ moveToInner(prevInner, true);
28455
+ } else {
28456
+ moveToInner(Math.max(prevInner, 0), true);
28457
+ }
28458
+ }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
28459
+ import_react29.default.useEffect(() => {
28460
+ if (indexProp === void 0) return;
28461
+ const clamped = Math.max(0, Math.min(indexProp, maxIndex));
28462
+ const target = useLoop ? cloneCount + clamped : clamped;
28463
+ if (target !== innerIndex) {
28464
+ moveToInner(target, true);
28465
+ }
28466
+ }, [indexProp]);
28467
+ import_react29.default.useImperativeHandle(swiperRef, () => ({
28468
+ slidePrev,
28469
+ slideNext,
28470
+ slideTo
28471
+ }));
28472
+ import_react29.default.useEffect(() => {
28473
+ if (!auto || !canSlide) return;
28474
+ autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
28475
+ return () => {
28476
+ if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
28477
+ };
28478
+ }, [auto, autoplayDelay, slideNext, canSlide]);
28479
+ const pauseAutoplay = () => {
28480
+ if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
28481
+ };
28482
+ const getClientX = (e) => {
28483
+ if ("touches" in e) return e.touches[0]?.clientX ?? 0;
28484
+ return e.clientX;
28485
+ };
28486
+ const handleDragStart = (e) => {
28487
+ if (!canSlide) return;
28488
+ if ("button" in e && e.button !== 0) return;
28489
+ pauseAutoplay();
28490
+ setIsDragging(true);
28491
+ setAnimated(false);
28492
+ startXRef.current = getClientX(e);
28493
+ startTimeRef.current = Date.now();
28494
+ };
28495
+ import_react29.default.useEffect(() => {
28496
+ if (!isDragging) return;
28497
+ const handleMove = (e) => {
28498
+ setDragOffset(getClientX(e) - startXRef.current);
28499
+ };
28500
+ const handleEnd = () => {
28501
+ setIsDragging(false);
28502
+ const absDrag = Math.abs(dragOffset);
28503
+ const elapsed = Date.now() - startTimeRef.current;
28504
+ const velocity = absDrag / elapsed;
28505
+ if ((absDrag > 30 || velocity > 0.3) && slideStep > 0) {
28506
+ const rawCount = Math.max(1, Math.round(absDrag / slideStep));
28507
+ const count2 = Math.max(slideBy, Math.round(rawCount / slideBy) * slideBy);
28508
+ const direction = dragOffset < 0 ? 1 : -1;
28509
+ const nextInner = innerIndex + direction * count2;
28510
+ if (useLoop) {
28511
+ moveToInner(nextInner, true);
28512
+ } else {
28513
+ moveToInner(Math.max(0, Math.min(nextInner, maxIndex)), true);
28514
+ }
28515
+ } else {
28516
+ setAnimated(true);
28517
+ }
28518
+ setDragOffset(0);
28519
+ };
28520
+ window.addEventListener("mousemove", handleMove);
28521
+ window.addEventListener("mouseup", handleEnd);
28522
+ window.addEventListener("touchmove", handleMove, { passive: true });
28523
+ window.addEventListener("touchend", handleEnd);
28524
+ return () => {
28525
+ window.removeEventListener("mousemove", handleMove);
28526
+ window.removeEventListener("mouseup", handleEnd);
28527
+ window.removeEventListener("touchmove", handleMove);
28528
+ window.removeEventListener("touchend", handleEnd);
28529
+ };
28530
+ }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
28531
+ const slideWidthPercent = 100 / viewItemCount;
28532
+ const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
28533
+ const totalSteps = Math.ceil((maxIndex + 1) / slideBy);
28534
+ const currentStep = Math.min(
28535
+ Math.floor(realIndex / slideBy),
28536
+ totalSteps - 1
28537
+ );
28538
+ return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("lib-xplat-swiper", className), ref: containerRef, children: [
28539
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28540
+ "div",
28541
+ {
28542
+ className: "lib-xplat-swiper__viewport",
28543
+ onMouseDown: handleDragStart,
28544
+ onTouchStart: handleDragStart,
28545
+ children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28546
+ "div",
28547
+ {
28548
+ className: clsx_default(
28549
+ "lib-xplat-swiper__track",
28550
+ animated && !isDragging && "transitioning"
28551
+ ),
28552
+ style: {
28553
+ transform: `translateX(${transformPx}px)`,
28554
+ transitionDuration: isDragging || !animated ? "0ms" : `${speed}ms`,
28555
+ gap: `${spaceBetween}px`
28556
+ },
28557
+ onTransitionEnd: handleTransitionEnd,
28558
+ children: extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28559
+ "div",
28560
+ {
28561
+ className: "lib-xplat-swiper__slide",
28562
+ style: {
28563
+ minWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`,
28564
+ maxWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`
28565
+ },
28566
+ children: item
28567
+ },
28568
+ idx
28569
+ ))
28570
+ }
28571
+ )
28572
+ }
28573
+ ),
28574
+ showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28575
+ "span",
28576
+ {
28577
+ className: "lib-xplat-swiper__progress-fill",
28578
+ style: {
28579
+ width: `${(currentStep + 1) / totalSteps * 100}%`,
28580
+ transitionDuration: `${speed}ms`
28581
+ }
28582
+ }
28583
+ ) }) }),
28584
+ canSlide && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28585
+ "button",
28586
+ {
28587
+ className: clsx_default(
28588
+ "lib-xplat-swiper__dot",
28589
+ i === currentStep && "active"
28590
+ ),
28591
+ onClick: () => slideTo(i * slideBy),
28592
+ "aria-label": `\uC2AC\uB77C\uC774\uB4DC ${i + 1}`
28593
+ },
28594
+ i
28595
+ )) })
28596
+ ] });
28597
+ };
28598
+ Swiper.displayName = "Swiper";
28599
+ var Swiper_default = Swiper;
28600
+
28601
+ // src/components/Switch/Switch.tsx
28602
+ var import_react30 = __toESM(require("react"), 1);
28603
+ var import_jsx_runtime335 = require("react/jsx-runtime");
28438
28604
  var KNOB_TRANSITION_MS = 250;
28439
28605
  var Switch = (props) => {
28440
28606
  const {
@@ -28442,15 +28608,12 @@ var Switch = (props) => {
28442
28608
  size: size4 = "md",
28443
28609
  disabled,
28444
28610
  onChange,
28445
- colorNamespace = "xplat",
28446
- color: color2 = "blue",
28447
- colorDepth,
28448
- colorToken,
28611
+ color: color2 = "xplat-blue-500",
28449
28612
  className
28450
28613
  } = props;
28451
- const [isAnimating, setIsAnimating] = import_react29.default.useState(false);
28452
- const timeoutRef = import_react29.default.useRef(null);
28453
- import_react29.default.useEffect(() => {
28614
+ const [isAnimating, setIsAnimating] = import_react30.default.useState(false);
28615
+ const timeoutRef = import_react30.default.useRef(null);
28616
+ import_react30.default.useEffect(() => {
28454
28617
  return () => {
28455
28618
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
28456
28619
  };
@@ -28465,12 +28628,8 @@ var Switch = (props) => {
28465
28628
  timeoutRef.current = null;
28466
28629
  }, KNOB_TRANSITION_MS);
28467
28630
  };
28468
- const colorClass = colorToken ?? getColorClass(
28469
- colorNamespace,
28470
- color2,
28471
- colorDepth ?? 500
28472
- );
28473
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
28631
+ const colorClass = color2;
28632
+ return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
28474
28633
  "div",
28475
28634
  {
28476
28635
  className: clsx_default(
@@ -28484,7 +28643,7 @@ var Switch = (props) => {
28484
28643
  ),
28485
28644
  onClick: handleClick,
28486
28645
  "aria-disabled": disabled || isAnimating,
28487
- children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
28646
+ children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
28488
28647
  }
28489
28648
  );
28490
28649
  };
@@ -28492,14 +28651,14 @@ Switch.displayName = "Switch";
28492
28651
  var Switch_default = Switch;
28493
28652
 
28494
28653
  // src/components/Tab/Tab.tsx
28495
- var import_react31 = __toESM(require("react"), 1);
28654
+ var import_react32 = __toESM(require("react"), 1);
28496
28655
 
28497
28656
  // src/components/Tab/TabItem.tsx
28498
- var import_react30 = __toESM(require("react"), 1);
28499
- var import_jsx_runtime335 = require("react/jsx-runtime");
28500
- var TabItem = import_react30.default.forwardRef((props, ref) => {
28657
+ var import_react31 = __toESM(require("react"), 1);
28658
+ var import_jsx_runtime336 = require("react/jsx-runtime");
28659
+ var TabItem = import_react31.default.forwardRef((props, ref) => {
28501
28660
  const { isActive, title, onClick } = props;
28502
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
28661
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
28503
28662
  "div",
28504
28663
  {
28505
28664
  ref,
@@ -28513,25 +28672,25 @@ TabItem.displayName = "TabItem";
28513
28672
  var TabItem_default = TabItem;
28514
28673
 
28515
28674
  // src/components/Tab/Tab.tsx
28516
- var import_jsx_runtime336 = require("react/jsx-runtime");
28675
+ var import_jsx_runtime337 = require("react/jsx-runtime");
28517
28676
  var Tab = (props) => {
28518
28677
  const { activeIndex, onChange, tabs, type, size: size4 = "md" } = props;
28519
- const [underlineStyle, setUnderlineStyle] = import_react31.default.useState({
28678
+ const [underlineStyle, setUnderlineStyle] = import_react32.default.useState({
28520
28679
  left: 0,
28521
28680
  width: 0
28522
28681
  });
28523
- const itemRefs = import_react31.default.useRef([]);
28682
+ const itemRefs = import_react32.default.useRef([]);
28524
28683
  const handleChangeActiveTab = (tabItem, tabIdx) => {
28525
28684
  onChange(tabItem, tabIdx);
28526
28685
  };
28527
- import_react31.default.useEffect(() => {
28686
+ import_react32.default.useEffect(() => {
28528
28687
  const el = itemRefs.current[activeIndex];
28529
28688
  if (el) {
28530
28689
  setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
28531
28690
  }
28532
28691
  }, [activeIndex, tabs.length]);
28533
- return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
28534
- tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
28692
+ return /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
28693
+ tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
28535
28694
  TabItem_default,
28536
28695
  {
28537
28696
  onClick: () => handleChangeActiveTab(tab, idx),
@@ -28543,7 +28702,7 @@ var Tab = (props) => {
28543
28702
  },
28544
28703
  `${tab.value}_${idx}`
28545
28704
  )),
28546
- type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
28705
+ type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
28547
28706
  "div",
28548
28707
  {
28549
28708
  className: "tab-toggle-underline",
@@ -28559,17 +28718,17 @@ Tab.displayName = "Tab";
28559
28718
  var Tab_default = Tab;
28560
28719
 
28561
28720
  // src/components/Table/TableContext.tsx
28562
- var import_react32 = __toESM(require("react"), 1);
28563
- var TableContext = import_react32.default.createContext(null);
28721
+ var import_react33 = __toESM(require("react"), 1);
28722
+ var TableContext = import_react33.default.createContext(null);
28564
28723
  var useTableContext = () => {
28565
- const ctx = import_react32.default.useContext(TableContext);
28724
+ const ctx = import_react33.default.useContext(TableContext);
28566
28725
  if (!ctx) throw new Error("Table components must be used inside <Table>");
28567
28726
  return ctx;
28568
28727
  };
28569
28728
  var TableContext_default = TableContext;
28570
28729
 
28571
28730
  // src/components/Table/Table.tsx
28572
- var import_jsx_runtime337 = require("react/jsx-runtime");
28731
+ var import_jsx_runtime338 = require("react/jsx-runtime");
28573
28732
  var Table = (props) => {
28574
28733
  const {
28575
28734
  className,
@@ -28579,7 +28738,7 @@ var Table = (props) => {
28579
28738
  headerSticky = false,
28580
28739
  stickyShadow = true
28581
28740
  } = props;
28582
- return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
28741
+ return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
28583
28742
  TableContext_default.Provider,
28584
28743
  {
28585
28744
  value: {
@@ -28588,7 +28747,7 @@ var Table = (props) => {
28588
28747
  headerSticky,
28589
28748
  stickyShadow
28590
28749
  },
28591
- children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("table", { className: "lib-xplat-table", children })
28750
+ children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("table", { className: "lib-xplat-table", children })
28592
28751
  }
28593
28752
  ) });
28594
28753
  };
@@ -28596,40 +28755,40 @@ Table.displayName = "Table";
28596
28755
  var Table_default = Table;
28597
28756
 
28598
28757
  // src/components/Table/TableBody.tsx
28599
- var import_jsx_runtime338 = require("react/jsx-runtime");
28758
+ var import_jsx_runtime339 = require("react/jsx-runtime");
28600
28759
  var TableBody = (props) => {
28601
28760
  const { children, className } = props;
28602
- return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("tbody", { className, children });
28761
+ return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("tbody", { className, children });
28603
28762
  };
28604
28763
  TableBody.displayName = "TableBody";
28605
28764
  var TableBody_default = TableBody;
28606
28765
 
28607
28766
  // src/components/Table/TableCell.tsx
28608
- var import_react35 = __toESM(require("react"), 1);
28767
+ var import_react36 = __toESM(require("react"), 1);
28609
28768
 
28610
28769
  // src/components/Table/TableHeadContext.tsx
28611
- var import_react33 = __toESM(require("react"), 1);
28612
- var TableHeadContext = import_react33.default.createContext(
28770
+ var import_react34 = __toESM(require("react"), 1);
28771
+ var TableHeadContext = import_react34.default.createContext(
28613
28772
  null
28614
28773
  );
28615
28774
  var useTableHeadContext = () => {
28616
- const ctx = import_react33.default.useContext(TableHeadContext);
28775
+ const ctx = import_react34.default.useContext(TableHeadContext);
28617
28776
  return ctx;
28618
28777
  };
28619
28778
  var TableHeadContext_default = TableHeadContext;
28620
28779
 
28621
28780
  // src/components/Table/TableRowContext.tsx
28622
- var import_react34 = __toESM(require("react"), 1);
28623
- var TableRowContext = import_react34.default.createContext(null);
28781
+ var import_react35 = __toESM(require("react"), 1);
28782
+ var TableRowContext = import_react35.default.createContext(null);
28624
28783
  var useTableRowContext = () => {
28625
- const ctx = import_react34.default.useContext(TableRowContext);
28784
+ const ctx = import_react35.default.useContext(TableRowContext);
28626
28785
  if (!ctx) throw new Error("Table components must be used inside <Table>");
28627
28786
  return ctx;
28628
28787
  };
28629
28788
  var TableRowContext_default = TableRowContext;
28630
28789
 
28631
28790
  // src/components/Table/TableCell.tsx
28632
- var import_jsx_runtime339 = require("react/jsx-runtime");
28791
+ var import_jsx_runtime340 = require("react/jsx-runtime");
28633
28792
  var TableCell = (props) => {
28634
28793
  const {
28635
28794
  children,
@@ -28641,9 +28800,9 @@ var TableCell = (props) => {
28641
28800
  const { registerStickyCell, stickyCells } = useTableRowContext();
28642
28801
  const { stickyShadow } = useTableContext();
28643
28802
  const headContext = useTableHeadContext();
28644
- const [left, setLeft] = import_react35.default.useState(0);
28645
- const cellRef = import_react35.default.useRef(null);
28646
- const calculateLeft = import_react35.default.useCallback(() => {
28803
+ const [left, setLeft] = import_react36.default.useState(0);
28804
+ const cellRef = import_react36.default.useRef(null);
28805
+ const calculateLeft = import_react36.default.useCallback(() => {
28647
28806
  if (!cellRef.current) return 0;
28648
28807
  let totalLeft = 0;
28649
28808
  for (const ref of stickyCells) {
@@ -28652,7 +28811,7 @@ var TableCell = (props) => {
28652
28811
  }
28653
28812
  return totalLeft;
28654
28813
  }, [stickyCells]);
28655
- import_react35.default.useEffect(() => {
28814
+ import_react36.default.useEffect(() => {
28656
28815
  if (!isSticky || !cellRef.current) return;
28657
28816
  registerStickyCell(cellRef);
28658
28817
  setLeft(calculateLeft());
@@ -28670,7 +28829,7 @@ var TableCell = (props) => {
28670
28829
  const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
28671
28830
  const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
28672
28831
  const enableHover = headContext && headContext.cellHover;
28673
- return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
28832
+ return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
28674
28833
  CellTag,
28675
28834
  {
28676
28835
  ref: cellRef,
@@ -28692,47 +28851,40 @@ TableCell.displayName = "TableCell";
28692
28851
  var TableCell_default = TableCell;
28693
28852
 
28694
28853
  // src/components/Table/TableHead.tsx
28695
- var import_jsx_runtime340 = require("react/jsx-runtime");
28854
+ var import_jsx_runtime341 = require("react/jsx-runtime");
28696
28855
  var TableHead = ({
28697
28856
  children,
28698
28857
  className = "",
28699
28858
  cellHover = false
28700
28859
  }) => {
28701
28860
  const { headerSticky } = useTableContext();
28702
- return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
28861
+ return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
28703
28862
  };
28704
28863
  TableHead.displayName = "TableHead";
28705
28864
  var TableHead_default = TableHead;
28706
28865
 
28707
28866
  // src/components/Table/TableRow.tsx
28708
- var import_react36 = __toESM(require("react"), 1);
28709
- var import_jsx_runtime341 = require("react/jsx-runtime");
28867
+ var import_react37 = __toESM(require("react"), 1);
28868
+ var import_jsx_runtime342 = require("react/jsx-runtime");
28710
28869
  var TableRow = (props) => {
28711
28870
  const {
28712
28871
  children,
28713
28872
  className,
28714
- colorNamespace = "xplat",
28715
- color: color2 = "black",
28716
- colorDepth,
28717
- colorToken,
28873
+ color: color2 = "xplat-neutral-900",
28718
28874
  type = "secondary",
28719
28875
  isHover,
28720
28876
  onClick
28721
28877
  } = props;
28722
28878
  const { rowBorderUse } = useTableContext();
28723
- const [stickyCells, setStickyCells] = import_react36.default.useState([]);
28879
+ const [stickyCells, setStickyCells] = import_react37.default.useState([]);
28724
28880
  const registerStickyCell = (ref) => {
28725
28881
  setStickyCells((prev) => {
28726
28882
  if (prev.includes(ref)) return prev;
28727
28883
  return [...prev, ref];
28728
28884
  });
28729
28885
  };
28730
- const colorClass = colorToken ?? getColorClass(
28731
- colorNamespace,
28732
- color2,
28733
- colorDepth ?? 500
28734
- );
28735
- return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
28886
+ const colorClass = color2;
28887
+ return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
28736
28888
  "tr",
28737
28889
  {
28738
28890
  className: clsx_default(
@@ -28752,38 +28904,31 @@ TableRow.displayName = "TableRow";
28752
28904
  var TableRow_default = TableRow;
28753
28905
 
28754
28906
  // src/components/Tag/Tag.tsx
28755
- var import_jsx_runtime342 = require("react/jsx-runtime");
28907
+ var import_jsx_runtime343 = require("react/jsx-runtime");
28756
28908
  var Tag = (props) => {
28757
28909
  const {
28758
28910
  children,
28759
28911
  onClose,
28760
28912
  size: size4 = "md",
28761
- colorNamespace = "xplat",
28762
- color: color2 = "neutral",
28763
- colorDepth,
28764
- colorToken,
28913
+ color: color2 = "xplat-neutral-500",
28765
28914
  className
28766
28915
  } = props;
28767
- const colorClass = colorToken ?? getColorClass(
28768
- colorNamespace,
28769
- color2,
28770
- colorDepth ?? 500
28771
- );
28772
- return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
28773
- /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("span", { className: "tag-label", children }),
28774
- onClose && /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(XIcon_default, {}) })
28916
+ const colorClass = color2;
28917
+ return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
28918
+ /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("span", { className: "tag-label", children }),
28919
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(XIcon_default, {}) })
28775
28920
  ] });
28776
28921
  };
28777
28922
  Tag.displayName = "Tag";
28778
28923
  var Tag_default = Tag;
28779
28924
 
28780
28925
  // src/components/TextArea/TextArea.tsx
28781
- var import_react37 = __toESM(require("react"), 1);
28782
- var import_jsx_runtime343 = require("react/jsx-runtime");
28783
- var TextArea = import_react37.default.forwardRef(
28926
+ var import_react38 = __toESM(require("react"), 1);
28927
+ var import_jsx_runtime344 = require("react/jsx-runtime");
28928
+ var TextArea = import_react38.default.forwardRef(
28784
28929
  (props, ref) => {
28785
28930
  const { value, onChange, className, disabled, ...textareaProps } = props;
28786
- const localRef = import_react37.default.useRef(null);
28931
+ const localRef = import_react38.default.useRef(null);
28787
28932
  const setRefs = (el) => {
28788
28933
  localRef.current = el;
28789
28934
  if (!ref) return;
@@ -28803,21 +28948,21 @@ var TextArea = import_react37.default.forwardRef(
28803
28948
  onChange(event);
28804
28949
  }
28805
28950
  };
28806
- import_react37.default.useEffect(() => {
28951
+ import_react38.default.useEffect(() => {
28807
28952
  const el = localRef.current;
28808
28953
  if (!el) return;
28809
28954
  el.style.height = "0px";
28810
28955
  const nextHeight = Math.min(el.scrollHeight, 400);
28811
28956
  el.style.height = `${nextHeight}px`;
28812
28957
  }, [value]);
28813
- return /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
28958
+ return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
28814
28959
  "div",
28815
28960
  {
28816
28961
  className: clsx_default(
28817
28962
  "lib-xplat-textarea",
28818
28963
  disabled ? "disabled" : void 0
28819
28964
  ),
28820
- children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
28965
+ children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
28821
28966
  "textarea",
28822
28967
  {
28823
28968
  ...textareaProps,
@@ -28835,25 +28980,25 @@ TextArea.displayName = "TextArea";
28835
28980
  var TextArea_default = TextArea;
28836
28981
 
28837
28982
  // src/components/Toast/Toast.tsx
28838
- var import_react38 = __toESM(require("react"), 1);
28983
+ var import_react39 = __toESM(require("react"), 1);
28839
28984
  var import_react_dom6 = require("react-dom");
28840
- var import_jsx_runtime344 = require("react/jsx-runtime");
28841
- var ToastContext = import_react38.default.createContext(null);
28985
+ var import_jsx_runtime345 = require("react/jsx-runtime");
28986
+ var ToastContext = import_react39.default.createContext(null);
28842
28987
  var useToast = () => {
28843
- const ctx = import_react38.default.useContext(ToastContext);
28988
+ const ctx = import_react39.default.useContext(ToastContext);
28844
28989
  if (!ctx) throw new Error("useToast must be used within ToastProvider");
28845
28990
  return ctx;
28846
28991
  };
28847
28992
  var EXIT_DURATION = 300;
28848
28993
  var ToastItemComponent = ({ item, isExiting, onClose }) => {
28849
- const ref = import_react38.default.useRef(null);
28850
- const [height, setHeight] = import_react38.default.useState(void 0);
28851
- import_react38.default.useEffect(() => {
28994
+ const ref = import_react39.default.useRef(null);
28995
+ const [height, setHeight] = import_react39.default.useState(void 0);
28996
+ import_react39.default.useEffect(() => {
28852
28997
  if (ref.current && !isExiting) {
28853
28998
  setHeight(ref.current.offsetHeight);
28854
28999
  }
28855
29000
  }, [isExiting]);
28856
- return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
29001
+ return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
28857
29002
  "div",
28858
29003
  {
28859
29004
  className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
@@ -28861,15 +29006,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
28861
29006
  maxHeight: isExiting ? 0 : height ?? "none",
28862
29007
  marginBottom: isExiting ? 0 : void 0
28863
29008
  },
28864
- children: /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(
29009
+ children: /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)(
28865
29010
  "div",
28866
29011
  {
28867
29012
  ref,
28868
29013
  className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
28869
29014
  role: "alert",
28870
29015
  children: [
28871
- /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("span", { className: "message", children: item.message }),
28872
- /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
29016
+ /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("span", { className: "message", children: item.message }),
29017
+ /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
28873
29018
  ]
28874
29019
  }
28875
29020
  )
@@ -28880,13 +29025,13 @@ var ToastProvider = ({
28880
29025
  children,
28881
29026
  position = "top-right"
28882
29027
  }) => {
28883
- const [toasts, setToasts] = import_react38.default.useState([]);
28884
- const [removing, setRemoving] = import_react38.default.useState(/* @__PURE__ */ new Set());
28885
- const [mounted, setMounted] = import_react38.default.useState(false);
28886
- import_react38.default.useEffect(() => {
29028
+ const [toasts, setToasts] = import_react39.default.useState([]);
29029
+ const [removing, setRemoving] = import_react39.default.useState(/* @__PURE__ */ new Set());
29030
+ const [mounted, setMounted] = import_react39.default.useState(false);
29031
+ import_react39.default.useEffect(() => {
28887
29032
  setMounted(true);
28888
29033
  }, []);
28889
- const remove = import_react38.default.useCallback((id) => {
29034
+ const remove = import_react39.default.useCallback((id) => {
28890
29035
  setRemoving((prev) => new Set(prev).add(id));
28891
29036
  setTimeout(() => {
28892
29037
  setToasts((prev) => prev.filter((t) => t.id !== id));
@@ -28897,7 +29042,7 @@ var ToastProvider = ({
28897
29042
  });
28898
29043
  }, EXIT_DURATION);
28899
29044
  }, []);
28900
- const toast = import_react38.default.useCallback(
29045
+ const toast = import_react39.default.useCallback(
28901
29046
  (type, message2, duration = 3e3) => {
28902
29047
  const id = `${Date.now()}-${Math.random()}`;
28903
29048
  setToasts((prev) => [...prev, { id, type, message: message2 }]);
@@ -28907,10 +29052,10 @@ var ToastProvider = ({
28907
29052
  },
28908
29053
  [remove]
28909
29054
  );
28910
- return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(ToastContext.Provider, { value: { toast }, children: [
29055
+ return /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)(ToastContext.Provider, { value: { toast }, children: [
28911
29056
  children,
28912
29057
  mounted && (0, import_react_dom6.createPortal)(
28913
- /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
29058
+ /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
28914
29059
  ToastItemComponent,
28915
29060
  {
28916
29061
  item: t,
@@ -28926,36 +29071,29 @@ var ToastProvider = ({
28926
29071
  ToastProvider.displayName = "ToastProvider";
28927
29072
 
28928
29073
  // src/components/Tooltip/Tooltip.tsx
28929
- var import_react39 = __toESM(require("react"), 1);
28930
- var import_jsx_runtime345 = require("react/jsx-runtime");
29074
+ var import_react40 = __toESM(require("react"), 1);
29075
+ var import_jsx_runtime346 = require("react/jsx-runtime");
28931
29076
  var Tooltip2 = (props) => {
28932
29077
  const {
28933
29078
  type = "primary",
28934
- colorNamespace = "xplat",
28935
- color: color2 = "blue",
28936
- colorDepth,
28937
- colorToken,
29079
+ color: color2 = "xplat-neutral-900",
28938
29080
  description,
28939
29081
  children
28940
29082
  } = props;
28941
- const iconRef = import_react39.default.useRef(null);
28942
- const colorClass = colorToken ?? getColorClass(
28943
- colorNamespace,
28944
- color2,
28945
- colorDepth ?? 500
28946
- );
28947
- return /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: "lib-xplat-tooltip", children: [
28948
- /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
28949
- /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
29083
+ const iconRef = import_react40.default.useRef(null);
29084
+ const colorClass = color2;
29085
+ return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "lib-xplat-tooltip", children: [
29086
+ /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
29087
+ /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
28950
29088
  ] });
28951
29089
  };
28952
29090
  Tooltip2.displayName = "Tooltip";
28953
29091
  var Tooltip_default = Tooltip2;
28954
29092
 
28955
29093
  // src/components/Video/Video.tsx
28956
- var import_react40 = __toESM(require("react"), 1);
28957
- var import_jsx_runtime346 = require("react/jsx-runtime");
28958
- var Video = import_react40.default.forwardRef((props, ref) => {
29094
+ var import_react41 = __toESM(require("react"), 1);
29095
+ var import_jsx_runtime347 = require("react/jsx-runtime");
29096
+ var Video = import_react41.default.forwardRef((props, ref) => {
28959
29097
  const {
28960
29098
  src,
28961
29099
  poster,
@@ -28969,10 +29107,10 @@ var Video = import_react40.default.forwardRef((props, ref) => {
28969
29107
  onPause,
28970
29108
  ...rest
28971
29109
  } = props;
28972
- const videoRef = import_react40.default.useRef(null);
28973
- const [isPlaying, setIsPlaying] = import_react40.default.useState(Boolean(autoPlay));
28974
- const [isLoaded, setIsLoaded] = import_react40.default.useState(false);
28975
- const setRefs = import_react40.default.useCallback(
29110
+ const videoRef = import_react41.default.useRef(null);
29111
+ const [isPlaying, setIsPlaying] = import_react41.default.useState(Boolean(autoPlay));
29112
+ const [isLoaded, setIsLoaded] = import_react41.default.useState(false);
29113
+ const setRefs = import_react41.default.useCallback(
28976
29114
  (el) => {
28977
29115
  videoRef.current = el;
28978
29116
  if (typeof ref === "function") ref(el);
@@ -29000,7 +29138,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
29000
29138
  }
29001
29139
  };
29002
29140
  const showCustomOverlay = !controls;
29003
- return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(
29141
+ return /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(
29004
29142
  "div",
29005
29143
  {
29006
29144
  className: clsx_default(
@@ -29009,7 +29147,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
29009
29147
  className
29010
29148
  ),
29011
29149
  children: [
29012
- /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
29150
+ /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
29013
29151
  "video",
29014
29152
  {
29015
29153
  ref: setRefs,
@@ -29026,7 +29164,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
29026
29164
  ...rest
29027
29165
  }
29028
29166
  ),
29029
- showCustomOverlay && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
29167
+ showCustomOverlay && /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
29030
29168
  "button",
29031
29169
  {
29032
29170
  type: "button",
@@ -29037,7 +29175,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
29037
29175
  ),
29038
29176
  onClick: togglePlay,
29039
29177
  "aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
29040
- children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("span", { className: "play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(PlayCircleIcon_default, {}) })
29178
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("span", { className: "play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(PlayCircleIcon_default, {}) })
29041
29179
  }
29042
29180
  )
29043
29181
  ]
@@ -29083,6 +29221,7 @@ var Video_default = Video;
29083
29221
  Skeleton,
29084
29222
  Spinner,
29085
29223
  Steps,
29224
+ Swiper,
29086
29225
  Switch,
29087
29226
  Tab,
29088
29227
  Table,