@iamfiro/design 0.3.4 → 0.3.5

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 (158) hide show
  1. package/agents/app-shell/AGENTS.md +99 -1
  2. package/lib/components/Accordion/Accordion2.js +93 -93
  3. package/lib/components/ActionBar/ActionBar2.js +44 -40
  4. package/lib/components/Alert/Alert2.js +64 -64
  5. package/lib/components/AppShell/AppShell2.js +73 -66
  6. package/lib/components/AreaChart/AreaChart.js +49 -47
  7. package/lib/components/BarChart/BarChart2.js +107 -107
  8. package/lib/components/BarList/BarList2.js +99 -99
  9. package/lib/components/Breadcrumb/Breadcrumb2.js +53 -56
  10. package/lib/components/Calendar/Calendar2.js +164 -164
  11. package/lib/components/Calendar/DatePicker2.js +76 -77
  12. package/lib/components/Calendar/date.js +49 -70
  13. package/lib/components/Card/Card2.js +104 -77
  14. package/lib/components/CardFrame/CardFrame2.js +46 -42
  15. package/lib/components/Chart/ChartParts.js +73 -73
  16. package/lib/components/Chart/chart2.js +53 -53
  17. package/lib/components/Chart/useChartInteraction.js +49 -49
  18. package/lib/components/ChatBubble/ChatBubble2.js +118 -118
  19. package/lib/components/ChatBubble/formatChatTime.js +42 -41
  20. package/lib/components/ChatComposer/ChatComposer2.js +102 -102
  21. package/lib/components/CodeBlock/CodeBlock2.js +51 -51
  22. package/lib/components/CodeBlock/highlight.js +85 -85
  23. package/lib/components/ColorPicker/ColorPicker2.js +373 -374
  24. package/lib/components/ColorPicker/color.js +94 -94
  25. package/lib/components/ColorPicker/presets.js +47 -46
  26. package/lib/components/Combobox/Combobox2.js +118 -117
  27. package/lib/components/CommandMenu/CommandMenu.js +121 -122
  28. package/lib/components/Comment/Comment2.js +56 -81
  29. package/lib/components/ContextMenu/ContextMenu2.js +91 -93
  30. package/lib/components/DataGrid/DataGrid2.js +845 -845
  31. package/lib/components/DataGrid/GridPopover.js +97 -97
  32. package/lib/components/DataGrid/anchor.js +34 -36
  33. package/lib/components/DataGrid/model.js +299 -299
  34. package/lib/components/DataGrid/panels.js +393 -393
  35. package/lib/components/DataGrid/typeMeta.js +53 -53
  36. package/lib/components/DataGrid/types.js +22 -22
  37. package/lib/components/DescriptionList/DescriptionList2.js +57 -57
  38. package/lib/components/Dialog/AlertDialog.js +56 -56
  39. package/lib/components/Dialog/Dialog2.js +68 -69
  40. package/lib/components/Dialog/modal.js +61 -57
  41. package/lib/components/Drawer/Drawer2.js +161 -161
  42. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -267
  43. package/lib/components/DropdownMenu/menuCore.js +42 -68
  44. package/lib/components/Dropzone/Dropzone2.js +81 -81
  45. package/lib/components/EmptyState/EmptyState2.js +55 -54
  46. package/lib/components/FileChip/FileChip2.js +39 -63
  47. package/lib/components/FileUpload/FileUpload.js +157 -156
  48. package/lib/components/FilterChips/FilterChips2.js +51 -51
  49. package/lib/components/FunnelChart/FunnelChart2.js +171 -171
  50. package/lib/components/FunnelChart/funnel.js +55 -57
  51. package/lib/components/Highlight/Highlight2.js +48 -48
  52. package/lib/components/HoverCard/HoverCard.js +59 -59
  53. package/lib/components/InlineDiff/InlineDiff2.js +110 -111
  54. package/lib/components/InlineDiff/diff.js +89 -89
  55. package/lib/components/InlineDiff/useDiffReview.js +63 -65
  56. package/lib/components/Kanban/Kanban2.js +424 -425
  57. package/lib/components/Kanban/KanbanCard.js +98 -73
  58. package/lib/components/Kanban/move.js +52 -49
  59. package/lib/components/LineChart/LineChart2.js +222 -222
  60. package/lib/components/List/List2.js +60 -59
  61. package/lib/components/Listbox/Listbox2.js +117 -117
  62. package/lib/components/Marker/Marker2.js +58 -59
  63. package/lib/components/Menubar/Menubar2.js +121 -123
  64. package/lib/components/MultiSelect/MultiSelect2.js +115 -115
  65. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -276
  66. package/lib/components/NoticeStack/NoticeStack2.js +98 -98
  67. package/lib/components/NumberStepper/NumberStepper2.js +67 -66
  68. package/lib/components/OtpInput/OtpInput2.js +93 -93
  69. package/lib/components/Pagination/Pagination2.js +87 -87
  70. package/lib/components/Pagination/paginationRange.js +39 -37
  71. package/lib/components/PhoneInput/PhoneInput.js +78 -78
  72. package/lib/components/PieChart/PieChart2.js +117 -117
  73. package/lib/components/PieChart/arc.js +57 -58
  74. package/lib/components/PieChart/useArcTween.js +45 -40
  75. package/lib/components/Popover/Popover2.js +73 -74
  76. package/lib/components/ProgressTracker/ProgressTracker2.js +128 -128
  77. package/lib/components/Rating/Rating2.js +95 -95
  78. package/lib/components/Resizable/Resizable2.js +86 -86
  79. package/lib/components/Resizable/layout.js +73 -73
  80. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -68
  81. package/lib/components/ScatterChart/ScatterChart2.js +172 -172
  82. package/lib/components/ScatterChart/scatter.js +55 -56
  83. package/lib/components/ScrollArea/ScrollArea2.js +130 -131
  84. package/lib/components/Select/Select2.js +86 -85
  85. package/lib/components/Sidebar/Sidebar2.js +92 -86
  86. package/lib/components/Sidebar/rail.js +43 -0
  87. package/lib/components/Skeleton/Skeleton2.js +60 -61
  88. package/lib/components/Slider/Slider2.js +73 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -55
  90. package/lib/components/SparkChart/SparkChart2.js +140 -141
  91. package/lib/components/SparkChart/spark.js +50 -48
  92. package/lib/components/Sparkbar/Sparkbar2.js +56 -56
  93. package/lib/components/SplitView/SplitView2.js +47 -46
  94. package/lib/components/Stat/Stat2.js +61 -61
  95. package/lib/components/StepList/StepList2.js +76 -76
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +85 -85
  98. package/lib/components/TagInput/TagInput2.js +217 -218
  99. package/lib/components/TimePicker/TimePicker2.js +217 -216
  100. package/lib/components/TimePicker/time.js +60 -58
  101. package/lib/components/Timeline/Timeline2.js +181 -181
  102. package/lib/components/Timeline/scale.js +60 -65
  103. package/lib/components/Toast/Toaster.js +146 -148
  104. package/lib/components/Toast/store.js +85 -85
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  106. package/lib/components/Toolbar/Toolbar2.js +120 -121
  107. package/lib/components/Tracker/Tracker2.js +79 -79
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +116 -116
  109. package/lib/components/TreeView/TreeView2.js +162 -163
  110. package/lib/hooks/timing.js +32 -35
  111. package/lib/hooks/useControllableState.js +35 -35
  112. package/lib/hooks/useCountdown.js +53 -52
  113. package/lib/hooks/useDigitInput.js +82 -81
  114. package/lib/hooks/useDismiss.js +48 -48
  115. package/lib/hooks/useElapsed.js +40 -43
  116. package/lib/hooks/useFloating.js +47 -47
  117. package/lib/hooks/useFocusTrap.js +45 -69
  118. package/lib/hooks/usePresence.js +49 -50
  119. package/lib/hooks/usePressToOpen.js +43 -43
  120. package/lib/hooks/useScrollLock.js +45 -43
  121. package/lib/hooks/useSelection.js +44 -46
  122. package/lib/index.js +105 -106
  123. package/lib/primitives/AspectRatio2.js +57 -56
  124. package/lib/primitives/BrandIcon.js +177 -177
  125. package/lib/primitives/ColorDot2.js +44 -48
  126. package/lib/primitives/CopyButton2.js +54 -55
  127. package/lib/primitives/CountBadge2.js +45 -48
  128. package/lib/primitives/Countdown2.js +35 -37
  129. package/lib/primitives/Delta2.js +41 -41
  130. package/lib/primitives/Elapsed.js +43 -41
  131. package/lib/primitives/FileIcon2.js +94 -94
  132. package/lib/primitives/Flag2.js +97 -97
  133. package/lib/primitives/IconStack2.js +53 -55
  134. package/lib/primitives/IconTile2.js +45 -41
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +66 -66
  137. package/lib/primitives/Link2.js +42 -47
  138. package/lib/primitives/MaskedText2.js +47 -69
  139. package/lib/primitives/Progress2.js +71 -71
  140. package/lib/primitives/RelativeTime.js +47 -43
  141. package/lib/primitives/SearchInput2.js +70 -66
  142. package/lib/primitives/SelectorButton2.js +70 -67
  143. package/lib/primitives/Spinner2.js +58 -59
  144. package/lib/primitives/StatusIcon2.js +70 -70
  145. package/lib/primitives/Swatch2.js +57 -55
  146. package/lib/primitives/Tooltip2.js +78 -78
  147. package/lib/primitives/Typography2.js +54 -54
  148. package/lib/primitives/formatCountdown.js +37 -38
  149. package/lib/primitives/formatElapsed.js +46 -45
  150. package/lib/primitives/formatRelativeTime.js +43 -69
  151. package/lib/primitives/hotkey.js +66 -66
  152. package/lib/primitives/index.js +152 -152
  153. package/lib/primitives/maskValue.js +30 -32
  154. package/lib/style.css +1 -1
  155. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  156. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  157. package/lib/types/components/index.d.ts +1 -0
  158. package/package.json +1 -1
