@iamfiro/design 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/avatar/AGENTS.md +29 -1
- package/agents/tooltip/AGENTS.md +1 -1
- package/lib/components/Accordion/Accordion2.js +76 -76
- package/lib/components/ActionBar/ActionBar2.js +43 -43
- package/lib/components/Alert/Alert2.js +46 -46
- package/lib/components/AppShell/AppShell2.js +58 -58
- package/lib/components/AreaChart/AreaChart.js +39 -40
- package/lib/components/BarChart/BarChart2.js +169 -169
- package/lib/components/BarList/BarList2.js +99 -99
- package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
- package/lib/components/Calendar/Calendar2.js +172 -171
- package/lib/components/Calendar/DatePicker2.js +101 -102
- package/lib/components/Calendar/date.js +71 -71
- package/lib/components/Card/Card2.js +55 -56
- package/lib/components/CardFrame/CardFrame2.js +52 -52
- package/lib/components/Chart/ChartParts.js +90 -90
- package/lib/components/Chart/chart2.js +52 -52
- package/lib/components/Chart/useChartInteraction.js +44 -44
- package/lib/components/ChatBubble/ChatBubble2.js +112 -112
- package/lib/components/ChatBubble/formatChatTime.js +44 -42
- package/lib/components/ChatComposer/ChatComposer2.js +94 -94
- package/lib/components/CodeBlock/CodeBlock2.js +66 -66
- package/lib/components/CodeBlock/highlight.js +67 -70
- package/lib/components/ColorPicker/ColorPicker2.js +404 -405
- package/lib/components/ColorPicker/color.js +81 -81
- package/lib/components/ColorPicker/presets.js +44 -43
- package/lib/components/Combobox/Combobox2.js +128 -128
- package/lib/components/CommandMenu/CommandMenu.js +137 -137
- package/lib/components/Comment/Comment2.js +55 -80
- package/lib/components/ContextMenu/ContextMenu2.js +93 -94
- package/lib/components/DataGrid/DataGrid2.js +1181 -1180
- package/lib/components/DataGrid/GridPopover.js +112 -112
- package/lib/components/DataGrid/anchor.js +23 -25
- package/lib/components/DataGrid/model.js +274 -275
- package/lib/components/DataGrid/panels.js +423 -423
- package/lib/components/DataGrid/typeMeta.js +21 -22
- package/lib/components/DataGrid/types.js +38 -37
- package/lib/components/DescriptionList/DescriptionList2.js +107 -107
- package/lib/components/Dialog/AlertDialog.js +53 -53
- package/lib/components/Dialog/Dialog2.js +71 -70
- package/lib/components/Dialog/modal.js +59 -58
- package/lib/components/Drawer/Drawer2.js +123 -124
- package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
- package/lib/components/DropdownMenu/menuCore.js +46 -47
- package/lib/components/Dropzone/Dropzone2.js +77 -77
- package/lib/components/EmptyState/EmptyState2.js +57 -56
- package/lib/components/FileChip/FileChip2.js +71 -71
- package/lib/components/FileUpload/FileUpload.js +119 -119
- package/lib/components/FilterChips/FilterChips2.js +61 -61
- package/lib/components/FunnelChart/FunnelChart2.js +141 -141
- package/lib/components/FunnelChart/funnel.js +51 -51
- package/lib/components/Highlight/Highlight2.js +54 -54
- package/lib/components/HoverCard/HoverCard.js +108 -83
- package/lib/components/InlineDiff/InlineDiff2.js +126 -126
- package/lib/components/InlineDiff/diff.js +82 -82
- package/lib/components/InlineDiff/useDiffReview.js +62 -60
- package/lib/components/Kanban/Kanban2.js +382 -382
- package/lib/components/Kanban/KanbanCard.js +92 -92
- package/lib/components/Kanban/move.js +45 -49
- package/lib/components/LineChart/LineChart2.js +207 -207
- package/lib/components/List/List2.js +71 -71
- package/lib/components/Listbox/Listbox2.js +115 -115
- package/lib/components/Marker/Marker2.js +67 -60
- package/lib/components/Menubar/Menubar2.js +130 -133
- package/lib/components/MultiSelect/MultiSelect2.js +104 -104
- package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
- package/lib/components/NoticeStack/NoticeStack2.js +105 -105
- package/lib/components/NumberStepper/NumberStepper2.js +67 -67
- package/lib/components/OtpInput/OtpInput2.js +66 -67
- package/lib/components/Pagination/Pagination2.js +90 -90
- package/lib/components/Pagination/paginationRange.js +24 -24
- package/lib/components/PhoneInput/PhoneInput.js +74 -74
- package/lib/components/PieChart/PieChart2.js +119 -119
- package/lib/components/PieChart/arc.js +63 -42
- package/lib/components/PieChart/useArcTween.js +56 -54
- package/lib/components/Popover/Popover2.js +61 -61
- package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
- package/lib/components/Rating/Rating2.js +81 -81
- package/lib/components/Resizable/Resizable2.js +112 -110
- package/lib/components/Resizable/layout.js +50 -50
- package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
- package/lib/components/ScatterChart/ScatterChart2.js +226 -227
- package/lib/components/ScatterChart/scatter.js +59 -57
- package/lib/components/ScrollArea/ScrollArea2.js +112 -112
- package/lib/components/Select/Select2.js +79 -79
- package/lib/components/Sidebar/Sidebar2.js +79 -79
- package/lib/components/Skeleton/Skeleton2.js +68 -68
- package/lib/components/Slider/Slider2.js +78 -77
- package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
- package/lib/components/SparkChart/SparkChart2.js +146 -145
- package/lib/components/SparkChart/spark.js +41 -67
- package/lib/components/Sparkbar/Sparkbar2.js +61 -60
- package/lib/components/SplitView/SplitView2.js +53 -53
- package/lib/components/Stat/Stat2.js +94 -94
- package/lib/components/StepList/StepList2.js +70 -70
- package/lib/components/Table/Table2.js +63 -63
- package/lib/components/Tabs/Tabs2.js +70 -70
- package/lib/components/TagInput/TagInput2.js +236 -239
- package/lib/components/TimePicker/TimePicker2.js +231 -232
- package/lib/components/TimePicker/time.js +63 -65
- package/lib/components/Timeline/Timeline2.js +167 -167
- package/lib/components/Timeline/scale.js +55 -55
- package/lib/components/Toast/Toaster.js +151 -152
- package/lib/components/Toast/store.js +90 -87
- package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
- package/lib/components/Toolbar/Toolbar2.js +145 -145
- package/lib/components/Tracker/Tracker2.js +76 -76
- package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
- package/lib/components/TreeView/TreeView2.js +124 -124
- package/lib/hooks/timing.js +30 -29
- package/lib/hooks/useControllableState.js +37 -36
- package/lib/hooks/useCountdown.js +56 -59
- package/lib/hooks/useDigitInput.js +52 -78
- package/lib/hooks/useDismiss.js +58 -57
- package/lib/hooks/useElapsed.js +54 -54
- package/lib/hooks/useFloating.js +26 -26
- package/lib/hooks/useFocusTrap.js +42 -42
- package/lib/hooks/usePresence.js +49 -48
- package/lib/hooks/usePressToOpen.js +42 -41
- package/lib/hooks/useScrollLock.js +45 -44
- package/lib/hooks/useSelection.js +45 -39
- package/lib/index.js +71 -71
- package/lib/primitives/AspectRatio2.js +60 -60
- package/lib/primitives/BrandIcon.js +161 -161
- package/lib/primitives/ColorDot2.js +42 -45
- package/lib/primitives/CopyButton2.js +57 -56
- package/lib/primitives/CountBadge2.js +55 -51
- package/lib/primitives/Countdown2.js +41 -46
- package/lib/primitives/Delta2.js +36 -36
- package/lib/primitives/Elapsed.js +49 -49
- package/lib/primitives/FileIcon2.js +96 -96
- package/lib/primitives/Flag2.js +135 -135
- package/lib/primitives/IconStack2.js +38 -60
- package/lib/primitives/IconTile2.js +28 -29
- package/lib/primitives/Kbd2.js +50 -50
- package/lib/primitives/Layout2.js +71 -71
- package/lib/primitives/Link2.js +32 -31
- package/lib/primitives/MaskedText2.js +49 -74
- package/lib/primitives/Progress2.js +65 -66
- package/lib/primitives/RelativeTime.js +58 -57
- package/lib/primitives/SearchInput2.js +65 -65
- package/lib/primitives/SelectorButton2.js +74 -73
- package/lib/primitives/Spinner2.js +50 -50
- package/lib/primitives/StatusIcon2.js +68 -68
- package/lib/primitives/Swatch2.js +59 -55
- package/lib/primitives/Tooltip2.js +81 -81
- package/lib/primitives/Typography2.js +53 -53
- package/lib/primitives/formatCountdown.js +21 -22
- package/lib/primitives/formatElapsed.js +43 -42
- package/lib/primitives/formatRelativeTime.js +50 -50
- package/lib/primitives/hotkey.js +82 -82
- package/lib/primitives/index.js +193 -174
- package/lib/primitives/maskValue.js +28 -28
- package/lib/style.css +1 -1
- package/lib/types/primitives/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,131 +1,129 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const e = t;
|
|
3
|
+
function t(e, r) {
|
|
4
|
+
e -= 198;
|
|
5
|
+
let i = n(), a = i[e];
|
|
6
|
+
t.fyKfru === void 0 && (t.TcDkMb = function(e) {
|
|
6
7
|
let t = "", n = "";
|
|
7
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);
|
|
8
9
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
9
10
|
return decodeURIComponent(n);
|
|
10
|
-
},
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
return
|
|
11
|
+
}, t.nAdMfv = {}, t.fyKfru = !0);
|
|
12
|
+
let o = i[0];
|
|
13
|
+
t.sZhPwM !== o && (t.nAdMfv = {}, t.sZhPwM = o);
|
|
14
|
+
let s = t.nAdMfv[e];
|
|
15
|
+
return s === void 0 ? (a = t.TcDkMb(a), t.nAdMfv[e] = a) : a = s, a;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
17
|
+
function n() {
|
|
18
|
+
let e = /* @__PURE__ */ "lw1LBNu.Cg9PBNrLCLr5Cgu.odi3mJeWtwDuA3LK.DMLZAwjSzq.qxjYB3DeB3DU.BwvUDwjHCG.B2jZzxj2zq.qxjYB3DvCa.qxjYB3DsAwDODa.ndq1nte3mJDjtxbvwxu.nte4odjtBw9Qz3a.mti3ntGYotHRBvHxsK0.uMfKAw9hCM91Ca.tgfIzwW.twvUDq.mJDutevet3e.nMLzDvrNDG.w2rHDgeTBwvUDwjHCI10CMLNz2vYxtPUB3qOoMrPC2fIBgvKkq.mJm1mtK0ne5sAfnPsG.ywrK.C2XPzgu.zM9JDxm.zgv0ywLS.zgf0yxnLDa.C3rLCa.D2LKDgG.zgL2.uMfKAw9jDgvT.CxvLCNLtzwXLy3rVCKfSBa.zMLYC3q.B3bLBG.lxrYAwDNzxi.zM9JDxnuCMLNz2vY.A2v5.DMfSDwu.BgvUz3rO.uhjVDMLKzxi.q2HLy2TIB3HjDgvT.zhmTBwvUDwjHCL9FDgH1Bwi.rxnJyxbL.rw5K.zMLUza.C2v0qwn0AxzL.u2vWyxjHDg9Y.y3vYCMvUDa.mtmZodbiEuDdvMK.DgfYz2v0.y2XVC2vbBgW.sg9Tzq.qxjYB3Dmzwz0.BwvUDq.zhmTBwvUDwjHCL9FCgfUzwWTlwLUC3rHBNq.Bw91C2u.BgfZDa.BwvUDwL0zw0.m2XdAfvMtq.yNv0Dg9U.nJCZntmWnhDzD0rpqG.mZCZmeDKzKnbrq.B3bLBK1LBNu.y2XVC2LUzW.CgfUzwXZ.ChjLDMvUDerLzMf1Bhq.zhmTBwvUDwjHCG.B2zMC2v0v2LKDgG.B2zMC2v0tgvMDa.u3vI.zhmTBwvUDwjHCIa.Bw91BNrLza.CgfUzwW".split(".");
|
|
19
|
+
return n = function() {
|
|
20
|
+
return e;
|
|
21
|
+
}, n();
|
|
22
|
+
}
|
|
23
|
+
(function(e, n) {
|
|
24
|
+
let r = t, i = e();
|
|
19
25
|
for (;;) try {
|
|
20
|
-
if (parseInt(r(
|
|
26
|
+
if (-parseInt(r(204)) / 1 * (parseInt(r(210)) / 2) + parseInt(r(249)) / 3 * (parseInt(r(251)) / 4) + parseInt(r(252)) / 5 * (parseInt(r(239)) / 6) + parseInt(r(205)) / 7 + -parseInt(r(212)) / 8 + parseInt(r(209)) / 9 * (parseInt(r(266)) / 10) + -parseInt(r(203)) / 11 == n) break;
|
|
21
27
|
i.push(i.shift());
|
|
22
28
|
} catch {
|
|
23
29
|
i.push(i.shift());
|
|
24
30
|
}
|
|
25
|
-
})(
|
|
26
|
-
import { usePresence as
|
|
27
|
-
import { useControllableState as
|
|
28
|
-
import { useFloating as
|
|
29
|
-
import { useDismiss as
|
|
31
|
+
})(n, 918387);
|
|
32
|
+
import { usePresence as r } from "../../hooks/usePresence.js";
|
|
33
|
+
import { useControllableState as i } from "../../hooks/useControllableState.js";
|
|
34
|
+
import { useFloating as a } from "../../hooks/useFloating.js";
|
|
35
|
+
import { useDismiss as o } from "../../hooks/useDismiss.js";
|
|
30
36
|
/* empty css */
|
|
31
|
-
import { MenuContext as
|
|
32
|
-
import { DropdownMenuCheckboxItem as
|
|
37
|
+
import { MenuContext as s, menuItems as c, trackPressDragRelease as l, useMenuRoot as u } from "../DropdownMenu/menuCore.js";
|
|
38
|
+
import { DropdownMenuCheckboxItem as d, DropdownMenuItem as f, DropdownMenuLabel as p, DropdownMenuRadioGroup as m, DropdownMenuRadioItem as h, DropdownMenuSeparator as g, DropdownMenuSub as _, MenuPanel as v } from "../DropdownMenu/DropdownMenu2.js";
|
|
33
39
|
/* empty css */
|
|
34
|
-
function v() {
|
|
35
|
-
let e = /* @__PURE__ */ "ywrK.tgfIzwW.zgLZy29UBMvJDa.sxrLBq.zgf0yxnLDa.u3vI.mtbbA3jkCuu.sg9Tzq.DgfYz2v0.B3bLBG.zM9JDxm.zM9JDxnuCMLNz2vY.BwvUDq.y3vYCMvUDfrHCMDLDa.yNv0Dg9U.zMLUzeLUzgv4.BgvUz3rO.CxvLCNLtzwXLy3rVCKfSBa.qxjYB3DsAwDODa.lw1LBNu.zhmTBwvUDwjHCL9FDgH1Bwi.BgfZDa.rxnJyxbL.y2XVC2LUzW.Aw5ZDgfUDa.B2zMC2v0tgvMDa.zhmTBwvUDwjHCIa.ywn0AxzL.y2XVC2vbBgW.mZuZmJjcDufev04.Cg9PBNrLCLr5Cgu.u2vWyxjHDg9Y.Bw91C2u.zMLUza.m0nJvK1hBa.mJG2mZy2m1LXBg1nra.CgfUzwW.C3bHBG.zMLYC3q.zhmTBwvUDwjHCG.y3vYCMvUDa.qxjYB3DeB3DU.C2v0qwn0AxzL.zhmTBwvUDwjHCL9FDhjPz2DLCG.C3rLCa.mte4nZCYnfbysMfTCa.zgvSzxrL.y2XVC2vK.twvUDwjHCK1LBNuGBxvZDcbIzsbPBNnPzguGpe1LBNvIyxi+.qxjYB3Dmzwz0.DMfSDwu.Bw91BNrLza.ote2nZj2tLzJwMq.rw5K.ChjLDMvUDerLzMf1Bhq.nda5odvtCe1RsNO.w2rHDgeTBwvUDwjHCI10CMLNz2vYxtPUB3qOoMrPC2fIBgvKkq.mta4mdy5m0zMz21cva.B2zMC2v0v2LKDgG.zgv0ywLS.mMf3t0nbCq.twvUDq.mteYshP0q3fh.qxjYB3DvCa.uMfKAw9jDgvT.B3bLBK1LBNu.BgvMDa.mJu1A3nky1Ln.ndG3ntK4nfHQu2Piza.C2XPzgu.D2LKDgG.zgL2.CgfUzwXZ.A2v5.B2jZzxj2zq.BwvUDwjHCG.uhjVDMLKzxi.lxrYAwDNzxi".split(".");
|
|
36
|
-
return v = function() {
|
|
37
|
-
return e;
|
|
38
|
-
}, v();
|
|
39
|
-
}
|
|
40
40
|
import { createContext as y, useContext as b, useEffect as x, useId as S, useLayoutEffect as C, useRef as w, useState as T } from "react";
|
|
41
41
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
42
|
-
var k =
|
|
43
|
-
function M({ children:
|
|
44
|
-
let
|
|
42
|
+
var k = e(211), A = y(null), j = (t) => [...t?.[e(222)](k) ?? []];
|
|
43
|
+
function M({ children: n, value: r, defaultValue: a = null, onValueChange: c, "aria-label": l, className: d }) {
|
|
44
|
+
let f = e, [p, m] = i(r, a, c), [h, g] = T(!1), [_, v] = T(null), y = w(f(263)), b = w(null), [S, E] = T({
|
|
45
45
|
left: 0,
|
|
46
46
|
width: 0,
|
|
47
47
|
visible: !1,
|
|
48
48
|
slide: !1
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
k(null), e && n?.[t(405)]({ preventScroll: !0 });
|
|
49
|
+
}), k = (e) => e === null ? void 0 : j(b[f(238)])[f(235)]((t) => t.dataset[f(228)] === e), M = (e, t = f(263)) => {
|
|
50
|
+
y.current = t, g(p !== null && e !== null), e !== null && v(e), m(e);
|
|
51
|
+
}, N = u((e = !0) => {
|
|
52
|
+
let t = f, n = k(p);
|
|
53
|
+
M(null), e && n?.[t(215)]({ preventScroll: !0 });
|
|
55
54
|
});
|
|
56
|
-
return
|
|
57
|
-
let e =
|
|
58
|
-
if (
|
|
59
|
-
let t = j(
|
|
60
|
-
t !== void 0 && t !==
|
|
55
|
+
return o(p !== null, [b, ...N[f(255)]], () => M(null)), x(() => {
|
|
56
|
+
let e = f;
|
|
57
|
+
if (_ === null || !k(_)) {
|
|
58
|
+
let t = j(b[e(238)])[0]?.[e(217)][e(228)];
|
|
59
|
+
t !== void 0 && t !== _ && v(t);
|
|
61
60
|
}
|
|
62
|
-
}, [
|
|
63
|
-
let e =
|
|
64
|
-
if (!
|
|
65
|
-
let
|
|
66
|
-
let
|
|
67
|
-
|
|
68
|
-
left: n[
|
|
69
|
-
width: n[
|
|
61
|
+
}, [_, n]), C(() => {
|
|
62
|
+
let e = f, n = b.current;
|
|
63
|
+
if (!n) return;
|
|
64
|
+
let r = () => {
|
|
65
|
+
let e = t, n = k(p);
|
|
66
|
+
E((t) => n ? {
|
|
67
|
+
left: n[e(259)],
|
|
68
|
+
width: n[e(258)],
|
|
70
69
|
visible: !0,
|
|
71
|
-
slide: e
|
|
70
|
+
slide: t[e(267)]
|
|
72
71
|
} : {
|
|
73
|
-
...
|
|
72
|
+
...t,
|
|
74
73
|
visible: !1,
|
|
75
74
|
slide: !1
|
|
76
75
|
});
|
|
77
76
|
};
|
|
78
|
-
|
|
79
|
-
let
|
|
80
|
-
return
|
|
81
|
-
}, [
|
|
77
|
+
r();
|
|
78
|
+
let i = new ResizeObserver(r);
|
|
79
|
+
return i[e(200)](n), () => i.disconnect();
|
|
80
|
+
}, [p]), D(A[f(230)], {
|
|
82
81
|
value: {
|
|
83
|
-
open:
|
|
84
|
-
instant:
|
|
85
|
-
active:
|
|
86
|
-
setActive:
|
|
87
|
-
openMenu:
|
|
88
|
-
focusRef:
|
|
82
|
+
open: p,
|
|
83
|
+
instant: h,
|
|
84
|
+
active: _,
|
|
85
|
+
setActive: v,
|
|
86
|
+
openMenu: M,
|
|
87
|
+
focusRef: y,
|
|
89
88
|
step: (e, t) => {
|
|
90
|
-
let n =
|
|
91
|
-
i !== void 0 &&
|
|
89
|
+
let n = f, r = j(b[n(238)]), i = r[(r.findIndex((t) => t[n(217)].value === e) + t + r.length) % r[n(229)]]?.dataset[n(228)];
|
|
90
|
+
i !== void 0 && M(i, n(223));
|
|
92
91
|
},
|
|
93
92
|
focusTrigger: (e, t) => {
|
|
94
|
-
let n =
|
|
95
|
-
a && (
|
|
93
|
+
let n = f, r = j(b[n(238)]), i = r.findIndex((t) => t[n(217)].value === e), a = t === "first" ? r[0] : t === n(247) ? r.at(-1) : r[(i + t + r[n(229)]) % r[n(229)]];
|
|
94
|
+
a && (v(a.dataset[n(228)] ?? ""), a[n(215)]());
|
|
96
95
|
},
|
|
97
|
-
menu:
|
|
96
|
+
menu: N
|
|
98
97
|
},
|
|
99
|
-
children: D(
|
|
100
|
-
value:
|
|
101
|
-
children: O(
|
|
102
|
-
ref:
|
|
103
|
-
role:
|
|
104
|
-
"aria-label":
|
|
105
|
-
className:
|
|
106
|
-
"data-open":
|
|
98
|
+
children: D(s[f(230)], {
|
|
99
|
+
value: N,
|
|
100
|
+
children: O(f(220), {
|
|
101
|
+
ref: b,
|
|
102
|
+
role: f(199),
|
|
103
|
+
"aria-label": l,
|
|
104
|
+
className: d ? f(261) + d : f(257),
|
|
105
|
+
"data-open": p !== null || void 0,
|
|
107
106
|
onPointerDown: (e) => {
|
|
108
|
-
|
|
109
|
-
e[t(403)] === e[t(408)] && f !== null && k(null);
|
|
107
|
+
e[f(240)] === e.currentTarget && p !== null && M(null);
|
|
110
108
|
},
|
|
111
|
-
children: [D(
|
|
112
|
-
className:
|
|
109
|
+
children: [D("span", {
|
|
110
|
+
className: f(232),
|
|
113
111
|
"aria-hidden": !0,
|
|
114
|
-
"data-visible":
|
|
115
|
-
"data-slide":
|
|
112
|
+
"data-visible": S.visible || void 0,
|
|
113
|
+
"data-slide": S[f(214)] || void 0,
|
|
116
114
|
style: {
|
|
117
|
-
left:
|
|
118
|
-
width:
|
|
115
|
+
left: S.left,
|
|
116
|
+
width: S[f(219)]
|
|
119
117
|
}
|
|
120
|
-
}),
|
|
118
|
+
}), n]
|
|
121
119
|
})
|
|
122
120
|
})
|
|
123
121
|
});
|
|
124
122
|
}
|
|
125
|
-
function N({ label:
|
|
126
|
-
let d =
|
|
127
|
-
if (!f) throw Error(
|
|
128
|
-
let p = S(), m = o ?? p, h = f[d(
|
|
123
|
+
function N({ label: n, children: i, value: o, disabled: s, minWidth: u = 220 }) {
|
|
124
|
+
let d = e, f = b(A);
|
|
125
|
+
if (!f) throw Error("MenubarMenu must be inside <Menubar>");
|
|
126
|
+
let p = S(), m = o ?? p, h = f[d(224)] === m, g = r(h, 160), _ = w(null), y = w(null), C = w(""), T = p + d(225), k = p + d(264), { style: j, side: M } = a(_, g[d(262)], {
|
|
129
127
|
matchWidth: !1,
|
|
130
128
|
panelRef: y,
|
|
131
129
|
maxHeight: 420,
|
|
@@ -133,91 +131,90 @@ function N({ label: r, children: a, value: o, disabled: l, minWidth: u = 220 })
|
|
|
133
131
|
}), { menu: N, focusRef: P } = f;
|
|
134
132
|
x(() => {
|
|
135
133
|
let e = d;
|
|
136
|
-
return N[e(
|
|
137
|
-
|
|
138
|
-
N[t(389)][t(363)](y);
|
|
134
|
+
return N[e(255)][e(213)](y), () => {
|
|
135
|
+
N[e(255)].delete(y);
|
|
139
136
|
};
|
|
140
|
-
}, [N[d(
|
|
137
|
+
}, [N[d(255)]]), x(() => {
|
|
141
138
|
if (!h) return;
|
|
142
|
-
let
|
|
143
|
-
let
|
|
144
|
-
n ===
|
|
139
|
+
let e = requestAnimationFrame(() => {
|
|
140
|
+
let e = t, n = P.current, r = c(y[e(238)]);
|
|
141
|
+
n === e(223) ? r[0]?.[e(215)]({ preventScroll: !0 }) : n === e(247) ? r.at(-1)?.[e(215)]({ preventScroll: !0 }) : y[e(238)]?.[e(215)]({ preventScroll: !0 });
|
|
145
142
|
});
|
|
146
|
-
return () => cancelAnimationFrame(
|
|
143
|
+
return () => cancelAnimationFrame(e);
|
|
147
144
|
}, [h, P]);
|
|
148
145
|
let F = (e) => {
|
|
149
146
|
let t = d;
|
|
150
|
-
if (C
|
|
151
|
-
if (e[t(
|
|
152
|
-
f[t(
|
|
147
|
+
if (C[t(238)] = e[t(265)], !(s || e[t(265)] !== t(246) || e[t(250)] !== 0)) {
|
|
148
|
+
if (e[t(256)](), h) return f[t(253)](null);
|
|
149
|
+
f[t(253)](m), l(e);
|
|
153
150
|
}
|
|
154
151
|
}, I = (e) => {
|
|
155
152
|
let t = d;
|
|
156
|
-
switch (e[t(
|
|
157
|
-
case t(
|
|
158
|
-
e[t(
|
|
153
|
+
switch (e[t(227)]) {
|
|
154
|
+
case t(198):
|
|
155
|
+
e[t(256)](), f[t(253)](m, t(223));
|
|
159
156
|
break;
|
|
160
|
-
case t(
|
|
161
|
-
e[t(
|
|
157
|
+
case t(201):
|
|
158
|
+
e[t(256)](), f[t(253)](m, "last");
|
|
162
159
|
break;
|
|
163
|
-
case t(
|
|
164
|
-
e[t(
|
|
160
|
+
case t(202):
|
|
161
|
+
e[t(256)](), f[t(226)](m, 1);
|
|
165
162
|
break;
|
|
166
|
-
case t(
|
|
167
|
-
e
|
|
163
|
+
case t(243):
|
|
164
|
+
e[t(256)](), f[t(226)](m, -1);
|
|
168
165
|
break;
|
|
169
|
-
case t(
|
|
170
|
-
e.preventDefault(), f
|
|
166
|
+
case t(242):
|
|
167
|
+
e.preventDefault(), f[t(226)](m, "first");
|
|
171
168
|
break;
|
|
172
|
-
case t(
|
|
173
|
-
e
|
|
169
|
+
case t(234):
|
|
170
|
+
e[t(256)](), f[t(226)](m, t(247));
|
|
174
171
|
break;
|
|
175
|
-
case t(
|
|
172
|
+
case t(233): h && (e[t(256)](), f[t(253)](null));
|
|
176
173
|
}
|
|
177
|
-
}, L = f[d(
|
|
178
|
-
return O(E, { children: [D(d(
|
|
179
|
-
ref:
|
|
174
|
+
}, L = f[d(224)] !== null && !h;
|
|
175
|
+
return O(E, { children: [D(d(250), {
|
|
176
|
+
ref: _,
|
|
180
177
|
id: T,
|
|
181
|
-
type:
|
|
182
|
-
role:
|
|
183
|
-
className:
|
|
178
|
+
type: "button",
|
|
179
|
+
role: d(248),
|
|
180
|
+
className: "ds-menubar__trigger",
|
|
184
181
|
"data-menubar-trigger": "",
|
|
185
182
|
"data-value": m,
|
|
186
|
-
"data-state":
|
|
187
|
-
"aria-haspopup": d(
|
|
183
|
+
"data-state": h ? "open" : "closed",
|
|
184
|
+
"aria-haspopup": d(244),
|
|
188
185
|
"aria-expanded": h,
|
|
189
186
|
"aria-controls": h ? k : void 0,
|
|
190
|
-
tabIndex: f
|
|
191
|
-
disabled:
|
|
187
|
+
tabIndex: f.active === m ? 0 : -1,
|
|
188
|
+
disabled: s,
|
|
192
189
|
onPointerDown: F,
|
|
193
190
|
onPointerEnter: (e) => {
|
|
194
191
|
let t = d;
|
|
195
|
-
e.pointerType ===
|
|
192
|
+
e.pointerType === t(246) && f[t(224)] !== null && !h && !s && f[t(253)](m);
|
|
196
193
|
},
|
|
197
|
-
onFocus: () => f[d(
|
|
194
|
+
onFocus: () => f[d(236)](m),
|
|
198
195
|
onKeyDown: I,
|
|
199
196
|
onClick: (e) => {
|
|
200
197
|
let t = d;
|
|
201
|
-
(e
|
|
198
|
+
(e.detail === 0 || C.current !== t(246)) && f[t(253)](h ? null : m, e[t(216)] === 0 ? t(223) : t(263));
|
|
202
199
|
},
|
|
203
|
-
children:
|
|
204
|
-
}), g[d(
|
|
200
|
+
children: n
|
|
201
|
+
}), g[d(262)] && !L && D(v, {
|
|
205
202
|
id: k,
|
|
206
203
|
panelRef: y,
|
|
207
204
|
side: M,
|
|
208
|
-
closing: g[d(
|
|
205
|
+
closing: g[d(254)],
|
|
209
206
|
style: {
|
|
210
207
|
...j,
|
|
211
208
|
minWidth: u
|
|
212
209
|
},
|
|
213
|
-
className: f
|
|
210
|
+
className: f.instant ? d(245) : void 0,
|
|
214
211
|
"aria-labelledby": T,
|
|
215
|
-
onEscape: () => N[d(
|
|
212
|
+
onEscape: () => N[d(241)](!0),
|
|
216
213
|
onArrowLeft: () => f.step(m, -1),
|
|
217
|
-
onArrowRight: () => f[d(
|
|
218
|
-
children:
|
|
214
|
+
onArrowRight: () => f[d(218)](m, 1),
|
|
215
|
+
children: i
|
|
219
216
|
})] });
|
|
220
217
|
}
|
|
221
|
-
var P =
|
|
222
|
-
M[
|
|
218
|
+
var P = f, F = d, I = m, L = h, R = p, z = g, B = _;
|
|
219
|
+
M[e(208)] = N, M.Item = f, M[e(231)] = d, M[e(206)] = m, M[e(221)] = h, M[e(207)] = p, M[e(237)] = g, M[e(260)] = _;
|
|
223
220
|
export { M as Menubar, F as MenubarCheckboxItem, P as MenubarItem, R as MenubarLabel, N as MenubarMenu, I as MenubarRadioGroup, L as MenubarRadioItem, z as MenubarSeparator, B as MenubarSub };
|