@iamfiro/design 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.
Files changed (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +76 -76
  4. package/lib/components/ActionBar/ActionBar2.js +43 -43
  5. package/lib/components/Alert/Alert2.js +46 -46
  6. package/lib/components/AppShell/AppShell2.js +58 -58
  7. package/lib/components/AreaChart/AreaChart.js +39 -40
  8. package/lib/components/BarChart/BarChart2.js +169 -169
  9. package/lib/components/BarList/BarList2.js +99 -99
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
  11. package/lib/components/Calendar/Calendar2.js +172 -171
  12. package/lib/components/Calendar/DatePicker2.js +101 -102
  13. package/lib/components/Calendar/date.js +71 -71
  14. package/lib/components/Card/Card2.js +55 -56
  15. package/lib/components/CardFrame/CardFrame2.js +52 -52
  16. package/lib/components/Chart/ChartParts.js +90 -90
  17. package/lib/components/Chart/chart2.js +52 -52
  18. package/lib/components/Chart/useChartInteraction.js +44 -44
  19. package/lib/components/ChatBubble/ChatBubble2.js +112 -112
  20. package/lib/components/ChatBubble/formatChatTime.js +44 -42
  21. package/lib/components/ChatComposer/ChatComposer2.js +94 -94
  22. package/lib/components/CodeBlock/CodeBlock2.js +66 -66
  23. package/lib/components/CodeBlock/highlight.js +67 -70
  24. package/lib/components/ColorPicker/ColorPicker2.js +404 -405
  25. package/lib/components/ColorPicker/color.js +81 -81
  26. package/lib/components/ColorPicker/presets.js +44 -43
  27. package/lib/components/Combobox/Combobox2.js +128 -128
  28. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  29. package/lib/components/Comment/Comment2.js +55 -80
  30. package/lib/components/ContextMenu/ContextMenu2.js +93 -94
  31. package/lib/components/DataGrid/DataGrid2.js +1181 -1180
  32. package/lib/components/DataGrid/GridPopover.js +112 -112
  33. package/lib/components/DataGrid/anchor.js +23 -25
  34. package/lib/components/DataGrid/model.js +274 -275
  35. package/lib/components/DataGrid/panels.js +423 -423
  36. package/lib/components/DataGrid/typeMeta.js +21 -22
  37. package/lib/components/DataGrid/types.js +38 -37
  38. package/lib/components/DescriptionList/DescriptionList2.js +107 -107
  39. package/lib/components/Dialog/AlertDialog.js +53 -53
  40. package/lib/components/Dialog/Dialog2.js +71 -70
  41. package/lib/components/Dialog/modal.js +59 -58
  42. package/lib/components/Drawer/Drawer2.js +123 -124
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
  44. package/lib/components/DropdownMenu/menuCore.js +46 -47
  45. package/lib/components/Dropzone/Dropzone2.js +77 -77
  46. package/lib/components/EmptyState/EmptyState2.js +57 -56
  47. package/lib/components/FileChip/FileChip2.js +71 -71
  48. package/lib/components/FileUpload/FileUpload.js +119 -119
  49. package/lib/components/FilterChips/FilterChips2.js +61 -61
  50. package/lib/components/FunnelChart/FunnelChart2.js +141 -141
  51. package/lib/components/FunnelChart/funnel.js +51 -51
  52. package/lib/components/Highlight/Highlight2.js +54 -54
  53. package/lib/components/HoverCard/HoverCard.js +108 -83
  54. package/lib/components/InlineDiff/InlineDiff2.js +126 -126
  55. package/lib/components/InlineDiff/diff.js +82 -82
  56. package/lib/components/InlineDiff/useDiffReview.js +62 -60
  57. package/lib/components/Kanban/Kanban2.js +382 -382
  58. package/lib/components/Kanban/KanbanCard.js +92 -92
  59. package/lib/components/Kanban/move.js +45 -49
  60. package/lib/components/LineChart/LineChart2.js +207 -207
  61. package/lib/components/List/List2.js +71 -71
  62. package/lib/components/Listbox/Listbox2.js +115 -115
  63. package/lib/components/Marker/Marker2.js +67 -60
  64. package/lib/components/Menubar/Menubar2.js +130 -133
  65. package/lib/components/MultiSelect/MultiSelect2.js +104 -104
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
  67. package/lib/components/NoticeStack/NoticeStack2.js +105 -105
  68. package/lib/components/NumberStepper/NumberStepper2.js +67 -67
  69. package/lib/components/OtpInput/OtpInput2.js +66 -67
  70. package/lib/components/Pagination/Pagination2.js +90 -90
  71. package/lib/components/Pagination/paginationRange.js +24 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +74 -74
  73. package/lib/components/PieChart/PieChart2.js +119 -119
  74. package/lib/components/PieChart/arc.js +63 -42
  75. package/lib/components/PieChart/useArcTween.js +56 -54
  76. package/lib/components/Popover/Popover2.js +61 -61
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
  78. package/lib/components/Rating/Rating2.js +81 -81
  79. package/lib/components/Resizable/Resizable2.js +112 -110
  80. package/lib/components/Resizable/layout.js +50 -50
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
  82. package/lib/components/ScatterChart/ScatterChart2.js +226 -227
  83. package/lib/components/ScatterChart/scatter.js +59 -57
  84. package/lib/components/ScrollArea/ScrollArea2.js +112 -112
  85. package/lib/components/Select/Select2.js +79 -79
  86. package/lib/components/Sidebar/Sidebar2.js +79 -79
  87. package/lib/components/Skeleton/Skeleton2.js +68 -68
  88. package/lib/components/Slider/Slider2.js +78 -77
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
  90. package/lib/components/SparkChart/SparkChart2.js +146 -145
  91. package/lib/components/SparkChart/spark.js +41 -67
  92. package/lib/components/Sparkbar/Sparkbar2.js +61 -60
  93. package/lib/components/SplitView/SplitView2.js +53 -53
  94. package/lib/components/Stat/Stat2.js +94 -94
  95. package/lib/components/StepList/StepList2.js +70 -70
  96. package/lib/components/Table/Table2.js +63 -63
  97. package/lib/components/Tabs/Tabs2.js +70 -70
  98. package/lib/components/TagInput/TagInput2.js +236 -239
  99. package/lib/components/TimePicker/TimePicker2.js +231 -232
  100. package/lib/components/TimePicker/time.js +63 -65
  101. package/lib/components/Timeline/Timeline2.js +167 -167
  102. package/lib/components/Timeline/scale.js +55 -55
  103. package/lib/components/Toast/Toaster.js +151 -152
  104. package/lib/components/Toast/store.js +90 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
  106. package/lib/components/Toolbar/Toolbar2.js +145 -145
  107. package/lib/components/Tracker/Tracker2.js +76 -76
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
  109. package/lib/components/TreeView/TreeView2.js +124 -124
  110. package/lib/hooks/timing.js +30 -29
  111. package/lib/hooks/useControllableState.js +37 -36
  112. package/lib/hooks/useCountdown.js +56 -59
  113. package/lib/hooks/useDigitInput.js +52 -78
  114. package/lib/hooks/useDismiss.js +58 -57
  115. package/lib/hooks/useElapsed.js +54 -54
  116. package/lib/hooks/useFloating.js +26 -26
  117. package/lib/hooks/useFocusTrap.js +42 -42
  118. package/lib/hooks/usePresence.js +49 -48
  119. package/lib/hooks/usePressToOpen.js +42 -41
  120. package/lib/hooks/useScrollLock.js +45 -44
  121. package/lib/hooks/useSelection.js +45 -39
  122. package/lib/index.js +71 -71
  123. package/lib/primitives/AspectRatio2.js +60 -60
  124. package/lib/primitives/BrandIcon.js +161 -161
  125. package/lib/primitives/ColorDot2.js +42 -45
  126. package/lib/primitives/CopyButton2.js +57 -56
  127. package/lib/primitives/CountBadge2.js +55 -51
  128. package/lib/primitives/Countdown2.js +41 -46
  129. package/lib/primitives/Delta2.js +36 -36
  130. package/lib/primitives/Elapsed.js +49 -49
  131. package/lib/primitives/FileIcon2.js +96 -96
  132. package/lib/primitives/Flag2.js +135 -135
  133. package/lib/primitives/IconStack2.js +38 -60
  134. package/lib/primitives/IconTile2.js +28 -29
  135. package/lib/primitives/Kbd2.js +50 -50
  136. package/lib/primitives/Layout2.js +71 -71
  137. package/lib/primitives/Link2.js +32 -31
  138. package/lib/primitives/MaskedText2.js +49 -74
  139. package/lib/primitives/Progress2.js +65 -66
  140. package/lib/primitives/RelativeTime.js +58 -57
  141. package/lib/primitives/SearchInput2.js +65 -65
  142. package/lib/primitives/SelectorButton2.js +74 -73
  143. package/lib/primitives/Spinner2.js +50 -50
  144. package/lib/primitives/StatusIcon2.js +68 -68
  145. package/lib/primitives/Swatch2.js +59 -55
  146. package/lib/primitives/Tooltip2.js +81 -81
  147. package/lib/primitives/Typography2.js +53 -53
  148. package/lib/primitives/formatCountdown.js +21 -22
  149. package/lib/primitives/formatElapsed.js +43 -42
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +82 -82
  152. package/lib/primitives/index.js +193 -174
  153. package/lib/primitives/maskValue.js +28 -28
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,33 +1,47 @@
1
1
  "use client";
2
- const e = _;
3
- (function(e, t) {
4
- let n = _, r = e();
2
+ const e = t;
3
+ function t(e, n) {
4
+ e -= 139;
5
+ let r = f(), i = r[e];
6
+ t.iIaTPT === void 0 && (t.LpjfRB = function(e) {
7
+ let t = "", n = "";
8
+ 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);
9
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
10
+ return decodeURIComponent(n);
11
+ }, t.eWFpWb = {}, t.iIaTPT = !0);
12
+ let a = r[0];
13
+ t.BDBxYh !== a && (t.eWFpWb = {}, t.BDBxYh = a);
14
+ let o = t.eWFpWb[e];
15
+ return o === void 0 ? (i = t.LpjfRB(i), t.eWFpWb[e] = i) : i = o, i;
16
+ }
17
+ (function(e, n) {
18
+ let r = t, i = e();
5
19
  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;
7
- r.push(r.shift());
20
+ if (parseInt(r(153)) / 1 + -parseInt(r(162)) / 2 * (-parseInt(r(190)) / 3) + parseInt(r(143)) / 4 * (parseInt(r(157)) / 5) + -parseInt(r(215)) / 6 * (parseInt(r(182)) / 7) + -parseInt(r(202)) / 8 + -parseInt(r(174)) / 9 * (parseInt(r(176)) / 10) + -parseInt(r(191)) / 11 * (-parseInt(r(150)) / 12) == n) break;
21
+ i.push(i.shift());
8
22
  } catch {
9
- r.push(r.shift());
23
+ i.push(i.shift());
10
24
  }
11
- })(c, 503504);
12
- import { TIMING as t } from "../../hooks/timing.js";
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";
25
+ })(f, 897166);
26
+ import { TIMING as n } from "../../hooks/timing.js";
27
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
28
+ import { Button as i, cx as a } from "../../primitives/index.js";
29
+ import { focusableIn as o } from "../../hooks/useFocusTrap.js";
30
+ import { modalTrigger as s, useModalLayer as c } from "../Dialog/modal.js";
17
31
  /* empty css */
