welcome-ui 10.6.4 → 10.6.6
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/dist/Accordion.js +6 -6
- package/dist/Button.js +2 -2
- package/dist/Checkbox.js +1 -1
- package/dist/{CustomPopper-C1wIDHbM.js → CustomPopper-DWdMQOgg.js} +1 -1
- package/dist/D5lwkpmX-BTxFdaqc.js +1061 -0
- package/dist/DatePicker.js +2 -2
- package/dist/DateTimePicker.js +3 -3
- package/dist/DjvJNLSl-CB2sOBlX.js +88 -0
- package/dist/Drawer.js +4 -4
- package/dist/DropdownMenu.js +811 -925
- package/dist/Modal.js +14 -14
- package/dist/Popover.js +25 -24
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +41 -46
- package/dist/RadioTab.js +1 -1
- package/dist/Search.css +1 -1
- package/dist/Search.js +105 -106
- package/dist/Select.css +1 -1
- package/dist/Select.js +257 -251
- package/dist/Tabs.js +192 -198
- package/dist/TimePicker.js +4 -4
- package/dist/Toggle.js +1 -1
- package/dist/Tooltip.css +1 -1
- package/dist/Tooltip.js +150 -185
- package/dist/WelcomeLoader.js +86 -86
- package/dist/Window.js +5 -5
- package/dist/button-BmXyuOyT.js +24 -0
- package/dist/combobox-context-COdkPD-I.js +14 -0
- package/dist/command-JKE9Az0e.js +78 -0
- package/dist/composite-BOnUaIWf.js +198 -0
- package/dist/composite-item-CzuZunbi.js +763 -0
- package/dist/composite-store-BbsZpdXc.js +21 -0
- package/dist/dialog-RAMLmAdq.js +1222 -0
- package/dist/dialog-disclosure-xHQQLmS6.js +25 -0
- package/dist/dialog-dismiss-DVxKs13g.js +48 -0
- package/dist/disclosure-BQqv9Q8p.js +47 -0
- package/dist/disclosure-store-KfU9xwem.js +168 -0
- package/dist/hovercard-anchor-CgWES4cl.js +19 -0
- package/dist/hovercard-store-DjVhDVte.js +569 -0
- package/dist/index-B0vSTNCB.js +609 -0
- package/dist/popover-context-B2YQ_e3N.js +12 -0
- package/dist/popover-disclosure-a-bqp8Gt.js +183 -0
- package/dist/radio-J8ogFsWS.js +77 -0
- package/dist/tab-panel-DMICXMJc.js +187 -0
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Alert/components/Title.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +1 -1
- package/dist/types/components/Drawer/components/Close.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +6 -6
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +1 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
- package/dist/types/components/Icon/Sprite.d.ts +1 -1
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +1 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +1 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +3 -3
- package/dist/types/components/Modal/components/Footer.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +9 -9
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +1 -1
- package/dist/types/components/Popover/Arrow.d.ts +1 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +1 -1
- package/dist/types/components/Stepper/index.d.ts +2 -2
- package/dist/types/components/Stepper/utils.d.ts +1 -1
- package/dist/types/components/StickyNote/components/Button.d.ts +1 -1
- package/dist/types/components/StickyNote/components/Title.d.ts +1 -1
- package/dist/types/components/StickyNote/index.d.ts +2 -2
- package/dist/types/components/Swiper/components/SwiperNextButton.d.ts +1 -1
- package/dist/types/components/Swiper/components/SwiperPrevButton.d.ts +1 -1
- package/dist/types/components/Swiper/components/SwiperSlides.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +4 -4
- package/dist/types/components/Table/index.d.ts +5 -5
- package/dist/types/components/Tabs/utils.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +2 -2
- package/dist/types/components/Window/components/Header.d.ts +4 -4
- package/dist/types/components/Window/index.d.ts +4 -4
- package/package.json +2 -2
- package/dist/5TKKKQCL-rs260p95.js +0 -80
- package/dist/7PRQYBBV-D9IY4qtU.js +0 -14
- package/dist/APVORPDK-i7Z_eBMP.js +0 -25
- package/dist/CVCFNOHX-Ck0bUDvo.js +0 -20
- package/dist/ECBEZ4YM-o09xUuV6.js +0 -600
- package/dist/HMKTUWOU-NkVXWCyR.js +0 -25
- package/dist/I7KWAPMF-DQWZpGyL.js +0 -86
- package/dist/IQYAUKXT-Cltvp3KN.js +0 -303
- package/dist/JMU4N4M5-DnfyqGdJ.js +0 -15
- package/dist/NDVACHQI-WTOpOfgG.js +0 -37
- package/dist/OCCHVUS4-BJVLPRH8.js +0 -48
- package/dist/PZ3OL7I2-Cfim3UGe.js +0 -61
- package/dist/Q5W46E73-5xQblshY.js +0 -346
- package/dist/RFRKSHIZ-C_FLl4qI.js +0 -147
- package/dist/U6HHPQDW-CzxyP5H7.js +0 -856
- package/dist/WLZ6H5FH-CuTcX7sR.js +0 -183
- package/dist/WZWDIE3S-CGqoM1Fy.js +0 -290
- package/dist/Z32PU2LQ-DMjfxuT9.js +0 -945
- package/dist/ZMWF7ASR-Jc8y_k3t.js +0 -166
- package/dist/tab-panel-Cc3MfOBM.js +0 -212
package/dist/DropdownMenu.js
CHANGED
|
@@ -1,496 +1,447 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './DropdownMenu.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import {
|
|
5
|
-
import { H as
|
|
6
|
-
import { u as
|
|
7
|
-
import { c as
|
|
8
|
-
import { createContext as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { c as Xt,
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { u as
|
|
17
|
-
import {
|
|
18
|
-
import { u as
|
|
19
|
-
import { Checkbox as
|
|
20
|
-
import { Radio as
|
|
21
|
-
import { Toggle as
|
|
22
|
-
import { Icon as
|
|
3
|
+
import { jsx as m, jsxs as G } from "react/jsx-runtime";
|
|
4
|
+
import { c as ht, R as bt } from "./dialog-RAMLmAdq.js";
|
|
5
|
+
import { H as gt, a as Ct, g as Ee, u as Mt, b as wt, c as xt, d as St } from "./hovercard-store-DjVhDVte.js";
|
|
6
|
+
import { u as le, C as Ne, a as Te, f as yt, b as kt, c as vt } from "./composite-item-CzuZunbi.js";
|
|
7
|
+
import { c as y, f as k, a as v, i as D, b as Ie, u as L, r as _t, d as Et, e as Nt, n as Tt, g as U, h as me, j as It, k as At, l as ie, m as z, o as Pt, p as Y, q as Ae, s as pt, t as Dt, v as ee, w as O, x as Pe, y as Lt, z as $t, A as Ot, B as pe, C as Gt, D as Ft, E as Ht, F as Rt, G as Vt, H as De, I as Bt, J as zt } from "./D5lwkpmX-BTxFdaqc.js";
|
|
8
|
+
import { createContext as de, useState as fe, useContext as te, useCallback as Wt, useEffect as W, useRef as Le, createRef as jt, useMemo as Kt, forwardRef as N, createElement as Ut } from "react";
|
|
9
|
+
import { u as qt } from "./composite-BOnUaIWf.js";
|
|
10
|
+
import { i as Zt } from "./disclosure-store-KfU9xwem.js";
|
|
11
|
+
import { u as S, t as $e, c as Oe, a as Ge, b as Fe, m as Jt, o as Qt, p as Xt, s as Se, d as ye } from "./index-B0vSTNCB.js";
|
|
12
|
+
import { u as Yt } from "./combobox-context-COdkPD-I.js";
|
|
13
|
+
import { u as en } from "./composite-store-BbsZpdXc.js";
|
|
14
|
+
import { c as F } from "./index-B6iGEm-i.js";
|
|
15
|
+
import { f as j } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
16
|
+
import { u as tn, a as nn } from "./popover-disclosure-a-bqp8Gt.js";
|
|
17
|
+
import { C as rn, u as on, g as un } from "./DjvJNLSl-CB2sOBlX.js";
|
|
18
|
+
import { u as an } from "./radio-J8ogFsWS.js";
|
|
19
|
+
import { Checkbox as cn } from "./Checkbox.js";
|
|
20
|
+
import { Radio as sn } from "./Radio.js";
|
|
21
|
+
import { Toggle as ln } from "./Toggle.js";
|
|
22
|
+
import { Icon as He } from "./Icon.js";
|
|
23
23
|
import { InputText as mn } from "./InputText.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
x(function(e) {
|
|
34
|
-
const t = Ke(e);
|
|
35
|
-
return S(fn, t);
|
|
24
|
+
import { w as dn } from "./command-JKE9Az0e.js";
|
|
25
|
+
const fn = "hr", Re = y(function({ orientation: e = "horizontal", ...t }) {
|
|
26
|
+
return t = {
|
|
27
|
+
role: "separator",
|
|
28
|
+
"aria-orientation": e,
|
|
29
|
+
...t
|
|
30
|
+
}, t;
|
|
36
31
|
});
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
e,
|
|
41
|
-
process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component."
|
|
42
|
-
);
|
|
43
|
-
const o = e.useState(
|
|
44
|
-
(u) => u.orientation === "horizontal" ? "vertical" : "horizontal"
|
|
45
|
-
);
|
|
46
|
-
return t = Ke({ ...t, orientation: o }), t;
|
|
32
|
+
k(function(e) {
|
|
33
|
+
const t = Re(e);
|
|
34
|
+
return v(fn, t);
|
|
47
35
|
});
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
36
|
+
const hn = "hr", Ve = y(function({ store: e, orientation: t, ...r }) {
|
|
37
|
+
const o = le();
|
|
38
|
+
e = e || o, D(e, process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component.");
|
|
39
|
+
const i = S(e, ["orientation"], (u) => t ?? (u.orientation === "horizontal" ? "vertical" : "horizontal"));
|
|
40
|
+
return r = Re({
|
|
41
|
+
...r,
|
|
42
|
+
orientation: i
|
|
43
|
+
}), r;
|
|
51
44
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
void 0
|
|
58
|
-
);
|
|
59
|
-
var gn = "div", D = "";
|
|
60
|
-
function ae() {
|
|
61
|
-
D = "";
|
|
62
|
-
}
|
|
45
|
+
k(function(e) {
|
|
46
|
+
const t = Ve(e);
|
|
47
|
+
return v(hn, t);
|
|
48
|
+
});
|
|
49
|
+
const Be = Ie([Te], [Ne]), bn = Be.useContext, gn = Be.useScopedContext, Cn = "div", ke = /* @__PURE__ */ new WeakMap();
|
|
63
50
|
function Mn(n) {
|
|
64
|
-
|
|
65
|
-
return e
|
|
51
|
+
let e = ke.get(n);
|
|
52
|
+
return e || (e = {
|
|
53
|
+
chars: "",
|
|
54
|
+
cleanupTimeout: 0
|
|
55
|
+
}, ke.set(n, e)), e;
|
|
56
|
+
}
|
|
57
|
+
function J(n) {
|
|
58
|
+
n.chars = "";
|
|
66
59
|
}
|
|
67
|
-
function
|
|
68
|
-
if (At(n)) return !0;
|
|
60
|
+
function wn(n, e) {
|
|
69
61
|
const t = n.target;
|
|
70
|
-
return t
|
|
62
|
+
return t && Et(t) ? !1 : n.key === " " && e.chars.length ? !0 : n.key.length === 1 && !n.ctrlKey && !n.altKey && !n.metaKey && /^[\p{Letter}\p{Number}]$/u.test(n.key);
|
|
71
63
|
}
|
|
72
|
-
function
|
|
64
|
+
function xn(n, e) {
|
|
65
|
+
if (Nt(n)) return !0;
|
|
66
|
+
const t = n.target;
|
|
67
|
+
return t ? e.some((r) => r.element === t) : !1;
|
|
68
|
+
}
|
|
69
|
+
function Sn(n) {
|
|
73
70
|
return n.filter((e) => !e.disabled);
|
|
74
71
|
}
|
|
75
|
-
function
|
|
76
|
-
var
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
// component that can be used with those as well, we also consider the value
|
|
80
|
-
// property as a fallback for the typeahead text content.
|
|
81
|
-
"value" in n && n.value;
|
|
82
|
-
return r ? Tt(r).trim().toLowerCase().startsWith(e.toLowerCase()) : !1;
|
|
72
|
+
function Q(n, e) {
|
|
73
|
+
var r;
|
|
74
|
+
const t = n.typeaheadText ?? (((r = n.element) == null ? void 0 : r.textContent) || n.children || "value" in n && n.value);
|
|
75
|
+
return t ? Tt(t).trim().toLowerCase().startsWith(e.toLowerCase()) : !1;
|
|
83
76
|
}
|
|
84
|
-
function
|
|
85
|
-
if (!
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
).filter((o) => o.id !== t));
|
|
77
|
+
function yn({ activeId: n, char: e, items: t, typeaheadState: r }) {
|
|
78
|
+
if (!n) return t;
|
|
79
|
+
const o = t.find((u) => u.id === n);
|
|
80
|
+
if (!o || !Q(o, e)) return t;
|
|
81
|
+
const { chars: i } = r;
|
|
82
|
+
return i !== e && Q(o, i) ? t : (r.chars = e, yt(t.filter((u) => Q(u, e)), n).filter((u) => u.id !== n));
|
|
91
83
|
}
|
|
92
|
-
|
|
93
|
-
const o =
|
|
94
|
-
e = e || o,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
d.length > f.length ? d : f
|
|
105
|
-
);
|
|
106
|
-
const h = Ge(s.currentTarget), y = `[data-offscreen-id="${g}"]`, v = h.querySelectorAll(y);
|
|
107
|
-
for (const C of v) {
|
|
108
|
-
const T = C.ariaDisabled === "true" || "disabled" in C && !!C.disabled;
|
|
109
|
-
m.push({ id: C.id, element: C, disabled: T });
|
|
110
|
-
}
|
|
111
|
-
if (v.length && (m = Nt(m, (C) => C.element)), !Cn(s, m)) return ae();
|
|
112
|
-
s.preventDefault(), window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
113
|
-
D = "";
|
|
84
|
+
const he = y(function({ store: e, typeahead: t = !0, ...r }) {
|
|
85
|
+
const o = le();
|
|
86
|
+
e = e || o, D(e, process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component");
|
|
87
|
+
const i = r.onKeyDownCapture, u = L((s) => {
|
|
88
|
+
if (i == null || i(s), s.defaultPrevented || !t || !e) return;
|
|
89
|
+
const a = Mn(e);
|
|
90
|
+
if (!wn(s, a)) return J(a);
|
|
91
|
+
const { renderedItems: b, items: f, activeId: c } = e.getState();
|
|
92
|
+
let d = Sn(f.length > b.length ? f : b);
|
|
93
|
+
if (!xn(s, d)) return J(a);
|
|
94
|
+
s.preventDefault(), window.clearTimeout(a.cleanupTimeout), a.cleanupTimeout = window.setTimeout(() => {
|
|
95
|
+
J(a);
|
|
114
96
|
}, 500);
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
97
|
+
const g = s.key.toLowerCase();
|
|
98
|
+
a.chars += g, d = yn({
|
|
99
|
+
activeId: c,
|
|
100
|
+
char: g,
|
|
101
|
+
items: d,
|
|
102
|
+
typeaheadState: a
|
|
103
|
+
});
|
|
104
|
+
const h = d.find((M) => Q(M, a.chars));
|
|
105
|
+
h ? e.move(h.id) : J(a);
|
|
119
106
|
});
|
|
120
107
|
return r = {
|
|
121
108
|
...r,
|
|
122
|
-
onKeyDownCapture:
|
|
123
|
-
},
|
|
109
|
+
onKeyDownCapture: u
|
|
110
|
+
}, _t(r);
|
|
124
111
|
});
|
|
125
|
-
|
|
126
|
-
const t =
|
|
127
|
-
return
|
|
112
|
+
k(function(e) {
|
|
113
|
+
const t = he(e);
|
|
114
|
+
return v(Cn, t);
|
|
128
115
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
...e
|
|
140
|
-
}, Z(e);
|
|
141
|
-
}
|
|
142
|
-
);
|
|
143
|
-
x(function(e) {
|
|
144
|
-
const t = qe(e);
|
|
145
|
-
return S(Sn, t);
|
|
116
|
+
const ze = de(void 0), kn = "div", We = y(function(e) {
|
|
117
|
+
const [t, r] = fe();
|
|
118
|
+
return e = U(e, (o) => /* @__PURE__ */ m(ze.Provider, {
|
|
119
|
+
value: r,
|
|
120
|
+
children: o
|
|
121
|
+
}), []), e = {
|
|
122
|
+
role: "group",
|
|
123
|
+
"aria-labelledby": e["aria-label"] != null ? void 0 : t,
|
|
124
|
+
...e
|
|
125
|
+
}, e;
|
|
146
126
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
x(function(e) {
|
|
153
|
-
const t = Ze(e);
|
|
154
|
-
return S(yn, t);
|
|
127
|
+
k(function(e) {
|
|
128
|
+
const t = We(e);
|
|
129
|
+
return v(kn, t);
|
|
155
130
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
...e
|
|
163
|
-
}, Z(e);
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
x(function(e) {
|
|
167
|
-
const t = Je(e);
|
|
168
|
-
return S(pn, t);
|
|
131
|
+
const vn = "div", je = y(function({ store: e, ...t }) {
|
|
132
|
+
return t = We(t), t;
|
|
133
|
+
});
|
|
134
|
+
k(function(e) {
|
|
135
|
+
const t = je(e);
|
|
136
|
+
return v(vn, t);
|
|
169
137
|
});
|
|
170
|
-
|
|
171
|
-
|
|
138
|
+
const _n = "div", Ke = y(function(e) {
|
|
139
|
+
const t = te(ze), r = me(e.id);
|
|
140
|
+
return It(() => (t == null || t(r), () => t == null ? void 0 : t(void 0)), [t, r]), e = {
|
|
141
|
+
"aria-hidden": !0,
|
|
142
|
+
...e,
|
|
143
|
+
id: r
|
|
144
|
+
}, e;
|
|
145
|
+
});
|
|
146
|
+
k(function(e) {
|
|
147
|
+
const t = Ke(e);
|
|
148
|
+
return v(_n, t);
|
|
172
149
|
});
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return S(kn, t);
|
|
150
|
+
const En = "div", Ue = y(function({ store: e, ...t }) {
|
|
151
|
+
return t = Ke(t), t;
|
|
176
152
|
});
|
|
177
|
-
|
|
178
|
-
|
|
153
|
+
k(function(e) {
|
|
154
|
+
const t = Ue(e);
|
|
155
|
+
return v(En, t);
|
|
156
|
+
});
|
|
157
|
+
const Nn = "div";
|
|
158
|
+
function Tn(n) {
|
|
179
159
|
const e = n.relatedTarget;
|
|
180
|
-
return (e
|
|
160
|
+
return Ae(e) ? pt(n.currentTarget, e) : !1;
|
|
181
161
|
}
|
|
162
|
+
const ae = Symbol("composite-hover");
|
|
182
163
|
function In(n) {
|
|
183
|
-
const e =
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
var le = Symbol("composite-hover");
|
|
187
|
-
function Pn(n) {
|
|
188
|
-
let e = Xe(n);
|
|
189
|
-
if (!e) return !1;
|
|
164
|
+
const { relatedTarget: e } = n;
|
|
165
|
+
if (!Ae(e)) return !1;
|
|
166
|
+
let t = e;
|
|
190
167
|
do {
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
} while (
|
|
168
|
+
if (Dt(t, ae) && t[ae]) return !0;
|
|
169
|
+
t = t.parentElement;
|
|
170
|
+
} while (t);
|
|
194
171
|
return !1;
|
|
195
172
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
e = e || u, L(
|
|
205
|
-
e,
|
|
206
|
-
process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
|
|
207
|
-
);
|
|
208
|
-
const c = Lt(), i = o.onMouseMove, s = se(t), f = O((h) => {
|
|
209
|
-
if (i == null || i(h), !h.defaultPrevented && c() && s(h)) {
|
|
210
|
-
if (!K(h.currentTarget)) {
|
|
211
|
-
const y = e == null ? void 0 : e.getState().baseElement;
|
|
212
|
-
y && !Ot(y) && y.focus();
|
|
213
|
-
}
|
|
214
|
-
e == null || e.setActiveId(h.currentTarget.id);
|
|
173
|
+
const qe = y(function({ store: e, focusOnHover: t = !0, blurOnHoverEnd: r = !!t, ...o }) {
|
|
174
|
+
const i = le();
|
|
175
|
+
e = e || i, D(e, process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component.");
|
|
176
|
+
const u = At(), s = o.onMouseMove, a = ie(t), b = L((h) => {
|
|
177
|
+
if (s == null || s(h), !h.defaultPrevented && u() && a(h)) {
|
|
178
|
+
if (!z(h.currentTarget)) {
|
|
179
|
+
const M = e == null ? void 0 : e.getState().compositeElement;
|
|
180
|
+
M && !Pt(M) && M.focus({ preventScroll: !0 });
|
|
215
181
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
function An(n) {
|
|
252
|
-
return n.checked ? n.children || En : typeof n.children == "function" ? n.children : null;
|
|
182
|
+
e == null || e.setActiveId(h.currentTarget.id);
|
|
183
|
+
}
|
|
184
|
+
}), f = o.onMouseLeave, c = ie(r), d = L((h) => {
|
|
185
|
+
var M;
|
|
186
|
+
f == null || f(h), !h.defaultPrevented && u() && (Tn(h) || In(h) || a(h) && c(h) && (e == null || e.setActiveId(null), (M = e == null ? void 0 : e.getState().compositeElement) == null || M.focus({ preventScroll: !0 })));
|
|
187
|
+
}), g = Wt((h) => {
|
|
188
|
+
h && (h[ae] = !0);
|
|
189
|
+
}, []);
|
|
190
|
+
return o = {
|
|
191
|
+
...o,
|
|
192
|
+
ref: Y(g, o.ref),
|
|
193
|
+
onMouseMove: b,
|
|
194
|
+
onMouseLeave: d
|
|
195
|
+
}, o;
|
|
196
|
+
});
|
|
197
|
+
ee(k(function(e) {
|
|
198
|
+
const t = qe(e);
|
|
199
|
+
return v(Nn, t);
|
|
200
|
+
}));
|
|
201
|
+
const An = "span", Pn = /* @__PURE__ */ m("svg", {
|
|
202
|
+
display: "block",
|
|
203
|
+
fill: "none",
|
|
204
|
+
stroke: "currentColor",
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeLinejoin: "round",
|
|
207
|
+
strokeWidth: 1.5,
|
|
208
|
+
viewBox: "0 0 16 16",
|
|
209
|
+
height: "1em",
|
|
210
|
+
width: "1em",
|
|
211
|
+
children: /* @__PURE__ */ m("polyline", { points: "4,8 7,12 12,4" })
|
|
212
|
+
});
|
|
213
|
+
function pn(n) {
|
|
214
|
+
return n.checked ? n.children || Pn : null;
|
|
253
215
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
x(function(e) {
|
|
273
|
-
const t = et(e);
|
|
274
|
-
return S(Nn, t);
|
|
216
|
+
const Ze = y(function({ store: e, checked: t, ...r }) {
|
|
217
|
+
const o = te(rn);
|
|
218
|
+
t = t ?? o;
|
|
219
|
+
const i = pn({
|
|
220
|
+
checked: t,
|
|
221
|
+
children: r.children
|
|
222
|
+
});
|
|
223
|
+
return r = {
|
|
224
|
+
"aria-hidden": !0,
|
|
225
|
+
...r,
|
|
226
|
+
children: i,
|
|
227
|
+
style: {
|
|
228
|
+
width: "1em",
|
|
229
|
+
height: "1em",
|
|
230
|
+
pointerEvents: "none",
|
|
231
|
+
...r.style
|
|
232
|
+
}
|
|
233
|
+
}, r;
|
|
275
234
|
});
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
!1
|
|
285
|
-
)
|
|
286
|
-
}, o = De(r, n.store);
|
|
235
|
+
k(function(e) {
|
|
236
|
+
const t = Ze(e);
|
|
237
|
+
return v(An, t);
|
|
238
|
+
});
|
|
239
|
+
function Dn(n = {}) {
|
|
240
|
+
var o;
|
|
241
|
+
$e(n, n.store);
|
|
242
|
+
const e = (o = n.store) == null ? void 0 : o.getState(), t = { value: O(n.value, e == null ? void 0 : e.value, n.defaultValue, !1) }, r = Oe(t, n.store);
|
|
287
243
|
return {
|
|
288
|
-
...
|
|
289
|
-
setValue: (
|
|
244
|
+
...r,
|
|
245
|
+
setValue: (i) => r.setState("value", i)
|
|
290
246
|
};
|
|
291
247
|
}
|
|
292
|
-
function
|
|
293
|
-
return
|
|
248
|
+
function Ln(n, e, t) {
|
|
249
|
+
return Pe(e, [t.store, e]), Fe(n, t, "value", "setValue"), n;
|
|
294
250
|
}
|
|
295
|
-
function
|
|
296
|
-
const [e, t] =
|
|
297
|
-
return
|
|
251
|
+
function $n(n = {}) {
|
|
252
|
+
const [e, t] = Ge(Dn, n);
|
|
253
|
+
return Ln(e, t, n);
|
|
298
254
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
[
|
|
302
|
-
)
|
|
303
|
-
|
|
304
|
-
), Fn = "div";
|
|
305
|
-
function $n({ store: n, ...e }) {
|
|
306
|
-
const [t, r] = ge(void 0), o = e["aria-label"], u = A(n, "disclosureElement"), c = A(n, "contentElement");
|
|
307
|
-
return j(() => {
|
|
308
|
-
const i = u;
|
|
309
|
-
if (!i) return;
|
|
310
|
-
const s = c;
|
|
255
|
+
const q = Ie([Te, Ct], [Ne, gt]), ne = q.useContext, be = q.useScopedContext, re = q.useProviderContext, Je = q.ContextProvider, On = q.ScopedContextProvider, Qe = de(void 0), Xe = de(!1), Gn = "div";
|
|
256
|
+
function Fn({ store: n, ...e }) {
|
|
257
|
+
const [t, r] = fe(void 0), o = e["aria-label"], i = S(n, "disclosureElement"), u = S(n, "contentElement");
|
|
258
|
+
return W(() => {
|
|
259
|
+
const s = i;
|
|
311
260
|
if (!s) return;
|
|
312
|
-
|
|
313
|
-
|
|
261
|
+
const a = u;
|
|
262
|
+
a && (o || a.hasAttribute("aria-label") ? r(void 0) : s.id && r(s.id));
|
|
263
|
+
}, [
|
|
264
|
+
o,
|
|
265
|
+
i,
|
|
266
|
+
u
|
|
267
|
+
]), t;
|
|
314
268
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
), y = O((M) => {
|
|
330
|
-
if (d == null || d(M), !M.defaultPrevented) {
|
|
331
|
-
if (s || i && !m) {
|
|
332
|
-
const E = {
|
|
333
|
-
ArrowRight: () => a === "left" && !m,
|
|
334
|
-
ArrowLeft: () => a === "right" && !m,
|
|
335
|
-
ArrowUp: () => a === "bottom" && m,
|
|
336
|
-
ArrowDown: () => a === "top" && m
|
|
337
|
-
}[M.key];
|
|
338
|
-
if (E != null && E())
|
|
339
|
-
return M.stopPropagation(), M.preventDefault(), e == null ? void 0 : e.hide();
|
|
340
|
-
}
|
|
341
|
-
if (i) {
|
|
342
|
-
const E = {
|
|
343
|
-
ArrowRight: () => {
|
|
344
|
-
if (h)
|
|
345
|
-
return i.next();
|
|
346
|
-
},
|
|
347
|
-
ArrowLeft: () => {
|
|
348
|
-
if (h)
|
|
349
|
-
return i.previous();
|
|
350
|
-
},
|
|
351
|
-
ArrowDown: () => {
|
|
352
|
-
if (!h)
|
|
353
|
-
return i.next();
|
|
354
|
-
},
|
|
355
|
-
ArrowUp: () => {
|
|
356
|
-
if (!h)
|
|
357
|
-
return i.previous();
|
|
358
|
-
}
|
|
359
|
-
}[M.key], B = E == null ? void 0 : E();
|
|
360
|
-
B !== void 0 && (M.stopPropagation(), M.preventDefault(), i.move(B));
|
|
361
|
-
}
|
|
269
|
+
const Ye = y(function({ store: e, alwaysVisible: t, composite: r, ...o }) {
|
|
270
|
+
const i = re();
|
|
271
|
+
e = e || i, D(e, process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component.");
|
|
272
|
+
const u = e.parent, s = e.menubar, a = !!u, b = me(o.id), f = o.onKeyDown, c = S(e, ["placement"], (C) => Ee(C.placement)), d = S(e, ["orientation"], (C) => C.orientation === "both" ? void 0 : C.orientation), g = d !== "vertical", h = S(s, ["orientation"], (C) => !!C && C.orientation !== "vertical"), M = L((C) => {
|
|
273
|
+
if (f == null || f(C), !C.defaultPrevented) {
|
|
274
|
+
if (a || s && !g) {
|
|
275
|
+
const I = {
|
|
276
|
+
ArrowRight: () => c === "left" && !g,
|
|
277
|
+
ArrowLeft: () => c === "right" && !g,
|
|
278
|
+
ArrowUp: () => c === "bottom" && g,
|
|
279
|
+
ArrowDown: () => c === "top" && g
|
|
280
|
+
}[C.key];
|
|
281
|
+
if (I != null && I())
|
|
282
|
+
return C.stopPropagation(), C.preventDefault(), e == null ? void 0 : e.hide();
|
|
362
283
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
)
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
284
|
+
if (s) {
|
|
285
|
+
const I = {
|
|
286
|
+
ArrowRight: () => {
|
|
287
|
+
if (h)
|
|
288
|
+
return s.next();
|
|
289
|
+
},
|
|
290
|
+
ArrowLeft: () => {
|
|
291
|
+
if (h)
|
|
292
|
+
return s.previous();
|
|
293
|
+
},
|
|
294
|
+
ArrowDown: () => {
|
|
295
|
+
if (!h)
|
|
296
|
+
return s.next();
|
|
297
|
+
},
|
|
298
|
+
ArrowUp: () => {
|
|
299
|
+
if (!h)
|
|
300
|
+
return s.previous();
|
|
301
|
+
}
|
|
302
|
+
}[C.key], V = I == null ? void 0 : I();
|
|
303
|
+
V !== void 0 && (C.stopPropagation(), C.preventDefault(), s.move(V));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
o = U(o, (C) => /* @__PURE__ */ m(On, {
|
|
308
|
+
value: e,
|
|
309
|
+
children: C
|
|
310
|
+
}), [e]);
|
|
311
|
+
const w = Fn({
|
|
312
|
+
store: e,
|
|
313
|
+
...o
|
|
314
|
+
}), A = S(e, "mounted"), T = Zt(A, o.hidden, t), p = T ? {
|
|
315
|
+
...o.style,
|
|
316
|
+
display: "none"
|
|
317
|
+
} : o.style;
|
|
318
|
+
o = U(o, (C) => /* @__PURE__ */ m(Xe.Provider, {
|
|
319
|
+
value: T,
|
|
320
|
+
children: C
|
|
321
|
+
}), [T]), o = {
|
|
322
|
+
"aria-labelledby": w,
|
|
323
|
+
hidden: T,
|
|
324
|
+
...o,
|
|
325
|
+
id: b,
|
|
326
|
+
ref: Y(b ? e.setContentElement : null, o.ref),
|
|
327
|
+
style: p,
|
|
328
|
+
onKeyDown: M
|
|
329
|
+
};
|
|
330
|
+
const P = !!e.combobox;
|
|
331
|
+
return r = r ?? !P, r && (o = {
|
|
332
|
+
role: "menu",
|
|
333
|
+
"aria-orientation": d,
|
|
334
|
+
...o
|
|
335
|
+
}), o = qt({
|
|
336
|
+
store: e,
|
|
337
|
+
composite: r,
|
|
338
|
+
...o
|
|
339
|
+
}), o = he({
|
|
340
|
+
store: e,
|
|
341
|
+
typeahead: !P,
|
|
342
|
+
...o
|
|
343
|
+
}), o;
|
|
390
344
|
});
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
e = e || f, L(
|
|
403
|
-
e,
|
|
404
|
-
process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
|
|
405
|
-
);
|
|
406
|
-
const d = be(null), a = e.parent, g = e.menubar, m = !!a, h = !!g && !m;
|
|
407
|
-
s = {
|
|
408
|
-
...s,
|
|
409
|
-
ref: ne(d, s.ref)
|
|
345
|
+
k(function(e) {
|
|
346
|
+
const t = Ye(e);
|
|
347
|
+
return v(Gn, t);
|
|
348
|
+
});
|
|
349
|
+
const Hn = "div", Rn = y(function({ store: e, modal: t = !1, portal: r = t, hideOnEscape: o = !0, autoFocusOnShow: i = !0, hideOnHoverOutside: u, alwaysVisible: s, ...a }) {
|
|
350
|
+
const b = re();
|
|
351
|
+
e = e || b, D(e, process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component.");
|
|
352
|
+
const f = Le(null), c = e.parent, d = e.menubar, g = !!c, h = !!d && !g, M = g ? !1 : t;
|
|
353
|
+
a = {
|
|
354
|
+
...a,
|
|
355
|
+
ref: Y(f, a.ref)
|
|
410
356
|
};
|
|
411
|
-
const { "aria-labelledby":
|
|
357
|
+
const { "aria-labelledby": w, ...A } = Ye({
|
|
412
358
|
store: e,
|
|
413
|
-
alwaysVisible:
|
|
414
|
-
...
|
|
359
|
+
alwaysVisible: s,
|
|
360
|
+
...a
|
|
415
361
|
});
|
|
416
|
-
|
|
417
|
-
const [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
362
|
+
a = A;
|
|
363
|
+
const [T, p] = fe(), P = S(e, [
|
|
364
|
+
"autoFocusOnShow",
|
|
365
|
+
"initialFocus",
|
|
366
|
+
"renderedItems",
|
|
367
|
+
"compositeElement"
|
|
368
|
+
], (x) => {
|
|
369
|
+
var _;
|
|
370
|
+
if (!x.autoFocusOnShow) return;
|
|
371
|
+
const l = (E) => !E.disabled && !!E.element;
|
|
372
|
+
switch (x.initialFocus) {
|
|
373
|
+
case "first":
|
|
374
|
+
return ((_ = x.renderedItems.find(l)) == null ? void 0 : _.element) || null;
|
|
375
|
+
case "last":
|
|
376
|
+
for (let E = x.renderedItems.length - 1; E >= 0; E -= 1) {
|
|
377
|
+
const $ = x.renderedItems[E];
|
|
378
|
+
if ($ && l($)) return $.element;
|
|
379
|
+
}
|
|
380
|
+
return null;
|
|
381
|
+
default:
|
|
382
|
+
return x.compositeElement;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
W(() => {
|
|
386
|
+
let x = !1;
|
|
387
|
+
return p((l) => {
|
|
388
|
+
var E;
|
|
389
|
+
if (x) return;
|
|
390
|
+
if (M && ((E = l == null ? void 0 : l.current) != null && E.isConnected)) return l;
|
|
391
|
+
if (P === void 0) return;
|
|
392
|
+
if (P && P === (l == null ? void 0 : l.current)) return l;
|
|
393
|
+
const _ = jt();
|
|
394
|
+
return _.current = P, _;
|
|
437
395
|
}), () => {
|
|
438
|
-
|
|
396
|
+
x = !0;
|
|
439
397
|
};
|
|
440
|
-
}, [
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
"
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return $;
|
|
452
|
-
}, [k, $]);
|
|
453
|
-
return W !== void 0 && (s = {
|
|
454
|
-
preserveTabOrderAnchor: W,
|
|
455
|
-
...s
|
|
456
|
-
}), s = yt({
|
|
398
|
+
}, [M, P]);
|
|
399
|
+
const C = !!T || !!a.initialFocus || M, I = i === !1 ? !1 : C && i, V = S(e, ["disclosureElement", "anchorElement"], (x) => x.disclosureElement || x.anchorElement), K = S(e.combobox || e, "contentElement"), B = S((c == null ? void 0 : c.combobox) || c, "contentElement"), Z = Kt(() => {
|
|
400
|
+
if (!B || !K) return;
|
|
401
|
+
const x = K.getAttribute("role"), l = B.getAttribute("role");
|
|
402
|
+
if (!((l === "menu" || l === "menubar") && x === "menu"))
|
|
403
|
+
return B;
|
|
404
|
+
}, [K, B]);
|
|
405
|
+
return Z !== void 0 && (a = {
|
|
406
|
+
preserveTabOrderAnchor: Z,
|
|
407
|
+
...a
|
|
408
|
+
}), a = Mt({
|
|
457
409
|
store: e,
|
|
458
|
-
alwaysVisible:
|
|
459
|
-
initialFocus:
|
|
460
|
-
autoFocusOnShow:
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
410
|
+
alwaysVisible: s,
|
|
411
|
+
initialFocus: T,
|
|
412
|
+
autoFocusOnShow: I,
|
|
413
|
+
finalFocus: V,
|
|
414
|
+
...a,
|
|
415
|
+
hideOnEscape(x) {
|
|
416
|
+
return $t(o, x) ? !1 : (e == null || e.hideAll(), !0);
|
|
464
417
|
},
|
|
465
|
-
hideOnHoverOutside(
|
|
466
|
-
const
|
|
467
|
-
return (typeof
|
|
468
|
-
|
|
418
|
+
hideOnHoverOutside(x) {
|
|
419
|
+
const l = e == null ? void 0 : e.getState().disclosureElement;
|
|
420
|
+
return (typeof u == "function" ? u(x) : u ?? (g ? !0 : h ? l ? !z(l) : !0 : !1)) ? x.defaultPrevented || !g || !l || (Lt(l, "mouseout", x), !z(l)) ? !0 : (requestAnimationFrame(() => {
|
|
421
|
+
z(l) || e == null || e.hide();
|
|
469
422
|
}), !1) : !1;
|
|
470
423
|
},
|
|
471
|
-
modal:
|
|
424
|
+
modal: M,
|
|
472
425
|
portal: r,
|
|
473
|
-
backdrop:
|
|
474
|
-
}),
|
|
475
|
-
"aria-labelledby":
|
|
476
|
-
...
|
|
477
|
-
},
|
|
478
|
-
}),
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
489
|
-
), Bn = x(function(e) {
|
|
426
|
+
backdrop: g ? !1 : a.backdrop
|
|
427
|
+
}), a = {
|
|
428
|
+
"aria-labelledby": w,
|
|
429
|
+
...a
|
|
430
|
+
}, a;
|
|
431
|
+
}), Vn = ht(k(function(e) {
|
|
432
|
+
const t = Rn(e);
|
|
433
|
+
return v(Hn, t);
|
|
434
|
+
}), re), Bn = "div", zn = y(function({ store: e, ...t }) {
|
|
435
|
+
const r = ne();
|
|
436
|
+
return e = e || r, tn({
|
|
437
|
+
store: e,
|
|
438
|
+
...t
|
|
439
|
+
});
|
|
440
|
+
}), Wn = k(function(e) {
|
|
490
441
|
const t = zn(e);
|
|
491
|
-
return
|
|
492
|
-
}),
|
|
493
|
-
function
|
|
442
|
+
return v(Bn, t);
|
|
443
|
+
}), jn = "button";
|
|
444
|
+
function Kn(n, e) {
|
|
494
445
|
return {
|
|
495
446
|
ArrowDown: e === "bottom" || e === "top" ? "first" : !1,
|
|
496
447
|
ArrowUp: e === "bottom" || e === "top" ? "last" : !1,
|
|
@@ -498,518 +449,453 @@ function jn(n, e) {
|
|
|
498
449
|
ArrowLeft: e === "left" ? "first" : !1
|
|
499
450
|
}[n.key];
|
|
500
451
|
}
|
|
501
|
-
function
|
|
452
|
+
function ve(n, e) {
|
|
502
453
|
return !!(n != null && n.some((t) => !t.element || t.element === e ? !1 : t.element.getAttribute("aria-expanded") === "true"));
|
|
503
454
|
}
|
|
504
|
-
|
|
505
|
-
|
|
455
|
+
const Un = y(function({ store: e, focusable: t, accessibleWhenDisabled: r, showOnHover: o, unstable_showOnHoverWhenDisabled: i = !1, ...u }) {
|
|
456
|
+
const s = re();
|
|
457
|
+
e = e || s, D(e, process.env.NODE_ENV !== "production" && "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component.");
|
|
458
|
+
const a = Le(null), b = e.parent, f = e.menubar, c = !!b, d = !!f && !c, g = Ot(u), h = (l) => g || Ft(l), M = () => {
|
|
459
|
+
const l = a.current;
|
|
460
|
+
l && (e == null || e.setDisclosureElement(l), e == null || e.show());
|
|
461
|
+
}, w = u.onFocus, A = L((l) => {
|
|
462
|
+
if (w == null || w(l), h(l.currentTarget) || l.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !f) || !d) return;
|
|
463
|
+
const { items: _ } = f.getState();
|
|
464
|
+
ve(_, l.currentTarget) && M();
|
|
465
|
+
}), T = S(e, ["placement"], (l) => Ee(l.placement)), p = u.onKeyDown, P = L((l) => {
|
|
466
|
+
if (p == null || p(l), h(l.currentTarget) || l.defaultPrevented) return;
|
|
467
|
+
const _ = Kn(l, T);
|
|
468
|
+
if (_) {
|
|
469
|
+
l.preventDefault();
|
|
470
|
+
const { open: E } = e.getState();
|
|
471
|
+
if (E) {
|
|
472
|
+
const $ = _ === "last" ? e.last() : e.first();
|
|
473
|
+
e.move($);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
M(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(_);
|
|
477
|
+
}
|
|
478
|
+
}), C = u.onClick, I = L((l) => {
|
|
479
|
+
if (C == null || C(l), l.defaultPrevented || !e) return;
|
|
480
|
+
const _ = !l.detail, { open: E } = e.getState();
|
|
481
|
+
(!E || _) && ((!c || _) && e.setAutoFocusOnShow(!0), e.setInitialFocus(_ ? "first" : "container")), c && M();
|
|
482
|
+
});
|
|
483
|
+
u = U(u, (l) => /* @__PURE__ */ m(Je, {
|
|
484
|
+
value: e,
|
|
485
|
+
children: l
|
|
486
|
+
}), [e]), c && (u = {
|
|
487
|
+
...u,
|
|
488
|
+
render: /* @__PURE__ */ m(bt.div, { render: u.render })
|
|
489
|
+
});
|
|
490
|
+
const V = me(u.id), K = S((b == null ? void 0 : b.combobox) || b, "contentElement"), B = c || d ? pe(K, "menuitem") : void 0, Z = S(e, "contentElement"), x = !!e.combobox;
|
|
491
|
+
return u = {
|
|
492
|
+
role: B,
|
|
493
|
+
"aria-haspopup": Gt(Z, x ? "dialog" : "menu"),
|
|
494
|
+
...u,
|
|
495
|
+
id: V,
|
|
496
|
+
ref: Y(a, u.ref),
|
|
497
|
+
onFocus: A,
|
|
498
|
+
onKeyDown: P,
|
|
499
|
+
onClick: I
|
|
500
|
+
}, u = wt({
|
|
506
501
|
store: e,
|
|
507
502
|
focusable: t,
|
|
508
503
|
accessibleWhenDisabled: r,
|
|
509
|
-
|
|
504
|
+
...u,
|
|
505
|
+
unstable_showOnHoverWhenDisabled: i,
|
|
506
|
+
showOnHover: (l) => {
|
|
507
|
+
if (!(() => {
|
|
508
|
+
if (typeof o == "function") return o(l);
|
|
509
|
+
if (o != null) return o;
|
|
510
|
+
if (c) return !0;
|
|
511
|
+
if (!f) return !1;
|
|
512
|
+
const { items: $ } = f.getState();
|
|
513
|
+
return d && ve($);
|
|
514
|
+
})()) return !1;
|
|
515
|
+
const E = d ? f : b;
|
|
516
|
+
return E && E.setActiveId(l.currentTarget.id), !0;
|
|
517
|
+
}
|
|
518
|
+
}), u = nn({
|
|
519
|
+
store: e,
|
|
520
|
+
toggleOnClick: !c,
|
|
521
|
+
focusable: t,
|
|
522
|
+
accessibleWhenDisabled: r,
|
|
510
523
|
...u
|
|
511
|
-
}) {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
const i = be(null), s = e.parent, f = e.menubar, d = !!s, a = !!f && !d, g = Ht(u), m = () => {
|
|
518
|
-
const b = i.current;
|
|
519
|
-
b && (e == null || e.setDisclosureElement(b), e == null || e.setAnchorElement(b), e == null || e.show());
|
|
520
|
-
}, h = u.onFocus, y = O((b) => {
|
|
521
|
-
if (h == null || h(b), g || b.defaultPrevented || (e == null || e.setAutoFocusOnShow(!1), e == null || e.setActiveId(null), !f) || !a) return;
|
|
522
|
-
const { items: k } = f.getState();
|
|
523
|
-
Ee(k, b.currentTarget) && m();
|
|
524
|
-
}), v = A(
|
|
525
|
-
e,
|
|
526
|
-
(b) => b.placement.split("-")[0]
|
|
527
|
-
), p = u.onKeyDown, N = O((b) => {
|
|
528
|
-
if (p == null || p(b), g || b.defaultPrevented) return;
|
|
529
|
-
const k = jn(b, v);
|
|
530
|
-
k && (b.preventDefault(), m(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(k));
|
|
531
|
-
}), C = u.onClick, T = O((b) => {
|
|
532
|
-
if (C == null || C(b), b.defaultPrevented || !e) return;
|
|
533
|
-
const k = !b.detail, { open: $ } = e.getState();
|
|
534
|
-
(!$ || k) && ((!d || k) && e.setAutoFocusOnShow(!0), e.setInitialFocus(k ? "first" : "container")), d && m();
|
|
535
|
-
});
|
|
536
|
-
u = te(
|
|
537
|
-
u,
|
|
538
|
-
(b) => /* @__PURE__ */ l(tt, { value: e, children: b }),
|
|
539
|
-
[e]
|
|
540
|
-
), d && (u = {
|
|
541
|
-
...u,
|
|
542
|
-
render: /* @__PURE__ */ l(Yt.div, { render: u.render })
|
|
543
|
-
});
|
|
544
|
-
const M = he(u.id), F = A(
|
|
545
|
-
(s == null ? void 0 : s.combobox) || s,
|
|
546
|
-
"contentElement"
|
|
547
|
-
), E = d || a ? Ve(F, "menuitem") : void 0, B = e.useState("contentElement");
|
|
548
|
-
return u = {
|
|
549
|
-
id: M,
|
|
550
|
-
role: E,
|
|
551
|
-
"aria-haspopup": Vt(B, "menu"),
|
|
552
|
-
...u,
|
|
553
|
-
ref: ne(i, u.ref),
|
|
554
|
-
onFocus: y,
|
|
555
|
-
onKeyDown: N,
|
|
556
|
-
onClick: T
|
|
557
|
-
}, u = pt({
|
|
558
|
-
store: e,
|
|
559
|
-
focusable: t,
|
|
560
|
-
accessibleWhenDisabled: r,
|
|
561
|
-
...u,
|
|
562
|
-
showOnHover: (b) => {
|
|
563
|
-
if (!(() => {
|
|
564
|
-
if (typeof o == "function") return o(b);
|
|
565
|
-
if (o != null) return o;
|
|
566
|
-
if (d) return !0;
|
|
567
|
-
if (!f) return !1;
|
|
568
|
-
const { items: I } = f.getState();
|
|
569
|
-
return a && Ee(I);
|
|
570
|
-
})()) return !1;
|
|
571
|
-
const W = a ? f : s;
|
|
572
|
-
return W && W.setActiveId(b.currentTarget.id), !0;
|
|
573
|
-
}
|
|
574
|
-
}), u = tn({
|
|
575
|
-
store: e,
|
|
576
|
-
toggleOnClick: !d,
|
|
577
|
-
focusable: t,
|
|
578
|
-
accessibleWhenDisabled: r,
|
|
579
|
-
...u
|
|
580
|
-
}), u = Ce({
|
|
581
|
-
store: e,
|
|
582
|
-
typeahead: a,
|
|
583
|
-
...u
|
|
584
|
-
}), u;
|
|
585
|
-
}
|
|
586
|
-
), ot = x(function(e) {
|
|
524
|
+
}), u = he({
|
|
525
|
+
store: e,
|
|
526
|
+
typeahead: d,
|
|
527
|
+
...u
|
|
528
|
+
}), u;
|
|
529
|
+
}), et = k(function(e) {
|
|
587
530
|
const t = Un(e);
|
|
588
|
-
return
|
|
589
|
-
}),
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
return
|
|
596
|
-
}),
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
return S(Jn, t);
|
|
603
|
-
}), Yn = "div";
|
|
604
|
-
function er(n, e, t) {
|
|
605
|
-
var r;
|
|
531
|
+
return v(jn, dn(t));
|
|
532
|
+
}), qn = "div", Zn = y(function(e) {
|
|
533
|
+
return e = je(e), e;
|
|
534
|
+
}), Jn = k(function(e) {
|
|
535
|
+
const t = Zn(e);
|
|
536
|
+
return v(qn, t);
|
|
537
|
+
}), Qn = "div", Xn = y(function(e) {
|
|
538
|
+
return e = Ue(e), e;
|
|
539
|
+
}), Yn = k(function(e) {
|
|
540
|
+
const t = Xn(e);
|
|
541
|
+
return v(Qn, t);
|
|
542
|
+
}), er = "div";
|
|
543
|
+
function tr(n, e, t) {
|
|
544
|
+
var i, u;
|
|
606
545
|
if (!n) return !1;
|
|
607
|
-
if (
|
|
608
|
-
const
|
|
609
|
-
var
|
|
610
|
-
return s.element === t ? !1 : ((
|
|
611
|
-
})
|
|
612
|
-
if (!
|
|
613
|
-
const
|
|
614
|
-
return
|
|
546
|
+
if (z(n)) return !0;
|
|
547
|
+
const r = (u = (i = e == null ? void 0 : e.find((s) => {
|
|
548
|
+
var a;
|
|
549
|
+
return s.element === t ? !1 : ((a = s.element) == null ? void 0 : a.getAttribute("aria-expanded")) === "true";
|
|
550
|
+
})) == null ? void 0 : i.element) == null ? void 0 : u.getAttribute("aria-controls");
|
|
551
|
+
if (!r) return !1;
|
|
552
|
+
const o = Vt(n).getElementById(r);
|
|
553
|
+
return o ? z(o) ? !0 : !!o.querySelector("[role=menuitem][aria-expanded=true]") : !1;
|
|
615
554
|
}
|
|
616
|
-
|
|
617
|
-
|
|
555
|
+
const ge = y(function({ store: e, hideOnClick: t = !0, preventScrollOnKeyDown: r = !0, focusOnHover: o, blurOnHoverEnd: i, ...u }) {
|
|
556
|
+
const s = be(!0), a = gn();
|
|
557
|
+
e = e || s || a, D(e, process.env.NODE_ENV !== "production" && "MenuItem must be wrapped in a MenuList, Menu or Menubar component");
|
|
558
|
+
const b = u.onClick, f = ie(t), c = "hideAll" in e ? e.hideAll : void 0, d = !!c, g = L((w) => {
|
|
559
|
+
if (b == null || b(w), w.defaultPrevented || Ht(w) || Rt(w) || !c) return;
|
|
560
|
+
const A = w.currentTarget.getAttribute("aria-haspopup");
|
|
561
|
+
A && A !== "false" || f(w) && c();
|
|
562
|
+
}), h = S(e, ["contentElement"], (w) => "contentElement" in w ? w.contentElement : null), M = te(Xe);
|
|
563
|
+
return u = {
|
|
564
|
+
role: pe(h, "menuitem"),
|
|
565
|
+
...u,
|
|
566
|
+
onClick: g
|
|
567
|
+
}, u = kt({
|
|
618
568
|
store: e,
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
e
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
if (!e || !p()) return !1;
|
|
650
|
-
const { baseElement: N, items: C } = e.getState();
|
|
651
|
-
return g ? (v.currentTarget.hasAttribute("aria-expanded") && v.currentTarget.focus(), !0) : er(N, C, v.currentTarget) ? (v.currentTarget.focus(), !0) : !1;
|
|
652
|
-
},
|
|
653
|
-
blurOnHoverEnd(v) {
|
|
654
|
-
return typeof u == "function" ? u(v) : u ?? g;
|
|
655
|
-
}
|
|
656
|
-
}), c;
|
|
657
|
-
}
|
|
658
|
-
), Se = re(
|
|
659
|
-
x(function(e) {
|
|
660
|
-
const t = xe(e);
|
|
661
|
-
return S(Yn, t);
|
|
662
|
-
})
|
|
663
|
-
), tr = "span", nr = w(
|
|
664
|
-
function({ store: e, checked: t, ...r }) {
|
|
665
|
-
const o = Me(nt);
|
|
666
|
-
return t = t ?? o, r = et({ ...r, checked: t }), r;
|
|
667
|
-
}
|
|
668
|
-
), rr = x(function(e) {
|
|
669
|
-
const t = nr(e);
|
|
670
|
-
return S(tr, t);
|
|
671
|
-
}), or = "div";
|
|
672
|
-
function ur(n) {
|
|
673
|
-
return Array.isArray(n) ? n.toString() : n;
|
|
674
|
-
}
|
|
675
|
-
function ie(n, e, t) {
|
|
569
|
+
preventScrollOnKeyDown: r,
|
|
570
|
+
...u,
|
|
571
|
+
shouldRegisterItem: M ? !1 : u.shouldRegisterItem
|
|
572
|
+
}), u = qe({
|
|
573
|
+
store: e,
|
|
574
|
+
...u,
|
|
575
|
+
focusOnHover(w) {
|
|
576
|
+
const A = () => typeof o == "function" ? o(w) : o ?? !0;
|
|
577
|
+
if (!e || !A()) return !1;
|
|
578
|
+
const { compositeElement: T, items: p } = e.getState();
|
|
579
|
+
return d ? (w.currentTarget.hasAttribute("aria-expanded") && w.currentTarget.focus({ preventScroll: !0 }), !0) : tr(T, p, w.currentTarget) ? (w.currentTarget.focus({ preventScroll: !0 }), !0) : !1;
|
|
580
|
+
},
|
|
581
|
+
blurOnHoverEnd(w) {
|
|
582
|
+
return typeof i == "function" ? i(w) : i ?? d;
|
|
583
|
+
}
|
|
584
|
+
}), u;
|
|
585
|
+
}), Ce = ee(k(function(e) {
|
|
586
|
+
const t = ge(e);
|
|
587
|
+
return v(er, t);
|
|
588
|
+
})), nr = "span", rr = y(function({ store: e, checked: t, ...r }) {
|
|
589
|
+
const o = te(Qe);
|
|
590
|
+
return t = t ?? o, r = Ze({
|
|
591
|
+
...r,
|
|
592
|
+
checked: t
|
|
593
|
+
}), r;
|
|
594
|
+
}), or = k(function(e) {
|
|
595
|
+
const t = rr(e);
|
|
596
|
+
return v(nr, t);
|
|
597
|
+
}), ur = "div";
|
|
598
|
+
function oe(n, e, t) {
|
|
676
599
|
if (e === void 0)
|
|
677
600
|
return Array.isArray(n) ? n : !!t;
|
|
678
|
-
const r =
|
|
601
|
+
const r = un(e);
|
|
679
602
|
return Array.isArray(n) ? t ? n.includes(r) ? n : [...n, r] : n.filter((o) => o !== r) : t ? r : n === r ? !1 : n;
|
|
680
603
|
}
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
604
|
+
const ir = y(function({ store: e, name: t, value: r, checked: o, defaultChecked: i, hideOnClick: u = !1, ...s }) {
|
|
605
|
+
const a = be();
|
|
606
|
+
e = e || a, D(e, process.env.NODE_ENV !== "production" && "MenuItemCheckbox must be wrapped in a MenuList or Menu component");
|
|
607
|
+
const b = De(i);
|
|
608
|
+
W(() => {
|
|
609
|
+
e == null || e.setValue(t, (c = r !== void 0 ? [] : !1) => b ? oe(c, r, !0) : c);
|
|
610
|
+
}, [
|
|
611
|
+
e,
|
|
612
|
+
t,
|
|
613
|
+
r,
|
|
614
|
+
b
|
|
615
|
+
]), W(() => {
|
|
616
|
+
o !== void 0 && (e == null || e.setValue(t, (c) => oe(c, r, o)));
|
|
617
|
+
}, [
|
|
618
|
+
e,
|
|
619
|
+
t,
|
|
620
|
+
r,
|
|
621
|
+
o
|
|
622
|
+
]);
|
|
623
|
+
const f = $n({
|
|
624
|
+
value: S(e, ["values"], (c) => c.values[t]),
|
|
625
|
+
setValue(c) {
|
|
626
|
+
e == null || e.setValue(t, () => {
|
|
627
|
+
if (o === void 0) return c;
|
|
628
|
+
const d = oe(c, r, o);
|
|
629
|
+
return !Array.isArray(d) || !Array.isArray(c) ? d : Bt(c, d) ? c : d;
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
return s = {
|
|
634
|
+
role: "menuitemcheckbox",
|
|
635
|
+
...s
|
|
636
|
+
}, s = on({
|
|
637
|
+
store: f,
|
|
684
638
|
name: t,
|
|
685
639
|
value: r,
|
|
686
640
|
checked: o,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
e == null || e.setValue(t, (a = []) => f ? ie(a, r, !0) : a);
|
|
699
|
-
}, [e, t, r, f]), j(() => {
|
|
700
|
-
o !== void 0 && (e == null || e.setValue(t, (a) => ie(a, r, o)));
|
|
701
|
-
}, [e, t, r, o]);
|
|
702
|
-
const d = Ln({
|
|
703
|
-
value: e.useState((a) => a.values[t]),
|
|
704
|
-
setValue(a) {
|
|
705
|
-
e == null || e.setValue(t, () => {
|
|
706
|
-
if (o === void 0) return a;
|
|
707
|
-
const g = ie(a, r, o);
|
|
708
|
-
return !Array.isArray(g) || !Array.isArray(a) ? g : Kt(a, g) ? a : g;
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
return i = {
|
|
713
|
-
role: "menuitemcheckbox",
|
|
714
|
-
...i
|
|
715
|
-
}, i = rn({
|
|
716
|
-
store: d,
|
|
717
|
-
name: t,
|
|
718
|
-
value: r,
|
|
719
|
-
checked: o,
|
|
720
|
-
...i
|
|
721
|
-
}), i = xe({ store: e, hideOnClick: c, ...i }), i;
|
|
722
|
-
}
|
|
723
|
-
), ir = re(
|
|
724
|
-
x(function(e) {
|
|
725
|
-
const t = ar(e);
|
|
726
|
-
return S(or, t);
|
|
727
|
-
})
|
|
728
|
-
), cr = "div";
|
|
729
|
-
function ce(n, e, t) {
|
|
641
|
+
...s
|
|
642
|
+
}), s = ge({
|
|
643
|
+
store: e,
|
|
644
|
+
hideOnClick: u,
|
|
645
|
+
...s
|
|
646
|
+
}), s;
|
|
647
|
+
}), ar = ee(k(function(e) {
|
|
648
|
+
const t = ir(e);
|
|
649
|
+
return v(ur, t);
|
|
650
|
+
})), cr = "div";
|
|
651
|
+
function ue(n, e, t) {
|
|
730
652
|
return t === void 0 ? n : t ? e : n === e ? !1 : n;
|
|
731
653
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
654
|
+
const sr = y(function({ store: e, name: t, value: r, checked: o, defaultChecked: i, onChange: u, hideOnClick: s = !1, ...a }) {
|
|
655
|
+
const b = be();
|
|
656
|
+
e = e || b, D(e, process.env.NODE_ENV !== "production" && "MenuItemRadio must be wrapped in a MenuList or Menu component");
|
|
657
|
+
const f = De(i);
|
|
658
|
+
W(() => {
|
|
659
|
+
e == null || e.setValue(t, (d = !1) => ue(d, r, f));
|
|
660
|
+
}, [
|
|
661
|
+
e,
|
|
662
|
+
t,
|
|
663
|
+
r,
|
|
664
|
+
f
|
|
665
|
+
]), W(() => {
|
|
666
|
+
o !== void 0 && (e == null || e.setValue(t, (d) => ue(d, r, o)));
|
|
667
|
+
}, [
|
|
668
|
+
e,
|
|
669
|
+
t,
|
|
670
|
+
r,
|
|
671
|
+
o
|
|
672
|
+
]);
|
|
673
|
+
const c = S(e, ["values"], (d) => d.values[t] === r);
|
|
674
|
+
return a = U(a, (d) => /* @__PURE__ */ m(Qe.Provider, {
|
|
675
|
+
value: c,
|
|
676
|
+
children: d
|
|
677
|
+
}), [c]), a = {
|
|
678
|
+
role: "menuitemradio",
|
|
679
|
+
...a
|
|
680
|
+
}, a = an({
|
|
735
681
|
name: t,
|
|
736
682
|
value: r,
|
|
737
|
-
checked:
|
|
738
|
-
onChange
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
value: r,
|
|
764
|
-
checked: d,
|
|
765
|
-
onChange(a) {
|
|
766
|
-
if (u == null || u(a), a.defaultPrevented) return;
|
|
767
|
-
const g = a.currentTarget;
|
|
768
|
-
e == null || e.setValue(t, (m) => ce(m, r, o ?? g.checked));
|
|
769
|
-
},
|
|
770
|
-
...i
|
|
771
|
-
}), i = xe({ store: e, hideOnClick: c, ...i }), i;
|
|
772
|
-
}
|
|
773
|
-
), lr = re(
|
|
774
|
-
x(function(e) {
|
|
775
|
-
const t = sr(e);
|
|
776
|
-
return S(cr, t);
|
|
777
|
-
})
|
|
778
|
-
);
|
|
779
|
-
function dr({
|
|
780
|
-
combobox: n,
|
|
781
|
-
parent: e,
|
|
782
|
-
menubar: t,
|
|
783
|
-
...r
|
|
784
|
-
} = {}) {
|
|
785
|
-
const o = !!t && !e, u = Mt(
|
|
786
|
-
r.store,
|
|
787
|
-
wt(e, ["values"]),
|
|
788
|
-
Ct(n, [
|
|
789
|
-
"arrowElement",
|
|
790
|
-
"anchorElement",
|
|
791
|
-
"contentElement",
|
|
792
|
-
"popoverElement",
|
|
793
|
-
"disclosureElement"
|
|
794
|
-
])
|
|
795
|
-
);
|
|
796
|
-
Te(r, u);
|
|
797
|
-
const c = u.getState(), i = un({
|
|
683
|
+
checked: c,
|
|
684
|
+
onChange(d) {
|
|
685
|
+
if (u == null || u(d), d.defaultPrevented) return;
|
|
686
|
+
const g = d.currentTarget;
|
|
687
|
+
e == null || e.setValue(t, (h) => ue(h, r, o ?? g.checked));
|
|
688
|
+
},
|
|
689
|
+
...a
|
|
690
|
+
}), a = ge({
|
|
691
|
+
store: e,
|
|
692
|
+
hideOnClick: s,
|
|
693
|
+
...a
|
|
694
|
+
}), a;
|
|
695
|
+
}), lr = ee(k(function(e) {
|
|
696
|
+
const t = sr(e);
|
|
697
|
+
return v(cr, t);
|
|
698
|
+
}));
|
|
699
|
+
function mr({ combobox: n, parent: e, menubar: t, ...r } = {}) {
|
|
700
|
+
const o = !!t && !e, i = Jt(r.store, Xt(e, ["values"]), Qt(n, [
|
|
701
|
+
"arrowElement",
|
|
702
|
+
"anchorElement",
|
|
703
|
+
"contentElement",
|
|
704
|
+
"popoverElement",
|
|
705
|
+
"disclosureElement"
|
|
706
|
+
]));
|
|
707
|
+
$e(r, i);
|
|
708
|
+
const u = i.getState(), s = vt({
|
|
798
709
|
...r,
|
|
799
|
-
store:
|
|
800
|
-
orientation:
|
|
801
|
-
|
|
802
|
-
c.orientation,
|
|
803
|
-
"vertical"
|
|
804
|
-
)
|
|
805
|
-
}), s = kt({
|
|
710
|
+
store: i,
|
|
711
|
+
orientation: O(r.orientation, u.orientation, "vertical")
|
|
712
|
+
}), a = xt({
|
|
806
713
|
...r,
|
|
807
|
-
store:
|
|
808
|
-
placement:
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
),
|
|
813
|
-
timeout: R(
|
|
814
|
-
r.timeout,
|
|
815
|
-
c.timeout,
|
|
816
|
-
o ? 0 : 150
|
|
817
|
-
),
|
|
818
|
-
hideTimeout: R(r.hideTimeout, c.hideTimeout, 0)
|
|
819
|
-
}), f = {
|
|
820
|
-
...i.getState(),
|
|
714
|
+
store: i,
|
|
715
|
+
placement: O(r.placement, u.placement, "bottom-start"),
|
|
716
|
+
timeout: O(r.timeout, u.timeout, o ? 0 : 150),
|
|
717
|
+
hideTimeout: O(r.hideTimeout, u.hideTimeout, 0)
|
|
718
|
+
}), b = {
|
|
821
719
|
...s.getState(),
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
d,
|
|
832
|
-
() => Ne(d, ["mounted"], (a) => {
|
|
833
|
-
a.mounted || d.setState("activeId", null);
|
|
834
|
-
})
|
|
835
|
-
), Pe(
|
|
836
|
-
d,
|
|
837
|
-
() => Ne(e, ["orientation"], (a) => {
|
|
838
|
-
d.setState(
|
|
839
|
-
"placement",
|
|
840
|
-
a.orientation === "vertical" ? "right-start" : "bottom-start"
|
|
841
|
-
);
|
|
842
|
-
})
|
|
843
|
-
), {
|
|
844
|
-
...i,
|
|
720
|
+
...a.getState(),
|
|
721
|
+
initialFocus: O(u.initialFocus, "container"),
|
|
722
|
+
values: O(r.values, u.values, r.defaultValues, {})
|
|
723
|
+
}, f = Oe(b, s, a, i);
|
|
724
|
+
return Se(f, () => ye(f, ["mounted"], (c) => {
|
|
725
|
+
c.mounted || f.setState("activeId", null);
|
|
726
|
+
})), Se(f, () => ye(e, ["orientation"], (c) => {
|
|
727
|
+
f.setState("placement", c.orientation === "vertical" ? "right-start" : "bottom-start");
|
|
728
|
+
})), {
|
|
845
729
|
...s,
|
|
846
|
-
...
|
|
730
|
+
...a,
|
|
731
|
+
...f,
|
|
847
732
|
combobox: n,
|
|
848
733
|
parent: e,
|
|
849
734
|
menubar: t,
|
|
850
735
|
hideAll: () => {
|
|
851
|
-
|
|
736
|
+
a.hide(), e == null || e.hideAll();
|
|
852
737
|
},
|
|
853
|
-
setInitialFocus: (
|
|
854
|
-
setValues: (
|
|
855
|
-
setValue: (
|
|
856
|
-
|
|
857
|
-
const h =
|
|
858
|
-
return
|
|
859
|
-
...
|
|
860
|
-
[
|
|
738
|
+
setInitialFocus: (c) => f.setState("initialFocus", c),
|
|
739
|
+
setValues: (c) => f.setState("values", c),
|
|
740
|
+
setValue: (c, d) => {
|
|
741
|
+
c !== "__proto__" && c !== "constructor" && (Array.isArray(c) || f.setState("values", (g) => {
|
|
742
|
+
const h = g[c], M = zt(d, h);
|
|
743
|
+
return M === h ? g : {
|
|
744
|
+
...g,
|
|
745
|
+
[c]: M !== void 0 && M
|
|
861
746
|
};
|
|
862
747
|
}));
|
|
863
748
|
}
|
|
864
749
|
};
|
|
865
750
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}
|
|
878
|
-
);
|
|
751
|
+
function dr(n, e, t) {
|
|
752
|
+
return Pe(e, [
|
|
753
|
+
t.combobox,
|
|
754
|
+
t.parent,
|
|
755
|
+
t.menubar,
|
|
756
|
+
e
|
|
757
|
+
]), Fe(n, t, "values", "setValues"), Object.assign(St(en(n, e, t), e, t), {
|
|
758
|
+
combobox: t.combobox,
|
|
759
|
+
parent: t.parent,
|
|
760
|
+
menubar: t.menubar
|
|
761
|
+
});
|
|
879
762
|
}
|
|
880
|
-
function
|
|
881
|
-
const e =
|
|
763
|
+
function Me(n = {}) {
|
|
764
|
+
const e = ne(), t = bn(), r = Yt();
|
|
882
765
|
n = {
|
|
883
766
|
...n,
|
|
884
767
|
parent: n.parent !== void 0 ? n.parent : e,
|
|
885
768
|
menubar: n.menubar !== void 0 ? n.menubar : t,
|
|
886
769
|
combobox: n.combobox !== void 0 ? n.combobox : r
|
|
887
770
|
};
|
|
888
|
-
const [o,
|
|
889
|
-
return
|
|
771
|
+
const [o, i] = Ge(mr, n);
|
|
772
|
+
return dr(o, i, n);
|
|
890
773
|
}
|
|
891
774
|
function fr(n = {}) {
|
|
892
|
-
const e =
|
|
893
|
-
return /* @__PURE__ */
|
|
775
|
+
const e = Me(n);
|
|
776
|
+
return /* @__PURE__ */ m(Je, {
|
|
777
|
+
value: e,
|
|
778
|
+
children: n.children
|
|
779
|
+
});
|
|
894
780
|
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
),
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
root:
|
|
781
|
+
const hr = "hr", br = y(function({ store: e, ...t }) {
|
|
782
|
+
const r = ne();
|
|
783
|
+
return e = e || r, t = Ve({
|
|
784
|
+
store: e,
|
|
785
|
+
...t
|
|
786
|
+
}), t;
|
|
787
|
+
}), gr = k(function(e) {
|
|
788
|
+
const t = br(e);
|
|
789
|
+
return v(hr, t);
|
|
790
|
+
}), Cr = "_root_1u58t_2", Mr = "_arrow_1u58t_29", wr = "_stroke_1u58t_1", xr = "_item_1u58t_55", Sr = "_action_1u58t_94", yr = "_search_1u58t_103", kr = "_separator_1u58t_146", H = {
|
|
791
|
+
root: Cr,
|
|
906
792
|
arrow: Mr,
|
|
907
|
-
stroke:
|
|
793
|
+
stroke: wr,
|
|
908
794
|
"arrow-item": "_arrow-item_1u58t_38",
|
|
909
795
|
"arrow-placement-bottom": "_arrow-placement-bottom_1u58t_43",
|
|
910
796
|
"arrow-placement-left": "_arrow-placement-left_1u58t_46",
|
|
911
797
|
"arrow-placement-right": "_arrow-placement-right_1u58t_49",
|
|
912
798
|
"arrow-placement-top": "_arrow-placement-top_1u58t_52",
|
|
913
|
-
item:
|
|
914
|
-
action:
|
|
799
|
+
item: xr,
|
|
800
|
+
action: Sr,
|
|
915
801
|
"group-label": "_group-label_1u58t_98",
|
|
916
|
-
search:
|
|
802
|
+
search: yr,
|
|
917
803
|
"item-content": "_item-content_1u58t_106",
|
|
918
804
|
"item-description": "_item-description_1u58t_111",
|
|
919
805
|
"item-default-check": "_item-default-check_1u58t_122",
|
|
920
806
|
"item-toggle-check": "_item-toggle-check_1u58t_127",
|
|
921
807
|
"item-checkbox": "_item-checkbox_1u58t_130",
|
|
922
808
|
"item-radio": "_item-radio_1u58t_131",
|
|
923
|
-
separator:
|
|
809
|
+
separator: kr,
|
|
924
810
|
"size-md": "_size-md_1u58t_155",
|
|
925
811
|
"size-lg": "_size-lg_1u58t_162"
|
|
926
|
-
},
|
|
927
|
-
({ as: n = "button", className: e, ...t }, r) => /* @__PURE__ */
|
|
928
|
-
|
|
812
|
+
}, vr = F(H), tt = j(
|
|
813
|
+
({ as: n = "button", className: e, ...t }, r) => /* @__PURE__ */ m(
|
|
814
|
+
Ce,
|
|
929
815
|
{
|
|
930
816
|
...t,
|
|
931
|
-
render: /* @__PURE__ */
|
|
817
|
+
render: /* @__PURE__ */ m(n, { className: vr("item", "action", e), ref: r })
|
|
932
818
|
}
|
|
933
819
|
)
|
|
934
820
|
);
|
|
935
|
-
|
|
936
|
-
const
|
|
821
|
+
tt.displayName = "DropdownMenu.Action";
|
|
822
|
+
const _e = F(H), nt = N(
|
|
937
823
|
({ className: n, store: e, ...t }, r) => {
|
|
938
|
-
const o =
|
|
939
|
-
return /* @__PURE__ */
|
|
940
|
-
|
|
824
|
+
const o = ne(), i = e ?? o, u = S(i, "currentPlacement"), [s] = u.split("-");
|
|
825
|
+
return /* @__PURE__ */ m(
|
|
826
|
+
Wn,
|
|
941
827
|
{
|
|
942
828
|
...t,
|
|
943
829
|
ref: r,
|
|
944
|
-
render: /* @__PURE__ */
|
|
830
|
+
render: /* @__PURE__ */ m("div", { className: _e("arrow", n), children: /* @__PURE__ */ G(
|
|
945
831
|
"svg",
|
|
946
832
|
{
|
|
947
|
-
className:
|
|
833
|
+
className: _e("arrow-item", s && `arrow-placement-${s}`),
|
|
948
834
|
viewBox: "0 0 30 30",
|
|
949
835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
950
836
|
children: [
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ m("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }),
|
|
838
|
+
/* @__PURE__ */ m("path", { d: "M8 30L15 23L22 30H8Z", fill: "currentColor", fillRule: "nonzero" })
|
|
953
839
|
]
|
|
954
840
|
}
|
|
955
841
|
) }),
|
|
956
842
|
size: 32,
|
|
957
|
-
store:
|
|
843
|
+
store: i
|
|
958
844
|
}
|
|
959
845
|
);
|
|
960
846
|
}
|
|
961
847
|
);
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
({ as: n = "div", ...e }, t) => /* @__PURE__ */
|
|
848
|
+
nt.displayName = "DropdownMenu.Arrow";
|
|
849
|
+
const _r = F(H), rt = j(
|
|
850
|
+
({ as: n = "div", ...e }, t) => /* @__PURE__ */ m(Jn, { ref: t, render: /* @__PURE__ */ m(n, {}), ...e })
|
|
965
851
|
);
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
({ as: n = "div", className: e, ...t }, r) => /* @__PURE__ */
|
|
969
|
-
|
|
852
|
+
rt.displayName = "DropdownMenu.Group";
|
|
853
|
+
const ot = j(
|
|
854
|
+
({ as: n = "div", className: e, ...t }, r) => /* @__PURE__ */ m(
|
|
855
|
+
Yn,
|
|
970
856
|
{
|
|
971
857
|
...t,
|
|
972
858
|
ref: r,
|
|
973
|
-
render: /* @__PURE__ */
|
|
859
|
+
render: /* @__PURE__ */ m(n, { className: _r("item", "group-label", e) })
|
|
974
860
|
}
|
|
975
861
|
)
|
|
976
862
|
);
|
|
977
|
-
|
|
978
|
-
const
|
|
979
|
-
({ as: n = "button", children: e, className: t, name: r, onClick: o, value:
|
|
980
|
-
|
|
863
|
+
ot.displayName = "DropdownMenu.GroupLabel";
|
|
864
|
+
const R = F(H), we = j(
|
|
865
|
+
({ as: n = "button", children: e, className: t, name: r, onClick: o, value: i, variant: u, ...s }, a) => /* @__PURE__ */ m(
|
|
866
|
+
Ce,
|
|
981
867
|
{
|
|
982
|
-
hideOnClick: !
|
|
983
|
-
...
|
|
984
|
-
onClick: (
|
|
985
|
-
|
|
868
|
+
hideOnClick: !u || u === "radio" || u === "radio-mark",
|
|
869
|
+
...s,
|
|
870
|
+
onClick: (c) => {
|
|
871
|
+
c.stopPropagation(), o == null || o(c);
|
|
986
872
|
},
|
|
987
|
-
ref:
|
|
988
|
-
render: /* @__PURE__ */
|
|
989
|
-
switch (
|
|
873
|
+
ref: a,
|
|
874
|
+
render: /* @__PURE__ */ m(n, { className: R("item", t), children: (() => {
|
|
875
|
+
switch (u) {
|
|
990
876
|
case "checkbox":
|
|
991
|
-
return /* @__PURE__ */ G(
|
|
992
|
-
/* @__PURE__ */
|
|
877
|
+
return /* @__PURE__ */ G(X, { name: r, value: i, children: [
|
|
878
|
+
/* @__PURE__ */ m(at, { name: r, value: i }),
|
|
993
879
|
e
|
|
994
880
|
] });
|
|
995
881
|
case "checkbox-mark":
|
|
996
|
-
return /* @__PURE__ */ G(
|
|
882
|
+
return /* @__PURE__ */ G(X, { name: r, value: i, children: [
|
|
997
883
|
e,
|
|
998
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ m(se, {})
|
|
999
885
|
] });
|
|
1000
886
|
case "radio":
|
|
1001
|
-
return /* @__PURE__ */ G(
|
|
1002
|
-
/* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ G(ce, { name: r, value: i, children: [
|
|
888
|
+
/* @__PURE__ */ m(ct, { name: r, value: i }),
|
|
1003
889
|
e
|
|
1004
890
|
] });
|
|
1005
891
|
case "radio-mark":
|
|
1006
|
-
return /* @__PURE__ */ G(
|
|
892
|
+
return /* @__PURE__ */ G(ce, { name: r, value: i, children: [
|
|
1007
893
|
e,
|
|
1008
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ m(se, {})
|
|
1009
895
|
] });
|
|
1010
896
|
case "toggle":
|
|
1011
|
-
return /* @__PURE__ */ G(
|
|
1012
|
-
/* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ G(X, { name: r, value: i, children: [
|
|
898
|
+
/* @__PURE__ */ m(st, { name: r, value: i }),
|
|
1013
899
|
e
|
|
1014
900
|
] });
|
|
1015
901
|
default:
|
|
@@ -1019,30 +905,30 @@ const z = H(V), pe = U(
|
|
|
1019
905
|
}
|
|
1020
906
|
)
|
|
1021
907
|
);
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
({ className: n, ...e }, t) => /* @__PURE__ */
|
|
908
|
+
we.displayName = "DropdownMenu.Item";
|
|
909
|
+
const ut = N(
|
|
910
|
+
({ className: n, ...e }, t) => /* @__PURE__ */ m("div", { ...e, className: R("item-content", n), ref: t })
|
|
1025
911
|
);
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
({ className: n, ...e }, t) => /* @__PURE__ */
|
|
912
|
+
ut.displayName = "DropdownMenu.ItemContent";
|
|
913
|
+
const it = N(
|
|
914
|
+
({ className: n, ...e }, t) => /* @__PURE__ */ m("div", { ...e, className: R("item-description", n), ref: t })
|
|
1029
915
|
);
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
({ className: n, ...e }, t) => /* @__PURE__ */
|
|
916
|
+
it.displayName = "DropdownMenu.ItemDescription";
|
|
917
|
+
const X = N(
|
|
918
|
+
({ className: n, ...e }, t) => /* @__PURE__ */ m(ar, { ...e, className: R("item-checkbox", n), ref: t })
|
|
1033
919
|
);
|
|
1034
|
-
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1038
|
-
({ className: n, ...e }, t) => /* @__PURE__ */
|
|
920
|
+
X.displayName = "DropdownMenu.ItemCheckbox";
|
|
921
|
+
const ce = N(({ className: n, ...e }, t) => /* @__PURE__ */ m(lr, { ...e, className: R("item-radio", n), ref: t }));
|
|
922
|
+
ce.displayName = "DropdownMenu.ItemRadio";
|
|
923
|
+
const se = N(
|
|
924
|
+
({ className: n, ...e }, t) => /* @__PURE__ */ m(or, { ...e, className: R("item-default-check", n), ref: t, children: /* @__PURE__ */ m(He, { name: "check", size: "md" }) })
|
|
1039
925
|
);
|
|
1040
|
-
|
|
1041
|
-
const
|
|
926
|
+
se.displayName = "DropdownMenu.ItemDefaultCheck";
|
|
927
|
+
const at = N(
|
|
1042
928
|
({ name: n, value: e = !0, ...t }, r) => {
|
|
1043
|
-
const o =
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
|
|
929
|
+
const o = xe(n, e);
|
|
930
|
+
return /* @__PURE__ */ Ut(
|
|
931
|
+
cn,
|
|
1046
932
|
{
|
|
1047
933
|
"aria-hidden": "true",
|
|
1048
934
|
...t,
|
|
@@ -1053,108 +939,108 @@ const dt = P(
|
|
|
1053
939
|
);
|
|
1054
940
|
}
|
|
1055
941
|
);
|
|
1056
|
-
|
|
1057
|
-
const
|
|
942
|
+
at.displayName = "DropdownMenu.ItemCheckboxCheck";
|
|
943
|
+
const ct = N(
|
|
1058
944
|
({ name: n, value: e, ...t }, r) => {
|
|
1059
|
-
const o =
|
|
1060
|
-
return /* @__PURE__ */
|
|
945
|
+
const o = xe(n, e);
|
|
946
|
+
return /* @__PURE__ */ m(sn, { "aria-hidden": "true", ...t, checked: o, ref: r });
|
|
1061
947
|
}
|
|
1062
948
|
);
|
|
1063
|
-
|
|
1064
|
-
const
|
|
949
|
+
ct.displayName = "DropdownMenu.ItemRadioCheck";
|
|
950
|
+
const st = N(
|
|
1065
951
|
({ className: n, name: e, value: t = !0, ...r }, o) => {
|
|
1066
|
-
const
|
|
1067
|
-
return /* @__PURE__ */
|
|
1068
|
-
|
|
952
|
+
const i = xe(e, t);
|
|
953
|
+
return /* @__PURE__ */ m(
|
|
954
|
+
ln,
|
|
1069
955
|
{
|
|
1070
956
|
"aria-hidden": "true",
|
|
1071
957
|
...r,
|
|
1072
|
-
checked:
|
|
1073
|
-
className:
|
|
958
|
+
checked: i,
|
|
959
|
+
className: R("item-toggle-check", n),
|
|
1074
960
|
ref: o,
|
|
1075
961
|
size: "sm"
|
|
1076
962
|
}
|
|
1077
963
|
);
|
|
1078
964
|
}
|
|
1079
965
|
);
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
const t =
|
|
966
|
+
st.displayName = "DropdownMenu.ItemToggleCheck";
|
|
967
|
+
const xe = (n, e) => {
|
|
968
|
+
const t = Me(), o = S(t).values[n];
|
|
1083
969
|
return Array.isArray(o) ? o.includes(e) : o === e;
|
|
1084
|
-
},
|
|
1085
|
-
({ as: n = mn, className: e, ...t }, r) => /* @__PURE__ */
|
|
1086
|
-
|
|
970
|
+
}, Er = F(H), lt = j(
|
|
971
|
+
({ as: n = mn, className: e, ...t }, r) => /* @__PURE__ */ m(
|
|
972
|
+
Ce,
|
|
1087
973
|
{
|
|
1088
974
|
...t,
|
|
1089
975
|
hideOnClick: !1,
|
|
1090
976
|
ref: r,
|
|
1091
|
-
render: /* @__PURE__ */
|
|
977
|
+
render: /* @__PURE__ */ m(n, { className: Er("item", "search", e), icon: /* @__PURE__ */ m(He, { name: "search" }) })
|
|
1092
978
|
}
|
|
1093
979
|
)
|
|
1094
980
|
);
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
({ className: n, ...e }, t) => /* @__PURE__ */
|
|
981
|
+
lt.displayName = "DropdownMenu.Search";
|
|
982
|
+
const Nr = F(H), mt = N(
|
|
983
|
+
({ className: n, ...e }, t) => /* @__PURE__ */ m(gr, { ...e, ref: t, render: /* @__PURE__ */ m("hr", { className: Nr("separator", n) }) })
|
|
1098
984
|
);
|
|
1099
|
-
|
|
1100
|
-
const
|
|
1101
|
-
({ as: n, onClick: e, store: t, ...r }, o) => /* @__PURE__ */
|
|
1102
|
-
|
|
985
|
+
mt.displayName = "DropdownMenu.Separator";
|
|
986
|
+
const dt = j(
|
|
987
|
+
({ as: n, onClick: e, store: t, ...r }, o) => /* @__PURE__ */ m(
|
|
988
|
+
et,
|
|
1103
989
|
{
|
|
1104
|
-
onClick: (
|
|
1105
|
-
|
|
990
|
+
onClick: (u) => {
|
|
991
|
+
u.preventDefault(), e == null || e(u), t.toggle();
|
|
1106
992
|
},
|
|
1107
993
|
ref: o,
|
|
1108
|
-
render: n ? (
|
|
994
|
+
render: n ? (u) => /* @__PURE__ */ m(n, { ...u }) : void 0,
|
|
1109
995
|
store: t,
|
|
1110
996
|
...r
|
|
1111
997
|
}
|
|
1112
998
|
)
|
|
1113
999
|
);
|
|
1114
|
-
|
|
1115
|
-
const
|
|
1000
|
+
dt.displayName = "DropdownMenu.Trigger";
|
|
1001
|
+
const ft = N(
|
|
1116
1002
|
({ children: n, item: e, size: t = "lg", ...r }, o) => {
|
|
1117
|
-
const
|
|
1118
|
-
return /* @__PURE__ */ G(fr, { store:
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1003
|
+
const i = Me();
|
|
1004
|
+
return /* @__PURE__ */ G(fr, { store: i, children: [
|
|
1005
|
+
/* @__PURE__ */ m(et, { ...r, ref: o, render: /* @__PURE__ */ m(we, { children: e }) }),
|
|
1006
|
+
/* @__PURE__ */ m(Pr, { size: t, withGutter: !0, children: n })
|
|
1121
1007
|
] });
|
|
1122
1008
|
}
|
|
1123
1009
|
);
|
|
1124
|
-
|
|
1125
|
-
const
|
|
1126
|
-
({ className: n, size: e = "lg", store: t, withGutter: r = !0, ...o },
|
|
1127
|
-
const
|
|
1128
|
-
return /* @__PURE__ */
|
|
1129
|
-
|
|
1010
|
+
ft.displayName = "DropdownMenu.Submenu";
|
|
1011
|
+
const Tr = F(H), Ir = 8, Ar = N(
|
|
1012
|
+
({ className: n, size: e = "lg", store: t, withGutter: r = !0, ...o }, i) => {
|
|
1013
|
+
const u = S(t, "arrowElement");
|
|
1014
|
+
return /* @__PURE__ */ m(
|
|
1015
|
+
Vn,
|
|
1130
1016
|
{
|
|
1131
1017
|
...o,
|
|
1132
1018
|
"aria-label": "dropdown-menu",
|
|
1133
1019
|
className: n,
|
|
1134
|
-
gutter: r && !
|
|
1135
|
-
ref:
|
|
1136
|
-
render: /* @__PURE__ */
|
|
1020
|
+
gutter: r && !u ? Ir : 0,
|
|
1021
|
+
ref: i,
|
|
1022
|
+
render: /* @__PURE__ */ m("div", { className: Tr("root", `size-${e}`, n) }),
|
|
1137
1023
|
store: t,
|
|
1138
1024
|
tabIndex: 0
|
|
1139
1025
|
}
|
|
1140
1026
|
);
|
|
1141
1027
|
}
|
|
1142
|
-
),
|
|
1143
|
-
Action:
|
|
1144
|
-
Arrow:
|
|
1145
|
-
Content:
|
|
1146
|
-
Description:
|
|
1147
|
-
Group:
|
|
1148
|
-
GroupLabel:
|
|
1149
|
-
Item:
|
|
1150
|
-
Search:
|
|
1151
|
-
Separator:
|
|
1152
|
-
Submenu:
|
|
1153
|
-
Trigger:
|
|
1028
|
+
), Pr = Object.assign(Ar, {
|
|
1029
|
+
Action: tt,
|
|
1030
|
+
Arrow: nt,
|
|
1031
|
+
Content: ut,
|
|
1032
|
+
Description: it,
|
|
1033
|
+
Group: rt,
|
|
1034
|
+
GroupLabel: ot,
|
|
1035
|
+
Item: we,
|
|
1036
|
+
Search: lt,
|
|
1037
|
+
Separator: mt,
|
|
1038
|
+
Submenu: ft,
|
|
1039
|
+
Trigger: dt
|
|
1154
1040
|
});
|
|
1155
1041
|
export {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1042
|
+
Pr as DropdownMenu,
|
|
1043
|
+
H as dropdownMenuClasses,
|
|
1044
|
+
Me as useDropdownMenu,
|
|
1045
|
+
S as useStoreState
|
|
1160
1046
|
};
|