@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,12 +1,12 @@
1
- import { evaluate as E, getSide as V, getSideAxis as B, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, clamp as X, getPaddingObject as J, getAlignmentAxis as K, getAlignment as z, min as $, max as W, rectToClientRect as _, getOppositeAxis as N, getAxisLength as Q, sides as ie } from "../../utils/dist/floating-ui.utils.js";
1
+ import { evaluate as L, getSide as j, getSideAxis as T, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, clamp as X, getPaddingObject as J, getAlignmentAxis as K, getAlignment as z, min as $, max as W, rectToClientRect as _, getOppositeAxis as N, getAxisLength as Q, sides as ie } from "../../utils/dist/floating-ui.utils.js";
2
2
  function I(t, e, d) {
3
3
  let {
4
4
  reference: a,
5
5
  floating: r
6
6
  } = t;
7
- const n = B(e), o = K(e), m = Q(o), g = V(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
7
+ const n = T(e), o = K(e), m = Q(o), u = j(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
8
8
  let i;
9
- switch (g) {
9
+ switch (u) {
10
10
  case "top":
11
11
  i = {
12
12
  x: c,
@@ -53,7 +53,7 @@ const ae = async (t, e, d) => {
53
53
  strategy: r = "absolute",
54
54
  middleware: n = [],
55
55
  platform: o
56
- } = d, m = n.filter(Boolean), g = await (o.isRTL == null ? void 0 : o.isRTL(e));
56
+ } = d, m = n.filter(Boolean), u = await (o.isRTL == null ? void 0 : o.isRTL(e));
57
57
  let h = await o.getElementRects({
58
58
  reference: t,
59
59
  floating: e,
@@ -61,12 +61,12 @@ const ae = async (t, e, d) => {
61
61
  }), {
62
62
  x: c,
63
63
  y: s
64
- } = I(h, a, g), f = a, i = {}, l = 0;
65
- for (let u = 0; u < m.length; u++) {
64
+ } = I(h, a, u), f = a, i = {}, l = 0;
65
+ for (let g = 0; g < m.length; g++) {
66
66
  const {
67
67
  name: x,
68
68
  fn: y
69
- } = m[u], {
69
+ } = m[g], {
70
70
  x: A,
71
71
  y: p,
72
72
  data: v,
@@ -98,7 +98,7 @@ const ae = async (t, e, d) => {
98
98
  }) : w.rects), {
99
99
  x: c,
100
100
  y: s
101
- } = I(h, f, g)), u = -1);
101
+ } = I(h, f, u)), g = -1);
102
102
  }
103
103
  return {
104
104
  x: c,
@@ -117,18 +117,18 @@ async function Y(t, e) {
117
117
  platform: n,
118
118
  rects: o,
119
119
  elements: m,
120
- strategy: g
120
+ strategy: u
121
121
  } = t, {
122
122
  boundary: h = "clippingAncestors",
123
123
  rootBoundary: c = "viewport",
124
124
  elementContext: s = "floating",
125
125
  altBoundary: f = !1,
126
126
  padding: i = 0
127
- } = E(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
127
+ } = L(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
128
128
  element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
129
129
  boundary: h,
130
130
  rootBoundary: c,
131
- strategy: g
131
+ strategy: u
132
132
  })), A = s === "floating" ? {
133
133
  x: a,
134
134
  y: r,
@@ -144,7 +144,7 @@ async function Y(t, e) {
144
144
  elements: m,
145
145
  rect: A,
146
146
  offsetParent: p,
147
- strategy: g
147
+ strategy: u
148
148
  }) : A);
