@caipira/tamandua 0.0.30 → 0.0.32

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 (69) hide show
  1. package/README.md +1 -0
  2. package/dist/Avatar.js +2 -2
  3. package/dist/Avatar.vue_vue_type_script_setup_true_lang-C8p8_0Uc.js +47 -0
  4. package/dist/{Button-COkapD0v.js → Button-CAiIEdkK.js} +47 -46
  5. package/dist/Button.css +1 -1
  6. package/dist/Button.js +2 -2
  7. package/dist/Dropdown.js +2 -2
  8. package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-Bt-imwu7.js → Dropdown.vue_vue_type_script_setup_true_lang-pjG__bX2.js} +1 -1
  9. package/dist/Icon.js +2 -2
  10. package/dist/Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js +45 -0
  11. package/dist/InputCheckbox.js +2 -2
  12. package/dist/{InputCheckbox.vue_vue_type_script_setup_true_lang-DUczNK1m.js → InputCheckbox.vue_vue_type_script_setup_true_lang-Bh8HA3Ay.js} +8 -8
  13. package/dist/InputDate.js +2 -2
  14. package/dist/InputDate.vue_vue_type_script_setup_true_lang-BAgG9zPV.js +188 -0
  15. package/dist/InputPhone.js +2 -2
  16. package/dist/{InputPhone.vue_vue_type_script_setup_true_lang-DXtliNyv.js → InputPhone.vue_vue_type_script_setup_true_lang-B4TULqLW.js} +24 -23
  17. package/dist/InputPrice.js +2 -2
  18. package/dist/InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js +67 -0
  19. package/dist/InputRadio.js +2 -2
  20. package/dist/{InputRadio.vue_vue_type_script_setup_true_lang-Dqbov2kN.js → InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js} +7 -7
  21. package/dist/InputSelect.js +2 -2
  22. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BlA3DIYZ.js +232 -0
  23. package/dist/Popconfirm.js +2 -2
  24. package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js +62 -0
  25. package/dist/Popover.js +2 -2
  26. package/dist/Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js +987 -0
  27. package/dist/{Table-COkg498M.js → Table-C0Sr_Lfm.js} +2 -2
  28. package/dist/Table.css +1 -1
  29. package/dist/Table.js +2 -2
  30. package/dist/Tag.js +2 -2
  31. package/dist/Tag.vue_vue_type_script_setup_true_lang-CgX-nT8V.js +74 -0
  32. package/dist/components.js +14 -14
  33. package/dist/composables.js +27 -16
  34. package/dist/index.css +2 -1
  35. package/dist/{plugin-VtriDxZB.js → plugin-Bog7k3Qf.js} +1 -1
  36. package/dist/{plugin-Dy14_LJS.js → plugin-BtF6kCcf.js} +1 -1
  37. package/dist/{plugin-BwRXtPzh.js → plugin-CNqL90UL.js} +1 -1
  38. package/dist/{plugin-B2fe1hFi.js → plugin-CTMcmMdr.js} +1 -1
  39. package/dist/{plugin-Dp-F27SY.js → plugin-CdJ1wBq2.js} +1 -1
  40. package/dist/{plugin-CGIfywdY.js → plugin-CrHDShgh.js} +1 -1
  41. package/dist/{plugin-CClGi0co.js → plugin-D8CsjFdw.js} +1 -1
  42. package/dist/{plugin-BOXtmhcZ.js → plugin-DDoM02Fq.js} +1 -1
  43. package/dist/{plugin-B97SpnhW.js → plugin-DLkeyKDM.js} +1 -1
  44. package/dist/{plugin-BR7RSh1H.js → plugin-Daf_swsz.js} +1 -1
  45. package/dist/{plugin-CBhgqomZ.js → plugin-DcWjzc_X.js} +1 -1
  46. package/dist/{plugin-BriPeDzu.js → plugin-Dk3KBChD.js} +1 -1
  47. package/dist/{plugin-Bt6de9ZA.js → plugin-Ee4Z5Rtp.js} +1 -1
  48. package/dist/{plugin-DgCWOSWh.js → plugin-z8Hr_T_O.js} +1 -1
  49. package/dist/{plugins-CxgvV4Py.js → plugins-ChB184ip.js} +22 -22
  50. package/dist/plugins.js +22 -22
  51. package/dist/tamandua.js +1 -1
  52. package/dist/types/components/InputSelect/types.d.ts +3 -1
  53. package/dist/types/components/Popconfirm/Popconfirm.vue.d.ts +3 -1
  54. package/dist/types/components/Popover/Popover.vue.d.ts +51 -35
  55. package/dist/types/components/Popover/types.d.ts +7 -1
  56. package/dist/types/composables/useDomHelpers.d.ts +0 -4
  57. package/dist/useDomHelpers-CGVrQd35.js +19 -0
  58. package/package.json +3 -3
  59. package/dist/Avatar.vue_vue_type_script_setup_true_lang-Cjz3Vlw9.js +0 -51
  60. package/dist/Icon.vue_vue_type_script_setup_true_lang-CNUyv7CY.js +0 -49
  61. package/dist/InputDate.vue_vue_type_script_setup_true_lang-Do47MTJJ.js +0 -188
  62. package/dist/InputPrice.vue_vue_type_script_setup_true_lang-DBMW1AwZ.js +0 -66
  63. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-ukwmeVxc.js +0 -226
  64. package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-BNpLdXq7.js +0 -63
  65. package/dist/Popover.vue_vue_type_script_setup_true_lang-B4Polh2y.js +0 -985
  66. package/dist/Tag.vue_vue_type_script_setup_true_lang-0p-7UEvO.js +0 -72
  67. package/dist/types/components/EventListener/EventListener.vue.d.ts +0 -6
  68. package/dist/useDomHelpers-5CFMo6bx.js +0 -23
  69. package/dist/useRender-D8PeooXE.js +0 -16
