vlite3 1.5.12 → 1.5.13

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 (127) hide show
  1. package/README.md +20 -8
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
  4. package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
  5. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  6. package/components/Form/AccordionView2.vue.js +1 -1
  7. package/components/Form/Form.vue.js +2 -2
  8. package/components/NavbarCommandPalette.vue.js +1 -1
  9. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +7 -7
  10. package/components/PanZoomViewport/PanZoomViewport.vue.js +1 -1
  11. package/components/Tabes/Tabes.vue.js +2 -2
  12. package/docs/README.md +17 -0
  13. package/docs/all-components.md +89 -0
  14. package/docs/component-index.md +313 -0
  15. package/docs/components/accordion.md +52 -0
  16. package/docs/components/alert.md +34 -0
  17. package/docs/components/app-shell.md +371 -0
  18. package/docs/components/async-select.md +264 -0
  19. package/docs/components/attachments-list.md +231 -0
  20. package/docs/components/avatar-group.md +74 -0
  21. package/docs/components/avatar-uploader.md +61 -0
  22. package/docs/components/avatar.md +28 -0
  23. package/docs/components/badge.md +81 -0
  24. package/docs/components/barcode.md +42 -0
  25. package/docs/components/beacon.md +29 -0
  26. package/docs/components/breadcrumb.md +317 -0
  27. package/docs/components/button-group.md +35 -0
  28. package/docs/components/button.md +86 -0
  29. package/docs/components/calendar.md +95 -0
  30. package/docs/components/carousel.md +122 -0
  31. package/docs/components/cart.md +533 -0
  32. package/docs/components/category-manager.md +269 -0
  33. package/docs/components/category-menu.md +251 -0
  34. package/docs/components/charts.md +1456 -0
  35. package/docs/components/chat.md +330 -0
  36. package/docs/components/checkbox.md +31 -0
  37. package/docs/components/chip.md +137 -0
  38. package/docs/components/choice-box.md +40 -0
  39. package/docs/components/clipboard.md +105 -0
  40. package/docs/components/clock.md +70 -0
  41. package/docs/components/color-picker.md +82 -0
  42. package/docs/components/command-palette.md +214 -0
  43. package/docs/components/comment-thread.md +171 -0
  44. package/docs/components/confirmation-modal.md +50 -0
  45. package/docs/components/custom-fields-display.md +94 -0
  46. package/docs/components/custom-fields.md +97 -0
  47. package/docs/components/data-list.md +93 -0
  48. package/docs/components/data-table.md +922 -0
  49. package/docs/components/date-picker.md +58 -0
  50. package/docs/components/date-range-picker.md +24 -0
  51. package/docs/components/date-time.md +104 -0
  52. package/docs/components/dropdown.md +740 -0
  53. package/docs/components/empty.md +100 -0
  54. package/docs/components/export-data.md +320 -0
  55. package/docs/components/file-picker.md +83 -0
  56. package/docs/components/file-preview.md +42 -0
  57. package/docs/components/file-tree.md +144 -0
  58. package/docs/components/footer.md +251 -0
  59. package/docs/components/forms.md +776 -0
  60. package/docs/components/gantt-chart.md +767 -0
  61. package/docs/components/google-login.md +67 -0
  62. package/docs/components/google-map.md +128 -0
  63. package/docs/components/heatmap.md +80 -0
  64. package/docs/components/icon-picker.md +58 -0
  65. package/docs/components/icon.md +176 -0
  66. package/docs/components/image-comparison.md +51 -0
  67. package/docs/components/image-magnifier.md +26 -0
  68. package/docs/components/import-data.md +521 -0
  69. package/docs/components/input.md +58 -0
  70. package/docs/components/invoice.md +339 -0
  71. package/docs/components/kanban.md +302 -0
  72. package/docs/components/label.md +25 -0
  73. package/docs/components/list.md +419 -0
  74. package/docs/components/masonry.md +55 -0
  75. package/docs/components/modal.md +133 -0
  76. package/docs/components/multi-select.md +54 -0
  77. package/docs/components/navbar.md +403 -0
  78. package/docs/components/number-input.md +41 -0
  79. package/docs/components/otp-input.md +68 -0
  80. package/docs/components/pagination.md +83 -0
  81. package/docs/components/pan-zoom-viewport.md +245 -0
  82. package/docs/components/permission-editor.md +322 -0
  83. package/docs/components/persona.md +56 -0
  84. package/docs/components/price.md +106 -0
  85. package/docs/components/pricing-plan.md +68 -0
  86. package/docs/components/progress-bar.md +53 -0
  87. package/docs/components/qr-code.md +59 -0
  88. package/docs/components/rating.md +59 -0
  89. package/docs/components/rich-text-editor.md +210 -0
  90. package/docs/components/scale-generator.md +101 -0
  91. package/docs/components/screen.md +208 -0
  92. package/docs/components/seo-provider.md +189 -0
  93. package/docs/components/side-panel.md +94 -0
  94. package/docs/components/sidebar-menu.md +422 -0
  95. package/docs/components/skeleton.md +115 -0
  96. package/docs/components/slider.md +48 -0
  97. package/docs/components/spinner.md +27 -0
  98. package/docs/components/splitter.md +97 -0
  99. package/docs/components/stats.md +234 -0
  100. package/docs/components/status-chip.md +232 -0
  101. package/docs/components/switch.md +23 -0
  102. package/docs/components/tabs.md +335 -0
  103. package/docs/components/tag-input.md +55 -0
  104. package/docs/components/textarea.md +31 -0
  105. package/docs/components/theme-provider.md +130 -0
  106. package/docs/components/theme-toggle.md +36 -0
  107. package/docs/components/thumbnail-selector.md +186 -0
  108. package/docs/components/timeline.md +225 -0
  109. package/docs/components/toast-notification.md +89 -0
  110. package/docs/components/tooltip.md +31 -0
  111. package/docs/components/workbook.md +102 -0
  112. package/docs/composables/use-theme.md +59 -0
  113. package/docs/getting-started/setup.md +176 -0
  114. package/docs/guides/draggable.md +211 -0
  115. package/docs/guides/internationalization.md +281 -0
  116. package/docs/guides/performance.md +118 -0
  117. package/docs/guides/testing-forms.md +154 -0
  118. package/docs/guides/testing-overlays.md +131 -0
  119. package/docs/guides/theming.md +124 -0
  120. package/docs/utilities/search.md +580 -0
  121. package/docs/utilities/utilities.md +371 -0
  122. package/docs-manifest.json +339 -0
  123. package/package.json +5 -13
  124. package/scripts/generate-docs-manifest.js +207 -0
  125. package/scripts/sync-docs.js +754 -0
  126. package/style.css +1 -1
  127. /package/components/Dropdown/{DropdownMenu2.vue.js → DropdownMenu3.vue.js} +0 -0
