@mattilsynet/design 2.1.6 → 2.1.7
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/mtds/alert/alert.js.map +1 -1
- package/mtds/button/button.d.ts +0 -1
- package/mtds/button/button.js.map +1 -1
- package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js +169 -167
- package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +159 -146
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +43 -45
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
- package/mtds/external/@u-elements/u-details/dist/u-details.js +27 -29
- package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -1
- package/mtds/external/@u-elements/u-progress/dist/u-progress.js +42 -45
- package/mtds/external/@u-elements/u-progress/dist/u-progress.js.map +1 -1
- package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js +57 -56
- package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js.map +1 -1
- package/mtds/field/field.js +13 -11
- package/mtds/field/field.js.map +1 -1
- package/mtds/index.iife.js +30 -30
- package/mtds/input/input.d.ts +2 -0
- package/mtds/input/input.js +14 -9
- package/mtds/input/input.js.map +1 -1
- package/mtds/layout/layout.d.ts +1 -0
- package/mtds/layout/layout.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/react.js +37 -36
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +20 -20
- package/mtds/styles.module.css.js +47 -47
- package/mtds/table/table-observer.js +13 -17
- package/mtds/table/table-observer.js.map +1 -1
- package/mtds/tag/tag.d.ts +3 -1
- package/mtds/tag/tag.js.map +1 -1
- package/mtds/typography/typography.d.ts +3 -1
- package/mtds/typography/typography.js.map +1 -1
- package/package.json +16 -16
package/mtds/alert/alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["../../designsystem/alert/alert.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type AlertProps<As extends React.ElementType = \"output\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\
|
|
1
|
+
{"version":3,"file":"alert.js","sources":["../../designsystem/alert/alert.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type AlertProps<As extends React.ElementType = \"output\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{ \"data-color\"?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"neutral\" }\n\t>;\n\ntype AlertComponent = <As extends React.ElementType = \"output\">(\n\tprops: AlertProps<As>,\n) => JSX.Element;\n\nexport const Alert: AlertComponent = forwardRef<null>(function Alert<\n\tAs extends React.ElementType = \"output\",\n>({ as, className, ...rest }: AlertProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"output\";\n\n\tif (!rest.role && Tag !== \"output\") Object.assign(rest, { role: \"alert\" }); // Ensure role is set to 'alert' if not <output>\n\n\treturn <Tag className={clsx(styles.alert, className)} ref={ref} {...rest} />;\n}) as AlertComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Alert","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AAkBO,MAAMA,IAAwBC,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AACvE,QAAMC,IAAMJ,KAAM;AAElB,SAAI,CAACE,EAAK,QAAQE,MAAQ,YAAU,OAAO,OAAOF,GAAM,EAAE,MAAM,QAAA,CAAS,GAElE,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
|
package/mtds/button/button.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { JSX } from 'react';
|
|
|
2
2
|
import { PolymorphicComponentPropWithRef } from '../react-types';
|
|
3
3
|
type ButtonBaseProps<Href> = {
|
|
4
4
|
"data-arrow"?: "left" | "right" | true;
|
|
5
|
-
"data-color"?: "main" | "danger";
|
|
6
5
|
"data-justify"?: "start" | "center" | "right";
|
|
7
6
|
"data-nowrap"?: boolean;
|
|
8
7
|
"data-variant"?: "primary" | "secondary" | "tertiary";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../designsystem/button/button.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype ButtonBaseProps<Href> = {\n\t\"data-arrow\"?: \"left\" | \"right\" | true;\n\t\"data-
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../designsystem/button/button.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype ButtonBaseProps<Href> = {\n\t\"data-arrow\"?: \"left\" | \"right\" | true;\n\t\"data-justify\"?: \"start\" | \"center\" | \"right\";\n\t\"data-nowrap\"?: boolean;\n\t\"data-variant\"?: \"primary\" | \"secondary\" | \"tertiary\";\n\thref?: Href;\n\tpopovertarget?: string;\n\tpopovertargetaction?: string;\n};\n\nexport type ButtonProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n> = PolymorphicComponentPropWithRef<As, ButtonBaseProps<Href>>;\n\ntype ButtonComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>(\n\tprops: ButtonProps<Href, As>,\n) => JSX.Element;\n\nexport const Button: ButtonComponent = forwardRef<null>(function Button<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>(\n\t{ as, className, type, ...rest }: ButtonProps<Href, As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || (rest.href ? \"a\" : \"button\");\n\n\treturn (\n\t\t<Tag\n\t\t\tclassName={clsx(styles.button, className)}\n\t\t\ttype={type ?? (Tag === \"button\" ? Tag : undefined)} // Default to type=\"button\" if not set and tag is button\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}) as ButtonComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Button","forwardRef","as","className","type","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AA8BO,MAAMA,IAA0BC,EAAiB,SAIvD,EAAE,IAAAC,GAAI,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAC1BC,GACC;AACD,QAAMC,IAAML,MAAOG,EAAK,OAAO,MAAM;AAErC,SACC,gBAAAG;AAAA,IAACD;AAAA,IAAA;AAAA,MACA,WAAWE,EAAKC,EAAO,QAAQP,CAAS;AAAA,MACxC,MAAMC,MAASG,MAAQ,WAAWA,IAAM;AAAA,MACxC,KAAAD;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,158 +1,160 @@
|
|
|
1
|
-
import { computePosition as
|
|
2
|
-
import { createCoords as
|
|
3
|
-
import { getOverflowAncestors as
|
|
1
|
+
import { computePosition as st, flip as rt, shift as ct, size as lt } from "../../core/dist/floating-ui.core.js";
|
|
2
|
+
import { createCoords as w, rectToClientRect as J, floor as A, max as E, round as D, min as N } from "../../utils/dist/floating-ui.utils.js";
|
|
3
|
+
import { getOverflowAncestors as V, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as _, getParentNode as W, isLastTraversableNode as z, isTableElement as ft, isContainingBlock as Y, getContainingBlock as ut, getNodeName as $, isOverflowElement as q, getNodeScroll as H } from "../../utils/dist/floating-ui.utils.dom.js";
|
|
4
4
|
function Z(t) {
|
|
5
|
-
const e =
|
|
5
|
+
const e = b(t);
|
|
6
6
|
let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
7
|
-
const o =
|
|
7
|
+
const o = C(t), r = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, c = D(i) !== r || D(n) !== s;
|
|
8
8
|
return c && (i = r, n = s), {
|
|
9
9
|
width: i,
|
|
10
10
|
height: n,
|
|
11
11
|
$: c
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function X(t) {
|
|
15
15
|
return v(t) ? t : t.contextElement;
|
|
16
16
|
}
|
|
17
17
|
function F(t) {
|
|
18
|
-
const e =
|
|
19
|
-
if (!
|
|
20
|
-
return
|
|
18
|
+
const e = X(t);
|
|
19
|
+
if (!C(e))
|
|
20
|
+
return w(1);
|
|
21
21
|
const i = e.getBoundingClientRect(), {
|
|
22
22
|
width: n,
|
|
23
23
|
height: o,
|
|
24
24
|
$: r
|
|
25
25
|
} = Z(e);
|
|
26
|
-
let s = (r ?
|
|
26
|
+
let s = (r ? D(i.width) : i.width) / n, c = (r ? D(i.height) : i.height) / o;
|
|
27
27
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
28
28
|
x: s,
|
|
29
29
|
y: c
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const ht = /* @__PURE__ */ w(0);
|
|
33
|
+
function tt(t) {
|
|
34
34
|
const e = L(t);
|
|
35
|
-
return !Q() || !e.visualViewport ?
|
|
35
|
+
return !Q() || !e.visualViewport ? ht : {
|
|
36
36
|
x: e.visualViewport.offsetLeft,
|
|
37
37
|
y: e.visualViewport.offsetTop
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function at(t, e, i) {
|
|
41
41
|
return e === void 0 && (e = !1), !i || e && i !== L(t) ? !1 : e;
|
|
42
42
|
}
|
|
43
43
|
function T(t, e, i, n) {
|
|
44
44
|
e === void 0 && (e = !1), i === void 0 && (i = !1);
|
|
45
|
-
const o = t.getBoundingClientRect(), r =
|
|
46
|
-
let s =
|
|
45
|
+
const o = t.getBoundingClientRect(), r = X(t);
|
|
46
|
+
let s = w(1);
|
|
47
47
|
e && (n ? v(n) && (s = F(n)) : s = F(t));
|
|
48
|
-
const c =
|
|
49
|
-
let
|
|
48
|
+
const c = at(r, i, n) ? tt(r) : w(0);
|
|
49
|
+
let f = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, u = o.width / s.x, h = o.height / s.y;
|
|
50
50
|
if (r) {
|
|
51
|
-
const
|
|
52
|
-
let
|
|
53
|
-
for (;
|
|
54
|
-
const
|
|
55
|
-
|
|
51
|
+
const d = L(r), a = n && v(n) ? L(n) : n;
|
|
52
|
+
let m = d, p = U(m);
|
|
53
|
+
for (; p && n && a !== m; ) {
|
|
54
|
+
const y = F(p), g = p.getBoundingClientRect(), x = b(p), O = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * y.x, S = g.top + (p.clientTop + parseFloat(x.paddingTop)) * y.y;
|
|
55
|
+
f *= y.x, l *= y.y, u *= y.x, h *= y.y, f += O, l += S, m = L(p), p = U(m);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return J({
|
|
59
59
|
width: u,
|
|
60
60
|
height: h,
|
|
61
|
-
x:
|
|
62
|
-
y:
|
|
61
|
+
x: f,
|
|
62
|
+
y: l
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const i =
|
|
67
|
-
return e ? e.left + i : T(
|
|
65
|
+
function I(t, e) {
|
|
66
|
+
const i = H(t).scrollLeft;
|
|
67
|
+
return e ? e.left + i : T(R(t)).left + i;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
i
|
|
71
|
-
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - (i ? 0 : (
|
|
72
|
-
// RTL <body> scrollbar.
|
|
73
|
-
k(t, n)
|
|
74
|
-
)), r = n.top + e.scrollTop;
|
|
69
|
+
function et(t, e) {
|
|
70
|
+
const i = t.getBoundingClientRect(), n = i.left + e.scrollLeft - I(t, i), o = i.top + e.scrollTop;
|
|
75
71
|
return {
|
|
76
|
-
x:
|
|
77
|
-
y:
|
|
72
|
+
x: n,
|
|
73
|
+
y: o
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
|
-
function
|
|
76
|
+
function dt(t) {
|
|
81
77
|
let {
|
|
82
78
|
elements: e,
|
|
83
79
|
rect: i,
|
|
84
80
|
offsetParent: n,
|
|
85
81
|
strategy: o
|
|
86
82
|
} = t;
|
|
87
|
-
const r = o === "fixed", s =
|
|
83
|
+
const r = o === "fixed", s = R(n), c = e ? _(e.floating) : !1;
|
|
88
84
|
if (n === s || c && r)
|
|
89
85
|
return i;
|
|
90
|
-
let
|
|
86
|
+
let f = {
|
|
91
87
|
scrollLeft: 0,
|
|
92
88
|
scrollTop: 0
|
|
93
|
-
},
|
|
94
|
-
const u =
|
|
95
|
-
if ((h || !h && !r) && ((
|
|
89
|
+
}, l = w(1);
|
|
90
|
+
const u = w(0), h = C(n);
|
|
91
|
+
if ((h || !h && !r) && (($(n) !== "body" || q(s)) && (f = H(n)), C(n))) {
|
|
96
92
|
const a = T(n);
|
|
97
|
-
|
|
93
|
+
l = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
|
|
98
94
|
}
|
|
99
|
-
const
|
|
95
|
+
const d = s && !h && !r ? et(s, f) : w(0);
|
|
100
96
|
return {
|
|
101
|
-
width: i.width *
|
|
102
|
-
height: i.height *
|
|
103
|
-
x: i.x *
|
|
104
|
-
y: i.y *
|
|
97
|
+
width: i.width * l.x,
|
|
98
|
+
height: i.height * l.y,
|
|
99
|
+
x: i.x * l.x - f.scrollLeft * l.x + u.x + d.x,
|
|
100
|
+
y: i.y * l.y - f.scrollTop * l.y + u.y + d.y
|
|
105
101
|
};
|
|
106
102
|
}
|
|
107
|
-
function
|
|
103
|
+
function gt(t) {
|
|
108
104
|
return Array.from(t.getClientRects());
|
|
109
105
|
}
|
|
110
|
-
function
|
|
111
|
-
const e =
|
|
112
|
-
let s = -i.scrollLeft +
|
|
106
|
+
function pt(t) {
|
|
107
|
+
const e = R(t), i = H(t), n = t.ownerDocument.body, o = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
108
|
+
let s = -i.scrollLeft + I(t);
|
|
113
109
|
const c = -i.scrollTop;
|
|
114
|
-
return
|
|
110
|
+
return b(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
|
|
115
111
|
width: o,
|
|
116
112
|
height: r,
|
|
117
113
|
x: s,
|
|
118
114
|
y: c
|
|
119
115
|
};
|
|
120
116
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
const K = 25;
|
|
118
|
+
function mt(t, e) {
|
|
119
|
+
const i = L(t), n = R(t), o = i.visualViewport;
|
|
120
|
+
let r = n.clientWidth, s = n.clientHeight, c = 0, f = 0;
|
|
124
121
|
if (o) {
|
|
125
122
|
r = o.width, s = o.height;
|
|
126
|
-
const
|
|
127
|
-
(!
|
|
123
|
+
const u = Q();
|
|
124
|
+
(!u || u && e === "fixed") && (c = o.offsetLeft, f = o.offsetTop);
|
|
128
125
|
}
|
|
126
|
+
const l = I(n);
|
|
127
|
+
if (l <= 0) {
|
|
128
|
+
const u = n.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(n.clientWidth - h.clientWidth - a);
|
|
129
|
+
m <= K && (r -= m);
|
|
130
|
+
} else l <= K && (r += l);
|
|
129
131
|
return {
|
|
130
132
|
width: r,
|
|
131
133
|
height: s,
|
|
132
134
|
x: c,
|
|
133
|
-
y:
|
|
135
|
+
y: f
|
|
134
136
|
};
|
|
135
137
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, r =
|
|
138
|
+
const yt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
139
|
+
function wt(t, e) {
|
|
140
|
+
const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, r = C(t) ? F(t) : w(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = o * r.x, l = n * r.y;
|
|
139
141
|
return {
|
|
140
142
|
width: s,
|
|
141
143
|
height: c,
|
|
142
|
-
x:
|
|
143
|
-
y:
|
|
144
|
+
x: f,
|
|
145
|
+
y: l
|
|
144
146
|
};
|
|
145
147
|
}
|
|
146
148
|
function j(t, e, i) {
|
|
147
149
|
let n;
|
|
148
150
|
if (e === "viewport")
|
|
149
|
-
n =
|
|
151
|
+
n = mt(t, i);
|
|
150
152
|
else if (e === "document")
|
|
151
|
-
n =
|
|
153
|
+
n = pt(R(t));
|
|
152
154
|
else if (v(e))
|
|
153
|
-
n =
|
|
155
|
+
n = wt(e, i);
|
|
154
156
|
else {
|
|
155
|
-
const o =
|
|
157
|
+
const o = tt(t);
|
|
156
158
|
n = {
|
|
157
159
|
x: e.x - o.x,
|
|
158
160
|
y: e.y - o.y,
|
|
@@ -162,42 +164,42 @@ function j(t, e, i) {
|
|
|
162
164
|
}
|
|
163
165
|
return J(n);
|
|
164
166
|
}
|
|
165
|
-
function
|
|
167
|
+
function nt(t, e) {
|
|
166
168
|
const i = W(t);
|
|
167
|
-
return i === e || !v(i) ||
|
|
169
|
+
return i === e || !v(i) || z(i) ? !1 : b(i).position === "fixed" || nt(i, e);
|
|
168
170
|
}
|
|
169
171
|
function xt(t, e) {
|
|
170
172
|
const i = e.get(t);
|
|
171
173
|
if (i)
|
|
172
174
|
return i;
|
|
173
|
-
let n =
|
|
174
|
-
const r =
|
|
175
|
+
let n = V(t, [], !1).filter((c) => v(c) && $(c) !== "body"), o = null;
|
|
176
|
+
const r = b(t).position === "fixed";
|
|
175
177
|
let s = r ? W(t) : t;
|
|
176
|
-
for (; v(s) && !
|
|
177
|
-
const c =
|
|
178
|
-
!
|
|
178
|
+
for (; v(s) && !z(s); ) {
|
|
179
|
+
const c = b(s), f = Y(s);
|
|
180
|
+
!f && c.position === "fixed" && (o = null), (r ? !f && !o : !f && c.position === "static" && !!o && yt.has(o.position) || q(s) && !f && nt(t, s)) ? n = n.filter((u) => u !== s) : o = c, s = W(s);
|
|
179
181
|
}
|
|
180
182
|
return e.set(t, n), n;
|
|
181
183
|
}
|
|
182
|
-
function
|
|
184
|
+
function vt(t) {
|
|
183
185
|
let {
|
|
184
186
|
element: e,
|
|
185
187
|
boundary: i,
|
|
186
188
|
rootBoundary: n,
|
|
187
189
|
strategy: o
|
|
188
190
|
} = t;
|
|
189
|
-
const s = [...i === "clippingAncestors" ?
|
|
191
|
+
const s = [...i === "clippingAncestors" ? _(e) ? [] : xt(e, this._c) : [].concat(i), n], c = s[0], f = s.reduce((l, u) => {
|
|
190
192
|
const h = j(e, u, o);
|
|
191
|
-
return
|
|
193
|
+
return l.top = E(h.top, l.top), l.right = N(h.right, l.right), l.bottom = N(h.bottom, l.bottom), l.left = E(h.left, l.left), l;
|
|
192
194
|
}, j(e, c, o));
|
|
193
195
|
return {
|
|
194
|
-
width:
|
|
195
|
-
height:
|
|
196
|
-
x:
|
|
197
|
-
y:
|
|
196
|
+
width: f.right - f.left,
|
|
197
|
+
height: f.bottom - f.top,
|
|
198
|
+
x: f.left,
|
|
199
|
+
y: f.top
|
|
198
200
|
};
|
|
199
201
|
}
|
|
200
|
-
function
|
|
202
|
+
function bt(t) {
|
|
201
203
|
const {
|
|
202
204
|
width: e,
|
|
203
205
|
height: i
|
|
@@ -208,59 +210,59 @@ function vt(t) {
|
|
|
208
210
|
};
|
|
209
211
|
}
|
|
210
212
|
function Rt(t, e, i) {
|
|
211
|
-
const n =
|
|
213
|
+
const n = C(e), o = R(e), r = i === "fixed", s = T(t, !0, r, e);
|
|
212
214
|
let c = {
|
|
213
215
|
scrollLeft: 0,
|
|
214
216
|
scrollTop: 0
|
|
215
217
|
};
|
|
216
|
-
const
|
|
217
|
-
function
|
|
218
|
-
|
|
218
|
+
const f = w(0);
|
|
219
|
+
function l() {
|
|
220
|
+
f.x = I(o);
|
|
219
221
|
}
|
|
220
222
|
if (n || !n && !r)
|
|
221
|
-
if ((
|
|
223
|
+
if (($(e) !== "body" || q(o)) && (c = H(e)), n) {
|
|
222
224
|
const a = T(e, !0, r, e);
|
|
223
|
-
|
|
224
|
-
} else o &&
|
|
225
|
-
r && !n && o &&
|
|
226
|
-
const u = o && !n && !r ?
|
|
225
|
+
f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
|
|
226
|
+
} else o && l();
|
|
227
|
+
r && !n && o && l();
|
|
228
|
+
const u = o && !n && !r ? et(o, c) : w(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
|
|
227
229
|
return {
|
|
228
230
|
x: h,
|
|
229
|
-
y:
|
|
231
|
+
y: d,
|
|
230
232
|
width: s.width,
|
|
231
233
|
height: s.height
|
|
232
234
|
};
|
|
233
235
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
236
|
+
function M(t) {
|
|
237
|
+
return b(t).position === "static";
|
|
236
238
|
}
|
|
237
239
|
function G(t, e) {
|
|
238
|
-
if (!
|
|
240
|
+
if (!C(t) || b(t).position === "fixed")
|
|
239
241
|
return null;
|
|
240
242
|
if (e)
|
|
241
243
|
return e(t);
|
|
242
244
|
let i = t.offsetParent;
|
|
243
|
-
return
|
|
245
|
+
return R(t) === i && (i = i.ownerDocument.body), i;
|
|
244
246
|
}
|
|
245
247
|
function it(t, e) {
|
|
246
248
|
const i = L(t);
|
|
247
|
-
if (
|
|
249
|
+
if (_(t))
|
|
248
250
|
return i;
|
|
249
|
-
if (!
|
|
251
|
+
if (!C(t)) {
|
|
250
252
|
let o = W(t);
|
|
251
|
-
for (; o && !
|
|
252
|
-
if (v(o) && !
|
|
253
|
+
for (; o && !z(o); ) {
|
|
254
|
+
if (v(o) && !M(o))
|
|
253
255
|
return o;
|
|
254
256
|
o = W(o);
|
|
255
257
|
}
|
|
256
258
|
return i;
|
|
257
259
|
}
|
|
258
260
|
let n = G(t, e);
|
|
259
|
-
for (; n &&
|
|
261
|
+
for (; n && ft(n) && M(n); )
|
|
260
262
|
n = G(n, e);
|
|
261
|
-
return n &&
|
|
263
|
+
return n && z(n) && M(n) && !Y(n) ? i : n || ut(t) || i;
|
|
262
264
|
}
|
|
263
|
-
const
|
|
265
|
+
const Ct = async function(t) {
|
|
264
266
|
const e = this.getOffsetParent || it, i = this.getDimensions, n = await i(t.floating);
|
|
265
267
|
return {
|
|
266
268
|
reference: Rt(t.reference, await e(t.floating), t.strategy),
|
|
@@ -272,125 +274,125 @@ const Ot = async function(t) {
|
|
|
272
274
|
}
|
|
273
275
|
};
|
|
274
276
|
};
|
|
275
|
-
function
|
|
276
|
-
return
|
|
277
|
+
function Ot(t) {
|
|
278
|
+
return b(t).direction === "rtl";
|
|
277
279
|
}
|
|
278
|
-
const
|
|
279
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
280
|
-
getDocumentElement:
|
|
281
|
-
getClippingRect:
|
|
280
|
+
const Lt = {
|
|
281
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: dt,
|
|
282
|
+
getDocumentElement: R,
|
|
283
|
+
getClippingRect: vt,
|
|
282
284
|
getOffsetParent: it,
|
|
283
|
-
getElementRects:
|
|
284
|
-
getClientRects:
|
|
285
|
-
getDimensions:
|
|
285
|
+
getElementRects: Ct,
|
|
286
|
+
getClientRects: gt,
|
|
287
|
+
getDimensions: bt,
|
|
286
288
|
getScale: F,
|
|
287
289
|
isElement: v,
|
|
288
|
-
isRTL:
|
|
290
|
+
isRTL: Ot
|
|
289
291
|
};
|
|
290
|
-
function
|
|
292
|
+
function ot(t, e) {
|
|
291
293
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
292
294
|
}
|
|
293
|
-
function
|
|
295
|
+
function Tt(t, e) {
|
|
294
296
|
let i = null, n;
|
|
295
|
-
const o =
|
|
297
|
+
const o = R(t);
|
|
296
298
|
function r() {
|
|
297
299
|
var c;
|
|
298
300
|
clearTimeout(n), (c = i) == null || c.disconnect(), i = null;
|
|
299
301
|
}
|
|
300
|
-
function s(c,
|
|
301
|
-
c === void 0 && (c = !1),
|
|
302
|
-
const
|
|
302
|
+
function s(c, f) {
|
|
303
|
+
c === void 0 && (c = !1), f === void 0 && (f = 1), r();
|
|
304
|
+
const l = t.getBoundingClientRect(), {
|
|
303
305
|
left: u,
|
|
304
306
|
top: h,
|
|
305
|
-
width:
|
|
307
|
+
width: d,
|
|
306
308
|
height: a
|
|
307
|
-
} =
|
|
308
|
-
if (c || e(), !
|
|
309
|
+
} = l;
|
|
310
|
+
if (c || e(), !d || !a)
|
|
309
311
|
return;
|
|
310
|
-
const
|
|
311
|
-
rootMargin: -
|
|
312
|
-
threshold: E(0,
|
|
312
|
+
const m = A(h), p = A(o.clientWidth - (u + d)), y = A(o.clientHeight - (h + a)), g = A(u), O = {
|
|
313
|
+
rootMargin: -m + "px " + -p + "px " + -y + "px " + -g + "px",
|
|
314
|
+
threshold: E(0, N(1, f)) || 1
|
|
313
315
|
};
|
|
314
|
-
let
|
|
315
|
-
function P
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
if (!
|
|
316
|
+
let S = !0;
|
|
317
|
+
function k(P) {
|
|
318
|
+
const B = P[0].intersectionRatio;
|
|
319
|
+
if (B !== f) {
|
|
320
|
+
if (!S)
|
|
319
321
|
return s();
|
|
320
|
-
|
|
322
|
+
B ? s(!1, B) : n = setTimeout(() => {
|
|
321
323
|
s(!1, 1e-7);
|
|
322
324
|
}, 1e3);
|
|
323
325
|
}
|
|
324
|
-
|
|
326
|
+
B === 1 && !ot(l, t.getBoundingClientRect()) && s(), S = !1;
|
|
325
327
|
}
|
|
326
328
|
try {
|
|
327
|
-
i = new IntersectionObserver(
|
|
328
|
-
...
|
|
329
|
+
i = new IntersectionObserver(k, {
|
|
330
|
+
...O,
|
|
329
331
|
// Handle <iframe>s
|
|
330
332
|
root: o.ownerDocument
|
|
331
333
|
});
|
|
332
334
|
} catch {
|
|
333
|
-
i = new IntersectionObserver(
|
|
335
|
+
i = new IntersectionObserver(k, O);
|
|
334
336
|
}
|
|
335
337
|
i.observe(t);
|
|
336
338
|
}
|
|
337
339
|
return s(!0), r;
|
|
338
340
|
}
|
|
339
|
-
function
|
|
341
|
+
function St(t, e, i, n) {
|
|
340
342
|
n === void 0 && (n = {});
|
|
341
343
|
const {
|
|
342
344
|
ancestorScroll: o = !0,
|
|
343
345
|
ancestorResize: r = !0,
|
|
344
346
|
elementResize: s = typeof ResizeObserver == "function",
|
|
345
347
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
346
|
-
animationFrame:
|
|
347
|
-
} = n,
|
|
348
|
-
u.forEach((
|
|
349
|
-
o &&
|
|
348
|
+
animationFrame: f = !1
|
|
349
|
+
} = n, l = X(t), u = o || r ? [...l ? V(l) : [], ...V(e)] : [];
|
|
350
|
+
u.forEach((g) => {
|
|
351
|
+
o && g.addEventListener("scroll", i, {
|
|
350
352
|
passive: !0
|
|
351
|
-
}), r &&
|
|
353
|
+
}), r && g.addEventListener("resize", i);
|
|
352
354
|
});
|
|
353
|
-
const h =
|
|
354
|
-
let
|
|
355
|
-
s && (a = new ResizeObserver((
|
|
356
|
-
let [
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
(
|
|
355
|
+
const h = l && c ? Tt(l, i) : null;
|
|
356
|
+
let d = -1, a = null;
|
|
357
|
+
s && (a = new ResizeObserver((g) => {
|
|
358
|
+
let [x] = g;
|
|
359
|
+
x && x.target === l && a && (a.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
360
|
+
var O;
|
|
361
|
+
(O = a) == null || O.observe(e);
|
|
360
362
|
})), i();
|
|
361
|
-
}),
|
|
362
|
-
let
|
|
363
|
-
|
|
364
|
-
function
|
|
365
|
-
const
|
|
366
|
-
|
|
363
|
+
}), l && !f && a.observe(l), a.observe(e));
|
|
364
|
+
let m, p = f ? T(t) : null;
|
|
365
|
+
f && y();
|
|
366
|
+
function y() {
|
|
367
|
+
const g = T(t);
|
|
368
|
+
p && !ot(p, g) && i(), p = g, m = requestAnimationFrame(y);
|
|
367
369
|
}
|
|
368
370
|
return i(), () => {
|
|
369
|
-
var
|
|
370
|
-
u.forEach((
|
|
371
|
-
o &&
|
|
372
|
-
}), h?.(), (
|
|
371
|
+
var g;
|
|
372
|
+
u.forEach((x) => {
|
|
373
|
+
o && x.removeEventListener("scroll", i), r && x.removeEventListener("resize", i);
|
|
374
|
+
}), h?.(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(m);
|
|
373
375
|
};
|
|
374
376
|
}
|
|
375
|
-
const Bt =
|
|
377
|
+
const Bt = ct, At = rt, Dt = lt, zt = (t, e, i) => {
|
|
376
378
|
const n = /* @__PURE__ */ new Map(), o = {
|
|
377
|
-
platform:
|
|
379
|
+
platform: Lt,
|
|
378
380
|
...i
|
|
379
381
|
}, r = {
|
|
380
382
|
...o.platform,
|
|
381
383
|
_c: n
|
|
382
384
|
};
|
|
383
|
-
return
|
|
385
|
+
return st(t, e, {
|
|
384
386
|
...o,
|
|
385
387
|
platform: r
|
|
386
388
|
});
|
|
387
389
|
};
|
|
388
390
|
export {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
St as autoUpdate,
|
|
392
|
+
zt as computePosition,
|
|
393
|
+
At as flip,
|
|
394
|
+
V as getOverflowAncestors,
|
|
395
|
+
Lt as platform,
|
|
394
396
|
Bt as shift,
|
|
395
397
|
Dt as size
|
|
396
398
|
};
|