@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,130 +1,130 @@
1
1
  "use client";
2
- const e = C;
3
- (function(e, t) {
4
- let n = C, r = e();
5
- for (;;) try {
6
- if (-parseInt(n(285)) / 1 + parseInt(n(250)) / 2 + -parseInt(n(284)) / 3 + -parseInt(n(279)) / 4 + -parseInt(n(276)) / 5 + -parseInt(n(272)) / 6 + parseInt(n(255)) / 7 == t) break;
7
- r.push(r.shift());
8
- } catch {
9
- r.push(r.shift());
10
- }
11
- })(a, 534518);
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
- function a() {
17
- let e = /* @__PURE__ */ "u2vWyxjHDg9Y.qNv0Dg9U.nJqXnZG1zhDXALrv.y2HPBgrYzw4.zhmTDg9VBgjHCI0T.mJmXmtq3mMD5EwTTBq.AgfZqxr0CMLIDxrL.y29SDw1Ur2fW.C2vWyxjHDg9Y.y2XVC2vZDa.nZm1mZGXtunpterT.otG1otuXC2DutMjd.zw5K.zhmTDg9VBgjHCL9FBw9Yzq.642u67o06RIW.Bwf0y2HLCW.D2LKDgG.w2rHDgeTDg9VBgjHCI1Pzf0.z2v0qM91BMrPBMDdBgLLBNrszwn0.AxndB21WB3nPBMC.y3vYCMvUDa.DgfIsw5KzxG.B3jPzw50yxrPB24.AgfZ.zhmTDg9VBgjHCL9FC2vW.B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gvPz2H0.C3r5Bgu.ChjLC3nLza.Ag9YAxPVBNrHBa.zw50CNK.z2v0.zhmTDg9VBgjHCI0TDMvYDgLJywW.ndvuA0PovLu.zgf0yxnLDa.w2rHDgeTDg9VBgjHCI1Pzf0.C3bHBG.w3jVBgu9iNrVB2XIyxiIxq.mZC1nJKYq2fOz1bA.mJuWnfHjsLfSAG.CMvNAxn0zxi".split(".");
5
+ return t = function() {
19
6
  return e;
20
- }, a();
7
+ }, t();
21
8
  }
22
- import { Button as o, cx as s } from "../../primitives/index.js";
23
- import { DropdownMenu as c, DropdownMenuCheckboxItem as l, DropdownMenuItem as u, DropdownMenuSeparator as d } from "../DropdownMenu/DropdownMenu2.js";
24
- /* empty css */
25
- import { createContext as f, forwardRef as p, useCallback as m, useContext as h, useEffect as g, useId as _, useImperativeHandle as v, useLayoutEffect as y, useMemo as b, useRef as x, useState as S } from "react";
26
- function C(e, t) {
27
- e -= 219;
28
- let n = a(), r = n[e];
29
- C.ZETlEh === void 0 && (C.iMGEdN = function(e) {
9
+ function n(e, r) {
10
+ e -= 144;
11
+ let i = t(), a = i[e];
12
+ n.kEyECX === void 0 && (n.btabFN = function(e) {
30
13
  let t = "", n = "";
31
14
  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);
32
15
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
33
16
  return decodeURIComponent(n);
34
- }, C.rhNKcN = {}, C.ZETlEh = !0);
35
- let i = n[0];
36
- C.kBHmcZ !== i && (C.rhNKcN = {}, C.kBHmcZ = i);
37
- let o = C.rhNKcN[e];
38
- return o === void 0 ? (r = C.iMGEdN(r), C.rhNKcN[e] = r) : r = o, r;
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;
39
22
  }
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
40
  import { MoreHorizontal as w } from "lucide-react";
41
41
  import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
42
- var O = f(null), k = e(234), 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 = e(308), variant: a = e(240), size: o = "md", loop: f = !0, overflow: p = !1, overflowLabel: h = e(288), className: g, style: _ }) {
44
- let v = e, C = x(null), T = x(null), j = p && i === v(308), N = m(() => {
45
- let e = v, t = C.current;
46
- return t ? [...t[e(269)](k)][e(267)]((n) => !n[e(268)] && n.getClientRects()[e(305)] > 0 && n[e(283)](e(235)) === t && !n[e(265)]?.[e(283)](k)) : [];
47
- }, []), P = m(() => {
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
48
  let e = v, t = N();
49
- T.current && t[e(243)](T[e(294)]) || (T[e(294)] = t[0] ?? null);
50
- for (let t of C[e(294)]?.[e(269)](k) ?? []) t.closest(e(235)) === C[e(294)] && (t[e(295)] = t === T[e(294)] ? 0 : -1);
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);
51
51
  }, [N]);
