@serendie/ui 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/components/CheckBox/CheckBox.js +36 -35
  2. package/dist/components/ChoiceBox/ChoiceBox.js +41 -41
  3. package/dist/components/DataTable/DataTableComponent.d.ts +3 -20
  4. package/dist/components/DataTable/DataTableComponent.js +38 -36
  5. package/dist/components/DataTable/table/HeaderCheckbox.js +29 -19
  6. package/dist/components/Search/Search.d.ts +3 -1
  7. package/dist/components/Search/Search.js +34 -33
  8. package/dist/components/Select/Select.d.ts +2 -1
  9. package/dist/components/Select/Select.js +47 -41
  10. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  11. package/dist/components/Tooltip/Tooltip.js +70 -0
  12. package/dist/components/Tooltip/index.d.ts +1 -0
  13. package/dist/components/Tooltip/index.js +4 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +12 -10
  16. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
  17. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
  18. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
  19. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
  20. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
  21. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
  22. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
  23. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
  24. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
  25. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
  26. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
  27. package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
  28. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
  29. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
  30. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
  31. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
  32. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
  33. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
  34. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
  35. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
  36. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
  37. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
  38. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
  39. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
  40. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
  41. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
  42. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
  43. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
  44. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
  45. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
  47. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
  48. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
  49. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
  50. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
  51. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
  52. package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
  53. package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
  54. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
  55. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
  56. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
  57. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
  58. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
  59. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
  60. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
  61. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
  62. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
  63. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
  64. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
  65. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
  66. package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
  67. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
  68. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +13 -0
  69. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +13 -0
  70. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +15 -0
  71. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +14 -0
  72. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +14 -0
  73. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +13 -0
  74. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +10 -0
  75. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +17 -0
  76. package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
  77. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
  78. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
  79. package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
  80. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
  81. package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
  82. package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
  83. package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
  84. package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
  85. package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
  86. package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
  87. package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
  88. package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
  89. package/dist/node_modules/@zag-js/dom-query/dist/index.js +465 -253
  90. package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
  91. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
  92. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
  93. package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
  94. package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
  98. package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
  99. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
  100. package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
  101. package/dist/node_modules/@zag-js/store/dist/index.js +98 -137
  102. package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
  103. package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
  104. package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
  105. package/dist/node_modules/@zag-js/tooltip/dist/index.js +459 -0
  106. package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
  107. package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
  108. package/dist/node_modules/proxy-compare/dist/index.js +4 -106
  109. package/dist/styles.css +1 -1
  110. package/package.json +5 -5
  111. package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
  112. package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
  113. package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
  114. package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
  115. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  116. package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
  117. package/dist/node_modules/klona/full/index.js +0 -21
  118. package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -1,257 +1,268 @@
