@iamfiro/design 0.3.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 (153) hide show
  1. package/lib/components/Accordion/Accordion2.js +86 -86
  2. package/lib/components/ActionBar/ActionBar2.js +44 -43
  3. package/lib/components/Alert/Alert2.js +79 -79
  4. package/lib/components/AppShell/AppShell2.js +58 -58
  5. package/lib/components/AreaChart/AreaChart.js +41 -41
  6. package/lib/components/BarChart/BarChart2.js +110 -110
  7. package/lib/components/BarList/BarList2.js +95 -95
  8. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
  9. package/lib/components/Calendar/Calendar2.js +202 -202
  10. package/lib/components/Calendar/DatePicker2.js +122 -123
  11. package/lib/components/Calendar/date.js +57 -60
  12. package/lib/components/Card/Card2.js +62 -63
  13. package/lib/components/CardFrame/CardFrame2.js +43 -48
  14. package/lib/components/Chart/ChartParts.js +80 -80
  15. package/lib/components/Chart/chart2.js +57 -57
  16. package/lib/components/Chart/useChartInteraction.js +49 -49
  17. package/lib/components/ChatBubble/ChatBubble2.js +87 -87
  18. package/lib/components/ChatBubble/formatChatTime.js +34 -39
  19. package/lib/components/ChatComposer/ChatComposer2.js +97 -97
  20. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  21. package/lib/components/CodeBlock/highlight.js +75 -78
  22. package/lib/components/ColorPicker/ColorPicker2.js +383 -384
  23. package/lib/components/ColorPicker/color.js +74 -74
  24. package/lib/components/ColorPicker/presets.js +41 -46
  25. package/lib/components/Combobox/Combobox2.js +130 -131
  26. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  27. package/lib/components/Comment/Comment2.js +64 -88
  28. package/lib/components/ContextMenu/ContextMenu2.js +87 -87
  29. package/lib/components/DataGrid/DataGrid2.js +911 -909
  30. package/lib/components/DataGrid/GridPopover.js +114 -114
  31. package/lib/components/DataGrid/anchor.js +25 -25
  32. package/lib/components/DataGrid/model.js +281 -282
  33. package/lib/components/DataGrid/panels.js +427 -429
  34. package/lib/components/DataGrid/typeMeta.js +50 -51
  35. package/lib/components/DataGrid/types.js +39 -40
  36. package/lib/components/DescriptionList/DescriptionList2.js +104 -104
  37. package/lib/components/Dialog/AlertDialog.js +85 -84
  38. package/lib/components/Dialog/Dialog2.js +72 -71
  39. package/lib/components/Dialog/modal.js +68 -68
  40. package/lib/components/Drawer/Drawer2.js +100 -100
  41. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
  42. package/lib/components/DropdownMenu/menuCore.js +36 -36
  43. package/lib/components/Dropzone/Dropzone2.js +66 -65
  44. package/lib/components/EmptyState/EmptyState2.js +52 -54
  45. package/lib/components/FileChip/FileChip2.js +42 -66
  46. package/lib/components/FileUpload/FileUpload.js +171 -170
  47. package/lib/components/FilterChips/FilterChips2.js +54 -54
  48. package/lib/components/FunnelChart/FunnelChart2.js +144 -144
  49. package/lib/components/FunnelChart/funnel.js +56 -53
  50. package/lib/components/Highlight/Highlight2.js +60 -60
  51. package/lib/components/HoverCard/HoverCard.js +72 -72
  52. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  53. package/lib/components/InlineDiff/diff.js +81 -81
  54. package/lib/components/InlineDiff/useDiffReview.js +54 -53
  55. package/lib/components/Kanban/Kanban2.js +372 -372
  56. package/lib/components/Kanban/KanbanCard.js +80 -80
  57. package/lib/components/Kanban/move.js +55 -55
  58. package/lib/components/LineChart/LineChart2.js +167 -167
  59. package/lib/components/List/List2.js +64 -65
  60. package/lib/components/Listbox/Listbox2.js +105 -105
  61. package/lib/components/Marker/Marker2.js +54 -54
  62. package/lib/components/Menubar/Menubar2.js +112 -113
  63. package/lib/components/MultiSelect/MultiSelect2.js +106 -106
  64. package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
  65. package/lib/components/NoticeStack/NoticeStack2.js +115 -115
  66. package/lib/components/NumberStepper/NumberStepper2.js +69 -70
  67. package/lib/components/OtpInput/OtpInput2.js +87 -87
  68. package/lib/components/Pagination/Pagination2.js +97 -97
  69. package/lib/components/Pagination/paginationRange.js +23 -24
  70. package/lib/components/PhoneInput/PhoneInput.js +85 -85
  71. package/lib/components/PieChart/PieChart2.js +116 -116
  72. package/lib/components/PieChart/arc.js +80 -56
  73. package/lib/components/PieChart/useArcTween.js +57 -59
  74. package/lib/components/Popover/Popover2.js +59 -60
  75. package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
  76. package/lib/components/Rating/Rating2.js +93 -93
  77. package/lib/components/Resizable/Resizable2.js +136 -134
  78. package/lib/components/Resizable/layout.js +73 -73
  79. package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
  80. package/lib/components/ScatterChart/ScatterChart2.js +252 -253
  81. package/lib/components/ScatterChart/scatter.js +58 -56
  82. package/lib/components/ScrollArea/ScrollArea2.js +133 -134
  83. package/lib/components/Select/Select2.js +89 -89
  84. package/lib/components/Sidebar/Sidebar2.js +76 -76
  85. package/lib/components/Skeleton/Skeleton2.js +67 -67
  86. package/lib/components/Slider/Slider2.js +67 -67
  87. package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
  88. package/lib/components/SparkChart/SparkChart2.js +130 -130
  89. package/lib/components/SparkChart/spark.js +57 -62
  90. package/lib/components/Sparkbar/Sparkbar2.js +44 -44
  91. package/lib/components/SplitView/SplitView2.js +53 -53
  92. package/lib/components/Stat/Stat2.js +83 -83
  93. package/lib/components/StepList/StepList2.js +73 -73
  94. package/lib/components/Table/Table2.js +45 -45
  95. package/lib/components/Tabs/Tabs2.js +87 -87
  96. package/lib/components/TagInput/TagInput2.js +231 -234
  97. package/lib/components/TimePicker/TimePicker2.js +195 -195
  98. package/lib/components/TimePicker/time.js +60 -62
  99. package/lib/components/Timeline/Timeline2.js +199 -199
  100. package/lib/components/Timeline/scale.js +56 -58
  101. package/lib/components/Toast/Toaster.js +153 -152
  102. package/lib/components/Toast/store.js +57 -58
  103. package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
  104. package/lib/components/Toolbar/Toolbar2.js +135 -133
  105. package/lib/components/Tracker/Tracker2.js +83 -83
  106. package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
  107. package/lib/components/TreeView/TreeView2.js +165 -163
  108. package/lib/hooks/timing.js +33 -31
  109. package/lib/hooks/useControllableState.js +42 -42
  110. package/lib/hooks/useCountdown.js +58 -63
  111. package/lib/hooks/useDigitInput.js +75 -77
  112. package/lib/hooks/useDismiss.js +50 -52
  113. package/lib/hooks/useElapsed.js +58 -56
  114. package/lib/hooks/useFloating.js +44 -44
  115. package/lib/hooks/useFocusTrap.js +64 -40
  116. package/lib/hooks/usePresence.js +48 -50
  117. package/lib/hooks/usePressToOpen.js +52 -51
  118. package/lib/hooks/useScrollLock.js +49 -48
  119. package/lib/hooks/useSelection.js +37 -40
  120. package/lib/index.js +70 -69
  121. package/lib/primitives/AspectRatio2.js +50 -54
  122. package/lib/primitives/BrandIcon.js +153 -153
  123. package/lib/primitives/ColorDot2.js +49 -48
  124. package/lib/primitives/CopyButton2.js +59 -58
  125. package/lib/primitives/CountBadge2.js +57 -55
  126. package/lib/primitives/Countdown2.js +45 -49
  127. package/lib/primitives/Delta2.js +71 -46
  128. package/lib/primitives/Elapsed.js +43 -43
  129. package/lib/primitives/FileIcon2.js +93 -93
  130. package/lib/primitives/Flag2.js +95 -95
  131. package/lib/primitives/IconStack2.js +55 -55
  132. package/lib/primitives/IconTile2.js +46 -45
  133. package/lib/primitives/Kbd2.js +55 -55
  134. package/lib/primitives/Layout2.js +80 -80
  135. package/lib/primitives/Link2.js +36 -34
  136. package/lib/primitives/MaskedText2.js +65 -64
  137. package/lib/primitives/Progress2.js +80 -80
  138. package/lib/primitives/RelativeTime.js +52 -54
  139. package/lib/primitives/SearchInput2.js +55 -54
  140. package/lib/primitives/SelectorButton2.js +64 -65
  141. package/lib/primitives/Spinner2.js +55 -59
  142. package/lib/primitives/StatusIcon2.js +65 -65
  143. package/lib/primitives/Swatch2.js +50 -50
  144. package/lib/primitives/Tooltip2.js +85 -85
  145. package/lib/primitives/Typography2.js +66 -66
  146. package/lib/primitives/formatCountdown.js +43 -40
  147. package/lib/primitives/formatElapsed.js +24 -27
  148. package/lib/primitives/formatRelativeTime.js +43 -43
  149. package/lib/primitives/hotkey.js +71 -71
  150. package/lib/primitives/index.js +156 -157
  151. package/lib/primitives/maskValue.js +38 -34
  152. package/lib/style.css +1 -1
  153. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
