@iamfiro/design 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +76 -76
  4. package/lib/components/ActionBar/ActionBar2.js +43 -43
  5. package/lib/components/Alert/Alert2.js +46 -46
  6. package/lib/components/AppShell/AppShell2.js +58 -58
  7. package/lib/components/AreaChart/AreaChart.js +39 -40
  8. package/lib/components/BarChart/BarChart2.js +169 -169
  9. package/lib/components/BarList/BarList2.js +99 -99
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
  11. package/lib/components/Calendar/Calendar2.js +172 -171
  12. package/lib/components/Calendar/DatePicker2.js +101 -102
  13. package/lib/components/Calendar/date.js +71 -71
  14. package/lib/components/Card/Card2.js +55 -56
  15. package/lib/components/CardFrame/CardFrame2.js +52 -52
  16. package/lib/components/Chart/ChartParts.js +90 -90
  17. package/lib/components/Chart/chart2.js +52 -52
  18. package/lib/components/Chart/useChartInteraction.js +44 -44
  19. package/lib/components/ChatBubble/ChatBubble2.js +112 -112
  20. package/lib/components/ChatBubble/formatChatTime.js +44 -42
  21. package/lib/components/ChatComposer/ChatComposer2.js +94 -94
  22. package/lib/components/CodeBlock/CodeBlock2.js +66 -66
  23. package/lib/components/CodeBlock/highlight.js +67 -70
  24. package/lib/components/ColorPicker/ColorPicker2.js +404 -405
  25. package/lib/components/ColorPicker/color.js +81 -81
  26. package/lib/components/ColorPicker/presets.js +44 -43
  27. package/lib/components/Combobox/Combobox2.js +128 -128
  28. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  29. package/lib/components/Comment/Comment2.js +55 -80
  30. package/lib/components/ContextMenu/ContextMenu2.js +93 -94
  31. package/lib/components/DataGrid/DataGrid2.js +1181 -1180
  32. package/lib/components/DataGrid/GridPopover.js +112 -112
  33. package/lib/components/DataGrid/anchor.js +23 -25
  34. package/lib/components/DataGrid/model.js +274 -275
  35. package/lib/components/DataGrid/panels.js +423 -423
  36. package/lib/components/DataGrid/typeMeta.js +21 -22
  37. package/lib/components/DataGrid/types.js +38 -37
  38. package/lib/components/DescriptionList/DescriptionList2.js +107 -107
  39. package/lib/components/Dialog/AlertDialog.js +53 -53
  40. package/lib/components/Dialog/Dialog2.js +71 -70
  41. package/lib/components/Dialog/modal.js +59 -58
  42. package/lib/components/Drawer/Drawer2.js +123 -124
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
  44. package/lib/components/DropdownMenu/menuCore.js +46 -47
  45. package/lib/components/Dropzone/Dropzone2.js +77 -77
  46. package/lib/components/EmptyState/EmptyState2.js +57 -56
  47. package/lib/components/FileChip/FileChip2.js +71 -71
  48. package/lib/components/FileUpload/FileUpload.js +119 -119
  49. package/lib/components/FilterChips/FilterChips2.js +61 -61
  50. package/lib/components/FunnelChart/FunnelChart2.js +141 -141
  51. package/lib/components/FunnelChart/funnel.js +51 -51
  52. package/lib/components/Highlight/Highlight2.js +54 -54
  53. package/lib/components/HoverCard/HoverCard.js +108 -83
  54. package/lib/components/InlineDiff/InlineDiff2.js +126 -126
  55. package/lib/components/InlineDiff/diff.js +82 -82
  56. package/lib/components/InlineDiff/useDiffReview.js +62 -60
  57. package/lib/components/Kanban/Kanban2.js +382 -382
  58. package/lib/components/Kanban/KanbanCard.js +92 -92
  59. package/lib/components/Kanban/move.js +45 -49
  60. package/lib/components/LineChart/LineChart2.js +207 -207
  61. package/lib/components/List/List2.js +71 -71
  62. package/lib/components/Listbox/Listbox2.js +115 -115
  63. package/lib/components/Marker/Marker2.js +67 -60
  64. package/lib/components/Menubar/Menubar2.js +130 -133
  65. package/lib/components/MultiSelect/MultiSelect2.js +104 -104
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
  67. package/lib/components/NoticeStack/NoticeStack2.js +105 -105
  68. package/lib/components/NumberStepper/NumberStepper2.js +67 -67
  69. package/lib/components/OtpInput/OtpInput2.js +66 -67
  70. package/lib/components/Pagination/Pagination2.js +90 -90
  71. package/lib/components/Pagination/paginationRange.js +24 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +74 -74
  73. package/lib/components/PieChart/PieChart2.js +119 -119
  74. package/lib/components/PieChart/arc.js +63 -42
  75. package/lib/components/PieChart/useArcTween.js +56 -54
  76. package/lib/components/Popover/Popover2.js +61 -61
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
  78. package/lib/components/Rating/Rating2.js +81 -81
  79. package/lib/components/Resizable/Resizable2.js +112 -110
  80. package/lib/components/Resizable/layout.js +50 -50
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
  82. package/lib/components/ScatterChart/ScatterChart2.js +226 -227
  83. package/lib/components/ScatterChart/scatter.js +59 -57
  84. package/lib/components/ScrollArea/ScrollArea2.js +112 -112
  85. package/lib/components/Select/Select2.js +79 -79
  86. package/lib/components/Sidebar/Sidebar2.js +79 -79
  87. package/lib/components/Skeleton/Skeleton2.js +68 -68
  88. package/lib/components/Slider/Slider2.js +78 -77
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
  90. package/lib/components/SparkChart/SparkChart2.js +146 -145
  91. package/lib/components/SparkChart/spark.js +41 -67
  92. package/lib/components/Sparkbar/Sparkbar2.js +61 -60
  93. package/lib/components/SplitView/SplitView2.js +53 -53
  94. package/lib/components/Stat/Stat2.js +94 -94
  95. package/lib/components/StepList/StepList2.js +70 -70
  96. package/lib/components/Table/Table2.js +63 -63
  97. package/lib/components/Tabs/Tabs2.js +70 -70
  98. package/lib/components/TagInput/TagInput2.js +236 -239
  99. package/lib/components/TimePicker/TimePicker2.js +231 -232
  100. package/lib/components/TimePicker/time.js +63 -65
  101. package/lib/components/Timeline/Timeline2.js +167 -167
  102. package/lib/components/Timeline/scale.js +55 -55
  103. package/lib/components/Toast/Toaster.js +151 -152
  104. package/lib/components/Toast/store.js +90 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
  106. package/lib/components/Toolbar/Toolbar2.js +145 -145
  107. package/lib/components/Tracker/Tracker2.js +76 -76
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
  109. package/lib/components/TreeView/TreeView2.js +124 -124
  110. package/lib/hooks/timing.js +30 -29
  111. package/lib/hooks/useControllableState.js +37 -36
  112. package/lib/hooks/useCountdown.js +56 -59
  113. package/lib/hooks/useDigitInput.js +52 -78
  114. package/lib/hooks/useDismiss.js +58 -57
  115. package/lib/hooks/useElapsed.js +54 -54
  116. package/lib/hooks/useFloating.js +26 -26
  117. package/lib/hooks/useFocusTrap.js +42 -42
  118. package/lib/hooks/usePresence.js +49 -48
  119. package/lib/hooks/usePressToOpen.js +42 -41
  120. package/lib/hooks/useScrollLock.js +45 -44
  121. package/lib/hooks/useSelection.js +45 -39
  122. package/lib/index.js +71 -71
  123. package/lib/primitives/AspectRatio2.js +60 -60
  124. package/lib/primitives/BrandIcon.js +161 -161
  125. package/lib/primitives/ColorDot2.js +42 -45
  126. package/lib/primitives/CopyButton2.js +57 -56
  127. package/lib/primitives/CountBadge2.js +55 -51
  128. package/lib/primitives/Countdown2.js +41 -46
  129. package/lib/primitives/Delta2.js +36 -36
  130. package/lib/primitives/Elapsed.js +49 -49
  131. package/lib/primitives/FileIcon2.js +96 -96
  132. package/lib/primitives/Flag2.js +135 -135
  133. package/lib/primitives/IconStack2.js +38 -60
  134. package/lib/primitives/IconTile2.js +28 -29
  135. package/lib/primitives/Kbd2.js +50 -50
  136. package/lib/primitives/Layout2.js +71 -71
  137. package/lib/primitives/Link2.js +32 -31
  138. package/lib/primitives/MaskedText2.js +49 -74
  139. package/lib/primitives/Progress2.js +65 -66
  140. package/lib/primitives/RelativeTime.js +58 -57
  141. package/lib/primitives/SearchInput2.js +65 -65
  142. package/lib/primitives/SelectorButton2.js +74 -73
  143. package/lib/primitives/Spinner2.js +50 -50
  144. package/lib/primitives/StatusIcon2.js +68 -68
  145. package/lib/primitives/Swatch2.js +59 -55
  146. package/lib/primitives/Tooltip2.js +81 -81
  147. package/lib/primitives/Typography2.js +53 -53
  148. package/lib/primitives/formatCountdown.js +21 -22
  149. package/lib/primitives/formatElapsed.js +43 -42
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +82 -82
  152. package/lib/primitives/index.js +193 -174
  153. package/lib/primitives/maskValue.js +28 -28
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,129 +1,132 @@
1
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());
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;
14
+ }
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());
7
20
  } catch {
8
- r.push(r.shift());
21
+ i.push(i.shift());
9
22
  }
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, {
23
+ })(h, 997957);
24
+ 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;
31
+ function l(t, n = {}) {
32
+ var i = e;
33
+ let o = n.id ?? i(211) + ++c;
34
+ return r.some((e) => e.id === o) ? (u(o, {
19
35
  title: t,
20
- ...r
21
- }), o) : (n = [{
22
- type: a(189),
23
- ...r,
36
+ ...n
37
+ }), o) : (r = [{
38
+ type: i(215),
39
+ ...n,
24
40
  id: o,
25
41
  title: t,
26
42
  version: 0
27
- }, ...n], i(), o);
43
+ }, ...r], a(), o);
28
44
  }