1
- import { offset as et, flip as it, shift as nt, arrow as ot, size as st, hide as rt, computePosition as ct, limitShift as lt } from "../../core/dist/floating-ui.core.js";
2
- import { createCoords as R, rectToClientRect as Y, floor as z, max as E, round as D, min as S } from "../../utils/dist/floating-ui.utils.js";
3
- import { getOverflowAncestors as V, isElement as y, getDocumentElement as b, getWindow as L, getFrameElement as U, getComputedStyle as x, isHTMLElement as C, isWebKit as j, isTopLayer as M, getParentNode as W, isLastTraversableNode as A, isTableElement as ft, isContainingBlock as G, getContainingBlock as ut, getNodeName as _, isOverflowElement as k, getNodeScroll as N } from "../../utils/dist/floating-ui.utils.dom.js";
4
- function J(t) {
5
- const e = x(t);
1
+ import { offset as ot, flip as st, shift as rt, arrow as ct, size as lt, hide as ft, computePosition as ut, limitShift as ht } 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 $, 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 at, isContainingBlock as Y, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N } from "../../utils/dist/floating-ui.utils.dom.js";
4
+ function Z(t) {
5
+ const e = R(t);
6
6
  let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
- const o = C(t), c = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, r = D(i) !== c || D(n) !== s;
8
- return r && (i = c, n = s), {
7
+ const o = b(t), r = o ? t.offsetWidth : i, s = o ? t.offsetHeight : n, c = A(i) !== r || A(n) !== s;
8
+ return c && (i = r, n = s), {
9
9
  width: i,
10
10
  height: n,
11
- $: r
11
+ $: c
12
12
  };
13
13
  }
14
14
  function q(t) {
15
- return y(t) ? t : t.contextElement;
15
+ return v(t) ? t : t.contextElement;
16
16
  }
17
17
  function F(t) {
18
18
  const e = q(t);
19
- if (!C(e))
20
- return R(1);
19
+ if (!b(e))
20
+ return m(1);
21
21
  const i = e.getBoundingClientRect(), {
22
22
  width: n,
23
23
  height: o,
24
- $: c
25
- } = J(e);
26
- let s = (c ? D(i.width) : i.width) / n, r = (c ? D(i.height) : i.height) / o;
27
- return (!s || !Number.isFinite(s)) && (s = 1), (!r || !Number.isFinite(r)) && (r = 1), {
24
+ $: r
25
+ } = Z(e);
26
+ let s = (r ? A(i.width) : i.width) / n, c = (r ? A(i.height) : i.height) / o;
27
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
28
28
  x: s,
29
- y: r
29
+ y: c
30
30
  };
31
31
  }
