vlite3 0.1.10 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +226 -150
  2. package/components/Button.vue.js +1 -1
  3. package/components/Chip/Chip.vue.js +15 -15
  4. package/components/DataTable/DataTable.vue.js +2 -2
  5. package/components/DataTable/DataTable.vue2.js +41 -39
  6. package/components/DataTable/types.d.ts +1 -0
  7. package/components/DatePicker.vue.d.ts +12 -3
  8. package/components/DatePicker.vue.js +80 -39
  9. package/components/Dropdown/DropdownMenu.vue.js +48 -47
  10. package/components/Form/Form.vue.d.ts +2 -0
  11. package/components/Form/Form.vue.js +2 -2
  12. package/components/Form/Form.vue2.js +104 -101
  13. package/components/Form/FormField.vue.d.ts +4 -0
  14. package/components/Form/FormField.vue.js +248 -148
  15. package/components/Form/FormFields.vue.d.ts +2 -0
  16. package/components/Form/FormFields.vue.js +2 -2
  17. package/components/Form/FormFields.vue2.js +45 -39
  18. package/components/Form/types.d.ts +24 -4
  19. package/components/Form/utils/form.utils.d.ts +5 -1
  20. package/components/Form/utils/form.utils.js +69 -60
  21. package/components/GoogleLogin.vue.d.ts +41 -0
  22. package/components/GoogleLogin.vue.js +60 -0
  23. package/components/GoogleLogin.vue2.js +4 -0
  24. package/components/Input.vue.js +120 -111
  25. package/components/NumberInput.vue.d.ts +38 -0
  26. package/components/NumberInput.vue.js +7 -0
  27. package/components/NumberInput.vue2.js +191 -0
  28. package/components/Pagination/Pagination.vue.d.ts +1 -0
  29. package/components/Pagination/Pagination.vue.js +60 -46
  30. package/components/ProgressBar/ProgressBar.vue.d.ts +12 -0
  31. package/components/ProgressBar/ProgressBar.vue.js +7 -0
  32. package/components/ProgressBar/ProgressBar.vue2.js +158 -0
  33. package/components/ProgressBar/index.d.ts +3 -0
  34. package/components/Spinner/Spinner.vue.d.ts +8 -0
  35. package/components/Spinner/Spinner.vue.js +89 -0
  36. package/components/Spinner/Spinner.vue2.js +4 -0
  37. package/components/Spinner/index.d.ts +2 -0
  38. package/components/Spinner/types.d.ts +9 -0
  39. package/components/Tabes/Tabes.vue.d.ts +3 -1
  40. package/components/Tabes/Tabes.vue.js +103 -44
  41. package/directives/vScrollReveal.d.ts +2 -0
  42. package/directives/vScrollReveal.js +48 -0
  43. package/index.d.ts +8 -0
  44. package/index.js +180 -147
  45. package/package.json +6 -3
  46. package/style.css +56 -4
  47. package/types/form.type.d.ts +2 -2
  48. package/types/progressbar.d.ts +75 -0
  49. package/utils/env.d.ts +14 -0
  50. package/utils/env.js +4 -0
  51. package/utils/functions.d.ts +99 -0
  52. package/utils/functions.js +91 -7
  53. package/utils/index.d.ts +2 -0
  54. package/utils/search.util.d.ts +127 -0
  55. package/utils/search.util.js +363 -0
@@ -62,10 +62,12 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
62
62
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
63
63
  onSubmit: (payload: IFormSubmitPayload, close: () => void) => any;
64
64
  onCancel: () => any;
65
+ onAddonAction: (action: string) => any;
65
66
  onStepChange: (step: number) => any;
66
67
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
67
68
  onOnSubmit?: (payload: IFormSubmitPayload, close: () => void) => any;
68
69
  onOnCancel?: () => any;
70
+ onOnAddonAction?: (action: string) => any;
69
71
  onOnStepChange?: (step: number) => any;
