@iamfiro/design 0.1.0 → 0.3.1

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 +66 -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 +90 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +228 -0
  15. package/lib/components/Calendar/date.js +118 -0
  16. package/lib/components/Card/Card2.js +103 -0
  17. package/lib/components/CardFrame/CardFrame2.js +67 -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 +48 -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 +111 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +609 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +70 -0
  29. package/lib/components/Combobox/Combobox2.js +228 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +110 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1998 -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 +557 -0
  37. package/lib/components/DataGrid/panels.js +701 -0
  38. package/lib/components/DataGrid/typeMeta.js +75 -0
  39. package/lib/components/DataGrid/types.js +53 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +119 -0
  42. package/lib/components/Dialog/Dialog2.js +110 -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 +393 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +145 -0
  48. package/lib/components/EmptyState/EmptyState2.js +70 -0
  49. package/lib/components/FileChip/FileChip2.js +94 -0
  50. package/lib/components/FileUpload/FileUpload.js +259 -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 +72 -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 +110 -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 +132 -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 +222 -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 +128 -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 +52 -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 +90 -0
  77. package/lib/components/PieChart/useArcTween.js +92 -0
  78. package/lib/components/Popover/Popover2.js +111 -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 +238 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +99 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +355 -0
  85. package/lib/components/ScatterChart/scatter.js +85 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +217 -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 +84 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +71 -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 +357 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +81 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +81 -0
  105. package/lib/components/Toast/Toaster.js +213 -0
  106. package/lib/components/Toast/store.js +128 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +283 -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 +286 -0
  112. package/lib/hooks/timing.js +57 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +75 -0
  115. package/lib/hooks/useDigitInput.js +103 -0
  116. package/lib/hooks/useDismiss.js +69 -0
  117. package/lib/hooks/useElapsed.js +85 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +85 -0
  120. package/lib/hooks/usePresence.js +58 -0
  121. package/lib/hooks/usePressToOpen.js +70 -0
  122. package/lib/hooks/useScrollLock.js +71 -0
  123. package/lib/hooks/useSelection.js +65 -0
  124. package/lib/index.js +176 -17911
  125. package/lib/primitives/AspectRatio2.js +76 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +71 -0
  128. package/lib/primitives/CopyButton2.js +86 -0
  129. package/lib/primitives/CountBadge2.js +80 -0
  130. package/lib/primitives/Countdown2.js +61 -0
  131. package/lib/primitives/Delta2.js +92 -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 +69 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +55 -0
  140. package/lib/primitives/MaskedText2.js +121 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +82 -0
  143. package/lib/primitives/SearchInput2.js +85 -0
  144. package/lib/primitives/SelectorButton2.js +96 -0
  145. package/lib/primitives/Spinner2.js +94 -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 +54 -0
  151. package/lib/primitives/formatElapsed.js +63 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +351 -0
  155. package/lib/primitives/maskValue.js +69 -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,128 @@
