@iamfiro/design 0.3.0 → 0.3.1

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 (153) hide show
  1. package/lib/components/Accordion/Accordion2.js +86 -86
  2. package/lib/components/ActionBar/ActionBar2.js +44 -43
  3. package/lib/components/Alert/Alert2.js +79 -79
  4. package/lib/components/AppShell/AppShell2.js +58 -58
  5. package/lib/components/AreaChart/AreaChart.js +41 -41
  6. package/lib/components/BarChart/BarChart2.js +110 -110
  7. package/lib/components/BarList/BarList2.js +95 -95
  8. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
  9. package/lib/components/Calendar/Calendar2.js +202 -202
  10. package/lib/components/Calendar/DatePicker2.js +122 -123
  11. package/lib/components/Calendar/date.js +57 -60
  12. package/lib/components/Card/Card2.js +62 -63
  13. package/lib/components/CardFrame/CardFrame2.js +43 -48
  14. package/lib/components/Chart/ChartParts.js +80 -80
  15. package/lib/components/Chart/chart2.js +57 -57
  16. package/lib/components/Chart/useChartInteraction.js +49 -49
  17. package/lib/components/ChatBubble/ChatBubble2.js +87 -87
  18. package/lib/components/ChatBubble/formatChatTime.js +34 -39
  19. package/lib/components/ChatComposer/ChatComposer2.js +97 -97
  20. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  21. package/lib/components/CodeBlock/highlight.js +75 -78
  22. package/lib/components/ColorPicker/ColorPicker2.js +383 -384
  23. package/lib/components/ColorPicker/color.js +74 -74
  24. package/lib/components/ColorPicker/presets.js +41 -46
  25. package/lib/components/Combobox/Combobox2.js +130 -131
  26. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  27. package/lib/components/Comment/Comment2.js +64 -88
  28. package/lib/components/ContextMenu/ContextMenu2.js +87 -87
  29. package/lib/components/DataGrid/DataGrid2.js +911 -909
  30. package/lib/components/DataGrid/GridPopover.js +114 -114
  31. package/lib/components/DataGrid/anchor.js +25 -25
  32. package/lib/components/DataGrid/model.js +281 -282
  33. package/lib/components/DataGrid/panels.js +427 -429
  34. package/lib/components/DataGrid/typeMeta.js +50 -51
  35. package/lib/components/DataGrid/types.js +39 -40
  36. package/lib/components/DescriptionList/DescriptionList2.js +104 -104
  37. package/lib/components/Dialog/AlertDialog.js +85 -84
  38. package/lib/components/Dialog/Dialog2.js +72 -71
  39. package/lib/components/Dialog/modal.js +68 -68
  40. package/lib/components/Drawer/Drawer2.js +100 -100
  41. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
  42. package/lib/components/DropdownMenu/menuCore.js +36 -36
  43. package/lib/components/Dropzone/Dropzone2.js +66 -65
  44. package/lib/components/EmptyState/EmptyState2.js +52 -54
  45. package/lib/components/FileChip/FileChip2.js +42 -66
  46. package/lib/components/FileUpload/FileUpload.js +171 -170
  47. package/lib/components/FilterChips/FilterChips2.js +54 -54
  48. package/lib/components/FunnelChart/FunnelChart2.js +144 -144
  49. package/lib/components/FunnelChart/funnel.js +56 -53
  50. package/lib/components/Highlight/Highlight2.js +60 -60
  51. package/lib/components/HoverCard/HoverCard.js +72 -72
  52. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  53. package/lib/components/InlineDiff/diff.js +81 -81
  54. package/lib/components/InlineDiff/useDiffReview.js +54 -53
  55. package/lib/components/Kanban/Kanban2.js +372 -372
  56. package/lib/components/Kanban/KanbanCard.js +80 -80
  57. package/lib/components/Kanban/move.js +55 -55
  58. package/lib/components/LineChart/LineChart2.js +167 -167
  59. package/lib/components/List/List2.js +64 -65
  60. package/lib/components/Listbox/Listbox2.js +105 -105
  61. package/lib/components/Marker/Marker2.js +54 -54
  62. package/lib/components/Menubar/Menubar2.js +112 -113
  63. package/lib/components/MultiSelect/MultiSelect2.js +106 -106
  64. package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
  65. package/lib/components/NoticeStack/NoticeStack2.js +115 -115
  66. package/lib/components/NumberStepper/NumberStepper2.js +69 -70
  67. package/lib/components/OtpInput/OtpInput2.js +87 -87
  68. package/lib/components/Pagination/Pagination2.js +97 -97
  69. package/lib/components/Pagination/paginationRange.js +23 -24
  70. package/lib/components/PhoneInput/PhoneInput.js +85 -85
  71. package/lib/components/PieChart/PieChart2.js +116 -116
  72. package/lib/components/PieChart/arc.js +80 -56
  73. package/lib/components/PieChart/useArcTween.js +57 -59
  74. package/lib/components/Popover/Popover2.js +59 -60
  75. package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
  76. package/lib/components/Rating/Rating2.js +93 -93
  77. package/lib/components/Resizable/Resizable2.js +136 -134
  78. package/lib/components/Resizable/layout.js +73 -73
  79. package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
  80. package/lib/components/ScatterChart/ScatterChart2.js +252 -253
  81. package/lib/components/ScatterChart/scatter.js +58 -56
  82. package/lib/components/ScrollArea/ScrollArea2.js +133 -134
  83. package/lib/components/Select/Select2.js +89 -89
  84. package/lib/components/Sidebar/Sidebar2.js +76 -76
  85. package/lib/components/Skeleton/Skeleton2.js +67 -67
  86. package/lib/components/Slider/Slider2.js +67 -67
  87. package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
  88. package/lib/components/SparkChart/SparkChart2.js +130 -130
  89. package/lib/components/SparkChart/spark.js +57 -62
  90. package/lib/components/Sparkbar/Sparkbar2.js +44 -44
  91. package/lib/components/SplitView/SplitView2.js +53 -53
  92. package/lib/components/Stat/Stat2.js +83 -83
  93. package/lib/components/StepList/StepList2.js +73 -73
  94. package/lib/components/Table/Table2.js +45 -45
  95. package/lib/components/Tabs/Tabs2.js +87 -87
  96. package/lib/components/TagInput/TagInput2.js +231 -234
  97. package/lib/components/TimePicker/TimePicker2.js +195 -195
  98. package/lib/components/TimePicker/time.js +60 -62
  99. package/lib/components/Timeline/Timeline2.js +199 -199
  100. package/lib/components/Timeline/scale.js +56 -58
  101. package/lib/components/Toast/Toaster.js +153 -152
  102. package/lib/components/Toast/store.js +57 -58
  103. package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
  104. package/lib/components/Toolbar/Toolbar2.js +135 -133
  105. package/lib/components/Tracker/Tracker2.js +83 -83
  106. package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
  107. package/lib/components/TreeView/TreeView2.js +165 -163
  108. package/lib/hooks/timing.js +33 -31
  109. package/lib/hooks/useControllableState.js +42 -42
  110. package/lib/hooks/useCountdown.js +58 -63
  111. package/lib/hooks/useDigitInput.js +75 -77
  112. package/lib/hooks/useDismiss.js +50 -52
  113. package/lib/hooks/useElapsed.js +58 -56
  114. package/lib/hooks/useFloating.js +44 -44
  115. package/lib/hooks/useFocusTrap.js +64 -40
  116. package/lib/hooks/usePresence.js +48 -50
  117. package/lib/hooks/usePressToOpen.js +52 -51
  118. package/lib/hooks/useScrollLock.js +49 -48
  119. package/lib/hooks/useSelection.js +37 -40
  120. package/lib/index.js +70 -69
  121. package/lib/primitives/AspectRatio2.js +50 -54
  122. package/lib/primitives/BrandIcon.js +153 -153
  123. package/lib/primitives/ColorDot2.js +49 -48
  124. package/lib/primitives/CopyButton2.js +59 -58
  125. package/lib/primitives/CountBadge2.js +57 -55
  126. package/lib/primitives/Countdown2.js +45 -49
  127. package/lib/primitives/Delta2.js +71 -46
  128. package/lib/primitives/Elapsed.js +43 -43
  129. package/lib/primitives/FileIcon2.js +93 -93
  130. package/lib/primitives/Flag2.js +95 -95
  131. package/lib/primitives/IconStack2.js +55 -55
  132. package/lib/primitives/IconTile2.js +46 -45
  133. package/lib/primitives/Kbd2.js +55 -55
  134. package/lib/primitives/Layout2.js +80 -80
  135. package/lib/primitives/Link2.js +36 -34
  136. package/lib/primitives/MaskedText2.js +65 -64
  137. package/lib/primitives/Progress2.js +80 -80
  138. package/lib/primitives/RelativeTime.js +52 -54
  139. package/lib/primitives/SearchInput2.js +55 -54
  140. package/lib/primitives/SelectorButton2.js +64 -65
  141. package/lib/primitives/Spinner2.js +55 -59
  142. package/lib/primitives/StatusIcon2.js +65 -65
  143. package/lib/primitives/Swatch2.js +50 -50
  144. package/lib/primitives/Tooltip2.js +85 -85
  145. package/lib/primitives/Typography2.js +66 -66
  146. package/lib/primitives/formatCountdown.js +43 -40
  147. package/lib/primitives/formatElapsed.js +24 -27
  148. package/lib/primitives/formatRelativeTime.js +43 -43
  149. package/lib/primitives/hotkey.js +71 -71
  150. package/lib/primitives/index.js +156 -157
  151. package/lib/primitives/maskValue.js +38 -34
  152. package/lib/style.css +1 -1
  153. package/package.json +1 -1
