@folkehelseinstituttet/designsystem 0.40.0 → 0.40.2
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/decorate-DFXIek-k.js +611 -0
- package/decorate-DFXIek-k.js.map +1 -0
- package/fhi-body.js +23 -32
- package/fhi-body.js.map +1 -1
- package/fhi-button.js +90 -112
- package/fhi-button.js.map +1 -1
- package/fhi-checkbox.js +53 -66
- package/fhi-checkbox.js.map +1 -1
- package/fhi-data-table-cell.js +23 -29
- package/fhi-data-table-cell.js.map +1 -1
- package/fhi-data-table-row.js +40 -65
- package/fhi-data-table-row.js.map +1 -1
- package/fhi-data-table.js +30 -36
- package/fhi-data-table.js.map +1 -1
- package/fhi-date-input.component-Bus7CeKM.js +278 -0
- package/fhi-date-input.component-Bus7CeKM.js.map +1 -0
- package/fhi-date-input.js +2 -305
- package/fhi-display.js +29 -46
- package/fhi-display.js.map +1 -1
- package/fhi-flex.js +40 -50
- package/fhi-flex.js.map +1 -1
- package/fhi-grid.js +30 -46
- package/fhi-grid.js.map +1 -1
- package/fhi-headline.js +29 -46
- package/fhi-headline.js.map +1 -1
- package/fhi-icon-arrow-down-left.js +26 -43
- package/fhi-icon-arrow-down-left.js.map +1 -1
- package/fhi-icon-arrow-down-right.js +26 -43
- package/fhi-icon-arrow-down-right.js.map +1 -1
- package/fhi-icon-arrow-down.js +26 -43
- package/fhi-icon-arrow-down.js.map +1 -1
- package/fhi-icon-arrow-left.js +26 -43
- package/fhi-icon-arrow-left.js.map +1 -1
- package/fhi-icon-arrow-right-left.js +26 -43
- package/fhi-icon-arrow-right-left.js.map +1 -1
- package/fhi-icon-arrow-right.js +26 -43
- package/fhi-icon-arrow-right.js.map +1 -1
- package/fhi-icon-arrow-up-down.js +26 -43
- package/fhi-icon-arrow-up-down.js.map +1 -1
- package/fhi-icon-arrow-up-left.js +26 -43
- package/fhi-icon-arrow-up-left.js.map +1 -1
- package/fhi-icon-arrow-up-right.js +26 -43
- package/fhi-icon-arrow-up-right.js.map +1 -1
- package/fhi-icon-arrow-up.js +26 -43
- package/fhi-icon-arrow-up.js.map +1 -1
- package/fhi-icon-bell.js +26 -43
- package/fhi-icon-bell.js.map +1 -1
- package/fhi-icon-calendar-clock.js +26 -43
- package/fhi-icon-calendar-clock.js.map +1 -1
- package/fhi-icon-calendar.js +26 -43
- package/fhi-icon-calendar.js.map +1 -1
- package/fhi-icon-chart-bar-stacked.js +26 -43
- package/fhi-icon-chart-bar-stacked.js.map +1 -1
- package/fhi-icon-chart-bar.js +26 -43
- package/fhi-icon-chart-bar.js.map +1 -1
- package/fhi-icon-chart-column-stacked.js +26 -43
- package/fhi-icon-chart-column-stacked.js.map +1 -1
- package/fhi-icon-chart-column.js +26 -43
- package/fhi-icon-chart-column.js.map +1 -1
- package/fhi-icon-chart-line.js +26 -43
- package/fhi-icon-chart-line.js.map +1 -1
- package/fhi-icon-chart-no-axes-combined.js +26 -43
- package/fhi-icon-chart-no-axes-combined.js.map +1 -1
- package/fhi-icon-chart-pie.js +26 -43
- package/fhi-icon-chart-pie.js.map +1 -1
- package/fhi-icon-check.js +26 -43
- package/fhi-icon-check.js.map +1 -1
- package/fhi-icon-chevron-down.js +26 -43
- package/fhi-icon-chevron-down.js.map +1 -1
- package/fhi-icon-chevron-left.js +26 -43
- package/fhi-icon-chevron-left.js.map +1 -1
- package/fhi-icon-chevron-right.js +26 -43
- package/fhi-icon-chevron-right.js.map +1 -1
- package/fhi-icon-chevron-up.js +26 -43
- package/fhi-icon-chevron-up.js.map +1 -1
- package/fhi-icon-chevrons-down.js +26 -43
- package/fhi-icon-chevrons-down.js.map +1 -1
- package/fhi-icon-chevrons-left.js +26 -43
- package/fhi-icon-chevrons-left.js.map +1 -1
- package/fhi-icon-chevrons-right.js +26 -43
- package/fhi-icon-chevrons-right.js.map +1 -1
- package/fhi-icon-chevrons-up.js +26 -43
- package/fhi-icon-chevrons-up.js.map +1 -1
- package/fhi-icon-circle-arrow-down.js +26 -43
- package/fhi-icon-circle-arrow-down.js.map +1 -1
- package/fhi-icon-circle-arrow-left.js +26 -43
- package/fhi-icon-circle-arrow-left.js.map +1 -1
- package/fhi-icon-circle-arrow-right.js +26 -43
- package/fhi-icon-circle-arrow-right.js.map +1 -1
- package/fhi-icon-circle-arrow-up.js +26 -43
- package/fhi-icon-circle-arrow-up.js.map +1 -1
- package/fhi-icon-circle-check-big.js +26 -43
- package/fhi-icon-circle-check-big.js.map +1 -1
- package/fhi-icon-circle-check.js +26 -43
- package/fhi-icon-circle-check.js.map +1 -1
- package/fhi-icon-circle-chevron-down.js +26 -43
- package/fhi-icon-circle-chevron-down.js.map +1 -1
- package/fhi-icon-circle-chevron-left.js +26 -43
- package/fhi-icon-circle-chevron-left.js.map +1 -1
- package/fhi-icon-circle-chevron-right.js +26 -43
- package/fhi-icon-circle-chevron-right.js.map +1 -1
- package/fhi-icon-circle-chevron-up.js +26 -43
- package/fhi-icon-circle-chevron-up.js.map +1 -1
- package/fhi-icon-circle-exclamation.js +26 -43
- package/fhi-icon-circle-exclamation.js.map +1 -1
- package/fhi-icon-circle-info.js +26 -43
- package/fhi-icon-circle-info.js.map +1 -1
- package/fhi-icon-circle-minus.js +26 -43
- package/fhi-icon-circle-minus.js.map +1 -1
- package/fhi-icon-circle-plus.js +26 -43
- package/fhi-icon-circle-plus.js.map +1 -1
- package/fhi-icon-circle-question.js +26 -43
- package/fhi-icon-circle-question.js.map +1 -1
- package/fhi-icon-circle-x.js +26 -43
- package/fhi-icon-circle-x.js.map +1 -1
- package/fhi-icon-circle.js +26 -43
- package/fhi-icon-circle.js.map +1 -1
- package/fhi-icon-clock.js +26 -43
- package/fhi-icon-clock.js.map +1 -1
- package/fhi-icon-copy.js +26 -43
- package/fhi-icon-copy.js.map +1 -1
- package/fhi-icon-download.js +26 -43
- package/fhi-icon-download.js.map +1 -1
- package/fhi-icon-ellipsis-vertical.js +26 -43
- package/fhi-icon-ellipsis-vertical.js.map +1 -1
- package/fhi-icon-ellipsis.js +26 -43
- package/fhi-icon-ellipsis.js.map +1 -1
- package/fhi-icon-exclamation.js +26 -43
- package/fhi-icon-exclamation.js.map +1 -1
- package/fhi-icon-expand.js +26 -43
- package/fhi-icon-expand.js.map +1 -1
- package/fhi-icon-external-link.js +26 -43
- package/fhi-icon-external-link.js.map +1 -1
- package/fhi-icon-eye-off.js +26 -43
- package/fhi-icon-eye-off.js.map +1 -1
- package/fhi-icon-eye.js +26 -43
- package/fhi-icon-eye.js.map +1 -1
- package/fhi-icon-file-text.js +26 -43
- package/fhi-icon-file-text.js.map +1 -1
- package/fhi-icon-file.js +26 -43
- package/fhi-icon-file.js.map +1 -1
- package/fhi-icon-filter.js +26 -43
- package/fhi-icon-filter.js.map +1 -1
- package/fhi-icon-folder.js +26 -43
- package/fhi-icon-folder.js.map +1 -1
- package/fhi-icon-gear.js +26 -43
- package/fhi-icon-gear.js.map +1 -1
- package/fhi-icon-grid-9-dots.js +26 -43
- package/fhi-icon-grid-9-dots.js.map +1 -1
- package/fhi-icon-grip-horizontal.js +26 -43
- package/fhi-icon-grip-horizontal.js.map +1 -1
- package/fhi-icon-grip-vertical.js +26 -43
- package/fhi-icon-grip-vertical.js.map +1 -1
- package/fhi-icon-history.js +26 -43
- package/fhi-icon-history.js.map +1 -1
- package/fhi-icon-info.js +26 -43
- package/fhi-icon-info.js.map +1 -1
- package/fhi-icon-link-2-off.js +26 -43
- package/fhi-icon-link-2-off.js.map +1 -1
- package/fhi-icon-link-2.js +26 -43
- package/fhi-icon-link-2.js.map +1 -1
- package/fhi-icon-link.js +26 -43
- package/fhi-icon-link.js.map +1 -1
- package/fhi-icon-lock-open.js +26 -43
- package/fhi-icon-lock-open.js.map +1 -1
- package/fhi-icon-lock.js +26 -43
- package/fhi-icon-lock.js.map +1 -1
- package/fhi-icon-log-in.js +26 -43
- package/fhi-icon-log-in.js.map +1 -1
- package/fhi-icon-log-out.js +26 -43
- package/fhi-icon-log-out.js.map +1 -1
- package/fhi-icon-mail.js +26 -43
- package/fhi-icon-mail.js.map +1 -1
- package/fhi-icon-map-pin.js +26 -43
- package/fhi-icon-map-pin.js.map +1 -1
- package/fhi-icon-menu.js +26 -43
- package/fhi-icon-menu.js.map +1 -1
- package/fhi-icon-message.js +26 -43
- package/fhi-icon-message.js.map +1 -1
- package/fhi-icon-minus.js +26 -43
- package/fhi-icon-minus.js.map +1 -1
- package/fhi-icon-octagon-alert.js +26 -43
- package/fhi-icon-octagon-alert.js.map +1 -1
- package/fhi-icon-paperclip.js +26 -43
- package/fhi-icon-paperclip.js.map +1 -1
- package/fhi-icon-pencil.js +26 -43
- package/fhi-icon-pencil.js.map +1 -1
- package/fhi-icon-phone.js +26 -43
- package/fhi-icon-phone.js.map +1 -1
- package/fhi-icon-pin-off.js +26 -43
- package/fhi-icon-pin-off.js.map +1 -1
- package/fhi-icon-pin.js +26 -43
- package/fhi-icon-pin.js.map +1 -1
- package/fhi-icon-plus.js +26 -43
- package/fhi-icon-plus.js.map +1 -1
- package/fhi-icon-printer.js +26 -43
- package/fhi-icon-printer.js.map +1 -1
- package/fhi-icon-question.js +26 -43
- package/fhi-icon-question.js.map +1 -1
- package/fhi-icon-refresh.js +26 -43
- package/fhi-icon-refresh.js.map +1 -1
- package/fhi-icon-rotate-left.js +26 -43
- package/fhi-icon-rotate-left.js.map +1 -1
- package/fhi-icon-rotate-right.js +26 -43
- package/fhi-icon-rotate-right.js.map +1 -1
- package/fhi-icon-search.js +26 -43
- package/fhi-icon-search.js.map +1 -1
- package/fhi-icon-send.js +26 -43
- package/fhi-icon-send.js.map +1 -1
- package/fhi-icon-share.js +26 -43
- package/fhi-icon-share.js.map +1 -1
- package/fhi-icon-sheet.js +26 -43
- package/fhi-icon-sheet.js.map +1 -1
- package/fhi-icon-square-check-big.js +26 -43
- package/fhi-icon-square-check-big.js.map +1 -1
- package/fhi-icon-square-check.js +26 -43
- package/fhi-icon-square-check.js.map +1 -1
- package/fhi-icon-square-pen.js +26 -43
- package/fhi-icon-square-pen.js.map +1 -1
- package/fhi-icon-square-x.js +26 -43
- package/fhi-icon-square-x.js.map +1 -1
- package/fhi-icon-square.js +26 -43
- package/fhi-icon-square.js.map +1 -1
- package/fhi-icon-trash.js +26 -43
- package/fhi-icon-trash.js.map +1 -1
- package/fhi-icon-triangle-alert.js +26 -43
- package/fhi-icon-triangle-alert.js.map +1 -1
- package/fhi-icon-upload.js +26 -43
- package/fhi-icon-upload.js.map +1 -1
- package/fhi-icon-user.js +26 -43
- package/fhi-icon-user.js.map +1 -1
- package/fhi-icon-x.js +26 -43
- package/fhi-icon-x.js.map +1 -1
- package/fhi-label.js +23 -32
- package/fhi-label.js.map +1 -1
- package/fhi-modal-dialog.js +76 -111
- package/fhi-modal-dialog.js.map +1 -1
- package/fhi-radio.js +91 -109
- package/fhi-radio.js.map +1 -1
- package/fhi-tag.js +32 -44
- package/fhi-tag.js.map +1 -1
- package/fhi-text-input.js +96 -126
- package/fhi-text-input.js.map +1 -1
- package/fhi-title.js +29 -46
- package/fhi-title.js.map +1 -1
- package/fhi-tooltip.component-DJNDfrHK.js +919 -0
- package/fhi-tooltip.component-DJNDfrHK.js.map +1 -0
- package/fhi-tooltip.js +2 -1162
- package/fonts/RobotoFlex.ttf +0 -0
- package/if-defined-Dl-W5B5_.js +7 -0
- package/if-defined-Dl-W5B5_.js.map +1 -0
- package/index.js +123 -369
- package/package.json +1 -1
- package/theme/default.css +480 -1
- package/unsafe-html-CBTN3162.js +50 -0
- package/unsafe-html-CBTN3162.js.map +1 -0
- package/web-types.json +1 -1
- package/base-D76d76ww.js +0 -10
- package/base-D76d76ww.js.map +0 -1
- package/fhi-date-input.js.map +0 -1
- package/fhi-tooltip.js.map +0 -1
- package/fonts/RobotoFlex.ttf.js.map +0 -1
- package/if-defined-B_sR6Mtk.js +0 -11
- package/if-defined-B_sR6Mtk.js.map +0 -1
- package/index.js.map +0 -1
- package/property-B2Ico5CW.js +0 -605
- package/property-B2Ico5CW.js.map +0 -1
- package/query-Ddbd72Um.js +0 -21
- package/query-Ddbd72Um.js.map +0 -1
- package/unsafe-html-DfuTUjUu.js +0 -48
- package/unsafe-html-DfuTUjUu.js.map +0 -1
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
import { a as e, d as t, i as n, o as r, r as i, s as a, t as o, u as s } from "./decorate-DFXIek-k.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
3
|
+
var c = Math.min, l = Math.max, u = Math.round, d = Math.floor, f = (e) => ({
|
|
4
|
+
x: e,
|
|
5
|
+
y: e
|
|
6
|
+
}), p = {
|
|
7
|
+
left: "right",
|
|
8
|
+
right: "left",
|
|
9
|
+
bottom: "top",
|
|
10
|
+
top: "bottom"
|
|
11
|
+
};
|
|
12
|
+
function m(e, t, n) {
|
|
13
|
+
return l(e, c(t, n));
|
|
14
|
+
}
|
|
15
|
+
function h(e, t) {
|
|
16
|
+
return typeof e == "function" ? e(t) : e;
|
|
17
|
+
}
|
|
18
|
+
function g(e) {
|
|
19
|
+
return e.split("-")[0];
|
|
20
|
+
}
|
|
21
|
+
function _(e) {
|
|
22
|
+
return e.split("-")[1];
|
|
23
|
+
}
|
|
24
|
+
function v(e) {
|
|
25
|
+
return e === "x" ? "y" : "x";
|
|
26
|
+
}
|
|
27
|
+
function y(e) {
|
|
28
|
+
return e === "y" ? "height" : "width";
|
|
29
|
+
}
|
|
30
|
+
function b(e) {
|
|
31
|
+
let t = e[0];
|
|
32
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
33
|
+
}
|
|
34
|
+
function x(e) {
|
|
35
|
+
return v(b(e));
|
|
36
|
+
}
|
|
37
|
+
function ee(e, t, n) {
|
|
38
|
+
n === void 0 && (n = !1);
|
|
39
|
+
let r = _(e), i = x(e), a = y(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
40
|
+
return t.reference[a] > t.floating[a] && (o = O(o)), [o, O(o)];
|
|
41
|
+
}
|
|
42
|
+
function S(e) {
|
|
43
|
+
let t = O(e);
|
|
44
|
+
return [
|
|
45
|
+
C(e),
|
|
46
|
+
t,
|
|
47
|
+
C(t)
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
function C(e) {
|
|
51
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
52
|
+
}
|
|
53
|
+
var w = ["left", "right"], T = ["right", "left"], te = ["top", "bottom"], E = ["bottom", "top"];
|
|
54
|
+
function D(e, t, n) {
|
|
55
|
+
switch (e) {
|
|
56
|
+
case "top":
|
|
57
|
+
case "bottom": return n ? t ? T : w : t ? w : T;
|
|
58
|
+
case "left":
|
|
59
|
+
case "right": return t ? te : E;
|
|
60
|
+
default: return [];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function ne(e, t, n, r) {
|
|
64
|
+
let i = _(e), a = D(g(e), n === "start", r);
|
|
65
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(C)))), a;
|
|
66
|
+
}
|
|
67
|
+
function O(e) {
|
|
68
|
+
let t = g(e);
|
|
69
|
+
return p[t] + e.slice(t.length);
|
|
70
|
+
}
|
|
71
|
+
function k(e) {
|
|
72
|
+
return {
|
|
73
|
+
top: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
...e
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function re(e) {
|
|
81
|
+
return typeof e == "number" ? {
|
|
82
|
+
top: e,
|
|
83
|
+
right: e,
|
|
84
|
+
bottom: e,
|
|
85
|
+
left: e
|
|
86
|
+
} : k(e);
|
|
87
|
+
}
|
|
88
|
+
function A(e) {
|
|
89
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
90
|
+
return {
|
|
91
|
+
width: r,
|
|
92
|
+
height: i,
|
|
93
|
+
top: n,
|
|
94
|
+
left: t,
|
|
95
|
+
right: t + r,
|
|
96
|
+
bottom: n + i,
|
|
97
|
+
x: t,
|
|
98
|
+
y: n
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
103
|
+
function ie(e, t, n) {
|
|
104
|
+
let { reference: r, floating: i } = e, a = b(t), o = x(t), s = y(o), c = g(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
105
|
+
switch (c) {
|
|
106
|
+
case "top":
|
|
107
|
+
p = {
|
|
108
|
+
x: u,
|
|
109
|
+
y: r.y - i.height
|
|
110
|
+
};
|
|
111
|
+
break;
|
|
112
|
+
case "bottom":
|
|
113
|
+
p = {
|
|
114
|
+
x: u,
|
|
115
|
+
y: r.y + r.height
|
|
116
|
+
};
|
|
117
|
+
break;
|
|
118
|
+
case "right":
|
|
119
|
+
p = {
|
|
120
|
+
x: r.x + r.width,
|
|
121
|
+
y: d
|
|
122
|
+
};
|
|
123
|
+
break;
|
|
124
|
+
case "left":
|
|
125
|
+
p = {
|
|
126
|
+
x: r.x - i.width,
|
|
127
|
+
y: d
|
|
128
|
+
};
|
|
129
|
+
break;
|
|
130
|
+
default: p = {
|
|
131
|
+
x: r.x,
|
|
132
|
+
y: r.y
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
switch (_(t)) {
|
|
136
|
+
case "start":
|
|
137
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
138
|
+
break;
|
|
139
|
+
case "end":
|
|
140
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
return p;
|
|
144
|
+
}
|
|
145
|
+
async function ae(e, t) {
|
|
146
|
+
t === void 0 && (t = {});
|
|
147
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = h(t, e), p = re(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], g = A(await i.getClippingRect({
|
|
148
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
149
|
+
boundary: c,
|
|
150
|
+
rootBoundary: l,
|
|
151
|
+
strategy: s
|
|
152
|
+
})), _ = u === "floating" ? {
|
|
153
|
+
x: n,
|
|
154
|
+
y: r,
|
|
155
|
+
width: a.floating.width,
|
|
156
|
+
height: a.floating.height
|
|
157
|
+
} : a.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), y = await (i.isElement == null ? void 0 : i.isElement(v)) && await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
158
|
+
x: 1,
|
|
159
|
+
y: 1
|
|
160
|
+
}, b = A(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
161
|
+
elements: o,
|
|
162
|
+
rect: _,
|
|
163
|
+
offsetParent: v,
|
|
164
|
+
strategy: s
|
|
165
|
+
}) : _);
|
|
166
|
+
return {
|
|
167
|
+
top: (g.top - b.top + p.top) / y.y,
|
|
168
|
+
bottom: (b.bottom - g.bottom + p.bottom) / y.y,
|
|
169
|
+
left: (g.left - b.left + p.left) / y.x,
|
|
170
|
+
right: (b.right - g.right + p.right) / y.x
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
var oe = 50, se = async (e, t, n) => {
|
|
174
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
175
|
+
...o,
|
|
176
|
+
detectOverflow: ae
|
|
177
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
178
|
+
reference: e,
|
|
179
|
+
floating: t,
|
|
180
|
+
strategy: i
|
|
181
|
+
}), { x: u, y: d } = ie(l, r, c), f = r, p = 0, m = {};
|
|
182
|
+
for (let n = 0; n < a.length; n++) {
|
|
183
|
+
let h = a[n];
|
|
184
|
+
if (!h) continue;
|
|
185
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
186
|
+
x: u,
|
|
187
|
+
y: d,
|
|
188
|
+
initialPlacement: r,
|
|
189
|
+
placement: f,
|
|
190
|
+
strategy: i,
|
|
191
|
+
middlewareData: m,
|
|
192
|
+
rects: l,
|
|
193
|
+
platform: s,
|
|
194
|
+
elements: {
|
|
195
|
+
reference: e,
|
|
196
|
+
floating: t
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
200
|
+
...m[g],
|
|
201
|
+
...b
|
|
202
|
+
}, x && p < oe && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
203
|
+
reference: e,
|
|
204
|
+
floating: t,
|
|
205
|
+
strategy: i
|
|
206
|
+
}) : x.rects), {x: u, y: d} = ie(l, f, c)), n = -1);
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
x: u,
|
|
210
|
+
y: d,
|
|
211
|
+
placement: f,
|
|
212
|
+
strategy: i,
|
|
213
|
+
middlewareData: m
|
|
214
|
+
};
|
|
215
|
+
}, ce = function(e) {
|
|
216
|
+
return e === void 0 && (e = {}), {
|
|
217
|
+
name: "flip",
|
|
218
|
+
options: e,
|
|
219
|
+
async fn(t) {
|
|
220
|
+
var n;
|
|
221
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ..._ } = h(e, t);
|
|
222
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
223
|
+
let v = g(r), y = b(o), x = g(o) === o, C = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), w = d || (x || !m ? [O(o)] : S(o)), T = p !== "none";
|
|
224
|
+
!d && T && w.push(...ne(o, m, p, C));
|
|
225
|
+
let te = [o, ...w], E = await s.detectOverflow(t, _), D = [], k = i.flip?.overflows || [];
|
|
226
|
+
if (l && D.push(E[v]), u) {
|
|
227
|
+
let e = ee(r, a, C);
|
|
228
|
+
D.push(E[e[0]], E[e[1]]);
|
|
229
|
+
}
|
|
230
|
+
if (k = [...k, {
|
|
231
|
+
placement: r,
|
|
232
|
+
overflows: D
|
|
233
|
+
}], !D.every((e) => e <= 0)) {
|
|
234
|
+
let e = (i.flip?.index || 0) + 1, t = te[e];
|
|
235
|
+
if (t && (!(u === "alignment" && y !== b(t)) || k.every((e) => b(e.placement) === y ? e.overflows[0] > 0 : !0))) return {
|
|
236
|
+
data: {
|
|
237
|
+
index: e,
|
|
238
|
+
overflows: k
|
|
239
|
+
},
|
|
240
|
+
reset: { placement: t }
|
|
241
|
+
};
|
|
242
|
+
let n = k.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
243
|
+
if (!n) switch (f) {
|
|
244
|
+
case "bestFit": {
|
|
245
|
+
let e = k.filter((e) => {
|
|
246
|
+
if (T) {
|
|
247
|
+
let t = b(e.placement);
|
|
248
|
+
return t === y || t === "y";
|
|
249
|
+
}
|
|
250
|
+
return !0;
|
|
251
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
252
|
+
e && (n = e);
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
case "initialPlacement":
|
|
256
|
+
n = o;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
if (r !== n) return { reset: { placement: n } };
|
|
260
|
+
}
|
|
261
|
+
return {};
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}, le = /*#__PURE__*/ new Set(["left", "top"]);
|
|
265
|
+
async function ue(e, t) {
|
|
266
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = g(n), s = _(n), c = b(n) === "y", l = le.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = h(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
267
|
+
mainAxis: d,
|
|
268
|
+
crossAxis: 0,
|
|
269
|
+
alignmentAxis: null
|
|
270
|
+
} : {
|
|
271
|
+
mainAxis: d.mainAxis || 0,
|
|
272
|
+
crossAxis: d.crossAxis || 0,
|
|
273
|
+
alignmentAxis: d.alignmentAxis
|
|
274
|
+
};
|
|
275
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
276
|
+
x: p * u,
|
|
277
|
+
y: f * l
|
|
278
|
+
} : {
|
|
279
|
+
x: f * l,
|
|
280
|
+
y: p * u
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
var de = function(e) {
|
|
284
|
+
return e === void 0 && (e = 0), {
|
|
285
|
+
name: "offset",
|
|
286
|
+
options: e,
|
|
287
|
+
async fn(t) {
|
|
288
|
+
var n;
|
|
289
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ue(t, e);
|
|
290
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
291
|
+
x: r + s.x,
|
|
292
|
+
y: i + s.y,
|
|
293
|
+
data: {
|
|
294
|
+
...s,
|
|
295
|
+
placement: a
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}, fe = function(e) {
|
|
301
|
+
return e === void 0 && (e = {}), {
|
|
302
|
+
name: "shift",
|
|
303
|
+
options: e,
|
|
304
|
+
async fn(t) {
|
|
305
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
306
|
+
let { x: t, y: n } = e;
|
|
307
|
+
return {
|
|
308
|
+
x: t,
|
|
309
|
+
y: n
|
|
310
|
+
};
|
|
311
|
+
} }, ...l } = h(e, t), u = {
|
|
312
|
+
x: n,
|
|
313
|
+
y: r
|
|
314
|
+
}, d = await a.detectOverflow(t, l), f = b(g(i)), p = v(f), _ = u[p], y = u[f];
|
|
315
|
+
if (o) {
|
|
316
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = _ + d[e], r = _ - d[t];
|
|
317
|
+
_ = m(n, _, r);
|
|
318
|
+
}
|
|
319
|
+
if (s) {
|
|
320
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = y + d[e], r = y - d[t];
|
|
321
|
+
y = m(n, y, r);
|
|
322
|
+
}
|
|
323
|
+
let x = c.fn({
|
|
324
|
+
...t,
|
|
325
|
+
[p]: _,
|
|
326
|
+
[f]: y
|
|
327
|
+
});
|
|
328
|
+
return {
|
|
329
|
+
...x,
|
|
330
|
+
data: {
|
|
331
|
+
x: x.x - n,
|
|
332
|
+
y: x.y - r,
|
|
333
|
+
enabled: {
|
|
334
|
+
[p]: o,
|
|
335
|
+
[f]: s
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
344
|
+
function j() {
|
|
345
|
+
return typeof window < "u";
|
|
346
|
+
}
|
|
347
|
+
function M(e) {
|
|
348
|
+
return pe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
349
|
+
}
|
|
350
|
+
function N(e) {
|
|
351
|
+
var t;
|
|
352
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
353
|
+
}
|
|
354
|
+
function P(e) {
|
|
355
|
+
return ((pe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
356
|
+
}
|
|
357
|
+
function pe(e) {
|
|
358
|
+
return j() ? e instanceof Node || e instanceof N(e).Node : !1;
|
|
359
|
+
}
|
|
360
|
+
function F(e) {
|
|
361
|
+
return j() ? e instanceof Element || e instanceof N(e).Element : !1;
|
|
362
|
+
}
|
|
363
|
+
function I(e) {
|
|
364
|
+
return j() ? e instanceof HTMLElement || e instanceof N(e).HTMLElement : !1;
|
|
365
|
+
}
|
|
366
|
+
function me(e) {
|
|
367
|
+
return !j() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof N(e).ShadowRoot;
|
|
368
|
+
}
|
|
369
|
+
function L(e) {
|
|
370
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = U(e);
|
|
371
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
372
|
+
}
|
|
373
|
+
function he(e) {
|
|
374
|
+
return /^(table|td|th)$/.test(M(e));
|
|
375
|
+
}
|
|
376
|
+
function R(e) {
|
|
377
|
+
try {
|
|
378
|
+
if (e.matches(":popover-open")) return !0;
|
|
379
|
+
} catch {}
|
|
380
|
+
try {
|
|
381
|
+
return e.matches(":modal");
|
|
382
|
+
} catch {
|
|
383
|
+
return !1;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
var ge = /transform|translate|scale|rotate|perspective|filter/, _e = /paint|layout|strict|content/, z = (e) => !!e && e !== "none", ve;
|
|
387
|
+
function B(e) {
|
|
388
|
+
let t = F(e) ? U(e) : e;
|
|
389
|
+
return z(t.transform) || z(t.translate) || z(t.scale) || z(t.rotate) || z(t.perspective) || !V() && (z(t.backdropFilter) || z(t.filter)) || ge.test(t.willChange || "") || _e.test(t.contain || "");
|
|
390
|
+
}
|
|
391
|
+
function ye(e) {
|
|
392
|
+
let t = G(e);
|
|
393
|
+
for (; I(t) && !H(t);) {
|
|
394
|
+
if (B(t)) return t;
|
|
395
|
+
if (R(t)) return null;
|
|
396
|
+
t = G(t);
|
|
397
|
+
}
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
function V() {
|
|
401
|
+
return ve ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), ve;
|
|
402
|
+
}
|
|
403
|
+
function H(e) {
|
|
404
|
+
return /^(html|body|#document)$/.test(M(e));
|
|
405
|
+
}
|
|
406
|
+
function U(e) {
|
|
407
|
+
return N(e).getComputedStyle(e);
|
|
408
|
+
}
|
|
409
|
+
function W(e) {
|
|
410
|
+
return F(e) ? {
|
|
411
|
+
scrollLeft: e.scrollLeft,
|
|
412
|
+
scrollTop: e.scrollTop
|
|
413
|
+
} : {
|
|
414
|
+
scrollLeft: e.scrollX,
|
|
415
|
+
scrollTop: e.scrollY
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function G(e) {
|
|
419
|
+
if (M(e) === "html") return e;
|
|
420
|
+
let t = e.assignedSlot || e.parentNode || me(e) && e.host || P(e);
|
|
421
|
+
return me(t) ? t.host : t;
|
|
422
|
+
}
|
|
423
|
+
function be(e) {
|
|
424
|
+
let t = G(e);
|
|
425
|
+
return H(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : I(t) && L(t) ? t : be(t);
|
|
426
|
+
}
|
|
427
|
+
function K(e, t, n) {
|
|
428
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
429
|
+
let r = be(e), i = r === e.ownerDocument?.body, a = N(r);
|
|
430
|
+
if (i) {
|
|
431
|
+
let e = q(a);
|
|
432
|
+
return t.concat(a, a.visualViewport || [], L(r) ? r : [], e && n ? K(e) : []);
|
|
433
|
+
} else return t.concat(r, K(r, [], n));
|
|
434
|
+
}
|
|
435
|
+
function q(e) {
|
|
436
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
440
|
+
function xe(e) {
|
|
441
|
+
let t = U(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = I(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = u(n) !== a || u(r) !== o;
|
|
442
|
+
return s && (n = a, r = o), {
|
|
443
|
+
width: n,
|
|
444
|
+
height: r,
|
|
445
|
+
$: s
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
function J(e) {
|
|
449
|
+
return F(e) ? e : e.contextElement;
|
|
450
|
+
}
|
|
451
|
+
function Y(e) {
|
|
452
|
+
let t = J(e);
|
|
453
|
+
if (!I(t)) return f(1);
|
|
454
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = xe(t), o = (a ? u(n.width) : n.width) / r, s = (a ? u(n.height) : n.height) / i;
|
|
455
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
456
|
+
x: o,
|
|
457
|
+
y: s
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
var Se = /*#__PURE__*/ f(0);
|
|
461
|
+
function Ce(e) {
|
|
462
|
+
let t = N(e);
|
|
463
|
+
return !V() || !t.visualViewport ? Se : {
|
|
464
|
+
x: t.visualViewport.offsetLeft,
|
|
465
|
+
y: t.visualViewport.offsetTop
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function we(e, t, n) {
|
|
469
|
+
return t === void 0 && (t = !1), !n || t && n !== N(e) ? !1 : t;
|
|
470
|
+
}
|
|
471
|
+
function X(e, t, n, r) {
|
|
472
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
473
|
+
let i = e.getBoundingClientRect(), a = J(e), o = f(1);
|
|
474
|
+
t && (r ? F(r) && (o = Y(r)) : o = Y(e));
|
|
475
|
+
let s = we(a, n, r) ? Ce(a) : f(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
476
|
+
if (a) {
|
|
477
|
+
let e = N(a), t = r && F(r) ? N(r) : r, n = e, i = q(n);
|
|
478
|
+
for (; i && r && t !== n;) {
|
|
479
|
+
let e = Y(i), t = i.getBoundingClientRect(), r = U(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
480
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = N(i), i = q(n);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return A({
|
|
484
|
+
width: u,
|
|
485
|
+
height: d,
|
|
486
|
+
x: c,
|
|
487
|
+
y: l
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
function Z(e, t) {
|
|
491
|
+
let n = W(e).scrollLeft;
|
|
492
|
+
return t ? t.left + n : X(P(e)).left + n;
|
|
493
|
+
}
|
|
494
|
+
function Te(e, t) {
|
|
495
|
+
let n = e.getBoundingClientRect();
|
|
496
|
+
return {
|
|
497
|
+
x: n.left + t.scrollLeft - Z(e, n),
|
|
498
|
+
y: n.top + t.scrollTop
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
function Ee(e) {
|
|
502
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = P(r), s = t ? R(t.floating) : !1;
|
|
503
|
+
if (r === o || s && a) return n;
|
|
504
|
+
let c = {
|
|
505
|
+
scrollLeft: 0,
|
|
506
|
+
scrollTop: 0
|
|
507
|
+
}, l = f(1), u = f(0), d = I(r);
|
|
508
|
+
if ((d || !d && !a) && ((M(r) !== "body" || L(o)) && (c = W(r)), d)) {
|
|
509
|
+
let e = X(r);
|
|
510
|
+
l = Y(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
511
|
+
}
|
|
512
|
+
let p = o && !d && !a ? Te(o, c) : f(0);
|
|
513
|
+
return {
|
|
514
|
+
width: n.width * l.x,
|
|
515
|
+
height: n.height * l.y,
|
|
516
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + p.x,
|
|
517
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
function De(e) {
|
|
521
|
+
return Array.from(e.getClientRects());
|
|
522
|
+
}
|
|
523
|
+
function Oe(e) {
|
|
524
|
+
let t = P(e), n = W(e), r = e.ownerDocument.body, i = l(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = l(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Z(e), s = -n.scrollTop;
|
|
525
|
+
return U(r).direction === "rtl" && (o += l(t.clientWidth, r.clientWidth) - i), {
|
|
526
|
+
width: i,
|
|
527
|
+
height: a,
|
|
528
|
+
x: o,
|
|
529
|
+
y: s
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
var ke = 25;
|
|
533
|
+
function Ae(e, t) {
|
|
534
|
+
let n = N(e), r = P(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
535
|
+
if (i) {
|
|
536
|
+
a = i.width, o = i.height;
|
|
537
|
+
let e = V();
|
|
538
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
539
|
+
}
|
|
540
|
+
let l = Z(r);
|
|
541
|
+
if (l <= 0) {
|
|
542
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
543
|
+
o <= ke && (a -= o);
|
|
544
|
+
} else l <= ke && (a += l);
|
|
545
|
+
return {
|
|
546
|
+
width: a,
|
|
547
|
+
height: o,
|
|
548
|
+
x: s,
|
|
549
|
+
y: c
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
function je(e, t) {
|
|
553
|
+
let n = X(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = I(e) ? Y(e) : f(1);
|
|
554
|
+
return {
|
|
555
|
+
width: e.clientWidth * a.x,
|
|
556
|
+
height: e.clientHeight * a.y,
|
|
557
|
+
x: i * a.x,
|
|
558
|
+
y: r * a.y
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
function Me(e, t, n) {
|
|
562
|
+
let r;
|
|
563
|
+
if (t === "viewport") r = Ae(e, n);
|
|
564
|
+
else if (t === "document") r = Oe(P(e));
|
|
565
|
+
else if (F(t)) r = je(t, n);
|
|
566
|
+
else {
|
|
567
|
+
let n = Ce(e);
|
|
568
|
+
r = {
|
|
569
|
+
x: t.x - n.x,
|
|
570
|
+
y: t.y - n.y,
|
|
571
|
+
width: t.width,
|
|
572
|
+
height: t.height
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
return A(r);
|
|
576
|
+
}
|
|
577
|
+
function Ne(e, t) {
|
|
578
|
+
let n = G(e);
|
|
579
|
+
return n === t || !F(n) || H(n) ? !1 : U(n).position === "fixed" || Ne(n, t);
|
|
580
|
+
}
|
|
581
|
+
function Pe(e, t) {
|
|
582
|
+
let n = t.get(e);
|
|
583
|
+
if (n) return n;
|
|
584
|
+
let r = K(e, [], !1).filter((e) => F(e) && M(e) !== "body"), i = null, a = U(e).position === "fixed", o = a ? G(e) : e;
|
|
585
|
+
for (; F(o) && !H(o);) {
|
|
586
|
+
let t = U(o), n = B(o);
|
|
587
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || L(o) && !n && Ne(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = G(o);
|
|
588
|
+
}
|
|
589
|
+
return t.set(e, r), r;
|
|
590
|
+
}
|
|
591
|
+
function Fe(e) {
|
|
592
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? R(t) ? [] : Pe(t, this._c) : [].concat(n), r], o = Me(t, a[0], i), s = o.top, u = o.right, d = o.bottom, f = o.left;
|
|
593
|
+
for (let e = 1; e < a.length; e++) {
|
|
594
|
+
let n = Me(t, a[e], i);
|
|
595
|
+
s = l(n.top, s), u = c(n.right, u), d = c(n.bottom, d), f = l(n.left, f);
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
width: u - f,
|
|
599
|
+
height: d - s,
|
|
600
|
+
x: f,
|
|
601
|
+
y: s
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function Ie(e) {
|
|
605
|
+
let { width: t, height: n } = xe(e);
|
|
606
|
+
return {
|
|
607
|
+
width: t,
|
|
608
|
+
height: n
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
function Le(e, t, n) {
|
|
612
|
+
let r = I(t), i = P(t), a = n === "fixed", o = X(e, !0, a, t), s = {
|
|
613
|
+
scrollLeft: 0,
|
|
614
|
+
scrollTop: 0
|
|
615
|
+
}, c = f(0);
|
|
616
|
+
function l() {
|
|
617
|
+
c.x = Z(i);
|
|
618
|
+
}
|
|
619
|
+
if (r || !r && !a) if ((M(t) !== "body" || L(i)) && (s = W(t)), r) {
|
|
620
|
+
let e = X(t, !0, a, t);
|
|
621
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
622
|
+
} else i && l();
|
|
623
|
+
a && !r && i && l();
|
|
624
|
+
let u = i && !r && !a ? Te(i, s) : f(0);
|
|
625
|
+
return {
|
|
626
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
627
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
628
|
+
width: o.width,
|
|
629
|
+
height: o.height
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
function Q(e) {
|
|
633
|
+
return U(e).position === "static";
|
|
634
|
+
}
|
|
635
|
+
function Re(e, t) {
|
|
636
|
+
if (!I(e) || U(e).position === "fixed") return null;
|
|
637
|
+
if (t) return t(e);
|
|
638
|
+
let n = e.offsetParent;
|
|
639
|
+
return P(e) === n && (n = n.ownerDocument.body), n;
|
|
640
|
+
}
|
|
641
|
+
function ze(e, t) {
|
|
642
|
+
let n = N(e);
|
|
643
|
+
if (R(e)) return n;
|
|
644
|
+
if (!I(e)) {
|
|
645
|
+
let t = G(e);
|
|
646
|
+
for (; t && !H(t);) {
|
|
647
|
+
if (F(t) && !Q(t)) return t;
|
|
648
|
+
t = G(t);
|
|
649
|
+
}
|
|
650
|
+
return n;
|
|
651
|
+
}
|
|
652
|
+
let r = Re(e, t);
|
|
653
|
+
for (; r && he(r) && Q(r);) r = Re(r, t);
|
|
654
|
+
return r && H(r) && Q(r) && !B(r) ? n : r || ye(e) || n;
|
|
655
|
+
}
|
|
656
|
+
var Be = async function(e) {
|
|
657
|
+
let t = this.getOffsetParent || ze, n = this.getDimensions, r = await n(e.floating);
|
|
658
|
+
return {
|
|
659
|
+
reference: Le(e.reference, await t(e.floating), e.strategy),
|
|
660
|
+
floating: {
|
|
661
|
+
x: 0,
|
|
662
|
+
y: 0,
|
|
663
|
+
width: r.width,
|
|
664
|
+
height: r.height
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
function Ve(e) {
|
|
669
|
+
return U(e).direction === "rtl";
|
|
670
|
+
}
|
|
671
|
+
var He = {
|
|
672
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ee,
|
|
673
|
+
getDocumentElement: P,
|
|
674
|
+
getClippingRect: Fe,
|
|
675
|
+
getOffsetParent: ze,
|
|
676
|
+
getElementRects: Be,
|
|
677
|
+
getClientRects: De,
|
|
678
|
+
getDimensions: Ie,
|
|
679
|
+
getScale: Y,
|
|
680
|
+
isElement: F,
|
|
681
|
+
isRTL: Ve
|
|
682
|
+
};
|
|
683
|
+
function Ue(e, t) {
|
|
684
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
685
|
+
}
|
|
686
|
+
function We(e, t) {
|
|
687
|
+
let n = null, r, i = P(e);
|
|
688
|
+
function a() {
|
|
689
|
+
var e;
|
|
690
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
691
|
+
}
|
|
692
|
+
function o(s, u) {
|
|
693
|
+
s === void 0 && (s = !1), u === void 0 && (u = 1), a();
|
|
694
|
+
let f = e.getBoundingClientRect(), { left: p, top: m, width: h, height: g } = f;
|
|
695
|
+
if (s || t(), !h || !g) return;
|
|
696
|
+
let _ = d(m), v = d(i.clientWidth - (p + h)), y = d(i.clientHeight - (m + g)), b = d(p), x = {
|
|
697
|
+
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
|
|
698
|
+
threshold: l(0, c(1, u)) || 1
|
|
699
|
+
}, ee = !0;
|
|
700
|
+
function S(t) {
|
|
701
|
+
let n = t[0].intersectionRatio;
|
|
702
|
+
if (n !== u) {
|
|
703
|
+
if (!ee) return o();
|
|
704
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
705
|
+
o(!1, 1e-7);
|
|
706
|
+
}, 1e3);
|
|
707
|
+
}
|
|
708
|
+
n === 1 && !Ue(f, e.getBoundingClientRect()) && o(), ee = !1;
|
|
709
|
+
}
|
|
710
|
+
try {
|
|
711
|
+
n = new IntersectionObserver(S, {
|
|
712
|
+
...x,
|
|
713
|
+
root: i.ownerDocument
|
|
714
|
+
});
|
|
715
|
+
} catch {
|
|
716
|
+
n = new IntersectionObserver(S, x);
|
|
717
|
+
}
|
|
718
|
+
n.observe(e);
|
|
719
|
+
}
|
|
720
|
+
return o(!0), a;
|
|
721
|
+
}
|
|
722
|
+
function Ge(e, t, n, r) {
|
|
723
|
+
r === void 0 && (r = {});
|
|
724
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = J(e), u = i || a ? [...l ? K(l) : [], ...t ? K(t) : []] : [];
|
|
725
|
+
u.forEach((e) => {
|
|
726
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
727
|
+
});
|
|
728
|
+
let d = l && s ? We(l, n) : null, f = -1, p = null;
|
|
729
|
+
o && (p = new ResizeObserver((e) => {
|
|
730
|
+
let [r] = e;
|
|
731
|
+
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
732
|
+
var e;
|
|
733
|
+
(e = p) == null || e.observe(t);
|
|
734
|
+
})), n();
|
|
735
|
+
}), l && !c && p.observe(l), t && p.observe(t));
|
|
736
|
+
let m, h = c ? X(e) : null;
|
|
737
|
+
c && g();
|
|
738
|
+
function g() {
|
|
739
|
+
let t = X(e);
|
|
740
|
+
h && !Ue(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
741
|
+
}
|
|
742
|
+
return n(), () => {
|
|
743
|
+
var e;
|
|
744
|
+
u.forEach((e) => {
|
|
745
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
746
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
var Ke = de, qe = fe, Je = ce, Ye = (e, t, n) => {
|
|
750
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
751
|
+
platform: He,
|
|
752
|
+
...n
|
|
753
|
+
}, a = {
|
|
754
|
+
...i.platform,
|
|
755
|
+
_c: r
|
|
756
|
+
};
|
|
757
|
+
return se(e, t, {
|
|
758
|
+
...i,
|
|
759
|
+
platform: a
|
|
760
|
+
});
|
|
761
|
+
}, Xe = "fhi-tooltip", $ = class extends a {
|
|
762
|
+
constructor(...e) {
|
|
763
|
+
super(...e), this.message = "", this.placement = "top", this.delay = 500, this.trigger = "hover", this.maxWidth = "18.75rem", this._timeoutId = void 0, this._autoPositioningCleanup = () => {}, this._isVisible = !1, this._isFadingOut = !1, this._position = {
|
|
764
|
+
top: 0,
|
|
765
|
+
left: 0
|
|
766
|
+
}, this._handlePotentialClickOutside = (e) => {
|
|
767
|
+
this.trigger === "click" && this._isVisible && !this.contains(e.target) && this._hideTooltip();
|
|
768
|
+
}, this.__handlePotentialEscapeKeyPress = (e) => {
|
|
769
|
+
e.key === "Escape" && this._isVisible && this._hideTooltip();
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
update(e) {
|
|
773
|
+
e.has("trigger") && this.trigger !== "click" && this.trigger !== "hover" && (this.trigger = "hover"), super.update(e);
|
|
774
|
+
}
|
|
775
|
+
_showTooltip() {
|
|
776
|
+
this._isVisible || this.message && (this._positionTooltip(this.placement), this._isVisible = !0, window.addEventListener("click", this._handlePotentialClickOutside), window.addEventListener("keydown", this.__handlePotentialEscapeKeyPress));
|
|
777
|
+
}
|
|
778
|
+
_hideTooltip() {
|
|
779
|
+
this._isVisible && (this._isFadingOut = !0, setTimeout(() => {
|
|
780
|
+
this._isVisible = !1, this._isFadingOut = !1, this._autoPositioningCleanup(), window.removeEventListener("click", this._handlePotentialClickOutside), window.removeEventListener("keydown", this.__handlePotentialEscapeKeyPress);
|
|
781
|
+
}, 150));
|
|
782
|
+
}
|
|
783
|
+
_positionTooltip(e) {
|
|
784
|
+
this._autoPositioningCleanup = Ge(this._anchor, this._tooltip, () => {
|
|
785
|
+
Ye(this._anchor, this._tooltip, {
|
|
786
|
+
placement: e || "top",
|
|
787
|
+
strategy: "fixed",
|
|
788
|
+
middleware: [
|
|
789
|
+
Je({ fallbackAxisSideDirection: "start" }),
|
|
790
|
+
qe(),
|
|
791
|
+
Ke(4)
|
|
792
|
+
]
|
|
793
|
+
}).then(({ x: e, y: t }) => {
|
|
794
|
+
this._position = {
|
|
795
|
+
top: t,
|
|
796
|
+
left: e
|
|
797
|
+
};
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
_handleMouseEnter() {
|
|
802
|
+
this.trigger === "hover" && (this._timeoutId = setTimeout(() => {
|
|
803
|
+
this._showTooltip();
|
|
804
|
+
}, this.delay));
|
|
805
|
+
}
|
|
806
|
+
_handleMouseLeave() {
|
|
807
|
+
this.trigger === "hover" && (clearTimeout(this._timeoutId), this._hideTooltip());
|
|
808
|
+
}
|
|
809
|
+
_handleClick() {
|
|
810
|
+
this.trigger === "click" && (this._isVisible ? this._hideTooltip() : this._showTooltip());
|
|
811
|
+
}
|
|
812
|
+
render() {
|
|
813
|
+
return s`
|
|
814
|
+
<div
|
|
815
|
+
id="tooltip-anchor"
|
|
816
|
+
@mouseenter=${this._handleMouseEnter}
|
|
817
|
+
@mouseleave=${this._handleMouseLeave}
|
|
818
|
+
@focusin=${this._handleMouseEnter}
|
|
819
|
+
@focusout=${this._handleMouseLeave}
|
|
820
|
+
@touchstart=${this._handleMouseEnter}
|
|
821
|
+
@touchend=${this._handleMouseLeave}
|
|
822
|
+
@touchcancel=${this._handleMouseLeave}
|
|
823
|
+
@click=${this._handleClick}
|
|
824
|
+
>
|
|
825
|
+
<slot aria-describedby="tooltip"></slot>
|
|
826
|
+
<section
|
|
827
|
+
id="tooltip"
|
|
828
|
+
role="tooltip"
|
|
829
|
+
aria-hidden=${!this._isVisible}
|
|
830
|
+
?fading-out=${this._isFadingOut}
|
|
831
|
+
style="
|
|
832
|
+
transform: translate3d(${this._position.left}px, ${this._position.top}px, 0); max-width: ${this.maxWidth};
|
|
833
|
+
max-width: ${this.maxWidth};
|
|
834
|
+
"
|
|
835
|
+
>
|
|
836
|
+
<span>${this.message}</span>
|
|
837
|
+
</section>
|
|
838
|
+
</div>
|
|
839
|
+
`;
|
|
840
|
+
}
|
|
841
|
+
static {
|
|
842
|
+
this.styles = t`
|
|
843
|
+
:host {
|
|
844
|
+
--color-background: var(--fhi-color-neutral-base-active);
|
|
845
|
+
--color-text: var(--fhi-color-neutral-text-inverted);
|
|
846
|
+
--color-border: none;
|
|
847
|
+
|
|
848
|
+
--typography-font-family: var(--fhi-font-family-default);
|
|
849
|
+
--typography-font-size: var(--fhi-typography-body-small-font-size);
|
|
850
|
+
--typography-font-style: normal;
|
|
851
|
+
--typography-font-weight: var(--fhi-typography-body-small-font-weight);
|
|
852
|
+
--typography-line-height: var(--fhi-typography-body-small-line-height);
|
|
853
|
+
--typography-letter-spacing: var(
|
|
854
|
+
--fhi-typography-body-small-letter-spacing
|
|
855
|
+
);
|
|
856
|
+
|
|
857
|
+
--dimension-border-radius: var(--fhi-border-radius-050);
|
|
858
|
+
--dimension-border-width: none;
|
|
859
|
+
--dimension-padding: var(--fhi-spacing-050) var(--fhi-spacing-100);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
:host {
|
|
863
|
+
#tooltip-anchor {
|
|
864
|
+
width: max-content;
|
|
865
|
+
height: max-content;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
#tooltip {
|
|
869
|
+
top: 0;
|
|
870
|
+
left: 0;
|
|
871
|
+
position: fixed;
|
|
872
|
+
border: var(--dimension-border-width) solid var(--color-border);
|
|
873
|
+
visibility: hidden;
|
|
874
|
+
opacity: 0;
|
|
875
|
+
margin: 0;
|
|
876
|
+
transition: opacity 0.15s ease-in-out;
|
|
877
|
+
width: max-content;
|
|
878
|
+
padding: var(--dimension-padding);
|
|
879
|
+
border-radius: var(--dimension-border-radius);
|
|
880
|
+
background-color: var(--color-background);
|
|
881
|
+
color: var(--color-text);
|
|
882
|
+
font-family: var(--typography-font-family);
|
|
883
|
+
-webkit-font-smoothing: antialiased;
|
|
884
|
+
font-size: var(--typography-font-size);
|
|
885
|
+
font-weight: var(--typography-font-weight);
|
|
886
|
+
line-height: var(--typography-line-height);
|
|
887
|
+
letter-spacing: var(--typography-letter-spacing);
|
|
888
|
+
font-variant-numeric: lining-nums proportional-nums;
|
|
889
|
+
font-style: normal;
|
|
890
|
+
cursor: default;
|
|
891
|
+
&[aria-hidden='false'] {
|
|
892
|
+
z-index: 1000;
|
|
893
|
+
visibility: visible;
|
|
894
|
+
opacity: 1;
|
|
895
|
+
}
|
|
896
|
+
&[fading-out] {
|
|
897
|
+
opacity: 0;
|
|
898
|
+
}
|
|
899
|
+
&::after {
|
|
900
|
+
content: '';
|
|
901
|
+
position: absolute;
|
|
902
|
+
top: -4px;
|
|
903
|
+
right: -4px;
|
|
904
|
+
bottom: -4px;
|
|
905
|
+
left: -4px;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
`;
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
o([e({ type: String })], $.prototype, "message", void 0), o([e({ type: String })], $.prototype, "placement", void 0), o([e({ type: Number })], $.prototype, "delay", void 0), o([e({ type: String })], $.prototype, "trigger", void 0), o([e({
|
|
913
|
+
type: String,
|
|
914
|
+
attribute: "max-width"
|
|
915
|
+
})], $.prototype, "maxWidth", void 0), o([i("#tooltip-anchor")], $.prototype, "_anchor", void 0), o([i("#tooltip")], $.prototype, "_tooltip", void 0), o([n()], $.prototype, "_isVisible", void 0), o([n()], $.prototype, "_isFadingOut", void 0), o([n()], $.prototype, "_position", void 0), $ = o([r(Xe)], $);
|
|
916
|
+
//#endregion
|
|
917
|
+
export { Xe as n, $ as t };
|
|
918
|
+
|
|
919
|
+
//# sourceMappingURL=fhi-tooltip.component-DJNDfrHK.js.map
|