@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.
- package/lib/components/Accordion/Accordion2.js +86 -86
- package/lib/components/ActionBar/ActionBar2.js +44 -43
- package/lib/components/Alert/Alert2.js +79 -79
- package/lib/components/AppShell/AppShell2.js +58 -58
- package/lib/components/AreaChart/AreaChart.js +41 -41
- package/lib/components/BarChart/BarChart2.js +110 -110
- package/lib/components/BarList/BarList2.js +95 -95
- package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
- package/lib/components/Calendar/Calendar2.js +202 -202
- package/lib/components/Calendar/DatePicker2.js +122 -123
- package/lib/components/Calendar/date.js +57 -60
- package/lib/components/Card/Card2.js +62 -63
- package/lib/components/CardFrame/CardFrame2.js +43 -48
- package/lib/components/Chart/ChartParts.js +80 -80
- package/lib/components/Chart/chart2.js +57 -57
- package/lib/components/Chart/useChartInteraction.js +49 -49
- package/lib/components/ChatBubble/ChatBubble2.js +87 -87
- package/lib/components/ChatBubble/formatChatTime.js +34 -39
- package/lib/components/ChatComposer/ChatComposer2.js +97 -97
- package/lib/components/CodeBlock/CodeBlock2.js +60 -60
- package/lib/components/CodeBlock/highlight.js +75 -78
- package/lib/components/ColorPicker/ColorPicker2.js +383 -384
- package/lib/components/ColorPicker/color.js +74 -74
- package/lib/components/ColorPicker/presets.js +41 -46
- package/lib/components/Combobox/Combobox2.js +130 -131
- package/lib/components/CommandMenu/CommandMenu.js +137 -137
- package/lib/components/Comment/Comment2.js +64 -88
- package/lib/components/ContextMenu/ContextMenu2.js +87 -87
- package/lib/components/DataGrid/DataGrid2.js +911 -909
- package/lib/components/DataGrid/GridPopover.js +114 -114
- package/lib/components/DataGrid/anchor.js +25 -25
- package/lib/components/DataGrid/model.js +281 -282
- package/lib/components/DataGrid/panels.js +427 -429
- package/lib/components/DataGrid/typeMeta.js +50 -51
- package/lib/components/DataGrid/types.js +39 -40
- package/lib/components/DescriptionList/DescriptionList2.js +104 -104
- package/lib/components/Dialog/AlertDialog.js +85 -84
- package/lib/components/Dialog/Dialog2.js +72 -71
- package/lib/components/Dialog/modal.js +68 -68
- package/lib/components/Drawer/Drawer2.js +100 -100
- package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
- package/lib/components/DropdownMenu/menuCore.js +36 -36
- package/lib/components/Dropzone/Dropzone2.js +66 -65
- package/lib/components/EmptyState/EmptyState2.js +52 -54
- package/lib/components/FileChip/FileChip2.js +42 -66
- package/lib/components/FileUpload/FileUpload.js +171 -170
- package/lib/components/FilterChips/FilterChips2.js +54 -54
- package/lib/components/FunnelChart/FunnelChart2.js +144 -144
- package/lib/components/FunnelChart/funnel.js +56 -53
- package/lib/components/Highlight/Highlight2.js +60 -60
- package/lib/components/HoverCard/HoverCard.js +72 -72
- package/lib/components/InlineDiff/InlineDiff2.js +112 -112
- package/lib/components/InlineDiff/diff.js +81 -81
- package/lib/components/InlineDiff/useDiffReview.js +54 -53
- package/lib/components/Kanban/Kanban2.js +372 -372
- package/lib/components/Kanban/KanbanCard.js +80 -80
- package/lib/components/Kanban/move.js +55 -55
- package/lib/components/LineChart/LineChart2.js +167 -167
- package/lib/components/List/List2.js +64 -65
- package/lib/components/Listbox/Listbox2.js +105 -105
- package/lib/components/Marker/Marker2.js +54 -54
- package/lib/components/Menubar/Menubar2.js +112 -113
- package/lib/components/MultiSelect/MultiSelect2.js +106 -106
- package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
- package/lib/components/NoticeStack/NoticeStack2.js +115 -115
- package/lib/components/NumberStepper/NumberStepper2.js +69 -70
- package/lib/components/OtpInput/OtpInput2.js +87 -87
- package/lib/components/Pagination/Pagination2.js +97 -97
- package/lib/components/Pagination/paginationRange.js +23 -24
- package/lib/components/PhoneInput/PhoneInput.js +85 -85
- package/lib/components/PieChart/PieChart2.js +116 -116
- package/lib/components/PieChart/arc.js +80 -56
- package/lib/components/PieChart/useArcTween.js +57 -59
- package/lib/components/Popover/Popover2.js +59 -60
- package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
- package/lib/components/Rating/Rating2.js +93 -93
- package/lib/components/Resizable/Resizable2.js +136 -134
- package/lib/components/Resizable/layout.js +73 -73
- package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
- package/lib/components/ScatterChart/ScatterChart2.js +252 -253
- package/lib/components/ScatterChart/scatter.js +58 -56
- package/lib/components/ScrollArea/ScrollArea2.js +133 -134
- package/lib/components/Select/Select2.js +89 -89
- package/lib/components/Sidebar/Sidebar2.js +76 -76
- package/lib/components/Skeleton/Skeleton2.js +67 -67
- package/lib/components/Slider/Slider2.js +67 -67
- package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
- package/lib/components/SparkChart/SparkChart2.js +130 -130
- package/lib/components/SparkChart/spark.js +57 -62
- package/lib/components/Sparkbar/Sparkbar2.js +44 -44
- package/lib/components/SplitView/SplitView2.js +53 -53
- package/lib/components/Stat/Stat2.js +83 -83
- package/lib/components/StepList/StepList2.js +73 -73
- package/lib/components/Table/Table2.js +45 -45
- package/lib/components/Tabs/Tabs2.js +87 -87
- package/lib/components/TagInput/TagInput2.js +231 -234
- package/lib/components/TimePicker/TimePicker2.js +195 -195
- package/lib/components/TimePicker/time.js +60 -62
- package/lib/components/Timeline/Timeline2.js +199 -199
- package/lib/components/Timeline/scale.js +56 -58
- package/lib/components/Toast/Toaster.js +153 -152
- package/lib/components/Toast/store.js +57 -58
- package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
- package/lib/components/Toolbar/Toolbar2.js +135 -133
- package/lib/components/Tracker/Tracker2.js +83 -83
- package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
- package/lib/components/TreeView/TreeView2.js +165 -163
- package/lib/hooks/timing.js +33 -31
- package/lib/hooks/useControllableState.js +42 -42
- package/lib/hooks/useCountdown.js +58 -63
- package/lib/hooks/useDigitInput.js +75 -77
- package/lib/hooks/useDismiss.js +50 -52
- package/lib/hooks/useElapsed.js +58 -56
- package/lib/hooks/useFloating.js +44 -44
- package/lib/hooks/useFocusTrap.js +64 -40
- package/lib/hooks/usePresence.js +48 -50
- package/lib/hooks/usePressToOpen.js +52 -51
- package/lib/hooks/useScrollLock.js +49 -48
- package/lib/hooks/useSelection.js +37 -40
- package/lib/index.js +70 -69
- package/lib/primitives/AspectRatio2.js +50 -54
- package/lib/primitives/BrandIcon.js +153 -153
- package/lib/primitives/ColorDot2.js +49 -48
- package/lib/primitives/CopyButton2.js +59 -58
- package/lib/primitives/CountBadge2.js +57 -55
- package/lib/primitives/Countdown2.js +45 -49
- package/lib/primitives/Delta2.js +71 -46
- package/lib/primitives/Elapsed.js +43 -43
- package/lib/primitives/FileIcon2.js +93 -93
- package/lib/primitives/Flag2.js +95 -95
- package/lib/primitives/IconStack2.js +55 -55
- package/lib/primitives/IconTile2.js +46 -45
- package/lib/primitives/Kbd2.js +55 -55
- package/lib/primitives/Layout2.js +80 -80
- package/lib/primitives/Link2.js +36 -34
- package/lib/primitives/MaskedText2.js +65 -64
- package/lib/primitives/Progress2.js +80 -80
- package/lib/primitives/RelativeTime.js +52 -54
- package/lib/primitives/SearchInput2.js +55 -54
- package/lib/primitives/SelectorButton2.js +64 -65
- package/lib/primitives/Spinner2.js +55 -59
- package/lib/primitives/StatusIcon2.js +65 -65
- package/lib/primitives/Swatch2.js +50 -50
- package/lib/primitives/Tooltip2.js +85 -85
- package/lib/primitives/Typography2.js +66 -66
- package/lib/primitives/formatCountdown.js +43 -40
- package/lib/primitives/formatElapsed.js +24 -27
- package/lib/primitives/formatRelativeTime.js +43 -43
- package/lib/primitives/hotkey.js +71 -71
- package/lib/primitives/index.js +156 -157
- package/lib/primitives/maskValue.js +38 -34
- package/lib/style.css +1 -1
- 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(
|
|
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,
|
|
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__ */ "
|
|
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 -=
|
|
22
|
+
e -= 262;
|
|
22
23
|
let n = r(), a = n[e];
|
|
23
|
-
i.
|
|
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.
|
|
29
|
+
}, i.sCveho = {}, i.uwkASa = !0);
|
|
29
30
|
let o = n[0];
|
|
30
|
-
i.
|
|
31
|
-
let s = i.
|
|
32
|
-
return s === void 0 ? (a = i.
|
|
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(
|
|
39
|
-
end:
|
|
38
|
+
center: e(300),
|
|
39
|
+
end: e(269)
|
|
40
40
|
}, c = {
|
|
41
41
|
start: void 0,
|
|
42
|
-
center:
|
|
43
|
-
end: e(
|
|
42
|
+
center: "center",
|
|
43
|
+
end: e(276)
|
|
44
44
|
};
|
|
45
|
-
function l({ columns: r, rows:
|
|
46
|
-
let
|
|
47
|
-
let r =
|
|
48
|
-
e
|
|
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(
|
|
52
|
-
style:
|
|
53
|
-
children: o(
|
|
54
|
-
className: n(
|
|
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
|
-
|
|
57
|
-
a(
|
|
58
|
-
let n =
|
|
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(
|
|
60
|
+
scope: n(280),
|
|
61
61
|
style: {
|
|
62
|
-
width: e[n(
|
|
62
|
+
width: e[n(266)],
|
|
63
63
|
textAlign: c[r]
|
|
64
64
|
},
|
|
65
|
-
children: e
|
|
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(
|
|
69
|
+
children: [e[n(290)], a(n(265), { children: e.header })]
|
|
70
70
|
})
|
|
71
|
-
}, e[n(
|
|
71
|
+
}, e[n(297)]);
|
|
72
72
|
}) }) }),
|
|
73
|
-
o(
|
|
74
|
-
let
|
|
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:
|
|
79
|
-
onClick:
|
|
80
|
-
onKeyDown:
|
|
81
|
-
children: r
|
|
82
|
-
let l = i, u =
|
|
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(
|
|
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(
|
|
90
|
+
children: [f, a(l(265), { children: d })]
|
|
91
91
|
})
|
|
92
|
-
}, r[l(
|
|
92
|
+
}, r[l(297)]);
|
|
93
93
|
})
|
|
94
|
-
},
|
|
95
|
-
}), !
|
|
96
|
-
colSpan: r
|
|
97
|
-
className:
|
|
98
|
-
children:
|
|
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 =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
},
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
let
|
|
29
|
-
return
|
|
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
|
-
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
},
|
|
33
|
+
}, i();
|
|
41
34
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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:
|
|
46
|
+
value: f,
|
|
47
47
|
select: m,
|
|
48
48
|
baseId: h,
|
|
49
|
-
activation:
|
|
49
|
+
activation: o
|
|
50
50
|
},
|
|
51
|
-
children:
|
|
52
|
-
className:
|
|
51
|
+
children: d(u(443), {
|
|
52
|
+
className: r("ds-tabs", l),
|
|
53
53
|
children: c
|
|
54
54
|
})
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
function _({ children:
|
|
58
|
-
let h = e, { value: g, select: _, activation: v } =
|
|
59
|
-
return
|
|
60
|
-
let e =
|
|
61
|
-
if (!
|
|
62
|
-
if (!
|
|
63
|
-
let
|
|
64
|
-
|
|
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
|
|
67
|
-
let
|
|
68
|
-
x(
|
|
69
|
-
left:
|
|
70
|
-
width:
|
|
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
|
-
|
|
74
|
-
let
|
|
75
|
-
return
|
|
76
|
-
}, [g, _]),
|
|
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(
|
|
79
|
-
"aria-label":
|
|
80
|
-
className:
|
|
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
|
|
83
|
-
e[
|
|
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 &&
|
|
86
|
-
className:
|
|
85
|
+
children: [b && d("span", {
|
|
86
|
+
className: "ds-tablist__thumb",
|
|
87
87
|
"aria-hidden": !0,
|
|
88
88
|
style: {
|
|
89
|
-
left: b
|
|
90
|
-
width: b[h(
|
|
89
|
+
left: b.left,
|
|
90
|
+
width: b[h(449)]
|
|
91
91
|
}
|
|
92
|
-
}),
|
|
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:
|
|
97
|
-
return
|
|
98
|
-
type: o(
|
|
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:
|
|
101
|
-
"aria-controls":
|
|
102
|
-
"aria-selected":
|
|
103
|
-
tabIndex:
|
|
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(
|
|
106
|
+
className: o(439),
|
|
107
107
|
onClick: () => c(t),
|
|
108
108
|
children: [
|
|
109
109
|
r,
|
|
110
110
|
n,
|
|
111
|
-
i != null &&
|
|
112
|
-
className:
|
|
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:
|
|
119
|
-
let o = e, { value: s, baseId: c } =
|
|
120
|
-
return !
|
|
121
|
-
role: o(
|
|
122
|
-
id: c +
|
|
123
|
-
"aria-labelledby": c +
|
|
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: !
|
|
126
|
-
className:
|
|
127
|
-
children:
|
|
125
|
+
hidden: !l,
|
|
126
|
+
className: r("ds-tabpanel", a),
|
|
127
|
+
children: n
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
g
|
|
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 };
|