@appsbd/vue3-appsbd-ui 1.0.3 → 1.0.5

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 (100) hide show
  1. package/.ai/ai_ref_AbAvatar.md +41 -51
  2. package/.ai/ai_ref_AbBadge.md +36 -45
  3. package/.ai/ai_ref_AbButton.md +52 -70
  4. package/.ai/ai_ref_AbCard.md +51 -70
  5. package/.ai/ai_ref_AbCarousel.md +36 -47
  6. package/.ai/ai_ref_AbChart.md +46 -87
  7. package/.ai/ai_ref_AbColorPicker.md +42 -55
  8. package/.ai/ai_ref_AbConfirmPopover.md +54 -59
  9. package/.ai/ai_ref_AbCustomField.md +66 -74
  10. package/.ai/ai_ref_AbDarkModeToggler.md +33 -42
  11. package/.ai/ai_ref_AbDateTimePicker.md +74 -108
  12. package/.ai/ai_ref_AbEasyModal.md +56 -62
  13. package/.ai/ai_ref_AbField.md +88 -96
  14. package/.ai/ai_ref_AbFileUploader.md +47 -63
  15. package/.ai/ai_ref_AbFilterPanel.md +67 -71
  16. package/.ai/ai_ref_AbFormCheck.md +58 -75
  17. package/.ai/ai_ref_AbImageRadioInput.md +55 -63
  18. package/.ai/ai_ref_AbInputField.md +66 -74
  19. package/.ai/ai_ref_AbInputTag.md +56 -76
  20. package/.ai/ai_ref_AbKbd.md +23 -35
  21. package/.ai/ai_ref_AbKbdGroup.md +21 -33
  22. package/.ai/ai_ref_AbMainLayout.md +106 -0
  23. package/.ai/ai_ref_AbModal.md +98 -103
  24. package/.ai/ai_ref_AbMultiSelect.md +78 -112
  25. package/.ai/ai_ref_AbNumberField.md +59 -84
  26. package/.ai/ai_ref_AbPinInput.md +33 -45
  27. package/.ai/ai_ref_AbPopover.md +54 -64
  28. package/.ai/ai_ref_AbPricingCard.md +56 -64
  29. package/.ai/ai_ref_AbPricingContainer.md +41 -49
  30. package/.ai/ai_ref_AbPricingTable.md +56 -72
  31. package/.ai/ai_ref_AbProgressbar.md +34 -44
  32. package/.ai/ai_ref_AbScrollbar.md +38 -48
  33. package/.ai/ai_ref_AbSettingsForm.md +46 -54
  34. package/.ai/ai_ref_AbSideMenuItem.md +47 -58
  35. package/.ai/ai_ref_AbSidebar.md +62 -70
  36. package/.ai/ai_ref_AbSkeleton.md +23 -41
  37. package/.ai/ai_ref_AbSlider.md +52 -71
  38. package/.ai/ai_ref_AbTab.md +30 -38
  39. package/.ai/ai_ref_AbTable.md +49 -59
  40. package/.ai/ai_ref_AbTabs.md +37 -47
  41. package/.ai/ai_ref_AbToggle.md +46 -65
  42. package/.ai/ai_ref_AbTooltip.md +39 -53
  43. package/.ai/ai_ref_AbWizard.md +64 -77
  44. package/.ai/ai_ref_AbWizardStep.md +36 -48
  45. package/.ai/ai_ref_abEventBus.md +9 -37
  46. package/.ai/ai_ref_abRequestParam.md +2 -17
  47. package/.ai/ai_ref_abTranslate.md +30 -15
  48. package/.ai/ai_ref_abVeeRules.md +2 -11
  49. package/.ai/ai_ref_global_config.md +57 -66
  50. package/.ai/ai_ref_useAlert.md +7 -20
  51. package/.ai/ai_ref_useFileValidator.md +3 -18
  52. package/.ai/ai_ref_useResponsive.md +6 -20
  53. package/.ai/ai_ref_useTheme.md +4 -15
  54. package/.ai/ai_ref_useToast.md +5 -17
  55. package/AI_REF.md +114 -0
  56. package/AI_REFERENCE.md +87 -1157
  57. package/design-system.md +403 -403
  58. package/dist/skins/black.css +1 -1
  59. package/dist/skins/black.scss +3 -3
  60. package/dist/skins/cyan.css +1 -1
  61. package/dist/skins/cyan.scss +3 -3
  62. package/dist/skins/default.css +1 -1
  63. package/dist/skins/default.scss +5 -5
  64. package/dist/skins/gray.css +1 -1
  65. package/dist/skins/gray.scss +3 -3
  66. package/dist/skins/green.css +1 -1
  67. package/dist/skins/green.scss +5 -5
  68. package/dist/skins/orange.css +1 -1
  69. package/dist/skins/orange.scss +3 -3
  70. package/dist/skins/pink.css +1 -1
  71. package/dist/skins/pink.scss +3 -3
  72. package/dist/skins/purple.css +1 -1
  73. package/dist/skins/purple.scss +3 -3
  74. package/dist/skins/red.css +1 -1
  75. package/dist/skins/red.scss +3 -3
  76. package/dist/skins/themes/_black.scss +18 -6
  77. package/dist/skins/themes/_blue.scss +18 -43
  78. package/dist/skins/themes/_common_variable.scss +695 -590
  79. package/dist/skins/themes/_cyan.scss +18 -6
  80. package/dist/skins/themes/_gray.scss +18 -6
  81. package/dist/skins/themes/_green.scss +18 -6
  82. package/dist/skins/themes/_grid.scss +32 -27
  83. package/dist/skins/themes/_orange.scss +18 -6
  84. package/dist/skins/themes/_pink.scss +18 -6
  85. package/dist/skins/themes/_purple.scss +18 -6
  86. package/dist/skins/themes/_red.scss +18 -6
  87. package/dist/skins/themes/_violet.scss +18 -6
  88. package/dist/skins/violet.css +1 -1
  89. package/dist/skins/violet.scss +3 -3
  90. package/dist/style.css +1 -1
  91. package/dist/vue3-appsbd-ui.cjs.js +145 -125
  92. package/dist/vue3-appsbd-ui.es.js +27822 -16778
  93. package/package.json +72 -66
  94. package/readme.md +194 -136
  95. package/scripts/postinstall.js +55 -0
  96. package/scripts/setup.js +16 -0
  97. package/scripts/skill-groups.js +38 -0
  98. package/skills/commands/generate-module.md +76 -0
  99. package/skills/commands/settings-form.md +175 -0
  100. package/skills/commands/use-appsbd-ui.md +40 -0