@@ -3,31 +3,31 @@ const e = _;
3
3
  (function(e, t) {
4
4
  let n = _, r = e();
5
5
  for (;;) try {
6
- if (-parseInt(n(205)) / 1 + parseInt(n(258)) / 2 + -parseInt(n(221)) / 3 * (parseInt(n(219)) / 4) + parseInt(n(272)) / 5 + -parseInt(n(215)) / 6 * (-parseInt(n(210)) / 7) + -parseInt(n(256)) / 8 + parseInt(n(265)) / 9 * (-parseInt(n(250)) / 10) == t) break;
6
+ if (parseInt(n(521)) / 1 + parseInt(n(503)) / 2 + -parseInt(n(534)) / 3 * (parseInt(n(496)) / 4) + -parseInt(n(529)) / 5 + -parseInt(n(543)) / 6 * (-parseInt(n(532)) / 7) + parseInt(n(542)) / 8 + parseInt(n(548)) / 9 * (parseInt(n(527)) / 10) == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(c, 503504);
11
+ })(r, 269954);
12
12
  import { TIMING as t } from "../../hooks/timing.js";
13
13
  import { useControllableState as n } from "../../hooks/useControllableState.js";
14
- import { Button as r, cx as i } from "../../primitives/index.js";
15
- import { focusableIn as a } from "../../hooks/useFocusTrap.js";
16
- import { modalTrigger as o, useModalLayer as s } from "../Dialog/modal.js";
17
- /* empty css */
18
- function c() {
19
- let e = /* @__PURE__ */ "zM9JDxm.zhjHz2DPBMC.mta5ouPMChzQyq.BwLU.CMvTB3zLrxzLBNrmAxn0zw5LCG.zMLSDgvY.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.nJi5neTArejxzq.ywn0AxzLrwXLBwvUDa.ChjLDMvUDerLzMf1Bhq.y2X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TzhjHD2vYx19IB2r5igrZlxnJCM9SBa.C2v0uhjVCgvYDhK.zhmTzhjHD2vYx19VDMvYBgf5.y2XPzw50wq.ls1FzhjHzW.yM9KEq.7iUC7yQ4ioYKHoYDToQ4Sa.zgf0yxnLDa.y2XVC2LUzW.yM90Dg9T.CMvSzwfZzvbVAw50zxjdyxb0DxjL.y3vYCMvUDfrHCMDLDa.mtu0odq5yMLZzxr4".split(".");
16
+ return r = function() {
21
17
  return e;
22
- }, c();
18
+ }, r();
23
19
  }
20
+ import { Button as i, cx as a } from "../../primitives/index.js";
21
+ import { focusableIn as o } from "../../hooks/useFocusTrap.js";
22
+ import { modalTrigger as s, useModalLayer as c } from "../Dialog/modal.js";
23
+ /* empty css */
24
24
  import { useEffect as l, useId as ee, useRef as u, useState as d } from "react";
25
25
  import { X as te } from "lucide-react";
26
26
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
27
27
  import { createPortal as ne } from "react-dom";
28
- var re = 260, ie = .4, ae = 180, oe = .35, h = (t) => 72 * (1 - Math[e(240)](-t / 140));
29
- function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y, description: b, children: x, footer: S, side: C = "right", size: se = "md", dismissible: w = !0, showClose: ce = !0, initialFocus: T, hideTitle: E = !1, modal: D = !0, inset: le = !1, handle: ue, snapPoints: de, snap: O, defaultSnap: fe, onSnapChange: pe, className: me }) {
30
- let k = e, [A, j] = n(c, g, _), M = u(null), N = u(null), P = ee(), { presence: F, close: he, onKeyDown: ge, outsideProps: _e } = s({
28
+ var re = 260, ie = .4, ae = 180, oe = .35, h = (t) => 72 * (1 - Math[e(552)](-t / 140));
29
+ function g({ open: r, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y, description: b, children: x, footer: S, side: C = e(501), size: se = "md", dismissible: w = !0, showClose: ce = !0, initialFocus: T, hideTitle: E = !1, modal: D = !0, inset: le = !1, handle: ue, snapPoints: de, snap: O, defaultSnap: fe, onSnapChange: pe, className: me }) {
30
+ let k = e, [A, j] = n(r, g, _), M = u(null), N = u(null), P = ee(), { presence: F, close: he, onKeyDown: ge, outsideProps: _e } = c({
31
31
  open: A,
32
32
  setOpen: j,
33
33
  dismissible: w,
@@ -35,57 +35,57 @@ function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y
35
35
  panelRef: M,
36
36
  initialFocus: T,
37
37
  modal: D
38
- }), ve = o(v, A, () => j(!0)), I = C === k(244) || C === k(255), L = I && (ue ?? C === k(255)), R = I && de?.[k(270)] ? [...de][k(222)]((e, t) => e - t) : [1], z = fe ?? R[R[k(270)] - 1], [ye, B] = d(z), [be, xe] = d(A);
38
+ }), ve = s(v, A, () => j(!0)), I = C === k(535) || C === "bottom", L = I && (ue ?? C === "bottom"), R = I && de?.[k(494)] ? [...de][k(541)]((e, t) => e - t) : [1], z = fe ?? R[R[k(494)] - 1], [ye, B] = d(z), [be, xe] = d(A);
39
39
  A !== be && (xe(A), A && B(z));
40
40
  let V = O ?? ye, H = (e) => {
41
41
  O === void 0 && B(e), pe?.(e);
42
42
  };
43
43
  l(() => {
44
- let e = k, t = M[e(243)];
44
+ let e = k, t = M.current;
45
45
  if (D || !A || !t) return;
46
- let n = document[e(216)], r = requestAnimationFrame(() => (T?.[e(243)] ?? a(t)[0] ?? t)[e(208)]({ preventScroll: !0 }));
46
+ let n = document[e(508)], r = requestAnimationFrame(() => (T?.current ?? o(t)[0] ?? t)[e(550)]({ preventScroll: !0 }));
47
47
  return () => {
48
48
  let i = e;
49
- cancelAnimationFrame(r), t[i(241)](document[i(216)]) && n?.[i(208)]({ preventScroll: !0 });
49
+ cancelAnimationFrame(r), t[i(507)](document.activeElement) && n?.focus({ preventScroll: !0 });
50
50
  };
51
51
  }, [
52
52
  D,
53
53
  A,
54
54
  T
55
55
  ]), l(() => {
56
- let e = k, t = M.current;
57
- A && t && (t[e(246)].removeProperty(e(245)), delete t[e(223)].dragging, N[e(243)] && (N[e(243)][e(246)][e(282)] = ""));
56
+ let e = k, t = M[e(497)];
57
+ A && t && (t.style[e(554)](e(513)), delete t[e(516)].dragging, N[e(497)] && (N[e(497)].style[e(492)] = ""));
58
58
  }, [A]);
59
59
  let U = u(null), W = u(!1), G = u(() => {});
60
- l(() => () => G[k(243)](), []);
60
+ l(() => () => G.current(), []);
61
61
  let K = (e, t) => (1 - e) * t, q = (e, t) => {
62
- let n = k, r = M[n(243)];
62
+ let n = k, r = M[n(497)];
63
63
  if (!r) return;
64
64
  if (e === null) {
65
- r[n(246)][n(232)]("--_drag"), delete r.dataset[n(209)], N.current && (N[n(243)][n(246)].opacity = "");
65
+ r[n(493)].removeProperty(n(513)), delete r[n(516)][n(555)], N[n(497)] && (N[n(497)][n(493)][n(492)] = "");
66
66
  return;
67
67
  }
68
- r[n(223)][n(209)] = "", r[n(246)][n(278)](n(245), e - K(V, t) + "px");
69
- let i = K(R[R[n(270)] - 1], t);
70
- N[n(243)] && (N[n(243)][n(246)][n(282)] = String(Math[n(211)](1, Math.max(0, 1 - (e - i) / (t - i)))));
68
+ r[n(516)].dragging = "", r[n(493)][n(510)](n(513), e - K(V, t) + "px");
69
+ let i = K(R[R[n(494)] - 1], t);
70
+ N[n(497)] && (N[n(497)].style[n(492)] = String(Math[n(485)](1, Math.max(0, 1 - (e - i) / (t - i)))));
71
71
  }, J = () => {
72
- let e = k, t = U[e(243)];
73
- U.current = null, G.current(), t?.el.hasPointerCapture?.(t.pointerId) && t.el[e(204)](t[e(220)]);
72
+ let e = k, t = U[e(497)];
73
+ U[e(497)] = null, G[e(497)](), t?.el[e(505)]?.(t[e(557)]) && t.el[e(519)](t[e(557)]);
74
74
  }, Y = () => {
75
75
  J(), q(null, 0);
76
- }, X = (e) => I ? e[k(285)] : e[k(206)], Se = C === k(255) || C === k(273) ? 1 : -1, Z = L ? {
76
+ }, X = (e) => I ? e[k(512)] : e.clientX, Se = C === k(518) || C === "right" ? 1 : -1, Z = L ? {
77
77
  onPointerDown: (e) => {
78
78
  let t = k;
79
- if (!L || e[t(259)] !== 0 || F[t(218)]) return;
80
- let n = e[t(284)];
81
- if (!n[t(228)](".ds-drawer__handle") && n[t(228)](t(261))) return;
82
- let r = M[t(243)];
79
+ if (!L || e[t(546)] !== 0 || F[t(517)]) return;
80
+ let n = e[t(489)];
81
+ if (!n.closest(t(506)) && n[t(525)]("button, a, input, textarea, select, [role=\"button\"]")) return;
82
+ let r = M[t(497)];
83
83
  if (!r) return;
84
- let i = I ? r[t(224)] : r[t(229)], a = X(e);
85
- U[t(243)] = {
86
- pointerId: e[t(220)],
87
- el: e[t(231)],
88
- fromHandle: !!n.closest(t(239)),
84
+ let i = I ? r[t(488)] : r.offsetWidth, a = X(e);
85
+ U[t(497)] = {
86
+ pointerId: e[t(557)],
87
+ el: e[t(520)],
88
+ fromHandle: !!n[t(525)](t(506)),
89
89
  start: a,
90
90
  base: K(V, i),
91
91
  size: i,
@@ -95,150 +95,150 @@ function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y
95
95
  pos: a,
96
96
  t: e.timeStamp
97
97
  }]
98
- }, W[t(243)] = !1, e[t(231)][t(227)]?.(e.pointerId);
98
+ }, W.current = !1, e[t(520)][t(544)]?.(e[t(557)]);
99
99
  let o = (e) => {
100
100
  let n = t;
101
- e.key === n(268) && (e[n(217)](), e[n(279)](), W.current = !!U.current?.fromHandle, Y());
101
+ e.key === "Escape" && (e[n(537)](), e[n(551)](), W[n(497)] = !!U[n(497)]?.[n(530)], Y());
102
102
  };
103
- window[t(234)](t(262), o, !0), G[t(243)] = () => {
103
+ window[t(559)](t(524), o, !0), G[t(497)] = () => {
104
104
  let e = t;
105
- window[e(212)](e(262), o, !0), G.current = () => {};
105
+ window[e(490)](e(524), o, !0), G[e(497)] = () => {};
106
106
  };
107
107
  },
108
108
  onPointerMove: (e) => {
109
- let n = k, r = U.current;
110
- if (!r || e[n(220)] !== r[n(220)]) return;
111
- let i = X(e), a = (i - r[n(235)]) * Se;
112
- if (!r[n(280)] && Math[n(225)](a) < t.dragThreshold) return;
113
- r[n(280)] = !0, r.samples = [...r.samples[n(213)]((t) => e[n(251)] - t.t < 100), {
109
+ let n = k, r = U[n(497)];
110
+ if (!r || e.pointerId !== r[n(557)]) return;
111
+ let i = X(e), a = (i - r[n(547)]) * Se;
112
+ if (!r.moved && Math[n(522)](a) < t.dragThreshold) return;
113
+ r.moved = !0, r[n(491)] = [...r[n(491)][n(526)]((t) => e[n(523)] - t.t < 100), {
114
114
  pos: i,
115
- t: e.timeStamp
115
+ t: e[n(523)]
116
116
  }];
117
- let o = K(R[R.length - 1], r[n(275)]), s = K(R[0], r[n(275)]), c = r.base + a;
118
- c < o ? c = o - h(o - c) : !w && c > s && (c = s + h(c - s)), r[n(274)] = c, q(c, r[n(275)]);
117
+ let o = K(R[R[n(494)] - 1], r[n(558)]), s = K(R[0], r[n(558)]), c = r[n(533)] + a;
118
+ c < o ? c = o - h(o - c) : !w && c > s && (c = s + h(c - s)), r.offset = c, q(c, r.size);
119
119
  },
120
120
  onPointerUp: (e) => {
121
- let t = k, n = U[t(243)];
122
- if (!n || e[t(220)] !== n[t(220)]) return;
121
+ let t = k, n = U.current;
122
+ if (!n || e[t(557)] !== n[t(557)]) return;
123
123
  if (J(), !n.moved) {
124
124
  q(null, 0);
125
125
  return;
126
126
  }
127
- W.current = n.fromHandle;
128
- let r = n[t(236)][0], i = n[t(236)][n[t(236)][t(270)] - 1], a = i.t > r.t ? (i[t(253)] - r[t(253)]) * Se / (i.t - r.t) : 0, o = n[t(274)] + a * ae, s = K(R[0], n[t(275)]);
129
- if (w && (o > s + (n.size - s) * oe || a > ie && n[t(274)] > s)) {
127
+ W[t(497)] = n[t(530)];
128
+ let r = n.samples[0], i = n[t(491)][n[t(491)][t(494)] - 1], a = i.t > r.t ? (i[t(486)] - r.pos) * Se / (i.t - r.t) : 0, o = n[t(502)] + a * ae, s = K(R[0], n.size);
129
+ if (w && (o > s + (n[t(558)] - s) * oe || a > ie && n[t(502)] > s)) {
130
130
  j(!1);
131
131
  return;
132
132
  }
133
- let c = R[t(267)]((e, r) => Math[t(225)](K(r, n[t(275)]) - o) < Math[t(225)](K(e, n[t(275)]) - o) ? r : e);
133
+ let c = R[t(495)]((e, r) => Math[t(522)](K(r, n.size) - o) < Math.abs(K(e, n[t(558)]) - o) ? r : e);
134
134
  q(null, 0), c !== V && H(c);
135
135
  },
136
136
  onPointerCancel: (e) => {
137
137
  let t = k;
138
- U[t(243)]?.[t(220)] === e[t(220)] && Y();
138
+ U[t(497)]?.[t(557)] === e[t(557)] && Y();
139
139
  }
140
- } : {}, Ce = L && (R.length > 1 ? p(k(259), {
141
- type: "button",
142
- className: k(269),
143
- "aria-label": V === R[R[k(270)] - 1] ? k(233) : k(248),
140
+ } : {}, Ce = L && (R[k(494)] > 1 ? p(k(546), {
141
+ type: k(546),
142
+ className: k(545),
143
+ "aria-label": V === R[R[k(494)] - 1] ? k(515) : "시트 펼치기",
144
144
  onClick: (e) => {
145
145
  let t = k;
146
- if (W[t(243)] && e.detail !== 0) {
147
- W[t(243)] = !1;
146
+ if (W.current && e[t(539)] !== 0) {
147
+ W.current = !1;
148
148
  return;
149
149
  }
150
- let n = R[t(247)](V);
151
- H(R[(n + 1) % R.length]);
150
+ let n = R[t(553)](V);
151
+ H(R[(n + 1) % R[t(494)]]);
152
152
  },
153
153
  ...Z
154
- }) : p(k(283), {
155
- className: k(269),
154
+ }) : p("div", {
155
+ className: "ds-drawer__handle",
156
156
  "aria-hidden": !0,
157
157
  ...Z
158
- })), Q = P + k(252), $ = P + "-desc";
159
- return m(f, { children: [ve, F[k(264)] && ne(m(k(283), {
160
- className: i(k(254), "ds-drawer--" + C, !D && k(260), le && k(207)),
161
- "data-state": F[k(218)] ? k(238) : "open",
158
+ })), Q = P + "-title", $ = P + "-desc";
159
+ return m(f, { children: [ve, F[k(499)] && ne(m(k(556), {
160
+ className: a("ds-drawer", "ds-drawer--" + C, !D && "ds-drawer--modeless", le && k(536)),
161
+ "data-state": F.closing ? k(500) : k(531),
162
162
  onKeyDown: ge,
163
- children: [D && p(k(283), {
163
+ children: [D && p(k(556), {
164
164
  ref: N,
165
- className: "ds-drawer__overlay",
165
+ className: k(511),
166
166
  "aria-hidden": !0,
167
167
  ..._e
168
- }), m(k(283), {
168
+ }), m(k(556), {
169
169
  ref: M,
170
- role: k(249),
171
- "aria-modal": D ? k(237) : void 0,
170
+ role: "dialog",
171
+ "aria-modal": D ? "true" : void 0,
172
172
  "aria-labelledby": Q,
173
173
  "aria-describedby": b ? $ : void 0,
174
174
  tabIndex: -1,
175
175
  "data-side": C,
176
- className: i(k(226), k(257) + se, L && k(276), R[k(270)] > 1 && k(214), E && "ds-drawer__panel--hide-title", me),
176
+ className: a("ds-drawer__panel", "ds-drawer__panel--" + se, L && k(487), R[k(494)] > 1 && k(549), E && k(538), me),
177
177
  style: { "--_snap": (1 - V) * 100 + "%" },
178
178
  children: [
179
- C === "bottom" && Ce,
179
+ C === k(518) && Ce,
180
180
  E ? m(f, { children: [p("h2", {
181
181
  id: Q,
182
182
  className: "ds-sr-only",
183
183
  children: y
184
184
  }), b && p("p", {
185
185
  id: $,
186
- className: k(277),
186
+ className: k(560),
187
187
  children: b
188
- })] }) : m(k(283), {
189
- className: k(242),
190
- ...C === k(255) ? Z : {},
188
+ })] }) : m(k(556), {
189
+ className: k(504),
190
+ ...C === k(518) ? Z : {},
191
191
  children: [p("h2", {
192
192
  id: Q,
193
- className: k(230),
193
+ className: k(528),
194
194
  children: y
195
195
  }), b && p("p", {
196
196
  id: $,
197
- className: "ds-drawer__desc",
197
+ className: k(498),
198
198
  children: b
199
199
  })]
200
200
  }),
201
- x != null && p(k(283), {
202
- className: k(266),
201
+ x != null && p(k(556), {
202
+ className: k(509),
203
203
  children: x
204
204
  }),
205
- S && p(k(283), {
206
- className: k(281),
205
+ S && p(k(556), {
206
+ className: k(540),
207
207
  children: S
208
208
  }),
209
- C === k(244) && Ce,
210
- ce && w && p(r, {
209
+ C === k(535) && Ce,
210
+ ce && w && p(i, {
211
211
  iconOnly: !0,
212
212
  variant: "ghost",
213
213
  size: "sm",
214
214
  icon: p(te, {}),
215
215
  "aria-label": "닫기",
216
- className: k(263),
216
+ className: "ds-drawer__close",
217
217
  onClick: he
218
218
  })
219
219
  ]
220
220
  })]
221
- }), document[k(271)])] });
221
+ }), document[k(514)])] });
222
222
  }
223
223
  function _(e, t) {
224
- e -= 204;
225
- let n = c(), r = n[e];
226
- _.tzKRwI === void 0 && (_.ldZXcN = function(e) {
224
+ e -= 485;
225
+ let n = r(), i = n[e];
226
+ _.PYADRa === void 0 && (_.KmHUnW = function(e) {
227
227
  let t = "", n = "";
228
228
  for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
229
229
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
230
230
  return decodeURIComponent(n);
231
- }, _.grVzGK = {}, _.tzKRwI = !0);
232
- let i = n[0];
233
- _.fbdyJJ !== i && (_.grVzGK = {}, _.fbdyJJ = i);
234
- let a = _.grVzGK[e];
235
- return a === void 0 ? (r = _.ldZXcN(r), _.grVzGK[e] = r) : r = a, r;
231
+ }, _.hWBAsn = {}, _.PYADRa = !0);
232
+ let a = n[0];
233
+ _.MJvbeo !== a && (_.hWBAsn = {}, _.MJvbeo = a);
234
+ let o = _.hWBAsn[e];
235
+ return o === void 0 ? (i = _.KmHUnW(i), _.hWBAsn[e] = i) : i = o, i;
236
236
  }
237
237
  function v(t) {
238
238
  let n = e;
239
239
  return p(g, {
240
240
  ...t,
241
- side: n(255)
241
+ side: n(518)
242
242
  });
243
243
  }
244
244
  export { g as Drawer, v as Sheet };