@appsbd/vue3-appsbd-ui 1.0.0 → 1.0.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 (69) hide show
  1. package/.ai/ai_ref_AbAvatar.md +9 -1
  2. package/.ai/ai_ref_AbBadge.md +6 -5
  3. package/.ai/ai_ref_AbButton.md +8 -9
  4. package/.ai/ai_ref_AbCard.md +70 -53
  5. package/.ai/ai_ref_AbCarousel.md +47 -47
  6. package/.ai/ai_ref_AbChart.md +87 -0
  7. package/.ai/ai_ref_AbConfirmPopover.md +59 -59
  8. package/.ai/ai_ref_AbDarkModeToggler.md +42 -42
  9. package/.ai/ai_ref_AbDateTimePicker.md +3 -0
  10. package/.ai/ai_ref_AbEasyModal.md +62 -62
  11. package/.ai/ai_ref_AbField.md +96 -93
  12. package/.ai/ai_ref_AbFileUploader.md +63 -63
  13. package/.ai/ai_ref_AbFilterPanel.md +71 -71
  14. package/.ai/ai_ref_AbFormCheck.md +75 -75
  15. package/.ai/ai_ref_AbImageRadioInput.md +63 -63
  16. package/.ai/ai_ref_AbInputField.md +74 -71
  17. package/.ai/ai_ref_AbInputTag.md +3 -0
  18. package/.ai/ai_ref_AbKbd.md +35 -35
  19. package/.ai/ai_ref_AbKbdGroup.md +33 -33
  20. package/.ai/ai_ref_AbModal.md +103 -103
  21. package/.ai/ai_ref_AbMultiSelect.md +4 -0
  22. package/.ai/ai_ref_AbNumberField.md +84 -84
  23. package/.ai/ai_ref_AbPopover.md +64 -64
  24. package/.ai/ai_ref_AbPricingCard.md +64 -64
  25. package/.ai/ai_ref_AbPricingContainer.md +49 -49
  26. package/.ai/ai_ref_AbPricingTable.md +72 -72
  27. package/.ai/ai_ref_AbProgressbar.md +44 -37
  28. package/.ai/ai_ref_AbScrollbar.md +48 -48
  29. package/.ai/ai_ref_AbSettingsForm.md +54 -54
  30. package/.ai/ai_ref_AbSideMenuItem.md +58 -58
  31. package/.ai/ai_ref_AbSidebar.md +70 -70
  32. package/.ai/ai_ref_AbSkeleton.md +41 -41
  33. package/.ai/ai_ref_AbSlider.md +71 -71
  34. package/.ai/ai_ref_AbTab.md +38 -38
  35. package/.ai/ai_ref_AbTable.md +59 -59
  36. package/.ai/ai_ref_AbTabs.md +47 -47
  37. package/.ai/ai_ref_AbToggle.md +65 -65
  38. package/.ai/ai_ref_AbTooltip.md +53 -53
  39. package/.ai/ai_ref_AbWizard.md +77 -77
  40. package/.ai/ai_ref_AbWizardStep.md +48 -48
  41. package/.ai/ai_ref_abEventBus.md +94 -0
  42. package/.ai/ai_ref_abRequestParam.md +55 -0
  43. package/.ai/ai_ref_abTranslate.md +33 -0
  44. package/.ai/ai_ref_abVeeRules.md +42 -0
  45. package/.ai/ai_ref_useAlert.md +63 -0
  46. package/.ai/ai_ref_useFileValidator.md +46 -0
  47. package/.ai/ai_ref_useResponsive.md +55 -0
  48. package/.ai/ai_ref_useTheme.md +39 -0
  49. package/.ai/ai_ref_useToast.md +42 -0
  50. package/AI_REFERENCE.md +68 -112
  51. package/design-system.md +403 -0
  52. package/dist/skins/black.css +1 -1
  53. package/dist/skins/cyan.css +1 -1
  54. package/dist/skins/default.css +1 -1
  55. package/dist/skins/gray.css +1 -1
  56. package/dist/skins/green.css +1 -1
  57. package/dist/skins/orange.css +1 -1
  58. package/dist/skins/pink.css +1 -1
  59. package/dist/skins/purple.css +1 -1
  60. package/dist/skins/red.css +1 -1
  61. package/dist/skins/red.scss +3 -3
  62. package/dist/skins/themes/_common_variable.scss +2 -0
  63. package/dist/skins/themes/_red.scss +6 -6
  64. package/dist/skins/violet.css +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/vue3-appsbd-ui.cjs.js +114 -41
  67. package/dist/vue3-appsbd-ui.es.js +27212 -4646
  68. package/package.json +10 -4
  69. package/readme.md +136 -136
