@iamfiro/design 0.3.2 → 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 (163) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/app-shell/AGENTS.md +99 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/lib/components/Accordion/Accordion2.js +74 -74
  6. package/lib/components/ActionBar/ActionBar2.js +44 -42
  7. package/lib/components/Alert/Alert2.js +67 -67
  8. package/lib/components/AppShell/AppShell2.js +72 -66
  9. package/lib/components/AreaChart/AreaChart.js +45 -45
  10. package/lib/components/BarChart/BarChart2.js +128 -128
  11. package/lib/components/BarList/BarList2.js +105 -105
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
  13. package/lib/components/Calendar/Calendar2.js +197 -197
  14. package/lib/components/Calendar/DatePicker2.js +100 -100
  15. package/lib/components/Calendar/date.js +47 -70
  16. package/lib/components/Card/Card2.js +101 -74
  17. package/lib/components/CardFrame/CardFrame2.js +52 -56
  18. package/lib/components/Chart/ChartParts.js +88 -88
  19. package/lib/components/Chart/chart2.js +63 -63
  20. package/lib/components/Chart/useChartInteraction.js +43 -43
  21. package/lib/components/ChatBubble/ChatBubble2.js +111 -111
  22. package/lib/components/ChatBubble/formatChatTime.js +38 -43
  23. package/lib/components/ChatComposer/ChatComposer2.js +96 -96
  24. package/lib/components/CodeBlock/CodeBlock2.js +65 -65
  25. package/lib/components/CodeBlock/highlight.js +84 -84
  26. package/lib/components/ColorPicker/ColorPicker2.js +263 -263
  27. package/lib/components/ColorPicker/color.js +92 -92
  28. package/lib/components/ColorPicker/presets.js +35 -39
  29. package/lib/components/Combobox/Combobox2.js +134 -134
  30. package/lib/components/CommandMenu/CommandMenu.js +130 -131
  31. package/lib/components/Comment/Comment2.js +64 -63
  32. package/lib/components/ContextMenu/ContextMenu2.js +84 -84
  33. package/lib/components/DataGrid/DataGrid2.js +1182 -1180
  34. package/lib/components/DataGrid/GridPopover.js +84 -84
  35. package/lib/components/DataGrid/anchor.js +29 -28
  36. package/lib/components/DataGrid/model.js +308 -307
  37. package/lib/components/DataGrid/panels.js +398 -399
  38. package/lib/components/DataGrid/typeMeta.js +41 -40
  39. package/lib/components/DataGrid/types.js +39 -40
  40. package/lib/components/DescriptionList/DescriptionList2.js +105 -105
  41. package/lib/components/Dialog/AlertDialog.js +90 -89
  42. package/lib/components/Dialog/Dialog2.js +71 -72
  43. package/lib/components/Dialog/modal.js +62 -60
  44. package/lib/components/Drawer/Drawer2.js +167 -166
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
  46. package/lib/components/DropdownMenu/menuCore.js +29 -28
  47. package/lib/components/Dropzone/Dropzone2.js +78 -77
  48. package/lib/components/EmptyState/EmptyState2.js +57 -57
  49. package/lib/components/FileChip/FileChip2.js +53 -77
  50. package/lib/components/FileUpload/FileUpload.js +168 -167
  51. package/lib/components/FilterChips/FilterChips2.js +60 -60
  52. package/lib/components/FunnelChart/FunnelChart2.js +174 -174
  53. package/lib/components/FunnelChart/funnel.js +44 -42
  54. package/lib/components/Highlight/Highlight2.js +55 -55
  55. package/lib/components/HoverCard/HoverCard.js +71 -96
  56. package/lib/components/InlineDiff/InlineDiff2.js +128 -129
  57. package/lib/components/InlineDiff/diff.js +79 -79
  58. package/lib/components/InlineDiff/useDiffReview.js +61 -62
  59. package/lib/components/Kanban/Kanban2.js +387 -389
  60. package/lib/components/Kanban/KanbanCard.js +84 -84
  61. package/lib/components/Kanban/move.js +32 -25
  62. package/lib/components/LineChart/LineChart2.js +228 -228
  63. package/lib/components/List/List2.js +62 -62
  64. package/lib/components/Listbox/Listbox2.js +92 -92
  65. package/lib/components/Marker/Marker2.js +50 -56
  66. package/lib/components/Menubar/Menubar2.js +117 -116
  67. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
  69. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  70. package/lib/components/NumberStepper/NumberStepper2.js +60 -60
  71. package/lib/components/OtpInput/OtpInput2.js +90 -89
  72. package/lib/components/Pagination/Pagination2.js +105 -105
  73. package/lib/components/Pagination/paginationRange.js +37 -37
  74. package/lib/components/PhoneInput/PhoneInput.js +75 -76
  75. package/lib/components/PieChart/PieChart2.js +166 -166
  76. package/lib/components/PieChart/arc.js +71 -69
  77. package/lib/components/PieChart/useArcTween.js +60 -62
  78. package/lib/components/Popover/Popover2.js +85 -86
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
  80. package/lib/components/Rating/Rating2.js +90 -89
  81. package/lib/components/Resizable/Resizable2.js +128 -129
  82. package/lib/components/Resizable/layout.js +51 -51
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
  84. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  85. package/lib/components/ScatterChart/scatter.js +49 -52
  86. package/lib/components/ScrollArea/ScrollArea2.js +115 -117
  87. package/lib/components/Select/Select2.js +82 -82
  88. package/lib/components/Sidebar/Sidebar2.js +91 -85
  89. package/lib/components/Sidebar/rail.js +43 -0
  90. package/lib/components/Skeleton/Skeleton2.js +63 -64
  91. package/lib/components/Slider/Slider2.js +65 -66
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
  93. package/lib/components/SparkChart/SparkChart2.js +126 -127
  94. package/lib/components/SparkChart/spark.js +66 -42
  95. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  96. package/lib/components/SplitView/SplitView2.js +51 -51
  97. package/lib/components/Stat/Stat2.js +79 -79
  98. package/lib/components/StepList/StepList2.js +75 -75
  99. package/lib/components/Table/Table2.js +71 -71
  100. package/lib/components/Tabs/Tabs2.js +74 -74
  101. package/lib/components/TagInput/TagInput2.js +223 -221
  102. package/lib/components/TimePicker/TimePicker2.js +197 -195
  103. package/lib/components/TimePicker/time.js +59 -56
  104. package/lib/components/Timeline/Timeline2.js +195 -195
  105. package/lib/components/Timeline/scale.js +64 -66
  106. package/lib/components/Toast/Toaster.js +139 -139
  107. package/lib/components/Toast/store.js +72 -76
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  109. package/lib/components/Toolbar/Toolbar2.js +165 -164
  110. package/lib/components/Tracker/Tracker2.js +72 -72
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
  112. package/lib/components/TreeView/TreeView2.js +152 -151
  113. package/lib/hooks/timing.js +34 -36
  114. package/lib/hooks/useControllableState.js +29 -30
  115. package/lib/hooks/useCountdown.js +51 -53
  116. package/lib/hooks/useDigitInput.js +81 -55
  117. package/lib/hooks/useDismiss.js +53 -56
  118. package/lib/hooks/useElapsed.js +48 -49
  119. package/lib/hooks/useFloating.js +36 -36
  120. package/lib/hooks/useFocusTrap.js +32 -32
  121. package/lib/hooks/usePresence.js +49 -49
  122. package/lib/hooks/usePressToOpen.js +40 -40
  123. package/lib/hooks/useScrollLock.js +50 -49
  124. package/lib/hooks/useSelection.js +42 -47
  125. package/lib/index.js +138 -139
  126. package/lib/primitives/AspectRatio2.js +58 -57
  127. package/lib/primitives/BrandIcon.js +210 -179
  128. package/lib/primitives/ColorDot2.js +42 -41
  129. package/lib/primitives/CopyButton2.js +59 -58
  130. package/lib/primitives/CountBadge2.js +58 -63
  131. package/lib/primitives/Countdown2.js +38 -37
  132. package/lib/primitives/Delta2.js +37 -37
  133. package/lib/primitives/Elapsed.js +42 -40
  134. package/lib/primitives/FileIcon2.js +102 -102
  135. package/lib/primitives/Flag2.js +124 -124
  136. package/lib/primitives/IconStack2.js +45 -23
  137. package/lib/primitives/IconTile2.js +45 -41
  138. package/lib/primitives/Kbd2.js +48 -48
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +40 -42
  141. package/lib/primitives/MaskedText2.js +50 -50
  142. package/lib/primitives/Progress2.js +78 -77
  143. package/lib/primitives/RelativeTime.js +55 -58
  144. package/lib/primitives/SearchInput2.js +72 -68
  145. package/lib/primitives/SelectorButton2.js +60 -61
  146. package/lib/primitives/Spinner2.js +48 -49
  147. package/lib/primitives/StatusIcon2.js +69 -69
  148. package/lib/primitives/Swatch2.js +65 -69
  149. package/lib/primitives/Tooltip2.js +92 -92
  150. package/lib/primitives/Typography2.js +37 -37
  151. package/lib/primitives/formatCountdown.js +38 -38
  152. package/lib/primitives/formatElapsed.js +43 -45
  153. package/lib/primitives/formatRelativeTime.js +54 -54
  154. package/lib/primitives/hotkey.js +77 -77
  155. package/lib/primitives/index.js +162 -161
  156. package/lib/primitives/maskValue.js +54 -51
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  159. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  160. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  161. package/lib/types/components/index.d.ts +1 -0
  162. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  163. package/package.json +1 -1