70
72
  }>, {
71
73
  values: Record<string, any>;
@@ -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-353f6094"]]);
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67eb0c47"]]);
5
5
  export {
6
- p as default
6
+ _ as default
7
7
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as Q, inject as W, computed as u, ref as X, watch as Y, openBlock as s, createElementBlock as o, withModifiers as Z, normalizeClass as h, createVNode as x, createCommentVNode as d, unref as t, Fragment as _, renderList as ee, createElementVNode as D, toDisplayString as k, renderSlot as te, createBlock as p, mergeProps as ae } from "vue";
2
- import { useForm as ie } from "./composables/useForm.js";
3
- import w from "./FormFields.vue.js";
4
- import N from "../Button.vue.js";
5
- import se from "../Timeline.vue.js";
6
- const le = {
1
+ import { defineComponent as W, inject as X, computed as d, ref as Y, watch as Z, openBlock as l, createElementBlock as o, withModifiers as _, normalizeClass as h, createVNode as x, createCommentVNode as c, unref as t, Fragment as ee, renderList as te, createElementVNode as U, toDisplayString as k, renderSlot as ae, createBlock as p, mergeProps as ie } from "vue";
2
+ import { useForm as se } from "./composables/useForm.js";
3
+ import D from "./FormFields.vue.js";
4
+ import A from "../Button.vue.js";
5
+ import le from "../Timeline.vue.js";
6
+ const ne = {
7
7
  key: 0,
8
8
  class: "form-timeline mb-18"
9
- }, ne = {
9
+ }, oe = {
10
10
  key: 1,
11
11
  class: "form-fields-single"
12
- }, oe = {
12
+ }, re = {
13
13
  key: 2,
14
14
  class: "form-groups space-y-6"
15
- }, re = { class: "text-base font-semibold text-foreground" }, ue = {
15
+ }, de = { class: "text-base font-semibold text-foreground" }, ue = {
16
16
  key: 0,
17
17
  class: "text-sm text-muted-foreground mt-1"
18
- }, de = { class: "form-group-body p-6" }, ce = {
18
+ }, ce = { class: "form-group-body p-6" }, me = {
19
19
  key: 3,
20
20
  class: "form-step"
21
- }, me = { class: "text-lg font-semibold text-foreground" }, ve = {
21
+ }, ve = { class: "text-lg font-semibold text-foreground" }, fe = {
22
22
  key: 0,
23
23
  class: "text-sm text-muted-foreground mt-1"
24
- }, xe = /* @__PURE__ */ Q({
24
+ }, ke = /* @__PURE__ */ W({
25
25
  __name: "Form",
26
26
  props: {
27
27
  schema: {},
@@ -47,62 +47,62 @@ const le = {
47
47
  footerClass: { default: "" },
48
48
  timelineTextPosition: { default: "bottom" }
49
49
  },
50
- emits: ["onSubmit", "onCancel", "onStepChange"],
51
- setup(e, { emit: A }) {
52
- const i = e, m = A, v = W("modal-context", null), G = u(() => i.showCancel || !!v), $ = u(() => !!v), b = u(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), r = u(() => i.tabs && i.tabs.length > 0 && b.value), a = X(0), P = u(() => i.tabs ? i.tabs.map((l, n) => ({
53
- id: l.id?.toString() || n.toString(),
54
- title: l.title,
55
- icon: l.icon,
56
- description: l.description,
57
- status: n < a.value ? "completed" : n === a.value ? "current" : "upcoming"
58
- })) : []), g = u(() => b.value ? i.schema : [i.schema]), R = u(() => r.value ? g.value[a.value] || [] : []), {
50
+ emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
51
+ setup(e, { emit: M }) {
52
+ const s = e, m = M, f = X("modal-context", null), G = d(() => s.showCancel || !!f), $ = d(() => !!f), b = d(() => !s.schema || s.schema.length === 0 ? !1 : Array.isArray(s.schema[0])), r = d(() => s.tabs && s.tabs.length > 0 && b.value), i = Y(0), w = d(() => s.tabs ? s.tabs.map((n, a) => ({
53
+ id: n.id?.toString() || a.toString(),
54
+ title: n.title,
55
+ icon: n.icon,
56
+ description: n.description,
57
+ status: a < i.value ? "completed" : a === i.value ? "current" : "upcoming"
58
+ })) : []), g = d(() => b.value ? s.schema : [s.schema]), P = d(() => r.value ? g.value[i.value] || [] : []), {
59
59
  formValues: y,
60
60
  errors: S,
61
- isSubmitting: V,
61
+ isSubmitting: N,
62
62
  handleFieldChange: j,
63
63
  validateField: E,
64
- validateAll: fe,
64
+ validateAll: he,
65
65
  isFieldVisible: C,
66
66
  isFieldDisabled: F,
67
- isFieldReadonly: z,
68
- getFieldValue: he,
67
+ isFieldReadonly: V,
68
+ getFieldValue: be,
69
69
  handleSubmit: L,
70
- flatSchema: be
71
- } = ie({
72
- schema: i.schema,
73
- values: i.values,
74
- isUpdate: i.isUpdate,
75
- folderId: i.folderId,
76
- onSubmit: (l) => {
77
- m("onSubmit", l, v?.close);
70
+ flatSchema: ge
71
+ } = se({
72
+ schema: s.schema,
73
+ values: s.values,
74
+ isUpdate: s.isUpdate,
75
+ folderId: s.folderId,
76
+ onSubmit: (n) => {
77
+ m("onSubmit", n, f?.close);
78
78
  }
79
79
  });
80
- Y(
81
- () => i.values,
82
- (l) => {
80
+ Z(
81
+ () => s.values,
82
+ (n) => {
83
83
  },
84
84
  { deep: !0 }
85
85
  );
86
- const U = (l, n) => {
87
- j(l, n.value, n.data);
86
+ const z = (n, a) => {
87
+ j(n, a.value, a.data);
88
88
  }, q = () => {
89
89
  if (!r.value) return !0;
90
- const l = R.value;
91
- let n = !0;
92
- for (const f of l) {
93
- if (!C(f) || F(f)) continue;
94
- E(f) && (n = !1);
90
+ const n = P.value;
91
+ let a = !0;
92
+ for (const u of n) {
93
+ if (!C(u) || F(u)) continue;
94
+ E(u) && (a = !1);
95
95
  }
96
- return n;
97
- }, I = u(() => r.value ? a.value < g.value.length - 1 : !1), B = u(() => r.value ? a.value > 0 : !1), T = u(() => r.value ? a.value === g.value.length - 1 : !0), H = () => {
98
- I.value && q() && (a.value++, m("onStepChange", a.value));
96
+ return a;
97
+ }, I = d(() => r.value ? i.value < g.value.length - 1 : !1), R = d(() => r.value ? i.value > 0 : !1), B = d(() => r.value ? i.value === g.value.length - 1 : !0), T = () => {
98
+ I.value && q() && (i.value++, m("onStepChange", i.value));
99
99
  }, J = () => {
100
- B.value && (a.value--, m("onStepChange", a.value));
101
- }, K = (l, n) => {
102
- n <= a.value && (a.value = n, m("onStepChange", a.value));
103
- }, M = async () => {
104
- if (r.value && !T.value) {
105
- H();
100
+ R.value && (i.value--, m("onStepChange", i.value));
101
+ }, K = (n, a) => {
102
+ a <= i.value && (i.value = a, m("onStepChange", i.value));
103
+ }, H = async () => {
104
+ if (r.value && !B.value) {
105
+ T();
106
106
  return;
107
107
  }
108
108
  try {
@@ -110,37 +110,37 @@ const le = {
110
110
  } catch {
111
111
  }
112
112
  }, O = () => {
113
- m("onCancel"), v && v?.close?.();
113
+ m("onCancel"), f && f?.close?.();
114
114
  };
115
- return (l, n) => (s(), o("form", {
116
- class: h(["form-container", i.class]),
117
- onSubmit: Z(M, ["prevent"])
115
+ return (n, a) => (l(), o("form", {
116
+ class: h(["form-container", s.class]),
117
+ onSubmit: _(H, ["prevent"])
118
118
  }, [
119
- r.value && P.value.length > 0 ? (s(), o("div", le, [
120
- x(se, {
121
- steps: P.value,
122
- activeStep: a.value,
119
+ r.value && w.value.length > 0 ? (l(), o("div", ne, [
120
+ x(le, {
121
+ steps: w.value,
122
+ activeStep: i.value,
123
123
  direction: "horizontal",
124
124
  textPosition: e.timelineTextPosition,
125
125
  clickable: !0,
126
126
  onStepClick: K
127
127
  }, null, 8, ["steps", "activeStep", "textPosition"])
128
- ])) : d("", !0),
129
- b.value ? b.value && !r.value ? (s(), o("div", oe, [
130
- (s(!0), o(_, null, ee(g.value, (f, c) => (s(), o("div", {
131
- key: c,
128
+ ])) : c("", !0),
129
+ b.value ? b.value && !r.value ? (l(), o("div", re, [
130
+ (l(!0), o(ee, null, te(g.value, (u, v) => (l(), o("div", {
131
+ key: v,
132
132
  class: h(["form-group border rounded-lg overflow-hidden", e.groupClass])
133
133
  }, [
134
- e.groupsHeadings?.[c] ? (s(), o("div", {
134
+ e.groupsHeadings?.[v] ? (l(), o("div", {
135
135
  key: 0,
136
136
  class: h(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
137
137
  }, [
138
- D("h3", re, k(e.groupsHeadings[c]), 1),
139
- e.groupHeadingsDescription?.[c] ? (s(), o("p", ue, k(e.groupHeadingsDescription[c]), 1)) : d("", !0)
140
- ], 2)) : d("", !0),
141
- D("div", de, [
142
- x(w, {
143
- schema: f,
138
+ U("h3", de, k(e.groupsHeadings[v]), 1),
139
+ e.groupHeadingsDescription?.[v] ? (l(), o("p", ue, k(e.groupHeadingsDescription[v]), 1)) : c("", !0)
140
+ ], 2)) : c("", !0),
141
+ U("div", ce, [
142
+ x(D, {
143
+ schema: u,
144
144
  values: t(y),
145
145
  errors: t(S),
146
146
  variant: e.variant,
@@ -150,21 +150,22 @@ const le = {
150
150
  isUpdate: e.isUpdate,
151
151
  isFieldVisible: t(C),
152
152
  isFieldDisabled: t(F),
153
- isFieldReadonly: t(z),
154
- onChange: U
153
+ isFieldReadonly: t(V),
154
+ onChange: z,
155
+ onAddonAction: a[1] || (a[1] = (Q) => m("onAddonAction", Q))
155
156
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
156
157
  ])
157
158
  ], 2))), 128))
158
- ])) : r.value ? (s(), o("div", ce, [
159
- e.tabs?.[a.value] ? (s(), o("div", {
159
+ ])) : r.value ? (l(), o("div", me, [
160
+ e.tabs?.[i.value] ? (l(), o("div", {
160
161
  key: 0,
161
162
  class: h(["form-step-header mb-6", e.headerClass])
162
163
  }, [
163
- D("h2", me, k(e.tabs[a.value].title), 1),
164
- e.tabs[a.value].description ? (s(), o("p", ve, k(e.tabs[a.value].description), 1)) : d("", !0)
165
- ], 2)) : d("", !0),
166
- x(w, {
167
- schema: R.value,
164
+ U("h2", ve, k(e.tabs[i.value].title), 1),
165
+ e.tabs[i.value].description ? (l(), o("p", fe, k(e.tabs[i.value].description), 1)) : c("", !0)
166
+ ], 2)) : c("", !0),
167
+ x(D, {
168
+ schema: P.value,
168
169
  values: t(y),
169
170
  errors: t(S),
170
171
  variant: e.variant,
@@ -174,11 +175,12 @@ const le = {
174
175
  isUpdate: e.isUpdate,
175
176
  isFieldVisible: t(C),
176
177
  isFieldDisabled: t(F),
177
- isFieldReadonly: t(z),
178
- onChange: U
178
+ isFieldReadonly: t(V),
179
+ onChange: z,
180
+ onAddonAction: a[2] || (a[2] = (u) => m("onAddonAction", u))
179
181
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
180
- ])) : d("", !0) : (s(), o("div", ne, [
181
- x(w, {
182
+ ])) : c("", !0) : (l(), o("div", oe, [
183
+ x(D, {
182
184
  schema: e.schema,
183
185
  values: t(y),
184
186
  errors: t(S),
@@ -189,17 +191,18 @@ const le = {
189
191
  isUpdate: e.isUpdate,
190
192
  isFieldVisible: t(C),
191
193
  isFieldDisabled: t(F),
192
- isFieldReadonly: t(z),
193
- onChange: U
194
+ isFieldReadonly: t(V),
195
+ onChange: z,
196
+ onAddonAction: a[0] || (a[0] = (u) => m("onAddonAction", u))
194
197
  }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
195
198
  ])),
196
- te(l.$slots, "default", {
199
+ ae(n.$slots, "default", {
197
200
  values: t(y),
198
201
  errors: t(S),
199
- isSubmitting: t(V),
200
- handleSubmit: M
202
+ isSubmitting: t(N),
203
+ handleSubmit: H
201
204
  }, void 0, !0),
202
- e.footer ? (s(), o("div", {
205
+ e.footer ? (l(), o("div", {
203
206
  key: 4,
204
207
  class: h([
205
208
  "form-footer flex items-center justify-end gap-3",
@@ -207,41 +210,41 @@ const le = {
207
210
  $.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/40 -mx-4 px-4 mt-4" : "mt-6"
208
211
  ])
209
212
  }, [
210
- G.value ? (s(), p(N, {
213
+ G.value ? (l(), p(A, {
211
214
  key: 0,
212
215
  type: "button",
213
216
  variant: "outline",
214
217
  text: e.cancelText,
215
- disabled: e.loading || t(V),
218
+ disabled: e.loading || t(N),
216
219
  onClick: O
217
- }, null, 8, ["text", "disabled"])) : d("", !0),
218
- r.value && B.value ? (s(), p(N, {
220
+ }, null, 8, ["text", "disabled"])) : c("", !0),
221
+ r.value && R.value ? (l(), p(A, {
219
222
  key: 1,
220
223
  type: "button",
221
224
  variant: "outline",
222
225
  icon: "lucide:arrow-left",
223
226
  text: "Previous",
224
227
  onClick: J
225
- })) : d("", !0),
226
- r.value && !T.value ? (s(), p(N, {
228
+ })) : c("", !0),
229
+ r.value && !B.value ? (l(), p(A, {
227
230
  key: 2,
228
231
  type: "button",
229
232
  variant: "primary",
230
233
  text: "Next",
231
234
  iconRight: "lucide:arrow-right",
232
- onClick: H
233
- })) : (s(), p(N, ae({
235
+ onClick: T
236
+ })) : (l(), p(A, ie({
234
237
  key: 3,
235
238
  type: "submit",
236
239
  variant: "primary",
237
240
  text: e.submitText
238
241
  }, e.submitProps, {
239
- loading: e.loading || t(V)
242
+ loading: e.loading || t(N)
240
243
  }), null, 16, ["text", "loading"]))
241
- ], 2)) : d("", !0)
244
+ ], 2)) : c("", !0)
242
245
  ], 34));
243
246
  }
244
247
  });
245
248
  export {
246
- xe as default
249
+ ke as default
247
250
  };
@@ -14,8 +14,12 @@ interface Props {
14
14
  }
15
15
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
16
  change: (payload: IFormFieldChangePayload) => any;
17
+ addonAction: (action: string) => any;
18
+ addonChange: (name: string, payload: IFormFieldChangePayload) => any;
17
19
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
18
20
  onChange?: (payload: IFormFieldChangePayload) => any;
21
+ onAddonAction?: (action: string) => any;
22
+ onAddonChange?: (name: string, payload: IFormFieldChangePayload) => any;
19
23
  }>, {
20
24
  disabled: boolean;
21
25
  size: InputSize;