@caipira/tamandua 0.0.98 → 0.0.99

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.
package/dist/Dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-jLXkMqpc.js";
2
- import { p as a } from "./plugin-DrmCCRQ9.js";
1
+ import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
2
+ import { p as a } from "./plugin-C9FfiHWW.js";
3
3
  export {
4
4
  p as Dropdown,
5
5
  a as DropdownPlugin
@@ -95,7 +95,7 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
95
95
  ref_key: "listRef",
96
96
  ref: C,
97
97
  role: "listbox",
98
- class: c(["text-left max-h-60 min-w-[8rem] z-10 overflow-y-auto scrollbar select-none floatable w-full", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
98
+ class: c(["text-left max-h-60 min-w-fit z-10 overflow-y-auto scrollbar select-none floatable w-full", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
99
99
  onScrollend: T,
100
100
  onMousemove: o[0] || (o[0] = () => p.value = "mouse"),
101
101
  onKeydown: M
@@ -0,0 +1,96 @@
1
+ import './Popover.css';
2
+ import { defineComponent as x, mergeModels as B, useModel as E, ref as i, computed as c, onBeforeMount as S, onBeforeUnmount as b, openBlock as u, createElementBlock as g, renderSlot as T, normalizeProps as O, guardReactiveProps as C, createBlock as A, Teleport as N, normalizeStyle as w, unref as M, normalizeClass as R, createCommentVNode as z } from "vue";
3
+ import { u as L } from "./useDomHelpers-CGVrQd35.js";
4
+ import { d as V, a as l } from "./ui-5PiaVzMN.js";
5
+ import { o as $, s as W, a as U, u as j, b as D } from "./floating-ui.vue-B5QcGNjh.js";
6
+ import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ let G = 0;
8
+ const H = /* @__PURE__ */ x({
9
+ name: "TPopover",
10
+ __name: "Popover",
11
+ props: /* @__PURE__ */ B({
12
+ trigger: { default: V.CLICK },
13
+ disabled: { type: Boolean, default: !1 },
14
+ placement: { default: l.BOTTOM },
15
+ width: { default: "auto" },
16
+ slotWrapperClass: { default: "input-roundness" }
17
+ }, {
18
+ open: { type: Boolean, default: !1 },
19
+ openModifiers: {}
20
+ }),
21
+ emits: ["update:open"],
22
+ setup(p, { expose: I }) {
23
+ const o = E(p, "open"), n = p, d = `popover_${++G}`, f = i(), m = c(() => n.placement), r = i(), a = i(), { wasClickOutsideOfContainer: y } = L(), _ = c(() => {
24
+ if (n.placement === l.ACTIVATION_POSITION && a.value) {
25
+ const { x: e, y: t } = a.value;
26
+ return {
27
+ getBoundingClientRect: () => ({
28
+ x: e,
29
+ y: t,
30
+ left: e,
31
+ top: t,
32
+ right: e + 1,
33
+ bottom: t + 1,
34
+ width: 1,
35
+ height: 1,
36
+ toJSON: () => {
37
+ }
38
+ }),
39
+ contextElement: r.value?.firstChild?.nextElementSibling
40
+ };
41
+ }
42
+ return r.value?.firstChild?.nextElementSibling;
43
+ }), h = c(() => {
44
+ const e = n.placement === l.ACTIVATION_POSITION && a.value;
45
+ return [
46
+ $(e ? 0 : 5),
47
+ W({
48
+ apply({ elements: t }) {
49
+ if (n.width === "static")
50
+ return;
51
+ const k = t.reference.getBoundingClientRect();
52
+ Object.assign(t.floating.style, {
53
+ minWidth: `${k.width}px`
54
+ });
55
+ }
56
+ }),
57
+ U({ crossAxis: !0 })
58
+ ];
59
+ }), { floatingStyles: P } = j(_, f, {
60
+ open: o,
61
+ placement: m.value === l.ACTIVATION_POSITION ? l.BOTTOM_START : m.value,
62
+ middleware: h,
63
+ whileElementsMounted: D
64
+ }), v = (e, t) => {
65
+ o.value = typeof e == "boolean" ? e : !o.value, o.value ? t && n.placement === l.ACTIVATION_POSITION && (a.value = { x: t.clientX, y: t.clientY }) : a.value = void 0;
66
+ }, s = (e) => o.value && r.value && y(e, r.value) ? (o.value = !1, !1) : !0;
67
+ return S(() => {
68
+ document.addEventListener("click", s), document.addEventListener("contextmenu", s);
69
+ }), b(() => {
70
+ document.removeEventListener("click", s), document.removeEventListener("contextmenu", s);
71
+ }), I({ name: d }), (e, t) => (u(), g("div", {
72
+ ref_key: "wrapperRef",
73
+ ref: r
74
+ }, [
75
+ T(e.$slots, "default", O(C({ onTogglePopover: v })), void 0, !0),
76
+ (u(), A(N, { to: "body" }, [
77
+ o.value ? (u(), g("div", {
78
+ key: 0,
79
+ ref_key: "floating",
80
+ ref: f,
81
+ role: "tooltip",
82
+ id: d,
83
+ style: w(M(P)),
84
+ class: R(["popover-floatable bg-caipira-primary z-10", {
85
+ [n.slotWrapperClass]: !0
86
+ }])
87
+ }, [
88
+ T(e.$slots, "content", O(C({ onTogglePopover: v })), void 0, !0)
89
+ ], 6)) : z("", !0)
90
+ ]))
91
+ ], 512));
92
+ }
93
+ }), Q = /* @__PURE__ */ F(H, [["__scopeId", "data-v-936d97f9"]]);
94
+ export {
95
+ Q as P
96
+ };
package/dist/Popover.css CHANGED
@@ -1 +1 @@
1
- .popover-floatable[data-v-9293cd13]{scrollbar-gutter:stable}
1
+ .popover-floatable[data-v-936d97f9]{scrollbar-gutter:stable}
package/dist/Popover.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as p } from "./Popover-B6-kehfj.js";
2
- import { p as P } from "./plugin-DuSXDOBc.js";
1
+ import { P as p } from "./Popover-P-D1olPy.js";
2
+ import { p as P } from "./plugin-C3ZZPmkg.js";
3
3
  export {
4
4
  p as Popover,
5
5
  P as PopoverPlugin
@@ -4,7 +4,7 @@ import { _ as s } from "./Button.vue_vue_type_script_setup_true_lang-zvMC7Ucn.js
4
4
  import { _ as f } from "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
5
5
  import { _ as n } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-CLi_IXfP.js";
6
6
  import { D as u } from "./Drawer-y5xBARd2.js";
7
- import { _ as l } from "./Dropdown.vue_vue_type_script_setup_true_lang-jLXkMqpc.js";
7
+ import { _ as l } from "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
8
8
  import { _ as c } from "./FileDrop.vue_vue_type_script_setup_true_lang-Bq0lAgZ7.js";
9
9
  import { _ as T } from "./Form.vue_vue_type_script_setup_true_lang-BYcaoapl.js";
10
10
  import { _ as C } from "./FormItem.vue_vue_type_script_setup_true_lang-BFlt0VS0.js";
@@ -34,7 +34,7 @@ import { _ as nr } from "./Modal.vue_vue_type_script_setup_true_lang-60BGY-iH.js
34
34
  import { _ as ur } from "./ModalForm.vue_vue_type_script_setup_true_lang-C1Xl4TmQ.js";
35
35
  import { _ as lr } from "./Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js";
36
36
  import { _ as cr } from "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
37
- import { P as Tr } from "./Popover-B6-kehfj.js";
37
+ import { P as Tr } from "./Popover-P-D1olPy.js";
38
38
  import { P as Cr } from "./ProgressCircle-C5CnEEoe.js";
39
39
  import { P as br } from "./ProgressLine-WECUkWks.js";
40
40
  import { _ as Gr } from "./SensitiveInfo.vue_vue_type_script_setup_true_lang-D288W5VF.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { P as p } from "./Popover-B6-kehfj.js";
2
+ import { P as p } from "./Popover-P-D1olPy.js";
3
3
  const e = {
4
4
  install(o) {
5
5
  r(o, p);
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./Dropdown.vue_vue_type_script_setup_true_lang-jLXkMqpc.js";
2
+ import { _ as s } from "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -10,8 +10,8 @@ import { p as o } from "./plugin-DDXOF4cU.js";
10
10
  import { p as n } from "./plugin-CyDnzy2n.js";
11
11
  import "./Drawer-y5xBARd2.js";
12
12
  import { p as m } from "./plugin-JMSzJgz5.js";
13
- import "./Dropdown.vue_vue_type_script_setup_true_lang-jLXkMqpc.js";
14
- import { p as t } from "./plugin-DrmCCRQ9.js";
13
+ import "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
14
+ import { p as t } from "./plugin-C9FfiHWW.js";
15
15
  import { p as u } from "./plugin-43q0Kzto.js";
16
16
  import "./Form.vue_vue_type_script_setup_true_lang-BYcaoapl.js";
17
17
  import { p as l } from "./plugin-DJDKTDU5.js";
@@ -50,8 +50,8 @@ import { p as L } from "./plugin-uxc8N8iO.js";
50
50
  import { p as M } from "./plugin-jyvJNavM.js";
51
51
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
52
52
  import { p as _ } from "./plugin-Bhokj2iJ.js";
53
- import "./Popover-B6-kehfj.js";
54
- import { p as j } from "./plugin-DuSXDOBc.js";
53
+ import "./Popover-P-D1olPy.js";
54
+ import { p as j } from "./plugin-C3ZZPmkg.js";
55
55
  import "./ProgressCircle-C5CnEEoe.js";
56
56
  import { p as A } from "./plugin-CV6IjnsL.js";
57
57
  import "./ProgressLine-WECUkWks.js";
package/dist/plugins.js CHANGED
@@ -10,8 +10,8 @@ import { p as F } from "./plugin-DDXOF4cU.js";
10
10
  import { p as M } from "./plugin-CyDnzy2n.js";
11
11
  import "./Drawer-y5xBARd2.js";
12
12
  import { p as B } from "./plugin-JMSzJgz5.js";
13
- import "./Dropdown.vue_vue_type_script_setup_true_lang-jLXkMqpc.js";
14
- import { p as R } from "./plugin-DrmCCRQ9.js";
13
+ import "./Dropdown.vue_vue_type_script_setup_true_lang-BSnpkGOU.js";
14
+ import { p as R } from "./plugin-C9FfiHWW.js";
15
15
  import { p as q } from "./plugin-43q0Kzto.js";
16
16
  import "./Form.vue_vue_type_script_setup_true_lang-BYcaoapl.js";
17
17
  import { p as H } from "./plugin-DJDKTDU5.js";
@@ -50,8 +50,8 @@ import { p as Br } from "./plugin-uxc8N8iO.js";
50
50
  import { p as Rr } from "./plugin-jyvJNavM.js";
51
51
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-CR0OJ8Ao.js";
52
52
  import { p as qr } from "./plugin-Bhokj2iJ.js";
53
- import "./Popover-B6-kehfj.js";
54
- import { p as Hr } from "./plugin-DuSXDOBc.js";
53
+ import "./Popover-P-D1olPy.js";
54
+ import { p as Hr } from "./plugin-C3ZZPmkg.js";
55
55
  import "./ProgressCircle-C5CnEEoe.js";
56
56
  import { p as Kr } from "./plugin-CV6IjnsL.js";
57
57
  import "./ProgressLine-WECUkWks.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-B-llmtNo.js";
1
+ import { p as n } from "./plugins-D57bfrRk.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.98",
3
+ "version": "0.0.99",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -1,94 +0,0 @@
1
- import './Popover.css';
2
- import { defineComponent as E, mergeModels as S, useModel as k, ref as i, computed as u, onBeforeMount as A, onBeforeUnmount as B, openBlock as v, createElementBlock as g, renderSlot as T, normalizeProps as O, guardReactiveProps as C, normalizeStyle as N, unref as b, normalizeClass as w, createCommentVNode as M } from "vue";
3
- import { u as R } from "./useDomHelpers-CGVrQd35.js";
4
- import { d as z, a } from "./ui-5PiaVzMN.js";
5
- import { o as L, s as V, a as $, u as W, b as U } from "./floating-ui.vue-B5QcGNjh.js";
6
- import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- let D = 0;
8
- const F = /* @__PURE__ */ E({
9
- name: "TPopover",
10
- __name: "Popover",
11
- props: /* @__PURE__ */ S({
12
- trigger: { default: z.CLICK },
13
- disabled: { type: Boolean, default: !1 },
14
- placement: { default: a.BOTTOM },
15
- width: { default: "auto" },
16
- slotWrapperClass: { default: "input-roundness" }
17
- }, {
18
- open: { type: Boolean, default: !1 },
19
- openModifiers: {}
20
- }),
21
- emits: ["update:open"],
22
- setup(c, { expose: I }) {
23
- const o = k(c, "open"), n = c, p = `popover_${++D}`, d = i(), f = u(() => n.placement), l = i(), r = i(), { wasClickOutsideOfContainer: _ } = R(), y = u(() => {
24
- if (n.placement === a.ACTIVATION_POSITION && r.value) {
25
- const { x: e, y: t } = r.value;
26
- return {
27
- getBoundingClientRect: () => ({
28
- x: e,
29
- y: t,
30
- left: e,
31
- top: t,
32
- right: e + 1,
33
- bottom: t + 1,
34
- width: 1,
35
- height: 1,
36
- toJSON: () => {
37
- }
38
- }),
39
- contextElement: l.value?.firstChild?.nextElementSibling
40
- };
41
- }
42
- return l.value?.firstChild?.nextElementSibling;
43
- }), h = u(() => {
44
- const e = n.placement === a.ACTIVATION_POSITION && r.value;
45
- return [
46
- L(e ? 0 : 5),
47
- V({
48
- apply({ elements: t }) {
49
- if (n.width === "static")
50
- return;
51
- const x = t.reference.getBoundingClientRect();
52
- Object.assign(t.floating.style, {
53
- minWidth: `${x.width}px`
54
- });
55
- }
56
- }),
57
- $({ crossAxis: !0 })
58
- ];
59
- }), { floatingStyles: P } = W(y, d, {
60
- open: o,
61
- placement: f.value === a.ACTIVATION_POSITION ? a.BOTTOM_START : f.value,
62
- middleware: h,
63
- whileElementsMounted: U
64
- }), m = (e, t) => {
65
- o.value = typeof e == "boolean" ? e : !o.value, o.value ? t && n.placement === a.ACTIVATION_POSITION && (r.value = { x: t.clientX, y: t.clientY }) : r.value = void 0;
66
- }, s = (e) => o.value && l.value && _(e, l.value) ? (o.value = !1, !1) : !0;
67
- return A(() => {
68
- document.addEventListener("click", s), document.addEventListener("contextmenu", s);
69
- }), B(() => {
70
- document.removeEventListener("click", s), document.removeEventListener("contextmenu", s);
71
- }), I({ name: p }), (e, t) => (v(), g("div", {
72
- ref_key: "wrapperRef",
73
- ref: l
74
- }, [
75
- T(e.$slots, "default", O(C({ onTogglePopover: m })), void 0, !0),
76
- o.value ? (v(), g("div", {
77
- key: 0,
78
- ref_key: "floating",
79
- ref: d,
80
- role: "tooltip",
81
- id: p,
82
- style: N(b(P)),
83
- class: w(["popover-floatable bg-caipira-primary z-10", {
84
- [n.slotWrapperClass]: !0
85
- }])
86
- }, [
87
- T(e.$slots, "content", O(C({ onTogglePopover: m })), void 0, !0)
88
- ], 6)) : M("", !0)
89
- ], 512));
90
- }
91
- }), Y = /* @__PURE__ */ j(F, [["__scopeId", "data-v-9293cd13"]]);
92
- export {
93
- Y as P
94
- };