vlite3 0.6.1 → 0.6.3

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,4 +1,4 @@
1
- import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as d, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
1
+ import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as i, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
2
  import p from "./Icon.vue.js";
3
3
  import B from "./Label.vue.js";
4
4
  import { $t as N } from "../utils/i18n.js";
@@ -23,8 +23,8 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
23
23
  setup(t, { emit: b }) {
24
24
  const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
25
25
  if (e.disabled) return;
26
- const i = !(e.modelValue || e.checked);
27
- c("update:modelValue", i), c("update:checked", i);
26
+ const d = !(e.modelValue || e.checked);
27
+ c("update:modelValue", d), c("update:checked", d);
28
28
  }, k = {
29
29
  xs: "h-3.5 w-3.5",
30
30
  sm: "h-4 w-4",
@@ -37,7 +37,7 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
37
37
  md: "h-3.5 w-3.5",
38
38
  lg: "h-4 w-4",
39
39
  xl: "h-5 w-5"
40
- }, x = {
40
+ }, y = {
41
41
  none: "rounded-none",
42
42
  xs: "rounded-[3px]",
43
43
  sm: "rounded-[4px]",
@@ -46,29 +46,30 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
46
46
  xl: "rounded-lg",
47
47
  "2xl": "rounded-xl",
48
48
  full: "rounded-full"
49
- }, y = s(() => [
50
- "peer shrink-0 border border-primary transition-all duration-200 ease-in-out",
49
+ }, a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), x = s(() => [
50
+ "peer shrink-0 border transition-all duration-200 ease-in-out",
51
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
52
52
  "disabled:cursor-not-allowed disabled:opacity-50",
53
53
  "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
54
54
  "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
55
55
  "cursor-pointer bg-transparent",
56
56
  k[e.size],
57
- x[e.rounded || e.size],
57
+ y[e.rounded || e.size],
58
+ a.value === "checked" ? "border-primary!" : "border-gray-400!",
58
59
  e.class
59
- ].join(" ")), a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked");
60
+ ].join(" "));
60
61
  return s(() => [
61
62
  "transition-transform duration-200",
62
63
  a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
63
64
  n[e.size]
64
- ].join(" ")), (i, $) => (l(), f("div", _, [
65
+ ].join(" ")), (d, $) => (l(), f("div", _, [
65
66
  g("button", {
66
67
  type: "button",
67
68
  role: "checkbox",
68
69
  "aria-checked": t.indeterminate ? "mixed" : t.modelValue,
69
70
  "data-state": a.value,
70
71
  disabled: t.disabled,
71
- class: d(y.value),
72
+ class: i(x.value),
72
73
  id: t.id,
73
74
  onClick: m
74
75
  }, [
@@ -85,11 +86,11 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
85
86
  a.value === "checked" ? (l(), o(p, {
86
87
  key: 0,
87
88
  icon: "lucide:check",
88
- class: d(n[t.size])
89
+ class: i(n[t.size])
89
90
  }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
90
91
  key: 1,
91
92
  icon: "lucide:minus",
92
- class: d(n[t.size])
93
+ class: i(n[t.size])
93
94
  }, null, 8, ["class"])) : r("", !0)
94
95
  ]),
95
96
  _: 1
@@ -1,7 +1,7 @@
1
1
  import t from "./CommandPaletteContent.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6b4a4b96"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e919f56b"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -255,7 +255,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
255
255
  "aria-disabled": e.disabled || void 0,
256
256
  "data-active": x(r, l) === a.value,
257
257
  class: T(["command-palette-item w-full flex items-center gap-3 px-3! py-2.5 mx-1 rounded-lg text-sm transition-colors duration-100 text-left cursor-pointer select-none focus-visible:outline-none", [
258
- x(r, l) === a.value ? "bg-gray-200 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
258
+ x(r, l) === a.value ? "bg-gray-200/80 text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground",
259
259
  e.disabled ? "opacity-40 cursor-not-allowed" : ""
260
260
  ]]),
261
261
  style: { width: "calc(100% - 8px)" },
@@ -265,7 +265,7 @@ const se = { class: "command-palette-content flex flex-col w-full h-full max-h-[
265
265
  s("span", {
266
266
  class: T([
267
267
  "shrink-0 flex items-center justify-center w-7 h-7 rounded-md",
268
- x(r, l) === a.value ? "bg-gray-300 text-primary" : "bg-muted/80 text-muted-foreground"
268
+ x(r, l) === a.value ? "bg-gray-300/80 text-gray-900" : "bg-muted/80 text-muted-foreground"
269
269
  ])
270
270
  }, [
271
271
  w(h, {
@@ -1,52 +1,29 @@
1
1
  import { IForm, IFormStep, IFormSubmitPayload } from './types';
2
2
  import { InputVariant, InputSize, InputRounded, TimelineTextPosition, ButtonProps } from '../../types';
3
3
  interface Props {
4
- /** Schema - single array or grouped arrays */
5
4
  schema: IForm[] | IForm[][];
6
- /** Initial/bound values */
7
5
  values?: Record<string, any>;
8
- /** Input variant applied to all fields */
9
6
  variant?: InputVariant;
10
- /** Input size applied to all fields */
11
7
  size?: InputSize;
12
- /** Input rounded applied to all fields */
13
8
  rounded?: InputRounded;
14
- /** Loading state during submit */
15
9
  loading?: boolean;
16
- /** Show/hide default footer with submit button */
17
10
  footer?: boolean;
18
- /** Headings for grouped schemas */
19
11
  groupsHeadings?: string[];
20
- /** Descriptions for grouped schemas */
21
12
  groupHeadingsDescription?: string[];
22
- /** Timeline steps for multi-step form mode */
23
13
  tabs?: IFormStep[];
24
- /** Submit button text */
25
14
  submitText?: string;
26
15
  submitProps?: ButtonProps;
27
- /** Cancel button text */
28
16
  cancelText?: string;
29
- /** Show cancel button */
30
17
  showCancel?: boolean;
31
- /** Whether this is an update operation */
32
18
  isUpdate?: boolean;
33
- /** Folder ID for file uploads */
34
19
  folderId?: string;
35
- /** Custom class for form element */
36
20
  class?: string;
37
- /** Custom class for the grid layout (overrides columns) */
38
21
  className?: string;
39
- /** Custom class for group containers */
40
22
  groupClass?: string;
41
- /** Custom class for group/step headers */
42
23
  headerClass?: string;
43
- /** Custom class for the footer area */
44
24
  footerClass?: string;
45
- /** Timeline text position */
46
25
  timelineTextPosition?: TimelineTextPosition;
47
- /** Fields to explicitly include in the submit payload */
48
26
  emitFields?: string[];
49
- /** Show asterisk for required fields */
50
27
  showRequiredAsterisk?: boolean;
51
28
  }
52
29
  declare function __VLS_template(): {
@@ -1,7 +1,7 @@
1
1
  import o from "./Form.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-655cd96c"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-78f87e2c"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,26 +1,26 @@
1
- import { defineComponent as se, inject as le, computed as n, ref as oe, watch as $, onUnmounted as ne, openBlock as o, createElementBlock as u, withModifiers as re, normalizeClass as g, createVNode as V, unref as a, createCommentVNode as d, Fragment as ue, renderList as de, createElementVNode as p, toDisplayString as N, renderSlot as ce, createBlock as S, mergeProps as j } from "vue";
2
- import { useForm as me } from "./composables/useForm.js";
1
+ import { defineComponent as le, inject as oe, computed as n, ref as ne, watch as $, onUnmounted as re, openBlock as o, createElementBlock as d, withModifiers as ue, normalizeClass as g, createVNode as N, unref as s, createCommentVNode as c, Fragment as de, renderList as ce, createElementVNode as p, toDisplayString as U, renderSlot as me, createBlock as S, mergeProps as j } from "vue";
2
+ import { useForm as ve } from "./composables/useForm.js";
3
3
  import H from "./FormFields.vue.js";
4
4
  import C from "../Button.vue.js";
5
- import ve from "../Timeline/Timeline.vue.js";
5
+ import fe from "../Timeline/Timeline.vue.js";
6
6
  import "@iconify/vue";
7
- import { useVLiteConfig as fe } from "../../core/config.js";
8
- const ge = {
7
+ import { useVLiteConfig as ge } from "../../core/config.js";
8
+ const he = {
9
9
  key: 1,
10
10
  class: "form-fields-single"
11
- }, he = {
11
+ }, be = {
12
12
  key: 2,
13
13
  class: "form-groups space-y-6"
14
- }, be = { class: "text-base font-semibold text-foreground" }, ye = {
14
+ }, ye = { class: "text-base font-semibold text-foreground" }, pe = {
15
15
  key: 0,
16
16
  class: "text-sm text-muted-foreground mt-1"
17
- }, pe = { class: "form-group-body p-6" }, Se = {
17
+ }, Se = { class: "form-group-body p-4.5" }, Ce = {
18
18
  key: 3,
19
19
  class: "form-step"
20
- }, Ce = { class: "text-lg font-semibold text-foreground" }, ke = {
20
+ }, ke = { class: "text-lg font-semibold text-foreground" }, xe = {
21
21
  key: 0,
22
22
  class: "text-sm text-muted-foreground mt-1"
23
- }, Fe = { class: "flex items-center gap-3" }, xe = { class: "flex items-center gap-3 ml-auto" }, qe = /* @__PURE__ */ se({
23
+ }, Fe = { class: "flex items-center gap-3" }, Ae = { class: "flex items-center gap-3 ml-auto" }, Te = /* @__PURE__ */ le({
24
24
  __name: "Form",
25
25
  props: {
26
26
  schema: {},
@@ -50,19 +50,19 @@ const ge = {
50
50
  },
51
51
  emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
52
52
  setup(e, { emit: I }) {
53
- const t = e, m = I, v = le(
53
+ const i = e, m = I, v = oe(
54
54
  "modal-context",
55
55
  null
56
- ), J = fe(), k = n(() => J?.components?.form || {}), U = n(() => t.variant ?? k.value.variant ?? "outline"), z = n(() => t.size ?? k.value.size ?? "md"), P = n(() => t.rounded ?? k.value.rounded ?? "md"), D = n(
57
- () => t.showRequiredAsterisk ?? k.value.showRequiredAsterisk ?? !0
58
- ), K = n(() => t.showCancel || !!v), O = n(() => !!v), F = n(() => !t.schema || t.schema.length === 0 ? !1 : Array.isArray(t.schema[0])), r = n(() => t.tabs && t.tabs.length > 0 && F.value), s = oe(0), M = n(() => t.tabs ? t.tabs.map((l, i) => ({
59
- id: l.id?.toString() || i.toString(),
60
- title: l.title,
61
- icon: l.icon,
62
- description: l.description,
63
- status: i < s.value ? "completed" : i === s.value ? "current" : "upcoming"
64
- })) : []), h = n(() => F.value ? t.schema : [t.schema]), E = n(() => r.value ? h.value[s.value] || [] : []), {
65
- formValues: x,
56
+ ), K = ge(), k = n(() => K?.components?.form || {}), z = n(() => i.variant ?? k.value.variant ?? "outline"), D = n(() => i.size ?? k.value.size ?? "md"), P = n(() => i.rounded ?? k.value.rounded ?? "md"), q = n(
57
+ () => i.showRequiredAsterisk ?? k.value.showRequiredAsterisk ?? !0
58
+ ), J = n(() => i.showCancel || !!v), O = n(() => !!v), x = n(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), u = n(() => i.tabs && i.tabs.length > 0 && x.value), l = ne(0), M = n(() => i.tabs ? i.tabs.map((a, t) => ({
59
+ id: a.id?.toString() || t.toString(),
60
+ title: a.title,
61
+ icon: a.icon,
62
+ description: a.description,
63
+ status: t < l.value ? "completed" : t === l.value ? "current" : "upcoming"
64
+ })) : []), h = n(() => x.value ? i.schema : [i.schema]), E = n(() => u.value ? h.value[l.value] || [] : []), {
65
+ formValues: F,
66
66
  errors: b,
67
67
  isSubmitting: y,
68
68
  handleFieldChange: Q,
@@ -70,63 +70,63 @@ const ge = {
70
70
  validateAll: X,
71
71
  isFieldVisible: A,
72
72
  isFieldDisabled: w,
73
- isFieldReadonly: q,
74
- getFieldValue: Ae,
73
+ isFieldReadonly: T,
74
+ getFieldValue: we,
75
75
  handleSubmit: Y,
76
- flatSchema: we
77
- } = me({
78
- schema: t.schema,
79
- values: t.values,
80
- isUpdate: t.isUpdate,
81
- folderId: t.folderId,
82
- emitFields: t.emitFields,
83
- onSubmit: (l) => {
84
- m("onSubmit", l, v?.close || (() => {
76
+ flatSchema: Re
77
+ } = ve({
78
+ schema: i.schema,
79
+ values: i.values,
80
+ isUpdate: i.isUpdate,
81
+ folderId: i.folderId,
82
+ emitFields: i.emitFields,
83
+ onSubmit: (a) => {
84
+ m("onSubmit", a, v?.close || (() => {
85
85
  }));
86
86
  }
87
87
  });
88
88
  $(
89
- () => t.loading || y.value,
90
- (l) => {
91
- v?.setSubmitting && v.setSubmitting(l);
89
+ () => i.loading || y.value,
90
+ (a) => {
91
+ v?.setSubmitting && v.setSubmitting(a);
92
92
  },
93
93
  { immediate: !0 }
94
- ), ne(() => {
94
+ ), re(() => {
95
95
  v?.setSubmitting && v.setSubmitting(!1);
96
96
  }), $(
97
- () => t.values,
98
- (l) => {
97
+ () => i.values,
98
+ (a) => {
99
99
  },
100
100
  { deep: !0 }
101
101
  );
102
- const T = (l, i) => {
103
- Q(l, i.value, i.data);
102
+ const B = (a, t) => {
103
+ Q(a, t.value, t.data);
104
104
  }, Z = () => {
105
- if (!r.value) return !0;
106
- const l = E.value;
107
- let i = !0;
108
- for (const c of l) {
109
- if (!A(c) || w(c)) continue;
110
- W(c) && (i = !1);
105
+ if (!u.value) return !0;
106
+ const a = E.value;
107
+ let t = !0;
108
+ for (const r of a) {
109
+ if (!A(r) || w(r)) continue;
110
+ W(r) && (t = !1);
111
111
  }
112
- return i;
113
- }, _ = n(() => r.value ? s.value < h.value.length - 1 : !1), G = n(() => r.value ? s.value > 0 : !1), R = n(() => r.value ? s.value === h.value.length - 1 : !0), L = () => {
114
- _.value && Z() && (s.value++, m("onStepChange", s.value));
112
+ return t;
113
+ }, _ = n(() => u.value ? l.value < h.value.length - 1 : !1), L = n(() => u.value ? l.value > 0 : !1), R = n(() => u.value ? l.value === h.value.length - 1 : !0), G = () => {
114
+ _.value && Z() && (l.value++, m("onStepChange", l.value));
115
115
  }, ee = () => {
116
- G.value && (s.value--, m("onStepChange", s.value));
117
- }, te = (l, i) => {
118
- i <= s.value && (s.value = i, m("onStepChange", s.value));
119
- }, B = async () => {
120
- if (r.value) {
121
- if (!R.value && !t.isUpdate) {
122
- L();
116
+ L.value && (l.value--, m("onStepChange", l.value));
117
+ }, te = (a, t) => {
118
+ t <= l.value && (l.value = t, m("onStepChange", l.value));
119
+ }, V = async () => {
120
+ if (u.value) {
121
+ if (!R.value && !i.isUpdate) {
122
+ G();
123
123
  return;
124
124
  }
125
125
  if (!X()) {
126
- const i = h.value.findIndex(
127
- (c) => c.some((f) => !!b.value[f.name])
126
+ const t = h.value.findIndex(
127
+ (r) => r.some((f) => !!b.value[f.name])
128
128
  );
129
- i !== -1 && i !== s.value && (s.value = i, m("onStepChange", s.value));
129
+ t !== -1 && t !== l.value && (l.value = t, m("onStepChange", l.value));
130
130
  return;
131
131
  }
132
132
  }
@@ -134,106 +134,111 @@ const ge = {
134
134
  await Y();
135
135
  } catch {
136
136
  }
137
- }, ie = () => {
137
+ }, ie = (a) => {
138
+ if (a.key !== "Enter") return;
139
+ const r = a.target.tagName.toLowerCase();
140
+ r !== "textarea" && r !== "button" && (a.preventDefault(), V());
141
+ }, ae = () => {
138
142
  m("onCancel"), v && v?.close?.();
139
143
  };
140
- return (l, i) => (o(), u("form", {
141
- class: g(["form-container", t.class]),
142
- onSubmit: re(B, ["prevent"])
144
+ return (a, t) => (o(), d("form", {
145
+ class: g(["form-container", i.class]),
146
+ onSubmit: ue(V, ["prevent"]),
147
+ onKeydown: ie
143
148
  }, [
144
- r.value && M.value.length > 0 ? (o(), u("div", {
149
+ u.value && M.value.length > 0 ? (o(), d("div", {
145
150
  key: 0,
146
151
  class: g(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
147
152
  }, [
148
- V(a(ve), {
153
+ N(s(fe), {
149
154
  steps: M.value,
150
- activeStep: s.value,
155
+ activeStep: l.value,
151
156
  direction: "horizontal",
152
157
  textPosition: e.timelineTextPosition,
153
158
  clickable: !0,
154
159
  onStepClick: te
155
160
  }, null, 8, ["steps", "activeStep", "textPosition"])
156
- ], 2)) : d("", !0),
157
- F.value ? F.value && !r.value ? (o(), u("div", he, [
158
- (o(!0), u(ue, null, de(h.value, (c, f) => (o(), u("div", {
161
+ ], 2)) : c("", !0),
162
+ x.value ? x.value && !u.value ? (o(), d("div", be, [
163
+ (o(!0), d(de, null, ce(h.value, (r, f) => (o(), d("div", {
159
164
  key: f,
160
- class: g(["form-group border rounded-lg overflow-hidden", e.groupClass])
165
+ class: g(["form-group border rounded overflow-hidden", e.groupClass])
161
166
  }, [
162
- e.groupsHeadings?.[f] ? (o(), u("div", {
167
+ e.groupsHeadings?.[f] ? (o(), d("div", {
163
168
  key: 0,
164
- class: g(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
169
+ class: g(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
165
170
  }, [
166
- p("h3", be, N(e.groupsHeadings[f]), 1),
167
- e.groupHeadingsDescription?.[f] ? (o(), u("p", ye, N(e.groupHeadingsDescription[f]), 1)) : d("", !0)
168
- ], 2)) : d("", !0),
169
- p("div", pe, [
170
- V(H, {
171
- schema: c,
172
- values: a(x),
173
- errors: a(b),
174
- variant: U.value,
175
- size: z.value,
171
+ p("h3", ye, U(e.groupsHeadings[f]), 1),
172
+ e.groupHeadingsDescription?.[f] ? (o(), d("p", pe, U(e.groupHeadingsDescription[f]), 1)) : c("", !0)
173
+ ], 2)) : c("", !0),
174
+ p("div", Se, [
175
+ N(H, {
176
+ schema: r,
177
+ values: s(F),
178
+ errors: s(b),
179
+ variant: z.value,
180
+ size: D.value,
176
181
  rounded: P.value,
177
182
  className: e.className,
178
183
  isUpdate: e.isUpdate,
179
- showRequiredAsterisk: D.value,
180
- isFieldVisible: a(A),
181
- isFieldDisabled: a(w),
182
- isFieldReadonly: a(q),
183
- onChange: T,
184
- onAddonAction: i[1] || (i[1] = (ae) => m("onAddonAction", ae))
184
+ showRequiredAsterisk: q.value,
185
+ isFieldVisible: s(A),
186
+ isFieldDisabled: s(w),
187
+ isFieldReadonly: s(T),
188
+ onChange: B,
189
+ onAddonAction: t[1] || (t[1] = (se) => m("onAddonAction", se))
185
190
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
186
191
  ])
187
192
  ], 2))), 128))
188
- ])) : r.value ? (o(), u("div", Se, [
189
- e.tabs?.[s.value] ? (o(), u("div", {
193
+ ])) : u.value ? (o(), d("div", Ce, [
194
+ e.tabs?.[l.value] ? (o(), d("div", {
190
195
  key: 0,
191
196
  class: g(["form-step-header mb-6", e.headerClass])
192
197
  }, [
193
- p("h2", Ce, N(e.tabs[s.value].title), 1),
194
- e.tabs[s.value].description ? (o(), u("p", ke, N(e.tabs[s.value].description), 1)) : d("", !0)
195
- ], 2)) : d("", !0),
196
- V(H, {
198
+ p("h2", ke, U(e.tabs[l.value].title), 1),
199
+ e.tabs[l.value].description ? (o(), d("p", xe, U(e.tabs[l.value].description), 1)) : c("", !0)
200
+ ], 2)) : c("", !0),
201
+ N(H, {
197
202
  schema: E.value,
198
- values: a(x),
199
- errors: a(b),
200
- variant: U.value,
201
- size: z.value,
203
+ values: s(F),
204
+ errors: s(b),
205
+ variant: z.value,
206
+ size: D.value,
202
207
  rounded: P.value,
203
208
  className: e.className,
204
209
  isUpdate: e.isUpdate,
205
- showRequiredAsterisk: D.value,
206
- isFieldVisible: a(A),
207
- isFieldDisabled: a(w),
208
- isFieldReadonly: a(q),
209
- onChange: T,
210
- onAddonAction: i[2] || (i[2] = (c) => m("onAddonAction", c))
210
+ showRequiredAsterisk: q.value,
211
+ isFieldVisible: s(A),
212
+ isFieldDisabled: s(w),
213
+ isFieldReadonly: s(T),
214
+ onChange: B,
215
+ onAddonAction: t[2] || (t[2] = (r) => m("onAddonAction", r))
211
216
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
212
- ])) : d("", !0) : (o(), u("div", ge, [
213
- V(H, {
217
+ ])) : c("", !0) : (o(), d("div", he, [
218
+ N(H, {
214
219
  schema: e.schema,
215
- values: a(x),
216
- errors: a(b),
217
- variant: U.value,
218
- size: z.value,
220
+ values: s(F),
221
+ errors: s(b),
222
+ variant: z.value,
223
+ size: D.value,
219
224
  rounded: P.value,
220
225
  className: e.className,
221
226
  isUpdate: e.isUpdate,
222
- showRequiredAsterisk: D.value,
223
- isFieldVisible: a(A),
224
- isFieldDisabled: a(w),
225
- isFieldReadonly: a(q),
226
- onChange: T,
227
- onAddonAction: i[0] || (i[0] = (c) => m("onAddonAction", c))
227
+ showRequiredAsterisk: q.value,
228
+ isFieldVisible: s(A),
229
+ isFieldDisabled: s(w),
230
+ isFieldReadonly: s(T),
231
+ onChange: B,
232
+ onAddonAction: t[0] || (t[0] = (r) => m("onAddonAction", r))
228
233
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
229
234
  ])),
230
- ce(l.$slots, "default", {
231
- values: a(x),
232
- errors: a(b),
233
- isSubmitting: a(y),
234
- handleSubmit: B
235
+ me(a.$slots, "default", {
236
+ values: s(F),
237
+ errors: s(b),
238
+ isSubmitting: s(y),
239
+ handleSubmit: V
235
240
  }, void 0, !0),
236
- e.footer ? (o(), u("div", {
241
+ e.footer ? (o(), d("div", {
237
242
  key: 4,
238
243
  class: g([
239
244
  "form-footer flex items-center justify-between gap-3",
@@ -242,54 +247,54 @@ const ge = {
242
247
  ])
243
248
  }, [
244
249
  p("div", Fe, [
245
- K.value ? (o(), S(C, {
250
+ J.value ? (o(), S(C, {
246
251
  key: 0,
247
252
  type: "button",
248
253
  variant: "outline",
249
254
  text: e.cancelText,
250
- disabled: e.loading || a(y),
251
- onClick: ie
252
- }, null, 8, ["text", "disabled"])) : d("", !0),
253
- r.value && e.isUpdate && !R.value ? (o(), S(C, j({
255
+ disabled: e.loading || s(y),
256
+ onClick: ae
257
+ }, null, 8, ["text", "disabled"])) : c("", !0),
258
+ u.value && e.isUpdate && !R.value ? (o(), S(C, j({
254
259
  key: 1,
255
260
  type: "button",
256
261
  variant: "primary",
257
262
  text: e.submitText
258
263
  }, e.submitProps, {
259
- loading: e.loading || a(y),
260
- onClick: B
261
- }), null, 16, ["text", "loading"])) : d("", !0)
264
+ loading: e.loading || s(y),
265
+ onClick: V
266
+ }), null, 16, ["text", "loading"])) : c("", !0)
262
267
  ]),
263
- p("div", xe, [
264
- r.value && G.value ? (o(), S(C, {
268
+ p("div", Ae, [
269
+ u.value && L.value ? (o(), S(C, {
265
270
  key: 0,
266
271
  type: "button",
267
272
  variant: "outline",
268
273
  icon: "lucide:arrow-left",
269
274
  text: "Previous",
270
275
  onClick: ee
271
- })) : d("", !0),
272
- r.value && !R.value ? (o(), S(C, {
276
+ })) : c("", !0),
277
+ u.value && !R.value ? (o(), S(C, {
273
278
  key: 1,
274
279
  type: "button",
275
280
  variant: e.isUpdate ? "outline" : "primary",
276
281
  text: "Next",
277
282
  iconRight: "lucide:arrow-right",
278
- onClick: L
279
- }, null, 8, ["variant"])) : d("", !0),
280
- !r.value || R.value ? (o(), S(C, j({
283
+ onClick: G
284
+ }, null, 8, ["variant"])) : c("", !0),
285
+ !u.value || R.value ? (o(), S(C, j({
281
286
  key: 2,
282
287
  type: "submit",
283
288
  variant: "primary",
284
289
  text: e.submitText
285
290
  }, e.submitProps, {
286
- loading: e.loading || a(y)
287
- }), null, 16, ["text", "loading"])) : d("", !0)
291
+ loading: e.loading || s(y)
292
+ }), null, 16, ["text", "loading"])) : c("", !0)
288
293
  ])
289
- ], 2)) : d("", !0)
294
+ ], 2)) : c("", !0)
290
295
  ], 34));
291
296
  }
292
297
  });
293
298
  export {
294
- qe as default
299
+ Te as default
295
300
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as U, computed as o, markRaw as I, openBlock as r, createBlock as f, mergeProps as s, toHandlers as S, createSlots as N, unref as R, withCtx as n, createVNode as z, createTextVNode as c, toDisplayString as m, createCommentVNode as L, resolveDynamicComponent as B } from "vue";
1
+ import { defineComponent as U, computed as o, markRaw as I, openBlock as r, createBlock as f, mergeProps as s, toHandlers as S, createSlots as N, unref as z, withCtx as n, createVNode as R, createTextVNode as c, toDisplayString as m, createCommentVNode as L, resolveDynamicComponent as B } from "vue";
2
2
  import { isComponent as h, isAddonObject as p } from "./utils/form.utils.js";
3
3
  import O from "../NumberInput.vue.js";
4
4
  import v from "../Button.vue.js";
@@ -119,6 +119,7 @@ const ue = /* @__PURE__ */ U({
119
119
  } : t === "switch" ? {
120
120
  ...a,
121
121
  modelValue: !!e.value,
122
+ size: "sm",
122
123
  label: ""
123
124
  // Label handled externally
124
125
  } : t === "check" ? {
@@ -240,7 +241,7 @@ const ue = /* @__PURE__ */ U({
240
241
  ...b.value,
241
242
  ...l.field?.props || {}
242
243
  }, S(x.value)), N({ _: 2 }, [
243
- R(p)(l.field.addonLeft) ? {
244
+ z(p)(l.field.addonLeft) ? {
244
245
  name: "addon-left",
245
246
  fn: n(() => [
246
247
  l.field.addonLeft.type === "select" ? (r(), f(y, s({
@@ -251,7 +252,7 @@ const ue = /* @__PURE__ */ U({
251
252
  onOnSelect: a[0] || (a[0] = (i) => V(l.field.addonLeft, i))
252
253
  }), {
253
254
  trigger: n(({ selectedLabel: i }) => [
254
- z(v, { variant: "outline" }, {
255
+ R(v, { variant: "outline" }, {
255
256
  default: n(() => [
256
257
  c(m(i), 1)
257
258
  ]),
@@ -273,7 +274,7 @@ const ue = /* @__PURE__ */ U({
273
274
  ]),
274
275
  key: "0"
275
276
  } : void 0,
276
- R(p)(l.field.addonRight) ? {
277
+ z(p)(l.field.addonRight) ? {
277
278
  name: "addon-right",
278
279
  fn: n(() => [
279
280
  l.field.addonRight.type === "select" ? (r(), f(y, s({
@@ -284,7 +285,7 @@ const ue = /* @__PURE__ */ U({
284
285
  onOnSelect: a[2] || (a[2] = (i) => V(l.field.addonRight, i))
285
286
  }), {
286
287
  trigger: n(({ selectedLabel: i }) => [
287
- z(v, { variant: "outline" }, {
288
+ R(v, { variant: "outline" }, {
288
289
  default: n(() => [
289
290
  c(m(i), 1)
290
291
  ]),
@@ -1,7 +1,7 @@
1
1
  import o from "./FormFields.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-03c267ac"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0fe8a23f"]]);
5
5
  export {
6
- c as default
6
+ a as default
7
7
  };