@@ -1,243 +1,244 @@
1
1
  "use client";
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();
2
+ const e = l;
3
+ (function(e, t) {
4
+ let n = l, r = e();
19
5
  for (;;) try {
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());
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
+ r.push(r.shift());
22
8
  } catch {
23
- i.push(i.shift());
9
+ r.push(r.shift());
24
10
  }
25
- })(f, 897166);
26
- import { TIMING as n } from "../../hooks/timing.js";
27
- import { useControllableState as r } from "../../hooks/useControllableState.js";
11
+ })(r, 606128);
12
+ import { TIMING as t } from "../../hooks/timing.js";
13
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
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() {
17
+ return e;
18
+ }, r();
19
+ }
28
20
  import { Button as i, cx as a } from "../../primitives/index.js";
29
21
  import { focusableIn as o } from "../../hooks/useFocusTrap.js";
30
22
  import { modalTrigger as s, useModalLayer as c } from "../Dialog/modal.js";
31
23
  /* empty css */
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() {
36
- return e;
37
- }, f();
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;
38
37
  }
39
- import { X as te } from "lucide-react";
40
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
41
- import { createPortal as ne } from "react-dom";
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({
45
- open: A,
46
- setOpen: j,
47
- dismissible: w,
48
- exitMs: re,
49
- panelRef: M,
50
- initialFocus: T,
51
- modal: D
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);
53
- A !== be && (xe(A), A && B(z));
54
- let V = O ?? ye, H = (e) => {
55
- O === void 0 && B(e), pe?.(e);
38
+ import { useEffect as u, useId as ee, useRef as d, useState as te } from "react";
39
+ import { X as ne } from "lucide-react";
40
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
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);
56
56
  };
