@iamfiro/design 0.3.2 → 0.3.5

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 (163) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/app-shell/AGENTS.md +99 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/lib/components/Accordion/Accordion2.js +74 -74
  6. package/lib/components/ActionBar/ActionBar2.js +44 -42
  7. package/lib/components/Alert/Alert2.js +67 -67
  8. package/lib/components/AppShell/AppShell2.js +72 -66
  9. package/lib/components/AreaChart/AreaChart.js +45 -45
  10. package/lib/components/BarChart/BarChart2.js +128 -128
  11. package/lib/components/BarList/BarList2.js +105 -105
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
  13. package/lib/components/Calendar/Calendar2.js +197 -197
  14. package/lib/components/Calendar/DatePicker2.js +100 -100
  15. package/lib/components/Calendar/date.js +47 -70
  16. package/lib/components/Card/Card2.js +101 -74
  17. package/lib/components/CardFrame/CardFrame2.js +52 -56
  18. package/lib/components/Chart/ChartParts.js +88 -88
  19. package/lib/components/Chart/chart2.js +63 -63
  20. package/lib/components/Chart/useChartInteraction.js +43 -43
  21. package/lib/components/ChatBubble/ChatBubble2.js +111 -111
  22. package/lib/components/ChatBubble/formatChatTime.js +38 -43
  23. package/lib/components/ChatComposer/ChatComposer2.js +96 -96
  24. package/lib/components/CodeBlock/CodeBlock2.js +65 -65
  25. package/lib/components/CodeBlock/highlight.js +84 -84
  26. package/lib/components/ColorPicker/ColorPicker2.js +263 -263
  27. package/lib/components/ColorPicker/color.js +92 -92
  28. package/lib/components/ColorPicker/presets.js +35 -39
  29. package/lib/components/Combobox/Combobox2.js +134 -134
  30. package/lib/components/CommandMenu/CommandMenu.js +130 -131
  31. package/lib/components/Comment/Comment2.js +64 -63
  32. package/lib/components/ContextMenu/ContextMenu2.js +84 -84
  33. package/lib/components/DataGrid/DataGrid2.js +1182 -1180
  34. package/lib/components/DataGrid/GridPopover.js +84 -84
  35. package/lib/components/DataGrid/anchor.js +29 -28
  36. package/lib/components/DataGrid/model.js +308 -307
  37. package/lib/components/DataGrid/panels.js +398 -399
  38. package/lib/components/DataGrid/typeMeta.js +41 -40
  39. package/lib/components/DataGrid/types.js +39 -40
  40. package/lib/components/DescriptionList/DescriptionList2.js +105 -105
  41. package/lib/components/Dialog/AlertDialog.js +90 -89
  42. package/lib/components/Dialog/Dialog2.js +71 -72
  43. package/lib/components/Dialog/modal.js +62 -60
  44. package/lib/components/Drawer/Drawer2.js +167 -166
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
  46. package/lib/components/DropdownMenu/menuCore.js +29 -28
  47. package/lib/components/Dropzone/Dropzone2.js +78 -77
  48. package/lib/components/EmptyState/EmptyState2.js +57 -57
  49. package/lib/components/FileChip/FileChip2.js +53 -77
  50. package/lib/components/FileUpload/FileUpload.js +168 -167
  51. package/lib/components/FilterChips/FilterChips2.js +60 -60
  52. package/lib/components/FunnelChart/FunnelChart2.js +174 -174
  53. package/lib/components/FunnelChart/funnel.js +44 -42
  54. package/lib/components/Highlight/Highlight2.js +55 -55
  55. package/lib/components/HoverCard/HoverCard.js +71 -96
  56. package/lib/components/InlineDiff/InlineDiff2.js +128 -129
  57. package/lib/components/InlineDiff/diff.js +79 -79
  58. package/lib/components/InlineDiff/useDiffReview.js +61 -62
  59. package/lib/components/Kanban/Kanban2.js +387 -389
  60. package/lib/components/Kanban/KanbanCard.js +84 -84
  61. package/lib/components/Kanban/move.js +32 -25
  62. package/lib/components/LineChart/LineChart2.js +228 -228
  63. package/lib/components/List/List2.js +62 -62
  64. package/lib/components/Listbox/Listbox2.js +92 -92
  65. package/lib/components/Marker/Marker2.js +50 -56
  66. package/lib/components/Menubar/Menubar2.js +117 -116
  67. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
  69. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  70. package/lib/components/NumberStepper/NumberStepper2.js +60 -60
  71. package/lib/components/OtpInput/OtpInput2.js +90 -89
  72. package/lib/components/Pagination/Pagination2.js +105 -105
  73. package/lib/components/Pagination/paginationRange.js +37 -37
  74. package/lib/components/PhoneInput/PhoneInput.js +75 -76
  75. package/lib/components/PieChart/PieChart2.js +166 -166
  76. package/lib/components/PieChart/arc.js +71 -69
  77. package/lib/components/PieChart/useArcTween.js +60 -62
  78. package/lib/components/Popover/Popover2.js +85 -86
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
  80. package/lib/components/Rating/Rating2.js +90 -89
  81. package/lib/components/Resizable/Resizable2.js +128 -129
  82. package/lib/components/Resizable/layout.js +51 -51
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
  84. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  85. package/lib/components/ScatterChart/scatter.js +49 -52
  86. package/lib/components/ScrollArea/ScrollArea2.js +115 -117
  87. package/lib/components/Select/Select2.js +82 -82
  88. package/lib/components/Sidebar/Sidebar2.js +91 -85
  89. package/lib/components/Sidebar/rail.js +43 -0
  90. package/lib/components/Skeleton/Skeleton2.js +63 -64
  91. package/lib/components/Slider/Slider2.js +65 -66
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
  93. package/lib/components/SparkChart/SparkChart2.js +126 -127
  94. package/lib/components/SparkChart/spark.js +66 -42
  95. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  96. package/lib/components/SplitView/SplitView2.js +51 -51
  97. package/lib/components/Stat/Stat2.js +79 -79
  98. package/lib/components/StepList/StepList2.js +75 -75
  99. package/lib/components/Table/Table2.js +71 -71
  100. package/lib/components/Tabs/Tabs2.js +74 -74
  101. package/lib/components/TagInput/TagInput2.js +223 -221
  102. package/lib/components/TimePicker/TimePicker2.js +197 -195
  103. package/lib/components/TimePicker/time.js +59 -56
  104. package/lib/components/Timeline/Timeline2.js +195 -195
  105. package/lib/components/Timeline/scale.js +64 -66
  106. package/lib/components/Toast/Toaster.js +139 -139
  107. package/lib/components/Toast/store.js +72 -76
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  109. package/lib/components/Toolbar/Toolbar2.js +165 -164
  110. package/lib/components/Tracker/Tracker2.js +72 -72
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
  112. package/lib/components/TreeView/TreeView2.js +152 -151
  113. package/lib/hooks/timing.js +34 -36
  114. package/lib/hooks/useControllableState.js +29 -30
  115. package/lib/hooks/useCountdown.js +51 -53
  116. package/lib/hooks/useDigitInput.js +81 -55
  117. package/lib/hooks/useDismiss.js +53 -56
  118. package/lib/hooks/useElapsed.js +48 -49
  119. package/lib/hooks/useFloating.js +36 -36
  120. package/lib/hooks/useFocusTrap.js +32 -32
  121. package/lib/hooks/usePresence.js +49 -49
  122. package/lib/hooks/usePressToOpen.js +40 -40
  123. package/lib/hooks/useScrollLock.js +50 -49
  124. package/lib/hooks/useSelection.js +42 -47
  125. package/lib/index.js +138 -139
  126. package/lib/primitives/AspectRatio2.js +58 -57
  127. package/lib/primitives/BrandIcon.js +210 -179
  128. package/lib/primitives/ColorDot2.js +42 -41
  129. package/lib/primitives/CopyButton2.js +59 -58
  130. package/lib/primitives/CountBadge2.js +58 -63
  131. package/lib/primitives/Countdown2.js +38 -37
  132. package/lib/primitives/Delta2.js +37 -37
  133. package/lib/primitives/Elapsed.js +42 -40
  134. package/lib/primitives/FileIcon2.js +102 -102
  135. package/lib/primitives/Flag2.js +124 -124
  136. package/lib/primitives/IconStack2.js +45 -23
  137. package/lib/primitives/IconTile2.js +45 -41
  138. package/lib/primitives/Kbd2.js +48 -48
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +40 -42
  141. package/lib/primitives/MaskedText2.js +50 -50
  142. package/lib/primitives/Progress2.js +78 -77
  143. package/lib/primitives/RelativeTime.js +55 -58
  144. package/lib/primitives/SearchInput2.js +72 -68
  145. package/lib/primitives/SelectorButton2.js +60 -61
  146. package/lib/primitives/Spinner2.js +48 -49
  147. package/lib/primitives/StatusIcon2.js +69 -69
  148. package/lib/primitives/Swatch2.js +65 -69
  149. package/lib/primitives/Tooltip2.js +92 -92
  150. package/lib/primitives/Typography2.js +37 -37
  151. package/lib/primitives/formatCountdown.js +38 -38
  152. package/lib/primitives/formatElapsed.js +43 -45
  153. package/lib/primitives/formatRelativeTime.js +54 -54
  154. package/lib/primitives/hotkey.js +77 -77
  155. package/lib/primitives/index.js +162 -161
  156. package/lib/primitives/maskValue.js +54 -51
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  159. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  160. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  161. package/lib/types/components/index.d.ts +1 -0
  162. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  163. package/package.json +1 -1