@@ -0,0 +1,58 @@
1
+ # DatePicker
2
+
3
+ **Import:** `import { DatePicker } from 'vlite3'`
4
+
5
+ ### Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ | :---------------- | :----------------------------------------------------- | :---------------- | :------------------------------ |
9
+ | `modelValue` | `any` | — | Binding (`v-model`) |
10
+ | `mode` | `'date' \| 'dateTime' \| 'time' \| 'week' \| 'month'` | `date` | Selection mode |
11
+ | `minDate` | `string` | — | Minimum allowed date |
12
+ | `maxDate` | `string` | — | Maximum allowed date |
13
+ | `disabledDates` | `{ start: string, end?: string }[]` | — | Dates to disable |
14
+ | `placeholder` | `string` | — | Input placeholder |
15
+ | `placeholderI18n` | `string` | — | I18n translation key |
16
+ | `icon` | `string` | `lucide:calendar` | Trigger icon |
17
+ | `size` | `ButtonSize` | `md` | Trigger button size |
18
+ | `variant` | `ButtonVariant` | `outline` | Trigger button style |
19
+ | `btnProps` | `any` | — | Extra props for Dropdown button |
20
+ | `teleport` | `boolean` | `true` | Teleport dropdown to body |
21
+ | `minuteInterval` | `number` | `5` | Minute step for time |
22
+ | `timeFormat` | `'12h' \| '24h'` | `'12h'` | Time formatting |
23
+ | `disabled` | `boolean` | `false` | Disable picker |
24
+ | `readonly` | `boolean` | `false` | Readonly mode |
25
+
26
+ ### Return Value by Mode
27
+
28
+ | Mode | `v-model` type | Description |
29
+ | :--------- | :-------------------------------------- | :------------------------------------------------------- |
30
+ | `date` | `Date` | The selected date |
31
+ | `dateTime` | `Date` | The selected date and time |
32
+ | `time` | `string` | The selected time string (e.g. `'14:30'`) |
33
+ | `month` | `Date` | The first day of the selected month |
34
+ | `week` | `{ start: Date, end: Date }` | Both the first and last date of the selected week |
35
+
36
+ ### Week Mode
37
+
38
+ When `mode="week"` is used, the picker returns an object containing both the **start** (Monday/first day) and **end** (Sunday/last day) of the selected week. The trigger button displays the full range (e.g. `Jan 1, 2025 - Jan 7, 2025`).
39
+ ```vue
40
+ <script setup>
41
+ import { ref } from 'vue'
42
+ const weekRange = ref(null)
43
+ </script>
44
+
45
+ <template>
46
+ <DatePicker v-model="weekRange" mode="week" placeholder="Select week" />
47
+ <!-- weekRange => { start: Date, end: Date } -->
48
+ </template>
49
+ ```
50
+
51
+ ### Usage
52
+ ```vue
53
+ <DatePicker v-model="date" mode="dateTime" :min-date="new Date().toISOString()" variant="ghost" />
54
+ ```
55
+
56
+ ### RTL
57
+
58
+ Date modes use `Dropdown` with `direction="auto"`, so under `html[dir=rtl]` the trigger icon and value start on the **inline-start** (right) side and the panel opens from `bottom-end`. Time mode inherits document direction via its trigger button (no Dropdown wrapper).
@@ -0,0 +1,24 @@
1
+ # DateRangePicker
2
+
3
+ **Import:** `import { DateRangePicker } from 'vlite3'`
4
+
5
+ ### Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ | :----------------- | :--------------------------------- | :-------------- | :---------------------------------------------- |
9
+ | `modelValue` | `{ start: any, end: any }` | `{}` | Binding (`v-model`) for the date range |
10
+ | `placeholderStart` | `string` | `'Start Date'` | Input placeholder for start date |
11
+ | `placeholderEnd` | `string` | `'End Date'` | Input placeholder for end date |
12
+ | `minDate` | `string` | — | Minimum allowed date overall |
13
+ | `maxDate` | `string` | — | Maximum allowed date overall |
14
+ | `disabled` | `boolean` | `false` | Disable the entire range picker |
15
+ | `readonly` | `boolean` | `false` | Readonly mode |
16
+ | `size` | `ButtonSize` | `md` | Trigger button size |
17
+ | `variant` | `ButtonVariant` | `outline` | Trigger button style |
18
+ | `showQuickRanges` | `boolean` | `true` | Toggle the quick selection dropdown visibility |
19
+
20
+ ### Usage
21
+
22
+ ```vue
23
+ <DateRangePicker v-model="dateRange" />
24
+ ```
@@ -0,0 +1,104 @@
1
+ # DateTime
2
+
3
+ **Import:** `import { DateTime } from 'vlite3'`
4
+
5
+ A reactive utility component to consistently format date and time values. Powered by `dayjs` under the hood, ensuring it is lightweight, beautiful, and fully accurate.
6
+
7
+ The component inherits its formatting rules from the global `vlite3` configuration, but can be overridden locally on a per-component basis. It also intelligently parses bare time strings (e.g., `"09:00"`, `"17:00"`) and formats them nicely.
8
+
9
+ ---
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ | :------- | :------------------------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------- |
15
+ | `value` | `string \| number \| Date` | — | The date or time value to format. Supports ISO strings, UNIX timestamps, native `Date` objects, and time strings (e.g., `'14:30'`). |
16
+ | `format` | `string` | — | Local override for the output format string (e.g., `'MM/DD/YYYY'`, `'YYYY-MM-DD'`, `'h:mm A'`). |
17
+
18
+ ---
19
+
20
+ ## Usage
21
+
22
+ ### Basic Local Usage
23
+
24
+ Pass any valid date object, string, or timestamp. By default, it will use `'MM/DD/YYYY'` unless globally configured otherwise.
25
+
26
+ ```vue
27
+ <script setup lang="ts">
28
+ import { DateTime } from 'vlite3'
29
+ </script>
30
+
31
+ <template>
32
+ <DateTime :value="'2026-03-12T05:07:48.000Z'" />
33
+ <DateTime :value="1710214068000" format="YYYY-MMM-DD" />
34
+ </template>
35
+ ```
36
+
37
+ ### Time String Formatting
38
+
39
+ The component automatically handles raw time strings and formats them. By default, time strings use the `'h:mm A'` format (e.g., `"17:00"` -> `"5:00 PM"`).
40
+
41
+ ```vue
42
+ <template>
43
+ <DateTime :value="'09:00'" />
44
+ <DateTime :value="'17:00'" />
45
+ <DateTime :value="'17:00'" format="HH:mm" />
46
+ </template>
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Global Configuration
52
+
53
+ You can set a default date format for your entire application during plugin initialization.
54
+
55
+ ```ts
56
+ // main.ts
57
+ import { createApp } from 'vue'
58
+ import { createVLite } from 'vlite3'
59
+ import App from './App.vue'
60
+
61
+ const app = createApp(App)
62
+
63
+ const vlite = createVLite({
64
+ components: {
65
+ datetime: {
66
+ format: 'DD/MM/YYYY', // Set default format to European standard
67
+ },
68
+ },
69
+ })
70
+
71
+ app.use(vlite)
72
+ app.mount('#app')
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Dynamic Global Updates (Change From Anywhere)
78
+
79
+ If your application allows users to switch their preferred region/locale formats on the fly, you can dynamically update the global configuration using the `updateConfig` utility.
80
+
81
+ This will automatically trigger an instant re-render across your application, ensuring `<DateTime />` components, `List` grids, and `DataTable` columns update without refreshing the page.
82
+
83
+ ```vue
84
+ <script setup lang="ts">
85
+ import { updateConfig } from 'vlite3'
86
+
87
+ const switchFormat = (newFormat: string) => {
88
+ updateConfig({
89
+ components: {
90
+ datetime: {
91
+ format: newFormat,
92
+ },
93
+ },
94
+ })
95
+ }
96
+ </script>
97
+
98
+ <template>
99
+ <div class="flex gap-2">
100
+ <button @click="switchFormat('MM/DD/YYYY')">US format</button>
101
+ <button @click="switchFormat('DD/MM/YYYY')">EU format</button>
102
+ </div>
103
+ </template>
104
+ ```