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
@@ -0,0 +1,38 @@
1
+ export interface NumberInputProps {
2
+ modelValue?: number;
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ variant?: 'split' | 'stacked';
7
+ mode?: 'solid' | 'outline' | 'ghost';
8
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
9
+ disabled?: boolean;
10
+ placeholder?: string;
11
+ name?: string;
12
+ id?: string;
13
+ readonly?: boolean;
14
+ rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
15
+ }
16
+ declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (value: number) => any;
18
+ change: (value: number) => any;
19
+ blur: (event: FocusEvent) => any;
20
+ focus: (event: FocusEvent) => any;
21
+ }, string, import('vue').PublicProps, Readonly<NumberInputProps> & Readonly<{
22
+ "onUpdate:modelValue"?: (value: number) => any;
23
+ onChange?: (value: number) => any;
24
+ onBlur?: (event: FocusEvent) => any;
25
+ onFocus?: (event: FocusEvent) => any;
26
+ }>, {
27
+ disabled: boolean;
28
+ mode: "solid" | "outline" | "ghost";
29
+ size: "xs" | "sm" | "md" | "lg" | "xl";
30
+ variant: "split" | "stacked";
31
+ modelValue: number;
32
+ rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
33
+ readonly: boolean;
34
+ step: number;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
36
+ inputRef: HTMLInputElement;
37
+ }, HTMLDivElement>;
38
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./NumberInput.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e7171c4f"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,191 @@
1
+ import { defineComponent as K, ref as g, watch as R, computed as a, openBlock as c, createElementBlock as m, normalizeClass as o, createVNode as x, createCommentVNode as h, createElementVNode as y, withKeys as p, withModifiers as k } from "vue";
2
+ import b from "./Icon.vue.js";
3
+ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown"], L = ["disabled"], M = {
4
+ key: 2,
5
+ class: "flex flex-col h-full border-l border-input"
6
+ }, $ = ["disabled"], A = ["disabled"], H = /* @__PURE__ */ K({
7
+ __name: "NumberInput",
8
+ props: {
9
+ modelValue: { default: void 0 },
10
+ min: {},
11
+ max: {},
12
+ step: { default: 1 },
13
+ variant: { default: "split" },
14
+ mode: { default: "outline" },
15
+ size: { default: "md" },
16
+ disabled: { type: Boolean, default: !1 },
17
+ placeholder: {},
18
+ name: {},
19
+ id: {},
20
+ readonly: { type: Boolean, default: !1 },
21
+ rounded: { default: "md" }
22
+ },
23
+ emits: ["update:modelValue", "change", "focus", "blur"],
24
+ setup(e, { emit: N }) {
25
+ const l = e, s = N, d = g(l.modelValue ?? "");
26
+ R(
27
+ () => l.modelValue,
28
+ (t) => {
29
+ t !== void 0 && (d.value = t);
30
+ }
31
+ );
32
+ const z = g(null), r = a(() => {
33
+ const t = {
34
+ xs: { h: "h-7", text: "text-xs", px: "px-2", icon: "w-3 h-3" },
35
+ sm: { h: "h-8", text: "text-xs", px: "px-2", icon: "w-3.5 h-3.5" },
36
+ md: { h: "h-9", text: "text-sm", px: "px-3", icon: "w-4 h-4" },
37
+ lg: { h: "h-10", text: "text-base", px: "px-4", icon: "w-5 h-5" },
38
+ xl: { h: "h-12", text: "text-lg", px: "px-5", icon: "w-6 h-6" }
39
+ };
40
+ return t[l.size] || t.md;
41
+ }), C = a(() => ({
42
+ none: "rounded-none",
43
+ sm: "rounded-sm",
44
+ md: "rounded-md",
45
+ lg: "rounded-lg",
46
+ xl: "rounded-xl",
47
+ "2xl": "rounded-2xl",
48
+ full: "rounded-full"
49
+ })[l.rounded] || "rounded-md"), V = a(() => ({
50
+ none: "rounded-l-none",
51
+ sm: "rounded-l-sm",
52
+ md: "rounded-l-md",
53
+ lg: "rounded-l-lg",
54
+ xl: "rounded-l-xl",
55
+ "2xl": "rounded-l-2xl",
56
+ full: "rounded-l-full"
57
+ })[l.rounded] || "rounded-l-md"), B = a(() => ({
58
+ none: "rounded-r-none",
59
+ sm: "rounded-r-sm",
60
+ md: "rounded-r-md",
61
+ lg: "rounded-r-lg",
62
+ xl: "rounded-r-xl",
63
+ "2xl": "rounded-r-2xl",
64
+ full: "rounded-r-full"
65
+ })[l.rounded] || "rounded-r-md"), S = a(() => [
66
+ "flex items-center w-full relative transition-all duration-200",
67
+ l.disabled ? "opacity-50 cursor-not-allowed" : "",
68
+ l.mode === "solid" ? "bg-muted" : "",
69
+ l.mode === "outline" ? "border border-input bg-background" : "",
70
+ l.mode === "ghost" ? "bg-transparent" : "",
71
+ r.value.h,
72
+ C.value
73
+ ]), j = a(() => [
74
+ "flex-1 w-full bg-transparent text-center focus:outline-none appearance-none",
75
+ "placeholder:text-muted-foreground/50",
76
+ r.value.text,
77
+ l.disabled ? "cursor-not-allowed" : ""
78
+ ]), w = a(() => {
79
+ const t = "flex items-center justify-center transition-colors active:scale-95 shrink-0 select-none", n = l.disabled ? "" : "hover:text-primary hover:bg-muted/50";
80
+ return l.size === "xs" || l.size, l.variant === "split" ? l.mode === "solid" ? [
81
+ t,
82
+ l.disabled ? "" : "hover:text-primary hover:bg-background/80",
83
+ "bg-background shadow-sm rounded-full mx-1 my-0.5 aspect-square self-center h-[calc(100%-12px)] w-auto max-w-[calc(100%-12px)] flex items-center justify-center"
84
+ ] : [t, n, "h-full", "px-2"] : [t, n, "h-1/2 w-8 border-l border-input/50"];
85
+ }), u = (t) => {
86
+ if (l.disabled || l.readonly) return;
87
+ let n = t;
88
+ l.min !== void 0 && n < l.min && (n = l.min), l.max !== void 0 && n > l.max && (n = l.max), d.value = n, s("update:modelValue", n), s("change", n);
89
+ }, f = () => {
90
+ const t = Number(d.value) || 0;
91
+ u(t + l.step);
92
+ }, v = () => {
93
+ const t = Number(d.value) || 0;
94
+ u(t - l.step);
95
+ }, F = (t) => {
96
+ const n = t.target, i = parseFloat(n.value);
97
+ if (isNaN(i)) {
98
+ d.value = n.value;
99
+ return;
100
+ }
101
+ u(i);
102
+ }, I = (t) => {
103
+ s("blur", t);
104
+ const n = parseFloat(String(d.value));
105
+ isNaN(n) ? u(l.min || 0) : u(n);
106
+ };
107
+ return (t, n) => (c(), m("div", {
108
+ class: o([S.value, "overflow-hidden"])
109
+ }, [
110
+ e.variant === "split" ? (c(), m("button", {
111
+ key: 0,
112
+ type: "button",
113
+ class: o([
114
+ w.value,
115
+ e.mode === "outline" ? "border-r border-input" : "",
116
+ e.variant === "split" && e.mode !== "solid" ? V.value : ""
117
+ ]),
118
+ disabled: e.disabled || e.min !== void 0 && Number(d.value) <= e.min,
119
+ onClick: v
120
+ }, [
121
+ x(b, {
122
+ icon: "lucide:minus",
123
+ class: o(r.value.icon)
124
+ }, null, 8, ["class"])
125
+ ], 10, E)) : h("", !0),
126
+ y("input", {
127
+ ref_key: "inputRef",
128
+ ref: z,
129
+ type: "number",
130
+ value: d.value,
131
+ min: e.min,
132
+ max: e.max,
133
+ step: e.step,
134
+ placeholder: e.placeholder,
135
+ disabled: e.disabled,
136
+ readonly: e.readonly,
137
+ class: o(j.value),
138
+ onInput: F,
139
+ onFocus: n[0] || (n[0] = (i) => s("focus", i)),
140
+ onBlur: I,
141
+ onKeydown: [
142
+ p(k(f, ["prevent"]), ["up"]),
143
+ p(k(v, ["prevent"]), ["down"])
144
+ ]
145
+ }, null, 42, q),
146
+ e.variant === "split" ? (c(), m("button", {
147
+ key: 1,
148
+ type: "button",
149
+ class: o([
150
+ w.value,
151
+ e.mode === "outline" ? "border-l border-input" : "",
152
+ e.variant === "split" && e.mode !== "solid" ? B.value : ""
153
+ ]),
154
+ disabled: e.disabled || e.max !== void 0 && Number(d.value) >= e.max,
155
+ onClick: f
156
+ }, [
157
+ x(b, {
158
+ icon: "lucide:plus",
159
+ class: o(r.value.icon)
160
+ }, null, 8, ["class"])
161
+ ], 10, L)) : h("", !0),
162
+ e.variant === "stacked" ? (c(), m("div", M, [
163
+ y("button", {
164
+ type: "button",
165
+ class: "flex-1 flex items-center justify-center hover:bg-muted/50 w-8 border-b border-input/50",
166
+ disabled: e.disabled || e.max !== void 0 && Number(d.value) >= e.max,
167
+ onClick: f
168
+ }, [
169
+ x(b, {
170
+ icon: "lucide:chevron-up",
171
+ class: o(e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5")
172
+ }, null, 8, ["class"])
173
+ ], 8, $),
174
+ y("button", {
175
+ type: "button",
176
+ class: "flex-1 flex items-center justify-center hover:bg-muted/50 w-8",
177
+ disabled: e.disabled || e.min !== void 0 && Number(d.value) <= e.min,
178
+ onClick: v
179
+ }, [
180
+ x(b, {
181
+ icon: "lucide:chevron-down",
182
+ class: o(e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5")
183
+ }, null, 8, ["class"])
184
+ ], 8, A)
185
+ ])) : h("", !0)
186
+ ], 2));
187
+ }
188
+ });
189
+ export {
190
+ H as default
191
+ };
@@ -9,6 +9,7 @@ interface Props {
9
9
  itemsPerPage?: number;
10
10
  itemsPerPageOptions?: number[];
11
11
  navType?: 'text' | 'icon';
12
+ alignment?: 'start' | 'center' | 'end' | 'between';
12
13
  }
13
14
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
15
  change: (value: number) => any;
@@ -1,25 +1,25 @@
1
- import { defineComponent as B, computed as N, openBlock as s, createElementBlock as l, normalizeClass as z, createElementVNode as d, Fragment as f, renderList as S, toDisplayString as x, createVNode as b, createCommentVNode as P, createTextVNode as h, createBlock as v, withCtx as w } from "vue";
1
+ import { defineComponent as N, computed as z, openBlock as s, createElementBlock as l, normalizeClass as S, createElementVNode as d, Fragment as P, renderList as $, toDisplayString as x, createVNode as b, createCommentVNode as m, createTextVNode as h, createBlock as v, withCtx as w } from "vue";
2
2
  import O from "../Icon.vue.js";
3
3
  import o from "../Button.vue.js";
4
4
  const R = {
5
5
  key: 0,
6
6
  class: "flex flex-wrap items-center justify-center md:justify-start gap-4 order-2 md:order-1"
7
- }, j = {
7
+ }, E = {
8
8
  key: 0,
9
9
  class: "flex items-center gap-2 text-sm text-muted-foreground"
10
- }, E = { class: "relative" }, V = ["value", "disabled"], L = ["value"], M = {
10
+ }, V = { class: "relative" }, L = ["value", "disabled"], M = ["value"], A = {
11
11
  key: 1,
12
12
  class: "hidden md:block w-px h-4 bg-border"
13
- }, A = {
13
+ }, F = {
14
14
  key: 2,
15
15
  class: "text-sm text-muted-foreground whitespace-nowrap"
16
- }, F = { class: "font-medium text-foreground" }, q = { class: "font-medium text-foreground" }, G = {
16
+ }, q = { class: "font-medium text-foreground" }, G = { class: "font-medium text-foreground" }, H = {
17
17
  class: "flex items-center justify-center gap-1 order-1 md:order-2",
18
18
  "aria-label": "Pagination"
19
- }, H = {
19
+ }, J = {
20
20
  key: 0,
21
21
  class: "px-2 text-gray-400 select-none"
22
- }, U = /* @__PURE__ */ B({
22
+ }, W = /* @__PURE__ */ N({
23
23
  __name: "Pagination",
24
24
  props: {
25
25
  currentPage: { default: 1 },
@@ -31,70 +31,84 @@ const R = {
31
31
  showItemsPerPage: { type: Boolean, default: !1 },
32
32
  itemsPerPage: { default: 10 },
33
33
  itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
34
- navType: { default: "text" }
34
+ navType: { default: "text" },
35
+ alignment: {}
35
36
  },
36
37
  emits: ["update:currentPage", "change", "update:itemsPerPage", "change:itemsPerPage"],
37
- setup(e, { emit: $ }) {
38
- const a = e, g = $, r = (i) => {
39
- a.disabled || i < 1 || i > a.totalPages || i !== a.currentPage && (g("update:currentPage", i), g("change", i));
38
+ setup(e, { emit: j }) {
39
+ const a = e, u = j, r = (i) => {
40
+ a.disabled || i < 1 || i > a.totalPages || i !== a.currentPage && (u("update:currentPage", i), u("change", i));
40
41
  }, T = (i) => {
41
42
  const t = i.target, n = parseInt(t.value);
42
- g("update:itemsPerPage", n), g("change:itemsPerPage", n), g("update:currentPage", 1), g("change", 1);
43
- }, D = N(() => {
43
+ u("update:itemsPerPage", n), u("change:itemsPerPage", n), u("update:currentPage", 1), u("change", 1);
44
+ }, D = z(() => {
44
45
  if (a.siblingCount * 2 + 5 >= a.totalPages)
45
46
  return y(1, a.totalPages);
46
- const t = Math.max(a.currentPage - a.siblingCount, 1), n = Math.min(a.currentPage + a.siblingCount, a.totalPages), u = t > 2, c = n < a.totalPages - 2, k = 1, C = a.totalPages;
47
- if (!u && c) {
48
- let m = 3 + 2 * a.siblingCount;
49
- return [...y(1, m), "DOTS", C];
47
+ const t = Math.max(a.currentPage - a.siblingCount, 1), n = Math.min(a.currentPage + a.siblingCount, a.totalPages), g = t > 2, c = n < a.totalPages - 2, k = 1, C = a.totalPages;
48
+ if (!g && c) {
49
+ let f = 3 + 2 * a.siblingCount;
50
+ return [...y(1, f), "DOTS", C];
50
51
  }
51
- if (u && !c) {
52
- let m = 3 + 2 * a.siblingCount, I = y(a.totalPages - m + 1, a.totalPages);
52
+ if (g && !c) {
53
+ let f = 3 + 2 * a.siblingCount, I = y(a.totalPages - f + 1, a.totalPages);
53
54
  return [k, "DOTS", ...I];
54
55
  }
55
- if (u && c) {
56
- let m = y(t, n);
57
- return [k, "DOTS", ...m, "DOTS", C];
56
+ if (g && c) {
57
+ let f = y(t, n);
58
+ return [k, "DOTS", ...f, "DOTS", C];
58
59
  }
59
60
  return [];
60
61
  }), y = (i, t) => {
61
62
  let n = t - i + 1;
62
- return Array.from({ length: n }, (u, c) => c + i);
63
- };
63
+ return Array.from({ length: n }, (g, c) => c + i);
64
+ }, B = z(() => {
65
+ if (a.alignment)
66
+ switch (a.alignment) {
67
+ case "start":
68
+ return "justify-start";
69
+ case "end":
70
+ return "justify-end";
71
+ case "between":
72
+ return "justify-between";
73
+ default:
74
+ return "justify-center";
75
+ }
76
+ return a.showPageInfo || a.showItemsPerPage ? "justify-between" : "justify-center";
77
+ });
64
78
  return (i, t) => (s(), l("div", {
65
- class: z(["flex flex-col md:flex-row items-center gap-4 w-full", [e.showPageInfo || e.showItemsPerPage ? "justify-between" : "justify-center"]])
79
+ class: S(["flex flex-col md:flex-row items-center gap-4 w-full", [B.value]])
66
80
  }, [
67
81
  e.showPageInfo || e.showItemsPerPage ? (s(), l("div", R, [
68
- e.showItemsPerPage ? (s(), l("div", j, [
82
+ e.showItemsPerPage ? (s(), l("div", E, [
69
83
  t[8] || (t[8] = d("span", { class: "whitespace-nowrap" }, "Show", -1)),
70
- d("div", E, [
84
+ d("div", V, [
71
85
  d("select", {
72
86
  value: e.itemsPerPage,
73
87
  class: "appearance-none bg-background border border-border hover:border-accent text-foreground py-1 pl-2 pr-6 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary text-sm cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
74
88
  disabled: e.disabled,
75
89
  onChange: T
76
90
  }, [
77
- (s(!0), l(f, null, S(e.itemsPerPageOptions, (n) => (s(), l("option", {
91
+ (s(!0), l(P, null, $(e.itemsPerPageOptions, (n) => (s(), l("option", {
78
92
  key: n,
79
93
  value: n
80
- }, x(n), 9, L))), 128))
81
- ], 40, V),
94
+ }, x(n), 9, M))), 128))
95
+ ], 40, L),
82
96
  b(O, {
83
97
  icon: "lucide:chevron-down",
84
98
  class: "absolute right-1.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none"
85
99
  })
86
100
  ]),
87
101
  t[9] || (t[9] = d("span", { class: "whitespace-nowrap" }, "per page", -1))
88
- ])) : P("", !0),
89
- e.showItemsPerPage && e.showPageInfo ? (s(), l("div", M)) : P("", !0),
90
- e.showPageInfo ? (s(), l("span", A, [
102
+ ])) : m("", !0),
103
+ e.showItemsPerPage && e.showPageInfo ? (s(), l("div", A)) : m("", !0),
104
+ e.showPageInfo ? (s(), l("span", F, [
91
105
  t[10] || (t[10] = h(" Page ", -1)),
92
- d("span", F, x(e.currentPage), 1),
106
+ d("span", q, x(e.currentPage), 1),
93
107
  t[11] || (t[11] = h(" of ", -1)),
94
- d("span", q, x(e.totalPages), 1)
95
- ])) : P("", !0)
96
- ])) : P("", !0),
97
- d("nav", G, [
108
+ d("span", G, x(e.totalPages), 1)
109
+ ])) : m("", !0)
110
+ ])) : m("", !0),
111
+ d("nav", H, [
98
112
  e.showEdges ? (s(), v(o, {
99
113
  key: 0,
100
114
  variant: "ghost",
@@ -102,7 +116,7 @@ const R = {
102
116
  icon: "lucide:chevrons-left",
103
117
  disabled: e.disabled || e.currentPage === 1,
104
118
  onClick: t[0] || (t[0] = (n) => r(1))
105
- }, null, 8, ["disabled"])) : P("", !0),
119
+ }, null, 8, ["disabled"])) : m("", !0),
106
120
  e.navType === "icon" ? (s(), v(o, {
107
121
  key: 1,
108
122
  variant: "ghost",
@@ -110,7 +124,7 @@ const R = {
110
124
  icon: "lucide:chevron-left",
111
125
  disabled: e.disabled || e.currentPage === 1,
112
126
  onClick: t[1] || (t[1] = (n) => r(e.currentPage - 1))
113
- }, null, 8, ["disabled"])) : (s(), l(f, { key: 2 }, [
127
+ }, null, 8, ["disabled"])) : (s(), l(P, { key: 2 }, [
114
128
  b(o, {
115
129
  variant: "ghost",
116
130
  size: "sm",
@@ -132,12 +146,12 @@ const R = {
132
146
  onClick: t[3] || (t[3] = (n) => r(e.currentPage - 1))
133
147
  }, null, 8, ["disabled"])
134
148
  ], 64)),
135
- (s(!0), l(f, null, S(D.value, (n, u) => (s(), l(f, { key: u }, [
136
- n === "DOTS" ? (s(), l("div", H, "...")) : (s(), v(o, {
149
+ (s(!0), l(P, null, $(D.value, (n, g) => (s(), l(P, { key: g }, [
150
+ n === "DOTS" ? (s(), l("div", J, "...")) : (s(), v(o, {
137
151
  key: 1,
138
152
  size: "sm",
139
153
  variant: n === e.currentPage ? "outline" : "ghost",
140
- class: z({
154
+ class: S({
141
155
  "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10": n === e.currentPage,
142
156
  "text-gray-600 hover:bg-gray-100": n !== e.currentPage
143
157
  }),
@@ -157,7 +171,7 @@ const R = {
157
171
  icon: "lucide:chevron-right",
158
172
  disabled: e.disabled || e.currentPage === e.totalPages,
159
173
  onClick: t[4] || (t[4] = (n) => r(e.currentPage + 1))
160
- }, null, 8, ["disabled"])) : (s(), l(f, { key: 4 }, [
174
+ }, null, 8, ["disabled"])) : (s(), l(P, { key: 4 }, [
161
175
  b(o, {
162
176
  variant: "ghost",
163
177
  size: "sm",
@@ -186,11 +200,11 @@ const R = {
186
200
  icon: "lucide:chevrons-right",
187
201
  disabled: e.disabled || e.currentPage === e.totalPages,
188
202
  onClick: t[7] || (t[7] = (n) => r(e.totalPages))
189
- }, null, 8, ["disabled"])) : P("", !0)
203
+ }, null, 8, ["disabled"])) : m("", !0)
190
204
  ])
191
205
  ], 2));
192
206
  }
193
207
  });
194
208
  export {
195
- U as default
209
+ W as default
196
210
  };
@@ -0,0 +1,12 @@
1
+ import { ProgressBarProps, ProgressBarVariant, ProgressBarSize } from '../../types/progressbar';
2
+ declare const _default: import('vue').DefineComponent<ProgressBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressBarProps> & Readonly<{}>, {
3
+ type: import('../../types/progressbar').ProgressBarType;
4
+ size: ProgressBarSize;
5
+ variant: ProgressBarVariant;
6
+ rounded: string;
7
+ indeterminate: boolean;
8
+ striped: boolean;
9
+ showValue: boolean;
10
+ animated: boolean;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./ProgressBar.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-454a1505"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,158 @@
1
+ import { defineComponent as $, computed as s, openBlock as n, createElementBlock as i, normalizeStyle as o, normalizeClass as c, createElementVNode as d, toDisplayString as x, createCommentVNode as g } from "vue";
2
+ const S = ["aria-valuenow"], M = {
3
+ key: 0,
4
+ class: "px-2 font-medium truncate"
5
+ }, j = ["aria-valuenow"], E = ["width", "height", "viewBox"], I = ["cx", "cy", "r", "stroke-width"], N = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], W = /* @__PURE__ */ $({
6
+ __name: "ProgressBar",
7
+ props: {
8
+ modelValue: {},
9
+ type: { default: "linear" },
10
+ variant: { default: "primary" },
11
+ size: { default: "md" },
12
+ showValue: { type: Boolean, default: !1 },
13
+ label: {},
14
+ height: {},
15
+ width: {},
16
+ strokeWidth: {},
17
+ striped: { type: Boolean, default: !1 },
18
+ animated: { type: Boolean, default: !1 },
19
+ indeterminate: { type: Boolean, default: !1 },
20
+ color: {},
21
+ trackColor: {},
22
+ rounded: { default: "rounded-full" }
23
+ },
24
+ setup(t) {
25
+ const e = t, h = (a) => Math.min(100, Math.max(0, a)), m = (a) => {
26
+ if (a !== void 0)
27
+ return typeof a == "number" ? `${a}px` : a;
28
+ }, v = {
29
+ primary: "bg-primary text-primary-foreground",
30
+ secondary: "bg-secondary text-secondary-foreground",
31
+ success: "bg-success text-success-fg",
32
+ warning: "bg-warning text-warning-fg",
33
+ danger: "bg-destructive text-destructive-foreground",
34
+ info: "bg-info text-info-fg",
35
+ gradient: "bg-gradient-to-r from-primary to-purple-500 text-white"
36
+ }, y = {
37
+ xs: "h-1 text-[10px]",
38
+ sm: "h-2 text-xs",
39
+ md: "h-3 text-xs",
40
+ lg: "h-4 text-sm",
41
+ xl: "h-6 text-base"
42
+ }, w = {
43
+ xs: 40,
44
+ sm: 60,
45
+ md: 80,
46
+ lg: 120,
47
+ xl: 160
48
+ }, k = s(() => ({
49
+ height: m(e.height),
50
+ width: `${h(e.modelValue)}%`,
51
+ backgroundColor: e.color,
52
+ transition: "width 0.3s ease-in-out"
53
+ })), b = s(() => ({
54
+ backgroundColor: e.trackColor,
55
+ height: m(e.height)
56
+ })), r = s(() => {
57
+ const a = typeof e.width == "number" ? e.width : e.width ? parseInt(e.width) : w[e.size], l = e.strokeWidth || a / 10, f = (a - l) / 2, u = 2 * Math.PI * f, B = u - h(e.modelValue) / 100 * u;
58
+ return {
59
+ width: a,
60
+ stroke: l,
61
+ radius: f,
62
+ circumference: u,
63
+ offset: B,
64
+ center: a / 2
65
+ };
66
+ });
67
+ s(() => e.color ? e.color : "currentColor");
68
+ const p = s(() => [
69
+ "w-full overflow-hidden",
70
+ e.rounded,
71
+ e.height ? "" : y[e.size],
72
+ // Only apply preset height if custom not set
73
+ "bg-secondary"
74
+ // Default track
75
+ ]), C = s(() => [
76
+ "h-full flex items-center justify-center transition-all duration-300 rounded",
77
+ e.color ? "" : v[e.variant],
78
+ e.striped ? "bg-stripe" : "",
79
+ e.animated ? "animate-progress-stripe" : "",
80
+ e.indeterminate ? "animate-progress-indeterminate w-full origin-left" : ""
81
+ ]), z = s(() => ["absolute inset-0 flex items-center justify-center font-medium", {
82
+ xs: "text-[10px]",
83
+ sm: "text-xs",
84
+ md: "text-sm",
85
+ lg: "text-lg",
86
+ xl: "text-xl"
87
+ }[e.size]].join(" ")), V = s(() => ({
88
+ primary: "text-primary",
89
+ secondary: "text-secondary-foreground",
90
+ success: "text-success",
91
+ warning: "text-warning",
92
+ danger: "text-destructive",
93
+ info: "text-info",
94
+ gradient: "text-primary"
95
+ // SVG gradient handled separately if needed
96
+ })[e.variant]);
97
+ return (a, l) => t.type === "linear" ? (n(), i("div", {
98
+ key: 0,
99
+ role: "progressbar",
100
+ "aria-valuenow": t.indeterminate ? void 0 : t.modelValue,
101
+ "aria-valuemin": 0,
102
+ "aria-valuemax": 100,
103
+ class: c(p.value),
104
+ style: o(b.value)
105
+ }, [
106
+ d("div", {
107
+ class: c(C.value),
108
+ style: o(t.indeterminate ? {} : k.value)
109
+ }, [
110
+ t.showValue && !t.indeterminate && t.size !== "xs" && t.size !== "sm" ? (n(), i("span", M, x(t.label || `${Math.round(t.modelValue)}%`), 1)) : g("", !0)
111
+ ], 6)
112
+ ], 14, S)) : (n(), i("div", {
113
+ key: 1,
114
+ role: "progressbar",
115
+ "aria-valuenow": t.modelValue,
116
+ "aria-valuemin": 0,
117
+ "aria-valuemax": 100,
118
+ class: "relative inline-flex items-center justify-center",
119
+ style: o({ width: `${r.value.width}px`, height: `${r.value.width}px` })
120
+ }, [
121
+ (n(), i("svg", {
122
+ width: r.value.width,
123
+ height: r.value.width,
124
+ viewBox: `0 0 ${r.value.width} ${r.value.width}`,
125
+ class: "transform -rotate-90"
126
+ }, [
127
+ d("circle", {
128
+ cx: r.value.center,
129
+ cy: r.value.center,
130
+ r: r.value.radius,
131
+ "stroke-width": r.value.stroke,
132
+ fill: "transparent",
133
+ class: "text-secondary stroke-current",
134
+ style: o({ stroke: t.trackColor })
135
+ }, null, 12, I),
136
+ d("circle", {
137
+ cx: r.value.center,
138
+ cy: r.value.center,
139
+ r: r.value.radius,
140
+ "stroke-width": r.value.stroke,
141
+ fill: "transparent",
142
+ "stroke-dasharray": r.value.circumference,
143
+ "stroke-dashoffset": r.value.offset,
144
+ "stroke-linecap": "round",
145
+ class: c(["stroke-current transition-all duration-300 ease-out", [t.color ? "" : V.value]]),
146
+ style: o({ stroke: t.color })
147
+ }, null, 14, N)
148
+ ], 8, E)),
149
+ t.showValue ? (n(), i("div", {
150
+ key: 0,
151
+ class: c(z.value)
152
+ }, x(t.label || `${Math.round(t.modelValue)}%`), 3)) : g("", !0)
153
+ ], 12, j));
154
+ }
155
+ });
156
+ export {
157
+ W as default
158
+ };
@@ -0,0 +1,3 @@
1
+ import { default as ProgressBar } from './ProgressBar.vue';
2
+ export { ProgressBar };
3
+ export * from '../../types/progressbar';
@@ -0,0 +1,8 @@
1
+ import { SpinnerProps, SpinnerSize, SpinnerColor, SpinnerVariant } from './types';
2
+ declare const _default: import('vue').DefineComponent<SpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
3
+ class: string;
4
+ color: SpinnerColor;
5
+ size: SpinnerSize;
6
+ variant: SpinnerVariant;
7
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
8
+ export default _default;