vlite3 0.1.10 → 0.2.1

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 (43) hide show
  1. package/README.md +63 -106
  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/Form/Form.vue.d.ts +2 -0
  10. package/components/Form/Form.vue.js +2 -2
  11. package/components/Form/Form.vue2.js +104 -101
  12. package/components/Form/FormField.vue.d.ts +4 -0
  13. package/components/Form/FormField.vue.js +248 -148
  14. package/components/Form/FormFields.vue.d.ts +2 -0
  15. package/components/Form/FormFields.vue.js +2 -2
  16. package/components/Form/FormFields.vue2.js +45 -39
  17. package/components/Form/types.d.ts +24 -4
  18. package/components/Form/utils/form.utils.d.ts +5 -1
  19. package/components/Form/utils/form.utils.js +69 -60
  20. package/components/GoogleLogin.vue.d.ts +41 -0
  21. package/components/Input.vue.js +120 -111
  22. package/components/NumberInput.vue.d.ts +38 -0
  23. package/components/NumberInput.vue.js +7 -0
  24. package/components/NumberInput.vue2.js +191 -0
  25. package/components/Pagination/Pagination.vue.d.ts +1 -0
  26. package/components/Pagination/Pagination.vue.js +60 -46
  27. package/components/ProgressBar/ProgressBar.vue.d.ts +12 -0
  28. package/components/ProgressBar/index.d.ts +3 -0
  29. package/components/Spinner/Spinner.vue.d.ts +8 -0
  30. package/components/Spinner/Spinner.vue.js +89 -0
  31. package/components/Spinner/Spinner.vue2.js +4 -0
  32. package/components/Spinner/index.d.ts +2 -0
  33. package/components/Spinner/types.d.ts +9 -0
  34. package/components/Tabes/Tabes.vue.d.ts +3 -1
  35. package/components/Tabes/Tabes.vue.js +103 -44
  36. package/index.d.ts +2 -0
  37. package/index.js +133 -114
  38. package/package.json +4 -3
  39. package/style.css +35 -4
  40. package/types/form.type.d.ts +2 -2
  41. package/types/progressbar.d.ts +75 -0
  42. package/utils/functions.d.ts +99 -0
  43. package/utils/functions.js +91 -7
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # vlite3
2
2
 
3
- A lightweight Vue 3 UI component library built with Tailwind CSS.
3
+ A lightweight Vue 3 UI component library built with Tailwind CSS, created for personal projects and available for anyone to use.
4
4
 
5
5
  ## Installation
6
6
 
@@ -138,6 +138,59 @@ To customize the theme, simply override the CSS variables in your main CSS file:
138
138
  }
