@serendie/ui 2.1.3 → 2.2.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 (122) hide show
  1. package/dist/client.js +79 -74
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +2 -2
  7. package/dist/components/Button/Button.js +22 -21
  8. package/dist/components/DatePicker/DatePicker.d.ts +13 -0
  9. package/dist/components/DatePicker/DatePicker.js +203 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/index.js +6 -0
  12. package/dist/components/DatePicker/parseDate.d.ts +1 -0
  13. package/dist/components/DatePicker/styles.d.ts +1 -0
  14. package/dist/components/DatePicker/styles.js +224 -0
  15. package/dist/components/IconButton/IconButton.d.ts +3 -3
  16. package/dist/components/List/ListItem.d.ts +1 -1
  17. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  18. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
  21. package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
  23. package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
  25. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
  26. package/dist/components/ProgressIndicator/index.d.ts +4 -1
  27. package/dist/components/ProgressIndicator/index.js +3 -2
  28. package/dist/components/ProgressIndicator/util.d.ts +1 -0
  29. package/dist/components/ProgressIndicator/util.js +13 -0
  30. package/dist/components/Search/Search.d.ts +1 -1
  31. package/dist/components/Select/Select.d.ts +1 -1
  32. package/dist/components/Switch/Switch.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -1
  34. package/dist/components/TextField/TextField.js +59 -156
  35. package/dist/components/Toast/Toast.d.ts +1 -1
  36. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +80 -75
  39. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
  40. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
  43. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
  45. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
  47. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
  49. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
  51. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
  52. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
  53. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
  54. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
  56. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
  57. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
  59. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
  61. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
  62. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
  63. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
  64. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
  68. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  71. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
  73. package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
  74. package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
  75. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
  76. package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
  77. package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
  78. package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
  79. package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
  80. package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
  81. package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
  82. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  83. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
  84. package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
  85. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
  86. package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
  87. package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
  88. package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
  89. package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
  90. package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
  91. package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
  92. package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
  93. package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
  94. package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
  98. package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
  99. package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
  100. package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
  101. package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
  102. package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
  103. package/dist/preset.d.ts +11 -1
  104. package/dist/recipes/index.d.ts +3 -2
  105. package/dist/recipes/index.js +5 -2
  106. package/dist/recipes/textFieldRecipe.d.ts +6 -0
  107. package/dist/recipes/textFieldRecipe.js +107 -0
  108. package/dist/styled-system/css/cva.js +43 -38
  109. package/dist/styled-system/recipes/create-recipe.js +37 -0
  110. package/dist/styled-system/recipes/text-field-recipe.js +61 -0
  111. package/dist/styles.css +1 -1
  112. package/dist/tokens/keyframes/index.d.ts +8 -0
  113. package/dist/tokens/keyframes/index.js +6 -2
  114. package/package.json +3 -3
  115. package/styled-system/recipes/create-recipe.js +82 -0
  116. package/styled-system/recipes/index.d.ts +2 -0
  117. package/styled-system/recipes/index.js +1 -0
  118. package/styled-system/recipes/text-field-recipe.d.ts +28 -0
  119. package/styled-system/recipes/text-field-recipe.js +72 -0
  120. package/styled-system/types/prop-type.d.ts +1 -1
  121. package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
  122. package/dist/node_modules/proxy-compare/dist/index.js +0 -7
