@agrotools1/at-components 0.5.5 → 0.5.7

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 (32) hide show
  1. package/dist/DataTable/Column/Column.vue.js +5 -5
  2. package/dist/DataTable/Column/Column.vue2.js +57 -36
  3. package/dist/DatePicker/DatePicker.d.ts +31 -0
  4. package/dist/DatePicker/DatePicker.helper.d.ts +6 -0
  5. package/dist/DatePicker/DatePicker.vue.js +111 -100
  6. package/dist/DatePicker/DatePicker.vue2.js +82 -64
  7. package/dist/Dropdown/Dropdown.core.vue.js +28 -22
  8. package/dist/Dropdown/Dropdown.core.vue2.js +48 -42
  9. package/dist/Dropdown/DropdownContent/DropdownContent.d.ts +2 -0
  10. package/dist/Dropdown/DropdownContent/DropdownContent.vue.js +12 -0
  11. package/dist/Dropdown/DropdownContent/DropdownContent.vue2.js +9 -0
  12. package/dist/Search/Search.d.ts +16 -0
  13. package/dist/Search/Search.vue.js +4 -3
  14. package/dist/Search/Search.vue2.js +24 -19
  15. package/dist/Select/Multiple/Select.multiple.d.ts +9 -0
  16. package/dist/Select/Multiple/Select.multiple.vue.js +4 -4
  17. package/dist/Select/Multiple/Select.multiple.vue2.js +19 -12
  18. package/dist/Select/Select.core.d.ts +4 -0
  19. package/dist/Select/Select.core.vue.js +5 -4
  20. package/dist/Select/Select.core.vue2.js +13 -10
  21. package/dist/Select/Single/Select.single.d.ts +9 -0
  22. package/dist/Select/Single/Select.single.vue.js +7 -7
  23. package/dist/Select/Single/Select.single.vue2.js +33 -26
  24. package/dist/Select/index.d.ts +18 -0
  25. package/dist/Tabs/Tabs.vue.js +5 -5
  26. package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +2 -2
  27. package/dist/Upload/SingleUpload/SingleUpload.vue.js +1 -1
  28. package/dist/Upload/UploaderInput/UploaderInput.d.ts +4 -1
  29. package/dist/Upload/UploaderInput/UploaderInput.vue.js +24 -25
  30. package/dist/Upload/UploaderInput/UploaderInput.vue2.js +11 -8
  31. package/dist/style.css +1 -1
  32. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as g, ref as r, computed as A, watch as S, onMounted as h, onUnmounted as w } from "vue";
