@stachelock/ui 0.6.11 → 0.6.12

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,6 @@
1
- import { defineComponent as H, ref as y, computed as w, onMounted as J, watch as K, createElementBlock as u, openBlock as o, createCommentVNode as f, withDirectives as v, toDisplayString as m, createElementVNode as r, normalizeClass as A, createVNode as b, withCtx as N, renderSlot as Q, createTextVNode as Z, vShow as x, Fragment as ee, renderList as le, mergeProps as R, unref as U, createBlock as D } from "vue";
1
+ import { defineComponent as H, ref as y, computed as w, onMounted as J, watch as K, createElementBlock as u, openBlock as o, createCommentVNode as f, withDirectives as v, toDisplayString as m, createElementVNode as r, normalizeClass as A, createVNode as b, withCtx as L, renderSlot as Q, createTextVNode as Z, vShow as x, Fragment as ee, renderList as le, mergeProps as N, unref as U, createBlock as D } from "vue";
2
2
  import { XCircleIcon as se, PhotoIcon as B } from "@heroicons/vue/24/solid";
3
- import { _ as E } from "./FileDropzoneInput.vue_vue_type_script_setup_true_lang-BC_qN5qn.js";
3
+ import { _ as R } from "./FileDropzoneInput.vue_vue_type_script_setup_true_lang-BC_qN5qn.js";
4
4
  import V from "./components/CloudinaryImage.js";
5
5
  import O from "./components/LoadingDots.js";