@@ -1,55 +1,42 @@
1
- # AbColorPicker — AI Reference
2
-
3
- Radio-style color swatch picker. Takes a list of named colors and lets users pick one.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-color-picker
14
- v-model="themeColor"
15
- name="theme"
16
- :colors="[
17
- { name: 'blue', color: '#2563eb', title: 'Blue' },
18
- { name: 'green', color: '#16a34a', title: 'Green' },
19
- { name: 'rose', color: '#e11d48', title: 'Rose' },
20
- ]"
21
- align="left"
22
- border-radius="50%"
23
- />
24
- </template>
25
-
26
- <script setup>
27
- import { ref } from 'vue';
28
- const themeColor = ref('blue');
29
- </script>
30
- ```
31
-
32
- ## Props
33
-
34
- | Name | Type | Default | Description |
35
- | --- | --- | --- | --- |
36
- | `modelValue` | `String` | `""` | Selected color `name` (v-model). |
37
- | `name` | `String` | `"color"` | Radio group name. |
38
- | `colors` | `Array` | `[]` | Each: `{ name, color, title? }`. |
39
- | `align` | `String` | `"left"` | Flex alignment (`left`, `center`, `right`, …). |
40
- | `borderRadius` | `String` | `"50%"` | Swatch border-radius. |
41
- | `size` | `String` | `"md"` | Item size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
42
-
43
- ## Events
44
-
45
- | Event | Payload | Description |
46
- | --- | --- | --- |
47
- | `update:modelValue` | `colorName` | v-model sync. |
48
-
49
- ## Slots
50
-
51
- None.
52
-
53
- ## v-model
54
-
55
- Yes (emits the color `name`, not the hex value).
1
+ # AbColorPicker — AI Reference
2
+
3
+ Radio-style color swatch picker. Takes a list of named colors and lets users pick one.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <ab-color-picker
10
+ v-model="themeColor"
11
+ name="theme"
12
+ :colors="[
13
+ { name: 'blue', color: '#2563eb', title: 'Blue' },
14
+ { name: 'green', color: '#16a34a', title: 'Green' },
15
+ ]"
16
+ align="left"
17
+ border-radius="50%"
18
+ />
19
+ </template>
20
+
21
+ <script setup>
22
+ import { ref } from 'vue';
23
+ const themeColor = ref('blue');
24
+ </script>
25
+ ```
26
+
27
+ ## Props
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | `modelValue` | `String` | `""` | Selected color `name` (v-model). |
32
+ | `name` | `String` | `"color"` | Radio group name. |
33
+ | `colors` | `Array` | `[]` | Each: `{ name, color, title? }`. |
34
+ | `align` | `String` | `"left"` | Flex alignment (`left`, `center`, `right`, …). |
35
+ | `borderRadius` | `String` | `"50%"` | Swatch border-radius. |
36
+ | `size` | `String` | `"md"` | Item size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
37
+
38
+ ## Events
39
+
40
+ | Event | Payload | Description |
41
+ | --- | --- | --- |
42
+ | `update:modelValue` | `colorName` | v-model sync — emits the color `name`, not the hex value. |
@@ -1,59 +1,54 @@
1
- # AbConfirmPopover — AI Reference
2
-
3
- Confirmation popover with an async `onConfirm` handler and a built-in loader. Useful for destructive actions (delete, archive) that need an inline confirmation without opening a modal.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <!-- Recommended: async onConfirm handles loader automatically -->
14
- <ab-confirm-popover
15
- msg="Delete this record?"
16
- icon="warning"
17
- :on-confirm="handleDelete"
18
- :item-data="record"
19
- confirm-text="Delete"
20
- cancel-text="Keep"
21
- >
22
- <ab-button class="btn-danger"><i class="bi bi-trash"></i></ab-button>
23
- </ab-confirm-popover>
24
- </template>
25
-
26
- <script setup>
27
- async function handleDelete(record) {
28
- await api.delete(record.id);
29
- // loader and popover close handled by the component
30
- }
31
- </script>
32
- ```
33
-
34
- ## Props
35
-
36
- | Name | Type | Default | Description |
37
- | --- | --- | --- | --- |
38
- | `msg` | `String` | `"Are you sure?"` | Confirmation message. |
39
- | `title` | `String` | `""` | Optional title above the message. |
40
- | `confirmText` | `String` | `"Yes"` | Confirm button label. |
41
- | `cancelText` | `String` | `"No"` | Cancel button label. |
42
- | `icon` | `String` | `"question"` | `success`, `error`, `warning`, `info`, `question`. |
43
- | `type` | `String` | `"confirm"` | `confirm`, `confirm-ajax`, or `alert`. |
44
- | `onConfirm` | `Function` | `null` | Async handler `(itemData) => Promise`. Preferred over `onConfirmed` event. |
45
- | `itemData` | `Object \| String \| Number \| Array` | `null` | Payload passed to `onConfirm`. |
46
-
47
- ## Events
48
-
49
- | Event | Payload | Description |
50
- | --- | --- | --- |
51
- | `onConfirmed` | `{ showLoader(status), itemData, closePopover }` | Legacy callback — used only when no `onConfirm` prop is provided. Call `showLoader(true)` to start the loader, then `closePopover()` when done. |
52
-
53
- ## Slots
54
-
55
- | Name | Scope | Description |
56
- | --- | --- | --- |
57
- | `default` | — | Trigger element (typically an `AbButton`). |
58
- | `desc` | — | Additional description below the message. |
59
- | `actionButtons` | `{ removeConfirmed, state }` | Custom action buttons — call `removeConfirmed()` to trigger the confirm flow. |
1
+ # AbConfirmPopover — AI Reference
2
+
3
+ Confirmation popover with an async `onConfirm` handler and built-in loader. Useful for destructive actions (delete, archive) that need inline confirmation without a modal.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <ab-confirm-popover
10
+ msg="Delete this record?"
11
+ icon="warning"
12
+ :on-confirm="handleDelete"
13
+ :item-data="record"
14
+ confirm-text="Delete"
15
+ cancel-text="Keep"
16
+ >
17
+ <ab-button class="btn-danger"><i class="bi bi-trash"></i></ab-button>
18
+ </ab-confirm-popover>
19
+ </template>
20
+
21
+ <script setup>
22
+ async function handleDelete(record) {
23
+ await api.delete(record.id);
24
+ // loader and popover close handled by the component
25
+ }
26
+ </script>
27
+ ```
28
+
29
+ ## Props
30
+
31
+ | Name | Type | Default | Description |
32
+ | --- | --- | --- | --- |
33
+ | `msg` | `String` | `"Are you sure?"` | Confirmation message. |
34
+ | `title` | `String` | `""` | Optional title above the message. |
35
+ | `confirmText` | `String` | `"Yes"` | Confirm button label. |
36
+ | `cancelText` | `String` | `"No"` | Cancel button label. |
37
+ | `icon` | `String` | `"question"` | `success`, `error`, `warning`, `info`, `question`. |
38
+ | `type` | `String` | `"confirm"` | `confirm`, `confirm-ajax`, or `alert`. |
39
+ | `onConfirm` | `Function` | `null` | Async handler `(itemData) => Promise`. Preferred over `onConfirmed` event. |
40
+ | `itemData` | `Object \| String \| Number \| Array` | `null` | Payload passed to `onConfirm`. |
41
+
42
+ ## Events
43
+
44
+ | Event | Payload | Description |
45
+ | --- | --- | --- |
46
+ | `onConfirmed` | `{ showLoader(status), itemData, closePopover }` | Legacy callback — used only when no `onConfirm` prop is provided. Call `showLoader(true)` to start the loader, then `closePopover()` when done. |
47
+
48
+ ## Slots
49
+
50
+ | Name | Scope | Description |
51
+ | --- | --- | --- |
52
+ | `default` | — | Trigger element (typically an `AbButton`). |
53
+ | `desc` | — | Additional description below the message. |
54
+ | `actionButtons` | `{ removeConfirmed, state }` | Custom action buttons — call `removeConfirmed()` to trigger the confirm flow. |
@@ -1,74 +1,66 @@
1
- # AbCustomField — AI Reference
2
-
3
- Dynamic form scaffold — takes a `fieldInputs` array describing multiple fields (text, number, date, toggle, dropdown, etc.) and renders them all, binding values to an external `customProps` object.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-custom-field :field-inputs="fields" :custom-props="form" size="sm" />
14
- </template>
15
-
16
- <script setup>
17
- import { reactive } from 'vue';
18
-
19
- const form = reactive({ username: '', age: null, role: 'admin', active: 'Y' });
20
-
21
- const fields = [
22
- { id: 'username', type: 'T', label: 'Username', rules: 'required' },
23
- { id: 'age', type: 'N', label: 'Age' },
24
- { id: 'role', type: 'W', label: 'Role', options: [
25
- { val: 'admin', title: 'Admin' },
26
- { val: 'user', title: 'User' },
27
- ] },
28
- { id: 'active', type: 'S', label: 'Active' },
29
- ];
30
- </script>
31
- ```
32
-
33
- ## Props
34
-
35
- | Name | Type | Default | Description |
36
- | --- | --- | --- | --- |
37
- | `fieldInputs` | `Array` | `[]` | Field definitions (see type table below). |
38
- | `size` | `String` | `"sm"` | Default input size applied to every field. |
39
- | `customProps` | `Object` | `{}` | Reactive object that field values bind into (keyed by each field's `id`). |
40
-
41
- ### Field `type` codes
42
-
43
- | Code | Renders |
44
- | --- | --- |
45
- | `T` | Text input |
46
- | `N` | Number input |
47
- | `U` | URL input |
48
- | `P` | Password input |
49
- | `E` | Textarea |
50
- | `H` | Hidden input |
51
- | `D` | Date picker |
52
- | `DR` | Date range picker |
53
- | `R` | Radio group |
54
- | `W` | Dropdown / select |
55
- | `S` | Switch / toggle |
56
- | `C` | Checkbox |
57
-
58
- ## Events
59
-
60
- None at the component level use VeeValidate on the parent form for submission and validation.
61
-
62
- ## Slots (scoped by field id)
63
-
64
- For each field whose `id` is `xyz`, the following named slots are available:
65
-
66
- | Slot | Description |
67
- | --- | --- |
68
- | `Label{id}` | Custom label for the field. |
69
- | `Hints{id}` | Custom hints/helper text. |
70
- | `Prefix{id}` | Custom prefix. |
71
- | `Postfix{id}` | Custom postfix. |
72
- | `Icon{id}` | Custom icon (date picker). |
73
- | `Description{id}` | Custom description. |
74
- | `HelpText{id}` | Custom help text. |
1
+ # AbCustomField — AI Reference
2
+
3
+ Dynamic form scaffold — takes a `fieldInputs` array describing multiple fields and renders them all, binding values to an external `customProps` object.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <ab-custom-field :field-inputs="fields" :custom-props="form" size="sm" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { reactive } from 'vue';
14
+
15
+ const form = reactive({ username: '', age: null, role: 'admin', active: 'Y' });
16
+
17
+ const fields = [
18
+ { id: 'username', type: 'T', label: 'Username', rules: 'required' },
19
+ { id: 'age', type: 'N', label: 'Age' },
20
+ { id: 'role', type: 'W', label: 'Role', options: [
21
+ { val: 'admin', title: 'Admin' },
22
+ { val: 'user', title: 'User' },
23
+ ] },
24
+ { id: 'active', type: 'S', label: 'Active' },
25
+ ];
26
+ </script>
27
+ ```
28
+
29
+ ## Props
30
+
31
+ | Name | Type | Default | Description |
32
+ | --- | --- | --- | --- |
33
+ | `fieldInputs` | `Array` | `[]` | Field definitions (see type table below). |
34
+ | `size` | `String` | `"sm"` | Default input size applied to every field. |
35
+ | `customProps` | `Object` | `{}` | Reactive object that field values bind into (keyed by each field's `id`). |
36
+
37
+ ### Field `type` codes
38
+
39
+ | Code | Renders |
40
+ | --- | --- |
41
+ | `T` | Text input |
42
+ | `N` | Number input |
43
+ | `U` | URL input |
44
+ | `P` | Password input |
45
+ | `E` | Textarea |
46
+ | `H` | Hidden input |
47
+ | `D` | Date picker |
48
+ | `DR` | Date range picker |
49
+ | `R` | Radio group |
50
+ | `W` | Dropdown / select |
51
+ | `S` | Switch / toggle |
52
+ | `C` | Checkbox |
53
+
54
+ ## Slots (scoped by field id)
55
+
56
+ For each field whose `id` is `xyz`, the following named slots are available:
57
+
58
+ | Slot | Description |
59
+ | --- | --- |
60
+ | `Label{id}` | Custom label for the field. |
61
+ | `Hints{id}` | Custom hints/helper text. |
62
+ | `Prefix{id}` | Custom prefix. |
63
+ | `Postfix{id}` | Custom postfix. |
64
+ | `Icon{id}` | Custom icon (date picker). |
65
+ | `Description{id}` | Custom description. |
66
+ | `HelpText{id}` | Custom help text. |
@@ -1,42 +1,33 @@
1
- # AbDarkModeToggler — AI Reference
2
-
3
- Light / dark theme toggle. Pairs with the `useTheme()` composable — clicking the toggle flips the current theme.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin. Uses the `useTheme` composable internally.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-dark-mode-toggler size="md" />
14
-
15
- <!-- Custom icons -->
16
- <ab-dark-mode-toggler size="lg">
17
- <template #dark-icon><i class="bi bi-sun"></i></template>
18
- <template #light-icon><i class="bi bi-moon-stars"></i></template>
19
- </ab-dark-mode-toggler>
20
- </template>
21
- ```
22
-
23
- ## Props
24
-
25
- | Name | Type | Default | Description |
26
- | --- | --- | --- | --- |
27
- | `size` | `String` | `"md"` | One of: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
28
-
29
- ## Events
30
-
31
- None.
32
-
33
- ## Slots
34
-
35
- | Name | Description |
36
- | --- | --- |
37
- | `dark-icon` | Icon shown when the current theme is dark (typically a sun). |
38
- | `light-icon` | Icon shown when the current theme is light (typically a moon). |
39
-
40
- ## Related
41
-
42
- - `useTheme()` composable exposes `isDarkMode`, `toggleTheme()`, `setTheme()`.
1
+ # AbDarkModeToggler — AI Reference
2
+
3
+ Light/dark theme toggle. Pairs with the `useTheme()` composable — clicking flips the current theme.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <ab-dark-mode-toggler size="md" />
10
+
11
+ <ab-dark-mode-toggler size="lg">
12
+ <template #dark-icon><i class="bi bi-sun"></i></template>
13
+ <template #light-icon><i class="bi bi-moon-stars"></i></template>
14
+ </ab-dark-mode-toggler>
15
+ </template>
16
+ ```
17
+
18
+ ## Props
19
+
20
+ | Name | Type | Default | Description |
21
+ | --- | --- | --- | --- |
22
+ | `size` | `String` | `"md"` | One of: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
23
+
24
+ ## Slots
25
+
26
+ | Name | Description |
27
+ | --- | --- |
28
+ | `dark-icon` | Icon shown when the current theme is dark (typically a sun). |
29
+ | `light-icon` | Icon shown when the current theme is light (typically a moon). |
30
+
31
+ ## Related
32
+
33
+ - `useTheme()` composable exposes `isDarkMode`, `toggleTheme()`, `setTheme()`.
@@ -1,108 +1,74 @@
1
- # AbDateTimePicker — AI Reference
2
-
3
- Advanced date / time / range picker built on `v-calendar`. Supports single-date, date-range, time-only, and datetime modes, with per-locale digit formatters and day/month name overrides.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin. Requires peer dependency `v-calendar`:
8
-
9
- ```js
10
- import 'v-calendar/style.css';
11
- ```
12
-
13
- ## Usage
14
-
15
- ```vue
16
- <template>
17
- <!-- Single date -->
18
- <ab-date-time-picker
19
- v-model="date"
20
- name="startDate"
21
- label="Start date"
22
- data-format="YYYY-MM-DD"
23
- :min-date="new Date()"
24
- />
25
-
26
- <!-- Date range -->
27
- <ab-date-time-picker
28
- v-model="range"
29
- name="period"
30
- label="Reporting period"
31
- is-range
32
- range-separator=" "
33
- />
34
-
35
- <!-- Datetime -->
36
- <ab-date-time-picker
37
- v-model="datetime"
38
- name="meetingAt"
39
- label="Meeting at"
40
- mode="datetime"
41
- is24-hour
42
- :minute-step="15"
43
- />
44
- </template>
45
-
46
- <script setup>
47
- import { ref } from 'vue';
48
- const date = ref(null);
49
- const range = ref({ start: null, end: null });
50
- const datetime = ref(null);
51
- </script>
52
- ```
53
-
54
- ## Props
55
-
56
- | Name | Type | Default | Description |
57
- | --- | --- | --- | --- |
58
- | `modelValue` | `String \| Object` | `null` | Date (or `{ start, end }` for range). |
59
- | `label` | `String` | `""` | Field label. |
60
- | `placeholder` | `String` | `""` | Input placeholder. |
61
- | `name` | `String` | **required** | VeeValidate field name. |
62
- | `rules` | `String \| Object` | `""` | VeeValidate rules. |
63
- | `isRange` | `Boolean` | `false` | Enable date-range mode. |
64
- | `size` | `String` | `"md"` | Adjusts component size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
65
- | `containerClass` | `String` | `"mb-3"` | Wrapper class. |
66
- | `hints` | `String` | `""` | Helper text. |
67
- | `isDisable` | `Boolean` | `false` | Disable the picker. |
68
- | `visibility` | `String` | `"click"` | v-calendar popover trigger. |
69
- | `mask` | `String` | `""` | Input mask. |
70
- | `dataFormat` | `String` | `"YYYY-MM-DD"` | Storage format. |
71
- | `displayFormat` | `String` | `"YYYY-MM-DD"` | Display format. |
72
- | `maxDate` | `Date \| String` | `undefined` | Maximum selectable date. |
73
- | `minDate` | `Date \| String` | `undefined` | Minimum selectable date. |
74
- | `disableDates` | `Array` | `[]` | Accepts `Date`, string, or `{ repeat: { weekdays: [...] } }` entries. |
75
- | `showInInput` | `Boolean` | `true` | Input-style trigger (vs button). |
76
- | `monthNames` | `Array` | `undefined` | Custom full month names. |
77
- | `monthNamesShort` | `Array` | `undefined` | Custom short month names. |
78
- | `dayNames` | `Array` | `undefined` | Custom day names. |
79
- | `formatDigit` | `Function` | `undefined` | Locale digit formatter (e.g. Bengali digits). |
80
- | `rangeSeparator` | `String` | `undefined` | Display separator between range start/end. |
81
- | `mode` | `String` | `"date"` | `date`, `time`, or `datetime`. |
82
- | `is24Hour` | `Boolean` | `undefined` | 24-hour clock. |
83
- | `minuteStep` | `Number` | `1` | Minute increment. |
84
- | `isLeftIconBorder` | `Boolean` | `false` | Border on prefix icon. |
85
- | `isRightIconBorder` | `Boolean` | `false` | Border on suffix icon. |
86
- | `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
87
- | `defaultIconPosition` | `String` | `"right"` | Position of the default calendar/clock icon. |
88
- | `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot. |
89
-
90
- ## Events
91
-
92
- | Event | Payload | Description |
93
- | --- | --- | --- |
94
- | `update:modelValue` | `value` | v-model sync. |
95
-
96
- ## Slots
97
-
98
- | Name | Scope | Description |
99
- | --- | --- | --- |
100
- | `label` | — | Custom label. |
101
- | `prefix` | — | Prefix area. |
102
- | `icon` | — | Calendar / clock icon. |
103
- | `hints` | — | Custom hints. |
104
- | `picker-container` | `{ isRange, showInInput, value }` | Override the entire picker UI. |
105
-
106
- ## v-model
107
-
108
- Yes.
1
+ # AbDateTimePicker — AI Reference
2
+
3
+ Advanced date/time/range picker built on `v-calendar`. Supports single-date, date-range, time-only, and datetime modes, with per-locale digit formatters and day/month name overrides.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <ab-date-time-picker v-model="date" name="startDate" label="Start date" data-format="YYYY-MM-DD" :min-date="new Date()" />
10
+
11
+ <ab-date-time-picker v-model="range" name="period" label="Reporting period" is-range range-separator=" → " />
12
+
13
+ <ab-date-time-picker v-model="datetime" name="meetingAt" label="Meeting at" mode="datetime" is24-hour :minute-step="15" />
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from 'vue';
18
+ const date = ref(null);
19
+ const range = ref({ start: null, end: null });
20
+ const datetime = ref(null);
21
+ </script>
22
+ ```
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Default | Description |
27
+ | --- | --- | --- | --- |
28
+ | `modelValue` | `String \| Object` | `null` | Date (or `{ start, end }` for range). |
29
+ | `label` | `String` | `""` | Field label. |
30
+ | `placeholder` | `String` | `""` | Input placeholder. |
31
+ | `name` | `String` | **required** | VeeValidate field name. |
32
+ | `rules` | `String \| Object` | `""` | VeeValidate rules. |
33
+ | `isRange` | `Boolean` | `false` | Enable date-range mode. |
34
+ | `size` | `String` | `"md"` | Adjusts component size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
35
+ | `containerClass` | `String` | `"mb-3"` | Wrapper class. |
36
+ | `hints` | `String` | `""` | Helper text. |
37
+ | `isDisable` | `Boolean` | `false` | Disable the picker. |
38
+ | `visibility` | `String` | `"click"` | v-calendar popover trigger. |
39
+ | `mask` | `String` | `""` | Input mask. |
40
+ | `dataFormat` | `String` | `"YYYY-MM-DD"` | Storage format. |
41
+ | `displayFormat` | `String` | `"YYYY-MM-DD"` | Display format. |
42
+ | `maxDate` | `Date \| String` | `undefined` | Maximum selectable date. |
43
+ | `minDate` | `Date \| String` | `undefined` | Minimum selectable date. |
44
+ | `disableDates` | `Array` | `[]` | Accepts `Date`, string, or `{ repeat: { weekdays: [...] } }` entries. |
45
+ | `showInInput` | `Boolean` | `true` | Input-style trigger (vs button). |
46
+ | `monthNames` | `Array` | `undefined` | Custom full month names. |
47
+ | `monthNamesShort` | `Array` | `undefined` | Custom short month names. |
48
+ | `dayNames` | `Array` | `undefined` | Custom day names. |
49
+ | `formatDigit` | `Function` | `undefined` | Locale digit formatter (e.g. Bengali digits). |
50
+ | `rangeSeparator` | `String` | `undefined` | Display separator between range start/end. |
51
+ | `mode` | `String` | `"date"` | `date`, `time`, or `datetime`. |
52
+ | `is24Hour` | `Boolean` | `undefined` | 24-hour clock. |
53
+ | `minuteStep` | `Number` | `1` | Minute increment. |
54
+ | `isLeftIconBorder` | `Boolean` | `false` | Border on prefix icon. |
55
+ | `isRightIconBorder` | `Boolean` | `false` | Border on suffix icon. |
56
+ | `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
57
+ | `defaultIconPosition` | `String` | `"right"` | Position of the default calendar/clock icon. |
58
+ | `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot. |
59
+
60
+ ## Events
61
+
62
+ | Event | Payload | Description |
63
+ | --- | --- | --- |
64
+ | `update:modelValue` | `value` | v-model sync. |
65
+
66
+ ## Slots
67
+
68
+ | Name | Scope | Description |
69
+ | --- | --- | --- |
70
+ | `label` | | Custom label. |
71
+ | `prefix` | | Prefix area. |
72
+ | `icon` | | Calendar / clock icon. |
73
+ | `hints` | | Custom hints. |
74
+ | `picker-container` | `{ isRange, showInInput, value }` | Override the entire picker UI. |