overview-components 1.0.78 → 1.0.79

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 (49) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -2
  2. package/dist/_virtual/air-datepicker.js +4 -0
  3. package/dist/index.d.ts +56 -11
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +105 -53
  6. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +285 -231
  7. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +48 -47
  8. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +39 -38
  9. package/dist/node_modules/air-datepicker/air-datepicker.js +1147 -0
  10. package/dist/node_modules/air-datepicker/index.es.js +4 -0
  11. package/dist/shared/filter-inputs.js +326 -0
  12. package/dist/shared/lit-case-variables-tab-cell.js +207 -0
  13. package/dist/shared/lit-custom-popper.js +99 -0
  14. package/dist/shared/lit-data-grid-action-buttons-popover.js +258 -0
  15. package/dist/shared/lit-data-grid-density-popover.js +79 -0
  16. package/dist/shared/lit-data-grid-export-popover.js +66 -0
  17. package/dist/shared/lit-data-grid-operators-popover.js +94 -0
  18. package/dist/shared/lit-data-grid-row-actions.js +73 -0
  19. package/dist/shared/lit-date-picker.js +525 -0
  20. package/dist/shared/lit-icon-button.d.ts +1 -1
  21. package/dist/shared/lit-icon-button.d.ts.map +1 -1
  22. package/dist/shared/lit-icon-button.js +91 -0
  23. package/dist/shared/lit-label.js +96 -0
  24. package/dist/shared/lit-loader.d.ts +1 -1
  25. package/dist/shared/lit-loader.d.ts.map +1 -1
  26. package/dist/shared/lit-loader.js +70 -0
  27. package/dist/shared/lit-loading-bar.d.ts +1 -1
  28. package/dist/shared/lit-loading-bar.d.ts.map +1 -1
  29. package/dist/shared/lit-loading-bar.js +94 -0
  30. package/dist/shared/lit-menu-item.d.ts +1 -1
  31. package/dist/shared/lit-menu-item.d.ts.map +1 -1
  32. package/dist/shared/lit-menu-item.js +94 -0
  33. package/dist/shared/lit-modal-body.js +28 -0
  34. package/dist/shared/lit-modal-footer.js +32 -0
  35. package/dist/shared/lit-modal-header.js +39 -0
  36. package/dist/shared/lit-overflow-tooltip.js +85 -0
  37. package/dist/shared/lit-responsive-button.js +84 -0
  38. package/dist/shared/lit-select-field.js +376 -0
  39. package/dist/shared/lit-settings.js +60 -0
  40. package/dist/shared/lit-text-field.d.ts +1 -1
  41. package/dist/shared/lit-text-field.d.ts.map +1 -1
  42. package/dist/shared/lit-text-field.js +205 -0
  43. package/dist/shared/lit-toggle.js +213 -0
  44. package/dist/shared/simple-popper.js +186 -0
  45. package/dist/shared/simple-tooltip.js +1 -1
  46. package/dist/style.css +1 -0
  47. package/dist/utils/localization.js +410 -25
  48. package/dist/utils/utils.js +11 -0
  49. package/package.json +1 -1