1
  "use client";
2
- var e = m;
2
+ var e = _;
3
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;
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
6
  r.push(r.shift());
7
7
  } catch {
8
8
  r.push(r.shift());
9
9
  }
10
- })(u, 978232);
10
+ })(u, 651832);
11
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), () => {
12
+ var n = [], r = /* @__PURE__ */ new Set(), i = () => r[e(441)]((e) => e()), a = (t) => (r[e(458)](t), () => {
13
13
  r.delete(t);
14
14
  }), o = () => n, s = 0;
15
15
  function c(t, r = {}) {
16
16
  var a = e;
17
- let o = r.id ?? a(185) + ++s;
18
- return n[a(165)]((e) => e.id === o) ? (l(o, {
17
+ let o = r.id ?? a(456) + ++s;
18
+ return n[a(463)]((e) => e.id === o) ? (l(o, {
19
19
  title: t,
20
20
  ...r
21
21
  }), o) : (n = [{
22
- type: a(189),
22
+ type: "default",
23
23
  ...r,
24
24
  id: o,
25
25
  title: t,
@@ -28,102 +28,101 @@ function c(t, r = {}) {
28
28
  }
29
29
  function l(t, r) {
30
30
  var a = e;
31
- n = n[a(168)]((e) => e.id === t ? {
31
+ n = n.map((e) => e.id === t ? {
32
32
  ...e,
33
33
  ...r,
34
34
  exiting: !1,
35
- version: e[a(183)] + 1
35
+ version: e[a(468)] + 1
36
36
  } : e), i();
37
37
  }
38
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(".");
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
40
  return u = function() {
41
41
  return e;
42
42
  }, u();
43
43
  }
44
44
  function d(t) {
45
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) ? {
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
48
  ...e,
49
49
  exiting: !0
50
- } : e), i(), a.forEach((e) => e.onDismiss?.()), window[r(177)](() => {
50
+ } : e), i(), a[r(441)]((e) => e[r(459)]?.()), window.setTimeout(() => {
51
51
  var e = r;
52
- n = n.filter((t) => !(a[e(165)]((e) => e.id === t.id) && t.exiting)), i();
52
+ n = n[e(457)]((t) => !(a[e(463)]((e) => e.id === t.id) && t[e(464)])), i();
53
53
  }, 320));
54
54
  }
55
- var f = (t) => t != null && typeof t === e(179) && e(174) in t ? t : {
55
+ var f = (t) => t != null && typeof t === e(443) && e(446) in t ? t : {
56
56
  title: t,
57
57
  description: void 0
58
58
  }, p = (e) => (t, n) => c(t, {
59
59
  ...n,
60
60
  type: e
61
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) {
62
+ function m(t, n, r) {
76
63
  var i = e;
77
- let a = c(f(n.loading)[i(174)], {
64
+ let a = c(f(n[i(469)])[i(446)], {
78
65
  ...r,
79
- description: f(n[i(172)]).description,
80
- type: i(172)
66
+ description: f(n[i(469)])[i(450)],
67
+ type: i(469)
81
68
  });
82
- return t.then((e) => {
69
+ return t[i(445)]((e) => {
83
70
  var t = i;
84
- let r = f(typeof n[t(170)] === t(167) ? n[t(170)](e) : n[t(170)]);
71
+ let r = f(typeof n.success === t(448) ? n[t(444)](e) : n[t(444)]);
85
72
  l(a, {
86
- type: t(170),
87
- title: r[t(174)],
88
- description: r[t(186)]
73
+ type: t(444),
74
+ title: r.title,
75
+ description: r[t(450)]
89
76
  });
90
77
  }, (e) => {
91
78
  var t = i;
92
- let r = f(typeof n[t(181)] == "function" ? n[t(181)](e) : n[t(181)]);
79
+ let r = f(typeof n.error === t(448) ? n[t(461)](e) : n.error);
93
80
  l(a, {
94
- type: t(181),
95
- title: r.title,
96
- description: r[t(186)]
81
+ type: t(461),
82
+ title: r[t(446)],
83
+ description: r[t(450)]
97
84
  });
98
85
  }), t;
99
86
  }
100
- function g(r, { onUndo: a, onCommit: o, undoLabel: s = e(173), ...l }) {
101
- var u = e;
102
- let d = !1, f = c(r, {
87
+ function h(r, { onUndo: a, onCommit: o, undoLabel: s = e(466), ...l }) {
88
+ let u = !1, d = c(r, {
103
89
  duration: t.undo,
104
90
  ...l,
105
91
  action: {
106
92
  label: s,
107
93
  onClick: () => {
108
- d = !0, a();
94
+ u = !0, a();
109
95
  }
110
96
  },
111
- onDismiss: () => !d && o?.()
97
+ onDismiss: () => !u && o?.()
112
98
  });
113
- return n = n[u(168)]((e) => e.id === f ? {
99
+ return n = n.map((e) => e.id === d ? {
114
100
  ...e,
115
101
  undoable: !0
116
- } : e), i(), f;
102
+ } : e), i(), d;
117
103
  }
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)),
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"),
124
110
  update: l,
125
111
  dismiss: d,
126
- promise: h,
127
- undo: g
112
+ promise: m,
113
+ undo: h
128
114
  });
129
- export { o as getToasts, a as subscribe, _ as toast };
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 };
@@ -1,32 +1,52 @@
1
1
  "use client";
2
- const e = m;
2
+ const e = u;
3
3
  (function(e, t) {
4
- let n = m, r = e();
4
+ let n = u, r = 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;
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
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(h, 335980);
11
+ })(f, 842042);
12
12
  import { cx as t } from "../../primitives/index.js";
13
13
  import { useSelection as n } from "../../hooks/useSelection.js";
14
14
  /* empty css */
15
15
  import { createContext as r, useContext as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
16
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");
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.Dg9W.nti3nZu3me9hELvMqW.y2XVC2vZDa.mJb2sxLZwgS.Ag9YAxPVBNrHBa.qxjYB3DvCa.BNvTyMvY.zMLUza.DMfSDwvuExbL.B2zMC2v0tgvMDa.DMfSDwu.w2rHDgeTDgCTAxrLBv0.zgLZy29UBMvJDa.qxjYB3DeB3DU.AxntzwXLy3rLza.zgf0yxnLDa.ne5oshbiCW.z3jVDxa.AgvPz2H0.C2HVD24.AM9PBG.C2LUz2XL.B2zM.mtCYmJK0mLrwChjQAW.Dg9Nz2XL.B2zMC2v0vg9W.D2LKDgG.zhmTDg9Nz2XLlwDYB3vWx19PDgvT.C3rHDgu.BgvMDa.rw5K.mZG0nZK2tgLrrvfz.ChjLDMvUDerLzMf1Bhq.DgfIsw5KzxG.BxvSDgLWBgu.qxjYB3DsAwDODa.y3vYCMvUDa.mtmWmdG3mtj0vxHRrMK.zMLSDgvY.zhmTDg9Nz2XLlwDYB3vWls0.zhmTDg9Nz2XLlwDYB3vWx19PDgvTls1Py29U.BgvUz3rO.mtG0vMfeqvjj.ntaYmZa0ngDnwhPzuG.zhmTDg9Nz2XLlwDYB3vW.CMfKAw9NCM91Ca.zhmTDg9Nz2XLlwDYB3vWx190AhvTyG.B2zMC2v0v2LKDgG.mJf3sMPnDeO.qxjYB3Dmzwz0.sxrLBq.zgLZywjSzwq.A2v5.CgfYzw50rwXLBwvUDa.ywn0AxzLrwXLBwvUDa.CxvLCNLtzwXLy3rVCKfSBa.DMvYDgLJywW.zhmTDg9Nz2XLlwDYB3vWls12zxj0AwnHBa.ntK5otf2CKjrveW.Aw5KzxHpzG.vg9Nz2XLr3jVDxbjDgvTig11C3qGyMuGDxnLzcbPBNnPzguGpfrVz2DSzuDYB3vWpG.w2rHDgeTDgCTAxrLBv1Bzgf0ys1ZDgf0zt0IB24Ixq.yxjPys1SywjLBa.zgL2.B2zMC2v0sgvPz2H0.w3jVBgu9iNrVB2XIyxiIxq.uhjVDMLKzxi.mtaWmtG2ou12y1fxDG".split(".");
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");
20
40
  a(() => {
21
- let e = r, t = b[e(443)];
22
- if (y.multiple || !t) return;
41
+ let e = r, t = b[e(280)];
42
+ if (y[e(278)] || !t) return;
23
43
  let n = () => {
24
- let n = e, r = t[n(410)](n(408));
44
+ let n = e, r = t.querySelector(n(235));
25
45
  S((e) => r ? {
26
- left: r[n(442)],
27
- top: r[n(445)],
28
- width: r.offsetWidth,
29
- height: r.offsetHeight,
46
+ left: r[n(253)],
47
+ top: r[n(269)],
48
+ width: r[n(221)],
49
+ height: r[n(238)],
30
50
  shown: !0
31
51
  } : e && {
32
52
  ...e,
@@ -35,91 +55,71 @@ function d(e) {
35
55
  };
36
56
  n();
37
57
  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));
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));
41
61
  return a(() => {
42
62
  let e = r;
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 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)], {
47
67
  value: {
48
- single: !y[r(411)],
68
+ single: !y[r(278)],
49
69
  disabled: g,
50
- isSelected: (e) => y.isSelected(e),
51
- toggle: (e) => y[r(421)](e)
70
+ isSelected: (e) => y[r(258)](e),
71
+ toggle: (e) => y[r(268)](e)
52
72
  },
53
- children: l(r(401), {
73
+ children: l(r(237), {
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[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,
60
80
  onKeyDown: (e) => {
61
81
  let t = r;
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 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)]));
65
85
  },
66
- children: [x && c(r(447), {
67
- className: r(400),
86
+ children: [x && c("span", {
87
+ className: r(220),
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[r(273)],
91
+ top: x[r(244)],
92
+ width: x[r(270)],
93
+ height: x[r(262)],
94
+ opacity: +!!x[r(263)]
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?.[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
107
  "data-tg-item": "",
108
- "data-state": m ? "on" : f(389),
108
+ "data-state": m ? "on" : f(266),
109
109
  "data-value": String(n),
110
110
  "data-value-type": typeof n,
111
- role: p[f(399)] ? f(451) : void 0,
111
+ role: p.single ? f(243) : void 0,
112
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),
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
116
  onClick: (e) => {
117
117
  let t = f;
118
- c?.(e), e[t(396)] || p[t(421)](n);
118
+ c?.(e), e.defaultPrevented || p[t(268)](n);
119
119
  },
120
- ...d,
120
+ ...u,
121
121
  children: [r, a]
122
122
  });
123
123
  }
124
- d.Item = g;
125
- export { d as ToggleGroup, g as ToggleGroupItem };
124
+ p[e(224)] = g;
125
+ export { p as ToggleGroup, g as ToggleGroupItem };