@caipira/tamandua 0.0.58 → 0.0.60

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 (48) hide show
  1. package/dist/Avatar.js +2 -2
  2. package/dist/{Avatar.vue_vue_type_script_setup_true_lang-D7NdR9hu.js → Avatar.vue_vue_type_script_setup_true_lang-BbcM5CB3.js} +1 -1
  3. package/dist/{Button-A0bEGvjL.js → Button-uTiKL1_J.js} +2 -2
  4. package/dist/Button.js +2 -2
  5. package/dist/ChartTreemap.js +2 -2
  6. package/dist/ChartTreemap.vue_vue_type_script_setup_true_lang-B7eDxuIH.js +309 -0
  7. package/dist/GraphyPrice.js +2 -2
  8. package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-BDYxfzF6.js → GraphyPrice.vue_vue_type_script_setup_true_lang-DI2x-MAS.js} +1 -1
  9. package/dist/Icon.js +2 -2
  10. package/dist/{Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js → Icon.vue_vue_type_script_setup_true_lang-CDJweTzy.js} +1 -1
  11. package/dist/InputSelect.js +2 -2
  12. package/dist/{InputSelect.vue_vue_type_script_setup_true_lang-Hhni6iWH.js → InputSelect.vue_vue_type_script_setup_true_lang-DgMRjecc.js} +1 -1
  13. package/dist/Link.js +2 -2
  14. package/dist/{Link.vue_vue_type_script_setup_true_lang-BE-Gh_jJ.js → Link.vue_vue_type_script_setup_true_lang-DIzaFPvW.js} +1 -1
  15. package/dist/Popconfirm.js +2 -2
  16. package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-D67BalwA.js → Popconfirm.vue_vue_type_script_setup_true_lang-CQJc0gL_.js} +1 -1
  17. package/dist/Popover.js +2 -2
  18. package/dist/Popover.vue_vue_type_script_setup_true_lang-MaJDdAe0.js +71 -0
  19. package/dist/Tag.js +2 -2
  20. package/dist/{Tag.vue_vue_type_script_setup_true_lang-ChaIzjzP.js → Tag.vue_vue_type_script_setup_true_lang-D7gxjn91.js} +1 -1
  21. package/dist/Toast.js +2 -2
  22. package/dist/{Toast.vue_vue_type_script_setup_true_lang--bDaVOod.js → Toast.vue_vue_type_script_setup_true_lang-xJF3jtka.js} +1 -1
  23. package/dist/components.js +11 -11
  24. package/dist/enums.js +1 -1
  25. package/dist/floating-ui.vue-B5QcGNjh.js +1018 -0
  26. package/dist/{plugin-BShPzL82.js → plugin-6ziw5jJj.js} +1 -1
  27. package/dist/{plugin-BE_a-6l3.js → plugin-B6qqYLZU.js} +1 -1
  28. package/dist/{plugin-CEByTREY.js → plugin-Bw-AW29_.js} +1 -1
  29. package/dist/{plugin-CdotHNi-.js → plugin-CGCl2Tuy.js} +1 -1
  30. package/dist/{plugin-BcpHjv9l.js → plugin-D3ADZgWc.js} +1 -1
  31. package/dist/{plugin-D4x3uASg.js → plugin-D8EMKVQ9.js} +1 -1
  32. package/dist/{plugin-DNwjBl_u.js → plugin-DqD4mnko.js} +1 -1
  33. package/dist/{plugin-BfJHkHAS.js → plugin-TONwKALZ.js} +1 -1
  34. package/dist/{plugin-CGE6W117.js → plugin-aR9suX-A.js} +1 -1
  35. package/dist/{plugin-DyFQY_0q.js → plugin-fGlPPiqA.js} +1 -1
  36. package/dist/{plugin-DKFvNBEz.js → plugin-hcORPz_I.js} +1 -1
  37. package/dist/{plugins-UNYdIrpm.js → plugins-CpDwnGUh.js} +20 -20
  38. package/dist/plugins.js +20 -20
  39. package/dist/tamandua.js +1 -1
  40. package/dist/types/components/ChartTreemap/ChartTreemap.story.d.ts +29 -3
  41. package/dist/types/components/ChartTreemap/ChartTreemap.vue.d.ts +6 -1
  42. package/dist/types/components/ChartTreemap/types.d.ts +8 -3
  43. package/dist/types/components/InputSelect/InputSelect.vue.d.ts +9 -9
  44. package/dist/types/components/Popover/Popover.vue.d.ts +9 -9
  45. package/dist/{ui-J-lhC9qd.js → ui-BSiRZzeZ.js} +2 -2
  46. package/package.json +1 -1
  47. package/dist/ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPutlk.js +0 -280
  48. package/dist/Popover.vue_vue_type_script_setup_true_lang-DP4SOSib.js +0 -987
