@iamfiro/design 0.1.0 → 0.3.0

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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +65 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +69 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +133 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +223 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +53 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ var e = m;
3
+ (function(e, t) {
4
+ for (var n = m, r = e();;) try {
5
+ if (-parseInt(n(162)) / 1 + parseInt(n(191)) / 2 * (-parseInt(n(187)) / 3) + parseInt(n(180)) / 4 * (parseInt(n(190)) / 5) + parseInt(n(178)) / 6 * (parseInt(n(176)) / 7) + parseInt(n(164)) / 8 + -parseInt(n(184)) / 9 * (parseInt(n(188)) / 10) + parseInt(n(175)) / 11 * (parseInt(n(163)) / 12) == t) break;
6
+ r.push(r.shift());
7
+ } catch {
8
+ r.push(r.shift());
9
+ }
10
+ })(u, 978232);
11
+ import { TIMING as t } from "../../hooks/timing.js";
12
+ var n = [], r = /* @__PURE__ */ new Set(), i = () => r[e(169)]((e) => e()), a = (t) => (r[e(182)](t), () => {
13
+ r.delete(t);
14
+ }), o = () => n, s = 0;
15
+ function c(t, r = {}) {
16
+ var a = e;
17
+ let o = r.id ?? a(185) + ++s;
18
+ return n[a(165)]((e) => e.id === o) ? (l(o, {
19
+ title: t,
20
+ ...r
21
+ }), o) : (n = [{
22
+ type: a(189),
23
+ ...r,
24
+ id: o,
25
+ title: t,
26
+ version: 0
27
+ }, ...n], i(), o);
28
+ }
29
+ function l(t, r) {
30
+ var a = e;
31
+ n = n[a(168)]((e) => e.id === t ? {
32
+ ...e,
33
+ ...r,
34
+ exiting: !1,
35
+ version: e[a(183)] + 1
36
+ } : e), i();
37
+ }
38
+ function u() {
39
+ var e = /* @__PURE__ */ "C3vJy2vZCW.zxHPDgLUzW.Bg9HzgLUzW.7iUK7zAjioY3QoYgJa.DgL0Bgu.ntqXotqWm2ziueHqtW.n0Tkt0jhCq.C2v0vgLTzw91Da.mtC4odG0nLDmr05vta.B2jQzwn0.mty4zezgqvrH.zxjYB3i.ywrK.DMvYC2LVBG.owrxtgvUta.Dg9HC3qT.zgvZy3jPChrPB24.mJyYnJu5m09uzfLhsG.mJK1ntbOzxrduxy.zgvMyxvSDa.mti4mdy1Dw9nrgLk.mLrQsunOzG.Aw5MBW.mtyXnJqXngLhsfbeAa.mJrVyvDlDfy.odKXmte5mNH2rxvKtq.C29Tzq.D2fYBMLUzW.zNvUy3rPB24.BwfW.zM9YrwfJAa".split(".");
40
+ return u = function() {
41
+ return e;
42
+ }, u();
43
+ }
44
+ function d(t) {
45
+ var r = e;
46
+ let a = n.filter((e) => (t == null || e.id === t) && !e[r(171)]);
47
+ a.length && (n = n[r(168)]((e) => a.includes(e) ? {
48
+ ...e,
49
+ exiting: !0
50
+ } : e), i(), a.forEach((e) => e.onDismiss?.()), window[r(177)](() => {
51
+ var e = r;
52
+ n = n.filter((t) => !(a[e(165)]((e) => e.id === t.id) && t.exiting)), i();
53
+ }, 320));
54
+ }
55
+ var f = (t) => t != null && typeof t === e(179) && e(174) in t ? t : {
56
+ title: t,
57
+ description: void 0
58
+ }, p = (e) => (t, n) => c(t, {
59
+ ...n,
60
+ type: e
61
+ });
62
+ function m(e, t) {
63
+ e -= 161;
64
+ var n = u(), r = n[e];
65
+ m.ZcOcHZ === void 0 && (m.wCafPi = function(e) {
66
+ for (var t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", n = "", r = "", i = 0, a, o, s = 0; o = e.charAt(s++); ~o && (a = i % 4 ? a * 64 + o : o, i++ % 4) && (n += String.fromCharCode(255 & a >> (-2 * i & 6)))) o = t.indexOf(o);
67
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
68
+ return decodeURIComponent(r);
69
+ }, m.PFxRmN = {}, m.ZcOcHZ = !0);
70
+ var i = n[0];
71
+ m.jSqHfd !== i && (m.PFxRmN = {}, m.jSqHfd = i);
72
+ var a = m.PFxRmN[e];
73
+ return a === void 0 ? (r = m.wCafPi(r), m.PFxRmN[e] = r) : r = a, r;
74
+ }
75
+ function h(t, n, r) {
76
+ var i = e;
77
+ let a = c(f(n.loading)[i(174)], {
78
+ ...r,
79
+ description: f(n[i(172)]).description,
80
+ type: i(172)
81
+ });
82
+ return t.then((e) => {
83
+ var t = i;
84
+ let r = f(typeof n[t(170)] === t(167) ? n[t(170)](e) : n[t(170)]);
85
+ l(a, {
86
+ type: t(170),
87
+ title: r[t(174)],
88
+ description: r[t(186)]
89
+ });
90
+ }, (e) => {
91
+ var t = i;
92
+ let r = f(typeof n[t(181)] == "function" ? n[t(181)](e) : n[t(181)]);
93
+ l(a, {
94
+ type: t(181),
95
+ title: r.title,
96
+ description: r[t(186)]
97
+ });
98
+ }), t;
99
+ }
100
+ function g(r, { onUndo: a, onCommit: o, undoLabel: s = e(173), ...l }) {
101
+ var u = e;
102
+ let d = !1, f = c(r, {
103
+ duration: t.undo,
104
+ ...l,
105
+ action: {
106
+ label: s,
107
+ onClick: () => {
108
+ d = !0, a();
109
+ }
110
+ },
111
+ onDismiss: () => !d && o?.()
112
+ });
113
+ return n = n[u(168)]((e) => e.id === f ? {
114
+ ...e,
115
+ undoable: !0
116
+ } : e), i(), f;
117
+ }
118
+ var _ = Object.assign((e, t) => c(e, t), {
119
+ success: p(e(170)),
120
+ error: p(e(181)),
121
+ warning: p(e(166)),
122
+ info: p(e(161)),
123
+ loading: p(e(172)),
124
+ update: l,
125
+ dismiss: d,
126
+ promise: h,
127
+ undo: g
128
+ });
129
+ export { o as getToasts, a as subscribe, _ as toast };
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ const e = m;
3
+ (function(e, t) {
4
+ let n = m, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(439)) / 1 * (parseInt(n(393)) / 2) + parseInt(n(397)) / 3 + parseInt(n(394)) / 4 * (-parseInt(n(428)) / 5) + -parseInt(n(454)) / 6 * (parseInt(n(431)) / 7) + -parseInt(n(449)) / 8 + -parseInt(n(416)) / 9 + parseInt(n(414)) / 10 * (parseInt(n(402)) / 11) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(h, 335980);
12
+ import { cx as t } from "../../primitives/index.js";
13
+ import { useSelection as n } from "../../hooks/useSelection.js";
14
+ /* empty css */
15
+ import { createContext as r, useContext as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
16
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
17
+ var u = r(null);
18
+ function d(e) {
19
+ let r = m, { variant: i = r(409), size: d = "md", orientation: h = "horizontal", disabled: g, className: _, children: v } = e, y = n(e), b = o(null), [x, S] = s(null), C = y[r(422)][r(432)]("\0");
20
+ a(() => {
21
+ let e = r, t = b[e(443)];
22
+ if (y.multiple || !t) return;
23
+ let n = () => {
24
+ let n = e, r = t[n(410)](n(408));
25
+ S((e) => r ? {
26
+ left: r[n(442)],
27
+ top: r[n(445)],
28
+ width: r.offsetWidth,
29
+ height: r.offsetHeight,
30
+ shown: !0
31
+ } : e && {
32
+ ...e,
33
+ shown: !1
34
+ });
35
+ };
36
+ n();
37
+ let i = new ResizeObserver(n);
38
+ return i.observe(t), () => i[e(418)]();
39
+ }, [y[r(411)], C]);
40
+ let w = () => !!b[r(443)]?.[r(455)]?.closest(r(390));
41
+ return a(() => {
42
+ let e = r;
43
+ if (w()) return;
44
+ let t = f(b[e(443)]), n = t[e(423)]((t) => t[e(425)][e(440)] === "on") ?? t[0];
45
+ for (let t of b[e(443)]?.[e(403)](e(419)) ?? []) t.tabIndex = t === n ? 0 : -1;
46
+ }), c(u[r(430)], {
47
+ value: {
48
+ single: !y[r(411)],
49
+ disabled: g,
50
+ isSelected: (e) => y.isSelected(e),
51
+ toggle: (e) => y[r(421)](e)
52
+ },
53
+ children: l(r(401), {
54
+ ref: b,
55
+ role: y[r(411)] ? "group" : r(407),
56
+ "aria-label": e[r(405)],
57
+ "aria-orientation": h,
58
+ className: t(r(433), r(420) + i, r(420) + d, h === r(398) && r(446), _),
59
+ "data-glide": !y[r(411)] || void 0,
60
+ onKeyDown: (e) => {
61
+ let t = r;
62
+ if (w()) return;
63
+ let n = h === t(391) ? t(415) : "ArrowUp", i = t(h === "horizontal" ? 452 : 424), a = f(b.current), o = a[t(412)](document[t(392)]), s;
64
+ e[t(429)] === i ? s = a[(o + 1) % a[t(450)]] : e[t(429)] === n ? s = a[(o - 1 + a[t(450)]) % a[t(450)]] : e[t(429)] === "Home" ? s = a[0] : e.key === t(435) && (s = a[a.length - 1]), s && (e[t(453)](), s[t(427)](), !y[t(411)] && s.dataset[t(417)] != null && y[t(444)]([p(s[t(425)][t(417)], s)]));
65
+ },
66
+ children: [x && c(r(447), {
67
+ className: r(400),
68
+ "aria-hidden": !0,
69
+ style: {
70
+ left: x[r(437)],
71
+ top: x[r(436)],
72
+ width: x[r(441)],
73
+ height: x.height,
74
+ opacity: +!!x[r(406)]
75
+ }
76
+ }), v]
77
+ })
78
+ });
79
+ }
80
+ var f = (t) => [...t?.querySelectorAll(e(419)) ?? []].filter((e) => !e.disabled), p = (t, n) => n[e(425)][e(426)] === e(434) ? Number(t) : t;
81
+ function m(e, t) {
82
+ e -= 389;
83
+ let n = h(), r = n[e];
84
+ m.QiJRyj === void 0 && (m.wSbkut = function(e) {
85
+ let t = "", n = "";
86
+ 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);
87
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
88
+ return decodeURIComponent(n);
89
+ }, m.hAWDmy = {}, m.QiJRyj = !0);
90
+ let i = n[0];
91
+ m.nEBdEg !== i && (m.hAWDmy = {}, m.nEBdEg = i);
92
+ let a = m.hAWDmy[e];
93
+ return a === void 0 ? (r = m.wSbkut(r), m.hAWDmy[e] = r) : r = a, r;
94
+ }
95
+ function h() {
96
+ let e = /* @__PURE__ */ "Aw5KzxHpzG.zgLZywjSzwq.mtCXmdu4mezAAxDnDG.qxjYB3Dmzwz0.nte4nJCWCMr3Aw5j.DMfSDwu.zgLZy29UBMvJDa.w2rHDgeTDgCTAxrLBv0.zhmTDg9Nz2XLlwDYB3vWls0.Dg9Nz2XL.C2vSzwn0zwq.zMLUza.qxjYB3DeB3DU.zgf0yxnLDa.DMfSDwvuExbL.zM9JDxm.ndC2ntu1CMfKs1zY.A2v5.uhjVDMLKzxi.mJuZnZi5rK9IAeHX.AM9PBG.zhmTDg9Nz2XLlwDYB3vW.BNvTyMvY.rw5K.Dg9W.BgvMDa.zhmTDg9Nz2XLlwDYB3vWx19PDgvTls1Py29U.ndK5nti2vuXcs1nx.C3rHDgu.D2LKDgG.B2zMC2v0tgvMDa.y3vYCMvUDa.C2v0u2vSzwn0zwq.B2zMC2v0vg9W.zhmTDg9Nz2XLlwDYB3vWls12zxj0AwnHBa.C3bHBG.yNv0Dg9U.mtC3mti4ogTUuMT6DW.BgvUz3rO.CMfKAw8.qxjYB3DsAwDODa.ChjLDMvUDerLzMf1Bhq.nNzQEfLRDG.CgfYzw50rwXLBwvUDa.B2zM.w3jVBgu9iNrVB2XIyxiIxq.Ag9YAxPVBNrHBa.ywn0AxzLrwXLBwvUDa.mM5JB0zcsa.mJbKthjqteq.AxntzwXLy3rLza.zgvMyxvSDfbYzxzLBNrLza.mZq1mZy5EhzyA0zb.DMvYDgLJywW.C2LUz2XL.zhmTDg9Nz2XLlwDYB3vWx190AhvTyG.zgL2.mZn1t3j1tMC.CxvLCNLtzwXLy3rVCKfSBa.vg9Nz2XLr3jVDxbjDgvTig11C3qGyMuGDxnLzcbPBNnPzguGpfrVz2DSzuDYB3vWpG.yxjPys1SywjLBa.C2HVD24.CMfKAw9NCM91Ca.w2rHDgeTDgCTAxrLBv1Bzgf0ys1ZDgf0zt0IB24Ixq.C29MDa.CxvLCNLtzwXLy3rVCG.BxvSDgLWBgu".split(".");
97
+ return h = function() {
98
+ return e;
99
+ }, h();
100
+ }
101
+ function g({ value: n, icon: r, children: a, disabled: o, className: s, onClick: c, ...d }) {
102
+ let f = e, p = i(u);
103
+ if (!p) throw Error(f(404));
104
+ let m = p[f(395)](n);
105
+ return l(f(448), {
106
+ type: f(448),
107
+ "data-tg-item": "",
108
+ "data-state": m ? "on" : f(389),
109
+ "data-value": String(n),
110
+ "data-value-type": typeof n,
111
+ role: p[f(399)] ? f(451) : void 0,
112
+ "aria-checked": p.single ? m : void 0,
113
+ "aria-pressed": p[f(399)] ? void 0 : m,
114
+ disabled: p[f(413)] || o,
115
+ className: t("ds-toggle-group__item", !a && f(438), s),
116
+ onClick: (e) => {
117
+ let t = f;
118
+ c?.(e), e[t(396)] || p[t(421)](n);
119
+ },
120
+ ...d,
121
+ children: [r, a]
122
+ });
123
+ }
124
+ d.Item = g;
125
+ export { d as ToggleGroup, g as ToggleGroupItem };
@@ -0,0 +1,281 @@
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.B2jZzxj2zq.CMvNAxn0zxi.y2XPy2S.C3bSAxq.Dg9VBgjHCG.AgLKzgvU.BgvUz3rO.rw5K.AM9PBG.Ag9YAxPVBNrHBa.zgLZy29UBMvJDa.qxjYB3DsAwDODa.zgL2.zgf0ys10B29SyMfYlxnLCa.CgfKzgLUz1jPz2H0.y3rYBeTLEq.AwnVBG.Dw5ZAgLMDa.ywX0s2v5.u3bHy2vY.C2vW.qxjYB3DvCa.zw50CNK.A2v5.BMf0AxzLrxzLBNq.yNv0Dg9UlcbPBNb1DcWGC2vSzwn0lcb0zxH0yxjLysWGyvTOCMvMxsWGw2rHDgeTDg9VBgjHCI1PDgvTxq.w3jVBgu9iNrVB2XIyxiIxq.sg9Tzq.DgfYz2v0.C3r5Bgu.B2zMC2v0sgvPz2H0.CgXHAw4.y29UDgfPBNm.w2rHDgeTDg9VBgjHCI1ZCgfJzxjD.Aw5JBhvKzxm.C2L6zq.x19TB3jL.C3bHBG.zMLUzeLUzgv4.y2XPzw50v2LKDgG.Dg9VBgjHCKLK.mtK1nZG5offyEKjMCG.zhmTDg9VBgjHCL9FC3bHy2vY.CMLNAhq.uhjVDMLKzxi.zhmTDg9VBgjHCL9FyNrU.mteXnJG1nZbWB1b1zfi.B3zLCMzSB3C.qxjYB3Dmzwz0.ChjLC3nLza.CgfKzgLUz0XLzNq.z2v0q2XPzw50uMvJDhm.zgf0yxnLDa.DMvYDgLJywW.C2v0.zhmTDg9VBgjHCG.CgfYzw50rwXLBwvUDa.z2v0.zMLSDgvY.zgLZywjSzwq.CxvLCNLtzwXLy3rVCKfSBa.Dw5YzwDPC3rLCG.BM9Uzq.nJe1odi4uMndyNrY.zgvMyxvSDfbYzxzLBNrLza".split(".");
18
+ return a = function() {
19
+ return e;
20
+ }, a();
21
+ }
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) {
30
+ let t = "", n = "";
31
+ 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
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
33
+ 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;
39
+ }
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 = 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(() => {
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);
51
+ }, [N]);
52
+ y(() => {
53
+ let e = v;
54
+ P();
55
+ let t = C[e(294)];
56
+ if (!t) return;
57
+ let n = new MutationObserver(P);
58
+ return n.observe(t, {
59
+ childList: !0,
60
+ subtree: !0,
61
+ attributes: !0,
62
+ attributeFilter: [e(268), e(238)]
63
+ }), () => n.disconnect();
64
+ }, [P]);
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());
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];
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) => {
81
+ let n = new Map(t);
82
+ return n.delete(e), n;
83
+ }), []);
84
+ y(() => {
85
+ let e = v, t = C[e(294)];
86
+ if (!j || !t) {
87
+ B((t) => t[e(305)] ? [] : t);
88
+ return;
89
+ }
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;
97
+ return {
98
+ id: i,
99
+ sep: r?.[t(280)](t(222)) ?? !1,
100
+ w: o
101
+ };
102
+ }), l = (e) => e.reduce((e, t) => e + t.w, 0) + a * Math.max(e[n(305)] - 1, 0), u = c, d = [];
103
+ if (l(c) > o + .5) {
104
+ for (let e = c[n(305)] - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
105
+ let t = c[e].id;
106
+ t && (d.unshift(t), u = u[n(267)]((t) => t !== c[e]));
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);
111
+ }
112
+ }
113
+ let f = d[n(307)]("|");
114
+ B((e) => e[n(307)]("|") === f ? e : d);
115
+ };
116
+ n();
117
+ let r = new ResizeObserver(n);
118
+ r[e(299)](t);
119
+ let i = new MutationObserver(n);
120
+ return i[e(299)](t, { childList: !0 }), () => {
121
+ r[e(219)](), i.disconnect();
122
+ };
123
+ }, [j, L]);
124
+ let K = z.map((e) => ({
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(() => ({
128
+ size: o,
129
+ orientation: i,
130
+ overflow: j,
131
+ hidden: V,
132
+ register: W,
133
+ unregister: G
134
+ }), [
135
+ o,
136
+ i,
137
+ j,
138
+ V,
139
+ W,
140
+ G
141
+ ]);
142
+ return E(O[v(253)], {
143
+ value: q,
144
+ children: D(v(221), {
145
+ ref: C,
146
+ role: v(303),
147
+ "aria-label": n,
148
+ "aria-labelledby": r,
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),
151
+ style: _,
152
+ onFocus: F,
153
+ onKeyDown: I,
154
+ children: [t, j && E(v(246), {
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,
161
+ trigger: E(M, {
162
+ label: h,
163
+ icon: E(w, {}),
164
+ collapsible: !1
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)]?.(),
171
+ children: t.label
172
+ }, e) : E(l, {
173
+ icon: t[v(225)],
174
+ shortcut: t.shortcut,
175
+ disabled: t[v(268)],
176
+ checked: t[v(258)],
177
+ closeOnSelect: !0,
178
+ onCheckedChange: () => t[v(301)]?.(),
179
+ children: t.label
180
+ }, e))
181
+ })
182
+ })]
183
+ })
184
+ });
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(() => {
191
+ let e = N;
192
+ V && W && W(B, {
193
+ label: r,
194
+ icon: b,
195
+ shortcut: U?.[e(302)]("\n"),
196
+ pressed: I ? L : void 0,
197
+ disabled: w,
198
+ click: () => F[e(294)]?.click()
199
+ });
200
+ }, [
201
+ V,
202
+ W,
203
+ B,
204
+ r,
205
+ b,
206
+ U,
207
+ I,
208
+ L,
209
+ w
210
+ ]), g(() => V && G ? () => G(B) : void 0, [
211
+ V,
212
+ G,
213
+ B
214
+ ]);
215
+ let K = E(o, {
216
+ ref: F,
217
+ variant: a,
218
+ size: P?.[N(244)] ?? "md",
219
+ icon: b,
220
+ iconOnly: z,
221
+ shortcut: d,
222
+ "aria-label": z ? r : void 0,
223
+ "aria-pressed": I ? L : void 0,
224
+ "data-state": I ? L ? "on" : "off" : void 0,
225
+ "data-toolbar-id": V ? B : void 0,
226
+ disabled: w,
227
+ className: s(N(254), C),
228
+ style: H ? {
229
+ ...A,
230
+ display: N(271)
231
+ } : A,
232
+ onClick: (e) => {
233
+ k?.(e), I && !e.defaultPrevented && R(!L);
234
+ },
235
+ ...j,
236
+ children: S
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, {
240
+ keys: d,
241
+ size: "sm"
242
+ })] }),
243
+ side: p ?? (P?.[N(296)] === "vertical" ? N(252) : "top"),
244
+ children: K
245
+ });
246
+ });
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 });
251
+ }, [
252
+ a,
253
+ o,
254
+ i
255
+ ]), g(() => a && s ? () => s(i) : void 0, [
256
+ a,
257
+ s,
258
+ i
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,
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),
268
+ decorative: !1
269
+ })
270
+ });
271
+ }
272
+ function P() {
273
+ let t = e;
274
+ return E(t(246), {
275
+ className: t(251),
276
+ "data-toolbar-spacer": "",
277
+ "aria-hidden": !0
278
+ });
279
+ }
280
+ j[e(275)] = M, j[e(274)] = N, j[e(228)] = P;
281
+ export { j as Toolbar, M as ToolbarButton, N as ToolbarSeparator, P as ToolbarSpacer };