@@ -1,62 +1,62 @@
1
- # AbEasyModal — AI Reference
2
-
3
- Lightweight wrapper around `AbModal` that renders a trigger element and exposes imperative `openModal()` / `closeModal()` methods. Ideal for quick prompt-style dialogs where you do not need the full VeeValidate form wiring.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-easy-modal ref="modal">
14
- <template #action>
15
- <ab-button class="btn-primary">Show dialog</ab-button>
16
- </template>
17
-
18
- <template #title>Delete project?</template>
19
- <template #body>
20
- This cannot be undone.
21
- </template>
22
-
23
- <template #footer="{ closeModal }">
24
- <ab-button class="btn-outline-secondary" @click="closeModal">Cancel</ab-button>
25
- <ab-button class="btn-danger" @click="confirmDelete">Delete</ab-button>
26
- </template>
27
- </ab-easy-modal>
28
- </template>
29
-
30
- <script setup>
31
- import { ref } from 'vue';
32
- const modal = ref(null);
33
- async function confirmDelete() {
34
- await api.delete();
35
- modal.value.closeModal();
36
- }
37
- </script>
38
- ```
39
-
40
- ## Props
41
-
42
- All `AbModal` props can be forwarded via `$attrs` (e.g. `modal-size`, `hide-footer`).
43
-
44
- ## Events
45
-
46
- Inherits `AbModal`'s `onSubmit`, `loading-status`, and `close` events.
47
-
48
- ## Slots
49
-
50
- | Name | Scope | Description |
51
- | --- | --- | --- |
52
- | `action` | — | Trigger element rendered outside the modal (clicking it opens the modal). |
53
- | `title` | — | Modal title. |
54
- | `body` | — | Modal body content. |
55
- | `footer` | `{ closeModal, close }` | Footer; receives both close helpers. |
56
-
57
- ## Exposed Methods
58
-
59
- | Method | Description |
60
- | --- | --- |
61
- | `openModal()` | Open the modal programmatically. |
62
- | `closeModal()` | Close the modal programmatically. |
1
+ # AbEasyModal — AI Reference
2
+
3
+ Lightweight wrapper around `AbModal` that renders a trigger element and exposes imperative `openModal()` / `closeModal()` methods. Ideal for quick prompt-style dialogs where you do not need the full VeeValidate form wiring.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-easy-modal ref="modal">
14
+ <template #action>
15
+ <ab-button class="btn-primary">Show dialog</ab-button>
16
+ </template>
17
+
18
+ <template #title>Delete project?</template>
19
+ <template #body>
20
+ This cannot be undone.
21
+ </template>
22
+
23
+ <template #footer="{ closeModal }">
24
+ <ab-button class="btn-outline-secondary" @click="closeModal">Cancel</ab-button>
25
+ <ab-button class="btn-danger" @click="confirmDelete">Delete</ab-button>
26
+ </template>
27
+ </ab-easy-modal>
28
+ </template>
29
+
30
+ <script setup>
31
+ import { ref } from 'vue';
32
+ const modal = ref(null);
33
+ async function confirmDelete() {
34
+ await api.delete();
35
+ modal.value.closeModal();
36
+ }
37
+ </script>
38
+ ```
39
+
40
+ ## Props
41
+
42
+ All `AbModal` props can be forwarded via `$attrs` (e.g. `modal-size`, `hide-footer`).
43
+
44
+ ## Events
45
+
46
+ Inherits `AbModal`'s `onSubmit`, `loading-status`, and `close` events.
47
+
48
+ ## Slots
49
+
50
+ | Name | Scope | Description |
51
+ | --- | --- | --- |
52
+ | `action` | — | Trigger element rendered outside the modal (clicking it opens the modal). |
53
+ | `title` | — | Modal title. |
54
+ | `body` | — | Modal body content. |
55
+ | `footer` | `{ closeModal, close }` | Footer; receives both close helpers. |
56
+
57
+ ## Exposed Methods
58
+
59
+ | Method | Description |
60
+ | --- | --- |
61
+ | `openModal()` | Open the modal programmatically. |
62
+ | `closeModal()` | Close the modal programmatically. |
@@ -1,93 +1,96 @@
1
- # AbField — AI Reference
2
-
3
- Polymorphic field wrapper — renders a text, textarea, select, multiselect, tag, checkbox, radio, toggle, or switch control based on the `type` prop. Use this when you want a single component to handle any form field type uniformly.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-field type="text" v-model="form.name" name="name" label="Name" rules="required" />
14
-
15
- <ab-field
16
- type="select"
17
- v-model="form.country"
18
- name="country"
19
- label="Country"
20
- :options="countries"
21
- label-key="title"
22
- value-key="val"
23
- searchable
24
- />
25
-
26
- <ab-field
27
- type="toggle"
28
- v-model="form.notifications"
29
- name="notifications"
30
- title="Enable notifications"
31
- description="Receive email updates"
32
- />
33
- </template>
34
- ```
35
-
36
- ## Props
37
-
38
- | Name | Type | Default | Description |
39
- | --- | --- | --- | --- |
40
- | `val` | `any` | `null` | Initial value (used when `modelValue` is empty). |
41
- | `label` | `String` | **required** | Field label. |
42
- | `name` | `String` | **required** | VeeValidate field name. |
43
- | `type` | `String` | `"text"` | `text`, `email`, `password`, `number`, `url`, `textarea`, `select`, `multiselect`, `tag`, `checkbox`, `radio`, `toggle`, `switch`. |
44
- | `prefix` | `String` | `""` | Prefix text/icon. |
45
- | `postfix` | `String` | `""` | Postfix text/icon. |
46
- | `modelValue` | `String \| Number \| Boolean \| Array \| Object` | `""` | Two-way-bound value. |
47
- | `isCodeInput` | `Boolean` | `false` | Applies monospace styling. |
48
- | `containerClass` | `String` | `""` | Wrapper class. |
49
- | `maxlength` | `String \| Number` | `""` | Native maxlength. |
50
- | `minlength` | `String \| Number` | `""` | Native minlength. |
51
- | `placeholder` | `String` | `""` | Input placeholder. |
52
- | `hints` | `String \| Array` | `""` | Helper text. |
53
- | `rules` | `String \| Array` | `""` | VeeValidate rules. |
54
- | `options` | `Array` | `[]` | Options for select / checkbox / radio. |
55
- | `labelKey` | `String` | `"title"` | Option label property. |
56
- | `valueKey` | `String` | `"val"` | Option value property. |
57
- | `max` | `Number` | `-1` | Max selections (multiselect/tag); `-1` = unlimited. |
58
- | `size` | `String` | `"md"` | Field size. |
59
- | `object` | `Boolean` | `false` | Return full objects instead of values (multiselect). |
60
- | `searchable` | `Boolean` | `false` | Enable search (select). |
61
- | `description` | `String` | `""` | Secondary description. |
62
- | `helptext` | `String` | `""` | Help text. |
63
- | `isInline` | `Boolean` | `false` | Inline layout (checkbox/radio). |
64
- | `trueValue` | `any` | `"Y"` | Toggle/switch on value. |
65
- | `falseValue` | `any` | `"N"` | Toggle/switch off value. |
66
- | `title` | `String \| null` | `null` | Toggle/switch title. |
67
- | `isLeftIconBorder` | `Boolean` | `false` | Border on left icon. |
68
- | `isRightIconBorder` | `Boolean` | `false` | Border on right icon. |
69
-
70
- ## Events
71
-
72
- | Event | Payload | Description |
73
- | --- | --- | --- |
74
- | `update:modelValue` | `value` | v-model sync. |
75
- | `clear` | `event` | Multiselect field cleared. |
76
- | `change` | `value` | Multiselect value changed. |
77
- | `select` | `value` | Multiselect option selected. |
78
-
79
- ## Slots
80
-
81
- | Name | Description |
82
- | --- | --- |
83
- | `label` | Custom label. |
84
- | `prefix` | Custom prefix. |
85
- | `postfix` | Custom postfix. |
86
- | `description` | Custom description. |
87
- | `helptext` | Custom help text. |
88
- | `option` | Custom option rendering (select). |
89
- | `singlelabel` | Custom single-value label (select). |
90
-
91
- ## v-model
92
-
93
- Yes — supports `modelValue` / `update:modelValue`.
1
+ # AbField — AI Reference
2
+
3
+ Polymorphic field wrapper — renders a text, textarea, select, multiselect, tag, checkbox, radio, toggle, or switch control based on the `type` prop. Use this when you want a single component to handle any form field type uniformly.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-field type="text" v-model="form.name" name="name" label="Name" rules="required" />
14
+
15
+ <ab-field
16
+ type="select"
17
+ v-model="form.country"
18
+ name="country"
19
+ label="Country"
20
+ :options="countries"
21
+ label-key="title"
22
+ value-key="val"
23
+ searchable
24
+ />
25
+
26
+ <ab-field
27
+ type="toggle"
28
+ v-model="form.notifications"
29
+ name="notifications"
30
+ title="Enable notifications"
31
+ description="Receive email updates"
32
+ />
33
+ </template>
34
+ ```
35
+
36
+ ## Props
37
+
38
+ | Name | Type | Default | Description |
39
+ | --- | --- | --- | --- |
40
+ | `val` | `any` | `null` | Initial value (used when `modelValue` is empty). |
41
+ | `label` | `String` | **required** | Field label. |
42
+ | `name` | `String` | **required** | VeeValidate field name. |
43
+ | `type` | `String` | `"text"` | `text`, `email`, `password`, `number`, `url`, `textarea`, `select`, `multiselect`, `tag`, `checkbox`, `radio`, `toggle`, `switch`. |
44
+ | `prefix` | `String` | `""` | Prefix text/icon. |
45
+ | `postfix` | `String` | `""` | Postfix text/icon. |
46
+ | `modelValue` | `String \| Number \| Boolean \| Array \| Object` | `""` | Two-way-bound value. |
47
+ | `isCodeInput` | `Boolean` | `false` | Applies monospace styling. |
48
+ | `containerClass` | `String` | `""` | Wrapper class. |
49
+ | `maxlength` | `String \| Number` | `""` | Native maxlength. |
50
+ | `minlength` | `String \| Number` | `""` | Native minlength. |
51
+ | `placeholder` | `String` | `""` | Input placeholder. |
52
+ | `hints` | `String \| Array` | `""` | Helper text. |
53
+ | `rules` | `String \| Array` | `""` | VeeValidate rules. |
54
+ | `options` | `Array` | `[]` | Options for select / checkbox / radio. |
55
+ | `labelKey` | `String` | `"title"` | Option label property. |
56
+ | `valueKey` | `String` | `"val"` | Option value property. |
57
+ | `max` | `Number` | `-1` | Max selections (multiselect/tag); `-1` = unlimited. |
58
+ | `size` | `String` | `"md"` | Field size. |
59
+ | `object` | `Boolean` | `false` | Return full objects instead of values (multiselect). |
60
+ | `searchable` | `Boolean` | `false` | Enable search (select). |
61
+ | `description` | `String` | `""` | Secondary description. |
62
+ | `helptext` | `String` | `""` | Help text. |
63
+ | `isInline` | `Boolean` | `false` | Inline layout (checkbox/radio). |
64
+ | `trueValue` | `any` | `"Y"` | Toggle/switch on value. |
65
+ | `falseValue` | `any` | `"N"` | Toggle/switch off value. |
66
+ | `title` | `String \| null` | `null` | Toggle/switch title. |
67
+ | `isLeftIconBorder` | `Boolean` | `false` | Border on left icon. |
68
+ | `isRightIconBorder` | `Boolean` | `false` | Border on right icon. |
69
+ | `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
70
+ | `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot (`"left"`, `"right"`). |
71
+
72
+ ## Events
73
+
74
+ | Event | Payload | Description |
75
+ | --- | --- | --- |
76
+ | `update:modelValue` | `value` | v-model sync. |
77
+ | `clear` | `event` | Multiselect field cleared. |
78
+ | `change` | `value` | Multiselect value changed. |
79
+ | `select` | `value` | Multiselect option selected. |
80
+
81
+ ## Slots
82
+
83
+ | Name | Description |
84
+ | --- | --- |
85
+ | `label` | Custom label. |
86
+ | `prefix` | Custom prefix. |
87
+ | `icon` | Custom icon. |
88
+ | `postfix` | Custom postfix. |
89
+ | `description` | Custom description. |
90
+ | `helptext` | Custom help text. |
91
+ | `option` | Custom option rendering (select). |
92
+ | `singlelabel` | Custom single-value label (select). |
93
+
94
+ ## v-model
95
+
96
+ Yes — supports `modelValue` / `update:modelValue`.
@@ -1,63 +1,63 @@
1
- # AbFileUploader — AI Reference
2
-
3
- File upload input with drag-and-drop, size validation, and preview. Can render a default uploader UI or accept a custom one via slots.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-file-uploader
14
- v-model="file"
15
- label="Upload avatar"
16
- :max-size="1.5"
17
- @on-select-files="handleFiles"
18
- />
19
-
20
- <!-- Custom UI -->
21
- <ab-file-uploader v-model="file" :max-size="5">
22
- <template #dial>
23
- <div class="my-drop-zone">Drop files here</div>
24
- </template>
25
- </ab-file-uploader>
26
- </template>
27
-
28
- <script setup>
29
- import { ref } from 'vue';
30
- const file = ref(null);
31
- function handleFiles(files) {
32
- console.log('Selected files:', files);
33
- }
34
- </script>
35
- ```
36
-
37
- ## Props
38
-
39
- | Name | Type | Default | Description |
40
- | --- | --- | --- | --- |
41
- | `modelValue` | `File \| Array \| String` | `null` | Selected file (or URL string / array). |
42
- | `maxSize` | `Number` | `2.0` | Max file size in MB. |
43
- | `label` | `String` | `""` | Field label. |
44
- | `containerClass` | `String` | `""` | Wrapper class. |
45
-
46
- ## Events
47
-
48
- | Event | Payload | Description |
49
- | --- | --- | --- |
50
- | `update:modelValue` | `file` | v-model sync. |
51
- | `onSelectFiles` | `files` | All selected files after size validation. |
52
-
53
- ## Slots
54
-
55
- | Name | Description |
56
- | --- | --- |
57
- | `label` | Custom label. |
58
- | `dial` | Custom uploader UI (replaces the default design). |
59
- | `default` | Alternative custom UI slot. |
60
-
61
- ## v-model
62
-
63
- Yes.
1
+ # AbFileUploader — AI Reference
2
+
3
+ File upload input with drag-and-drop, size validation, and preview. Can render a default uploader UI or accept a custom one via slots.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-file-uploader
14
+ v-model="file"
15
+ label="Upload avatar"
16
+ :max-size="1.5"
17
+ @on-select-files="handleFiles"
18
+ />
19
+
20
+ <!-- Custom UI -->
21
+ <ab-file-uploader v-model="file" :max-size="5">
22
+ <template #dial>
23
+ <div class="my-drop-zone">Drop files here</div>
24
+ </template>
25
+ </ab-file-uploader>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { ref } from 'vue';
30
+ const file = ref(null);
31
+ function handleFiles(files) {
32
+ console.log('Selected files:', files);
33
+ }
34
+ </script>
35
+ ```
36
+
37
+ ## Props
38
+
39
+ | Name | Type | Default | Description |
40
+ | --- | --- | --- | --- |
41
+ | `modelValue` | `File \| Array \| String` | `null` | Selected file (or URL string / array). |
42
+ | `maxSize` | `Number` | `2.0` | Max file size in MB. |
43
+ | `label` | `String` | `""` | Field label. |
44
+ | `containerClass` | `String` | `""` | Wrapper class. |
45
+
46
+ ## Events
47
+
48
+ | Event | Payload | Description |
49
+ | --- | --- | --- |
50
+ | `update:modelValue` | `file` | v-model sync. |
51
+ | `onSelectFiles` | `files` | All selected files after size validation. |
52
+
53
+ ## Slots
54
+
55
+ | Name | Description |
56
+ | --- | --- |
57
+ | `label` | Custom label. |
58
+ | `dial` | Custom uploader UI (replaces the default design). |
59
+ | `default` | Alternative custom UI slot. |
60
+
61
+ ## v-model
62
+
63
+ Yes.
@@ -1,71 +1,71 @@
1
- # AbFilterPanel — AI Reference
2
-
3
- Advanced filter panel for list and table views. Supports quick/advance modes, single-field search, date ranges, and an optional QR/barcode scan button.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-filter-panel
14
- :filter-options="filterOptions"
15
- is-advance
16
- is-searchable
17
- size="sm"
18
- @search-filter="handleSearch"
19
- @reset="handleReset"
20
- />
21
- </template>
22
-
23
- <script setup>
24
- const filterOptions = [
25
- { propName: 'name', label: 'Name', type: 'text' },
26
- { propName: 'status', label: 'Status', type: 'select', options: [...] },
27
- { propName: 'createdAt', label: 'Created', type: 'daterange' },
28
- ];
29
-
30
- function handleSearch(data) {
31
- // data: [{ propName, operators, value }, ...]
32
- }
33
- </script>
34
- ```
35
-
36
- ## Props
37
-
38
- | Name | Type | Default | Description |
39
- | --- | --- | --- | --- |
40
- | `isAdvance` | `Boolean` | `false` | Show all filters in an expanded layout. |
41
- | `isQuickAdvance` | `Boolean` | `false` | Quick advance mode. |
42
- | `isSingle` | `Boolean` | `false` | Single-field search mode. |
43
- | `isAllowed` | `Boolean` | `false` | Permission flag consumed by the template. |
44
- | `canScan` | `Boolean` | `false` | Show a QR / barcode scan button. |
45
- | `filterOptions` | `Array` | `[]` | Filter field definitions. |
46
- | `scanProps` | `String` | `""` | Property name to apply scan result to. |
47
- | `showScanFld` | `Boolean` | `false` | Force-show the scan field. |
48
- | `showDrGroupText` | `Boolean` | `true` | Show date-range group label. |
49
- | `dateFormat` | `String` | `"MMM DD,YYYY"` | Date display format. |
50
- | `isSearchable` | `Boolean` | `false` | Allow searching within option lists. |
51
- | `isMaxDate` | `Boolean` | `true` | Limit date pickers to today as max. |
52
- | `size` | `String` | `"xs"` | Control size. |
53
- | `advanceSearchInputContainerClass` | `String` | `"col-6"` | Grid column class for inputs in advance mode. |
54
- | `isQuickAdvanceAutoSearch` | `Boolean` | `false` | Fire search automatically on field change (quick advance). |
55
-
56
- ## Events
57
-
58
- | Event | Payload | Description |
59
- | --- | --- | --- |
60
- | `searchFilter` | `Array<{ propName, operators, value }>` | User triggered a search. |
61
- | `reset` | — | Filter reset clicked. |
62
- | `ChangeSearchMode` | `showScan: Boolean` | Toggled between search and scan modes. |
63
-
64
- ## Slots
65
-
66
- | Name | Description |
67
- | --- | --- |
68
- | `prefix` | Filter prefix. |
69
- | `postfix` | Filter postfix. |
70
- | `icon` | Filter icon. |
71
- | `hints` | Helper text. |
1
+ # AbFilterPanel — AI Reference
2
+
3
+ Advanced filter panel for list and table views. Supports quick/advance modes, single-field search, date ranges, and an optional QR/barcode scan button.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-filter-panel
14
+ :filter-options="filterOptions"
15
+ is-advance
16
+ is-searchable
17
+ size="sm"
18
+ @search-filter="handleSearch"
19
+ @reset="handleReset"
20
+ />
21
+ </template>
22
+
23
+ <script setup>
24
+ const filterOptions = [
25
+ { propName: 'name', label: 'Name', type: 'text' },
26
+ { propName: 'status', label: 'Status', type: 'select', options: [...] },
27
+ { propName: 'createdAt', label: 'Created', type: 'daterange' },
28
+ ];
29
+
30
+ function handleSearch(data) {
31
+ // data: [{ propName, operators, value }, ...]
32
+ }
33
+ </script>
34
+ ```
35
+
36
+ ## Props
37
+
38
+ | Name | Type | Default | Description |
39
+ | --- | --- | --- | --- |
40
+ | `isAdvance` | `Boolean` | `false` | Show all filters in an expanded layout. |
41
+ | `isQuickAdvance` | `Boolean` | `false` | Quick advance mode. |
42
+ | `isSingle` | `Boolean` | `false` | Single-field search mode. |
43
+ | `isAllowed` | `Boolean` | `false` | Permission flag consumed by the template. |
44
+ | `canScan` | `Boolean` | `false` | Show a QR / barcode scan button. |
45
+ | `filterOptions` | `Array` | `[]` | Filter field definitions. |
46
+ | `scanProps` | `String` | `""` | Property name to apply scan result to. |
47
+ | `showScanFld` | `Boolean` | `false` | Force-show the scan field. |
48
+ | `showDrGroupText` | `Boolean` | `true` | Show date-range group label. |
49
+ | `dateFormat` | `String` | `"MMM DD,YYYY"` | Date display format. |
50
+ | `isSearchable` | `Boolean` | `false` | Allow searching within option lists. |
51
+ | `isMaxDate` | `Boolean` | `true` | Limit date pickers to today as max. |
52
+ | `size` | `String` | `"xs"` | Control size. |
53
+ | `advanceSearchInputContainerClass` | `String` | `"col-6"` | Grid column class for inputs in advance mode. |
54
+ | `isQuickAdvanceAutoSearch` | `Boolean` | `false` | Fire search automatically on field change (quick advance). |
55
+
56
+ ## Events
57
+
58
+ | Event | Payload | Description |
59
+ | --- | --- | --- |
60
+ | `searchFilter` | `Array<{ propName, operators, value }>` | User triggered a search. |
61
+ | `reset` | — | Filter reset clicked. |
62
+ | `ChangeSearchMode` | `showScan: Boolean` | Toggled between search and scan modes. |
63
+
64
+ ## Slots
65
+
66
+ | Name | Description |
67
+ | --- | --- |
68
+ | `prefix` | Filter prefix. |
69
+ | `postfix` | Filter postfix. |
70
+ | `icon` | Filter icon. |
71
+ | `hints` | Helper text. |