@@ -1,985 +0,0 @@
1
- import { defineComponent as tt, useSlots as gt, ref as Ee, onBeforeMount as yt, onMounted as bt, onBeforeUnmount as wt, openBlock as Ae, createElementBlock as ze, createBlock as xt, withCtx as Ot, renderSlot as Ie, createCommentVNode as Xe, normalizeClass as Et, normalizeProps as At, guardReactiveProps as Pt } from "vue";
2
- import { u as Ct } from "./useDomHelpers-5CFMo6bx.js";
3
- import { d as Bt, E as Rt } from "./ui-BC6H9E93.js";
4
- import { u as kt } from "./useRender-D8PeooXE.js";
5
- var k = "top", L = "bottom", S = "right", D = "left", Be = "auto", fe = [k, L, S, D], Q = "start", ie = "end", Dt = "clippingParents", rt = "viewport", ne = "popper", $t = "reference", Ye = /* @__PURE__ */ fe.reduce(function(e, t) {
6
- return e.concat([t + "-" + Q, t + "-" + ie]);
7
- }, []), nt = /* @__PURE__ */ [].concat(fe, [Be]).reduce(function(e, t) {
8
- return e.concat([t, t + "-" + Q, t + "-" + ie]);
9
- }, []), jt = "beforeRead", Tt = "read", Lt = "afterRead", St = "beforeMain", Mt = "main", Wt = "afterMain", Ht = "beforeWrite", Vt = "write", Nt = "afterWrite", Ft = [jt, Tt, Lt, St, Mt, Wt, Ht, Vt, Nt];
10
- function V(e) {
11
- return e ? (e.nodeName || "").toLowerCase() : null;
12
- }
13
- function j(e) {
14
- if (e == null)
15
- return window;
16
- if (e.toString() !== "[object Window]") {
17
- var t = e.ownerDocument;
18
- return t && t.defaultView || window;
19
- }
20
- return e;
21
- }
22
- function K(e) {
23
- var t = j(e).Element;
24
- return e instanceof t || e instanceof Element;
25
- }
26
- function T(e) {
27
- var t = j(e).HTMLElement;
28
- return e instanceof t || e instanceof HTMLElement;
29
- }
30
- function Re(e) {
31
- if (typeof ShadowRoot > "u")
32
- return !1;
33
- var t = j(e).ShadowRoot;
34
- return e instanceof t || e instanceof ShadowRoot;
35
- }
36
- function qt(e) {
37
- var t = e.state;
38
- Object.keys(t.elements).forEach(function(r) {
39
- var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
40
- !T(o) || !V(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(p) {
41
- var s = a[p];
42
- s === !1 ? o.removeAttribute(p) : o.setAttribute(p, s === !0 ? "" : s);
43
- }));
44
- });
45
- }
46
- function zt(e) {
47
- var t = e.state, r = {
48
- popper: {
49
- position: t.options.strategy,
50
- left: "0",
51
- top: "0",
52
- margin: "0"
53
- },
54
- arrow: {
55
- position: "absolute"
56
- },
57
- reference: {}
58
- };
59
- return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
60
- Object.keys(t.elements).forEach(function(n) {
61
- var a = t.elements[n], o = t.attributes[n] || {}, p = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), s = p.reduce(function(i, l) {
62
- return i[l] = "", i;
63
- }, {});
64
- !T(a) || !V(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(i) {
65
- a.removeAttribute(i);
66
- }));
67
- });
68
- };
69
- }
70
- const It = {
71
- name: "applyStyles",
72
- enabled: !0,
73
- phase: "write",
74
- fn: qt,
75
- effect: zt,
76
- requires: ["computeStyles"]
77
- };
78
- function H(e) {
79
- return e.split("-")[0];
80
- }
81
- var G = Math.max, ge = Math.min, Z = Math.round;
82
- function Pe() {
83
- var e = navigator.userAgentData;
84
- return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
85
- return t.brand + "/" + t.version;
86
- }).join(" ") : navigator.userAgent;
87
- }
88
- function at() {
89
- return !/^((?!chrome|android).)*safari/i.test(Pe());
90
- }
91
- function _(e, t, r) {
92
- t === void 0 && (t = !1), r === void 0 && (r = !1);
93
- var n = e.getBoundingClientRect(), a = 1, o = 1;
94
- t && T(e) && (a = e.offsetWidth > 0 && Z(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Z(n.height) / e.offsetHeight || 1);
95
- var p = K(e) ? j(e) : window, s = p.visualViewport, i = !at() && r, l = (n.left + (i && s ? s.offsetLeft : 0)) / a, f = (n.top + (i && s ? s.offsetTop : 0)) / o, m = n.width / a, y = n.height / o;
96
- return {
97
- width: m,
98
- height: y,
99
- top: f,
100
- right: l + m,
101
- bottom: f + y,
102
- left: l,
103
- x: l,
104
- y: f
105
- };
106
- }
107
- function ke(e) {
108
- var t = _(e), r = e.offsetWidth, n = e.offsetHeight;
109
- return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
110
- x: e.offsetLeft,
111
- y: e.offsetTop,
112
- width: r,
113
- height: n
114
- };
115
- }
116
- function ot(e, t) {
117
- var r = t.getRootNode && t.getRootNode();
118
- if (e.contains(t))
119
- return !0;
120
- if (r && Re(r)) {
121
- var n = t;
122
- do {
123
- if (n && e.isSameNode(n))
124
- return !0;
125
- n = n.parentNode || n.host;
126
- } while (n);
127
- }
128
- return !1;
129
- }
130
- function N(e) {
131
- return j(e).getComputedStyle(e);
132
- }
133
- function Xt(e) {
134
- return ["table", "td", "th"].indexOf(V(e)) >= 0;
135
- }
136
- function q(e) {
137
- return ((K(e) ? e.ownerDocument : (
138
- // $FlowFixMe[prop-missing]
139
- e.document
140
- )) || window.document).documentElement;
141
- }
142
- function ye(e) {
143
- return V(e) === "html" ? e : (
144
- // this is a quicker (but less type safe) way to save quite some bytes from the bundle
145
- // $FlowFixMe[incompatible-return]
146
- // $FlowFixMe[prop-missing]
147
- e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
148
- e.parentNode || // DOM Element detected
149
- (Re(e) ? e.host : null) || // ShadowRoot detected
150
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
151
- q(e)
152
- );
153
- }
154
- function Ue(e) {
155
- return !T(e) || // https://github.com/popperjs/popper-core/issues/837
156
- N(e).position === "fixed" ? null : e.offsetParent;
157
- }
158
- function Yt(e) {
159
- var t = /firefox/i.test(Pe()), r = /Trident/i.test(Pe());
160
- if (r && T(e)) {
161
- var n = N(e);
162
- if (n.position === "fixed")
163
- return null;
164
- }
165
- var a = ye(e);
166
- for (Re(a) && (a = a.host); T(a) && ["html", "body"].indexOf(V(a)) < 0; ) {
167
- var o = N(a);
168
- if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
169
- return a;
170
- a = a.parentNode;
171
- }
172
- return null;
173
- }
174
- function pe(e) {
175
- for (var t = j(e), r = Ue(e); r && Xt(r) && N(r).position === "static"; )
176
- r = Ue(r);
177
- return r && (V(r) === "html" || V(r) === "body" && N(r).position === "static") ? t : r || Yt(e) || t;
178
- }
179
- function De(e) {
180
- return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
181
- }
182
- function ae(e, t, r) {
183
- return G(e, ge(t, r));
184
- }
185
- function Ut(e, t, r) {
186
- var n = ae(e, t, r);
187
- return n > r ? r : n;
188
- }
189
- function it() {
190
- return {
191
- top: 0,
192
- right: 0,
193
- bottom: 0,
194
- left: 0
195
- };
196
- }
197
- function st(e) {
198
- return Object.assign({}, it(), e);
199
- }
200
- function ft(e, t) {
201
- return t.reduce(function(r, n) {
202
- return r[n] = e, r;
203
- }, {});
204
- }
205
- var Gt = function(t, r) {
206
- return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
207
- placement: r.placement
208
- })) : t, st(typeof t != "number" ? t : ft(t, fe));
209
- };
210
- function Kt(e) {
211
- var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, p = r.modifiersData.popperOffsets, s = H(r.placement), i = De(s), l = [D, S].indexOf(s) >= 0, f = l ? "height" : "width";
212
- if (!(!o || !p)) {
213
- var m = Gt(a.padding, r), y = ke(o), c = i === "y" ? k : D, w = i === "y" ? L : S, d = r.rects.reference[f] + r.rects.reference[i] - p[i] - r.rects.popper[f], v = p[i] - r.rects.reference[i], b = pe(o), O = b ? i === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, E = d / 2 - v / 2, u = m[c], h = O - y[f] - m[w], g = O / 2 - y[f] / 2 + E, x = ae(u, g, h), C = i;
214
- r.modifiersData[n] = (t = {}, t[C] = x, t.centerOffset = x - g, t);
215
- }
216
- }
217
- function Jt(e) {
218
- var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
219
- a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || ot(t.elements.popper, a) && (t.elements.arrow = a));
220
- }
221
- const Qt = {
222
- name: "arrow",
223
- enabled: !0,
224
- phase: "main",
225
- fn: Kt,
226
- effect: Jt,
227
- requires: ["popperOffsets"],
228
- requiresIfExists: ["preventOverflow"]
229
- };
230
- function ee(e) {
231
- return e.split("-")[1];
232
- }
233
- var Zt = {
234
- top: "auto",
235
- right: "auto",
236
- bottom: "auto",
237
- left: "auto"
238
- };
239
- function _t(e, t) {
240
- var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
241
- return {
242
- x: Z(r * a) / a || 0,
243
- y: Z(n * a) / a || 0
244
- };
245
- }
246
- function Ge(e) {
247
- var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, p = e.offsets, s = e.position, i = e.gpuAcceleration, l = e.adaptive, f = e.roundOffsets, m = e.isFixed, y = p.x, c = y === void 0 ? 0 : y, w = p.y, d = w === void 0 ? 0 : w, v = typeof f == "function" ? f({
248
- x: c,
249
- y: d
250
- }) : {
251
- x: c,
252
- y: d
253
- };
254
- c = v.x, d = v.y;
255
- var b = p.hasOwnProperty("x"), O = p.hasOwnProperty("y"), E = D, u = k, h = window;
256
- if (l) {
257
- var g = pe(r), x = "clientHeight", C = "clientWidth";
258
- if (g === j(r) && (g = q(r), N(g).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), g = g, a === k || (a === D || a === S) && o === ie) {
259
- u = L;
260
- var P = m && g === h && h.visualViewport ? h.visualViewport.height : (
261
- // $FlowFixMe[prop-missing]
262
- g[x]
263
- );
264
- d -= P - n.height, d *= i ? 1 : -1;
265
- }
266
- if (a === D || (a === k || a === L) && o === ie) {
267
- E = S;
268
- var A = m && g === h && h.visualViewport ? h.visualViewport.width : (
269
- // $FlowFixMe[prop-missing]
270
- g[C]
271
- );
272
- c -= A - n.width, c *= i ? 1 : -1;
273
- }
274
- }
275
- var B = Object.assign({
276
- position: s
277
- }, l && Zt), M = f === !0 ? _t({
278
- x: c,
279
- y: d
280
- }, j(r)) : {
281
- x: c,
282
- y: d
283
- };
284
- if (c = M.x, d = M.y, i) {
285
- var R;
286
- return Object.assign({}, B, (R = {}, R[u] = O ? "0" : "", R[E] = b ? "0" : "", R.transform = (h.devicePixelRatio || 1) <= 1 ? "translate(" + c + "px, " + d + "px)" : "translate3d(" + c + "px, " + d + "px, 0)", R));
287
- }
288
- return Object.assign({}, B, (t = {}, t[u] = O ? d + "px" : "", t[E] = b ? c + "px" : "", t.transform = "", t));
289
- }
290
- function er(e) {
291
- var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, p = o === void 0 ? !0 : o, s = r.roundOffsets, i = s === void 0 ? !0 : s, l = {
292
- placement: H(t.placement),
293
- variation: ee(t.placement),
294
- popper: t.elements.popper,
295
- popperRect: t.rects.popper,
296
- gpuAcceleration: a,
297
- isFixed: t.options.strategy === "fixed"
298
- };
299
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ge(Object.assign({}, l, {
300
- offsets: t.modifiersData.popperOffsets,
301
- position: t.options.strategy,
302
- adaptive: p,
303
- roundOffsets: i
304
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ge(Object.assign({}, l, {
305
- offsets: t.modifiersData.arrow,
306
- position: "absolute",
307
- adaptive: !1,
308
- roundOffsets: i
309
- })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
310
- "data-popper-placement": t.placement
311
- });
312
- }
313
- const tr = {
314
- name: "computeStyles",
315
- enabled: !0,
316
- phase: "beforeWrite",
317
- fn: er,
318
- data: {}
319
- };
320
- var me = {
321
- passive: !0
322
- };
323
- function rr(e) {
324
- var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, p = n.resize, s = p === void 0 ? !0 : p, i = j(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
325
- return o && l.forEach(function(f) {
326
- f.addEventListener("scroll", r.update, me);
327
- }), s && i.addEventListener("resize", r.update, me), function() {
328
- o && l.forEach(function(f) {
329
- f.removeEventListener("scroll", r.update, me);
330
- }), s && i.removeEventListener("resize", r.update, me);
331
- };
332
- }
333
- const nr = {
334
- name: "eventListeners",
335
- enabled: !0,
336
- phase: "write",
337
- fn: function() {
338
- },
339
- effect: rr,
340
- data: {}
341
- };
342
- var ar = {
343
- left: "right",
344
- right: "left",
345
- bottom: "top",
346
- top: "bottom"
347
- };
348
- function he(e) {
349
- return e.replace(/left|right|bottom|top/g, function(t) {
350
- return ar[t];
351
- });
352
- }
353
- var or = {
354
- start: "end",
355
- end: "start"
356
- };
357
- function Ke(e) {
358
- return e.replace(/start|end/g, function(t) {
359
- return or[t];
360
- });
361
- }
362
- function $e(e) {
363
- var t = j(e), r = t.pageXOffset, n = t.pageYOffset;
364
- return {
365
- scrollLeft: r,
366
- scrollTop: n
367
- };
368
- }
369
- function je(e) {
370
- return _(q(e)).left + $e(e).scrollLeft;
371
- }
372
- function ir(e, t) {
373
- var r = j(e), n = q(e), a = r.visualViewport, o = n.clientWidth, p = n.clientHeight, s = 0, i = 0;
374
- if (a) {
375
- o = a.width, p = a.height;
376
- var l = at();
377
- (l || !l && t === "fixed") && (s = a.offsetLeft, i = a.offsetTop);
378
- }
379
- return {
380
- width: o,
381
- height: p,
382
- x: s + je(e),
383
- y: i
384
- };
385
- }
386
- function sr(e) {
387
- var t, r = q(e), n = $e(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = G(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), p = G(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -n.scrollLeft + je(e), i = -n.scrollTop;
388
- return N(a || r).direction === "rtl" && (s += G(r.clientWidth, a ? a.clientWidth : 0) - o), {
389
- width: o,
390
- height: p,
391
- x: s,
392
- y: i
393
- };
394
- }
395
- function Te(e) {
396
- var t = N(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
397
- return /auto|scroll|overlay|hidden/.test(r + a + n);
398
- }
399
- function pt(e) {
400
- return ["html", "body", "#document"].indexOf(V(e)) >= 0 ? e.ownerDocument.body : T(e) && Te(e) ? e : pt(ye(e));
401
- }
402
- function oe(e, t) {
403
- var r;
404
- t === void 0 && (t = []);
405
- var n = pt(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = j(n), p = a ? [o].concat(o.visualViewport || [], Te(n) ? n : []) : n, s = t.concat(p);
406
- return a ? s : (
407
- // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
408
- s.concat(oe(ye(p)))
409
- );
410
- }
411
- function Ce(e) {
412
- return Object.assign({}, e, {
413
- left: e.x,
414
- top: e.y,
415
- right: e.x + e.width,
416
- bottom: e.y + e.height
417
- });
418
- }
419
- function fr(e, t) {
420
- var r = _(e, !1, t === "fixed");
421
- return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
422
- }
423
- function Je(e, t, r) {
424
- return t === rt ? Ce(ir(e, r)) : K(t) ? fr(t, r) : Ce(sr(q(e)));
425
- }
426
- function pr(e) {
427
- var t = oe(ye(e)), r = ["absolute", "fixed"].indexOf(N(e).position) >= 0, n = r && T(e) ? pe(e) : e;
428
- return K(n) ? t.filter(function(a) {
429
- return K(a) && ot(a, n) && V(a) !== "body";
430
- }) : [];
431
- }
432
- function lr(e, t, r, n) {
433
- var a = t === "clippingParents" ? pr(e) : [].concat(t), o = [].concat(a, [r]), p = o[0], s = o.reduce(function(i, l) {
434
- var f = Je(e, l, n);
435
- return i.top = G(f.top, i.top), i.right = ge(f.right, i.right), i.bottom = ge(f.bottom, i.bottom), i.left = G(f.left, i.left), i;
436
- }, Je(e, p, n));
437
- return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
438
- }
439
- function lt(e) {
440
- var t = e.reference, r = e.element, n = e.placement, a = n ? H(n) : null, o = n ? ee(n) : null, p = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, i;
441
- switch (a) {
442
- case k:
443
- i = {
444
- x: p,
445
- y: t.y - r.height
446
- };
447
- break;
448
- case L:
449
- i = {
450
- x: p,
451
- y: t.y + t.height
452
- };
453
- break;
454
- case S:
455
- i = {
456
- x: t.x + t.width,
457
- y: s
458
- };
459
- break;
460
- case D:
461
- i = {
462
- x: t.x - r.width,
463
- y: s
464
- };
465
- break;
466
- default:
467
- i = {
468
- x: t.x,
469
- y: t.y
470
- };
471
- }
472
- var l = a ? De(a) : null;
473
- if (l != null) {
474
- var f = l === "y" ? "height" : "width";
475
- switch (o) {
476
- case Q:
477
- i[l] = i[l] - (t[f] / 2 - r[f] / 2);
478
- break;
479
- case ie:
480
- i[l] = i[l] + (t[f] / 2 - r[f] / 2);
481
- break;
482
- }
483
- }
484
- return i;
485
- }
486
- function se(e, t) {
487
- t === void 0 && (t = {});
488
- var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, p = o === void 0 ? e.strategy : o, s = r.boundary, i = s === void 0 ? Dt : s, l = r.rootBoundary, f = l === void 0 ? rt : l, m = r.elementContext, y = m === void 0 ? ne : m, c = r.altBoundary, w = c === void 0 ? !1 : c, d = r.padding, v = d === void 0 ? 0 : d, b = st(typeof v != "number" ? v : ft(v, fe)), O = y === ne ? $t : ne, E = e.rects.popper, u = e.elements[w ? O : y], h = lr(K(u) ? u : u.contextElement || q(e.elements.popper), i, f, p), g = _(e.elements.reference), x = lt({
489
- reference: g,
490
- element: E,
491
- strategy: "absolute",
492
- placement: a
493
- }), C = Ce(Object.assign({}, E, x)), P = y === ne ? C : g, A = {
494
- top: h.top - P.top + b.top,
495
- bottom: P.bottom - h.bottom + b.bottom,
496
- left: h.left - P.left + b.left,
497
- right: P.right - h.right + b.right
498
- }, B = e.modifiersData.offset;
499
- if (y === ne && B) {
500
- var M = B[a];
501
- Object.keys(A).forEach(function(R) {
502
- var z = [S, L].indexOf(R) >= 0 ? 1 : -1, I = [k, L].indexOf(R) >= 0 ? "y" : "x";
503
- A[R] += M[I] * z;
504
- });
505
- }
506
- return A;
507
- }
508
- function cr(e, t) {
509
- t === void 0 && (t = {});
510
- var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, p = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, l = i === void 0 ? nt : i, f = ee(n), m = f ? s ? Ye : Ye.filter(function(w) {
511
- return ee(w) === f;
512
- }) : fe, y = m.filter(function(w) {
513
- return l.indexOf(w) >= 0;
514
- });
515
- y.length === 0 && (y = m);
516
- var c = y.reduce(function(w, d) {
517
- return w[d] = se(e, {
518
- placement: d,
519
- boundary: a,
520
- rootBoundary: o,
521
- padding: p
522
- })[H(d)], w;
523
- }, {});
524
- return Object.keys(c).sort(function(w, d) {
525
- return c[w] - c[d];
526
- });
527
- }
528
- function ur(e) {
529
- if (H(e) === Be)
530
- return [];
531
- var t = he(e);
532
- return [Ke(e), t, Ke(t)];
533
- }
534
- function vr(e) {
535
- var t = e.state, r = e.options, n = e.name;
536
- if (!t.modifiersData[n]._skip) {
537
- for (var a = r.mainAxis, o = a === void 0 ? !0 : a, p = r.altAxis, s = p === void 0 ? !0 : p, i = r.fallbackPlacements, l = r.padding, f = r.boundary, m = r.rootBoundary, y = r.altBoundary, c = r.flipVariations, w = c === void 0 ? !0 : c, d = r.allowedAutoPlacements, v = t.options.placement, b = H(v), O = b === v, E = i || (O || !w ? [he(v)] : ur(v)), u = [v].concat(E).reduce(function(J, F) {
538
- return J.concat(H(F) === Be ? cr(t, {
539
- placement: F,
540
- boundary: f,
541
- rootBoundary: m,
542
- padding: l,
543
- flipVariations: w,
544
- allowedAutoPlacements: d
545
- }) : F);
546
- }, []), h = t.rects.reference, g = t.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, P = u[0], A = 0; A < u.length; A++) {
547
- var B = u[A], M = H(B), R = ee(B) === Q, z = [k, L].indexOf(M) >= 0, I = z ? "width" : "height", $ = se(t, {
548
- placement: B,
549
- boundary: f,
550
- rootBoundary: m,
551
- altBoundary: y,
552
- padding: l
553
- }), W = z ? R ? S : D : R ? L : k;
554
- h[I] > g[I] && (W = he(W));
555
- var le = he(W), X = [];
556
- if (o && X.push($[M] <= 0), s && X.push($[W] <= 0, $[le] <= 0), X.every(function(J) {
557
- return J;
558
- })) {
559
- P = B, C = !1;
560
- break;
561
- }
562
- x.set(B, X);
563
- }
564
- if (C)
565
- for (var ce = w ? 3 : 1, be = function(F) {
566
- var re = u.find(function(ve) {
567
- var Y = x.get(ve);
568
- if (Y)
569
- return Y.slice(0, F).every(function(we) {
570
- return we;
571
- });
572
- });
573
- if (re)
574
- return P = re, "break";
575
- }, te = ce; te > 0; te--) {
576
- var ue = be(te);
577
- if (ue === "break")
578
- break;
579
- }
580
- t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0);
581
- }
582
- }
583
- const dr = {
584
- name: "flip",
585
- enabled: !0,
586
- phase: "main",
587
- fn: vr,
588
- requiresIfExists: ["offset"],
589
- data: {
590
- _skip: !1
591
- }
592
- };
593
- function Qe(e, t, r) {
594
- return r === void 0 && (r = {
595
- x: 0,
596
- y: 0
597
- }), {
598
- top: e.top - t.height - r.y,
599
- right: e.right - t.width + r.x,
600
- bottom: e.bottom - t.height + r.y,
601
- left: e.left - t.width - r.x
602
- };
603
- }
604
- function Ze(e) {
605
- return [k, S, L, D].some(function(t) {
606
- return e[t] >= 0;
607
- });
608
- }
609
- function mr(e) {
610
- var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, p = se(t, {
611
- elementContext: "reference"
612
- }), s = se(t, {
613
- altBoundary: !0
614
- }), i = Qe(p, n), l = Qe(s, a, o), f = Ze(i), m = Ze(l);
615
- t.modifiersData[r] = {
616
- referenceClippingOffsets: i,
617
- popperEscapeOffsets: l,
618
- isReferenceHidden: f,
619
- hasPopperEscaped: m
620
- }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
621
- "data-popper-reference-hidden": f,
622
- "data-popper-escaped": m
623
- });
624
- }
625
- const hr = {
626
- name: "hide",
627
- enabled: !0,
628
- phase: "main",
629
- requiresIfExists: ["preventOverflow"],
630
- fn: mr
631
- };
632
- function gr(e, t, r) {
633
- var n = H(e), a = [D, k].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
634
- placement: e
635
- })) : r, p = o[0], s = o[1];
636
- return p = p || 0, s = (s || 0) * a, [D, S].indexOf(n) >= 0 ? {
637
- x: s,
638
- y: p
639
- } : {
640
- x: p,
641
- y: s
642
- };
643
- }
644
- function yr(e) {
645
- var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, p = nt.reduce(function(f, m) {
646
- return f[m] = gr(m, t.rects, o), f;
647
- }, {}), s = p[t.placement], i = s.x, l = s.y;
648
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += l), t.modifiersData[n] = p;
649
- }
650
- const br = {
651
- name: "offset",
652
- enabled: !0,
653
- phase: "main",
654
- requires: ["popperOffsets"],
655
- fn: yr
656
- };
657
- function wr(e) {
658
- var t = e.state, r = e.name;
659
- t.modifiersData[r] = lt({
660
- reference: t.rects.reference,
661
- element: t.rects.popper,
662
- strategy: "absolute",
663
- placement: t.placement
664
- });
665
- }
666
- const xr = {
667
- name: "popperOffsets",
668
- enabled: !0,
669
- phase: "read",
670
- fn: wr,
671
- data: {}
672
- };
673
- function Or(e) {
674
- return e === "x" ? "y" : "x";
675
- }
676
- function Er(e) {
677
- var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, p = r.altAxis, s = p === void 0 ? !1 : p, i = r.boundary, l = r.rootBoundary, f = r.altBoundary, m = r.padding, y = r.tether, c = y === void 0 ? !0 : y, w = r.tetherOffset, d = w === void 0 ? 0 : w, v = se(t, {
678
- boundary: i,
679
- rootBoundary: l,
680
- padding: m,
681
- altBoundary: f
682
- }), b = H(t.placement), O = ee(t.placement), E = !O, u = De(b), h = Or(u), g = t.modifiersData.popperOffsets, x = t.rects.reference, C = t.rects.popper, P = typeof d == "function" ? d(Object.assign({}, t.rects, {
683
- placement: t.placement
684
- })) : d, A = typeof P == "number" ? {
685
- mainAxis: P,
686
- altAxis: P
687
- } : Object.assign({
688
- mainAxis: 0,
689
- altAxis: 0
690
- }, P), B = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
691
- x: 0,
692
- y: 0
693
- };
694
- if (g) {
695
- if (o) {
696
- var R, z = u === "y" ? k : D, I = u === "y" ? L : S, $ = u === "y" ? "height" : "width", W = g[u], le = W + v[z], X = W - v[I], ce = c ? -C[$] / 2 : 0, be = O === Q ? x[$] : C[$], te = O === Q ? -C[$] : -x[$], ue = t.elements.arrow, J = c && ue ? ke(ue) : {
697
- width: 0,
698
- height: 0
699
- }, F = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : it(), re = F[z], ve = F[I], Y = ae(0, x[$], J[$]), we = E ? x[$] / 2 - ce - Y - re - A.mainAxis : be - Y - re - A.mainAxis, ct = E ? -x[$] / 2 + ce + Y + ve + A.mainAxis : te + Y + ve + A.mainAxis, xe = t.elements.arrow && pe(t.elements.arrow), ut = xe ? u === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Le = (R = B?.[u]) != null ? R : 0, vt = W + we - Le - ut, dt = W + ct - Le, Se = ae(c ? ge(le, vt) : le, W, c ? G(X, dt) : X);
700
- g[u] = Se, M[u] = Se - W;
701
- }
702
- if (s) {
703
- var Me, mt = u === "x" ? k : D, ht = u === "x" ? L : S, U = g[h], de = h === "y" ? "height" : "width", We = U + v[mt], He = U - v[ht], Oe = [k, D].indexOf(b) !== -1, Ve = (Me = B?.[h]) != null ? Me : 0, Ne = Oe ? We : U - x[de] - C[de] - Ve + A.altAxis, Fe = Oe ? U + x[de] + C[de] - Ve - A.altAxis : He, qe = c && Oe ? Ut(Ne, U, Fe) : ae(c ? Ne : We, U, c ? Fe : He);
704
- g[h] = qe, M[h] = qe - U;
705
- }
706
- t.modifiersData[n] = M;
707
- }
708
- }
709
- const Ar = {
710
- name: "preventOverflow",
711
- enabled: !0,
712
- phase: "main",
713
- fn: Er,
714
- requiresIfExists: ["offset"]
715
- };
716
- function Pr(e) {
717
- return {
718
- scrollLeft: e.scrollLeft,
719
- scrollTop: e.scrollTop
720
- };
721
- }
722
- function Cr(e) {
723
- return e === j(e) || !T(e) ? $e(e) : Pr(e);
724
- }
725
- function Br(e) {
726
- var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, n = Z(t.height) / e.offsetHeight || 1;
727
- return r !== 1 || n !== 1;
728
- }
729
- function Rr(e, t, r) {
730
- r === void 0 && (r = !1);
731
- var n = T(t), a = T(t) && Br(t), o = q(t), p = _(e, a, r), s = {
732
- scrollLeft: 0,
733
- scrollTop: 0
734
- }, i = {
735
- x: 0,
736
- y: 0
737
- };
738
- return (n || !n && !r) && ((V(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
739
- Te(o)) && (s = Cr(t)), T(t) ? (i = _(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = je(o))), {
740
- x: p.left + s.scrollLeft - i.x,
741
- y: p.top + s.scrollTop - i.y,
742
- width: p.width,
743
- height: p.height
744
- };
745
- }
746
- function kr(e) {
747
- var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
748
- e.forEach(function(o) {
749
- t.set(o.name, o);
750
- });
751
- function a(o) {
752
- r.add(o.name);
753
- var p = [].concat(o.requires || [], o.requiresIfExists || []);
754
- p.forEach(function(s) {
755
- if (!r.has(s)) {
756
- var i = t.get(s);
757
- i && a(i);
758
- }
759
- }), n.push(o);
760
- }
761
- return e.forEach(function(o) {
762
- r.has(o.name) || a(o);
763
- }), n;
764
- }
765
- function Dr(e) {
766
- var t = kr(e);
767
- return Ft.reduce(function(r, n) {
768
- return r.concat(t.filter(function(a) {
769
- return a.phase === n;
770
- }));
771
- }, []);
772
- }
773
- function $r(e) {
774
- var t;
775
- return function() {
776
- return t || (t = new Promise(function(r) {
777
- Promise.resolve().then(function() {
778
- t = void 0, r(e());
779
- });
780
- })), t;
781
- };
782
- }
783
- function jr(e) {
784
- var t = e.reduce(function(r, n) {
785
- var a = r[n.name];
786
- return r[n.name] = a ? Object.assign({}, a, n, {
787
- options: Object.assign({}, a.options, n.options),
788
- data: Object.assign({}, a.data, n.data)
789
- }) : n, r;
790
- }, {});
791
- return Object.keys(t).map(function(r) {
792
- return t[r];
793
- });
794
- }
795
- var _e = {
796
- placement: "bottom",
797
- modifiers: [],
798
- strategy: "absolute"
799
- };
800
- function et() {
801
- for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
802
- t[r] = arguments[r];
803
- return !t.some(function(n) {
804
- return !(n && typeof n.getBoundingClientRect == "function");
805
- });
806
- }
807
- function Tr(e) {
808
- e === void 0 && (e = {});
809
- var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? _e : a;
810
- return function(s, i, l) {
811
- l === void 0 && (l = o);
812
- var f = {
813
- placement: "bottom",
814
- orderedModifiers: [],
815
- options: Object.assign({}, _e, o),
816
- modifiersData: {},
817
- elements: {
818
- reference: s,
819
- popper: i
820
- },
821
- attributes: {},
822
- styles: {}
823
- }, m = [], y = !1, c = {
824
- state: f,
825
- setOptions: function(b) {
826
- var O = typeof b == "function" ? b(f.options) : b;
827
- d(), f.options = Object.assign({}, o, f.options, O), f.scrollParents = {
828
- reference: K(s) ? oe(s) : s.contextElement ? oe(s.contextElement) : [],
829
- popper: oe(i)
830
- };
831
- var E = Dr(jr([].concat(n, f.options.modifiers)));
832
- return f.orderedModifiers = E.filter(function(u) {
833
- return u.enabled;
834
- }), w(), c.update();
835
- },
836
- // Sync update – it will always be executed, even if not necessary. This
837
- // is useful for low frequency updates where sync behavior simplifies the
838
- // logic.
839
- // For high frequency updates (e.g. `resize` and `scroll` events), always
840
- // prefer the async Popper#update method
841
- forceUpdate: function() {
842
- if (!y) {
843
- var b = f.elements, O = b.reference, E = b.popper;
844
- if (et(O, E)) {
845
- f.rects = {
846
- reference: Rr(O, pe(E), f.options.strategy === "fixed"),
847
- popper: ke(E)
848
- }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(A) {
849
- return f.modifiersData[A.name] = Object.assign({}, A.data);
850
- });
851
- for (var u = 0; u < f.orderedModifiers.length; u++) {
852
- if (f.reset === !0) {
853
- f.reset = !1, u = -1;
854
- continue;
855
- }
856
- var h = f.orderedModifiers[u], g = h.fn, x = h.options, C = x === void 0 ? {} : x, P = h.name;
857
- typeof g == "function" && (f = g({
858
- state: f,
859
- options: C,
860
- name: P,
861
- instance: c
862
- }) || f);
863
- }
864
- }
865
- }
866
- },
867
- // Async and optimistically optimized update – it will not be executed if
868
- // not necessary (debounced to run at most once-per-tick)
869
- update: $r(function() {
870
- return new Promise(function(v) {
871
- c.forceUpdate(), v(f);
872
- });
873
- }),
874
- destroy: function() {
875
- d(), y = !0;
876
- }
877
- };
878
- if (!et(s, i))
879
- return c;
880
- c.setOptions(l).then(function(v) {
881
- !y && l.onFirstUpdate && l.onFirstUpdate(v);
882
- });
883
- function w() {
884
- f.orderedModifiers.forEach(function(v) {
885
- var b = v.name, O = v.options, E = O === void 0 ? {} : O, u = v.effect;
886
- if (typeof u == "function") {
887
- var h = u({
888
- state: f,
889
- name: b,
890
- instance: c,
891
- options: E
892
- }), g = function() {
893
- };
894
- m.push(h || g);
895
- }
896
- });
897
- }
898
- function d() {
899
- m.forEach(function(v) {
900
- return v();
901
- }), m = [];
902
- }
903
- return c;
904
- };
905
- }
906
- var Lr = [nr, xr, tr, It, br, dr, Ar, Qt, hr], Sr = /* @__PURE__ */ Tr({
907
- defaultModifiers: Lr
908
- });
909
- const Mr = /* @__PURE__ */ tt({
910
- __name: "EventListener",
911
- emits: ["popoverClick"],
912
- setup(e) {
913
- const t = gt();
914
- return kt(() => t.default ? t.default() : [null]), () => {
915
- };
916
- }
917
- }), Fr = /* @__PURE__ */ tt({
918
- name: "TPopover",
919
- __name: "Popover",
920
- props: {
921
- trigger: { default: Bt.CLICK },
922
- disabled: { type: Boolean, default: !1 },
923
- isVisible: { type: [Boolean, null], default: null },
924
- placement: { default: Rt.BOTTOM },
925
- slotWrapperClasses: { default: "rounded-lg" }
926
- },
927
- setup(e, { expose: t }) {
928
- const r = e, n = Ee(!1), a = Ee(), o = Ee(), { wasClickOutsideOfContainer: p } = Ct(), s = (l = !n.value) => {
929
- n.value = l;
930
- }, i = (l) => o.value && p(l, o.value) ? (n.value = !1, !1) : !0;
931
- return yt(() => {
932
- document.addEventListener("click", i);
933
- }), bt(() => {
934
- if (!o.value || !a.value)
935
- return;
936
- let l;
937
- for (const f of o.value.childNodes.values())
938
- if ("hasAttribute" in f && f.hasAttribute("aria-describedby") && f.getAttribute("aria-describedby") === "tooltip") {
939
- l = f;
940
- break;
941
- }
942
- if (!l) {
943
- console.error(
944
- '[caipira-cloud-ui]: Popover activator not found (aria-describedby="tooltip")'
945
- );
946
- return;
947
- }
948
- Sr(l, a.value, {
949
- placement: r.placement,
950
- strategy: "fixed"
951
- });
952
- }), wt(() => {
953
- document.removeEventListener("click", i);
954
- }), t({ visible: n }), (l, f) => (Ae(), ze("div", {
955
- ref_key: "wrapperRef",
956
- ref: o,
957
- class: "inline"
958
- }, [
959
- l.$slots.default ? (Ae(), xt(Mr, {
960
- key: 0,
961
- onPopoverClick: s
962
- }, {
963
- default: Ot(() => [
964
- Ie(l.$slots, "default")
965
- ]),
966
- _: 3
967
- })) : Xe("", !0),
968
- r.disabled ? Xe("", !0) : (Ae(), ze("div", {
969
- key: 1,
970
- ref_key: "popoverRef",
971
- ref: a,
972
- role: "tooltip",
973
- class: Et(["fixed bg-caipira-primary border border-color z-10", {
974
- hidden: r.isVisible !== null && r.isVisible === !1 || r.isVisible === null && n.value === !1,
975
- [r.slotWrapperClasses]: !0
976
- }])
977
- }, [
978
- Ie(l.$slots, "content", At(Pt({ onTogglePopover: s })))
979
- ], 2))
980
- ], 512));
981
- }
982
- });
983
- export {
984
- Fr as _
985
- };