@iamfiro/design 0.3.1 → 0.3.4

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 (161) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/avatar/AGENTS.md +29 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/agents/tooltip/AGENTS.md +1 -1
  6. package/lib/components/Accordion/Accordion2.js +92 -92
  7. package/lib/components/ActionBar/ActionBar2.js +42 -45
  8. package/lib/components/Alert/Alert2.js +77 -77
  9. package/lib/components/AppShell/AppShell2.js +70 -71
  10. package/lib/components/AreaChart/AreaChart.js +32 -35
  11. package/lib/components/BarChart/BarChart2.js +155 -155
  12. package/lib/components/BarList/BarList2.js +93 -93
  13. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -64
  14. package/lib/components/Calendar/Calendar2.js +183 -182
  15. package/lib/components/Calendar/DatePicker2.js +116 -115
  16. package/lib/components/Calendar/date.js +67 -66
  17. package/lib/components/Card/Card2.js +67 -67
  18. package/lib/components/CardFrame/CardFrame2.js +34 -37
  19. package/lib/components/Chart/ChartParts.js +90 -90
  20. package/lib/components/Chart/chart2.js +62 -62
  21. package/lib/components/Chart/useChartInteraction.js +51 -51
  22. package/lib/components/ChatBubble/ChatBubble2.js +117 -117
  23. package/lib/components/ChatBubble/formatChatTime.js +37 -36
  24. package/lib/components/ChatComposer/ChatComposer2.js +55 -55
  25. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  26. package/lib/components/CodeBlock/highlight.js +72 -72
  27. package/lib/components/ColorPicker/ColorPicker2.js +232 -231
  28. package/lib/components/ColorPicker/color.js +67 -67
  29. package/lib/components/ColorPicker/presets.js +25 -24
  30. package/lib/components/Combobox/Combobox2.js +140 -140
  31. package/lib/components/CommandMenu/CommandMenu.js +135 -135
  32. package/lib/components/Comment/Comment2.js +82 -57
  33. package/lib/components/ContextMenu/ContextMenu2.js +101 -100
  34. package/lib/components/DataGrid/DataGrid2.js +872 -871
  35. package/lib/components/DataGrid/GridPopover.js +98 -98
  36. package/lib/components/DataGrid/anchor.js +34 -33
  37. package/lib/components/DataGrid/model.js +291 -290
  38. package/lib/components/DataGrid/panels.js +337 -336
  39. package/lib/components/DataGrid/typeMeta.js +49 -48
  40. package/lib/components/DataGrid/types.js +34 -33
  41. package/lib/components/DescriptionList/DescriptionList2.js +109 -109
  42. package/lib/components/Dialog/AlertDialog.js +53 -53
  43. package/lib/components/Dialog/Dialog2.js +72 -72
  44. package/lib/components/Dialog/modal.js +67 -68
  45. package/lib/components/Drawer/Drawer2.js +117 -117
  46. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -266
  47. package/lib/components/DropdownMenu/menuCore.js +68 -42
  48. package/lib/components/Dropzone/Dropzone2.js +78 -78
  49. package/lib/components/EmptyState/EmptyState2.js +58 -56
  50. package/lib/components/FileChip/FileChip2.js +72 -48
  51. package/lib/components/FileUpload/FileUpload.js +137 -138
  52. package/lib/components/FilterChips/FilterChips2.js +61 -61
  53. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  54. package/lib/components/FunnelChart/funnel.js +50 -49
  55. package/lib/components/Highlight/Highlight2.js +56 -56
  56. package/lib/components/HoverCard/HoverCard.js +73 -73
  57. package/lib/components/InlineDiff/InlineDiff2.js +129 -129
  58. package/lib/components/InlineDiff/diff.js +87 -87
  59. package/lib/components/InlineDiff/useDiffReview.js +54 -52
  60. package/lib/components/Kanban/Kanban2.js +383 -384
  61. package/lib/components/Kanban/KanbanCard.js +68 -93
  62. package/lib/components/Kanban/move.js +43 -43
  63. package/lib/components/LineChart/LineChart2.js +164 -164
  64. package/lib/components/List/List2.js +60 -60
  65. package/lib/components/Listbox/Listbox2.js +108 -108
  66. package/lib/components/Marker/Marker2.js +59 -57
  67. package/lib/components/Menubar/Menubar2.js +120 -119
  68. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  69. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -279
  70. package/lib/components/NoticeStack/NoticeStack2.js +109 -109
  71. package/lib/components/NumberStepper/NumberStepper2.js +70 -70
  72. package/lib/components/OtpInput/OtpInput2.js +94 -94
  73. package/lib/components/Pagination/Pagination2.js +109 -109
  74. package/lib/components/Pagination/paginationRange.js +37 -38
  75. package/lib/components/PhoneInput/PhoneInput.js +83 -84
  76. package/lib/components/PieChart/PieChart2.js +157 -157
  77. package/lib/components/PieChart/arc.js +72 -72
  78. package/lib/components/PieChart/useArcTween.js +50 -53
  79. package/lib/components/Popover/Popover2.js +62 -61
  80. package/lib/components/ProgressTracker/ProgressTracker2.js +104 -104
  81. package/lib/components/Rating/Rating2.js +89 -88
  82. package/lib/components/Resizable/Resizable2.js +133 -134
  83. package/lib/components/Resizable/layout.js +56 -56
  84. package/lib/components/ScaledPreview/ScaledPreview2.js +64 -63
  85. package/lib/components/ScatterChart/ScatterChart2.js +252 -251
  86. package/lib/components/ScatterChart/scatter.js +50 -52
  87. package/lib/components/ScrollArea/ScrollArea2.js +122 -122
  88. package/lib/components/Select/Select2.js +84 -85
  89. package/lib/components/Sidebar/Sidebar2.js +79 -79
  90. package/lib/components/Skeleton/Skeleton2.js +56 -56
  91. package/lib/components/Slider/Slider2.js +63 -63
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -46
  93. package/lib/components/SparkChart/SparkChart2.js +129 -128
  94. package/lib/components/SparkChart/spark.js +49 -48
  95. package/lib/components/Sparkbar/Sparkbar2.js +59 -58
  96. package/lib/components/SplitView/SplitView2.js +54 -55
  97. package/lib/components/Stat/Stat2.js +59 -59
  98. package/lib/components/StepList/StepList2.js +78 -78
  99. package/lib/components/Table/Table2.js +55 -55
  100. package/lib/components/Tabs/Tabs2.js +76 -76
  101. package/lib/components/TagInput/TagInput2.js +218 -215
  102. package/lib/components/TimePicker/TimePicker2.js +204 -204
  103. package/lib/components/TimePicker/time.js +59 -58
  104. package/lib/components/Timeline/Timeline2.js +179 -179
  105. package/lib/components/Timeline/scale.js +60 -55
  106. package/lib/components/Toast/Toaster.js +103 -103
  107. package/lib/components/Toast/store.js +47 -47
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +77 -77
  109. package/lib/components/Toolbar/Toolbar2.js +138 -138
  110. package/lib/components/Tracker/Tracker2.js +99 -99
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +117 -117
  112. package/lib/components/TreeView/TreeView2.js +145 -145
  113. package/lib/hooks/timing.js +33 -33
  114. package/lib/hooks/useControllableState.js +33 -33
  115. package/lib/hooks/useCountdown.js +54 -55
  116. package/lib/hooks/useDigitInput.js +85 -84
  117. package/lib/hooks/useDismiss.js +55 -55
  118. package/lib/hooks/useElapsed.js +55 -55
  119. package/lib/hooks/useFloating.js +21 -21
  120. package/lib/hooks/useFocusTrap.js +67 -67
  121. package/lib/hooks/usePresence.js +33 -29
  122. package/lib/hooks/usePressToOpen.js +33 -33
  123. package/lib/hooks/useScrollLock.js +54 -55
  124. package/lib/hooks/useSelection.js +54 -48
  125. package/lib/index.js +67 -68
  126. package/lib/primitives/AspectRatio2.js +58 -54
  127. package/lib/primitives/BrandIcon.js +189 -158
  128. package/lib/primitives/ColorDot2.js +52 -51
  129. package/lib/primitives/CopyButton2.js +66 -64
  130. package/lib/primitives/CountBadge2.js +56 -56
  131. package/lib/primitives/Countdown2.js +36 -34
  132. package/lib/primitives/Delta2.js +41 -66
  133. package/lib/primitives/Elapsed.js +32 -32
  134. package/lib/primitives/FileIcon2.js +90 -90
  135. package/lib/primitives/Flag2.js +157 -157
  136. package/lib/primitives/IconStack2.js +60 -58
  137. package/lib/primitives/IconTile2.js +46 -48
  138. package/lib/primitives/Kbd2.js +51 -51
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +37 -35
  141. package/lib/primitives/MaskedText2.js +71 -75
  142. package/lib/primitives/Progress2.js +72 -72
  143. package/lib/primitives/RelativeTime.js +60 -64
  144. package/lib/primitives/SearchInput2.js +55 -56
  145. package/lib/primitives/SelectorButton2.js +69 -71
  146. package/lib/primitives/Spinner2.js +63 -59
  147. package/lib/primitives/StatusIcon2.js +66 -66
  148. package/lib/primitives/Swatch2.js +54 -56
  149. package/lib/primitives/Tooltip2.js +77 -77
  150. package/lib/primitives/Typography2.js +67 -67
  151. package/lib/primitives/formatCountdown.js +38 -41
  152. package/lib/primitives/formatElapsed.js +41 -40
  153. package/lib/primitives/formatRelativeTime.js +74 -48
  154. package/lib/primitives/hotkey.js +81 -81
  155. package/lib/primitives/index.js +220 -199
  156. package/lib/primitives/maskValue.js +53 -52
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/lib/types/primitives/index.d.ts +6 -2
  161. package/package.json +1 -1