@@ -1,269 +1,269 @@
1
- import { evaluate as W, getSide as H, getSideAxis as j, getOppositePlacement as Q, getExpandedPlacements as U, getOppositeAxisPlacements as Z, getAlignmentSides as tt, clamp as _, getAlignment as z, min as Y, max as B, getPaddingObject as G, getAlignmentAxis as J, rectToClientRect as X, getOppositeAxis as et, getAxisLength as K } from "../../utils/dist/floating-ui.utils.js";
2
- function q(a, e, d) {
1
+ import { evaluate as $, getSide as W, getSideAxis as B, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, clamp as I, getAlignment as _, min as z, max as j, getPaddingObject as K, getAlignmentAxis as N, rectToClientRect as X, getOppositeAxis as ie, getAxisLength as Q, sides as se } from "../../utils/dist/floating-ui.utils.js";
2
+ function q(t, e, m) {
3
3
  let {
4
4
  reference: o,
5
- floating: f
6
- } = a;
7
- const n = j(e), c = J(e), r = K(c), g = H(e), x = n === "y", i = o.x + o.width / 2 - f.width / 2, s = o.y + o.height / 2 - f.height / 2, m = o[r] / 2 - f[r] / 2;
8
- let t;
5
+ floating: r
6
+ } = t;
7
+ const n = B(e), s = N(e), f = Q(s), g = W(e), u = n === "y", a = o.x + o.width / 2 - r.width / 2, l = o.y + o.height / 2 - r.height / 2, d = o[f] / 2 - r[f] / 2;
8
+ let i;
9
9
  switch (g) {
10
10
  case "top":
11
- t = {
12
- x: i,
13
- y: o.y - f.height
11
+ i = {
12
+ x: a,
13
+ y: o.y - r.height
14
14
  };
15
15
  break;
16
16
  case "bottom":
17
- t = {
18
- x: i,
17
+ i = {
18
+ x: a,
19
19
  y: o.y + o.height
20
20
  };
21
21
  break;
22
22
  case "right":
23
- t = {
23
+ i = {
24
24
  x: o.x + o.width,
25
- y: s
25
+ y: l
26
26
  };
27
27
  break;
28
28
  case "left":
29
- t = {
30
- x: o.x - f.width,
31
- y: s
29
+ i = {
30
+ x: o.x - r.width,
31
+ y: l
32
32
  };
33
33
  break;
34
34
  default:
35
- t = {
35
+ i = {
36
36
  x: o.x,
37
37
  y: o.y
38
38
  };
39
39
  }
40
- switch (z(e)) {
40
+ switch (_(e)) {
41
41
  case "start":
42
- t[c] -= m * (d && x ? -1 : 1);
42
+ i[s] -= d * (m && u ? -1 : 1);
43
43
  break;
44
44
  case "end":
45
- t[c] += m * (d && x ? -1 : 1);
45
+ i[s] += d * (m && u ? -1 : 1);
46
46
  break;
47
47
  }
48
- return t;
48
+ return i;
49
49
  }
50
- const ot = async (a, e, d) => {
50
+ const le = async (t, e, m) => {
51
51
  const {
52
52
  placement: o = "bottom",
53
- strategy: f = "absolute",
53
+ strategy: r = "absolute",
54
54
  middleware: n = [],
55
- platform: c
56
- } = d, r = n.filter(Boolean), g = await (c.isRTL == null ? void 0 : c.isRTL(e));
57
- let x = await c.getElementRects({
58
- reference: a,
55
+ platform: s
56
+ } = m, f = n.filter(Boolean), g = await (s.isRTL == null ? void 0 : s.isRTL(e));
57
+ let u = await s.getElementRects({
58
+ reference: t,
59
59
  floating: e,
60
- strategy: f
60
+ strategy: r
61
61
  }), {
62
- x: i,
63
- y: s
64
- } = q(x, o, g), m = o, t = {}, l = 0;
65
- for (let u = 0; u < r.length; u++) {
62
+ x: a,
63
+ y: l
64
+ } = q(u, o, g), d = o, i = {}, c = 0;
65
+ for (let x = 0; x < f.length; x++) {
66
66
  const {
67
67
  name: w,
68
- fn: p
69
- } = r[u], {
70
- x: h,
68
+ fn: h
69
+ } = f[x], {
70
+ x: p,
71
71
  y,
72
72
  data: A,
73
73
  reset: v
74
- } = await p({
75
- x: i,
76
- y: s,
74
+ } = await h({
75
+ x: a,
76
+ y: l,
77
77
  initialPlacement: o,
78
- placement: m,
79
- strategy: f,
80
- middlewareData: t,
81
- rects: x,
82
- platform: c,
78
+ placement: d,
79
+ strategy: r,
80
+ middlewareData: i,
81
+ rects: u,
82
+ platform: s,
83
83
  elements: {
84
- reference: a,
84
+ reference: t,
85
85
  floating: e
86
86
  }
87
87
  });
88
- i = h ?? i, s = y ?? s, t = {
89
- ...t,
88
+ a = p ?? a, l = y ?? l, i = {
89
+ ...i,
90
90
  [w]: {
91
- ...t[w],
91
+ ...i[w],
92
92
  ...A
93
93
  }
94
- }, v && l <= 50 && (l++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (x = v.rects === !0 ? await c.getElementRects({
95
- reference: a,
94
+ }, v && c <= 50 && (c++, typeof v == "object" && (v.placement && (d = v.placement), v.rects && (u = v.rects === !0 ? await s.getElementRects({
95
+ reference: t,
96
96
  floating: e,
97
- strategy: f
97
+ strategy: r
98
98
  }) : v.rects), {
99
- x: i,
100
- y: s
101
- } = q(x, m, g)), u = -1);
99
+ x: a,
100
+ y: l
101
+ } = q(u, d, g)), x = -1);
102
102
  }
103
103
  return {
104
- x: i,
105
- y: s,
106
- placement: m,
107
- strategy: f,
108
- middlewareData: t
104
+ x: a,
105
+ y: l,
106
+ placement: d,
107
+ strategy: r,
108
+ middlewareData: i
109
109
  };
110
110
  };
111
- async function I(a, e) {
112
- var d;
111
+ async function Y(t, e) {
112
+ var m;
113
113
  e === void 0 && (e = {});
114
114
  const {
115
115
  x: o,
116
- y: f,
116
+ y: r,
117
117
  platform: n,
118
- rects: c,
119
- elements: r,
118
+ rects: s,
119
+ elements: f,
120
120
  strategy: g
121
- } = a, {
122
- boundary: x = "clippingAncestors",
123
- rootBoundary: i = "viewport",
124
- elementContext: s = "floating",
125
- altBoundary: m = !1,
126
- padding: t = 0
127
- } = W(e, a), l = G(t), w = r[m ? s === "floating" ? "reference" : "floating" : s], p = X(await n.getClippingRect({
128
- element: (d = await (n.isElement == null ? void 0 : n.isElement(w))) == null || d ? w : w.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(r.floating)),
129
- boundary: x,
130
- rootBoundary: i,
121
+ } = t, {
122
+ boundary: u = "clippingAncestors",
123
+ rootBoundary: a = "viewport",
124
+ elementContext: l = "floating",
125
+ altBoundary: d = !1,
126
+ padding: i = 0
127
+ } = $(e, t), c = K(i), w = f[d ? l === "floating" ? "reference" : "floating" : l], h = X(await n.getClippingRect({
128
+ element: (m = await (n.isElement == null ? void 0 : n.isElement(w))) == null || m ? w : w.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(f.floating)),
129
+ boundary: u,
130
+ rootBoundary: a,
131
131
  strategy: g
132
- })), h = s === "floating" ? {
132
+ })), p = l === "floating" ? {
133
133
  x: o,
134
- y: f,
135
- width: c.floating.width,
136
- height: c.floating.height
137
- } : c.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(r.floating)), A = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
134
+ y: r,
135
+ width: s.floating.width,
136
+ height: s.floating.height
137
+ } : s.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(f.floating)), A = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
138
138
  x: 1,
139
139
  y: 1
140
140
  } : {
141
141
  x: 1,
142
142
  y: 1
143
143
  }, v = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
144
- elements: r,
145
- rect: h,
144
+ elements: f,
145
+ rect: p,
146
146
  offsetParent: y,
147
147
  strategy: g
148
- }) : h);
148
+ }) : p);
149
149
  return {
150
- top: (p.top - v.top + l.top) / A.y,
151
- bottom: (v.bottom - p.bottom + l.bottom) / A.y,
152
- left: (p.left - v.left + l.left) / A.x,
153
- right: (v.right - p.right + l.right) / A.x
150
+ top: (h.top - v.top + c.top) / A.y,
151
+ bottom: (v.bottom - h.bottom + c.bottom) / A.y,
152
+ left: (h.left - v.left + c.left) / A.x,
153
+ right: (v.right - h.right + c.right) / A.x
154
154
  };