@@ -1,109 +1,105 @@
1
1
  "use client";
2
- function e(t, n) {
3
- t -= 192;
4
- var r = h(), i = r[t];
5
- e.PrJWzb === void 0 && (e.PAoWpC = function(e) {
6
- 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);
7
- for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
8
- return decodeURIComponent(r);
9
- }, e.CaqlxU = {}, e.PrJWzb = !0);
10
- var a = r[0];
11
- e.kaDrxZ !== a && (e.CaqlxU = {}, e.kaDrxZ = a);
12
- var o = e.CaqlxU[t];
13
- return o === void 0 ? (i = e.PAoWpC(i), e.CaqlxU[t] = i) : i = o, i;
2
+ var e = u;
3
+ function t() {
4
+ var e = /* @__PURE__ */ "mJjfCLPlDNu.DgHLBG.zM9YrwfJAa.BgvUz3rO.mtKZsencthzV.7iUK7zAjioY3QoYgJa.mtGZvuDUv2zI.mtmYodrHuKPdyxy.BwfW.Dg9HC3qT.mJqZA2Hcyuj3.mZi5mtiWthzXwKfs.mtaYodv5wMHtCgq.DgL0Bgu.mtyYnMHPDLbZEa.B2jQzwn0.mZq1mZq2oe5sA2vIrG.yxnZAwDU.ywrK.Bg9HzgLUzW.mJrOtfDcrey.zMLSDgvY.Dw5KBW.mJHHzfHJvLi.C3vJy2vZCW.Aw5JBhvKzxm.zxHPDgLUzW.zgvZy3jPChrPB24.zNvUy3rPB24.zxjYB3i.C29Tzq.ndeYneDgvuLzEG.D2fYBMLUzW.zgvMyxvSDa.mti3mdK2ntHszvHvthO.nti0mJuXCNjeAfHk".split(".");
5
+ return t = function() {
6
+ return e;
7
+ }, t();
14
8
  }
