ablok-components 0.3.92 → 0.3.93

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