@@ -1,52 +1,52 @@
1
1
  "use client";
2
- const e = u;
2
+ const e = n;
3
3
  (function(e, t) {
4
- let n = u, r = e();
4
+ let r = n, i = e();
5
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());
6
+ if (-parseInt(r(175)) / 1 + -parseInt(r(149)) / 2 * (-parseInt(r(136)) / 3) + -parseInt(r(153)) / 4 + -parseInt(r(165)) / 5 * (-parseInt(r(150)) / 6) + parseInt(r(179)) / 7 * (parseInt(r(139)) / 8) + -parseInt(r(162)) / 9 * (-parseInt(r(163)) / 10) + parseInt(r(152)) / 11 == t) break;
7
+ i.push(i.shift());
8
8
  } catch {
9
- r.push(r.shift());
9
+ i.push(i.shift());
10
10
  }
11
- })(f, 842042);
11
+ })(d, 254019);
12
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) {
13
+ function n(e, t) {
14
+ e -= 129;
15
+ let r = d(), i = r[e];
16
+ n.WpaqNw === void 0 && (n.skoDch = function(e) {
21
17
  let t = "", n = "";
22
18
  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
19
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
24
20
  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;
21
+ }, n.renbSn = {}, n.WpaqNw = !0);
22
+ let a = r[0];
23
+ n.IhIfSW !== a && (n.renbSn = {}, n.IhIfSW = a);
24
+ let o = n.renbSn[e];
25
+ return o === void 0 ? (i = n.skoDch(i), n.renbSn[e] = i) : i = o, i;
30
26
  }
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() {
27
+ import { useSelection as r } from "../../hooks/useSelection.js";
28
+ /* empty css */
29
+ import { createContext as i, useContext as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
30
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
31
+ function d() {
32
+ let e = /* @__PURE__ */ "ohL0C2vUyW.B2jZzxj2zq.A2v5.Dg9W.Dg9Nz2XL.w2rHDgeTDgCTAxrLBv1Bzgf0ys1ZDgf0zt0IB24Ixq.qxjYB3DeB3DU.w3jVBgu9iNrVB2XIyxiIxq.zhmTDg9Nz2XLlwDYB3vWx190AhvTyG.C3rHDgu.ntu4mLPTwxf6wq.mZK4nhHTq0LSCq.B2zMC2v0v2LKDgG.mtC5otqXm0Dbq0vOAW.mti2otm0ohvHtxrJuW.B2zM.qxjYB3DsAwDODa.CMfKAw9NCM91Ca.BxvSDgLWBgu.zhmTDg9Nz2XLlwDYB3vWls0.zMLSDgvY.AM9PBG.w2rHDgeTDgCTAxrLBv0.oteZnw5RtfHzqW.ntuWDgjXDvjA.DMfSDwu.ndeWCfrjv0nv.zhmTDg9Nz2XLlwDYB3vW.Ag9YAxPVBNrHBa.C2v0u2vSzwn0zwq.zhmTDg9Nz2XLlwDYB3vWls12zxj0AwnHBa.z3jVDxa.zM9JDxm.BgvUz3rO.zgf0yxnLDa.AgvPz2H0.mJmWotG2u3vUuMfl.zgLZywjSzwq.CxvLCNLtzwXLy3rVCKfSBa.B2zMC2v0sgvPz2H0.mZeZmJGYoxHqveXgsW.CgfYzw50rwXLBwvUDa.zMLUza.BNvTyMvY.AxntzwXLy3rLza.ChjLDMvUDerLzMf1Bhq.y3vYCMvUDa.sg9Tzq.zgvMyxvSDfbYzxzLBNrLza.ywn0AxzLrwXLBwvUDa.CxvLCNLtzwXLy3rVCG.zhmTDg9Nz2XLlwDYB3vWx19PDgvT.yxjPys1SywjLBa.C2LUz2XL.odDrCKrdDuK.zhmTDg9Nz2XLlwDYB3vWx19PDgvTls1Py29U.vg9Nz2XLr3jVDxbjDgvTig11C3qGyMuGDxnLzcbPBNnPzguGpfrVz2DSzuDYB3vWpG".split(".");
33
+ return d = function() {
35
34
  return e;
36
- }, f();
35
+ }, d();
37
36
  }
37
+ var f = i(null);
38
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;
39
+ let i = n, { variant: a = "soft", size: d = "md", orientation: p = "horizontal", disabled: g, className: _, children: v } = e, y = r(e), b = s(null), [x, S] = c(null), C = y.selected[i(160)]("\0");
40
+ o(() => {
41
+ let e = i, t = b[e(185)];
42
+ if (y[e(157)] || !t) return;
43
43
  let n = () => {
44
- let n = e, r = t.querySelector(n(235));
44
+ let n = e, r = t[n(132)](n(144));
45
45
  S((e) => r ? {
46
- left: r[n(253)],
47
- top: r[n(269)],
48
- width: r[n(221)],
49
- height: r[n(238)],
46
+ left: r.offsetLeft,
47
+ top: r.offsetTop,
48
+ width: r[n(151)],
49
+ height: r[n(178)],
50
50
  shown: !0
51
51
  } : e && {
52
52
  ...e,
@@ -54,72 +54,72 @@ function p(e) {
54
54
  });
55
55
  };
56
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;
57
+ let r = new ResizeObserver(n);
58
+ return r[e(140)](t), () => r.disconnect();
59
+ }, [y[i(157)], C]);
60
+ let w = () => !!b[i(185)]?.[i(180)]?.closest(i(146));
61
+ return o(() => {
62
+ let e = i;
63
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)], {
64
+ let t = m(b[e(185)]), n = t[e(181)]((t) => t[e(173)][e(148)] === "on") ?? t[0];
65
+ for (let t of b[e(185)]?.querySelectorAll(e(161)) ?? []) t.tabIndex = t === n ? 0 : -1;
66
+ }), l(f.Provider, {
67
67
  value: {
68
- single: !y[r(278)],
68
+ single: !y.multiple,
69
69
  disabled: g,
70
- isSelected: (e) => y[r(258)](e),
71
- toggle: (e) => y[r(268)](e)
70
+ isSelected: (e) => y[i(183)](e),
71
+ toggle: (e) => y[i(143)](e)
72
72
  },
73
- children: l(r(237), {
73
+ children: u("div", {
74
74
  ref: b,
75
- role: y[r(278)] ? r(261) : r(219),
76
- "aria-label": e[r(236)],
75
+ role: y[i(157)] ? i(170) : i(156),
76
+ "aria-label": e[i(134)],
77
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,
78
+ className: t(i(166), i(158) + a, i(158) + d, p === "vertical" && i(169), _),
79
+ "data-glide": !y[i(157)] || void 0,
80
80
  onKeyDown: (e) => {
81
- let t = r;
81
+ let t = i;
82
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)]));
83
+ let n = p === t(167) ? "ArrowLeft" : "ArrowUp", r = t(p === "horizontal" ? 155 : 145), a = m(b.current), o = a.indexOf(document[t(131)]), s;
84
+ e[t(141)] === r ? s = a[(o + 1) % a[t(172)]] : e.key === n ? s = a[(o - 1 + a[t(172)]) % a[t(172)]] : e[t(141)] === t(129) ? s = a[0] : e.key === "End" && (s = a[a.length - 1]), s && (e[t(184)](), s[t(171)](), !y[t(157)] && s[t(173)][t(164)] != null && y[t(168)]([h(s.dataset[t(164)], s)]));
85
85
  },
86
- children: [x && c("span", {
87
- className: r(220),
86
+ children: [x && l("span", {
87
+ className: i(147),
88
88
  "aria-hidden": !0,
89
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)]
90
+ left: x.left,
91
+ top: x[i(142)],
92
+ width: x.width,
93
+ height: x[i(174)],
94
+ opacity: +!!x.shown
95
95
  }
96
96
  }), v]
97
97
  })
98
98
  });
