@iamfiro/design 0.3.2 → 0.3.4

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/INDEX.md +1 -1
  2. package/agents/brand-icon/AGENTS.md +1 -1
  3. package/agents/social-login-button/AGENTS.md +4 -3
  4. package/lib/components/Accordion/Accordion2.js +87 -87
  5. package/lib/components/ActionBar/ActionBar2.js +42 -44
  6. package/lib/components/Alert/Alert2.js +61 -61
  7. package/lib/components/AppShell/AppShell2.js +70 -71
  8. package/lib/components/AreaChart/AreaChart.js +38 -40
  9. package/lib/components/BarChart/BarChart2.js +126 -126
  10. package/lib/components/BarList/BarList2.js +95 -95
  11. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -66
  12. package/lib/components/Calendar/Calendar2.js +164 -164
  13. package/lib/components/Calendar/DatePicker2.js +103 -102
  14. package/lib/components/Calendar/date.js +64 -66
  15. package/lib/components/Card/Card2.js +67 -67
  16. package/lib/components/CardFrame/CardFrame2.js +43 -51
  17. package/lib/components/Chart/ChartParts.js +94 -94
  18. package/lib/components/Chart/chart2.js +52 -52
  19. package/lib/components/Chart/useChartInteraction.js +54 -54
  20. package/lib/components/ChatBubble/ChatBubble2.js +92 -92
  21. package/lib/components/ChatBubble/formatChatTime.js +35 -41
  22. package/lib/components/ChatComposer/ChatComposer2.js +63 -63
  23. package/lib/components/CodeBlock/CodeBlock2.js +61 -61
  24. package/lib/components/CodeBlock/highlight.js +84 -84
  25. package/lib/components/ColorPicker/ColorPicker2.js +387 -386
  26. package/lib/components/ColorPicker/color.js +71 -71
  27. package/lib/components/ColorPicker/presets.js +41 -46
  28. package/lib/components/Combobox/Combobox2.js +117 -118
  29. package/lib/components/CommandMenu/CommandMenu.js +127 -127
  30. package/lib/components/Comment/Comment2.js +86 -60
  31. package/lib/components/ContextMenu/ContextMenu2.js +77 -75
  32. package/lib/components/DataGrid/DataGrid2.js +1192 -1190
  33. package/lib/components/DataGrid/GridPopover.js +94 -94
  34. package/lib/components/DataGrid/anchor.js +34 -31
  35. package/lib/components/DataGrid/model.js +284 -283
  36. package/lib/components/DataGrid/panels.js +398 -399
  37. package/lib/components/DataGrid/typeMeta.js +51 -50
  38. package/lib/components/DataGrid/types.js +38 -39
  39. package/lib/components/DescriptionList/DescriptionList2.js +103 -103
  40. package/lib/components/Dialog/AlertDialog.js +79 -78
  41. package/lib/components/Dialog/Dialog2.js +59 -59
  42. package/lib/components/Dialog/modal.js +44 -46
  43. package/lib/components/Drawer/Drawer2.js +130 -129
  44. package/lib/components/DropdownMenu/DropdownMenu2.js +235 -233
  45. package/lib/components/DropdownMenu/menuCore.js +69 -42
  46. package/lib/components/Dropzone/Dropzone2.js +79 -78
  47. package/lib/components/EmptyState/EmptyState2.js +34 -35
  48. package/lib/components/FileChip/FileChip2.js +73 -73
  49. package/lib/components/FileUpload/FileUpload.js +159 -159
  50. package/lib/components/FilterChips/FilterChips2.js +61 -61
  51. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  52. package/lib/components/FunnelChart/funnel.js +48 -44
  53. package/lib/components/Highlight/Highlight2.js +43 -43
  54. package/lib/components/HoverCard/HoverCard.js +59 -84
  55. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  56. package/lib/components/InlineDiff/diff.js +90 -90
  57. package/lib/components/InlineDiff/useDiffReview.js +64 -63
  58. package/lib/components/Kanban/Kanban2.js +386 -387
  59. package/lib/components/Kanban/KanbanCard.js +70 -95
  60. package/lib/components/Kanban/move.js +50 -46
  61. package/lib/components/LineChart/LineChart2.js +211 -211
  62. package/lib/components/List/List2.js +53 -54
  63. package/lib/components/Listbox/Listbox2.js +115 -115
  64. package/lib/components/Marker/Marker2.js +56 -61
  65. package/lib/components/Menubar/Menubar2.js +144 -141
  66. package/lib/components/MultiSelect/MultiSelect2.js +108 -108
  67. package/lib/components/NavigationMenu/NavigationMenu2.js +298 -299
  68. package/lib/components/NoticeStack/NoticeStack2.js +84 -84
  69. package/lib/components/NumberStepper/NumberStepper2.js +65 -66
  70. package/lib/components/OtpInput/OtpInput2.js +70 -69
  71. package/lib/components/Pagination/Pagination2.js +106 -106
  72. package/lib/components/Pagination/paginationRange.js +37 -39
  73. package/lib/components/PhoneInput/PhoneInput.js +87 -88
  74. package/lib/components/PieChart/PieChart2.js +160 -160
  75. package/lib/components/PieChart/arc.js +65 -62
  76. package/lib/components/PieChart/useArcTween.js +53 -60
  77. package/lib/components/Popover/Popover2.js +62 -62
  78. package/lib/components/ProgressTracker/ProgressTracker2.js +121 -121
  79. package/lib/components/Rating/Rating2.js +82 -81
  80. package/lib/components/Resizable/Resizable2.js +126 -127
  81. package/lib/components/Resizable/layout.js +73 -73
  82. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -67
  83. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  84. package/lib/components/ScatterChart/scatter.js +47 -49
  85. package/lib/components/ScrollArea/ScrollArea2.js +117 -118
  86. package/lib/components/Select/Select2.js +78 -79
  87. package/lib/components/Sidebar/Sidebar2.js +69 -69
  88. package/lib/components/Skeleton/Skeleton2.js +57 -57
  89. package/lib/components/Slider/Slider2.js +73 -74
  90. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -68
  91. package/lib/components/SparkChart/SparkChart2.js +145 -145
  92. package/lib/components/SparkChart/spark.js +64 -42
  93. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  94. package/lib/components/SplitView/SplitView2.js +51 -52
  95. package/lib/components/Stat/Stat2.js +90 -90
  96. package/lib/components/StepList/StepList2.js +70 -70
  97. package/lib/components/Table/Table2.js +70 -70
  98. package/lib/components/Tabs/Tabs2.js +81 -81
  99. package/lib/components/TagInput/TagInput2.js +220 -217
  100. package/lib/components/TimePicker/TimePicker2.js +187 -186
  101. package/lib/components/TimePicker/time.js +63 -62
  102. package/lib/components/Timeline/Timeline2.js +199 -199
  103. package/lib/components/Timeline/scale.js +67 -64
  104. package/lib/components/Toast/Toaster.js +100 -98
  105. package/lib/components/Toast/store.js +90 -94
  106. package/lib/components/ToggleGroup/ToggleGroup2.js +76 -76
  107. package/lib/components/Toolbar/Toolbar2.js +163 -161
  108. package/lib/components/Tracker/Tracker2.js +82 -82
  109. package/lib/components/TreeDiagram/TreeDiagram2.js +123 -124
  110. package/lib/components/TreeView/TreeView2.js +154 -152
  111. package/lib/hooks/timing.js +31 -30
  112. package/lib/hooks/useControllableState.js +37 -38
  113. package/lib/hooks/useCountdown.js +53 -56
  114. package/lib/hooks/useDigitInput.js +66 -41
  115. package/lib/hooks/useDismiss.js +55 -58
  116. package/lib/hooks/useElapsed.js +57 -55
  117. package/lib/hooks/useFloating.js +44 -44
  118. package/lib/hooks/useFocusTrap.js +70 -46
  119. package/lib/hooks/usePresence.js +23 -22
  120. package/lib/hooks/usePressToOpen.js +51 -51
  121. package/lib/hooks/useScrollLock.js +57 -58
  122. package/lib/hooks/useSelection.js +49 -52
  123. package/lib/index.js +65 -65
  124. package/lib/primitives/AspectRatio2.js +57 -57
  125. package/lib/primitives/BrandIcon.js +189 -158
  126. package/lib/primitives/ColorDot2.js +50 -45
  127. package/lib/primitives/CopyButton2.js +52 -50
  128. package/lib/primitives/CountBadge2.js +53 -55
  129. package/lib/primitives/Countdown2.js +28 -25
  130. package/lib/primitives/Delta2.js +41 -41
  131. package/lib/primitives/Elapsed.js +47 -47
  132. package/lib/primitives/FileIcon2.js +86 -86
  133. package/lib/primitives/Flag2.js +122 -122
  134. package/lib/primitives/IconStack2.js +55 -31
  135. package/lib/primitives/IconTile2.js +43 -43
  136. package/lib/primitives/Kbd2.js +55 -55
  137. package/lib/primitives/Layout2.js +78 -78
  138. package/lib/primitives/Link2.js +39 -36
  139. package/lib/primitives/MaskedText2.js +74 -52
  140. package/lib/primitives/Progress2.js +67 -66
  141. package/lib/primitives/RelativeTime.js +54 -61
  142. package/lib/primitives/SearchInput2.js +45 -45
  143. package/lib/primitives/SelectorButton2.js +72 -76
  144. package/lib/primitives/Spinner2.js +56 -56
  145. package/lib/primitives/StatusIcon2.js +63 -63
  146. package/lib/primitives/Swatch2.js +55 -61
  147. package/lib/primitives/Tooltip2.js +78 -78
  148. package/lib/primitives/Typography2.js +53 -53
  149. package/lib/primitives/formatCountdown.js +30 -29
  150. package/lib/primitives/formatElapsed.js +46 -49
  151. package/lib/primitives/formatRelativeTime.js +76 -50
  152. package/lib/primitives/hotkey.js +80 -80
  153. package/lib/primitives/index.js +169 -168
  154. package/lib/primitives/maskValue.js +55 -50
  155. package/lib/style.css +1 -1
  156. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  157. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  158. package/package.json +1 -1
