ablok-components 0.3.90 → 0.3.92

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,6 +1,7 @@
1
1
  declare function __VLS_template(): {
2
2
  attrs: Partial<{}>;
3
3
  slots: {
4
+ 'bulk-remove'?(_: {}): any;
4
5
  button?(_: {}): any;
5
6
  };
6
7
  refs: {
@@ -11,6 +12,10 @@ declare function __VLS_template(): {
11
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
13
  declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
13
14
  storeId: StringConstructor;
15
+ id: {
16
+ type: StringConstructor;
17
+ default: () => string;
18
+ };
14
19
  modelValue: {
15
20
  type: {
16
21
  (arrayLength: number): {
@@ -107,10 +112,18 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
107
112
  type: BooleanConstructor;
108
113
  default: boolean;
109
114
  };
115
+ maxFiles: {
116
+ type: NumberConstructor;
117
+ default: number;
118
+ };
110
119
  }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
111
120
  "update:modelValue": (...args: any[]) => void;
112
121
  }, string, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
113
122
  storeId: StringConstructor;
123
+ id: {
124
+ type: StringConstructor;
125
+ default: () => string;
126
+ };
114
127
  modelValue: {
115
128
  type: {
116
129
  (arrayLength: number): {
@@ -207,11 +220,16 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
207
220
  type: BooleanConstructor;
208
221
  default: boolean;
209
222
  };
223
+ maxFiles: {
224
+ type: NumberConstructor;
225
+ default: number;
226
+ };
210
227
  }>> & Readonly<{
211
228
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
212
229
  }>, {
213
230
  size: number;
214
231
  title: string;
232
+ id: string;
215
233
  modelValue: {
216
234
  type?: string;
217
235
  caption?: string;
@@ -226,6 +244,7 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
226
244
  hasCaptions: boolean;
227
245
  editCaptions: boolean;
228
246
  allowDuplicateFiles: boolean;
247
+ maxFiles: number;
229
248
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
230
249
  root: HTMLDivElement;
231
250
  }, HTMLDivElement>;
@@ -1,17 +1,21 @@
1
- import { defineComponent as T, computed as D, ref as _, resolveComponent as C, openBlock as i, createElementBlock as d, createElementVNode as o, unref as L, withModifiers as g, createVNode as p, createCommentVNode as u, toDisplayString as y, withCtx as B, renderSlot as S, Fragment as I, withDirectives as U, vModelText as N, nextTick as A } from "vue";
2
- import E from "../file-upload/file-upload.vue.js";
1
+ import { defineComponent as N, computed as B, ref as k, resolveComponent as x, openBlock as a, createElementBlock as i, createElementVNode as l, unref as U, renderSlot as V, withModifiers as $, createVNode as f, createCommentVNode as m, toDisplayString as y, withCtx as F, normalizeClass as A, Fragment as E, withDirectives as R, vModelText as K, nextTick as j } from "vue";
2
+ import q from "../file-upload/file-upload.vue.js";
3
3
  /* empty css */
4
- import { sanitizeHtml as R } from "../../../composables/useSanitize.js";
5
- const K = { class: "container" }, j = { class: "row" }, q = {
4
+ import { sanitizeHtml as G } from "../../../composables/useSanitize.js";
5
+ const J = { class: "container" }, O = { class: "row" }, P = {
6
6
  key: 0,
7
7
  class: "col-12"
8
- }, G = { class: "py-4 px-3 d-flex align-items-center border border-bottom-0" }, J = ["innerHTML"], O = { class: "col-12" }, P = {
8
+ }, Q = { class: "py-4 px-3 d-flex align-items-center border border-bottom-0" }, W = ["innerHTML"], X = { class: "col-12" }, Y = {
9
9
  key: 0,
10
10
  class: "grid place-items-center text-center text-muted py-5 border border-bottom-0"
11
- }, Q = { class: "m-0" }, W = { class: "preview-item border-bottom p-3" }, X = { class: "d-flex gap-3" }, Y = { class: "col-2" }, Z = { class: "col d-flex flex-column" }, ee = { class: "file-meta text-muted small mb-2" }, te = { class: "fw-semibold" }, oe = { key: 0 }, le = { key: 1 }, se = ["onUpdate:modelValue", "id"], ne = ["innerHTML"], ae = { class: "col-auto d-flex flex-column gap-2" }, ie = ["onClick"], de = ["onClick"], re = { class: "d-flex align-items-end p-3" }, ce = { class: "btn btn-primary btn-sm ms-auto d-flex align-items-center gap-2" }, ue = ["innerHTML"], he = /* @__PURE__ */ T({
11
+ }, Z = { class: "m-0" }, ee = { class: "preview-item border-bottom p-3" }, te = { class: "d-flex gap-3" }, le = { class: "col-2" }, oe = { class: "col d-flex flex-column" }, se = { class: "file-meta text-muted small mb-2" }, ne = { class: "fw-semibold" }, ae = { key: 0 }, ie = { key: 1 }, de = ["onUpdate:modelValue", "id"], ue = ["innerHTML"], re = { class: "col-auto d-flex flex-column gap-2" }, ce = ["onClick"], me = ["onClick"], pe = { class: "file-upload__label" }, fe = { class: "d-flex align-items-end p-3" }, ve = ["for"], be = ["innerHTML"], ke = /* @__PURE__ */ N({
12
12
  __name: "bulk-upload",
13
13
  props: {
14
14
  storeId: String,
15
+ id: {
16
+ type: String,
17
+ default: () => `bulk-upload-${Math.random().toString(36).substring(2, 9)}`
18
+ },
15
19
  modelValue: {
16
20
  type: Array,
17
21
  default: []
@@ -50,14 +54,18 @@ const K = { class: "container" }, j = { class: "row" }, q = {
50
54
  allowDuplicateFiles: {
51
55
  type: Boolean,
52
56
  default: !1
57
+ },
58
+ maxFiles: {
59
+ type: Number,
60
+ default: 0
53
61
  }
54
62
  },
55
63
  emits: ["update:modelValue"],
56
- setup(c, { emit: w }) {
57
- const h = c, k = w, M = (e) => `${e.name ?? ""}|${e.size ?? 0}|${e.lastModified ?? 0}|${e.type ?? ""}`, m = D({
64
+ setup(d, { emit: z }) {
65
+ const u = d, M = z, C = (e) => `${e.name ?? ""}|${e.size ?? 0}|${e.lastModified ?? 0}|${e.type ?? ""}`, r = B({
58
66
  get: () => {
59
- const e = h.modelValue || [];
60
- return v.value = e.map((t) => t.caption || ""), e.map((t) => ({
67
+ const e = u.modelValue || [];
68
+ return b.value = e.map((t) => t.caption || ""), e.map((t) => ({
61
69
  type: t.type,
62
70
  src: t.src,
63
71
  ...t.name ? { name: t.name } : {},
@@ -66,71 +74,74 @@ const K = { class: "container" }, j = { class: "row" }, q = {
66
74
  }));
67
75
  },
68
76
  set: (e) => {
69
- const t = m.value || [], l = Array.isArray(e) ? e : [], a = h.allowDuplicateFiles ? l : l.filter((s) => {
70
- const r = M(s);
71
- return !t.some((F) => M(F) === r);
72
- });
73
- if (!h.allowDuplicateFiles && l.length > 0 && a.length === 0)
77
+ const t = r.value || [], o = Array.isArray(e) ? e : [], c = u.allowDuplicateFiles ? o : o.filter((_) => {
78
+ const g = C(_);
79
+ return !t.some((I) => C(I) === g);
80
+ }), n = u.maxFiles > 0 ? Math.max(0, u.maxFiles - t.length) : void 0, s = typeof n == "number" ? c.slice(0, n) : c;
81
+ if (!u.allowDuplicateFiles && o.length > 0 && s.length === 0)
74
82
  return;
75
- const n = a.length <= t.length && a.every((s) => t.some((r) => r.src === s.src));
76
- b(n ? a : [...t, ...a]);
83
+ const p = s.length <= t.length && s.every((_) => t.some((g) => g.src === _.src));
84
+ h(p ? s : [...t, ...s]);
77
85
  }
78
- }), $ = _(null), f = _({}), v = _({});
79
- function V(e) {
80
- const t = [...h.modelValue || []];
81
- t.splice(e, 1), k("update:modelValue", t);
86
+ }), w = k(null), v = k({}), b = k({}), H = B(() => u.disabled || u.maxFiles > 0 && r.value.length >= u.maxFiles);
87
+ function S(e) {
88
+ const t = [...u.modelValue || []];
89
+ t.splice(e, 1), M("update:modelValue", t);
82
90
  }
83
- async function H(e) {
84
- f.value[e] = !f.value[e], f.value[e] || b(), await A(), $.value?.querySelector(`#caption-${e}`)?.focus();
91
+ async function D(e) {
92
+ v.value[e] = !v.value[e], v.value[e] || h(), await j(), w.value?.querySelector(`#caption-${e}`)?.focus();
85
93
  }
86
- function x(e) {
94
+ function T(e) {
87
95
  if (e == null) return "";
88
96
  const t = ["B", "KB", "MB", "GB", "TB"];
89
- let l = e, a = t.shift();
90
- for (; l >= 1024 && t.length; )
91
- l /= 1024, a = t.shift();
92
- return `${l.toFixed(1)} ${a}`;
97
+ let o = e, c = t.shift();
98
+ for (; o >= 1024 && t.length; )
99
+ o /= 1024, c = t.shift();
100
+ return `${o.toFixed(1)} ${c}`;
93
101
  }
94
- function z(e) {
102
+ function L(e) {
95
103
  return e ? new Date(e).toLocaleDateString() : "";
96
104
  }
97
- function b(e) {
98
- k("update:modelValue", (e || m.value).map((t, l) => ({
105
+ function h(e) {
106
+ M("update:modelValue", (e || r.value).map((t, o) => ({
99
107
  ...t,
100
- caption: v.value[l] || ""
108
+ caption: b.value[o] || ""
101
109
  })));
102
110
  }
103
111
  return (e, t) => {
104
- const l = C("svg-icon"), a = C("base-image");
105
- return i(), d("div", {
112
+ const o = x("svg-icon"), c = x("base-image");
113
+ return a(), i("div", {
106
114
  class: "bulk-upload",
107
115
  ref_key: "root",
108
- ref: $
116
+ ref: w
109
117
  }, [
110
- o("div", K, [
111
- o("div", j, [
112
- c.hasHeader ? (i(), d("div", q, [
113
- o("div", G, [
114
- o("p", {
118
+ l("div", J, [
119
+ l("div", O, [
120
+ d.hasHeader ? (a(), i("div", P, [
121
+ l("div", Q, [
122
+ l("p", {
115
123
  class: "fw-bold m-0",
116
- innerHTML: L(R)(c.title || e.$t("fileInput.bulkUploadHeadline"))
117
- }, null, 8, J),
118
- c.hasBulkRemove ? (i(), d("button", {
119
- key: 0,
120
- onClick: t[0] || (t[0] = g((n) => m.value = [], ["prevent"])),
121
- class: "btn btn--close ms-auto p-0"
122
- }, [
123
- p(l, { symbol: "x" })
124
- ])) : u("", !0)
124
+ innerHTML: U(G)(d.title || e.$t("fileInput.bulkUploadHeadline"))
125
+ }, null, 8, W),
126
+ V(e.$slots, "bulk-remove", {}, () => [
127
+ d.hasBulkRemove ? (a(), i("button", {
128
+ key: 0,
129
+ onClick: t[0] || (t[0] = $((n) => r.value = [], ["prevent"])),
130
+ class: "btn btn--close ms-auto p-0"
131
+ }, [
132
+ f(o, { symbol: "x" })
133
+ ])) : m("", !0)
134
+ ])
125
135
  ])
126
- ])) : u("", !0),
127
- o("div", O, [
128
- m.value.length ? u("", !0) : (i(), d("div", P, [
129
- o("p", Q, y(e.$t("fileInput.noFilesSelected")), 1)
136
+ ])) : m("", !0),
137
+ l("div", X, [
138
+ r.value.length ? m("", !0) : (a(), i("div", Y, [
139
+ l("p", Z, y(e.$t("fileInput.noFilesSelected")), 1)
130
140
  ])),
131
- p(E, {
132
- modelValue: m.value,
133
- "onUpdate:modelValue": t[2] || (t[2] = (n) => m.value = n),
141
+ f(q, {
142
+ id: `${d.id}-file-upload`,
143
+ modelValue: r.value,
144
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
134
145
  multiple: !0,
135
146
  accept: "image/*",
136
147
  "drop-files": !0,
@@ -138,77 +149,82 @@ const K = { class: "container" }, j = { class: "row" }, q = {
138
149
  "local-url-format": "objectUrl",
139
150
  class: "d-flex flex-column border"
140
151
  }, {
141
- "preview-item": B(({ bind: { item: n, index: s } }) => [
142
- o("div", W, [
143
- o("div", X, [
144
- o("div", Y, [
145
- p(a, {
152
+ "preview-item": F(({ bind: { item: n, index: s } }) => [
153
+ l("div", ee, [
154
+ l("div", te, [
155
+ l("div", le, [
156
+ f(c, {
146
157
  src: n.src,
147
158
  alt: "",
148
159
  class: "img-thumbnail"
149
160
  }, null, 8, ["src"])
150
161
  ]),
151
- o("div", Z, [
152
- o("div", ee, [
153
- o("div", te, y(n.name || e.$t("fileInput.unknownFile")), 1),
154
- o("div", null, [
155
- n.size ? (i(), d("span", oe, y(x(n.size)), 1)) : u("", !0),
156
- n.lastModified ? (i(), d("span", le, " · " + y(z(n.lastModified)), 1)) : u("", !0)
162
+ l("div", oe, [
163
+ l("div", se, [
164
+ l("div", ne, y(n.name || e.$t("fileInput.unknownFile")), 1),
165
+ l("div", null, [
166
+ n.size ? (a(), i("span", ae, y(T(n.size)), 1)) : m("", !0),
167
+ n.lastModified ? (a(), i("span", ie, " · " + y(L(n.lastModified)), 1)) : m("", !0)
157
168
  ])
158
169
  ]),
159
- c.hasCaptions ? (i(), d(I, { key: 0 }, [
160
- f.value[s] && c.editCaptions ? U((i(), d("textarea", {
170
+ d.hasCaptions ? (a(), i(E, { key: 0 }, [
171
+ v.value[s] && d.editCaptions ? R((a(), i("textarea", {
161
172
  key: 0,
162
- "onUpdate:modelValue": (r) => v.value[s] = r,
173
+ "onUpdate:modelValue": (p) => b.value[s] = p,
163
174
  id: `caption-${s}`,
164
175
  class: "form-control rounded-0 h-100",
165
- onChangeCapture: t[1] || (t[1] = (r) => b())
166
- }, null, 40, se)), [
167
- [N, v.value[s]]
168
- ]) : (i(), d("p", {
176
+ onChangeCapture: t[1] || (t[1] = (p) => h())
177
+ }, null, 40, de)), [
178
+ [K, b.value[s]]
179
+ ]) : (a(), i("p", {
169
180
  key: 1,
170
181
  class: "m-0",
171
- innerHTML: v.value[s] || `<small>${e.$t("fileInput.noCaption")}</small>`
172
- }, null, 8, ne))
173
- ], 64)) : u("", !0)
182
+ innerHTML: b.value[s] || `<small>${e.$t("fileInput.noCaption")}</small>`
183
+ }, null, 8, ue))
184
+ ], 64)) : m("", !0)
174
185
  ]),
175
- o("div", ae, [
176
- o("button", {
177
- onClick: g((r) => V(s), ["prevent"]),
186
+ l("div", re, [
187
+ l("button", {
188
+ onClick: $((p) => S(s), ["prevent"]),
178
189
  class: "btn btn--close"
179
190
  }, [
180
- p(l, { symbol: "x" })
181
- ], 8, ie),
182
- c.editCaptions ? (i(), d("button", {
191
+ f(o, { symbol: "x" })
192
+ ], 8, ce),
193
+ d.editCaptions ? (a(), i("button", {
183
194
  key: 0,
184
- onClick: g((r) => H(s), ["prevent"]),
195
+ onClick: $((p) => D(s), ["prevent"]),
185
196
  class: "btn btn--close"
186
197
  }, [
187
- p(l, {
188
- symbol: f.value[s] ? "check" : "edit-3"
198
+ f(o, {
199
+ symbol: v.value[s] ? "check" : "edit-3"
189
200
  }, null, 8, ["symbol"])
190
- ], 8, de)) : u("", !0)
201
+ ], 8, me)) : m("", !0)
191
202
  ])
192
203
  ])
193
204
  ])
194
205
  ]),
195
- button: B(() => [
196
- S(e.$slots, "button", {}, () => [
197
- o("span", re, [
198
- o("span", ce, [
199
- p(l, {
200
- symbol: "upload",
201
- size: "small"
202
- }),
203
- o("span", {
204
- innerHTML: e.$t("common.selectFile")
205
- }, null, 8, ue)
206
+ label: F(() => [
207
+ V(e.$slots, "button", {}, () => [
208
+ l("span", pe, [
209
+ l("span", fe, [
210
+ l("label", {
211
+ for: `${d.id}-file-upload`,
212
+ class: A(["btn btn-primary btn-sm ms-auto d-flex align-items-center gap-2", { disabled: H.value }])
213
+ }, [
214
+ f(o, {
215
+ symbol: "upload",
216
+ size: "small"
217
+ }),
218
+ l("span", {
219
+ innerHTML: e.$t("common.selectFile")
220
+ }, null, 8, be)
221
+ ], 10, ve)
206
222
  ])
207
223
  ])
208
224
  ])
209
225
  ]),
210
226
  _: 3
211
- }, 8, ["modelValue"])
227
+ }, 8, ["id", "modelValue"])
212
228
  ])
213
229
  ])
214
230
  ])
@@ -217,5 +233,5 @@ const K = { class: "container" }, j = { class: "row" }, q = {
217
233
  }
218
234
  });
219
235
  export {
220
- he as default
236
+ ke as default
221
237
  };
@@ -19,6 +19,7 @@ declare function __VLS_template(): {
19
19
  removeFile: typeof removeFile;
20
20
  };
21
21
  }): any;
22
+ label?(_: {}): any;
22
23
  button?(_: {}): any;
23
24
  };
24
25
  refs: {
@@ -1,4 +1,4 @@
1
- import { defineComponent as L, ref as y, toRef as M, computed as N, watch as b, openBlock as u, createElementBlock as d, normalizeClass as h, unref as v, Fragment as V, renderList as P, renderSlot as S, createElementVNode as c, withModifiers as w, createVNode as p, Transition as T, withCtx as H, createCommentVNode as W } from "vue";
1
+ import { defineComponent as L, ref as y, toRef as M, computed as N, watch as h, openBlock as u, createElementBlock as d, normalizeClass as V, unref as v, Fragment as S, renderList as P, renderSlot as g, createElementVNode as c, withModifiers as w, createVNode as p, Transition as T, withCtx as H, createCommentVNode as W } from "vue";
2
2
  import k from "../../atoms/svg-icon/svg-icon.vue.js";
3
3
  /* empty css */
4
4
  import q from "../../atoms/input-file/input-file.vue.js";
@@ -7,7 +7,7 @@ import { useUploadTransport as I } from "../../../composables/useUploadTransport
7
7
  import { useLocalFileUrl as R } from "../../../composables/useLocalFileUrl.js";
8
8
  import { sanitizeHtml as O } from "../../../composables/useSanitize.js";
9
9
  import { uniqueId as F } from "../../../utilities/helpers.js";
10
- const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTML"], K = {
10
+ const j = ["src"], G = ["onClick"], J = ["onClick"], K = ["for"], Q = ["innerHTML"], X = {
11
11
  key: 0,
12
12
  class: "file-upload__loading-spinner"
13
13
  }, ne = /* @__PURE__ */ L({
@@ -103,7 +103,7 @@ const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTM
103
103
  },
104
104
  emits: ["update:modelValue", "update:src"],
105
105
  setup(o, { emit: U }) {
106
- const e = o, i = U, g = y(), m = y([]), n = y([]), { pending: $, uploadFile: B } = I(e), { toLocalUrl: D, revoke: z } = R(M(e, "localUrlFormat")), { isDragging: C } = E(g, {
106
+ const e = o, i = U, b = y(), m = y([]), n = y([]), { pending: $, uploadFile: B } = I(e), { toLocalUrl: D, revoke: z } = R(M(e, "localUrlFormat")), { isDragging: C } = E(b, {
107
107
  enabled: () => e.dropFiles,
108
108
  onDrop: (t) => {
109
109
  m.value = t;
@@ -121,7 +121,7 @@ const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTM
121
121
  i("update:modelValue", e.multiple ? [] : void 0), i("update:src", "");
122
122
  m.value.splice(l, 1);
123
123
  }
124
- return b(() => m.value, async (t) => {
124
+ return h(() => m.value, async (t) => {
125
125
  const l = await Promise.all(
126
126
  t.map(async (a) => ({
127
127
  src: e.toDataUrl ? await D(a) : await B(a),
@@ -132,43 +132,43 @@ const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTM
132
132
  }))
133
133
  );
134
134
  n.value = l;
135
- }, { deep: !0 }), b(() => n.value, async (t) => {
135
+ }, { deep: !0 }), h(() => n.value, async (t) => {
136
136
  const l = e.multiple ? t : t[0];
137
137
  i("update:modelValue", l), e.multiple || i("update:src", t[0] && t[0].src);
138
138
  }, { deep: !0 }), (t, l) => (u(), d("div", {
139
139
  ref_key: "root",
140
- ref: g,
141
- class: h(["file-upload", {
140
+ ref: b,
141
+ class: V(["file-upload", {
142
142
  "has-dragging": o.dropFiles,
143
143
  "is-dragging": v(C)
144
144
  }])
145
145
  }, [
146
- (u(!0), d(V, null, P(A.value, (a, r) => (u(), d("div", {
146
+ (u(!0), d(S, null, P(A.value, (a, r) => (u(), d("div", {
147
147
  key: a.src,
148
- class: h(o.enablePreview ? "file-upload__thumbnail" : "file-upload__reset")
148
+ class: V(o.enablePreview ? "file-upload__thumbnail" : "file-upload__reset")
149
149
  }, [
150
- S(t.$slots, "preview-item", {
150
+ g(t.$slots, "preview-item", {
151
151
  bind: { item: a, index: r },
152
152
  on: { removeFile: f }
153
153
  }, () => [
154
- o.enablePreview ? (u(), d(V, { key: 0 }, [
154
+ o.enablePreview ? (u(), d(S, { key: 0 }, [
155
155
  c("img", {
156
156
  src: `${a.src}${o.previewWidth ? `?width=${o.previewWidth}` : ""}`,
157
157
  class: "img-thumbnail rounded"
158
- }, null, 8, _),
158
+ }, null, 8, j),
159
159
  c("button", {
160
160
  onClick: w((s) => f(r), ["prevent"]),
161
161
  class: "btn btn--close"
162
162
  }, [
163
163
  p(k, { symbol: "x" })
164
- ], 8, j)
164
+ ], 8, G)
165
165
  ], 64)) : (u(), d("button", {
166
166
  key: 1,
167
167
  onClick: w((s) => f(r), ["prevent"]),
168
168
  class: "btn btn--close btn-outline-contrast"
169
169
  }, [
170
170
  p(k, { symbol: "x" })
171
- ], 8, x))
171
+ ], 8, J))
172
172
  ])
173
173
  ], 2))), 128)),
174
174
  p(q, {
@@ -181,30 +181,32 @@ const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTM
181
181
  multiple: o.multiple,
182
182
  class: "d-none"
183
183
  }, null, 8, ["modelValue", "id", "name", "accept", "max-file-size", "multiple"]),
184
- c("label", {
185
- for: o.id,
186
- class: "file-upload__label"
187
- }, [
188
- S(t.$slots, "button", {}, () => [
189
- c("span", {
190
- class: "btn btn-outline-contrast",
191
- innerHTML: v(O)(o.label || t.$t("common.selectFile"))
192
- }, null, 8, J)
193
- ]),
194
- p(T, { name: "fade" }, {
195
- default: H(() => [
196
- v($) ? (u(), d("span", K, [...l[1] || (l[1] = [
197
- c("span", {
198
- class: "spinner-border",
199
- role: "status"
200
- }, [
201
- c("span", { class: "visually-hidden" }, "Loading...")
202
- ], -1)
203
- ])])) : W("", !0)
184
+ g(t.$slots, "label", {}, () => [
185
+ c("label", {
186
+ for: o.id,
187
+ class: "file-upload__label"
188
+ }, [
189
+ g(t.$slots, "button", {}, () => [
190
+ c("span", {
191
+ class: "btn btn-outline-contrast",
192
+ innerHTML: v(O)(o.label || t.$t("common.selectFile"))
193
+ }, null, 8, Q)
204
194
  ]),
205
- _: 1
206
- })
207
- ], 8, G)
195
+ p(T, { name: "fade" }, {
196
+ default: H(() => [
197
+ v($) ? (u(), d("span", X, [...l[1] || (l[1] = [
198
+ c("span", {
199
+ class: "spinner-border",
200
+ role: "status"
201
+ }, [
202
+ c("span", { class: "visually-hidden" }, "Loading...")
203
+ ], -1)
204
+ ])])) : W("", !0)
205
+ ]),
206
+ _: 1
207
+ })
208
+ ], 8, K)
209
+ ])
208
210
  ], 2));
209
211
  }
210
212
  });
package/package.json CHANGED
@@ -1,7 +1,23 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.90",
4
+ "version": "0.3.92",
5
+ "scripts": {
6
+ "dev": "vite --host",
7
+ "story:dev": "histoire dev",
8
+ "story:build": "histoire build",
9
+ "story:preview": "histoire preview",
10
+ "build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
11
+ "build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
12
+ "preview": "vite preview",
13
+ "build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
14
+ "build-lib": "vite build && vue-tsc --emitDeclarationOnly",
15
+ "release": "bash ./scripts/release.sh",
16
+ "postrelease": "bash ./scripts/publish.sh",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
19
+ "test:ui": "vitest --ui"
20
+ },
5
21
  "dependencies": {
6
22
  "date-fns": "^3.0.0",
7
23
  "dompurify": "^3.3.1",
@@ -120,21 +136,5 @@
120
136
  "./package.json": "./package.json"
121
137
  },
122
138
  "types": "./dist/index.d.ts",
123
- "sideEffects": false,
124
- "scripts": {
125
- "dev": "vite --host",
126
- "story:dev": "histoire dev",
127
- "story:build": "histoire build",
128
- "story:preview": "histoire preview",
129
- "build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
130
- "build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
131
- "preview": "vite preview",
132
- "build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
133
- "build-lib": "vite build && vue-tsc --emitDeclarationOnly",
134
- "release": "bash ./scripts/release.sh",
135
- "postrelease": "bash ./scripts/publish.sh",
136
- "test": "vitest run",
137
- "test:watch": "vitest",
138
- "test:ui": "vitest --ui"
139
- }
140
- }
139
+ "sideEffects": false
140
+ }