@iamfiro/design 0.3.1 → 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 +81 -81
  4. package/lib/components/ActionBar/ActionBar2.js +38 -39
  5. package/lib/components/Alert/Alert2.js +79 -79
  6. package/lib/components/AppShell/AppShell2.js +45 -45
  7. package/lib/components/AreaChart/AreaChart.js +45 -46
  8. package/lib/components/BarChart/BarChart2.js +166 -166
  9. package/lib/components/BarList/BarList2.js +83 -83
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
  11. package/lib/components/Calendar/Calendar2.js +166 -165
  12. package/lib/components/Calendar/DatePicker2.js +139 -139
  13. package/lib/components/Calendar/date.js +61 -58
  14. package/lib/components/Card/Card2.js +47 -47
  15. package/lib/components/CardFrame/CardFrame2.js +50 -45
  16. package/lib/components/Chart/ChartParts.js +78 -78
  17. package/lib/components/Chart/chart2.js +62 -62
  18. package/lib/components/Chart/useChartInteraction.js +56 -56
  19. package/lib/components/ChatBubble/ChatBubble2.js +116 -116
  20. package/lib/components/ChatBubble/formatChatTime.js +46 -39
  21. package/lib/components/ChatComposer/ChatComposer2.js +43 -43
  22. package/lib/components/CodeBlock/CodeBlock2.js +57 -57
  23. package/lib/components/CodeBlock/highlight.js +74 -74
  24. package/lib/components/ColorPicker/ColorPicker2.js +357 -357
  25. package/lib/components/ColorPicker/color.js +83 -83
  26. package/lib/components/ColorPicker/presets.js +47 -41
  27. package/lib/components/Combobox/Combobox2.js +143 -142
  28. package/lib/components/CommandMenu/CommandMenu.js +100 -100
  29. package/lib/components/Comment/Comment2.js +59 -60
  30. package/lib/components/ContextMenu/ContextMenu2.js +95 -96
  31. package/lib/components/DataGrid/DataGrid2.js +1202 -1203
  32. package/lib/components/DataGrid/GridPopover.js +87 -87
  33. package/lib/components/DataGrid/anchor.js +17 -19
  34. package/lib/components/DataGrid/model.js +261 -261
  35. package/lib/components/DataGrid/panels.js +397 -395
  36. package/lib/components/DataGrid/typeMeta.js +51 -51
  37. package/lib/components/DataGrid/types.js +38 -36
  38. package/lib/components/DescriptionList/DescriptionList2.js +74 -74
  39. package/lib/components/Dialog/AlertDialog.js +81 -82
  40. package/lib/components/Dialog/Dialog2.js +63 -63
  41. package/lib/components/Dialog/modal.js +70 -69
  42. package/lib/components/Drawer/Drawer2.js +122 -123
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
  44. package/lib/components/DropdownMenu/menuCore.js +43 -44
  45. package/lib/components/Dropzone/Dropzone2.js +76 -77
  46. package/lib/components/EmptyState/EmptyState2.js +59 -56
  47. package/lib/components/FileChip/FileChip2.js +73 -49
  48. package/lib/components/FileUpload/FileUpload.js +149 -150
  49. package/lib/components/FilterChips/FilterChips2.js +59 -59
  50. package/lib/components/FunnelChart/FunnelChart2.js +123 -123
  51. package/lib/components/FunnelChart/funnel.js +44 -47
  52. package/lib/components/Highlight/Highlight2.js +48 -48
  53. package/lib/components/HoverCard/HoverCard.js +89 -64
  54. package/lib/components/InlineDiff/InlineDiff2.js +123 -123
  55. package/lib/components/InlineDiff/diff.js +76 -76
  56. package/lib/components/InlineDiff/useDiffReview.js +69 -68
  57. package/lib/components/Kanban/Kanban2.js +366 -366
  58. package/lib/components/Kanban/KanbanCard.js +67 -67
  59. package/lib/components/Kanban/move.js +41 -45
  60. package/lib/components/LineChart/LineChart2.js +196 -196
  61. package/lib/components/List/List2.js +60 -59
  62. package/lib/components/Listbox/Listbox2.js +94 -94
  63. package/lib/components/Marker/Marker2.js +59 -52
  64. package/lib/components/Menubar/Menubar2.js +110 -112
  65. package/lib/components/MultiSelect/MultiSelect2.js +112 -112
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
  67. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  68. package/lib/components/NumberStepper/NumberStepper2.js +66 -65
  69. package/lib/components/OtpInput/OtpInput2.js +87 -88
  70. package/lib/components/Pagination/Pagination2.js +81 -81
  71. package/lib/components/Pagination/paginationRange.js +25 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +77 -77
  73. package/lib/components/PieChart/PieChart2.js +101 -101
  74. package/lib/components/PieChart/arc.js +73 -76
  75. package/lib/components/PieChart/useArcTween.js +61 -57
  76. package/lib/components/Popover/Popover2.js +65 -64
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
  78. package/lib/components/Rating/Rating2.js +85 -85
  79. package/lib/components/Resizable/Resizable2.js +139 -139
  80. package/lib/components/Resizable/layout.js +68 -68
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
  82. package/lib/components/ScatterChart/ScatterChart2.js +249 -249
  83. package/lib/components/ScatterChart/scatter.js +55 -55
  84. package/lib/components/ScrollArea/ScrollArea2.js +132 -131
  85. package/lib/components/Select/Select2.js +81 -81
  86. package/lib/components/Sidebar/Sidebar2.js +61 -61
  87. package/lib/components/Skeleton/Skeleton2.js +46 -46
  88. package/lib/components/Slider/Slider2.js +74 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
  90. package/lib/components/SparkChart/SparkChart2.js +138 -137
  91. package/lib/components/SparkChart/spark.js +40 -61
  92. package/lib/components/Sparkbar/Sparkbar2.js +60 -59
  93. package/lib/components/SplitView/SplitView2.js +42 -42
  94. package/lib/components/Stat/Stat2.js +88 -88
  95. package/lib/components/StepList/StepList2.js +71 -71
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +89 -89
  98. package/lib/components/TagInput/TagInput2.js +154 -154
  99. package/lib/components/TimePicker/TimePicker2.js +225 -226
  100. package/lib/components/TimePicker/time.js +50 -50
  101. package/lib/components/Timeline/Timeline2.js +201 -201
  102. package/lib/components/Timeline/scale.js +55 -53
  103. package/lib/components/Toast/Toaster.js +90 -92
  104. package/lib/components/Toast/store.js +91 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
  106. package/lib/components/Toolbar/Toolbar2.js +166 -168
  107. package/lib/components/Tracker/Tracker2.js +89 -89
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
  109. package/lib/components/TreeView/TreeView2.js +154 -156
  110. package/lib/hooks/timing.js +35 -36
  111. package/lib/hooks/useControllableState.js +40 -39
  112. package/lib/hooks/useCountdown.js +57 -55
  113. package/lib/hooks/useDigitInput.js +59 -83
  114. package/lib/hooks/useDismiss.js +49 -46
  115. package/lib/hooks/useElapsed.js +53 -55
  116. package/lib/hooks/useFloating.js +44 -44
  117. package/lib/hooks/useFocusTrap.js +46 -70
  118. package/lib/hooks/usePresence.js +32 -29
  119. package/lib/hooks/usePressToOpen.js +50 -50
  120. package/lib/hooks/useScrollLock.js +51 -51
  121. package/lib/hooks/useSelection.js +55 -46
  122. package/lib/index.js +34 -35
  123. package/lib/primitives/AspectRatio2.js +59 -55
  124. package/lib/primitives/BrandIcon.js +160 -160
  125. package/lib/primitives/ColorDot2.js +38 -42
  126. package/lib/primitives/CopyButton2.js +56 -56
  127. package/lib/primitives/CountBadge2.js +66 -64
  128. package/lib/primitives/Countdown2.js +31 -32
  129. package/lib/primitives/Delta2.js +46 -71
  130. package/lib/primitives/Elapsed.js +44 -44
  131. package/lib/primitives/FileIcon2.js +82 -82
  132. package/lib/primitives/Flag2.js +134 -134
  133. package/lib/primitives/IconStack2.js +31 -53
  134. package/lib/primitives/IconTile2.js +46 -48
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +78 -78
  137. package/lib/primitives/Link2.js +29 -30
  138. package/lib/primitives/MaskedText2.js +47 -73
  139. package/lib/primitives/Progress2.js +77 -78
  140. package/lib/primitives/RelativeTime.js +49 -46
  141. package/lib/primitives/SearchInput2.js +58 -59
  142. package/lib/primitives/SelectorButton2.js +76 -74
  143. package/lib/primitives/Spinner2.js +62 -58
  144. package/lib/primitives/StatusIcon2.js +56 -56
  145. package/lib/primitives/Swatch2.js +69 -65
  146. package/lib/primitives/Tooltip2.js +92 -92
  147. package/lib/primitives/Typography2.js +68 -68
  148. package/lib/primitives/formatCountdown.js +39 -43
  149. package/lib/primitives/formatElapsed.js +43 -39
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +76 -76
  152. package/lib/primitives/index.js +201 -181
  153. package/lib/primitives/maskValue.js +35 -39
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,283 +1,281 @@
1
1
  "use client";
