@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
package/dist/index.js CHANGED
@@ -5596,11 +5596,6 @@ var Alert = (props) => {
5596
5596
  Alert.displayName = "Alert";
5597
5597
  var Alert_default = Alert;
5598
5598
 
5599
- // src/util/getColor.ts
5600
- var getColorClass = (namespace, palette, shade) => {
5601
- return `${String(namespace)}-${String(palette)}${shade !== void 0 ? `-${String(shade)}` : ""}`;
5602
- };
5603
-
5604
5599
  // src/components/Avatar/Avatar.tsx
5605
5600
  import { jsx as jsx297 } from "react/jsx-runtime";
5606
5601
  var Avatar = (props) => {
@@ -5609,17 +5604,10 @@ var Avatar = (props) => {
5609
5604
  alt,
5610
5605
  name,
5611
5606
  size: size4 = "md",
5612
- colorNamespace = "xplat",
5613
- color: color2 = "blue",
5614
- colorDepth,
5615
- colorToken,
5607
+ color: color2 = "xplat-blue-500",
5616
5608
  className
5617
5609
  } = props;
5618
- const colorClass = colorToken ?? getColorClass(
5619
- colorNamespace,
5620
- color2,
5621
- colorDepth ?? 500
5622
- );
5610
+ const colorClass = color2;
5623
5611
  const initials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
5624
5612
  return /* @__PURE__ */ jsx297("div", { className: clsx_default("lib-xplat-avatar", size4, className), children: src ? /* @__PURE__ */ jsx297("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ jsx297("div", { className: clsx_default("fallback", colorClass), children: initials || /* @__PURE__ */ jsx297("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx297("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" }) }) }) });
5625
5613
  };
@@ -5635,17 +5623,10 @@ var Badge = (props) => {
5635
5623
  maxCount = 99,
5636
5624
  dot = false,
5637
5625
  size: size4 = "md",
5638
- colorNamespace = "xplat",
5639
- color: color2 = "red",
5640
- colorDepth,
5641
- colorToken,
5626
+ color: color2 = "xplat-red-500",
5642
5627
  className
5643
5628
  } = props;
5644
- const colorClass = colorToken ?? getColorClass(
5645
- colorNamespace,
5646
- color2,
5647
- colorDepth ?? 500
5648
- );
5629
+ const colorClass = color2;
5649
5630
  const showBadge = dot || count2 !== void 0 && count2 > 0;
5650
5631
  const displayCount = count2 !== void 0 && count2 > maxCount ? `${maxCount}+` : count2;
5651
5632
  return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-badge", size4, className), children: [
@@ -5678,19 +5659,12 @@ var Button = (props) => {
5678
5659
  children,
5679
5660
  type = "primary",
5680
5661
  size: size4 = "md",
5681
- colorNamespace = "xplat",
5682
- color: color2 = "black",
5683
- colorDepth,
5684
- colorToken,
5662
+ color: color2 = "xplat-black",
5685
5663
  disabled,
5686
5664
  className,
5687
5665
  ...rest
5688
5666
  } = props;
5689
- const colorClass = colorToken ?? getColorClass(
5690
- colorNamespace,
5691
- color2,
5692
- colorDepth ?? 500
5693
- );
5667
+ const colorClass = color2;
5694
5668
  return /* @__PURE__ */ jsx300(
5695
5669
  "button",
5696
5670
  {
@@ -20321,10 +20295,7 @@ var gridColumns = {
20321
20295
  import { jsx as jsx306, jsxs as jsxs195 } from "react/jsx-runtime";
20322
20296
  var CheckBox = (props) => {
20323
20297
  const {
20324
- colorNamespace = "xplat",
20325
- color: color2 = "blue",
20326
- colorDepth,
20327
- colorToken,
20298
+ color: color2 = "xplat-blue-500",
20328
20299
  checked,
20329
20300
  label,
20330
20301
  onChange,
@@ -20336,11 +20307,7 @@ var CheckBox = (props) => {
20336
20307
  const handleChange = (e) => {
20337
20308
  if (onChange) onChange(e);
20338
20309
  };
20339
- const mainColor = colorToken ?? getColorClass(
20340
- colorNamespace,
20341
- color2,
20342
- colorDepth ?? 500
20343
- );
20310
+ const mainColor = color2;
20344
20311
  const uncheckedClasses = `unchecked`;
20345
20312
  const checkedClasses = `checked ${mainColor}`;
20346
20313
  const disabledClasses = "disabled";
@@ -20368,19 +20335,12 @@ import { jsx as jsx307 } from "react/jsx-runtime";
20368
20335
  var Chip = (props) => {
20369
20336
  const {
20370
20337
  children,
20371
- colorNamespace = "xplat",
20372
- color: color2 = "black",
20373
- colorDepth,
20374
- colorToken,
20338
+ color: color2 = "xplat-black",
20375
20339
  type = "primary",
20376
20340
  size: size4 = "md",
20377
20341
  className
20378
20342
  } = props;
20379
- const colorClass = colorToken ?? getColorClass(
20380
- colorNamespace,
20381
- color2,
20382
- colorDepth ?? 500
20383
- );
20343
+ const colorClass = color2;
20384
20344
  return /* @__PURE__ */ jsx307("div", { className: clsx_default("lib-xplat-chip", type, size4, colorClass, className), children });
20385
20345
  };
20386
20346
  Chip.displayName = "Chip";
@@ -31374,19 +31334,11 @@ var Modal_default = Modal;
31374
31334
 
31375
31335
  // src/components/DatePicker/SingleDatePicker/index.tsx
31376
31336
  import { jsx as jsx314 } from "react/jsx-runtime";
31377
- function getColorValue(ns, color2, depth) {
31378
- const nsColors = colors[ns];
31379
- const colorEntry = nsColors[color2];
31380
- if (typeof colorEntry === "string") return colorEntry;
31381
- return colorEntry[String(depth)] ?? "";
31382
- }
31383
31337
  var SingleDatePicker = (props) => {
31384
31338
  const {
31385
31339
  value,
31386
31340
  onChange,
31387
- colorNamespace = "xplat",
31388
- color: color2 = "blue",
31389
- colorDepth,
31341
+ color: color2 = "xplat-blue-500",
31390
31342
  highlightDates,
31391
31343
  ...rest
31392
31344
  } = props;
@@ -31394,16 +31346,11 @@ var SingleDatePicker = (props) => {
31394
31346
  if (Array.isArray(date)) return;
31395
31347
  onChange?.(date);
31396
31348
  };
31397
- const activeColor = getColorValue(
31398
- colorNamespace,
31399
- color2,
31400
- colorDepth ?? 500
31401
- );
31402
31349
  return /* @__PURE__ */ jsx314(
31403
31350
  "div",
31404
31351
  {
31405
31352
  className: "lib-xplat-datepicker",
31406
- style: { "--datepicker-active-color": activeColor },
31353
+ style: { "--datepicker-active-color": `var(--${color2})` },
31407
31354
  children: /* @__PURE__ */ jsx314(
31408
31355
  DatePicker,
31409
31356
  {
@@ -31461,13 +31408,12 @@ var PopupPicker = (props) => {
31461
31408
  Button_default,
31462
31409
  {
31463
31410
  type: "secondary",
31464
- color: "neutral",
31465
- colorDepth: 400,
31411
+ color: "xplat-neutral-400",
31466
31412
  onClick: handleClose,
31467
31413
  children: "\uCDE8\uC18C"
31468
31414
  }
31469
31415
  ),
31470
- /* @__PURE__ */ jsx315(Button_default, { type: "primary", color: "blue", onClick: handleClose, children: "\uC801\uC6A9" })
31416
+ /* @__PURE__ */ jsx315(Button_default, { type: "primary", color: "xplat-blue-500", onClick: handleClose, children: "\uC801\uC6A9" })
31471
31417
  ] })
31472
31418
  ] }) })
31473
31419
  ] });