149
149
  return {
150
150
  top: (y.top - w.top + l.top) / v.y,
@@ -164,30 +164,30 @@ const ce = (t) => ({
164
164
  rects: n,
165
165
  platform: o,
166
166
  elements: m,
167
- middlewareData: g
167
+ middlewareData: u
168
168
  } = e, {
169
169
  element: h,
170
170
  padding: c = 0
171
- } = E(t, e) || {};
171
+ } = L(t, e) || {};
172
172
  if (h == null)
173
173
  return {};
174
174
  const s = J(c), f = {
175
175
  x: d,
176
176
  y: a
177
- }, i = K(r), l = Q(i), u = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
178
- let P = O ? O[p] : 0;
179
- (!P || !await (o.isElement == null ? void 0 : o.isElement(O))) && (P = m.floating[p] || n.floating[l]);
180
- const D = v / 2 - w / 2, R = P / 2 - u[l] / 2 - 1, C = $(s[y], R), T = $(s[A], R), S = C, L = P - u[l] - T, b = P / 2 - u[l] / 2 + D, j = X(S, b, L), M = !g.arrow && z(r) != null && b !== j && n.reference[l] / 2 - (b < S ? C : T) - u[l] / 2 < 0, k = M ? b < S ? b - S : b - L : 0;
177
+ }, i = K(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
178
+ let C = P ? P[p] : 0;
179
+ (!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
180
+ const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, R = E ? b < D ? b - D : b - F : 0;
181
181
  return {
182
- [i]: f[i] + k,
182
+ [i]: f[i] + R,
183
183
  data: {
184
- [i]: j,
185
- centerOffset: b - j - k,
186
- ...M && {
187
- alignmentOffset: k
184
+ [i]: B,
185
+ centerOffset: b - B - R,
186
+ ...E && {
187
+ alignmentOffset: R
188
188
  }
189
189
  },
190
- reset: M
190
+ reset: E
191
191
  };
192
192
  }
193
193
  }), le = function(t) {
@@ -201,7 +201,7 @@ const ce = (t) => ({
201
201
  middlewareData: n,
202
202
  rects: o,
203
203
  initialPlacement: m,
204
- platform: g,
204
+ platform: u,
205
205
  elements: h
206
206
  } = e, {
207
207
  mainAxis: c = !0,
@@ -209,60 +209,62 @@ const ce = (t) => ({
209
209
  fallbackPlacements: f,
210
210
  fallbackStrategy: i = "bestFit",
211
211
  fallbackAxisSideDirection: l = "none",
212
- flipAlignment: u = !0,
212
+ flipAlignment: g = !0,
213
213
  ...x
214
- } = E(t, e);
214
+ } = L(t, e);
215
215
  if ((d = n.arrow) != null && d.alignmentOffset)
216
216
  return {};
217
- const y = V(r), A = B(m), p = V(m) === m, v = await (g.isRTL == null ? void 0 : g.isRTL(h.floating)), w = f || (p || !u ? [Z(m)] : ee(m)), O = l !== "none";
218
- !f && O && w.push(...te(m, u, l, v));
219
- const P = [m, ...w], D = await Y(e, x), R = [];
220
- let C = ((a = n.flip) == null ? void 0 : a.overflows) || [];
221
- if (c && R.push(D[y]), s) {
217
+ const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [Z(m)] : ee(m)), P = l !== "none";
218
+ !f && P && w.push(...te(m, g, l, v));
219
+ const C = [m, ...w], M = await Y(e, x), k = [];
220
+ let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
221
+ if (c && k.push(M[y]), s) {
222
222
  const b = ne(r, o, v);
223
- R.push(D[b[0]], D[b[1]]);
223
+ k.push(M[b[0]], M[b[1]]);
224
224
  }
225
- if (C = [...C, {
225
+ if (O = [...O, {
226
226
  placement: r,
227
- overflows: R
228
- }], !R.every((b) => b <= 0)) {
229
- var T, S;
230
- const b = (((T = n.flip) == null ? void 0 : T.index) || 0) + 1, j = P[b];
231
- if (j)
227
+ overflows: k
228
+ }], !k.every((b) => b <= 0)) {
229
+ var H, D;
230
+ const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
231
+ if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
232
+ // overflows the main axis.
233
+ O.every((S) => S.overflows[0] > 0 && T(S.placement) === A)))
232
234
  return {
233
235
  data: {
234
236
  index: b,
235
- overflows: C
237
+ overflows: O
236
238
  },
237
239
  reset: {
238
- placement: j
240
+ placement: B
239
241
  }
240
242
  };
241
- let M = (S = C.filter((k) => k.overflows[0] <= 0).sort((k, H) => k.overflows[1] - H.overflows[1])[0]) == null ? void 0 : S.placement;
242
- if (!M)
243
+ let E = (D = O.filter((R) => R.overflows[0] <= 0).sort((R, S) => R.overflows[1] - S.overflows[1])[0]) == null ? void 0 : D.placement;
244
+ if (!E)
243
245
  switch (i) {
244
246
  case "bestFit": {
245
- var L;
246
- const k = (L = C.filter((H) => {
247
- if (O) {
248
- const F = B(H.placement);
249
- return F === A || // Create a bias to the `y` side axis due to horizontal
247
+ var F;
248
+ const R = (F = O.filter((S) => {
249
+ if (P) {
250
+ const V = T(S.placement);
251
+ return V === A || // Create a bias to the `y` side axis due to horizontal
250
252
  // reading directions favoring greater width.
251
- F === "y";
253
+ V === "y";
252
254
  }
253
255
  return !0;
254
- }).map((H) => [H.placement, H.overflows.filter((F) => F > 0).reduce((F, U) => F + U, 0)]).sort((H, F) => H[1] - F[1])[0]) == null ? void 0 : L[0];
255
- k && (M = k);
256
+ }).map((S) => [S.placement, S.overflows.filter((V) => V > 0).reduce((V, U) => V + U, 0)]).sort((S, V) => S[1] - V[1])[0]) == null ? void 0 : F[0];
257
+ R && (E = R);
256
258
  break;
257
259
  }
258
260
  case "initialPlacement":
259
- M = m;
261
+ E = m;
260
262
  break;
261
263
  }
262
- if (r !== M)
264
+ if (r !== E)
263
265
  return {
264
266
  reset: {
265
- placement: M
267
+ placement: E
266
268
  }
267
269
  };
268
270
  }
@@ -291,7 +293,7 @@ const re = function(t) {
291
293
  } = e, {
292
294
  strategy: a = "referenceHidden",
293
295
  ...r
294
- } = E(t, e);
296
+ } = L(t, e);
295
297
  switch (a) {
296
298
  case "referenceHidden": {
297
299
  const n = await Y(e, {
@@ -328,7 +330,7 @@ async function se(t, e) {
328
330
  placement: d,
329
331
  platform: a,
330
332
  elements: r
331
- } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = V(d), m = z(d), g = B(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && g ? -1 : 1, s = E(e, t);
333
+ } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
332
334
  let {
333
335
  mainAxis: f,
334
336
  crossAxis: i,
@@ -342,7 +344,7 @@ async function se(t, e) {
342
344
  crossAxis: s.crossAxis || 0,
343
345
  alignmentAxis: s.alignmentAxis
344
346
  };
345
- return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), g ? {
347
+ return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), u ? {
346
348
  x: i * c,
347
349
  y: f * h
348
350
  } : {
@@ -361,12 +363,12 @@ const fe = function(t) {
361
363
  y: n,
362
364
  placement: o,
363
365
  middlewareData: m
364
- } = e, g = await se(e, t);
366
+ } = e, u = await se(e, t);
365
367
  return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
366
- x: r + g.x,
367
- y: n + g.y,
368
+ x: r + u.x,
369
+ y: n + u.y,
368
370
  data: {
369
- ...g,
371
+ ...u,
370
372
  placement: o
371
373
  }
372
374
  };
@@ -396,11 +398,11 @@ const fe = function(t) {
396
398
  };
397
399
  }
398
400
  },
399
- ...g
400
- } = E(t, e), h = {
401
+ ...u
402
+ } = L(t, e), h = {
401
403
  x: d,
402
404
  y: a
403
- }, c = await Y(e, g), s = B(V(r)), f = N(s);
405
+ }, c = await Y(e, u), s = T(j(r)), f = N(s);
404
406
  let i = h[f], l = h[s];
405
407
  if (n) {
406
408
  const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
@@ -410,16 +412,16 @@ const fe = function(t) {
410
412
  const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
411
413
  l = X(A, l, p);
412
414
  }
413
- const u = m.fn({
415
+ const g = m.fn({
414
416
  ...e,
415
417
  [f]: i,
416
418
  [s]: l
417
419
  });
418
420
  return {
419
- ...u,
421
+ ...g,
420
422
  data: {
421
- x: u.x - d,
422
- y: u.y - a,
423
+ x: g.x - d,
424
+ y: g.y - a,
423
425
  enabled: {
424
426
  [f]: n,
425
427
  [s]: o
@@ -440,29 +442,29 @@ const fe = function(t) {
440
442
  middlewareData: o
441
443
  } = e, {
442
444
  offset: m = 0,
443
- mainAxis: g = !0,
445
+ mainAxis: u = !0,
444
446
  crossAxis: h = !0
445
- } = E(t, e), c = {
447
+ } = L(t, e), c = {
446
448
  x: d,
447
449
  y: a
448
- }, s = B(r), f = N(s);
450
+ }, s = T(r), f = N(s);
449
451
  let i = c[f], l = c[s];
450
- const u = E(m, e), x = typeof u == "number" ? {
451
- mainAxis: u,
452
+ const g = L(m, e), x = typeof g == "number" ? {
453
+ mainAxis: g,
452
454
  crossAxis: 0
453
455
  } : {
454
456
  mainAxis: 0,
455
457
  crossAxis: 0,
456
- ...u
458
+ ...g
457
459
  };
458
- if (g) {
460
+ if (u) {
459
461
  const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
460
462
  i < v ? i = v : i > w && (i = w);
461
463
  }
462
464
  if (h) {
463
465
  var y, A;
464
- const p = f === "y" ? "width" : "height", v = ["top", "left"].includes(V(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), O = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
465
- l < w ? l = w : l > O && (l = O);
466
+ const p = f === "y" ? "width" : "height", v = ["top", "left"].includes(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
467
+ l < w ? l = w : l > P && (l = P);
466
468
  }
467
469
  return {
468
470
  [f]: i,
@@ -482,28 +484,28 @@ const fe = function(t) {
482
484
  platform: o,
483
485
  elements: m
484
486
  } = e, {
485
- apply: g = () => {
487
+ apply: u = () => {
486
488
  },
487
489
  ...h
488
- } = E(t, e), c = await Y(e, h), s = V(r), f = z(r), i = B(r) === "y", {
490
+ } = L(t, e), c = await Y(e, h), s = j(r), f = z(r), i = T(r) === "y", {
489
491
  width: l,
490
- height: u
492
+ height: g
491
493
  } = n.floating;
492
494
  let x, y;
493
495
  s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
494
- const A = u - c.top - c.bottom, p = l - c.left - c.right, v = $(u - c[x], A), w = $(l - c[y], p), O = !e.middlewareData.shift;
495
- let P = v, D = w;
496
- if ((d = e.middlewareData.shift) != null && d.enabled.x && (D = p), (a = e.middlewareData.shift) != null && a.enabled.y && (P = A), O && !f) {
497
- const C = W(c.left, 0), T = W(c.right, 0), S = W(c.top, 0), L = W(c.bottom, 0);
498
- i ? D = l - 2 * (C !== 0 || T !== 0 ? C + T : W(c.left, c.right)) : P = u - 2 * (S !== 0 || L !== 0 ? S + L : W(c.top, c.bottom));
496
+ const A = g - c.top - c.bottom, p = l - c.left - c.right, v = $(g - c[x], A), w = $(l - c[y], p), P = !e.middlewareData.shift;
497
+ let C = v, M = w;
498
+ if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (C = A), P && !f) {
499
+ const O = W(c.left, 0), H = W(c.right, 0), D = W(c.top, 0), F = W(c.bottom, 0);
500
+ i ? M = l - 2 * (O !== 0 || H !== 0 ? O + H : W(c.left, c.right)) : C = g - 2 * (D !== 0 || F !== 0 ? D + F : W(c.top, c.bottom));
499
501
  }
500
- await g({
502
+ await u({
501
503
  ...e,
502
- availableWidth: D,
503
- availableHeight: P
504
+ availableWidth: M,
505
+ availableHeight: C
504
506
  });
505
- const R = await o.getDimensions(m.floating);
506
- return l !== R.width || u !== R.height ? {
507
+ const k = await o.getDimensions(m.floating);
508
+ return l !== k.width || g !== k.height ? {
507
509
  reset: {
508
510
  rects: !0
509
511
  }