mimir-ui-kit 1.64.4 → 1.65.0
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/assets/Drawer.css +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -4
- package/dist/components/DatePicker/DatePicker.js +195 -194
- package/dist/components/Drawer/Drawer.js +79 -78
- package/dist/components/Drawer/constants.d.ts +2 -1
- package/dist/components/Drawer/constants.js +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +11 -2
- package/dist/components/Dropdown/Dropdown.js +374 -358
- package/dist/components/Dropdown/hooks.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as re, jsxs as De, Fragment as nt } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import E, { createContext as
|
|
4
|
-
import { u as lt, c as
|
|
2
|
+
import { c as fe } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import E, { createContext as ie, useState as J, useContext as te, useRef as _, useEffect as ue, useMemo as q, Fragment as ve, useReducer as rt, createRef as Fe, useId as be, memo as ot, useCallback as ce } from "react";
|
|
4
|
+
import { u as lt, c as U } from "../../hooks-HgN6Yauq.js";
|
|
5
5
|
import { Button as at } from "../Button/Button.js";
|
|
6
|
-
import { o as
|
|
6
|
+
import { o as T, u as He, M as me, W as Y, y as ee, O as le, n as de, m as ut, t as it, H as se, s as ke, p as st, a as V, T as ct, $ as dt, b as pt, D as Be, I as ft, c as oe } from "../../keyboard-wis2TUql.js";
|
|
7
7
|
import { w as vt } from "../../use-active-press-CnDeVvQq.js";
|
|
8
|
-
import { n as $e, s as mt, l as Ge, e as bt, E as ht, R as Pt, v as $t, y as yt, x as Et, a as
|
|
9
|
-
import { e as
|
|
8
|
+
import { n as $e, s as mt, l as Ge, e as bt, E as ht, R as Pt, v as $t, y as yt, x as Et, a as St, b as gt, m as Tt, f as wt, d as It, t as Ft } from "../../portal-BnEqSZwo.js";
|
|
9
|
+
import { e as kt } from "../../use-resolve-button-type-DhFdPxnv.js";
|
|
10
10
|
import { T as he, s as Pe } from "../../hidden-CkTYbiNM.js";
|
|
11
|
-
import { R as
|
|
12
|
-
import { C as
|
|
11
|
+
import { R as Re, H as xe, i as W, c as Ke, u as ye, s as Bt } from "../../open-closed-CJijMeI2.js";
|
|
12
|
+
import { C as Mt } from "../../close-provider-CEutdhG8.js";
|
|
13
13
|
import { r as Ue } from "../../bugs-diTMAGNw.js";
|
|
14
|
-
import { b as
|
|
15
|
-
import { f as
|
|
16
|
-
function xt({ defaultContainers: e = [], portals: t, mainTreeNode:
|
|
17
|
-
let
|
|
18
|
-
var h
|
|
19
|
-
let
|
|
20
|
-
for (let r of e) r !== null && (r instanceof HTMLElement ?
|
|
21
|
-
if (t != null && t.current) for (let r of t.current)
|
|
22
|
-
for (let r of (
|
|
23
|
-
return
|
|
14
|
+
import { b as Oe, P as ae, F as z, A as Ct, h as Nt, T as Me } from "../../focus-management-BAl0GmRk.js";
|
|
15
|
+
import { f as Rt } from "../../use-is-mounted-MBU4fiLr.js";
|
|
16
|
+
function xt({ defaultContainers: e = [], portals: t, mainTreeNode: l } = {}) {
|
|
17
|
+
let d = $e(l), v = T(() => {
|
|
18
|
+
var $, h;
|
|
19
|
+
let a = [];
|
|
20
|
+
for (let r of e) r !== null && (r instanceof HTMLElement ? a.push(r) : "current" in r && r.current instanceof HTMLElement && a.push(r.current));
|
|
21
|
+
if (t != null && t.current) for (let r of t.current) a.push(r);
|
|
22
|
+
for (let r of ($ = d == null ? void 0 : d.querySelectorAll("html > *, body > *")) != null ? $ : []) r !== document.body && r !== document.head && r instanceof HTMLElement && r.id !== "headlessui-portal-root" && (l && (r.contains(l) || r.contains((h = l == null ? void 0 : l.getRootNode()) == null ? void 0 : h.host)) || a.some((y) => r.contains(y)) || a.push(r));
|
|
23
|
+
return a;
|
|
24
24
|
});
|
|
25
|
-
return { resolveContainers:
|
|
25
|
+
return { resolveContainers: v, contains: T(($) => v().some((h) => h.contains($))) };
|
|
26
26
|
}
|
|
27
|
-
let je =
|
|
27
|
+
let je = ie(null);
|
|
28
28
|
function Xe({ children: e, node: t }) {
|
|
29
|
-
let [
|
|
30
|
-
return E.createElement(je.Provider, { value:
|
|
31
|
-
var
|
|
32
|
-
if (
|
|
33
|
-
for (let r of (
|
|
34
|
-
|
|
29
|
+
let [l, d] = J(null), v = We(t ?? l);
|
|
30
|
+
return E.createElement(je.Provider, { value: v }, e, v === null && E.createElement(he, { features: Pe.Hidden, ref: ($) => {
|
|
31
|
+
var h, a;
|
|
32
|
+
if ($) {
|
|
33
|
+
for (let r of (a = (h = He($)) == null ? void 0 : h.querySelectorAll("html > *, body > *")) != null ? a : []) if (r !== document.body && r !== document.head && r instanceof HTMLElement && r != null && r.contains($)) {
|
|
34
|
+
d(r);
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -43,127 +43,127 @@ function We(e = null) {
|
|
|
43
43
|
}
|
|
44
44
|
var Q = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Q || {});
|
|
45
45
|
function Ze() {
|
|
46
|
-
let e =
|
|
46
|
+
let e = _(0);
|
|
47
47
|
return mt(!0, "keydown", (t) => {
|
|
48
48
|
t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
|
|
49
49
|
}, !0), e;
|
|
50
50
|
}
|
|
51
51
|
function qe(e) {
|
|
52
52
|
var t;
|
|
53
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Qe) !==
|
|
53
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Qe) !== ve || E.Children.count(e.children) === 1;
|
|
54
54
|
}
|
|
55
|
-
let Ee =
|
|
55
|
+
let Ee = ie(null);
|
|
56
56
|
Ee.displayName = "TransitionContext";
|
|
57
|
-
var
|
|
57
|
+
var Ot = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Ot || {});
|
|
58
58
|
function Lt() {
|
|
59
59
|
let e = te(Ee);
|
|
60
60
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
61
61
|
return e;
|
|
62
62
|
}
|
|
63
63
|
function _t() {
|
|
64
|
-
let e = te(
|
|
64
|
+
let e = te(Se);
|
|
65
65
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
66
66
|
return e;
|
|
67
67
|
}
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return "children" in e ?
|
|
68
|
+
let Se = ie(null);
|
|
69
|
+
Se.displayName = "NestingContext";
|
|
70
|
+
function ge(e) {
|
|
71
|
+
return "children" in e ? ge(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
|
72
72
|
}
|
|
73
73
|
function Je(e, t) {
|
|
74
|
-
let
|
|
75
|
-
let s =
|
|
76
|
-
s !== -1 && (V(
|
|
77
|
-
|
|
74
|
+
let l = ke(e), d = _([]), v = Rt(), $ = st(), h = T((c, o = le.Hidden) => {
|
|
75
|
+
let s = d.current.findIndex(({ el: u }) => u === c);
|
|
76
|
+
s !== -1 && (V(o, { [le.Unmount]() {
|
|
77
|
+
d.current.splice(s, 1);
|
|
78
78
|
}, [le.Hidden]() {
|
|
79
|
-
|
|
80
|
-
} }),
|
|
79
|
+
d.current[s].state = "hidden";
|
|
80
|
+
} }), $.microTask(() => {
|
|
81
81
|
var u;
|
|
82
|
-
!
|
|
82
|
+
!ge(d) && v.current && ((u = l.current) == null || u.call(l));
|
|
83
83
|
}));
|
|
84
|
-
}),
|
|
85
|
-
let
|
|
86
|
-
return
|
|
87
|
-
}), r =
|
|
88
|
-
r.current.splice(0), t && (t.chains.current[
|
|
84
|
+
}), a = T((c) => {
|
|
85
|
+
let o = d.current.find(({ el: s }) => s === c);
|
|
86
|
+
return o ? o.state !== "visible" && (o.state = "visible") : d.current.push({ el: c, state: "visible" }), () => h(c, le.Unmount);
|
|
87
|
+
}), r = _([]), y = _(Promise.resolve()), n = _({ enter: [], leave: [] }), m = T((c, o, s) => {
|
|
88
|
+
r.current.splice(0), t && (t.chains.current[o] = t.chains.current[o].filter(([u]) => u !== c)), t == null || t.chains.current[o].push([c, new Promise((u) => {
|
|
89
89
|
r.current.push(u);
|
|
90
|
-
})]), t == null || t.chains.current[
|
|
91
|
-
Promise.all(n.current[
|
|
92
|
-
})]),
|
|
93
|
-
}),
|
|
94
|
-
Promise.all(n.current[
|
|
90
|
+
})]), t == null || t.chains.current[o].push([c, new Promise((u) => {
|
|
91
|
+
Promise.all(n.current[o].map(([p, g]) => g)).then(() => u());
|
|
92
|
+
})]), o === "enter" ? y.current = y.current.then(() => t == null ? void 0 : t.wait.current).then(() => s(o)) : s(o);
|
|
93
|
+
}), P = T((c, o, s) => {
|
|
94
|
+
Promise.all(n.current[o].splice(0).map(([u, p]) => p)).then(() => {
|
|
95
95
|
var u;
|
|
96
96
|
(u = r.current.shift()) == null || u();
|
|
97
|
-
}).then(() => s(
|
|
97
|
+
}).then(() => s(o));
|
|
98
98
|
});
|
|
99
|
-
return
|
|
99
|
+
return q(() => ({ children: d, register: a, unregister: h, onStart: m, onStop: P, wait: y, chains: n }), [a, h, d, m, P, n, y]);
|
|
100
100
|
}
|
|
101
|
-
let Qe =
|
|
101
|
+
let Qe = ve, Ve = me.RenderStrategy;
|
|
102
102
|
function At(e, t) {
|
|
103
|
-
var
|
|
104
|
-
let { transition:
|
|
105
|
-
|
|
106
|
-
if (
|
|
107
|
-
if (
|
|
103
|
+
var l, d;
|
|
104
|
+
let { transition: v = !0, beforeEnter: $, afterEnter: h, beforeLeave: a, afterLeave: r, enter: y, enterFrom: n, enterTo: m, entered: P, leave: c, leaveFrom: o, leaveTo: s, ...u } = e, [p, g] = J(null), S = _(null), B = qe(e), A = ee(...B ? [S, t, g] : t === null ? [] : [t]), D = (l = u.unmount) == null || l ? le.Unmount : le.Hidden, { show: k, appear: C, initial: Z } = Lt(), [M, N] = J(k ? "visible" : "hidden"), G = _t(), { register: R, unregister: x } = G;
|
|
105
|
+
de(() => R(S), [R, S]), de(() => {
|
|
106
|
+
if (D === le.Hidden && S.current) {
|
|
107
|
+
if (k && M !== "visible") {
|
|
108
108
|
N("visible");
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
return V(
|
|
111
|
+
return V(M, { hidden: () => x(S), visible: () => R(S) });
|
|
112
112
|
}
|
|
113
|
-
}, [
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
}, [
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
let ne =
|
|
123
|
-
i.onStart(
|
|
124
|
-
|
|
113
|
+
}, [M, S, R, x, k, D]);
|
|
114
|
+
let K = Ge();
|
|
115
|
+
de(() => {
|
|
116
|
+
if (B && K && M === "visible" && S.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
117
|
+
}, [S, M, K, B]);
|
|
118
|
+
let O = Z && !C, L = C && k && Z, b = _(!1), i = Je(() => {
|
|
119
|
+
b.current || (N("hidden"), x(S));
|
|
120
|
+
}, G), f = T((X) => {
|
|
121
|
+
b.current = !0;
|
|
122
|
+
let ne = X ? "enter" : "leave";
|
|
123
|
+
i.onStart(S, ne, (pe) => {
|
|
124
|
+
pe === "enter" ? $ == null || $() : pe === "leave" && (a == null || a());
|
|
125
125
|
});
|
|
126
|
-
}),
|
|
127
|
-
let ne =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}), ne === "leave" && !
|
|
126
|
+
}), w = T((X) => {
|
|
127
|
+
let ne = X ? "enter" : "leave";
|
|
128
|
+
b.current = !1, i.onStop(S, ne, (pe) => {
|
|
129
|
+
pe === "enter" ? h == null || h() : pe === "leave" && (r == null || r());
|
|
130
|
+
}), ne === "leave" && !ge(i) && (N("hidden"), x(S));
|
|
131
131
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
let
|
|
136
|
-
return
|
|
132
|
+
ue(() => {
|
|
133
|
+
B && v || (f(k), w(k));
|
|
134
|
+
}, [k, B, v]);
|
|
135
|
+
let I = !(!v || !B || !K || O), [, F] = Re(I, p, k, { start: f, end: w }), H = ut({ ref: A, className: ((d = it(u.className, L && y, L && n, F.enter && y, F.enter && F.closed && n, F.enter && !F.closed && m, F.leave && c, F.leave && !F.closed && o, F.leave && F.closed && s, !F.transition && k && P)) == null ? void 0 : d.trim()) || void 0, ...xe(F) }), j = 0;
|
|
136
|
+
return M === "visible" && (j |= W.Open), M === "hidden" && (j |= W.Closed), F.enter && (j |= W.Opening), F.leave && (j |= W.Closing), E.createElement(Se.Provider, { value: i }, E.createElement(Ke, { value: j }, se({ ourProps: H, theirProps: u, defaultTag: Qe, features: Ve, visible: M === "visible", name: "Transition.Child" })));
|
|
137
137
|
}
|
|
138
138
|
function Dt(e, t) {
|
|
139
|
-
let { show:
|
|
139
|
+
let { show: l, appear: d = !1, unmount: v = !0, ...$ } = e, h = _(null), a = qe(e), r = ee(...a ? [h, t] : t === null ? [] : [t]);
|
|
140
140
|
Ge();
|
|
141
|
-
let
|
|
142
|
-
if (
|
|
143
|
-
let [n,
|
|
144
|
-
|
|
145
|
-
}), [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}, [s,
|
|
149
|
-
let u =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, [
|
|
153
|
-
let
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
}),
|
|
157
|
-
var
|
|
158
|
-
|
|
141
|
+
let y = ye();
|
|
142
|
+
if (l === void 0 && y !== null && (l = (y & W.Open) === W.Open), l === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
143
|
+
let [n, m] = J(l ? "visible" : "hidden"), P = Je(() => {
|
|
144
|
+
l || m("hidden");
|
|
145
|
+
}), [c, o] = J(!0), s = _([l]);
|
|
146
|
+
de(() => {
|
|
147
|
+
c !== !1 && s.current[s.current.length - 1] !== l && (s.current.push(l), o(!1));
|
|
148
|
+
}, [s, l]);
|
|
149
|
+
let u = q(() => ({ show: l, appear: d, initial: c }), [l, d, c]);
|
|
150
|
+
de(() => {
|
|
151
|
+
l ? m("visible") : !ge(P) && h.current !== null && m("hidden");
|
|
152
|
+
}, [l, P]);
|
|
153
|
+
let p = { unmount: v }, g = T(() => {
|
|
154
|
+
var B;
|
|
155
|
+
c && o(!1), (B = e.beforeEnter) == null || B.call(e);
|
|
156
|
+
}), S = T(() => {
|
|
157
|
+
var B;
|
|
158
|
+
c && o(!1), (B = e.beforeLeave) == null || B.call(e);
|
|
159
159
|
});
|
|
160
|
-
return E.createElement(
|
|
160
|
+
return E.createElement(Se.Provider, { value: P }, E.createElement(Ee.Provider, { value: u }, se({ ourProps: { ...p, as: ve, children: E.createElement(Ye, { ref: r, ...p, ...$, beforeEnter: g, beforeLeave: S }) }, theirProps: {}, defaultTag: ve, features: Ve, visible: n === "visible", name: "Transition" })));
|
|
161
161
|
}
|
|
162
162
|
function Ht(e, t) {
|
|
163
|
-
let
|
|
164
|
-
return E.createElement(E.Fragment, null, !
|
|
163
|
+
let l = te(Ee) !== null, d = ye() !== null;
|
|
164
|
+
return E.createElement(E.Fragment, null, !l && d ? E.createElement(Ce, { ref: t, ...e }) : E.createElement(Ye, { ref: t, ...e }));
|
|
165
165
|
}
|
|
166
|
-
let
|
|
166
|
+
let Ce = Y(Dt), Ye = Y(At), Gt = Y(Ht), Kt = Object.assign(Ce, { Child: Gt, Root: Ce });
|
|
167
167
|
var Ut = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Ut || {}), jt = ((e) => (e[e.TogglePopover = 0] = "TogglePopover", e[e.ClosePopover = 1] = "ClosePopover", e[e.SetButton = 2] = "SetButton", e[e.SetButtonId = 3] = "SetButtonId", e[e.SetPanel = 4] = "SetPanel", e[e.SetPanelId = 5] = "SetPanelId", e))(jt || {});
|
|
168
168
|
let Xt = { 0: (e) => ({ ...e, popoverState: V(e.popoverState, { 0: 1, 1: 0 }), __demoMode: !1 }), 1(e) {
|
|
169
169
|
return e.popoverState === 1 ? e : { ...e, popoverState: 1, __demoMode: !1 };
|
|
@@ -175,32 +175,32 @@ let Xt = { 0: (e) => ({ ...e, popoverState: V(e.popoverState, { 0: 1, 1: 0 }), _
|
|
|
175
175
|
return e.panel === t.panel ? e : { ...e, panel: t.panel };
|
|
176
176
|
}, 5(e, t) {
|
|
177
177
|
return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
|
|
178
|
-
} }, Le =
|
|
178
|
+
} }, Le = ie(null);
|
|
179
179
|
Le.displayName = "PopoverContext";
|
|
180
180
|
function Te(e) {
|
|
181
181
|
let t = te(Le);
|
|
182
182
|
if (t === null) {
|
|
183
|
-
let
|
|
184
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
183
|
+
let l = new Error(`<${e} /> is missing a parent <Popover /> component.`);
|
|
184
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, Te), l;
|
|
185
185
|
}
|
|
186
186
|
return t;
|
|
187
187
|
}
|
|
188
|
-
let we =
|
|
188
|
+
let we = ie(null);
|
|
189
189
|
we.displayName = "PopoverAPIContext";
|
|
190
190
|
function _e(e) {
|
|
191
191
|
let t = te(we);
|
|
192
192
|
if (t === null) {
|
|
193
|
-
let
|
|
194
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
193
|
+
let l = new Error(`<${e} /> is missing a parent <Popover /> component.`);
|
|
194
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, _e), l;
|
|
195
195
|
}
|
|
196
196
|
return t;
|
|
197
197
|
}
|
|
198
|
-
let Ae =
|
|
198
|
+
let Ae = ie(null);
|
|
199
199
|
Ae.displayName = "PopoverGroupContext";
|
|
200
200
|
function ze() {
|
|
201
201
|
return te(Ae);
|
|
202
202
|
}
|
|
203
|
-
let Ie =
|
|
203
|
+
let Ie = ie(null);
|
|
204
204
|
Ie.displayName = "PopoverPanelContext";
|
|
205
205
|
function Wt() {
|
|
206
206
|
return te(Ie);
|
|
@@ -210,324 +210,340 @@ function Zt(e, t) {
|
|
|
210
210
|
}
|
|
211
211
|
let qt = "div";
|
|
212
212
|
function Jt(e, t) {
|
|
213
|
-
var
|
|
214
|
-
let { __demoMode:
|
|
215
|
-
|
|
216
|
-
})),
|
|
217
|
-
if (!n || !
|
|
218
|
-
for (let
|
|
219
|
-
let
|
|
220
|
-
return !
|
|
221
|
-
}, [n,
|
|
222
|
-
var
|
|
223
|
-
return (
|
|
213
|
+
var l;
|
|
214
|
+
let { __demoMode: d = !1, ...v } = e, $ = _(null), h = ee(t, ct((b) => {
|
|
215
|
+
$.current = b;
|
|
216
|
+
})), a = _([]), r = rt(Zt, { __demoMode: d, popoverState: d ? 0 : 1, buttons: a, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: Fe(), afterPanelSentinel: Fe(), afterButtonSentinel: Fe() }), [{ popoverState: y, button: n, buttonId: m, panel: P, panelId: c, beforePanelSentinel: o, afterPanelSentinel: s, afterButtonSentinel: u }, p] = r, g = $e((l = $.current) != null ? l : n), S = q(() => {
|
|
217
|
+
if (!n || !P) return !1;
|
|
218
|
+
for (let H of document.querySelectorAll("body > *")) if (Number(H == null ? void 0 : H.contains(n)) ^ Number(H == null ? void 0 : H.contains(P))) return !0;
|
|
219
|
+
let b = Oe(), i = b.indexOf(n), f = (i + b.length - 1) % b.length, w = (i + 1) % b.length, I = b[f], F = b[w];
|
|
220
|
+
return !P.contains(I) && !P.contains(F);
|
|
221
|
+
}, [n, P]), B = ke(m), A = ke(c), D = q(() => ({ buttonId: B, panelId: A, close: () => p({ type: 1 }) }), [B, A, p]), k = ze(), C = k == null ? void 0 : k.registerPopover, Z = T(() => {
|
|
222
|
+
var b;
|
|
223
|
+
return (b = k == null ? void 0 : k.isFocusWithinPopoverGroup()) != null ? b : (g == null ? void 0 : g.activeElement) && ((n == null ? void 0 : n.contains(g.activeElement)) || (P == null ? void 0 : P.contains(g.activeElement)));
|
|
224
224
|
});
|
|
225
|
-
|
|
226
|
-
let [
|
|
227
|
-
ht(
|
|
228
|
-
var i,
|
|
229
|
-
|
|
230
|
-
}, !0), Pt(
|
|
231
|
-
|
|
225
|
+
ue(() => C == null ? void 0 : C(D), [C, D]);
|
|
226
|
+
let [M, N] = bt(), G = We(n), R = xt({ mainTreeNode: G, portals: M, defaultContainers: [n, P] });
|
|
227
|
+
ht(g == null ? void 0 : g.defaultView, "focus", (b) => {
|
|
228
|
+
var i, f, w, I, F, H;
|
|
229
|
+
b.target !== window && b.target instanceof HTMLElement && y === 0 && (Z() || n && P && (R.contains(b.target) || (f = (i = o.current) == null ? void 0 : i.contains) != null && f.call(i, b.target) || (I = (w = s.current) == null ? void 0 : w.contains) != null && I.call(w, b.target) || (H = (F = u.current) == null ? void 0 : F.contains) != null && H.call(F, b.target) || p({ type: 1 })));
|
|
230
|
+
}, !0), Pt(y === 0, R.resolveContainers, (b, i) => {
|
|
231
|
+
p({ type: 1 }), Ct(i, Nt.Loose) || (b.preventDefault(), n == null || n.focus());
|
|
232
232
|
});
|
|
233
|
-
let
|
|
234
|
-
|
|
235
|
-
let i =
|
|
233
|
+
let x = T((b) => {
|
|
234
|
+
p({ type: 1 });
|
|
235
|
+
let i = b ? b instanceof HTMLElement ? b : "current" in b && b.current instanceof HTMLElement ? b.current : n : n;
|
|
236
236
|
i == null || i.focus();
|
|
237
|
-
}),
|
|
238
|
-
return E.createElement(Xe, { node:
|
|
237
|
+
}), K = q(() => ({ close: x, isPortalled: S }), [x, S]), O = q(() => ({ open: y === 0, close: x }), [y, x]), L = { ref: h };
|
|
238
|
+
return E.createElement(Xe, { node: G }, E.createElement($t, null, E.createElement(Ie.Provider, { value: null }, E.createElement(Le.Provider, { value: r }, E.createElement(we.Provider, { value: K }, E.createElement(Mt, { value: x }, E.createElement(Ke, { value: V(y, { 0: W.Open, 1: W.Closed }) }, E.createElement(N, null, se({ ourProps: L, theirProps: v, slot: O, defaultTag: qt, name: "Popover" })))))))));
|
|
239
239
|
}
|
|
240
240
|
let Qt = "button";
|
|
241
241
|
function Vt(e, t) {
|
|
242
|
-
let
|
|
243
|
-
|
|
244
|
-
if (!
|
|
242
|
+
let l = be(), { id: d = `headlessui-popover-button-${l}`, disabled: v = !1, autoFocus: $ = !1, ...h } = e, [a, r] = Te("Popover.Button"), { isPortalled: y } = _e("Popover.Button"), n = _(null), m = `headlessui-focus-sentinel-${be()}`, P = ze(), c = P == null ? void 0 : P.closeOthers, o = Wt() !== null;
|
|
243
|
+
ue(() => {
|
|
244
|
+
if (!o) return r({ type: 3, buttonId: d }), () => {
|
|
245
245
|
r({ type: 3, buttonId: null });
|
|
246
246
|
};
|
|
247
|
-
}, [
|
|
248
|
-
let [s] =
|
|
249
|
-
if (!
|
|
250
|
-
if (i)
|
|
247
|
+
}, [o, d, r]);
|
|
248
|
+
let [s] = J(() => Symbol()), u = ee(n, t, yt(), T((i) => {
|
|
249
|
+
if (!o) {
|
|
250
|
+
if (i) a.buttons.current.push(s);
|
|
251
251
|
else {
|
|
252
|
-
let
|
|
253
|
-
|
|
252
|
+
let f = a.buttons.current.indexOf(s);
|
|
253
|
+
f !== -1 && a.buttons.current.splice(f, 1);
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
a.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), i && r({ type: 2, button: i });
|
|
256
256
|
}
|
|
257
|
-
})),
|
|
258
|
-
var
|
|
259
|
-
if (
|
|
260
|
-
if (
|
|
257
|
+
})), p = ee(n, t), g = $e(n), S = T((i) => {
|
|
258
|
+
var f, w, I;
|
|
259
|
+
if (o) {
|
|
260
|
+
if (a.popoverState === 1) return;
|
|
261
261
|
switch (i.key) {
|
|
262
262
|
case oe.Space:
|
|
263
263
|
case oe.Enter:
|
|
264
|
-
i.preventDefault(), (
|
|
264
|
+
i.preventDefault(), (w = (f = i.target).click) == null || w.call(f), r({ type: 1 }), (I = a.button) == null || I.focus();
|
|
265
265
|
break;
|
|
266
266
|
}
|
|
267
267
|
} else switch (i.key) {
|
|
268
268
|
case oe.Space:
|
|
269
269
|
case oe.Enter:
|
|
270
|
-
i.preventDefault(), i.stopPropagation(),
|
|
270
|
+
i.preventDefault(), i.stopPropagation(), a.popoverState === 1 && (c == null || c(a.buttonId)), r({ type: 0 });
|
|
271
271
|
break;
|
|
272
272
|
case oe.Escape:
|
|
273
|
-
if (
|
|
274
|
-
if (!n.current ||
|
|
273
|
+
if (a.popoverState !== 0) return c == null ? void 0 : c(a.buttonId);
|
|
274
|
+
if (!n.current || g != null && g.activeElement && !n.current.contains(g.activeElement)) return;
|
|
275
275
|
i.preventDefault(), i.stopPropagation(), r({ type: 1 });
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
278
|
-
}),
|
|
279
|
-
|
|
280
|
-
}),
|
|
281
|
-
var
|
|
282
|
-
Ue(i.currentTarget) ||
|
|
283
|
-
}),
|
|
278
|
+
}), B = T((i) => {
|
|
279
|
+
o || i.key === oe.Space && i.preventDefault();
|
|
280
|
+
}), A = T((i) => {
|
|
281
|
+
var f, w;
|
|
282
|
+
Ue(i.currentTarget) || v || (o ? (r({ type: 1 }), (f = a.button) == null || f.focus()) : (i.preventDefault(), i.stopPropagation(), a.popoverState === 1 && (c == null || c(a.buttonId)), r({ type: 0 }), (w = a.button) == null || w.focus()));
|
|
283
|
+
}), D = T((i) => {
|
|
284
284
|
i.preventDefault(), i.stopPropagation();
|
|
285
|
-
}), { isFocusVisible:
|
|
286
|
-
let i =
|
|
285
|
+
}), { isFocusVisible: k, focusProps: C } = dt({ autoFocus: $ }), { isHovered: Z, hoverProps: M } = pt({ isDisabled: v }), { pressed: N, pressProps: G } = vt({ disabled: v }), R = a.popoverState === 0, x = q(() => ({ open: R, active: N || R, disabled: v, hover: Z, focus: k, autofocus: $ }), [R, Z, k, N, v, $]), K = kt(e, a.button), O = o ? Be({ ref: p, type: K, onKeyDown: S, onClick: A, disabled: v || void 0, autoFocus: $ }, C, M, G) : Be({ ref: u, id: a.buttonId, type: K, "aria-expanded": a.popoverState === 0, "aria-controls": a.panel ? a.panelId : void 0, disabled: v || void 0, autoFocus: $, onKeyDown: S, onKeyUp: B, onClick: A, onMouseDown: D }, C, M, G), L = Ze(), b = T(() => {
|
|
286
|
+
let i = a.panel;
|
|
287
287
|
if (!i) return;
|
|
288
|
-
function
|
|
289
|
-
V(
|
|
288
|
+
function f() {
|
|
289
|
+
V(L.current, { [Q.Forwards]: () => ae(i, z.First), [Q.Backwards]: () => ae(i, z.Last) }) === Me.Error && ae(Oe().filter((w) => w.dataset.headlessuiFocusGuard !== "true"), V(L.current, { [Q.Forwards]: z.Next, [Q.Backwards]: z.Previous }), { relativeTo: a.button });
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
f();
|
|
292
292
|
});
|
|
293
|
-
return E.createElement(E.Fragment, null, se({ ourProps:
|
|
293
|
+
return E.createElement(E.Fragment, null, se({ ourProps: O, theirProps: h, slot: x, defaultTag: Qt, name: "Popover.Button" }), R && !o && y && E.createElement(he, { id: m, ref: a.afterButtonSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: b }));
|
|
294
294
|
}
|
|
295
|
-
let Yt = "div", zt =
|
|
295
|
+
let Yt = "div", zt = me.RenderStrategy | me.Static;
|
|
296
296
|
function et(e, t) {
|
|
297
|
-
let
|
|
298
|
-
if (Ue(
|
|
299
|
-
|
|
300
|
-
}), s =
|
|
301
|
-
return se({ ourProps: u, theirProps:
|
|
297
|
+
let l = be(), { id: d = `headlessui-popover-backdrop-${l}`, transition: v = !1, ...$ } = e, [{ popoverState: h }, a] = Te("Popover.Backdrop"), [r, y] = J(null), n = ee(t, y), m = ye(), [P, c] = Re(v, r, m !== null ? (m & W.Open) === W.Open : h === 0), o = T((p) => {
|
|
298
|
+
if (Ue(p.currentTarget)) return p.preventDefault();
|
|
299
|
+
a({ type: 1 });
|
|
300
|
+
}), s = q(() => ({ open: h === 0 }), [h]), u = { ref: n, id: d, "aria-hidden": !0, onClick: o, ...xe(c) };
|
|
301
|
+
return se({ ourProps: u, theirProps: $, slot: s, defaultTag: Yt, features: zt, visible: P, name: "Popover.Backdrop" });
|
|
302
302
|
}
|
|
303
|
-
let en = "div", tn =
|
|
303
|
+
let en = "div", tn = me.RenderStrategy | me.Static;
|
|
304
304
|
function nn(e, t) {
|
|
305
|
-
let
|
|
306
|
-
|
|
307
|
-
let [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}), [
|
|
311
|
-
let
|
|
305
|
+
let l = be(), { id: d = `headlessui-popover-panel-${l}`, focus: v = !1, anchor: $, portal: h = !1, modal: a = !1, transition: r = !1, ...y } = e, [n, m] = Te("Popover.Panel"), { close: P, isPortalled: c } = _e("Popover.Panel"), o = `headlessui-focus-sentinel-before-${l}`, s = `headlessui-focus-sentinel-after-${l}`, u = _(null), p = Et($), [g, S] = St(p), B = gt();
|
|
306
|
+
p && (h = !0);
|
|
307
|
+
let [A, D] = J(null), k = ee(u, t, p ? g : null, T((f) => m({ type: 4, panel: f })), D), C = $e(u), Z = ft();
|
|
308
|
+
de(() => (m({ type: 5, panelId: d }), () => {
|
|
309
|
+
m({ type: 5, panelId: null });
|
|
310
|
+
}), [d, m]);
|
|
311
|
+
let M = ye(), [N, G] = Re(r, A, M !== null ? (M & W.Open) === W.Open : n.popoverState === 0);
|
|
312
312
|
Tt(N, n.button, () => {
|
|
313
|
-
|
|
313
|
+
m({ type: 1 });
|
|
314
314
|
});
|
|
315
|
-
let
|
|
316
|
-
wt(
|
|
317
|
-
let
|
|
318
|
-
var
|
|
319
|
-
switch (
|
|
315
|
+
let R = n.__demoMode ? !1 : a && N;
|
|
316
|
+
wt(R, C);
|
|
317
|
+
let x = T((f) => {
|
|
318
|
+
var w;
|
|
319
|
+
switch (f.key) {
|
|
320
320
|
case oe.Escape:
|
|
321
|
-
if (n.popoverState !== 0 || !u.current ||
|
|
322
|
-
|
|
321
|
+
if (n.popoverState !== 0 || !u.current || C != null && C.activeElement && !u.current.contains(C.activeElement)) return;
|
|
322
|
+
f.preventDefault(), f.stopPropagation(), m({ type: 1 }), (w = n.button) == null || w.focus();
|
|
323
323
|
break;
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
|
-
|
|
327
|
-
var
|
|
328
|
-
e.static || n.popoverState === 1 && ((
|
|
329
|
-
}, [n.popoverState, e.unmount, e.static,
|
|
330
|
-
if (n.__demoMode || !
|
|
331
|
-
let
|
|
332
|
-
u.current.contains(
|
|
333
|
-
}, [n.__demoMode,
|
|
334
|
-
let
|
|
335
|
-
var
|
|
336
|
-
let
|
|
337
|
-
|
|
338
|
-
} : void 0, tabIndex: -1, style: { ...
|
|
339
|
-
let
|
|
340
|
-
if (!
|
|
341
|
-
function
|
|
342
|
-
V(
|
|
343
|
-
var
|
|
344
|
-
ae(
|
|
326
|
+
ue(() => {
|
|
327
|
+
var f;
|
|
328
|
+
e.static || n.popoverState === 1 && ((f = e.unmount) == null || f) && m({ type: 4, panel: null });
|
|
329
|
+
}, [n.popoverState, e.unmount, e.static, m]), ue(() => {
|
|
330
|
+
if (n.__demoMode || !v || n.popoverState !== 0 || !u.current) return;
|
|
331
|
+
let f = C == null ? void 0 : C.activeElement;
|
|
332
|
+
u.current.contains(f) || ae(u.current, z.First);
|
|
333
|
+
}, [n.__demoMode, v, u.current, n.popoverState]);
|
|
334
|
+
let K = q(() => ({ open: n.popoverState === 0, close: P }), [n.popoverState, P]), O = Be(p ? B() : {}, { ref: k, id: d, onKeyDown: x, onBlur: v && n.popoverState === 0 ? (f) => {
|
|
335
|
+
var w, I, F, H, j;
|
|
336
|
+
let X = f.relatedTarget;
|
|
337
|
+
X && u.current && ((w = u.current) != null && w.contains(X) || (m({ type: 1 }), ((F = (I = n.beforePanelSentinel.current) == null ? void 0 : I.contains) != null && F.call(I, X) || (j = (H = n.afterPanelSentinel.current) == null ? void 0 : H.contains) != null && j.call(H, X)) && X.focus({ preventScroll: !0 })));
|
|
338
|
+
} : void 0, tabIndex: -1, style: { ...y.style, ...S, "--button-width": It(n.button, !0).width }, ...xe(G) }), L = Ze(), b = T(() => {
|
|
339
|
+
let f = u.current;
|
|
340
|
+
if (!f) return;
|
|
341
|
+
function w() {
|
|
342
|
+
V(L.current, { [Q.Forwards]: () => {
|
|
343
|
+
var I;
|
|
344
|
+
ae(f, z.First) === Me.Error && ((I = n.afterPanelSentinel.current) == null || I.focus());
|
|
345
345
|
}, [Q.Backwards]: () => {
|
|
346
|
-
var
|
|
347
|
-
(
|
|
346
|
+
var I;
|
|
347
|
+
(I = n.button) == null || I.focus({ preventScroll: !0 });
|
|
348
348
|
} });
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
}), i =
|
|
352
|
-
let
|
|
353
|
-
if (!
|
|
354
|
-
function
|
|
355
|
-
V(
|
|
350
|
+
w();
|
|
351
|
+
}), i = T(() => {
|
|
352
|
+
let f = u.current;
|
|
353
|
+
if (!f) return;
|
|
354
|
+
function w() {
|
|
355
|
+
V(L.current, { [Q.Forwards]: () => {
|
|
356
356
|
if (!n.button) return;
|
|
357
|
-
let
|
|
358
|
-
for (let
|
|
359
|
-
let ne =
|
|
360
|
-
ne !== -1 &&
|
|
357
|
+
let I = Oe(), F = I.indexOf(n.button), H = I.slice(0, F + 1), j = [...I.slice(F + 1), ...H];
|
|
358
|
+
for (let X of j.slice()) if (X.dataset.headlessuiFocusGuard === "true" || A != null && A.contains(X)) {
|
|
359
|
+
let ne = j.indexOf(X);
|
|
360
|
+
ne !== -1 && j.splice(ne, 1);
|
|
361
361
|
}
|
|
362
|
-
ae(
|
|
362
|
+
ae(j, z.First, { sorted: !1 });
|
|
363
363
|
}, [Q.Backwards]: () => {
|
|
364
|
-
var
|
|
365
|
-
ae(
|
|
364
|
+
var I;
|
|
365
|
+
ae(f, z.Previous) === Me.Error && ((I = n.button) == null || I.focus());
|
|
366
366
|
} });
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
w();
|
|
369
369
|
});
|
|
370
|
-
return E.createElement(
|
|
370
|
+
return E.createElement(Bt, null, E.createElement(Ie.Provider, { value: d }, E.createElement(we.Provider, { value: { close: P, isPortalled: c } }, E.createElement(Ft, { enabled: h ? e.static || N : !1 }, N && c && E.createElement(he, { id: o, ref: n.beforePanelSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: b }), se({ mergeRefs: Z, ourProps: O, theirProps: y, slot: K, defaultTag: en, features: tn, visible: N, name: "Popover.Panel" }), N && c && E.createElement(he, { id: s, ref: n.afterPanelSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: i })))));
|
|
371
371
|
}
|
|
372
372
|
let rn = "div";
|
|
373
373
|
function on(e, t) {
|
|
374
|
-
let
|
|
375
|
-
|
|
376
|
-
let u = s.indexOf(
|
|
374
|
+
let l = _(null), d = ee(l, t), [v, $] = J([]), h = T((o) => {
|
|
375
|
+
$((s) => {
|
|
376
|
+
let u = s.indexOf(o);
|
|
377
377
|
if (u !== -1) {
|
|
378
|
-
let
|
|
379
|
-
return
|
|
378
|
+
let p = s.slice();
|
|
379
|
+
return p.splice(u, 1), p;
|
|
380
380
|
}
|
|
381
381
|
return s;
|
|
382
382
|
});
|
|
383
|
-
}),
|
|
384
|
-
var
|
|
385
|
-
let s = He(
|
|
383
|
+
}), a = T((o) => ($((s) => [...s, o]), () => h(o))), r = T(() => {
|
|
384
|
+
var o;
|
|
385
|
+
let s = He(l);
|
|
386
386
|
if (!s) return !1;
|
|
387
387
|
let u = s.activeElement;
|
|
388
|
-
return (
|
|
389
|
-
var
|
|
390
|
-
return ((
|
|
388
|
+
return (o = l.current) != null && o.contains(u) ? !0 : v.some((p) => {
|
|
389
|
+
var g, S;
|
|
390
|
+
return ((g = s.getElementById(p.buttonId.current)) == null ? void 0 : g.contains(u)) || ((S = s.getElementById(p.panelId.current)) == null ? void 0 : S.contains(u));
|
|
391
391
|
});
|
|
392
|
-
}),
|
|
393
|
-
for (let s of
|
|
394
|
-
}), n =
|
|
395
|
-
return E.createElement(Xe, null, E.createElement(Ae.Provider, { value: n }, se({ ourProps:
|
|
392
|
+
}), y = T((o) => {
|
|
393
|
+
for (let s of v) s.buttonId.current !== o && s.close();
|
|
394
|
+
}), n = q(() => ({ registerPopover: a, unregisterPopover: h, isFocusWithinPopoverGroup: r, closeOthers: y }), [a, h, r, y]), m = q(() => ({}), []), P = e, c = { ref: d };
|
|
395
|
+
return E.createElement(Xe, null, E.createElement(Ae.Provider, { value: n }, se({ ourProps: c, theirProps: P, slot: m, defaultTag: rn, name: "Popover.Group" })));
|
|
396
396
|
}
|
|
397
|
-
let ln = Y(Jt),
|
|
397
|
+
let ln = Y(Jt), Ne = Y(Vt), an = Y(et), un = Y(et), tt = Y(nn), sn = Y(on), cn = Object.assign(ln, { Button: Ne, Backdrop: un, Overlay: an, Panel: tt, Group: sn });
|
|
398
398
|
const In = 300, Fn = ot(
|
|
399
399
|
({
|
|
400
400
|
children: e,
|
|
401
401
|
position: t = "bottom end",
|
|
402
|
-
popoverProps:
|
|
403
|
-
className:
|
|
404
|
-
buttonClassName:
|
|
405
|
-
panelClassName:
|
|
406
|
-
menuItemsClassName:
|
|
407
|
-
buttonContent:
|
|
402
|
+
popoverProps: l,
|
|
403
|
+
className: d,
|
|
404
|
+
buttonClassName: v,
|
|
405
|
+
panelClassName: $,
|
|
406
|
+
menuItemsClassName: h,
|
|
407
|
+
buttonContent: a,
|
|
408
408
|
needCloseButton: r,
|
|
409
|
-
openOnHover:
|
|
410
|
-
isOpen: n
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
409
|
+
openOnHover: y = !1,
|
|
410
|
+
isOpen: n,
|
|
411
|
+
isControlled: m = !1,
|
|
412
|
+
onOpenChange: P,
|
|
413
|
+
autoCloseTimeout: c = 0,
|
|
414
|
+
triggerElement: o,
|
|
415
|
+
variant: s = "default",
|
|
416
|
+
arrow: u = !1
|
|
415
417
|
}) => {
|
|
416
|
-
const [
|
|
417
|
-
|
|
418
|
-
|
|
418
|
+
const [p, g] = J(
|
|
419
|
+
n ?? !1
|
|
420
|
+
), [S, B] = J(!1), A = _(null), D = _(null), k = _(null), { getArrowClasses: C, getPositionClass: Z } = lt({
|
|
421
|
+
buttonRef: D,
|
|
422
|
+
panelRef: k,
|
|
419
423
|
initialPosition: t,
|
|
420
|
-
isOpen:
|
|
421
|
-
arrow:
|
|
422
|
-
variant:
|
|
423
|
-
}),
|
|
424
|
-
|
|
425
|
-
}, []), N =
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
},
|
|
429
|
-
}, [
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}), [
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
(
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
424
|
+
isOpen: p || n,
|
|
425
|
+
arrow: u,
|
|
426
|
+
variant: s
|
|
427
|
+
}), M = ce(() => {
|
|
428
|
+
A.current && clearTimeout(A.current);
|
|
429
|
+
}, []), N = ce(() => {
|
|
430
|
+
c > 0 && !S && (A.current = setTimeout(() => {
|
|
431
|
+
g(!1), B(!0);
|
|
432
|
+
}, c));
|
|
433
|
+
}, [c, S]);
|
|
434
|
+
ue(() => (p ? N() : M(), () => {
|
|
435
|
+
M();
|
|
436
|
+
}), [p, N, M]), ue(() => {
|
|
437
|
+
m && g(n);
|
|
438
|
+
}, [n, m]);
|
|
439
|
+
const G = ce(() => {
|
|
440
|
+
y && g(!0);
|
|
441
|
+
}, [y]), R = ce(
|
|
442
|
+
(O) => {
|
|
443
|
+
if (y) {
|
|
444
|
+
const L = O.relatedTarget;
|
|
445
|
+
D.current && !D.current.contains(L) && k.current && !k.current.contains(L) && g(!1);
|
|
440
446
|
}
|
|
441
447
|
},
|
|
442
|
-
[
|
|
448
|
+
[y]
|
|
449
|
+
), x = ce(
|
|
450
|
+
(O) => {
|
|
451
|
+
m || g(O), P == null || P(O);
|
|
452
|
+
},
|
|
453
|
+
[m, P]
|
|
454
|
+
), K = ce(
|
|
455
|
+
(O) => {
|
|
456
|
+
O == null || O(), x(!1);
|
|
457
|
+
},
|
|
458
|
+
[x]
|
|
443
459
|
);
|
|
444
460
|
return /* @__PURE__ */ re(
|
|
445
461
|
cn,
|
|
446
462
|
{
|
|
447
463
|
as: "div",
|
|
448
|
-
className:
|
|
449
|
-
...
|
|
450
|
-
children: ({ open:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
464
|
+
className: fe(U.menu, d),
|
|
465
|
+
...l,
|
|
466
|
+
children: ({ open: O, close: L }) => /* @__PURE__ */ De(nt, { children: [
|
|
467
|
+
o ? /* @__PURE__ */ re(
|
|
468
|
+
Ne,
|
|
469
|
+
{
|
|
470
|
+
as: "div",
|
|
471
|
+
ref: D,
|
|
472
|
+
onMouseEnter: G,
|
|
473
|
+
onMouseLeave: R,
|
|
474
|
+
className: fe(U["menu-button"], v),
|
|
475
|
+
children: typeof o == "function" ? o({
|
|
476
|
+
open: p,
|
|
477
|
+
close: () => K(L)
|
|
478
|
+
}) : o
|
|
479
|
+
}
|
|
480
|
+
) : /* @__PURE__ */ re(
|
|
481
|
+
Ne,
|
|
482
|
+
{
|
|
483
|
+
ref: D,
|
|
484
|
+
onMouseEnter: G,
|
|
485
|
+
onMouseLeave: R,
|
|
486
|
+
onClick: m ? () => x(!p) : void 0,
|
|
487
|
+
className: fe(U["menu-button"], v),
|
|
488
|
+
children: a
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ re(
|
|
492
|
+
Kt,
|
|
493
|
+
{
|
|
494
|
+
show: m ? p : O || p,
|
|
495
|
+
as: ve,
|
|
496
|
+
enter: U.enter,
|
|
497
|
+
enterFrom: U["enter-from"],
|
|
498
|
+
enterTo: U["enter-to"],
|
|
499
|
+
leave: U.leave,
|
|
500
|
+
leaveFrom: U["leave-from"],
|
|
501
|
+
leaveTo: U["leave-to"],
|
|
502
|
+
children: /* @__PURE__ */ De(
|
|
503
|
+
tt,
|
|
504
|
+
{
|
|
505
|
+
ref: k,
|
|
506
|
+
anchor: t,
|
|
507
|
+
static: m,
|
|
508
|
+
onMouseEnter: G,
|
|
509
|
+
onMouseLeave: R,
|
|
510
|
+
className: fe(
|
|
511
|
+
U["menu-items"],
|
|
512
|
+
Z(),
|
|
513
|
+
{
|
|
514
|
+
[U["menu-items--black"]]: s === "black",
|
|
515
|
+
[U["menu-items-with-arrow"]]: u
|
|
516
|
+
},
|
|
517
|
+
$
|
|
518
|
+
),
|
|
519
|
+
children: [
|
|
520
|
+
u && /* @__PURE__ */ re("div", { className: C() }),
|
|
521
|
+
r && /* @__PURE__ */ re(
|
|
522
|
+
at,
|
|
496
523
|
{
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
524
|
+
isIconButton: !0,
|
|
525
|
+
iconName: "Close16px",
|
|
526
|
+
onClick: () => K(L),
|
|
527
|
+
clear: !0,
|
|
528
|
+
className: U["close-button"]
|
|
529
|
+
}
|
|
501
530
|
),
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
G["menu-items-container"],
|
|
519
|
-
m
|
|
520
|
-
),
|
|
521
|
-
children: typeof e == "function" ? e({ close: q }) : e
|
|
522
|
-
}
|
|
523
|
-
)
|
|
524
|
-
]
|
|
525
|
-
}
|
|
526
|
-
)
|
|
527
|
-
}
|
|
528
|
-
)
|
|
529
|
-
] });
|
|
530
|
-
}
|
|
531
|
+
/* @__PURE__ */ re(
|
|
532
|
+
"div",
|
|
533
|
+
{
|
|
534
|
+
className: fe(
|
|
535
|
+
U["menu-items-container"],
|
|
536
|
+
h
|
|
537
|
+
),
|
|
538
|
+
children: typeof e == "function" ? e({ close: () => K(L) }) : e
|
|
539
|
+
}
|
|
540
|
+
)
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
}
|
|
545
|
+
)
|
|
546
|
+
] })
|
|
531
547
|
}
|
|
532
548
|
);
|
|
533
549
|
}
|