@@ -31497,19 +31443,12 @@ var RangePicker = (props) => {
31497
31443
  onChange,
31498
31444
  minDate,
31499
31445
  maxDate,
31500
- colorNamespace,
31501
- color: color2,
31502
- colorDepth
31446
+ color: color2
31503
31447
  } = props;
31504
31448
  const rangeDates = React13.useMemo(
31505
31449
  () => getDatesBetween(startDate, endDate),
31506
31450
  [startDate, endDate]
31507
31451
  );
31508
- const colorProps = {
31509
- ...colorNamespace !== void 0 && { colorNamespace },
31510
- ...color2 !== void 0 && { color: color2 },
31511
- ...colorDepth !== void 0 && { colorDepth }
31512
- };
31513
31452
  return /* @__PURE__ */ jsxs200("div", { className: "lib-xplat-range-datepicker", children: [
31514
31453
  /* @__PURE__ */ jsxs200("div", { className: "lib-xplat-range-datepicker-from", children: [
31515
31454
  /* @__PURE__ */ jsx316("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
@@ -31521,7 +31460,7 @@ var RangePicker = (props) => {
31521
31460
  minDate,
31522
31461
  maxDate: endDate,
31523
31462
  highlightDates: rangeDates,
31524
- ...colorProps
31463
+ color: color2
31525
31464
  }
31526
31465
  )
31527
31466
  ] }),
@@ -31535,7 +31474,7 @@ var RangePicker = (props) => {
31535
31474
  minDate: startDate,
31536
31475
  maxDate,
31537
31476
  highlightDates: rangeDates,
31538
- ...colorProps
31477
+ color: color2
31539
31478
  }
31540
31479
  )
31541
31480
  ] })
@@ -32247,17 +32186,10 @@ var Pagination = (props) => {
32247
32186
  siblingCount = 1,
32248
32187
  onChange,
32249
32188
  size: size4 = "md",
32250
- colorNamespace = "xplat",
32251
- color: color2 = "blue",
32252
- colorDepth,
32253
- colorToken,
32189
+ color: color2 = "xplat-blue-500",
32254
32190
  className
32255
32191
  } = props;
32256
- const colorClass = colorToken ?? getColorClass(
32257
- colorNamespace,
32258
- color2,
32259
- colorDepth ?? 500
32260
- );
32192
+ const colorClass = color2;
32261
32193
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
32262
32194
  const pages = getPageRange(current, totalPages, siblingCount);