155
155
  }
156
- const st = (a) => ({
156
+ const ce = (t) => ({
157
157
  name: "arrow",
158
- options: a,
158
+ options: t,
159
159
  async fn(e) {
160
160
  const {
161
- x: d,
161
+ x: m,
162
162
  y: o,
163
- placement: f,
163
+ placement: r,
164
164
  rects: n,
165
- platform: c,
166
- elements: r,
165
+ platform: s,
166
+ elements: f,
167
167
  middlewareData: g
168
168
  } = e, {
169
- element: x,
170
- padding: i = 0
171
- } = W(a, e) || {};
172
- if (x == null)
169
+ element: u,
170
+ padding: a = 0
171
+ } = $(t, e) || {};
172
+ if (u == null)
173
173
  return {};
174
- const s = G(i), m = {
175
- x: d,
174
+ const l = K(a), d = {
175
+ x: m,
176
176
  y: o
177
- }, t = J(f), l = K(t), u = await c.getDimensions(x), w = t === "y", p = w ? "top" : "left", h = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", A = n.reference[l] + n.reference[t] - m[t] - n.floating[l], v = m[t] - n.reference[t], T = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(x));
178
- let P = T ? T[y] : 0;
179
- (!P || !await (c.isElement == null ? void 0 : c.isElement(T))) && (P = r.floating[y] || n.floating[l]);
180
- const k = A / 2 - v / 2, R = P / 2 - u[l] / 2 - 1, b = Y(s[p], R), L = Y(s[h], R), D = b, M = P - u[l] - L, C = P / 2 - u[l] / 2 + k, O = _(D, C, M), $ = !g.arrow && z(f) != null && C !== O && n.reference[l] / 2 - (C < D ? b : L) - u[l] / 2 < 0, E = $ ? C < D ? C - D : C - M : 0;
177
+ }, i = N(r), c = Q(i), x = await s.getDimensions(u), w = i === "y", h = w ? "top" : "left", p = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", A = n.reference[c] + n.reference[i] - d[i] - n.floating[c], v = d[i] - n.reference[i], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
178
+ let O = T ? T[y] : 0;
179
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(T))) && (O = f.floating[y] || n.floating[c]);
180
+ const k = A / 2 - v / 2, R = O / 2 - x[c] / 2 - 1, b = z(l[h], R), L = z(l[p], R), C = b, M = O - x[c] - L, S = O / 2 - x[c] / 2 + k, P = I(C, S, M), V = !g.arrow && _(r) != null && S !== P && n.reference[c] / 2 - (S < C ? b : L) - x[c] / 2 < 0, E = V ? S < C ? S - C : S - M : 0;
181
181
  return {
182
- [t]: m[t] + E,
182
+ [i]: d[i] + E,
183
183
  data: {
184
- [t]: O,
185
- centerOffset: C - O - E,
186
- ...$ && {
184
+ [i]: P,
185
+ centerOffset: S - P - E,
186
+ ...V && {
187
187
  alignmentOffset: E
188
188
  }
189
189
  },
190
- reset: $
190
+ reset: V
191
191
  };
192
192
  }
193
- }), at = function(a) {
194
- return a === void 0 && (a = {}), {
193
+ }), re = function(t) {
194
+ return t === void 0 && (t = {}), {
195
195
  name: "flip",
196
- options: a,
196
+ options: t,
197
197
  async fn(e) {
198
- var d, o;
198
+ var m, o;
199
199
  const {
200
- placement: f,
200
+ placement: r,
201
201
  middlewareData: n,
202
- rects: c,
203
- initialPlacement: r,
202
+ rects: s,
203
+ initialPlacement: f,
204
204
  platform: g,
205
- elements: x
205
+ elements: u
206
206
  } = e, {
207
- mainAxis: i = !0,
208
- crossAxis: s = !0,
209
- fallbackPlacements: m,
210
- fallbackStrategy: t = "bestFit",
211
- fallbackAxisSideDirection: l = "none",
212
- flipAlignment: u = !0,
207
+ mainAxis: a = !0,
208
+ crossAxis: l = !0,
209
+ fallbackPlacements: d,
210
+ fallbackStrategy: i = "bestFit",
211
+ fallbackAxisSideDirection: c = "none",
212
+ flipAlignment: x = !0,
213
213
  ...w
214
- } = W(a, e);
215
- if ((d = n.arrow) != null && d.alignmentOffset)
214
+ } = $(t, e);
215
+ if ((m = n.arrow) != null && m.alignmentOffset)
216
216
  return {};
217
- const p = H(f), h = j(r), y = H(r) === r, A = await (g.isRTL == null ? void 0 : g.isRTL(x.floating)), v = m || (y || !u ? [Q(r)] : U(r)), T = l !== "none";
218
- !m && T && v.push(...Z(r, u, l, A));
219
- const P = [r, ...v], k = await I(e, w), R = [];
217
+ const h = W(r), p = B(f), y = W(f) === f, A = await (g.isRTL == null ? void 0 : g.isRTL(u.floating)), v = d || (y || !x ? [Z(f)] : ee(f)), T = c !== "none";
218
+ !d && T && v.push(...te(f, x, c, A));
219
+ const O = [f, ...v], k = await Y(e, w), R = [];
220
220
  let b = ((o = n.flip) == null ? void 0 : o.overflows) || [];
221
- if (i && R.push(k[p]), s) {
222
- const O = tt(f, c, A);
223
- R.push(k[O[0]], k[O[1]]);
221
+ if (a && R.push(k[h]), l) {
222
+ const P = ne(r, s, A);
223
+ R.push(k[P[0]], k[P[1]]);
224
224
  }
225
225
  if (b = [...b, {
226
- placement: f,
226
+ placement: r,
227
227
  overflows: R
228
- }], !R.every((O) => O <= 0)) {
229
- var L, D;
230
- const O = (((L = n.flip) == null ? void 0 : L.index) || 0) + 1, $ = P[O];
231
- if ($) {
228
+ }], !R.every((P) => P <= 0)) {
229
+ var L, C;
230
+ const P = (((L = n.flip) == null ? void 0 : L.index) || 0) + 1, V = O[P];
231
+ if (V) {
232
232
  var M;
233
- const V = s === "alignment" ? h !== j($) : !1, S = ((M = b[0]) == null ? void 0 : M.overflows[0]) > 0;
234
- if (!V || S)
233
+ const H = l === "alignment" ? p !== B(V) : !1, D = ((M = b[0]) == null ? void 0 : M.overflows[0]) > 0;
234
+ if (!H || D)
235
235
  return {
236
236
  data: {
237
- index: O,
237
+ index: P,
238
238
  overflows: b
239
239
  },
240
240
  reset: {
241
- placement: $
241
+ placement: V
242
242
  }
243
243
  };
244
244
  }
245
- let E = (D = b.filter((V) => V.overflows[0] <= 0).sort((V, S) => V.overflows[1] - S.overflows[1])[0]) == null ? void 0 : D.placement;
245
+ let E = (C = b.filter((H) => H.overflows[0] <= 0).sort((H, D) => H.overflows[1] - D.overflows[1])[0]) == null ? void 0 : C.placement;
246
246
  if (!E)
247
- switch (t) {
247
+ switch (i) {
248
248
  case "bestFit": {
249
- var C;
250
- const V = (C = b.filter((S) => {
249
+ var S;
250
+ const H = (S = b.filter((D) => {
251
251
  if (T) {
252
- const F = j(S.placement);
253
- return F === h || // Create a bias to the `y` side axis due to horizontal
252
+ const F = B(D.placement);
253
+ return F === p || // Create a bias to the `y` side axis due to horizontal
254
254
  // reading directions favoring greater width.
255
255
  F === "y";
256
256
  }
257
257
  return !0;
258
- }).map((S) => [S.placement, S.overflows.filter((F) => F > 0).reduce((F, N) => F + N, 0)]).sort((S, F) => S[1] - F[1])[0]) == null ? void 0 : C[0];
259
- V && (E = V);
258
+ }).map((D) => [D.placement, D.overflows.filter((F) => F > 0).reduce((F, U) => F + U, 0)]).sort((D, F) => D[1] - F[1])[0]) == null ? void 0 : S[0];
259
+ H && (E = H);
260
260
  break;
261
261
  }
262
262
  case "initialPlacement":
263
- E = r;
263
+ E = f;
264
264
  break;
265
265
  }
266
- if (f !== E)
266
+ if (r !== E)
267
267
  return {
268
268
  reset: {
269
269
  placement: E
@@ -274,145 +274,198 @@ const st = (a) => ({
274
274
  }
275
275
  };
276
276
  };
277
- async function nt(a, e) {
277
+ function G(t, e) {
278
+ return {
279
+ top: t.top - e.height,
280
+ right: t.right - e.width,
281
+ bottom: t.bottom - e.height,
282
+ left: t.left - e.width
283
+ };
284
+ }
285
+ function J(t) {
286
+ return se.some((e) => t[e] >= 0);
287
+ }
288
+ const fe = function(t) {
289
+ return t === void 0 && (t = {}), {
290
+ name: "hide",
291
+ options: t,
292
+ async fn(e) {
293
+ const {
294
+ rects: m
295
+ } = e, {
296
+ strategy: o = "referenceHidden",
297
+ ...r
298
+ } = $(t, e);
299
+ switch (o) {
300
+ case "referenceHidden": {
301
+ const n = await Y(e, {
302
+ ...r,
303
+ elementContext: "reference"
304
+ }), s = G(n, m.reference);
305
+ return {
306
+ data: {
307
+ referenceHiddenOffsets: s,
308
+ referenceHidden: J(s)
309
+ }
310
+ };
311
+ }
312
+ case "escaped": {
313
+ const n = await Y(e, {
314
+ ...r,
315
+ altBoundary: !0
316
+ }), s = G(n, m.floating);
317
+ return {
318
+ data: {
319
+ escapedOffsets: s,
320
+ escaped: J(s)
321
+ }
322
+ };
323
+ }
324
+ default:
325
+ return {};
326
+ }
327
+ }
328
+ };
329
+ };
330
+ async function oe(t, e) {
278
331
  const {
279
- placement: d,
332
+ placement: m,
280
333
  platform: o,
281
- elements: f
282
- } = a, n = await (o.isRTL == null ? void 0 : o.isRTL(f.floating)), c = H(d), r = z(d), g = j(d) === "y", x = ["left", "top"].includes(c) ? -1 : 1, i = n && g ? -1 : 1, s = W(e, a);
334
+ elements: r
335
+ } = t, n = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = W(m), f = _(m), g = B(m) === "y", u = ["left", "top"].includes(s) ? -1 : 1, a = n && g ? -1 : 1, l = $(e, t);
283
336
  let {
284
- mainAxis: m,
285
- crossAxis: t,
286
- alignmentAxis: l
287
- } = typeof s == "number" ? {
288
- mainAxis: s,
337
+ mainAxis: d,
338
+ crossAxis: i,
339
+ alignmentAxis: c
340
+ } = typeof l == "number" ? {
341
+ mainAxis: l,
289
342
  crossAxis: 0,
290
343
  alignmentAxis: null
291
344
  } : {
292
- mainAxis: s.mainAxis || 0,
293
- crossAxis: s.crossAxis || 0,
294
- alignmentAxis: s.alignmentAxis
345
+ mainAxis: l.mainAxis || 0,
346
+ crossAxis: l.crossAxis || 0,
347
+ alignmentAxis: l.alignmentAxis
295
348
  };
296
- return r && typeof l == "number" && (t = r === "end" ? l * -1 : l), g ? {
297
- x: t * i,
298
- y: m * x
349
+ return f && typeof c == "number" && (i = f === "end" ? c * -1 : c), g ? {
350
+ x: i * a,
351
+ y: d * u
299
352
  } : {
300
- x: m * x,
301
- y: t * i
353
+ x: d * u,
354
+ y: i * a
302
355
  };
303
356
  }
304
- const lt = function(a) {
305
- return a === void 0 && (a = 0), {
357
+ const de = function(t) {
358
+ return t === void 0 && (t = 0), {
306
359
  name: "offset",
307
- options: a,
360
+ options: t,
308
361
  async fn(e) {
309
- var d, o;
362
+ var m, o;
310
363
  const {
311
- x: f,
364
+ x: r,
312
365
  y: n,
313
- placement: c,
314
- middlewareData: r
315
- } = e, g = await nt(e, a);
316
- return c === ((d = r.offset) == null ? void 0 : d.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
317
- x: f + g.x,
366
+ placement: s,
367
+ middlewareData: f
368
+ } = e, g = await oe(e, t);
369
+ return s === ((m = f.offset) == null ? void 0 : m.placement) && (o = f.arrow) != null && o.alignmentOffset ? {} : {
370
+ x: r + g.x,
318
371
  y: n + g.y,
319
372
  data: {
320
373
  ...g,
321
- placement: c
374
+ placement: s
322
375
  }
323
376
  };
324
377
  }
325
378
  };
326
- }, ct = function(a) {
327
- return a === void 0 && (a = {}), {
379
+ }, me = function(t) {
380
+ return t === void 0 && (t = {}), {
328
381
  name: "shift",
329
- options: a,
382
+ options: t,
330
383
  async fn(e) {
331
384
  const {
332
- x: d,
385
+ x: m,
333
386
  y: o,
334
- placement: f
387
+ placement: r
335
388
  } = e, {
336
389
  mainAxis: n = !0,
337
- crossAxis: c = !1,
338
- limiter: r = {
390
+ crossAxis: s = !1,
391
+ limiter: f = {
339
392
  fn: (w) => {
340
393
  let {
341
- x: p,
342
- y: h
394
+ x: h,
395
+ y: p
343
396
  } = w;
344
397
  return {
345
- x: p,
346
- y: h
398
+ x: h,
399
+ y: p
347
400
  };
348
401
  }
349
402
  },
350
403
  ...g
351
- } = W(a, e), x = {
352
- x: d,
404
+ } = $(t, e), u = {
405
+ x: m,
353
406
  y: o
354
- }, i = await I(e, g), s = j(H(f)), m = et(s);
355
- let t = x[m], l = x[s];
407
+ }, a = await Y(e, g), l = B(W(r)), d = ie(l);
408
+ let i = u[d], c = u[l];
356
409
  if (n) {
357
- const w = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", h = t + i[w], y = t - i[p];
358
- t = _(h, t, y);
410
+ const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", p = i + a[w], y = i - a[h];
411
+ i = I(p, i, y);
359
412
  }
360
- if (c) {
361
- const w = s === "y" ? "top" : "left", p = s === "y" ? "bottom" : "right", h = l + i[w], y = l - i[p];
362
- l = _(h, l, y);
413
+ if (s) {
414
+ const w = l === "y" ? "top" : "left", h = l === "y" ? "bottom" : "right", p = c + a[w], y = c - a[h];
415
+ c = I(p, c, y);
363
416
  }
364
- const u = r.fn({
417
+ const x = f.fn({
365
418
  ...e,
366
- [m]: t,
367
- [s]: l
419
+ [d]: i,
420
+ [l]: c
368
421
  });
369
422
  return {
370
- ...u,
423
+ ...x,
371
424
  data: {
372
- x: u.x - d,
373
- y: u.y - o,
425
+ x: x.x - m,
426
+ y: x.y - o,
374
427
  enabled: {
375
- [m]: n,
376
- [s]: c
428
+ [d]: n,
429
+ [l]: s
377
430
  }
378
431
  }
379
432
  };
380
433
  }
381
434
  };
382
- }, rt = function(a) {
383
- return a === void 0 && (a = {}), {
435
+ }, ge = function(t) {
436
+ return t === void 0 && (t = {}), {
384
437
  name: "size",
385
- options: a,
438
+ options: t,
386
439
  async fn(e) {
387
- var d, o;
440
+ var m, o;
388
441
  const {
389
- placement: f,
442
+ placement: r,
390
443
  rects: n,
391
- platform: c,
392
- elements: r
444
+ platform: s,
445
+ elements: f
393
446
  } = e, {
394
447
  apply: g = () => {
395
448
  },
396
- ...x
397
- } = W(a, e), i = await I(e, x), s = H(f), m = z(f), t = j(f) === "y", {
398
- width: l,
399
- height: u
449
+ ...u
450
+ } = $(t, e), a = await Y(e, u), l = W(r), d = _(r), i = B(r) === "y", {
451
+ width: c,
452
+ height: x
400
453
  } = n.floating;
401
- let w, p;
402
- s === "top" || s === "bottom" ? (w = s, p = m === (await (c.isRTL == null ? void 0 : c.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (p = s, w = m === "end" ? "top" : "bottom");
403
- const h = u - i.top - i.bottom, y = l - i.left - i.right, A = Y(u - i[w], h), v = Y(l - i[p], y), T = !e.middlewareData.shift;
404
- let P = A, k = v;
405
- if ((d = e.middlewareData.shift) != null && d.enabled.x && (k = y), (o = e.middlewareData.shift) != null && o.enabled.y && (P = h), T && !m) {
406
- const b = B(i.left, 0), L = B(i.right, 0), D = B(i.top, 0), M = B(i.bottom, 0);
407
- t ? k = l - 2 * (b !== 0 || L !== 0 ? b + L : B(i.left, i.right)) : P = u - 2 * (D !== 0 || M !== 0 ? D + M : B(i.top, i.bottom));
454
+ let w, h;
455
+ l === "top" || l === "bottom" ? (w = l, h = d === (await (s.isRTL == null ? void 0 : s.isRTL(f.floating)) ? "start" : "end") ? "left" : "right") : (h = l, w = d === "end" ? "top" : "bottom");
456
+ const p = x - a.top - a.bottom, y = c - a.left - a.right, A = z(x - a[w], p), v = z(c - a[h], y), T = !e.middlewareData.shift;
457
+ let O = A, k = v;
458
+ if ((m = e.middlewareData.shift) != null && m.enabled.x && (k = y), (o = e.middlewareData.shift) != null && o.enabled.y && (O = p), T && !d) {
459
+ const b = j(a.left, 0), L = j(a.right, 0), C = j(a.top, 0), M = j(a.bottom, 0);
460
+ i ? k = c - 2 * (b !== 0 || L !== 0 ? b + L : j(a.left, a.right)) : O = x - 2 * (C !== 0 || M !== 0 ? C + M : j(a.top, a.bottom));
408
461
  }
409
462
  await g({
410
463
  ...e,
411
464
  availableWidth: k,
412
- availableHeight: P
465
+ availableHeight: O
413
466
  });
414
- const R = await c.getDimensions(r.floating);
415
- return l !== R.width || u !== R.height ? {
467
+ const R = await s.getDimensions(f.floating);
468
+ return c !== R.width || x !== R.height ? {
416
469
  reset: {
417
470
  rects: !0
418
471
  }
@@ -421,12 +474,13 @@ const lt = function(a) {
421
474
  };
422
475
  };
423
476
  export {
424
- st as arrow,
425
- ot as computePosition,
426
- I as detectOverflow,
427
- at as flip,
428
- lt as offset,
477
+ ce as arrow,
478
+ le as computePosition,
479
+ Y as detectOverflow,
480
+ re as flip,
481
+ fe as hide,
482
+ de as offset,
429
483
  X as rectToClientRect,
430
- ct as shift,
431
- rt as size
484
+ me as shift,
485
+ ge as size
432
486
  };