18
- function c() {
19
- let e = /* @__PURE__ */ "zM9JDxm.zhjHz2DPBMC.mta5ouPMChzQyq.BwLU.CMvTB3zLrxzLBNrmAxn0zw5LCG.zMLSDgvY.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.nJi5neTArejxzq.ywn0AxzLrwXLBwvUDa.ChjLDMvUDerLzMf1Bhq.y2XVC2LUzW.mJyYnJaWngXdq0nZvG.Cg9PBNrLCKLK.m1rdwwfcwG.C29YDa.zgf0yxnLDa.B2zMC2v0sgvPz2H0.ywjZ.zhmTzhjHD2vYx19Wyw5LBa.C2v0ug9PBNrLCKnHChr1CMu.y2XVC2vZDa.B2zMC2v0v2LKDgG.zhmTzhjHD2vYx190AxrSzq.y3vYCMvUDfrHCMDLDa.CMvTB3zLuhjVCgvYDhK.7iUC7yQ4ioYKHoYDToQ4Sa.ywrKrxzLBNrmAxn0zw5LCG.C3rHCNq.C2fTCgXLCW.Dhj1zq.y2XVC2vK.lMrZlwrYyxDLCL9FAgfUzgXL.zxHW.y29UDgfPBNm.zhmTzhjHD2vYx19OzwfKzxi.y3vYCMvUDa.Dg9W.ls1FzhjHzW.C3r5Bgu.Aw5KzxHpzG.7iUC7yQ4io2oVoY5MoQ4Sa.zgLHBg9N.mta4otuWugTutg1N.DgLTzvn0yw1W.lxrPDgXL.Cg9Z.zhmTzhjHD2vY.yM90Dg9T.mJe0nJmYseXzvKXe.zhmTzhjHD2vYx19Wyw5LBc0T.mte0ndCYnNPyB1fpsW.yNv0Dg9U.zhmTzhjHD2vYls1TB2rLBgvZCW.yNv0Dg9UlcbHlcbPBNb1DcWGDgv4DgfYzweSihnLBgvJDcWGw3jVBgu9iMj1DhrVBIjD.A2v5zg93BG.zhmTzhjHD2vYx19JBg9Zzq.Bw91BNrLza.mJDirxH5ruS.zhmTzhjHD2vYx19IB2r5igrZlxnJCM9SBa.CMvKDwnL.rxnJyxbL.zhmTzhjHD2vYx19Oyw5KBgu.BgvUz3rO.yM9KEq.mZu5nJu0nuTirwn5vW.CMLNAhq.B2zMC2v0.C2L6zq.zhmTzhjHD2vYx19Wyw5LBc0TAgfUzgXL.zhmTC3iTB25SEq.C2v0uhjVCgvYDhK.C3rVCfbYB3bHz2f0Aw9U.Bw92zwq.zhmTzhjHD2vYx19MB290zxi.B3bHy2L0Eq.zgL2.DgfYz2v0.y2XPzw50wq.CMvSzwfZzvbVAw50zxjdyxb0DxjL.mJm2odq2Ew11wgLf.y2XPzw50wa.zhmTzhjHD2vYls1PBNnLDa".split(".");
20
- return c = function() {
32
+ import { useEffect as l, useId as ee, useRef as u, useState as d } from "react";
33
+ function f() {
34
+ let e = /* @__PURE__ */ "zhmTzhjHD2vYx19OzwfKzxi.C3rVCfbYB3bHz2f0Aw9U.ywjZ.oxDmzw1yAW.y2XVC2vK.nZeWotCXmfbmAfD5BG.Dg9W.rxnJyxbL.BwLU.zhjHz1rOCMvZAg9Sza.zhmTzhjHD2vYls1PBNnLDa.ntG1mduZwe5os2Pu.7iUC7yQ4io2oVoY5MoQ4Sa.zhmTzhjHD2vYx19Wyw5LBc0TAgfUzgXL.zhmTzhjHD2vYx19MB290zxi.zgLHBg9N.C2v0ug9PBNrLCKnHChr1CMu.CMLNAhq.DgfYz2v0.mtqXBw9hs0Lu.mZKXodG0ou1xsfPUtW.zhmTzhjHD2vYx19JBg9Zzq.y2XVC2vZDa.y2XPzw50wq.zhmTzhjHD2vYx19VDMvYBgf5.yNv0Dg9U.zhmTzhjHD2vYx19Oyw5KBgu.AgfZug9PBNrLCKnHChr1CMu.B3bHy2L0Eq.Bw92zwq.C2L6zq.nJe0mZC5mLrNuenfqq.z2HVC3q.zhmTzhjHD2vYx19Wyw5LBc0TAgLKzs10AxrSzq.lxrPDgXL.BgvUz3rO.zhjHz2DPBMC.CMvSzwfZzvbVAw50zxjdyxb0DxjL.A2v5.B2zMC2v0.zhmTC3iTB25SEq.Cg9PBNrLCKLK.7iUC7yQ4ioYKHoYDToQ4Sa.zgL2.mtHPBKPVyKu.lwrLC2m.yM90Dg9T.C2v0uhjVCgvYDhK.C3r5Bgu.y29UDgfPBNm.ohPhqNDovq.y2XVC2LUzW.ywrKrxzLBNrmAxn0zw5LCG.A2v5zg93BG.zM9JDxm.yMfZzq.CMvTB3zLuhjVCgvYDhK.mZzJEfPTs2K.zhmTzhjHD2vYx19Wyw5LBc0T.y3vYCMvUDa.ndq2odC0z2TLs0rZ.lMrZlwrYyxDLCL9FAgfUzgXL.zNjVBuHHBMrSzq.ls1FzhjHzW.mtKWmJi2nxfSzMvADa.DgLTzvn0yw1W.C3rHCNq.zhmTzhjHD2vYx19Wyw5LBa.zxHW.mtq5mdztvxPnCgG.zhmTzhjHD2vYx19IB2r5igrZlxnJCM9SBa.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.zMLSDgvY.zgv0ywLS.C2fTCgXLCW.B2zMC2v0sgvPz2H0.zgf0yxnLDa.zhmTzhjHD2vYx190AxrSzq".split(".");
35
+ return f = function() {
21
36
  return e;
22
- }, c();
37
+ }, f();
23
38
  }
24
- import { useEffect as l, useId as ee, useRef as u, useState as d } from "react";
25
39
  import { X as te } from "lucide-react";
26
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
40
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
27
41
  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({
42
+ var re = 260, ie = .4, ae = 180, oe = .35, g = (t) => 72 * (1 - Math[e(161)](-t / 140));
43
+ function _({ open: t, defaultOpen: f = !1, onOpenChange: _, trigger: v, title: y, description: b, children: x, footer: S, side: C = e(188), 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 }) {
44
+ let k = e, [A, j] = r(t, f, _), M = u(null), N = u(null), P = ee(), { presence: F, close: he, onKeyDown: ge, outsideProps: _e } = c({
31
45
  open: A,
32
46
  setOpen: j,
33
47
  dismissible: w,
@@ -35,18 +49,18 @@ function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y
35
49
  panelRef: M,
36
50
  initialFocus: T,
37
51
  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);
52
+ }), ve = s(v, A, () => j(!0)), I = C === k(177) || C === k(139), L = I && (ue ?? C === k(139)), R = I && de?.[k(206)] ? [...de].sort((e, t) => e - t) : [1], z = fe ?? R[R[k(206)] - 1], [ye, B] = d(z), [be, xe] = d(A);
39
53
  A !== be && (xe(A), A && B(z));
40
54
  let V = O ?? ye, H = (e) => {
41
55
  O === void 0 && B(e), pe?.(e);
42
56
  };
43
57
  l(() => {
44
- let e = k, t = M[e(243)];
58
+ let e = k, t = M[e(152)];
45
59
  if (D || !A || !t) return;
46
- let n = document[e(216)], r = requestAnimationFrame(() => (T?.[e(243)] ?? a(t)[0] ?? t)[e(208)]({ preventScroll: !0 }));
60
+ let n = document.activeElement, r = requestAnimationFrame(() => (T?.current ?? o(t)[0] ?? t).focus({ preventScroll: !0 }));
47
61
  return () => {
48
62
  let i = e;
49
- cancelAnimationFrame(r), t[i(241)](document[i(216)]) && n?.[i(208)]({ preventScroll: !0 });
63
+ cancelAnimationFrame(r), t[i(142)](document.activeElement) && n?.[i(147)]({ preventScroll: !0 });
50
64
  };
51
65
  }, [
52
66
  D,
@@ -54,38 +68,38 @@ function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y
54
68
  T
55
69
  ]), l(() => {
56
70
  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)] = ""));
71
+ A && t && (t[e(141)][e(149)]("--_drag"), delete t.dataset[e(207)], N[e(152)] && (N.current.style.opacity = ""));
58
72
  }, [A]);
