energy-components 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/accordion.es.js +30 -27
- package/dist/components/actionButton.es.js +56 -11
- package/dist/components/avatar.es.js +24 -16
- package/dist/components/breadcrumbs.es.js +37 -29
- package/dist/components/button.es.js +31 -22
- package/dist/components/card.es.js +17 -9
- package/dist/components/checkbox.es.js +67 -56
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-CWwaY_PV.js} +1 -1
- package/dist/components/directAccess.es.js +26 -18
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +27 -27
- package/dist/components/fileUploadItem.es.js +23 -21
- package/dist/components/filterChip.es.js +22 -14
- package/dist/components/filterTag.es.js +27 -19
- package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
- package/dist/components/floatingActionButton.es.js +19 -11
- package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BGa9K9qG.js} +993 -745
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -77
- package/dist/components/indicator.es.js +37 -29
- package/dist/components/infoBox.es.js +47 -39
- package/dist/components/link.es.js +22 -13
- package/dist/components/loader.es.js +22 -21
- package/dist/components/modal.es.js +37 -28
- package/dist/components/overlay.es.js +21 -11
- package/dist/components/pagination.es.js +164 -109
- package/dist/components/persistentToast.es.js +32 -24
- package/dist/components/popover.es.js +166 -0
- package/dist/components/progressBar.es.js +30 -22
- package/dist/components/quantitySelector.es.js +60 -48
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +15 -7
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/snackBar.es.js +131 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/loader.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/popover.css +1 -0
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/snackBar.css +1 -0
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +23 -15
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +31 -23
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +20 -16
- package/dist/components/tooltip.es.js +71 -1019
- package/dist/energy-components.es.js +6847 -5846
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
- package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,969 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
y: t
|
|
7
|
-
}), Jt = {
|
|
8
|
-
left: "right",
|
|
9
|
-
right: "left",
|
|
10
|
-
bottom: "top",
|
|
11
|
-
top: "bottom"
|
|
12
|
-
}, Qt = {
|
|
13
|
-
start: "end",
|
|
14
|
-
end: "start"
|
|
15
|
-
};
|
|
16
|
-
function ft(t, e, o) {
|
|
17
|
-
return S(t, X(e, o));
|
|
18
|
-
}
|
|
19
|
-
function J(t, e) {
|
|
20
|
-
return typeof t == "function" ? t(e) : t;
|
|
21
|
-
}
|
|
22
|
-
function I(t) {
|
|
23
|
-
return t.split("-")[0];
|
|
24
|
-
}
|
|
25
|
-
function Q(t) {
|
|
26
|
-
return t.split("-")[1];
|
|
27
|
-
}
|
|
28
|
-
function Lt(t) {
|
|
29
|
-
return t === "x" ? "y" : "x";
|
|
30
|
-
}
|
|
31
|
-
function mt(t) {
|
|
32
|
-
return t === "y" ? "height" : "width";
|
|
33
|
-
}
|
|
34
|
-
const Ut = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
35
|
-
function B(t) {
|
|
36
|
-
return Ut.has(I(t)) ? "y" : "x";
|
|
37
|
-
}
|
|
38
|
-
function pt(t) {
|
|
39
|
-
return Lt(B(t));
|
|
40
|
-
}
|
|
41
|
-
function Zt(t, e, o) {
|
|
42
|
-
o === void 0 && (o = !1);
|
|
43
|
-
const n = Q(t), i = pt(t), r = mt(i);
|
|
44
|
-
let s = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
45
|
-
return e.reference[r] > e.floating[r] && (s = ot(s)), [s, ot(s)];
|
|
46
|
-
}
|
|
47
|
-
function te(t) {
|
|
48
|
-
const e = ot(t);
|
|
49
|
-
return [ut(t), e, ut(e)];
|
|
50
|
-
}
|
|
51
|
-
function ut(t) {
|
|
52
|
-
return t.replace(/start|end/g, (e) => Qt[e]);
|
|
53
|
-
}
|
|
54
|
-
const Ot = ["left", "right"], St = ["right", "left"], ee = ["top", "bottom"], ne = ["bottom", "top"];
|
|
55
|
-
function oe(t, e, o) {
|
|
56
|
-
switch (t) {
|
|
57
|
-
case "top":
|
|
58
|
-
case "bottom":
|
|
59
|
-
return o ? e ? St : Ot : e ? Ot : St;
|
|
60
|
-
case "left":
|
|
61
|
-
case "right":
|
|
62
|
-
return e ? ee : ne;
|
|
63
|
-
default:
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function ie(t, e, o, n) {
|
|
68
|
-
const i = Q(t);
|
|
69
|
-
let r = oe(I(t), o === "start", n);
|
|
70
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ut)))), r;
|
|
71
|
-
}
|
|
72
|
-
function ot(t) {
|
|
73
|
-
return t.replace(/left|right|bottom|top/g, (e) => Jt[e]);
|
|
74
|
-
}
|
|
75
|
-
function se(t) {
|
|
76
|
-
return {
|
|
77
|
-
top: 0,
|
|
78
|
-
right: 0,
|
|
79
|
-
bottom: 0,
|
|
80
|
-
left: 0,
|
|
81
|
-
...t
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function Et(t) {
|
|
85
|
-
return typeof t != "number" ? se(t) : {
|
|
86
|
-
top: t,
|
|
87
|
-
right: t,
|
|
88
|
-
bottom: t,
|
|
89
|
-
left: t
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function it(t) {
|
|
93
|
-
const {
|
|
94
|
-
x: e,
|
|
95
|
-
y: o,
|
|
96
|
-
width: n,
|
|
97
|
-
height: i
|
|
98
|
-
} = t;
|
|
99
|
-
return {
|
|
100
|
-
width: n,
|
|
101
|
-
height: i,
|
|
102
|
-
top: o,
|
|
103
|
-
left: e,
|
|
104
|
-
right: e + n,
|
|
105
|
-
bottom: o + i,
|
|
106
|
-
x: e,
|
|
107
|
-
y: o
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function _t(t, e, o) {
|
|
111
|
-
let {
|
|
112
|
-
reference: n,
|
|
113
|
-
floating: i
|
|
114
|
-
} = t;
|
|
115
|
-
const r = B(e), s = pt(e), l = mt(s), a = I(e), c = r === "y", f = n.x + n.width / 2 - i.width / 2, u = n.y + n.height / 2 - i.height / 2, p = n[l] / 2 - i[l] / 2;
|
|
116
|
-
let d;
|
|
117
|
-
switch (a) {
|
|
118
|
-
case "top":
|
|
119
|
-
d = {
|
|
120
|
-
x: f,
|
|
121
|
-
y: n.y - i.height
|
|
122
|
-
};
|
|
123
|
-
break;
|
|
124
|
-
case "bottom":
|
|
125
|
-
d = {
|
|
126
|
-
x: f,
|
|
127
|
-
y: n.y + n.height
|
|
128
|
-
};
|
|
129
|
-
break;
|
|
130
|
-
case "right":
|
|
131
|
-
d = {
|
|
132
|
-
x: n.x + n.width,
|
|
133
|
-
y: u
|
|
134
|
-
};
|
|
135
|
-
break;
|
|
136
|
-
case "left":
|
|
137
|
-
d = {
|
|
138
|
-
x: n.x - i.width,
|
|
139
|
-
y: u
|
|
140
|
-
};
|
|
141
|
-
break;
|
|
142
|
-
default:
|
|
143
|
-
d = {
|
|
144
|
-
x: n.x,
|
|
145
|
-
y: n.y
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
switch (Q(e)) {
|
|
149
|
-
case "start":
|
|
150
|
-
d[s] -= p * (o && c ? -1 : 1);
|
|
151
|
-
break;
|
|
152
|
-
case "end":
|
|
153
|
-
d[s] += p * (o && c ? -1 : 1);
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
return d;
|
|
157
|
-
}
|
|
158
|
-
const re = async (t, e, o) => {
|
|
159
|
-
const {
|
|
160
|
-
placement: n = "bottom",
|
|
161
|
-
strategy: i = "absolute",
|
|
162
|
-
middleware: r = [],
|
|
163
|
-
platform: s
|
|
164
|
-
} = o, l = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
165
|
-
let c = await s.getElementRects({
|
|
166
|
-
reference: t,
|
|
167
|
-
floating: e,
|
|
168
|
-
strategy: i
|
|
169
|
-
}), {
|
|
170
|
-
x: f,
|
|
171
|
-
y: u
|
|
172
|
-
} = _t(c, n, a), p = n, d = {}, m = 0;
|
|
173
|
-
for (let h = 0; h < l.length; h++) {
|
|
174
|
-
const {
|
|
175
|
-
name: g,
|
|
176
|
-
fn: w
|
|
177
|
-
} = l[h], {
|
|
178
|
-
x,
|
|
179
|
-
y,
|
|
180
|
-
data: b,
|
|
181
|
-
reset: v
|
|
182
|
-
} = await w({
|
|
183
|
-
x: f,
|
|
184
|
-
y: u,
|
|
185
|
-
initialPlacement: n,
|
|
186
|
-
placement: p,
|
|
187
|
-
strategy: i,
|
|
188
|
-
middlewareData: d,
|
|
189
|
-
rects: c,
|
|
190
|
-
platform: s,
|
|
191
|
-
elements: {
|
|
192
|
-
reference: t,
|
|
193
|
-
floating: e
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
f = x ?? f, u = y ?? u, d = {
|
|
197
|
-
...d,
|
|
198
|
-
[g]: {
|
|
199
|
-
...d[g],
|
|
200
|
-
...b
|
|
201
|
-
}
|
|
202
|
-
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (p = v.placement), v.rects && (c = v.rects === !0 ? await s.getElementRects({
|
|
203
|
-
reference: t,
|
|
204
|
-
floating: e,
|
|
205
|
-
strategy: i
|
|
206
|
-
}) : v.rects), {
|
|
207
|
-
x: f,
|
|
208
|
-
y: u
|
|
209
|
-
} = _t(c, p, a)), h = -1);
|
|
210
|
-
}
|
|
211
|
-
return {
|
|
212
|
-
x: f,
|
|
213
|
-
y: u,
|
|
214
|
-
placement: p,
|
|
215
|
-
strategy: i,
|
|
216
|
-
middlewareData: d
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
async function ht(t, e) {
|
|
220
|
-
var o;
|
|
221
|
-
e === void 0 && (e = {});
|
|
222
|
-
const {
|
|
223
|
-
x: n,
|
|
224
|
-
y: i,
|
|
225
|
-
platform: r,
|
|
226
|
-
rects: s,
|
|
227
|
-
elements: l,
|
|
228
|
-
strategy: a
|
|
229
|
-
} = t, {
|
|
230
|
-
boundary: c = "clippingAncestors",
|
|
231
|
-
rootBoundary: f = "viewport",
|
|
232
|
-
elementContext: u = "floating",
|
|
233
|
-
altBoundary: p = !1,
|
|
234
|
-
padding: d = 0
|
|
235
|
-
} = J(e, t), m = Et(d), g = l[p ? u === "floating" ? "reference" : "floating" : u], w = it(await r.getClippingRect({
|
|
236
|
-
element: (o = await (r.isElement == null ? void 0 : r.isElement(g))) == null || o ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
237
|
-
boundary: c,
|
|
238
|
-
rootBoundary: f,
|
|
239
|
-
strategy: a
|
|
240
|
-
})), x = u === "floating" ? {
|
|
241
|
-
x: n,
|
|
242
|
-
y: i,
|
|
243
|
-
width: s.floating.width,
|
|
244
|
-
height: s.floating.height
|
|
245
|
-
} : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
246
|
-
x: 1,
|
|
247
|
-
y: 1
|
|
248
|
-
} : {
|
|
249
|
-
x: 1,
|
|
250
|
-
y: 1
|
|
251
|
-
}, v = it(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
252
|
-
elements: l,
|
|
253
|
-
rect: x,
|
|
254
|
-
offsetParent: y,
|
|
255
|
-
strategy: a
|
|
256
|
-
}) : x);
|
|
257
|
-
return {
|
|
258
|
-
top: (w.top - v.top + m.top) / b.y,
|
|
259
|
-
bottom: (v.bottom - w.bottom + m.bottom) / b.y,
|
|
260
|
-
left: (w.left - v.left + m.left) / b.x,
|
|
261
|
-
right: (v.right - w.right + m.right) / b.x
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
const le = (t) => ({
|
|
265
|
-
name: "arrow",
|
|
266
|
-
options: t,
|
|
267
|
-
async fn(e) {
|
|
268
|
-
const {
|
|
269
|
-
x: o,
|
|
270
|
-
y: n,
|
|
271
|
-
placement: i,
|
|
272
|
-
rects: r,
|
|
273
|
-
platform: s,
|
|
274
|
-
elements: l,
|
|
275
|
-
middlewareData: a
|
|
276
|
-
} = e, {
|
|
277
|
-
element: c,
|
|
278
|
-
padding: f = 0
|
|
279
|
-
} = J(t, e) || {};
|
|
280
|
-
if (c == null)
|
|
281
|
-
return {};
|
|
282
|
-
const u = Et(f), p = {
|
|
283
|
-
x: o,
|
|
284
|
-
y: n
|
|
285
|
-
}, d = pt(i), m = mt(d), h = await s.getDimensions(c), g = d === "y", w = g ? "top" : "left", x = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], E = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
286
|
-
let C = E ? E[y] : 0;
|
|
287
|
-
(!C || !await (s.isElement == null ? void 0 : s.isElement(E))) && (C = l.floating[y] || r.floating[m]);
|
|
288
|
-
const _ = b / 2 - v / 2, k = C / 2 - h[m] / 2 - 1, O = X(u[w], k), F = X(u[x], k), $ = O, H = C - h[m] - F, A = C / 2 - h[m] / 2 + _, z = ft($, A, H), W = !a.arrow && Q(i) != null && A !== z && r.reference[m] / 2 - (A < $ ? O : F) - h[m] / 2 < 0, T = W ? A < $ ? A - $ : A - H : 0;
|
|
289
|
-
return {
|
|
290
|
-
[d]: p[d] + T,
|
|
291
|
-
data: {
|
|
292
|
-
[d]: z,
|
|
293
|
-
centerOffset: A - z - T,
|
|
294
|
-
...W && {
|
|
295
|
-
alignmentOffset: T
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
reset: W
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
}), ce = function(t) {
|
|
302
|
-
return t === void 0 && (t = {}), {
|
|
303
|
-
name: "flip",
|
|
304
|
-
options: t,
|
|
305
|
-
async fn(e) {
|
|
306
|
-
var o, n;
|
|
307
|
-
const {
|
|
308
|
-
placement: i,
|
|
309
|
-
middlewareData: r,
|
|
310
|
-
rects: s,
|
|
311
|
-
initialPlacement: l,
|
|
312
|
-
platform: a,
|
|
313
|
-
elements: c
|
|
314
|
-
} = e, {
|
|
315
|
-
mainAxis: f = !0,
|
|
316
|
-
crossAxis: u = !0,
|
|
317
|
-
fallbackPlacements: p,
|
|
318
|
-
fallbackStrategy: d = "bestFit",
|
|
319
|
-
fallbackAxisSideDirection: m = "none",
|
|
320
|
-
flipAlignment: h = !0,
|
|
321
|
-
...g
|
|
322
|
-
} = J(t, e);
|
|
323
|
-
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
324
|
-
return {};
|
|
325
|
-
const w = I(i), x = B(l), y = I(l) === l, b = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), v = p || (y || !h ? [ot(l)] : te(l)), E = m !== "none";
|
|
326
|
-
!p && E && v.push(...ie(l, h, m, b));
|
|
327
|
-
const C = [l, ...v], _ = await ht(e, g), k = [];
|
|
328
|
-
let O = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
329
|
-
if (f && k.push(_[w]), u) {
|
|
330
|
-
const A = Zt(i, s, b);
|
|
331
|
-
k.push(_[A[0]], _[A[1]]);
|
|
332
|
-
}
|
|
333
|
-
if (O = [...O, {
|
|
334
|
-
placement: i,
|
|
335
|
-
overflows: k
|
|
336
|
-
}], !k.every((A) => A <= 0)) {
|
|
337
|
-
var F, $;
|
|
338
|
-
const A = (((F = r.flip) == null ? void 0 : F.index) || 0) + 1, z = C[A];
|
|
339
|
-
if (z && (!(u === "alignment" ? x !== B(z) : !1) || // We leave the current main axis only if every placement on that axis
|
|
340
|
-
// overflows the main axis.
|
|
341
|
-
O.every((D) => D.overflows[0] > 0 && B(D.placement) === x)))
|
|
342
|
-
return {
|
|
343
|
-
data: {
|
|
344
|
-
index: A,
|
|
345
|
-
overflows: O
|
|
346
|
-
},
|
|
347
|
-
reset: {
|
|
348
|
-
placement: z
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
let W = ($ = O.filter((T) => T.overflows[0] <= 0).sort((T, D) => T.overflows[1] - D.overflows[1])[0]) == null ? void 0 : $.placement;
|
|
352
|
-
if (!W)
|
|
353
|
-
switch (d) {
|
|
354
|
-
case "bestFit": {
|
|
355
|
-
var H;
|
|
356
|
-
const T = (H = O.filter((D) => {
|
|
357
|
-
if (E) {
|
|
358
|
-
const j = B(D.placement);
|
|
359
|
-
return j === x || // Create a bias to the `y` side axis due to horizontal
|
|
360
|
-
// reading directions favoring greater width.
|
|
361
|
-
j === "y";
|
|
362
|
-
}
|
|
363
|
-
return !0;
|
|
364
|
-
}).map((D) => [D.placement, D.overflows.filter((j) => j > 0).reduce((j, Ht) => j + Ht, 0)]).sort((D, j) => D[1] - j[1])[0]) == null ? void 0 : H[0];
|
|
365
|
-
T && (W = T);
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
case "initialPlacement":
|
|
369
|
-
W = l;
|
|
370
|
-
break;
|
|
371
|
-
}
|
|
372
|
-
if (i !== W)
|
|
373
|
-
return {
|
|
374
|
-
reset: {
|
|
375
|
-
placement: W
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
return {};
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
}, ae = /* @__PURE__ */ new Set(["left", "top"]);
|
|
383
|
-
async function fe(t, e) {
|
|
384
|
-
const {
|
|
385
|
-
placement: o,
|
|
386
|
-
platform: n,
|
|
387
|
-
elements: i
|
|
388
|
-
} = t, r = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), s = I(o), l = Q(o), a = B(o) === "y", c = ae.has(s) ? -1 : 1, f = r && a ? -1 : 1, u = J(e, t);
|
|
389
|
-
let {
|
|
390
|
-
mainAxis: p,
|
|
391
|
-
crossAxis: d,
|
|
392
|
-
alignmentAxis: m
|
|
393
|
-
} = typeof u == "number" ? {
|
|
394
|
-
mainAxis: u,
|
|
395
|
-
crossAxis: 0,
|
|
396
|
-
alignmentAxis: null
|
|
397
|
-
} : {
|
|
398
|
-
mainAxis: u.mainAxis || 0,
|
|
399
|
-
crossAxis: u.crossAxis || 0,
|
|
400
|
-
alignmentAxis: u.alignmentAxis
|
|
401
|
-
};
|
|
402
|
-
return l && typeof m == "number" && (d = l === "end" ? m * -1 : m), a ? {
|
|
403
|
-
x: d * f,
|
|
404
|
-
y: p * c
|
|
405
|
-
} : {
|
|
406
|
-
x: p * c,
|
|
407
|
-
y: d * f
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
const ue = function(t) {
|
|
411
|
-
return t === void 0 && (t = 0), {
|
|
412
|
-
name: "offset",
|
|
413
|
-
options: t,
|
|
414
|
-
async fn(e) {
|
|
415
|
-
var o, n;
|
|
416
|
-
const {
|
|
417
|
-
x: i,
|
|
418
|
-
y: r,
|
|
419
|
-
placement: s,
|
|
420
|
-
middlewareData: l
|
|
421
|
-
} = e, a = await fe(e, t);
|
|
422
|
-
return s === ((o = l.offset) == null ? void 0 : o.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
423
|
-
x: i + a.x,
|
|
424
|
-
y: r + a.y,
|
|
425
|
-
data: {
|
|
426
|
-
...a,
|
|
427
|
-
placement: s
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
}, de = function(t) {
|
|
433
|
-
return t === void 0 && (t = {}), {
|
|
434
|
-
name: "shift",
|
|
435
|
-
options: t,
|
|
436
|
-
async fn(e) {
|
|
437
|
-
const {
|
|
438
|
-
x: o,
|
|
439
|
-
y: n,
|
|
440
|
-
placement: i
|
|
441
|
-
} = e, {
|
|
442
|
-
mainAxis: r = !0,
|
|
443
|
-
crossAxis: s = !1,
|
|
444
|
-
limiter: l = {
|
|
445
|
-
fn: (g) => {
|
|
446
|
-
let {
|
|
447
|
-
x: w,
|
|
448
|
-
y: x
|
|
449
|
-
} = g;
|
|
450
|
-
return {
|
|
451
|
-
x: w,
|
|
452
|
-
y: x
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
...a
|
|
457
|
-
} = J(t, e), c = {
|
|
458
|
-
x: o,
|
|
459
|
-
y: n
|
|
460
|
-
}, f = await ht(e, a), u = B(I(i)), p = Lt(u);
|
|
461
|
-
let d = c[p], m = c[u];
|
|
462
|
-
if (r) {
|
|
463
|
-
const g = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", x = d + f[g], y = d - f[w];
|
|
464
|
-
d = ft(x, d, y);
|
|
465
|
-
}
|
|
466
|
-
if (s) {
|
|
467
|
-
const g = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", x = m + f[g], y = m - f[w];
|
|
468
|
-
m = ft(x, m, y);
|
|
469
|
-
}
|
|
470
|
-
const h = l.fn({
|
|
471
|
-
...e,
|
|
472
|
-
[p]: d,
|
|
473
|
-
[u]: m
|
|
474
|
-
});
|
|
475
|
-
return {
|
|
476
|
-
...h,
|
|
477
|
-
data: {
|
|
478
|
-
x: h.x - o,
|
|
479
|
-
y: h.y - n,
|
|
480
|
-
enabled: {
|
|
481
|
-
[p]: r,
|
|
482
|
-
[u]: s
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
}, me = function(t) {
|
|
489
|
-
return t === void 0 && (t = {}), {
|
|
490
|
-
name: "size",
|
|
491
|
-
options: t,
|
|
492
|
-
async fn(e) {
|
|
493
|
-
var o, n;
|
|
494
|
-
const {
|
|
495
|
-
placement: i,
|
|
496
|
-
rects: r,
|
|
497
|
-
platform: s,
|
|
498
|
-
elements: l
|
|
499
|
-
} = e, {
|
|
500
|
-
apply: a = () => {
|
|
501
|
-
},
|
|
502
|
-
...c
|
|
503
|
-
} = J(t, e), f = await ht(e, c), u = I(i), p = Q(i), d = B(i) === "y", {
|
|
504
|
-
width: m,
|
|
505
|
-
height: h
|
|
506
|
-
} = r.floating;
|
|
507
|
-
let g, w;
|
|
508
|
-
u === "top" || u === "bottom" ? (g = u, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = u, g = p === "end" ? "top" : "bottom");
|
|
509
|
-
const x = h - f.top - f.bottom, y = m - f.left - f.right, b = X(h - f[g], x), v = X(m - f[w], y), E = !e.middlewareData.shift;
|
|
510
|
-
let C = b, _ = v;
|
|
511
|
-
if ((o = e.middlewareData.shift) != null && o.enabled.x && (_ = y), (n = e.middlewareData.shift) != null && n.enabled.y && (C = x), E && !p) {
|
|
512
|
-
const O = S(f.left, 0), F = S(f.right, 0), $ = S(f.top, 0), H = S(f.bottom, 0);
|
|
513
|
-
d ? _ = m - 2 * (O !== 0 || F !== 0 ? O + F : S(f.left, f.right)) : C = h - 2 * ($ !== 0 || H !== 0 ? $ + H : S(f.top, f.bottom));
|
|
514
|
-
}
|
|
515
|
-
await a({
|
|
516
|
-
...e,
|
|
517
|
-
availableWidth: _,
|
|
518
|
-
availableHeight: C
|
|
519
|
-
});
|
|
520
|
-
const k = await s.getDimensions(l.floating);
|
|
521
|
-
return m !== k.width || h !== k.height ? {
|
|
522
|
-
reset: {
|
|
523
|
-
rects: !0
|
|
524
|
-
}
|
|
525
|
-
} : {};
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
|
-
};
|
|
529
|
-
function st() {
|
|
530
|
-
return typeof window < "u";
|
|
531
|
-
}
|
|
532
|
-
function K(t) {
|
|
533
|
-
return gt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
534
|
-
}
|
|
535
|
-
function R(t) {
|
|
536
|
-
var e;
|
|
537
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
538
|
-
}
|
|
539
|
-
function M(t) {
|
|
540
|
-
var e;
|
|
541
|
-
return (e = (gt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
542
|
-
}
|
|
543
|
-
function gt(t) {
|
|
544
|
-
return st() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
545
|
-
}
|
|
546
|
-
function P(t) {
|
|
547
|
-
return st() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
548
|
-
}
|
|
549
|
-
function V(t) {
|
|
550
|
-
return st() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
551
|
-
}
|
|
552
|
-
function Tt(t) {
|
|
553
|
-
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
554
|
-
}
|
|
555
|
-
const pe = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
556
|
-
function et(t) {
|
|
557
|
-
const {
|
|
558
|
-
overflow: e,
|
|
559
|
-
overflowX: o,
|
|
560
|
-
overflowY: n,
|
|
561
|
-
display: i
|
|
562
|
-
} = L(t);
|
|
563
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !pe.has(i);
|
|
564
|
-
}
|
|
565
|
-
const he = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
566
|
-
function ge(t) {
|
|
567
|
-
return he.has(K(t));
|
|
568
|
-
}
|
|
569
|
-
const we = [":popover-open", ":modal"];
|
|
570
|
-
function rt(t) {
|
|
571
|
-
return we.some((e) => {
|
|
572
|
-
try {
|
|
573
|
-
return t.matches(e);
|
|
574
|
-
} catch {
|
|
575
|
-
return !1;
|
|
576
|
-
}
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
const xe = ["transform", "translate", "scale", "rotate", "perspective"], ye = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ve = ["paint", "layout", "strict", "content"];
|
|
580
|
-
function wt(t) {
|
|
581
|
-
const e = xt(), o = P(t) ? L(t) : t;
|
|
582
|
-
return xe.some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ye.some((n) => (o.willChange || "").includes(n)) || ve.some((n) => (o.contain || "").includes(n));
|
|
583
|
-
}
|
|
584
|
-
function be(t) {
|
|
585
|
-
let e = Y(t);
|
|
586
|
-
for (; V(e) && !G(e); ) {
|
|
587
|
-
if (wt(e))
|
|
588
|
-
return e;
|
|
589
|
-
if (rt(e))
|
|
590
|
-
return null;
|
|
591
|
-
e = Y(e);
|
|
592
|
-
}
|
|
593
|
-
return null;
|
|
594
|
-
}
|
|
595
|
-
function xt() {
|
|
596
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
597
|
-
}
|
|
598
|
-
const Ae = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
599
|
-
function G(t) {
|
|
600
|
-
return Ae.has(K(t));
|
|
601
|
-
}
|
|
602
|
-
function L(t) {
|
|
603
|
-
return R(t).getComputedStyle(t);
|
|
604
|
-
}
|
|
605
|
-
function lt(t) {
|
|
606
|
-
return P(t) ? {
|
|
607
|
-
scrollLeft: t.scrollLeft,
|
|
608
|
-
scrollTop: t.scrollTop
|
|
609
|
-
} : {
|
|
610
|
-
scrollLeft: t.scrollX,
|
|
611
|
-
scrollTop: t.scrollY
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
function Y(t) {
|
|
615
|
-
if (K(t) === "html")
|
|
616
|
-
return t;
|
|
617
|
-
const e = (
|
|
618
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
619
|
-
t.assignedSlot || // DOM Element detected.
|
|
620
|
-
t.parentNode || // ShadowRoot detected.
|
|
621
|
-
Tt(t) && t.host || // Fallback.
|
|
622
|
-
M(t)
|
|
623
|
-
);
|
|
624
|
-
return Tt(e) ? e.host : e;
|
|
625
|
-
}
|
|
626
|
-
function kt(t) {
|
|
627
|
-
const e = Y(t);
|
|
628
|
-
return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : V(e) && et(e) ? e : kt(e);
|
|
629
|
-
}
|
|
630
|
-
function $t(t, e, o) {
|
|
631
|
-
var n;
|
|
632
|
-
e === void 0 && (e = []);
|
|
633
|
-
const i = kt(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = R(i);
|
|
634
|
-
return r ? (dt(s), e.concat(s, s.visualViewport || [], et(i) ? i : [], [])) : e.concat(i, $t(i, []));
|
|
635
|
-
}
|
|
636
|
-
function dt(t) {
|
|
637
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
638
|
-
}
|
|
639
|
-
function Nt(t) {
|
|
640
|
-
const e = L(t);
|
|
641
|
-
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
642
|
-
const i = V(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, l = nt(o) !== r || nt(n) !== s;
|
|
643
|
-
return l && (o = r, n = s), {
|
|
644
|
-
width: o,
|
|
645
|
-
height: n,
|
|
646
|
-
$: l
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
function Vt(t) {
|
|
650
|
-
return P(t) ? t : t.contextElement;
|
|
651
|
-
}
|
|
652
|
-
function q(t) {
|
|
653
|
-
const e = Vt(t);
|
|
654
|
-
if (!V(e))
|
|
655
|
-
return N(1);
|
|
656
|
-
const o = e.getBoundingClientRect(), {
|
|
657
|
-
width: n,
|
|
658
|
-
height: i,
|
|
659
|
-
$: r
|
|
660
|
-
} = Nt(e);
|
|
661
|
-
let s = (r ? nt(o.width) : o.width) / n, l = (r ? nt(o.height) : o.height) / i;
|
|
662
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
663
|
-
x: s,
|
|
664
|
-
y: l
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
const Ce = /* @__PURE__ */ N(0);
|
|
668
|
-
function Wt(t) {
|
|
669
|
-
const e = R(t);
|
|
670
|
-
return !xt() || !e.visualViewport ? Ce : {
|
|
671
|
-
x: e.visualViewport.offsetLeft,
|
|
672
|
-
y: e.visualViewport.offsetTop
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
function Re(t, e, o) {
|
|
676
|
-
return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
|
|
677
|
-
}
|
|
678
|
-
function tt(t, e, o, n) {
|
|
679
|
-
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
680
|
-
const i = t.getBoundingClientRect(), r = Vt(t);
|
|
681
|
-
let s = N(1);
|
|
682
|
-
e && (n ? P(n) && (s = q(n)) : s = q(t));
|
|
683
|
-
const l = Re(r, o, n) ? Wt(r) : N(0);
|
|
684
|
-
let a = (i.left + l.x) / s.x, c = (i.top + l.y) / s.y, f = i.width / s.x, u = i.height / s.y;
|
|
685
|
-
if (r) {
|
|
686
|
-
const p = R(r), d = n && P(n) ? R(n) : n;
|
|
687
|
-
let m = p, h = dt(m);
|
|
688
|
-
for (; h && n && d !== m; ) {
|
|
689
|
-
const g = q(h), w = h.getBoundingClientRect(), x = L(h), y = w.left + (h.clientLeft + parseFloat(x.paddingLeft)) * g.x, b = w.top + (h.clientTop + parseFloat(x.paddingTop)) * g.y;
|
|
690
|
-
a *= g.x, c *= g.y, f *= g.x, u *= g.y, a += y, c += b, m = R(h), h = dt(m);
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
return it({
|
|
694
|
-
width: f,
|
|
695
|
-
height: u,
|
|
696
|
-
x: a,
|
|
697
|
-
y: c
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
function yt(t, e) {
|
|
701
|
-
const o = lt(t).scrollLeft;
|
|
702
|
-
return e ? e.left + o : tt(M(t)).left + o;
|
|
703
|
-
}
|
|
704
|
-
function Bt(t, e, o) {
|
|
705
|
-
o === void 0 && (o = !1);
|
|
706
|
-
const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft - (o ? 0 : (
|
|
707
|
-
// RTL <body> scrollbar.
|
|
708
|
-
yt(t, n)
|
|
709
|
-
)), r = n.top + e.scrollTop;
|
|
710
|
-
return {
|
|
711
|
-
x: i,
|
|
712
|
-
y: r
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
function Oe(t) {
|
|
716
|
-
let {
|
|
717
|
-
elements: e,
|
|
718
|
-
rect: o,
|
|
719
|
-
offsetParent: n,
|
|
720
|
-
strategy: i
|
|
721
|
-
} = t;
|
|
722
|
-
const r = i === "fixed", s = M(n), l = e ? rt(e.floating) : !1;
|
|
723
|
-
if (n === s || l && r)
|
|
724
|
-
return o;
|
|
725
|
-
let a = {
|
|
726
|
-
scrollLeft: 0,
|
|
727
|
-
scrollTop: 0
|
|
728
|
-
}, c = N(1);
|
|
729
|
-
const f = N(0), u = V(n);
|
|
730
|
-
if ((u || !u && !r) && ((K(n) !== "body" || et(s)) && (a = lt(n)), V(n))) {
|
|
731
|
-
const d = tt(n);
|
|
732
|
-
c = q(n), f.x = d.x + n.clientLeft, f.y = d.y + n.clientTop;
|
|
733
|
-
}
|
|
734
|
-
const p = s && !u && !r ? Bt(s, a, !0) : N(0);
|
|
735
|
-
return {
|
|
736
|
-
width: o.width * c.x,
|
|
737
|
-
height: o.height * c.y,
|
|
738
|
-
x: o.x * c.x - a.scrollLeft * c.x + f.x + p.x,
|
|
739
|
-
y: o.y * c.y - a.scrollTop * c.y + f.y + p.y
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
function Se(t) {
|
|
743
|
-
return Array.from(t.getClientRects());
|
|
744
|
-
}
|
|
745
|
-
function _e(t) {
|
|
746
|
-
const e = M(t), o = lt(t), n = t.ownerDocument.body, i = S(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = S(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
747
|
-
let s = -o.scrollLeft + yt(t);
|
|
748
|
-
const l = -o.scrollTop;
|
|
749
|
-
return L(n).direction === "rtl" && (s += S(e.clientWidth, n.clientWidth) - i), {
|
|
750
|
-
width: i,
|
|
751
|
-
height: r,
|
|
752
|
-
x: s,
|
|
753
|
-
y: l
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
function Te(t, e) {
|
|
757
|
-
const o = R(t), n = M(t), i = o.visualViewport;
|
|
758
|
-
let r = n.clientWidth, s = n.clientHeight, l = 0, a = 0;
|
|
759
|
-
if (i) {
|
|
760
|
-
r = i.width, s = i.height;
|
|
761
|
-
const c = xt();
|
|
762
|
-
(!c || c && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
763
|
-
}
|
|
764
|
-
return {
|
|
765
|
-
width: r,
|
|
766
|
-
height: s,
|
|
767
|
-
x: l,
|
|
768
|
-
y: a
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
const De = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
772
|
-
function Pe(t, e) {
|
|
773
|
-
const o = tt(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = V(t) ? q(t) : N(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, a = i * r.x, c = n * r.y;
|
|
774
|
-
return {
|
|
775
|
-
width: s,
|
|
776
|
-
height: l,
|
|
777
|
-
x: a,
|
|
778
|
-
y: c
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
function Dt(t, e, o) {
|
|
782
|
-
let n;
|
|
783
|
-
if (e === "viewport")
|
|
784
|
-
n = Te(t, o);
|
|
785
|
-
else if (e === "document")
|
|
786
|
-
n = _e(M(t));
|
|
787
|
-
else if (P(e))
|
|
788
|
-
n = Pe(e, o);
|
|
789
|
-
else {
|
|
790
|
-
const i = Wt(t);
|
|
791
|
-
n = {
|
|
792
|
-
x: e.x - i.x,
|
|
793
|
-
y: e.y - i.y,
|
|
794
|
-
width: e.width,
|
|
795
|
-
height: e.height
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
return it(n);
|
|
799
|
-
}
|
|
800
|
-
function Mt(t, e) {
|
|
801
|
-
const o = Y(t);
|
|
802
|
-
return o === e || !P(o) || G(o) ? !1 : L(o).position === "fixed" || Mt(o, e);
|
|
803
|
-
}
|
|
804
|
-
function Le(t, e) {
|
|
805
|
-
const o = e.get(t);
|
|
806
|
-
if (o)
|
|
807
|
-
return o;
|
|
808
|
-
let n = $t(t, []).filter((l) => P(l) && K(l) !== "body"), i = null;
|
|
809
|
-
const r = L(t).position === "fixed";
|
|
810
|
-
let s = r ? Y(t) : t;
|
|
811
|
-
for (; P(s) && !G(s); ) {
|
|
812
|
-
const l = L(s), a = wt(s);
|
|
813
|
-
!a && l.position === "fixed" && (i = null), (r ? !a && !i : !a && l.position === "static" && !!i && De.has(i.position) || et(s) && !a && Mt(t, s)) ? n = n.filter((f) => f !== s) : i = l, s = Y(s);
|
|
814
|
-
}
|
|
815
|
-
return e.set(t, n), n;
|
|
816
|
-
}
|
|
817
|
-
function Ee(t) {
|
|
818
|
-
let {
|
|
819
|
-
element: e,
|
|
820
|
-
boundary: o,
|
|
821
|
-
rootBoundary: n,
|
|
822
|
-
strategy: i
|
|
823
|
-
} = t;
|
|
824
|
-
const s = [...o === "clippingAncestors" ? rt(e) ? [] : Le(e, this._c) : [].concat(o), n], l = s[0], a = s.reduce((c, f) => {
|
|
825
|
-
const u = Dt(e, f, i);
|
|
826
|
-
return c.top = S(u.top, c.top), c.right = X(u.right, c.right), c.bottom = X(u.bottom, c.bottom), c.left = S(u.left, c.left), c;
|
|
827
|
-
}, Dt(e, l, i));
|
|
828
|
-
return {
|
|
829
|
-
width: a.right - a.left,
|
|
830
|
-
height: a.bottom - a.top,
|
|
831
|
-
x: a.left,
|
|
832
|
-
y: a.top
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
function ke(t) {
|
|
836
|
-
const {
|
|
837
|
-
width: e,
|
|
838
|
-
height: o
|
|
839
|
-
} = Nt(t);
|
|
840
|
-
return {
|
|
841
|
-
width: e,
|
|
842
|
-
height: o
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
function $e(t, e, o) {
|
|
846
|
-
const n = V(e), i = M(e), r = o === "fixed", s = tt(t, !0, r, e);
|
|
847
|
-
let l = {
|
|
848
|
-
scrollLeft: 0,
|
|
849
|
-
scrollTop: 0
|
|
850
|
-
};
|
|
851
|
-
const a = N(0);
|
|
852
|
-
function c() {
|
|
853
|
-
a.x = yt(i);
|
|
854
|
-
}
|
|
855
|
-
if (n || !n && !r)
|
|
856
|
-
if ((K(e) !== "body" || et(i)) && (l = lt(e)), n) {
|
|
857
|
-
const d = tt(e, !0, r, e);
|
|
858
|
-
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
859
|
-
} else i && c();
|
|
860
|
-
r && !n && i && c();
|
|
861
|
-
const f = i && !n && !r ? Bt(i, l) : N(0), u = s.left + l.scrollLeft - a.x - f.x, p = s.top + l.scrollTop - a.y - f.y;
|
|
862
|
-
return {
|
|
863
|
-
x: u,
|
|
864
|
-
y: p,
|
|
865
|
-
width: s.width,
|
|
866
|
-
height: s.height
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
function ct(t) {
|
|
870
|
-
return L(t).position === "static";
|
|
871
|
-
}
|
|
872
|
-
function Pt(t, e) {
|
|
873
|
-
if (!V(t) || L(t).position === "fixed")
|
|
874
|
-
return null;
|
|
875
|
-
if (e)
|
|
876
|
-
return e(t);
|
|
877
|
-
let o = t.offsetParent;
|
|
878
|
-
return M(t) === o && (o = o.ownerDocument.body), o;
|
|
879
|
-
}
|
|
880
|
-
function Ft(t, e) {
|
|
881
|
-
const o = R(t);
|
|
882
|
-
if (rt(t))
|
|
883
|
-
return o;
|
|
884
|
-
if (!V(t)) {
|
|
885
|
-
let i = Y(t);
|
|
886
|
-
for (; i && !G(i); ) {
|
|
887
|
-
if (P(i) && !ct(i))
|
|
888
|
-
return i;
|
|
889
|
-
i = Y(i);
|
|
890
|
-
}
|
|
891
|
-
return o;
|
|
892
|
-
}
|
|
893
|
-
let n = Pt(t, e);
|
|
894
|
-
for (; n && ge(n) && ct(n); )
|
|
895
|
-
n = Pt(n, e);
|
|
896
|
-
return n && G(n) && ct(n) && !wt(n) ? o : n || be(t) || o;
|
|
897
|
-
}
|
|
898
|
-
const Ne = async function(t) {
|
|
899
|
-
const e = this.getOffsetParent || Ft, o = this.getDimensions, n = await o(t.floating);
|
|
900
|
-
return {
|
|
901
|
-
reference: $e(t.reference, await e(t.floating), t.strategy),
|
|
902
|
-
floating: {
|
|
903
|
-
x: 0,
|
|
904
|
-
y: 0,
|
|
905
|
-
width: n.width,
|
|
906
|
-
height: n.height
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
|
-
};
|
|
910
|
-
function Ve(t) {
|
|
911
|
-
return L(t).direction === "rtl";
|
|
912
|
-
}
|
|
913
|
-
const We = {
|
|
914
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Oe,
|
|
915
|
-
getDocumentElement: M,
|
|
916
|
-
getClippingRect: Ee,
|
|
917
|
-
getOffsetParent: Ft,
|
|
918
|
-
getElementRects: Ne,
|
|
919
|
-
getClientRects: Se,
|
|
920
|
-
getDimensions: ke,
|
|
921
|
-
getScale: q,
|
|
922
|
-
isElement: P,
|
|
923
|
-
isRTL: Ve
|
|
924
|
-
}, Be = ue, Me = de, Fe = ce, He = me, je = le, Ie = (t, e, o) => {
|
|
925
|
-
const n = /* @__PURE__ */ new Map(), i = {
|
|
926
|
-
platform: We,
|
|
927
|
-
...o
|
|
928
|
-
}, r = {
|
|
929
|
-
...i.platform,
|
|
930
|
-
_c: n
|
|
931
|
-
};
|
|
932
|
-
return re(t, e, {
|
|
933
|
-
...i,
|
|
934
|
-
platform: r
|
|
935
|
-
});
|
|
936
|
-
};
|
|
937
|
-
function Ye(t) {
|
|
938
|
-
return t != null && typeof t == "object" && "$el" in t;
|
|
939
|
-
}
|
|
940
|
-
function ze(t) {
|
|
941
|
-
if (Ye(t)) {
|
|
942
|
-
const e = t.$el;
|
|
943
|
-
return gt(e) && K(e) === "#comment" ? null : e;
|
|
944
|
-
}
|
|
945
|
-
return t;
|
|
946
|
-
}
|
|
947
|
-
function Xe(t) {
|
|
948
|
-
return typeof t == "function" ? t() : at(t);
|
|
949
|
-
}
|
|
950
|
-
function Ke(t) {
|
|
951
|
-
return {
|
|
952
|
-
name: "arrow",
|
|
953
|
-
options: t,
|
|
954
|
-
fn(e) {
|
|
955
|
-
const o = ze(Xe(t.element));
|
|
956
|
-
return o == null ? {} : je({
|
|
957
|
-
element: o,
|
|
958
|
-
padding: t.padding
|
|
959
|
-
}).fn(e);
|
|
960
|
-
}
|
|
961
|
-
};
|
|
962
|
-
}
|
|
963
|
-
const qe = { class: "rds-e-tooltip" }, Ge = {
|
|
1
|
+
import { defineComponent as j, toRefs as O, ref as o, computed as W, createElementBlock as h, openBlock as x, createElementVNode as l, renderSlot as w, normalizeClass as S, createCommentVNode as z, unref as R, createVNode as E, toDisplayString as $, createTextVNode as H } from "vue";
|
|
2
|
+
import { c as I, o as P, f as T, s as A, a as F, b as X } from "./floating-ui.vue-7LKzPqHI.js";
|
|
3
|
+
import { R as Y } from "./icon-svg-BGa9K9qG.js";
|
|
4
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/tooltip.css';const G = ["id"], J = {
|
|
964
6
|
key: 0,
|
|
965
7
|
class: "rds-e-tooltip__header"
|
|
966
|
-
},
|
|
8
|
+
}, K = { class: "rds-e-tooltip__title" }, L = { class: "rds-e-tooltip__content" }, Q = /* @__PURE__ */ j({
|
|
967
9
|
__name: "tooltip",
|
|
968
10
|
props: {
|
|
969
11
|
/**
|
|
@@ -1014,102 +56,112 @@ const qe = { class: "rds-e-tooltip" }, Ge = {
|
|
|
1014
56
|
inverse: {
|
|
1015
57
|
type: Boolean,
|
|
1016
58
|
default: !1
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* ID para testing
|
|
62
|
+
*/
|
|
63
|
+
id: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: void 0
|
|
1017
66
|
}
|
|
1018
67
|
},
|
|
1019
|
-
setup(
|
|
1020
|
-
const
|
|
68
|
+
setup(r) {
|
|
69
|
+
const i = r, { large: d, fullWidth: b, title: e, inverse: k } = O(i), c = o(), n = o(), p = o(), t = o(!0), f = o(""), B = W(() => ({
|
|
1021
70
|
"rds-e-tooltip__tooltip": !0,
|
|
1022
|
-
"rds-e-tooltip__tooltip-hidden":
|
|
1023
|
-
"rds-e-tooltip__tooltip--large":
|
|
1024
|
-
"rds-e-tooltip__tooltip--inverse":
|
|
1025
|
-
})),
|
|
1026
|
-
const { x:
|
|
1027
|
-
|
|
1028
|
-
|
|
71
|
+
"rds-e-tooltip__tooltip-hidden": t.value,
|
|
72
|
+
"rds-e-tooltip__tooltip--large": d.value,
|
|
73
|
+
"rds-e-tooltip__tooltip--inverse": k.value
|
|
74
|
+
})), C = async () => {
|
|
75
|
+
const { x: a, y: s, middlewareData: _, placement: v } = await I(
|
|
76
|
+
c.value,
|
|
77
|
+
n.value,
|
|
1029
78
|
{
|
|
1030
|
-
placement:
|
|
79
|
+
placement: i.placement,
|
|
1031
80
|
middleware: [
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
apply({ availableHeight:
|
|
1037
|
-
Object.assign(
|
|
1038
|
-
maxWidth:
|
|
81
|
+
P(i.offsetSpace),
|
|
82
|
+
T(),
|
|
83
|
+
A(),
|
|
84
|
+
F({
|
|
85
|
+
apply({ availableHeight: D, availableWidth: M, elements: V }) {
|
|
86
|
+
Object.assign(V.floating.style, {
|
|
87
|
+
maxWidth: b.value ? `${Math.max(0, M)}px` : "380px",
|
|
1039
88
|
width: "max-content",
|
|
1040
|
-
maxHeight: `${Math.max(0,
|
|
89
|
+
maxHeight: `${Math.max(0, D)}px`
|
|
1041
90
|
});
|
|
1042
91
|
}
|
|
1043
92
|
}),
|
|
1044
|
-
|
|
1045
|
-
element:
|
|
1046
|
-
padding:
|
|
93
|
+
X({
|
|
94
|
+
element: p.value,
|
|
95
|
+
padding: d.value ? 16 : 8
|
|
1047
96
|
})
|
|
1048
97
|
]
|
|
1049
98
|
}
|
|
1050
99
|
);
|
|
1051
|
-
Object.assign(
|
|
1052
|
-
left: `${
|
|
1053
|
-
top: `${
|
|
100
|
+
Object.assign(n.value.style, {
|
|
101
|
+
left: `${a}px`,
|
|
102
|
+
top: `${s}px`
|
|
1054
103
|
});
|
|
1055
|
-
const { x:
|
|
104
|
+
const { x: g, y } = _.arrow, N = {
|
|
1056
105
|
left: "right",
|
|
1057
106
|
right: "left",
|
|
1058
107
|
bottom: "top",
|
|
1059
108
|
top: "bottom"
|
|
1060
109
|
};
|
|
1061
|
-
f.value = `rds-e-tooltip__tooltip-arrow--${
|
|
1062
|
-
left:
|
|
1063
|
-
top:
|
|
110
|
+
f.value = `rds-e-tooltip__tooltip-arrow--${v}`, Object.assign(p.value.style, {
|
|
111
|
+
left: g != null ? `${g}px` : "",
|
|
112
|
+
top: y != null ? `${y}px` : "",
|
|
1064
113
|
bottom: "",
|
|
1065
114
|
right: "",
|
|
1066
|
-
[v
|
|
115
|
+
[N[v.split("-")[0]]]: "-4px"
|
|
1067
116
|
});
|
|
1068
|
-
},
|
|
1069
|
-
|
|
117
|
+
}, u = () => {
|
|
118
|
+
e != null && e.value || (t.value = !0);
|
|
1070
119
|
}, m = () => {
|
|
1071
|
-
|
|
120
|
+
t.value = !1, C();
|
|
1072
121
|
};
|
|
1073
|
-
return (
|
|
1074
|
-
|
|
122
|
+
return (a, s) => (x(), h("div", {
|
|
123
|
+
id: r.id,
|
|
124
|
+
class: "rds-e-tooltip"
|
|
125
|
+
}, [
|
|
126
|
+
l("div", {
|
|
1075
127
|
ref_key: "referenceRef",
|
|
1076
|
-
ref:
|
|
128
|
+
ref: c,
|
|
1077
129
|
class: "rds-e-tooltip__trigger",
|
|
1078
|
-
onBlur:
|
|
130
|
+
onBlur: u,
|
|
1079
131
|
onFocus: m,
|
|
1080
132
|
onMouseenter: m,
|
|
1081
|
-
onMouseleave:
|
|
133
|
+
onMouseleave: u
|
|
1082
134
|
}, [
|
|
1083
|
-
|
|
135
|
+
w(a.$slots, "default", {}, void 0, !0)
|
|
1084
136
|
], 544),
|
|
1085
|
-
|
|
137
|
+
l("div", {
|
|
1086
138
|
ref_key: "floatingRef",
|
|
1087
|
-
ref:
|
|
1088
|
-
class:
|
|
139
|
+
ref: n,
|
|
140
|
+
class: S(B.value)
|
|
1089
141
|
}, [
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
142
|
+
R(e) ? (x(), h("div", J, [
|
|
143
|
+
l("h3", K, $(R(e)), 1),
|
|
144
|
+
E(Y, {
|
|
1093
145
|
name: "close",
|
|
1094
146
|
"aria-hidden": "true",
|
|
1095
147
|
class: "rds-e-tooltip__icon",
|
|
1096
|
-
onClick:
|
|
148
|
+
onClick: s[0] || (s[0] = (_) => t.value = !t.value)
|
|
1097
149
|
})
|
|
1098
|
-
])) :
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
150
|
+
])) : z("", !0),
|
|
151
|
+
l("div", L, [
|
|
152
|
+
w(a.$slots, "tooltip-content", {}, () => [
|
|
153
|
+
H($(r.content), 1)
|
|
1102
154
|
], !0)
|
|
1103
155
|
]),
|
|
1104
|
-
|
|
156
|
+
l("div", {
|
|
1105
157
|
ref_key: "arrowRef",
|
|
1106
|
-
ref:
|
|
1107
|
-
class:
|
|
158
|
+
ref: p,
|
|
159
|
+
class: S(["rds-e-tooltip__tooltip-arrow", f.value])
|
|
1108
160
|
}, null, 2)
|
|
1109
161
|
], 2)
|
|
1110
|
-
]));
|
|
162
|
+
], 8, G));
|
|
1111
163
|
}
|
|
1112
|
-
}),
|
|
164
|
+
}), oe = /* @__PURE__ */ q(Q, [["__scopeId", "data-v-e322ca8e"]]);
|
|
1113
165
|
export {
|
|
1114
|
-
|
|
166
|
+
oe as default
|
|
1115
167
|
};
|