@profiq/ui 0.1.2 → 0.1.3

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