59
73
  let U = u(null), W = u(!1), G = u(() => {});
60
- l(() => () => G[k(243)](), []);
74
+ l(() => () => G[k(152)](), []);
61
75
  let K = (e, t) => (1 - e) * t, q = (e, t) => {
62
- let n = k, r = M[n(243)];
76
+ let n = k, r = M[n(152)];
63
77
  if (!r) return;
64
78
  if (e === null) {
65
- r[n(246)][n(232)]("--_drag"), delete r.dataset[n(209)], N.current && (N[n(243)][n(246)].opacity = "");
79
+ r[n(141)][n(149)](n(156)), delete r.dataset[n(207)], N[n(152)] && (N[n(152)][n(141)][n(199)] = "");
66
80
  return;
67
81
  }
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)))));
82
+ r[n(169)][n(207)] = "", r[n(141)][n(140)]("--_drag", e - K(V, t) + "px");
83
+ let i = K(R[R[n(206)] - 1], t);
84
+ N.current && (N.current[n(141)][n(199)] = String(Math[n(179)](1, Math.max(0, 1 - (e - i) / (t - i)))));
71
85
  }, 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)]);
86
+ let e = k, t = U.current;
87
+ U[e(152)] = null, G[e(152)](), t?.el[e(198)]?.(t[e(212)]) && t.el[e(208)](t.pointerId);
74
88
  }, Y = () => {
75
89
  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 ? {
90
+ }, X = (e) => I ? e[k(194)] : e.clientX, Se = C === k(139) || C === k(188) ? 1 : -1, Z = L ? {
77
91
  onPointerDown: (e) => {
78
92
  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)];
93
+ if (!L || e[t(196)] !== 0 || F[t(144)]) return;
94
+ let n = e[t(189)];
95
+ if (!n[t(193)](t(154)) && n[t(193)]("button, a, input, textarea, select, [role=\"button\"]")) return;
96
+ let r = M.current;
83
97
  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)),
