vlite3 0.3.6 → 0.3.7

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 o, computed as a, openBlock as c, createElementBlock as i, normalizeClass as d, renderSlot as u } from "vue";
1
+ import { defineComponent as o, computed as a, openBlock as c, createElementBlock as d, normalizeClass as i, renderSlot as u } from "vue";
2
2
  const g = /* @__PURE__ */ o({
3
3
  __name: "Badge",
4
4
  props: {
@@ -6,7 +6,7 @@ const g = /* @__PURE__ */ o({
6
6
  class: { default: "" }
7
7
  },
8
8
  setup(n) {
9
- const e = n, t = a(() => ["inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
9
+ const e = n, t = a(() => ["inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
10
10
  default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
11
11
  secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
12
  danger: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
@@ -15,8 +15,8 @@ const g = /* @__PURE__ */ o({
15
15
  success: "border-transparent bg-success text-success-fg hover:bg-success/80",
16
16
  outline: "text-foreground border-border"
17
17
  }[e.variant], e.class].join(" "));
18
- return (r, s) => (c(), i("div", {
19
- class: d(t.value)
18
+ return (r, s) => (c(), d("div", {
19
+ class: i(t.value)
20
20
  }, [
21
21
  u(r.$slots, "default")
22
22
  ], 2));
@@ -3,6 +3,7 @@ declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
5
5
  default?(_: {}): any;
6
+ default?(_: {}): any;
6
7
  };
7
8
  refs: {};
8
9
  rootEl: HTMLButtonElement;
@@ -1,7 +1,7 @@
1
- import { defineComponent as y, useSlots as z, computed as i, inject as k, withDirectives as B, openBlock as r, createElementBlock as C, normalizeClass as s, createBlock as u, createCommentVNode as g, renderSlot as S, createTextVNode as G, toDisplayString as I, unref as R } from "vue";
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"], E = /* @__PURE__ */ y({
4
+ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
5
5
  __name: "Button",
6
6
  props: {
7
7
  variant: { default: "primary" },
@@ -13,11 +13,15 @@ const V = ["type", "disabled"], E = /* @__PURE__ */ y({
13
13
  iconRight: {},
14
14
  type: { default: "button" },
15
15
  text: {},
16
- rounded: { default: "md" }
16
+ rounded: { default: "md" },
17
+ textClass: {},
18
+ iconLeftClass: {},
19
+ iconRightClass: {},
20
+ asIcon: { type: Boolean }
17
21
  },
18
22
  setup(e) {
19
- const n = e, h = z(), l = i(() => n.icon && !n.text && !h.default), f = k("buttonGroup", null), m = i(() => !!f?.isInGroup), b = i(() => {
20
- const t = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer gap-2", o = {
23
+ const t = e, x = I(), l = r(() => t?.asIcon || t.icon && !t.text && !x.default), v = R("buttonGroup", null), w = r(() => !!v?.isInGroup), y = r(() => {
24
+ const n = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer gap-2", i = {
21
25
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
22
26
  "primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/20",
23
27
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
@@ -37,25 +41,25 @@ const V = ["type", "disabled"], E = /* @__PURE__ */ y({
37
41
  "outline-success": "border border-success text-success hover:bg-success/10",
38
42
  ghost: "hover:bg-accent hover:text-accent-foreground text-foreground",
39
43
  link: "text-primary underline-offset-4 hover:underline"
40
- }, x = {
44
+ }, p = {
41
45
  xs: "h-6.5 px-2",
42
46
  sm: "h-7.5 px-3",
43
47
  md: "h-9 px-4 py-2",
44
48
  lg: "h-10 px-6",
45
49
  xl: "h-12 px-10"
46
- }, v = {
50
+ }, z = {
47
51
  xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
48
52
  sm: "h-7 w-7 min-h-7 min-w-7",
49
53
  md: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
50
54
  lg: "h-8 w-8 min-h-8 min-w-8",
51
55
  xl: "h-8.5 w-8.5 min-h-8.5 min-w-8.5"
52
- }, p = {
56
+ }, C = {
53
57
  xs: "px-2",
54
58
  sm: "px-3",
55
59
  md: "px-4",
56
60
  lg: "px-6",
57
61
  xl: "px-10"
58
- }, w = {
62
+ }, k = {
59
63
  none: "rounded-none",
60
64
  sm: "rounded-sm",
61
65
  md: "rounded",
@@ -64,57 +68,64 @@ const V = ["type", "disabled"], E = /* @__PURE__ */ y({
64
68
  "2xl": "rounded-2xl",
65
69
  full: "rounded-full"
66
70
  };
67
- let a;
68
- return l.value ? a = m.value ? p[n.size] : v[n.size] : a = x[n.size], [
69
- t,
70
- o[n.variant],
71
- w[n.rounded],
72
- a,
73
- n.class
71
+ let c;
72
+ return l.value ? c = w.value ? C[t.size] : z[t.size] : c = p[t.size], [
73
+ n,
74
+ i[t.variant],
75
+ k[t.rounded],
76
+ c,
77
+ t.class
74
78
  ].join(" ");
75
- }), c = i(() => {
76
- const t = {
79
+ }), a = r(() => {
80
+ const n = {
77
81
  xs: "w-3 h-3",
78
82
  sm: "w-4 h-4",
79
83
  md: "w-4 h-4",
80
84
  lg: "w-4 h-4",
81
85
  xl: "w-4 h-4"
82
- }, o = {
86
+ }, i = {
83
87
  xs: "w-3 h-3",
84
88
  sm: "w-3.5 h-3.5",
85
89
  md: "w-3.5 h-3.5",
86
90
  lg: "w-4 h-4",
87
91
  xl: "w-4 h-4"
88
92
  };
89
- return l.value ? o[n.size] : t[n.size];
93
+ return l.value ? i[t.size] : n[t.size];
90
94
  });
91
- return (t, o) => B((r(), C("button", {
95
+ return (n, i) => S((s(), g("button", {
92
96
  type: e.type,
93
- class: s(b.value),
97
+ class: o(y.value),
94
98
  disabled: e.disabled || e.loading
95
99
  }, [
96
- e.loading ? (r(), u(d, {
100
+ e.loading ? (s(), u(d, {
97
101
  key: 0,
98
102
  icon: "lucide:loader-2",
99
- class: s(["animate-spin pointer-events-none", c.value])
100
- }, null, 8, ["class"])) : e.icon ? (r(), u(d, {
103
+ class: o(["animate-spin pointer-events-none", a.value])
104
+ }, null, 8, ["class"])) : e.icon ? (s(), u(d, {
101
105
  key: 1,
102
106
  icon: e.icon,
103
- class: s(["pointer-events-none", [c.value, l.value ? "mx-auto" : ""]])
104
- }, null, 8, ["icon", "class"])) : g("", !0),
105
- S(t.$slots, "default", {}, () => [
106
- G(I(e.text), 1)
107
- ]),
108
- e.iconRight && !e.loading ? (r(), u(d, {
107
+ class: o(["pointer-events-none", [e.iconLeftClass, a.value, l.value ? "mx-auto" : ""]])
108
+ }, null, 8, ["icon", "class"])) : h("", !0),
109
+ e.textClass ? (s(), g("span", {
109
110
  key: 2,
111
+ class: o(e.textClass)
112
+ }, [
113
+ f(n.$slots, "default", {}, () => [
114
+ m(b(e.text), 1)
115
+ ])
116
+ ], 2)) : f(n.$slots, "default", { key: 3 }, () => [
117
+ m(b(e.text), 1)
118
+ ]),
119
+ e.iconRight && !e.loading ? (s(), u(d, {
120
+ key: 4,
110
121
  icon: e.iconRight,
111
- class: s([c.value, "h-4 w-4 pointer-events-none"])
112
- }, null, 8, ["icon", "class"])) : g("", !0)
122
+ class: o([[e.iconRightClass, a.value], "h-4 w-4 pointer-events-none"])
123
+ }, null, 8, ["icon", "class"])) : h("", !0)
113
124
  ], 10, V)), [
114
- [R(j)]
125
+ [G(j)]
115
126
  ]);
116
127
  }
117
128
  });
118
129
  export {
119
- E as default
130
+ N as default
120
131
  };
@@ -1,4 +1,4 @@
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 d, createVNode as I, toDisplayString as p, mergeProps as x, createCommentVNode as b, unref as L } from "vue";
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
2
  import j from "../Pagination/Pagination.vue.js";
3
3
  import E from "../Icon.vue.js";
4
4
  const S = { class: "flex flex-col w-full" }, z = {
@@ -31,7 +31,8 @@ const S = { class: "flex flex-col w-full" }, z = {
31
31
  showItemsPerPage: !1,
32
32
  itemsPerPageOptions: [10, 25, 50, 100],
33
33
  showPageInfo: !1
34
- }) }
34
+ }) },
35
+ delete: {}
35
36
  },
36
37
  emits: ["change"],
37
38
  setup(e, { emit: w }) {
@@ -74,30 +75,30 @@ const S = { class: "flex flex-col w-full" }, z = {
74
75
  ])), 64))
75
76
  ], 2)) : !e.data || e.data.length === 0 ? (a(), n("div", F, [
76
77
  i(t.$slots, "empty", {}, () => [
77
- d("div", O, [
78
+ c("div", O, [
78
79
  I(E, {
79
80
  icon: e.emptyIcon,
80
81
  class: "h-6 w-6 text-gray-500"
81
82
  }, null, 8, ["icon"])
82
83
  ]),
83
- d("h3", U, p(e.emptyTitle), 1),
84
- d("p", V, p(e.emptyDescription), 1)
84
+ c("h3", U, p(e.emptyTitle), 1),
85
+ c("p", V, p(e.emptyDescription), 1)
85
86
  ])
86
87
  ])) : (a(), n("div", {
87
88
  key: 2,
88
89
  class: y(e.className)
89
90
  }, [
90
- (a(!0), n(P, null, h(e.data, (l, c) => i(t.$slots, "item", {
91
- key: c,
91
+ (a(!0), n(P, null, h(e.data, (l, d) => i(t.$slots, "item", {
92
+ key: d,
92
93
  item: l,
93
94
  data: e.data,
94
- index: c
95
+ index: d
95
96
  }, () => [
96
97
  e.item ? (a(), k(v(e.item), x({
97
98
  key: 0,
98
99
  item: l,
99
100
  data: e.data,
100
- index: c
101
+ index: d
101
102
  }, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : b("", !0)
102
103
  ])), 128))
103
104
  ], 2)),
@@ -14,4 +14,5 @@ export interface DataListProps {
14
14
  emptyIcon?: string;
15
15
  showPagination?: boolean;
16
16
  paginationProps?: DataListMetaInfo;
17
+ delete?: (items: any[]) => void;
17
18
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as le, ref as b, computed as p, watch as h, openBlock as n, createElementBlock as i, createBlock as R, normalizeClass as S, createSlots as V, withCtx as B, renderSlot as x, createCommentVNode as k, createElementVNode as r, createVNode as F, Fragment as T, renderList as I, normalizeStyle as M, mergeProps as U, toDisplayString as O, createTextVNode as ae, unref as se } from "vue";
1
+ import { defineComponent as le, ref as g, computed as w, watch as h, openBlock as n, createElementBlock as i, createBlock as R, normalizeClass as S, createSlots as V, withCtx as B, renderSlot as x, createCommentVNode as p, createElementVNode as r, createVNode as F, Fragment as T, renderList as I, normalizeStyle as M, mergeProps as U, toDisplayString as O, createTextVNode as ae, unref as se } from "vue";
2
2
  import oe from "../Icon.vue.js";
3
3
  import ne from "../CheckBox.vue.js";
4
4
  import re from "../Button.vue.js";
@@ -59,34 +59,34 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
59
59
  const W = (e, t) => {
60
60
  if (!(!e || !t))
61
61
  return t.includes(".") ? t.split(".").reduce((s, u) => s?.[u], e) : e[t];
62
- }, c = (e, t) => W(e, t), a = l, y = L, d = b({ field: "", order: "" }), P = b(
62
+ }, c = (e, t) => W(e, t), a = l, b = L, d = g({ field: "", order: "" }), k = g(
63
63
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
64
- ), v = b(a.pageInfo?.currentPage || 1), w = b(a.search || ""), C = b(!1), g = b("initial"), q = p(() => a.loading && (g.value === "initial" || g.value === "page"));
64
+ ), v = g(a.pageInfo?.currentPage || 1), y = g(a.search || ""), P = g(!1), C = g("initial"), q = w(() => a.loading);
65
65
  h(
66
66
  () => a.loading,
67
67
  (e, t) => {
68
- !e && t && (g.value = "idle");
68
+ !e && t && (C.value = "idle");
69
69
  }
70
70
  ), h(
71
71
  () => a.search,
72
72
  (e) => {
73
- e !== void 0 && e !== w.value && (w.value = e);
73
+ e !== void 0 && e !== y.value && (y.value = e);
74
74
  }
75
75
  );
76
76
  let z = null;
77
- h(w, (e) => {
77
+ h(y, (e) => {
78
78
  z && clearTimeout(z), z = setTimeout(() => {
79
- v.value = 1, g.value = "search", $();
79
+ v.value = 1, C.value = "search", $();
80
80
  }, 300);
81
81
  }), h(
82
82
  () => a.pageInfo?.itemsPerPage,
83
83
  (e) => {
84
- e !== void 0 && (P.value = e);
84
+ e !== void 0 && (k.value = e);
85
85
  }
86
86
  ), h(
87
87
  () => a.paginationProps?.itemsPerPage,
88
88
  (e) => {
89
- e !== void 0 && (P.value = e);
89
+ e !== void 0 && (k.value = e);
90
90
  }
91
91
  ), h(
92
92
  () => a.pageInfo?.currentPage,
@@ -94,7 +94,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
94
94
  e && (v.value = e);
95
95
  }
96
96
  );
97
- const N = (e) => c(e, a.keyField), o = b(/* @__PURE__ */ new Set());
97
+ const N = (e) => c(e, a.keyField), o = g(/* @__PURE__ */ new Set());
98
98
  h(
99
99
  () => a.selectedRows,
100
100
  (e) => {
@@ -103,7 +103,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
103
103
  },
104
104
  { immediate: !0, deep: !0 }
105
105
  );
106
- const D = p(() => a.rows.length === 0 ? !1 : a.rows.every((e) => o.value.has(c(e, a.keyField)))), j = p(() => o.value.size > 0 && !D.value), G = p(() => {
106
+ const D = w(() => a.rows.length === 0 ? !1 : a.rows.every((e) => o.value.has(c(e, a.keyField)))), j = w(() => o.value.size > 0 && !D.value), G = w(() => {
107
107
  const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
108
108
  return e.forEach((s) => t.set(c(s, a.keyField), s)), Array.from(o.value).map((s) => t.get(s)).filter(Boolean);
109
109
  }), H = (e) => {
@@ -124,38 +124,38 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
124
124
  all: D.value,
125
125
  indeterminate: j.value
126
126
  };
127
- y("select", u), y("update:selectedRows", s);
127
+ b("select", u), b("update:selectedRows", s);
128
128
  }, K = (e) => {
129
- d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), v.value = 1, g.value = "sort", $();
129
+ d.value.field === e ? d.value.order === "asc" ? d.value.order = "desc" : d.value.order === "desc" ? (d.value.order = "", d.value.field = "") : d.value.order = "asc" : (d.value.field = e, d.value.order = "asc"), v.value = 1, C.value = "sort", $();
130
130
  }, Q = (e) => {
131
- v.value = e, g.value = "page", $();
131
+ v.value = e, C.value = "page", $();
132
132
  }, X = (e) => {
133
- P.value = e, v.value = 1, g.value = "limit", y("update:itemsPerPage", e), $();
133
+ k.value = e, v.value = 1, C.value = "limit", b("update:itemsPerPage", e), $();
134
134
  }, Y = (e) => {
135
- y("rowClick", e);
135
+ b("rowClick", e);
136
136
  }, Z = () => {
137
137
  const e = G.value;
138
- y("delete", e), C.value = !1;
138
+ b("delete", e), P.value = !1;
139
139
  };
140
140
  let E = null;
141
141
  const $ = () => {
142
142
  E && clearTimeout(E), E = setTimeout(() => {
143
- y("change", {
143
+ b("change", {
144
144
  pagination: {
145
145
  page: v.value,
146
- limit: P.value
146
+ limit: k.value
147
147
  },
148
148
  sorting: { ...d.value },
149
- search: w.value
149
+ search: y.value
150
150
  });
151
151
  }, 10);
152
- }, _ = p(() => [
152
+ }, _ = w(() => [
153
153
  "w-full flex flex-col",
154
154
  a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
155
155
  "overflow-hidden",
156
156
  a.bordered ? "border border-border" : "",
157
157
  a.class
158
- ].join(" ")), ee = p(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), te = (e) => e.width ? e.width : "auto";
158
+ ].join(" ")), ee = w(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), te = (e) => e.width ? e.width : "auto";
159
159
  return h(
160
160
  () => a.rows,
161
161
  () => {
@@ -165,8 +165,8 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
165
165
  ), (e, t) => (n(), i("div", me, [
166
166
  l.showSearch || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (n(), R(fe, {
167
167
  key: 0,
168
- modelValue: w.value,
169
- "onUpdate:modelValue": t[1] || (t[1] = (s) => w.value = s),
168
+ modelValue: y.value,
169
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => y.value = s),
170
170
  "show-search": l.showSearch,
171
171
  placeholder: l.searchPlaceholder,
172
172
  class: S(l.toolbarClass),
@@ -188,8 +188,8 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
188
188
  variant: "outline",
189
189
  size: "lg",
190
190
  icon: "lucide:trash-2",
191
- onClick: t[0] || (t[0] = (s) => C.value = !0)
192
- })) : k("", !0)
191
+ onClick: t[0] || (t[0] = (s) => P.value = !0)
192
+ })) : p("", !0)
193
193
  ]),
194
194
  key: "1"
195
195
  } : void 0,
@@ -200,7 +200,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
200
200
  ]),
201
201
  key: "2"
202
202
  } : void 0
203
- ]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"])) : k("", !0),
203
+ ]), 1032, ["modelValue", "show-search", "placeholder", "class", "search-class"])) : p("", !0),
204
204
  r("div", {
205
205
  class: S(_.value)
206
206
  }, [
@@ -224,7 +224,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
224
224
  "onUpdate:modelValue": H
225
225
  }, null, 8, ["model-value", "indeterminate"])
226
226
  ])
227
- ])) : k("", !0),
227
+ ])) : p("", !0),
228
228
  (n(!0), i(T, null, I(l.headers, (s) => (n(), R(ce, {
229
229
  key: s.field,
230
230
  header: s,
@@ -240,7 +240,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
240
240
  ])
241
241
  ], 2),
242
242
  r("tbody", ye, [
243
- q.value ? (n(!0), i(T, { key: 0 }, I(Math.min(P.value, 15), (s) => (n(), i("tr", {
243
+ q.value ? (n(!0), i(T, { key: 0 }, I(Math.min(k.value, 15), (s) => (n(), i("tr", {
244
244
  key: "skeleton-" + s,
245
245
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
246
246
  }, [
@@ -248,7 +248,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
248
248
  r("div", { class: "flex items-center justify-center" }, [
249
249
  r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
250
250
  ], -1)
251
- ])])) : k("", !0),
251
+ ])])) : p("", !0),
252
252
  (n(!0), i(T, null, I(l.headers, (u) => (n(), i("td", {
253
253
  key: u.field,
254
254
  class: S(["p-5! align-middle last:pr-6!", [u.hideOnMobile ? "hidden md:table-cell" : ""]])
@@ -301,7 +301,7 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
301
301
  ]),
302
302
  e.$slots["empty-action"] ? (n(), i("div", Ie, [
303
303
  x(e.$slots, "empty-action")
304
- ])) : k("", !0)
304
+ ])) : p("", !0)
305
305
  ])
306
306
  ], 8, ke)
307
307
  ]))
@@ -318,17 +318,17 @@ const me = { class: "space-y-6.5" }, he = { class: "overflow-x-auto w-full" }, v
318
318
  onChange: Q,
319
319
  "onUpdate:itemsPerPage": X
320
320
  }), null, 16, ["current-page", "total-pages", "total-items"])
