@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.
Files changed (35) hide show
  1. package/mtds/alert/alert.js.map +1 -1
  2. package/mtds/button/button.d.ts +0 -1
  3. package/mtds/button/button.js.map +1 -1
  4. package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js +169 -167
  5. package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
  6. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +159 -146
  7. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
  8. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +43 -45
  9. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
  10. package/mtds/external/@u-elements/u-details/dist/u-details.js +27 -29
  11. package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -1
  12. package/mtds/external/@u-elements/u-progress/dist/u-progress.js +42 -45
  13. package/mtds/external/@u-elements/u-progress/dist/u-progress.js.map +1 -1
  14. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js +57 -56
  15. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js.map +1 -1
  16. package/mtds/field/field.js +13 -11
  17. package/mtds/field/field.js.map +1 -1
  18. package/mtds/index.iife.js +30 -30
  19. package/mtds/input/input.d.ts +2 -0
  20. package/mtds/input/input.js +14 -9
  21. package/mtds/input/input.js.map +1 -1
  22. package/mtds/layout/layout.d.ts +1 -0
  23. package/mtds/layout/layout.js.map +1 -1
  24. package/mtds/package.json.js +1 -1
  25. package/mtds/react.js +37 -36
  26. package/mtds/styles.css +1 -1
  27. package/mtds/styles.json +20 -20
  28. package/mtds/styles.module.css.js +47 -47
  29. package/mtds/table/table-observer.js +13 -17
  30. package/mtds/table/table-observer.js.map +1 -1
  31. package/mtds/tag/tag.d.ts +3 -1
  32. package/mtds/tag/tag.js.map +1 -1
  33. package/mtds/typography/typography.d.ts +3 -1
  34. package/mtds/typography/typography.js.map +1 -1
  35. package/package.json +16 -16