15
- var t = e;
16
- (function(t, n) {
17
- for (var r = e, i = t();;) try {
18
- if (parseInt(r(203)) / 1 + -parseInt(r(210)) / 2 * (parseInt(r(219)) / 3) + -parseInt(r(195)) / 4 * (-parseInt(r(207)) / 5) + -parseInt(r(224)) / 6 + -parseInt(r(196)) / 7 * (-parseInt(r(220)) / 8) + -parseInt(r(200)) / 9 * (-parseInt(r(209)) / 10) + parseInt(r(198)) / 11 * (-parseInt(r(193)) / 12) == n) break;
19
- i.push(i.shift());
9
+ (function(e, t) {
10
+ for (var n = u, r = e();;) try {
11
+ if (parseInt(n(158)) / 1 * (parseInt(n(149)) / 2) + parseInt(n(160)) / 3 * (-parseInt(n(161)) / 4) + -parseInt(n(166)) / 5 * (-parseInt(n(168)) / 6) + -parseInt(n(153)) / 7 * (-parseInt(n(174)) / 8) + parseInt(n(164)) / 9 * (parseInt(n(165)) / 10) + parseInt(n(154)) / 11 * (parseInt(n(170)) / 12) + parseInt(n(152)) / 13 * (-parseInt(n(177)) / 14) == t) break;
12
+ r.push(r.shift());
20
13
  } catch {
21
- i.push(i.shift());
14
+ r.push(r.shift());
22
15
  }
23
- })(h, 997957);
16
+ })(t, 486381);
24
17
  import { TIMING as n } from "../../hooks/timing.js";
25
- var r = [], i = /* @__PURE__ */ new Set(), a = () => i.forEach((e) => e()), o = (t) => {
26
- var n = e;
27
- return i[n(204)](t), () => {
28
- i[n(213)](t);
29
- };
30
- }, s = () => r, c = 0;
18
+ var r = [], i = /* @__PURE__ */ new Set(), a = () => i[e(156)]((e) => e()), o = (t) => (i[e(172)](t), () => {
19
+ i.delete(t);
20
+ }), s = () => r, c = 0;
31
21
  function l(t, n = {}) {
32
22
  var i = e;
33
- let o = n.id ?? i(211) + ++c;
34
- return r.some((e) => e.id === o) ? (u(o, {
23
+ let o = n.id ?? i(163) + ++c;
24
+ return r[i(184)]((e) => e.id === o) ? (d(o, {
35
25
  title: t,
36
26
  ...n
37
27
  }), o) : (r = [{
38
- type: i(215),
28
+ type: i(151),
39
29
  ...n,
40
30
  id: o,
41
31
  title: t,
42
32
  version: 0
43
33
  }, ...r], a(), o);
44
34
  }
45
- function u(t, n) {
46
- var i = e;
47
- r = r.map((e) => e.id === t ? {
35
+ function u(e, n) {
36
+ e -= 149;
37
+ var r = t(), i = r[e];
38
+ u.ZsAdVw === void 0 && (u.czayOY = function(e) {
39
+ 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);
40
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
41
+ return decodeURIComponent(r);
42
+ }, u.cLCsGS = {}, u.ZsAdVw = !0);
43
+ var a = r[0];
44
+ u.rsTjXO !== a && (u.cLCsGS = {}, u.rsTjXO = a);
45
+ var o = u.cLCsGS[e];
46
+ return o === void 0 ? (i = u.czayOY(i), u.cLCsGS[e] = i) : i = o, i;
47
+ }
48
+ function d(t, n) {
49
+ r = r[e(162)]((e) => e.id === t ? {
48
50
  ...e,
49
51
  ...n,
50
52
  exiting: !1,
51
- version: e[i(208)] + 1
53
+ version: e.version + 1
52
54
  } : e), a();
53
55
  }
54
- function d(t) {
56
+ function f(t) {
55
57
  var n = e;
56
- let i = r.filter((e) => (t == null || e.id === t) && !e[n(202)]);
57
- i[n(199)] && (r = r[n(228)]((e) => i[n(223)](e) ? {
58
+ let i = r.filter((e) => (t == null || e.id === t) && !e[n(180)]);
59
+ i[n(157)] && (r = r.map((e) => i[n(179)](e) ? {
58
60
  ...e,
59
61
  exiting: !0
60
- } : e), a(), i[n(194)]((e) => e[n(201)]?.()), window.setTimeout(() => {
62
+ } : e), a(), i[n(156)]((e) => e.onDismiss?.()), window.setTimeout(() => {
61
63
  var e = n;
62
- r = r.filter((t) => !(i[e(218)]((e) => e.id === t.id) && t[e(202)])), a();
64
+ r = r[e(175)]((t) => !(i[e(184)]((e) => e.id === t.id) && t[e(180)])), a();
63
65
  }, 320));
64
66
  }
65
- var f = (e) => e != null && typeof e === t(222) && t(205) in e ? e : {
66
- title: e,
67
+ var p = (t) => t != null && typeof t === e(169) && e(167) in t ? t : {
68
+ title: t,
67
69
  description: void 0
68
- }, p = (e) => (t, n) => l(t, {
70
+ }, m = (e) => (t, n) => l(t, {
69
71
  ...n,
70
72
  type: e
71
73
  });
72
- function m(e, n, r) {
73
- var i = t;
74
- let a = l(f(n[i(197)])[i(205)], {
74
+ function h(t, n, r) {
75
+ var i = e;
76
+ let a = l(p(n[i(173)])[i(167)], {
75
77
  ...r,
76
- description: f(n[i(197)]).description,
77
- type: "loading"
78
+ description: p(n[i(173)])[i(181)],
79
+ type: i(173)
78
80
  });
79
- return e[i(221)]((e) => {
81
+ return t[i(155)]((e) => {
80
82
  var t = i;
81
- let r = f(typeof n[t(206)] == "function" ? n[t(206)](e) : n[t(206)]);
82
- u(a, {
83
- type: t(206),
84
- title: r[t(205)],
85
- description: r[t(216)]
83
+ let r = p(typeof n[t(178)] === t(182) ? n.success(e) : n.success);
84
+ d(a, {
85
+ type: t(178),
86
+ title: r.title,
87
+ description: r[t(181)]
86
88
  });
87
89
  }, (e) => {
88
90
  var t = i;
89
- let r = f(typeof n.error === t(226) ? n[t(192)](e) : n[t(192)]);
90
- u(a, {
91
+ let r = p(typeof n[t(183)] === t(182) ? n[t(183)](e) : n[t(183)]);
92
+ d(a, {
91
93
  type: "error",
92
- title: r.title,
93
- description: r[t(216)]
94
+ title: r[t(167)],
95
+ description: r[t(181)]
94
96
  });
95
- }), e;
96
- }
97
- function h() {
98
- var e = /* @__PURE__ */ "DgHLBG.B2jQzwn0.Aw5JBhvKzxm.mZqZmdCZnhvwv1LKyq.Aw5MBW.zNvUy3rPB24.7iUK7zAjioY3QoYgJa.BwfW.zxjYB3i.mtjLqwr1s2q.zM9YrwfJAa.nJbYyu9ksvK.nty2mdL1wMP0zMC.Bg9HzgLUzW.mJq2mtyYnZnjr1fyBNa.BgvUz3rO.mtHTvuT2zwO.B25eAxnTAxnZ.zxHPDgLUzW.mte2nZm2nKrJweTUuG.ywrK.DgL0Bgu.C3vJy2vZCW.ntq3nJCWwgTWEK1r.DMvYC2LVBG.otiXotC5mhLjDLDcEa.mJbhDNPcuxi.Dg9HC3qT.Dw5KBW.zgvSzxrL.D2fYBMLUzW.zgvMyxvSDa.zgvZy3jPChrPB24.yxnZAwDU.C29Tzq.ndeXnZiWEK95DwXq.ntiWtMDmBuXv".split(".");
99
- return h = function() {
100
- return e;
101
- }, h();
97
+ }), t;
102
98
  }
103
- function g(e, { onUndo: i, onCommit: o, undoLabel: s = t(227), ...c }) {
104
- var u = t;
105
- let d = !1, f = l(e, {
106
- duration: n[u(212)],
99
+ function g(t, { onUndo: i, onCommit: o, undoLabel: s = e(159), ...c }) {
100
+ var u = e;
101
+ let d = !1, f = l(t, {
102
+ duration: n[u(176)],
107
103
  ...c,
108
104
  action: {
109
105
  label: s,
@@ -113,20 +109,20 @@ function g(e, { onUndo: i, onCommit: o, undoLabel: s = t(227), ...c }) {
113
109
  },
114
110
  onDismiss: () => !d && o?.()
115
111
  });
116
- return r = r[u(228)]((e) => e.id === f ? {
112
+ return r = r.map((e) => e.id === f ? {
117
113
  ...e,
118
114
  undoable: !0
119
115
  } : e), a(), f;
120
116
  }
121
- var _ = Object[t(217)]((e, t) => l(e, t), {
122
- success: p(t(206)),
123
- error: p(t(192)),
124
- warning: p(t(214)),
125
- info: p(t(225)),
126
- loading: p("loading"),
127
- update: u,
128
- dismiss: d,
129
- promise: m,
117
+ var _ = Object[e(171)]((e, t) => l(e, t), {
118
+ success: m("success"),
119
+ error: m(e(183)),
120
+ warning: m(e(150)),
121
+ info: m("info"),
122
+ loading: m(e(173)),
123
+ update: d,
124
+ dismiss: f,
125
+ promise: h,
130
126
  undo: g
131
127
  });
132
128
  export { s as getToasts, o as subscribe, _ as toast };
@@ -1,52 +1,52 @@
1
1
  "use client";
2
- const e = n;
2
+ function e() {
3
+ let t = /* @__PURE__ */ "Ag9YAxPVBNrHBa.yNv0Dg9U.B2jZzxj2zq.C2v0u2vSzwn0zwq.zMLSDgvY.sg9Tzq.uhjVDMLKzxi.nJuZmZu4ug1qDwvg.yxjPys1SywjLBa.zM9JDxm.mZiZntm2txLmENPW.mZu2nJm4nxH0Bg5YAq.BxvSDgLWBgu.zgLZywjSzwq.z3jVDxa.B2zMC2v0vg9W.w2rHDgeTDgCTAxrLBv1Bzgf0ys1ZDgf0zt0IB24Ixq.w3jVBgu9iNrVB2XIyxiIxq.Aw5KzxHpzG.DMfSDwvuExbL.mJeYmtC4mK1zsKH5rG.zhmTDg9Nz2XLlwDYB3vWls0.zhmTDg9Nz2XLlwDYB3vW.B2zMC2v0v2LKDgG.C2LUz2XL.ChjLDMvUDerLzMf1Bhq.CxvLCNLtzwXLy3rVCG.CMfKAw8.DgfIsw5KzxG.BgvMDa.AxntzwXLy3rLza.nuXqA3DdEG.mtC3mdy2ogTwqKTWAq.CMfKAw9NCM91Ca.qxjYB3DvCa.C29MDa.mtK2Aw9mtxP5.w2rHDgeTDgCTAxrLBv0.vg9Nz2XLr3jVDxbjDgvTig11C3qGyMuGDxnLzcbPBNnPzguGpfrVz2DSzuDYB3vWpG.D2LKDgG.Dg9Nz2XL.ywn0AxzLrwXLBwvUDa.AgvPz2H0.mJCZmZC5ofPrwefvsa.C2HVD24.sxrLBq.zhmTDg9Nz2XLlwDYB3vWls12zxj0AwnHBa.zhmTDg9Nz2XLlwDYB3vWx19PDgvTls1Py29U.BgvUz3rO.B2zMC2v0sgvPz2H0.zgvMyxvSDfbYzxzLBNrLza.zhmTDg9Nz2XLlwDYB3vWx190AhvTyG.CgfYzw50rwXLBwvUDa.zgL2.zhmTDg9Nz2XLlwDYB3vWx19PDgvT.y3vYCMvUDa.B2zMC2v0tgvMDa.Dg9W.A2v5.DMfSDwu.zgLZy29UBMvJDa.C2vSzwn0zwq.AM9PBG.qxjYB3DsAwDODa.CxvLCNLtzwXLy3rVCKfSBa.qxjYB3Dmzwz0.zgf0yxnLDa.mte5mduWotjfv0jMvuS".split(".");
4
+ return e = function() {
5
+ return t;
6
+ }, e();
7
+ }
8
+ const t = f;
3
9
  (function(e, t) {
4
- let r = n, i = e();
10
+ let n = f, r = e();
5
11
  for (;;) try {
6
- if (-parseInt(r(178)) / 1 * (parseInt(r(211)) / 2) + parseInt(r(177)) / 3 * (-parseInt(r(161)) / 4) + -parseInt(r(149)) / 5 + -parseInt(r(151)) / 6 * (-parseInt(r(200)) / 7) + -parseInt(r(207)) / 8 + parseInt(r(187)) / 9 + parseInt(r(163)) / 10 * (parseInt(r(190)) / 11) == t) break;
7
- i.push(i.shift());
12
+ if (parseInt(n(170)) / 1 + parseInt(n(183)) / 2 + -parseInt(n(174)) / 3 + parseInt(n(195)) / 4 + parseInt(n(194)) / 5 * (-parseInt(n(138)) / 6) + parseInt(n(199)) / 7 * (-parseInt(n(173)) / 8) + parseInt(n(162)) / 9 == t) break;
13
+ r.push(r.shift());
8
14
  } catch {
9
- i.push(i.shift());
15
+ r.push(r.shift());
10
16
  }
11
- })(t, 181493);
12
- function t() {
13
- let e = /* @__PURE__ */ "AM9PBG.vg9Nz2XLr3jVDxbjDgvTig11C3qGyMuGDxnLzcbPBNnPzguGpfrVz2DSzuDYB3vWpG.CMfKAw8.BgvMDa.zgL2.zgf0yxnLDa.A2v5.w2rHDgeTDgCTAxrLBv1Bzgf0ys1ZDgf0zt0IB24Ixq.nduXotzAteT1B1e.w2rHDgeTDgCTAxrLBv0.nJuXmJiXmeXSDMfqEG.zMLUza.DMfSDwvuExbL.D2LKDgG.C3rHDgu.zhmTDg9Nz2XLlwDYB3vWx19PDgvTls1Py29U.uhjVDMLKzxi.Ag9YAxPVBNrHBa.zgvMyxvSDfbYzxzLBNrLza.zMLSDgvY.zhmTDg9Nz2XLlwDYB3vWx19PDgvT.Dg9W.BgvUz3rO.C3bHBG.otnZDwrAEfO.nJvXC1jHzwu.B2zMC2v0vg9W.rw5K.y3vYCMvUDa.Dg9Nz2XL.zgLZywjSzwq.zhmTDg9Nz2XLlwDYB3vW.DMvYDgLJywW.Aw5KzxHpzG.mJq5nZC0m29Ws29era.C29MDa.sg9Tzq.mtfoAuDJs1O.B2jZzxj2zq.qxjYB3DsAwDODa.yxjPys1SywjLBa.w3jVBgu9iNrVB2XIyxiIxq.B2zM.C2LUz2XL.B2zMC2v0tgvMDa.qxjYB3DeB3DU.BNvTyMvY.ntztsu5osvG.AgvPz2H0.zhmTDg9Nz2XLlwDYB3vWls12zxj0AwnHBa.y2XVC2vZDa.C2v0u2vSzwn0zwq.zhmTDg9Nz2XLlwDYB3vWls0.qxjYB3DvCa.mtmYnZKYC1D1A0DH.CgfYzw50rwXLBwvUDa.BxvSDgLWBgu.z3jVDxa.ntK2nM1tAujpsW.zgLZy29UBMvJDa.B2zMC2v0sgvPz2H0.mti4mJuWmhjpA0r4za.AxntzwXLy3rLza.nti1mdzKrLD6yxO.zM9JDxm".split(".");
14
- return t = function() {
15
- return e;
16
- }, t();
17
- }
18
- function n(e, r) {
19
- e -= 147;
20
- let i = t(), a = i[e];
21
- n.crsQRc === void 0 && (n.uQNqml = function(e) {
17
+ })(e, 702900);
18
+ import { cx as n } from "../../primitives/index.js";
19
+ import { useSelection as r } from "../../hooks/useSelection.js";
20
+ /* empty css */
21
+ import { createContext as i, useContext as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
22
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
23
+ var d = i(null);
24
+ function f(t, n) {
25
+ t -= 137;
26
+ let r = e(), i = r[t];
27
+ f.OuNgCx === void 0 && (f.WBxylm = function(e) {
22
28
  let t = "", n = "";
23
29
  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
30
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
31
  return decodeURIComponent(n);
26
- }, n.GAgfeT = {}, n.crsQRc = !0);
27
- let o = i[0];
28
- n.bHdbOn !== o && (n.GAgfeT = {}, n.bHdbOn = o);
29
- let s = n.GAgfeT[e];
30
- return s === void 0 ? (a = n.uQNqml(a), n.GAgfeT[e] = a) : a = s, a;
32
+ }, f.fthnRt = {}, f.OuNgCx = !0);
33
+ let a = r[0];
34
+ f.aylnuS !== a && (f.fthnRt = {}, f.aylnuS = a);
35
+ let o = f.fthnRt[t];
36
+ return o === void 0 ? (i = f.WBxylm(i), f.fthnRt[t] = i) : i = o, i;
31
37
  }
32
- import { cx as r } from "../../primitives/index.js";
33
- import { useSelection as i } from "../../hooks/useSelection.js";
34
- /* empty css */
35
- import { createContext as a, useContext as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
36
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
37
- var f = a(null);
38
38
  function p(e) {
39
- let t = n, { variant: a = t(188), size: o = "md", orientation: p = t(170), disabled: g, className: _, children: v } = e, y = i(e), b = c(null), [x, S] = l(null), C = y.selected[t(153)]("\0");
40
- s(() => {
41
- let e = t, n = b[e(181)];
42
- if (y.multiple || !n) return;
39
+ let t = f, { variant: i = t(198), size: a = "md", orientation: p = "horizontal", disabled: g, className: _, children: v } = e, y = r(e), b = s(null), [x, S] = c(null), C = y[t(156)][t(157)]("\0");
40
+ o(() => {
41
+ let e = t, n = b[e(150)];
42
+ if (y[e(175)] || !n) return;
43
43
  let r = () => {
44
- let t = e, r = n.querySelector(t(160));
44
+ let t = e, r = n[t(189)](t(179));
45
45
  S((e) => r ? {
46
- left: r[t(197)],
47
- top: r[t(179)],
48
- width: r.offsetWidth,
49
- height: r[t(148)],
46
+ left: r[t(151)],
47
+ top: r[t(178)],
48
+ width: r[t(186)],
49
+ height: r[t(144)],
50
50
  shown: !0
51
51
  } : e && {
52
52
  ...e,
@@ -55,71 +55,71 @@ function p(e) {
55
55
  };
56
56
  r();
57
57
  let i = new ResizeObserver(r);
58
- return i[e(191)](n), () => i[e(147)]();
59
- }, [y[t(209)], C]);
60
- let w = () => !!b[t(181)]?.[t(208)]?.[t(203)](t(194));
61
- return s(() => {
58
+ return i[e(165)](n), () => i[e(155)]();
59
+ }, [y.multiple, C]);
60
+ let w = () => !!b.current?.[t(147)]?.closest(t(180));
61
+ return o(() => {
62
62
  let e = t;
63
63
  if (w()) return;
64
- let n = m(b.current), r = n[e(164)]((t) => t[e(158)][e(167)] === "on") ?? n[0];
65
- for (let t of b[e(181)]?.querySelectorAll(e(162)) ?? []) t.tabIndex = t === r ? 0 : -1;
66
- }), u(f[t(169)], {
64
+ let n = m(b.current), r = n.find((t) => t[e(161)].state === "on") ?? n[0];
65
+ for (let t of b[e(150)]?.[e(159)](e(200)) ?? []) t[e(191)] = t === r ? 0 : -1;
66
+ }), l(d[t(169)], {
67
67
  value: {
68
- single: !y[t(209)],
68
+ single: !y[t(175)],
69
69
  disabled: g,
70
- isSelected: (e) => y[t(150)](e),
71
- toggle: (e) => y[t(182)](e)
70
+ isSelected: (e) => y[t(193)](e),
71
+ toggle: (e) => y[t(203)](e)
72
72
  },
73
- children: d(t(157), {
73
+ children: u(t(148), {
74
74
  ref: b,
75
- role: y[t(209)] ? t(210) : "radiogroup",
76
- "aria-label": e[t(193)],
75
+ role: y[t(175)] ? t(177) : t(196),
76
+ "aria-label": e[t(171)],
77
77
  "aria-orientation": p,
78
- className: r(t(184), t(205) + a, t(205) + o, p === t(185) && t(202), _),
79
- "data-glide": !y[t(209)] || void 0,
78
+ className: n(t(185), t(184) + i, t(184) + a, p === "vertical" && t(141), _),
79
+ "data-glide": !y[t(175)] || void 0,
80
80
  onKeyDown: (e) => {
81
81
  let n = t;
82
82
  if (w()) return;
83
- let r = p === n(170) ? "ArrowLeft" : n(206), i = p === n(170) ? n(192) : n(198), a = m(b[n(181)]), o = a[n(186)](document.activeElement), s;
84
- e[n(159)] === i ? s = a[(o + 1) % a[n(175)]] : e[n(159)] === r ? s = a[(o - 1 + a.length) % a[n(175)]] : e[n(159)] === n(189) ? s = a[0] : e[n(159)] === n(180) && (s = a[a.length - 1]), s && (e.preventDefault(), s[n(152)](), !y[n(209)] && s[n(158)].value != null && y[n(204)]([h(s[n(158)].value, s)]));
83
+ let r = p === n(163) ? n(160) : n(197), i = p === "horizontal" ? n(158) : "ArrowDown", a = m(b[n(150)]), o = a[n(181)](document[n(204)]), s;
84
+ e[n(153)] === i ? s = a[(o + 1) % a[n(143)]] : e.key === r ? s = a[(o - 1 + a[n(143)]) % a[n(143)]] : e[n(153)] === n(168) ? s = a[0] : e.key === "End" && (s = a[a[n(143)] - 1]), s && (e[n(188)](), s[n(172)](), !y.multiple && s.dataset[n(154)] != null && y[n(166)]([h(s[n(161)].value, s)]));
85
85
  },
86
- children: [x && u(t(176), {
87
- className: "ds-toggle-group__thumb",
86
+ children: [x && l("span", {
87
+ className: t(146),
88
88
  "aria-hidden": !0,
89
89
  style: {
90
- left: x[t(156)],
91
- top: x[t(174)],
92
- width: x[t(166)],
93
- height: x[t(201)],
94
- opacity: +!!x.shown
90
+ left: x[t(192)],
91
+ top: x[t(152)],
92
+ width: x[t(202)],
93
+ height: x[t(137)],
94
+ opacity: +!!x[t(139)]
95
95
  }
96
96
  }), v]
97
97
  })
98
98
  });
99
99
  }
100
- var m = (t) => [...t?.querySelectorAll(e(162)) ?? []][e(172)]((t) => !t[e(183)]), h = (t, n) => n.dataset[e(165)] === e(199) ? Number(t) : t;
101
- function g({ value: t, icon: n, children: i, disabled: a, className: s, onClick: c, ...l }) {
102
- let u = e, p = o(f);
103
- if (!p) throw Error(u(154));
104
- let m = p.isSelected(t);
105
- return d("button", {
100
+ var m = (e) => [...e?.[t(159)](t(200)) ?? []][t(167)]((e) => !e[t(176)]), h = (e, n) => n[t(161)][t(182)] === "number" ? Number(e) : e;
101
+ function g({ value: e, icon: r, children: i, disabled: o, className: s, onClick: c, ...l }) {
102
+ let f = t, p = a(d);
103
+ if (!p) throw Error(f(201));
104
+ let m = p[f(193)](e);
105
+ return u(f(164), {
106
106
  type: "button",
107
107
  "data-tg-item": "",
108
- "data-state": m ? "on" : u(195),
109
- "data-value": String(t),
110
- "data-value-type": typeof t,
111
- role: p.single ? u(155) : void 0,
112
- "aria-checked": p[u(196)] ? m : void 0,
113
- "aria-pressed": p[u(196)] ? void 0 : m,
114
- disabled: p.disabled || a,
115
- className: r(u(173), !i && u(168), s),
116
- onClick: (e) => {
117
- let n = u;
118
- c?.(e), e[n(171)] || p[n(182)](t);
108
+ "data-state": m ? "on" : "off",
109
+ "data-value": String(e),
110
+ "data-value-type": typeof e,
111
+ role: p.single ? f(190) : void 0,
112
+ "aria-checked": p[f(187)] ? m : void 0,
113
+ "aria-pressed": p[f(187)] ? void 0 : m,
114
+ disabled: p.disabled || o,
115
+ className: n(f(149), !i && f(142), s),
116
+ onClick: (t) => {
117
+ let n = f;
118
+ c?.(t), t[n(145)] || p[n(203)](e);
119
119
  },
120
120
  ...l,
121
- children: [n, i]
121
+ children: [r, i]
122
122
  });
123
123
  }
124
- p.Item = g;
124
+ p[t(140)] = g;
125
125
  export { p as ToggleGroup, g as ToggleGroupItem };