52
- y(() => {
52
+ b(() => {
53
53
  let e = v;
54
54
  P();
55
- let t = C[e(294)];
55
+ let t = y[e(159)];
56
56
  if (!t) return;
57
57
  let n = new MutationObserver(P);
58
- return n.observe(t, {
58
+ return n[e(209)](t, {
59
59
  childList: !0,
60
60
  subtree: !0,
61
61
  attributes: !0,
62
- attributeFilter: [e(268), e(238)]
63
- }), () => n.disconnect();
62
+ attributeFilter: ["disabled", e(223)]
63
+ }), () => n[e(178)]();
64
64
  }, [P]);
65
65
  let F = (e) => {
66
- let t = v, n = e.target;
67
- C[t(294)]?.[t(241)](n) && N()[t(243)](n) && T[t(294)] !== n && (T[t(294)] = n, P());
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());
68
68
  }, I = (e) => {
69
- let t = v, n = e[t(237)];
70
- if (e[t(273)] || !C.current?.[t(241)](n) || n[t(289)](A) || e[t(227)] || e[t(224)] || e.metaKey || e[t(233)][t(293)]) return;
71
- let r = i === t(308) ? t(257) : t(230), a = i === t(308) ? t(220) : "ArrowDown", o = N(), s = o[t(247)]((e) => e === n || e[t(241)](n));
72
- if (s < 0) return;
73
- let c;
74
- if (e.key === a) c = s + 1 < o[t(305)] ? o[s + 1] : f ? o[0] : void 0;
75
- else if (e[t(232)] === r) c = s > 0 ? o[s - 1] : f ? o[o.length - 1] : void 0;
76
- else if (e[t(232)] === t(236)) c = o[0];
77
- else if (e[t(232)] === t(306)) c = o[o[t(305)] - 1];
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];
78
78
  else return;
79
- e.preventDefault(), c?.focus();
80
- }, [L, R] = S(() => /* @__PURE__ */ new Map()), [z, B] = S([]), V = b(() => new Set(z), [z]), H = x(/* @__PURE__ */ new Map()), U = x(null), W = m((e, t) => R((n) => new Map(n)[v(263)](e, t)), []), G = m((e) => R((t) => {
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
81
  let n = new Map(t);
82
82
  return n.delete(e), n;
83
83
  }), []);
