vlite3 0.3.7 → 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,7 +1,7 @@
1
1
  import { defineComponent as B, useSlots as I, computed as r, inject as R, withDirectives as S, openBlock as s, createElementBlock as g, normalizeClass as o, createBlock as u, createCommentVNode as h, renderSlot as f, createTextVNode as m, toDisplayString as b, unref as G } from "vue";
2
2
  import d from "./Icon.vue.js";
3
3
  import { vRipple as j } from "../directives/vRipple.js";
4
- const V = ["type", "disabled"], N = /* @__PURE__ */ B({
4
+ const V = ["type", "disabled"], E = /* @__PURE__ */ B({
5
5
  __name: "Button",
6
6
  props: {
7
7
  variant: { default: "primary" },
@@ -15,7 +15,7 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
15
15
  text: {},
16
16
  rounded: { default: "md" },
17
17
  textClass: {},
18
- iconLeftClass: {},
18
+ iconClass: {},
19
19
  iconRightClass: {},
20
20
  asIcon: { type: Boolean }
21
21
  },
@@ -104,7 +104,7 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
104
104
  }, null, 8, ["class"])) : e.icon ? (s(), u(d, {
105
105
  key: 1,
106
106
  icon: e.icon,
107
- class: o(["pointer-events-none", [e.iconLeftClass, a.value, l.value ? "mx-auto" : ""]])
107
+ class: o(["pointer-events-none", [e.iconClass, a.value, l.value ? "mx-auto" : ""]])
108
108
  }, null, 8, ["icon", "class"])) : h("", !0),
109
109
  e.textClass ? (s(), g("span", {
110
110
  key: 2,
@@ -127,5 +127,5 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
127
127
  }
128
128
  });
129
129
  export {
130
- N as default
130
+ E as default
131
131
  };
@@ -1,16 +1,13 @@
1
- import { defineComponent as B, ref as D, watch as u, computed as f, openBlock as a, createElementBlock as n, normalizeClass as y, Fragment as P, renderList as h, renderSlot as i, createBlock as k, resolveDynamicComponent as v, createElementVNode as c, createVNode as I, toDisplayString as p, mergeProps as x, createCommentVNode as b, unref as L } from "vue";
2
- import j from "../Pagination/Pagination.vue.js";
3
- import E from "../Icon.vue.js";
4
- const S = { class: "flex flex-col w-full" }, z = {
1
+ import { defineComponent as b, ref as D, watch as r, computed as u, openBlock as a, createElementBlock as o, normalizeClass as f, Fragment as P, renderList as y, renderSlot as s, createBlock as k, resolveDynamicComponent as h, createVNode as I, unref as v, mergeProps as p, createCommentVNode as C } from "vue";
2
+ import L from "../Pagination/Pagination.vue.js";
3
+ import x from "../Empty/Empty.vue.js";
4
+ const z = { class: "flex flex-col w-full" }, E = {
5
5
  key: 1,
6
6
  class: "h-48 rounded-lg bg-gray-200 animate-pulse w-full"
7
7
  }, F = {
8
- key: 1,
9
- class: "flex flex-col items-center justify-center p-12 text-center bg-gray-50 border border-gray-200 rounded-lg"
10
- }, O = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-gray-100 mb-4" }, U = { class: "text-lg font-semibold text-gray-900" }, V = { class: "mt-2 text-sm text-gray-500" }, W = {
11
8
  key: 3,
12
9
  class: "mt-8 w-full"
13
- }, H = /* @__PURE__ */ B({
10
+ }, W = /* @__PURE__ */ b({
14
11
  __name: "DataList",
15
12
  props: {
16
13
  data: { default: () => [] },
@@ -35,87 +32,82 @@ const S = { class: "flex flex-col w-full" }, z = {
35
32
  delete: {}
36
33
  },
37
34
  emits: ["change"],
38
- setup(e, { emit: w }) {
39
- const o = e, C = w, s = D(o.pageInfo?.itemsPerPage || o.paginationProps?.itemsPerPage || 10);
40
- u(
41
- () => o.pageInfo?.itemsPerPage,
35
+ setup(e, { emit: T }) {
36
+ const n = e, w = T, i = D(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10);
37
+ r(
38
+ () => n.pageInfo?.itemsPerPage,
42
39
  (t) => {
43
- t !== void 0 && (s.value = t);
40
+ t !== void 0 && (i.value = t);
44
41
  }
45
- ), u(
46
- () => o.paginationProps?.itemsPerPage,
42
+ ), r(
43
+ () => n.paginationProps?.itemsPerPage,
47
44
  (t) => {
48
- t !== void 0 && (s.value = t);
45
+ t !== void 0 && (i.value = t);
49
46
  }
50
47
  );
51
- let r = null;
52
- const g = (t, m) => {
53
- r && clearTimeout(r), r = setTimeout(() => {
54
- C("change", { page: t, limit: m });
48
+ let m = null;
49
+ const g = (t, c) => {
50
+ m && clearTimeout(m), m = setTimeout(() => {
51
+ w("change", { page: t, limit: c });
55
52
  }, 10);
56
53
  }, N = (t) => {
57
- g(t, s.value);
58
- }, T = (t) => {
59
- s.value = t, g(o.pageInfo?.currentPage || 1, t);
54
+ g(t, i.value);
55
+ }, $ = (t) => {
56
+ i.value = t, g(n.pageInfo?.currentPage || 1, t);
60
57
  };
61
- f(() => o.pageInfo?.currentPage || 1);
62
- const $ = f(() => o.pageInfo?.totalPages || 1);
63
- return (t, m) => (a(), n("div", S, [
64
- e.loading ? (a(), n("div", {
58
+ u(() => n.pageInfo?.currentPage || 1);
59
+ const B = u(() => n.pageInfo?.totalPages || 1);
60
+ return (t, c) => (a(), o("div", z, [
61
+ e.loading ? (a(), o("div", {
65
62
  key: 0,
66
- class: y(e.className)
63
+ class: f(e.className)
67
64
  }, [
68
- (a(), n(P, null, h(8, (l) => i(t.$slots, "skeleton", {
65
+ (a(), o(P, null, y(8, (l) => s(t.$slots, "skeleton", {
69
66
  key: "skeleton-" + l,
70
67
  index: l
71
68
  }, () => [
72
- i(t.$slots, "skelton", { index: l }, () => [
73
- e.skeleton || e.skelton ? (a(), k(v(e.skeleton || e.skelton), { key: 0 })) : (a(), n("div", z))
69
+ s(t.$slots, "skelton", { index: l }, () => [
70
+ e.skeleton || e.skelton ? (a(), k(h(e.skeleton || e.skelton), { key: 0 })) : (a(), o("div", E))
74
71
  ])
75
72
  ])), 64))
76
- ], 2)) : !e.data || e.data.length === 0 ? (a(), n("div", F, [
77
- i(t.$slots, "empty", {}, () => [
78
- c("div", O, [
79
- I(E, {
80
- icon: e.emptyIcon,
81
- class: "h-6 w-6 text-gray-500"
82
- }, null, 8, ["icon"])
83
- ]),
84
- c("h3", U, p(e.emptyTitle), 1),
85
- c("p", V, p(e.emptyDescription), 1)
86
- ])
87
- ])) : (a(), n("div", {
73
+ ], 2)) : !e.data || e.data.length === 0 ? s(t.$slots, "empty", { key: 1 }, () => [
74
+ I(v(x), {
75
+ title: e.emptyTitle,
76
+ description: e.emptyDescription,
77
+ icon: e.emptyIcon
78
+ }, null, 8, ["title", "description", "icon"])
79
+ ]) : (a(), o("div", {
88
80
  key: 2,
89
- class: y(e.className)
81
+ class: f(e.className)
90
82
  }, [
91
- (a(!0), n(P, null, h(e.data, (l, d) => i(t.$slots, "item", {
83
+ (a(!0), o(P, null, y(e.data, (l, d) => s(t.$slots, "item", {
92
84
  key: d,
93
85
  item: l,
94
86
  data: e.data,
95
87
  index: d
96
88
  }, () => [
97
- e.item ? (a(), k(v(e.item), x({
89
+ e.item ? (a(), k(h(e.item), p({
98
90
  key: 0,
99
91
  item: l,
100
92
  data: e.data,
101
93
  index: d
102
- }, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : b("", !0)
94
+ }, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : C("", !0)
103
95
  ])), 128))
104
96
  ], 2)),
105
- e.showPagination && e.pageInfo && $.value > 1 ? (a(), n("div", W, [
106
- I(L(j), x({
97
+ e.showPagination && e.pageInfo && B.value > 1 ? (a(), o("div", F, [
98
+ I(v(L), p({
107
99
  "current-page": e.pageInfo?.currentPage,
108
100
  "total-pages": e.pageInfo?.totalPages,
109
101
  "total-items": e.pageInfo?.totalItems,
110
102
  navType: "icon"
111
103
  }, e.paginationProps, {
112
104
  onChange: N,
113
- "onUpdate:itemsPerPage": T
105
+ "onUpdate:itemsPerPage": $
114
106
  }), null, 16, ["current-page", "total-pages", "total-items"])
115
- ])) : b("", !0)
107
+ ])) : C("", !0)
116
108
  ]));
117
109
  }
118
110
  });
119
111
  export {
120
- H as default
112
+ W as default
121
113
  };
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  }) => any>> & {
10
10
  'toolbar-left'?(_: {}): any;
11
11
  'toolbar-right'?(_: {}): any;
12
- 'empty-description'?(_: {}): any;
12
+ empty?(_: {}): any;
13
13
  'empty-action'?(_: {}): any;
14
14
  };
15
15
  refs: {};