@lanaco/lnc-react-ui 4.0.2 → 4.0.3
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/bundle-visualization.html +4842 -0
- package/dist/Accordion.cjs +1 -1
- package/dist/Accordion.js +55 -50
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +15 -15
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +11 -11
- package/dist/ActionsToolbar.cjs +2 -2
- package/dist/ActionsToolbar.js +16 -16
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +23 -23
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.js +23 -25
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +21 -14
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +28 -28
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +21 -21
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +10 -6
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +4 -4
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +9 -9
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +5 -5
- package/dist/ConfirmationForm.cjs +5 -5
- package/dist/ConfirmationForm.js +59 -59
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +8 -8
- package/dist/{CustomStyles-nfD3J1mi.js → CustomStyles-BUSJ8bZt.js} +5 -5
- package/dist/{CustomStyles-CqlCjTgU.cjs → CustomStyles-Dlqxic2X.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +2 -2
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +491 -491
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +5 -5
- package/dist/DetailsView.cjs +4 -4
- package/dist/DetailsView.js +40 -40
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +4 -4
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +6 -6
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +4 -4
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +15 -15
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +6 -6
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +4 -4
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +6 -6
- package/dist/DropdownMenu.cjs +7 -1
- package/dist/DropdownMenu.js +192 -10
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +4 -4
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +4 -4
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +14 -14
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +30 -30
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +3 -3
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +5 -5
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +8 -9
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +31 -31
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.js +2 -2
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +2 -2
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -7
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +33 -10
- package/dist/IconButton.cjs +5 -5
- package/dist/IconButton.js +33 -33
- package/dist/Kanban.cjs +12 -12
- package/dist/Kanban.js +948 -936
- package/dist/KanbanActionsToolbar.cjs +2 -2
- package/dist/KanbanActionsToolbar.js +28 -28
- package/dist/{KanbanCard-D9OhU8C6.js → KanbanCard-CHZ_C9kk.js} +50 -50
- package/dist/KanbanCard-DV3VnSUi.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +5 -5
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +40 -40
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +46 -46
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +27 -27
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +9 -9
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +11 -11
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +7 -7
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +4 -4
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +4 -4
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +18 -18
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +9 -9
- package/dist/Notification.cjs +1 -83
- package/dist/Notification.js +3 -1077
- package/dist/NotificationContainer.cjs +37 -0
- package/dist/NotificationContainer.js +162 -0
- package/dist/NotificationMessage.cjs +47 -0
- package/dist/NotificationMessage.js +133 -0
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +5 -5
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +27 -27
- package/dist/Pagination.cjs +12 -0
- package/dist/Pagination.js +248 -0
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +14 -14
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.js +36 -0
- package/dist/PopoverClose.cjs +1 -0
- package/dist/PopoverClose.js +15 -0
- package/dist/PopoverContent.cjs +10 -0
- package/dist/PopoverContent.js +68 -0
- package/dist/PopoverContext.cjs +1 -0
- package/dist/PopoverContext.js +5 -0
- package/dist/PopoverDescription.cjs +1 -0
- package/dist/PopoverDescription.js +16 -0
- package/dist/PopoverHeading.cjs +1 -0
- package/dist/PopoverHeading.js +16 -0
- package/dist/PopoverTrigger.cjs +1 -0
- package/dist/PopoverTrigger.js +38 -0
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +35 -24
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +3 -3
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +4 -4
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +4 -4
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +6 -6
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +9 -9
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +4 -4
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +25 -20
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +14 -15
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +4 -4
- package/dist/TabItem.cjs +26 -0
- package/dist/TabItem.js +210 -0
- package/dist/Table.cjs +20 -20
- package/dist/Table.js +13 -12
- package/dist/TableView.cjs +8 -1
- package/dist/TableView.js +238 -9
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +3 -3
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +5 -5
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +5 -5
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +5 -5
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +9 -9
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +4 -4
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +2 -2
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +11 -11
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +29 -29
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{defineProperty-BHpTtkhC.js → defineProperty-B5pLF6px.js} +8 -8
- package/dist/{emotion-element-5486c51c.browser.esm-CSejtOeT.js → emotion-element-5486c51c.browser.esm-Bb4VkP8U.js} +4 -4
- package/dist/{emotion-is-prop-valid.esm-BzFBwmJz.js → emotion-is-prop-valid.esm-DkbeH1Xy.js} +1 -1
- package/dist/{emotion-react.browser.esm-OWM-uG8Q.js → emotion-react.browser.esm-CN-s34fZ.js} +6 -6
- package/dist/{emotion-react.browser.esm-DQBL7Wls.cjs → emotion-react.browser.esm-D7h2t2Bz.cjs} +1 -1
- package/dist/{emotion-styled.browser.esm-BZSYYThs.js → emotion-styled.browser.esm-BiK8DcgW.js} +12 -12
- package/dist/floating-ui.react.esm-72DKnou_.js +1198 -0
- package/dist/floating-ui.react.esm-C4vrBVJU.cjs +4 -0
- package/dist/{hoist-non-react-statics.cjs-Drf1aBlk.js → hoist-non-react-statics.cjs-CAHiRNzQ.js} +1 -1
- package/dist/{hoist-non-react-statics.cjs-B8r9S_ak.cjs → hoist-non-react-statics.cjs-Dr-ytKVG.cjs} +3 -3
- package/dist/{index-CZJEA84h.js → index--Kmch3aI.js} +1 -1
- package/dist/index-BIlhCoy2.cjs +20 -0
- package/dist/{index-BLQWNy78.js → index-BUChtubz.js} +4 -4
- package/dist/{index-Ds9PUTwb.js → index-BYnWp42a.js} +208 -213
- package/dist/{index-D5vEbKUT.js → index-CNBqQrtK.js} +1 -1
- package/dist/{index-IO9v6o0I.cjs → index-CSXL784P.cjs} +2 -2
- package/dist/{index-C29T0m2a.cjs → index-Ct1N7fF4.cjs} +1 -1
- package/dist/{index-BklgDeu4.js → index-Cu0xwYjD.js} +1 -1
- package/dist/{index-Cdkz-XH-.js → index-CvebWhtp.js} +1 -1
- package/dist/index-DAOBjHnD.cjs +1 -0
- package/dist/index-DBXXH_TD.cjs +1 -0
- package/dist/{index-B_da1uvD.js → index-DLVVKJXD.js} +1 -1
- package/dist/index-DaiUAQVF.cjs +1 -0
- package/dist/index.cjs +1 -26
- package/dist/index.js +180 -376
- package/dist/{motion-CtkUpWEn.js → motion-ecIGZGwI.js} +1 -1
- package/dist/react-toastify.esm-CkXGwKXL.js +798 -0
- package/dist/react-toastify.esm-Dqcb4SQT.cjs +1 -0
- package/dist/{setPrototypeOf-a891FLQJ.js → setPrototypeOf-CttqfWo1.js} +2 -2
- package/dist/{tslib.es6-ZNVz5r_T.js → tslib.es6-DQ-SzcmG.js} +5 -5
- package/dist/usePopover.cjs +1 -0
- package/dist/usePopover.js +44 -0
- package/dist/{utils-DEke8iwo.js → utils-C52T57HO.js} +73 -73
- package/dist/{utils-hdRGTsQ7.cjs → utils-DTAPpJXU.cjs} +1 -1
- package/package.json +17 -5
- package/vite.config.js +16 -0
- package/dist/DropdownMenu-B6qr13ik.cjs +0 -19
- package/dist/DropdownMenu-DZi3TJ8Q.js +0 -1547
- package/dist/KanbanCard-ConTmu3w.cjs +0 -30
- package/dist/TableView-Cj5_fbSR.js +0 -481
- package/dist/TableView-D8ex512p.cjs +0 -19
- package/dist/index-BjdOz5Ok.cjs +0 -1
- package/dist/index-DXnSjbfJ.cjs +0 -20
- package/dist/index-Dzkd2i4n.cjs +0 -1
- package/dist/index-P-naJISQ.cjs +0 -1
|
@@ -1,1547 +0,0 @@
|
|
|
1
|
-
import { jsx as L, jsxs as ft } from "react/jsx-runtime";
|
|
2
|
-
import * as i from "react";
|
|
3
|
-
import G, { useLayoutEffect as Ue, useEffect as He, useRef as Q, useState as dt } from "react";
|
|
4
|
-
import { P as x } from "./index-Ds9PUTwb.js";
|
|
5
|
-
import { n as Ie } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
6
|
-
import pt from "./Button.js";
|
|
7
|
-
import { d as mt, c as vt, b as qe } from "./utils-DEke8iwo.js";
|
|
8
|
-
import { useTheme as bt } from "./ThemeProvider.js";
|
|
9
|
-
import { c as gt, g as ge, a as ht, o as yt, f as Et, s as wt } from "./floating-ui.dom-BdUovkEr.js";
|
|
10
|
-
import { r as xe } from "./index-CZJEA84h.js";
|
|
11
|
-
import { m as ze } from "./motion-CtkUpWEn.js";
|
|
12
|
-
import { u as Rt } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
13
|
-
var ae = typeof document < "u" ? Ue : He;
|
|
14
|
-
function le(e, t) {
|
|
15
|
-
if (e === t)
|
|
16
|
-
return !0;
|
|
17
|
-
if (typeof e != typeof t)
|
|
18
|
-
return !1;
|
|
19
|
-
if (typeof e == "function" && e.toString() === t.toString())
|
|
20
|
-
return !0;
|
|
21
|
-
let n, r, o;
|
|
22
|
-
if (e && t && typeof e == "object") {
|
|
23
|
-
if (Array.isArray(e)) {
|
|
24
|
-
if (n = e.length, n != t.length) return !1;
|
|
25
|
-
for (r = n; r-- !== 0; )
|
|
26
|
-
if (!le(e[r], t[r]))
|
|
27
|
-
return !1;
|
|
28
|
-
return !0;
|
|
29
|
-
}
|
|
30
|
-
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
31
|
-
return !1;
|
|
32
|
-
for (r = n; r-- !== 0; )
|
|
33
|
-
if (!Object.prototype.hasOwnProperty.call(t, o[r]))
|
|
34
|
-
return !1;
|
|
35
|
-
for (r = n; r-- !== 0; ) {
|
|
36
|
-
const s = o[r];
|
|
37
|
-
if (!(s === "_owner" && e.$$typeof) && !le(e[s], t[s]))
|
|
38
|
-
return !1;
|
|
39
|
-
}
|
|
40
|
-
return !0;
|
|
41
|
-
}
|
|
42
|
-
return e !== e && t !== t;
|
|
43
|
-
}
|
|
44
|
-
function Ne(e) {
|
|
45
|
-
const t = i.useRef(e);
|
|
46
|
-
return ae(() => {
|
|
47
|
-
t.current = e;
|
|
48
|
-
}), t;
|
|
49
|
-
}
|
|
50
|
-
function xt(e) {
|
|
51
|
-
e === void 0 && (e = {});
|
|
52
|
-
const {
|
|
53
|
-
placement: t = "bottom",
|
|
54
|
-
strategy: n = "absolute",
|
|
55
|
-
middleware: r = [],
|
|
56
|
-
platform: o,
|
|
57
|
-
whileElementsMounted: s,
|
|
58
|
-
open: a
|
|
59
|
-
} = e, [u, f] = i.useState({
|
|
60
|
-
x: null,
|
|
61
|
-
y: null,
|
|
62
|
-
strategy: n,
|
|
63
|
-
placement: t,
|
|
64
|
-
middlewareData: {},
|
|
65
|
-
isPositioned: !1
|
|
66
|
-
}), [d, b] = i.useState(r);
|
|
67
|
-
le(d, r) || b(r);
|
|
68
|
-
const c = i.useRef(null), l = i.useRef(null), m = i.useRef(u), R = Ne(s), v = Ne(o), [p, h] = i.useState(null), [I, y] = i.useState(null), A = i.useCallback((C) => {
|
|
69
|
-
c.current !== C && (c.current = C, h(C));
|
|
70
|
-
}, []), B = i.useCallback((C) => {
|
|
71
|
-
l.current !== C && (l.current = C, y(C));
|
|
72
|
-
}, []), D = i.useCallback(() => {
|
|
73
|
-
if (!c.current || !l.current)
|
|
74
|
-
return;
|
|
75
|
-
const C = {
|
|
76
|
-
placement: t,
|
|
77
|
-
strategy: n,
|
|
78
|
-
middleware: d
|
|
79
|
-
};
|
|
80
|
-
v.current && (C.platform = v.current), gt(c.current, l.current, C).then((M) => {
|
|
81
|
-
const F = {
|
|
82
|
-
...M,
|
|
83
|
-
isPositioned: !0
|
|
84
|
-
};
|
|
85
|
-
K.current && !le(m.current, F) && (m.current = F, xe.flushSync(() => {
|
|
86
|
-
f(F);
|
|
87
|
-
}));
|
|
88
|
-
});
|
|
89
|
-
}, [d, t, n, v]);
|
|
90
|
-
ae(() => {
|
|
91
|
-
a === !1 && m.current.isPositioned && (m.current.isPositioned = !1, f((C) => ({
|
|
92
|
-
...C,
|
|
93
|
-
isPositioned: !1
|
|
94
|
-
})));
|
|
95
|
-
}, [a]);
|
|
96
|
-
const K = i.useRef(!1);
|
|
97
|
-
ae(() => (K.current = !0, () => {
|
|
98
|
-
K.current = !1;
|
|
99
|
-
}), []), ae(() => {
|
|
100
|
-
if (p && I) {
|
|
101
|
-
if (R.current)
|
|
102
|
-
return R.current(p, I, D);
|
|
103
|
-
D();
|
|
104
|
-
}
|
|
105
|
-
}, [p, I, D, R]);
|
|
106
|
-
const j = i.useMemo(() => ({
|
|
107
|
-
reference: c,
|
|
108
|
-
floating: l,
|
|
109
|
-
setReference: A,
|
|
110
|
-
setFloating: B
|
|
111
|
-
}), [A, B]), V = i.useMemo(() => ({
|
|
112
|
-
reference: p,
|
|
113
|
-
floating: I
|
|
114
|
-
}), [p, I]);
|
|
115
|
-
return i.useMemo(() => ({
|
|
116
|
-
...u,
|
|
117
|
-
update: D,
|
|
118
|
-
refs: j,
|
|
119
|
-
elements: V,
|
|
120
|
-
reference: A,
|
|
121
|
-
floating: B
|
|
122
|
-
}), [u, D, j, V, A, B]);
|
|
123
|
-
}
|
|
124
|
-
var St = function(e) {
|
|
125
|
-
if (typeof document > "u")
|
|
126
|
-
return null;
|
|
127
|
-
var t = Array.isArray(e) ? e[0] : e;
|
|
128
|
-
return t.ownerDocument.body;
|
|
129
|
-
}, X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ie = {}, he = 0, Ye = function(e) {
|
|
130
|
-
return e && (e.host || Ye(e.parentNode));
|
|
131
|
-
}, Tt = function(e, t) {
|
|
132
|
-
return t.map(function(n) {
|
|
133
|
-
if (e.contains(n))
|
|
134
|
-
return n;
|
|
135
|
-
var r = Ye(n);
|
|
136
|
-
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
137
|
-
}).filter(function(n) {
|
|
138
|
-
return !!n;
|
|
139
|
-
});
|
|
140
|
-
}, Ct = function(e, t, n, r) {
|
|
141
|
-
var o = Tt(t, Array.isArray(e) ? e : [e]);
|
|
142
|
-
ie[n] || (ie[n] = /* @__PURE__ */ new WeakMap());
|
|
143
|
-
var s = ie[n], a = [], u = /* @__PURE__ */ new Set(), f = new Set(o), d = function(c) {
|
|
144
|
-
!c || u.has(c) || (u.add(c), d(c.parentNode));
|
|
145
|
-
};
|
|
146
|
-
o.forEach(d);
|
|
147
|
-
var b = function(c) {
|
|
148
|
-
!c || f.has(c) || Array.prototype.forEach.call(c.children, function(l) {
|
|
149
|
-
if (u.has(l))
|
|
150
|
-
b(l);
|
|
151
|
-
else
|
|
152
|
-
try {
|
|
153
|
-
var m = l.getAttribute(r), R = m !== null && m !== "false", v = (X.get(l) || 0) + 1, p = (s.get(l) || 0) + 1;
|
|
154
|
-
X.set(l, v), s.set(l, p), a.push(l), v === 1 && R && se.set(l, !0), p === 1 && l.setAttribute(n, "true"), R || l.setAttribute(r, "true");
|
|
155
|
-
} catch (h) {
|
|
156
|
-
console.error("aria-hidden: cannot operate on ", l, h);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
return b(t), u.clear(), he++, function() {
|
|
161
|
-
a.forEach(function(c) {
|
|
162
|
-
var l = X.get(c) - 1, m = s.get(c) - 1;
|
|
163
|
-
X.set(c, l), s.set(c, m), l || (se.has(c) || c.removeAttribute(r), se.delete(c)), m || c.removeAttribute(n);
|
|
164
|
-
}), he--, he || (X = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ie = {});
|
|
165
|
-
};
|
|
166
|
-
}, It = function(e, t, n) {
|
|
167
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
168
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o = St(e);
|
|
169
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), Ct(r, o, n, "aria-hidden")) : function() {
|
|
170
|
-
return null;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
/*!
|
|
174
|
-
* tabbable 6.2.0
|
|
175
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
176
|
-
*/
|
|
177
|
-
var Pt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Se = /* @__PURE__ */ Pt.join(","), Ge = typeof Element > "u", te = Ge ? function() {
|
|
178
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ce = !Ge && Element.prototype.getRootNode ? function(e) {
|
|
179
|
-
var t;
|
|
180
|
-
return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
|
|
181
|
-
} : function(e) {
|
|
182
|
-
return e == null ? void 0 : e.ownerDocument;
|
|
183
|
-
}, fe = function e(t, n) {
|
|
184
|
-
var r;
|
|
185
|
-
n === void 0 && (n = !0);
|
|
186
|
-
var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), s = o === "" || o === "true", a = s || n && t && e(t.parentNode);
|
|
187
|
-
return a;
|
|
188
|
-
}, Ot = function(t) {
|
|
189
|
-
var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
|
|
190
|
-
return r === "" || r === "true";
|
|
191
|
-
}, Ft = function(t, n, r) {
|
|
192
|
-
if (fe(t))
|
|
193
|
-
return [];
|
|
194
|
-
var o = Array.prototype.slice.apply(t.querySelectorAll(Se));
|
|
195
|
-
return n && te.call(t, Se) && o.unshift(t), o = o.filter(r), o;
|
|
196
|
-
}, At = function e(t, n, r) {
|
|
197
|
-
for (var o = [], s = Array.from(t); s.length; ) {
|
|
198
|
-
var a = s.shift();
|
|
199
|
-
if (!fe(a, !1))
|
|
200
|
-
if (a.tagName === "SLOT") {
|
|
201
|
-
var u = a.assignedElements(), f = u.length ? u : a.children, d = e(f, !0, r);
|
|
202
|
-
r.flatten ? o.push.apply(o, d) : o.push({
|
|
203
|
-
scopeParent: a,
|
|
204
|
-
candidates: d
|
|
205
|
-
});
|
|
206
|
-
} else {
|
|
207
|
-
var b = te.call(a, Se);
|
|
208
|
-
b && r.filter(a) && (n || !t.includes(a)) && o.push(a);
|
|
209
|
-
var c = a.shadowRoot || // check for an undisclosed shadow
|
|
210
|
-
typeof r.getShadowRoot == "function" && r.getShadowRoot(a), l = !fe(c, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a));
|
|
211
|
-
if (c && l) {
|
|
212
|
-
var m = e(c === !0 ? a.children : c.children, !0, r);
|
|
213
|
-
r.flatten ? o.push.apply(o, m) : o.push({
|
|
214
|
-
scopeParent: a,
|
|
215
|
-
candidates: m
|
|
216
|
-
});
|
|
217
|
-
} else
|
|
218
|
-
s.unshift.apply(s, a.children);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return o;
|
|
222
|
-
}, Xe = function(t) {
|
|
223
|
-
return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
|
|
224
|
-
}, Ze = function(t) {
|
|
225
|
-
if (!t)
|
|
226
|
-
throw new Error("No node provided");
|
|
227
|
-
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || Ot(t)) && !Xe(t) ? 0 : t.tabIndex;
|
|
228
|
-
}, Dt = function(t, n) {
|
|
229
|
-
var r = Ze(t);
|
|
230
|
-
return r < 0 && n && !Xe(t) ? 0 : r;
|
|
231
|
-
}, Mt = function(t, n) {
|
|
232
|
-
return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
|
|
233
|
-
}, Je = function(t) {
|
|
234
|
-
return t.tagName === "INPUT";
|
|
235
|
-
}, Nt = function(t) {
|
|
236
|
-
return Je(t) && t.type === "hidden";
|
|
237
|
-
}, kt = function(t) {
|
|
238
|
-
var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
|
|
239
|
-
return r.tagName === "SUMMARY";
|
|
240
|
-
});
|
|
241
|
-
return n;
|
|
242
|
-
}, Lt = function(t, n) {
|
|
243
|
-
for (var r = 0; r < t.length; r++)
|
|
244
|
-
if (t[r].checked && t[r].form === n)
|
|
245
|
-
return t[r];
|
|
246
|
-
}, Bt = function(t) {
|
|
247
|
-
if (!t.name)
|
|
248
|
-
return !0;
|
|
249
|
-
var n = t.form || ce(t), r = function(u) {
|
|
250
|
-
return n.querySelectorAll('input[type="radio"][name="' + u + '"]');
|
|
251
|
-
}, o;
|
|
252
|
-
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
253
|
-
o = r(window.CSS.escape(t.name));
|
|
254
|
-
else
|
|
255
|
-
try {
|
|
256
|
-
o = r(t.name);
|
|
257
|
-
} catch (a) {
|
|
258
|
-
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1;
|
|
259
|
-
}
|
|
260
|
-
var s = Lt(o, t.form);
|
|
261
|
-
return !s || s === t;
|
|
262
|
-
}, Vt = function(t) {
|
|
263
|
-
return Je(t) && t.type === "radio";
|
|
264
|
-
}, $t = function(t) {
|
|
265
|
-
return Vt(t) && !Bt(t);
|
|
266
|
-
}, _t = function(t) {
|
|
267
|
-
var n, r = t && ce(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, s = !1;
|
|
268
|
-
if (r && r !== t) {
|
|
269
|
-
var a, u, f;
|
|
270
|
-
for (s = !!((a = o) !== null && a !== void 0 && (u = a.ownerDocument) !== null && u !== void 0 && u.contains(o) || t != null && (f = t.ownerDocument) !== null && f !== void 0 && f.contains(t)); !s && o; ) {
|
|
271
|
-
var d, b, c;
|
|
272
|
-
r = ce(o), o = (d = r) === null || d === void 0 ? void 0 : d.host, s = !!((b = o) !== null && b !== void 0 && (c = b.ownerDocument) !== null && c !== void 0 && c.contains(o));
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
return s;
|
|
276
|
-
}, ke = function(t) {
|
|
277
|
-
var n = t.getBoundingClientRect(), r = n.width, o = n.height;
|
|
278
|
-
return r === 0 && o === 0;
|
|
279
|
-
}, Kt = function(t, n) {
|
|
280
|
-
var r = n.displayCheck, o = n.getShadowRoot;
|
|
281
|
-
if (getComputedStyle(t).visibility === "hidden")
|
|
282
|
-
return !0;
|
|
283
|
-
var s = te.call(t, "details>summary:first-of-type"), a = s ? t.parentElement : t;
|
|
284
|
-
if (te.call(a, "details:not([open]) *"))
|
|
285
|
-
return !0;
|
|
286
|
-
if (!r || r === "full" || r === "legacy-full") {
|
|
287
|
-
if (typeof o == "function") {
|
|
288
|
-
for (var u = t; t; ) {
|
|
289
|
-
var f = t.parentElement, d = ce(t);
|
|
290
|
-
if (f && !f.shadowRoot && o(f) === !0)
|
|
291
|
-
return ke(t);
|
|
292
|
-
t.assignedSlot ? t = t.assignedSlot : !f && d !== t.ownerDocument ? t = d.host : t = f;
|
|
293
|
-
}
|
|
294
|
-
t = u;
|
|
295
|
-
}
|
|
296
|
-
if (_t(t))
|
|
297
|
-
return !t.getClientRects().length;
|
|
298
|
-
if (r !== "legacy-full")
|
|
299
|
-
return !0;
|
|
300
|
-
} else if (r === "non-zero-area")
|
|
301
|
-
return ke(t);
|
|
302
|
-
return !1;
|
|
303
|
-
}, Wt = function(t) {
|
|
304
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
|
|
305
|
-
for (var n = t.parentElement; n; ) {
|
|
306
|
-
if (n.tagName === "FIELDSET" && n.disabled) {
|
|
307
|
-
for (var r = 0; r < n.children.length; r++) {
|
|
308
|
-
var o = n.children.item(r);
|
|
309
|
-
if (o.tagName === "LEGEND")
|
|
310
|
-
return te.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
|
|
311
|
-
}
|
|
312
|
-
return !0;
|
|
313
|
-
}
|
|
314
|
-
n = n.parentElement;
|
|
315
|
-
}
|
|
316
|
-
return !1;
|
|
317
|
-
}, jt = function(t, n) {
|
|
318
|
-
return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
319
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
320
|
-
// note related to `candidateSelectors`)
|
|
321
|
-
fe(n) || Nt(n) || Kt(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
322
|
-
kt(n) || Wt(n));
|
|
323
|
-
}, Le = function(t, n) {
|
|
324
|
-
return !($t(n) || Ze(n) < 0 || !jt(t, n));
|
|
325
|
-
}, Ut = function(t) {
|
|
326
|
-
var n = parseInt(t.getAttribute("tabindex"), 10);
|
|
327
|
-
return !!(isNaN(n) || n >= 0);
|
|
328
|
-
}, Ht = function e(t) {
|
|
329
|
-
var n = [], r = [];
|
|
330
|
-
return t.forEach(function(o, s) {
|
|
331
|
-
var a = !!o.scopeParent, u = a ? o.scopeParent : o, f = Dt(u, a), d = a ? e(o.candidates) : u;
|
|
332
|
-
f === 0 ? a ? n.push.apply(n, d) : n.push(u) : r.push({
|
|
333
|
-
documentOrder: s,
|
|
334
|
-
tabIndex: f,
|
|
335
|
-
item: o,
|
|
336
|
-
isScope: a,
|
|
337
|
-
content: d
|
|
338
|
-
});
|
|
339
|
-
}), r.sort(Mt).reduce(function(o, s) {
|
|
340
|
-
return s.isScope ? o.push.apply(o, s.content) : o.push(s.content), o;
|
|
341
|
-
}, []).concat(n);
|
|
342
|
-
}, de = function(t, n) {
|
|
343
|
-
n = n || {};
|
|
344
|
-
var r;
|
|
345
|
-
return n.getShadowRoot ? r = At([t], n.includeContainer, {
|
|
346
|
-
filter: Le.bind(null, n),
|
|
347
|
-
flatten: !1,
|
|
348
|
-
getShadowRoot: n.getShadowRoot,
|
|
349
|
-
shadowRootFilter: Ut
|
|
350
|
-
}) : r = Ft(t, n.includeContainer, Le.bind(null, n)), Ht(r);
|
|
351
|
-
}, H = typeof document < "u" ? Ue : He;
|
|
352
|
-
let ye = !1, qt = 0;
|
|
353
|
-
const Be = () => "floating-ui-" + qt++;
|
|
354
|
-
function zt() {
|
|
355
|
-
const [e, t] = i.useState(() => ye ? Be() : void 0);
|
|
356
|
-
return H(() => {
|
|
357
|
-
e == null && t(Be());
|
|
358
|
-
}, []), i.useEffect(() => {
|
|
359
|
-
ye || (ye = !0);
|
|
360
|
-
}, []), e;
|
|
361
|
-
}
|
|
362
|
-
const Yt = i.useId, ne = Yt || zt;
|
|
363
|
-
function Gt() {
|
|
364
|
-
const e = /* @__PURE__ */ new Map();
|
|
365
|
-
return {
|
|
366
|
-
emit(t, n) {
|
|
367
|
-
var r;
|
|
368
|
-
(r = e.get(t)) == null || r.forEach((o) => o(n));
|
|
369
|
-
},
|
|
370
|
-
on(t, n) {
|
|
371
|
-
e.set(t, [...e.get(t) || [], n]);
|
|
372
|
-
},
|
|
373
|
-
off(t, n) {
|
|
374
|
-
e.set(t, (e.get(t) || []).filter((r) => r !== n));
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
const Xt = /* @__PURE__ */ i.createContext(null), Zt = /* @__PURE__ */ i.createContext(null), Jt = () => {
|
|
379
|
-
var e;
|
|
380
|
-
return ((e = i.useContext(Xt)) == null ? void 0 : e.id) || null;
|
|
381
|
-
}, Pe = () => i.useContext(Zt);
|
|
382
|
-
function Z(e) {
|
|
383
|
-
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
384
|
-
}
|
|
385
|
-
function Qe() {
|
|
386
|
-
const e = navigator.userAgentData;
|
|
387
|
-
return e != null && e.platform ? e.platform : navigator.platform;
|
|
388
|
-
}
|
|
389
|
-
function Qt() {
|
|
390
|
-
const e = navigator.userAgentData;
|
|
391
|
-
return e && Array.isArray(e.brands) ? e.brands.map((t) => {
|
|
392
|
-
let {
|
|
393
|
-
brand: n,
|
|
394
|
-
version: r
|
|
395
|
-
} = t;
|
|
396
|
-
return n + "/" + r;
|
|
397
|
-
}).join(" ") : navigator.userAgent;
|
|
398
|
-
}
|
|
399
|
-
function Oe(e) {
|
|
400
|
-
return Z(e).defaultView || window;
|
|
401
|
-
}
|
|
402
|
-
function z(e) {
|
|
403
|
-
return e ? e instanceof Oe(e).Element : !1;
|
|
404
|
-
}
|
|
405
|
-
function re(e) {
|
|
406
|
-
return e ? e instanceof Oe(e).HTMLElement : !1;
|
|
407
|
-
}
|
|
408
|
-
function en(e) {
|
|
409
|
-
if (typeof ShadowRoot > "u")
|
|
410
|
-
return !1;
|
|
411
|
-
const t = Oe(e).ShadowRoot;
|
|
412
|
-
return e instanceof t || e instanceof ShadowRoot;
|
|
413
|
-
}
|
|
414
|
-
function tn(e) {
|
|
415
|
-
if (e.mozInputSource === 0 && e.isTrusted)
|
|
416
|
-
return !0;
|
|
417
|
-
const t = /Android/i;
|
|
418
|
-
return (t.test(Qe()) || t.test(Qt())) && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
419
|
-
}
|
|
420
|
-
function nn(e) {
|
|
421
|
-
return e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType !== "mouse" || // iOS VoiceOver returns 0.333• for width/height.
|
|
422
|
-
e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0;
|
|
423
|
-
}
|
|
424
|
-
function Ve() {
|
|
425
|
-
return /apple/i.test(navigator.vendor);
|
|
426
|
-
}
|
|
427
|
-
function rn() {
|
|
428
|
-
return Qe().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
|
|
429
|
-
}
|
|
430
|
-
function $e(e, t) {
|
|
431
|
-
return ["mouse", "pen"].includes(e);
|
|
432
|
-
}
|
|
433
|
-
function U(e, t) {
|
|
434
|
-
if (!e || !t)
|
|
435
|
-
return !1;
|
|
436
|
-
const n = t.getRootNode && t.getRootNode();
|
|
437
|
-
if (e.contains(t))
|
|
438
|
-
return !0;
|
|
439
|
-
if (n && en(n)) {
|
|
440
|
-
let r = t;
|
|
441
|
-
do {
|
|
442
|
-
if (r && e === r)
|
|
443
|
-
return !0;
|
|
444
|
-
r = r.parentNode || r.host;
|
|
445
|
-
} while (r);
|
|
446
|
-
}
|
|
447
|
-
return !1;
|
|
448
|
-
}
|
|
449
|
-
function ue(e, t) {
|
|
450
|
-
let n = e.filter((o) => {
|
|
451
|
-
var s;
|
|
452
|
-
return o.parentId === t && ((s = o.context) == null ? void 0 : s.open);
|
|
453
|
-
}) || [], r = n;
|
|
454
|
-
for (; r.length; )
|
|
455
|
-
r = e.filter((o) => {
|
|
456
|
-
var s;
|
|
457
|
-
return (s = r) == null ? void 0 : s.some((a) => {
|
|
458
|
-
var u;
|
|
459
|
-
return o.parentId === a.id && ((u = o.context) == null ? void 0 : u.open);
|
|
460
|
-
});
|
|
461
|
-
}) || [], n = n.concat(r);
|
|
462
|
-
return n;
|
|
463
|
-
}
|
|
464
|
-
function et(e) {
|
|
465
|
-
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
466
|
-
}
|
|
467
|
-
function on(e) {
|
|
468
|
-
const t = Q(e);
|
|
469
|
-
return H(() => {
|
|
470
|
-
t.current = e;
|
|
471
|
-
}), t;
|
|
472
|
-
}
|
|
473
|
-
function pe() {
|
|
474
|
-
return pe = Object.assign || function(e) {
|
|
475
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
476
|
-
var n = arguments[t];
|
|
477
|
-
for (var r in n)
|
|
478
|
-
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
479
|
-
}
|
|
480
|
-
return e;
|
|
481
|
-
}, pe.apply(this, arguments);
|
|
482
|
-
}
|
|
483
|
-
function Te(e) {
|
|
484
|
-
let t = e.activeElement;
|
|
485
|
-
for (; ((n = t) == null || (r = n.shadowRoot) == null ? void 0 : r.activeElement) != null; ) {
|
|
486
|
-
var n, r;
|
|
487
|
-
t = t.shadowRoot.activeElement;
|
|
488
|
-
}
|
|
489
|
-
return t;
|
|
490
|
-
}
|
|
491
|
-
let _e = 0;
|
|
492
|
-
function q(e, t) {
|
|
493
|
-
t === void 0 && (t = {});
|
|
494
|
-
const {
|
|
495
|
-
preventScroll: n = !1,
|
|
496
|
-
cancelPrevious: r = !0,
|
|
497
|
-
sync: o = !1
|
|
498
|
-
} = t;
|
|
499
|
-
r && cancelAnimationFrame(_e);
|
|
500
|
-
const s = () => e == null ? void 0 : e.focus({
|
|
501
|
-
preventScroll: n
|
|
502
|
-
});
|
|
503
|
-
o ? s() : _e = requestAnimationFrame(s);
|
|
504
|
-
}
|
|
505
|
-
function sn(e, t) {
|
|
506
|
-
var n;
|
|
507
|
-
let r = [], o = (n = e.find((s) => s.id === t)) == null ? void 0 : n.parentId;
|
|
508
|
-
for (; o; ) {
|
|
509
|
-
const s = e.find((a) => a.id === o);
|
|
510
|
-
o = s == null ? void 0 : s.parentId, s && (r = r.concat(s));
|
|
511
|
-
}
|
|
512
|
-
return r;
|
|
513
|
-
}
|
|
514
|
-
const an = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
515
|
-
function tt(e) {
|
|
516
|
-
return re(e) && e.matches(an);
|
|
517
|
-
}
|
|
518
|
-
function Ee(e) {
|
|
519
|
-
e.preventDefault(), e.stopPropagation();
|
|
520
|
-
}
|
|
521
|
-
const me = () => ({
|
|
522
|
-
getShadowRoot: !0,
|
|
523
|
-
displayCheck: (
|
|
524
|
-
// JSDOM does not support the `tabbable` library. To solve this we can
|
|
525
|
-
// check if `ResizeObserver` is a real function (not polyfilled), which
|
|
526
|
-
// determines if the current environment is JSDOM-like.
|
|
527
|
-
typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
|
|
528
|
-
)
|
|
529
|
-
});
|
|
530
|
-
function nt(e, t) {
|
|
531
|
-
const n = de(e, me());
|
|
532
|
-
t === "prev" && n.reverse();
|
|
533
|
-
const r = n.indexOf(Te(Z(e)));
|
|
534
|
-
return n.slice(r + 1)[0];
|
|
535
|
-
}
|
|
536
|
-
function rt() {
|
|
537
|
-
return nt(document.body, "next");
|
|
538
|
-
}
|
|
539
|
-
function ot() {
|
|
540
|
-
return nt(document.body, "prev");
|
|
541
|
-
}
|
|
542
|
-
function ee(e, t) {
|
|
543
|
-
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
544
|
-
return !r || !U(n, r);
|
|
545
|
-
}
|
|
546
|
-
function un(e) {
|
|
547
|
-
de(e, me()).forEach((n) => {
|
|
548
|
-
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
function ln(e) {
|
|
552
|
-
e.querySelectorAll("[data-tabindex]").forEach((n) => {
|
|
553
|
-
const r = n.dataset.tabindex;
|
|
554
|
-
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
const cn = i.useInsertionEffect, fn = cn || ((e) => e());
|
|
558
|
-
function Fe(e) {
|
|
559
|
-
const t = i.useRef(() => {
|
|
560
|
-
if (process.env.NODE_ENV !== "production")
|
|
561
|
-
throw new Error("Cannot call an event handler while rendering.");
|
|
562
|
-
});
|
|
563
|
-
return fn(() => {
|
|
564
|
-
t.current = e;
|
|
565
|
-
}), i.useCallback(function() {
|
|
566
|
-
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
567
|
-
r[o] = arguments[o];
|
|
568
|
-
return t.current == null ? void 0 : t.current(...r);
|
|
569
|
-
}, []);
|
|
570
|
-
}
|
|
571
|
-
const Ae = {
|
|
572
|
-
border: 0,
|
|
573
|
-
clip: "rect(0 0 0 0)",
|
|
574
|
-
height: "1px",
|
|
575
|
-
margin: "-1px",
|
|
576
|
-
overflow: "hidden",
|
|
577
|
-
padding: 0,
|
|
578
|
-
position: "fixed",
|
|
579
|
-
whiteSpace: "nowrap",
|
|
580
|
-
width: "1px",
|
|
581
|
-
top: 0,
|
|
582
|
-
left: 0
|
|
583
|
-
};
|
|
584
|
-
let Ce, De;
|
|
585
|
-
function Ke(e) {
|
|
586
|
-
e.key === "Tab" && (Ce = e.target, clearTimeout(De));
|
|
587
|
-
}
|
|
588
|
-
function dn(e) {
|
|
589
|
-
const t = Ce === e.relatedTarget;
|
|
590
|
-
return Ce = e.relatedTarget, clearTimeout(De), t;
|
|
591
|
-
}
|
|
592
|
-
const ve = /* @__PURE__ */ i.forwardRef(function(t, n) {
|
|
593
|
-
const r = Fe(t.onFocus), [o, s] = i.useState();
|
|
594
|
-
return H(() => (Ve() && s("button"), document.addEventListener("keydown", Ke), () => {
|
|
595
|
-
document.removeEventListener("keydown", Ke);
|
|
596
|
-
}), []), /* @__PURE__ */ i.createElement("span", pe({}, t, {
|
|
597
|
-
ref: n,
|
|
598
|
-
tabIndex: 0,
|
|
599
|
-
role: o,
|
|
600
|
-
"aria-hidden": o ? void 0 : !0,
|
|
601
|
-
"data-floating-ui-focus-guard": "",
|
|
602
|
-
style: Ae,
|
|
603
|
-
onFocus: (a) => {
|
|
604
|
-
Ve() && rn() && !dn(a) ? (a.persist(), De = window.setTimeout(() => {
|
|
605
|
-
r(a);
|
|
606
|
-
}, 50)) : r(a);
|
|
607
|
-
}
|
|
608
|
-
}));
|
|
609
|
-
}), st = /* @__PURE__ */ i.createContext(null), pn = function(e) {
|
|
610
|
-
let {
|
|
611
|
-
id: t,
|
|
612
|
-
enabled: n = !0
|
|
613
|
-
} = e === void 0 ? {} : e;
|
|
614
|
-
const [r, o] = i.useState(null), s = ne(), a = it();
|
|
615
|
-
return H(() => {
|
|
616
|
-
if (!n)
|
|
617
|
-
return;
|
|
618
|
-
const u = t ? document.getElementById(t) : null;
|
|
619
|
-
if (u)
|
|
620
|
-
u.setAttribute("data-floating-ui-portal", ""), o(u);
|
|
621
|
-
else {
|
|
622
|
-
const f = document.createElement("div");
|
|
623
|
-
f.id = t || s, f.setAttribute("data-floating-ui-portal", ""), o(f);
|
|
624
|
-
const d = (a == null ? void 0 : a.portalNode) || document.body;
|
|
625
|
-
return d.appendChild(f), () => {
|
|
626
|
-
d.removeChild(f);
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
}, [t, a, s, n]), r;
|
|
630
|
-
}, mn = (e) => {
|
|
631
|
-
let {
|
|
632
|
-
children: t,
|
|
633
|
-
id: n,
|
|
634
|
-
root: r = null,
|
|
635
|
-
preserveTabOrder: o = !0
|
|
636
|
-
} = e;
|
|
637
|
-
const s = pn({
|
|
638
|
-
id: n,
|
|
639
|
-
enabled: !r
|
|
640
|
-
}), [a, u] = i.useState(null), f = i.useRef(null), d = i.useRef(null), b = i.useRef(null), c = i.useRef(null), l = (
|
|
641
|
-
// The FocusManager and therefore floating element are currently open/
|
|
642
|
-
// rendered.
|
|
643
|
-
!!a && // Guards are only for non-modal focus management.
|
|
644
|
-
!a.modal && !!(r || s) && o
|
|
645
|
-
);
|
|
646
|
-
return i.useEffect(() => {
|
|
647
|
-
if (!s || !o || a != null && a.modal)
|
|
648
|
-
return;
|
|
649
|
-
function m(R) {
|
|
650
|
-
s && ee(R) && (R.type === "focusin" ? ln : un)(s);
|
|
651
|
-
}
|
|
652
|
-
return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
|
|
653
|
-
s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
|
|
654
|
-
};
|
|
655
|
-
}, [s, o, a == null ? void 0 : a.modal]), /* @__PURE__ */ i.createElement(st.Provider, {
|
|
656
|
-
value: i.useMemo(() => ({
|
|
657
|
-
preserveTabOrder: o,
|
|
658
|
-
beforeOutsideRef: f,
|
|
659
|
-
afterOutsideRef: d,
|
|
660
|
-
beforeInsideRef: b,
|
|
661
|
-
afterInsideRef: c,
|
|
662
|
-
portalNode: s,
|
|
663
|
-
setFocusManagerState: u
|
|
664
|
-
}), [o, s])
|
|
665
|
-
}, l && s && /* @__PURE__ */ i.createElement(ve, {
|
|
666
|
-
ref: f,
|
|
667
|
-
onFocus: (m) => {
|
|
668
|
-
if (ee(m, s)) {
|
|
669
|
-
var R;
|
|
670
|
-
(R = b.current) == null || R.focus();
|
|
671
|
-
} else {
|
|
672
|
-
const v = ot() || (a == null ? void 0 : a.refs.domReference.current);
|
|
673
|
-
v == null || v.focus();
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}), l && s && /* @__PURE__ */ i.createElement("span", {
|
|
677
|
-
"aria-owns": s.id,
|
|
678
|
-
style: Ae
|
|
679
|
-
}), r ? /* @__PURE__ */ xe.createPortal(t, r) : s ? /* @__PURE__ */ xe.createPortal(t, s) : null, l && s && /* @__PURE__ */ i.createElement(ve, {
|
|
680
|
-
ref: d,
|
|
681
|
-
onFocus: (m) => {
|
|
682
|
-
if (ee(m, s)) {
|
|
683
|
-
var R;
|
|
684
|
-
(R = c.current) == null || R.focus();
|
|
685
|
-
} else {
|
|
686
|
-
const v = rt() || (a == null ? void 0 : a.refs.domReference.current);
|
|
687
|
-
v == null || v.focus(), a != null && a.closeOnFocusOut && (a == null || a.onOpenChange(!1));
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}));
|
|
691
|
-
}, it = () => i.useContext(st), vn = /* @__PURE__ */ i.forwardRef(function(t, n) {
|
|
692
|
-
return /* @__PURE__ */ i.createElement("button", pe({}, t, {
|
|
693
|
-
ref: n,
|
|
694
|
-
tabIndex: -1,
|
|
695
|
-
style: Ae
|
|
696
|
-
}));
|
|
697
|
-
});
|
|
698
|
-
function bn(e) {
|
|
699
|
-
let {
|
|
700
|
-
context: t,
|
|
701
|
-
children: n,
|
|
702
|
-
order: r = ["content"],
|
|
703
|
-
guards: o = !0,
|
|
704
|
-
initialFocus: s = 0,
|
|
705
|
-
returnFocus: a = !0,
|
|
706
|
-
modal: u = !0,
|
|
707
|
-
visuallyHiddenDismiss: f = !1,
|
|
708
|
-
closeOnFocusOut: d = !0
|
|
709
|
-
} = e;
|
|
710
|
-
const {
|
|
711
|
-
refs: b,
|
|
712
|
-
nodeId: c,
|
|
713
|
-
onOpenChange: l,
|
|
714
|
-
events: m,
|
|
715
|
-
dataRef: R,
|
|
716
|
-
elements: {
|
|
717
|
-
domReference: v,
|
|
718
|
-
floating: p
|
|
719
|
-
}
|
|
720
|
-
} = t, h = on(r), I = Pe(), y = it(), [A, B] = i.useState(null), D = typeof s == "number" && s < 0, K = i.useRef(null), j = i.useRef(null), V = i.useRef(!1), C = i.useRef(null), M = i.useRef(!1), F = y != null, S = v && v.getAttribute("role") === "combobox" && tt(v), k = i.useCallback(function(g) {
|
|
721
|
-
return g === void 0 && (g = p), g ? de(g, me()) : [];
|
|
722
|
-
}, [p]), O = i.useCallback((g) => {
|
|
723
|
-
const w = k(g);
|
|
724
|
-
return h.current.map((E) => v && E === "reference" ? v : p && E === "floating" ? p : w).filter(Boolean).flat();
|
|
725
|
-
}, [v, p, h, k]);
|
|
726
|
-
i.useEffect(() => {
|
|
727
|
-
if (!u)
|
|
728
|
-
return;
|
|
729
|
-
function g(E) {
|
|
730
|
-
if (E.key === "Tab") {
|
|
731
|
-
k().length === 0 && !S && Ee(E);
|
|
732
|
-
const P = O(), $ = et(E);
|
|
733
|
-
h.current[0] === "reference" && $ === v && (Ee(E), E.shiftKey ? q(P[P.length - 1]) : q(P[1])), h.current[1] === "floating" && $ === p && E.shiftKey && (Ee(E), q(P[0]));
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
const w = Z(p);
|
|
737
|
-
return w.addEventListener("keydown", g), () => {
|
|
738
|
-
w.removeEventListener("keydown", g);
|
|
739
|
-
};
|
|
740
|
-
}, [v, p, u, h, b, S, k, O]), i.useEffect(() => {
|
|
741
|
-
if (!d)
|
|
742
|
-
return;
|
|
743
|
-
function g() {
|
|
744
|
-
M.current = !0, setTimeout(() => {
|
|
745
|
-
M.current = !1;
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
function w(E) {
|
|
749
|
-
const P = E.relatedTarget, $ = !(U(v, P) || U(p, P) || U(P, p) || U(y == null ? void 0 : y.portalNode, P) || P != null && P.hasAttribute("data-floating-ui-focus-guard") || I && (ue(I.nodesRef.current, c).find((N) => {
|
|
750
|
-
var _, W;
|
|
751
|
-
return U((_ = N.context) == null ? void 0 : _.elements.floating, P) || U((W = N.context) == null ? void 0 : W.elements.domReference, P);
|
|
752
|
-
}) || sn(I.nodesRef.current, c).find((N) => {
|
|
753
|
-
var _, W;
|
|
754
|
-
return ((_ = N.context) == null ? void 0 : _.elements.floating) === P || ((W = N.context) == null ? void 0 : W.elements.domReference) === P;
|
|
755
|
-
})));
|
|
756
|
-
P && $ && !M.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
757
|
-
P !== C.current && (V.current = !0, setTimeout(() => l(!1)));
|
|
758
|
-
}
|
|
759
|
-
if (p && re(v))
|
|
760
|
-
return v.addEventListener("focusout", w), v.addEventListener("pointerdown", g), !u && p.addEventListener("focusout", w), () => {
|
|
761
|
-
v.removeEventListener("focusout", w), v.removeEventListener("pointerdown", g), !u && p.removeEventListener("focusout", w);
|
|
762
|
-
};
|
|
763
|
-
}, [v, p, u, c, I, y, l, d]), i.useEffect(() => {
|
|
764
|
-
var g;
|
|
765
|
-
const w = Array.from((y == null || (g = y.portalNode) == null ? void 0 : g.querySelectorAll("[data-floating-ui-portal]")) || []);
|
|
766
|
-
function E() {
|
|
767
|
-
return [K.current, j.current].filter(Boolean);
|
|
768
|
-
}
|
|
769
|
-
if (p && u) {
|
|
770
|
-
const P = [p, ...w, ...E()], $ = It(h.current.includes("reference") || S ? P.concat(v || []) : P);
|
|
771
|
-
return () => {
|
|
772
|
-
$();
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
}, [v, p, u, h, y, S]), i.useEffect(() => {
|
|
776
|
-
if (u && !o && p) {
|
|
777
|
-
const g = [], w = me(), E = de(Z(p).body, w), P = O(), $ = E.filter((N) => !P.includes(N));
|
|
778
|
-
return $.forEach((N, _) => {
|
|
779
|
-
g[_] = N.getAttribute("tabindex"), N.setAttribute("tabindex", "-1");
|
|
780
|
-
}), () => {
|
|
781
|
-
$.forEach((N, _) => {
|
|
782
|
-
const W = g[_];
|
|
783
|
-
W == null ? N.removeAttribute("tabindex") : N.setAttribute("tabindex", W);
|
|
784
|
-
});
|
|
785
|
-
};
|
|
786
|
-
}
|
|
787
|
-
}, [p, u, o, O]), H(() => {
|
|
788
|
-
if (!p) return;
|
|
789
|
-
const g = Z(p);
|
|
790
|
-
let w = a, E = !1;
|
|
791
|
-
const P = Te(g), $ = R.current;
|
|
792
|
-
C.current = P;
|
|
793
|
-
const N = O(p), _ = (typeof s == "number" ? N[s] : s.current) || p;
|
|
794
|
-
!D && q(_, {
|
|
795
|
-
preventScroll: _ === p
|
|
796
|
-
});
|
|
797
|
-
function W(Y) {
|
|
798
|
-
if (Y.type === "escapeKey" && b.domReference.current && (C.current = b.domReference.current), ["referencePress", "escapeKey"].includes(Y.type))
|
|
799
|
-
return;
|
|
800
|
-
const be = Y.data.returnFocus;
|
|
801
|
-
typeof be == "object" ? (w = !0, E = be.preventScroll) : w = be;
|
|
802
|
-
}
|
|
803
|
-
return m.on("dismiss", W), () => {
|
|
804
|
-
if (m.off("dismiss", W), U(p, Te(g)) && b.domReference.current && (C.current = b.domReference.current), w && re(C.current) && !V.current)
|
|
805
|
-
if (!b.domReference.current || M.current)
|
|
806
|
-
q(C.current, {
|
|
807
|
-
// When dismissing nested floating elements, by the time the rAF has
|
|
808
|
-
// executed, the menus will all have been unmounted. When they try
|
|
809
|
-
// to get focused, the calls get ignored — leaving the root
|
|
810
|
-
// reference focused as desired.
|
|
811
|
-
cancelPrevious: !1,
|
|
812
|
-
preventScroll: E
|
|
813
|
-
});
|
|
814
|
-
else {
|
|
815
|
-
var Y;
|
|
816
|
-
$.__syncReturnFocus = !0, (Y = C.current) == null || Y.focus({
|
|
817
|
-
preventScroll: E
|
|
818
|
-
}), setTimeout(() => {
|
|
819
|
-
delete $.__syncReturnFocus;
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
}, [p, O, s, a, R, b, m, D]), H(() => {
|
|
824
|
-
if (y)
|
|
825
|
-
return y.setFocusManagerState({
|
|
826
|
-
...t,
|
|
827
|
-
modal: u,
|
|
828
|
-
closeOnFocusOut: d
|
|
829
|
-
// Not concerned about the <RT> generic type.
|
|
830
|
-
}), () => {
|
|
831
|
-
y.setFocusManagerState(null);
|
|
832
|
-
};
|
|
833
|
-
}, [y, u, d, t]), H(() => {
|
|
834
|
-
if (D || !p) return;
|
|
835
|
-
function g() {
|
|
836
|
-
B(k().length);
|
|
837
|
-
}
|
|
838
|
-
if (g(), typeof MutationObserver == "function") {
|
|
839
|
-
const w = new MutationObserver(g);
|
|
840
|
-
return w.observe(p, {
|
|
841
|
-
childList: !0,
|
|
842
|
-
subtree: !0
|
|
843
|
-
}), () => {
|
|
844
|
-
w.disconnect();
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
}, [p, k, D, b]);
|
|
848
|
-
const J = o && (F || u) && !S;
|
|
849
|
-
function T(g) {
|
|
850
|
-
return f && u ? /* @__PURE__ */ i.createElement(vn, {
|
|
851
|
-
ref: g === "start" ? K : j,
|
|
852
|
-
onClick: () => l(!1)
|
|
853
|
-
}, typeof f == "string" ? f : "Dismiss") : null;
|
|
854
|
-
}
|
|
855
|
-
return /* @__PURE__ */ i.createElement(i.Fragment, null, J && /* @__PURE__ */ i.createElement(ve, {
|
|
856
|
-
ref: y == null ? void 0 : y.beforeInsideRef,
|
|
857
|
-
onFocus: (g) => {
|
|
858
|
-
if (u) {
|
|
859
|
-
const E = O();
|
|
860
|
-
q(r[0] === "reference" ? E[0] : E[E.length - 1]);
|
|
861
|
-
} else if (y != null && y.preserveTabOrder && y.portalNode)
|
|
862
|
-
if (V.current = !1, ee(g, y.portalNode)) {
|
|
863
|
-
const E = rt() || v;
|
|
864
|
-
E == null || E.focus();
|
|
865
|
-
} else {
|
|
866
|
-
var w;
|
|
867
|
-
(w = y.beforeOutsideRef.current) == null || w.focus();
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
}), S ? null : T("start"), /* @__PURE__ */ i.cloneElement(n, A === 0 || r.includes("floating") ? {
|
|
871
|
-
tabIndex: 0
|
|
872
|
-
} : {}), T("end"), J && /* @__PURE__ */ i.createElement(ve, {
|
|
873
|
-
ref: y == null ? void 0 : y.afterInsideRef,
|
|
874
|
-
onFocus: (g) => {
|
|
875
|
-
if (u)
|
|
876
|
-
q(O()[0]);
|
|
877
|
-
else if (y != null && y.preserveTabOrder && y.portalNode)
|
|
878
|
-
if (V.current = !0, ee(g, y.portalNode)) {
|
|
879
|
-
const E = ot() || v;
|
|
880
|
-
E == null || E.focus();
|
|
881
|
-
} else {
|
|
882
|
-
var w;
|
|
883
|
-
(w = y.afterOutsideRef.current) == null || w.focus();
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}));
|
|
887
|
-
}
|
|
888
|
-
function We(e) {
|
|
889
|
-
return re(e.target) && e.target.tagName === "BUTTON";
|
|
890
|
-
}
|
|
891
|
-
function je(e) {
|
|
892
|
-
return tt(e);
|
|
893
|
-
}
|
|
894
|
-
const gn = function(e, t) {
|
|
895
|
-
let {
|
|
896
|
-
open: n,
|
|
897
|
-
onOpenChange: r,
|
|
898
|
-
dataRef: o,
|
|
899
|
-
refs: s
|
|
900
|
-
} = e, {
|
|
901
|
-
enabled: a = !0,
|
|
902
|
-
event: u = "click",
|
|
903
|
-
toggle: f = !0,
|
|
904
|
-
ignoreMouse: d = !1,
|
|
905
|
-
keyboardHandlers: b = !0
|
|
906
|
-
} = t === void 0 ? {} : t;
|
|
907
|
-
const c = i.useRef();
|
|
908
|
-
return i.useMemo(() => a ? {
|
|
909
|
-
reference: {
|
|
910
|
-
onPointerDown(l) {
|
|
911
|
-
c.current = l.pointerType;
|
|
912
|
-
},
|
|
913
|
-
onMouseDown(l) {
|
|
914
|
-
l.button === 0 && ($e(c.current) && d || u !== "click" && (n ? f && (!o.current.openEvent || o.current.openEvent.type === "mousedown") && r(!1) : (l.preventDefault(), r(!0)), o.current.openEvent = l.nativeEvent));
|
|
915
|
-
},
|
|
916
|
-
onClick(l) {
|
|
917
|
-
if (!o.current.__syncReturnFocus) {
|
|
918
|
-
if (u === "mousedown" && c.current) {
|
|
919
|
-
c.current = void 0;
|
|
920
|
-
return;
|
|
921
|
-
}
|
|
922
|
-
$e(c.current) && d || (n ? f && (!o.current.openEvent || o.current.openEvent.type === "click") && r(!1) : r(!0), o.current.openEvent = l.nativeEvent);
|
|
923
|
-
}
|
|
924
|
-
},
|
|
925
|
-
onKeyDown(l) {
|
|
926
|
-
c.current = void 0, b && (We(l) || (l.key === " " && !je(s.domReference.current) && l.preventDefault(), l.key === "Enter" && (n ? f && r(!1) : r(!0))));
|
|
927
|
-
},
|
|
928
|
-
onKeyUp(l) {
|
|
929
|
-
b && (We(l) || je(s.domReference.current) || l.key === " " && (n ? f && r(!1) : r(!0)));
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
} : {}, [a, o, u, d, b, s, f, n, r]);
|
|
933
|
-
};
|
|
934
|
-
function we(e, t) {
|
|
935
|
-
if (t == null)
|
|
936
|
-
return !1;
|
|
937
|
-
if ("composedPath" in e)
|
|
938
|
-
return e.composedPath().includes(t);
|
|
939
|
-
const n = e;
|
|
940
|
-
return n.target != null && t.contains(n.target);
|
|
941
|
-
}
|
|
942
|
-
const hn = {
|
|
943
|
-
pointerdown: "onPointerDown",
|
|
944
|
-
mousedown: "onMouseDown",
|
|
945
|
-
click: "onClick"
|
|
946
|
-
}, yn = {
|
|
947
|
-
pointerdown: "onPointerDownCapture",
|
|
948
|
-
mousedown: "onMouseDownCapture",
|
|
949
|
-
click: "onClickCapture"
|
|
950
|
-
}, En = function(e) {
|
|
951
|
-
var t, n;
|
|
952
|
-
return e === void 0 && (e = !0), {
|
|
953
|
-
escapeKeyBubbles: typeof e == "boolean" ? e : (t = e.escapeKey) != null ? t : !0,
|
|
954
|
-
outsidePressBubbles: typeof e == "boolean" ? e : (n = e.outsidePress) != null ? n : !0
|
|
955
|
-
};
|
|
956
|
-
}, wn = function(e, t) {
|
|
957
|
-
let {
|
|
958
|
-
open: n,
|
|
959
|
-
onOpenChange: r,
|
|
960
|
-
events: o,
|
|
961
|
-
nodeId: s,
|
|
962
|
-
elements: {
|
|
963
|
-
reference: a,
|
|
964
|
-
domReference: u,
|
|
965
|
-
floating: f
|
|
966
|
-
}
|
|
967
|
-
} = e, {
|
|
968
|
-
enabled: d = !0,
|
|
969
|
-
escapeKey: b = !0,
|
|
970
|
-
outsidePress: c = !0,
|
|
971
|
-
outsidePressEvent: l = "pointerdown",
|
|
972
|
-
referencePress: m = !1,
|
|
973
|
-
referencePressEvent: R = "pointerdown",
|
|
974
|
-
ancestorScroll: v = !1,
|
|
975
|
-
bubbles: p = !0
|
|
976
|
-
} = {};
|
|
977
|
-
const h = Pe(), I = Jt() != null, y = Fe(typeof c == "function" ? c : () => !1), A = typeof c == "function" ? y : c, B = i.useRef(!1), {
|
|
978
|
-
escapeKeyBubbles: D,
|
|
979
|
-
outsidePressBubbles: K
|
|
980
|
-
} = En(p);
|
|
981
|
-
return i.useEffect(() => {
|
|
982
|
-
if (!n || !d)
|
|
983
|
-
return;
|
|
984
|
-
function j(S) {
|
|
985
|
-
if (S.key === "Escape") {
|
|
986
|
-
if (!D && h && ue(h.nodesRef.current, s).length > 0)
|
|
987
|
-
return;
|
|
988
|
-
o.emit("dismiss", {
|
|
989
|
-
type: "escapeKey",
|
|
990
|
-
data: {
|
|
991
|
-
returnFocus: {
|
|
992
|
-
preventScroll: !1
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}), r(!1);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
function V(S) {
|
|
999
|
-
const k = B.current;
|
|
1000
|
-
if (B.current = !1, k || typeof A == "function" && !A(S))
|
|
1001
|
-
return;
|
|
1002
|
-
const O = et(S);
|
|
1003
|
-
if (re(O) && f) {
|
|
1004
|
-
const T = f.ownerDocument.defaultView || window, g = O.scrollWidth > O.clientWidth, w = O.scrollHeight > O.clientHeight;
|
|
1005
|
-
let E = w && S.offsetX > O.clientWidth;
|
|
1006
|
-
if (w && T.getComputedStyle(O).direction === "rtl" && (E = S.offsetX <= O.offsetWidth - O.clientWidth), E || g && S.offsetY > O.clientHeight)
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
|
-
const J = h && ue(h.nodesRef.current, s).some((T) => {
|
|
1010
|
-
var g;
|
|
1011
|
-
return we(S, (g = T.context) == null ? void 0 : g.elements.floating);
|
|
1012
|
-
});
|
|
1013
|
-
we(S, f) || we(S, u) || J || !K && h && ue(h.nodesRef.current, s).length > 0 || (o.emit("dismiss", {
|
|
1014
|
-
type: "outsidePress",
|
|
1015
|
-
data: {
|
|
1016
|
-
returnFocus: I ? {
|
|
1017
|
-
preventScroll: !0
|
|
1018
|
-
} : tn(S) || nn(S)
|
|
1019
|
-
}
|
|
1020
|
-
}), r(!1));
|
|
1021
|
-
}
|
|
1022
|
-
function C() {
|
|
1023
|
-
r(!1);
|
|
1024
|
-
}
|
|
1025
|
-
const M = Z(f);
|
|
1026
|
-
b && M.addEventListener("keydown", j), A && M.addEventListener(l, V);
|
|
1027
|
-
let F = [];
|
|
1028
|
-
return v && (z(u) && (F = ge(u)), z(f) && (F = F.concat(ge(f))), !z(a) && a && a.contextElement && (F = F.concat(ge(a.contextElement)))), F = F.filter((S) => {
|
|
1029
|
-
var k;
|
|
1030
|
-
return S !== ((k = M.defaultView) == null ? void 0 : k.visualViewport);
|
|
1031
|
-
}), F.forEach((S) => {
|
|
1032
|
-
S.addEventListener("scroll", C, {
|
|
1033
|
-
passive: !0
|
|
1034
|
-
});
|
|
1035
|
-
}), () => {
|
|
1036
|
-
b && M.removeEventListener("keydown", j), A && M.removeEventListener(l, V), F.forEach((S) => {
|
|
1037
|
-
S.removeEventListener("scroll", C);
|
|
1038
|
-
});
|
|
1039
|
-
};
|
|
1040
|
-
}, [f, u, a, b, A, l, o, h, s, n, r, v, d, D, K, I]), i.useEffect(() => {
|
|
1041
|
-
B.current = !1;
|
|
1042
|
-
}, [A, l]), i.useMemo(() => d ? {
|
|
1043
|
-
reference: {
|
|
1044
|
-
[hn[R]]: () => {
|
|
1045
|
-
m && (o.emit("dismiss", {
|
|
1046
|
-
type: "referencePress",
|
|
1047
|
-
data: {
|
|
1048
|
-
returnFocus: !1
|
|
1049
|
-
}
|
|
1050
|
-
}), r(!1));
|
|
1051
|
-
}
|
|
1052
|
-
},
|
|
1053
|
-
floating: {
|
|
1054
|
-
[yn[l]]: () => {
|
|
1055
|
-
B.current = !0;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
} : {}, [d, o, m, l, R, r]);
|
|
1059
|
-
};
|
|
1060
|
-
function at(e) {
|
|
1061
|
-
return i.useMemo(() => e.every((t) => t == null) ? null : (t) => {
|
|
1062
|
-
e.forEach((n) => {
|
|
1063
|
-
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
1064
|
-
});
|
|
1065
|
-
}, e);
|
|
1066
|
-
}
|
|
1067
|
-
const Rn = function(e, t) {
|
|
1068
|
-
let {
|
|
1069
|
-
open: n
|
|
1070
|
-
} = e, {
|
|
1071
|
-
enabled: r = !0,
|
|
1072
|
-
role: o = "dialog"
|
|
1073
|
-
} = {};
|
|
1074
|
-
const s = ne(), a = ne();
|
|
1075
|
-
return i.useMemo(() => {
|
|
1076
|
-
const u = {
|
|
1077
|
-
id: s,
|
|
1078
|
-
role: o
|
|
1079
|
-
};
|
|
1080
|
-
return r ? o === "tooltip" ? {
|
|
1081
|
-
reference: {
|
|
1082
|
-
"aria-describedby": n ? s : void 0
|
|
1083
|
-
},
|
|
1084
|
-
floating: u
|
|
1085
|
-
} : {
|
|
1086
|
-
reference: {
|
|
1087
|
-
"aria-expanded": n ? "true" : "false",
|
|
1088
|
-
"aria-haspopup": o === "alertdialog" ? "dialog" : o,
|
|
1089
|
-
"aria-controls": n ? s : void 0,
|
|
1090
|
-
...o === "listbox" && {
|
|
1091
|
-
role: "combobox"
|
|
1092
|
-
},
|
|
1093
|
-
...o === "menu" && {
|
|
1094
|
-
id: a
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
|
-
floating: {
|
|
1098
|
-
...u,
|
|
1099
|
-
...o === "menu" && {
|
|
1100
|
-
"aria-labelledby": a
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
} : {};
|
|
1104
|
-
}, [r, o, n, s, a]);
|
|
1105
|
-
};
|
|
1106
|
-
function xn(e) {
|
|
1107
|
-
e === void 0 && (e = {});
|
|
1108
|
-
const {
|
|
1109
|
-
open: t = !1,
|
|
1110
|
-
onOpenChange: n,
|
|
1111
|
-
nodeId: r
|
|
1112
|
-
} = e, o = xt(e), s = Pe(), a = i.useRef(null), u = i.useRef({}), f = i.useState(() => Gt())[0], [d, b] = i.useState(null), c = i.useCallback((h) => {
|
|
1113
|
-
const I = z(h) ? {
|
|
1114
|
-
getBoundingClientRect: () => h.getBoundingClientRect(),
|
|
1115
|
-
contextElement: h
|
|
1116
|
-
} : h;
|
|
1117
|
-
o.refs.setReference(I);
|
|
1118
|
-
}, [o.refs]), l = i.useCallback((h) => {
|
|
1119
|
-
(z(h) || h === null) && (a.current = h, b(h)), (z(o.refs.reference.current) || o.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
1120
|
-
// `null` to support `positionReference` + an unstable `reference`
|
|
1121
|
-
// callback ref.
|
|
1122
|
-
h !== null && !z(h)) && o.refs.setReference(h);
|
|
1123
|
-
}, [o.refs]), m = i.useMemo(() => ({
|
|
1124
|
-
...o.refs,
|
|
1125
|
-
setReference: l,
|
|
1126
|
-
setPositionReference: c,
|
|
1127
|
-
domReference: a
|
|
1128
|
-
}), [o.refs, l, c]), R = i.useMemo(() => ({
|
|
1129
|
-
...o.elements,
|
|
1130
|
-
domReference: d
|
|
1131
|
-
}), [o.elements, d]), v = Fe(n), p = i.useMemo(() => ({
|
|
1132
|
-
...o,
|
|
1133
|
-
refs: m,
|
|
1134
|
-
elements: R,
|
|
1135
|
-
dataRef: u,
|
|
1136
|
-
nodeId: r,
|
|
1137
|
-
events: f,
|
|
1138
|
-
open: t,
|
|
1139
|
-
onOpenChange: v
|
|
1140
|
-
}), [o, r, f, t, v, m, R]);
|
|
1141
|
-
return H(() => {
|
|
1142
|
-
const h = s == null ? void 0 : s.nodesRef.current.find((I) => I.id === r);
|
|
1143
|
-
h && (h.context = p);
|
|
1144
|
-
}), i.useMemo(() => ({
|
|
1145
|
-
...o,
|
|
1146
|
-
context: p,
|
|
1147
|
-
refs: m,
|
|
1148
|
-
reference: l,
|
|
1149
|
-
positionReference: c
|
|
1150
|
-
}), [o, m, p, l, c]);
|
|
1151
|
-
}
|
|
1152
|
-
function Re(e, t, n) {
|
|
1153
|
-
const r = /* @__PURE__ */ new Map();
|
|
1154
|
-
return {
|
|
1155
|
-
...n === "floating" && {
|
|
1156
|
-
tabIndex: -1
|
|
1157
|
-
},
|
|
1158
|
-
...e,
|
|
1159
|
-
...t.map((o) => o ? o[n] : null).concat(e).reduce((o, s) => (s && Object.entries(s).forEach((a) => {
|
|
1160
|
-
let [u, f] = a;
|
|
1161
|
-
if (u.indexOf("on") === 0) {
|
|
1162
|
-
if (r.has(u) || r.set(u, []), typeof f == "function") {
|
|
1163
|
-
var d;
|
|
1164
|
-
(d = r.get(u)) == null || d.push(f), o[u] = function() {
|
|
1165
|
-
for (var b, c = arguments.length, l = new Array(c), m = 0; m < c; m++)
|
|
1166
|
-
l[m] = arguments[m];
|
|
1167
|
-
(b = r.get(u)) == null || b.forEach((R) => R(...l));
|
|
1168
|
-
};
|
|
1169
|
-
}
|
|
1170
|
-
} else
|
|
1171
|
-
o[u] = f;
|
|
1172
|
-
}), o), {})
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
const Sn = function(e) {
|
|
1176
|
-
e === void 0 && (e = []);
|
|
1177
|
-
const t = e, n = i.useCallback(
|
|
1178
|
-
(s) => Re(s, e, "reference"),
|
|
1179
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1180
|
-
t
|
|
1181
|
-
), r = i.useCallback(
|
|
1182
|
-
(s) => Re(s, e, "floating"),
|
|
1183
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1184
|
-
t
|
|
1185
|
-
), o = i.useCallback(
|
|
1186
|
-
(s) => Re(s, e, "item"),
|
|
1187
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1188
|
-
t
|
|
1189
|
-
);
|
|
1190
|
-
return i.useMemo(() => ({
|
|
1191
|
-
getReferenceProps: n,
|
|
1192
|
-
getFloatingProps: r,
|
|
1193
|
-
getItemProps: o
|
|
1194
|
-
}), [n, r, o]);
|
|
1195
|
-
}, Tn = Ie(ze.div)`
|
|
1196
|
-
font-family: ${(e) => {
|
|
1197
|
-
var t, n;
|
|
1198
|
-
return (n = (t = e.theme) == null ? void 0 : t.typography) == null ? void 0 : n.fontFamily;
|
|
1199
|
-
}};
|
|
1200
|
-
animation: fadeIn 0.4s;
|
|
1201
|
-
box-shadow: ${(e) => mt(
|
|
1202
|
-
e.theme,
|
|
1203
|
-
"Popover",
|
|
1204
|
-
e.color,
|
|
1205
|
-
"enabled",
|
|
1206
|
-
"boxShadow"
|
|
1207
|
-
)};
|
|
1208
|
-
border-radius: ${(e) => vt(e.theme, e.borderRadius)};
|
|
1209
|
-
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
|
1210
|
-
box-sizing: border-box;
|
|
1211
|
-
padding: 0.25rem;
|
|
1212
|
-
background-color: ${(e) => qe(e.theme, "Popover", "default", "enabled", "bg")};
|
|
1213
|
-
`;
|
|
1214
|
-
function Cn({
|
|
1215
|
-
initialOpen: e = !1,
|
|
1216
|
-
placement: t,
|
|
1217
|
-
offsetValue: n,
|
|
1218
|
-
modal: r = !0,
|
|
1219
|
-
open: o,
|
|
1220
|
-
onOpenChange: s
|
|
1221
|
-
}) {
|
|
1222
|
-
const [a, u] = i.useState(e), [f, d] = i.useState(void 0), [b, c] = i.useState(void 0), l = o ?? a, m = s ?? u, R = xn({
|
|
1223
|
-
placement: t,
|
|
1224
|
-
open: l,
|
|
1225
|
-
onOpenChange: m,
|
|
1226
|
-
whileElementsMounted: ht,
|
|
1227
|
-
middleware: [
|
|
1228
|
-
yt(n),
|
|
1229
|
-
Et({
|
|
1230
|
-
fallbackAxisSideDirection: "end"
|
|
1231
|
-
}),
|
|
1232
|
-
wt({ padding: 5 })
|
|
1233
|
-
]
|
|
1234
|
-
}), v = R.context, p = gn(v, {
|
|
1235
|
-
enabled: o == null
|
|
1236
|
-
}), h = wn(v), I = Rn(v), y = Sn([p, h, I]);
|
|
1237
|
-
return i.useMemo(
|
|
1238
|
-
() => ({
|
|
1239
|
-
open: l,
|
|
1240
|
-
setOpen: m,
|
|
1241
|
-
...y,
|
|
1242
|
-
...R,
|
|
1243
|
-
modal: r,
|
|
1244
|
-
labelId: f,
|
|
1245
|
-
descriptionId: b,
|
|
1246
|
-
setLabelId: d,
|
|
1247
|
-
setDescriptionId: c
|
|
1248
|
-
}),
|
|
1249
|
-
[l, m, y, R, r, f, b]
|
|
1250
|
-
);
|
|
1251
|
-
}
|
|
1252
|
-
const ut = i.createContext(null), oe = () => {
|
|
1253
|
-
const e = i.useContext(ut);
|
|
1254
|
-
if (e == null)
|
|
1255
|
-
throw new Error("Popover components must be wrapped in <Popover />");
|
|
1256
|
-
return e;
|
|
1257
|
-
};
|
|
1258
|
-
function lt({ children: e, modal: t = !1, ...n }) {
|
|
1259
|
-
const r = Cn({ modal: t, ...n });
|
|
1260
|
-
return /* @__PURE__ */ L(ut.Provider, { value: r, children: e });
|
|
1261
|
-
}
|
|
1262
|
-
lt.propTypes = {
|
|
1263
|
-
initialOpen: x.bool,
|
|
1264
|
-
placement: x.oneOf([
|
|
1265
|
-
"center",
|
|
1266
|
-
"top",
|
|
1267
|
-
"right",
|
|
1268
|
-
"bottom",
|
|
1269
|
-
"left",
|
|
1270
|
-
"top-start",
|
|
1271
|
-
"top-end",
|
|
1272
|
-
"right-start",
|
|
1273
|
-
"right-end",
|
|
1274
|
-
"bottom-start",
|
|
1275
|
-
"bottom-end",
|
|
1276
|
-
"left-start",
|
|
1277
|
-
"left-end"
|
|
1278
|
-
]),
|
|
1279
|
-
modal: x.bool,
|
|
1280
|
-
offsetValue: x.number,
|
|
1281
|
-
/** For controlled usage of Popover */
|
|
1282
|
-
open: x.bool,
|
|
1283
|
-
/** For controlled usage of Popover */
|
|
1284
|
-
onOpenChange: x.func
|
|
1285
|
-
};
|
|
1286
|
-
const Me = i.forwardRef(function({ children: t, asChild: n, ...r }, o) {
|
|
1287
|
-
const s = oe(), a = t.ref, u = at([s.reference, o, a]);
|
|
1288
|
-
return n && i.isValidElement(t) ? i.cloneElement(
|
|
1289
|
-
t,
|
|
1290
|
-
s.getReferenceProps({
|
|
1291
|
-
ref: u,
|
|
1292
|
-
...r,
|
|
1293
|
-
...t.props,
|
|
1294
|
-
"data-state": s.open ? "open" : "closed"
|
|
1295
|
-
})
|
|
1296
|
-
) : /* @__PURE__ */ L(
|
|
1297
|
-
"div",
|
|
1298
|
-
{
|
|
1299
|
-
ref: u,
|
|
1300
|
-
"data-state": s.open ? "open" : "closed",
|
|
1301
|
-
style: { width: "max-content" },
|
|
1302
|
-
...s.getReferenceProps(r),
|
|
1303
|
-
children: t
|
|
1304
|
-
}
|
|
1305
|
-
);
|
|
1306
|
-
});
|
|
1307
|
-
Me.defaultProps = {
|
|
1308
|
-
asChild: !1
|
|
1309
|
-
};
|
|
1310
|
-
Me.propTypes = {
|
|
1311
|
-
/** Allows the user to pass any element as the anchor */
|
|
1312
|
-
asChild: x.bool
|
|
1313
|
-
};
|
|
1314
|
-
const ct = i.forwardRef(function({ borderRadius: t = "regular", className: n = "", zIndex: r, style: o = {}, ...s }, a) {
|
|
1315
|
-
const u = oe(), f = at([u.floating, a]), d = Rt();
|
|
1316
|
-
return /* @__PURE__ */ L(mn, { children: u.open && /* @__PURE__ */ L(bn, { context: u.context, modal: u.modal, children: /* @__PURE__ */ L(
|
|
1317
|
-
"div",
|
|
1318
|
-
{
|
|
1319
|
-
ref: f,
|
|
1320
|
-
style: {
|
|
1321
|
-
position: u.strategy,
|
|
1322
|
-
top: u.y ?? 0,
|
|
1323
|
-
left: u.x ?? 0,
|
|
1324
|
-
width: "max-content",
|
|
1325
|
-
zIndex: r
|
|
1326
|
-
},
|
|
1327
|
-
className: "lnc-ui-floating-manager",
|
|
1328
|
-
"aria-labelledby": u.labelId,
|
|
1329
|
-
"aria-describedby": u.descriptionId,
|
|
1330
|
-
...u.getFloatingProps(s),
|
|
1331
|
-
children: /* @__PURE__ */ L(
|
|
1332
|
-
Tn,
|
|
1333
|
-
{
|
|
1334
|
-
theme: d,
|
|
1335
|
-
borderRadius: t,
|
|
1336
|
-
className: "lnc-ui-popover-content " + n,
|
|
1337
|
-
style: o,
|
|
1338
|
-
children: s.children
|
|
1339
|
-
}
|
|
1340
|
-
)
|
|
1341
|
-
}
|
|
1342
|
-
) }) });
|
|
1343
|
-
});
|
|
1344
|
-
ct.propTypes = {
|
|
1345
|
-
className: x.string,
|
|
1346
|
-
style: x.object,
|
|
1347
|
-
zIndex: x.number
|
|
1348
|
-
};
|
|
1349
|
-
const Kn = i.forwardRef(function({ children: t, ...n }, r) {
|
|
1350
|
-
const { setLabelId: o } = oe(), s = ne();
|
|
1351
|
-
return i.useLayoutEffect(() => (o(s), () => o(void 0)), [s, o]), /* @__PURE__ */ L("h2", { ...n, ref: r, id: s, children: t });
|
|
1352
|
-
});
|
|
1353
|
-
i.forwardRef(function({ children: t, ...n }, r) {
|
|
1354
|
-
const { setDescriptionId: o } = oe(), s = ne();
|
|
1355
|
-
return i.useLayoutEffect(() => (o(s), () => o(void 0)), [s, o]), /* @__PURE__ */ L("p", { ...n, ref: r, id: s, children: t });
|
|
1356
|
-
});
|
|
1357
|
-
const Wn = i.forwardRef(function({ children: t, ...n }, r) {
|
|
1358
|
-
const o = oe();
|
|
1359
|
-
return /* @__PURE__ */ L("div", { ...n, ref: r, onClick: () => o.setOpen(!1), children: t });
|
|
1360
|
-
}), In = Ie.div``, Pn = Ie(ze.div)`
|
|
1361
|
-
gap: 0.25rem;
|
|
1362
|
-
display: flex;
|
|
1363
|
-
flex-direction: column;
|
|
1364
|
-
${(e) => e.widthfitcontent == !1 && "min-width: 12.5rem"};
|
|
1365
|
-
background-color: ${(e) => qe(
|
|
1366
|
-
e.theme,
|
|
1367
|
-
"Dropdown",
|
|
1368
|
-
e.color,
|
|
1369
|
-
"enabled",
|
|
1370
|
-
"background"
|
|
1371
|
-
)};
|
|
1372
|
-
`, On = G.forwardRef((e, t) => {
|
|
1373
|
-
const {
|
|
1374
|
-
control: n,
|
|
1375
|
-
offsetValue: r = 9,
|
|
1376
|
-
placement: o,
|
|
1377
|
-
widthFitContent: s = !1,
|
|
1378
|
-
closeOnItemSelect: a = !0,
|
|
1379
|
-
zIndex: u,
|
|
1380
|
-
//----------------
|
|
1381
|
-
onFocus: f = () => {
|
|
1382
|
-
},
|
|
1383
|
-
onBlur: d = () => {
|
|
1384
|
-
},
|
|
1385
|
-
onClick: b = () => {
|
|
1386
|
-
},
|
|
1387
|
-
onKeyDown: c = () => {
|
|
1388
|
-
},
|
|
1389
|
-
onMouseEnter: l = () => {
|
|
1390
|
-
},
|
|
1391
|
-
onMouseLeave: m = () => {
|
|
1392
|
-
},
|
|
1393
|
-
onItemSelected: R = () => {
|
|
1394
|
-
},
|
|
1395
|
-
//----------------
|
|
1396
|
-
animation: v = {
|
|
1397
|
-
animate: { opacity: 1, height: "auto" },
|
|
1398
|
-
exit: { opacity: 0, height: 0 },
|
|
1399
|
-
initial: { opacity: 0, height: 0 },
|
|
1400
|
-
transition: {
|
|
1401
|
-
type: "tween",
|
|
1402
|
-
duration: 0.15,
|
|
1403
|
-
opacity: { duration: 0.15, ease: "easeOut" },
|
|
1404
|
-
height: { duration: 0.15 }
|
|
1405
|
-
}
|
|
1406
|
-
},
|
|
1407
|
-
className: p = "",
|
|
1408
|
-
style: h = {},
|
|
1409
|
-
color: I = "primary",
|
|
1410
|
-
size: y = "small",
|
|
1411
|
-
contentClassName: A = "",
|
|
1412
|
-
popoverProps: B,
|
|
1413
|
-
children: D,
|
|
1414
|
-
...K
|
|
1415
|
-
} = e;
|
|
1416
|
-
Q();
|
|
1417
|
-
const j = Q(), { theme: V } = bt(), C = Q(), M = Q(), [F, S] = dt(!1), k = (T, g, w) => {
|
|
1418
|
-
R(T, g, w), a == !0 && S(!1);
|
|
1419
|
-
}, O = G.Children.map(D, (T, g) => {
|
|
1420
|
-
var w, E;
|
|
1421
|
-
return G.isValidElement(T) && (T.props.__TYPE__ == "MENU_ITEM" || ((w = T == null ? void 0 : T.type) == null ? void 0 : w.displayName) === "MENU_ITEM" || T.props.__TYPE__ == "NESTED_ITEM" || ((E = T == null ? void 0 : T.type) == null ? void 0 : E.displayName) === "NESTED_ITEM") ? g == 0 ? (T.props.ref && (M.current = t), G.cloneElement(T, {
|
|
1422
|
-
ref: t || M,
|
|
1423
|
-
//needed to focus on navigation
|
|
1424
|
-
color: T.props.color ? T.props.color : I,
|
|
1425
|
-
size: y,
|
|
1426
|
-
onItemSelected: k,
|
|
1427
|
-
animation: v
|
|
1428
|
-
})) : G.cloneElement(T, {
|
|
1429
|
-
color: T.props.color ? T.props.color : I,
|
|
1430
|
-
size: y,
|
|
1431
|
-
onItemSelected: k
|
|
1432
|
-
}) : T;
|
|
1433
|
-
});
|
|
1434
|
-
return /* @__PURE__ */ L(In, { ref: t, className: p, ...K, children: /* @__PURE__ */ ft(
|
|
1435
|
-
lt,
|
|
1436
|
-
{
|
|
1437
|
-
open: F,
|
|
1438
|
-
onOpenChange: S,
|
|
1439
|
-
placement: o,
|
|
1440
|
-
offsetValue: r,
|
|
1441
|
-
children: [
|
|
1442
|
-
/* @__PURE__ */ L(Me, { onClick: () => S((T) => !T), children: typeof n == "string" || n instanceof String ? /* @__PURE__ */ L(
|
|
1443
|
-
pt,
|
|
1444
|
-
{
|
|
1445
|
-
text: n,
|
|
1446
|
-
onClick: b,
|
|
1447
|
-
onMouseEnter: l,
|
|
1448
|
-
onMouseLeave: m,
|
|
1449
|
-
onBlur: d,
|
|
1450
|
-
onFocus: f,
|
|
1451
|
-
ref: C,
|
|
1452
|
-
onKeyDown: c,
|
|
1453
|
-
trailingIcon: "angle-down",
|
|
1454
|
-
color: I,
|
|
1455
|
-
size: y
|
|
1456
|
-
}
|
|
1457
|
-
) : G.cloneElement(n, {
|
|
1458
|
-
color: I,
|
|
1459
|
-
size: y,
|
|
1460
|
-
ref: C,
|
|
1461
|
-
onClick: b,
|
|
1462
|
-
onMouseEnter: l,
|
|
1463
|
-
onMouseLeave: m,
|
|
1464
|
-
onBlur: d,
|
|
1465
|
-
onFocus: f,
|
|
1466
|
-
onKeyDown: c
|
|
1467
|
-
}) }),
|
|
1468
|
-
/* @__PURE__ */ L(ct, { zIndex: u, children: /* @__PURE__ */ L(
|
|
1469
|
-
Pn,
|
|
1470
|
-
{
|
|
1471
|
-
ref: j,
|
|
1472
|
-
widthfitcontent: s,
|
|
1473
|
-
color: I,
|
|
1474
|
-
theme: V,
|
|
1475
|
-
className: A,
|
|
1476
|
-
children: O
|
|
1477
|
-
}
|
|
1478
|
-
) })
|
|
1479
|
-
]
|
|
1480
|
-
}
|
|
1481
|
-
) });
|
|
1482
|
-
});
|
|
1483
|
-
On.propTypes = {
|
|
1484
|
-
control: x.oneOfType([x.string, x.element]),
|
|
1485
|
-
/**
|
|
1486
|
-
* Menu offset from the control
|
|
1487
|
-
*/
|
|
1488
|
-
offsetValue: x.number,
|
|
1489
|
-
placement: x.oneOf([
|
|
1490
|
-
"center",
|
|
1491
|
-
"top",
|
|
1492
|
-
"right",
|
|
1493
|
-
"bottom",
|
|
1494
|
-
"left",
|
|
1495
|
-
"top-start",
|
|
1496
|
-
"top-end",
|
|
1497
|
-
"right-start",
|
|
1498
|
-
"right-end",
|
|
1499
|
-
"bottom-start",
|
|
1500
|
-
"bottom-end",
|
|
1501
|
-
"left-start",
|
|
1502
|
-
"left-end"
|
|
1503
|
-
]),
|
|
1504
|
-
/**
|
|
1505
|
-
* Adjust width of dropdown according to dropdown items content.
|
|
1506
|
-
*/
|
|
1507
|
-
widthFitContent: x.bool,
|
|
1508
|
-
/**
|
|
1509
|
-
* Close menu when item is selected
|
|
1510
|
-
*/
|
|
1511
|
-
closeOnItemSelect: x.bool,
|
|
1512
|
-
/**
|
|
1513
|
-
* zIndex of dropdown popup
|
|
1514
|
-
*/
|
|
1515
|
-
zIndex: x.number,
|
|
1516
|
-
//---------------------------------------------------------------
|
|
1517
|
-
onBlur: x.func,
|
|
1518
|
-
onFocus: x.func,
|
|
1519
|
-
onClick: x.func,
|
|
1520
|
-
onKeyDown: x.func,
|
|
1521
|
-
onMouseEnter: x.func,
|
|
1522
|
-
onMouseLeave: x.func,
|
|
1523
|
-
onItemSelected: x.func,
|
|
1524
|
-
//---------------------------------------------------------------
|
|
1525
|
-
animation: x.object,
|
|
1526
|
-
className: x.string,
|
|
1527
|
-
color: x.oneOf([
|
|
1528
|
-
"primary",
|
|
1529
|
-
"secondary",
|
|
1530
|
-
"success",
|
|
1531
|
-
"warning",
|
|
1532
|
-
"danger",
|
|
1533
|
-
"information",
|
|
1534
|
-
"neutral",
|
|
1535
|
-
"gray"
|
|
1536
|
-
]),
|
|
1537
|
-
size: x.oneOf(["small", "medium", "large"]),
|
|
1538
|
-
popoverProps: x.any
|
|
1539
|
-
};
|
|
1540
|
-
export {
|
|
1541
|
-
On as D,
|
|
1542
|
-
lt as P,
|
|
1543
|
-
Me as a,
|
|
1544
|
-
ct as b,
|
|
1545
|
-
Kn as c,
|
|
1546
|
-
Wn as d
|
|
1547
|
-
};
|