@@ -1,244 +1,244 @@
1
1
  "use client";
2
- const e = v;
2
+ const e = l;
3
3
  (function(e, t) {
4
- let n = v, r = e();
4
+ let n = l, r = e();
5
5
  for (;;) try {
6
- if (parseInt(n(467)) / 1 * (parseInt(n(417)) / 2) + parseInt(n(454)) / 3 + parseInt(n(491)) / 4 * (parseInt(n(461)) / 5) + parseInt(n(420)) / 6 + parseInt(n(432)) / 7 * (-parseInt(n(483)) / 8) + parseInt(n(481)) / 9 + -parseInt(n(476)) / 10 * (parseInt(n(460)) / 11) == t) break;
6
+ if (-parseInt(n(466)) / 1 + -parseInt(n(461)) / 2 + parseInt(n(435)) / 3 * (-parseInt(n(387)) / 4) + -parseInt(n(451)) / 5 * (-parseInt(n(402)) / 6) + parseInt(n(456)) / 7 + parseInt(n(464)) / 8 * (parseInt(n(410)) / 9) + parseInt(n(400)) / 10 == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(d, 936374);
11
+ })(r, 606128);
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
- import { useEffect as c, useId as ee, useRef as l, useState as u } from "react";
19
- import { X as te } from "lucide-react";
20
- function d() {
21
- let e = /* @__PURE__ */ "Cg9Z.lxrPDgXL.C2v0uhjVCgvYDhK.ywrKrxzLBNrmAxn0zw5LCG.y3vYCMvUDa.BwLU.mJi0mZe1n2vXv3v4yW.zhmTzhjHD2vYls1PBNnLDa.lMrZlwrYyxDLCL9FAgfUzgXL.zhmTzhjHD2vYx19Oyw5KBgu.DgLTzvn0yw1W.zhmTzhjHD2vYx19Wyw5LBc0T.Aw5KzxHpzG.zhmTzhjHD2vYx19Wyw5LBc0TAgLKzs10AxrSzq.yNv0Dg9U.Bw91BNrLza.Bw92zwq.Dhj1zq.zM9JDxm.zgLHBg9N.lwrLC2m.B2zMC2v0.Dg9W.y2XVC2vK.zhmTzhjHD2vYls1TB2rLBgvZCW.zNjVBuHHBMrSzq.AgfZug9PBNrLCKnHChr1CMu.BgvUz3rO.mZu4mtK3m0jKtMTVAG.zhmTzhjHD2vYx19MB290zxi.y2XVC2LUzW.y29UDgfPBNm.zhjHz2DPBMC.zhmTC3iTB25SEq.mJjuBfPwuuG.mJG1ANzpsNzn.y3vYCMvUDfrHCMDLDa.zgf0yxnLDa.ls1FzhjHzW.zMLSDgvY.y2XPzw50wq.ntqYndfRCxPcCMu.zhmTzhjHD2vY.zxHW.Cg9PBNrLCKLK.C2v0ug9PBNrLCKnHChr1CMu.CMLNAhq.ywn0AxzLrwXLBwvUDa.B3bHy2L0Eq.B2zMC2v0v2LKDgG.mtm2mJaXmtbUtuDcB0K.zhmTzhjHD2vYx19IB2r5igrZlxnJCM9SBa.yM9KEq.CMvTB3zLuhjVCgvYDhK.y2XVC2vZDa.mtaYnZyXodjTzNjyDKu.C2fTCgXLCW.mtzhChjtwLG.rxnJyxbL.A2v5zg93BG.CMvSzwfZzvbVAw50zxjdyxb0DxjL.y2XPzw50wa.yM90Dg9T.zhmTzhjHD2vYx19OzwfKzxi.C3r5Bgu.odaWnJbMtgHlsvi.DgfYz2v0.yMfZzq.A2v5.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.C3rVCfbYB3bHz2f0Aw9U.Bwf4.C2L6zq.mtbesNPyDve.ywjZ.C3rHCNq.mZmYmdy5nhHIC1fosa.CMvKDwnL.zhmTzhjHD2vYx19VDMvYBgf5.B2zMC2v0sgvPz2H0.7iUC7yQ4ioYKHoYDToQ4Sa.zgL2".split(".");
22
- return d = function() {
14
+ function r() {
15
+ let e = /* @__PURE__ */ "rxnJyxbL.7iUC7yQ4io2oVoY5MoQ4Sa.yNv0Dg9UlcbHlcbPBNb1DcWGDgv4DgfYzweSihnLBgvJDcWGw3jVBgu9iMj1DhrVBIjD.lxrPDgXL.Aw5KzxHpzG.CMLNAhq.zMLSDgvY.C2L6zq.A2v5zg93BG.BwLU.y3vYCMvUDa.zhmTzhjHD2vYx19Oyw5KBgu.Cg9PBNrLCKLK.zhmTzhjHD2vYx190AxrSzq.mta1mZu5n3P1Ew1lzq.y2XPzw50wq.Bw92zwq.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.zhmTzhjHD2vYx19IB2r5igrZlxnJCM9SBa.CMvKDwnL.zNjVBuHHBMrSzq.zgv0ywLS.Bw91BNrLza.zxHW.y2XVC2vZDa.zhmTzhjHD2vY.zhmTzhjHD2vYx19Wyw5LBa.z2HVC3q.BgvUz3rO.y2XPzw50wa.mJC2odKWnxH0qKTvrq.CMvTB3zLuhjVCgvYDhK.B3bLBG.Cg9Z.ywjZ.mJK4nJG2nufgqxnoDW.C3r5Bgu.zgL2.yM90Dg9T.zgLHBg9N.mtmWnZi2mgXxB0TPDG.ywn0AxzLrwXLBwvUDa.C2v0ug9PBNrLCKnHChr1CMu.mZKXotm2ohPKuxfpwq.AgfZug9PBNrLCKnHChr1CMu.ntC1mJiYs2rwseXs.zhmTzhjHD2vYls0.zhmTzhjHD2vYls1PBNnLDa.zhjHz1rOCMvZAg9Sza.B2zMC2v0.C29YDa.ofHSsgXyDq.C2fTCgXLCW.Dg9W.zhmTzhjHD2vYx19OzwfKzxi.y29UDgfPBNm.DgLTzvn0yw1W.lMrZlwrYyxDLCL9FAgfUzgXL.zhmTzhjHD2vYx19Wyw5LBc0TAgLKzs10AxrSzq.zhmTzhjHD2vYx19Wyw5LBc0T.zhmTzhjHD2vYx19JBg9Zzq.ls1FzhjHzW.C3rVCfbYB3bHz2f0Aw9U.zhmTzhjHD2vYx19Wyw5LBc0TAgfUzgXL.ntC3mdyWmejhq3z4sq.lwrLC2m.nNzvBgjrrG.A2v5.Bwf4.y3vYCMvUDfrHCMDLDa.zhmTzhjHD2vYx19MB290zxi.zM9JDxm.7iUC7yQ4ioYKHoYDToQ4Sa.yNv0Dg9U.mtHfEK5Mreq.ywrKrxzLBNrmAxn0zw5LCG.B3bHy2L0Eq.y2XVC2vK.C3rHCNq.y2XVC2LUzW.zhjHz2DPBMC.yMfZzq.Dhj1zq.zgf0yxnLDa.zhmTC3iTB25SEq".split(".");
16
+ return r = function() {
23
17
  return e;
24
- }, d();
18
+ }, r();
25
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
+ function l(e, t) {
25
+ e -= 382;
26
+ let n = r(), i = n[e];
27
+ l.herDcv === void 0 && (l.GKBwIK = function(e) {
28
+ let t = "", n = "";
29
+ 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);
30
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
31
+ return decodeURIComponent(n);
32
+ }, l.DhpGcs = {}, l.herDcv = !0);
33
+ let a = n[0];
34
+ l.XHuYpo !== a && (l.DhpGcs = {}, l.XHuYpo = a);
35
+ let o = l.DhpGcs[e];
36
+ return o === void 0 ? (i = l.GKBwIK(i), l.DhpGcs[e] = i) : i = o, i;
37
+ }
38
+ import { useEffect as u, useId as ee, useRef as d, useState as te } from "react";
39
+ import { X as ne } from "lucide-react";
26
40
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
27
- import { createPortal as ne } from "react-dom";
28
- var re = 260, ie = .4, ae = 180, oe = .35, h = (t) => 72 * (1 - Math[e(469)](-t / 140));
29
- function g({ open: d, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y, description: b, children: x, footer: S, side: C = e(472), 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(d, g, _), M = l(null), N = l(null), P = ee(), { presence: F, close: he, onKeyDown: ge, outsideProps: _e } = s({
31
- open: A,
32
- setOpen: j,
33
- dismissible: w,
34
- exitMs: re,
35
- panelRef: M,
36
- initialFocus: T,
37
- modal: D
38
- }), ve = o(v, A, () => j(!0)), I = C === k(448) || C === k(488), L = I && (ue ?? C === k(488)), R = I && de?.[k(453)] ? [...de].sort((e, t) => e - t) : [1], z = fe ?? R[R[k(453)] - 1], [ye, B] = u(z), [be, xe] = u(A);
39
- A !== be && (xe(A), A && B(z));
40
- let V = O ?? ye, H = (e) => {
41
- O === void 0 && B(e), pe?.(e);
41
+ import { createPortal as re } from "react-dom";
42
+ var ie = 260, ae = .4, oe = 180, se = .35, h = (t) => 72 * (1 - Math[e(444)](-t / 140));
43
+ function g({ open: r, defaultOpen: l = !1, onOpenChange: g, trigger: _, title: v, description: y, children: b, footer: x, side: S = e(426), size: ce = "md", dismissible: C = !0, showClose: le = !0, initialFocus: w, hideTitle: T = !1, modal: E = !0, inset: ue = !1, handle: de, snapPoints: fe, snap: D, defaultSnap: pe, onSnapChange: me, className: he }) {
44
+ let O = e, [k, A] = n(r, l, g), j = d(null), M = d(null), N = ee(), { presence: P, close: ge, onKeyDown: _e, outsideProps: ve } = c({
45
+ open: k,
46
+ setOpen: A,
47
+ dismissible: C,
48
+ exitMs: ie,
49
+ panelRef: j,
50
+ initialFocus: w,
51
+ modal: E
52
+ }), ye = s(_, k, () => A(!0)), F = S === "top" || S === O(459), I = F && (de ?? S === "bottom"), L = F && fe?.length ? [...fe][O(386)]((e, t) => e - t) : [1], R = pe ?? L[L[O(449)] - 1], [be, z] = te(R), [xe, Se] = te(k);
53
+ k !== xe && (Se(k), k && z(R));
54
+ let B = D ?? be, V = (e) => {
55
+ D === void 0 && z(e), me?.(e);
42
56
  };
43
- c(() => {
44
- let e = k, t = M[e(430)];
45
- if (D || !A || !t) return;
46
- let n = document[e(473)], r = requestAnimationFrame(() => (T?.[e(430)] ?? a(t)[0] ?? t)[e(444)]({ preventScroll: !0 }));
57
+ u(() => {
58
+ let e = O, t = j[e(431)];
59
+ if (E || !k || !t) return;
60
+ let n = document[e(462)], r = requestAnimationFrame(() => (w?.[e(431)] ?? o(t)[0] ?? t)[e(407)]({ preventScroll: !0 }));
47
61
  return () => {
48
62
  let i = e;
49
- cancelAnimationFrame(r), t[i(457)](document.activeElement) && n?.[i(444)]({ preventScroll: !0 });
63
+ cancelAnimationFrame(r), t[i(391)](document[i(462)]) && n?.focus({ preventScroll: !0 });
50
64
  };
51
65
  }, [
52
- D,
53
- A,
54
- T
55
- ]), c(() => {
56
- let e = k, t = M[e(430)];
57
- A && t && (t.style[e(479)](e(464)), delete t[e(463)].dragging, N[e(430)] && (N[e(430)][e(490)][e(474)] = ""));
58
- }, [A]);
59
- let U = l(null), W = l(!1), G = l(() => {});
60
- c(() => () => G.current(), []);
61
- let K = (e, t) => (1 - e) * t, q = (e, t) => {
62
- let n = k, r = M.current;
66
+ E,
67
+ k,
68
+ w
69
+ ]), u(() => {
70
+ let e = O, t = j[e(431)];
71
+ k && t && (t.style.removeProperty(e(397)), delete t[e(419)][e(416)], M[e(431)] && (M.current[e(457)].opacity = ""));
72
+ }, [k]);
73
+ let H = d(null), U = d(!1), W = d(() => {});
74
+ u(() => () => W[O(431)](), []);
75
+ let G = (e, t) => (1 - e) * t, K = (e, t) => {
76
+ let n = O, r = j[n(431)];
63
77
  if (!r) return;
64
78
  if (e === null) {
65
- r.style[n(479)](n(464)), delete r[n(463)][n(458)], N[n(430)] && (N[n(430)][n(490)][n(474)] = "");
79
+ r[n(457)][n(452)](n(397)), delete r[n(419)][n(416)], M.current && (M[n(431)].style[n(412)] = "");
66
80
  return;
67
81
  }
68
- r[n(463)][n(458)] = "", r[n(490)][n(428)](n(464), e - K(V, t) + "px");
69
- let i = K(R[R[n(453)] - 1], t);
70
- N[n(430)] && (N[n(430)][n(490)][n(474)] = String(Math[n(431)](1, Math[n(497)](0, 1 - (e - i) / (t - i)))));
82
+ r[n(419)][n(416)] = "", r[n(457)].setProperty("--_drag", e - G(B, t) + "px");
83
+ let i = G(L[L[n(449)] - 1], t);
84
+ M[n(431)] && (M[n(431)][n(457)][n(412)] = String(Math[n(430)](1, Math[n(404)](0, 1 - (e - i) / (t - i)))));
85
+ }, q = () => {
86
+ let e = O, t = H[e(431)];
87
+ H.current = null, W.current(), t?.el[e(465)]?.(t[e(433)]) && t.el.releasePointerCapture(t.pointerId);
71
88
  }, J = () => {
72
- let e = k, t = U[e(430)];
73
- U[e(430)] = null, G[e(430)](), t?.el[e(452)]?.(t.pointerId) && t.el[e(486)](t[e(470)]);
74
- }, Y = () => {
75
- J(), q(null, 0);
76
- }, X = (e) => I ? e[k(466)] : e[k(487)], Se = C === "bottom" || C === k(472) ? 1 : -1, Z = L ? {
89
+ q(), K(null, 0);
90
+ }, Y = (e) => F ? e[O(436)] : e[O(450)], X = S === "bottom" || S === O(426) ? 1 : -1, Z = I ? {
77
91
  onPointerDown: (e) => {
78
- let t = k;
79
- if (!L || e[t(440)] !== 0 || F[t(456)]) return;
80
- let n = e[t(492)];
81
- if (!n[t(480)](t(434)) && n[t(480)]("button, a, input, textarea, select, [role=\"button\"]")) return;
82
- let r = M[t(430)];
92
+ let t = O;
93
+ if (!I || e.button !== 0 || P.closing) return;
94
+ let n = e.target;
95
+ if (!n.closest(t(393)) && n[t(445)](t(423))) return;
96
+ let r = j[t(431)];
83
97
  if (!r) return;
84
- let i = I ? r[t(423)] : r[t(475)], a = X(e);
85
- U.current = {
86
- pointerId: e.pointerId,
87
- el: e[t(462)],
88
- fromHandle: !!n[t(480)](t(434)),
98
+ let i = F ? r.offsetHeight : r.offsetWidth, a = Y(e);
99
+ H.current = {
100
+ pointerId: e[t(433)],
101
+ el: e.currentTarget,
102
+ fromHandle: !!n.closest(".ds-drawer__handle"),
89
103
  start: a,
90
- base: K(V, i),
104
+ base: G(B, i),
91
105
  size: i,
92
- offset: K(V, i),
106
+ offset: G(B, i),
93
107
  moved: !1,
94
108
  samples: [{
95
109
  pos: a,
96
- t: e[t(436)]
110
+ t: e[t(392)]
97
111
  }]
98
- }, W[t(430)] = !1, e[t(462)][t(471)]?.(e[t(470)]);
112
+ }, U[t(431)] = !1, e[t(405)][t(463)]?.(e.pointerId);
99
113
  let o = (e) => {
100
114
  let n = t;
101
- e[n(494)] === n(484) && (e.preventDefault(), e[n(496)](), W.current = !!U[n(430)]?.[n(451)], Y());
115
+ e[n(403)] === n(421) && (e.preventDefault(), e[n(398)](), U[n(431)] = !!H[n(431)]?.fromHandle, J());
102
116
  };
103
- window[t(429)](t(485), o, !0), G[t(430)] = () => {
117
+ window[t(411)](t(429), o, !0), W[t(431)] = () => {
104
118
  let e = t;
105
- window.removeEventListener("keydown", o, !0), G[e(430)] = () => {};
119
+ window.removeEventListener(e(429), o, !0), W[e(431)] = () => {};
106
120
  };
107
121
  },
108
122
  onPointerMove: (e) => {
109
- let n = k, r = U[n(430)];
110
- if (!r || e[n(470)] !== r[n(470)]) return;
111
- let i = X(e), a = (i - r[n(419)]) * Se;
112
- if (!r[n(442)] && Math[n(418)](a) < t.dragThreshold) return;
113
- r[n(442)] = !0, r[n(482)] = [...r[n(482)][n(465)]((t) => e.timeStamp - t.t < 100), {
123
+ let n = O, r = H[n(431)];
124
+ if (!r || e[n(433)] !== r[n(433)]) return;
125
+ let i = Y(e), a = (i - r[n(414)]) * X;
126
+ if (!r[n(437)] && Math[n(455)](a) < t[n(384)]) return;
127
+ r[n(437)] = !0, r[n(388)] = [...r[n(388)][n(427)]((t) => e.timeStamp - t.t < 100), {
114
128
  pos: i,
115
- t: e.timeStamp
129
+ t: e[n(392)]
116
130
  }];
117
- let o = K(R[R[n(453)] - 1], r[n(498)]), s = K(R[0], r[n(498)]), c = r[n(493)] + a;
118
- c < o ? c = o - h(o - c) : !w && c > s && (c = s + h(c - s)), r[n(447)] = c, q(c, r[n(498)]);
131
+ let o = G(L[L.length - 1], r[n(428)]), s = G(L[0], r[n(428)]), c = r[n(417)] + a;
132
+ c < o ? c = o - h(o - c) : !C && c > s && (c = s + h(c - s)), r.offset = c, K(c, r[n(428)]);
119
133
  },
120
134
  onPointerUp: (e) => {
121
- let t = k, n = U[t(430)];
122
- if (!n || e[t(470)] !== n[t(470)]) return;
123
- if (J(), !n[t(442)]) {
124
- q(null, 0);
135
+ let t = O, n = H[t(431)];
136
+ if (!n || e[t(433)] !== n[t(433)]) return;
137
+ if (q(), !n[t(437)]) {
138
+ K(null, 0);
125
139
  return;
126
140
  }
127
- W[t(430)] = n.fromHandle;
128
- let r = n.samples[0], i = n[t(482)][n[t(482)].length - 1], a = i.t > r.t ? (i[t(426)] - r[t(426)]) * Se / (i.t - r.t) : 0, o = n.offset + a * ae, s = K(R[0], n.size);
129
- if (w && (o > s + (n[t(498)] - s) * oe || a > ie && n[t(447)] > s)) {
130
- j(!1);
141
+ U[t(431)] = n[t(441)];
142
+ let r = n[t(388)][0], i = n[t(388)][n[t(388)][t(449)] - 1], a = i.t > r.t ? (i[t(454)] - r[t(454)]) * X / (i.t - r.t) : 0, o = n.offset + a * oe, s = G(L[0], n[t(428)]);
143
+ if (C && (o > s + (n[t(428)] - s) * se || a > ae && n[t(385)] > s)) {
144
+ A(!1);
131
145
  return;
132
146
  }
133
- let c = R[t(421)]((e, r) => Math[t(418)](K(r, n[t(498)]) - o) < Math[t(418)](K(e, n[t(498)]) - o) ? r : e);
134
- q(null, 0), c !== V && H(c);
147
+ let c = L[t(440)]((e, r) => Math[t(455)](G(r, n[t(428)]) - o) < Math[t(455)](G(e, n[t(428)]) - o) ? r : e);
148
+ K(null, 0), c !== B && V(c);
135
149
  },
136
150
  onPointerCancel: (e) => {
137
- let t = k;
138
- U.current?.[t(470)] === e[t(470)] && Y();
151
+ let t = O;
152
+ H[t(431)]?.pointerId === e[t(433)] && J();
139
153
  }
140
- } : {}, Ce = L && (R.length > 1 ? p(k(440), {
141
- type: k(440),
142
- className: k(435),
143
- "aria-label": V === R[R[k(453)] - 1] ? k(424) : "시트 펼치기",
154
+ } : {}, Ce = I && (L.length > 1 ? p(O(409), {
155
+ type: O(409),
156
+ className: O(432),
157
+ "aria-label": B === L[L[O(449)] - 1] ? O(408) : O(422),
144
158
  onClick: (e) => {
145
- let t = k;
146
- if (W[t(430)] && e.detail !== 0) {
147
- W[t(430)] = !1;
159
+ let t = O;
160
+ if (U[t(431)] && e[t(442)] !== 0) {
161
+ U[t(431)] = !1;
148
162
  return;
149
163
  }
150
- let n = R[t(438)](V);
151
- H(R[(n + 1) % R[t(453)]]);
164
+ let n = L[t(425)](B);
165
+ V(L[(n + 1) % L[t(449)]]);
152
166
  },
153
167
  ...Z
154
- }) : p(k(425), {
155
- className: k(435),
168
+ }) : p(O(458), {
169
+ className: O(432),
156
170
  "aria-hidden": !0,
157
171
  ...Z
158
- })), Q = P + k(427), $ = P + k(446);
159
- return m(f, { children: [ve, F[k(441)] && ne(m(k(425), {
160
- className: i(k(468), "ds-drawer--" + C, !D && k(450), le && k(433)),
161
- "data-state": F[k(456)] ? k(449) : "open",
162
- onKeyDown: ge,
163
- children: [D && p("div", {
164
- ref: N,
165
- className: k(422),
166
- "aria-hidden": !0,
167
- ..._e
168
- }), m(k(425), {
172
+ })), Q = N + O(424), $ = N + O(401);
173
+ return m(f, { children: [ye, P[O(443)] && re(m("div", {
174
+ className: a(O(446), O(382) + S, !E && "ds-drawer--modeless", ue && O(383)),
175
+ "data-state": P[O(415)] ? O(413) : O(453),
176
+ onKeyDown: _e,
177
+ children: [E && p(O(458), {
169
178
  ref: M,
170
- role: k(445),
171
- "aria-modal": D ? k(443) : void 0,
179
+ className: "ds-drawer__overlay",
180
+ "aria-hidden": !0,
181
+ ...ve
182
+ }), m(O(458), {
183
+ ref: j,
184
+ role: O(460),
185
+ "aria-modal": E ? O(418) : void 0,
172
186
  "aria-labelledby": Q,
173
- "aria-describedby": b ? $ : void 0,
187
+ "aria-describedby": y ? $ : void 0,
174
188
  tabIndex: -1,
175
- "data-side": C,
176
- className: i("ds-drawer__panel", k(437) + se, L && "ds-drawer__panel--handle", R[k(453)] > 1 && k(495), E && k(439), me),
177
- style: { "--_snap": (1 - V) * 100 + "%" },
189
+ "data-side": S,
190
+ className: a(O(447), O(395) + ce, I && O(399), L[O(449)] > 1 && O(438), T && O(394), he),
191
+ style: { "--_snap": (1 - B) * 100 + "%" },
178
192
  children: [
179
- C === k(488) && Ce,
180
- E ? m(f, { children: [p("h2", {
193
+ S === O(459) && Ce,
194
+ T ? m(f, { children: [p("h2", {
181
195
  id: Q,
182
- className: k(459),
183
- children: y
184
- }), b && p("p", {
196
+ className: O(420),
197
+ children: v
198
+ }), y && p("p", {
185
199
  id: $,
186
- className: k(459),
187
- children: b
188
- })] }) : m(k(425), {
189
- className: k(489),
190
- ...C === k(488) ? Z : {},
200
+ className: O(420),
201
+ children: y
202
+ })] }) : m(O(458), {
203
+ className: O(390),
204
+ ...S === O(459) ? Z : {},
191
205
  children: [p("h2", {
192
206
  id: Q,
193
- className: "ds-drawer__title",
194
- children: y
195
- }), b && p("p", {
207
+ className: O(434),
208
+ children: v
209
+ }), y && p("p", {
196
210
  id: $,
197
211
  className: "ds-drawer__desc",
198
- children: b
212
+ children: y
199
213
  })]
200
214
  }),
201
- x != null && p(k(425), {
202
- className: k(477),
203
- children: x
215
+ b != null && p("div", {
216
+ className: O(439),
217
+ children: b
204
218
  }),
205
- S && p("div", {
206
- className: k(455),
207
- children: S
219
+ x && p(O(458), {
220
+ className: O(406),
221
+ children: x
208
222
  }),
209
- C === k(448) && Ce,
210
- ce && w && p(r, {
223
+ S === O(389) && Ce,
224
+ le && C && p(i, {
211
225
  iconOnly: !0,
212
- variant: "ghost",
226
+ variant: O(448),
213
227
  size: "sm",
214
- icon: p(te, {}),
228
+ icon: p(ne, {}),
215
229
  "aria-label": "닫기",
216
- className: "ds-drawer__close",
217
- onClick: he
230
+ className: O(396),
231
+ onClick: ge
218
232
  })
219
233
  ]
220
234
  })]
221
- }), document[k(478)])] });
235
+ }), document.body)] });
222
236
  }
223
237
  function _(t) {
224
238
  let n = e;
225
239
  return p(g, {
226
240
  ...t,
227
- side: n(488)
241
+ side: n(459)
228
242
  });
229
243
  }
230
- function v(e, t) {
231
- e -= 417;
232
- let n = d(), r = n[e];
233
- v.EDlEAR === void 0 && (v.mUNSDY = function(e) {
234
- let t = "", n = "";
235
- 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);
236
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
237
- return decodeURIComponent(n);
238
- }, v.MGjmSD = {}, v.EDlEAR = !0);
239
- let i = n[0];
240
- v.MHzKeU !== i && (v.MGjmSD = {}, v.MHzKeU = i);
241
- let a = v.MGjmSD[e];
242
- return a === void 0 ? (r = v.mUNSDY(r), v.MGjmSD[e] = r) : r = a, r;
243
- }
244
244
  export { g as Drawer, _ as Sheet };