@x-plat/design-system 0.3.0 → 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.
package/dist/index.js CHANGED
@@ -32492,9 +32492,270 @@ var Steps = (props) => {
32492
32492
  Steps.displayName = "Steps";
32493
32493
  var Steps_default = Steps;
32494
32494
 
32495
- // src/components/Switch/Switch.tsx
32495
+ // src/components/Swiper/Swiper.tsx
32496
32496
  import React27 from "react";
32497
- 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";
32498
32759
  var KNOB_TRANSITION_MS = 250;
32499
32760
  var Switch = (props) => {
32500
32761
  const {
@@ -32505,9 +32766,9 @@ var Switch = (props) => {
32505
32766
  color: color2 = "xplat-blue-500",
32506
32767
  className
32507
32768
  } = props;
32508
- const [isAnimating, setIsAnimating] = React27.useState(false);
32509
- const timeoutRef = React27.useRef(null);
32510
- React27.useEffect(() => {
32769
+ const [isAnimating, setIsAnimating] = React28.useState(false);
32770
+ const timeoutRef = React28.useRef(null);
32771
+ React28.useEffect(() => {
32511
32772
  return () => {
32512
32773
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
32513
32774
  };
@@ -32523,7 +32784,7 @@ var Switch = (props) => {
32523
32784
  }, KNOB_TRANSITION_MS);
32524
32785
  };
32525
32786
  const colorClass = color2;
32526
- return /* @__PURE__ */ jsx334(
32787
+ return /* @__PURE__ */ jsx335(
32527
32788
  "div",
32528
32789
  {
32529
32790
  className: clsx_default(
@@ -32537,7 +32798,7 @@ var Switch = (props) => {
32537
32798
  ),
32538
32799
  onClick: handleClick,
32539
32800
  "aria-disabled": disabled || isAnimating,
32540
- 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) })
32541
32802
  }
32542
32803
  );
32543
32804
  };
@@ -32545,14 +32806,14 @@ Switch.displayName = "Switch";
32545
32806
  var Switch_default = Switch;
32546
32807
 
32547
32808
  // src/components/Tab/Tab.tsx
32548
- import React29 from "react";
32809
+ import React30 from "react";
32549
32810
 
32550
32811
  // src/components/Tab/TabItem.tsx
32551
- import React28 from "react";
32552
- import { jsx as jsx335 } from "react/jsx-runtime";
32553
- 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) => {
32554
32815
  const { isActive, title, onClick } = props;
32555
- return /* @__PURE__ */ jsx335(
32816
+ return /* @__PURE__ */ jsx336(
32556
32817
  "div",
32557
32818
  {
32558
32819
  ref,
@@ -32566,25 +32827,25 @@ TabItem.displayName = "TabItem";
32566
32827
  var TabItem_default = TabItem;
32567
32828
 
32568
32829
  // src/components/Tab/Tab.tsx
32569
- import { jsx as jsx336, jsxs as jsxs213 } from "react/jsx-runtime";
32830
+ import { jsx as jsx337, jsxs as jsxs214 } from "react/jsx-runtime";
32570
32831
  var Tab = (props) => {
32571
32832
  const { activeIndex, onChange, tabs, type, size: size4 = "md" } = props;
32572
- const [underlineStyle, setUnderlineStyle] = React29.useState({
32833
+ const [underlineStyle, setUnderlineStyle] = React30.useState({
32573
32834
  left: 0,
32574
32835
  width: 0
32575
32836
  });
32576
- const itemRefs = React29.useRef([]);
32837
+ const itemRefs = React30.useRef([]);
32577
32838
  const handleChangeActiveTab = (tabItem, tabIdx) => {
32578
32839
  onChange(tabItem, tabIdx);
32579
32840
  };
32580
- React29.useEffect(() => {
32841
+ React30.useEffect(() => {
32581
32842
  const el = itemRefs.current[activeIndex];
32582
32843
  if (el) {
32583
32844
  setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
32584
32845
  }
32585
32846
  }, [activeIndex, tabs.length]);
32586
- return /* @__PURE__ */ jsxs213("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
32587
- 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(
32588
32849
  TabItem_default,
32589
32850
  {
32590
32851
  onClick: () => handleChangeActiveTab(tab, idx),
@@ -32596,7 +32857,7 @@ var Tab = (props) => {
32596
32857
  },
32597
32858
  `${tab.value}_${idx}`
32598
32859
  )),
32599
- type === "toggle" && /* @__PURE__ */ jsx336(
32860
+ type === "toggle" && /* @__PURE__ */ jsx337(
32600
32861
  "div",
32601
32862
  {
32602
32863
  className: "tab-toggle-underline",
@@ -32612,17 +32873,17 @@ Tab.displayName = "Tab";
32612
32873
  var Tab_default = Tab;
32613
32874
 
32614
32875
  // src/components/Table/TableContext.tsx
32615
- import React30 from "react";
32616
- var TableContext = React30.createContext(null);
32876
+ import React31 from "react";
32877
+ var TableContext = React31.createContext(null);
32617
32878
  var useTableContext = () => {
32618
- const ctx = React30.useContext(TableContext);
32879
+ const ctx = React31.useContext(TableContext);
32619
32880
  if (!ctx) throw new Error("Table components must be used inside <Table>");
32620
32881
  return ctx;
32621
32882
  };
32622
32883
  var TableContext_default = TableContext;
32623
32884
 
32624
32885
  // src/components/Table/Table.tsx
32625
- import { jsx as jsx337 } from "react/jsx-runtime";
32886
+ import { jsx as jsx338 } from "react/jsx-runtime";
32626
32887
  var Table = (props) => {
32627
32888
  const {
32628
32889
  className,
@@ -32632,7 +32893,7 @@ var Table = (props) => {
32632
32893
  headerSticky = false,
32633
32894
  stickyShadow = true
32634
32895
  } = props;
32635
- 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(
32636
32897
  TableContext_default.Provider,
32637
32898
  {
32638
32899
  value: {
@@ -32641,7 +32902,7 @@ var Table = (props) => {
32641
32902
  headerSticky,
32642
32903
  stickyShadow
32643
32904
  },
32644
- children: /* @__PURE__ */ jsx337("table", { className: "lib-xplat-table", children })
32905
+ children: /* @__PURE__ */ jsx338("table", { className: "lib-xplat-table", children })
32645
32906
  }
32646
32907
  ) });
32647
32908
  };
@@ -32649,40 +32910,40 @@ Table.displayName = "Table";
32649
32910
  var Table_default = Table;
32650
32911
 
32651
32912
  // src/components/Table/TableBody.tsx
32652
- import { jsx as jsx338 } from "react/jsx-runtime";
32913
+ import { jsx as jsx339 } from "react/jsx-runtime";
32653
32914
  var TableBody = (props) => {
32654
32915
  const { children, className } = props;
32655
- return /* @__PURE__ */ jsx338("tbody", { className, children });
32916
+ return /* @__PURE__ */ jsx339("tbody", { className, children });
32656
32917
  };
32657
32918
  TableBody.displayName = "TableBody";
32658
32919
  var TableBody_default = TableBody;
32659
32920
 
32660
32921
  // src/components/Table/TableCell.tsx
32661
- import React33 from "react";
32922
+ import React34 from "react";
32662
32923
 
32663
32924
  // src/components/Table/TableHeadContext.tsx
32664
- import React31 from "react";
32665
- var TableHeadContext = React31.createContext(
32925
+ import React32 from "react";
32926
+ var TableHeadContext = React32.createContext(
32666
32927
  null
32667
32928
  );
32668
32929
  var useTableHeadContext = () => {
32669
- const ctx = React31.useContext(TableHeadContext);
32930
+ const ctx = React32.useContext(TableHeadContext);
32670
32931
  return ctx;
32671
32932
  };
32672
32933
  var TableHeadContext_default = TableHeadContext;
32673
32934
 
32674
32935
  // src/components/Table/TableRowContext.tsx
32675
- import React32 from "react";
32676
- var TableRowContext = React32.createContext(null);
32936
+ import React33 from "react";
32937
+ var TableRowContext = React33.createContext(null);
32677
32938
  var useTableRowContext = () => {
32678
- const ctx = React32.useContext(TableRowContext);
32939
+ const ctx = React33.useContext(TableRowContext);
32679
32940
  if (!ctx) throw new Error("Table components must be used inside <Table>");
32680
32941
  return ctx;
32681
32942
  };
32682
32943
  var TableRowContext_default = TableRowContext;
32683
32944
 
32684
32945
  // src/components/Table/TableCell.tsx
32685
- import { jsx as jsx339 } from "react/jsx-runtime";
32946
+ import { jsx as jsx340 } from "react/jsx-runtime";
32686
32947
  var TableCell = (props) => {
32687
32948
  const {
32688
32949
  children,
@@ -32694,9 +32955,9 @@ var TableCell = (props) => {
32694
32955
  const { registerStickyCell, stickyCells } = useTableRowContext();
32695
32956
  const { stickyShadow } = useTableContext();
32696
32957
  const headContext = useTableHeadContext();
32697
- const [left, setLeft] = React33.useState(0);
32698
- const cellRef = React33.useRef(null);
32699
- const calculateLeft = React33.useCallback(() => {
32958
+ const [left, setLeft] = React34.useState(0);
32959
+ const cellRef = React34.useRef(null);
32960
+ const calculateLeft = React34.useCallback(() => {
32700
32961
  if (!cellRef.current) return 0;
32701
32962
  let totalLeft = 0;
32702
32963
  for (const ref of stickyCells) {
@@ -32705,7 +32966,7 @@ var TableCell = (props) => {
32705
32966
  }
32706
32967
  return totalLeft;
32707
32968
  }, [stickyCells]);
32708
- React33.useEffect(() => {
32969
+ React34.useEffect(() => {
32709
32970
  if (!isSticky || !cellRef.current) return;
32710
32971
  registerStickyCell(cellRef);
32711
32972
  setLeft(calculateLeft());
@@ -32723,7 +32984,7 @@ var TableCell = (props) => {
32723
32984
  const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
32724
32985
  const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
32725
32986
  const enableHover = headContext && headContext.cellHover;
32726
- return /* @__PURE__ */ jsx339(
32987
+ return /* @__PURE__ */ jsx340(
32727
32988
  CellTag,
32728
32989
  {
32729
32990
  ref: cellRef,
@@ -32745,32 +33006,32 @@ TableCell.displayName = "TableCell";
32745
33006
  var TableCell_default = TableCell;
32746
33007
 
32747
33008
  // src/components/Table/TableHead.tsx
32748
- import { jsx as jsx340 } from "react/jsx-runtime";
33009
+ import { jsx as jsx341 } from "react/jsx-runtime";
32749
33010
  var TableHead = ({
32750
33011
  children,
32751
33012
  className = "",
32752
33013
  cellHover = false
32753
33014
  }) => {
32754
33015
  const { headerSticky } = useTableContext();
32755
- 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 }) });
32756
33017
  };
32757
33018
  TableHead.displayName = "TableHead";
32758
33019
  var TableHead_default = TableHead;
32759
33020
 
32760
33021
  // src/components/Table/TableRow.tsx
32761
- import React34 from "react";
32762
- import { jsx as jsx341 } from "react/jsx-runtime";
33022
+ import React35 from "react";
33023
+ import { jsx as jsx342 } from "react/jsx-runtime";
32763
33024
  var TableRow = (props) => {
32764
33025
  const {
32765
33026
  children,
32766
33027
  className,
32767
- color: color2 = "xplat-blue-500",
33028
+ color: color2 = "xplat-neutral-900",
32768
33029
  type = "secondary",
32769
33030
  isHover,
32770
33031
  onClick
32771
33032
  } = props;
32772
33033
  const { rowBorderUse } = useTableContext();
32773
- const [stickyCells, setStickyCells] = React34.useState([]);
33034
+ const [stickyCells, setStickyCells] = React35.useState([]);
32774
33035
  const registerStickyCell = (ref) => {
32775
33036
  setStickyCells((prev) => {
32776
33037
  if (prev.includes(ref)) return prev;
@@ -32778,7 +33039,7 @@ var TableRow = (props) => {
32778
33039
  });
32779
33040
  };
32780
33041
  const colorClass = color2;
32781
- return /* @__PURE__ */ jsx341(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx341(
33042
+ return /* @__PURE__ */ jsx342(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx342(
32782
33043
  "tr",
32783
33044
  {
32784
33045
  className: clsx_default(
@@ -32798,7 +33059,7 @@ TableRow.displayName = "TableRow";
32798
33059
  var TableRow_default = TableRow;
32799
33060
 
32800
33061
  // src/components/Tag/Tag.tsx
32801
- import { jsx as jsx342, jsxs as jsxs214 } from "react/jsx-runtime";
33062
+ import { jsx as jsx343, jsxs as jsxs215 } from "react/jsx-runtime";
32802
33063
  var Tag = (props) => {
32803
33064
  const {
32804
33065
  children,
@@ -32808,21 +33069,21 @@ var Tag = (props) => {
32808
33069
  className
32809
33070
  } = props;
32810
33071
  const colorClass = color2;
32811
- return /* @__PURE__ */ jsxs214("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
32812
- /* @__PURE__ */ jsx342("span", { className: "tag-label", children }),
32813
- onClose && /* @__PURE__ */ jsx342("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ jsx342(XIcon_default, {}) })
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, {}) })
32814
33075
  ] });
32815
33076
  };
32816
33077
  Tag.displayName = "Tag";
32817
33078
  var Tag_default = Tag;
32818
33079
 
32819
33080
  // src/components/TextArea/TextArea.tsx
32820
- import React35 from "react";
32821
- import { jsx as jsx343 } from "react/jsx-runtime";
32822
- var TextArea = React35.forwardRef(
33081
+ import React36 from "react";
33082
+ import { jsx as jsx344 } from "react/jsx-runtime";
33083
+ var TextArea = React36.forwardRef(
32823
33084
  (props, ref) => {
32824
33085
  const { value, onChange, className, disabled, ...textareaProps } = props;
32825
- const localRef = React35.useRef(null);
33086
+ const localRef = React36.useRef(null);
32826
33087
  const setRefs = (el) => {
32827
33088
  localRef.current = el;
32828
33089
  if (!ref) return;
@@ -32842,21 +33103,21 @@ var TextArea = React35.forwardRef(
32842
33103
  onChange(event);
32843
33104
  }
32844
33105
  };
32845
- React35.useEffect(() => {
33106
+ React36.useEffect(() => {
32846
33107
  const el = localRef.current;
32847
33108
  if (!el) return;
32848
33109
  el.style.height = "0px";
32849
33110
  const nextHeight = Math.min(el.scrollHeight, 400);
32850
33111
  el.style.height = `${nextHeight}px`;
32851
33112
  }, [value]);
32852
- 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(
32853
33114
  "div",
32854
33115
  {
32855
33116
  className: clsx_default(
32856
33117
  "lib-xplat-textarea",
32857
33118
  disabled ? "disabled" : void 0
32858
33119
  ),
32859
- children: /* @__PURE__ */ jsx343(
33120
+ children: /* @__PURE__ */ jsx344(
32860
33121
  "textarea",
32861
33122
  {
32862
33123
  ...textareaProps,
@@ -32874,25 +33135,25 @@ TextArea.displayName = "TextArea";
32874
33135
  var TextArea_default = TextArea;
32875
33136
 
32876
33137
  // src/components/Toast/Toast.tsx
32877
- import React36 from "react";
33138
+ import React37 from "react";
32878
33139
  import { createPortal as createPortal4 } from "react-dom";
32879
- import { jsx as jsx344, jsxs as jsxs215 } from "react/jsx-runtime";
32880
- var ToastContext = React36.createContext(null);
33140
+ import { jsx as jsx345, jsxs as jsxs216 } from "react/jsx-runtime";
33141
+ var ToastContext = React37.createContext(null);
32881
33142
  var useToast = () => {
32882
- const ctx = React36.useContext(ToastContext);
33143
+ const ctx = React37.useContext(ToastContext);
32883
33144
  if (!ctx) throw new Error("useToast must be used within ToastProvider");
32884
33145
  return ctx;
32885
33146
  };
32886
33147
  var EXIT_DURATION = 300;
32887
33148
  var ToastItemComponent = ({ item, isExiting, onClose }) => {
32888
- const ref = React36.useRef(null);
32889
- const [height, setHeight] = React36.useState(void 0);
32890
- React36.useEffect(() => {
33149
+ const ref = React37.useRef(null);
33150
+ const [height, setHeight] = React37.useState(void 0);
33151
+ React37.useEffect(() => {
32891
33152
  if (ref.current && !isExiting) {
32892
33153
  setHeight(ref.current.offsetHeight);
32893
33154
  }
32894
33155
  }, [isExiting]);
32895
- return /* @__PURE__ */ jsx344(
33156
+ return /* @__PURE__ */ jsx345(
32896
33157
  "div",
32897
33158
  {
32898
33159
  className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
@@ -32900,15 +33161,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
32900
33161
  maxHeight: isExiting ? 0 : height ?? "none",
32901
33162
  marginBottom: isExiting ? 0 : void 0
32902
33163
  },
32903
- children: /* @__PURE__ */ jsxs215(
33164
+ children: /* @__PURE__ */ jsxs216(
32904
33165
  "div",
32905
33166
  {
32906
33167
  ref,
32907
33168
  className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
32908
33169
  role: "alert",
32909
33170
  children: [
32910
- /* @__PURE__ */ jsx344("span", { className: "message", children: item.message }),
32911
- /* @__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" })
32912
33173
  ]
32913
33174
  }
32914
33175
  )
@@ -32919,13 +33180,13 @@ var ToastProvider = ({
32919
33180
  children,
32920
33181
  position = "top-right"
32921
33182
  }) => {
32922
- const [toasts, setToasts] = React36.useState([]);
32923
- const [removing, setRemoving] = React36.useState(/* @__PURE__ */ new Set());
32924
- const [mounted, setMounted] = React36.useState(false);
32925
- 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(() => {
32926
33187
  setMounted(true);
32927
33188
  }, []);
32928
- const remove = React36.useCallback((id) => {
33189
+ const remove = React37.useCallback((id) => {
32929
33190
  setRemoving((prev) => new Set(prev).add(id));
32930
33191
  setTimeout(() => {
32931
33192
  setToasts((prev) => prev.filter((t) => t.id !== id));
@@ -32936,7 +33197,7 @@ var ToastProvider = ({
32936
33197
  });
32937
33198
  }, EXIT_DURATION);
32938
33199
  }, []);
32939
- const toast = React36.useCallback(
33200
+ const toast = React37.useCallback(
32940
33201
  (type, message2, duration = 3e3) => {
32941
33202
  const id = `${Date.now()}-${Math.random()}`;
32942
33203
  setToasts((prev) => [...prev, { id, type, message: message2 }]);
@@ -32946,10 +33207,10 @@ var ToastProvider = ({
32946
33207
  },
32947
33208
  [remove]
32948
33209
  );
32949
- return /* @__PURE__ */ jsxs215(ToastContext.Provider, { value: { toast }, children: [
33210
+ return /* @__PURE__ */ jsxs216(ToastContext.Provider, { value: { toast }, children: [
32950
33211
  children,
32951
33212
  mounted && createPortal4(
32952
- /* @__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(
32953
33214
  ToastItemComponent,
32954
33215
  {
32955
33216
  item: t,
@@ -32965,8 +33226,8 @@ var ToastProvider = ({
32965
33226
  ToastProvider.displayName = "ToastProvider";
32966
33227
 
32967
33228
  // src/components/Tooltip/Tooltip.tsx
32968
- import React37 from "react";
32969
- 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";
32970
33231
  var Tooltip2 = (props) => {
32971
33232
  const {
32972
33233
  type = "primary",
@@ -32974,20 +33235,20 @@ var Tooltip2 = (props) => {
32974
33235
  description,
32975
33236
  children
32976
33237
  } = props;
32977
- const iconRef = React37.useRef(null);
33238
+ const iconRef = React38.useRef(null);
32978
33239
  const colorClass = color2;
32979
- return /* @__PURE__ */ jsxs216("div", { className: "lib-xplat-tooltip", children: [
32980
- /* @__PURE__ */ jsx345("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
32981
- /* @__PURE__ */ jsx345("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
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 })
32982
33243
  ] });
32983
33244
  };
32984
33245
  Tooltip2.displayName = "Tooltip";
32985
33246
  var Tooltip_default = Tooltip2;
32986
33247
 
32987
33248
  // src/components/Video/Video.tsx
32988
- import React38 from "react";
32989
- import { jsx as jsx346, jsxs as jsxs217 } from "react/jsx-runtime";
32990
- 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) => {
32991
33252
  const {
32992
33253
  src,
32993
33254
  poster,
@@ -33001,10 +33262,10 @@ var Video = React38.forwardRef((props, ref) => {
33001
33262
  onPause,
33002
33263
  ...rest
33003
33264
  } = props;
33004
- const videoRef = React38.useRef(null);
33005
- const [isPlaying, setIsPlaying] = React38.useState(Boolean(autoPlay));
33006
- const [isLoaded, setIsLoaded] = React38.useState(false);
33007
- 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(
33008
33269
  (el) => {
33009
33270
  videoRef.current = el;
33010
33271
  if (typeof ref === "function") ref(el);
@@ -33032,7 +33293,7 @@ var Video = React38.forwardRef((props, ref) => {
33032
33293
  }
33033
33294
  };
33034
33295
  const showCustomOverlay = !controls;
33035
- return /* @__PURE__ */ jsxs217(
33296
+ return /* @__PURE__ */ jsxs218(
33036
33297
  "div",
33037
33298
  {
33038
33299
  className: clsx_default(
@@ -33041,7 +33302,7 @@ var Video = React38.forwardRef((props, ref) => {
33041
33302
  className
33042
33303
  ),
33043
33304
  children: [
33044
- /* @__PURE__ */ jsx346(
33305
+ /* @__PURE__ */ jsx347(
33045
33306
  "video",
33046
33307
  {
33047
33308
  ref: setRefs,
@@ -33058,7 +33319,7 @@ var Video = React38.forwardRef((props, ref) => {
33058
33319
  ...rest
33059
33320
  }
33060
33321
  ),
33061
- showCustomOverlay && /* @__PURE__ */ jsx346(
33322
+ showCustomOverlay && /* @__PURE__ */ jsx347(
33062
33323
  "button",
33063
33324
  {
33064
33325
  type: "button",
@@ -33069,7 +33330,7 @@ var Video = React38.forwardRef((props, ref) => {
33069
33330
  ),
33070
33331
  onClick: togglePlay,
33071
33332
  "aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
33072
- 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, {}) })
33073
33334
  }
33074
33335
  )
33075
33336
  ]
@@ -33080,25 +33341,25 @@ Video.displayName = "Video";
33080
33341
  var Video_default = Video;
33081
33342
 
33082
33343
  // src/layout/Grid/FullGrid/FullGrid.tsx
33083
- import { jsx as jsx347 } from "react/jsx-runtime";
33344
+ import { jsx as jsx348 } from "react/jsx-runtime";
33084
33345
  var FullGrid = (props) => {
33085
33346
  const { children, className } = props;
33086
- 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 });
33087
33348
  };
33088
33349
  FullGrid.displayName = "FullGrid";
33089
33350
  var FullGrid_default = FullGrid;
33090
33351
 
33091
33352
  // src/layout/Grid/FullScreen/FullScreen.tsx
33092
- import { jsx as jsx348 } from "react/jsx-runtime";
33353
+ import { jsx as jsx349 } from "react/jsx-runtime";
33093
33354
  var FullScreen = (props) => {
33094
33355
  const { children, className } = props;
33095
- 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 });
33096
33357
  };
33097
33358
  FullScreen.displayName = "FullScreen";
33098
33359
  var FullScreen_default = FullScreen;
33099
33360
 
33100
33361
  // src/layout/Grid/Item/Item.tsx
33101
- import { jsx as jsx349 } from "react/jsx-runtime";
33362
+ import { jsx as jsx350 } from "react/jsx-runtime";
33102
33363
  var calculateSpans = (column) => {
33103
33364
  const spans = {};
33104
33365
  let inherited = column.default;
@@ -33115,35 +33376,35 @@ var GridItem = ({ column, children, className }) => {
33115
33376
  Object.entries(spans).forEach(([key, value]) => {
33116
33377
  style[`--column-${key}`] = value;
33117
33378
  });
33118
- 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 });
33119
33380
  };
33120
33381
  GridItem.displayName = "GridItem";
33121
33382
  var Item_default = GridItem;
33122
33383
 
33123
33384
  // src/layout/Header/Header.tsx
33124
- import { jsx as jsx350, jsxs as jsxs218 } from "react/jsx-runtime";
33385
+ import { jsx as jsx351, jsxs as jsxs219 } from "react/jsx-runtime";
33125
33386
  var Header = ({
33126
33387
  logo,
33127
33388
  centerContent,
33128
33389
  rightContent
33129
33390
  }) => {
33130
- return /* @__PURE__ */ jsxs218("div", { className: "lib-xplat-layout-header", children: [
33131
- /* @__PURE__ */ jsx350("div", { children: logo }),
33132
- /* @__PURE__ */ jsx350("div", { children: centerContent }),
33133
- /* @__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 })
33134
33395
  ] });
33135
33396
  };
33136
33397
  Header.displayName = "Header";
33137
33398
  var Header_default = Header;
33138
33399
 
33139
33400
  // src/layout/Layout/Layout.tsx
33140
- 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";
33141
33402
  var Layout = (props) => {
33142
33403
  const { header, sideBar, children } = props;
33143
- return /* @__PURE__ */ jsx351("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-layout-content-wrapper", children: [
33144
- sideBar && /* @__PURE__ */ jsx351(Fragment3, { children: sideBar }),
33145
- /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-layout-content", children: [
33146
- 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 }),
33147
33408
  children
33148
33409
  ] })
33149
33410
  ] }) });
@@ -33152,31 +33413,31 @@ Layout.displayName = "Layout";
33152
33413
  var Layout_default = Layout;
33153
33414
 
33154
33415
  // src/layout/SideBar/SideBar.tsx
33155
- import React40 from "react";
33416
+ import React41 from "react";
33156
33417
 
33157
33418
  // src/layout/SideBar/SideBarContext.tsx
33158
- import React39 from "react";
33159
- var SideBarContext = React39.createContext(null);
33419
+ import React40 from "react";
33420
+ var SideBarContext = React40.createContext(null);
33160
33421
  var useSideBarContext = () => {
33161
- const ctx = React39.useContext(SideBarContext);
33422
+ const ctx = React40.useContext(SideBarContext);
33162
33423
  if (!ctx) throw new Error("Error");
33163
33424
  return ctx;
33164
33425
  };
33165
33426
  var SideBarContext_default = SideBarContext;
33166
33427
 
33167
33428
  // src/layout/SideBar/SideBar.tsx
33168
- import { jsx as jsx352 } from "react/jsx-runtime";
33429
+ import { jsx as jsx353 } from "react/jsx-runtime";
33169
33430
  var SideBar = (props) => {
33170
33431
  const { children, className } = props;
33171
- const [isOpen, setIsOpen] = React40.useState(true);
33432
+ const [isOpen, setIsOpen] = React41.useState(true);
33172
33433
  const handleSwitchSideBar = () => {
33173
33434
  setIsOpen((prev) => !prev);
33174
33435
  };
33175
- return /* @__PURE__ */ jsx352(
33436
+ return /* @__PURE__ */ jsx353(
33176
33437
  SideBarContext_default.Provider,
33177
33438
  {
33178
33439
  value: { isSidebarOpen: isOpen, handleSwitchSideBar },
33179
- children: /* @__PURE__ */ jsx352(
33440
+ children: /* @__PURE__ */ jsx353(
33180
33441
  "div",
33181
33442
  {
33182
33443
  className: clsx_default(
@@ -33478,6 +33739,7 @@ export {
33478
33739
  SunIcon_default as SunIcon,
33479
33740
  SunriseIcon_default as SunriseIcon,
33480
33741
  SunsetIcon_default as SunsetIcon,
33742
+ Swiper_default as Swiper,
33481
33743
  Switch_default as Switch,
33482
33744
  Tab_default as Tab,
33483
33745
  Table_default as Table,