57
- l(() => {
58
- let e = k, t = M[e(152)];
59
- if (D || !A || !t) return;
60
- let n = document.activeElement, r = requestAnimationFrame(() => (T?.current ?? o(t)[0] ?? t).focus({ 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 }));
61
61
  return () => {
62
62
  let i = e;
63
- cancelAnimationFrame(r), t[i(142)](document.activeElement) && n?.[i(147)]({ preventScroll: !0 });
63
+ cancelAnimationFrame(r), t[i(391)](document[i(462)]) && n?.focus({ preventScroll: !0 });
64
64
  };
65
65
  }, [
66
- D,
67
- A,
68
- T
69
- ]), l(() => {
70
- let e = k, t = M.current;
71
- A && t && (t[e(141)][e(149)]("--_drag"), delete t.dataset[e(207)], N[e(152)] && (N.current.style.opacity = ""));
72
- }, [A]);
73
- let U = u(null), W = u(!1), G = u(() => {});
74
- l(() => () => G[k(152)](), []);
75
- let K = (e, t) => (1 - e) * t, q = (e, t) => {
76
- let n = k, r = M[n(152)];
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)];
77
77
  if (!r) return;
78
78
  if (e === null) {
79
- r[n(141)][n(149)](n(156)), delete r.dataset[n(207)], N[n(152)] && (N[n(152)][n(141)][n(199)] = "");
79
+ r[n(457)][n(452)](n(397)), delete r[n(419)][n(416)], M.current && (M[n(431)].style[n(412)] = "");
80
80
  return;
81
81
  }
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)))));
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);
85
88
  }, J = () => {
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);
88
- }, Y = () => {
89
- J(), q(null, 0);
90
- }, X = (e) => I ? e[k(194)] : e.clientX, Se = C === k(139) || C === k(188) ? 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 ? {
91
91
  onPointerDown: (e) => {
92
- let t = k;
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;
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)];
97
97
  if (!r) return;