@@ -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{\n\t\t\t\"data-color\"?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n\t\t}\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":";;;;AAoBO,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;"}
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;"}
@@ -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-color\"?: \"main\" | \"danger\";\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":";;;;AA+BO,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
+ {"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 ot, flip as st, shift as rt, size as ct } from "../../core/dist/floating-ui.core.js";
2
- import { createCoords as m, rectToClientRect as J, floor as D, max as E, round as A, min as V } from "../../utils/dist/floating-ui.utils.js";
3
- import { getOverflowAncestors as M, isElement as v, getDocumentElement as O, getWindow as L, getFrameElement as K, getComputedStyle as R, isHTMLElement as b, isWebKit as Q, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as lt, isContainingBlock as Y, getContainingBlock as ft, getNodeName as _, isOverflowElement as $, getNodeScroll as N } from "../../utils/dist/floating-ui.utils.dom.js";
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 = R(t);
5
+ const e = b(t);
6
6
  let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
- const o = b(t), r = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, c = A(i) !== r || A(n) !== s;
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 q(t) {
14
+ function X(t) {
15
15
  return v(t) ? t : t.contextElement;
16
16
  }
17
17
  function F(t) {
18
- const e = q(t);
19
- if (!b(e))
20
- return m(1);
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 ? A(i.width) : i.width) / n, c = (r ? A(i.height) : i.height) / o;
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 ut = /* @__PURE__ */ m(0);
33
- function X(t) {
32
+ const ht = /* @__PURE__ */ w(0);
33
+ function tt(t) {
34
34
  const e = L(t);
35
- return !Q() || !e.visualViewport ? ut : {
35
+ return !Q() || !e.visualViewport ? ht : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function ht(t, e, i) {
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 = q(t);
46
- let s = m(1);
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 = ht(r, i, n) ? X(r) : m(0);
49
- let l = (o.left + c.x) / s.x, f = (o.top + c.y) / s.y, u = o.width / s.x, h = o.height / s.y;
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 p = L(r), a = n && v(n) ? L(n) : n;
52
- let x = p, g = K(x);
53
- for (; g && n && a !== x; ) {
54
- const w = F(g), d = g.getBoundingClientRect(), y = R(g), C = d.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, B = d.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
55
- l *= w.x, f *= w.y, u *= w.x, h *= w.y, l += C, f += B, x = L(g), g = K(x);
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: l,
62
- y: f
61
+ x: f,
62
+ y: l
63
63
  });
64
64
  }
65
- function k(t, e) {
66
- const i = N(t).scrollLeft;
67
- return e ? e.left + i : T(O(t)).left + i;
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 tt(t, e, i) {
70
- i === void 0 && (i = !1);
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: o,
77
- y: r
72
+ x: n,
73
+ y: o
78
74
  };
79
75
  }
80
- function at(t) {
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 = O(n), c = e ? S(e.floating) : !1;
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 l = {
86
+ let f = {
91
87
  scrollLeft: 0,
92
88
  scrollTop: 0
93
- }, f = m(1);
94
- const u = m(0), h = b(n);
95
- if ((h || !h && !r) && ((_(n) !== "body" || $(s)) && (l = N(n)), b(n))) {
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
- f = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
93
+ l = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
98
94
  }
99
- const p = s && !h && !r ? tt(s, l, !0) : m(0);
95
+ const d = s && !h && !r ? et(s, f) : w(0);
100
96
  return {
101
- width: i.width * f.x,
102
- height: i.height * f.y,
103
- x: i.x * f.x - l.scrollLeft * f.x + u.x + p.x,
104
- y: i.y * f.y - l.scrollTop * f.y + u.y + p.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 dt(t) {
103
+ function gt(t) {
108
104
  return Array.from(t.getClientRects());
109
105
  }
110
- function gt(t) {
111
- const e = O(t), i = N(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);
112
- let s = -i.scrollLeft + k(t);
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 R(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
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
- function pt(t, e) {
122
- const i = L(t), n = O(t), o = i.visualViewport;
123
- let r = n.clientWidth, s = n.clientHeight, c = 0, l = 0;
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 f = Q();
127
- (!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
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: l
135
+ y: f
134
136
  };
135
137
  }
136
- const wt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
137
- function mt(t, e) {
138
- const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, r = b(t) ? F(t) : m(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = o * r.x, f = n * r.y;
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: l,
143
- y: f
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 = pt(t, i);
151
+ n = mt(t, i);
150
152
  else if (e === "document")
151
- n = gt(O(t));
153
+ n = pt(R(t));
152
154
  else if (v(e))
153
- n = mt(e, i);
155
+ n = wt(e, i);
154
156
  else {
155
- const o = X(t);
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 et(t, e) {
167
+ function nt(t, e) {
166
168
  const i = W(t);
167
- return i === e || !v(i) || H(i) ? !1 : R(i).position === "fixed" || et(i, e);
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 = M(t, [], !1).filter((c) => v(c) && _(c) !== "body"), o = null;
174
- const r = R(t).position === "fixed";
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) && !H(s); ) {
177
- const c = R(s), l = Y(s);
178
- !l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && wt.has(o.position) || $(s) && !l && et(t, s)) ? n = n.filter((u) => u !== s) : o = c, s = W(s);
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 yt(t) {
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" ? S(e) ? [] : xt(e, this._c) : [].concat(i), n], c = s[0], l = s.reduce((f, u) => {
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 f.top = E(h.top, f.top), f.right = V(h.right, f.right), f.bottom = V(h.bottom, f.bottom), f.left = E(h.left, f.left), f;
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: l.right - l.left,
195
- height: l.bottom - l.top,
196
- x: l.left,
197
- y: l.top
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 vt(t) {
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 = b(e), o = O(e), r = i === "fixed", s = T(t, !0, r, e);
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 l = m(0);
217
- function f() {
218
- l.x = k(o);
218
+ const f = w(0);
219
+ function l() {
220
+ f.x = I(o);
219
221
  }
220
222
  if (n || !n && !r)
221
- if ((_(e) !== "body" || $(o)) && (c = N(e)), n) {
223
+ if (($(e) !== "body" || q(o)) && (c = H(e)), n) {
222
224
  const a = T(e, !0, r, e);
223
- l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
224
- } else o && f();
225
- r && !n && o && f();
226
- const u = o && !n && !r ? tt(o, c) : m(0), h = s.left + c.scrollLeft - l.x - u.x, p = s.top + c.scrollTop - l.y - u.y;
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: p,
231
+ y: d,
230
232
  width: s.width,
231
233
  height: s.height
232
234
  };
233
235
  }
234
- function I(t) {
235
- return R(t).position === "static";
236
+ function M(t) {
237
+ return b(t).position === "static";
236
238
  }
237
239
  function G(t, e) {
238
- if (!b(t) || R(t).position === "fixed")
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 O(t) === i && (i = i.ownerDocument.body), i;
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 (S(t))
249
+ if (_(t))
248
250
  return i;
249
- if (!b(t)) {
251
+ if (!C(t)) {
250
252
  let o = W(t);
251
- for (; o && !H(o); ) {
252
- if (v(o) && !I(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 && lt(n) && I(n); )
261
+ for (; n && ft(n) && M(n); )
260
262
  n = G(n, e);
261
- return n && H(n) && I(n) && !Y(n) ? i : n || ft(t) || i;
263
+ return n && z(n) && M(n) && !Y(n) ? i : n || ut(t) || i;
262
264
  }
263
- const Ot = async function(t) {
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 bt(t) {
276
- return R(t).direction === "rtl";
277
+ function Ot(t) {
278
+ return b(t).direction === "rtl";
277
279
  }
278
- const Ct = {
279
- convertOffsetParentRelativeRectToViewportRelativeRect: at,
280
- getDocumentElement: O,
281
- getClippingRect: yt,
280
+ const Lt = {
281
+ convertOffsetParentRelativeRectToViewportRelativeRect: dt,
282
+ getDocumentElement: R,
283
+ getClippingRect: vt,
282
284
  getOffsetParent: it,
283
- getElementRects: Ot,
284
- getClientRects: dt,
285
- getDimensions: vt,
285
+ getElementRects: Ct,
286
+ getClientRects: gt,
287
+ getDimensions: bt,
286
288
  getScale: F,
287
289
  isElement: v,
288
- isRTL: bt
290
+ isRTL: Ot
289
291
  };
290
- function nt(t, e) {
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 Lt(t, e) {
295
+ function Tt(t, e) {
294
296
  let i = null, n;
295
- const o = O(t);
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, l) {
301
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
302
- const f = t.getBoundingClientRect(), {
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: p,
307
+ width: d,
306
308
  height: a
307
- } = f;
308
- if (c || e(), !p || !a)
309
+ } = l;
310
+ if (c || e(), !d || !a)
309
311
  return;
310
- const x = D(h), g = D(o.clientWidth - (u + p)), w = D(o.clientHeight - (h + a)), d = D(u), C = {
311
- rootMargin: -x + "px " + -g + "px " + -w + "px " + -d + "px",
312
- threshold: E(0, V(1, l)) || 1
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 B = !0;
315
- function P(U) {
316
- const z = U[0].intersectionRatio;
317
- if (z !== l) {
318
- if (!B)
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
- z ? s(!1, z) : n = setTimeout(() => {
322
+ B ? s(!1, B) : n = setTimeout(() => {
321
323
  s(!1, 1e-7);
322
324
  }, 1e3);
323
325
  }
324
- z === 1 && !nt(f, t.getBoundingClientRect()) && s(), B = !1;
326
+ B === 1 && !ot(l, t.getBoundingClientRect()) && s(), S = !1;
325
327
  }
326
328
  try {
327
- i = new IntersectionObserver(P, {
328
- ...C,
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(P, C);
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 Wt(t, e, i, n) {
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: l = !1
347
- } = n, f = q(t), u = o || r ? [...f ? M(f) : [], ...M(e)] : [];
348
- u.forEach((d) => {
349
- o && d.addEventListener("scroll", i, {
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 && d.addEventListener("resize", i);
353
+ }), r && g.addEventListener("resize", i);
352
354
  });
353
- const h = f && c ? Lt(f, i) : null;
354
- let p = -1, a = null;
355
- s && (a = new ResizeObserver((d) => {
356
- let [y] = d;
357
- y && y.target === f && a && (a.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
358
- var C;
359
- (C = a) == null || C.observe(e);
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
- }), f && !l && a.observe(f), a.observe(e));
362
- let x, g = l ? T(t) : null;
363
- l && w();
364
- function w() {
365
- const d = T(t);
366
- g && !nt(g, d) && i(), g = d, x = requestAnimationFrame(w);
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 d;
370
- u.forEach((y) => {
371
- o && y.removeEventListener("scroll", i), r && y.removeEventListener("resize", i);
372
- }), h?.(), (d = a) == null || d.disconnect(), a = null, l && cancelAnimationFrame(x);
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 = rt, zt = st, Dt = ct, At = (t, e, i) => {
377
+ const Bt = ct, At = rt, Dt = lt, zt = (t, e, i) => {
376
378
  const n = /* @__PURE__ */ new Map(), o = {
377
- platform: Ct,
379
+ platform: Lt,
378
380
  ...i
379
381
  }, r = {
380
382
  ...o.platform,
381
383
  _c: n
382
384
  };
383
- return ot(t, e, {
385
+ return st(t, e, {
384
386
  ...o,
385
387
  platform: r
386
388
  });
387
389
  };
388
390
  export {
389
- Wt as autoUpdate,
390
- At as computePosition,
391
- zt as flip,
392
- M as getOverflowAncestors,
393
- Ct as platform,
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
  };