321
- ])) : k("", !0),
321
+ ])) : p("", !0),
322
322
  F(ie, {
323
- show: C.value,
324
- "onUpdate:show": t[2] || (t[2] = (s) => C.value = s),
323
+ show: P.value,
324
+ "onUpdate:show": t[2] || (t[2] = (s) => P.value = s),
325
325
  title: "Confirm Deletion",
326
326
  description: "Are you sure you want to delete the selected items?",
327
327
  "confirm-text": "Delete",
328
328
  "cancel-text": "Cancel",
329
329
  variant: "danger",
330
330
  onConfirm: Z,
331
- onCancel: t[3] || (t[3] = (s) => C.value = !1)
331
+ onCancel: t[3] || (t[3] = (s) => P.value = !1)
332
332
  }, null, 8, ["show"])
333
333
  ]));
334
334
  }
@@ -63,7 +63,7 @@ const L = ["data-state"], U = { class: "flex items-center justify-center" }, h =
63
63
  a("select", b.value);
64
64
  };
65
65
  return (e, t) => (c(), d("tr", {
66
- class: u(["border-b transition-colors data-[state=selected]:bg-muted h-full", [
66
+ class: u(["border-b data-[state=selected]:bg-muted h-full", [
67
67
  i.hoverable ? "hover:bg-muted/20" : "",
68
68
  i.striped && i.index % 2 === 1 ? "bg-muted/20" : "bg-background",
69
69
  i.isSelected ? "bg-muted! hover:bg-muted/30" : "",
@@ -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
  }, [