32
- const ht = /* @__PURE__ */ R(0);
33
- function Q(t) {
32
+ const gt = /* @__PURE__ */ m(0);
33
+ function X(t) {
34
34
  const e = L(t);
35
- return !j() || !e.visualViewport ? ht : {
35
+ return !Q() || !e.visualViewport ? gt : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function at(t, e, i) {
40
+ function pt(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(), c = q(t);
46
- let s = R(1);
47
- e && (n ? y(n) && (s = F(n)) : s = F(t));
48
- const r = at(c, i, n) ? Q(c) : R(0);
49
- let f = (o.left + r.x) / s.x, l = (o.top + r.y) / s.y, u = o.width / s.x, a = o.height / s.y;
50
- if (c) {
51
- const p = L(c), h = n && y(n) ? L(n) : n;
52
- let v = p, d = U(v);
53
- for (; d && n && h !== v; ) {
54
- const m = F(d), g = d.getBoundingClientRect(), w = x(d), O = g.left + (d.clientLeft + parseFloat(w.paddingLeft)) * m.x, B = g.top + (d.clientTop + parseFloat(w.paddingTop)) * m.y;
55
- f *= m.x, l *= m.y, u *= m.x, a *= m.y, f += O, l += B, v = L(d), d = U(v);
45
+ const o = t.getBoundingClientRect(), r = q(t);
46
+ let s = m(1);
47
+ e && (n ? v(n) && (s = F(n)) : s = F(t));
48
+ const c = pt(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;
50
+ if (r) {
51
+ const p = L(r), a = n && v(n) ? L(n) : n;
52
+ let y = p, g = K(y);
53
+ for (; g && n && a !== y; ) {
54
+ const w = F(g), d = g.getBoundingClientRect(), x = R(g), C = d.left + (g.clientLeft + parseFloat(x.paddingLeft)) * w.x, B = d.top + (g.clientTop + parseFloat(x.paddingTop)) * w.y;
55
+ l *= w.x, f *= w.y, u *= w.x, h *= w.y, l += C, f += B, y = L(g), g = K(y);
56
56
  }
57
57
  }
58
- return Y({
58
+ return J({
59
59
  width: u,
60
- height: a,
61
- x: f,
62
- y: l
60
+ height: h,
61
+ x: l,
62
+ y: f
63
63
  });
64
64
  }
65
- function dt(t) {
65
+ function k(t, e) {
66
+ const i = N(t).scrollLeft;
67
+ return e ? e.left + i : T(O(t)).left + i;
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;
75
+ return {
76
+ x: o,
77
+ y: r
78
+ };
79
+ }
80
+ function wt(t) {
66
81
  let {
67
82
  elements: e,
68
83
  rect: i,
69
84
  offsetParent: n,
70
85
  strategy: o
71
86
  } = t;
72
- const c = o === "fixed", s = b(n), r = e ? M(e.floating) : !1;
73
- if (n === s || r && c)
87
+ const r = o === "fixed", s = O(n), c = e ? S(e.floating) : !1;
88
+ if (n === s || c && r)
74
89
  return i;
75
- let f = {
90
+ let l = {
76
91
  scrollLeft: 0,
77
92
  scrollTop: 0
78
- }, l = R(1);
79
- const u = R(0), a = C(n);
80
- if ((a || !a && !c) && ((_(n) !== "body" || k(s)) && (f = N(n)), C(n))) {
81
- const p = T(n);
82
- l = F(n), u.x = p.x + n.clientLeft, u.y = p.y + n.clientTop;
93
+ }, f = m(1);
94
+ const u = m(0), h = b(n);
95
+ if ((h || !h && !r) && ((M(n) !== "body" || _(s)) && (l = N(n)), b(n))) {
96
+ const a = T(n);
97
+ f = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
83
98
  }
99
+ const p = s && !h && !r ? tt(s, l, !0) : m(0);
84
100
  return {
85
- width: i.width * l.x,
86
- height: i.height * l.y,
87
- x: i.x * l.x - f.scrollLeft * l.x + u.x,
88
- y: i.y * l.y - f.scrollTop * l.y + u.y
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
89
105
  };
90
106
  }
91
- function gt(t) {
107
+ function mt(t) {
92
108
  return Array.from(t.getClientRects());
93
109
  }
94
- function $(t, e) {
95
- const i = N(t).scrollLeft;
96
- return e ? e.left + i : T(b(t)).left + i;
97
- }
98
- function pt(t) {
99
- const e = b(t), i = N(t), n = t.ownerDocument.body, o = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), c = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
100
- let s = -i.scrollLeft + $(t);
101
- const r = -i.scrollTop;
102
- return x(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
110
+ function yt(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);
113
+ const c = -i.scrollTop;
114
+ return R(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - o), {
103
115
  width: o,
104
- height: c,
116
+ height: r,
105
117
  x: s,
106
- y: r
118
+ y: c
107
119
  };
108
120
  }
109
- function mt(t, e) {
110
- const i = L(t), n = b(t), o = i.visualViewport;
111
- let c = n.clientWidth, s = n.clientHeight, r = 0, f = 0;
121
+ function xt(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;
112
124
  if (o) {
113
- c = o.width, s = o.height;
114
- const l = j();
115
- (!l || l && e === "fixed") && (r = o.offsetLeft, f = o.offsetTop);
125
+ r = o.width, s = o.height;
126
+ const f = Q();
127
+ (!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
116
128
  }
117
129
  return {
118
- width: c,
130
+ width: r,
119
131
  height: s,
120
- x: r,
121
- y: f
132
+ x: c,
133
+ y: l
122
134
  };
123
135
  }
124
- function wt(t, e) {
125
- const i = T(t, !0, e === "fixed"), n = i.top + t.clientTop, o = i.left + t.clientLeft, c = C(t) ? F(t) : R(1), s = t.clientWidth * c.x, r = t.clientHeight * c.y, f = o * c.x, l = n * c.y;
136
+ function vt(t, e) {
137
+ 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;
126
138
  return {
127
139
  width: s,
128
- height: r,
129
- x: f,
130
- y: l
140
+ height: c,
141
+ x: l,
142
+ y: f
131
143
  };
132
144
  }
133
- function X(t, e, i) {
145
+ function j(t, e, i) {
134
146
  let n;
135
147
  if (e === "viewport")
136
- n = mt(t, i);
148
+ n = xt(t, i);
137
149
  else if (e === "document")
138
- n = pt(b(t));
139
- else if (y(e))
140
- n = wt(e, i);
150
+ n = yt(O(t));
151
+ else if (v(e))
152
+ n = vt(e, i);
141
153
  else {
142
- const o = Q(t);
154
+ const o = X(t);
143
155
  n = {
144
- ...e,
145
156
  x: e.x - o.x,
146
- y: e.y - o.y
157
+ y: e.y - o.y,
158
+ width: e.width,
159
+ height: e.height
147
160
  };
148
161
  }
149
- return Y(n);
162
+ return J(n);
150
163
  }
151
- function Z(t, e) {
164
+ function et(t, e) {
152
165
  const i = W(t);
153
- return i === e || !y(i) || A(i) ? !1 : x(i).position === "fixed" || Z(i, e);
166
+ return i === e || !v(i) || H(i) ? !1 : R(i).position === "fixed" || et(i, e);
154
167
  }
155
- function vt(t, e) {
168
+ function Rt(t, e) {
156
169
  const i = e.get(t);
157
170
  if (i)
158
171
  return i;
159
- let n = V(t, [], !1).filter((r) => y(r) && _(r) !== "body"), o = null;
160
- const c = x(t).position === "fixed";
161
- let s = c ? W(t) : t;
162
- for (; y(s) && !A(s); ) {
163
- const r = x(s), f = G(s);
164
- !f && r.position === "fixed" && (o = null), (c ? !f && !o : !f && r.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || k(s) && !f && Z(t, s)) ? n = n.filter((u) => u !== s) : o = r, s = W(s);
172
+ let n = $(t, [], !1).filter((c) => v(c) && M(c) !== "body"), o = null;
173
+ const r = R(t).position === "fixed";
174
+ let s = r ? W(t) : t;
175
+ for (; v(s) && !H(s); ) {
176
+ const c = R(s), l = Y(s);
177
+ !l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || _(s) && !l && et(t, s)) ? n = n.filter((u) => u !== s) : o = c, s = W(s);
165
178
  }
166
179
  return e.set(t, n), n;
167
180
  }
168
- function yt(t) {
181
+ function Ot(t) {
169
182
  let {
170
183
  element: e,
171
184
  boundary: i,
172
185
  rootBoundary: n,
173
186
  strategy: o
174
187
  } = t;
175
- const s = [...i === "clippingAncestors" ? M(e) ? [] : vt(e, this._c) : [].concat(i), n], r = s[0], f = s.reduce((l, u) => {
176
- const a = X(e, u, o);
177
- return l.top = E(a.top, l.top), l.right = S(a.right, l.right), l.bottom = S(a.bottom, l.bottom), l.left = E(a.left, l.left), l;
178
- }, X(e, r, o));
188
+ const s = [...i === "clippingAncestors" ? S(e) ? [] : Rt(e, this._c) : [].concat(i), n], c = s[0], l = s.reduce((f, u) => {
189
+ const h = j(e, u, o);
190
+ 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;
191
+ }, j(e, c, o));
179
192
  return {
180
- width: f.right - f.left,
181
- height: f.bottom - f.top,
182
- x: f.left,
183
- y: f.top
193
+ width: l.right - l.left,
194
+ height: l.bottom - l.top,
195
+ x: l.left,
196
+ y: l.top
184
197
  };
185
198
  }
186
- function xt(t) {
199
+ function bt(t) {
187
200
  const {
188
201
  width: e,
189
202
  height: i
190
- } = J(t);
203
+ } = Z(t);
191
204
  return {
192
205
  width: e,
193
206
  height: i
194
207
  };
195
208
  }
196
- function bt(t, e, i) {
197
- const n = C(e), o = b(e), c = i === "fixed", s = T(t, !0, c, e);
198
- let r = {
209
+ function Ct(t, e, i) {
210
+ const n = b(e), o = O(e), r = i === "fixed", s = T(t, !0, r, e);
211
+ let c = {
199
212
  scrollLeft: 0,
200
213
  scrollTop: 0
201
214
  };
202
- const f = R(0);
203
- if (n || !n && !c)
204
- if ((_(e) !== "body" || k(o)) && (r = N(e)), n) {
205
- const h = T(e, !0, c, e);
206
- f.x = h.x + e.clientLeft, f.y = h.y + e.clientTop;
207
- } else o && (f.x = $(o));
208
- let l = 0, u = 0;
209
- if (o && !n && !c) {
210
- const h = o.getBoundingClientRect();
211
- u = h.top + r.scrollTop, l = h.left + r.scrollLeft - // RTL <body> scrollbar.
212
- $(o, h);
215
+ const l = m(0);
216
+ function f() {
217
+ l.x = k(o);
213
218
  }
214
- const a = s.left + r.scrollLeft - f.x - l, p = s.top + r.scrollTop - f.y - u;
219
+ if (n || !n && !r)
220
+ if ((M(e) !== "body" || _(o)) && (c = N(e)), n) {
221
+ const a = T(e, !0, r, e);
222
+ l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
223
+ } else o && f();
224
+ r && !n && o && f();
225
+ 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;
215
226
  return {
216
- x: a,
227
+ x: h,
217
228
  y: p,
218
229
  width: s.width,
219
230
  height: s.height
220
231
  };
221
232
  }
222
233
  function I(t) {
223
- return x(t).position === "static";
234
+ return R(t).position === "static";
224
235
  }
225
- function K(t, e) {
226
- if (!C(t) || x(t).position === "fixed")
236
+ function G(t, e) {
237
+ if (!b(t) || R(t).position === "fixed")
227
238
  return null;
228
239
  if (e)
229
240
  return e(t);
230
241
  let i = t.offsetParent;
231
- return b(t) === i && (i = i.ownerDocument.body), i;
242
+ return O(t) === i && (i = i.ownerDocument.body), i;
232
243
  }
233
- function tt(t, e) {
244
+ function it(t, e) {
234
245
  const i = L(t);
235
- if (M(t))
246
+ if (S(t))
236
247
  return i;
237
- if (!C(t)) {
248
+ if (!b(t)) {
238
249
  let o = W(t);
239
- for (; o && !A(o); ) {
240
- if (y(o) && !I(o))
250
+ for (; o && !H(o); ) {
251
+ if (v(o) && !I(o))
241
252
  return o;
242
253
  o = W(o);
243
254
  }
244
255
  return i;
245
256
  }
246
- let n = K(t, e);
247
- for (; n && ft(n) && I(n); )
248
- n = K(n, e);
249
- return n && A(n) && I(n) && !G(n) ? i : n || ut(t) || i;
257
+ let n = G(t, e);
258
+ for (; n && at(n) && I(n); )
259
+ n = G(n, e);
260
+ return n && H(n) && I(n) && !Y(n) ? i : n || dt(t) || i;
250
261
  }
251
- const Rt = async function(t) {
252
- const e = this.getOffsetParent || tt, i = this.getDimensions, n = await i(t.floating);
262
+ const Lt = async function(t) {
263
+ const e = this.getOffsetParent || it, i = this.getDimensions, n = await i(t.floating);
253
264
  return {
254
- reference: bt(t.reference, await e(t.floating), t.strategy),
265
+ reference: Ct(t.reference, await e(t.floating), t.strategy),
255
266
  floating: {
256
267
  x: 0,
257
268
  y: 0,
@@ -260,126 +271,129 @@ const Rt = async function(t) {
260
271
  }
261
272
  };
262
273
  };
263
- function Ct(t) {
264
- return x(t).direction === "rtl";
274
+ function Tt(t) {
275
+ return R(t).direction === "rtl";
265
276
  }
266
- const Ot = {
267
- convertOffsetParentRelativeRectToViewportRelativeRect: dt,
268
- getDocumentElement: b,
269
- getClippingRect: yt,
270
- getOffsetParent: tt,
271
- getElementRects: Rt,
272
- getClientRects: gt,
273
- getDimensions: xt,
277
+ const Et = {
278
+ convertOffsetParentRelativeRectToViewportRelativeRect: wt,
279
+ getDocumentElement: O,
280
+ getClippingRect: Ot,
281
+ getOffsetParent: it,
282
+ getElementRects: Lt,
283
+ getClientRects: mt,
284
+ getDimensions: bt,
274
285
  getScale: F,
275
- isElement: y,
276
- isRTL: Ct
286
+ isElement: v,
287
+ isRTL: Tt
277
288
  };
278
- function Lt(t, e) {
289
+ function nt(t, e) {
290
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
291
+ }
292
+ function Ft(t, e) {
279
293
  let i = null, n;
280
- const o = b(t);
281
- function c() {
282
- var r;
283
- clearTimeout(n), (r = i) == null || r.disconnect(), i = null;
294
+ const o = O(t);
295
+ function r() {
296
+ var c;
297
+ clearTimeout(n), (c = i) == null || c.disconnect(), i = null;
284
298
  }
285
- function s(r, f) {
286
- r === void 0 && (r = !1), f === void 0 && (f = 1), c();
287
- const {
288
- left: l,
289
- top: u,
290
- width: a,
291
- height: p
292
- } = t.getBoundingClientRect();
293
- if (r || e(), !a || !p)
299
+ function s(c, l) {
300
+ c === void 0 && (c = !1), l === void 0 && (l = 1), r();
301
+ const f = t.getBoundingClientRect(), {
302
+ left: u,
303
+ top: h,
304
+ width: p,
305
+ height: a
306
+ } = f;
307
+ if (c || e(), !p || !a)
294
308
  return;
295
- const h = z(u), v = z(o.clientWidth - (l + a)), d = z(o.clientHeight - (u + p)), m = z(l), w = {
296
- rootMargin: -h + "px " + -v + "px " + -d + "px " + -m + "px",
297
- threshold: E(0, S(1, f)) || 1
309
+ const y = D(h), g = D(o.clientWidth - (u + p)), w = D(o.clientHeight - (h + a)), d = D(u), C = {
310
+ rootMargin: -y + "px " + -g + "px " + -w + "px " + -d + "px",
311
+ threshold: E(0, V(1, l)) || 1
298
312
  };
299
- let O = !0;
300
- function B(P) {
301
- const H = P[0].intersectionRatio;
302
- if (H !== f) {
303
- if (!O)
313
+ let B = !0;
314
+ function P(U) {
315
+ const z = U[0].intersectionRatio;
316
+ if (z !== l) {
317
+ if (!B)
304
318
  return s();
305
- H ? s(!1, H) : n = setTimeout(() => {
319
+ z ? s(!1, z) : n = setTimeout(() => {
306
320
  s(!1, 1e-7);
307
321
  }, 1e3);
308
322
  }
309
- O = !1;
323
+ z === 1 && !nt(f, t.getBoundingClientRect()) && s(), B = !1;
310
324
  }
311
325
  try {
312
- i = new IntersectionObserver(B, {
313
- ...w,
326
+ i = new IntersectionObserver(P, {
327
+ ...C,
314
328
  // Handle <iframe>s
315
329
  root: o.ownerDocument
316
330
  });
317
331
  } catch {
318
- i = new IntersectionObserver(B, w);
332
+ i = new IntersectionObserver(P, C);
319
333
  }
320
334
  i.observe(t);
321
335
  }
322
- return s(!0), c;
336
+ return s(!0), r;
323
337
  }
324
- function Wt(t, e, i, n) {
338
+ function Dt(t, e, i, n) {
325
339
  n === void 0 && (n = {});
326
340
  const {
327
341
  ancestorScroll: o = !0,
328
- ancestorResize: c = !0,
342
+ ancestorResize: r = !0,
329
343
  elementResize: s = typeof ResizeObserver == "function",
330
- layoutShift: r = typeof IntersectionObserver == "function",
331
- animationFrame: f = !1
332
- } = n, l = q(t), u = o || c ? [...l ? V(l) : [], ...V(e)] : [];
333
- u.forEach((g) => {
334
- o && g.addEventListener("scroll", i, {
344
+ layoutShift: c = typeof IntersectionObserver == "function",
345
+ animationFrame: l = !1
346
+ } = n, f = q(t), u = o || r ? [...f ? $(f) : [], ...$(e)] : [];
347
+ u.forEach((d) => {
348
+ o && d.addEventListener("scroll", i, {
335
349
  passive: !0
336
- }), c && g.addEventListener("resize", i);
350
+ }), r && d.addEventListener("resize", i);
337
351
  });
338
- const a = l && r ? Lt(l, i) : null;
339
- let p = -1, h = null;
340
- s && (h = new ResizeObserver((g) => {
341
- let [w] = g;
342
- w && w.target === l && h && (h.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
343
- var O;
344
- (O = h) == null || O.observe(e);
352
+ const h = f && c ? Ft(f, i) : null;
353
+ let p = -1, a = null;
354
+ s && (a = new ResizeObserver((d) => {
355
+ let [x] = d;
356
+ x && x.target === f && a && (a.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
357
+ var C;
358
+ (C = a) == null || C.observe(e);
345
359
  })), i();
346
- }), l && !f && h.observe(l), h.observe(e));
347
- let v, d = f ? T(t) : null;
348
- f && m();
349
- function m() {
350
- const g = T(t);
351
- d && (g.x !== d.x || g.y !== d.y || g.width !== d.width || g.height !== d.height) && i(), d = g, v = requestAnimationFrame(m);
360
+ }), f && !l && a.observe(f), a.observe(e));
361
+ let y, g = l ? T(t) : null;
362
+ l && w();
363
+ function w() {
364
+ const d = T(t);
365
+ g && !nt(g, d) && i(), g = d, y = requestAnimationFrame(w);
352
366
  }
353
367
  return i(), () => {
354
- var g;
355
- u.forEach((w) => {
356
- o && w.removeEventListener("scroll", i), c && w.removeEventListener("resize", i);
357
- }), a == null || a(), (g = h) == null || g.disconnect(), h = null, f && cancelAnimationFrame(v);
368
+ var d;
369
+ u.forEach((x) => {
370
+ o && x.removeEventListener("scroll", i), r && x.removeEventListener("resize", i);
371
+ }), h == null || h(), (d = a) == null || d.disconnect(), a = null, l && cancelAnimationFrame(y);
358
372
  };
359
373
  }
360
- const Bt = et, zt = nt, Dt = it, At = st, Nt = rt, Ht = ot, It = lt, St = (t, e, i) => {
374
+ const At = ot, Ht = rt, Nt = st, It = lt, Vt = ft, $t = ct, St = ht, Mt = (t, e, i) => {
361
375
  const n = /* @__PURE__ */ new Map(), o = {
362
- platform: Ot,
376
+ platform: Et,
363
377
  ...i
364
- }, c = {
378
+ }, r = {
365
379
  ...o.platform,
366
380
  _c: n
367
381
  };
368
- return ct(t, e, {
382
+ return ut(t, e, {
369
383
  ...o,
370
- platform: c
384
+ platform: r
371
385
  });
372
386
  };
373
387
  export {
374
- Ht as arrow,
375
- Wt as autoUpdate,
376
- St as computePosition,
377
- Dt as flip,
378
- V as getOverflowAncestors,
379
- Nt as hide,
380
- It as limitShift,
381
- Bt as offset,
382
- Ot as platform,
383
- zt as shift,
384
- At as size
388
+ $t as arrow,
389
+ Dt as autoUpdate,
390
+ Mt as computePosition,
391
+ Nt as flip,
392
+ $ as getOverflowAncestors,
393
+ Vt as hide,
394
+ St as limitShift,
395
+ At as offset,
396
+ Et as platform,
397
+ Ht as shift,
398
+ It as size
385
399
  };