2
- const e = d;
3
- (function(e, t) {
4
- let n = d, r = e();
5
- for (;;) try {
6
- if (-parseInt(n(463)) / 1 + parseInt(n(468)) / 2 * (-parseInt(n(450)) / 3) + -parseInt(n(416)) / 4 * (parseInt(n(430)) / 5) + parseInt(n(440)) / 6 + -parseInt(n(457)) / 7 + -parseInt(n(396)) / 8 * (parseInt(n(408)) / 9) + parseInt(n(412)) / 10 == t) break;
7
- r.push(r.shift());
8
- } catch {
9
- r.push(r.shift());
10
- }
11
- })(P, 731338);
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
- function d(e, t) {
19
- e -= 377;
20
- let n = P(), r = n[e];
21
- d.HxYLGN === void 0 && (d.EqKXKE = function(e) {
2
+ const e = n;
3
+ function t() {
4
+ let e = /* @__PURE__ */ "zhmTDg9VBgjHCL9FC3bHy2vY.C2L6zq.z2v0q2XPzw50uMvJDhm.mJGXndCXmdbZwLPfqMe.sg9Tzq.zgLZywjSzwq.AM9PBG.zMLUzeLUzgv4.mJq3odDZwKnJ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.Ag9YAxPVBNrHBa.zw50CNK.z2v0.zhmTDg9VBgjHCI0TDMvYDgLJywW.ndvuA0PovLu.zgf0yxnLDa.w2rHDgeTDg9VBgjHCI1Pzf0.C3bHBG.w3jVBgu9iNrVB2XIyxiIxq.mZC1nJKYq2fOz1bA.mJuWnfHjsLfSAG.CMvNAxn0zxi".split(".");
5
+ return t = function() {
6
+ return e;
7
+ }, t();
8
+ }
9
+ function n(e, r) {
10
+ e -= 144;
11
+ let i = t(), a = i[e];
12
+ n.kEyECX === void 0 && (n.btabFN = function(e) {
22
13
  let t = "", n = "";
23
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);
24
15
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
16
  return decodeURIComponent(n);
26
- }, d.dFZXOy = {}, d.HxYLGN = !0);
27
- let i = n[0];
28
- d.LgobsL !== i && (d.dFZXOy = {}, d.LgobsL = i);
29
- let a = d.dFZXOy[e];
30
- return a === void 0 ? (r = d.EqKXKE(r), d.dFZXOy[e] = r) : r = a, 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;
31
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";
32
38
  /* empty css */
33
- 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";
34
- import { MoreHorizontal as C } from "lucide-react";
35
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
36
- var D = f(null), O = "button, input, select, textarea, a[href], [data-toolbar-item]", k = e(420);
37
- function A({ children: t, "aria-label": n, "aria-labelledby": r, orientation: i = e(466), variant: a = "plain", size: d = "md", loop: f = !0, overflow: p = !1, overflowLabel: h = "더보기", className: g, style: _ }) {
38
- let v = e, w = x(null), A = x(null), M = p && i === v(466), N = m(() => {
39
- let e = v, t = w[e(401)];
40
- return t ? [...t[e(384)](O)][e(451)]((n) => !n[e(389)] && n.getClientRects()[e(471)] > 0 && n.closest(e(399)) === t && !n[e(445)]?.[e(386)](O)) : [];
41
- }, []), P = m(() => {
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(() => {
42
48
  let e = v, t = N();
43
- A[e(401)] && t[e(439)](A[e(401)]) || (A[e(401)] = t[0] ?? null);
44
- for (let t of w[e(401)]?.[e(384)](O) ?? []) t[e(386)](e(399)) === w[e(401)] && (t[e(434)] = t === A[e(401)] ? 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);
45
51
  }, [N]);
46
- y(() => {
52
+ b(() => {
47
53
  let e = v;
48
54
  P();
49
- let t = w[e(401)];
55
+ let t = y[e(159)];
50
56
  if (!t) return;
51
57
  let n = new MutationObserver(P);
52
- return n[e(436)](t, {
58
+ return n[e(209)](t, {
53
59
  childList: !0,
54
60
  subtree: !0,
55
61
  attributes: !0,
56
- attributeFilter: ["disabled", e(426)]
57
- }), () => n[e(452)]();
62
+ attributeFilter: ["disabled", e(223)]
63
+ }), () => n[e(178)]();
58
64
  }, [P]);
59
65
  let F = (e) => {
60
- let t = v, n = e[t(467)];
61
- w[t(401)]?.[t(422)](n) && N()[t(439)](n) && A.current !== n && (A.current = 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());
62
68
  }, I = (e) => {
63
- let t = v, n = e[t(467)];
64
- if (e[t(402)] || !w[t(401)]?.[t(422)](n) || n[t(435)](k) || e.altKey || e[t(414)] || e.metaKey || e[t(379)].isComposing) return;
65
- let r = i === t(466) ? "ArrowLeft" : t(429), a = t(i === "horizontal" ? 437 : 462), o = N(), s = o[t(393)]((e) => e === n || e[t(422)](n));
66
- if (s < 0) return;
67
- let c;
68
- if (e[t(380)] === a) c = s + 1 < o.length ? o[s + 1] : f ? o[0] : void 0;
69
- else if (e[t(380)] === r) c = s > 0 ? o[s - 1] : f ? o[o[t(471)] - 1] : void 0;
70
- else if (e[t(380)] === t(473)) c = o[0];
71
- else if (e.key === t(465)) c = o[o[t(471)] - 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];
72
78
  else return;
73
- e[t(428)](), c?.focus();
74
- }, [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(438)](e, t)), []), G = m((e) => R((t) => {
75
- let n = v, r = new Map(t);
76
- return r[n(455)](e), r;
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;
77
83
  }), []);
78
- y(() => {
79
- let e = v, t = w[e(401)];
80
- if (!M || !t) {
81
- B((e) => e.length ? [] : e);
84
+ b(() => {
85
+ let e = v, t = y[e(159)];
86
+ if (!j || !t) {
87
+ B((t) => t[e(216)] ? [] : t);
82
88
  return;
83
89
  }
84
90
  let n = () => {
85
- let n = e, r = U.current, i = getComputedStyle(t), a = parseFloat(i[n(441)]) || 0, o = t[n(461)] - parseFloat(i.paddingLeft) - parseFloat(i[n(469)]);
86
- r && r[n(394)]().length && H[n(401)][n(438)](n(410), r.getBoundingClientRect()[n(447)]);
87
- let s = H[n(401)][n(407)](n(410)) ?? t.querySelector(n(419))?.[n(449)] ?? 34, c = [...t[n(378)]][n(451)]((e) => e !== r).map((e) => {
88
- let t = n, r = e[t(435)](t(472)) ? e : e[t(421)](t(458)), i = r?.[t(397)][t(406)], a = e[t(394)]()[t(471)] > 0;
89
- i && a && H.current[t(438)](i, e.getBoundingClientRect().width);
90
- let o = e.matches("[data-toolbar-spacer]") ? 0 : i ? H[t(401)][t(407)](i) ?? 0 : a ? e[t(443)]()[t(447)] : 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;
91
97
  return {
92
98
  id: i,
93
- sep: r?.[t(409)](t(395)) ?? !1,
99
+ sep: r?.[t(170)](t(189)) ?? !1,
94
100
  w: o
95
101
  };
96
- }), l = (e) => e.reduce((e, t) => e + t.w, 0) + a * Math[n(423)](e[n(471)] - 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 = [];
97
103
  if (l(c) > o + .5) {
98
- for (let e = c.length - 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--) {
99
105
  let t = c[e].id;
100
- t && (d[n(459)](t), u = u[n(451)]((t) => t !== c[e]));
106
+ t && (d[n(194)](t), u = u[n(158)]((t) => t !== c[e]));
101
107
  }
102
- for (; u[n(471)] && u[u[n(471)] - 1][n(392)];) {
103
- let e = u[u[n(471)] - 1];
104
- d.unshift(e.id), u = u[n(425)](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);
105
111
  }
106
112
  }
107
- let f = d[n(446)]("|");
108
- B((e) => e[n(446)]("|") === f ? e : d);
113
+ let f = d[n(155)]("|");
114
+ B((e) => e[n(155)]("|") === f ? e : d);
109
115
  };
110
116
  n();
111
117
  let r = new ResizeObserver(n);
112
- r[e(436)](t);
118
+ r[e(209)](t);
113
119
  let i = new MutationObserver(n);
114
- return i[e(436)](t, { childList: !0 }), () => {
115
- let t = e;
116
- r[t(452)](), i[t(452)]();
120
+ return i.observe(t, { childList: !0 }), () => {
121
+ r.disconnect(), i.disconnect();
117
122
  };
118
- }, [M, L]);
119
- let K = z[v(398)]((e) => ({
123
+ }, [j, L]);
124
+ let K = z.map((e) => ({
120
125
  id: e,
121
- entry: L[v(407)](e)
122
- }))[v(451)]((e) => !!e[v(456)])[v(451)]((e, t, n) => !e.entry[v(418)] || t > 0 && t < n[v(471)] - 1 && !n[t - 1][v(456)].separator), q = b(() => ({
123
- size: d,
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,
124
129
  orientation: i,
125
- overflow: M,
130
+ overflow: j,
126
131
  hidden: V,
127
132
  register: W,
128
133
  unregister: G
129
134
  }), [
130
- d,
135
+ o,
131
136
  i,
132
- M,
137
+ j,
133
138
  V,
134
139
  W,
135
140
  G
136
141
  ]);
137
- return T(D[v(404)], {
142
+ return E(O.Provider, {
138
143
  value: q,
139
- children: E(v(424), {
140
- ref: w,
141
- role: v(388),
144
+ children: D(v(211), {
145
+ ref: y,
146
+ role: v(180),
142
147
  "aria-label": n,
143
148
  "aria-labelledby": r,
144
149
  "aria-orientation": i,
145
- className: o(v(415), v(475) + a, v(475) + d, i === "vertical" && "ds-toolbar--vertical", M && "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),
146
151
  style: _,
147
152
  onFocus: F,
148
153
  onKeyDown: I,
149
- children: [t, M && T("span", {
154
+ children: [t, j && E(v(144), {
150
155
  ref: U,
151
- className: v(390),
152
- style: K[v(471)] ? void 0 : { display: v(431) },
153
- children: T(s, {
156
+ className: v(174),
157
+ style: K[v(216)] ? void 0 : { display: v(176) },
158
+ children: E(l, {
154
159
  align: "end",
155
- "aria-label": h,
156
- trigger: T(j, {
157
- label: h,
158
- icon: T(C, {}),
160
+ "aria-label": m,
161
+ trigger: E(M, {
162
+ label: m,
163
+ icon: E(w, {}),
159
164
  collapsible: !1
160
165
  }),
161
- children: K[v(398)](({ id: e, entry: t }) => t.separator ? T(u, {}, e) : t[v(427)] === void 0 ? T(l, {
162
- icon: t[v(433)],
163
- shortcut: t[v(400)],
164
- disabled: t[v(389)],
165
- onSelect: () => t[v(383)]?.(),
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)]?.(),
166
171
  children: t.label
167
- }, e) : T(c, {
168
- icon: t.icon,
169
- shortcut: t[v(400)],
170
- disabled: t[v(389)],
171
- checked: t[v(427)],
172
+ }, e) : E(u, {
173
+ icon: t[v(166)],
174
+ shortcut: t.shortcut,
175
+ disabled: t[v(154)],
176
+ checked: t[v(224)],
172
177
  closeOnSelect: !0,
173
- onCheckedChange: () => t[v(383)]?.(),
174
- children: t[v(403)]
178
+ onCheckedChange: () => t[v(172)]?.(),
179
+ children: t[v(196)]
175
180
  }, e))
176
181
  })
177
182
  })]
178
183
  })
179
184
  });
180
185
  }
181
- var j = p(function({ label: r, variant: s = e(432), pressed: c, defaultPressed: l, onPressedChange: u, shortcut: d, tooltip: f, tooltipSide: p, collapsible: m = !0, icon: b, children: S, className: C, disabled: O, onClick: k, style: A, ...j }, M) {
182
- let N = e, P = h(D), F = x(null);
183
- v(M, () => F.current);
184
- let I = c !== void 0 || l !== void 0, [L, R] = i(c, l ?? !1, u), z = !!b && S == null, B = _(), V = !!P?.[N(444)] && m, H = V && P.hidden[N(391)](B), U = d?.[N(446)]("\n"), W = P?.[N(460)], G = P?.[N(464)];
185
- 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(() => {
186
191
  let e = N;
187
192
  V && W && W(B, {
188
- label: r,
189
- icon: b,
190
- shortcut: U?.[e(382)]("\n"),
193
+ label: t,
194
+ icon: h,
195
+ shortcut: U?.split("\n"),
191
196
  pressed: I ? L : void 0,
192
- disabled: O,
193
- click: () => F.current?.[e(383)]()
197
+ disabled: w,
198
+ click: () => F[e(159)]?.[e(172)]()
194
199
  });
195
200
  }, [
196
201
  V,
197
202
  W,
198
203
  B,
199
- r,
200
- b,
204
+ t,
205
+ h,
201
206
  U,
202
207
  I,
203
208
  L,
204
- O
205
- ]), g(() => V && G ? () => G(B) : void 0, [
209
+ w
210
+ ]), _(() => V && G ? () => G(B) : void 0, [
206
211
  V,
207
212
  G,
208
213
  B
209
214
  ]);
210
- let K = T(a, {
215
+ let K = E(s, {
211
216
  ref: F,
212
- variant: s,
213
- size: P?.[N(411)] ?? "md",
214
- icon: b,
217
+ variant: n,
218
+ size: P?.[N(150)] ?? "md",
219
+ icon: h,
215
220
  iconOnly: z,
216
221
  shortcut: d,
217
- "aria-label": z ? r : void 0,
222
+ "aria-label": z ? t : void 0,
218
223
  "aria-pressed": I ? L : void 0,
219
- "data-state": I ? L ? "on" : N(405) : void 0,
224
+ "data-state": I ? L ? "on" : N(167) : void 0,
220
225
  "data-toolbar-id": V ? B : void 0,
221
- disabled: O,
222
- className: o(N(454), C),
226
+ disabled: w,
227
+ className: c(N(162), C),
223
228
  style: H ? {
224
229
  ...A,
225
- display: "none"
230
+ display: N(176)
226
231
  } : A,
227
232
  onClick: (e) => {
228
- let t = N;
229
- k?.(e), I && !e[t(402)] && R(!L);
233
+ k?.(e), I && !e.defaultPrevented && R(!L);
230
234
  },
231
235
  ...j,
232
- children: S
236
+ children: x
233
237
  });
234
- return !(f === void 0 ? z : f !== !1) || H ? K : T(n, {
235
- content: f !== void 0 && f !== !0 ? f : E(w, { children: [r, d && T(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, {
236
240
  keys: d,
237
241
  size: "sm"
238
242
  })] }),
239
- side: p ?? (P?.[N(442)] === "vertical" ? N(470) : N(413)),
243
+ side: p ?? (P?.orientation === N(218) ? N(183) : "top"),
240
244
  children: K
241
245
  });
242
246
  });
243
- function M() {
244
- let t = e, n = h(D), i = _(), a = !!n?.[t(444)], o = n?.register, s = n?.[t(464)];
245
- y(() => {
246
- a && o && o(i, { separator: !0 });
247
+ 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 });
247
251
  }, [
248
- a,
252
+ i,
249
253
  o,
250
- i
251
- ]), g(() => a && s ? () => s(i) : void 0, [
252
- a,
254
+ r
255
+ ]), _(() => i && s ? () => s(r) : void 0, [
256
+ i,
253
257
  s,
254
- i
258
+ r
255
259
  ]);
256
- let c = a && n[t(474)].has(i);
257
- return T(t(453), {
258
- className: t(417),
259
- "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,
260
264
  "data-toolbar-sep": "",
261
- style: c ? { display: "none" } : void 0,
262
- children: T(r, {
263
- orientation: n?.[t(442)] === t(448) ? t(466) : t(448),
265
+ style: c ? { display: t(176) } : void 0,
266
+ children: E(a, {
267
+ orientation: n?.orientation === t(218) ? t(225) : "vertical",
264
268
  decorative: !1
265
269
  })
266
270
  });
267
271
  }
268
- function N() {
272
+ function P() {
269
273
  let t = e;
270
- return T(t(453), {
271
- className: t(377),
274
+ return E(t(144), {
275
+ className: t(149),
272
276
  "data-toolbar-spacer": "",
273
277
  "aria-hidden": !0
274
278
  });
275
279
  }
276
- function P() {
277
- let e = /* @__PURE__ */ "z2v0qM91BMrPBMDdBgLLBNrszwn0.B3zLCMzSB3C.CgfYzw50rwXLBwvUDa.AM9PBG.D2LKDgG.DMvYDgLJywW.B2zMC2v0sgvPz2H0.mta0mdCWD2v5B0D1.zMLSDgvY.zgLZy29UBMvJDa.C3bHBG.zhmTDg9V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UDgfPBNm.Bwf4.zgL2.C2XPy2u.C3r5Bgu.ChjLC3nLza.ChjLDMvUDerLzMf1Bhq.qxjYB3DvCa.mtbwr0vsEhO.BM9Uzq.z2HVC3q.AwnVBG.DgfIsw5KzxG.Bwf0y2HLCW.B2jZzxj2zq.qxjYB3DsAwDODa.C2v0.Aw5JBhvKzxm.nZa5nti2ne1bBhjorq.y29SDw1Ur2fW.B3jPzw50yxrPB24".split(".");
278
- return P = function() {
279
- return e;
280
- }, P();
281
- }
282
- A[e(385)] = j, A[e(387)] = M, A[e(381)] = N;
283
- export { A as Toolbar, j as ToolbarButton, M as ToolbarSeparator, N as ToolbarSpacer };
280
+ j[e(186)] = M, j.Separator = N, j[e(195)] = P;
281
+ export { j as Toolbar, M as ToolbarButton, N as ToolbarSeparator, P as ToolbarSpacer };