@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,5 +1,5 @@
1
- import { defineComponent as w, ref as s, onBeforeMount as g, watch as h, resolveComponent as p, openBlock as I, createElementBlock as B, createVNode as m, withCtx as f, createElementVNode as v, toDisplayString as l } from "vue";
2
- const j = { class: "h-9 flex input-bg-color input-text-color border input-border input-roundness w-full" }, E = /* @__PURE__ */ w({
1
+ import { defineComponent as y, ref as r, onBeforeMount as g, watch as h, resolveComponent as p, openBlock as I, createElementBlock as B, createVNode as m, withCtx as f, createElementVNode as b, toDisplayString as l } from "vue";
2
+ const k = { class: "flex items-center h-9 w-full input-bg-color input-text-color border input-border input-roundness" }, N = /* @__PURE__ */ y({
3
3
  name: "TInputPhone",
4
4
  __name: "InputPhone",
5
5
  props: {
@@ -7,12 +7,12 @@ const j = { class: "h-9 flex input-bg-color input-text-color border input-border
7
7
  modelValue: { default: () => ({}) }
8
8
  },
9
9
  emits: ["update:model-value"],
10
- setup(b, { emit: _ }) {
11
- const u = b, C = _, a = s(""), o = s(), r = s([]), i = s([]), d = () => {
12
- if (!o.value)
10
+ setup(v, { emit: _ }) {
11
+ const u = v, C = _, a = r(""), n = r(), i = r([]), s = r([]), d = () => {
12
+ if (!n.value)
13
13
  return;
14
- const e = i.value.find(
15
- (n) => n.dialCode === o.value
14
+ const e = s.value.find(
15
+ (o) => o.dialCode === n.value
16
16
  );
17
17
  e && C("update:model-value", {
18
18
  iso2: e.iso2,
@@ -20,14 +20,14 @@ const j = { class: "h-9 flex input-bg-color input-text-color border input-border
20
20
  number: a.value ?? ""
21
21
  });
22
22
  }, V = async () => {
23
- u.resource && (i.value = await u.resource(), r.value = i.value.map(
23
+ u.resource && (s.value = await u.resource(), i.value = s.value.map(
24
24
  (e) => ({
25
25
  label: e,
26
26
  value: e.dialCode
27
27
  })
28
28
  ) ?? []);
29
29
  }, c = async (e) => {
30
- e && typeof e == "object" && (o.value = e.dialCode, "number" in e && (a.value = e.number));
30
+ e && typeof e == "object" && (n.value = e.dialCode, "number" in e && (a.value = e.number));
31
31
  };
32
32
  return g(async () => {
33
33
  await V(), c(u.modelValue);
@@ -37,30 +37,31 @@ const j = { class: "h-9 flex input-bg-color input-text-color border input-border
37
37
  c(e);
38
38
  },
39
39
  { immediate: !0 }
40
- ), (e, n) => {
41
- const x = p("t-input-select"), y = p("t-input-text");
42
- return I(), B("div", j, [
43
- m(x, {
44
- modelValue: o.value,
40
+ ), (e, o) => {
41
+ const w = p("t-input-select"), x = p("t-input-text");
42
+ return I(), B("div", k, [
43
+ m(w, {
44
+ modelValue: n.value,
45
45
  "onUpdate:modelValue": [
46
- n[0] || (n[0] = (t) => o.value = t),
46
+ o[0] || (o[0] = (t) => n.value = t),
47
47
  d
48
48
  ],
49
- options: r.value,
50
- "disable-style": !0,
51
- class: "border-r min-w-20 flex justify-center items-center input-border"
49
+ options: i.value,
50
+ "width-class": "min-w-20",
51
+ "border-class": "border-t border-r border-b input-border",
52
+ "roundness-class": ""
52
53
  }, {
53
54
  default: f((t) => [
54
- v("span", null, l(t.flag) + " " + l(t.name) + " +" + l(t.dialCode), 1)
55
+ b("span", null, l(t.flag) + " " + l(t.name) + " +" + l(t.dialCode), 1)
55
56
  ]),
56
57
  selection: f((t) => [
57
- v("span", null, l(t.flag) + " +" + l(t.dialCode), 1)
58
+ b("span", null, l(t.flag) + " +" + l(t.dialCode), 1)
58
59
  ]),
59
60
  _: 1
60
61
  }, 8, ["modelValue", "options"]),
61
- m(y, {
62
+ m(x, {
62
63
  modelValue: a.value,
63
- "onUpdate:modelValue": n[1] || (n[1] = (t) => a.value = t),
64
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a.value = t),
64
65
  "disable-style": !0,
65
66
  class: "w-full input-bg-color input-text-color input-outline input-roundness input-padding",
66
67
  onInput: d
@@ -70,5 +71,5 @@ const j = { class: "h-9 flex input-bg-color input-text-color border input-border
70
71
  }
71
72
  });
72
73
  export {
73
- E as _
74
+ N as _
74
75
  };
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputPrice.vue_vue_type_script_setup_true_lang-DBMW1AwZ.js";
2
- import { p as t } from "./plugin-DgCWOSWh.js";
1
+ import { _ as e } from "./InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js";
2
+ import { p as t } from "./plugin-z8Hr_T_O.js";
3
3
  export {
4
4
  e as InputPrice,
5
5
  t as InputPricePlugin
@@ -0,0 +1,67 @@
1
+ import { defineComponent as p, mergeModels as c, useModel as m, watch as v, resolveComponent as b, openBlock as f, createElementBlock as _, createVNode as g, withDirectives as h, createElementVNode as x, vModelText as N } from "vue";
2
+ const I = {
3
+ options: {
4
+ precision: 2
5
+ },
6
+ inputToPriceNumber(r) {
7
+ return r = r.replace(/[^0-9]/g, "").trim(), r ? parseFloat(r) / Math.pow(10, this.options.precision) : void 0;
8
+ }
9
+ }, M = { class: "flex items-center h-9 w-full input-bg-color input-text-color border input-border input-roundness" }, P = ["disabled"], y = /* @__PURE__ */ p({
10
+ name: "TInputPrice",
11
+ inheritAttrs: !1,
12
+ __name: "InputPrice",
13
+ props: /* @__PURE__ */ c({
14
+ resource: { type: Function },
15
+ disabled: { type: Boolean }
16
+ }, {
17
+ modelValue: {
18
+ default: {
19
+ iso: "",
20
+ value: void 0
21
+ }
22
+ },
23
+ modelModifiers: {}
24
+ }),
25
+ emits: ["update:modelValue"],
26
+ setup(r, { emit: n }) {
27
+ const t = m(r, "modelValue"), i = r, u = (e) => ({
28
+ label: e.symbol,
29
+ value: e.iso
30
+ }), a = (e, o) => {
31
+ if (o === void 0) {
32
+ t.value = { ...t.value };
33
+ return;
34
+ }
35
+ e?.value && e.value !== o?.value && (t.value.value = e.value), e?.iso && e.iso !== o?.iso && (t.value.iso = e.iso);
36
+ }, d = (e) => {
37
+ const s = e.target.value;
38
+ return t.value.value = I.inputToPriceNumber(s), !1;
39
+ };
40
+ return v(t, a, { immediate: !0 }), (e, o) => {
41
+ const s = b("t-input-select");
42
+ return f(), _("div", M, [
43
+ g(s, {
44
+ modelValue: t.value.iso,
45
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value.iso = l),
46
+ resource: i.resource,
47
+ mapper: u,
48
+ "width-class": "w-20",
49
+ "border-class": "border-t border-r border-b input-border",
50
+ "roundness-class": ""
51
+ }, null, 8, ["modelValue", "resource"]),
52
+ h(x("input", {
53
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => t.value.value = l),
54
+ type: "text",
55
+ class: "w-full h-full input-bg-color input-text-color input-outline input-roundness input-padding",
56
+ disabled: i.disabled,
57
+ onInput: d
58
+ }, null, 40, P), [
59
+ [N, t.value.value]
60
+ ])
61
+ ]);
62
+ };
63
+ }
64
+ });
65
+ export {
66
+ y as _
67
+ };
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./InputRadio.vue_vue_type_script_setup_true_lang-Dqbov2kN.js";
2
- import { p as t } from "./plugin-VtriDxZB.js";
1
+ import { _ as a } from "./InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js";
2
+ import { p as t } from "./plugin-Bog7k3Qf.js";
3
3
  export {
4
4
  a as InputRadio,
5
5
  t as InputRadioPlugin
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, inject as e, openBlock as u, createElementBlock as b, createElementVNode as o, unref as r, toDisplayString as v } from "vue";
2
2
  const h = { class: "h-9 inline-flex items-center" }, f = ["value", "name", "disabled", "checked"];
3
3
  let _ = 0;
4
- const k = /* @__PURE__ */ m({
4
+ const g = /* @__PURE__ */ m({
5
5
  name: "TInputRadio",
6
6
  __name: "InputRadio",
7
7
  props: {
@@ -10,25 +10,25 @@ const k = /* @__PURE__ */ m({
10
10
  },
11
11
  setup(t) {
12
12
  const i = `radio_${++_}`, c = e("name", ""), a = t, l = e("model", ""), d = e("change", () => {
13
- }), p = e("disabled", !1);
14
- return (s, n) => (u(), b("div", h, [
13
+ }), s = e("disabled", !1);
14
+ return (p, n) => (u(), b("div", h, [
15
15
  o("input", {
16
16
  value: a.value,
17
17
  name: r(c),
18
18
  id: i,
19
- disabled: r(p),
19
+ disabled: r(s),
20
20
  checked: a.value === r(l),
21
21
  type: "radio",
22
- class: "form-radio relative w-5 h-5 border border-caipira-primary-inverted checked:hover:border-caipira-primary-inverted checked:focus:border-caipira-primary-inverted checked:border-caipira-primary-inverted input-outline focus:input-outline bg-caipira-primary color-caipira-primary cursor-pointer bg-[length:30px]",
22
+ class: "form-radio w-5 h-5 border border-caipira-primary-inverted checked:hover:border-caipira-primary-inverted checked:focus:border-caipira-primary-inverted checked:border-caipira-primary-inverted input-outline focus:input-outline bg-caipira-primary color-caipira-primary",
23
23
  onChange: n[0] || (n[0] = (y) => r(d)(a.value))
24
24
  }, null, 40, f),
25
25
  o("label", {
26
26
  class: "cursor-pointer pl-2 mr-3 input-label",
27
27
  for: i
28
- }, v(s.label), 1)
28
+ }, v(p.label), 1)
29
29
  ]));
30
30
  }
31
31
  });
32
32
  export {
33
- k as _
33
+ g as _
34
34
  };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-ukwmeVxc.js";
2
- import { p as r } from "./plugin-BR7RSh1H.js";
1
+ import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-BlA3DIYZ.js";
2
+ import { p as r } from "./plugin-Daf_swsz.js";
3
3
  export {
4
4
  p as InputSelect,
5
5
  r as InputSelectPlugin
@@ -0,0 +1,232 @@
1
+ import { defineComponent as le, ref as p, computed as I, onBeforeMount as te, watch as D, resolveComponent as w, openBlock as u, createBlock as C, normalizeClass as S, withCtx as x, createElementVNode as ae, withDirectives as oe, createElementBlock as c, vModelText as ne, createCommentVNode as R, createVNode as O, renderSlot as k, normalizeProps as g, mergeProps as z, Fragment as B, renderList as M, guardReactiveProps as K, toDisplayString as ue, createSlots as se, nextTick as ie } from "vue";
2
+ import { a as re, E as pe } from "./ui-BC6H9E93.js";
3
+ const ce = ["placeholder", "disabled", "readonly"], de = { key: 1 }, fe = {
4
+ key: 0,
5
+ class: "inline-flex w-full justify-between items-center"
6
+ }, ve = {
7
+ key: 1,
8
+ class: "inline-flex items-center"
9
+ }, be = /* @__PURE__ */ le({
10
+ name: "TInputSelect",
11
+ __name: "InputSelect",
12
+ props: {
13
+ size: { default: re.Default },
14
+ options: { default: () => [] },
15
+ mapper: { type: Function, default: (f) => ({ value: f.id ?? f.uuid, label: f }) },
16
+ filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
17
+ tooltip: { default: "" },
18
+ disabled: { type: Boolean },
19
+ resource: {},
20
+ multiple: { type: Boolean, default: !1 },
21
+ modelValue: {},
22
+ placeholder: { default: "" },
23
+ initialValue: {},
24
+ isSearchable: { type: Boolean, default: !1 },
25
+ dropdownPlacement: { default: pe.BOTTOM_START },
26
+ widthClass: { default: "w-full" },
27
+ borderClass: { default: "border input-border" },
28
+ roundnessClass: { default: "input-roundness" }
29
+ },
30
+ emits: ["update:model-value"],
31
+ setup(f, { emit: T }) {
32
+ const e = f;
33
+ let $ = !1, V, j = "";
34
+ const U = T, o = p([]), r = p(""), P = p(null), F = p(), s = p(!1), L = p(null), a = p([]), A = p(!1), d = p(null), v = I(() => a.value.length > 0), m = I(() => e.isSearchable && s.value), b = I(() => typeof e.resource == "function"), N = (l) => !e.multiple || !e.modelValue || !Array.isArray(e.modelValue) ? !1 : e.modelValue.includes(l.value), q = (l = e.modelValue) => !(l === void 0 || l === "" || Array.isArray(l) && l.length === 0), G = (l) => {
35
+ U("update:model-value", l);
36
+ }, y = (l = e.modelValue) => {
37
+ if (q(l))
38
+ if (e.multiple)
39
+ Array.isArray(l) && (a.value = l.map(
40
+ (t) => E(t)
41
+ ).filter((t) => t > -1));
42
+ else {
43
+ const t = E(l);
44
+ ~t && (a.value = [t]);
45
+ }
46
+ }, H = (l) => {
47
+ s.value = !s.value, s.value && m.value && ie(() => {
48
+ P.value?.focus();
49
+ });
50
+ }, E = (l) => o.value.findIndex(
51
+ (t) => t.value === l
52
+ ), _ = async (l = !1) => {
53
+ if (!e.resource)
54
+ return;
55
+ A.value = !0;
56
+ const t = {
57
+ t: r.value,
58
+ r: "option"
59
+ };
60
+ l && d.value && d.value.pages > d.value.page ? t.page = d.value.page + 1 : l = !1, !r.value && e.modelValue && (t.i = e.modelValue);
61
+ const i = await e.resource(t);
62
+ l ? o.value.push(...i.items.map(e.mapper)) : o.value = i.items.map(e.mapper), d.value = i.pagination, !b.value && r.value && y(r.value), A.value = !1;
63
+ }, J = () => {
64
+ !r.value || j === r.value || (V && (clearTimeout(V), V = null), V = setTimeout(() => {
65
+ j = r.value, b.value ? (s.value || (s.value = !0), _()) : e.isSearchable && (o.value = e.options.filter(
66
+ (l) => e.filter(r.value, l)
67
+ ));
68
+ }, 500));
69
+ }, Q = ({
70
+ index: l,
71
+ hold: t
72
+ }) => {
73
+ if ($ = !0, e.multiple) {
74
+ const i = a.value.findIndex(
75
+ (h) => h === l
76
+ );
77
+ ~i ? a.value.splice(i, 1) : a.value.push(l);
78
+ } else
79
+ a.value = [l];
80
+ (!e.multiple || !t) && (s.value = !1);
81
+ }, W = () => {
82
+ b.value && d.value && d.value.pages > d.value.page && _(!0);
83
+ }, X = async (l) => {
84
+ switch (l.key) {
85
+ case "ArrowDown":
86
+ L.value?.move(l);
87
+ break;
88
+ case "Escape":
89
+ s.value = !1;
90
+ break;
91
+ }
92
+ };
93
+ return te(async () => {
94
+ b.value ? (await _(), y()) : e.options.length > 0 && (o.value = e.options), !e.modelValue && e.initialValue ? y(e.initialValue) : y(e.modelValue);
95
+ }), D(
96
+ () => e.modelValue,
97
+ async (l) => {
98
+ l && (E(l) < 0 && b.value && await _(), y(l));
99
+ }
100
+ ), D(
101
+ a,
102
+ (l) => {
103
+ const t = e.multiple ? o.value.filter(
104
+ (i, h) => a.value.includes(h)
105
+ ).map((i) => i.value) : o.value[a.value[0]].value;
106
+ $ && ($ = !1, G(t));
107
+ },
108
+ { deep: !0 }
109
+ ), D(
110
+ () => e.options,
111
+ (l) => {
112
+ l.length > 0 && (o.value = l, e.modelValue && a.value.length === 0 && y(e.modelValue));
113
+ }
114
+ ), (l, t) => {
115
+ const i = w("t-tag"), h = w("t-button"), Y = w("t-icon"), Z = w("t-dropdown"), ee = w("t-popover");
116
+ return u(), C(ee, {
117
+ open: s.value,
118
+ "onUpdate:open": t[1] || (t[1] = (n) => s.value = n),
119
+ placement: e.dropdownPlacement,
120
+ class: S([e.widthClass]),
121
+ ref_key: "popoverRef",
122
+ ref: F
123
+ }, {
124
+ default: x(() => [
125
+ ae("div", {
126
+ class: S([{
127
+ "h-9": !e.multiple,
128
+ "h-full *:min-h-9": e.multiple,
129
+ [e.borderClass]: !0,
130
+ [e.roundnessClass]: !0
131
+ }, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
132
+ }, [
133
+ m.value ? oe((u(), c("input", {
134
+ key: 0,
135
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => r.value = n),
136
+ type: "text",
137
+ ref_key: "inputRef",
138
+ ref: P,
139
+ placeholder: e.placeholder,
140
+ disabled: e.disabled,
141
+ readonly: !e.isSearchable,
142
+ class: "w-full h-9 bg-transparent input-padding input-roundness input-outline",
143
+ onInput: J,
144
+ onKeydown: X
145
+ }, null, 40, ce)), [
146
+ [ne, r.value]
147
+ ]) : R("", !0),
148
+ O(h, {
149
+ variant: "transparent",
150
+ size: "",
151
+ class: S(["h-full", {
152
+ "w-full justify-end pr-2": !m.value && !v.value,
153
+ "w-full justify-between pr-2": !m.value && v.value,
154
+ "w-10 justify-center": m.value
155
+ }]),
156
+ "aria-describedby": F.value?.name,
157
+ icon: s.value === !0 ? "chevron-up" : "chevron-down",
158
+ onClick: H
159
+ }, {
160
+ default: x(() => [
161
+ v.value && !m.value ? (u(), c("div", {
162
+ key: 0,
163
+ class: S(["inline-flex items-center ml-2 max-w-[calc(100%-2.5rem)]", {
164
+ "overflow-hidden whitespace-nowrap": !e.multiple,
165
+ "flex-wrap gap-2 py-1": e.multiple
166
+ }])
167
+ }, [
168
+ l.$slots.selection && v.value ? k(l.$slots, "selection", g(z(
169
+ { key: 0 },
170
+ o.value[a.value[0]].label
171
+ ))) : l.$slots.default && v.value ? (u(), c(B, { key: 1 }, [
172
+ e.multiple ? (u(!0), c(B, { key: 0 }, M(a.value, (n) => k(l.$slots, "default", g(K(
173
+ o.value[n].label
174
+ )))), 256)) : k(l.$slots, "default", g(z(
175
+ { key: 1 },
176
+ o.value[a.value[0]].label
177
+ )))
178
+ ], 64)) : v.value ? (u(), c(B, { key: 2 }, [
179
+ e.multiple ? (u(!0), c(B, { key: 0 }, M(a.value, (n) => (u(), C(i, {
180
+ key: n,
181
+ text: o.value[n].label,
182
+ color: "#6e6e6e"
183
+ }, null, 8, ["text"]))), 128)) : (u(), c("span", de, ue(o.value[a.value[0]]?.label), 1))
184
+ ], 64)) : R("", !0)
185
+ ], 2)) : R("", !0)
186
+ ]),
187
+ _: 3
188
+ }, 8, ["aria-describedby", "class", "icon"])
189
+ ], 2)
190
+ ]),
191
+ content: x(() => [
192
+ O(Z, {
193
+ ref_key: "dropdownRef",
194
+ ref: L,
195
+ items: o.value,
196
+ "is-visible": s.value,
197
+ multiple: e.multiple,
198
+ loading: A.value,
199
+ onChange: Q,
200
+ onEndReached: W
201
+ }, se({ _: 2 }, [
202
+ l.$slots.default || e.multiple ? {
203
+ name: "default",
204
+ fn: x((n) => [
205
+ e.multiple ? (u(), c("div", fe, [
206
+ l.$slots.default ? k(l.$slots, "default", g(z({ key: 0 }, n.label))) : (u(), C(i, {
207
+ key: 1,
208
+ text: n.label,
209
+ class: "m-1"
210
+ }, null, 8, ["text"])),
211
+ N(n) ? (u(), C(Y, {
212
+ key: 2,
213
+ icon: "check",
214
+ size: "sm",
215
+ class: "float-right ml-2"
216
+ })) : R("", !0)
217
+ ])) : (u(), c("div", ve, [
218
+ k(l.$slots, "default", g(K(n.label)))
219
+ ]))
220
+ ]),
221
+ key: "0"
222
+ } : void 0
223
+ ]), 1032, ["items", "is-visible", "multiple", "loading"])
224
+ ]),
225
+ _: 3
226
+ }, 8, ["open", "placement", "class"]);
227
+ };
228
+ }
229
+ });
230
+ export {
231
+ be as _
232
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-BNpLdXq7.js";
2
- import { p as m } from "./plugin-Bt6de9ZA.js";
1
+ import { _ as p } from "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
2
+ import { p as m } from "./plugin-Ee4Z5Rtp.js";
3
3
  export {
4
4
  p as Popconfirm,
5
5
  m as PopconfirmPlugin
@@ -0,0 +1,62 @@
1
+ import { defineComponent as C, ref as x, resolveComponent as l, openBlock as b, createBlock as g, withCtx as m, renderSlot as k, normalizeProps as y, guardReactiveProps as P, createElementVNode as t, createVNode as a, toDisplayString as w } from "vue";
2
+ import { E as z } from "./ui-BC6H9E93.js";
3
+ const $ = { class: "text-sm mb-6 inline-flex items-center" }, B = { class: "color-text" }, E = { class: "flex justify-end gap-2" }, O = /* @__PURE__ */ C({
4
+ name: "TPopconfirm",
5
+ __name: "Popconfirm",
6
+ props: {
7
+ message: { default: "" },
8
+ placement: { default: z.BOTTOM }
9
+ },
10
+ emits: ["confirm"],
11
+ setup(c, { emit: f }) {
12
+ const i = c, d = f, o = x(!1), u = (s) => {
13
+ d("confirm"), s(!1);
14
+ };
15
+ return (s, e) => {
16
+ const v = l("t-icon"), r = l("t-button"), _ = l("t-popover");
17
+ return b(), g(_, {
18
+ open: o.value,
19
+ "onUpdate:open": e[2] || (e[2] = (n) => o.value = n),
20
+ placement: i.placement,
21
+ "slot-wrapper-classes": "rounded"
22
+ }, {
23
+ default: m(({ onTogglePopover: n }) => [
24
+ k(s.$slots, "default", y(P({ onTogglePopover: n })))
25
+ ]),
26
+ content: m(({ onTogglePopover: n }) => [
27
+ t("div", {
28
+ class: "px-2 py-3 floatable rounded-sm",
29
+ onClick: e[1] || (e[1] = (p) => o.value = !o.value)
30
+ }, [
31
+ t("p", $, [
32
+ a(v, {
33
+ icon: "info-outline",
34
+ class: "color-caipira-yellow mr-1",
35
+ size: "sm"
36
+ }),
37
+ t("span", B, w(i.message), 1)
38
+ ]),
39
+ t("div", E, [
40
+ a(r, {
41
+ variant: "warning",
42
+ label: "Cancel",
43
+ size: "sm",
44
+ onClick: e[0] || (e[0] = (p) => o.value = !1)
45
+ }),
46
+ a(r, {
47
+ variant: "primary",
48
+ label: "Confirm",
49
+ size: "sm",
50
+ onClick: (p) => u(n)
51
+ }, null, 8, ["onClick"])
52
+ ])
53
+ ])
54
+ ]),
55
+ _: 3
56
+ }, 8, ["open", "placement"]);
57
+ };
58
+ }
59
+ });
60
+ export {
61
+ O as _
62
+ };
package/dist/Popover.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-B4Polh2y.js";
2
- import { p as P } from "./plugin-Dp-F27SY.js";
1
+ import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
2
+ import { p as P } from "./plugin-CdJ1wBq2.js";
3
3
  export {
4
4
  p as Popover,
5
5
  P as PopoverPlugin