139
139
  ```
140
140
 
141
+ ## 8. Typography Scale System
142
+
143
+ The system is divided into two groups:
144
+
145
+ - Compact scale (prefixed with `--text--fs-*`) for smaller text
146
+ - Progressive scale (prefixed with `--text-fs-*`) for base and larger text
147
+
148
+ ### Compact Text Scale
149
+
150
+ ```css
151
+ --text--fs-1: 0.95em;
152
+ --text--fs-2: 0.8em;
153
+ --text--fs-3: 0.75em;
154
+ --text--fs-4: 0.7em;
155
+ --text--fs-5: 0.65em;
156
+ --text--fs-6: 0.6em;
157
+ --text--fs-7: 0.55em;
158
+ --text--fs-8: 0.5em;
159
+ --text-fs-0.5: 1.05em;
160
+ --text-fs-1: 1.1em;
161
+ --text-fs-1.5: 1.14em;
162
+ --text-fs-2: 1.18em;
163
+ --text-fs-2.5: 1.22em;
164
+ --text-fs-3: 1.26em;
165
+ --text-fs-3.5: 1.3em;
166
+ --text-fs-4: 1.34em;
167
+ --text-fs-4.5: 1.38em;
168
+ --text-fs-5: 1.42em;
169
+ --text-fs-5.5: 1.46em;
170
+ --text-fs-6: 1.5em;
171
+ --text-fs-6.5: 1.54em;
172
+ --text-fs-7: 1.58em;
173
+ --text-fs-7.5: 1.62em;
174
+ --text-fs-8: 1.68em;
175
+ --text-fs-8.5: 1.72em;
176
+ --text-fs-9: 1.8em;
177
+ --text-fs-9.5: 2em;
178
+ --text-fs-10: 2.5em;
179
+
180
+ --text-xs: 0.75rem --text-sm: 0.875rem --text-base: 1rem --text-lg: 1.125rem --text-xl: 1.25rem
181
+ --text-2xl: 1.5rem --text-3xl: 1.875rem --text-4xl: 2.25rem --text-5xl: 3rem --text-6xl: 4rem;
182
+ ```
183
+
184
+ ---
185
+
186
+ ```html
187
+ <p class="text-fs-2">Body text</p>
188
+
189
+ <span class="-text-fs-4 text-muted"> Caption text </span>
190
+
191
+ <h1 class="text-xl font-semibold">Page Title</h1>
192
+ ```
193
+
141
194
  ## ✅ Components
142
195
 
143
196
  - **Button**
@@ -170,6 +223,8 @@ To customize the theme, simply override the CSS variables in your main CSS file:
170
223
  - **MultiSelect**
171
224
  - **Form**
172
225
  - **CustomFields**
226
+ - **NumberInput**
227
+ - **Google Login**
173
228
 
174
229
  ### Data Display
175
230
 
@@ -193,110 +248,12 @@ To customize the theme, simply override the CSS variables in your main CSS file:
193
248
  - **ToastNotification**
194
249
  - **Tooltip**
195
250
  - **Dropdown**
251
+ - **ProgressBar**
252
+ - **Spinner**
196
253
 
197
- ## Global Configuration (Registry System)
198
-
199
- vlite3 features a plugin-based architecture that allows you to register global services. This is particularly useful for dependency injection, such as defining how file uploads should be handled across all `Form` components in your app.
200
-
201
- ### Setting up the Plugin
202
-
203
- In your `main.ts` or `main.js`, import `createVLite` and register your services:
204
-
205
- ```typescript
206
- import { createApp } from 'vue'
207
- import App from './App.vue'
208
- import { createVLite } from 'vlite3'
209
-
210
- const app = createApp(App)
211
-
212
- // Initialize VLite with custom configuration
213
- const vlite = createVLite({
214
- services: {
215
- /**
216
- * Global File Upload Handler
217
- *
218
- * This function will be called automatically by:
219
- * - useFileUpload() composable
220
- * - Form components (when using 'file', 'fileUploader', or 'avatarUpload' types)
221
- *
222
- * @param file - The File object to upload
223
- * @param folderId - (Optional) Folder ID passed from component props
224
- * @returns Promise<string> - The public URL of the uploaded file
225
- */
226
- upload: async (file, folderId) => {
227
- // Example: Upload to your own backend
228
- const formData = new FormData()
229
- formData.append('file', file)
230
- if (folderId) formData.append('folder_id', folderId)
231
-
232
- // Replace with your actual API call (e.g., Axios, Fetch)
233
- const response = await fetch(
234
- '[https://api.yourdomain.com/v1/upload](https://api.yourdomain.com/v1/upload)',
235
- {
236
- method: 'POST',
237
- body: formData,
238
- headers: {
239
- Authorization: 'Bearer ...',
240
- },
241
- }
242
- )
243
-
244
- if (!response.ok) throw new Error('Upload failed')
245
-
246
- const data = await response.json()
247
- return data.url // MUST return the file URL string
248
- },
249
- },
250
- })
251
-
252
- app.use(vlite)
253
- app.mount('#app')
254
- ```
255
-
256
- ### How it works
257
-
258
- Once registered, you don't need to pass upload handlers to individual components.
254
+ # Complete reference for AI agents and developers:
259
255
 
260
- 1. **Automatic Injection**: The `Form` component detects input types like `file`, `avatarUpload`, or `fileUploader`.
261
- 2. **Parallel Processing**: When the form is submitted, it automatically uploads all files in **parallel** using your registered `upload` service.
262
- 3. **URL Replacement**: The File objects in your form data are replaced with the returned URLs before the final `onSubmit` event is triggered.
263
-
264
- ## 4. Usage
265
-
266
- Import components directly in your Vue files:
267
-
268
- ```vue
269
- <script setup>
270
- import { Button, Input, Form } from 'vlite3'
271
-
272
- // The form will automatically use the global upload service defined in main.ts
273
- const schema = [
274
- {
275
- name: 'avatar',
276
- label: 'Profile Picture',
277
- type: 'avatarUpload',
278
- },
279
- {
280
- name: 'documents',
281
- label: 'Attachments',
282
- type: 'fileUploader',
283
- props: { multiple: true },
284
- },
285
- ]
286
-
287
- const handleSubmit = (payload) => {
288
- // payload.values.avatar will be a URL string (e.g., "https://api...")
289
- // payload.values.documents will be an array of URL strings
290
- console.log(payload.values)
291
- }
292
- </script>
293
-
294
- <template>
295
- <div class="p-4 space-y-4">
296
- <Button>Click Me</Button>
297
- <Input placeholder="Type here..." />
298
-
299
- <Form :schema="schema" @onSubmit="handleSubmit" />
300
- </div>
301
- </template>
302
- ```
256
+ - [llms.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms.txt).
257
+ - [llms-theming.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-theming.txt).
258
+ - [llms-full.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-full.txt).
259
+ - [llms-advance.txt](https://github.com/safdar-azeem/vlite3/blob/main/llms-advance.txt).
@@ -17,7 +17,7 @@ const R = ["type", "disabled"], D = /* @__PURE__ */ v({
17
17
  },
18
18
  setup(e) {
19
19
  const t = e, g = x(), l = s(() => t.icon && !t.text && !g.default), h = s(() => {
20
- 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-95 cursor-pointer gap-2", d = {
20
+ 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", d = {
21
21
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
22
22
  "primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/20",
23
23
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as $, computed as s, openBlock as l, createElementBlock as c, normalizeClass as o, renderSlot as u, createBlock as d, createCommentVNode as i, createTextVNode as C, toDisplayString as z, withCtx as B, createVNode as D } from "vue";
2
- import b from "../Icon.vue.js";
2
+ import f from "../Icon.vue.js";
3
3
  import S from "../Button.vue.js";
4
4
  const N = ["role", "tabindex"], V = {
5
5
  key: 0,
@@ -17,8 +17,8 @@ const N = ["role", "tabindex"], V = {
17
17
  class: { default: "" }
18
18
  },
19
19
  emits: ["click", "delete"],
20
- setup(a, { emit: f }) {
21
- const t = a, n = f, r = s(() => t.clickable && !t.disabled), g = (e) => {
20
+ setup(a, { emit: b }) {
21
+ const t = a, n = b, r = s(() => t.clickable && !t.disabled), g = (e) => {
22
22
  t.disabled || t.clickable && n("click", e);
23
23
  }, v = (e) => {
24
24
  t.disabled || (e.stopPropagation(), n("delete", e));
@@ -27,11 +27,11 @@ const N = ["role", "tabindex"], V = {
27
27
  }, h = s(() => {
28
28
  switch (t.size) {
29
29
  case "small":
30
- return "h-6 text-xs px-2 gap-1.5";
30
+ return "h-5 text-[10px] px-1.5 gap-1";
31
31
  case "large":
32
- return "h-10 text-base px-4 gap-2.5";
33
- default:
34
32
  return "h-8 text-sm px-3 gap-2";
33
+ default:
34
+ return "h-6 text-xs px-2.5 gap-1.5";
35
35
  }
36
36
  }), x = s(() => {
37
37
  if (t.disabled)
@@ -53,20 +53,20 @@ const N = ["role", "tabindex"], V = {
53
53
  }), p = s(() => [j, h.value, x.value, t.class].join(" ")), k = s(() => {
54
54
  switch (t.size) {
55
55
  case "small":
56
- return "h-3.5 w-3.5";
56
+ return "h-3 w-3";
57
57
  case "large":
58
- return "h-5 w-5";
59
- default:
60
58
  return "h-4 w-4";
59
+ default:
60
+ return "h-3.5 w-3.5";
61
61
  }
62
62
  }), y = s(() => {
63
63
  switch (t.size) {
64
64
  case "small":
65
- return "h-3 w-3";
65
+ return "h-2.5 w-2.5";
66
66
  case "large":
67
- return "h-4 w-4";
68
- default:
69
67
  return "h-3.5 w-3.5";
68
+ default:
69
+ return "h-3 w-3";
70
70
  }
71
71
  });
72
72
  return (e, w) => (l(), c("div", {
@@ -77,7 +77,7 @@ const N = ["role", "tabindex"], V = {
77
77
  onKeydown: m
78
78
  }, [
79
79
  u(e.$slots, "icon", {}, () => [
80
- a.icon ? (l(), d(b, {
80
+ a.icon ? (l(), d(f, {
81
81
  key: 0,
82
82
  icon: a.icon,
83
83
  class: o([k.value, "shrink-0", a.text ? "-ml-0.5" : ""])
@@ -94,11 +94,11 @@ const N = ["role", "tabindex"], V = {
94
94
  size: "xs",
95
95
  rounded: "full",
96
96
  disabled: a.disabled,
97
- class: o(["ml-auto !p-0.5 !h-auto !w-auto hover:bg-[#8282823c]", [a.text ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
97
+ class: o(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [a.text ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
98
98
  onClick: v
99
99
  }, {
100
100
  default: B(() => [
101
- D(b, {
101
+ D(f, {
102
102
  icon: "lucide:x",
103
103
  class: o(y.value)
104
104
  }, null, 8, ["class"])
@@ -1,7 +1,7 @@
1
1
  import o from "./DataTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-896cd72f"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-53f1fe21"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as ee, ref as g, computed as b, watch as p, onMounted as te, openBlock as r, createElementBlock as d, createVNode as C, createSlots as V, withCtx as T, renderSlot as S, createBlock as D, createCommentVNode as I, createElementVNode as n, normalizeClass as B, Fragment as R, renderList as $, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
1
+ import { defineComponent as ee, ref as g, computed as b, watch as p, onMounted as te, openBlock as n, createElementBlock as i, createVNode as C, createSlots as V, withCtx as T, renderSlot as S, createBlock as D, createCommentVNode as I, createElementVNode as r, normalizeClass as B, Fragment as R, renderList as $, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
2
2
  import oe from "../Icon.vue.js";
3
- import re from "../CheckBox.vue.js";
4
- import ne from "../Button.vue.js";
5
- import de from "../ConfirmationModal.vue.js";
6
- import ie from "../Pagination/Pagination.vue.js";
3
+ import ne from "../CheckBox.vue.js";
4
+ import re from "../Button.vue.js";
5
+ import ie from "../ConfirmationModal.vue.js";
6
+ import de from "../Pagination/Pagination.vue.js";
7
7
  import ue from "./DataTableHeader.vue.js";
8
8
  import ce from "./DataTableRow.vue.js";
9
9
  import me from "./DataTableToolbar.vue.js";
@@ -35,6 +35,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
35
35
  emptyDescription: { default: "No results found. Try adjusting your filters or search terms." },
36
36
  emptyIcon: { default: "lucide:inbox" },
37
37
  showPagination: { type: Boolean, default: !0 },
38
+ paginationPosition: {},
38
39
  pageInfo: {},
39
40
  itemsPerPage: { default: 10 },
40
41
  itemsPerPageOptions: { default: () => [10, 25, 50, 100] },
@@ -50,7 +51,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
50
51
  },
51
52
  emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
52
53
  setup(a, { emit: U }) {
53
- const O = (e, t) => t.split(".").reduce((s, c) => s?.[c], e), u = (e, t) => O(e, t), l = a, w = U, i = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), P = g(!1), v = g("initial"), L = b(() => l.loading && (v.value === "initial" || v.value === "page"));
54
+ const O = (e, t) => t.split(".").reduce((s, c) => s?.[c], e), u = (e, t) => O(e, t), l = a, w = U, d = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), P = g(!1), v = g("initial"), L = b(() => l.loading && (v.value === "initial" || v.value === "page"));
54
55
  p(
55
56
  () => l.loading,
56
57
  (e, t) => {
@@ -110,7 +111,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
110
111
  };
111
112
  w("select", c), w("update:selectedRows", s);
112
113
  }, H = (e) => {
113
- i.value.field === e ? i.value.order === "asc" ? i.value.order = "desc" : i.value.order === "desc" ? (i.value.order = "", i.value.field = "") : i.value.order = "asc" : (i.value.field = e, i.value.order = "asc"), h.value = 1, v.value = "sort", x();
114
+ 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"), h.value = 1, v.value = "sort", x();
114
115
  }, J = (e) => {
115
116
  h.value = e, v.value = "page", x();
116
117
  }, K = (e) => {
@@ -126,7 +127,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
126
127
  page: h.value,
127
128
  limit: k.value
128
129
  },
129
- sorting: { ...i.value },
130
+ sorting: { ...d.value },
130
131
  search: y.value
131
132
  });
132
133
  }, Y = b(() => [
@@ -144,7 +145,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
144
145
  }
145
146
  ), te(() => {
146
147
  x();
147
- }), (e, t) => (r(), d("div", fe, [
148
+ }), (e, t) => (n(), i("div", fe, [
148
149
  C(me, {
149
150
  modelValue: y.value,
150
151
  "onUpdate:modelValue": t[1] || (t[1] = (s) => y.value = s),
@@ -161,7 +162,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
161
162
  e.$slots?.["toolbar-right"] || o.value.size > 0 ? {
162
163
  name: "right",
163
164
  fn: T(() => [
164
- o.value.size > 0 ? (r(), D(ne, {
165
+ o.value.size > 0 ? (n(), D(re, {
165
166
  key: 0,
166
167
  rounded: "full",
167
168
  variant: "ghost",
@@ -174,23 +175,23 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
174
175
  key: "1"
175
176
  } : void 0
176
177
  ]), 1032, ["modelValue", "show-search", "placeholder"]),
177
- n("div", {
178
+ r("div", {
178
179
  class: B(Y.value)
179
180
  }, [
180
- n("div", he, [
181
- n("table", {
181
+ r("div", he, [
182
+ r("table", {
182
183
  class: B([Z.value, ""])
183
184
  }, [
184
- n("thead", {
185
+ r("thead", {
185
186
  class: B([
186
187
  "[&_tr]:border-b [&_tr]:border-border/70! bg-muted",
187
188
  a.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
188
189
  ])
189
190
  }, [
190
- n("tr", ve, [
191
- a.selectable ? (r(), d("th", ge, [
192
- n("div", pe, [
193
- C(re, {
191
+ r("tr", ve, [
192
+ a.selectable ? (n(), i("th", ge, [
193
+ r("div", pe, [
194
+ C(ne, {
194
195
  "model-value": z.value,
195
196
  indeterminate: E.value,
196
197
  size: "xs",
@@ -198,10 +199,10 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
198
199
  }, null, 8, ["model-value", "indeterminate"])
199
200
  ])
200
201
  ])) : I("", !0),
201
- (r(!0), d(R, null, $(a.headers, (s) => (r(), D(ue, {
202
+ (n(!0), i(R, null, $(a.headers, (s) => (n(), D(ue, {
202
203
  key: s.field,
203
204
  header: s,
204
- "sort-config": i.value,
205
+ "sort-config": d.value,
205
206
  compact: a.compact,
206
207
  "table-sortable": a.sortable,
207
208
  onSort: H,
@@ -212,28 +213,28 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
212
213
  }, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
213
214
  ])
214
215
  ], 2),
215
- n("tbody", we, [
216
- L.value ? (r(!0), d(R, { key: 0 }, $(Math.min(k.value, 15), (s) => (r(), d("tr", {
216
+ r("tbody", we, [
217
+ L.value ? (n(!0), i(R, { key: 0 }, $(Math.min(k.value, 15), (s) => (n(), i("tr", {
217
218
  key: "skeleton-" + s,
218
219
  class: "border-b border-border/50 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
219
220
  }, [
220
- a.selectable ? (r(), d("td", ye, [...t[4] || (t[4] = [
221
- n("div", { class: "flex items-center justify-center" }, [
222
- n("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
221
+ a.selectable ? (n(), i("td", ye, [...t[4] || (t[4] = [
222
+ r("div", { class: "flex items-center justify-center" }, [
223
+ r("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
223
224
  ], -1)
224
225
  ])])) : I("", !0),
225
- (r(!0), d(R, null, $(a.headers, (c) => (r(), d("td", {
226
+ (n(!0), i(R, null, $(a.headers, (c) => (n(), i("td", {
226
227
  key: c.field,
227
228
  class: B(["p-5! align-middle last:pr-6!", [c.hideOnMobile ? "hidden md:table-cell" : ""]])
228
229
  }, [
229
- n("div", {
230
+ r("div", {
230
231
  class: "rounded-md bg-muted/50 animate-pulse h-4 w-full",
231
232
  style: A({
232
233
  width: `${50 + Math.random() * 40}%`
233
234
  })
234
235
  }, null, 4)
235
236
  ], 2))), 128))
236
- ]))), 128)) : a.rows.length > 0 ? (r(!0), d(R, { key: 1 }, $(a.rows, (s, c) => (r(), D(ce, {
237
+ ]))), 128)) : a.rows.length > 0 ? (n(!0), i(R, { key: 1 }, $(a.rows, (s, c) => (n(), D(ce, {
237
238
  key: j(s),
238
239
  row: s,
239
240
  headers: a.headers,
@@ -254,25 +255,25 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
254
255
  S(e.$slots, m.field, le({ ref_for: !0 }, f), void 0, !0)
255
256
  ])
256
257
  }))
257
- ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (r(), d("tr", be, [
258
- n("td", {
258
+ ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (n(), i("tr", be, [
259
+ r("td", {
259
260
  colspan: a.selectable ? a.headers.length + 1 : a.headers.length,
260
261
  class: "h-96 text-center align-middle hover:bg-transparent"
261
262
  }, [
262
- n("div", Pe, [
263
- n("div", xe, [
263
+ r("div", Pe, [
264
+ r("div", xe, [
264
265
  C(oe, {
265
266
  icon: a.emptyIcon,
266
267
  class: "h-6 w-6 text-muted-foreground/80"
267
268
  }, null, 8, ["icon"])
268
269
  ]),
269
- n("h3", Ce, M(a.emptyTitle), 1),
270
- n("p", Se, [
270
+ r("h3", Ce, M(a.emptyTitle), 1),
271
+ r("p", Se, [
271
272
  S(e.$slots, "empty-description", {}, () => [
272
273
  ae(M(a.emptyDescription), 1)
273
274
  ], !0)
274
275
  ]),
275
- e.$slots["empty-action"] ? (r(), d("div", Ie, [
276
+ e.$slots["empty-action"] ? (n(), i("div", Ie, [
276
277
  S(e.$slots, "empty-action", {}, void 0, !0)
277
278
  ])) : I("", !0)
278
279
  ])
@@ -282,8 +283,8 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
282
283
  ], 2)
283
284
  ])
284
285
  ], 2),
285
- a.showPagination && a.pageInfo && a.pageInfo.totalItems > 0 ? (r(), d("div", $e, [
286
- C(se(ie), {
286
+ a.showPagination && a.pageInfo && a.pageInfo.totalItems > 0 ? (n(), i("div", $e, [
287
+ C(se(de), {
287
288
  "current-page": h.value,
288
289
  "total-pages": a.pageInfo.totalPages,
289
290
  "show-page-info": !1,
@@ -291,11 +292,12 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
291
292
  "items-per-page": k.value,
292
293
  "items-per-page-options": a.itemsPerPageOptions,
293
294
  "nav-type": "icon",
295
+ alignment: l.paginationPosition,
294
296
  onChange: J,
295
297
  "onUpdate:itemsPerPage": K
296
- }, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options"])
298
+ }, null, 8, ["current-page", "total-pages", "show-items-per-page", "items-per-page", "items-per-page-options", "alignment"])
297
299
  ])) : I("", !0),
298
- C(de, {
300
+ C(ie, {
299
301
  show: P.value,
300
302
  "onUpdate:show": t[2] || (t[2] = (s) => P.value = s),
301
303
  title: "Confirm Deletion",
@@ -54,6 +54,7 @@ export interface DataTableProps {
54
54
  emptyDescription?: string;
55
55
  emptyIcon?: string;
56
56
  showPagination?: boolean;
57
+ paginationPosition?: 'start' | 'center' | 'end' | 'between';
57
58
  pageInfo?: PageInfo;
58
59
  itemsPerPage?: number;
59
60
  itemsPerPageOptions?: number[];
@@ -6,23 +6,31 @@ type __VLS_Props = {
6
6
  value?: any;
7
7
  mode: DatePickerMode;
8
8
  minDate?: string;
9
+ maxDate?: string;
10
+ disabledDates?: {
11
+ start: string;
12
+ end?: string;
13
+ }[];
9
14
  icon?: string;
10
15
  size?: ButtonSize;
11
16
  variant?: ButtonVariant;
12
17
  btnProps?: any;
13
18
  teleport?: boolean;
14
19
  minuteInterval?: number;
20
+ timeFormat?: '12h' | '24h';
21
+ disabled?: boolean;
22
+ readonly?: boolean;
15
23
  };
16
24
  declare function __VLS_template(): {
17
25
  attrs: Partial<{}>;
18
26
  slots: {
19
27
  default?(_: {
20
28
  value: any;
21
- displayValue: string;
29
+ displayValue: any;
22
30
  }): any;
23
31
  };
24
32
  refs: {};
25
- rootEl: HTMLDivElement;
33
+ rootEl: any;
26
34
  };
27
35
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
36
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -34,7 +42,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
34
42
  }>, {
35
43
  teleport: boolean;
36
44
  minuteInterval: number;
37
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
45
+ timeFormat: "12h" | "24h";
46
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
47
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
48
  export default _default;
40
49
  type __VLS_WithTemplateSlots<T, S> = T & {