@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
@@ -3,99 +3,99 @@ const e = i;
3
3
  (function(e, t) {
4
4
  let n = i, r = e();
5
5
  for (;;) try {
6
- if (parseInt(n(309)) / 1 * (-parseInt(n(312)) / 2) + parseInt(n(311)) / 3 * (-parseInt(n(297)) / 4) + -parseInt(n(310)) / 5 + -parseInt(n(314)) / 6 + -parseInt(n(300)) / 7 + -parseInt(n(292)) / 8 + parseInt(n(298)) / 9 == t) break;
6
+ if (-parseInt(n(289)) / 1 * (parseInt(n(279)) / 2) + -parseInt(n(298)) / 3 * (-parseInt(n(264)) / 4) + -parseInt(n(282)) / 5 * (-parseInt(n(275)) / 6) + parseInt(n(271)) / 7 + -parseInt(n(292)) / 8 + parseInt(n(284)) / 9 * (-parseInt(n(294)) / 10) + parseInt(n(270)) / 11 == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(r, 598294);
11
+ })(r, 551821);
12
12
  import { Inline as t } from "../../primitives/Layout2.js";
13
13
  import { cx as n } from "../../primitives/index.js";
14
+ /* empty css */
14
15
  function r() {
15
- let e = /* @__PURE__ */ "y29S.D2LKDgG.zw5K.DgHLywq.zgvMyxvSDa.AgvHzgvY.CMLNAhq.zhmTDgfIBguTD3jHCa.C3rHCNq.odC1ntG3mNfAsKnsAW.y2vUDgvY.AgvHzgvYtgvHzgLUzW.DgfYz2v0.ywXPz24.ngfhwwzPDG.mZqWoduYmJnSrvLlueW.BgvUz3rO.nJm2otmZnujNr1nfuW.BgfIzwW.zhmTDgfIBgu.CMvUzgvY.zhmTDgfIBguTlwLUDgvYywn0AxzL.zhmTDgfIBguTlxn0CMLWzwq.DgjVzhK.BNvTzxjPyW.zhmTDgfIBguTlq.mZv2ugXrAgi.mty2mde4meXMqMjVzW.mtq0ntqZm21jwM1Zyq.mJKXnhj1sK13BW.zhmTDgfIBgvFx2vTChr5.mtKXodmZmMHMr2voAW.C3bHBG.zhmTDgfIBgvFx251Bq.ChjLDMvUDerLzMf1Bhq.A2v5.BwfW".split(".");
16
+ let e = /* @__PURE__ */ "y2fWDgLVBG.mteXodu1nMvUthbnsW.C3bHBG.D2LKDgG.ywXPz24.BwfW.zw5K.mte1nJK4mJjkBLLrrLa.nJmYmdy3muXgC090uG.AgvHzgvY.BgvUz3rO.zhmTDgfIBguTlw92zxjSAw5L.ndG2q29hrwTb.CMLNAhq.CMvUzgvY.BNvTzxjPyW.mtm5otK1mg5AAuDotG.y29S.B3zLCMXPBMu.mtiWntv0CKDjsLi.ChjLDMvUDerLzMf1Bhq.ou9Ns016za.DgjVzhK.zhmTDgfIBgvFx251Bq.BgvHzgLUzW.zhmTDgfIBguTD3jHCa.mxnJAg5TsW.AgvHzgvYtgvHzgLUzW.C3rHCNq.ntGWmdm4ngfnwezfCG.zhmTDgfIBgvFx2vTChr5.nduYodqXmeHyq2LfDG.DgHLywq.DgfIBgu.A2v5.m21QCfHywq.BgfIzwW.y2vUDgvY.zhmTDgfIBgu.rw50zxi".split(".");
16
17
  return r = function() {
17
18
  return e;
18
19
  }, r();
19
20
  }
20
21
  function i(e, t) {
21
- e -= 287;
22
+ e -= 262;
22
23
  let n = r(), a = n[e];
23
- i.NjPyXt === void 0 && (i.yBXfDn = function(e) {
24
+ i.uwkASa === void 0 && (i.zkEqFX = function(e) {
24
25
  let t = "", n = "";
25
26
  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);
26
27
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
27
28
  return decodeURIComponent(n);
28
- }, i.sPxTGI = {}, i.NjPyXt = !0);
29
+ }, i.sCveho = {}, i.uwkASa = !0);
29
30
  let o = n[0];
30
- i.QZKoRK !== o && (i.sPxTGI = {}, i.QZKoRK = o);
31
- let s = i.sPxTGI[e];
32
- return s === void 0 ? (a = i.yBXfDn(a), i.sPxTGI[e] = a) : a = s, a;
31
+ i.DjsIgc !== o && (i.sCveho = {}, i.DjsIgc = o);
32
+ let s = i.sCveho[e];
33
+ return s === void 0 ? (a = i.zkEqFX(a), i.sCveho[e] = a) : a = s, a;
33
34
  }
34
- /* empty css */
35
35
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
36
36
  var s = {
37
37
  start: e(291),
38
- center: e(293),
39
- end: "end"
38
+ center: e(300),
39
+ end: e(269)
40
40
  }, c = {
41
41
  start: void 0,
42
- center: e(293),
43
- end: e(289)
42
+ center: "center",
43
+ end: e(276)
44
44
  };
45
- function l({ columns: r, rows: i, rowKey: l, density: u = e(287), striped: d = !0, headerVariant: f = e(301), selectedKey: p, onRowClick: m, empty: h, caption: g, className: _, style: v }) {
46
- let y = e, b = (e) => e[y(296)] ?? (e[y(307)] ? y(322) : y(291)), x = !!m, S = (e, t, n) => {
47
- let r = y;
48
- e[r(295)] !== e.currentTarget || e[r(318)] !== "Enter" && e[r(318)] !== " " || (e[r(317)](), m?.(t, n));
45
+ function l({ columns: r, rows: l, rowKey: u, density: d = "default", striped: f = !0, headerVariant: p = e(299), selectedKey: m, onRowClick: h, empty: g, caption: _, className: v, style: y }) {
46
+ let b = e, x = (e) => e[b(267)] ?? (e[b(278)] ? b(269) : b(291)), S = !!h, C = (e, t, n) => {
47
+ let r = b;
48
+ e.target !== e.currentTarget || e[r(297)] !== r(262) && e.key !== " " || (e[r(283)](), h?.(t, n));
49
49
  };
50
50
  return a("div", {
51
- className: n(y(290), "ds-scroll", _),
52
- style: v,
53
- children: o("table", {
54
- className: n(y(302), y(308) + u, d && y(305), f === "overline" && "ds-table--overline", x && y(304)),
51
+ className: n(b(288), "ds-scroll", v),
52
+ style: y,
53
+ children: o(b(296), {
54
+ className: n(b(301), "ds-table--" + d, f && "ds-table--striped", p === b(281) && b(274), S && "ds-table--interactive"),
55
55
  children: [
56
- g && a("caption", { children: g }),
57
- a(y(323), { children: a("tr", { children: r[y(319)]((e) => {
58
- let n = y, r = b(e);
56
+ _ && a(b(263), { children: _ }),
57
+ a(b(295), { children: a("tr", { children: r[b(268)]((e) => {
58
+ let n = b, r = x(e);
59
59
  return a("th", {
60
- scope: n(320),
60
+ scope: n(280),
61
61
  style: {
62
- width: e[n(321)],
62
+ width: e[n(266)],
63
63
  textAlign: c[r]
64
64
  },
65
- children: e.headerLeading == null ? e[n(288)] : o(t, {
65
+ children: e[n(290)] == null ? e[n(272)] : o(t, {
66
66
  gap: 2,
67
67
  wrap: !1,
68
68
  justify: s[r],
69
- children: [e[n(294)], a("span", { children: e.header })]
69
+ children: [e[n(290)], a(n(265), { children: e.header })]
70
70
  })
71
- }, e[n(318)]);
71
+ }, e[n(297)]);
72
72
  }) }) }),
73
- o(y(306), { children: [i[y(319)]((e, n) => {
74
- let i = y, u = l ? l(e, n) : n, d = p != null && p === u;
73
+ o(b(285), { children: [l[b(268)]((e, n) => {
74
+ let l = u ? u(e, n) : n, d = m != null && m === l;
75
75
  return a("tr", {
76
76
  "data-selected": d || void 0,
77
77
  "aria-current": d || void 0,
78
- tabIndex: x ? 0 : void 0,
79
- onClick: m ? () => m(e, n) : void 0,
80
- onKeyDown: x ? (t) => S(t, e, n) : void 0,
81
- children: r[i(319)]((r) => {
82
- let l = i, u = b(r), d = r[l(303)] ? r[l(303)](e, n) : e[r[l(318)]] ?? null, f = r.leading?.(e, n);
78
+ tabIndex: S ? 0 : void 0,
79
+ onClick: h ? () => h(e, n) : void 0,
80
+ onKeyDown: S ? (t) => C(t, e, n) : void 0,
81
+ children: r.map((r) => {
82
+ let l = i, u = x(r), d = r[l(277)] ? r[l(277)](e, n) : e[r.key] ?? null, f = r[l(287)]?.(e, n);
83
83
  return a("td", {
84
- className: r[l(307)] ? l(316) : void 0,
84
+ className: r[l(278)] ? l(286) : void 0,
85
85
  style: { textAlign: c[u] },
86
86
  children: f == null ? d : o(t, {
87
87
  gap: 3,
88
88
  wrap: !1,
89
89
  justify: s[u],
90
- children: [f, a(l(315), { children: d })]
90
+ children: [f, a(l(265), { children: d })]
91
91
  })
92
- }, r[l(318)]);
92
+ }, r[l(297)]);
93
93
  })
94
- }, u);
95
- }), !i[y(299)] && h && a("tr", { children: a("td", {
96
- colSpan: r[y(299)],
97
- className: y(313),
98
- children: h
94
+ }, l);
95
+ }), !l[b(273)] && g && a("tr", { children: a("td", {
96
+ colSpan: r.length,
97
+ className: b(293),
98
+ children: g
99
99
  }) })] })
100
100
  ]
101
101
  })
@@ -1,131 +1,131 @@
1
1
  "use client";
2
- const e = d;
3
- (function(e, t) {
4
- let n = d, r = e();
5
- for (;;) try {
6
- if (-parseInt(n(475)) / 1 + -parseInt(n(457)) / 2 + -parseInt(n(459)) / 3 * (parseInt(n(451)) / 4) + parseInt(n(462)) / 5 * (parseInt(n(464)) / 6) + -parseInt(n(456)) / 7 + parseInt(n(435)) / 8 * (parseInt(n(461)) / 9) + parseInt(n(453)) / 10 * (parseInt(n(477)) / 11) == t) break;
7
- r.push(r.shift());
8
- } catch {
9
- r.push(r.shift());
10
- }
11
- })(h, 955110);
12
- import { useControllableState as t } from "../../hooks/useControllableState.js";
13
- import { cx as n } from "../../primitives/index.js";
14
- /* empty css */
15
- import { createContext as r, useContext as i, useId as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
16
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
17
- function d(e, t) {
18
- e -= 430;
19
- let n = h(), r = n[e];
20
- d.RtcHtz === void 0 && (d.vMWeNG = function(e) {
2
+ const e = t;
3
+ function t(e, n) {
4
+ e -= 432;
5
+ let r = i(), a = r[e];
6
+ t.FIfLXP === void 0 && (t.BcWXHk = function(e) {
21
7
  let t = "", n = "";
22
8
  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
9
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
24
10
  return decodeURIComponent(n);
25
- }, d.sydbgW = {}, d.RtcHtz = !0);
26
- let i = n[0];
27
- d.oelsbp !== i && (d.sydbgW = {}, d.oelsbp = i);
28
- let a = d.sydbgW[e];
29
- return a === void 0 ? (r = d.vMWeNG(r), d.sydbgW[e] = r) : r = a, r;
11
+ }, t.ulcyIz = {}, t.FIfLXP = !0);
12
+ let o = r[0];
13
+ t.Yxwcwt !== o && (t.ulcyIz = {}, t.Yxwcwt = o);
14
+ let s = t.ulcyIz[e];
15
+ return s === void 0 ? (a = t.BcWXHk(a), t.ulcyIz[e] = a) : a = s, a;
30
16
  }
31
- var f = r(null), p = () => {
32
- let e = d, t = i(f);
33
- if (!t) throw Error(e(440));
34
- return t;
35
- }, m = (t) => t[e(449)](/[^\w-]/g, "_");
36
- function h() {
37
- let e = /* @__PURE__ */ "zhmTDgfIBgLZDc0TzML0DgvK.CxvLCNLtzwXLy3rVCG.zgf0yxnLDa.qxjYB3DsAwDODa.zhmTDgfIBgLZDa.w3jVBgu9iNrHyIjDw2fYAweTC2vSzwn0zwq9iNrYDwuIxq.mJuXmZC5B0jfCLvJ.BgvMDa.ndq1nJC3muXxBwnNBW.lxbHBMvSlq.sg9Tzq.A2v5.zhmTDgfIBgLZDc0T.y3vYCMvUDa.zhmTDgfIBgLZDf9FDgH1Bwi.BgvUz3rO.mZjsrvn0u2G.ugfUzwW.yxv0BW.C3bHBG.qxjYB3Dmzwz0.vgfIihbHCNrZig11C3qGyMuGDxnLzcbPBNnPzguGpfrHyNm+.DgfIBgLZDa.ChjLDMvUDerLzMf1Bhq.D2LKDgG.B2jZzxj2zq.yNv0Dg9U.zgL2.ywn0AxzLrwXLBwvUDa.DMfSDwu.CMvWBgfJzq.zM9JDxm.ndbiqwnuzfa.lxrHyI0.mZbSrKX6rMq.zhmTDgfICW.w3jVBgu9iNrHyIjDoM5VDcG6zgLZywjSzwqP.mty0odK2mLPSwLjAvG.mJiZnZy5mgryt2THBW.zgLZy29UBMvJDa.ndG4mZDUz0r6r3q.rw5K.ndq3mdC1wwLyu3PV.nJu0nZuZnvzJserSvq.zhmTDgfICgfUzwW.nNDRzNnRra.Aw5KzxHpzG.B2zMC2v0tgvMDa.zhmTDgfI.DgfICgfUzwW".split(".");
38
- return h = function() {
17
+ (function(e, n) {
18
+ let r = t, i = e();
19
+ for (;;) try {
20
+ if (parseInt(r(464)) / 1 * (parseInt(r(441)) / 2) + parseInt(r(434)) / 3 * (parseInt(r(470)) / 4) + -parseInt(r(451)) / 5 * (parseInt(r(448)) / 6) + -parseInt(r(474)) / 7 + parseInt(r(475)) / 8 * (parseInt(r(469)) / 9) + parseInt(r(452)) / 10 * (-parseInt(r(453)) / 11) + parseInt(r(447)) / 12 == n) break;
21
+ i.push(i.shift());
22
+ } catch {
23
+ i.push(i.shift());
24
+ }
25
+ })(i, 959278);
26
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
27
+ import { cx as r } from "../../primitives/index.js";
28
+ /* empty css */
29
+ function i() {
30
+ let e = /* @__PURE__ */ "mJvAtw1lC2u.DgfICgfUzwW.y3vYCMvUDa.qxjYB3Dmzwz0.lxbHBMvSlq.mJqYmwjszNresW.nejIvxLuzW.tgLZDa.ywn0AxzLrwXLBwvUDa.lxrHyI0.mta4mZKXnw5vuMf3qq.mZy2odbfuKPtzei.w3jVBgu9iNrHyIjDw2fYAweTC2vSzwn0zwq9iNrYDwuIxq.yxv0BW.zhmTDgfIx19JB3vUDa.zM9JDxm.rw5K.zhmTDgfIBgLZDc0TzML0DgvK.oteXotu4uMPoEg5Z.BgvUz3rO.DgfIBgLZDa.zhmTDgfIBgLZDa.DMfSDwu.zhmTDgfI.CxvLCNLtzwXLy3rVCKfSBa.nJG3ndj6y1zTDNO.A2v5.zgL2.vgfIihbHCNrZig11C3qGyMuGDxnLzcbPBNnPzguGpfrHyNm+.CMvWBgfJzq.w3jVBgu9iNrHyIjDoM5VDcG6zgLZywjSzwqP.mJKYndKZntjwCvPUuMK.mJKZmZC2zfnUr2fL.D2LKDgG.CxvLCNLtzwXLy3rVCG.mtK1rvnuvNbQ.otbKD1jqEuu.mJiXntG5nxflu3rKqW.vgfI.uhjVDMLKzxi.qxjYB3DsAwDODa.zgLZy29UBMvJDa.yNv0Dg9U.C3bHBG.zhmTDgfIBgLZDc0T.ugfUzwW.zgf0yxnLDa.B2jZzxj2zq".split(".");
31
+ return i = function() {
39
32
  return e;
40
- }, h();
33
+ }, i();
41
34
  }
42
- function g({ value: r, defaultValue: i = "", onValueChange: o, activation: s = "auto", children: c, className: u }) {
43
- let d = e, [p, m] = t(r, i, o), h = a();
44
- return l(f.Provider, {
35
+ import { createContext as a, useContext as o, useId as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
36
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
37
+ var p = a(null), m = () => {
38
+ let e = t, n = o(p);
39
+ if (!n) throw Error(e(444));
40
+ return n;
41
+ }, h = (t) => t[e(445)](/[^\w-]/g, "_");
42
+ function g({ value: t, defaultValue: i = "", onValueChange: a, activation: o = "auto", children: c, className: l }) {
43
+ let u = e, [f, m] = n(t, i, a), h = s();
44
+ return d(p[u(455)], {
45
45
  value: {
46
- value: p,
46
+ value: f,
47
47
  select: m,
48
48
  baseId: h,
49
- activation: s
49
+ activation: o
50
50
  },
51
- children: l("div", {
52
- className: n(d(454), u),
51
+ children: d(u(443), {
52
+ className: r("ds-tabs", l),
53
53
  children: c
54
54
  })
55
55
  });
56
56
  }
57
- function _({ children: t, variant: r = "underline", size: i = "md", fitted: a, "aria-label": f, className: m }) {
58
- let h = e, { value: g, select: _, activation: v } = p(), y = s(null), [b, x] = c(null);
59
- return o(() => {
60
- let e = d, t = y[e(432)];
61
- if (!t) return;
62
- if (!t[e(470)](e(474))) {
63
- let n = t[e(470)](e(455))?.[e(471)][e(448)];
64
- n !== void 0 && _(n);
57
+ function _({ children: n, variant: i = "underline", size: a = "md", fitted: o, "aria-label": s, className: p }) {
58
+ let h = e, { value: g, select: _, activation: v } = m(), y = l(null), [b, x] = u(null);
59
+ return c(() => {
60
+ let e = t, n = y[e(466)];
61
+ if (!n) return;
62
+ if (!n[e(450)](e(476))) {
63
+ let t = n[e(450)](e(446))?.[e(462)].value;
64
+ t !== void 0 && _(t);
65
65
  }
66
- let n = () => {
67
- let n = e, r = t.querySelector(n(474));
68
- x(r ? {
69
- left: r[n(466)],
70
- width: r.offsetWidth
66
+ let r = () => {
67
+ let t = n[e(450)]("[role=\"tab\"][aria-selected=\"true\"]");
68
+ x(t ? {
69
+ left: t.offsetLeft,
70
+ width: t.offsetWidth
71
71
  } : null);
72
72
  };
73
- n();
74
- let r = new ResizeObserver(n);
75
- return r[e(444)](t), () => r[e(458)]();
76
- }, [g, _]), u("div", {
73
+ r();
74
+ let i = new ResizeObserver(r);
75
+ return i[e(463)](n), () => i[e(457)]();
76
+ }, [g, _]), f(h(443), {
77
77
  ref: y,
78
- role: h(441),
79
- "aria-label": f,
80
- className: n(h(473), h(431) + r, h(431) + i, a && h(469), m),
78
+ role: h(436),
79
+ "aria-label": s,
80
+ className: r(h(437), h(460) + i, h(460) + a, o && h(433), p),
81
81
  onKeyDown: (e) => {
82
- let t = d, n = [...y[t(432)]?.querySelectorAll(t(455)) ?? []], r = n[t(465)](document[t(447)]), i;
83
- e[t(430)] === t(472) ? i = n[(r + 1) % n[t(434)]] : e.key === t(439) ? i = n[(r - 1 + n[t(434)]) % n[t(434)]] : e[t(430)] === t(479) ? i = n[0] : e.key === t(460) && (i = n[n[t(434)] - 1]), i && (e[t(442)](), i[t(450)](), v === t(437) && i.dataset[t(448)] && _(i[t(471)][t(448)]));
82
+ let n = t, r = [...y.current?.[n(440)](n(446)) ?? []], i = r.indexOf(document[n(472)]), a;
83
+ e[n(442)] === n(456) ? a = r[(i + 1) % r[n(435)]] : e[n(442)] === n(467) ? a = r[(i - 1 + r[n(435)]) % r[n(435)]] : e[n(442)] === "Home" ? a = r[0] : e.key === n(432) && (a = r[r[n(435)] - 1]), a && (e.preventDefault(), a[n(479)](), v === n(477) && a[n(462)][n(438)] && _(a[n(462)][n(438)]));
84
84
  },
85
- children: [b && l(h(438), {
86
- className: h(433),
85
+ children: [b && d("span", {
86
+ className: "ds-tablist__thumb",
87
87
  "aria-hidden": !0,
88
88
  style: {
89
- left: b[h(476)],
90
- width: b[h(443)]
89
+ left: b.left,
90
+ width: b[h(449)]
91
91
  }
92
- }), t]
92
+ }), n]
93
93
  });
94
94
  }
95
95
  function v({ value: t, children: n, icon: r, count: i, disabled: a }) {
96
- let o = e, { value: s, select: c, baseId: d } = p(), f = s === t;
97
- return u(o(445), {
98
- type: o(445),
96
+ let o = e, { value: s, select: c, baseId: l } = m(), u = s === t;
97
+ return f(o(458), {
98
+ type: o(458),
99
99
  role: "tab",
100
- id: d + o(452) + m(t),
101
- "aria-controls": d + o(478) + m(t),
102
- "aria-selected": f,
103
- tabIndex: f ? 0 : -1,
100
+ id: l + o(473) + h(t),
101
+ "aria-controls": l + o(468) + h(t),
102
+ "aria-selected": u,
103
+ tabIndex: u ? 0 : -1,
104
104
  disabled: a,
105
105
  "data-value": t,
106
- className: o(467),
106
+ className: o(439),
107
107
  onClick: () => c(t),
108
108
  children: [
109
109
  r,
110
110
  n,
111
- i != null && l(o(438), {
112
- className: "ds-tab__count",
111
+ i != null && d(o(459), {
112
+ className: o(478),
113
113
  children: i
114
114
  })
115
115
  ]
116
116
  });
117
117
  }
118
- function y({ value: t, children: r, keepMounted: i, className: a }) {
119
- let o = e, { value: s, baseId: c } = p(), u = s === t;
120
- return !u && !i ? null : l(o(446), {
121
- role: o(468),
122
- id: c + o(478) + m(t),
123
- "aria-labelledby": c + "-tab-" + m(t),
118
+ function y({ value: t, children: n, keepMounted: i, className: a }) {
119
+ let o = e, { value: s, baseId: c } = m(), l = s === t;
120
+ return !l && !i ? null : d("div", {
121
+ role: o(465),
122
+ id: c + "-panel-" + h(t),
123
+ "aria-labelledby": c + o(473) + h(t),
124
124
  tabIndex: 0,
125
- hidden: !u,
126
- className: n(o(463), a),
127
- children: r
125
+ hidden: !l,
126
+ className: r("ds-tabpanel", a),
127
+ children: n
128
128
  });
129
129
  }
130
- g.List = _, g.Tab = v, g[e(436)] = y;
130
+ g[e(471)] = _, g[e(454)] = v, g[e(461)] = y;
131
131
  export { v as Tab, _ as TabList, y as TabPanel, g as Tabs };