29
- function l(t, r) {
30
- var a = e;
31
- n = n[a(168)]((e) => e.id === t ? {
45
+ function u(t, n) {
46
+ var i = e;
47
+ r = r.map((e) => e.id === t ? {
32
48
  ...e,
33
- ...r,
49
+ ...n,
34
50
  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();
51
+ version: e[i(208)] + 1
52
+ } : e), a();
43
53
  }
44
54
  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) ? {
55
+ 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) ? {
48
58
  ...e,
49
59
  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();
60
+ } : e), a(), i[n(194)]((e) => e[n(201)]?.()), window.setTimeout(() => {
61
+ var e = n;
62
+ r = r.filter((t) => !(i[e(218)]((e) => e.id === t.id) && t[e(202)])), a();
53
63
  }, 320));
54
64
  }
55
- var f = (t) => t != null && typeof t === e(179) && e(174) in t ? t : {
56
- title: t,
65
+ var f = (e) => e != null && typeof e === t(222) && t(205) in e ? e : {
66
+ title: e,
57
67
  description: void 0
58
- }, p = (e) => (t, n) => c(t, {
68
+ }, p = (e) => (t, n) => l(t, {
59
69
  ...n,
60
70
  type: e
61
71
  });
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)], {
72
+ function m(e, n, r) {
73
+ var i = t;
74
+ let a = l(f(n[i(197)])[i(205)], {
78
75
  ...r,
79
- description: f(n[i(172)]).description,
80
- type: i(172)
76
+ description: f(n[i(197)]).description,
77
+ type: "loading"
81
78
  });
82
- return t.then((e) => {
79
+ return e[i(221)]((e) => {
83
80
  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)]
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)]
89
86
  });