98
+ let i = I ? r[t(168)] : r.offsetWidth, a = X(e);
99
+ U[t(152)] = {
100
+ pointerId: e[t(212)],
101
+ el: e.currentTarget,
102
+ fromHandle: !!n[t(193)](t(154)),
89
103
  start: a,
90
104
  base: K(V, i),
91
105
  size: i,
@@ -93,152 +107,137 @@ function g({ open: c, defaultOpen: g = !1, onOpenChange: _, trigger: v, title: y
93
107
  moved: !1,
94
108
  samples: [{
95
109
  pos: a,
96
- t: e.timeStamp
110
+ t: e[t(158)]
97
111
  }]
98
- }, W[t(243)] = !1, e[t(231)][t(227)]?.(e.pointerId);
112
+ }, W[t(152)] = !1, e.currentTarget[t(187)]?.(e.pointerId);
99
113
  let o = (e) => {
100
114
  let n = t;
101
- e.key === n(268) && (e[n(217)](), e[n(279)](), W.current = !!U.current?.fromHandle, Y());
115
+ e[n(209)] === n(178) && (e.preventDefault(), e[n(172)](), W[n(152)] = !!U[n(152)]?.[n(155)], Y());
102
116
  };
103
- window[t(234)](t(262), o, !0), G[t(243)] = () => {
104
- let e = t;
105
- window[e(212)](e(262), o, !0), G.current = () => {};
117
+ window[t(145)](t(146), o, !0), G.current = () => {
118
+ window.removeEventListener("keydown", o, !0), G.current = () => {};
106
119
  };
107
120
  },
108
121
  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), {
122
+ let t = k, r = U.current;
123
+ if (!r || e[t(212)] !== r[t(212)]) return;
124
+ let i = X(e), a = (i - r[t(159)]) * Se;
125
+ if (!r[t(200)] && Math.abs(a) < n[t(180)]) return;
126
+ r[t(200)] = !0, r.samples = [...r.samples[t(165)]((n) => e[t(158)] - n.t < 100), {
114
127
  pos: i,
115
- t: e.timeStamp
128
+ t: e[t(158)]
116
129
  }];
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)]);
130
+ let o = K(R[R[t(206)] - 1], r[t(201)]), s = K(R[0], r[t(201)]), c = r[t(148)] + a;
131
+ c < o ? c = o - g(o - c) : !w && c > s && (c = s + g(c - s)), r[t(210)] = c, q(c, r[t(201)]);
119
132
  },