2
- import C from "../Item/Item.vue.js";
3
- import _ from "../Select.core.vue.js";
4
- import b from "../imgs/indicator.svg.js";
5
- const T = g({
1
+ import { defineComponent as g, ref as r, provide as A, computed as h, watch as S, onMounted as w, onUnmounted as C } from "vue";
2
+ import _ from "../Item/Item.vue.js";
3
+ import b from "../Select.core.vue.js";
4
+ import k from "../imgs/indicator.svg.js";
5
+ const j = g({
6
6
  name: "AtMultipleSelect",
7
7
  components: {
8
- AtSingleCore: _,
9
- AtItem: C
8
+ AtSingleCore: b,
9
+ AtItem: _
10
10
  },
11
11
  props: {
12
12
  label: {
@@ -38,11 +38,18 @@ const T = g({
38
38
  separator: {
39
39
  type: String,
40
40
  default: ","
41
+ },
42
+ error: {
43
+ type: Object,
44
+ default: () => {
45
+ }
41
46
  }
42
47
  },
43
48
  emits: ["update:items", "update:selectedItems", "update:modelValue"],
44
49
  setup(n, i) {
45
- const c = r(!1), f = r(null), u = r(n.items), d = r(!1), o = r([]), I = A(
50
+ const c = r(!1), f = r(null), u = r(n.items), d = r(!1);
51
+ A("error", n.error);
52
+ const o = r([]), I = h(
46
53
  () => [...o.value].map((e) => e.value).join(n.separator)
47
54
  ), m = (e, a) => {
48
55
  const l = u.value.find(
@@ -94,9 +101,9 @@ const T = g({
94
101
  S(
95
102
  () => n.modelValue,
96
103
  (e) => y(e)
97
- ), h(() => {
104
+ ), w(() => {
98
105
  y(n.modelValue), window.addEventListener("click", p);
99
- }), w(() => {
106
+ }), C(() => {
100
107
  window.removeEventListener("click", p), u.value.map((e) => e.isSelected = !1);
101
108
  });
102
109
  const v = () => {
@@ -120,11 +127,11 @@ const T = g({
120
127
  isOpen: c,
121
128
  containerRef: f,
122
129
  icons: {
123
- indicatorSvg: b
130
+ indicatorSvg: k
124
131
  }
125
132
  };
126
133
  }
127
134
  });
128
135
  export {
129
- T as default
136
+ j as default
130
137
  };
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
48
48
  }, {
49
49
  id: string;
50
50
  handleValue: () => string;
51
+ getError: import("vue").ComputedRef<{
52
+ message: string;
53
+ value: boolean;
54
+ } | undefined>;
51
55
  atInput: import("vue").Ref<null>;
52
56
  inputModelValue: import("vue").Ref<string>;
53
57
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -2,11 +2,11 @@ import t from "./Select.core.vue2.js";
2
2
  import { resolveComponent as a, openBlock as n, createBlock as i, mergeProps as s } from "vue";
3
3
  import p from "../_virtual/_plugin-vue_export-helper.js";
4
4
  function d(e, o, u, m, c, b) {
5
- const l = a("AtInput");
6
- return n(), i(l, s(e.$props, {
5
+ const r = a("AtInput");
6
+ return n(), i(r, s(e.$props, {
7
7
  ref: "atInput",
8
8
  modelValue: e.inputModelValue,
9
- "onUpdate:modelValue": o[0] || (o[0] = (r) => e.inputModelValue = r),
9
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => e.inputModelValue = l),
10
10
  type: "button",
11
11
  role: "combobox",
12
12
  cursor: "pointer",
@@ -19,10 +19,11 @@ function d(e, o, u, m, c, b) {
19
19
  separator: e.separator,
20
20
  required: e.required,
21
21
  disabled: e.disabled,
22
+ error: e.getError,
22
23
  icon: { name: "AtAngleDownSolidIcon" },
23
24
  "aria-autocomplete": "none",
24
25
  class: "AT-SELECT_container"
25
- }), null, 16, ["modelValue", "on-selected-item-click", "selected-items", "label", "aria-controls", "aria-label", "separator", "required", "disabled"]);
26
+ }), null, 16, ["modelValue", "on-selected-item-click", "selected-items", "label", "aria-controls", "aria-label", "separator", "required", "disabled", "error"]);
26
27
  }
27
28
  const k = /* @__PURE__ */ p(t, [["render", d]]);
28
29
  export {
@@ -1,11 +1,11 @@
1
- import { defineComponent as d, ref as r, computed as s, watch as f } from "vue";
2
- import { AtInput as c } from "../Input/index.js";
1
+ import { defineComponent as f, ref as r, computed as i, watch as c, inject as p } from "vue";
2
+ import { AtInput as m } from "../Input/index.js";
3
3
  import "./Item/Item.vue2.js";
4
4
  import "./Item/Item.vue3.js";
5
- const I = d({
5
+ const S = f({
6
6
  name: "AtSelect",
7
7
  components: {
8
- AtInput: c.Text
8
+ AtInput: m.Text
9
9
  },
10
10
  props: {
11
11
  value: {
@@ -46,7 +46,7 @@ const I = d({
46
46
  }
47
47
  },
48
48
  setup(e) {
49
- const i = r(null), l = r(""), u = s(() => {
49
+ const o = r(null), l = r(""), u = i(() => {
50
50
  var t;
51
51
  return typeof e.value == "string" ? e.value : (t = e.value) == null ? void 0 : t.value;
52
52
  }), a = () => {
@@ -54,25 +54,28 @@ const I = d({
54
54
  if (e.isMultiple)
55
55
  return "";
56
56
  const t = (n = e.items) == null ? void 0 : n.find(
57
- (o) => o.value === u.value
57
+ (d) => d.value === u.value
58
58
  );
59
59
  return t ? t.text : (console.warn(
60
60
  `The default value "${u.value}" is not included in the items array.`
61
61
  ), "");
62
62
  };
63
- return f(
63
+ c(
64
64
  () => e.value,
65
65
  () => {
66
66
  l.value = a() || "";
67
67
  }
68
- ), l.value = a() || "", {
68
+ ), l.value = a() || "";
69
+ const s = i(() => p("error"));
70
+ return {
69
71
  id: `at-select-${Math.random().toString(36).substr(2, 9)}`,
70
72
  handleValue: a,
71
- atInput: i,
73
+ getError: s,
74
+ atInput: o,
72
75
  inputModelValue: l
73
76
  };
74
77
  }
75
78
  });
76
79
  export {
77
- I as default
80
+ S as default
78
81
  };
@@ -27,6 +27,10 @@ declare const _default: import("vue").DefineComponent<{
27
27
  type: BooleanConstructor;
28
28
  default: boolean;
29
29
  };
30
+ error: {
31
+ type: ObjectConstructor;
32
+ default: () => void;
33
+ };
30
34
  }, {
31
35
  onSelectedValueChange: (item: SelectItemProps) => void;
32
36
  selectedValue: import("vue").Ref<string | {
@@ -68,11 +72,16 @@ declare const _default: import("vue").DefineComponent<{
68
72
  type: BooleanConstructor;
69
73
  default: boolean;
70
74
  };
75
+ error: {
76
+ type: ObjectConstructor;
77
+ default: () => void;
78
+ };
71
79
  }>> & {
72
80
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
73
81
  }, {
74
82
  required: boolean;
75
83
  label: string;
84
+ error: Record<string, any>;
76
85
  modelValue: string | SelectItemProps;
77
86
  items: SelectItemProps[];
78
87
  emitValue: boolean;
@@ -1,5 +1,5 @@
1
- import u from "./Select.single.vue2.js";
2
- import { resolveComponent as l, openBlock as t, createElementBlock as r, createVNode as d, withModifiers as c, Fragment as f, renderList as v, createBlock as C, createCommentVNode as k } from "vue";
1
+ import p from "./Select.single.vue2.js";
2
+ import { resolveComponent as l, openBlock as t, createElementBlock as r, createVNode as u, withModifiers as c, Fragment as v, renderList as f, createBlock as C, createCommentVNode as k } from "vue";
3
3
  import "./Select.single.vue3.js";
4
4
  import m from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  function g(e, o, A, I, S, y) {
@@ -11,7 +11,7 @@ function g(e, o, A, I, S, y) {
11
11
  e.open = !e.open, e.rotateIcon();
12
12
  })
13
13
  }, [
14
- d(i, {
14
+ u(i, {
15
15
  value: e.selectedValue,
16
16
  required: e.required,
17
17
  label: e.label,
@@ -27,7 +27,7 @@ function g(e, o, A, I, S, y) {
27
27
  e.open = !1, e.rotateIcon();
28
28
  }, ["stop"]))
29
29
  }, [
30
- (t(!0), r(f, null, v(e.items, (n) => (t(), C(s, {
30
+ (t(!0), r(v, null, f(e.items, (n) => (t(), C(s, {
31
31
  key: n.value,
32
32
  text: n.text,
33
33
  value: n.value,
@@ -35,15 +35,15 @@ function g(e, o, A, I, S, y) {
35
35
  icon: n.icon,
36
36
  "aria-selected": n.value === e.valueOfModel,
37
37
  "data-text": n.text,
38
- "on-click": async (p) => {
38
+ "on-click": async (d) => {
39
39
  var a;
40
- e.isInternalChange = !0, await e.onSelectedValueChange(n), (a = n.onClick) == null || a.call(n, p), e.isInternalChange = !1;
40
+ e.isInternalChange = !0, await e.onSelectedValueChange(n), (a = n.onClick) == null || a.call(n, d), e.isInternalChange = !1;
41
41
  }
42
42
  }, null, 8, ["text", "value", "type", "icon", "aria-selected", "data-text", "on-click"]))), 128))
43
43
  ])) : k("", !0)
44
44
  ], 512);
45
45
  }
46
- const V = /* @__PURE__ */ m(u, [["render", g], ["__scopeId", "data-v-82d45f07"]]);
46
+ const V = /* @__PURE__ */ m(p, [["render", g], ["__scopeId", "data-v-95a0dded"]]);
47
47
  export {
48
48
  V as default
49
49
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as m, ref as n, computed as v, watch as p } from "vue";
2
- import y from "../Item/Item.vue.js";
3
- import g from "../Select.core.vue.js";
4
- const q = m({
1
+ import { defineComponent as y, ref as r, provide as c, watch as d, computed as p } from "vue";
2
+ import g from "../Item/Item.vue.js";
3
+ import A from "../Select.core.vue.js";
4
+ const q = y({
5
5
  name: "AtSingleSelect",
6
6
  components: {
7
- AtSingleCore: g,
8
- AtItem: y
7
+ AtSingleCore: A,
8
+ AtItem: g
9
9
  },
10
10
  props: {
11
11
  modelValue: {
@@ -25,52 +25,59 @@ const q = m({
25
25
  items: {
26
26
  type: Array,
27
27
  default: () => [],
28
- validator: (a) => Array.isArray(a) && a.every((u) => typeof u == "object")
28
+ validator: (t) => Array.isArray(t) && t.every((n) => typeof n == "object")
29
29
  },
30
30
  emitValue: {
31
31
  type: Boolean,
32
32
  default: !1
33
+ },
34
+ error: {
35
+ type: Object,
36
+ default: () => {
37
+ }
33
38
  }
34
39
  },
35
40
  emits: ["update:modelValue"],
36
- setup(a, { emit: u }) {
37
- const s = n(null), r = n(!1), t = n(a.modelValue), o = n(!1), i = (e) => {
38
- t.value = e, r.value = !1, f(), u(
41
+ setup(t, { emit: n }) {
42
+ const i = r(null), u = r(!1), a = r(t.modelValue), o = r(!1);
43
+ c("error", t.error), d(t.error, () => c("error", t.error));
44
+ const s = (e) => {
45
+ a.value = e, u.value = !1, f(), n(
39
46
  "update:modelValue",
40
- a.emitValue ? t.value.value : t.value
47
+ t.emitValue ? a.value.value : a.value
41
48
  );
42
- }, c = v(() => {
49
+ }, m = p(() => {
43
50
  var e;
44
- return typeof t.value == "string" ? t.value : (e = t.value) == null ? void 0 : e.value;
51
+ return typeof a.value == "string" ? a.value : (e = a.value) == null ? void 0 : e.value;
45
52
  });
46
- p(
47
- () => a.modelValue,
53
+ d(
54
+ () => t.modelValue,
48
55
  async (e) => {
49
56
  if (o.value)
50
57
  return;
51
- const l = a.items.find(
52
- (d) => d.value === (typeof e == "string" ? e : e.value)
58
+ const l = t.items.find(
59
+ (v) => v.value === (typeof e == "string" ? e : e.value)
53
60
  );
54
61
  if (!l) {
55
62
  console.warn(
56
63
  "O valor ao qual você alterou o v-model não está contida nos itens disponíveis"
57
- ), t.value = "";
64
+ ), a.value = "";
58
65
  return;
59
66
  }
60
- o.value = !0, await i(l), o.value = !1;
67
+ o.value = !0, await s(l), o.value = !1;
61
68
  }
62
69
  );
63
70
  const f = () => {
64
71
  var l;
65
- const e = (l = s.value) == null ? void 0 : l.querySelector(".AT_INPUT_icon_slot");
66
- e instanceof HTMLElement && e.setAttribute("data-rotate", r.value.toString());
72
+ const e = (l = i.value) == null ? void 0 : l.querySelector(".AT_INPUT_icon_slot");
73
+ e instanceof HTMLElement && e.setAttribute("data-rotate", u.value.toString());
67
74
  };
68
75
  return {
69
- onSelectedValueChange: i,
70
- selectedValue: t,
71
- open: r,
72
- valueOfModel: c,
73
- containerRef: s,
76
+ onSelectedValueChange: s,
77
+ selectedValue: a,
78
+ open: u,
79
+ valueOfModel: m,
80
+ containerRef: i,
74
81
  isInternalChange: o,
75
82
  rotateIcon: f
76
83
  };
@@ -27,6 +27,10 @@ export declare const AtSelect: {
27
27
  type: BooleanConstructor;
28
28
  default: boolean;
29
29
  };
30
+ error: {
31
+ type: ObjectConstructor;
32
+ default: () => void;
33
+ };
30
34
  }, {
31
35
  onSelectedValueChange: (item: ISelectItemProps) => void;
32
36
  selectedValue: import("vue").Ref<string | {
@@ -68,11 +72,16 @@ export declare const AtSelect: {
68
72
  type: BooleanConstructor;
69
73
  default: boolean;
70
74
  };
75
+ error: {
76
+ type: ObjectConstructor;
77
+ default: () => void;
78
+ };
71
79
  }>> & {
72
80
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
73
81
  }, {
74
82
  required: boolean;
75
83
  label: string;
84
+ error: Record<string, any>;
76
85
  modelValue: string | ISelectItemProps;
77
86
  items: ISelectItemProps[];
78
87
  emitValue: boolean;
@@ -108,6 +117,10 @@ export declare const AtSelect: {
108
117
  type: StringConstructor;
109
118
  default: string;
110
119
  };
120
+ error: {
121
+ type: ObjectConstructor;
122
+ default: () => void;
123
+ };
111
124
  }, {
112
125
  onSelectedValueChange: (item: ISelectItemProps, isChecked: boolean) => void;
113
126
  onSelectedItemClick: (selectedValue: string, isOpen?: boolean) => void;
@@ -170,6 +183,10 @@ export declare const AtSelect: {
170
183
  type: StringConstructor;
171
184
  default: string;
172
185
  };
186
+ error: {
187
+ type: ObjectConstructor;
188
+ default: () => void;
189
+ };
173
190
  }>> & {
174
191
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
175
192
  "onUpdate:items"?: ((...args: any[]) => any) | undefined;
@@ -177,6 +194,7 @@ export declare const AtSelect: {
177
194
  }, {
178
195
  required: boolean;
179
196
  label: string;
197
+ error: Record<string, any>;
180
198
  disabled: boolean;
181
199
  modelValue: string[] | ISelectItemProps[];
182
200
  items: ISelectItemProps[];
@@ -1,7 +1,7 @@
1
1
  import m from "./Tabs.vue2.js";
2
- import { resolveComponent as p, openBlock as n, createElementBlock as c, createElementVNode as a, Fragment as f, renderList as _, createBlock as l, normalizeStyle as u, resolveDynamicComponent as T } from "vue";
2
+ import { resolveComponent as p, openBlock as n, createElementBlock as c, createElementVNode as a, Fragment as _, renderList as f, createBlock as l, normalizeStyle as u, resolveDynamicComponent as b } from "vue";
3
3
  import "./Tabs.vue3.js";
4
- import b from "../_virtual/_plugin-vue_export-helper.js";
4
+ import T from "../_virtual/_plugin-vue_export-helper.js";
5
5
  const k = { class: "Tabs_container" }, y = {
6
6
  class: "Tabs_tablist",
7
7
  role: "tablist",
@@ -13,7 +13,7 @@ function B(t, h, v, $, C, I) {
13
13
  const r = p("TabButton");
14
14
  return n(), c("section", k, [
15
15
  a("div", y, [
16
- (n(!0), c(f, null, _(t.tabsList, (e, o) => (n(), l(r, {
16
+ (n(!0), c(_, null, f(t.tabsList, (e, o) => (n(), l(r, {
17
17
  key: o,
18
18
  "is-selected": o === t.selectedTabIndexRef,
19
19
  title: e.title,
@@ -31,11 +31,11 @@ function B(t, h, v, $, C, I) {
31
31
  class: "Tabs_content",
32
32
  style: u(t.contentStyle)
33
33
  }, [
34
- (n(), l(T((i = t.selectedTab) == null ? void 0 : i.slot)))
34
+ (n(), l(b((i = t.selectedTab) == null ? void 0 : i.slot)))
35
35
  ], 4)
36
36
  ]);
37
37
  }
38
- const S = /* @__PURE__ */ b(m, [["render", B], ["__scopeId", "data-v-77dd465f"]]);
38
+ const S = /* @__PURE__ */ T(m, [["render", B], ["__scopeId", "data-v-b1a4c1bd"]]);
39
39
  export {
40
40
  S as default
41
41
  };
@@ -2,7 +2,7 @@ import c from "./MultipleUpload.vue2.js";
2
2
  import { resolveComponent as p, openBlock as t, createElementBlock as o, createVNode as r, createElementVNode as n, normalizeStyle as l, Fragment as m, renderList as v, createCommentVNode as f, pushScopeId as h, popScopeId as y } from "vue";
3
3
  import "./MultipleUpload.vue3.js";
4
4
  import $ from "../../_virtual/_plugin-vue_export-helper.js";
5
- const g = (e) => (h("data-v-337d9c20"), e = e(), y(), e), w = { class: "at-uploader-multiple-input-container" }, U = {
5
+ const g = (e) => (h("data-v-70553588"), e = e(), y(), e), w = { class: "at-uploader-multiple-input-container" }, U = {
6
6
  key: 0,
7
7
  class: "at-uploader-file-container"
8
8
  }, I = /* @__PURE__ */ g(() => /* @__PURE__ */ n("span", null, "Arquivos", -1)), T = { class: "at-uploader-files" };
@@ -52,7 +52,7 @@ function S(e, P, B, _, k, N) {
52
52
  ], 4)
53
53
  ]);
54
54
  }
55
- const b = /* @__PURE__ */ $(c, [["render", S], ["__scopeId", "data-v-337d9c20"]]);
55
+ const b = /* @__PURE__ */ $(c, [["render", S], ["__scopeId", "data-v-70553588"]]);
56
56
  export {
57
57
  b as default
58
58
  };
@@ -44,7 +44,7 @@ function g(e, v, h, $, U, w) {
44
44
  ])
45
45
  ]);
46
46
  }
47
- const x = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-12861bd0"]]);
47
+ const x = /* @__PURE__ */ u(i, [["render", g], ["__scopeId", "data-v-6037f873"]]);
48
48
  export {
49
49
  x as default
50
50
  };
@@ -34,7 +34,10 @@ declare const _default: import("vue").DefineComponent<{
34
34
  type: StringConstructor;
35
35
  default: string;
36
36
  };
37
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ }, {
38
+ dropAreaElem: import("vue").Ref<HTMLDivElement | null | undefined>;
39
+ dropAreaClasses: import("vue").Ref<string[]>;
40
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
41
  uploadText: {
39
42
  type: StringConstructor;
40
43
  required: false;
@@ -1,40 +1,39 @@
1
1
  import m from "./UploaderInput.vue2.js";
2
- import { resolveComponent as n, openBlock as c, createElementBlock as f, withModifiers as a, createVNode as p, createElementVNode as l, withCtx as i, createTextVNode as s, toDisplayString as d } from "vue";
2
+ import { resolveComponent as a, openBlock as f, createElementBlock as c, normalizeClass as $, withModifiers as n, createVNode as p, createElementVNode as l, withCtx as s, createTextVNode as i, toDisplayString as d } from "vue";
3
3
  import "./UploaderInput.vue3.js";
4
- import $ from "../../_virtual/_plugin-vue_export-helper.js";
5
- const g = ["multiple", "accept"], v = {
6
- for: "inputFile",
7
- class: "at-uploader-input-file-label pointer"
8
- };
9
- function I(e, t, _, b, D, h) {
10
- const u = n("AtIllustration"), r = n("AtParagraph");
11
- return c(), f("div", {
12
- class: "at-uploader-input-container",
13
- onDragover: t[1] || (t[1] = a(() => {
4
+ import g from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const v = ["multiple", "accept"], A = { class: "at-uploader-input-file-label pointer" };
6
+ function I(t, e, b, C, D, _) {
7
+ const u = a("AtIllustration"), r = a("AtParagraph");
8
+ return f(), c("label", {
9
+ ref: "dropAreaElem",
10
+ for: "inputFile",
11
+ class: $(t.dropAreaClasses),
12
+ onDragover: e[1] || (e[1] = n(() => {
14
13
  }, ["prevent"])),
15
- onDragenter: t[2] || (t[2] = a(() => {
14
+ onDragenter: e[2] || (e[2] = n(() => {
16
15
  }, ["prevent"])),
17
- onDrop: t[3] || (t[3] = (o) => e.$props.handleDrop(o))
16
+ onDrop: e[3] || (e[3] = (o) => t.$props.handleDrop(o))
18
17
  }, [
19
18
  p(u, { illustration: "cloudUpload" }),
20
19
  l("input", {
21
20
  id: "inputFile",
22
21
  class: "w-100 h-100 at-uploader-input",
23
- multiple: e.$props.multipleSelect,
22
+ multiple: t.$props.multipleSelect,
24
23
  type: "file",
25
24
  label: "",
26
- accept: e.$props.acceptTypesInput,
27
- onChange: t[0] || (t[0] = (o) => e.$props.handleFileUpload(o))
28
- }, null, 40, g),
25
+ accept: t.$props.acceptTypesInput,
26
+ onChange: e[0] || (e[0] = (o) => t.$props.handleFileUpload(o))
27
+ }, null, 40, v),
29
28
  l("div", null, [
30
- l("label", v, [
29
+ l("span", A, [
31
30
  p(r, {
32
31
  size: "p1",
33
32
  weight: "bold",
34
33
  class: "at-uploader-text"
35
34
  }, {
36
- default: i(() => [
37
- s(d(e.$props.uploadText), 1)
35
+ default: s(() => [
36
+ i(d(t.$props.uploadText), 1)
38
37
  ]),
39
38
  _: 1
40
39
  }),
@@ -42,16 +41,16 @@ function I(e, t, _, b, D, h) {
42
41
  size: "p2",
43
42
  class: "at-uploader-interaction-text"
44
43
  }, {
45
- default: i(() => [
46
- s(d(e.$props.uploadInteractionText), 1)
44
+ default: s(() => [
45
+ i(d(t.$props.uploadInteractionText), 1)
47
46
  ]),
48
47
  _: 1
49
48
  })
50
49
  ])
51
50
  ])
52
- ], 32);
51
+ ], 34);
53
52
  }
54
- const y = /* @__PURE__ */ $(m, [["render", I], ["__scopeId", "data-v-319bd605"]]);
53
+ const z = /* @__PURE__ */ g(m, [["render", I], ["__scopeId", "data-v-040328b9"]]);
55
54
  export {
56
- y as default
55
+ z as default
57
56
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as t } from "vue";
2
- import r from "../../Illustration/Illustration.vue.js";
3
- import { AtTipograph as a } from "../../Tipograph/index.js";
4
- const i = t({
1
+ import { defineComponent as a, ref as r, onMounted as o } from "vue";
2
+ import p from "../../Illustration/Illustration.vue.js";
3
+ import { AtTipograph as n } from "../../Tipograph/index.js";
4
+ const d = a({
5
5
  test: {
6
6
  globals: !0,
7
7
  environment: "jsdom"
8
8
  },
9
9
  name: "UploaderInput",
10
10
  components: {
11
- AtIllustration: r,
12
- AtParagraph: a.Paragraph
11
+ AtIllustration: p,
12
+ AtParagraph: n.Paragraph
13
13
  },
14
14
  props: {
15
15
  uploadText: {
@@ -48,9 +48,12 @@ const i = t({
48
48
  }
49
49
  },
50
50
  setup() {
51
- return {};
51
+ const e = r(), t = r(["at-uploader-input-container"]);
52
+ return o(() => {
53
+ e.value.ondragover = () => t.value = ["at-uploader-input-container", "dragging"], e.value.ondrop = () => t.value = ["at-uploader-input-container"];
54
+ }), { dropAreaElem: e, dropAreaClasses: t };
52
55
  }
53
56
  });
54
57
  export {
55
- i as default
58
+ d as default
56
59
  };