98
- let i = I ? r[t(168)] : r.offsetWidth, a = X(e);
99
- U[t(152)] = {
100
- pointerId: e[t(212)],
98
+ let i = F ? r.offsetHeight : r.offsetWidth, a = Y(e);
99
+ H.current = {
100
+ pointerId: e[t(433)],
101
101
  el: e.currentTarget,
102
- fromHandle: !!n[t(193)](t(154)),
102
+ fromHandle: !!n.closest(".ds-drawer__handle"),
103
103
  start: a,
104
- base: K(V, i),
104
+ base: G(B, i),
105
105
  size: i,
106
- offset: K(V, i),
106
+ offset: G(B, i),
107
107
  moved: !1,
108
108
  samples: [{
109
109
  pos: a,
110
- t: e[t(158)]
110
+ t: e[t(392)]
111
111
  }]
112
- }, W[t(152)] = !1, e.currentTarget[t(187)]?.(e.pointerId);
112
+ }, U[t(431)] = !1, e[t(405)][t(463)]?.(e.pointerId);
113
113
  let o = (e) => {
114
114
  let n = t;
115
- e[n(209)] === n(178) && (e.preventDefault(), e[n(172)](), W[n(152)] = !!U[n(152)]?.[n(155)], Y());
115
+ e[n(403)] === n(421) && (e.preventDefault(), e[n(398)](), U[n(431)] = !!H[n(431)]?.fromHandle, J());
116
116
  };
117
- window[t(145)](t(146), o, !0), G.current = () => {
118
- window.removeEventListener("keydown", o, !0), G.current = () => {};
117
+ window[t(411)](t(429), o, !0), W[t(431)] = () => {
118
+ let e = t;
119
+ window.removeEventListener(e(429), o, !0), W[e(431)] = () => {};
119
120
  };
120
121
  },
121
122
  onPointerMove: (e) => {
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), {
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), {
127
128
  pos: i,
128
- t: e[t(158)]
129
+ t: e[n(392)]
129
130
  }];
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)]);
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)]);
132
133
  },
133
134
  onPointerUp: (e) => {
134
- let t = k, n = U[t(152)];
135
- if (!n || e.pointerId !== n[t(212)]) return;
136
- if (J(), !n[t(200)]) {
137
- 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);
138
139
  return;
139
140
  }
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)) {
143
- 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);
144
145
  return;
145
146
  }
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);
147
- 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);
148
149
  },