@@ -1,281 +1,283 @@
1
1
  "use client";
2
- const e = n;
3
- function t() {
4
- let e = /* @__PURE__ */ "zhmTDg9VBgjHCL9FC3bHy2vY.C2L6zq.z2v0q2XPzw50uMvJDhm.mJGXndCXmdbZwLPfqMe.sg9Tzq.zgLZywjSzwq.AM9PBG.zMLUzeLUzgv4.mJq3odDZwKnJyMi.zMLSDgvY.y3vYCMvUDa.ywX0s2v5.C2v0.zhmTDg9VBgjHCL9FyNrU.DgfYz2v0.AxndB21WB3nPBMC.CgfKzgLUz1jPz2H0.AwnVBG.B2zM.Bwv0yuTLEq.CxvLCNLtzwXLy3rVCKfSBa.AgfZqxr0CMLIDxrL.Bwf0y2HLCW.y2XPy2S.CgfKzgLUz0XLzNq.zhmTDg9VBgjHCL9FBw9Yzq.mti2odC4y2H4z1rU.BM9Uzq.y29UDgfPBNm.zgLZy29UBMvJDa.mJzTuK5cDg4.Dg9VBgjHCG.qxjYB3DeB3DU.ChjLDMvUDerLzMf1Bhq.CMLNAhq.Dg9VBgjHCKLK.CMvKDwnL.qNv0Dg9U.C2vW.Aw5JBhvKzxm.zgf0ys10B29SyMfYlxnLCa.A2v5.y2HPBgrYzw4.AgLKzgvU.qxjYB3DsAwDODa.Dw5ZAgLMDa.u3bHy2vY.BgfIzwW.C2HVCNrJDxq.nte5mtK3nfHOAK9wtq.yNv0Dg9UlcbPBNb1DcWGC2vSzwn0lcb0zxH0yxjLysWGyvTOCMvMxsWGw2rHDgeTDg9VBgjHCI1PDgvTxq.CgfYzw50rwXLBwvUDa.z2HVC3q.B3zLCMzSB3C.qxjYB3Dmzwz0.Aw5WDxq6BM90kfT0ExbLpwj1DhrVBL0PoM5VDcHBDhLWzt1JAgvJA2jVEf0PoM5VDcHBDhLWzt1YywrPB10Plcb0zxH0yxjLysWGC2vSzwn0lcbBy29UDgvUDgvKAxrHyMXLpsj0CNvLiL0.D2LKDgG.Dw5YzwDPC3rLCG.nde2mdi3n2jADKrUyW.BwfW.B2jZzxj2zq.CxvLCNLtzwXLy3rVCG.zgL2.AgfZ.DgfIsw5KzxG.zhmTDg9VBgjHCI0T.x19TB3jL.BgvUz3rO.zhmTDg9VBgjHCG.DMvYDgLJywW.mta2nJu0odzurfLIwe8.C2vWyxjHDg9Y.BMf0AxzLrxzLBNq.B2zMC2v0sgvPz2H0.C3r5Bgu.ChjLC3nLza.Ag9YAxPVBNrHBa.zw50CNK.z2v0.zhmTDg9VBgjHCI0TDMvYDgLJywW.ndvuA0PovLu.zgf0yxnLDa.w2rHDgeTDg9VBgjHCI1Pzf0.C3bHBG.w3jVBgu9iNrVB2XIyxiIxq.mZC1nJKYq2fOz1bA.mJuWnfHjsLfSAG.CMvNAxn0zxi".split(".");
5
- return t = function() {
2
+ const e = D;
3
+ (function(e, t) {
4
+ let n = D, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(288)) / 1 + -parseInt(n(347)) / 2 + parseInt(n(312)) / 3 * (-parseInt(n(374)) / 4) + parseInt(n(367)) / 5 + -parseInt(n(319)) / 6 * (-parseInt(n(296)) / 7) + -parseInt(n(322)) / 8 * (-parseInt(n(310)) / 9) + -parseInt(n(323)) / 10 * (-parseInt(n(361)) / 11) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(E, 264201);
12
+ import { Kbd as t } from "../../primitives/Kbd2.js";
13
+ import { Tooltip as n } from "../../primitives/Tooltip2.js";
14
+ import { Separator as r } from "../../primitives/Layout2.js";
15
+ import { useControllableState as i } from "../../hooks/useControllableState.js";
16
+ import { Button as a, cx as o } from "../../primitives/index.js";
17
+ import { DropdownMenu as s, DropdownMenuCheckboxItem as c, DropdownMenuItem as l, DropdownMenuSeparator as u } from "../DropdownMenu/DropdownMenu2.js";
18
+ /* empty css */
19
+ import { createContext as d, forwardRef as f, useCallback as p, useContext as m, useEffect as h, useId as g, useImperativeHandle as _, useLayoutEffect as v, useMemo as y, useRef as b, useState as x } from "react";
20
+ import { MoreHorizontal as S } from "lucide-react";
21
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
22
+ function E() {
23
+ let e = /* @__PURE__ */ "ndvmyMrAyK4.DgfYz2v0.z2v0qM91BMrPBMDdBgLLBNrszwn0.zgvMyxvSDfbYzxzLBNrLza.C3r5Bgu.zM9JDxm.qNv0Dg9U.nM12uLLcEG.qxjYB3DvCa.C3bSAxq.mJu5mJHkCvbcs2i.mtbzAM1ID0u.zhmTDg9VBgjHCL9FC3bHy2vY.CgfKzgLUz0XLzNq.x19TB3jL.ywX0s2v5.w3jVBgu9iNrVB2XIyxiIxq.AwnVBG.B2jZzxj2zq.C2L6zq.CgfYzw50rwXLBwvUDa.zgf0yxnLDa.CMvNAxn0zxi.Bwv0yuTLEq.B3jPzw50yxrPB24.zgf0ys10B29SyMfYlxnLCa.Dw5ZAgLMDa.zhmTDg9VBgjHCG.BgvUz3rO.Dg9VBgjHCG.zgLZywjSzwq.C2vWyxjHDg9Y.C2XPy2u.AgLKzgvU.CxvLCNLtzwXLy3rVCG.ota3ntmYze1SwhLt.BMf0AxzLrxzLBNq.CMLNAhq.uhjVDMLKzxi.Dg9VBgjHCKLK.C2v0.y2XVC2vZDa.B2zM.B3zLCMzSB3C.y2HPBgrYzw4.zhmTDg9VBgjHCI0T.BM9Uzq.BwfW.y29SDw1Ur2fW.mJe3nZy4mwTTB1flEG.y29UDgfPBNm.zw50CNK.w2rHDgeTDg9VBgjHCI1Pzf0.u3bHy2vY.ChjLC3nLza.ntuWtxPYt2Tm.Dg9W.C2HVCNrJDxq.zhmTDg9VBgjHCI0TDMvYDgLJywW.AM9PBG.AgfZ.y3vYCMvUDa.mZy1odHwv0TVrKe.CgXHAw4.DgfIsw5KzxG.DMvYDgLJywW.642u67o06RIW.zMLSDgvY.ChjLDMvUDerLzMf1Bhq.C3bHBG.BgfIzwW.qxjYB3Dmzwz0.C2vW.Ag9YAxPVBNrHBa.B2zMC2v0sgvPz2H0.zhmTDg9VBgjHCL9FBw9Yzq.z2v0.ndyXotC3C21RBKnv.oNnJB3bLid4Gw2rHDgeTDg9VBgjHCI1Pzf0.y2XPy2S.D2LKDgG.zhmTDg9VBgjHCL9FC2vW.sg9Tzq.qxjYB3DeB3DU.zgL2.ndGXmda1r2fZuMHU.zhmTDg9VBgjHCI0TB3zLCMzSB3C.CxvLCNLtzwXLy3rVCKfSBa.zgvSzxrL.CgfKzgLUz1jPz2H0.Aw5JBhvKzxm.Dw5YzwDPC3rLCG.z2HVC3q.zgLZy29UBMvJDa.Bwf0y2HLCW.A2v5.y2XPzw50v2LKDgG.u2vWyxjHDg9Y.z2v0q2XPzw50uMvJDhm.mZuXwhfTrePS.w2rHDgeTDg9VBgjHCI1ZCgfJzxjD".split(".");
24
+ return E = function() {
6
25
  return e;
7
- }, t();
26
+ }, E();
8
27
  }
9
- function n(e, r) {
10
- e -= 144;
11
- let i = t(), a = i[e];
12
- n.kEyECX === void 0 && (n.btabFN = function(e) {
28
+ function D(e, t) {
29
+ e -= 282;
30
+ let n = E(), r = n[e];
31
+ D.zBQxfG === void 0 && (D.Vkudqa = function(e) {
13
32
  let t = "", n = "";
14
33
  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);
15
34
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
16
35
  return decodeURIComponent(n);
17
- }, n.hSXnYo = {}, n.kEyECX = !0);
18
- let o = i[0];
19
- n.mcHlkV !== o && (n.hSXnYo = {}, n.mcHlkV = o);
20
- let s = n.hSXnYo[e];
21
- return s === void 0 ? (a = n.btabFN(a), n.hSXnYo[e] = a) : a = s, a;
36
+ }, D.uTRrVj = {}, D.zBQxfG = !0);
37
+ let i = n[0];
38
+ D.KUqnXF !== i && (D.uTRrVj = {}, D.KUqnXF = i);
39
+ let a = D.uTRrVj[e];
40
+ return a === void 0 ? (r = D.Vkudqa(r), D.uTRrVj[e] = r) : r = a, r;
22
41
  }
23
- (function(e, t) {
24
- let r = n, i = e();
25
- for (;;) try {
26
- if (parseInt(r(175)) / 1 * (parseInt(r(179)) / 2) + parseInt(r(207)) / 3 + parseInt(r(146)) / 4 * (parseInt(r(229)) / 5) + -parseInt(r(219)) / 6 + -parseInt(r(157)) / 7 * (-parseInt(r(147)) / 8) + parseInt(r(198)) / 9 + -parseInt(r(152)) / 10 == t) break;
27
- i.push(i.shift());
28
- } catch {
29
- i.push(i.shift());
30
- }
31
- })(t, 974408);
32
- import { Kbd as r } from "../../primitives/Kbd2.js";
33
- import { Tooltip as i } from "../../primitives/Tooltip2.js";
34
- import { Separator as a } from "../../primitives/Layout2.js";
35
- import { useControllableState as o } from "../../hooks/useControllableState.js";
36
- import { Button as s, cx as c } from "../../primitives/index.js";
37
- import { DropdownMenu as l, DropdownMenuCheckboxItem as u, DropdownMenuItem as d, DropdownMenuSeparator as f } from "../DropdownMenu/DropdownMenu2.js";
38
- /* empty css */
39
- import { createContext as p, forwardRef as m, useCallback as h, useContext as g, useEffect as _, useId as v, useImperativeHandle as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
40
- import { MoreHorizontal as w } from "lucide-react";
41
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
42
- var O = p(null), k = e(199), A = e(204);
43
- function j({ children: t, "aria-label": n, "aria-labelledby": r, orientation: i = e(225), variant: a = "plain", size: o = "md", loop: s = !0, overflow: p = !1, overflowLabel: m = "더보기", className: g, style: _ }) {
44
- let v = e, y = S(null), T = S(null), j = p && i === v(225), N = h(() => {
45
- let e = v, t = y[e(159)];
46
- return t ? [...t[e(169)](k)].filter((n) => !n[e(154)] && n[e(151)]().length > 0 && n.closest(e(145)) === t && !n[e(200)]?.closest(k)) : [];
47
- }, []), P = h(() => {
48
- let e = v, t = N();
49
- T[e(159)] && t[e(188)](T[e(159)]) || (T[e(159)] = t[0] ?? null);
50
- for (let t of y.current?.querySelectorAll(k) ?? []) t.closest(e(145)) === y.current && (t[e(213)] = t === T[e(159)] ? 0 : -1);
42
+ var O = d(null), k = "button, input, select, textarea, a[href], [data-toolbar-item]", A = "input:not([type=button]):not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=\"true\"]";
43
+ function j({ children: t, "aria-label": n, "aria-labelledby": r, orientation: i = "horizontal", variant: a = e(375), size: d = "md", loop: f = !0, overflow: m = !1, overflowLabel: h = e(378), className: g, style: _ }) {
44
+ let C = e, E = b(null), D = b(null), j = m && i === C(284), N = p(() => {
45
+ let e = C, t = E.current;
46
+ return t ? [...t[e(298)](k)].filter((n) => !n[e(342)] && n[e(309)]()[e(340)] > 0 && n[e(353)](e(328)) === t && !n[e(332)]?.closest(k)) : [];
47
+ }, []), P = p(() => {
48
+ let e = C, t = N();
49
+ D[e(373)] && t[e(301)](D.current) || (D[e(373)] = t[0] ?? null);
50
+ for (let t of E[e(373)]?.[e(298)](k) ?? []) t[e(353)]("[role=\"toolbar\"]") === E[e(373)] && (t[e(376)] = t === D[e(373)] ? 0 : -1);
51
51
  }, [N]);
52
- b(() => {
53
- let e = v;
52
+ v(() => {
53
+ let e = C;
54
54
  P();
55
- let t = y[e(159)];
55
+ let t = E[e(373)];
56
56
  if (!t) return;
57
57
  let n = new MutationObserver(P);
58
- return n[e(209)](t, {
58
+ return n[e(330)](t, {
59
59
  childList: !0,
60
60
  subtree: !0,
61
61
  attributes: !0,
62
- attributeFilter: ["disabled", e(223)]
63
- }), () => n[e(178)]();
62
+ attributeFilter: [e(342), e(316)]
63
+ }), () => n[e(304)]();
64
64
  }, [P]);
65
65
  let F = (e) => {
66
- let t = v, n = e[t(163)];
67
- y[t(159)]?.contains(n) && N()[t(188)](n) && T.current !== n && (T[t(159)] = n, P());
66
+ let t = C, n = e[t(313)];
67
+ E[t(373)]?.[t(362)](n) && N()[t(301)](n) && D[t(373)] !== n && (D[t(373)] = n, P());
68
68
  }, I = (e) => {
69
- let t = v, n = e[t(163)];
70
- if (e.defaultPrevented || !y[t(159)]?.[t(177)](n) || n[t(171)](A) || e[t(160)] || e.ctrlKey || e[t(168)] || e[t(221)][t(164)]) return;
71
- let r = i === t(225) ? t(203) : "ArrowUp", a = i === t(225) ? t(193) : t(181), o = N(), c = o[t(156)]((e) => e === n || e[t(177)](n));
72
- if (c < 0) return;
73
- let l;
74
- if (e[t(190)] === a) l = c + 1 < o[t(216)] ? o[c + 1] : s ? o[0] : void 0;
75
- else if (e[t(190)] === r) l = c > 0 ? o[c - 1] : s ? o[o.length - 1] : void 0;
76
- else if (e[t(190)] === t(153)) l = o[0];
77
- else if (e[t(190)] === "End") l = o[o[t(216)] - 1];
69
+ let t = C, n = e[t(313)];
70
+ if (e[t(315)] || !E.current?.[t(362)](n) || n.matches(A) || e[t(327)] || e.ctrlKey || e[t(335)] || e[t(348)].isComposing) return;
71
+ let r = i === t(284) ? t(282) : t(320), a = i === t(284) ? "ArrowRight" : t(294), o = N(), s = o.findIndex((e) => e === n || e[t(362)](n));
72
+ if (s < 0) return;
73
+ let c;
74
+ if (e[t(306)] === a) c = s + 1 < o[t(340)] ? o[s + 1] : f ? o[0] : void 0;
75
+ else if (e[t(306)] === r) c = s > 0 ? o[s - 1] : f ? o[o[t(340)] - 1] : void 0;
76
+ else if (e[t(306)] === t(293)) c = o[0];
77
+ else if (e[t(306)] === "End") c = o[o[t(340)] - 1];
78
78
  else return;
79
- e[t(182)](), l?.focus();
80
- }, [L, R] = C(() => /* @__PURE__ */ new Map()), [z, B] = C([]), V = x(() => new Set(z), [z]), H = S(/* @__PURE__ */ new Map()), U = S(null), W = h((e, t) => R((n) => new Map(n)[v(161)](e, t)), []), G = h((e) => R((t) => {
81
- let n = new Map(t);
82
- return n.delete(e), n;
79
+ e[t(380)](), c?.[t(317)]();
80
+ }, [L, R] = x(() => /* @__PURE__ */ new Map()), [z, B] = x([]), V = y(() => new Set(z), [z]), H = b(/* @__PURE__ */ new Map()), U = b(null), W = p((e, t) => R((n) => new Map(n)[C(352)](e, t)), []), G = p((e) => R((t) => {
81
+ let n = C, r = new Map(t);
82
+ return r[n(299)](e), r;
83
83
  }), []);
84
- b(() => {
85
- let e = v, t = y[e(159)];
84
+ v(() => {
85
+ let e = C, t = E[e(373)];
86
86
  if (!j || !t) {
87
- B((t) => t[e(216)] ? [] : t);
87
+ B((e) => e.length ? [] : e);
88
88
  return;
89
89
  }
90
90
  let n = () => {
91
- let n = e, r = U[n(159)], i = getComputedStyle(t), a = parseFloat(i.columnGap) || 0, o = t.clientWidth - parseFloat(i[n(173)]) - parseFloat(i[n(165)]);
92
- r && r.getClientRects()[n(216)] && H[n(159)][n(161)](n(215), r.getBoundingClientRect()[n(205)]);
93
- let s = H[n(159)][n(227)](n(215)) ?? t[n(210)](".ds-btn")?.[n(222)] ?? 34, c = [...t[n(191)]][n(158)]((e) => e !== r)[n(208)]((e) => {
94
- let t = n, r = e[t(171)](t(231)) ? e : e[t(210)](":scope > [data-toolbar-id]"), i = r?.[t(230)][t(184)], a = e.getClientRects()[t(216)] > 0;
95
- i && a && H[t(159)][t(161)](i, e.getBoundingClientRect()[t(205)]);
96
- let o = e[t(171)]("[data-toolbar-spacer]") ? 0 : i ? H[t(159)].get(i) ?? 0 : a ? e.getBoundingClientRect()[t(205)] : 0;
91
+ let n = e, r = U[n(373)], i = getComputedStyle(t), a = parseFloat(i[n(360)]) || 0, o = t[n(307)] - parseFloat(i[n(325)]) - parseFloat(i[n(300)]);
92
+ r && r[n(309)]()[n(340)] && H[n(373)].set(n(326), r.getBoundingClientRect().width);
93
+ let s = H[n(373)][n(287)](n(326)) ?? t.querySelector(".ds-btn")?.[n(285)] ?? 34, c = [...t[n(356)]][n(379)]((e) => e !== r)[n(359)]((e) => {
94
+ let t = n, r = e[t(305)](t(364)) ? e : e[t(346)](t(289)), i = r?.[t(333)][t(351)], a = e[t(309)]()[t(340)] > 0;
95
+ i && a && H[t(373)][t(352)](i, e[t(314)]()[t(291)]);
96
+ let o = e[t(305)](t(311)) ? 0 : i ? H[t(373)][t(287)](i) ?? 0 : a ? e[t(314)]()[t(291)] : 0;
97
97
  return {
98
98
  id: i,
99
- sep: r?.[t(170)](t(189)) ?? !1,
99
+ sep: r?.hasAttribute(t(337)) ?? !1,
100
100
  w: o
101
101
  };
102
- }), l = (e) => e[n(185)]((e, t) => e + t.w, 0) + a * Math.max(e[n(216)] - 1, 0), u = c, d = [];
102
+ }), l = (e) => e.reduce((e, t) => e + t.w, 0) + a * Math.max(e[n(340)] - 1, 0), u = c, d = [];
103
103
  if (l(c) > o + .5) {
104
- for (let e = c[n(216)] - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
104
+ for (let e = c[n(340)] - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
105
105
  let t = c[e].id;
106
- t && (d[n(194)](t), u = u[n(158)]((t) => t !== c[e]));
106
+ t && (d[n(338)](t), u = u[n(379)]((t) => t !== c[e]));
107
107
  }
108
- for (; u[n(216)] && u[u.length - 1][n(187)];) {
109
- let e = u[u[n(216)] - 1];
110
- d[n(194)](e.id), u = u.slice(0, -1);
108
+ for (; u[n(340)] && u[u[n(340)] - 1][n(283)];) {
109
+ let e = u[u.length - 1];
110
+ d[n(338)](e.id), u = u[n(344)](0, -1);
111
111
  }
112
112
  }
113
- let f = d[n(155)]("|");
114
- B((e) => e[n(155)]("|") === f ? e : d);
113
+ let f = d.join("|");
114
+ B((e) => e[n(371)]("|") === f ? e : d);
115
115
  };
116
116
  n();
117
117
  let r = new ResizeObserver(n);
118
- r[e(209)](t);
118
+ r[e(330)](t);
119
119
  let i = new MutationObserver(n);
120
- return i.observe(t, { childList: !0 }), () => {
121
- r.disconnect(), i.disconnect();
120
+ return i[e(330)](t, { childList: !0 }), () => {
121
+ let t = e;
122
+ r.disconnect(), i[t(304)]();
122
123
  };
123
124
  }, [j, L]);
124
- let K = z.map((e) => ({
125
+ let K = z[C(359)]((e) => ({
125
126
  id: e,
126
- entry: L[v(227)](e)
127
- }))[v(158)]((e) => !!e[v(226)]).filter((e, t, n) => !e.entry[v(220)] || t > 0 && t < n[v(216)] - 1 && !n[t - 1][v(226)][v(220)]), q = x(() => ({
128
- size: o,
127
+ entry: L[C(287)](e)
128
+ })).filter((e) => !!e[C(363)])[C(379)]((e, t, n) => !e[C(363)].separator || t > 0 && t < n[C(340)] - 1 && !n[t - 1][C(363)][C(343)]), q = y(() => ({
129
+ size: d,
129
130
  orientation: i,
130
131
  overflow: j,
131
132
  hidden: V,
132
133
  register: W,
133
134
  unregister: G
134
135
  }), [
135
- o,
136
+ d,
136
137
  i,
137
138
  j,
138
139
  V,
139
140
  W,
140
141
  G
141
142
  ]);
142
- return E(O.Provider, {
143
+ return w(O[C(350)], {
143
144
  value: q,
144
- children: D(v(211), {
145
- ref: y,
146
- role: v(180),
145
+ children: T(C(295), {
146
+ ref: E,
147
+ role: C(341),
147
148
  "aria-label": n,
148
149
  "aria-labelledby": r,
149
150
  "aria-orientation": i,
150
- className: c(v(217), v(214) + a, v(214) + o, i === v(218) && v(228), j && "ds-toolbar--overflow", g),
151
+ className: o(C(339), C(357) + a, C(357) + d, i === "vertical" && C(370), j && C(297), g),
151
152
  style: _,
152
153
  onFocus: F,
153
154
  onKeyDown: I,
154
- children: [t, j && E(v(144), {
155
+ children: [t, j && w(C(381), {
155
156
  ref: U,
156
- className: v(174),
157
- style: K[v(216)] ? void 0 : { display: v(176) },
158
- children: E(l, {
157
+ className: C(286),
158
+ style: K.length ? void 0 : { display: "none" },
159
+ children: w(s, {
159
160
  align: "end",
160
- "aria-label": m,
161
- trigger: E(M, {
162
- label: m,
163
- icon: E(w, {}),
161
+ "aria-label": h,
162
+ trigger: w(M, {
163
+ label: h,
164
+ icon: w(S, {}),
164
165
  collapsible: !1
165
166
  }),
166
- children: K.map(({ id: e, entry: t }) => t.separator ? E(f, {}, e) : t.pressed === void 0 ? E(d, {
167
- icon: t[v(166)],
168
- shortcut: t[v(197)],
169
- disabled: t[v(154)],
170
- onSelect: () => t[v(172)]?.(),
171
- children: t.label
172
- }, e) : E(u, {
173
- icon: t[v(166)],
174
- shortcut: t.shortcut,
175
- disabled: t[v(154)],
176
- checked: t[v(224)],
167
+ children: K[C(359)](({ id: e, entry: t }) => t.separator ? w(u, {}, e) : t[C(366)] === void 0 ? w(l, {
168
+ icon: t[C(329)],
169
+ shortcut: t[C(369)],
170
+ disabled: t[C(342)],
171
+ onSelect: () => t[C(290)]?.(),
172
+ children: t[C(382)]
173
+ }, e) : w(c, {
174
+ icon: t[C(329)],
175
+ shortcut: t[C(369)],
176
+ disabled: t.disabled,
177
+ checked: t[C(366)],
177
178
  closeOnSelect: !0,
178
- onCheckedChange: () => t[v(172)]?.(),
179
- children: t[v(196)]
179
+ onCheckedChange: () => t[C(290)]?.(),
180
+ children: t[C(382)]
180
181
  }, e))
181
182
  })
182
183
  })]
183
184
  })
184
185
  });
185
186
  }
186
- var M = m(function({ label: t, variant: n = e(201), pressed: a, defaultPressed: l, onPressedChange: u, shortcut: d, tooltip: f, tooltipSide: p, collapsible: m = !0, icon: h, children: x, className: C, disabled: w, onClick: k, style: A, ...j }, M) {
187
- let N = e, P = g(O), F = S(null);
188
- y(M, () => F[N(159)]);
189
- let I = a !== void 0 || l !== void 0, [L, R] = o(a, l ?? !1, u), z = !!h && x == null, B = v(), V = !!P?.[N(202)] && m, H = V && P[N(192)][N(212)](B), U = d?.join("\n"), W = P?.[N(148)], G = P?.[N(206)];
190
- b(() => {
187
+ var M = f(function({ label: r, variant: s = e(303), pressed: c, defaultPressed: l, onPressedChange: u, shortcut: d, tooltip: f, tooltipSide: p, collapsible: y = !0, icon: x, children: S, className: E, disabled: D, onClick: k, style: A, ...j }, M) {
188
+ let N = e, P = m(O), F = b(null);
189
+ _(M, () => F[N(373)]);
190
+ let I = c !== void 0 || l !== void 0, [L, R] = i(c, l ?? !1, u), z = !!x && S == null, B = g(), V = !!P?.[N(355)] && y, H = V && P[N(345)][N(372)](B), U = d?.join("\n"), W = P?.[N(334)], G = P?.unregister;
191
+ v(() => {
191
192
  let e = N;
192
193
  V && W && W(B, {
193
- label: t,
194
- icon: h,
195
- shortcut: U?.split("\n"),
194
+ label: r,
195
+ icon: x,
196
+ shortcut: U?.[e(321)]("\n"),
196
197
  pressed: I ? L : void 0,
197
- disabled: w,
198
- click: () => F[e(159)]?.[e(172)]()
198
+ disabled: D,
199
+ click: () => F[e(373)]?.[e(290)]()
199
200
  });
200
201
  }, [
201
202
  V,
202
203
  W,
203
204
  B,
204
- t,
205
- h,
205
+ r,
206
+ x,
206
207
  U,
207
208
  I,
208
209
  L,
209
- w
210
- ]), _(() => V && G ? () => G(B) : void 0, [
210
+ D
211
+ ]), h(() => V && G ? () => G(B) : void 0, [
211
212
  V,
212
213
  G,
213
214
  B
214
215
  ]);
215
- let K = E(s, {
216
+ let K = w(a, {
216
217
  ref: F,
217
- variant: n,
218
- size: P?.[N(150)] ?? "md",
219
- icon: h,
218
+ variant: s,
219
+ size: P?.[N(331)] ?? "md",
220
+ icon: x,
220
221
  iconOnly: z,
221
222
  shortcut: d,
222
- "aria-label": z ? t : void 0,
223
+ "aria-label": z ? r : void 0,
223
224
  "aria-pressed": I ? L : void 0,
224
- "data-state": I ? L ? "on" : N(167) : void 0,
225
+ "data-state": I ? L ? "on" : N(354) : void 0,
225
226
  "data-toolbar-id": V ? B : void 0,
226
- disabled: w,
227
- className: c(N(162), C),
227
+ disabled: D,
228
+ className: o("ds-toolbar__btn", E),
228
229
  style: H ? {
229
230
  ...A,
230
- display: N(176)
231
+ display: "none"
231
232
  } : A,
232
233
  onClick: (e) => {
233
- k?.(e), I && !e.defaultPrevented && R(!L);
234
+ let t = N;
235
+ k?.(e), I && !e[t(315)] && R(!L);
234
236
  },
235
237
  ...j,
236
- children: x
238
+ children: S
237
239
  });
238
- return !(f === void 0 ? z : f !== !1) || H ? K : E(i, {
239
- content: f !== void 0 && f !== !0 ? f : D(T, { children: [t, d && E(r, {
240
+ return !(f === void 0 ? z : f !== !1) || H ? K : w(n, {
241
+ content: f !== void 0 && f !== !0 ? f : T(C, { children: [r, d && w(t, {
240
242
  keys: d,
241
243
  size: "sm"
242
244
  })] }),
243
- side: p ?? (P?.orientation === N(218) ? N(183) : "top"),
245
+ side: p ?? (P?.[N(336)] === N(377) ? N(349) : N(368)),
244
246
  children: K
245
247
  });
246
248
  });
247
249
  function N() {
248
- let t = e, n = g(O), r = v(), i = !!n?.[t(202)], o = n?.[t(148)], s = n?.[t(206)];
249
- b(() => {
250
- i && o && o(r, { separator: !0 });
250
+ let t = e, n = m(O), i = g(), a = !!n?.overflow, o = n?.[t(334)], s = n?.[t(302)];
251
+ v(() => {
252
+ a && o && o(i, { separator: !0 });
251
253
  }, [
252
- i,
254
+ a,
253
255
  o,
254
- r
255
- ]), _(() => i && s ? () => s(r) : void 0, [
256
- i,
256
+ i
257
+ ]), h(() => a && s ? () => s(i) : void 0, [
258
+ a,
257
259
  s,
258
- r
260
+ i
259
261
  ]);
260
- let c = i && n.hidden[t(212)](r);
261
- return E(t(144), {
262
- className: "ds-toolbar__sep",
263
- "data-toolbar-id": i ? r : void 0,
262
+ let c = a && n.hidden.has(i);
263
+ return w(t(381), {
264
+ className: t(292),
265
+ "data-toolbar-id": a ? i : void 0,
264
266
  "data-toolbar-sep": "",
265
- style: c ? { display: t(176) } : void 0,
266
- children: E(a, {
267
- orientation: n?.orientation === t(218) ? t(225) : "vertical",
267
+ style: c ? { display: t(358) } : void 0,
268
+ children: w(r, {
269
+ orientation: n?.[t(336)] === "vertical" ? t(284) : t(377),
268
270
  decorative: !1
269
271
  })
270
272
  });
271
273
  }
272
274
  function P() {
273
275
  let t = e;
274
- return E(t(144), {
275
- className: t(149),
276
+ return w(t(381), {
277
+ className: t(324),
276
278
  "data-toolbar-spacer": "",
277
279
  "aria-hidden": !0
278
280
  });
279
281
  }
280
- j[e(186)] = M, j.Separator = N, j[e(195)] = P;
282
+ j[e(318)] = M, j[e(308)] = N, j[e(365)] = P;
281
283
  export { j as Toolbar, M as ToolbarButton, N as ToolbarSeparator, P as ToolbarSpacer };