99
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", {
100
+ var m = (t) => [...t?.[e(177)]("[data-tg-item]") ?? []][e(159)]((t) => !t[e(176)]), h = (t, n) => n[e(173)].valueType === e(182) ? Number(t) : t;
101
+ function g({ value: n, icon: r, children: i, disabled: o, className: s, onClick: c, ...l }) {
102
+ let d = e, p = a(f);
103
+ if (!p) throw Error(d(138));
104
+ let m = p[d(183)](n);
105
+ return u("button", {
106
106
  type: "button",
107
107
  "data-tg-item": "",
108
- "data-state": m ? "on" : f(266),
108
+ "data-state": m ? "on" : d(154),
109
109
  "data-value": String(n),
110
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),
111
+ role: p[d(135)] ? "radio" : void 0,
112
+ "aria-checked": p[d(135)] ? m : void 0,
113
+ "aria-pressed": p[d(135)] ? void 0 : m,
114
+ disabled: p[d(176)] || o,
115
+ className: t(d(133), !i && d(137), s),
116
116
  onClick: (e) => {
117
- let t = f;
118
- c?.(e), e.defaultPrevented || p[t(268)](n);
117
+ let t = d;
118
+ c?.(e), e[t(130)] || p[t(143)](n);
119
119
  },
120
- ...u,
121
- children: [r, a]
120
+ ...l,
121
+ children: [r, i]
122
122
  });
123
123
  }
124
- p[e(224)] = g;
124
+ p.Item = g;
125
125
  export { p as ToggleGroup, g as ToggleGroupItem };