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