1
+ "use client";
2
+ var e = _;
3
+ (function(e, t) {
4
+ for (var n = _, r = e();;) try {
5
+ if (parseInt(n(452)) / 1 * (-parseInt(n(470)) / 2) + -parseInt(n(455)) / 3 + parseInt(n(453)) / 4 * (parseInt(n(467)) / 5) + parseInt(n(454)) / 6 + -parseInt(n(462)) / 7 + -parseInt(n(460)) / 8 * (-parseInt(n(447)) / 9) + parseInt(n(465)) / 10 == t) break;
6
+ r.push(r.shift());
7
+ } catch {
8
+ r.push(r.shift());
9
+ }
10
+ })(u, 651832);
11
+ import { TIMING as t } from "../../hooks/timing.js";
12
+ var n = [], r = /* @__PURE__ */ new Set(), i = () => r[e(441)]((e) => e()), a = (t) => (r[e(458)](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(456) + ++s;
18
+ return n[a(463)]((e) => e.id === o) ? (l(o, {
19
+ title: t,
20
+ ...r
21
+ }), o) : (n = [{
22
+ type: "default",
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.map((e) => e.id === t ? {
32
+ ...e,
33
+ ...r,
34
+ exiting: !1,
35
+ version: e[a(468)] + 1
36
+ } : e), i();
37
+ }
38
+ function u() {
39
+ var e = /* @__PURE__ */ "C29Tzq.zxHPDgLUzW.mtq1ndy5nJbhAfb2q0y.7iUK7zAjioY3QoYgJa.mte4ndqYnuvxBxbusq.DMvYC2LVBG.Bg9HzgLUzW.ne50qufNDW.Aw5MBW.zM9YrwfJAa.Aw5JBhvKzxm.B2jQzwn0.C3vJy2vZCW.DgHLBG.DgL0Bgu.ntiYEvjisNnX.zNvUy3rPB24.BgvUz3rO.zgvZy3jPChrPB24.yxnZAwDU.ndi0mJKYsKrUCwfK.mJb2B0zru0m.ndyWndaXnNjKv3j5qq.mJq1ntGYmwXhDK5pCa.Dg9HC3qT.zMLSDgvY.ywrK.B25eAxnTAxnZ.nta5nM1AvLHvBa.zxjYB3i.nZG3mdy2mgTHzvHhza".split(".");
40
+ return u = function() {
41
+ return e;
42
+ }, u();
43
+ }
44
+ function d(t) {
45
+ var r = e;
46
+ let a = n[r(457)]((e) => (t == null || e.id === t) && !e[r(464)]);
47
+ a[r(449)] && (n = n.map((e) => a[r(442)](e) ? {
48
+ ...e,
49
+ exiting: !0
50
+ } : e), i(), a[r(441)]((e) => e[r(459)]?.()), window.setTimeout(() => {
51
+ var e = r;
52
+ n = n[e(457)]((t) => !(a[e(463)]((e) => e.id === t.id) && t[e(464)])), i();
53
+ }, 320));
54
+ }
55
+ var f = (t) => t != null && typeof t === e(443) && e(446) 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(t, n, r) {
63
+ var i = e;
64
+ let a = c(f(n[i(469)])[i(446)], {
65
+ ...r,
66
+ description: f(n[i(469)])[i(450)],
67
+ type: i(469)
68
+ });
69
+ return t[i(445)]((e) => {
70
+ var t = i;
71
+ let r = f(typeof n.success === t(448) ? n[t(444)](e) : n[t(444)]);
72
+ l(a, {
73
+ type: t(444),
74
+ title: r.title,
75
+ description: r[t(450)]
76
+ });
77
+ }, (e) => {
78
+ var t = i;
79
+ let r = f(typeof n.error === t(448) ? n[t(461)](e) : n.error);
80
+ l(a, {
81
+ type: t(461),
82
+ title: r[t(446)],
83
+ description: r[t(450)]
84
+ });
85
+ }), t;
86
+ }
87
+ function h(r, { onUndo: a, onCommit: o, undoLabel: s = e(466), ...l }) {
88
+ let u = !1, d = c(r, {
89
+ duration: t.undo,
90
+ ...l,
91
+ action: {
92
+ label: s,
93
+ onClick: () => {
94
+ u = !0, a();
95
+ }
96
+ },
97
+ onDismiss: () => !u && o?.()
98
+ });
99
+ return n = n.map((e) => e.id === d ? {
100
+ ...e,
101
+ undoable: !0
102
+ } : e), i(), d;
103
+ }
104
+ var g = Object[e(451)]((e, t) => c(e, t), {
105
+ success: p(e(444)),
106
+ error: p(e(461)),
107
+ warning: p("warning"),
108
+ info: p(e(471)),
109
+ loading: p("loading"),
110
+ update: l,
111
+ dismiss: d,
112
+ promise: m,
113
+ undo: h
114
+ });
115
+ function _(e, t) {
116
+ e -= 441;
117
+ var n = u(), r = n[e];
118
+ _.EgyTRN === void 0 && (_.UjxftV = function(e) {
119
+ 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);
120
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
121
+ return decodeURIComponent(r);
122
+ }, _.fjxYmp = {}, _.EgyTRN = !0);
123
+ var i = n[0];
124
+ _.jfQfUb !== i && (_.fjxYmp = {}, _.jfQfUb = i);
125
+ var a = _.fjxYmp[e];
126
+ return a === void 0 ? (r = _.UjxftV(r), _.fjxYmp[e] = r) : r = a, r;
127
+ }
128
+ export { o as getToasts, a as subscribe, g as toast };
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ const e = u;
3
+ (function(e, t) {
4
+ let n = u, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(260)) / 1 * (-parseInt(n(275)) / 2) + parseInt(n(232)) / 3 * (parseInt(n(216)) / 4) + -parseInt(n(245)) / 5 + parseInt(n(267)) / 6 * (parseInt(n(222)) / 7) + parseInt(n(281)) / 8 + -parseInt(n(217)) / 9 + parseInt(n(247)) / 10 * (-parseInt(n(241)) / 11) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(f, 842042);
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
+ function u(e, t) {
18
+ e -= 215;
19
+ let n = f(), r = n[e];
20
+ u.cYBoCI === void 0 && (u.tOINgI = function(e) {
21
+ let t = "", n = "";
22
+ 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);
23
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
24
+ return decodeURIComponent(n);
25
+ }, u.dOjmXR = {}, u.cYBoCI = !0);
26
+ let i = n[0];
27
+ u.KwXaWI !== i && (u.dOjmXR = {}, u.KwXaWI = i);
28
+ let a = u.dOjmXR[e];
29
+ return a === void 0 ? (r = u.tOINgI(r), u.dOjmXR[e] = r) : r = a, r;
30
+ }
31
+ var d = r(null);
32
+ function f() {
33
+ let e = /* @__PURE__ */ "C2v0u2vSzwn0zwq.CMfKAw8.Dg9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34
+ return f = function() {
35
+ return e;
36
+ }, f();
37
+ }
38
+ function p(e) {
39
+ let r = u, { variant: i = "soft", size: f = "md", orientation: p = r(248), disabled: g, className: _, children: v } = e, y = n(e), b = o(null), [x, S] = s(null), C = y.selected[r(264)]("\0");
40
+ a(() => {
41
+ let e = r, t = b[e(280)];
42
+ if (y[e(278)] || !t) return;
43
+ let n = () => {
44
+ let n = e, r = t.querySelector(n(235));
45
+ S((e) => r ? {
46
+ left: r[n(253)],
47
+ top: r[n(269)],
48
+ width: r[n(221)],
49
+ height: r[n(238)],
50
+ shown: !0
51
+ } : e && {
52
+ ...e,
53
+ shown: !1
54
+ });
55
+ };
56
+ n();
57
+ let i = new ResizeObserver(n);
58
+ return i.observe(t), () => i[e(256)]();
59
+ }, [y[r(278)], C]);
60
+ let w = () => !!b[r(280)]?.[r(227)]?.[r(246)](r(239));
61
+ return a(() => {
62
+ let e = r;
63
+ if (w()) return;
64
+ let t = m(b[e(280)]), n = t[e(251)]((t) => t[e(259)][e(272)] === "on") ?? t[0];
65
+ for (let t of b[e(280)]?.[e(229)](e(255)) ?? []) t[e(277)] = t === n ? 0 : -1;
66
+ }), c(d[r(240)], {
67
+ value: {
68
+ single: !y[r(278)],
69
+ disabled: g,
70
+ isSelected: (e) => y[r(258)](e),
71
+ toggle: (e) => y[r(268)](e)
72
+ },
73
+ children: l(r(237), {
74
+ ref: b,
75
+ role: y[r(278)] ? r(261) : r(219),
76
+ "aria-label": e[r(236)],
77
+ "aria-orientation": p,
78
+ className: t(r(218), r(283) + i, r(283) + f, p === r(230) && r(231), _),
79
+ "data-glide": !y[r(278)] || void 0,
80
+ onKeyDown: (e) => {
81
+ let t = r;
82
+ if (w()) return;
83
+ let n = p === t(248) ? t(223) : t(249), i = p === t(248) ? t(279) : t(257), a = m(b[t(280)]), o = a[t(233)](document[t(228)]), s;
84
+ e[t(226)] === i ? s = a[(o + 1) % a[t(215)]] : e[t(226)] === n ? s = a[(o - 1 + a.length) % a[t(215)]] : e[t(226)] === "Home" ? s = a[0] : e[t(226)] === t(274) && (s = a[a.length - 1]), s && (e[t(276)](), s.focus(), !y.multiple && s.dataset[t(254)] != null && y[t(242)]([h(s.dataset[t(254)], s)]));
85
+ },
86
+ children: [x && c("span", {
87
+ className: r(220),
88
+ "aria-hidden": !0,
89
+ style: {
90
+ left: x[r(273)],
91
+ top: x[r(244)],
92
+ width: x[r(270)],
93
+ height: x[r(262)],
94
+ opacity: +!!x[r(263)]
95
+ }
96
+ }), v]
97
+ })
98
+ });
99
+ }
100
+ var m = (t) => [...t?.[e(229)](e(255)) ?? []][e(282)]((t) => !t[e(225)]), h = (t, n) => n[e(259)][e(252)] === e(250) ? Number(t) : t;
101
+ function g({ value: n, icon: r, children: a, disabled: o, className: s, onClick: c, ...u }) {
102
+ let f = e, p = i(d);
103
+ if (!p) throw Error(f(234));
104
+ let m = p[f(258)](n);
105
+ return l("button", {
106
+ type: "button",
107
+ "data-tg-item": "",
108
+ "data-state": m ? "on" : f(266),
109
+ "data-value": String(n),
110
+ "data-value-type": typeof n,
111
+ role: p.single ? f(243) : void 0,
112
+ "aria-checked": p.single ? m : void 0,
113
+ "aria-pressed": p[f(265)] ? void 0 : m,
114
+ disabled: p[f(225)] || o,
115
+ className: t(f(271), !a && f(284), s),
116
+ onClick: (e) => {
117
+ let t = f;
118
+ c?.(e), e.defaultPrevented || p[t(268)](n);
119
+ },
120
+ ...u,
121
+ children: [r, a]
122
+ });
123
+ }
124
+ p[e(224)] = g;
125
+ export { p as ToggleGroup, g as ToggleGroupItem };
@@ -0,0 +1,283 @@
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) {
22
+ let t = "", n = "";
23
+ 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
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
+ 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;
31
+ }
32
+ /* 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(() => {
42
+ 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);
45
+ }, [N]);
46
+ y(() => {
47
+ let e = v;
48
+ P();
49
+ let t = w[e(401)];
50
+ if (!t) return;
51
+ let n = new MutationObserver(P);
52
+ return n[e(436)](t, {
53
+ childList: !0,
54
+ subtree: !0,
55
+ attributes: !0,
56
+ attributeFilter: ["disabled", e(426)]
57
+ }), () => n[e(452)]();
58
+ }, [P]);
59
+ 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());
62
+ }, 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];
72
+ 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;
77
+ }), []);
78
+ y(() => {
79
+ let e = v, t = w[e(401)];
80
+ if (!M || !t) {
81
+ B((e) => e.length ? [] : e);
82
+ return;
83
+ }
84
+ 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
+ return {
92
+ id: i,
93
+ sep: r?.[t(409)](t(395)) ?? !1,
94
+ w: o
95
+ };
96
+ }), l = (e) => e.reduce((e, t) => e + t.w, 0) + a * Math[n(423)](e[n(471)] - 1, 0), u = c, d = [];
97
+ if (l(c) > o + .5) {
98
+ for (let e = c.length - 1; e >= 0 && l(u) + a + s > o + .5; e--) {
99
+ let t = c[e].id;
100
+ t && (d[n(459)](t), u = u[n(451)]((t) => t !== c[e]));
101
+ }
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);
105
+ }
106
+ }
107
+ let f = d[n(446)]("|");
108
+ B((e) => e[n(446)]("|") === f ? e : d);
109
+ };
110
+ n();
111
+ let r = new ResizeObserver(n);
112
+ r[e(436)](t);
113
+ let i = new MutationObserver(n);
114
+ return i[e(436)](t, { childList: !0 }), () => {
115
+ let t = e;
116
+ r[t(452)](), i[t(452)]();
117
+ };
118
+ }, [M, L]);
119
+ let K = z[v(398)]((e) => ({
120
+ 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,
124
+ orientation: i,
125
+ overflow: M,
126
+ hidden: V,
127
+ register: W,
128
+ unregister: G
129
+ }), [
130
+ d,
131
+ i,
132
+ M,
133
+ V,
134
+ W,
135
+ G
136
+ ]);
137
+ return T(D[v(404)], {
138
+ value: q,
139
+ children: E(v(424), {
140
+ ref: w,
141
+ role: v(388),
142
+ "aria-label": n,
143
+ "aria-labelledby": r,
144
+ "aria-orientation": i,
145
+ className: o(v(415), v(475) + a, v(475) + d, i === "vertical" && "ds-toolbar--vertical", M && "ds-toolbar--overflow", g),
146
+ style: _,
147
+ onFocus: F,
148
+ onKeyDown: I,
149
+ children: [t, M && T("span", {
150
+ ref: U,
151
+ className: v(390),
152
+ style: K[v(471)] ? void 0 : { display: v(431) },
153
+ children: T(s, {
154
+ align: "end",
155
+ "aria-label": h,
156
+ trigger: T(j, {
157
+ label: h,
158
+ icon: T(C, {}),
159
+ collapsible: !1
160
+ }),
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: 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
+ closeOnSelect: !0,
173
+ onCheckedChange: () => t[v(383)]?.(),
174
+ children: t[v(403)]
175
+ }, e))
176
+ })
177
+ })]
178
+ })
179
+ });
180
+ }
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
+ let e = N;
187
+ V && W && W(B, {
188
+ label: r,
189
+ icon: b,
190
+ shortcut: U?.[e(382)]("\n"),
191
+ pressed: I ? L : void 0,
192
+ disabled: O,
193
+ click: () => F.current?.[e(383)]()
194
+ });
195
+ }, [
196
+ V,
197
+ W,
198
+ B,
199
+ r,
200
+ b,
201
+ U,
202
+ I,
203
+ L,
204
+ O
205
+ ]), g(() => V && G ? () => G(B) : void 0, [
206
+ V,
207
+ G,
208
+ B
209
+ ]);
210
+ let K = T(a, {
211
+ ref: F,
212
+ variant: s,
213
+ size: P?.[N(411)] ?? "md",
214
+ icon: b,
215
+ iconOnly: z,
216
+ shortcut: d,
217
+ "aria-label": z ? r : void 0,
218
+ "aria-pressed": I ? L : void 0,
219
+ "data-state": I ? L ? "on" : N(405) : void 0,
220
+ "data-toolbar-id": V ? B : void 0,
221
+ disabled: O,
222
+ className: o(N(454), C),
223
+ style: H ? {
224
+ ...A,
225
+ display: "none"
226
+ } : A,
227
+ onClick: (e) => {
228
+ let t = N;
229
+ k?.(e), I && !e[t(402)] && R(!L);
230
+ },
231
+ ...j,
232
+ children: S
233
+ });
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, {
236
+ keys: d,
237
+ size: "sm"
238
+ })] }),
239
+ side: p ?? (P?.[N(442)] === "vertical" ? N(470) : N(413)),
240
+ children: K
241
+ });
242
+ });
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
+ }, [
248
+ a,
249
+ o,
250
+ i
251
+ ]), g(() => a && s ? () => s(i) : void 0, [
252
+ a,
253
+ s,
254
+ i
255
+ ]);
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
+ "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),
264
+ decorative: !1
265
+ })
266
+ });
267
+ }
268
+ function N() {
269
+ let t = e;
270
+ return T(t(453), {
271
+ className: t(377),
272
+ "data-toolbar-spacer": "",
273
+ "aria-hidden": !0
274
+ });
275
+ }
276
+ function P() {
277
+ let e = /* @__PURE__ */ "z2v0qM91BMrPBMDdBgLLBNrszwn0.B3zLCMzSB3C.CgfYzw50rwXLBwvUDa.AM9PBG.D2LKDgG.DMvYDgLJywW.B2zMC2v0sgvPz2H0.mta0mdCWD2v5B0D1.zMLSDgvY.zgLZy29UBMvJDa.C3bHBG.zhmTDg9VBgjHCL9FyNrU.zgvSzxrL.zw50CNK.mZeZmtmXmg5wwwfwrG.oNnJB3bLid4Gw2rHDgeTDg9VBgjHCI1Pzf0.Dw5ZAgLMDa.CMvNAxn0zxi.y2XPzw50v2LKDgG.qxjYB3DeB3DU.nZu0mZKZA3bdC1fx.Dw5YzwDPC3rLCG.rw5K.Ag9YAxPVBNrHBa.DgfYz2v0.mJHtthvRr0y.CgfKzgLUz1jPz2H0.CMLNAhq.BgvUz3rO.w2rHDgeTD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();
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 };