84
- y(() => {
85
- let e = v, t = C[e(294)];
84
+ b(() => {
85
+ let e = v, t = y[e(159)];
86
86
  if (!j || !t) {
87
- B((t) => t[e(305)] ? [] : t);
87
+ B((t) => t[e(216)] ? [] : t);
88
88
  return;
89
89
  }
90
90
  let n = () => {
91
- let n = e, r = U[n(294)], i = getComputedStyle(t), a = parseFloat(i[n(281)]) || 0, o = t[n(248)] - parseFloat(i[n(259)]) - parseFloat(i[n(223)]);
92
- r && r[n(260)]()[n(305)] && H[n(294)][n(263)](n(245), r[n(292)]().width);
93
- let s = H.current[n(266)]("__more") ?? t.querySelector(".ds-btn")?.[n(239)] ?? 34, c = [...t[n(277)]].filter((e) => e !== r).map((e) => {
94
- let t = n, r = e.matches(t(291)) ? e : e.querySelector(":scope > [data-toolbar-id]"), i = r?.[t(261)][t(249)], a = e[t(260)]()[t(305)] > 0;
95
- i && a && H.current[t(263)](i, e[t(292)]().width);
96
- let o = e[t(289)](t(242)) ? 0 : i ? H[t(294)][t(266)](i) ?? 0 : a ? e[t(292)]()[t(290)] : 0;
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;
97
97
  return {
98
98
  id: i,
99
- sep: r?.[t(280)](t(222)) ?? !1,
99
+ sep: r?.[t(170)](t(189)) ?? !1,
100
100
  w: o
101
101
  };
102
- }), l = (e) => e.reduce((e, t) => e + t.w, 0) + a * Math.max(e[n(305)] - 1, 0), u = c, d = [];
102
+ }), l = (e) => e[n(185)]((e, t) => e + t.w, 0) + a * Math.max(e[n(216)] - 1, 0), u = c, d = [];
103
103
  if (l(c) > o + .5) {
104
- for (let e = c[n(305)] - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
104
+ for (let e = c[n(216)] - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
105
105
  let t = c[e].id;
106
- t && (d.unshift(t), u = u[n(267)]((t) => t !== c[e]));
106
+ t && (d[n(194)](t), u = u[n(158)]((t) => t !== c[e]));
107
107
  }
108
- for (; u[n(305)] && u[u[n(305)] - 1][n(229)];) {
109
- let e = u[u[n(305)] - 1];
110
- d[n(226)](e.id), u = u.slice(0, -1);
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);
111
111
  }
112
112
  }
113
- let f = d[n(307)]("|");
114
- B((e) => e[n(307)]("|") === f ? e : d);
113
+ let f = d[n(155)]("|");
114
+ B((e) => e[n(155)]("|") === f ? e : d);
115
115
  };
116
116
  n();
117
117
  let r = new ResizeObserver(n);
118
- r[e(299)](t);
118
+ r[e(209)](t);
119
119
  let i = new MutationObserver(n);
120
- return i[e(299)](t, { childList: !0 }), () => {
121
- r[e(219)](), i.disconnect();
120
+ return i.observe(t, { childList: !0 }), () => {
121
+ r.disconnect(), i.disconnect();
122
122
  };
123
123
  }, [j, L]);
124
124
  let K = z.map((e) => ({
125
125
  id: e,
126
- entry: L.get(e)
127
- }))[v(267)]((e) => !!e[v(231)])[v(267)]((e, t, n) => !e[v(231)].separator || t > 0 && t < n[v(305)] - 1 && !n[t - 1][v(231)][v(282)]), q = b(() => ({
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
128
  size: o,
129
129
  orientation: i,
130
130
  overflow: j,
@@ -139,143 +139,143 @@ function j({ children: t, "aria-label": n, "aria-labelledby": r, orientation: i
139
139
  W,
140
140
  G
141
141
  ]);
142
- return E(O[v(253)], {
142
+ return E(O.Provider, {
143
143
  value: q,
144
- children: D(v(221), {
145
- ref: C,
146
- role: v(303),
144
+ children: D(v(211), {
145
+ ref: y,
146
+ role: v(180),
147
147
  "aria-label": n,
148
148
  "aria-labelledby": r,
149
149
  "aria-orientation": i,
150
- className: s(v(264), v(278) + a, v(278) + o, i === "vertical" && "ds-toolbar--vertical", j && "ds-toolbar--overflow", g),
150
+ className: c(v(217), v(214) + a, v(214) + o, i === v(218) && v(228), j && "ds-toolbar--overflow", g),
151
151
  style: _,
152
152
  onFocus: F,
153
153
  onKeyDown: I,
154
- children: [t, j && E(v(246), {
154
+ children: [t, j && E(v(144), {
155
155
  ref: U,
156
- className: v(287),
157
- style: K[v(305)] ? void 0 : { display: v(271) },
158
- children: E(c, {
159
- align: v(286),
160
- "aria-label": h,
156
+ className: v(174),
157
+ style: K[v(216)] ? void 0 : { display: v(176) },
158
+ children: E(l, {
159
+ align: "end",
160
+ "aria-label": m,
161
161
  trigger: E(M, {
162
- label: h,
162
+ label: m,
163
163
  icon: E(w, {}),
164
164
  collapsible: !1
165
165
  }),
166
- children: K.map(({ id: e, entry: t }) => t[v(282)] ? E(d, {}, e) : t[v(258)] === void 0 ? E(u, {
167
- icon: t[v(225)],
168
- shortcut: t.shortcut,
169
- disabled: t[v(268)],
170
- onSelect: () => t[v(301)]?.(),
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
171
  children: t.label
172
- }, e) : E(l, {
173
- icon: t[v(225)],
172
+ }, e) : E(u, {
173
+ icon: t[v(166)],
174
174
  shortcut: t.shortcut,
175
- disabled: t[v(268)],
176
- checked: t[v(258)],
175
+ disabled: t[v(154)],
176
+ checked: t[v(224)],
177
177
  closeOnSelect: !0,
178
- onCheckedChange: () => t[v(301)]?.(),
179
- children: t.label
178
+ onCheckedChange: () => t[v(172)]?.(),
179
+ children: t[v(196)]
180
180
  }, e))
181
181
  })
182
182
  })]
183
183
  })
184
184
  });
185
185
  }
186
- var M = p(function({ label: r, variant: a = "ghost", pressed: c, defaultPressed: l, onPressedChange: u, shortcut: d, tooltip: f, tooltipSide: p, collapsible: m = !0, icon: b, children: S, className: C, disabled: w, onClick: k, style: A, ...j }, M) {
187
- let N = e, P = h(O), F = x(null);
188
- v(M, () => F[N(294)]);
189
- let I = c !== void 0 || l !== void 0, [L, R] = i(c, l ?? !1, u), z = !!b && S == null, B = _(), V = !!P?.[N(256)] && m, H = V && P[N(304)][N(297)](B), U = d?.[N(307)]("\n"), W = P?.register, G = P?.unregister;
190
- y(() => {
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(() => {
191
191
  let e = N;
192
192
  V && W && W(B, {
193
- label: r,
194
- icon: b,
195
- shortcut: U?.[e(302)]("\n"),
193
+ label: t,
194
+ icon: h,
195
+ shortcut: U?.split("\n"),
196
196
  pressed: I ? L : void 0,
197
197
  disabled: w,
198
- click: () => F[e(294)]?.click()
198
+ click: () => F[e(159)]?.[e(172)]()
199
199
  });
200
200
  }, [
201
201
  V,
202
202
  W,
203
203
  B,
204
- r,
205
- b,
204
+ t,
205
+ h,
206
206
  U,
207
207
  I,
208
208
  L,
209
209
  w
210
- ]), g(() => V && G ? () => G(B) : void 0, [
210
+ ]), _(() => V && G ? () => G(B) : void 0, [
211
211
  V,
212
212
  G,
213
213
  B
214
214
  ]);
215
- let K = E(o, {
215
+ let K = E(s, {
216
216
  ref: F,
217
- variant: a,
218
- size: P?.[N(244)] ?? "md",
219
- icon: b,
217
+ variant: n,
218
+ size: P?.[N(150)] ?? "md",
219
+ icon: h,
220
220
  iconOnly: z,
221
221
  shortcut: d,
222
- "aria-label": z ? r : void 0,
222
+ "aria-label": z ? t : void 0,
223
223
  "aria-pressed": I ? L : void 0,
224
- "data-state": I ? L ? "on" : "off" : void 0,
224
+ "data-state": I ? L ? "on" : N(167) : void 0,
225
225
  "data-toolbar-id": V ? B : void 0,
226
226
  disabled: w,
227
- className: s(N(254), C),
227
+ className: c(N(162), C),
228
228
  style: H ? {
229
229
  ...A,
230
- display: N(271)
230
+ display: N(176)
231
231
  } : A,
232
232
  onClick: (e) => {
233
233
  k?.(e), I && !e.defaultPrevented && R(!L);
234
234
  },
235
235
  ...j,
236
- children: S
236
+ children: x
237
237
  });
238
- return !(f === void 0 ? z : f !== !1) || H ? K : E(n, {
239
- content: f !== void 0 && f !== !0 ? f : D(T, { children: [r, d && E(t, {
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
240
  keys: d,
241
241
  size: "sm"
242
242
  })] }),
243
- side: p ?? (P?.[N(296)] === "vertical" ? N(252) : "top"),
243
+ side: p ?? (P?.orientation === N(218) ? N(183) : "top"),
244
244
  children: K
245
245
  });
246
246
  });
247
247
  function N() {
248
- let t = e, n = h(O), i = _(), a = !!n?.[t(256)], o = n?.[t(300)], s = n?.[t(270)];
249
- y(() => {
250
- a && o && o(i, { separator: !0 });
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 });
251
251
  }, [
252
- a,
252
+ i,
253
253
  o,
254
- i
255
- ]), g(() => a && s ? () => s(i) : void 0, [
256
- a,
254
+ r
255
+ ]), _(() => i && s ? () => s(r) : void 0, [
256
+ i,
257
257
  s,
258
- i
258
+ r
259
259
  ]);
260
- let c = a && n.hidden[t(297)](i);
261
- return E(t(246), {
262
- className: t(298),
263
- "data-toolbar-id": a ? i : void 0,
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,
264
264
  "data-toolbar-sep": "",
265
- style: c ? { display: t(271) } : void 0,
266
- children: E(r, {
267
- orientation: n?.orientation === t(262) ? "horizontal" : t(262),
265
+ style: c ? { display: t(176) } : void 0,
266
+ children: E(a, {
267
+ orientation: n?.orientation === t(218) ? t(225) : "vertical",
268
268
  decorative: !1
269
269
  })
270
270
  });
271
271
  }
272
272
  function P() {
273
273
  let t = e;
274
- return E(t(246), {
275
- className: t(251),
274
+ return E(t(144), {
275
+ className: t(149),
276
276
  "data-toolbar-spacer": "",
277
277
  "aria-hidden": !0
278
278
  });
279
279
  }
280
- j[e(275)] = M, j[e(274)] = N, j[e(228)] = P;
280
+ j[e(186)] = M, j.Separator = N, j[e(195)] = P;
281
281
  export { j as Toolbar, M as ToolbarButton, N as ToolbarSeparator, P as ToolbarSpacer };