90
87
  }, (e) => {
91
88
  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),
89
+ let r = f(typeof n.error === t(226) ? n[t(192)](e) : n[t(192)]);
90
+ u(a, {
91
+ type: "error",
95
92
  title: r.title,
96
- description: r[t(186)]
93
+ description: r[t(216)]
97
94
  });
98
- }), t;
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();
99
102
  }
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,
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)],
107
+ ...c,
105
108
  action: {
106
109
  label: s,
107
110
  onClick: () => {
108
- d = !0, a();
111
+ d = !0, i();
109
112
  }
110
113
  },
111
114
  onDismiss: () => !d && o?.()
112
115
  });
113
- return n = n[u(168)]((e) => e.id === f ? {
116
+ return r = r[u(228)]((e) => e.id === f ? {
114
117
  ...e,
115
118
  undoable: !0
116
- } : e), i(), f;
119
+ } : e), a(), f;
117
120
  }
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,
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,
125
128
  dismiss: d,
126
- promise: h,
129
+ promise: m,
127
130
  undo: g
128
131
  });
129
- export { o as getToasts, a as subscribe, _ as toast };
132
+ export { s as getToasts, o as subscribe, _ as toast };
@@ -1,125 +1,125 @@
1
1
  "use client";
2
- const e = m;
2
+ const e = n;
3
3
  (function(e, t) {
4
- let n = m, r = e();
4
+ let r = n, i = e();
5
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());
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());
8
8
  } catch {
9
- r.push(r.shift());
9
+ i.push(i.shift());
10
10
  }