@@ -1,399 +1,402 @@
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";
1
+ import { offset as st, flip as rt, shift as ct, arrow as lt, size as ft, hide as ut, computePosition as ht, limitShift as at } from "../../core/dist/floating-ui.core.js";
2
+ import { createCoords as y, 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 $, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as V, getParentNode as S, isLastTraversableNode as z, isTableElement as dt, isContainingBlock as Y, getContainingBlock as gt, 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);
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;
8
- return c && (i = r, n = s), {
9
- width: i,
10
- height: n,
5
+ const e = b(t);
6
+ let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
7
+ const n = C(t), r = n ? t.offsetWidth : o, s = n ? t.offsetHeight : i, c = D(o) !== r || D(i) !== s;
8
+ return c && (o = r, i = s), {
9
+ width: o,
10
+ height: i,
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);
21
- const i = e.getBoundingClientRect(), {
22
- width: n,
23
- height: o,
18
+ const e = X(t);
19
+ if (!C(e))
20
+ return y(1);
21
+ const o = e.getBoundingClientRect(), {
22
+ width: i,
23
+ height: n,
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(o.width) : o.width) / i, c = (r ? D(o.height) : o.height) / n;
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 gt = /* @__PURE__ */ m(0);
33
- function X(t) {
32
+ const pt = /* @__PURE__ */ y(0);
33
+ function tt(t) {
34
34
  const e = L(t);
35
- return !Q() || !e.visualViewport ? gt : {
35
+ return !Q() || !e.visualViewport ? pt : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function pt(t, e, i) {
41
- return e === void 0 && (e = !1), !i || e && i !== L(t) ? !1 : e;
40
+ function mt(t, e, o) {
41
+ return e === void 0 && (e = !1), !o || e && o !== L(t) ? !1 : e;
42
42
  }
43
- function T(t, e, i, n) {
44
- e === void 0 && (e = !1), i === void 0 && (i = !1);
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;
43
+ function T(t, e, o, i) {
44
+ e === void 0 && (e = !1), o === void 0 && (o = !1);
45
+ const n = t.getBoundingClientRect(), r = X(t);
46
+ let s = y(1);
47
+ e && (i ? v(i) && (s = F(i)) : s = F(t));
48
+ const c = mt(r, o, i) ? tt(r) : y(0);
49
+ let f = (n.left + c.x) / s.x, l = (n.top + c.y) / s.y, u = n.width / s.x, h = n.height / s.y;
50
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);
51
+ const d = L(r), a = i && v(i) ? L(i) : i;
52
+ let m = d, p = U(m);
53
+ for (; p && i && a !== m; ) {
54
+ const w = F(p), g = p.getBoundingClientRect(), x = b(p), O = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, W = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
55
+ f *= w.x, l *= w.y, u *= w.x, h *= w.y, f += O, l += W, 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 o = H(t).scrollLeft;
67
+ return e ? e.left + o : T(R(t)).left + o;
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 o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - I(t, o), n = o.top + e.scrollTop;
75
71
  return {
76
- x: o,
77
- y: r
72
+ x: i,
73
+ y: n
78
74
  };
79
75
  }
80
76
  function wt(t) {
81
77
  let {
82
78
  elements: e,
83
- rect: i,
84
- offsetParent: n,
85
- strategy: o
79
+ rect: o,
80
+ offsetParent: i,
81
+ strategy: n
86
82
  } = t;
87
- const r = o === "fixed", s = O(n), c = e ? S(e.floating) : !1;
88
- if (n === s || c && r)
89
- return i;
90
- let l = {
83
+ const r = n === "fixed", s = R(i), c = e ? V(e.floating) : !1;
84
+ if (i === s || c && r)
85
+ return o;
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) && ((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;
89
+ }, l = y(1);
90
+ const u = y(0), h = C(i);
91
+ if ((h || !h && !r) && ((_(i) !== "body" || q(s)) && (f = H(i)), C(i))) {
92
+ const a = T(i);
93
+ l = F(i), u.x = a.x + i.clientLeft, u.y = a.y + i.clientTop;
98
94
  }
99
- const p = s && !h && !r ? tt(s, l, !0) : m(0);
95
+ const d = s && !h && !r ? et(s, f) : y(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: o.width * l.x,
98
+ height: o.height * l.y,
99
+ x: o.x * l.x - f.scrollLeft * l.x + u.x + d.x,
100
+ y: o.y * l.y - f.scrollTop * l.y + u.y + d.y
105
101
  };
106
102
  }
107
- function mt(t) {
103
+ function yt(t) {
108
104
  return Array.from(t.getClientRects());
109
105
  }
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), {
115
- width: o,
106
+ function xt(t) {
107
+ const e = R(t), o = H(t), i = t.ownerDocument.body, n = E(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), r = E(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
108
+ let s = -o.scrollLeft + I(t);
109
+ const c = -o.scrollTop;
110
+ return b(i).direction === "rtl" && (s += E(e.clientWidth, i.clientWidth) - n), {
111
+ width: n,
116
112
  height: r,
117
113
  x: s,
118
114
  y: c
119
115
  };
120
116
  }
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;
124
- if (o) {
125
- r = o.width, s = o.height;
126
- const f = Q();
127
- (!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
117
+ const K = 25;
118
+ function vt(t, e) {
119
+ const o = L(t), i = R(t), n = o.visualViewport;
120
+ let r = i.clientWidth, s = i.clientHeight, c = 0, f = 0;
121
+ if (n) {
122
+ r = n.width, s = n.height;
123
+ const u = Q();
124
+ (!u || u && e === "fixed") && (c = n.offsetLeft, f = n.offsetTop);
128
125
  }
126
+ const l = I(i);
127
+ if (l <= 0) {
128
+ const u = i.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(i.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
- 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;
138
+ const bt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
139
+ function Rt(t, e) {
140
+ const o = T(t, !0, e === "fixed"), i = o.top + t.clientTop, n = o.left + t.clientLeft, r = C(t) ? F(t) : y(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = n * r.x, l = i * r.y;
138
141
  return {
139
142
  width: s,
140
143
  height: c,
141
- x: l,
142
- y: f
144
+ x: f,
145
+ y: l
143
146
  };
144
147
  }
145
- function j(t, e, i) {
146
- let n;
148
+ function j(t, e, o) {
149
+ let i;
147
150
  if (e === "viewport")
148
- n = xt(t, i);
151
+ i = vt(t, o);
149
152
  else if (e === "document")
150
- n = yt(O(t));
153
+ i = xt(R(t));
151
154
  else if (v(e))
152
- n = vt(e, i);
155
+ i = Rt(e, o);
153
156
  else {
154
- const o = X(t);
155
- n = {
156
- x: e.x - o.x,
157
- y: e.y - o.y,
157
+ const n = tt(t);
158
+ i = {
159
+ x: e.x - n.x,
160
+ y: e.y - n.y,
158
161
  width: e.width,
159
162
  height: e.height
160
163
  };
161
164
  }
162
- return J(n);
165
+ return J(i);
163
166
  }
164
- function et(t, e) {
165
- const i = W(t);
166
- return i === e || !v(i) || H(i) ? !1 : R(i).position === "fixed" || et(i, e);
167
+ function it(t, e) {
168
+ const o = S(t);
169
+ return o === e || !v(o) || z(o) ? !1 : b(o).position === "fixed" || it(o, e);
167
170
  }
168
- function Rt(t, e) {
169
- const i = e.get(t);
170
- if (i)
171
- return i;
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);
171
+ function Ct(t, e) {
172
+ const o = e.get(t);
173
+ if (o)
174
+ return o;
175
+ let i = $(t, [], !1).filter((c) => v(c) && _(c) !== "body"), n = null;
176
+ const r = b(t).position === "fixed";
177
+ let s = r ? S(t) : t;
178
+ for (; v(s) && !z(s); ) {
179
+ const c = b(s), f = Y(s);
180
+ !f && c.position === "fixed" && (n = null), (r ? !f && !n : !f && c.position === "static" && !!n && bt.has(n.position) || q(s) && !f && it(t, s)) ? i = i.filter((u) => u !== s) : n = c, s = S(s);
178
181
  }
179
- return e.set(t, n), n;
182
+ return e.set(t, i), i;
180
183
  }
181
184
  function Ot(t) {
182
185
  let {
183
186
  element: e,
184
- boundary: i,
185
- rootBoundary: n,
186
- strategy: o
187
+ boundary: o,
188
+ rootBoundary: i,
189
+ strategy: n
187
190
  } = t;
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));
191
+ const s = [...o === "clippingAncestors" ? V(e) ? [] : Ct(e, this._c) : [].concat(o), i], c = s[0], f = s.reduce((l, u) => {
192
+ const h = j(e, u, n);
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;
194
+ }, j(e, c, n));
192
195
  return {
193
- width: l.right - l.left,
194
- height: l.bottom - l.top,
195
- x: l.left,
196
- y: l.top
196
+ width: f.right - f.left,
197
+ height: f.bottom - f.top,
198
+ x: f.left,
199
+ y: f.top
197
200
  };
198
201
  }
199
- function bt(t) {
202
+ function Lt(t) {
200
203
  const {
201
204
  width: e,
202
- height: i
205
+ height: o
203
206
  } = Z(t);
204
207
  return {
205
208
  width: e,
206
- height: i
209
+ height: o
207
210
  };
208
211
  }
209
- function Ct(t, e, i) {
210
- const n = b(e), o = O(e), r = i === "fixed", s = T(t, !0, r, e);
212
+ function Tt(t, e, o) {
213
+ const i = C(e), n = R(e), r = o === "fixed", s = T(t, !0, r, e);
211
214
  let c = {
212
215
  scrollLeft: 0,
213
216
  scrollTop: 0
214
217
  };
215
- const l = m(0);
216
- function f() {
217
- l.x = k(o);
218
+ const f = y(0);
219
+ function l() {
220
+ f.x = I(n);
218
221
  }
219
- if (n || !n && !r)
220
- if ((M(e) !== "body" || _(o)) && (c = N(e)), n) {
222
+ if (i || !i && !r)
223
+ if ((_(e) !== "body" || q(n)) && (c = H(e)), i) {
221
224
  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;
225
+ f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
226
+ } else n && l();
227
+ r && !i && n && l();
228
+ const u = n && !i && !r ? et(n, c) : y(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
226
229
  return {
227
230
  x: h,
228
- y: p,
231
+ y: d,
229
232
  width: s.width,
230
233
  height: s.height
231
234
  };
232
235
  }
233
- function I(t) {
234
- return R(t).position === "static";
236
+ function M(t) {
237
+ return b(t).position === "static";
235
238
  }
236
239
  function G(t, e) {
237
- if (!b(t) || R(t).position === "fixed")
240
+ if (!C(t) || b(t).position === "fixed")
238
241
  return null;
239
242
  if (e)
240
243
  return e(t);
241
- let i = t.offsetParent;
242
- return O(t) === i && (i = i.ownerDocument.body), i;
244
+ let o = t.offsetParent;
245
+ return R(t) === o && (o = o.ownerDocument.body), o;
243
246
  }
244
- function it(t, e) {
245
- const i = L(t);
246
- if (S(t))
247
- return i;
248
- if (!b(t)) {
249
- let o = W(t);
250
- for (; o && !H(o); ) {
251
- if (v(o) && !I(o))
252
- return o;
253
- o = W(o);
247
+ function ot(t, e) {
248
+ const o = L(t);
249
+ if (V(t))
250
+ return o;
251
+ if (!C(t)) {
252
+ let n = S(t);
253
+ for (; n && !z(n); ) {
254
+ if (v(n) && !M(n))
255
+ return n;
256
+ n = S(n);
254
257
  }
255
- return i;
258
+ return o;
256
259
  }
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;
260
+ let i = G(t, e);
261
+ for (; i && dt(i) && M(i); )
262
+ i = G(i, e);
263
+ return i && z(i) && M(i) && !Y(i) ? o : i || gt(t) || o;
261
264
  }
262
- const Lt = async function(t) {
263
- const e = this.getOffsetParent || it, i = this.getDimensions, n = await i(t.floating);
265
+ const Et = async function(t) {
266
+ const e = this.getOffsetParent || ot, o = this.getDimensions, i = await o(t.floating);
264
267
  return {
265
- reference: Ct(t.reference, await e(t.floating), t.strategy),
268
+ reference: Tt(t.reference, await e(t.floating), t.strategy),
266
269
  floating: {
267
270
  x: 0,
268
271
  y: 0,
269
- width: n.width,
270
- height: n.height
272
+ width: i.width,
273
+ height: i.height
271
274
  }
272
275
  };
273
276
  };
274
- function Tt(t) {
275
- return R(t).direction === "rtl";
277
+ function Ft(t) {
278
+ return b(t).direction === "rtl";
276
279
  }
277
- const Et = {
280
+ const St = {
278
281
  convertOffsetParentRelativeRectToViewportRelativeRect: wt,
279
- getDocumentElement: O,
282
+ getDocumentElement: R,
280
283
  getClippingRect: Ot,
281
- getOffsetParent: it,
282
- getElementRects: Lt,
283
- getClientRects: mt,
284
- getDimensions: bt,
284
+ getOffsetParent: ot,
285
+ getElementRects: Et,
286
+ getClientRects: yt,
287
+ getDimensions: Lt,
285
288
  getScale: F,
286
289
  isElement: v,
287
- isRTL: Tt
290
+ isRTL: Ft
288
291
  };
289
292
  function nt(t, e) {
290
293
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
291
294
  }
292
- function Ft(t, e) {
293
- let i = null, n;
294
- const o = O(t);
295
+ function Wt(t, e) {
296
+ let o = null, i;
297
+ const n = R(t);
295
298
  function r() {
296
299
  var c;
297
- clearTimeout(n), (c = i) == null || c.disconnect(), i = null;
300
+ clearTimeout(i), (c = o) == null || c.disconnect(), o = null;
298
301
  }
299
- function s(c, l) {
300
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
301
- 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(), {
302
305
  left: u,
303
306
  top: h,
304
- width: p,
307
+ width: d,
305
308
  height: a
306
- } = f;
307
- if (c || e(), !p || !a)
309
+ } = l;
310
+ if (c || e(), !d || !a)
308
311
  return;
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
312
+ const m = A(h), p = A(n.clientWidth - (u + d)), w = A(n.clientHeight - (h + a)), g = A(u), O = {
313
+ rootMargin: -m + "px " + -p + "px " + -w + "px " + -g + "px",
314
+ threshold: E(0, N(1, f)) || 1
312
315
  };
313
- let B = !0;
314
- function P(U) {
315
- const z = U[0].intersectionRatio;
316
- if (z !== l) {
317
- if (!B)
316
+ let W = !0;
317
+ function k(P) {
318
+ const B = P[0].intersectionRatio;
319
+ if (B !== f) {
320
+ if (!W)
318
321
  return s();
319
- z ? s(!1, z) : n = setTimeout(() => {
322
+ B ? s(!1, B) : i = setTimeout(() => {
320
323
  s(!1, 1e-7);
321
324
  }, 1e3);
322
325
  }
323
- z === 1 && !nt(f, t.getBoundingClientRect()) && s(), B = !1;
326
+ B === 1 && !nt(l, t.getBoundingClientRect()) && s(), W = !1;
324
327
  }
325
328
  try {
326
- i = new IntersectionObserver(P, {
327
- ...C,
329
+ o = new IntersectionObserver(k, {
330
+ ...O,
328
331
  // Handle <iframe>s
329
- root: o.ownerDocument
332
+ root: n.ownerDocument
330
333
  });
331
334
  } catch {
332
- i = new IntersectionObserver(P, C);
335
+ o = new IntersectionObserver(k, O);
333
336
  }
334
- i.observe(t);
337
+ o.observe(t);
335
338
  }
336
339
  return s(!0), r;
337
340
  }
338
- function Dt(t, e, i, n) {
339
- n === void 0 && (n = {});
341
+ function zt(t, e, o, i) {
342
+ i === void 0 && (i = {});
340
343
  const {
341
- ancestorScroll: o = !0,
344
+ ancestorScroll: n = !0,
342
345
  ancestorResize: r = !0,
343
346
  elementResize: s = typeof ResizeObserver == "function",
344
347
  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, {
348
+ animationFrame: f = !1
349
+ } = i, l = X(t), u = n || r ? [...l ? $(l) : [], ...$(e)] : [];
350
+ u.forEach((g) => {
351
+ n && g.addEventListener("scroll", o, {
349
352
  passive: !0
350
- }), r && d.addEventListener("resize", i);
353
+ }), r && g.addEventListener("resize", o);
351
354
  });
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);
359
- })), i();
360
- }), f && !l && a.observe(f), a.observe(e));
361
- let y, g = l ? T(t) : null;
362
- l && w();
355
+ const h = l && c ? Wt(l, o) : 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);
362
+ })), o();
363
+ }), l && !f && a.observe(l), a.observe(e));
364
+ let m, p = f ? T(t) : null;
365
+ f && w();
363
366
  function w() {
364
- const d = T(t);
365
- g && !nt(g, d) && i(), g = d, y = requestAnimationFrame(w);
367
+ const g = T(t);
368
+ p && !nt(p, g) && o(), p = g, m = requestAnimationFrame(w);
366
369
  }
367
- return i(), () => {
368
- var d;
370
+ return o(), () => {
371
+ var g;
369
372
  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);
373
+ n && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
374
+ }), h == null || h(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(m);
372
375
  };
373
376
  }
374
- const At = ot, Ht = rt, Nt = st, It = lt, Vt = ft, $t = ct, St = ht, Mt = (t, e, i) => {
375
- const n = /* @__PURE__ */ new Map(), o = {
376
- platform: Et,
377
- ...i
377
+ const Ht = st, It = ct, Mt = rt, Nt = ft, $t = ut, Vt = lt, _t = at, qt = (t, e, o) => {
378
+ const i = /* @__PURE__ */ new Map(), n = {
379
+ platform: St,
380
+ ...o
378
381
  }, r = {
379
- ...o.platform,
380
- _c: n
382
+ ...n.platform,
383
+ _c: i
381
384
  };
382
- return ut(t, e, {
383
- ...o,
385
+ return ht(t, e, {
386
+ ...n,
384
387
  platform: r
385
388
  });
386
389
  };
387
390
  export {
388
- $t as arrow,
389
- Dt as autoUpdate,
390
- Mt as computePosition,
391
- Nt as flip,
391
+ Vt as arrow,
392
+ zt as autoUpdate,
393
+ qt as computePosition,
394
+ Mt as flip,
392
395
  $ 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
396
+ $t as hide,
397
+ _t as limitShift,
398
+ Ht as offset,
399
+ St as platform,
400
+ It as shift,
401
+ Nt as size
399
402
  };