32263
32195
  const handleClick = (page) => {
@@ -32367,17 +32299,10 @@ var Progress = (props) => {
32367
32299
  max: max3 = 100,
32368
32300
  size: size4 = "md",
32369
32301
  showLabel = false,
32370
- colorNamespace = "xplat",
32371
- color: color2 = "blue",
32372
- colorDepth,
32373
- colorToken,
32302
+ color: color2 = "xplat-blue-500",
32374
32303
  className
32375
32304
  } = props;
32376
- const colorClass = colorToken ?? getColorClass(
32377
- colorNamespace,
32378
- color2,
32379
- colorDepth ?? 500
32380
- );
32305
+ const colorClass = color2;
32381
32306
  const percentage = Math.min(100, Math.max(0, value / max3 * 100));
32382
32307
  return /* @__PURE__ */ jsxs209("div", { className: clsx_default("lib-xplat-progress", size4, className), children: [
32383
32308
  /* @__PURE__ */ jsx328(
@@ -32423,10 +32348,7 @@ var Radio = (props) => {
32423
32348
  label,
32424
32349
  value,
32425
32350
  className,
32426
- colorNamespace = "xplat",
32427
- color: color2 = "blue",
32428
- colorDepth,
32429
- colorToken,
32351
+ color: color2 = "xplat-blue-500",
32430
32352
  size: sizeProp,
32431
32353
  ...rest
32432
32354
  } = props;
@@ -32439,11 +32361,7 @@ var Radio = (props) => {
32439
32361
  value,
32440
32362
  onChange: rest.onChange
32441
32363
  };
32442
- const colorClass = colorToken ?? getColorClass(
32443
- colorNamespace,
32444
- color2,
32445
- colorDepth ?? 500
32446
- );
32364
+ const colorClass = color2;
32447
32365
  return /* @__PURE__ */ jsxs210(
32448
32366
  "label",
32449
32367
  {
@@ -32508,17 +32426,10 @@ import { jsx as jsx332, jsxs as jsxs211 } from "react/jsx-runtime";
32508
32426
  var Spinner = (props) => {
32509
32427
  const {
32510
32428
  size: size4 = "md",
32511
- colorNamespace = "xplat",
32512
- color: color2 = "blue",
32513
- colorDepth,
32514
- colorToken,
32429
+ color: color2 = "xplat-blue-500",
32515
32430
  className
32516
32431
  } = props;
32517
- const colorClass = colorToken ?? getColorClass(
32518
- colorNamespace,
32519
- color2,
32520
- colorDepth ?? 500
32521
- );
32432
+ const colorClass = color2;
32522
32433
  return /* @__PURE__ */ jsx332(
32523
32434
  "div",
32524
32435
  {
@@ -32560,17 +32471,10 @@ var Steps = (props) => {
32560
32471
  const {
32561
32472
  items,
32562
32473
  current,
32563
- colorNamespace = "xplat",
32564
- color: color2 = "blue",
32565
- colorDepth,
32566
- colorToken,
32474
+ color: color2 = "xplat-blue-500",
32567
32475
  className
32568
32476
  } = props;
32569
- const colorClass = colorToken ?? getColorClass(
32570
- colorNamespace,
32571
- color2,
32572
- colorDepth ?? 500
32573
- );
32477
+ const colorClass = color2;
32574
32478
  return /* @__PURE__ */ jsx333("div", { className: clsx_default("lib-xplat-steps", className), children: items.map((item, index3) => {
32575
32479
  const status = index3 < current ? "completed" : index3 === current ? "active" : "pending";
32576
32480
  return /* @__PURE__ */ jsxs212("div", { className: clsx_default("step-item", status), children: [
@@ -32588,9 +32492,270 @@ var Steps = (props) => {
32588
32492
  Steps.displayName = "Steps";
32589
32493
  var Steps_default = Steps;
32590
32494
 
32591
- // src/components/Switch/Switch.tsx
32495
+ // src/components/Swiper/Swiper.tsx
32592
32496
  import React27 from "react";
32593
- import { jsx as jsx334 } from "react/jsx-runtime";
32497
+ import { jsx as jsx334, jsxs as jsxs213 } from "react/jsx-runtime";
32498
+ var Swiper = (props) => {
32499
+ const {
32500
+ auto = false,
32501
+ swiperRef,
32502
+ renderItems = [],
32503
+ viewItemCount = 1,
32504
+ maxItems,
32505
+ loop = false,
32506
+ spaceBetween = 16,
32507
+ showProgress = false,
32508
+ autoplayDelay = 3e3,
32509
+ speed = 300,
32510
+ slideBy = 1,
32511
+ index: indexProp,
32512
+ onChange,
32513
+ className
32514
+ } = props;
32515
+ const items = maxItems ? renderItems.slice(0, maxItems) : renderItems;
32516
+ const totalSlides = items.length;
32517
+ const canSlide = totalSlides > viewItemCount;
32518
+ const maxIndex = Math.max(0, totalSlides - viewItemCount);
32519
+ const useLoop = loop && canSlide;
32520
+ const cloneCount = useLoop ? totalSlides : 0;
32521
+ const extendedItems = React27.useMemo(() => {
32522
+ if (!useLoop) return items;
32523
+ return [...items, ...items, ...items];
32524
+ }, [items, useLoop]);
32525
+ const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
32526
+ const [innerIndex, setInnerIndex] = React27.useState(
32527
+ useLoop ? cloneCount + initialIdx : initialIdx
32528
+ );
32529
+ const [isDragging, setIsDragging] = React27.useState(false);
32530
+ const [dragOffset, setDragOffset] = React27.useState(0);
32531
+ const [animated, setAnimated] = React27.useState(true);
32532
+ const [containerWidth, setContainerWidth] = React27.useState(0);
32533
+ const containerRef = React27.useRef(null);
32534
+ const startXRef = React27.useRef(0);
32535
+ const startTimeRef = React27.useRef(0);
32536
+ const autoplayTimerRef = React27.useRef(null);
32537
+ React27.useEffect(() => {
32538
+ const el = containerRef.current;
32539
+ if (!el) return;
32540
+ const ro = new ResizeObserver((entries) => {
32541
+ for (const entry of entries) {
32542
+ setContainerWidth(entry.contentRect.width);
32543
+ }
32544
+ });
32545
+ ro.observe(el);
32546
+ setContainerWidth(el.offsetWidth);
32547
+ return () => ro.disconnect();
32548
+ }, []);
32549
+ const slideStep = containerWidth > 0 ? (containerWidth - (viewItemCount - 1) * spaceBetween) / viewItemCount + spaceBetween : 0;
32550
+ const transformPx = -(innerIndex * slideStep) + dragOffset;
32551
+ const getRealIndex = (inner) => {
32552
+ if (!useLoop) return inner;
32553
+ return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
32554
+ };
32555
+ const realIndex = getRealIndex(innerIndex);
32556
+ const moveToInner = React27.useCallback(
32557
+ (idx, withAnim = true) => {
32558
+ if (useLoop) {
32559
+ setInnerIndex((prev) => {
32560
+ const real = ((prev - cloneCount) % totalSlides + totalSlides) % totalSlides;
32561
+ const canonical = cloneCount + real;
32562
+ if (prev !== canonical) {
32563
+ const delta = idx - prev;
32564
+ setAnimated(withAnim);
32565
+ return canonical + delta;
32566
+ }
32567
+ setAnimated(withAnim);
32568
+ return idx;
32569
+ });
32570
+ } else {
32571
+ setAnimated(withAnim);
32572
+ setInnerIndex(idx);
32573
+ }
32574
+ },
32575
+ [useLoop, cloneCount, totalSlides]
32576
+ );
32577
+ const handleTransitionEnd = React27.useCallback(() => {
32578
+ if (!useLoop) return;
32579
+ const real = getRealIndex(innerIndex);
32580
+ const canonical = cloneCount + real;
32581
+ if (innerIndex !== canonical) {
32582
+ moveToInner(canonical, false);
32583
+ }
32584
+ onChange?.(Math.min(real, maxIndex));
32585
+ }, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange, moveToInner]);
32586
+ const slideTo = React27.useCallback(
32587
+ (logicalIndex) => {
32588
+ if (!canSlide) return;
32589
+ const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
32590
+ const target = useLoop ? cloneCount + clamped : clamped;
32591
+ moveToInner(target, true);
32592
+ if (!useLoop) onChange?.(clamped);
32593
+ },
32594
+ [canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
32595
+ );
32596
+ const slideNext = React27.useCallback(() => {
32597
+ if (!canSlide) return;
32598
+ const nextInner = innerIndex + slideBy;
32599
+ if (useLoop) {
32600
+ moveToInner(nextInner, true);
32601
+ } else {
32602
+ moveToInner(Math.min(nextInner, maxIndex), true);
32603
+ }
32604
+ }, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
32605
+ const slidePrev = React27.useCallback(() => {
32606
+ if (!canSlide) return;
32607
+ const prevInner = innerIndex - slideBy;
32608
+ if (useLoop) {
32609
+ moveToInner(prevInner, true);
32610
+ } else {
32611
+ moveToInner(Math.max(prevInner, 0), true);
32612
+ }
32613
+ }, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
32614
+ React27.useEffect(() => {
32615
+ if (indexProp === void 0) return;
32616
+ const clamped = Math.max(0, Math.min(indexProp, maxIndex));
32617
+ const target = useLoop ? cloneCount + clamped : clamped;
32618
+ if (target !== innerIndex) {
32619
+ moveToInner(target, true);
32620
+ }
32621
+ }, [indexProp]);
32622
+ React27.useImperativeHandle(swiperRef, () => ({
32623
+ slidePrev,
32624
+ slideNext,
32625
+ slideTo
32626
+ }));
32627
+ React27.useEffect(() => {
32628
+ if (!auto || !canSlide) return;
32629
+ autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
32630
+ return () => {
32631
+ if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
32632
+ };
32633
+ }, [auto, autoplayDelay, slideNext, canSlide]);
32634
+ const pauseAutoplay = () => {
32635
+ if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
32636
+ };
32637
+ const getClientX = (e) => {
32638
+ if ("touches" in e) return e.touches[0]?.clientX ?? 0;
32639
+ return e.clientX;
32640
+ };
32641
+ const handleDragStart = (e) => {
32642
+ if (!canSlide) return;
32643
+ if ("button" in e && e.button !== 0) return;
32644
+ pauseAutoplay();
32645
+ setIsDragging(true);
32646
+ setAnimated(false);
32647
+ startXRef.current = getClientX(e);
32648
+ startTimeRef.current = Date.now();
32649
+ };
32650
+ React27.useEffect(() => {
32651
+ if (!isDragging) return;
32652
+ const handleMove = (e) => {
32653
+ setDragOffset(getClientX(e) - startXRef.current);
32654
+ };
32655
+ const handleEnd = () => {
32656
+ setIsDragging(false);
32657
+ const absDrag = Math.abs(dragOffset);
32658
+ const elapsed = Date.now() - startTimeRef.current;
32659
+ const velocity = absDrag / elapsed;
32660
+ if ((absDrag > 30 || velocity > 0.3) && slideStep > 0) {
32661
+ const rawCount = Math.max(1, Math.round(absDrag / slideStep));
32662
+ const count2 = Math.max(slideBy, Math.round(rawCount / slideBy) * slideBy);
32663
+ const direction = dragOffset < 0 ? 1 : -1;
32664
+ const nextInner = innerIndex + direction * count2;
32665
+ if (useLoop) {
32666
+ moveToInner(nextInner, true);
32667
+ } else {
32668
+ moveToInner(Math.max(0, Math.min(nextInner, maxIndex)), true);
32669
+ }
32670
+ } else {
32671
+ setAnimated(true);
32672
+ }
32673
+ setDragOffset(0);
32674
+ };
32675
+ window.addEventListener("mousemove", handleMove);
32676
+ window.addEventListener("mouseup", handleEnd);
32677
+ window.addEventListener("touchmove", handleMove, { passive: true });
32678
+ window.addEventListener("touchend", handleEnd);
32679
+ return () => {
32680
+ window.removeEventListener("mousemove", handleMove);
32681
+ window.removeEventListener("mouseup", handleEnd);
32682
+ window.removeEventListener("touchmove", handleMove);
32683
+ window.removeEventListener("touchend", handleEnd);
32684
+ };
32685
+ }, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
32686
+ const slideWidthPercent = 100 / viewItemCount;
32687
+ const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
32688
+ const totalSteps = Math.ceil((maxIndex + 1) / slideBy);
32689
+ const currentStep = Math.min(
32690
+ Math.floor(realIndex / slideBy),
32691
+ totalSteps - 1
32692
+ );
32693
+ return /* @__PURE__ */ jsxs213("div", { className: clsx_default("lib-xplat-swiper", className), ref: containerRef, children: [
32694
+ /* @__PURE__ */ jsx334(
32695
+ "div",
32696
+ {
32697
+ className: "lib-xplat-swiper__viewport",
32698
+ onMouseDown: handleDragStart,
32699
+ onTouchStart: handleDragStart,
32700
+ children: /* @__PURE__ */ jsx334(
32701
+ "div",
32702
+ {
32703
+ className: clsx_default(
32704
+ "lib-xplat-swiper__track",
32705
+ animated && !isDragging && "transitioning"
32706
+ ),
32707
+ style: {
32708
+ transform: `translateX(${transformPx}px)`,
32709
+ transitionDuration: isDragging || !animated ? "0ms" : `${speed}ms`,
32710
+ gap: `${spaceBetween}px`
32711
+ },
32712
+ onTransitionEnd: handleTransitionEnd,
32713
+ children: extendedItems.map((item, idx) => /* @__PURE__ */ jsx334(
32714
+ "div",
32715
+ {
32716
+ className: "lib-xplat-swiper__slide",
32717
+ style: {
32718
+ minWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`,
32719
+ maxWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`
32720
+ },
32721
+ children: item
32722
+ },
32723
+ idx
32724
+ ))
32725
+ }
32726
+ )
32727
+ }
32728
+ ),
32729
+ showProgress && canSlide && /* @__PURE__ */ jsx334("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx334("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx334(
32730
+ "span",
32731
+ {
32732
+ className: "lib-xplat-swiper__progress-fill",
32733
+ style: {
32734
+ width: `${(currentStep + 1) / totalSteps * 100}%`,
32735
+ transitionDuration: `${speed}ms`
32736
+ }
32737
+ }
32738
+ ) }) }),
32739
+ canSlide && /* @__PURE__ */ jsx334("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx334(
32740
+ "button",
32741
+ {
32742
+ className: clsx_default(
32743
+ "lib-xplat-swiper__dot",
32744
+ i === currentStep && "active"
32745
+ ),
32746
+ onClick: () => slideTo(i * slideBy),
32747
+ "aria-label": `\uC2AC\uB77C\uC774\uB4DC ${i + 1}`
32748
+ },
32749
+ i
32750
+ )) })
32751
+ ] });
32752
+ };
32753
+ Swiper.displayName = "Swiper";
32754
+ var Swiper_default = Swiper;
32755
+
32756
+ // src/components/Switch/Switch.tsx
32757
+ import React28 from "react";
32758
+ import { jsx as jsx335 } from "react/jsx-runtime";
32594
32759
  var KNOB_TRANSITION_MS = 250;
32595
32760
  var Switch = (props) => {
32596
32761
  const {
@@ -32598,15 +32763,12 @@ var Switch = (props) => {
32598
32763
  size: size4 = "md",
32599
32764
  disabled,
32600
32765
  onChange,
32601
- colorNamespace = "xplat",
32602
- color: color2 = "blue",
32603
- colorDepth,
32604
- colorToken,
32766
+ color: color2 = "xplat-blue-500",
32605
32767
  className
32606
32768
  } = props;
32607
- const [isAnimating, setIsAnimating] = React27.useState(false);
32608
- const timeoutRef = React27.useRef(null);
32609
- React27.useEffect(() => {
32769
+ const [isAnimating, setIsAnimating] = React28.useState(false);
32770
+ const timeoutRef = React28.useRef(null);
32771
+ React28.useEffect(() => {
32610
32772
  return () => {
32611
32773
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
32612
32774
  };
@@ -32621,12 +32783,8 @@ var Switch = (props) => {
32621
32783
  timeoutRef.current = null;
32622
32784
  }, KNOB_TRANSITION_MS);
32623
32785
  };
32624
- const colorClass = colorToken ?? getColorClass(
32625
- colorNamespace,
32626
- color2,
32627
- colorDepth ?? 500
32628
- );
32629
- return /* @__PURE__ */ jsx334(
32786
+ const colorClass = color2;
32787
+ return /* @__PURE__ */ jsx335(
32630
32788
  "div",
32631
32789
  {
32632
32790
  className: clsx_default(
@@ -32640,7 +32798,7 @@ var Switch = (props) => {
32640
32798
  ),
32641
32799
  onClick: handleClick,
32642
32800
  "aria-disabled": disabled || isAnimating,
32643
- children: /* @__PURE__ */ jsx334("div", { className: clsx_default("knob", value ? "checked" : void 0) })
32801
+ children: /* @__PURE__ */ jsx335("div", { className: clsx_default("knob", value ? "checked" : void 0) })
32644
32802
  }
32645
32803
  );
32646
32804
  };
@@ -32648,14 +32806,14 @@ Switch.displayName = "Switch";
32648
32806
  var Switch_default = Switch;
32649
32807
 
32650
32808
  // src/components/Tab/Tab.tsx
32651
- import React29 from "react";
32809
+ import React30 from "react";
32652
32810
 
32653
32811
  // src/components/Tab/TabItem.tsx
32654
- import React28 from "react";
32655
- import { jsx as jsx335 } from "react/jsx-runtime";
32656
- var TabItem = React28.forwardRef((props, ref) => {
32812
+ import React29 from "react";
32813
+ import { jsx as jsx336 } from "react/jsx-runtime";
32814
+ var TabItem = React29.forwardRef((props, ref) => {
32657
32815
  const { isActive, title, onClick } = props;
32658
- return /* @__PURE__ */ jsx335(
32816
+ return /* @__PURE__ */ jsx336(
32659
32817
  "div",
32660
32818
  {
32661
32819
  ref,
@@ -32669,25 +32827,25 @@ TabItem.displayName = "TabItem";
32669
32827
  var TabItem_default = TabItem;
32670
32828
 
32671
32829
  // src/components/Tab/Tab.tsx
32672
- import { jsx as jsx336, jsxs as jsxs213 } from "react/jsx-runtime";
32830
+ import { jsx as jsx337, jsxs as jsxs214 } from "react/jsx-runtime";
32673
32831
  var Tab = (props) => {
32674
32832
  const { activeIndex, onChange, tabs, type, size: size4 = "md" } = props;
32675
- const [underlineStyle, setUnderlineStyle] = React29.useState({
32833
+ const [underlineStyle, setUnderlineStyle] = React30.useState({
32676
32834
  left: 0,
32677
32835
  width: 0
32678
32836
  });
32679
- const itemRefs = React29.useRef([]);
32837
+ const itemRefs = React30.useRef([]);
32680
32838
  const handleChangeActiveTab = (tabItem, tabIdx) => {
32681
32839
  onChange(tabItem, tabIdx);
32682
32840
  };
32683
- React29.useEffect(() => {
32841
+ React30.useEffect(() => {
32684
32842
  const el = itemRefs.current[activeIndex];
32685
32843
  if (el) {
32686
32844
  setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
32687
32845
  }
32688
32846
  }, [activeIndex, tabs.length]);
32689
- return /* @__PURE__ */ jsxs213("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
32690
- tabs.map((tab, idx) => /* @__PURE__ */ jsx336(
32847
+ return /* @__PURE__ */ jsxs214("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
32848
+ tabs.map((tab, idx) => /* @__PURE__ */ jsx337(
32691
32849
  TabItem_default,
32692
32850
  {
32693
32851
  onClick: () => handleChangeActiveTab(tab, idx),
@@ -32699,7 +32857,7 @@ var Tab = (props) => {
32699
32857
  },
32700
32858
  `${tab.value}_${idx}`
32701
32859
  )),
32702
- type === "toggle" && /* @__PURE__ */ jsx336(
32860
+ type === "toggle" && /* @__PURE__ */ jsx337(
32703
32861
  "div",
32704
32862
  {
32705
32863
  className: "tab-toggle-underline",
@@ -32715,17 +32873,17 @@ Tab.displayName = "Tab";
32715
32873
  var Tab_default = Tab;
32716
32874
 
32717
32875
  // src/components/Table/TableContext.tsx
32718
- import React30 from "react";
32719
- var TableContext = React30.createContext(null);
32876
+ import React31 from "react";
32877
+ var TableContext = React31.createContext(null);
32720
32878
  var useTableContext = () => {
32721
- const ctx = React30.useContext(TableContext);
32879
+ const ctx = React31.useContext(TableContext);
32722
32880
  if (!ctx) throw new Error("Table components must be used inside <Table>");
32723
32881
  return ctx;
32724
32882
  };
32725
32883
  var TableContext_default = TableContext;
32726
32884
 
32727
32885
  // src/components/Table/Table.tsx
32728
- import { jsx as jsx337 } from "react/jsx-runtime";
32886
+ import { jsx as jsx338 } from "react/jsx-runtime";
32729
32887
  var Table = (props) => {
32730
32888
  const {
32731
32889
  className,
@@ -32735,7 +32893,7 @@ var Table = (props) => {
32735
32893
  headerSticky = false,
32736
32894
  stickyShadow = true
32737
32895
  } = props;
32738
- return /* @__PURE__ */ jsx337("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ jsx337(
32896
+ return /* @__PURE__ */ jsx338("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ jsx338(
32739
32897
  TableContext_default.Provider,
32740
32898
  {
32741
32899
  value: {
@@ -32744,7 +32902,7 @@ var Table = (props) => {
32744
32902
  headerSticky,
32745
32903
  stickyShadow
32746
32904
  },
32747
- children: /* @__PURE__ */ jsx337("table", { className: "lib-xplat-table", children })
32905
+ children: /* @__PURE__ */ jsx338("table", { className: "lib-xplat-table", children })
32748
32906
  }
32749
32907
  ) });
32750
32908
  };
@@ -32752,40 +32910,40 @@ Table.displayName = "Table";
32752
32910
  var Table_default = Table;
32753
32911
 
32754
32912
  // src/components/Table/TableBody.tsx
32755
- import { jsx as jsx338 } from "react/jsx-runtime";
32913
+ import { jsx as jsx339 } from "react/jsx-runtime";
32756
32914
  var TableBody = (props) => {
32757
32915
  const { children, className } = props;
32758
- return /* @__PURE__ */ jsx338("tbody", { className, children });
32916
+ return /* @__PURE__ */ jsx339("tbody", { className, children });
32759
32917
  };
32760
32918
  TableBody.displayName = "TableBody";
32761
32919
  var TableBody_default = TableBody;
32762
32920
 
32763
32921
  // src/components/Table/TableCell.tsx
32764
- import React33 from "react";
32922
+ import React34 from "react";
32765
32923
 
32766
32924
  // src/components/Table/TableHeadContext.tsx
32767
- import React31 from "react";
32768
- var TableHeadContext = React31.createContext(
32925
+ import React32 from "react";
32926
+ var TableHeadContext = React32.createContext(
32769
32927
  null
32770
32928
  );
32771
32929
  var useTableHeadContext = () => {
32772
- const ctx = React31.useContext(TableHeadContext);
32930
+ const ctx = React32.useContext(TableHeadContext);
32773
32931
  return ctx;
32774
32932
  };
32775
32933
  var TableHeadContext_default = TableHeadContext;
32776
32934
 
32777
32935
  // src/components/Table/TableRowContext.tsx
32778
- import React32 from "react";
32779
- var TableRowContext = React32.createContext(null);
32936
+ import React33 from "react";
32937
+ var TableRowContext = React33.createContext(null);
32780
32938
  var useTableRowContext = () => {
32781
- const ctx = React32.useContext(TableRowContext);
32939
+ const ctx = React33.useContext(TableRowContext);
32782
32940
  if (!ctx) throw new Error("Table components must be used inside <Table>");
32783
32941
  return ctx;
32784
32942
  };
32785
32943
  var TableRowContext_default = TableRowContext;
32786
32944
 
32787
32945
  // src/components/Table/TableCell.tsx
32788
- import { jsx as jsx339 } from "react/jsx-runtime";
32946
+ import { jsx as jsx340 } from "react/jsx-runtime";
32789
32947
  var TableCell = (props) => {
32790
32948
  const {
32791
32949
  children,
@@ -32797,9 +32955,9 @@ var TableCell = (props) => {
32797
32955
  const { registerStickyCell, stickyCells } = useTableRowContext();
32798
32956
  const { stickyShadow } = useTableContext();
32799
32957
  const headContext = useTableHeadContext();
32800
- const [left, setLeft] = React33.useState(0);
32801
- const cellRef = React33.useRef(null);
32802
- const calculateLeft = React33.useCallback(() => {
32958
+ const [left, setLeft] = React34.useState(0);
32959
+ const cellRef = React34.useRef(null);
32960
+ const calculateLeft = React34.useCallback(() => {
32803
32961
  if (!cellRef.current) return 0;
32804
32962
  let totalLeft = 0;
32805
32963
  for (const ref of stickyCells) {
@@ -32808,7 +32966,7 @@ var TableCell = (props) => {
32808
32966
  }
32809
32967
  return totalLeft;
32810
32968
  }, [stickyCells]);
32811
- React33.useEffect(() => {
32969
+ React34.useEffect(() => {
32812
32970
  if (!isSticky || !cellRef.current) return;
32813
32971
  registerStickyCell(cellRef);
32814
32972
  setLeft(calculateLeft());
@@ -32826,7 +32984,7 @@ var TableCell = (props) => {
32826
32984
  const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
32827
32985
  const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
32828
32986
  const enableHover = headContext && headContext.cellHover;
32829
- return /* @__PURE__ */ jsx339(
32987
+ return /* @__PURE__ */ jsx340(
32830
32988
  CellTag,
32831
32989
  {
32832
32990
  ref: cellRef,
@@ -32848,47 +33006,40 @@ TableCell.displayName = "TableCell";
32848
33006
  var TableCell_default = TableCell;
32849
33007
 
32850
33008
  // src/components/Table/TableHead.tsx
32851
- import { jsx as jsx340 } from "react/jsx-runtime";
33009
+ import { jsx as jsx341 } from "react/jsx-runtime";
32852
33010
  var TableHead = ({
32853
33011
  children,
32854
33012
  className = "",
32855
33013
  cellHover = false
32856
33014
  }) => {
32857
33015
  const { headerSticky } = useTableContext();
32858
- return /* @__PURE__ */ jsx340(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx340("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
33016
+ return /* @__PURE__ */ jsx341(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx341("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
32859
33017
  };
32860
33018
  TableHead.displayName = "TableHead";
32861
33019
  var TableHead_default = TableHead;
32862
33020
 
32863
33021
  // src/components/Table/TableRow.tsx
32864
- import React34 from "react";
32865
- import { jsx as jsx341 } from "react/jsx-runtime";
33022
+ import React35 from "react";
33023
+ import { jsx as jsx342 } from "react/jsx-runtime";
32866
33024
  var TableRow = (props) => {
32867
33025
  const {
32868
33026
  children,
32869
33027
  className,
32870
- colorNamespace = "xplat",
32871
- color: color2 = "black",
32872
- colorDepth,
32873
- colorToken,
33028
+ color: color2 = "xplat-neutral-900",
32874
33029
  type = "secondary",
32875
33030
  isHover,
32876
33031
  onClick
32877
33032
  } = props;
32878
33033
  const { rowBorderUse } = useTableContext();
32879
- const [stickyCells, setStickyCells] = React34.useState([]);
33034
+ const [stickyCells, setStickyCells] = React35.useState([]);
32880
33035
  const registerStickyCell = (ref) => {
32881
33036
  setStickyCells((prev) => {
32882
33037
  if (prev.includes(ref)) return prev;
32883
33038
  return [...prev, ref];
32884
33039
  });
32885
33040
  };
32886
- const colorClass = colorToken ?? getColorClass(
32887
- colorNamespace,
32888
- color2,
32889
- colorDepth ?? 500
32890
- );
32891
- return /* @__PURE__ */ jsx341(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx341(
33041
+ const colorClass = color2;
33042
+ return /* @__PURE__ */ jsx342(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx342(
32892
33043
  "tr",
32893
33044
  {
32894
33045
  className: clsx_default(
@@ -32908,38 +33059,31 @@ TableRow.displayName = "TableRow";
32908
33059
  var TableRow_default = TableRow;
32909
33060
 
32910
33061
  // src/components/Tag/Tag.tsx
32911
- import { jsx as jsx342, jsxs as jsxs214 } from "react/jsx-runtime";
33062
+ import { jsx as jsx343, jsxs as jsxs215 } from "react/jsx-runtime";
32912
33063
  var Tag = (props) => {
32913
33064
  const {
32914
33065
  children,
32915
33066
  onClose,
32916
33067
  size: size4 = "md",
32917
- colorNamespace = "xplat",
32918
- color: color2 = "neutral",
32919
- colorDepth,
32920
- colorToken,
33068
+ color: color2 = "xplat-neutral-500",
32921
33069
  className
32922
33070
  } = props;
32923
- const colorClass = colorToken ?? getColorClass(
32924
- colorNamespace,
32925
- color2,
32926
- colorDepth ?? 500
32927
- );
32928
- return /* @__PURE__ */ jsxs214("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
32929
- /* @__PURE__ */ jsx342("span", { className: "tag-label", children }),
32930
- onClose && /* @__PURE__ */ jsx342("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ jsx342(XIcon_default, {}) })
33071
+ const colorClass = color2;
33072
+ return /* @__PURE__ */ jsxs215("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
33073
+ /* @__PURE__ */ jsx343("span", { className: "tag-label", children }),
33074
+ onClose && /* @__PURE__ */ jsx343("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ jsx343(XIcon_default, {}) })
32931
33075
  ] });
32932
33076
  };
32933
33077
  Tag.displayName = "Tag";
32934
33078
  var Tag_default = Tag;
32935
33079
 
32936
33080
  // src/components/TextArea/TextArea.tsx
32937
- import React35 from "react";
32938
- import { jsx as jsx343 } from "react/jsx-runtime";
32939
- var TextArea = React35.forwardRef(
33081
+ import React36 from "react";
33082
+ import { jsx as jsx344 } from "react/jsx-runtime";
33083
+ var TextArea = React36.forwardRef(
32940
33084
  (props, ref) => {
32941
33085
  const { value, onChange, className, disabled, ...textareaProps } = props;
32942
- const localRef = React35.useRef(null);
33086
+ const localRef = React36.useRef(null);
32943
33087
  const setRefs = (el) => {
32944
33088
  localRef.current = el;
32945
33089
  if (!ref) return;
@@ -32959,21 +33103,21 @@ var TextArea = React35.forwardRef(
32959
33103
  onChange(event);
32960
33104
  }
32961
33105
  };
32962
- React35.useEffect(() => {
33106
+ React36.useEffect(() => {
32963
33107
  const el = localRef.current;
32964
33108
  if (!el) return;
32965
33109
  el.style.height = "0px";
32966
33110
  const nextHeight = Math.min(el.scrollHeight, 400);
32967
33111
  el.style.height = `${nextHeight}px`;
32968
33112
  }, [value]);
32969
- return /* @__PURE__ */ jsx343("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ jsx343(
33113
+ return /* @__PURE__ */ jsx344("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ jsx344(
32970
33114
  "div",
32971
33115
  {
32972
33116
  className: clsx_default(
32973
33117
  "lib-xplat-textarea",
32974
33118
  disabled ? "disabled" : void 0
32975
33119
  ),
32976
- children: /* @__PURE__ */ jsx343(
33120
+ children: /* @__PURE__ */ jsx344(
32977
33121
  "textarea",
32978
33122
  {
32979
33123
  ...textareaProps,
@@ -32991,25 +33135,25 @@ TextArea.displayName = "TextArea";
32991
33135
  var TextArea_default = TextArea;
32992
33136
 
32993
33137
  // src/components/Toast/Toast.tsx
32994
- import React36 from "react";
33138
+ import React37 from "react";
32995
33139
  import { createPortal as createPortal4 } from "react-dom";
32996
- import { jsx as jsx344, jsxs as jsxs215 } from "react/jsx-runtime";
32997
- var ToastContext = React36.createContext(null);
33140
+ import { jsx as jsx345, jsxs as jsxs216 } from "react/jsx-runtime";
33141
+ var ToastContext = React37.createContext(null);
32998
33142
  var useToast = () => {
32999
- const ctx = React36.useContext(ToastContext);
33143
+ const ctx = React37.useContext(ToastContext);
33000
33144
  if (!ctx) throw new Error("useToast must be used within ToastProvider");
33001
33145
  return ctx;
33002
33146
  };
33003
33147
  var EXIT_DURATION = 300;
33004
33148
  var ToastItemComponent = ({ item, isExiting, onClose }) => {
33005
- const ref = React36.useRef(null);
33006
- const [height, setHeight] = React36.useState(void 0);
33007
- React36.useEffect(() => {
33149
+ const ref = React37.useRef(null);
33150
+ const [height, setHeight] = React37.useState(void 0);
33151
+ React37.useEffect(() => {
33008
33152
  if (ref.current && !isExiting) {
33009
33153
  setHeight(ref.current.offsetHeight);
33010
33154
  }
33011
33155
  }, [isExiting]);
33012
- return /* @__PURE__ */ jsx344(
33156
+ return /* @__PURE__ */ jsx345(
33013
33157
  "div",
33014
33158
  {
33015
33159
  className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
@@ -33017,15 +33161,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
33017
33161
  maxHeight: isExiting ? 0 : height ?? "none",
33018
33162
  marginBottom: isExiting ? 0 : void 0
33019
33163
  },
33020
- children: /* @__PURE__ */ jsxs215(
33164
+ children: /* @__PURE__ */ jsxs216(
33021
33165
  "div",
33022
33166
  {
33023
33167
  ref,
33024
33168
  className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
33025
33169
  role: "alert",
33026
33170
  children: [
33027
- /* @__PURE__ */ jsx344("span", { className: "message", children: item.message }),
33028
- /* @__PURE__ */ jsx344("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
33171
+ /* @__PURE__ */ jsx345("span", { className: "message", children: item.message }),
33172
+ /* @__PURE__ */ jsx345("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
33029
33173
  ]
33030
33174
  }
33031
33175
  )
@@ -33036,13 +33180,13 @@ var ToastProvider = ({
33036
33180
  children,
33037
33181
  position = "top-right"
33038
33182
  }) => {
33039
- const [toasts, setToasts] = React36.useState([]);
33040
- const [removing, setRemoving] = React36.useState(/* @__PURE__ */ new Set());
33041
- const [mounted, setMounted] = React36.useState(false);
33042
- React36.useEffect(() => {
33183
+ const [toasts, setToasts] = React37.useState([]);
33184
+ const [removing, setRemoving] = React37.useState(/* @__PURE__ */ new Set());
33185
+ const [mounted, setMounted] = React37.useState(false);
33186
+ React37.useEffect(() => {
33043
33187
  setMounted(true);
33044
33188
  }, []);
33045
- const remove = React36.useCallback((id) => {
33189
+ const remove = React37.useCallback((id) => {
33046
33190
  setRemoving((prev) => new Set(prev).add(id));
33047
33191
  setTimeout(() => {
33048
33192
  setToasts((prev) => prev.filter((t) => t.id !== id));
@@ -33053,7 +33197,7 @@ var ToastProvider = ({
33053
33197
  });
33054
33198
  }, EXIT_DURATION);
33055
33199
  }, []);
33056
- const toast = React36.useCallback(
33200
+ const toast = React37.useCallback(
33057
33201
  (type, message2, duration = 3e3) => {
33058
33202
  const id = `${Date.now()}-${Math.random()}`;
33059
33203
  setToasts((prev) => [...prev, { id, type, message: message2 }]);
@@ -33063,10 +33207,10 @@ var ToastProvider = ({
33063
33207
  },
33064
33208
  [remove]
33065
33209
  );
33066
- return /* @__PURE__ */ jsxs215(ToastContext.Provider, { value: { toast }, children: [
33210
+ return /* @__PURE__ */ jsxs216(ToastContext.Provider, { value: { toast }, children: [
33067
33211
  children,
33068
33212
  mounted && createPortal4(
33069
- /* @__PURE__ */ jsx344("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx344(
33213
+ /* @__PURE__ */ jsx345("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx345(
33070
33214
  ToastItemComponent,
33071
33215
  {
33072
33216
  item: t,
@@ -33082,36 +33226,29 @@ var ToastProvider = ({
33082
33226
  ToastProvider.displayName = "ToastProvider";
33083
33227
 
33084
33228
  // src/components/Tooltip/Tooltip.tsx
33085
- import React37 from "react";
33086
- import { jsx as jsx345, jsxs as jsxs216 } from "react/jsx-runtime";
33229
+ import React38 from "react";
33230
+ import { jsx as jsx346, jsxs as jsxs217 } from "react/jsx-runtime";
33087
33231
  var Tooltip2 = (props) => {
33088
33232
  const {
33089
33233
  type = "primary",
33090
- colorNamespace = "xplat",
33091
- color: color2 = "blue",
33092
- colorDepth,
33093
- colorToken,
33234
+ color: color2 = "xplat-neutral-900",
33094
33235
  description,
33095
33236
  children
33096
33237
  } = props;
33097
- const iconRef = React37.useRef(null);
33098
- const colorClass = colorToken ?? getColorClass(
33099
- colorNamespace,
33100
- color2,
33101
- colorDepth ?? 500
33102
- );
33103
- return /* @__PURE__ */ jsxs216("div", { className: "lib-xplat-tooltip", children: [
33104
- /* @__PURE__ */ jsx345("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
33105
- /* @__PURE__ */ jsx345("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
33238
+ const iconRef = React38.useRef(null);
33239
+ const colorClass = color2;
33240
+ return /* @__PURE__ */ jsxs217("div", { className: "lib-xplat-tooltip", children: [
33241
+ /* @__PURE__ */ jsx346("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
33242
+ /* @__PURE__ */ jsx346("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
33106
33243
  ] });
33107
33244
  };
33108
33245
  Tooltip2.displayName = "Tooltip";
33109
33246
  var Tooltip_default = Tooltip2;
33110
33247
 
33111
33248
  // src/components/Video/Video.tsx
33112
- import React38 from "react";
33113
- import { jsx as jsx346, jsxs as jsxs217 } from "react/jsx-runtime";
33114
- var Video = React38.forwardRef((props, ref) => {
33249
+ import React39 from "react";
33250
+ import { jsx as jsx347, jsxs as jsxs218 } from "react/jsx-runtime";
33251
+ var Video = React39.forwardRef((props, ref) => {
33115
33252
  const {
33116
33253
  src,
33117
33254
  poster,
@@ -33125,10 +33262,10 @@ var Video = React38.forwardRef((props, ref) => {
33125
33262
  onPause,
33126
33263
  ...rest
33127
33264
  } = props;
33128
- const videoRef = React38.useRef(null);
33129
- const [isPlaying, setIsPlaying] = React38.useState(Boolean(autoPlay));
33130
- const [isLoaded, setIsLoaded] = React38.useState(false);
33131
- const setRefs = React38.useCallback(
33265
+ const videoRef = React39.useRef(null);
33266
+ const [isPlaying, setIsPlaying] = React39.useState(Boolean(autoPlay));
33267
+ const [isLoaded, setIsLoaded] = React39.useState(false);
33268
+ const setRefs = React39.useCallback(
33132
33269
  (el) => {
33133
33270
  videoRef.current = el;
33134
33271
  if (typeof ref === "function") ref(el);
@@ -33156,7 +33293,7 @@ var Video = React38.forwardRef((props, ref) => {
33156
33293
  }
33157
33294
  };
33158
33295
  const showCustomOverlay = !controls;
33159
- return /* @__PURE__ */ jsxs217(
33296
+ return /* @__PURE__ */ jsxs218(
33160
33297
  "div",
33161
33298
  {
33162
33299
  className: clsx_default(
@@ -33165,7 +33302,7 @@ var Video = React38.forwardRef((props, ref) => {
33165
33302
  className
33166
33303
  ),
33167
33304
  children: [
33168
- /* @__PURE__ */ jsx346(
33305
+ /* @__PURE__ */ jsx347(
33169
33306
  "video",
33170
33307
  {
33171
33308
  ref: setRefs,
@@ -33182,7 +33319,7 @@ var Video = React38.forwardRef((props, ref) => {
33182
33319
  ...rest
33183
33320
  }
33184
33321
  ),
33185
- showCustomOverlay && /* @__PURE__ */ jsx346(
33322
+ showCustomOverlay && /* @__PURE__ */ jsx347(
33186
33323
  "button",
33187
33324
  {
33188
33325
  type: "button",
@@ -33193,7 +33330,7 @@ var Video = React38.forwardRef((props, ref) => {
33193
33330
  ),
33194
33331
  onClick: togglePlay,
33195
33332
  "aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
33196
- children: isPlaying ? /* @__PURE__ */ jsx346(PauseIcon_default, {}) : /* @__PURE__ */ jsx346("span", { className: "play-icon", children: /* @__PURE__ */ jsx346(PlayCircleIcon_default, {}) })
33333
+ children: isPlaying ? /* @__PURE__ */ jsx347(PauseIcon_default, {}) : /* @__PURE__ */ jsx347("span", { className: "play-icon", children: /* @__PURE__ */ jsx347(PlayCircleIcon_default, {}) })
33197
33334
  }
33198
33335
  )
33199
33336
  ]
@@ -33204,25 +33341,25 @@ Video.displayName = "Video";
33204
33341
  var Video_default = Video;
33205
33342
 
33206
33343
  // src/layout/Grid/FullGrid/FullGrid.tsx
33207
- import { jsx as jsx347 } from "react/jsx-runtime";
33344
+ import { jsx as jsx348 } from "react/jsx-runtime";
33208
33345
  var FullGrid = (props) => {
33209
33346
  const { children, className } = props;
33210
- return /* @__PURE__ */ jsx347("div", { className: clsx_default("lib-xplat-full-grid", className), children });
33347
+ return /* @__PURE__ */ jsx348("div", { className: clsx_default("lib-xplat-full-grid", className), children });
33211
33348
  };
33212
33349
  FullGrid.displayName = "FullGrid";
33213
33350
  var FullGrid_default = FullGrid;
33214
33351
 
33215
33352
  // src/layout/Grid/FullScreen/FullScreen.tsx
33216
- import { jsx as jsx348 } from "react/jsx-runtime";
33353
+ import { jsx as jsx349 } from "react/jsx-runtime";
33217
33354
  var FullScreen = (props) => {
33218
33355
  const { children, className } = props;
33219
- return /* @__PURE__ */ jsx348("div", { className: clsx_default("lib-xplat-full-screen", className), children });
33356
+ return /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-full-screen", className), children });
33220
33357
  };
33221
33358
  FullScreen.displayName = "FullScreen";
33222
33359
  var FullScreen_default = FullScreen;
33223
33360
 
33224
33361
  // src/layout/Grid/Item/Item.tsx
33225
- import { jsx as jsx349 } from "react/jsx-runtime";
33362
+ import { jsx as jsx350 } from "react/jsx-runtime";
33226
33363
  var calculateSpans = (column) => {
33227
33364
  const spans = {};
33228
33365
  let inherited = column.default;
@@ -33239,35 +33376,35 @@ var GridItem = ({ column, children, className }) => {
33239
33376
  Object.entries(spans).forEach(([key, value]) => {
33240
33377
  style[`--column-${key}`] = value;
33241
33378
  });
33242
- return /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
33379
+ return /* @__PURE__ */ jsx350("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
33243
33380
  };
33244
33381
  GridItem.displayName = "GridItem";
33245
33382
  var Item_default = GridItem;
33246
33383
 
33247
33384
  // src/layout/Header/Header.tsx
33248
- import { jsx as jsx350, jsxs as jsxs218 } from "react/jsx-runtime";
33385
+ import { jsx as jsx351, jsxs as jsxs219 } from "react/jsx-runtime";
33249
33386
  var Header = ({
33250
33387
  logo,
33251
33388
  centerContent,
33252
33389
  rightContent
33253
33390
  }) => {
33254
- return /* @__PURE__ */ jsxs218("div", { className: "lib-xplat-layout-header", children: [
33255
- /* @__PURE__ */ jsx350("div", { children: logo }),
33256
- /* @__PURE__ */ jsx350("div", { children: centerContent }),
33257
- /* @__PURE__ */ jsx350("div", { children: rightContent })
33391
+ return /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-layout-header", children: [
33392
+ /* @__PURE__ */ jsx351("div", { children: logo }),
33393
+ /* @__PURE__ */ jsx351("div", { children: centerContent }),
33394
+ /* @__PURE__ */ jsx351("div", { children: rightContent })
33258
33395
  ] });
33259
33396
  };
33260
33397
  Header.displayName = "Header";
33261
33398
  var Header_default = Header;
33262
33399
 
33263
33400
  // src/layout/Layout/Layout.tsx
33264
- import { Fragment as Fragment3, jsx as jsx351, jsxs as jsxs219 } from "react/jsx-runtime";
33401
+ import { Fragment as Fragment3, jsx as jsx352, jsxs as jsxs220 } from "react/jsx-runtime";
33265
33402
  var Layout = (props) => {
33266
33403
  const { header, sideBar, children } = props;
33267
- return /* @__PURE__ */ jsx351("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-layout-content-wrapper", children: [
33268
- sideBar && /* @__PURE__ */ jsx351(Fragment3, { children: sideBar }),
33269
- /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-layout-content", children: [
33270
- header && /* @__PURE__ */ jsx351("div", { className: "lib-xplat-layout-conent-header", children: header }),
33404
+ return /* @__PURE__ */ jsx352("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs220("div", { className: "lib-xplat-layout-content-wrapper", children: [
33405
+ sideBar && /* @__PURE__ */ jsx352(Fragment3, { children: sideBar }),
33406
+ /* @__PURE__ */ jsxs220("div", { className: "lib-xplat-layout-content", children: [
33407
+ header && /* @__PURE__ */ jsx352("div", { className: "lib-xplat-layout-conent-header", children: header }),
33271
33408
  children
33272
33409
  ] })
33273
33410
  ] }) });
@@ -33276,31 +33413,31 @@ Layout.displayName = "Layout";
33276
33413
  var Layout_default = Layout;
33277
33414
 
33278
33415
  // src/layout/SideBar/SideBar.tsx
33279
- import React40 from "react";
33416
+ import React41 from "react";
33280
33417
 
33281
33418
  // src/layout/SideBar/SideBarContext.tsx
33282
- import React39 from "react";
33283
- var SideBarContext = React39.createContext(null);
33419
+ import React40 from "react";
33420
+ var SideBarContext = React40.createContext(null);
33284
33421
  var useSideBarContext = () => {
33285
- const ctx = React39.useContext(SideBarContext);
33422
+ const ctx = React40.useContext(SideBarContext);
33286
33423
  if (!ctx) throw new Error("Error");
33287
33424
  return ctx;
33288
33425
  };
33289
33426
  var SideBarContext_default = SideBarContext;
33290
33427
 
33291
33428
  // src/layout/SideBar/SideBar.tsx
33292
- import { jsx as jsx352 } from "react/jsx-runtime";
33429
+ import { jsx as jsx353 } from "react/jsx-runtime";
33293
33430
  var SideBar = (props) => {
33294
33431
  const { children, className } = props;
33295
- const [isOpen, setIsOpen] = React40.useState(true);
33432
+ const [isOpen, setIsOpen] = React41.useState(true);
33296
33433
  const handleSwitchSideBar = () => {
33297
33434
  setIsOpen((prev) => !prev);
33298
33435
  };
33299
- return /* @__PURE__ */ jsx352(
33436
+ return /* @__PURE__ */ jsx353(
33300
33437
  SideBarContext_default.Provider,
33301
33438
  {
33302
33439
  value: { isSidebarOpen: isOpen, handleSwitchSideBar },
33303
- children: /* @__PURE__ */ jsx352(
33440
+ children: /* @__PURE__ */ jsx353(
33304
33441
  "div",
33305
33442
  {
33306
33443
  className: clsx_default(
@@ -33602,6 +33739,7 @@ export {
33602
33739
  SunIcon_default as SunIcon,
33603
33740
  SunriseIcon_default as SunriseIcon,
33604
33741
  SunsetIcon_default as SunsetIcon,
33742
+ Swiper_default as Swiper,
33605
33743
  Switch_default as Switch,
33606
33744
  Tab_default as Tab,
33607
33745
  Table_default as Table,