@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
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let r =
|
|
5
|
-
e.izUYoP === void 0 && (e.SaGWqs = function(e) {
|
|
6
|
-
let t = "", n = "";
|
|
7
|
-
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
|
-
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
9
|
-
return decodeURIComponent(n);
|
|
10
|
-
}, e.xUunKg = {}, e.izUYoP = !0);
|
|
11
|
-
let a = r[0];
|
|
12
|
-
e.OOIQPD !== a && (e.xUunKg = {}, e.OOIQPD = a);
|
|
13
|
-
let o = e.xUunKg[t];
|
|
14
|
-
return o === void 0 ? (i = e.SaGWqs(i), e.xUunKg[t] = i) : i = o, i;
|
|
15
|
-
}
|
|
16
|
-
const t = e;
|
|
17
|
-
(function(t, n) {
|
|
18
|
-
let r = e, i = t();
|
|
2
|
+
const e = t;
|
|
3
|
+
(function(e, n) {
|
|
4
|
+
let r = t, i = e();
|
|
19
5
|
for (;;) try {
|
|
20
|
-
if (parseInt(r(
|
|
6
|
+
if (-parseInt(r(212)) / 1 * (parseInt(r(179)) / 2) + -parseInt(r(237)) / 3 + -parseInt(r(192)) / 4 * (parseInt(r(223)) / 5) + -parseInt(r(227)) / 6 + parseInt(r(239)) / 7 * (parseInt(r(203)) / 8) + -parseInt(r(241)) / 9 * (-parseInt(r(176)) / 10) + -parseInt(r(189)) / 11 * (-parseInt(r(182)) / 12) == n) break;
|
|
21
7
|
i.push(i.shift());
|
|
22
8
|
} catch {
|
|
23
9
|
i.push(i.shift());
|
|
24
10
|
}
|
|
25
|
-
})(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
11
|
+
})(n, 407104);
|
|
12
|
+
function t(e, r) {
|
|
13
|
+
e -= 175;
|
|
14
|
+
let i = n(), a = i[e];
|
|
15
|
+
t.uFvTue === void 0 && (t.KePdmN = function(e) {
|
|
16
|
+
let t = "", n = "";
|
|
17
|
+
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);
|
|
18
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
19
|
+
return decodeURIComponent(n);
|
|
20
|
+
}, t.ONgXqH = {}, t.uFvTue = !0);
|
|
21
|
+
let o = i[0];
|
|
22
|
+
t.uJGNUr !== o && (t.ONgXqH = {}, t.uJGNUr = o);
|
|
23
|
+
let s = t.ONgXqH[e];
|
|
24
|
+
return s === void 0 ? (a = t.KePdmN(a), t.ONgXqH[e] = a) : a = s, a;
|
|
25
|
+
}
|
|
26
|
+
function n() {
|
|
27
|
+
let e = /* @__PURE__ */ "zMLYC3q.C2XPzgu.nerWCwrRta.Bw91C2u.lxrYAwDNzxi.nZG3mdu2uNHZzNjX.y3vYCMvUDa.BwvUDwjHCG.D2LKDgG.zgv0ywLS.BgvMDa.sxrLBq.mJa5veznv3P2.DMfSDwu.y3vYCMvUDfrHCMDLDa.mJa0mtC5nLP3D2PsBa.y2XVC2LUzW.BgvUz3rO.C3rLCa.zMLUzeLUzgv4.B3bLBK1LBNu.w2rHDgeTBwvUDwjHCI10CMLNz2vYxtPUB3qOoMrPC2fIBgvKkq.qxjYB3Dmzwz0.B2jZzxj2zq.C3bHBG.zM9JDxnuCMLNz2vY.mZm5nZm4nfbbBgXrCq.rw5K.BwvUDq.u2vWyxjHDg9Y.ywrK.CxvLCNLtzwXLy3rVCKfSBa.Bw91BNrLza.CgfUzwW.zM9JDxm.mte1mdnXzfzwwfa.uMfKAw9jDgvT.uhjVDMLKzxi.zgf0yxnLDa.Cg9PBNrLCLr5Cgu.ChjLDMvUDerLzMf1Bhq.zMLUza.B3bLBG.yNv0Dg9U.uMfKAw9hCM91Ca.zhmTBwvUDwjHCIa.nwPdC1D6sq.zgLZy29UBMvJDa.qxjYB3DeB3DU.DMLZAwjSzq.mZy3mZiYnfbKzuXfsq.zhmTBwvUDwjHCG.A2v5.B2zMC2v0tgvMDa.CgfUzwXZ.q2HLy2TIB3HjDgvT.BgfZDa.qxjYB3DsAwDODa.ywn0AxzL.tgfIzwW.otK2nJiXuKT5shvN.zhmTBwvUDwjHCL9FDgH1Bwi.n1j3rLn3rG.Aw5ZDgfUDa.mZG1ndi1DvLAvvPJ.u3vI.twvUDq.zhmTBwvUDwjHCL9FCgfUzwWTlwLUC3rHBNq.qxjYB3DvCa.DgfYz2v0.C2v0qwn0AxzL.ntbwAuf0thK".split(".");
|
|
28
|
+
return n = function() {
|
|
37
29
|
return e;
|
|
38
|
-
},
|
|
30
|
+
}, n();
|
|
39
31
|
}
|
|
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";
|
|
36
|
+
/* empty css */
|
|
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";
|
|
39
|
+
/* empty css */
|
|
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 d =
|
|
42
|
+
var k = e(198), A = y(null), j = (t) => [...t?.[e(208)](k) ?? []];
|
|
43
|
+
function M({ children: t, value: n, defaultValue: r = null, onValueChange: a, "aria-label": c, className: l }) {
|
|
44
|
+
let d = e, [f, p] = i(n, r, a), [m, h] = T(!1), [g, _] = T(null), v = w(d(210)), y = w(null), [b, S] = T({
|
|
45
45
|
left: 0,
|
|
46
46
|
width: 0,
|
|
47
47
|
visible: !1,
|
|
48
48
|
slide: !1
|
|
49
|
-
}), E = (e) => e === null ? void 0 : j(y
|
|
49
|
+
}), E = (e) => e === null ? void 0 : j(y[d(183)])[d(218)]((t) => t[d(215)].value === e), k = (e, t = d(210)) => {
|
|
50
50
|
let n = d;
|
|
51
|
-
v[n(
|
|
52
|
-
}, M =
|
|
53
|
-
let t =
|
|
54
|
-
k(null), e &&
|
|
51
|
+
v[n(183)] = t, h(f !== null && e !== null), e !== null && _(e), p(e);
|
|
52
|
+
}, M = u((e = !0) => {
|
|
53
|
+
let t = E(f);
|
|
54
|
+
k(null), e && t?.focus({ preventScroll: !0 });
|
|
55
55
|
});
|
|
56
|
-
return
|
|
56
|
+
return o(f !== null, [y, ...M.panels], () => k(null)), x(() => {
|
|
57
57
|
let e = d;
|
|
58
58
|
if (g === null || !E(g)) {
|
|
59
|
-
let t = j(y
|
|
59
|
+
let t = j(y.current)[0]?.[e(215)][e(190)];
|
|
60
60
|
t !== void 0 && t !== g && _(t);
|
|
61
61
|
}
|
|
62
|
-
}, [g,
|
|
63
|
-
let e = d, t = y[e(
|
|
62
|
+
}, [g, t]), C(() => {
|
|
63
|
+
let e = d, t = y[e(183)];
|
|
64
64
|
if (!t) return;
|
|
65
65
|
let n = () => {
|
|
66
66
|
let t = e, n = E(f);
|
|
67
67
|
S((e) => n ? {
|
|
68
|
-
left: n[t(
|
|
69
|
-
width: n
|
|
68
|
+
left: n[t(230)],
|
|
69
|
+
width: n.offsetWidth,
|
|
70
70
|
visible: !0,
|
|
71
|
-
slide: e
|
|
71
|
+
slide: e[t(226)]
|
|
72
72
|
} : {
|
|
73
73
|
...e,
|
|
74
74
|
visible: !1,
|
|
@@ -77,8 +77,8 @@ function M({ children: e, value: n, defaultValue: i = null, onValueChange: s, "a
|
|
|
77
77
|
};
|
|
78
78
|
n();
|
|
79
79
|
let r = new ResizeObserver(n);
|
|
80
|
-
return r[e(
|
|
81
|
-
}, [f]), D(A[d(
|
|
80
|
+
return r[e(200)](t), () => r[e(224)]();
|
|
81
|
+
}, [f]), D(A[d(214)], {
|
|
82
82
|
value: {
|
|
83
83
|
open: f,
|
|
84
84
|
instant: m,
|
|
@@ -87,45 +87,45 @@ function M({ children: e, value: n, defaultValue: i = null, onValueChange: s, "a
|
|
|
87
87
|
openMenu: k,
|
|
88
88
|
focusRef: v,
|
|
89
89
|
step: (e, t) => {
|
|
90
|
-
let n = d, r = j(y[n(
|
|
90
|
+
let n = d, r = j(y[n(183)]), i = r[(r[n(196)]((t) => t[n(215)].value === e) + t + r[n(194)]) % r[n(194)]]?.[n(215)][n(190)];
|
|
91
91
|
i !== void 0 && k(i, "first");
|
|
92
92
|
},
|
|
93
93
|
focusTrigger: (e, t) => {
|
|
94
|
-
let n = d, r = j(y[n(
|
|
95
|
-
a && (_(a
|
|
94
|
+
let n = d, r = j(y[n(183)]), i = r[n(196)]((t) => t[n(215)][n(190)] === e), a = t === "first" ? r[0] : t === n(233) ? r.at(-1) : r[(i + t + r.length) % r[n(194)]];
|
|
95
|
+
a && (_(a[n(215)][n(190)] ?? ""), a.focus());
|
|
96
96
|
},
|
|
97
97
|
menu: M
|
|
98
98
|
},
|
|
99
|
-
children: D(
|
|
99
|
+
children: D(s[d(214)], {
|
|
100
100
|
value: M,
|
|
101
|
-
children: O(
|
|
101
|
+
children: O("div", {
|
|
102
102
|
ref: y,
|
|
103
|
-
role: d(
|
|
103
|
+
role: d(184),
|
|
104
104
|
"aria-label": c,
|
|
105
|
-
className:
|
|
105
|
+
className: l ? d(222) + l : d(228),
|
|
106
106
|
"data-open": f !== null || void 0,
|
|
107
107
|
onPointerDown: (e) => {
|
|
108
108
|
let t = d;
|
|
109
|
-
e[t(
|
|
109
|
+
e[t(246)] === e[t(191)] && f !== null && k(null);
|
|
110
110
|
},
|
|
111
|
-
children: [D(d(
|
|
112
|
-
className: d(
|
|
111
|
+
children: [D(d(201), {
|
|
112
|
+
className: d(238),
|
|
113
113
|
"aria-hidden": !0,
|
|
114
114
|
"data-visible": b.visible || void 0,
|
|
115
|
-
"data-slide": b[d(
|
|
115
|
+
"data-slide": b[d(178)] || void 0,
|
|
116
116
|
style: {
|
|
117
|
-
left: b[d(
|
|
118
|
-
width: b[d(
|
|
117
|
+
left: b[d(187)],
|
|
118
|
+
width: b[d(185)]
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), t]
|
|
121
121
|
})
|
|
122
122
|
})
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function N({ label:
|
|
126
|
-
let d =
|
|
127
|
-
if (!f) throw Error(
|
|
128
|
-
let p = S(), m = o ?? p, h = f[d(
|
|
125
|
+
function N({ label: n, children: i, value: o, disabled: s, minWidth: u = 220 }) {
|
|
126
|
+
let d = e, f = b(A);
|
|
127
|
+
if (!f) throw Error("MenubarMenu must be inside <Menubar>");
|
|
128
|
+
let p = S(), m = o ?? p, h = f[d(219)] === m, g = r(h, 160), _ = w(null), y = w(null), C = w(""), T = p + d(181), k = p + "-menu", { style: j, side: M } = a(_, g[d(209)], {
|
|
129
129
|
matchWidth: !1,
|
|
130
130
|
panelRef: y,
|
|
131
131
|
maxHeight: 420,
|
|
@@ -133,91 +133,90 @@ function N({ label: r, children: a, value: o, disabled: l, minWidth: u = 220 })
|
|
|
133
133
|
}), { menu: N, focusRef: P } = f;
|
|
134
134
|
x(() => {
|
|
135
135
|
let e = d;
|
|
136
|
-
return N[e(
|
|
137
|
-
|
|
138
|
-
N[t(389)][t(363)](y);
|
|
136
|
+
return N[e(231)][e(207)](y), () => {
|
|
137
|
+
N[e(231)].delete(y);
|
|
139
138
|
};
|
|
140
|
-
}, [N
|
|
139
|
+
}, [N.panels]), x(() => {
|
|
141
140
|
if (!h) return;
|
|
142
|
-
let
|
|
143
|
-
let
|
|
144
|
-
n ===
|
|
141
|
+
let e = requestAnimationFrame(() => {
|
|
142
|
+
let e = t, n = P.current, r = c(y[e(183)]);
|
|
143
|
+
n === e(177) ? r[0]?.[e(211)]({ preventScroll: !0 }) : n === e(233) ? r.at(-1)?.focus({ preventScroll: !0 }) : y.current?.[e(211)]({ preventScroll: !0 });
|
|
145
144
|
});
|
|
146
|
-
return () => cancelAnimationFrame(
|
|
145
|
+
return () => cancelAnimationFrame(e);
|
|
147
146
|
}, [h, P]);
|
|
148
147
|
let F = (e) => {
|
|
149
148
|
let t = d;
|
|
150
|
-
if (C
|
|
151
|
-
if (e[t(
|
|
152
|
-
f
|
|
149
|
+
if (C[t(183)] = e[t(216)], !(s || e[t(216)] !== t(180) || e[t(220)] !== 0)) {
|
|
150
|
+
if (e[t(217)](), h) return f[t(197)](null);
|
|
151
|
+
f.openMenu(m), l(e);
|
|
153
152
|
}
|
|
154
153
|
}, I = (e) => {
|
|
155
154
|
let t = d;
|
|
156
|
-
switch (e[t(
|
|
157
|
-
case t(
|
|
158
|
-
e[t(
|
|
155
|
+
switch (e[t(229)]) {
|
|
156
|
+
case t(225):
|
|
157
|
+
e[t(217)](), f[t(197)](m, t(177));
|
|
159
158
|
break;
|
|
160
|
-
case t(
|
|
161
|
-
e[t(
|
|
159
|
+
case t(245):
|
|
160
|
+
e[t(217)](), f[t(197)](m, "last");
|
|
162
161
|
break;
|
|
163
|
-
case t(
|
|
164
|
-
e[t(
|
|
162
|
+
case t(234):
|
|
163
|
+
e[t(217)](), f.focusTrigger(m, 1);
|
|
165
164
|
break;
|
|
166
|
-
case t(
|
|
167
|
-
e
|
|
165
|
+
case t(199):
|
|
166
|
+
e[t(217)](), f[t(202)](m, -1);
|
|
168
167
|
break;
|
|
169
|
-
case
|
|
170
|
-
e
|
|
168
|
+
case "Home":
|
|
169
|
+
e[t(217)](), f[t(202)](m, t(177));
|
|
171
170
|
break;
|
|
172
|
-
case t(
|
|
173
|
-
e
|
|
171
|
+
case t(204):
|
|
172
|
+
e[t(217)](), f[t(202)](m, "last");
|
|
174
173
|
break;
|
|
175
|
-
case
|
|
174
|
+
case "Escape": h && (e[t(217)](), f.openMenu(null));
|
|
176
175
|
}
|
|
177
|
-
}, L = f[d(
|
|
178
|
-
return O(E, { children: [D(d(
|
|
179
|
-
ref:
|
|
176
|
+
}, L = f[d(219)] !== null && !h;
|
|
177
|
+
return O(E, { children: [D(d(220), {
|
|
178
|
+
ref: _,
|
|
180
179
|
id: T,
|
|
181
|
-
type: d(
|
|
180
|
+
type: d(220),
|
|
182
181
|
role: "menuitem",
|
|
183
|
-
className:
|
|
182
|
+
className: "ds-menubar__trigger",
|
|
184
183
|
"data-menubar-trigger": "",
|
|
185
184
|
"data-value": m,
|
|
186
|
-
"data-state":
|
|
187
|
-
"aria-haspopup": d(
|
|
185
|
+
"data-state": h ? d(219) : "closed",
|
|
186
|
+
"aria-haspopup": d(205),
|
|
188
187
|
"aria-expanded": h,
|
|
189
188
|
"aria-controls": h ? k : void 0,
|
|
190
|
-
tabIndex: f[d(
|
|
191
|
-
disabled:
|
|
189
|
+
tabIndex: f[d(235)] === m ? 0 : -1,
|
|
190
|
+
disabled: s,
|
|
192
191
|
onPointerDown: F,
|
|
193
192
|
onPointerEnter: (e) => {
|
|
194
193
|
let t = d;
|
|
195
|
-
e
|
|
194
|
+
e[t(216)] === t(180) && f.open !== null && !h && !s && f[t(197)](m);
|
|
196
195
|
},
|
|
197
|
-
onFocus: () => f[d(
|
|
196
|
+
onFocus: () => f[d(175)](m),
|
|
198
197
|
onKeyDown: I,
|
|
199
198
|
onClick: (e) => {
|
|
200
199
|
let t = d;
|
|
201
|
-
(e[t(
|
|
200
|
+
(e[t(186)] === 0 || C[t(183)] !== "mouse") && f[t(197)](h ? null : m, e[t(186)] === 0 ? t(177) : "panel");
|
|
202
201
|
},
|
|
203
|
-
children:
|
|
204
|
-
}), g[d(
|
|
202
|
+
children: n
|
|
203
|
+
}), g[d(209)] && !L && D(v, {
|
|
205
204
|
id: k,
|
|
206
205
|
panelRef: y,
|
|
207
206
|
side: M,
|
|
208
|
-
closing: g[d(
|
|
207
|
+
closing: g[d(193)],
|
|
209
208
|
style: {
|
|
210
209
|
...j,
|
|
211
210
|
minWidth: u
|
|
212
211
|
},
|
|
213
|
-
className: f[d(
|
|
212
|
+
className: f[d(240)] ? d(244) : void 0,
|
|
214
213
|
"aria-labelledby": T,
|
|
215
|
-
onEscape: () => N
|
|
216
|
-
onArrowLeft: () => f
|
|
217
|
-
onArrowRight: () => f
|
|
218
|
-
children:
|
|
214
|
+
onEscape: () => N.closeAll(!0),
|
|
215
|
+
onArrowLeft: () => f[d(195)](m, -1),
|
|
216
|
+
onArrowRight: () => f.step(m, 1),
|
|
217
|
+
children: i
|
|
219
218
|
})] });
|
|
220
219
|
}
|
|
221
|
-
var P =
|
|
222
|
-
M[
|
|
220
|
+
var P = f, F = d, I = m, L = h, R = p, z = g, B = _;
|
|
221
|
+
M[e(243)] = N, M[e(188)] = f, M[e(232)] = d, M[e(221)] = m, M[e(213)] = h, M[e(236)] = p, M[e(206)] = g, M[e(242)] = _;
|
|
223
222
|
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 };
|