@codeandfunction/callaloo 3.15.3 → 3.16.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/README.md +7 -3
- package/dist/assets/CLFormCharCounter.css +1 -0
- package/dist/assets/CLInputMessages.css +1 -0
- package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-COGwQtRU.js +45 -0
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-CqgySW52.js +128 -0
- package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-DSvubJfG.js +252 -0
- package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-CJ4VrvmR.js +38 -0
- package/dist/chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-ORvye4vi.js +43 -0
- package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-CbHdHW2E.js +50 -0
- package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-zZ4zGuBt.js +83 -0
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-xm2qDJGJ.js +121 -0
- package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-D7BqWIqs.js +60 -0
- package/dist/chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dp3SsIfq.js +44 -0
- package/dist/chunks/CLPill.vue_vue_type_style_index_0_lang-BXGTb6A6.js +88 -0
- package/dist/chunks/CLProgress.vue_vue_type_style_index_0_lang-5-cwF-oh.js +65 -0
- package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-D7_swcoA.js +33 -0
- package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-CLccujHE.js +53 -0
- package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-CTc6UiQV.js +46 -0
- package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-BIiSNSlg.js +178 -0
- package/dist/chunks/base-theme-B89pbWnC.js +841 -0
- package/dist/chunks/useEsc-BGAp0d_1.js +19 -0
- package/dist/chunks/useHasSlotContent-DDqs5uK9.js +14 -0
- package/dist/chunks/utils-CFL9veAf.js +30 -0
- package/dist/chunks/utils-D2P_fCSp.js +73 -0
- package/dist/chunks/utils-DYzsHCvl.js +15 -0
- package/dist/chunks/utils-DaKwZixu.js +26 -0
- package/dist/chunks/utils-Dg9e9uLW.js +29 -0
- package/dist/chunks/utils-Dz_31dEE.js +387 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.css +1 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +6 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.vue.d.ts +2 -2
- package/dist/components/Buttons/CLButton/CLButton.css +1 -0
- package/dist/components/Buttons/CLButton/CLButton.js +6 -0
- package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +7 -7
- package/dist/components/CLIcon/CLIcon.css +1 -0
- package/dist/components/CLIcon/CLIcon.js +6 -0
- package/dist/components/{Assets/CLIcon → CLIcon}/CLIcon.vue.d.ts +1 -1
- package/dist/components/CLTable/CLTable.css +1 -0
- package/dist/components/CLTable/CLTable.js +197 -0
- package/dist/components/{Table → CLTable}/index.d.ts +0 -7
- package/dist/components/Containers/CLCard/CLCard.css +1 -0
- package/dist/components/Containers/CLCard/CLCard.js +6 -0
- package/dist/components/Containers/CLCard/CLCard.vue.d.ts +6 -6
- package/dist/components/Containers/CLCarousel/CLCarousel.css +1 -0
- package/dist/components/Containers/CLCarousel/CLCarousel.js +436 -0
- package/dist/components/Containers/CLCarousel/CLCarousel.vue.d.ts +2 -2
- package/dist/components/Containers/CLCarousel/CLCarouselNavigation.vue.d.ts +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.css +1 -0
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +137 -0
- package/dist/components/Containers/CLDisclosure/CLDisclosure.vue.d.ts +3 -3
- package/dist/components/Form/CLCheckbox/CLCheckbox.css +1 -0
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +147 -0
- package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +4 -4
- package/dist/components/Form/CLFormLabel/CLFormLabel.vue.d.ts +1 -1
- package/dist/components/Form/CLInput/CLInput.css +1 -0
- package/dist/components/Form/CLInput/CLInput.js +378 -0
- package/dist/components/Form/CLInput/CLInput.vue.d.ts +5 -5
- package/dist/components/Form/CLInput/CLInputPill.vue.d.ts +1 -1
- package/dist/components/Form/CLRadioButton/CLRadioButton.css +1 -0
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +132 -0
- package/dist/components/Form/CLRadioButton/CLRadioButton.vue.d.ts +1 -1
- package/dist/components/Form/CLSelect/CLSelect.css +1 -0
- package/dist/components/Form/CLSelect/CLSelect.js +137 -0
- package/dist/components/Form/CLSelect/CLSelect.vue.d.ts +3 -3
- package/dist/components/Form/CLTextArea/CLTextArea.css +1 -0
- package/dist/components/Form/CLTextArea/CLTextArea.js +149 -0
- package/dist/components/Form/CLTextArea/CLTextArea.vue.d.ts +2 -2
- package/dist/components/Form/index.d.ts +5 -9
- package/dist/components/Indicators/CLBadge/CLBadge.css +1 -0
- package/dist/components/Indicators/CLBadge/CLBadge.js +40 -0
- package/dist/components/Indicators/CLBadge/CLBadge.vue.d.ts +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.css +1 -0
- package/dist/components/Indicators/CLBanner/CLBanner.js +147 -0
- package/dist/components/Indicators/CLBanner/CLBanner.vue.d.ts +3 -3
- package/dist/components/Indicators/CLPill/CLPill.css +1 -0
- package/dist/components/Indicators/CLPill/CLPill.js +6 -0
- package/dist/components/Indicators/CLPill/CLPill.vue.d.ts +3 -3
- package/dist/components/Indicators/CLProgress/CLProgress.css +1 -0
- package/dist/components/Indicators/CLProgress/CLProgress.js +6 -0
- package/dist/components/Indicators/CLProgress/CLProgress.vue.d.ts +2 -2
- package/dist/components/Loading/CLSkeleton/CLSkeleton.css +1 -0
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +6 -0
- package/dist/components/Loading/CLSkeleton/CLSkeleton.vue.d.ts +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.css +1 -0
- package/dist/components/Loading/CLSpinner/CLSpinner.js +6 -0
- package/dist/components/Loading/CLSpinner/CLSpinner.vue.d.ts +1 -1
- package/dist/components/Modals/CLModal/CLModal.css +1 -0
- package/dist/components/Modals/CLModal/CLModal.js +175 -0
- package/dist/components/Modals/CLModal/CLModal.vue.d.ts +2 -2
- package/dist/components/Navigation/CLLink/CLLink.css +1 -0
- package/dist/components/Navigation/CLLink/CLLink.js +6 -0
- package/dist/components/Navigation/CLLink/CLLink.vue.d.ts +2 -2
- package/dist/components/Navigation/CLNavLink/CLNavLink.js +5 -0
- package/dist/components/Navigation/CLNavLink/CLNavLink.vue.d.ts +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.css +1 -0
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +55 -0
- package/dist/components/Navigation/CLNavSection/CLNavSection.vue.d.ts +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.css +1 -0
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1233 -0
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +29 -29
- package/dist/components/Popups/CLToast/CLToast.css +1 -0
- package/dist/components/Popups/CLToast/CLToast.js +6 -0
- package/dist/components/Popups/CLToast/CLToast.vue.d.ts +2 -2
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +42 -0
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.vue.d.ts +27 -0
- package/dist/components/Providers/CLThemeProvider/index.d.ts +4 -0
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +45 -0
- package/dist/components/Providers/{Toast → CLToastProvider}/CLToastProvider.vue.d.ts +1 -7
- package/dist/components/Providers/CLToastProvider/index.d.ts +4 -0
- package/dist/components/Providers/index.d.ts +2 -6
- package/dist/components/Typography/CLHeading/CLHeading.css +1 -0
- package/dist/components/Typography/CLHeading/CLHeading.js +6 -0
- package/dist/components/Typography/CLText/CLText.css +1 -0
- package/dist/components/Typography/CLText/CLText.js +6 -0
- package/dist/index.d.ts +0 -15
- package/dist/index.js +27 -5899
- package/package.json +121 -13
- package/dist/assets/styles.css +0 -1
- package/dist/components/Assets/index.d.ts +0 -2
- package/dist/components/Form/CLFormCharCounter/index.d.ts +0 -5
- package/dist/components/Form/CLFormLabel/index.d.ts +0 -5
- package/dist/components/Providers/Theme/CLThemeProvider.vue.d.ts +0 -26
- package/dist/constants.d.ts +0 -22
- package/dist/chunks/{icons.QRYZHNAf.js → icons-QRYZHNAf.js} +0 -0
- package/dist/components/{Assets/CLIcon → CLIcon}/index.d.ts +0 -0
- package/dist/components/{Assets → CLIcon}/utils.d.ts +0 -0
- package/dist/components/{Table → CLTable}/CLTable.vue.d.ts +1 -1
- /package/dist/components/{Table → CLTable}/CLTableBody.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableCell.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableFooter.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableHeader.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableNestedCell.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableRow.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/utils.d.ts +0 -0
- /package/dist/components/Providers/{Theme → CLThemeProvider}/base-theme.d.ts +0 -0
- /package/dist/components/Providers/{Theme → CLThemeProvider}/utils.d.ts +0 -0
|
@@ -0,0 +1,1233 @@
|
|
|
1
|
+
import './CLDropdownMenu.css';
|
|
2
|
+
import { computed as V, ref as L, shallowRef as te, watch as dt, getCurrentScope as ee, onScopeDispose as ne, shallowReadonly as U, unref as R, defineComponent as oe, useCssVars as ie, onBeforeUnmount as re, createElementBlock as Lt, openBlock as St, normalizeClass as mt, createVNode as Rt, createCommentVNode as se, withCtx as At, createTextVNode as le, toDisplayString as ce, normalizeStyle as ae, renderSlot as fe } from "vue";
|
|
3
|
+
import { _ as ue } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-CqgySW52.js";
|
|
4
|
+
import { _ as de } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-DSvubJfG.js";
|
|
5
|
+
import { i as F, f as me } from "../../../chunks/base-theme-B89pbWnC.js";
|
|
6
|
+
import { u as he } from "../../../chunks/useEsc-BGAp0d_1.js";
|
|
7
|
+
import { CLPlacement as we, CLIconSizes as Ot, CLIconNames as ge, CLColorVariants as Dt, CLSizes as pe, CLColors as Tt } from "../../../index.js";
|
|
8
|
+
const et = Math.min, N = Math.max, nt = Math.round, tt = Math.floor, k = (t) => ({
|
|
9
|
+
x: t,
|
|
10
|
+
y: t
|
|
11
|
+
}), ve = {
|
|
12
|
+
left: "right",
|
|
13
|
+
right: "left",
|
|
14
|
+
bottom: "top",
|
|
15
|
+
top: "bottom"
|
|
16
|
+
}, ye = {
|
|
17
|
+
start: "end",
|
|
18
|
+
end: "start"
|
|
19
|
+
};
|
|
20
|
+
function kt(t, e, n) {
|
|
21
|
+
return N(t, et(e, n));
|
|
22
|
+
}
|
|
23
|
+
function rt(t, e) {
|
|
24
|
+
return typeof t == "function" ? t(e) : t;
|
|
25
|
+
}
|
|
26
|
+
function X(t) {
|
|
27
|
+
return t.split("-")[0];
|
|
28
|
+
}
|
|
29
|
+
function st(t) {
|
|
30
|
+
return t.split("-")[1];
|
|
31
|
+
}
|
|
32
|
+
function It(t) {
|
|
33
|
+
return t === "x" ? "y" : "x";
|
|
34
|
+
}
|
|
35
|
+
function Nt(t) {
|
|
36
|
+
return t === "y" ? "height" : "width";
|
|
37
|
+
}
|
|
38
|
+
const xe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
39
|
+
function M(t) {
|
|
40
|
+
return xe.has(X(t)) ? "y" : "x";
|
|
41
|
+
}
|
|
42
|
+
function Xt(t) {
|
|
43
|
+
return It(M(t));
|
|
44
|
+
}
|
|
45
|
+
function be(t, e, n) {
|
|
46
|
+
n === void 0 && (n = !1);
|
|
47
|
+
const o = st(t), i = Xt(t), s = Nt(i);
|
|
48
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
49
|
+
return e.reference[s] > e.floating[s] && (r = ot(r)), [r, ot(r)];
|
|
50
|
+
}
|
|
51
|
+
function Ce(t) {
|
|
52
|
+
const e = ot(t);
|
|
53
|
+
return [wt(t), e, wt(e)];
|
|
54
|
+
}
|
|
55
|
+
function wt(t) {
|
|
56
|
+
return t.replace(/start|end/g, (e) => ye[e]);
|
|
57
|
+
}
|
|
58
|
+
const Bt = ["left", "right"], Pt = ["right", "left"], Ee = ["top", "bottom"], Le = ["bottom", "top"];
|
|
59
|
+
function Se(t, e, n) {
|
|
60
|
+
switch (t) {
|
|
61
|
+
case "top":
|
|
62
|
+
case "bottom":
|
|
63
|
+
return n ? e ? Pt : Bt : e ? Bt : Pt;
|
|
64
|
+
case "left":
|
|
65
|
+
case "right":
|
|
66
|
+
return e ? Ee : Le;
|
|
67
|
+
default:
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function Re(t, e, n, o) {
|
|
72
|
+
const i = st(t);
|
|
73
|
+
let s = Se(X(t), n === "start", o);
|
|
74
|
+
return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(wt)))), s;
|
|
75
|
+
}
|
|
76
|
+
function ot(t) {
|
|
77
|
+
return t.replace(/left|right|bottom|top/g, (e) => ve[e]);
|
|
78
|
+
}
|
|
79
|
+
function Ae(t) {
|
|
80
|
+
return {
|
|
81
|
+
top: 0,
|
|
82
|
+
right: 0,
|
|
83
|
+
bottom: 0,
|
|
84
|
+
left: 0,
|
|
85
|
+
...t
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function Oe(t) {
|
|
89
|
+
return typeof t != "number" ? Ae(t) : {
|
|
90
|
+
top: t,
|
|
91
|
+
right: t,
|
|
92
|
+
bottom: t,
|
|
93
|
+
left: t
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function it(t) {
|
|
97
|
+
const {
|
|
98
|
+
x: e,
|
|
99
|
+
y: n,
|
|
100
|
+
width: o,
|
|
101
|
+
height: i
|
|
102
|
+
} = t;
|
|
103
|
+
return {
|
|
104
|
+
width: o,
|
|
105
|
+
height: i,
|
|
106
|
+
top: n,
|
|
107
|
+
left: e,
|
|
108
|
+
right: e + o,
|
|
109
|
+
bottom: n + i,
|
|
110
|
+
x: e,
|
|
111
|
+
y: n
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function Vt(t, e, n) {
|
|
115
|
+
let {
|
|
116
|
+
reference: o,
|
|
117
|
+
floating: i
|
|
118
|
+
} = t;
|
|
119
|
+
const s = M(e), r = Xt(e), c = Nt(r), l = X(e), a = s === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
|
|
120
|
+
let d;
|
|
121
|
+
switch (l) {
|
|
122
|
+
case "top":
|
|
123
|
+
d = {
|
|
124
|
+
x: u,
|
|
125
|
+
y: o.y - i.height
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "bottom":
|
|
129
|
+
d = {
|
|
130
|
+
x: u,
|
|
131
|
+
y: o.y + o.height
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
case "right":
|
|
135
|
+
d = {
|
|
136
|
+
x: o.x + o.width,
|
|
137
|
+
y: f
|
|
138
|
+
};
|
|
139
|
+
break;
|
|
140
|
+
case "left":
|
|
141
|
+
d = {
|
|
142
|
+
x: o.x - i.width,
|
|
143
|
+
y: f
|
|
144
|
+
};
|
|
145
|
+
break;
|
|
146
|
+
default:
|
|
147
|
+
d = {
|
|
148
|
+
x: o.x,
|
|
149
|
+
y: o.y
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
switch (st(e)) {
|
|
153
|
+
case "start":
|
|
154
|
+
d[r] -= m * (n && a ? -1 : 1);
|
|
155
|
+
break;
|
|
156
|
+
case "end":
|
|
157
|
+
d[r] += m * (n && a ? -1 : 1);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
return d;
|
|
161
|
+
}
|
|
162
|
+
const De = async (t, e, n) => {
|
|
163
|
+
const {
|
|
164
|
+
placement: o = "bottom",
|
|
165
|
+
strategy: i = "absolute",
|
|
166
|
+
middleware: s = [],
|
|
167
|
+
platform: r
|
|
168
|
+
} = n, c = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
169
|
+
let a = await r.getElementRects({
|
|
170
|
+
reference: t,
|
|
171
|
+
floating: e,
|
|
172
|
+
strategy: i
|
|
173
|
+
}), {
|
|
174
|
+
x: u,
|
|
175
|
+
y: f
|
|
176
|
+
} = Vt(a, o, l), m = o, d = {}, h = 0;
|
|
177
|
+
for (let v = 0; v < c.length; v++) {
|
|
178
|
+
const {
|
|
179
|
+
name: y,
|
|
180
|
+
fn: w
|
|
181
|
+
} = c[v], {
|
|
182
|
+
x: p,
|
|
183
|
+
y: x,
|
|
184
|
+
data: C,
|
|
185
|
+
reset: b
|
|
186
|
+
} = await w({
|
|
187
|
+
x: u,
|
|
188
|
+
y: f,
|
|
189
|
+
initialPlacement: o,
|
|
190
|
+
placement: m,
|
|
191
|
+
strategy: i,
|
|
192
|
+
middlewareData: d,
|
|
193
|
+
rects: a,
|
|
194
|
+
platform: r,
|
|
195
|
+
elements: {
|
|
196
|
+
reference: t,
|
|
197
|
+
floating: e
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
u = p ?? u, f = x ?? f, d = {
|
|
201
|
+
...d,
|
|
202
|
+
[y]: {
|
|
203
|
+
...d[y],
|
|
204
|
+
...C
|
|
205
|
+
}
|
|
206
|
+
}, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
|
|
207
|
+
reference: t,
|
|
208
|
+
floating: e,
|
|
209
|
+
strategy: i
|
|
210
|
+
}) : b.rects), {
|
|
211
|
+
x: u,
|
|
212
|
+
y: f
|
|
213
|
+
} = Vt(a, m, l)), v = -1);
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
x: u,
|
|
217
|
+
y: f,
|
|
218
|
+
placement: m,
|
|
219
|
+
strategy: i,
|
|
220
|
+
middlewareData: d
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
async function jt(t, e) {
|
|
224
|
+
var n;
|
|
225
|
+
e === void 0 && (e = {});
|
|
226
|
+
const {
|
|
227
|
+
x: o,
|
|
228
|
+
y: i,
|
|
229
|
+
platform: s,
|
|
230
|
+
rects: r,
|
|
231
|
+
elements: c,
|
|
232
|
+
strategy: l
|
|
233
|
+
} = t, {
|
|
234
|
+
boundary: a = "clippingAncestors",
|
|
235
|
+
rootBoundary: u = "viewport",
|
|
236
|
+
elementContext: f = "floating",
|
|
237
|
+
altBoundary: m = !1,
|
|
238
|
+
padding: d = 0
|
|
239
|
+
} = rt(e, t), h = Oe(d), y = c[m ? f === "floating" ? "reference" : "floating" : f], w = it(await s.getClippingRect({
|
|
240
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
241
|
+
boundary: a,
|
|
242
|
+
rootBoundary: u,
|
|
243
|
+
strategy: l
|
|
244
|
+
})), p = f === "floating" ? {
|
|
245
|
+
x: o,
|
|
246
|
+
y: i,
|
|
247
|
+
width: r.floating.width,
|
|
248
|
+
height: r.floating.height
|
|
249
|
+
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), C = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
250
|
+
x: 1,
|
|
251
|
+
y: 1
|
|
252
|
+
} : {
|
|
253
|
+
x: 1,
|
|
254
|
+
y: 1
|
|
255
|
+
}, b = it(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
256
|
+
elements: c,
|
|
257
|
+
rect: p,
|
|
258
|
+
offsetParent: x,
|
|
259
|
+
strategy: l
|
|
260
|
+
}) : p);
|
|
261
|
+
return {
|
|
262
|
+
top: (w.top - b.top + h.top) / C.y,
|
|
263
|
+
bottom: (b.bottom - w.bottom + h.bottom) / C.y,
|
|
264
|
+
left: (w.left - b.left + h.left) / C.x,
|
|
265
|
+
right: (b.right - w.right + h.right) / C.x
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
const Te = function(t) {
|
|
269
|
+
return t === void 0 && (t = {}), {
|
|
270
|
+
name: "flip",
|
|
271
|
+
options: t,
|
|
272
|
+
async fn(e) {
|
|
273
|
+
var n, o;
|
|
274
|
+
const {
|
|
275
|
+
placement: i,
|
|
276
|
+
middlewareData: s,
|
|
277
|
+
rects: r,
|
|
278
|
+
initialPlacement: c,
|
|
279
|
+
platform: l,
|
|
280
|
+
elements: a
|
|
281
|
+
} = e, {
|
|
282
|
+
mainAxis: u = !0,
|
|
283
|
+
crossAxis: f = !0,
|
|
284
|
+
fallbackPlacements: m,
|
|
285
|
+
fallbackStrategy: d = "bestFit",
|
|
286
|
+
fallbackAxisSideDirection: h = "none",
|
|
287
|
+
flipAlignment: v = !0,
|
|
288
|
+
...y
|
|
289
|
+
} = rt(t, e);
|
|
290
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
291
|
+
return {};
|
|
292
|
+
const w = X(i), p = M(c), x = X(c) === c, C = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), b = m || (x || !v ? [ot(c)] : Ce(c)), T = h !== "none";
|
|
293
|
+
!m && T && b.push(...Re(c, v, h, C));
|
|
294
|
+
const g = [c, ...b], E = await jt(e, y), H = [];
|
|
295
|
+
let q = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
296
|
+
if (u && H.push(E[w]), f) {
|
|
297
|
+
const W = be(i, r, C);
|
|
298
|
+
H.push(E[W[0]], E[W[1]]);
|
|
299
|
+
}
|
|
300
|
+
if (q = [...q, {
|
|
301
|
+
placement: i,
|
|
302
|
+
overflows: H
|
|
303
|
+
}], !H.every((W) => W <= 0)) {
|
|
304
|
+
var bt, Ct;
|
|
305
|
+
const W = (((bt = s.flip) == null ? void 0 : bt.index) || 0) + 1, ut = g[W];
|
|
306
|
+
if (ut && (!(f === "alignment" ? p !== M(ut) : !1) || // We leave the current main axis only if every placement on that axis
|
|
307
|
+
// overflows the main axis.
|
|
308
|
+
q.every((A) => M(A.placement) === p ? A.overflows[0] > 0 : !0)))
|
|
309
|
+
return {
|
|
310
|
+
data: {
|
|
311
|
+
index: W,
|
|
312
|
+
overflows: q
|
|
313
|
+
},
|
|
314
|
+
reset: {
|
|
315
|
+
placement: ut
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
let K = (Ct = q.filter((I) => I.overflows[0] <= 0).sort((I, A) => I.overflows[1] - A.overflows[1])[0]) == null ? void 0 : Ct.placement;
|
|
319
|
+
if (!K)
|
|
320
|
+
switch (d) {
|
|
321
|
+
case "bestFit": {
|
|
322
|
+
var Et;
|
|
323
|
+
const I = (Et = q.filter((A) => {
|
|
324
|
+
if (T) {
|
|
325
|
+
const $ = M(A.placement);
|
|
326
|
+
return $ === p || // Create a bias to the `y` side axis due to horizontal
|
|
327
|
+
// reading directions favoring greater width.
|
|
328
|
+
$ === "y";
|
|
329
|
+
}
|
|
330
|
+
return !0;
|
|
331
|
+
}).map((A) => [A.placement, A.overflows.filter(($) => $ > 0).reduce(($, Qt) => $ + Qt, 0)]).sort((A, $) => A[1] - $[1])[0]) == null ? void 0 : Et[0];
|
|
332
|
+
I && (K = I);
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
case "initialPlacement":
|
|
336
|
+
K = c;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
if (i !== K)
|
|
340
|
+
return {
|
|
341
|
+
reset: {
|
|
342
|
+
placement: K
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
return {};
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}, ke = /* @__PURE__ */ new Set(["left", "top"]);
|
|
350
|
+
async function Be(t, e) {
|
|
351
|
+
const {
|
|
352
|
+
placement: n,
|
|
353
|
+
platform: o,
|
|
354
|
+
elements: i
|
|
355
|
+
} = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = X(n), c = st(n), l = M(n) === "y", a = ke.has(r) ? -1 : 1, u = s && l ? -1 : 1, f = rt(e, t);
|
|
356
|
+
let {
|
|
357
|
+
mainAxis: m,
|
|
358
|
+
crossAxis: d,
|
|
359
|
+
alignmentAxis: h
|
|
360
|
+
} = typeof f == "number" ? {
|
|
361
|
+
mainAxis: f,
|
|
362
|
+
crossAxis: 0,
|
|
363
|
+
alignmentAxis: null
|
|
364
|
+
} : {
|
|
365
|
+
mainAxis: f.mainAxis || 0,
|
|
366
|
+
crossAxis: f.crossAxis || 0,
|
|
367
|
+
alignmentAxis: f.alignmentAxis
|
|
368
|
+
};
|
|
369
|
+
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), l ? {
|
|
370
|
+
x: d * u,
|
|
371
|
+
y: m * a
|
|
372
|
+
} : {
|
|
373
|
+
x: m * a,
|
|
374
|
+
y: d * u
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
const Pe = function(t) {
|
|
378
|
+
return t === void 0 && (t = 0), {
|
|
379
|
+
name: "offset",
|
|
380
|
+
options: t,
|
|
381
|
+
async fn(e) {
|
|
382
|
+
var n, o;
|
|
383
|
+
const {
|
|
384
|
+
x: i,
|
|
385
|
+
y: s,
|
|
386
|
+
placement: r,
|
|
387
|
+
middlewareData: c
|
|
388
|
+
} = e, l = await Be(e, t);
|
|
389
|
+
return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
390
|
+
x: i + l.x,
|
|
391
|
+
y: s + l.y,
|
|
392
|
+
data: {
|
|
393
|
+
...l,
|
|
394
|
+
placement: r
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
}, Ve = function(t) {
|
|
400
|
+
return t === void 0 && (t = {}), {
|
|
401
|
+
name: "shift",
|
|
402
|
+
options: t,
|
|
403
|
+
async fn(e) {
|
|
404
|
+
const {
|
|
405
|
+
x: n,
|
|
406
|
+
y: o,
|
|
407
|
+
placement: i
|
|
408
|
+
} = e, {
|
|
409
|
+
mainAxis: s = !0,
|
|
410
|
+
crossAxis: r = !1,
|
|
411
|
+
limiter: c = {
|
|
412
|
+
fn: (y) => {
|
|
413
|
+
let {
|
|
414
|
+
x: w,
|
|
415
|
+
y: p
|
|
416
|
+
} = y;
|
|
417
|
+
return {
|
|
418
|
+
x: w,
|
|
419
|
+
y: p
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
...l
|
|
424
|
+
} = rt(t, e), a = {
|
|
425
|
+
x: n,
|
|
426
|
+
y: o
|
|
427
|
+
}, u = await jt(e, l), f = M(X(i)), m = It(f);
|
|
428
|
+
let d = a[m], h = a[f];
|
|
429
|
+
if (s) {
|
|
430
|
+
const y = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", p = d + u[y], x = d - u[w];
|
|
431
|
+
d = kt(p, d, x);
|
|
432
|
+
}
|
|
433
|
+
if (r) {
|
|
434
|
+
const y = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", p = h + u[y], x = h - u[w];
|
|
435
|
+
h = kt(p, h, x);
|
|
436
|
+
}
|
|
437
|
+
const v = c.fn({
|
|
438
|
+
...e,
|
|
439
|
+
[m]: d,
|
|
440
|
+
[f]: h
|
|
441
|
+
});
|
|
442
|
+
return {
|
|
443
|
+
...v,
|
|
444
|
+
data: {
|
|
445
|
+
x: v.x - n,
|
|
446
|
+
y: v.y - o,
|
|
447
|
+
enabled: {
|
|
448
|
+
[m]: s,
|
|
449
|
+
[f]: r
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
function lt() {
|
|
457
|
+
return typeof window < "u";
|
|
458
|
+
}
|
|
459
|
+
function Y(t) {
|
|
460
|
+
return pt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
461
|
+
}
|
|
462
|
+
function S(t) {
|
|
463
|
+
var e;
|
|
464
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
465
|
+
}
|
|
466
|
+
function P(t) {
|
|
467
|
+
var e;
|
|
468
|
+
return (e = (pt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
469
|
+
}
|
|
470
|
+
function pt(t) {
|
|
471
|
+
return lt() ? t instanceof Node || t instanceof S(t).Node : !1;
|
|
472
|
+
}
|
|
473
|
+
function O(t) {
|
|
474
|
+
return lt() ? t instanceof Element || t instanceof S(t).Element : !1;
|
|
475
|
+
}
|
|
476
|
+
function B(t) {
|
|
477
|
+
return lt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
|
|
478
|
+
}
|
|
479
|
+
function $t(t) {
|
|
480
|
+
return !lt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
481
|
+
}
|
|
482
|
+
const $e = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
483
|
+
function Q(t) {
|
|
484
|
+
const {
|
|
485
|
+
overflow: e,
|
|
486
|
+
overflowX: n,
|
|
487
|
+
overflowY: o,
|
|
488
|
+
display: i
|
|
489
|
+
} = D(t);
|
|
490
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !$e.has(i);
|
|
491
|
+
}
|
|
492
|
+
const Fe = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
493
|
+
function Me(t) {
|
|
494
|
+
return Fe.has(Y(t));
|
|
495
|
+
}
|
|
496
|
+
const ze = [":popover-open", ":modal"];
|
|
497
|
+
function ct(t) {
|
|
498
|
+
return ze.some((e) => {
|
|
499
|
+
try {
|
|
500
|
+
return t.matches(e);
|
|
501
|
+
} catch {
|
|
502
|
+
return !1;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
const He = ["transform", "translate", "scale", "rotate", "perspective"], We = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ie = ["paint", "layout", "strict", "content"];
|
|
507
|
+
function vt(t) {
|
|
508
|
+
const e = yt(), n = O(t) ? D(t) : t;
|
|
509
|
+
return He.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || We.some((o) => (n.willChange || "").includes(o)) || Ie.some((o) => (n.contain || "").includes(o));
|
|
510
|
+
}
|
|
511
|
+
function Ne(t) {
|
|
512
|
+
let e = z(t);
|
|
513
|
+
for (; B(e) && !G(e); ) {
|
|
514
|
+
if (vt(e))
|
|
515
|
+
return e;
|
|
516
|
+
if (ct(e))
|
|
517
|
+
return null;
|
|
518
|
+
e = z(e);
|
|
519
|
+
}
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
function yt() {
|
|
523
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
524
|
+
}
|
|
525
|
+
const Xe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
526
|
+
function G(t) {
|
|
527
|
+
return Xe.has(Y(t));
|
|
528
|
+
}
|
|
529
|
+
function D(t) {
|
|
530
|
+
return S(t).getComputedStyle(t);
|
|
531
|
+
}
|
|
532
|
+
function at(t) {
|
|
533
|
+
return O(t) ? {
|
|
534
|
+
scrollLeft: t.scrollLeft,
|
|
535
|
+
scrollTop: t.scrollTop
|
|
536
|
+
} : {
|
|
537
|
+
scrollLeft: t.scrollX,
|
|
538
|
+
scrollTop: t.scrollY
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function z(t) {
|
|
542
|
+
if (Y(t) === "html")
|
|
543
|
+
return t;
|
|
544
|
+
const e = (
|
|
545
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
546
|
+
t.assignedSlot || // DOM Element detected.
|
|
547
|
+
t.parentNode || // ShadowRoot detected.
|
|
548
|
+
$t(t) && t.host || // Fallback.
|
|
549
|
+
P(t)
|
|
550
|
+
);
|
|
551
|
+
return $t(e) ? e.host : e;
|
|
552
|
+
}
|
|
553
|
+
function Yt(t) {
|
|
554
|
+
const e = z(t);
|
|
555
|
+
return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : B(e) && Q(e) ? e : Yt(e);
|
|
556
|
+
}
|
|
557
|
+
function J(t, e, n) {
|
|
558
|
+
var o;
|
|
559
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
560
|
+
const i = Yt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = S(i);
|
|
561
|
+
if (s) {
|
|
562
|
+
const c = gt(r);
|
|
563
|
+
return e.concat(r, r.visualViewport || [], Q(i) ? i : [], c && n ? J(c) : []);
|
|
564
|
+
}
|
|
565
|
+
return e.concat(i, J(i, [], n));
|
|
566
|
+
}
|
|
567
|
+
function gt(t) {
|
|
568
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
569
|
+
}
|
|
570
|
+
function qt(t) {
|
|
571
|
+
const e = D(t);
|
|
572
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
573
|
+
const i = B(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = nt(n) !== s || nt(o) !== r;
|
|
574
|
+
return c && (n = s, o = r), {
|
|
575
|
+
width: n,
|
|
576
|
+
height: o,
|
|
577
|
+
$: c
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
function xt(t) {
|
|
581
|
+
return O(t) ? t : t.contextElement;
|
|
582
|
+
}
|
|
583
|
+
function _(t) {
|
|
584
|
+
const e = xt(t);
|
|
585
|
+
if (!B(e))
|
|
586
|
+
return k(1);
|
|
587
|
+
const n = e.getBoundingClientRect(), {
|
|
588
|
+
width: o,
|
|
589
|
+
height: i,
|
|
590
|
+
$: s
|
|
591
|
+
} = qt(e);
|
|
592
|
+
let r = (s ? nt(n.width) : n.width) / o, c = (s ? nt(n.height) : n.height) / i;
|
|
593
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
594
|
+
x: r,
|
|
595
|
+
y: c
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
const je = /* @__PURE__ */ k(0);
|
|
599
|
+
function Ut(t) {
|
|
600
|
+
const e = S(t);
|
|
601
|
+
return !yt() || !e.visualViewport ? je : {
|
|
602
|
+
x: e.visualViewport.offsetLeft,
|
|
603
|
+
y: e.visualViewport.offsetTop
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
function Ye(t, e, n) {
|
|
607
|
+
return e === void 0 && (e = !1), !n || e && n !== S(t) ? !1 : e;
|
|
608
|
+
}
|
|
609
|
+
function j(t, e, n, o) {
|
|
610
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
611
|
+
const i = t.getBoundingClientRect(), s = xt(t);
|
|
612
|
+
let r = k(1);
|
|
613
|
+
e && (o ? O(o) && (r = _(o)) : r = _(t));
|
|
614
|
+
const c = Ye(s, n, o) ? Ut(s) : k(0);
|
|
615
|
+
let l = (i.left + c.x) / r.x, a = (i.top + c.y) / r.y, u = i.width / r.x, f = i.height / r.y;
|
|
616
|
+
if (s) {
|
|
617
|
+
const m = S(s), d = o && O(o) ? S(o) : o;
|
|
618
|
+
let h = m, v = gt(h);
|
|
619
|
+
for (; v && o && d !== h; ) {
|
|
620
|
+
const y = _(v), w = v.getBoundingClientRect(), p = D(v), x = w.left + (v.clientLeft + parseFloat(p.paddingLeft)) * y.x, C = w.top + (v.clientTop + parseFloat(p.paddingTop)) * y.y;
|
|
621
|
+
l *= y.x, a *= y.y, u *= y.x, f *= y.y, l += x, a += C, h = S(v), v = gt(h);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return it({
|
|
625
|
+
width: u,
|
|
626
|
+
height: f,
|
|
627
|
+
x: l,
|
|
628
|
+
y: a
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
function ft(t, e) {
|
|
632
|
+
const n = at(t).scrollLeft;
|
|
633
|
+
return e ? e.left + n : j(P(t)).left + n;
|
|
634
|
+
}
|
|
635
|
+
function _t(t, e) {
|
|
636
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ft(t, n), i = n.top + e.scrollTop;
|
|
637
|
+
return {
|
|
638
|
+
x: o,
|
|
639
|
+
y: i
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
function qe(t) {
|
|
643
|
+
let {
|
|
644
|
+
elements: e,
|
|
645
|
+
rect: n,
|
|
646
|
+
offsetParent: o,
|
|
647
|
+
strategy: i
|
|
648
|
+
} = t;
|
|
649
|
+
const s = i === "fixed", r = P(o), c = e ? ct(e.floating) : !1;
|
|
650
|
+
if (o === r || c && s)
|
|
651
|
+
return n;
|
|
652
|
+
let l = {
|
|
653
|
+
scrollLeft: 0,
|
|
654
|
+
scrollTop: 0
|
|
655
|
+
}, a = k(1);
|
|
656
|
+
const u = k(0), f = B(o);
|
|
657
|
+
if ((f || !f && !s) && ((Y(o) !== "body" || Q(r)) && (l = at(o)), B(o))) {
|
|
658
|
+
const d = j(o);
|
|
659
|
+
a = _(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
660
|
+
}
|
|
661
|
+
const m = r && !f && !s ? _t(r, l) : k(0);
|
|
662
|
+
return {
|
|
663
|
+
width: n.width * a.x,
|
|
664
|
+
height: n.height * a.y,
|
|
665
|
+
x: n.x * a.x - l.scrollLeft * a.x + u.x + m.x,
|
|
666
|
+
y: n.y * a.y - l.scrollTop * a.y + u.y + m.y
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
function Ue(t) {
|
|
670
|
+
return Array.from(t.getClientRects());
|
|
671
|
+
}
|
|
672
|
+
function _e(t) {
|
|
673
|
+
const e = P(t), n = at(t), o = t.ownerDocument.body, i = N(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = N(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
674
|
+
let r = -n.scrollLeft + ft(t);
|
|
675
|
+
const c = -n.scrollTop;
|
|
676
|
+
return D(o).direction === "rtl" && (r += N(e.clientWidth, o.clientWidth) - i), {
|
|
677
|
+
width: i,
|
|
678
|
+
height: s,
|
|
679
|
+
x: r,
|
|
680
|
+
y: c
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
const Ft = 25;
|
|
684
|
+
function Ge(t, e) {
|
|
685
|
+
const n = S(t), o = P(t), i = n.visualViewport;
|
|
686
|
+
let s = o.clientWidth, r = o.clientHeight, c = 0, l = 0;
|
|
687
|
+
if (i) {
|
|
688
|
+
s = i.width, r = i.height;
|
|
689
|
+
const u = yt();
|
|
690
|
+
(!u || u && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
|
|
691
|
+
}
|
|
692
|
+
const a = ft(o);
|
|
693
|
+
if (a <= 0) {
|
|
694
|
+
const u = o.ownerDocument, f = u.body, m = getComputedStyle(f), d = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
695
|
+
h <= Ft && (s -= h);
|
|
696
|
+
} else a <= Ft && (s += a);
|
|
697
|
+
return {
|
|
698
|
+
width: s,
|
|
699
|
+
height: r,
|
|
700
|
+
x: c,
|
|
701
|
+
y: l
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
const Ke = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
705
|
+
function Ze(t, e) {
|
|
706
|
+
const n = j(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = B(t) ? _(t) : k(1), r = t.clientWidth * s.x, c = t.clientHeight * s.y, l = i * s.x, a = o * s.y;
|
|
707
|
+
return {
|
|
708
|
+
width: r,
|
|
709
|
+
height: c,
|
|
710
|
+
x: l,
|
|
711
|
+
y: a
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
function Mt(t, e, n) {
|
|
715
|
+
let o;
|
|
716
|
+
if (e === "viewport")
|
|
717
|
+
o = Ge(t, n);
|
|
718
|
+
else if (e === "document")
|
|
719
|
+
o = _e(P(t));
|
|
720
|
+
else if (O(e))
|
|
721
|
+
o = Ze(e, n);
|
|
722
|
+
else {
|
|
723
|
+
const i = Ut(t);
|
|
724
|
+
o = {
|
|
725
|
+
x: e.x - i.x,
|
|
726
|
+
y: e.y - i.y,
|
|
727
|
+
width: e.width,
|
|
728
|
+
height: e.height
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
return it(o);
|
|
732
|
+
}
|
|
733
|
+
function Gt(t, e) {
|
|
734
|
+
const n = z(t);
|
|
735
|
+
return n === e || !O(n) || G(n) ? !1 : D(n).position === "fixed" || Gt(n, e);
|
|
736
|
+
}
|
|
737
|
+
function Je(t, e) {
|
|
738
|
+
const n = e.get(t);
|
|
739
|
+
if (n)
|
|
740
|
+
return n;
|
|
741
|
+
let o = J(t, [], !1).filter((c) => O(c) && Y(c) !== "body"), i = null;
|
|
742
|
+
const s = D(t).position === "fixed";
|
|
743
|
+
let r = s ? z(t) : t;
|
|
744
|
+
for (; O(r) && !G(r); ) {
|
|
745
|
+
const c = D(r), l = vt(r);
|
|
746
|
+
!l && c.position === "fixed" && (i = null), (s ? !l && !i : !l && c.position === "static" && !!i && Ke.has(i.position) || Q(r) && !l && Gt(t, r)) ? o = o.filter((u) => u !== r) : i = c, r = z(r);
|
|
747
|
+
}
|
|
748
|
+
return e.set(t, o), o;
|
|
749
|
+
}
|
|
750
|
+
function Qe(t) {
|
|
751
|
+
let {
|
|
752
|
+
element: e,
|
|
753
|
+
boundary: n,
|
|
754
|
+
rootBoundary: o,
|
|
755
|
+
strategy: i
|
|
756
|
+
} = t;
|
|
757
|
+
const r = [...n === "clippingAncestors" ? ct(e) ? [] : Je(e, this._c) : [].concat(n), o], c = r[0], l = r.reduce((a, u) => {
|
|
758
|
+
const f = Mt(e, u, i);
|
|
759
|
+
return a.top = N(f.top, a.top), a.right = et(f.right, a.right), a.bottom = et(f.bottom, a.bottom), a.left = N(f.left, a.left), a;
|
|
760
|
+
}, Mt(e, c, i));
|
|
761
|
+
return {
|
|
762
|
+
width: l.right - l.left,
|
|
763
|
+
height: l.bottom - l.top,
|
|
764
|
+
x: l.left,
|
|
765
|
+
y: l.top
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
function tn(t) {
|
|
769
|
+
const {
|
|
770
|
+
width: e,
|
|
771
|
+
height: n
|
|
772
|
+
} = qt(t);
|
|
773
|
+
return {
|
|
774
|
+
width: e,
|
|
775
|
+
height: n
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function en(t, e, n) {
|
|
779
|
+
const o = B(e), i = P(e), s = n === "fixed", r = j(t, !0, s, e);
|
|
780
|
+
let c = {
|
|
781
|
+
scrollLeft: 0,
|
|
782
|
+
scrollTop: 0
|
|
783
|
+
};
|
|
784
|
+
const l = k(0);
|
|
785
|
+
function a() {
|
|
786
|
+
l.x = ft(i);
|
|
787
|
+
}
|
|
788
|
+
if (o || !o && !s)
|
|
789
|
+
if ((Y(e) !== "body" || Q(i)) && (c = at(e)), o) {
|
|
790
|
+
const d = j(e, !0, s, e);
|
|
791
|
+
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
792
|
+
} else i && a();
|
|
793
|
+
s && !o && i && a();
|
|
794
|
+
const u = i && !o && !s ? _t(i, c) : k(0), f = r.left + c.scrollLeft - l.x - u.x, m = r.top + c.scrollTop - l.y - u.y;
|
|
795
|
+
return {
|
|
796
|
+
x: f,
|
|
797
|
+
y: m,
|
|
798
|
+
width: r.width,
|
|
799
|
+
height: r.height
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
function ht(t) {
|
|
803
|
+
return D(t).position === "static";
|
|
804
|
+
}
|
|
805
|
+
function zt(t, e) {
|
|
806
|
+
if (!B(t) || D(t).position === "fixed")
|
|
807
|
+
return null;
|
|
808
|
+
if (e)
|
|
809
|
+
return e(t);
|
|
810
|
+
let n = t.offsetParent;
|
|
811
|
+
return P(t) === n && (n = n.ownerDocument.body), n;
|
|
812
|
+
}
|
|
813
|
+
function Kt(t, e) {
|
|
814
|
+
const n = S(t);
|
|
815
|
+
if (ct(t))
|
|
816
|
+
return n;
|
|
817
|
+
if (!B(t)) {
|
|
818
|
+
let i = z(t);
|
|
819
|
+
for (; i && !G(i); ) {
|
|
820
|
+
if (O(i) && !ht(i))
|
|
821
|
+
return i;
|
|
822
|
+
i = z(i);
|
|
823
|
+
}
|
|
824
|
+
return n;
|
|
825
|
+
}
|
|
826
|
+
let o = zt(t, e);
|
|
827
|
+
for (; o && Me(o) && ht(o); )
|
|
828
|
+
o = zt(o, e);
|
|
829
|
+
return o && G(o) && ht(o) && !vt(o) ? n : o || Ne(t) || n;
|
|
830
|
+
}
|
|
831
|
+
const nn = async function(t) {
|
|
832
|
+
const e = this.getOffsetParent || Kt, n = this.getDimensions, o = await n(t.floating);
|
|
833
|
+
return {
|
|
834
|
+
reference: en(t.reference, await e(t.floating), t.strategy),
|
|
835
|
+
floating: {
|
|
836
|
+
x: 0,
|
|
837
|
+
y: 0,
|
|
838
|
+
width: o.width,
|
|
839
|
+
height: o.height
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
function on(t) {
|
|
844
|
+
return D(t).direction === "rtl";
|
|
845
|
+
}
|
|
846
|
+
const rn = {
|
|
847
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: qe,
|
|
848
|
+
getDocumentElement: P,
|
|
849
|
+
getClippingRect: Qe,
|
|
850
|
+
getOffsetParent: Kt,
|
|
851
|
+
getElementRects: nn,
|
|
852
|
+
getClientRects: Ue,
|
|
853
|
+
getDimensions: tn,
|
|
854
|
+
getScale: _,
|
|
855
|
+
isElement: O,
|
|
856
|
+
isRTL: on
|
|
857
|
+
};
|
|
858
|
+
function Zt(t, e) {
|
|
859
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
860
|
+
}
|
|
861
|
+
function sn(t, e) {
|
|
862
|
+
let n = null, o;
|
|
863
|
+
const i = P(t);
|
|
864
|
+
function s() {
|
|
865
|
+
var c;
|
|
866
|
+
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
867
|
+
}
|
|
868
|
+
function r(c, l) {
|
|
869
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), s();
|
|
870
|
+
const a = t.getBoundingClientRect(), {
|
|
871
|
+
left: u,
|
|
872
|
+
top: f,
|
|
873
|
+
width: m,
|
|
874
|
+
height: d
|
|
875
|
+
} = a;
|
|
876
|
+
if (c || e(), !m || !d)
|
|
877
|
+
return;
|
|
878
|
+
const h = tt(f), v = tt(i.clientWidth - (u + m)), y = tt(i.clientHeight - (f + d)), w = tt(u), x = {
|
|
879
|
+
rootMargin: -h + "px " + -v + "px " + -y + "px " + -w + "px",
|
|
880
|
+
threshold: N(0, et(1, l)) || 1
|
|
881
|
+
};
|
|
882
|
+
let C = !0;
|
|
883
|
+
function b(T) {
|
|
884
|
+
const g = T[0].intersectionRatio;
|
|
885
|
+
if (g !== l) {
|
|
886
|
+
if (!C)
|
|
887
|
+
return r();
|
|
888
|
+
g ? r(!1, g) : o = setTimeout(() => {
|
|
889
|
+
r(!1, 1e-7);
|
|
890
|
+
}, 1e3);
|
|
891
|
+
}
|
|
892
|
+
g === 1 && !Zt(a, t.getBoundingClientRect()) && r(), C = !1;
|
|
893
|
+
}
|
|
894
|
+
try {
|
|
895
|
+
n = new IntersectionObserver(b, {
|
|
896
|
+
...x,
|
|
897
|
+
// Handle <iframe>s
|
|
898
|
+
root: i.ownerDocument
|
|
899
|
+
});
|
|
900
|
+
} catch {
|
|
901
|
+
n = new IntersectionObserver(b, x);
|
|
902
|
+
}
|
|
903
|
+
n.observe(t);
|
|
904
|
+
}
|
|
905
|
+
return r(!0), s;
|
|
906
|
+
}
|
|
907
|
+
function ln(t, e, n, o) {
|
|
908
|
+
o === void 0 && (o = {});
|
|
909
|
+
const {
|
|
910
|
+
ancestorScroll: i = !0,
|
|
911
|
+
ancestorResize: s = !0,
|
|
912
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
913
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
914
|
+
animationFrame: l = !1
|
|
915
|
+
} = o, a = xt(t), u = i || s ? [...a ? J(a) : [], ...J(e)] : [];
|
|
916
|
+
u.forEach((w) => {
|
|
917
|
+
i && w.addEventListener("scroll", n, {
|
|
918
|
+
passive: !0
|
|
919
|
+
}), s && w.addEventListener("resize", n);
|
|
920
|
+
});
|
|
921
|
+
const f = a && c ? sn(a, n) : null;
|
|
922
|
+
let m = -1, d = null;
|
|
923
|
+
r && (d = new ResizeObserver((w) => {
|
|
924
|
+
let [p] = w;
|
|
925
|
+
p && p.target === a && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
926
|
+
var x;
|
|
927
|
+
(x = d) == null || x.observe(e);
|
|
928
|
+
})), n();
|
|
929
|
+
}), a && !l && d.observe(a), d.observe(e));
|
|
930
|
+
let h, v = l ? j(t) : null;
|
|
931
|
+
l && y();
|
|
932
|
+
function y() {
|
|
933
|
+
const w = j(t);
|
|
934
|
+
v && !Zt(v, w) && n(), v = w, h = requestAnimationFrame(y);
|
|
935
|
+
}
|
|
936
|
+
return n(), () => {
|
|
937
|
+
var w;
|
|
938
|
+
u.forEach((p) => {
|
|
939
|
+
i && p.removeEventListener("scroll", n), s && p.removeEventListener("resize", n);
|
|
940
|
+
}), f?.(), (w = d) == null || w.disconnect(), d = null, l && cancelAnimationFrame(h);
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
const cn = Pe, an = Ve, fn = Te, un = (t, e, n) => {
|
|
944
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
945
|
+
platform: rn,
|
|
946
|
+
...n
|
|
947
|
+
}, s = {
|
|
948
|
+
...i.platform,
|
|
949
|
+
_c: o
|
|
950
|
+
};
|
|
951
|
+
return De(t, e, {
|
|
952
|
+
...i,
|
|
953
|
+
platform: s
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
function dn(t) {
|
|
957
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
958
|
+
}
|
|
959
|
+
function Ht(t) {
|
|
960
|
+
if (dn(t)) {
|
|
961
|
+
const e = t.$el;
|
|
962
|
+
return pt(e) && Y(e) === "#comment" ? null : e;
|
|
963
|
+
}
|
|
964
|
+
return t;
|
|
965
|
+
}
|
|
966
|
+
function Z(t) {
|
|
967
|
+
return typeof t == "function" ? t() : R(t);
|
|
968
|
+
}
|
|
969
|
+
function Jt(t) {
|
|
970
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
971
|
+
}
|
|
972
|
+
function Wt(t, e) {
|
|
973
|
+
const n = Jt(t);
|
|
974
|
+
return Math.round(e * n) / n;
|
|
975
|
+
}
|
|
976
|
+
function mn(t, e, n) {
|
|
977
|
+
n === void 0 && (n = {});
|
|
978
|
+
const o = n.whileElementsMounted, i = V(() => {
|
|
979
|
+
var g;
|
|
980
|
+
return (g = Z(n.open)) != null ? g : !0;
|
|
981
|
+
}), s = V(() => Z(n.middleware)), r = V(() => {
|
|
982
|
+
var g;
|
|
983
|
+
return (g = Z(n.placement)) != null ? g : "bottom";
|
|
984
|
+
}), c = V(() => {
|
|
985
|
+
var g;
|
|
986
|
+
return (g = Z(n.strategy)) != null ? g : "absolute";
|
|
987
|
+
}), l = V(() => {
|
|
988
|
+
var g;
|
|
989
|
+
return (g = Z(n.transform)) != null ? g : !0;
|
|
990
|
+
}), a = V(() => Ht(t.value)), u = V(() => Ht(e.value)), f = L(0), m = L(0), d = L(c.value), h = L(r.value), v = te({}), y = L(!1), w = V(() => {
|
|
991
|
+
const g = {
|
|
992
|
+
position: d.value,
|
|
993
|
+
left: "0",
|
|
994
|
+
top: "0"
|
|
995
|
+
};
|
|
996
|
+
if (!u.value)
|
|
997
|
+
return g;
|
|
998
|
+
const E = Wt(u.value, f.value), H = Wt(u.value, m.value);
|
|
999
|
+
return l.value ? {
|
|
1000
|
+
...g,
|
|
1001
|
+
transform: "translate(" + E + "px, " + H + "px)",
|
|
1002
|
+
...Jt(u.value) >= 1.5 && {
|
|
1003
|
+
willChange: "transform"
|
|
1004
|
+
}
|
|
1005
|
+
} : {
|
|
1006
|
+
position: d.value,
|
|
1007
|
+
left: E + "px",
|
|
1008
|
+
top: H + "px"
|
|
1009
|
+
};
|
|
1010
|
+
});
|
|
1011
|
+
let p;
|
|
1012
|
+
function x() {
|
|
1013
|
+
if (a.value == null || u.value == null)
|
|
1014
|
+
return;
|
|
1015
|
+
const g = i.value;
|
|
1016
|
+
un(a.value, u.value, {
|
|
1017
|
+
middleware: s.value,
|
|
1018
|
+
placement: r.value,
|
|
1019
|
+
strategy: c.value
|
|
1020
|
+
}).then((E) => {
|
|
1021
|
+
f.value = E.x, m.value = E.y, d.value = E.strategy, h.value = E.placement, v.value = E.middlewareData, y.value = g !== !1;
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
function C() {
|
|
1025
|
+
typeof p == "function" && (p(), p = void 0);
|
|
1026
|
+
}
|
|
1027
|
+
function b() {
|
|
1028
|
+
if (C(), o === void 0) {
|
|
1029
|
+
x();
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
if (a.value != null && u.value != null) {
|
|
1033
|
+
p = o(a.value, u.value, x);
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
function T() {
|
|
1038
|
+
i.value || (y.value = !1);
|
|
1039
|
+
}
|
|
1040
|
+
return dt([s, r, c, i], x, {
|
|
1041
|
+
flush: "sync"
|
|
1042
|
+
}), dt([a, u], b, {
|
|
1043
|
+
flush: "sync"
|
|
1044
|
+
}), dt(i, T, {
|
|
1045
|
+
flush: "sync"
|
|
1046
|
+
}), ee() && ne(C), {
|
|
1047
|
+
x: U(f),
|
|
1048
|
+
y: U(m),
|
|
1049
|
+
strategy: U(d),
|
|
1050
|
+
placement: U(h),
|
|
1051
|
+
middlewareData: U(v),
|
|
1052
|
+
isPositioned: U(y),
|
|
1053
|
+
floatingStyles: w,
|
|
1054
|
+
update: x
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
const hn = ({
|
|
1058
|
+
triggerElem: t,
|
|
1059
|
+
dropdownRef: e,
|
|
1060
|
+
openDropdownHandler: n,
|
|
1061
|
+
closeDropdownHandler: o
|
|
1062
|
+
}) => {
|
|
1063
|
+
const i = L(!1), s = L(), r = () => {
|
|
1064
|
+
try {
|
|
1065
|
+
i.value = !i.value, i.value && F && (s.value = window.setTimeout(() => {
|
|
1066
|
+
window.removeEventListener("click", l), window.removeEventListener("keyup", l), window.addEventListener("click", l), window.addEventListener("keyup", l);
|
|
1067
|
+
}, 100)), n?.();
|
|
1068
|
+
} catch (f) {
|
|
1069
|
+
console.error(f);
|
|
1070
|
+
}
|
|
1071
|
+
}, c = (f) => {
|
|
1072
|
+
try {
|
|
1073
|
+
const m = f?.target, d = t?.value, h = e?.value;
|
|
1074
|
+
return F && d && h && !d.contains(m) && !h.contains(m) ? !0 : void 0;
|
|
1075
|
+
} catch (m) {
|
|
1076
|
+
console.error(m);
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
}, l = (f) => {
|
|
1080
|
+
try {
|
|
1081
|
+
c(f) && (F && (window.removeEventListener("click", l), window.removeEventListener("keyup", l)), i.value = !1, o?.());
|
|
1082
|
+
} catch (m) {
|
|
1083
|
+
console.error(m);
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
1086
|
+
return {
|
|
1087
|
+
open: i,
|
|
1088
|
+
toggleDropdown: r,
|
|
1089
|
+
closeDropdown: () => {
|
|
1090
|
+
try {
|
|
1091
|
+
F && (window.removeEventListener("click", l), window.removeEventListener("keyup", l)), i.value = !1, o?.();
|
|
1092
|
+
} catch (f) {
|
|
1093
|
+
console.error(f);
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
clearEventListeners: () => {
|
|
1097
|
+
F && (s.value && window.clearTimeout(s.value), window.removeEventListener("click", l), window.removeEventListener("keyup", l));
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
}, wn = ["data-testid"], gn = ["id", "aria-labelledby", "aria-hidden"], En = /* @__PURE__ */ oe({
|
|
1101
|
+
name: "CLDropdownMenu",
|
|
1102
|
+
__name: "CLDropdownMenu",
|
|
1103
|
+
props: {
|
|
1104
|
+
buttonAriaLabel: {},
|
|
1105
|
+
buttonBorderRadius: {},
|
|
1106
|
+
buttonColor: { default: Tt.Secondary },
|
|
1107
|
+
buttonHeight: { default: "auto" },
|
|
1108
|
+
buttonSize: { default: pe.Small },
|
|
1109
|
+
buttonVariant: { default: Dt.Soft },
|
|
1110
|
+
buttonWidth: { default: "auto" },
|
|
1111
|
+
buttonWrapped: { type: Boolean },
|
|
1112
|
+
containerBordered: { type: Boolean, default: !0 },
|
|
1113
|
+
containerBorderRadius: {},
|
|
1114
|
+
containerElevated: { type: Boolean, default: !1 },
|
|
1115
|
+
contentWidth: { default: "auto" },
|
|
1116
|
+
dropdownId: {},
|
|
1117
|
+
iconAfter: { default: ge.ChevronDown },
|
|
1118
|
+
iconAfterSize: { default: Ot.Tiny },
|
|
1119
|
+
iconBefore: {},
|
|
1120
|
+
iconSize: { default: Ot.Tiny },
|
|
1121
|
+
isOpen: { type: Boolean, default: !1 },
|
|
1122
|
+
label: {},
|
|
1123
|
+
onCloseHandler: {},
|
|
1124
|
+
onOpenHandler: {},
|
|
1125
|
+
placement: { default: we.BottomStart },
|
|
1126
|
+
testId: { default: "clll-dropdown-menu" },
|
|
1127
|
+
zIndex: { default: 30 }
|
|
1128
|
+
},
|
|
1129
|
+
setup(t) {
|
|
1130
|
+
ie((g) => ({
|
|
1131
|
+
v69f60b10: R(a)
|
|
1132
|
+
}));
|
|
1133
|
+
const e = t;
|
|
1134
|
+
let n = L(), o = L();
|
|
1135
|
+
const i = L(), s = L(), r = L(e.isOpen), c = L(e.placement), l = "clll-dropdown-menu", a = V(() => e.zIndex === "auto" || me(e.zIndex) ? e.zIndex : e.zIndex.toString()), u = () => {
|
|
1136
|
+
v.value ? f() : m();
|
|
1137
|
+
}, f = () => {
|
|
1138
|
+
r.value = !0, e?.onOpenHandler?.(), C(), F && window.document.addEventListener("click", b);
|
|
1139
|
+
}, m = () => {
|
|
1140
|
+
r.value = !1, e?.onCloseHandler?.(), F && window.document.removeEventListener("click", b), T(), p();
|
|
1141
|
+
}, d = (g) => {
|
|
1142
|
+
g && (n.value = g);
|
|
1143
|
+
}, h = (g) => {
|
|
1144
|
+
g && (o.value = g);
|
|
1145
|
+
}, {
|
|
1146
|
+
open: v,
|
|
1147
|
+
toggleDropdown: y,
|
|
1148
|
+
closeDropdown: w,
|
|
1149
|
+
clearEventListeners: p
|
|
1150
|
+
} = hn({
|
|
1151
|
+
triggerElem: n,
|
|
1152
|
+
dropdownRef: s,
|
|
1153
|
+
openDropdownHandler: u,
|
|
1154
|
+
closeDropdownHandler: m
|
|
1155
|
+
}), { floatingStyles: x, update: C } = mn(i, s, {
|
|
1156
|
+
middleware: [fn(), cn(10), an()],
|
|
1157
|
+
placement: c,
|
|
1158
|
+
open: r,
|
|
1159
|
+
whileElementsMounted: ln
|
|
1160
|
+
}), b = (g) => {
|
|
1161
|
+
r.value && s.value?.contains(g?.target) && w();
|
|
1162
|
+
}, { clearEventListeners: T } = he({ escHandler: w, triggerElem: n });
|
|
1163
|
+
return re(() => {
|
|
1164
|
+
F && window.document.removeEventListener("click", b), T(), p();
|
|
1165
|
+
}), (g, E) => (St(), Lt("div", {
|
|
1166
|
+
class: mt([`${l}__menu`]),
|
|
1167
|
+
"data-testid": t.testId
|
|
1168
|
+
}, [
|
|
1169
|
+
Rt(R(ue), {
|
|
1170
|
+
id: `${l}__toggle--${t.dropdownId}`,
|
|
1171
|
+
ref_key: "anchor",
|
|
1172
|
+
ref: i,
|
|
1173
|
+
"aria-controls": `${l}--${t.dropdownId}`,
|
|
1174
|
+
"aria-expanded": R(r) || t.isOpen,
|
|
1175
|
+
"aria-label": t.buttonAriaLabel,
|
|
1176
|
+
class: mt(`${l}__toggle`),
|
|
1177
|
+
color: t.buttonColor,
|
|
1178
|
+
"border-radius": t.buttonBorderRadius,
|
|
1179
|
+
"forward-ref": d,
|
|
1180
|
+
height: t.buttonHeight,
|
|
1181
|
+
"icon-after": t.iconAfter,
|
|
1182
|
+
"icon-before": t.iconBefore,
|
|
1183
|
+
"icon-size": t.iconSize,
|
|
1184
|
+
"icon-after-size": t.iconAfterSize,
|
|
1185
|
+
size: t.buttonSize,
|
|
1186
|
+
"test-id": `${l}__toggle`,
|
|
1187
|
+
variant: t.buttonVariant,
|
|
1188
|
+
width: t.buttonWidth,
|
|
1189
|
+
wrap: t.buttonWrapped,
|
|
1190
|
+
onClick: R(y)
|
|
1191
|
+
}, {
|
|
1192
|
+
default: At(() => [
|
|
1193
|
+
le(ce(t.label), 1)
|
|
1194
|
+
]),
|
|
1195
|
+
_: 1
|
|
1196
|
+
}, 8, ["id", "aria-controls", "aria-expanded", "aria-label", "class", "color", "border-radius", "height", "icon-after", "icon-before", "icon-size", "icon-after-size", "size", "test-id", "variant", "width", "wrap", "onClick"]),
|
|
1197
|
+
R(r) || t.isOpen ? (St(), Lt("div", {
|
|
1198
|
+
key: 0,
|
|
1199
|
+
id: `${l}--${t.dropdownId}`,
|
|
1200
|
+
ref_key: "dropdownElem",
|
|
1201
|
+
ref: s,
|
|
1202
|
+
"aria-labelledby": `${l}__toggle--${t.dropdownId}`,
|
|
1203
|
+
"aria-hidden": !(R(r) || t.isOpen),
|
|
1204
|
+
class: mt([
|
|
1205
|
+
`${l}__dropdown`,
|
|
1206
|
+
`${l}__dropdown--${R(c)}`
|
|
1207
|
+
]),
|
|
1208
|
+
style: ae(R(x))
|
|
1209
|
+
}, [
|
|
1210
|
+
Rt(R(de), {
|
|
1211
|
+
bordered: t.containerBordered,
|
|
1212
|
+
"border-radius": t.containerBorderRadius,
|
|
1213
|
+
color: R(Tt).Neutral,
|
|
1214
|
+
elevated: t.containerElevated,
|
|
1215
|
+
"forward-ref": h,
|
|
1216
|
+
padded: !1,
|
|
1217
|
+
"test-id": `${l}__content`,
|
|
1218
|
+
variant: R(Dt).Ghost,
|
|
1219
|
+
width: t.contentWidth
|
|
1220
|
+
}, {
|
|
1221
|
+
default: At(() => [
|
|
1222
|
+
fe(g.$slots, "content")
|
|
1223
|
+
]),
|
|
1224
|
+
_: 3
|
|
1225
|
+
}, 8, ["bordered", "border-radius", "color", "elevated", "test-id", "variant", "width"])
|
|
1226
|
+
], 14, gn)) : se("", !0)
|
|
1227
|
+
], 10, wn));
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
export {
|
|
1231
|
+
En as CLDropdownMenu,
|
|
1232
|
+
En as default
|
|
1233
|
+
};
|