vlite3 0.3.6 → 0.3.8

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 G, useSlots as J, ref as v, computed as r, onMounted as K, nextTick as A, openBlock as d, createElementBlock as s, normalizeClass as a, createBlock as C, withCtx as O, createTextVNode as k, toDisplayString as V, createCommentVNode as c, createElementVNode as z, renderSlot as F, createVNode as x } from "vue";
1
+ import { defineComponent as G, useSlots as J, ref as v, computed as r, onMounted as K, nextTick as A, openBlock as d, createElementBlock as u, normalizeClass as a, createBlock as C, withCtx as O, createTextVNode as k, toDisplayString as V, createCommentVNode as c, createElementVNode as B, renderSlot as F, createVNode as x } from "vue";
2
2
  import f from "./Icon.vue.js";
3
3
  import Q from "./Label.vue.js";
4
4
  import X from "./Textarea.vue.js";
@@ -33,14 +33,14 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
33
33
  },
34
34
  emits: ["update:modelValue", "focus", "blur", "change", "click:icon", "click:icon-right"],
35
35
  setup(n, { emit: I }) {
36
- const e = n, u = I, m = J(), y = v(null), b = v(!1), M = r(() => e.type === "password" && b.value ? "text" : e.type), B = r(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), g = r(() => !!e.addonLeft || !!m["addon-left"]), p = r(() => !!e.addonRight || !!m["addon-right"]), N = r(() => [
36
+ const e = n, s = I, m = J(), y = v(null), b = v(!1), M = r(() => e.type === "password" && b.value ? "text" : e.type), j = r(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), g = r(() => !!e.addonLeft || !!m["addon-left"]), p = r(() => !!e.addonRight || !!m["addon-right"]), N = r(() => [
37
37
  "relative w-full",
38
38
  e.class,
39
39
  e.labelPosition === "left" ? "flex items-center gap-4" : "",
40
40
  e.labelPosition === "right" ? "flex flex-row-reverse items-center gap-4" : "space-y-2"
41
41
  ].join(" ")), T = r(() => ["relative flex w-full items-stretch", e.labelPosition !== "top" ? "flex-1" : ""].join(
42
42
  " "
43
- )), j = r(() => {
43
+ )), z = r(() => {
44
44
  const t = "block w-full bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/50 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none relative focus:z-10", o = {
45
45
  solid: "bg-muted border-transparent focus-visible:border-primary",
46
46
  outline: "border border-input focus-visible:border-primary",
@@ -69,7 +69,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
69
69
  l,
70
70
  e.error ? "border-destructive focus-visible:ring-destructive" : "",
71
71
  e.icon ? "pl-9" : P && !g.value ? "pl-0" : "",
72
- e.showClearButton && B.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : P && !p.value ? "pr-0" : "",
72
+ e.showClearButton && j.value || e.type === "password" || e.loading || e.iconRight ? "pr-9" : P && !p.value ? "pr-0" : "",
73
73
  e.inputClass
74
74
  ].join(" ");
75
75
  }), R = {
@@ -125,28 +125,27 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
125
125
  e.disabled ? "opacity-50 cursor-not-allowed" : ""
126
126
  ].join(" ");
127
127
  }), H = (t) => {
128
- if (e.lazy) return;
129
128
  const o = t.target;
130
- u("update:modelValue", o.value);
129
+ s("update:modelValue", o.value);
131
130
  }, U = (t) => {
132
131
  const o = t.target;
133
- e.lazy && u("update:modelValue", o.value), u("change", o.value);
132
+ s("change", o.value);
134
133
  }, W = () => {
135
134
  b.value = !b.value;
136
135
  }, q = () => {
137
- u("update:modelValue", ""), A(() => {
136
+ s("update:modelValue", ""), A(() => {
138
137
  y.value?.focus();
139
138
  });
140
139
  }, h = v(!1), w = v(!1), S = (t) => {
141
- h.value = !0, u("focus", t);
140
+ h.value = !0, s("focus", t);
142
141
  }, L = (t) => {
143
- h.value = !1, u("blur", t);
142
+ h.value = !1, s("blur", t);
144
143
  };
145
144
  return K(() => {
146
145
  e.autofocus && A(() => {
147
146
  y.value?.focus();
148
147
  });
149
- }), (t, o) => (d(), s("div", {
148
+ }), (t, o) => (d(), u("div", {
150
149
  class: a(N.value)
151
150
  }, [
152
151
  n.label ? (d(), C(Q, {
@@ -159,10 +158,10 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
159
158
  ]),
160
159
  _: 1
161
160
  }, 8, ["for", "class"])) : c("", !0),
162
- z("div", {
161
+ B("div", {
163
162
  class: a(T.value)
164
163
  }, [
165
- g.value ? (d(), s("div", {
164
+ g.value ? (d(), u("div", {
166
165
  key: 0,
167
166
  class: a(E.value)
168
167
  }, [
@@ -170,7 +169,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
170
169
  k(V(n.addonLeft), 1)
171
170
  ])
172
171
  ], 2)) : c("", !0),
173
- z("div", {
172
+ B("div", {
174
173
  class: "relative w-full",
175
174
  onMouseenter: o[2] || (o[2] = (i) => w.value = !0),
176
175
  onMouseleave: o[3] || (o[3] = (i) => w.value = !1)
@@ -181,11 +180,11 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
181
180
  placeholder: n.placeholder,
182
181
  disabled: n.disabled,
183
182
  rows: n.rows,
184
- class: a(j.value),
185
- "onUpdate:modelValue": o[0] || (o[0] = (i) => u("update:modelValue", i)),
183
+ class: a(z.value),
184
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => s("update:modelValue", i)),
186
185
  onBlur: L,
187
186
  onFocus: S
188
- }, null, 8, ["model-value", "placeholder", "disabled", "rows", "class"])) : (d(), s("input", {
187
+ }, null, 8, ["model-value", "placeholder", "disabled", "rows", "class"])) : (d(), u("input", {
189
188
  key: 1,
190
189
  ref_key: "inputRef",
191
190
  ref: y,
@@ -195,13 +194,13 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
195
194
  disabled: n.disabled,
196
195
  min: n.min,
197
196
  max: n.max,
198
- class: a(j.value),
197
+ class: a(z.value),
199
198
  onInput: H,
200
199
  onChange: U,
201
200
  onBlur: L,
202
201
  onFocus: S
203
202
  }, null, 42, Y)),
204
- n.icon ? (d(), s("div", {
203
+ n.icon ? (d(), u("div", {
205
204
  key: 2,
206
205
  tabindex: "-1",
207
206
  class: a([
@@ -214,26 +213,26 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
214
213
  class: "h-4 w-4"
215
214
  }, null, 8, ["icon"])
216
215
  ], 2)) : c("", !0),
217
- z("div", Z, [
216
+ B("div", Z, [
218
217
  n.loading ? (d(), C(f, {
219
218
  key: 0,
220
219
  icon: "lucide:loader-2",
221
220
  class: "h-4 w-4 animate-spin text-muted-foreground"
222
- })) : n.iconRight ? (d(), s("div", {
221
+ })) : n.iconRight ? (d(), u("div", {
223
222
  key: 1,
224
223
  tabindex: "-1",
225
224
  class: a([
226
225
  "flex items-center justify-center text-muted-foreground",
227
226
  n.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-foreground"
228
227
  ]),
229
- onClick: o[1] || (o[1] = (i) => !n.disabled && u("click:icon-right", i))
228
+ onClick: o[1] || (o[1] = (i) => !n.disabled && s("click:icon-right", i))
230
229
  }, [
231
230
  x(f, {
232
231
  icon: n.iconRight,
233
232
  class: "h-4 w-4"
234
233
  }, null, 8, ["icon"])
235
234
  ], 2)) : c("", !0),
236
- n.type === "password" && !n.disabled ? (d(), s("button", {
235
+ n.type === "password" && !n.disabled ? (d(), u("button", {
237
236
  key: 2,
238
237
  type: "button",
239
238
  tabindex: "-1",
@@ -245,7 +244,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
245
244
  class: "h-4 w-4"
246
245
  }, null, 8, ["icon"])
247
246
  ])) : c("", !0),
248
- n.showClearButton && B.value && !n.disabled && !n.loading && n.type !== "textarea" && n.type !== "password" && (h.value || w.value) ? (d(), s("button", {
247
+ n.showClearButton && j.value && !n.disabled && !n.loading && n.type !== "textarea" && n.type !== "password" && (h.value || w.value) ? (d(), u("button", {
249
248
  key: 3,
250
249
  type: "button",
251
250
  tabindex: "-1",
@@ -259,7 +258,7 @@ const Y = ["type", "value", "placeholder", "disabled", "min", "max"], Z = { clas
259
258
  ])) : c("", !0)
260
259
  ])
261
260
  ], 32),
262
- p.value ? (d(), s("div", {
261
+ p.value ? (d(), u("div", {
263
262
  key: 1,
264
263
  class: a(D.value)
265
264
  }, [
@@ -15,36 +15,15 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
- change: (payload: {
19
- pageinfo: {
20
- page: number;
21
- limit: number;
22
- };
23
- pagination: {
24
- page: number;
25
- limit: number;
26
- };
27
- search: string;
28
- filter: Record<string, any>;
29
- }) => any;
18
+ delete: (items: any[]) => any;
30
19
  add: () => any;
31
20
  }, string, import('vue').PublicProps, Readonly<ScreenProps> & Readonly<{
32
- onChange?: (payload: {
33
- pageinfo: {
34
- page: number;
35
- limit: number;
36
- };
37
- pagination: {
38
- page: number;
39
- limit: number;
40
- };
41
- search: string;
42
- filter: Record<string, any>;
43
- }) => any;
21
+ onDelete?: (items: any[]) => any;
44
22
  onAdd?: () => any;
45
23
  }>, {
46
24
  title: string;
47
25
  description: string;
26
+ name: string;
48
27
  data: any[];
49
28
  loading: boolean;
50
29
  pagination: boolean;