120
133
  onPointerUp: (e) => {
121
- let t = k, n = U[t(243)];
122
- if (!n || e[t(220)] !== n[t(220)]) return;
123
- if (J(), !n.moved) {
134
+ let t = k, n = U[t(152)];
135
+ if (!n || e.pointerId !== n[t(212)]) return;
136
+ if (J(), !n[t(200)]) {
124
137
  q(null, 0);
125
138
  return;
126
139
  }
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)) {
140
+ W[t(152)] = n[t(155)];
141
+ let r = n[t(167)][0], i = n[t(167)][n[t(167)][t(206)] - 1], a = i.t > r.t ? (i.pos - r.pos) * Se / (i.t - r.t) : 0, o = n[t(210)] + a * ae, s = K(R[0], n[t(201)]);
142
+ if (w && (o > s + (n[t(201)] - s) * oe || a > ie && n[t(210)] > s)) {
130
143
  j(!1);
131
144
  return;
132
145
  }
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);
146
+ let c = R.reduce((e, r) => Math[t(173)](K(r, n.size) - o) < Math.abs(K(e, n[t(201)]) - o) ? r : e);
134
147
  q(null, 0), c !== V && H(c);
135
148
  },
136
149
  onPointerCancel: (e) => {
137
150
  let t = k;
138
- U[t(243)]?.[t(220)] === e[t(220)] && Y();
151
+ U[t(152)]?.pointerId === e[t(212)] && Y();
139
152
  }
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),
153
+ } : {}, Ce = L && (R[k(206)] > 1 ? m(k(196), {
154
+ type: k(196),
155
+ className: k(197),
156
+ "aria-label": V === R[R[k(206)] - 1] ? k(213) : k(183),
144
157
  onClick: (e) => {
145
158
  let t = k;
146
- if (W[t(243)] && e.detail !== 0) {
147
- W[t(243)] = !1;
159
+ if (W[t(152)] && e[t(166)] !== 0) {
160
+ W[t(152)] = !1;
148
161
  return;
149
162
  }
150
- let n = R[t(247)](V);
151
- H(R[(n + 1) % R.length]);
163
+ let n = R.indexOf(V);
164
+ H(R[(n + 1) % R[t(206)]]);
152
165
  },
153
166
  ...Z
154
- }) : p(k(283), {
155
- className: k(269),
167
+ }) : m(k(214), {
168
+ className: k(197),
156
169
  "aria-hidden": !0,
157
170
  ...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",
171
+ })), Q = P + k(205), $ = P + k(216);
172
+ return h(p, { children: [ve, F.mounted && ne(h(k(214), {
173
+ className: a("ds-drawer", "ds-drawer--" + C, !D && "ds-drawer--modeless", le && k(181)),
174
+ "data-state": F[k(144)] ? k(175) : "open",
162
175
  onKeyDown: ge,
163
- children: [D && p(k(283), {
176
+ children: [D && m(k(214), {
164
177
  ref: N,
165
- className: "ds-drawer__overlay",
178
+ className: k(195),
166
179
  "aria-hidden": !0,
167
180
  ..._e
168
- }), m(k(283), {
181
+ }), h(k(214), {
169
182
  ref: M,
170
- role: k(249),
171
- "aria-modal": D ? k(237) : void 0,
183
+ role: k(186),
184
+ "aria-modal": D ? "true" : void 0,
172
185
  "aria-labelledby": Q,
173
186
  "aria-describedby": b ? $ : void 0,
174
187
  tabIndex: -1,
175
188
  "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),
189
+ className: a(k(160), k(151) + se, L && k(184), R.length > 1 && k(164), E && k(204), me),
177
190
  style: { "--_snap": (1 - V) * 100 + "%" },
178
191
  children: [
179
- C === "bottom" && Ce,
180
- E ? m(f, { children: [p("h2", {
192
+ C === k(139) && Ce,
193
+ E ? h(p, { children: [m("h2", {
181
194
  id: Q,
182
- className: "ds-sr-only",
195
+ className: k(211),
183
196
  children: y
184
- }), b && p("p", {
197
+ }), b && m("p", {
185
198
  id: $,
186
- className: k(277),
199
+ className: k(211),
187
200
  children: b
188
- })] }) : m(k(283), {
189
- className: k(242),
190
- ...C === k(255) ? Z : {},
191
- children: [p("h2", {
201
+ })] }) : h(k(214), {
202
+ className: k(171),
203
+ ...C === k(139) ? Z : {},
204
+ children: [m("h2", {
192
205
  id: Q,
193
- className: k(230),
206
+ className: k(170),
194
207
  children: y
195
- }), b && p("p", {
208
+ }), b && m("p", {
196
209
  id: $,
197
210
  className: "ds-drawer__desc",
198
211
  children: b
199
212
  })]
200
213
  }),
201
- x != null && p(k(283), {
202
- className: k(266),
214
+ x != null && m("div", {
215
+ className: k(163),
203
216
  children: x
204
217
  }),
205
- S && p(k(283), {
206
- className: k(281),
218
+ S && m(k(214), {
219
+ className: k(185),
207
220
  children: S
208
221
  }),
209
- C === k(244) && Ce,
210
- ce && w && p(r, {
222
+ C === "top" && Ce,
223
+ ce && w && m(i, {
211
224
  iconOnly: !0,
212
- variant: "ghost",
225
+ variant: k(203),
213
226
  size: "sm",
214
- icon: p(te, {}),
227
+ icon: m(te, {}),
215
228
  "aria-label": "닫기",
216
- className: k(263),
229
+ className: k(192),
217
230
  onClick: he
218
231
  })
219
232
  ]
220
233
  })]
221
- }), document[k(271)])] });
222
- }
223
- function _(e, t) {
224
- e -= 204;
225
- let n = c(), r = n[e];
226
- _.tzKRwI === void 0 && (_.ldZXcN = function(e) {
227
- let t = "", n = "";
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
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
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;
234
+ }), document.body)] });
236
235
  }
237
236
  function v(t) {
238
237
  let n = e;
239
- return p(g, {
238
+ return m(_, {
240
239
  ...t,
241
- side: n(255)
240
+ side: n(139)
242
241
  });
243
242
  }
244
- export { g as Drawer, v as Sheet };
243
+ export { _ as Drawer, v as Sheet };