@@ -1,987 +0,0 @@
1
- import { computed as T, unref as F, ref as M, shallowRef as Tt, watch as Q, getCurrentScope as Lt, onScopeDispose as St, shallowReadonly as V, defineComponent as Dt, mergeModels as Mt, useModel as Bt, onBeforeMount as kt, onBeforeUnmount as Wt, openBlock as st, createElementBlock as lt, renderSlot as ct, normalizeProps as at, guardReactiveProps as ft, normalizeStyle as Pt, normalizeClass as Vt, createCommentVNode as Ft } from "vue";
2
- import { u as _t } from "./useDomHelpers-CGVrQd35.js";
3
- import { d as Nt, E as $t } from "./ui-J-lhC9qd.js";
4
- const N = Math.min, E = Math.max, q = Math.round, U = Math.floor, B = (t) => ({
5
- x: t,
6
- y: t
7
- });
8
- function ut(t, e, n) {
9
- return E(t, N(e, n));
10
- }
11
- function G(t, e) {
12
- return typeof t == "function" ? t(e) : t;
13
- }
14
- function j(t) {
15
- return t.split("-")[0];
16
- }
17
- function tt(t) {
18
- return t.split("-")[1];
19
- }
20
- function yt(t) {
21
- return t === "x" ? "y" : "x";
22
- }
23
- function zt(t) {
24
- return t === "y" ? "height" : "width";
25
- }
26
- function X(t) {
27
- return ["top", "bottom"].includes(j(t)) ? "y" : "x";
28
- }
29
- function Ht(t) {
30
- return yt(X(t));
31
- }
32
- function It(t) {
33
- return {
34
- top: 0,
35
- right: 0,
36
- bottom: 0,
37
- left: 0,
38
- ...t
39
- };
40
- }
41
- function jt(t) {
42
- return typeof t != "number" ? It(t) : {
43
- top: t,
44
- right: t,
45
- bottom: t,
46
- left: t
47
- };
48
- }
49
- function K(t) {
50
- const {
51
- x: e,
52
- y: n,
53
- width: o,
54
- height: i
55
- } = t;
56
- return {
57
- width: o,
58
- height: i,
59
- top: n,
60
- left: e,
61
- right: e + o,
62
- bottom: n + i,
63
- x: e,
64
- y: n
65
- };
66
- }
67
- function dt(t, e, n) {
68
- let {
69
- reference: o,
70
- floating: i
71
- } = t;
72
- const l = X(e), r = Ht(e), c = zt(r), s = j(e), a = l === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[c] / 2 - i[c] / 2;
73
- let u;
74
- switch (s) {
75
- case "top":
76
- u = {
77
- x: f,
78
- y: o.y - i.height
79
- };
80
- break;
81
- case "bottom":
82
- u = {
83
- x: f,
84
- y: o.y + o.height
85
- };
86
- break;
87
- case "right":
88
- u = {
89
- x: o.x + o.width,
90
- y: d
91
- };
92
- break;
93
- case "left":
94
- u = {
95
- x: o.x - i.width,
96
- y: d
97
- };
98
- break;
99
- default:
100
- u = {
101
- x: o.x,
102
- y: o.y
103
- };
104
- }
105
- switch (tt(e)) {
106
- case "start":
107
- u[r] -= h * (n && a ? -1 : 1);
108
- break;
109
- case "end":
110
- u[r] += h * (n && a ? -1 : 1);
111
- break;
112
- }
113
- return u;
114
- }
115
- const Xt = async (t, e, n) => {
116
- const {
117
- placement: o = "bottom",
118
- strategy: i = "absolute",
119
- middleware: l = [],
120
- platform: r
121
- } = n, c = l.filter(Boolean), s = await (r.isRTL == null ? void 0 : r.isRTL(e));
122
- let a = await r.getElementRects({
123
- reference: t,
124
- floating: e,
125
- strategy: i
126
- }), {
127
- x: f,
128
- y: d
129
- } = dt(a, o, s), h = o, u = {}, m = 0;
130
- for (let p = 0; p < c.length; p++) {
131
- const {
132
- name: y,
133
- fn: g
134
- } = c[p], {
135
- x: w,
136
- y: v,
137
- data: C,
138
- reset: b
139
- } = await g({
140
- x: f,
141
- y: d,
142
- initialPlacement: o,
143
- placement: h,
144
- strategy: i,
145
- middlewareData: u,
146
- rects: a,
147
- platform: r,
148
- elements: {
149
- reference: t,
150
- floating: e
151
- }
152
- });
153
- f = w ?? f, d = v ?? d, u = {
154
- ...u,
155
- [y]: {
156
- ...u[y],
157
- ...C
158
- }
159
- }, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (h = b.placement), b.rects && (a = b.rects === !0 ? await r.getElementRects({
160
- reference: t,
161
- floating: e,
162
- strategy: i
163
- }) : b.rects), {
164
- x: f,
165
- y: d
166
- } = dt(a, h, s)), p = -1);
167
- }
168
- return {
169
- x: f,
170
- y: d,
171
- placement: h,
172
- strategy: i,
173
- middlewareData: u
174
- };
175
- };
176
- async function vt(t, e) {
177
- var n;
178
- e === void 0 && (e = {});
179
- const {
180
- x: o,
181
- y: i,
182
- platform: l,
183
- rects: r,
184
- elements: c,
185
- strategy: s
186
- } = t, {
187
- boundary: a = "clippingAncestors",
188
- rootBoundary: f = "viewport",
189
- elementContext: d = "floating",
190
- altBoundary: h = !1,
191
- padding: u = 0
192
- } = G(e, t), m = jt(u), y = c[h ? d === "floating" ? "reference" : "floating" : d], g = K(await l.getClippingRect({
193
- element: (n = await (l.isElement == null ? void 0 : l.isElement(y))) == null || n ? y : y.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(c.floating)),
194
- boundary: a,
195
- rootBoundary: f,
196
- strategy: s
197
- })), w = d === "floating" ? {
198
- x: o,
199
- y: i,
200
- width: r.floating.width,
201
- height: r.floating.height
202
- } : r.reference, v = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(c.floating)), C = await (l.isElement == null ? void 0 : l.isElement(v)) ? await (l.getScale == null ? void 0 : l.getScale(v)) || {
203
- x: 1,
204
- y: 1
205
- } : {
206
- x: 1,
207
- y: 1
208
- }, b = K(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
209
- elements: c,
210
- rect: w,
211
- offsetParent: v,
212
- strategy: s
213
- }) : w);
214
- return {
215
- top: (g.top - b.top + m.top) / C.y,
216
- bottom: (b.bottom - g.bottom + m.bottom) / C.y,
217
- left: (g.left - b.left + m.left) / C.x,
218
- right: (b.right - g.right + m.right) / C.x
219
- };
220
- }
221
- async function Yt(t, e) {
222
- const {
223
- placement: n,
224
- platform: o,
225
- elements: i
226
- } = t, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = j(n), c = tt(n), s = X(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, f = l && s ? -1 : 1, d = G(e, t);
227
- let {
228
- mainAxis: h,
229
- crossAxis: u,
230
- alignmentAxis: m
231
- } = typeof d == "number" ? {
232
- mainAxis: d,
233
- crossAxis: 0,
234
- alignmentAxis: null
235
- } : {
236
- mainAxis: 0,
237
- crossAxis: 0,
238
- alignmentAxis: null,
239
- ...d
240
- };
241
- return c && typeof m == "number" && (u = c === "end" ? m * -1 : m), s ? {
242
- x: u * f,
243
- y: h * a
244
- } : {
245
- x: h * a,
246
- y: u * f
247
- };
248
- }
249
- const Ut = function(t) {
250
- return t === void 0 && (t = 0), {
251
- name: "offset",
252
- options: t,
253
- async fn(e) {
254
- var n, o;
255
- const {
256
- x: i,
257
- y: l,
258
- placement: r,
259
- middlewareData: c
260
- } = e, s = await Yt(e, t);
261
- return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
262
- x: i + s.x,
263
- y: l + s.y,
264
- data: {
265
- ...s,
266
- placement: r
267
- }
268
- };
269
- }
270
- };
271
- }, qt = function(t) {
272
- return t === void 0 && (t = {}), {
273
- name: "shift",
274
- options: t,
275
- async fn(e) {
276
- const {
277
- x: n,
278
- y: o,
279
- placement: i
280
- } = e, {
281
- mainAxis: l = !0,
282
- crossAxis: r = !1,
283
- limiter: c = {
284
- fn: (y) => {
285
- let {
286
- x: g,
287
- y: w
288
- } = y;
289
- return {
290
- x: g,
291
- y: w
292
- };
293
- }
294
- },
295
- ...s
296
- } = G(t, e), a = {
297
- x: n,
298
- y: o
299
- }, f = await vt(e, s), d = X(j(i)), h = yt(d);
300
- let u = a[h], m = a[d];
301
- if (l) {
302
- const y = h === "y" ? "top" : "left", g = h === "y" ? "bottom" : "right", w = u + f[y], v = u - f[g];
303
- u = ut(w, u, v);
304
- }
305
- if (r) {
306
- const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", w = m + f[y], v = m - f[g];
307
- m = ut(w, m, v);
308
- }
309
- const p = c.fn({
310
- ...e,
311
- [h]: u,
312
- [d]: m
313
- });
314
- return {
315
- ...p,
316
- data: {
317
- x: p.x - n,
318
- y: p.y - o
319
- }
320
- };
321
- }
322
- };
323
- }, Kt = function(t) {
324
- return t === void 0 && (t = {}), {
325
- name: "size",
326
- options: t,
327
- async fn(e) {
328
- const {
329
- placement: n,
330
- rects: o,
331
- platform: i,
332
- elements: l
333
- } = e, {
334
- apply: r = () => {
335
- },
336
- ...c
337
- } = G(t, e), s = await vt(e, c), a = j(n), f = tt(n), d = X(n) === "y", {
338
- width: h,
339
- height: u
340
- } = o.floating;
341
- let m, p;
342
- a === "top" || a === "bottom" ? (m = a, p = f === (await (i.isRTL == null ? void 0 : i.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (p = a, m = f === "end" ? "top" : "bottom");
343
- const y = u - s[m], g = h - s[p], w = !e.middlewareData.shift;
344
- let v = y, C = g;
345
- if (d) {
346
- const R = h - s.left - s.right;
347
- C = f || w ? N(g, R) : R;
348
- } else {
349
- const R = u - s.top - s.bottom;
350
- v = f || w ? N(y, R) : R;
351
- }
352
- if (w && !f) {
353
- const R = E(s.left, 0), x = E(s.right, 0), z = E(s.top, 0), H = E(s.bottom, 0);
354
- d ? C = h - 2 * (R !== 0 || x !== 0 ? R + x : E(s.left, s.right)) : v = u - 2 * (z !== 0 || H !== 0 ? z + H : E(s.top, s.bottom));
355
- }
356
- await r({
357
- ...e,
358
- availableWidth: C,
359
- availableHeight: v
360
- });
361
- const b = await i.getDimensions(l.floating);
362
- return h !== b.width || u !== b.height ? {
363
- reset: {
364
- rects: !0
365
- }
366
- } : {};
367
- }
368
- };
369
- };
370
- function P(t) {
371
- return et(t) ? (t.nodeName || "").toLowerCase() : "#document";
372
- }
373
- function O(t) {
374
- var e;
375
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
376
- }
377
- function D(t) {
378
- var e;
379
- return (e = (et(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
380
- }
381
- function et(t) {
382
- return t instanceof Node || t instanceof O(t).Node;
383
- }
384
- function L(t) {
385
- return t instanceof Element || t instanceof O(t).Element;
386
- }
387
- function S(t) {
388
- return t instanceof HTMLElement || t instanceof O(t).HTMLElement;
389
- }
390
- function mt(t) {
391
- return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
392
- }
393
- function Y(t) {
394
- const {
395
- overflow: e,
396
- overflowX: n,
397
- overflowY: o,
398
- display: i
399
- } = A(t);
400
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
401
- }
402
- function Gt(t) {
403
- return ["table", "td", "th"].includes(P(t));
404
- }
405
- function nt(t) {
406
- const e = ot(), n = A(t);
407
- return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
408
- }
409
- function Jt(t) {
410
- let e = k(t);
411
- for (; S(e) && !$(e); ) {
412
- if (nt(e))
413
- return e;
414
- e = k(e);
415
- }
416
- return null;
417
- }
418
- function ot() {
419
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
420
- }
421
- function $(t) {
422
- return ["html", "body", "#document"].includes(P(t));
423
- }
424
- function A(t) {
425
- return O(t).getComputedStyle(t);
426
- }
427
- function J(t) {
428
- return L(t) ? {
429
- scrollLeft: t.scrollLeft,
430
- scrollTop: t.scrollTop
431
- } : {
432
- scrollLeft: t.pageXOffset,
433
- scrollTop: t.pageYOffset
434
- };
435
- }
436
- function k(t) {
437
- if (P(t) === "html")
438
- return t;
439
- const e = (
440
- // Step into the shadow DOM of the parent of a slotted node.
441
- t.assignedSlot || // DOM Element detected.
442
- t.parentNode || // ShadowRoot detected.
443
- mt(t) && t.host || // Fallback.
444
- D(t)
445
- );
446
- return mt(e) ? e.host : e;
447
- }
448
- function xt(t) {
449
- const e = k(t);
450
- return $(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : S(e) && Y(e) ? e : xt(e);
451
- }
452
- function I(t, e, n) {
453
- var o;
454
- e === void 0 && (e = []), n === void 0 && (n = !0);
455
- const i = xt(t), l = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = O(i);
456
- return l ? e.concat(r, r.visualViewport || [], Y(i) ? i : [], r.frameElement && n ? I(r.frameElement) : []) : e.concat(i, I(i, [], n));
457
- }
458
- function bt(t) {
459
- const e = A(t);
460
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
461
- const i = S(t), l = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = q(n) !== l || q(o) !== r;
462
- return c && (n = l, o = r), {
463
- width: n,
464
- height: o,
465
- $: c
466
- };
467
- }
468
- function it(t) {
469
- return L(t) ? t : t.contextElement;
470
- }
471
- function _(t) {
472
- const e = it(t);
473
- if (!S(e))
474
- return B(1);
475
- const n = e.getBoundingClientRect(), {
476
- width: o,
477
- height: i,
478
- $: l
479
- } = bt(e);
480
- let r = (l ? q(n.width) : n.width) / o, c = (l ? q(n.height) : n.height) / i;
481
- return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
482
- x: r,
483
- y: c
484
- };
485
- }
486
- const Qt = /* @__PURE__ */ B(0);
487
- function Ct(t) {
488
- const e = O(t);
489
- return !ot() || !e.visualViewport ? Qt : {
490
- x: e.visualViewport.offsetLeft,
491
- y: e.visualViewport.offsetTop
492
- };
493
- }
494
- function Zt(t, e, n) {
495
- return e === void 0 && (e = !1), !n || e && n !== O(t) ? !1 : e;
496
- }
497
- function W(t, e, n, o) {
498
- e === void 0 && (e = !1), n === void 0 && (n = !1);
499
- const i = t.getBoundingClientRect(), l = it(t);
500
- let r = B(1);
501
- e && (o ? L(o) && (r = _(o)) : r = _(t));
502
- const c = Zt(l, n, o) ? Ct(l) : B(0);
503
- let s = (i.left + c.x) / r.x, a = (i.top + c.y) / r.y, f = i.width / r.x, d = i.height / r.y;
504
- if (l) {
505
- const h = O(l), u = o && L(o) ? O(o) : o;
506
- let m = h, p = m.frameElement;
507
- for (; p && o && u !== m; ) {
508
- const y = _(p), g = p.getBoundingClientRect(), w = A(p), v = g.left + (p.clientLeft + parseFloat(w.paddingLeft)) * y.x, C = g.top + (p.clientTop + parseFloat(w.paddingTop)) * y.y;
509
- s *= y.x, a *= y.y, f *= y.x, d *= y.y, s += v, a += C, m = O(p), p = m.frameElement;
510
- }
511
- }
512
- return K({
513
- width: f,
514
- height: d,
515
- x: s,
516
- y: a
517
- });
518
- }
519
- const te = [":popover-open", ":modal"];
520
- function rt(t) {
521
- return te.some((e) => {
522
- try {
523
- return t.matches(e);
524
- } catch {
525
- return !1;
526
- }
527
- });
528
- }
529
- function ee(t) {
530
- let {
531
- elements: e,
532
- rect: n,
533
- offsetParent: o,
534
- strategy: i
535
- } = t;
536
- const l = i === "fixed", r = D(o), c = e ? rt(e.floating) : !1;
537
- if (o === r || c && l)
538
- return n;
539
- let s = {
540
- scrollLeft: 0,
541
- scrollTop: 0
542
- }, a = B(1);
543
- const f = B(0), d = S(o);
544
- if ((d || !d && !l) && ((P(o) !== "body" || Y(r)) && (s = J(o)), S(o))) {
545
- const h = W(o);
546
- a = _(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
547
- }
548
- return {
549
- width: n.width * a.x,
550
- height: n.height * a.y,
551
- x: n.x * a.x - s.scrollLeft * a.x + f.x,
552
- y: n.y * a.y - s.scrollTop * a.y + f.y
553
- };
554
- }
555
- function ne(t) {
556
- return Array.from(t.getClientRects());
557
- }
558
- function Rt(t) {
559
- return W(D(t)).left + J(t).scrollLeft;
560
- }
561
- function oe(t) {
562
- const e = D(t), n = J(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), l = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
563
- let r = -n.scrollLeft + Rt(t);
564
- const c = -n.scrollTop;
565
- return A(o).direction === "rtl" && (r += E(e.clientWidth, o.clientWidth) - i), {
566
- width: i,
567
- height: l,
568
- x: r,
569
- y: c
570
- };
571
- }
572
- function ie(t, e) {
573
- const n = O(t), o = D(t), i = n.visualViewport;
574
- let l = o.clientWidth, r = o.clientHeight, c = 0, s = 0;
575
- if (i) {
576
- l = i.width, r = i.height;
577
- const a = ot();
578
- (!a || a && e === "fixed") && (c = i.offsetLeft, s = i.offsetTop);
579
- }
580
- return {
581
- width: l,
582
- height: r,
583
- x: c,
584
- y: s
585
- };
586
- }
587
- function re(t, e) {
588
- const n = W(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, l = S(t) ? _(t) : B(1), r = t.clientWidth * l.x, c = t.clientHeight * l.y, s = i * l.x, a = o * l.y;
589
- return {
590
- width: r,
591
- height: c,
592
- x: s,
593
- y: a
594
- };
595
- }
596
- function ht(t, e, n) {
597
- let o;
598
- if (e === "viewport")
599
- o = ie(t, n);
600
- else if (e === "document")
601
- o = oe(D(t));
602
- else if (L(e))
603
- o = re(e, n);
604
- else {
605
- const i = Ct(t);
606
- o = {
607
- ...e,
608
- x: e.x - i.x,
609
- y: e.y - i.y
610
- };
611
- }
612
- return K(o);
613
- }
614
- function Et(t, e) {
615
- const n = k(t);
616
- return n === e || !L(n) || $(n) ? !1 : A(n).position === "fixed" || Et(n, e);
617
- }
618
- function se(t, e) {
619
- const n = e.get(t);
620
- if (n)
621
- return n;
622
- let o = I(t, [], !1).filter((c) => L(c) && P(c) !== "body"), i = null;
623
- const l = A(t).position === "fixed";
624
- let r = l ? k(t) : t;
625
- for (; L(r) && !$(r); ) {
626
- const c = A(r), s = nt(r);
627
- !s && c.position === "fixed" && (i = null), (l ? !s && !i : !s && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Y(r) && !s && Et(t, r)) ? o = o.filter((f) => f !== r) : i = c, r = k(r);
628
- }
629
- return e.set(t, o), o;
630
- }
631
- function le(t) {
632
- let {
633
- element: e,
634
- boundary: n,
635
- rootBoundary: o,
636
- strategy: i
637
- } = t;
638
- const r = [...n === "clippingAncestors" ? rt(e) ? [] : se(e, this._c) : [].concat(n), o], c = r[0], s = r.reduce((a, f) => {
639
- const d = ht(e, f, i);
640
- return a.top = E(d.top, a.top), a.right = N(d.right, a.right), a.bottom = N(d.bottom, a.bottom), a.left = E(d.left, a.left), a;
641
- }, ht(e, c, i));
642
- return {
643
- width: s.right - s.left,
644
- height: s.bottom - s.top,
645
- x: s.left,
646
- y: s.top
647
- };
648
- }
649
- function ce(t) {
650
- const {
651
- width: e,
652
- height: n
653
- } = bt(t);
654
- return {
655
- width: e,
656
- height: n
657
- };
658
- }
659
- function ae(t, e, n) {
660
- const o = S(e), i = D(e), l = n === "fixed", r = W(t, !0, l, e);
661
- let c = {
662
- scrollLeft: 0,
663
- scrollTop: 0
664
- };
665
- const s = B(0);
666
- if (o || !o && !l)
667
- if ((P(e) !== "body" || Y(i)) && (c = J(e)), o) {
668
- const d = W(e, !0, l, e);
669
- s.x = d.x + e.clientLeft, s.y = d.y + e.clientTop;
670
- } else
671
- i && (s.x = Rt(i));
672
- const a = r.left + c.scrollLeft - s.x, f = r.top + c.scrollTop - s.y;
673
- return {
674
- x: a,
675
- y: f,
676
- width: r.width,
677
- height: r.height
678
- };
679
- }
680
- function Z(t) {
681
- return A(t).position === "static";
682
- }
683
- function pt(t, e) {
684
- return !S(t) || A(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
685
- }
686
- function Ot(t, e) {
687
- const n = O(t);
688
- if (rt(t))
689
- return n;
690
- if (!S(t)) {
691
- let i = k(t);
692
- for (; i && !$(i); ) {
693
- if (L(i) && !Z(i))
694
- return i;
695
- i = k(i);
696
- }
697
- return n;
698
- }
699
- let o = pt(t, e);
700
- for (; o && Gt(o) && Z(o); )
701
- o = pt(o, e);
702
- return o && $(o) && Z(o) && !nt(o) ? n : o || Jt(t) || n;
703
- }
704
- const fe = async function(t) {
705
- const e = this.getOffsetParent || Ot, n = this.getDimensions, o = await n(t.floating);
706
- return {
707
- reference: ae(t.reference, await e(t.floating), t.strategy),
708
- floating: {
709
- x: 0,
710
- y: 0,
711
- width: o.width,
712
- height: o.height
713
- }
714
- };
715
- };
716
- function ue(t) {
717
- return A(t).direction === "rtl";
718
- }
719
- const de = {
720
- convertOffsetParentRelativeRectToViewportRelativeRect: ee,
721
- getDocumentElement: D,
722
- getClippingRect: le,
723
- getOffsetParent: Ot,
724
- getElementRects: fe,
725
- getClientRects: ne,
726
- getDimensions: ce,
727
- getScale: _,
728
- isElement: L,
729
- isRTL: ue
730
- };
731
- function me(t, e) {
732
- let n = null, o;
733
- const i = D(t);
734
- function l() {
735
- var c;
736
- clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
737
- }
738
- function r(c, s) {
739
- c === void 0 && (c = !1), s === void 0 && (s = 1), l();
740
- const {
741
- left: a,
742
- top: f,
743
- width: d,
744
- height: h
745
- } = t.getBoundingClientRect();
746
- if (c || e(), !d || !h)
747
- return;
748
- const u = U(f), m = U(i.clientWidth - (a + d)), p = U(i.clientHeight - (f + h)), y = U(a), w = {
749
- rootMargin: -u + "px " + -m + "px " + -p + "px " + -y + "px",
750
- threshold: E(0, N(1, s)) || 1
751
- };
752
- let v = !0;
753
- function C(b) {
754
- const R = b[0].intersectionRatio;
755
- if (R !== s) {
756
- if (!v)
757
- return r();
758
- R ? r(!1, R) : o = setTimeout(() => {
759
- r(!1, 1e-7);
760
- }, 1e3);
761
- }
762
- v = !1;
763
- }
764
- try {
765
- n = new IntersectionObserver(C, {
766
- ...w,
767
- // Handle <iframe>s
768
- root: i.ownerDocument
769
- });
770
- } catch {
771
- n = new IntersectionObserver(C, w);
772
- }
773
- n.observe(t);
774
- }
775
- return r(!0), l;
776
- }
777
- function he(t, e, n, o) {
778
- o === void 0 && (o = {});
779
- const {
780
- ancestorScroll: i = !0,
781
- ancestorResize: l = !0,
782
- elementResize: r = typeof ResizeObserver == "function",
783
- layoutShift: c = typeof IntersectionObserver == "function",
784
- animationFrame: s = !1
785
- } = o, a = it(t), f = i || l ? [...a ? I(a) : [], ...I(e)] : [];
786
- f.forEach((g) => {
787
- i && g.addEventListener("scroll", n, {
788
- passive: !0
789
- }), l && g.addEventListener("resize", n);
790
- });
791
- const d = a && c ? me(a, n) : null;
792
- let h = -1, u = null;
793
- r && (u = new ResizeObserver((g) => {
794
- let [w] = g;
795
- w && w.target === a && u && (u.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
796
- var v;
797
- (v = u) == null || v.observe(e);
798
- })), n();
799
- }), a && !s && u.observe(a), u.observe(e));
800
- let m, p = s ? W(t) : null;
801
- s && y();
802
- function y() {
803
- const g = W(t);
804
- p && (g.x !== p.x || g.y !== p.y || g.width !== p.width || g.height !== p.height) && n(), p = g, m = requestAnimationFrame(y);
805
- }
806
- return n(), () => {
807
- var g;
808
- f.forEach((w) => {
809
- i && w.removeEventListener("scroll", n), l && w.removeEventListener("resize", n);
810
- }), d?.(), (g = u) == null || g.disconnect(), u = null, s && cancelAnimationFrame(m);
811
- };
812
- }
813
- const pe = Ut, ge = qt, we = Kt, ye = (t, e, n) => {
814
- const o = /* @__PURE__ */ new Map(), i = {
815
- platform: de,
816
- ...n
817
- }, l = {
818
- ...i.platform,
819
- _c: o
820
- };
821
- return Xt(t, e, {
822
- ...i,
823
- platform: l
824
- });
825
- };
826
- function ve(t) {
827
- return t != null && typeof t == "object" && "$el" in t;
828
- }
829
- function gt(t) {
830
- if (ve(t)) {
831
- const e = t.$el;
832
- return et(e) && P(e) === "#comment" ? null : e;
833
- }
834
- return t;
835
- }
836
- function At(t) {
837
- return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
838
- }
839
- function wt(t, e) {
840
- const n = At(t);
841
- return Math.round(e * n) / n;
842
- }
843
- function xe(t, e, n) {
844
- n === void 0 && (n = {});
845
- const o = n.whileElementsMounted, i = T(() => {
846
- var x;
847
- return (x = F(n.open)) != null ? x : !0;
848
- }), l = T(() => F(n.middleware)), r = T(() => {
849
- var x;
850
- return (x = F(n.placement)) != null ? x : "bottom";
851
- }), c = T(() => {
852
- var x;
853
- return (x = F(n.strategy)) != null ? x : "absolute";
854
- }), s = T(() => {
855
- var x;
856
- return (x = F(n.transform)) != null ? x : !0;
857
- }), a = T(() => gt(t.value)), f = T(() => gt(e.value)), d = M(0), h = M(0), u = M(c.value), m = M(r.value), p = Tt({}), y = M(!1), g = T(() => {
858
- const x = {
859
- position: u.value,
860
- left: "0",
861
- top: "0"
862
- };
863
- if (!f.value)
864
- return x;
865
- const z = wt(f.value, d.value), H = wt(f.value, h.value);
866
- return s.value ? {
867
- ...x,
868
- transform: "translate(" + z + "px, " + H + "px)",
869
- ...At(f.value) >= 1.5 && {
870
- willChange: "transform"
871
- }
872
- } : {
873
- position: u.value,
874
- left: z + "px",
875
- top: H + "px"
876
- };
877
- });
878
- let w;
879
- function v() {
880
- a.value == null || f.value == null || ye(a.value, f.value, {
881
- middleware: l.value,
882
- placement: r.value,
883
- strategy: c.value
884
- }).then((x) => {
885
- d.value = x.x, h.value = x.y, u.value = x.strategy, m.value = x.placement, p.value = x.middlewareData, y.value = !0;
886
- });
887
- }
888
- function C() {
889
- typeof w == "function" && (w(), w = void 0);
890
- }
891
- function b() {
892
- if (C(), o === void 0) {
893
- v();
894
- return;
895
- }
896
- if (a.value != null && f.value != null) {
897
- w = o(a.value, f.value, v);
898
- return;
899
- }
900
- }
901
- function R() {
902
- i.value || (y.value = !1);
903
- }
904
- return Q([l, r, c], v, {
905
- flush: "sync"
906
- }), Q([a, f], b, {
907
- flush: "sync"
908
- }), Q(i, R, {
909
- flush: "sync"
910
- }), Lt() && St(C), {
911
- x: V(d),
912
- y: V(h),
913
- strategy: V(u),
914
- placement: V(m),
915
- middlewareData: V(p),
916
- isPositioned: V(y),
917
- floatingStyles: g,
918
- update: v
919
- };
920
- }
921
- let be = 0;
922
- const Oe = /* @__PURE__ */ Dt({
923
- name: "TPopover",
924
- __name: "Popover",
925
- props: /* @__PURE__ */ Mt({
926
- trigger: { default: Nt.CLICK },
927
- disabled: { type: Boolean, default: !1 },
928
- placement: { default: $t.BOTTOM },
929
- slotWrapperClasses: { default: "rounded-lg" },
930
- width: { default: "auto" }
931
- }, {
932
- open: { type: Boolean, default: !1 },
933
- openModifiers: {}
934
- }),
935
- emits: ["update:open"],
936
- setup(t, { expose: e }) {
937
- const n = Bt(t, "open"), o = t, i = `popover_${++be}`, l = M(), r = T(() => o.placement), c = M(), { wasClickOutsideOfContainer: s } = _t(), a = T(
938
- () => c.value?.firstChild?.nextElementSibling
939
- ), f = M([
940
- pe(1),
941
- we({
942
- apply({ elements: m }) {
943
- if (o.width === "static")
944
- return;
945
- const p = m.reference.getBoundingClientRect();
946
- Object.assign(m.floating.style, {
947
- minWidth: `${p.width}px`
948
- });
949
- }
950
- }),
951
- ge({ crossAxis: !0 })
952
- ]), { floatingStyles: d } = xe(a, l, {
953
- open: n,
954
- placement: r,
955
- middleware: f,
956
- whileElementsMounted: he
957
- }), h = (m = !n.value) => {
958
- n.value = m;
959
- }, u = (m) => n.value && c.value && s(m, c.value) ? (n.value = !1, !1) : !0;
960
- return kt(() => {
961
- document.addEventListener("click", u);
962
- }), Wt(() => {
963
- document.removeEventListener("click", u);
964
- }), e({ name: i }), (m, p) => (st(), lt("div", {
965
- ref_key: "wrapperRef",
966
- ref: c
967
- }, [
968
- ct(m.$slots, "default", at(ft({ onTogglePopover: h }))),
969
- n.value ? (st(), lt("div", {
970
- key: 0,
971
- ref_key: "floating",
972
- ref: l,
973
- role: "tooltip",
974
- id: i,
975
- style: Pt(F(d)),
976
- class: Vt(["bg-caipira-primary z-10", {
977
- [o.slotWrapperClasses]: !0
978
- }])
979
- }, [
980
- ct(m.$slots, "content", at(ft({ onTogglePopover: h })))
981
- ], 6)) : Ft("", !0)
982
- ], 512));
983
- }
984
- });
985
- export {
986
- Oe as _
987
- };