11
- })(h, 335980);
12
- import { cx as t } from "../../primitives/index.js";
13
- import { useSelection as n } from "../../hooks/useSelection.js";
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) {
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
+ }, 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;
31
+ }
32
+ import { cx as r } from "../../primitives/index.js";
33
+ import { useSelection as i } from "../../hooks/useSelection.js";
14
34
  /* 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));
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
+ 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;
43
+ let r = () => {
44
+ let t = e, r = n.querySelector(t(160));
25
45
  S((e) => r ? {
26
- left: r[n(442)],
27
- top: r[n(445)],
46
+ left: r[t(197)],
47
+ top: r[t(179)],
28
48
  width: r.offsetWidth,
29
- height: r.offsetHeight,
49
+ height: r[t(148)],
30
50
  shown: !0
31
51
  } : e && {
32
52
  ...e,
33
53
  shown: !1
34
54
  });
35
55
  };
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;
56
+ r();
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(() => {
62
+ let e = t;
43
63
  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)], {
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)], {
47
67
  value: {
48
- single: !y[r(411)],
68
+ single: !y[t(209)],
49
69
  disabled: g,
50
- isSelected: (e) => y.isSelected(e),
51
- toggle: (e) => y[r(421)](e)
70
+ isSelected: (e) => y[t(150)](e),
71
+ toggle: (e) => y[t(182)](e)
52
72
  },
53
- children: l(r(401), {
73
+ children: d(t(157), {
54
74
  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,
75
+ role: y[t(209)] ? t(210) : "radiogroup",
76
+ "aria-label": e[t(193)],
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,
60
80
  onKeyDown: (e) => {
61
- let t = r;
81
+ let n = t;
62
82
  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)]));
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)]));
65
85
  },
66
- children: [x && c(r(447), {
67
- className: r(400),
86
+ children: [x && u(t(176), {
87
+ className: "ds-toggle-group__thumb",
68
88
  "aria-hidden": !0,
69
89
  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)]
90
+ left: x[t(156)],
91
+ top: x[t(174)],
92
+ width: x[t(166)],
93
+ height: x[t(201)],
94
+ opacity: +!!x.shown
75
95
  }
76
96
  }), v]
77
97
  })
78
98
  });
79
99
  }
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),
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", {
106
+ type: "button",
107
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),
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
116
  onClick: (e) => {
117
- let t = f;
118
- c?.(e), e[t(396)] || p[t(421)](n);
117
+ let n = u;
118
+ c?.(e), e[n(171)] || p[n(182)](t);
119
119
  },
120
- ...d,
121
- children: [r, a]
120
+ ...l,
121
+ children: [n, i]
122
122
  });
123
123
  }
124
- d.Item = g;
125
- export { d as ToggleGroup, g as ToggleGroupItem };
124
+ p.Item = g;
125
+ export { p as ToggleGroup, g as ToggleGroupItem };