@caipira/tamandua 0.0.48 → 0.0.49

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.
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
2
- import { p as t } from "./plugin-DPCk5fFS.js";
1
+ import { _ as e } from "./InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js";
2
+ import { p as t } from "./plugin-4XhHBTQc.js";
3
3
  export {
4
4
  e as InputCheckbox,
5
5
  t as InputCheckboxPlugin
@@ -1,8 +1,8 @@
1
1
  import './InputCheckbox.css';
2
- import { defineComponent as u, ref as c, watch as m, openBlock as f, createElementBlock as b, withDirectives as h, createElementVNode as o, mergeProps as v, vModelCheckbox as k, toDisplayString as y } from "vue";
3
- const x = { class: "h-9 inline-flex items-center" }, _ = ["indeterminate", "disabled"];
4
- let B = 0;
5
- const V = /* @__PURE__ */ u({
2
+ import { defineComponent as c, ref as m, watch as b, openBlock as o, createElementBlock as r, withDirectives as f, createElementVNode as h, mergeProps as v, vModelCheckbox as k, toDisplayString as y, createCommentVNode as x } from "vue";
3
+ const _ = { class: "h-9 inline-flex items-center" }, B = ["indeterminate", "disabled"];
4
+ let V = 0;
5
+ const I = /* @__PURE__ */ c({
6
6
  name: "TInputCheckbox",
7
7
  __name: "InputCheckbox",
8
8
  props: {
@@ -13,37 +13,38 @@ const V = /* @__PURE__ */ u({
13
13
  initializeValue: { type: Boolean, default: !1 }
14
14
  },
15
15
  emits: ["update:model-value", "input"],
16
- setup(r, { emit: d }) {
17
- const t = r, i = d, l = `checkbox_${++B}`, a = c(!1), s = () => {
16
+ setup(d, { emit: s }) {
17
+ const t = d, l = s, i = `checkbox_${++V}`, a = m(!1), p = () => {
18
18
  const e = !a.value;
19
- i("update:model-value", e), i("input", e);
19
+ l("update:model-value", e), l("input", e);
20
20
  };
21
- return m(
21
+ return b(
22
22
  () => t.modelValue,
23
23
  (e) => {
24
- t.initializeValue && typeof e > "u" && i("update:model-value", !1), a.value = e;
24
+ t.initializeValue && typeof e > "u" && l("update:model-value", !1), a.value = e;
25
25
  },
26
26
  { immediate: !0 }
27
- ), (e, n) => (f(), b("div", x, [
28
- h(o("input", v({
29
- "onUpdate:modelValue": n[0] || (n[0] = (p) => a.value = p)
27
+ ), (e, n) => (o(), r("div", _, [
28
+ f(h("input", v({
29
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => a.value = u)
30
30
  }, e.$attrs, {
31
31
  type: "checkbox",
32
32
  class: "form-checkbox w-5 h-5 border input-border input-roundness color-caipira-primary-inverted bg-caipira-primary checked:bg-caipira-primary-inverted input-outline",
33
33
  indeterminate: t.isIndeterminate,
34
- id: l,
34
+ id: i,
35
35
  disabled: e.disabled,
36
- onInput: s
37
- }), null, 16, _), [
36
+ onInput: p
37
+ }), null, 16, B), [
38
38
  [k, a.value]
39
39
  ]),
40
- o("label", {
40
+ t.label ? (o(), r("label", {
41
+ key: 0,
41
42
  class: "cursor-pointer pl-2 mr-3 input-label",
42
- for: l
43
- }, y(t.label), 1)
43
+ for: i
44
+ }, y(t.label), 1)) : x("", !0)
44
45
  ]));
45
46
  }
46
47
  });
47
48
  export {
48
- V as _
49
+ I as _
49
50
  };
@@ -1,5 +1,5 @@
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";
1
+ import { _ as e } from "./InputPrice.vue_vue_type_script_setup_true_lang-C2wDVwnm.js";
2
+ import { p as t } from "./plugin-CQ-FpZui.js";
3
3
  export {
4
4
  e as InputPrice,
5
5
  t as InputPricePlugin
@@ -0,0 +1,80 @@
1
+ import { defineComponent as v, mergeModels as a, useModel as b, watch as f, resolveComponent as g, openBlock as x, createElementBlock as y, createVNode as I, withDirectives as N, createElementVNode as M, vModelText as P } from "vue";
2
+ const _ = {
3
+ options: {
4
+ precision: 2
5
+ },
6
+ inputToPriceNumber(l) {
7
+ return l = l.replace(/[^0-9]/g, "").trim(), l ? parseFloat(l) / Math.pow(10, this.options.precision) : void 0;
8
+ }
9
+ }, k = { class: "flex items-center h-9 w-full input-bg-color input-text-color border input-border input-roundness" }, B = ["disabled"], h = /* @__PURE__ */ v({
10
+ name: "TInputPrice",
11
+ inheritAttrs: !1,
12
+ __name: "InputPrice",
13
+ props: /* @__PURE__ */ a({
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: /* @__PURE__ */ a(["keyup", "blur"], ["update:modelValue"]),
26
+ setup(l, { emit: s }) {
27
+ const e = b(l, "modelValue"), n = s, i = l, d = (o) => ({
28
+ label: o.symbol,
29
+ value: o.iso
30
+ }), p = (o, t) => {
31
+ if (t === void 0) {
32
+ e.value = { ...e.value };
33
+ return;
34
+ }
35
+ o?.value && o.value !== t?.value && (e.value.value = o.value), o?.iso && o.iso !== t?.iso && (e.value.iso = o.iso);
36
+ }, c = (o) => {
37
+ e.value = {
38
+ ...e.value,
39
+ iso: o
40
+ };
41
+ }, m = (o) => {
42
+ const u = o.target.value;
43
+ e.value = {
44
+ ...e.value,
45
+ value: _.inputToPriceNumber(u)
46
+ };
47
+ };
48
+ return f(e, p, { immediate: !0 }), (o, t) => {
49
+ const u = g("t-input-select");
50
+ return x(), y("div", k, [
51
+ I(u, {
52
+ modelValue: e.value.iso,
53
+ "onUpdate:modelValue": [
54
+ t[0] || (t[0] = (r) => e.value.iso = r),
55
+ c
56
+ ],
57
+ resource: i.resource,
58
+ mapper: d,
59
+ "width-class": "w-20",
60
+ "border-class": "border-t border-r border-b input-border",
61
+ "roundness-class": ""
62
+ }, null, 8, ["modelValue", "resource"]),
63
+ N(M("input", {
64
+ "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.value = r),
65
+ type: "text",
66
+ class: "w-full h-full input-bg-color input-text-color input-outline input-roundness input-padding",
67
+ disabled: i.disabled,
68
+ onInput: m,
69
+ onKeyup: t[2] || (t[2] = (r) => n("keyup", r)),
70
+ onBlur: t[3] || (t[3] = (r) => n("blur", r))
71
+ }, null, 40, B), [
72
+ [P, e.value.value]
73
+ ])
74
+ ]);
75
+ };
76
+ }
77
+ });
78
+ export {
79
+ h as _
80
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js";
2
- import { p as r } from "./plugin-XDIORJya.js";
1
+ import { _ as p } from "./InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js";
2
+ import { p as r } from "./plugin-C77cnZuW.js";
3
3
  export {
4
4
  p as InputSelect,
5
5
  r as InputSelectPlugin
@@ -0,0 +1,226 @@
1
+ import { defineComponent as oe, mergeModels as O, useModel as ue, ref as p, computed as E, onBeforeMount as se, watch as I, resolveComponent as g, openBlock as i, createBlock as D, normalizeClass as x, withCtx as R, createElementVNode as K, createVNode as N, renderSlot as k, normalizeProps as _, mergeProps as z, createElementBlock as d, Fragment as V, renderList as U, guardReactiveProps as q, toDisplayString as G, createCommentVNode as M, withDirectives as ie, vModelText as re, createSlots as ce, createTextVNode as pe, nextTick as de } from "vue";
2
+ import { a as fe, E as ve } from "./ui-BC6H9E93.js";
3
+ const me = { key: 1 }, ye = ["placeholder", "disabled", "readonly"], he = {
4
+ key: 0,
5
+ class: "inline-flex w-full justify-between items-center"
6
+ }, be = {
7
+ key: 1,
8
+ class: "inline-flex items-center"
9
+ }, ke = /* @__PURE__ */ oe({
10
+ name: "TInputSelect",
11
+ __name: "InputSelect",
12
+ props: /* @__PURE__ */ O({
13
+ size: { default: fe.Default },
14
+ options: { default: () => [] },
15
+ mapper: { type: Function, default: (f) => ({
16
+ value: f.id ?? f.uuid,
17
+ label: f
18
+ }) },
19
+ filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
20
+ tooltip: { default: "" },
21
+ disabled: { type: Boolean },
22
+ resource: {},
23
+ multiple: { type: Boolean, default: !1 },
24
+ placeholder: { default: "" },
25
+ initialValue: {},
26
+ isSearchable: { type: Boolean, default: !1 },
27
+ dropdownPlacement: { default: ve.BOTTOM_START },
28
+ widthClass: { default: "w-full" },
29
+ borderClass: { default: "border input-border" },
30
+ roundnessClass: { default: "input-roundness" }
31
+ }, {
32
+ modelValue: {},
33
+ modelModifiers: {}
34
+ }),
35
+ emits: /* @__PURE__ */ O(["update:model-value"], ["update:modelValue"]),
36
+ setup(f, { emit: T }) {
37
+ const l = f;
38
+ let B = !1, C, j = "";
39
+ const H = T, u = ue(f, "modelValue"), n = p([]), c = p(""), P = p(null), F = p(), s = p(!1), L = p(null), a = p([]), $ = p(!1), v = p(null), y = E(() => a.value.length > 0), h = E(() => l.isSearchable && s.value), b = E(() => typeof l.resource == "function"), J = (e) => !l.multiple || !u.value || !Array.isArray(u.value) ? !1 : u.value.includes(e.value), Q = (e = u.value) => !(e === void 0 || e === "" || Array.isArray(e) && e.length === 0), W = (e) => {
40
+ H("update:model-value", e);
41
+ }, m = (e = u.value) => {
42
+ if (Q(e))
43
+ if (l.multiple)
44
+ Array.isArray(e) && (a.value = e.map(
45
+ (t) => A(t)
46
+ ).filter((t) => t > -1));
47
+ else {
48
+ const t = A(e);
49
+ ~t && (a.value = [t]);
50
+ }
51
+ }, X = (e) => {
52
+ s.value = !s.value, s.value && h.value && de(() => {
53
+ P.value?.focus();
54
+ });
55
+ }, A = (e) => n.value.findIndex(
56
+ (t) => t.value === e
57
+ ), S = async (e = !1) => {
58
+ if (!l.resource)
59
+ return;
60
+ $.value = !0;
61
+ const t = {
62
+ t: c.value,
63
+ r: "option"
64
+ };
65
+ e && v.value && v.value.pages > v.value.page ? t.page = v.value.page + 1 : e = !1, !c.value && u.value && (t.i = u.value);
66
+ const r = await l.resource(t);
67
+ e ? n.value.push(...r.items.map(l.mapper)) : n.value = r.items.map(l.mapper), v.value = r.pagination, !b.value && c.value && m(c.value), $.value = !1;
68
+ }, Y = () => {
69
+ !c.value || j === c.value || (C && (clearTimeout(C), C = null), C = setTimeout(() => {
70
+ j = c.value, b.value ? (s.value || (s.value = !0), S()) : l.isSearchable && (n.value = l.options.filter(
71
+ (e) => l.filter(c.value, e)
72
+ ));
73
+ }, 500));
74
+ }, Z = ({
75
+ index: e,
76
+ hold: t
77
+ }) => {
78
+ if (B = !0, l.multiple) {
79
+ const r = a.value.findIndex(
80
+ (w) => w === e
81
+ );
82
+ ~r ? a.value.splice(r, 1) : a.value.push(e);
83
+ } else
84
+ a.value = [e];
85
+ (!l.multiple || !t) && (s.value = !1);
86
+ }, ee = () => {
87
+ b.value && v.value && v.value.pages > v.value.page && S(!0);
88
+ }, le = async (e) => {
89
+ switch (e.key) {
90
+ case "ArrowDown":
91
+ L.value?.move(e);
92
+ break;
93
+ case "Escape":
94
+ s.value = !1;
95
+ break;
96
+ }
97
+ };
98
+ return se(async () => {
99
+ b.value ? (await S(), m()) : l.options.length > 0 && (n.value = l.options), !u.value && l.initialValue ? m(l.initialValue) : m(u.value);
100
+ }), I(
101
+ () => u.value,
102
+ async (e) => {
103
+ e && (A(e) < 0 && b.value && await S(), m(e));
104
+ }
105
+ ), I(
106
+ a,
107
+ (e) => {
108
+ const t = l.multiple ? n.value.filter(
109
+ (r, w) => a.value.includes(w)
110
+ ).map((r) => r.value) : n.value[a.value[0]].value;
111
+ B && (B = !1, W(t));
112
+ },
113
+ { deep: !0 }
114
+ ), I(
115
+ () => l.options,
116
+ (e) => {
117
+ e.length > 0 && (n.value = e, u.value && a.value.length === 0 && m(u.value));
118
+ }
119
+ ), (e, t) => {
120
+ const r = g("t-tag"), w = g("t-button"), te = g("t-icon"), ae = g("t-dropdown"), ne = g("t-popover");
121
+ return i(), D(ne, {
122
+ open: s.value,
123
+ "onUpdate:open": t[1] || (t[1] = (o) => s.value = o),
124
+ placement: l.dropdownPlacement,
125
+ class: x([l.widthClass]),
126
+ ref_key: "popoverRef",
127
+ ref: F
128
+ }, {
129
+ default: R(() => [
130
+ K("div", {
131
+ class: x([{
132
+ "h-9": !l.multiple,
133
+ "h-full *:min-h-9": l.multiple,
134
+ [l.borderClass]: !0,
135
+ [l.roundnessClass]: !0
136
+ }, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
137
+ }, [
138
+ N(w, {
139
+ variant: "transparent",
140
+ size: "",
141
+ class: x(["h-full", {
142
+ "w-full justify-end pr-2": !h.value && !y.value,
143
+ "w-full justify-between pr-2": !h.value && y.value,
144
+ "w-10 justify-center": h.value
145
+ }]),
146
+ "aria-describedby": F.value?.name,
147
+ icon: s.value === !0 ? "chevron-up" : "chevron-down",
148
+ onClick: X
149
+ }, {
150
+ default: R(() => [
151
+ K("div", {
152
+ class: x(["inline-flex items-center ml-2 max-w-[calc(100%-2.5rem)]", {
153
+ "overflow-hidden whitespace-nowrap": !l.multiple,
154
+ "flex-wrap gap-2 py-1": l.multiple
155
+ }])
156
+ }, [
157
+ e.$slots.selection && y.value ? k(e.$slots, "selection", _(z({ key: 0 }, n.value[a.value[0]]))) : e.$slots.default && y.value ? (i(), d(V, { key: 1 }, [
158
+ l.multiple ? (i(!0), d(V, { key: 0 }, U(a.value, (o) => k(e.$slots, "default", _(q(n.value[o])))), 256)) : k(e.$slots, "default", _(z({ key: 1 }, n.value[a.value[0]])))
159
+ ], 64)) : y.value ? (i(), d(V, { key: 2 }, [
160
+ l.multiple ? (i(!0), d(V, { key: 0 }, U(a.value, (o) => (i(), D(r, {
161
+ key: o,
162
+ text: n.value[o].label,
163
+ color: "#6e6e6e"
164
+ }, null, 8, ["text"]))), 128)) : (i(), d("span", me, G(n.value[a.value[0]]?.label), 1))
165
+ ], 64)) : M("", !0)
166
+ ], 2)
167
+ ]),
168
+ _: 3
169
+ }, 8, ["aria-describedby", "class", "icon"]),
170
+ h.value ? ie((i(), d("input", {
171
+ key: 0,
172
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => c.value = o),
173
+ type: "text",
174
+ ref_key: "inputRef",
175
+ ref: P,
176
+ placeholder: l.placeholder,
177
+ disabled: l.disabled,
178
+ readonly: !l.isSearchable,
179
+ class: "h-9 bg-transparent input-padding input-roundness input-outline",
180
+ onInput: Y,
181
+ onKeydown: le
182
+ }, null, 40, ye)), [
183
+ [re, c.value]
184
+ ]) : M("", !0)
185
+ ], 2)
186
+ ]),
187
+ content: R(() => [
188
+ N(ae, {
189
+ ref_key: "dropdownRef",
190
+ ref: L,
191
+ items: n.value,
192
+ "is-visible": s.value,
193
+ multiple: l.multiple,
194
+ loading: $.value,
195
+ onChange: Z,
196
+ onEndReached: ee
197
+ }, ce({ _: 2 }, [
198
+ e.$slots.default || l.multiple ? {
199
+ name: "default",
200
+ fn: R((o) => [
201
+ l.multiple ? (i(), d("div", he, [
202
+ e.$slots.default ? k(e.$slots, "default", _(z({ key: 0 }, o))) : (i(), d(V, { key: 1 }, [
203
+ pe(G(o.label), 1)
204
+ ], 64)),
205
+ J(o) ? (i(), D(te, {
206
+ key: 2,
207
+ icon: "check",
208
+ size: "sm",
209
+ class: "float-right ml-2"
210
+ })) : M("", !0)
211
+ ])) : (i(), d("div", be, [
212
+ k(e.$slots, "default", _(q(o)))
213
+ ]))
214
+ ]),
215
+ key: "0"
216
+ } : void 0
217
+ ]), 1032, ["items", "is-visible", "multiple", "loading"])
218
+ ]),
219
+ _: 3
220
+ }, 8, ["open", "placement", "class"]);
221
+ };
222
+ }
223
+ });
224
+ export {
225
+ ke as _
226
+ };
@@ -15,17 +15,17 @@ import { _ as v } from "./GraphySubtitle.vue_vue_type_script_setup_true_lang-DsB
15
15
  import { _ as F } from "./GraphyTitle.vue_vue_type_script_setup_true_lang-DXnrZHV2.js";
16
16
  import { _ as B } from "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
17
17
  import { _ as A } from "./InputAvatar.vue_vue_type_script_setup_true_lang-coNpUH5g.js";
18
- import { _ as R } from "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
18
+ import { _ as R } from "./InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js";
19
19
  import { _ as q } from "./InputCryptoCurrency.vue_vue_type_script_setup_true_lang-BIUT5eCh.js";
20
20
  import { _ as H } from "./InputColor.vue_vue_type_script_setup_true_lang-DT-MAgI2.js";
21
21
  import { _ as K } from "./InputDate.vue_vue_type_script_setup_true_lang-BAgG9zPV.js";
22
22
  import { _ as O } from "./InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js";
23
23
  import { _ as U } from "./InputPassword.vue_vue_type_script_setup_true_lang-BghMiF8B.js";
24
24
  import { _ as W } from "./InputPhone.vue_vue_type_script_setup_true_lang-B4TULqLW.js";
25
- import { _ as Y } from "./InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js";
25
+ import { _ as Y } from "./InputPrice.vue_vue_type_script_setup_true_lang-C2wDVwnm.js";
26
26
  import { _ as $ } from "./InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js";
27
27
  import "vue";
28
- import { _ as or } from "./InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js";
28
+ import { _ as or } from "./InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js";
29
29
  import { _ as er } from "./InputSwitch.vue_vue_type_script_setup_true_lang-Q3wQlqfk.js";
30
30
  import { _ as ar } from "./InputText.vue_vue_type_script_setup_true_lang-JLAlUE_2.js";
31
31
  import { _ as sr } from "./InputTextarea.vue_vue_type_script_setup_true_lang-DRo5eIw4.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
2
+ import { _ as s } from "./InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js";
2
+ import { _ as s } from "./InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js";
2
+ import { _ as s } from "./InputPrice.vue_vue_type_script_setup_true_lang-C2wDVwnm.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -24,19 +24,19 @@ import { p as e } from "./plugin-DOeDaXWj.js";
24
24
  import "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
25
25
  import { p as $ } from "./plugin-Dk3KBChD.js";
26
26
  import { p as I } from "./plugin--F5QK2vy.js";
27
- import "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
28
- import { p as c } from "./plugin-DPCk5fFS.js";
27
+ import "./InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js";
28
+ import { p as c } from "./plugin-4XhHBTQc.js";
29
29
  import { p as h } from "./plugin-Bq4nQPd4.js";
30
30
  import { p as y } from "./plugin-D9KHvOM3.js";
31
31
  import { p as b } from "./plugin-BtF6kCcf.js";
32
32
  import { p as d } from "./plugin-Br-QOjhk.js";
33
33
  import { p as T } from "./plugin-BT2ef1QG.js";
34
34
  import { p as C } from "./plugin-CrHDShgh.js";
35
- import { p as S } from "./plugin-z8Hr_T_O.js";
35
+ import { p as S } from "./plugin-CQ-FpZui.js";
36
36
  import "./InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js";
37
37
  import { p as v } from "./plugin-Y4yYnlO3.js";
38
- import "./InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js";
39
- import { p as G } from "./plugin-XDIORJya.js";
38
+ import "./InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js";
39
+ import { p as G } from "./plugin-C77cnZuW.js";
40
40
  import { p as k } from "./plugin-BZOU6h10.js";
41
41
  import { p as w } from "./plugin-lYDlOt8p.js";
42
42
  import { p as x } from "./plugin-BQFwx3d5.js";
package/dist/plugins.js CHANGED
@@ -24,19 +24,19 @@ import { p as X } from "./plugin-DOeDaXWj.js";
24
24
  import "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
25
25
  import { p as Z } from "./plugin-Dk3KBChD.js";
26
26
  import { p as $ } from "./plugin--F5QK2vy.js";
27
- import "./InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js";
28
- import { p as or } from "./plugin-DPCk5fFS.js";
27
+ import "./InputCheckbox.vue_vue_type_style_index_0_lang-DnRqQiOj.js";
28
+ import { p as or } from "./plugin-4XhHBTQc.js";
29
29
  import { p as tr } from "./plugin-Bq4nQPd4.js";
30
30
  import { p as er } from "./plugin-D9KHvOM3.js";
31
31
  import { p as nr } from "./plugin-BtF6kCcf.js";
32
32
  import { p as ur } from "./plugin-Br-QOjhk.js";
33
33
  import { p as Pr } from "./plugin-BT2ef1QG.js";
34
34
  import { p as gr } from "./plugin-CrHDShgh.js";
35
- import { p as fr } from "./plugin-z8Hr_T_O.js";
35
+ import { p as fr } from "./plugin-CQ-FpZui.js";
36
36
  import "./InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js";
37
37
  import { p as cr } from "./plugin-Y4yYnlO3.js";
38
- import "./InputSelect.vue_vue_type_script_setup_true_lang-BDqMGvuy.js";
39
- import { p as yr } from "./plugin-XDIORJya.js";
38
+ import "./InputSelect.vue_vue_type_script_setup_true_lang-B89uyzj-.js";
39
+ import { p as yr } from "./plugin-C77cnZuW.js";
40
40
  import { p as Cr } from "./plugin-BZOU6h10.js";
41
41
  import { p as br } from "./plugin-lYDlOt8p.js";
42
42
  import { p as Sr } from "./plugin-BQFwx3d5.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-CfuHgVBl.js";
1
+ import { p as n } from "./plugins-CkB_la4g.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Price: (args: any) => {
6
+ setup(): {
7
+ args: any;
8
+ onEnter: (newValue: any) => void;
9
+ onUpdate: (newValue: any) => void;
10
+ getCurrencies: () => Promise<unknown>;
11
+ };
12
+ template: string;
13
+ };
@@ -8,7 +8,10 @@ declare const _default: import('vue').DefineComponent<{
8
8
  disabled: {
9
9
  type: import("vue").PropType<boolean>;
10
10
  };
11
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ keyup: (val: KeyboardEvent) => void;
13
+ blur: (val: Event) => void;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
15
  modelValue: import("vue").PropType<InputPriceModel>;
13
16
  resource: {
14
17
  type: import("vue").PropType<() => any>;
@@ -16,5 +19,8 @@ declare const _default: import('vue').DefineComponent<{
16
19
  disabled: {
17
20
  type: import("vue").PropType<boolean>;
18
21
  };
19
- }>>, {}, {}>;
22
+ }>> & {
23
+ onBlur?: ((val: Event) => any) | undefined;
24
+ onKeyup?: ((val: KeyboardEvent) => any) | undefined;
25
+ }, {}, {}>;
20
26
  export default _default;
@@ -6,4 +6,7 @@ export type InputPriceProps = {
6
6
  resource?: () => any;
7
7
  disabled?: boolean;
8
8
  };
9
- export type InputPriceEvents = {};
9
+ export type InputPriceEvents = {
10
+ (e: "keyup", val: KeyboardEvent): void;
11
+ (e: "blur", val: Event): void;
12
+ };
@@ -1,43 +1,135 @@
1
1
  import { ElementSize, ElementPosition } from '../../enums/ui.js';
2
- import { InputSelectProps, InputSelectOption, SelectValuePrimitives } from './types.js';
2
+ import { InputSelectValue, InputSelectOption, SelectValuePrimitives } from './types.js';
3
3
  import { APISearchFilters } from '../../types/api.js';
4
4
  import { Pagination } from '../../types/ui.js';
5
5
 
6
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputSelectProps>, {
7
- size: ElementSize;
8
- options: () => never[];
9
- mapper: (i: any) => InputSelectOption;
10
- filter: (input: string, option: InputSelectOption) => boolean;
11
- tooltip: string;
12
- multiple: boolean;
13
- placeholder: string;
14
- isSearchable: boolean;
15
- dropdownPlacement: ElementPosition;
16
- /**
17
- * CSS Classes
18
- */
19
- widthClass: string;
20
- borderClass: string;
21
- roundnessClass: string;
22
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
7
+ modelValue: import("vue").PropType<InputSelectValue>;
8
+ filter: {
9
+ type: import("vue").PropType<(input: string, option: InputSelectOption) => boolean>;
10
+ default: (input: string, option: InputSelectOption) => boolean;
11
+ };
12
+ size: {
13
+ type: import("vue").PropType<ElementSize>;
14
+ default: ElementSize;
15
+ };
16
+ multiple: {
17
+ type: import("vue").PropType<boolean>;
18
+ default: boolean;
19
+ };
20
+ disabled: {
21
+ type: import("vue").PropType<boolean>;
22
+ };
23
+ options: {
24
+ type: import("vue").PropType<InputSelectOption[]>;
25
+ default: () => never[];
26
+ };
27
+ initialValue: {
28
+ type: import("vue").PropType<any>;
29
+ };
30
+ placeholder: {
31
+ type: import("vue").PropType<string>;
32
+ default: string;
33
+ };
34
+ resource: {
35
+ type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
36
+ items: unknown[];
37
+ pagination: Pagination;
38
+ }>>;
39
+ };
40
+ mapper: {
41
+ type: import("vue").PropType<(i: any) => InputSelectOption>;
42
+ default: (i: any) => InputSelectOption;
43
+ };
44
+ tooltip: {
45
+ type: import("vue").PropType<string>;
46
+ default: string;
47
+ };
48
+ isSearchable: {
49
+ type: import("vue").PropType<boolean>;
50
+ default: boolean;
51
+ };
52
+ dropdownPlacement: {
53
+ type: import("vue").PropType<"top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start">;
54
+ default: ElementPosition;
55
+ };
56
+ widthClass: {
57
+ type: import("vue").PropType<string>;
58
+ default: string;
59
+ };
60
+ borderClass: {
61
+ type: import("vue").PropType<string>;
62
+ default: string;
63
+ };
64
+ roundnessClass: {
65
+ type: import("vue").PropType<string>;
66
+ default: string;
67
+ };
68
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
69
  "update:model-value": (val: any) => void;
24
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputSelectProps>, {
25
- size: ElementSize;
26
- options: () => never[];
27
- mapper: (i: any) => InputSelectOption;
28
- filter: (input: string, option: InputSelectOption) => boolean;
29
- tooltip: string;
30
- multiple: boolean;
31
- placeholder: string;
32
- isSearchable: boolean;
33
- dropdownPlacement: ElementPosition;
34
- /**
35
- * CSS Classes
36
- */
37
- widthClass: string;
38
- borderClass: string;
39
- roundnessClass: string;
40
- }>>> & {
70
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
71
+ modelValue: import("vue").PropType<InputSelectValue>;
72
+ filter: {
73
+ type: import("vue").PropType<(input: string, option: InputSelectOption) => boolean>;
74
+ default: (input: string, option: InputSelectOption) => boolean;
75
+ };
76
+ size: {
77
+ type: import("vue").PropType<ElementSize>;
78
+ default: ElementSize;
79
+ };
80
+ multiple: {
81
+ type: import("vue").PropType<boolean>;
82
+ default: boolean;
83
+ };
84
+ disabled: {
85
+ type: import("vue").PropType<boolean>;
86
+ };
87
+ options: {
88
+ type: import("vue").PropType<InputSelectOption[]>;
89
+ default: () => never[];
90
+ };
91
+ initialValue: {
92
+ type: import("vue").PropType<any>;
93
+ };
94
+ placeholder: {
95
+ type: import("vue").PropType<string>;
96
+ default: string;
97
+ };
98
+ resource: {
99
+ type: import("vue").PropType<(filters?: APISearchFilters | undefined) => Promise<{
100
+ items: unknown[];
101
+ pagination: Pagination;
102
+ }>>;
103
+ };
104
+ mapper: {
105
+ type: import("vue").PropType<(i: any) => InputSelectOption>;
106
+ default: (i: any) => InputSelectOption;
107
+ };
108
+ tooltip: {
109
+ type: import("vue").PropType<string>;
110
+ default: string;
111
+ };
112
+ isSearchable: {
113
+ type: import("vue").PropType<boolean>;
114
+ default: boolean;
115
+ };
116
+ dropdownPlacement: {
117
+ type: import("vue").PropType<"top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start">;
118
+ default: ElementPosition;
119
+ };
120
+ widthClass: {
121
+ type: import("vue").PropType<string>;
122
+ default: string;
123
+ };
124
+ borderClass: {
125
+ type: import("vue").PropType<string>;
126
+ default: string;
127
+ };
128
+ roundnessClass: {
129
+ type: import("vue").PropType<string>;
130
+ default: string;
131
+ };
132
+ }>> & {
41
133
  "onUpdate:model-value"?: ((val: any) => any) | undefined;
42
134
  }, {
43
135
  filter: (input: string, option: InputSelectOption) => boolean;
@@ -84,23 +176,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
84
176
  default?(_: any): any;
85
177
  }>;
86
178
  export default _default;
87
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
88
- type __VLS_TypePropsToRuntimeProps<T> = {
89
- [K in keyof T]-?: {} extends Pick<T, K> ? {
90
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
91
- } : {
92
- type: import('vue').PropType<T[K]>;
93
- required: true;
94
- };
95
- };
96
- type __VLS_WithDefaults<P, D> = {
97
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
98
- default: D[K];
99
- }> : P[K];
100
- };
101
- type __VLS_Prettify<T> = {
102
- [K in keyof T]: T[K];
103
- } & {};
104
179
  type __VLS_WithTemplateSlots<T, S> = T & {
105
180
  new (): {
106
181
  $slots: S;
@@ -48,7 +48,6 @@ export type InputSelectProps = {
48
48
  pagination: Pagination;
49
49
  }>;
50
50
  multiple?: boolean;
51
- modelValue?: InputSelectValue;
52
51
  placeholder?: string;
53
52
  initialValue?: any;
54
53
  /** Indicates whether the user can search the options */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -1,67 +0,0 @@
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,227 +0,0 @@
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
- }, he = /* @__PURE__ */ le({
10
- name: "TInputSelect",
11
- __name: "InputSelect",
12
- props: {
13
- size: { default: re.Default },
14
- options: { default: () => [] },
15
- mapper: { type: Function, default: (f) => ({
16
- value: f.id ?? f.uuid,
17
- label: f
18
- }) },
19
- filter: { type: Function, default: (f, T) => T.label.toLowerCase().indexOf(f.toLowerCase()) >= 0 },
20
- tooltip: { default: "" },
21
- disabled: { type: Boolean },
22
- resource: {},
23
- multiple: { type: Boolean, default: !1 },
24
- modelValue: {},
25
- placeholder: { default: "" },
26
- initialValue: {},
27
- isSearchable: { type: Boolean, default: !1 },
28
- dropdownPlacement: { default: pe.BOTTOM_START },
29
- widthClass: { default: "w-full" },
30
- borderClass: { default: "border input-border" },
31
- roundnessClass: { default: "input-roundness" }
32
- },
33
- emits: ["update:model-value"],
34
- setup(f, { emit: T }) {
35
- const e = f;
36
- let $ = !1, V, j = "";
37
- 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), h = 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) => {
38
- U("update:model-value", l);
39
- }, y = (l = e.modelValue) => {
40
- if (q(l))
41
- if (e.multiple)
42
- Array.isArray(l) && (a.value = l.map(
43
- (t) => E(t)
44
- ).filter((t) => t > -1));
45
- else {
46
- const t = E(l);
47
- ~t && (a.value = [t]);
48
- }
49
- }, H = (l) => {
50
- s.value = !s.value, s.value && m.value && ie(() => {
51
- P.value?.focus();
52
- });
53
- }, E = (l) => o.value.findIndex(
54
- (t) => t.value === l
55
- ), _ = async (l = !1) => {
56
- if (!e.resource)
57
- return;
58
- A.value = !0;
59
- const t = {
60
- t: r.value,
61
- r: "option"
62
- };
63
- 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);
64
- const i = await e.resource(t);
65
- l ? o.value.push(...i.items.map(e.mapper)) : o.value = i.items.map(e.mapper), d.value = i.pagination, !h.value && r.value && y(r.value), A.value = !1;
66
- }, J = () => {
67
- !r.value || j === r.value || (V && (clearTimeout(V), V = null), V = setTimeout(() => {
68
- j = r.value, h.value ? (s.value || (s.value = !0), _()) : e.isSearchable && (o.value = e.options.filter(
69
- (l) => e.filter(r.value, l)
70
- ));
71
- }, 500));
72
- }, Q = ({
73
- index: l,
74
- hold: t
75
- }) => {
76
- if ($ = !0, e.multiple) {
77
- const i = a.value.findIndex(
78
- (b) => b === l
79
- );
80
- ~i ? a.value.splice(i, 1) : a.value.push(l);
81
- } else
82
- a.value = [l];
83
- (!e.multiple || !t) && (s.value = !1);
84
- }, W = () => {
85
- h.value && d.value && d.value.pages > d.value.page && _(!0);
86
- }, X = async (l) => {
87
- switch (l.key) {
88
- case "ArrowDown":
89
- L.value?.move(l);
90
- break;
91
- case "Escape":
92
- s.value = !1;
93
- break;
94
- }
95
- };
96
- return te(async () => {
97
- h.value ? (await _(), y()) : e.options.length > 0 && (o.value = e.options), !e.modelValue && e.initialValue ? y(e.initialValue) : y(e.modelValue);
98
- }), D(
99
- () => e.modelValue,
100
- async (l) => {
101
- l && (E(l) < 0 && h.value && await _(), y(l));
102
- }
103
- ), D(
104
- a,
105
- (l) => {
106
- const t = e.multiple ? o.value.filter(
107
- (i, b) => a.value.includes(b)
108
- ).map((i) => i.value) : o.value[a.value[0]].value;
109
- $ && ($ = !1, G(t));
110
- },
111
- { deep: !0 }
112
- ), D(
113
- () => e.options,
114
- (l) => {
115
- l.length > 0 && (o.value = l, e.modelValue && a.value.length === 0 && y(e.modelValue));
116
- }
117
- ), (l, t) => {
118
- const i = w("t-tag"), b = w("t-button"), Y = w("t-icon"), Z = w("t-dropdown"), ee = w("t-popover");
119
- return u(), C(ee, {
120
- open: s.value,
121
- "onUpdate:open": t[1] || (t[1] = (n) => s.value = n),
122
- placement: e.dropdownPlacement,
123
- class: S([e.widthClass]),
124
- ref_key: "popoverRef",
125
- ref: F
126
- }, {
127
- default: x(() => [
128
- ae("div", {
129
- class: S([{
130
- "h-9": !e.multiple,
131
- "h-full *:min-h-9": e.multiple,
132
- [e.borderClass]: !0,
133
- [e.roundnessClass]: !0
134
- }, "flex justify-between items-center w-full max-w-96 input-text-color select-none input-bg-color"])
135
- }, [
136
- m.value ? oe((u(), c("input", {
137
- key: 0,
138
- "onUpdate:modelValue": t[0] || (t[0] = (n) => r.value = n),
139
- type: "text",
140
- ref_key: "inputRef",
141
- ref: P,
142
- placeholder: e.placeholder,
143
- disabled: e.disabled,
144
- readonly: !e.isSearchable,
145
- class: "w-full h-9 bg-transparent input-padding input-roundness input-outline",
146
- onInput: J,
147
- onKeydown: X
148
- }, null, 40, ce)), [
149
- [ne, r.value]
150
- ]) : R("", !0),
151
- O(b, {
152
- variant: "transparent",
153
- size: "",
154
- class: S(["h-full", {
155
- "w-full justify-end pr-2": !m.value && !v.value,
156
- "w-full justify-between pr-2": !m.value && v.value,
157
- "w-10 justify-center": m.value
158
- }]),
159
- "aria-describedby": F.value?.name,
160
- icon: s.value === !0 ? "chevron-up" : "chevron-down",
161
- onClick: H
162
- }, {
163
- default: x(() => [
164
- v.value && !m.value ? (u(), c("div", {
165
- key: 0,
166
- class: S(["inline-flex items-center ml-2 max-w-[calc(100%-2.5rem)]", {
167
- "overflow-hidden whitespace-nowrap": !e.multiple,
168
- "flex-wrap gap-2 py-1": e.multiple
169
- }])
170
- }, [
171
- l.$slots.selection && v.value ? k(l.$slots, "selection", g(z({ key: 0 }, o.value[a.value[0]]))) : 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(o.value[n])))), 256)) : k(l.$slots, "default", g(z({ key: 1 }, o.value[a.value[0]])))
173
- ], 64)) : v.value ? (u(), c(B, { key: 2 }, [
174
- e.multiple ? (u(!0), c(B, { key: 0 }, M(a.value, (n) => (u(), C(i, {
175
- key: n,
176
- text: o.value[n].label,
177
- color: "#6e6e6e"
178
- }, null, 8, ["text"]))), 128)) : (u(), c("span", de, ue(o.value[a.value[0]]?.label), 1))
179
- ], 64)) : R("", !0)
180
- ], 2)) : R("", !0)
181
- ]),
182
- _: 3
183
- }, 8, ["aria-describedby", "class", "icon"])
184
- ], 2)
185
- ]),
186
- content: x(() => [
187
- O(Z, {
188
- ref_key: "dropdownRef",
189
- ref: L,
190
- items: o.value,
191
- "is-visible": s.value,
192
- multiple: e.multiple,
193
- loading: A.value,
194
- onChange: Q,
195
- onEndReached: W
196
- }, se({ _: 2 }, [
197
- l.$slots.default || e.multiple ? {
198
- name: "default",
199
- fn: x((n) => [
200
- e.multiple ? (u(), c("div", fe, [
201
- l.$slots.default ? k(l.$slots, "default", g(z({ key: 0 }, n))) : (u(), C(i, {
202
- key: 1,
203
- text: n.label,
204
- class: "m-1"
205
- }, null, 8, ["text"])),
206
- N(n) ? (u(), C(Y, {
207
- key: 2,
208
- icon: "check",
209
- size: "sm",
210
- class: "float-right ml-2"
211
- })) : R("", !0)
212
- ])) : (u(), c("div", ve, [
213
- k(l.$slots, "default", g(K(n)))
214
- ]))
215
- ]),
216
- key: "0"
217
- } : void 0
218
- ]), 1032, ["items", "is-visible", "multiple", "loading"])
219
- ]),
220
- _: 3
221
- }, 8, ["open", "placement", "class"]);
222
- };
223
- }
224
- });
225
- export {
226
- he as _
227
- };