6
6
  const te = { class: "sl-space-y-2" }, ae = {
@@ -145,7 +145,7 @@ const te = { class: "sl-space-y-2" }, ae = {
145
145
  },
146
146
  emits: ["update:modelValue", "update:media", "clear:media"],
147
147
  setup(t, { expose: X, emit: q }) {
148
- const s = t, z = q, a = y([]), i = y("empty"), p = y(!1), h = y(!1), k = y(!1), d = y(!1), F = y(""), M = y(!1), j = y(!0), S = w(() => s.disabled || h.value), W = w(() => s.acceptedFormats.map((e) => e.split("/")[1]?.toUpperCase() || e).join(", ")), Y = w(() => i.value === "loading" ? "Please be patient while we upload your file" : i.value === "uploaded" && a.value[0]?.created_at ? `Uploaded ${new Date(a.value[0].created_at).toLocaleDateString()}` : "Click to replace"), G = w(() => {
148
+ const s = t, z = q, a = y([]), i = y("empty"), p = y(!1), h = y(!1), k = y(!1), c = y(!1), F = y(""), M = y(!1), j = y(!0), S = w(() => s.disabled || h.value), W = w(() => s.acceptedFormats.map((e) => e.split("/")[1]?.toUpperCase() || e).join(", ")), Y = w(() => i.value === "loading" ? "Please be patient while we upload your file" : i.value === "uploaded" && a.value[0]?.created_at ? `Uploaded ${new Date(a.value[0].created_at).toLocaleDateString()}` : "Click to replace"), G = w(() => {
149
149
  if (!a.value[0]?.original_file_name) return "Image";
150
150
  const e = a.value[0].original_file_name, l = 20;
151
151
  if (e.length <= l) return e;
@@ -162,19 +162,19 @@ const te = { class: "sl-space-y-2" }, ae = {
162
162
  for (const g of n) {
163
163
  i.value = "loading";
164
164
  try {
165
- const c = await s.onUpload(g, s.presetType, s.projectId);
166
- if (c) {
167
- s.enableMultiple ? a.value.push(c) : a.value = [c], i.value = "uploaded", j.value = !0, z("update:modelValue", s.enableMultiple ? a.value : a.value[0]);
168
- const L = {
169
- cloudinaryAsset: c,
165
+ const d = await s.onUpload(g, s.presetType, s.projectId);
166
+ if (d) {
167
+ s.enableMultiple ? a.value.push(d) : a.value = [d], i.value = "uploaded", j.value = !0, z("update:modelValue", s.enableMultiple ? a.value : a.value[0]);
168
+ const E = {
169
+ cloudinaryAsset: d,
170
170
  presetType: s.presetType,
171
171
  projectId: s.projectId
172
172
  };
173
- z("update:media", L);
173
+ z("update:media", E);
174
174
  } else
175
175
  throw new Error("Upload failed - no response");
176
- } catch (c) {
177
- console.error("Upload error:", c), F.value = c.message || "Upload failed", i.value = "error", j.value = !1;
176
+ } catch (d) {
177
+ console.error("Upload error:", d), F.value = (d instanceof Error ? d.message : null) || "Upload failed", i.value = "error", j.value = !1;
178
178
  }
179
179
  }
180
180
  } catch (l) {
@@ -189,14 +189,14 @@ const te = { class: "sl-space-y-2" }, ae = {
189
189
  const l = e.currentTarget.getBoundingClientRect(), n = e.clientX, g = e.clientY;
190
190
  (n < l.left || n > l.right || g < l.top || g > l.bottom) && (k.value = !1);
191
191
  }, _ = async (e) => {
192
- if (e.preventDefault(), e.stopPropagation(), k.value = !1, d.value = !0, e.dataTransfer?.files && e.dataTransfer.files.length > 0)
192
+ if (e.preventDefault(), e.stopPropagation(), k.value = !1, c.value = !0, e.dataTransfer?.files && e.dataTransfer.files.length > 0)
193
193
  try {
194
194
  await $(e.dataTransfer.files);
195
195
  } finally {
196
- d.value = !1;
196
+ c.value = !1;
197
197
  }
198
198
  else
199
- d.value = !1;
199
+ c.value = !1;
200
200
  }, C = async (e) => {
201
201
  try {
202
202
  h.value = !0, e && s.deleteFileFromCloudinary && s.onDelete && await s.onDelete(e), e && z("clear:media", e);
@@ -228,7 +228,7 @@ const te = { class: "sl-space-y-2" }, ae = {
228
228
  class: A(["sl-flex sl-items-center sl-justify-center sl-w-full", { "sl-h-screen": t.fullSize, "sl-mt-2": t.label }])
229
229
  }, [
230
230
  r("div", ne, [
231
- b(E, {
231
+ b(R, {
232
232
  "enable-multiple": t.enableMultiple,
233
233
  "onUpdate:files": $,
234
234
  "accepted-formats": t.acceptedFormats,
@@ -237,7 +237,7 @@ const te = { class: "sl-space-y-2" }, ae = {
237
237
  "ring-classes": I.value,
238
238
  height: "md"
239
239
  }, {
240
- default: N(() => [
240
+ default: L(() => [
241
241
  Q(e.$slots, "empty-state", {}, () => [
242
242
  l[8] || (l[8] = r("p", { class: "sl-mb-2 sl-text-sm sl-text-gray-500 dark:sl-text-slate-300" }, [
243
243
  r("span", { class: "sl-font-semibold" }, "Click to upload"),
@@ -265,13 +265,13 @@ const te = { class: "sl-space-y-2" }, ae = {
265
265
  }, [
266
266
  r("button", {
267
267
  type: "button",
268
- onClick: (c) => C(n.public_id),
269
- onMouseenter: l[0] || (l[0] = (c) => p.value = !0),
270
- onMouseleave: l[1] || (l[1] = (c) => p.value = !1),
268
+ onClick: (d) => C(n.public_id),
269
+ onMouseenter: l[0] || (l[0] = (d) => p.value = !0),
270
+ onMouseleave: l[1] || (l[1] = (d) => p.value = !1),
271
271
  class: "sl-relative sl-rounded-lg sl-overflow-hidden focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-primary-500",
272
272
  "aria-label": "Remove image"
273
273
  }, [
274
- b(V, R({
274
+ b(V, N({
275
275
  "public-id": n.public_id
276
276
  }, { ref_for: !0 }, t.cloudinaryImageProps, { class: "sl-transition-transform sl-duration-200 group-hover:sl-scale-105 sl-w-full sl-h-full sl-object-cover" }), null, 16, ["public-id"]),
277
277
  v(r("span", ce, [
@@ -282,18 +282,18 @@ const te = { class: "sl-space-y-2" }, ae = {
282
282
  ], 40, de),
283
283
  v(r("div", fe, [
284
284
  r("div", me, [
285
- d.value ? f("", !0) : (o(), D(U(B), {
285
+ c.value ? f("", !0) : (o(), D(U(B), {
286
286
  key: 0,
287
287
  class: "sl-mx-auto sl-h-12 sl-w-12 sl-text-primary-400"
288
288
  })),
289
- d.value ? (o(), D(O, {
289
+ c.value ? (o(), D(O, {
290
290
  key: 1,
291
291
  size: "sm"
292
292
  })) : f("", !0),
293
- r("p", pe, m(d.value ? "Uploading..." : "Drop to replace"), 1)
293
+ r("p", pe, m(c.value ? "Uploading..." : "Drop to replace"), 1)
294
294
  ])
295
295
  ], 512), [
296
- [x, k.value || d.value]
296
+ [x, k.value || c.value]
297
297
  ])
298
298
  ], 32))), 128)),
299
299
  i.value === "uploaded" && t.enableMultiple ? (o(), u("div", {
@@ -301,7 +301,7 @@ const te = { class: "sl-space-y-2" }, ae = {
301
301
  class: A(["sl-flex sl-items-center sl-justify-center sl-w-full", { "sl-h-screen": t.fullSize }])
302
302
  }, [
303
303
  r("div", ge, [
304
- b(E, {
304
+ b(R, {
305
305
  "enable-multiple": t.enableMultiple,
306
306
  "onUpdate:files": $,
307
307
  "accepted-formats": t.acceptedFormats,
@@ -310,7 +310,7 @@ const te = { class: "sl-space-y-2" }, ae = {
310
310
  "ring-classes": I.value,
311
311
  height: "sm"
312
312
  }, {
313
- default: N(() => [...l[9] || (l[9] = [
313
+ default: L(() => [...l[9] || (l[9] = [
314
314
  r("p", { class: "sl-text-sm sl-text-gray-500 dark:sl-text-gray-400" }, "Add more images", -1)
315
315
  ])]),
316
316
  _: 1
@@ -364,7 +364,7 @@ const te = { class: "sl-space-y-2" }, ae = {
364
364
  class: "sl-w-full focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-primary-600 focus:sl-ring-offset-2 sl-rounded-lg sl-overflow-hidden sl-transition-all sl-duration-200",
365
365
  "aria-label": "Replace image"
366
366
  }, [
367
- b(V, R({
367
+ b(V, N({
368
368
  "public-id": a.value[0]?.public_id
369
369
  }, t.cloudinaryImageProps, { class: "sl-transition-transform sl-duration-200 group-hover:sl-scale-105 sl-w-full sl-h-full sl-object-cover" }), null, 16, ["public-id"]),
370
370
  v(r("span", ze, " Replace ", 512), [
@@ -373,18 +373,18 @@ const te = { class: "sl-space-y-2" }, ae = {
373
373
  ], 32)),
374
374
  v(r("div", Fe, [
375
375
  r("div", Me, [
376
- d.value ? f("", !0) : (o(), D(U(B), {
376
+ c.value ? f("", !0) : (o(), D(U(B), {
377
377
  key: 0,
378
378
  class: "sl-mx-auto sl-h-12 sl-w-12 sl-text-primary-400"
379
379
  })),
380
- d.value ? (o(), D(O, {
380
+ c.value ? (o(), D(O, {
381
381
  key: 1,
382
382
  size: "sm"
383
383
  })) : f("", !0),
384
- r("p", je, m(d.value ? "Uploading..." : "Drop to replace"), 1)
384
+ r("p", je, m(c.value ? "Uploading..." : "Drop to replace"), 1)
385
385
  ])
386
386
  ], 512), [
387
- [x, k.value || d.value]
387
+ [x, k.value || c.value]
388
388
  ])
389
389
  ], 32)) : f("", !0)
390
390
  ])),
@@ -45,7 +45,7 @@ const z = { class: "sl-w-full" }, U = { class: "sl-flex sl-items-center sl-justi
45
45
  },
46
46
  emits: ["update:modelValue", "blur", "focus"],
47
47
  setup(e, { expose: L, emit: T }) {
48
- const s = e, f = T, u = g(), m = I(`sl-${s.name}`), { value: C, errorMessage: F, handleChange: y, handleBlur: H, meta: x } = O(
48
+ const s = e, f = T, u = g(null), m = I(`sl-${s.name}`), { value: C, errorMessage: F, handleChange: y, handleBlur: H, meta: x } = O(
49
49
  () => s.name,
50
50
  s.rules,
51
51
  {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as D, ref as U, watch as y, createElementBlock as a, openBlock as t, createElementVNode as C, createCommentVNode as r, toDisplayString as c, normalizeClass as v, Fragment as g, renderList as b, createVNode as p } from "vue";
2
- import { _ as f } from "./SwitchInput.vue_vue_type_script_setup_true_lang-D5Es9AjF.js";
2
+ import { _ as f } from "./SwitchInput.vue_vue_type_script_setup_true_lang-r8ZwU1Zy.js";
3
3
  const L = {
4
4
  key: 0,
5
5
  class: "sl-bg-white dark:sl-bg-slate-800 sl-shadow sm:sl-rounded-lg sl-w-full",
@@ -158,7 +158,7 @@ const J = { class: "sl-flex sl-h-full sl-w-full sl-items-center sl-justify-cente
158
158
  ]) : O("", !0)
159
159
  ], 6));
160
160
  }
161
- }), te = /* @__PURE__ */ H(X, [["__scopeId", "data-v-4ba5c28c"]]);
161
+ }), te = /* @__PURE__ */ H(X, [["__scopeId", "data-v-c1961485"]]);
162
162
  export {
163
163
  te as default
164
164
  };
package/dist/index.js CHANGED
@@ -58,12 +58,12 @@ import { _ as ud } from "./EmailInput.vue_vue_type_script_setup_true_lang-59bDl9
58
58
  import { _ as fd } from "./EmptyInput.vue_vue_type_script_setup_true_lang-FWDCFF2c.js";
59
59
  import { _ as gd } from "./FileDropzoneInput.vue_vue_type_script_setup_true_lang-BC_qN5qn.js";
60
60
  import { _ as yd } from "./HiddenInput.vue_vue_type_script_setup_true_lang-PtGZ4eLW.js";
61
- import { _ as vd } from "./ImageDropzoneInput.vue_vue_type_script_setup_true_lang-Dhl2jFaM.js";
61
+ import { _ as vd } from "./ImageDropzoneInput.vue_vue_type_script_setup_true_lang-CsAclXd8.js";
62
62
  import { _ as mt } from "./TextAreaInput.vue_vue_type_script_setup_true_lang-Dtf7H1sT.js";
63
- import { _ as ft } from "./SwitchInput.vue_vue_type_script_setup_true_lang-D5Es9AjF.js";
63
+ import { _ as ft } from "./SwitchInput.vue_vue_type_script_setup_true_lang-r8ZwU1Zy.js";
64
64
  import { _ as ke } from "./SelectInput.vue_vue_type_script_setup_true_lang-DEaP3bhC.js";
65
65
  import { _ as kd } from "./SelectTextInput.vue_vue_type_script_setup_true_lang-DYlrRigi.js";
66
- import { _ as $d } from "./SwitchInputGroup.vue_vue_type_script_setup_true_lang-DigNYqVZ.js";
66
+ import { _ as $d } from "./SwitchInputGroup.vue_vue_type_script_setup_true_lang-PgsXeiig.js";
67
67
  import { _ as Cd } from "./TagifyInput.vue_vue_type_script_setup_true_lang-CwxJ2x1x.js";
68
68
  import { _ as Sd } from "./DashboardLayout.vue_vue_type_script_setup_true_lang-BAx4gKqh.js";
69
69
  import { _ as Td } from "./DefaultLayout.vue_vue_type_script_setup_true_lang-BZAz6aC-.js";
@@ -1244,7 +1244,7 @@ const jt = { class: "sl-fixed sl-inset-0 sl-z-10 sl-w-screen sl-overflow-y-auto"
1244
1244
  }, null, 8, ["title", "description", "onClose"])) : w("", !0)
1245
1245
  ]));
1246
1246
  }
1247
- }), ye = /* @__PURE__ */ W(js, [["__scopeId", "data-v-64df06ec"]]), Vs = { class: "sl-py-1 sl-text-sm sl-leading-5 sl-text-gray-600 dark:sl-text-gray-300" }, Bs = { class: "sl-text-xs sl-text-gray-500 dark:sl-text-gray-400" }, fn = /* @__PURE__ */ B({
1247
+ }), ye = /* @__PURE__ */ W(js, [["__scopeId", "data-v-2dd7ddec"]]), Vs = { class: "sl-py-1 sl-text-sm sl-leading-5 sl-text-gray-600 dark:sl-text-gray-300" }, Bs = { class: "sl-text-xs sl-text-gray-500 dark:sl-text-gray-400" }, fn = /* @__PURE__ */ B({
1248
1248
  __name: "OrganizationsEditor",
1249
1249
  props: {
1250
1250
  name: {},
@@ -3697,7 +3697,7 @@ const Wl = /* @__PURE__ */ W(Ol, [["render", Hl]]), ql = { class: "sl-bg-white s
3697
3697
  return (l, c) => (a(), u("div", mo, [
3698
3698
  c[4] || (c[4] = s("div", { class: "sl-absolute sl-inset-0 sl-bg-gray-50 dark:sl-bg-gray-900 sl--z-10" }, null, -1)),
3699
3699
  s("div", fo, [
3700
- c[3] || (c[3] = Je('<div class="sl-rounded-2xl sl-bg-gradient-to-r sl-from-primary-600 sl-to-primary-700 sl-p-6 sl-animate-pulse" data-v-dbce0c6a><div class="sl-flex sl-items-center sl-gap-4" data-v-dbce0c6a><div class="sl-w-20 sl-h-20 sl-rounded-full sl-bg-white/20" data-v-dbce0c6a></div><div class="sl-space-y-2" data-v-dbce0c6a><div class="sl-h-6 sl-w-48 sl-bg-white/20 sl-rounded" data-v-dbce0c6a></div><div class="sl-h-4 sl-w-24 sl-bg-white/20 sl-rounded" data-v-dbce0c6a></div></div></div></div>', 1)),
3700
+ c[3] || (c[3] = Je('<div class="sl-rounded-2xl sl-bg-gradient-to-r sl-from-primary-600 sl-to-primary-700 sl-p-6 sl-animate-pulse" data-v-8fcac1e1><div class="sl-flex sl-items-center sl-gap-4" data-v-8fcac1e1><div class="sl-w-20 sl-h-20 sl-rounded-full sl-bg-white/20" data-v-8fcac1e1></div><div class="sl-space-y-2" data-v-8fcac1e1><div class="sl-h-6 sl-w-48 sl-bg-white/20 sl-rounded" data-v-8fcac1e1></div><div class="sl-h-4 sl-w-24 sl-bg-white/20 sl-rounded" data-v-8fcac1e1></div></div></div></div>', 1)),
3701
3701
  s("div", {
3702
3702
  class: M([
3703
3703
  "sl-grid sl-gap-6",
@@ -3797,7 +3797,7 @@ const Wl = /* @__PURE__ */ W(Ol, [["render", Hl]]), ql = { class: "sl-bg-white s
3797
3797
  ])
3798
3798
  ]));
3799
3799
  }
3800
- }), zn = /* @__PURE__ */ W(_o, [["__scopeId", "data-v-dbce0c6a"]]);
3800
+ }), zn = /* @__PURE__ */ W(_o, [["__scopeId", "data-v-8fcac1e1"]]);
3801
3801
  class Co {
3802
3802
  designTokens;
3803
3803
  prefix = "sl-";
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../ImageDropzoneInput.vue_vue_type_script_setup_true_lang-Dhl2jFaM.js";
1
+ import { _ as f } from "../ImageDropzoneInput.vue_vue_type_script_setup_true_lang-CsAclXd8.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../SwitchInput.vue_vue_type_script_setup_true_lang-D5Es9AjF.js";
1
+ import { _ as f } from "../SwitchInput.vue_vue_type_script_setup_true_lang-r8ZwU1Zy.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../SwitchInputGroup.vue_vue_type_script_setup_true_lang-DigNYqVZ.js";
1
+ import { _ as f } from "../SwitchInputGroup.vue_vue_type_script_setup_true_lang-PgsXeiig.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -47,7 +47,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
47
47
  values: FormData;
48
48
  }>;
49
49
  reset: () => void;
50
- setFieldValue: (fieldName: string, value: any) => void;
50
+ setFieldValue: (fieldName: string, value: unknown) => void;
51
51
  getFieldValue: (fieldName: string) => any;
52
52
  formData: FormData;
53
53
  formRef: import('vue').Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
@@ -33,7 +33,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
33
33
  value: import('vue').Ref<boolean, boolean>;
34
34
  focus: () => void;
35
35
  blur: () => void;
36
- switchRef: import('vue').Ref<any, any>;
36
+ switchRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
37
37
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
38
38
  blur: (event: FocusEvent) => void;
39
39
  focus: (event: FocusEvent) => void;
@@ -7,7 +7,7 @@ export interface BaseInformationFieldType {
7
7
  type?: string;
8
8
  innerLabel?: string;
9
9
  hideLabel?: boolean;
10
- rules?: any;
10
+ rules?: unknown;
11
11
  position?: number;
12
12
  validateOnMount?: boolean;
13
13
  placeholder?: string;
@@ -21,8 +21,8 @@ export interface BaseInformationSchemaType {
21
21
  fields: BaseInformationFieldType[];
22
22
  }
23
23
  export interface BaseInformationDataType {
24
- [key: string]: any;
25
- profile_image?: any;
24
+ [key: string]: unknown;
25
+ profile_image?: string | File | null;
26
26
  email?: string;
27
27
  phone?: string;
28
28
  }
@@ -35,7 +35,7 @@ export interface ValidField {
35
35
  id: string;
36
36
  isValid: boolean;
37
37
  }
38
- type FormValuesType = Record<string, any>;
38
+ type FormValuesType = Record<string, unknown>;
39
39
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
40
40
  value: {
41
41
  type: PropType<BaseInformationDataType>;
@@ -68,9 +68,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
68
68
  results: FormValuesType;
69
69
  }>;
70
70
  validationSchema: import('vue').ComputedRef<import('yup').ObjectSchema<{
71
- [x: string]: any;
71
+ [x: string]: unknown;
72
72
  }, import('yup').AnyObject, {
73
- [x: string]: any;
73
+ [x: string]: undefined;
74
74
  }, "">>;
75
75
  errors: import('vue').ComputedRef<Partial<Record<string, string | undefined>>>;
76
76
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -6,11 +6,14 @@ export interface NamesFieldType {
6
6
  as?: string;
7
7
  type?: string;
8
8
  hideLabel?: boolean;
9
- rules?: any;
9
+ rules?: unknown;
10
10
  position?: number;
11
11
  validateOnMount?: boolean;
12
12
  placeholder?: string;
13
- items?: any[];
13
+ items?: Array<{
14
+ value: string;
15
+ label: string;
16
+ }>;
14
17
  itemKey?: string;
15
18
  itemText?: string;
16
19
  clearable?: boolean;
@@ -64,9 +67,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
64
67
  };
65
68
  }>;
66
69
  validationSchema: import('vue').ComputedRef<import('yup').ObjectSchema<{
67
- [x: string]: any;
70
+ [x: string]: unknown;
68
71
  }, import('yup').AnyObject, {
69
- [x: string]: any;
72
+ [x: string]: undefined;
70
73
  }, "">>;
71
74
  errors: import('vue').ComputedRef<Partial<Record<string, string | undefined>>>;
72
75
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -26,7 +26,9 @@ export interface CollectionEditorReturn<T extends CollectionItem> {
26
26
  /** Current form values */
27
27
  formValues: Ref<T>;
28
28
  /** Reference to the form component */
29
- formRef: Ref<any>;
29
+ formRef: Ref<{
30
+ submitForm?: () => void;
31
+ } | null>;
30
32
  /** Button attributes for add/save/delete */
31
33
  buttonAttributes: ComputedRef<CollectionButtonAttributes>;
32
34
  /** Whether delete confirmation modal should show */
@@ -61,5 +63,5 @@ export interface CollectionEditorReturn<T extends CollectionItem> {
61
63
  /**
62
64
  * Create a collection editor composable instance
63
65
  */
64
- export declare function useCollectionEditor<T extends CollectionItem>(options: CollectionEditorOptions<T>, emit: (event: string, ...args: any[]) => void): CollectionEditorReturn<T>;
66
+ export declare function useCollectionEditor<T extends CollectionItem>(options: CollectionEditorOptions<T>, emit: (event: string, ...args: unknown[]) => void): CollectionEditorReturn<T>;
65
67
  export default useCollectionEditor;
@@ -23,7 +23,7 @@ export interface UseFormValidationOptions {
23
23
  /**
24
24
  * Validation schema (Yup schema object)
25
25
  */
26
- schema?: ObjectSchema<any>;
26
+ schema?: ObjectSchema<Record<string, unknown>>;
27
27
  /**
28
28
  * Initial values for the form fields
29
29
  */
@@ -48,11 +48,11 @@ export interface FormValidationResult {
48
48
  /** Map of field names to error messages */
49
49
  errors: Record<string, string>;
50
50
  /** Current form values */
51
- values: Record<string, any>;
51
+ values: Record<string, unknown>;
52
52
  /** Source identifier for nested form aggregation */
53
53
  source?: string;
54
54
  /** Per-field validation results */
55
- results?: Record<string, any>;
55
+ results?: Record<string, unknown>;
56
56
  }
57
57
  /**
58
58
  * Base props shared by ALL input components.
@@ -153,7 +153,7 @@ export interface InputBaseProps {
153
153
  * const emit = defineEmits<InputEmits<string>>();
154
154
  * ```
155
155
  */
156
- export interface InputEmits<T = any> {
156
+ export interface InputEmits<T = unknown> {
157
157
  /**
158
158
  * Emitted when the input value changes.
159
159
  * Used for v-model binding.
@@ -427,7 +427,7 @@ export interface DynamicFormProps {
427
427
  /**
428
428
  * Initial form values.
429
429
  */
430
- formValues?: Record<string, any>;
430
+ formValues?: Record<string, unknown>;
431
431
  /**
432
432
  * Form identifier for debugging.
433
433
  * @default 'generic'
@@ -529,7 +529,7 @@ export interface NotificationConfig {
529
529
  */
530
530
  export interface CloudinaryTransformationStep {
531
531
  type: string;
532
- params?: Record<string, any>;
532
+ params?: Record<string, unknown>;
533
533
  }
534
534
  /**
535
535
  * Cloudinary asset configuration.
@@ -14,7 +14,9 @@ export declare class ComponentRegistry {
14
14
  /**
15
15
  * Register a new component type
16
16
  */
17
- register(type: string, component: string, loader: () => Promise<any>): void;
17
+ register(type: string, component: string, loader: () => Promise<{
18
+ default: Component;
19
+ }>): void;
18
20
  /**
19
21
  * Get a component for a field type
20
22
  */
@@ -40,7 +42,9 @@ export declare const componentRegistry: ComponentRegistry;
40
42
  /**
41
43
  * Register a component type globally
42
44
  */
43
- export declare function registerComponent(type: string, component: string, loader: () => Promise<any>): void;
45
+ export declare function registerComponent(type: string, component: string, loader: () => Promise<{
46
+ default: Component;
47
+ }>): void;
44
48
  /**
45
49
  * Get a component for a field type
46
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stachelock/ui",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "A comprehensive Vue 3 UI component library built with Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",