149
150
  onPointerCancel: (e) => {
150
- let t = k;
151
- U[t(152)]?.pointerId === e[t(212)] && Y();
151
+ let t = O;
152
+ H[t(431)]?.pointerId === e[t(433)] && J();
152
153
  }
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),
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),
157
158
  onClick: (e) => {
158
- let t = k;
159
- if (W[t(152)] && e[t(166)] !== 0) {
160
- W[t(152)] = !1;
159
+ let t = O;
160
+ if (U[t(431)] && e[t(442)] !== 0) {
161
+ U[t(431)] = !1;
161
162
  return;
162
163
  }
163
- let n = R.indexOf(V);
164
- H(R[(n + 1) % R[t(206)]]);
164
+ let n = L[t(425)](B);
165
+ V(L[(n + 1) % L[t(449)]]);
165
166
  },
166
167
  ...Z
167
- }) : m(k(214), {
168
- className: k(197),
168
+ }) : p(O(458), {
169
+ className: O(432),
169
170
  "aria-hidden": !0,
170
171
  ...Z
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",
175
- onKeyDown: ge,
176
- children: [D && m(k(214), {
177
- ref: N,
178
- className: k(195),
179
- "aria-hidden": !0,
180
- ..._e
181
- }), h(k(214), {
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), {
182
178
  ref: M,
183
- role: k(186),
184
- "aria-modal": D ? "true" : 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,
185
186
  "aria-labelledby": Q,
186
- "aria-describedby": b ? $ : void 0,
187
+ "aria-describedby": y ? $ : void 0,
187
188
  tabIndex: -1,
188
- "data-side": C,
189
- className: a(k(160), k(151) + se, L && k(184), R.length > 1 && k(164), E && k(204), me),
190
- 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 + "%" },
191
192
  children: [
192
- C === k(139) && Ce,
193
- E ? h(p, { children: [m("h2", {
193
+ S === O(459) && Ce,
194
+ T ? m(f, { children: [p("h2", {
194
195
  id: Q,
195
- className: k(211),
196
- children: y
197
- }), b && m("p", {
196
+ className: O(420),
197
+ children: v
198
+ }), y && p("p", {
198
199
  id: $,
199
- className: k(211),
200
- children: b
201
- })] }) : h(k(214), {
202
- className: k(171),
203
- ...C === k(139) ? Z : {},
204
- children: [m("h2", {
200
+ className: O(420),
201
+ children: y
202
+ })] }) : m(O(458), {
203
+ className: O(390),
204
+ ...S === O(459) ? Z : {},
205
+ children: [p("h2", {
205
206
  id: Q,
206
- className: k(170),
207
- children: y
208
- }), b && m("p", {
207
+ className: O(434),
208
+ children: v
209
+ }), y && p("p", {
209
210
  id: $,
210
211
  className: "ds-drawer__desc",
211
- children: b
212
+ children: y
212
213
  })]
213
214
  }),
214
- x != null && m("div", {
215
- className: k(163),
216
- children: x
215
+ b != null && p("div", {
216
+ className: O(439),
217
+ children: b
217
218
  }),
218
- S && m(k(214), {
219
- className: k(185),
220
- children: S
219
+ x && p(O(458), {
220
+ className: O(406),
221
+ children: x
221
222
  }),
222
- C === "top" && Ce,
223
- ce && w && m(i, {
223
+ S === O(389) && Ce,
224
+ le && C && p(i, {
224
225
  iconOnly: !0,
225
- variant: k(203),
226
+ variant: O(448),
226
227
  size: "sm",
227
- icon: m(te, {}),
228
+ icon: p(ne, {}),
228
229
  "aria-label": "닫기",
229
- className: k(192),
230
- onClick: he
230
+ className: O(396),
231
+ onClick: ge
231
232
  })
232
233
  ]
233
234
  })]
234
235
  }), document.body)] });
235
236
  }
236
- function v(t) {
237
+ function _(t) {
237
238
  let n = e;
238
- return m(_, {
239
+ return p(g, {
239
240
  ...t,
240
- side: n(139)
241
+ side: n(459)
241
242
  });
242
243
  }
243
- export { _ as Drawer, v as Sheet };
244
+ export { g as Drawer, _ as Sheet };