@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.
- package/.ai/ai_ref_AbAvatar.md +41 -51
- package/.ai/ai_ref_AbBadge.md +36 -45
- package/.ai/ai_ref_AbButton.md +52 -70
- package/.ai/ai_ref_AbCard.md +51 -70
- package/.ai/ai_ref_AbCarousel.md +36 -47
- package/.ai/ai_ref_AbChart.md +46 -87
- package/.ai/ai_ref_AbColorPicker.md +42 -55
- package/.ai/ai_ref_AbConfirmPopover.md +54 -59
- package/.ai/ai_ref_AbCustomField.md +66 -74
- package/.ai/ai_ref_AbDarkModeToggler.md +33 -42
- package/.ai/ai_ref_AbDateTimePicker.md +74 -108
- package/.ai/ai_ref_AbEasyModal.md +56 -62
- package/.ai/ai_ref_AbField.md +88 -96
- package/.ai/ai_ref_AbFileUploader.md +47 -63
- package/.ai/ai_ref_AbFilterPanel.md +67 -71
- package/.ai/ai_ref_AbFormCheck.md +58 -75
- package/.ai/ai_ref_AbImageRadioInput.md +55 -63
- package/.ai/ai_ref_AbInputField.md +66 -74
- package/.ai/ai_ref_AbInputTag.md +56 -76
- package/.ai/ai_ref_AbKbd.md +23 -35
- package/.ai/ai_ref_AbKbdGroup.md +21 -33
- package/.ai/ai_ref_AbMainLayout.md +106 -0
- package/.ai/ai_ref_AbModal.md +98 -103
- package/.ai/ai_ref_AbMultiSelect.md +78 -112
- package/.ai/ai_ref_AbNumberField.md +59 -84
- package/.ai/ai_ref_AbPinInput.md +33 -45
- package/.ai/ai_ref_AbPopover.md +54 -64
- package/.ai/ai_ref_AbPricingCard.md +56 -64
- package/.ai/ai_ref_AbPricingContainer.md +41 -49
- package/.ai/ai_ref_AbPricingTable.md +56 -72
- package/.ai/ai_ref_AbProgressbar.md +34 -44
- package/.ai/ai_ref_AbScrollbar.md +38 -48
- package/.ai/ai_ref_AbSettingsForm.md +46 -54
- package/.ai/ai_ref_AbSideMenuItem.md +47 -58
- package/.ai/ai_ref_AbSidebar.md +62 -70
- package/.ai/ai_ref_AbSkeleton.md +23 -41
- package/.ai/ai_ref_AbSlider.md +52 -71
- package/.ai/ai_ref_AbTab.md +30 -38
- package/.ai/ai_ref_AbTable.md +49 -59
- package/.ai/ai_ref_AbTabs.md +37 -47
- package/.ai/ai_ref_AbToggle.md +46 -65
- package/.ai/ai_ref_AbTooltip.md +39 -53
- package/.ai/ai_ref_AbWizard.md +64 -77
- package/.ai/ai_ref_AbWizardStep.md +36 -48
- package/.ai/ai_ref_abEventBus.md +9 -37
- package/.ai/ai_ref_abRequestParam.md +2 -17
- package/.ai/ai_ref_abTranslate.md +30 -15
- package/.ai/ai_ref_abVeeRules.md +2 -11
- package/.ai/ai_ref_global_config.md +57 -66
- package/.ai/ai_ref_useAlert.md +7 -20
- package/.ai/ai_ref_useFileValidator.md +3 -18
- package/.ai/ai_ref_useResponsive.md +6 -20
- package/.ai/ai_ref_useTheme.md +4 -15
- package/.ai/ai_ref_useToast.md +5 -17
- package/AI_REF.md +114 -0
- package/AI_REFERENCE.md +87 -1157
- package/design-system.md +403 -403
- package/dist/skins/black.css +1 -1
- package/dist/skins/black.scss +3 -3
- package/dist/skins/cyan.css +1 -1
- package/dist/skins/cyan.scss +3 -3
- package/dist/skins/default.css +1 -1
- package/dist/skins/default.scss +5 -5
- package/dist/skins/gray.css +1 -1
- package/dist/skins/gray.scss +3 -3
- package/dist/skins/green.css +1 -1
- package/dist/skins/green.scss +5 -5
- package/dist/skins/orange.css +1 -1
- package/dist/skins/orange.scss +3 -3
- package/dist/skins/pink.css +1 -1
- package/dist/skins/pink.scss +3 -3
- package/dist/skins/purple.css +1 -1
- package/dist/skins/purple.scss +3 -3
- package/dist/skins/red.css +1 -1
- package/dist/skins/red.scss +3 -3
- package/dist/skins/themes/_black.scss +18 -6
- package/dist/skins/themes/_blue.scss +18 -43
- package/dist/skins/themes/_common_variable.scss +695 -590
- package/dist/skins/themes/_cyan.scss +18 -6
- package/dist/skins/themes/_gray.scss +18 -6
- package/dist/skins/themes/_green.scss +18 -6
- package/dist/skins/themes/_grid.scss +32 -27
- package/dist/skins/themes/_orange.scss +18 -6
- package/dist/skins/themes/_pink.scss +18 -6
- package/dist/skins/themes/_purple.scss +18 -6
- package/dist/skins/themes/_red.scss +18 -6
- package/dist/skins/themes/_violet.scss +18 -6
- package/dist/skins/violet.css +1 -1
- package/dist/skins/violet.scss +3 -3
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +145 -125
- package/dist/vue3-appsbd-ui.es.js +27822 -16778
- package/package.json +72 -66
- package/readme.md +194 -136
- package/scripts/postinstall.js +55 -0
- package/scripts/setup.js +16 -0
- package/scripts/skill-groups.js +38 -0
- package/skills/commands/generate-module.md +76 -0
- package/skills/commands/settings-form.md +175 -0
- package/skills/commands/use-appsbd-ui.md +40 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# AbMainLayout — AI Reference
|
|
2
|
+
|
|
3
|
+
Full-page application shell with left sidebar, right sidebar, header, body, and footer slots. On desktop the left sidebar is always visible; on mobile (< 576px) it becomes an overlay drawer with a backdrop. Use this as the top-level layout wrapper when building admin dashboards or panel-style applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`AbMainLayout` is **not** globally registered. Import it explicitly:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { AbMainLayout } from "vue3-appsbd-ui";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```vue
|
|
20
|
+
<template>
|
|
21
|
+
<ab-main-layout ref="layoutRef">
|
|
22
|
+
<template #leftSidebar>
|
|
23
|
+
<ab-sidebar app-unique-id="my-app">
|
|
24
|
+
<ab-side-menu-item :to="{ name: 'dashboard' }">Dashboard</ab-side-menu-item>
|
|
25
|
+
</ab-sidebar>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<template #pageHeader>
|
|
29
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
30
|
+
<h1>My App</h1>
|
|
31
|
+
<ab-dark-mode-toggler size="xs" />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template #body>
|
|
36
|
+
<router-view />
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<template #pageFooter>
|
|
40
|
+
<span>© 2026 My Company</span>
|
|
41
|
+
</template>
|
|
42
|
+
</ab-main-layout>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup>
|
|
46
|
+
import { AbMainLayout } from "vue3-appsbd-ui";
|
|
47
|
+
import { ref } from "vue";
|
|
48
|
+
|
|
49
|
+
const layoutRef = ref(null);
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Mobile sidebar toggle
|
|
54
|
+
|
|
55
|
+
On mobile, call `toggleLeftSidebar()` via the template ref to open/close the drawer:
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<template>
|
|
59
|
+
<ab-main-layout ref="layoutRef">
|
|
60
|
+
<template #pageHeader>
|
|
61
|
+
<button @click="layoutRef?.toggleLeftSidebar()">☰</button>
|
|
62
|
+
<h1>My App</h1>
|
|
63
|
+
</template>
|
|
64
|
+
<!-- ... -->
|
|
65
|
+
</ab-main-layout>
|
|
66
|
+
</template>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Props
|
|
70
|
+
|
|
71
|
+
| Name | Type | Default | Description |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| `headerClass` | `String` | `"apbd-bordered"` | CSS class applied to the page header wrapper. Use `"apbd-bordered"` for a bordered header or `""` for no border. |
|
|
74
|
+
| `footerClass` | `String` | `""` | CSS class applied to the page footer wrapper. |
|
|
75
|
+
|
|
76
|
+
## Slots
|
|
77
|
+
|
|
78
|
+
| Name | Scoped Payload | Description |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| `leftSidebar` | — | Left sidebar panel. On desktop it's always visible; on mobile it slides in as a drawer. Typically hosts `AbSidebar`. |
|
|
81
|
+
| `pageHeader` | `{ headerClass }` | Top header bar. Receives the resolved `headerClass` as a scoped slot prop. |
|
|
82
|
+
| `bodyHeader` | — | Content rendered above the scrollable body area. |
|
|
83
|
+
| `body` | — | Main scrollable content area. |
|
|
84
|
+
| `bodyFooter` | — | Content rendered below the scrollable body area. |
|
|
85
|
+
| `pageFooter` | — | Bottom footer bar. |
|
|
86
|
+
| `rightSidebar` | — | Right sidebar panel. Only rendered when `isRightSidebarOpen` is `true`. |
|
|
87
|
+
|
|
88
|
+
## Exposed methods
|
|
89
|
+
|
|
90
|
+
| Name | Signature | Description |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| `isLeftSidebarOpen` | `Ref<boolean>` | Reactive state of the left sidebar (read-only). |
|
|
93
|
+
| `isRightSidebarOpen` | `Ref<boolean>` | Reactive state of the right sidebar (read-only). |
|
|
94
|
+
| `toggleLeftSidebar` | `(state?: boolean) => void` | Toggle or explicitly set left sidebar visibility. |
|
|
95
|
+
| `toggleRightSidebar` | `(state?: boolean) => void` | Toggle or explicitly set right sidebar visibility. |
|
|
96
|
+
|
|
97
|
+
## Provides
|
|
98
|
+
|
|
99
|
+
The component provides a `layoutState` injection key to all descendants:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
inject: ['layoutState']
|
|
103
|
+
// layoutState = { isLeftSidebarOpen, isRightSidebarOpen, toggleLeftSidebar, toggleRightSidebar }
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Child components (like `AbSidebar`) can inject this to react to or control the sidebar state.
|
package/.ai/ai_ref_AbModal.md
CHANGED
|
@@ -1,103 +1,98 @@
|
|
|
1
|
-
# AbModal — AI Reference
|
|
2
|
-
|
|
3
|
-
Full-featured dialog with a built-in VeeValidate `<Form>`, loader overlay, and "message-only" mode.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<template #
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
| `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| `setMessageOnly(status)` | Toggle message-only mode programmatically. |
|
|
100
|
-
|
|
101
|
-
## Notes
|
|
102
|
-
|
|
103
|
-
- Use `AbEasyModal` when you only need a simple trigger-and-close dialog without a form.
|
|
1
|
+
# AbModal — AI Reference
|
|
2
|
+
|
|
3
|
+
Full-featured dialog with a built-in VeeValidate `<Form>`, loader overlay, and "message-only" mode. Globally registered by the plugin.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<ab-button class="btn-primary" @click="isOpen = true">Open</ab-button>
|
|
10
|
+
|
|
11
|
+
<ab-modal
|
|
12
|
+
ref="modal"
|
|
13
|
+
v-model:is-modal-visible="isOpen"
|
|
14
|
+
modal-size="modal-lg"
|
|
15
|
+
@on-submit="handleSubmit"
|
|
16
|
+
@close="isOpen = false"
|
|
17
|
+
>
|
|
18
|
+
<template #headerTitle>Edit profile</template>
|
|
19
|
+
|
|
20
|
+
<ab-input-field name="email" label="Email" rules="required|email" v-model="form.email" />
|
|
21
|
+
|
|
22
|
+
<template #footer="{ close }">
|
|
23
|
+
<ab-button class="btn-outline-secondary" @click="close">Cancel</ab-button>
|
|
24
|
+
<ab-button class="btn-primary" type="submit">Save</ab-button>
|
|
25
|
+
</template>
|
|
26
|
+
</ab-modal>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { ref } from "vue";
|
|
31
|
+
const isOpen = ref(false);
|
|
32
|
+
const modal = ref(null);
|
|
33
|
+
const form = ref({ email: "" });
|
|
34
|
+
|
|
35
|
+
async function handleSubmit(values, { resetForm }) {
|
|
36
|
+
modal.value.showLoader(true, "Saving…");
|
|
37
|
+
await api.save(values);
|
|
38
|
+
modal.value.showLoader(false);
|
|
39
|
+
modal.value.close();
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Props
|
|
45
|
+
|
|
46
|
+
| Name | Type | Default | Description |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `isModalVisible` | `Boolean` | — | Visibility state (`v-model:is-modal-visible`). |
|
|
49
|
+
| `modalSize` | `String` | `""` | Bootstrap size class (`modal-sm`, `modal-lg`, `modal-xl`). |
|
|
50
|
+
| `modalMsg` | `String` | `""` | Default message for message-only mode. |
|
|
51
|
+
| `hideHeader` | `Boolean` | `false` | Hide the header section. |
|
|
52
|
+
| `hideBody` | `Boolean` | `false` | Hide the body section. |
|
|
53
|
+
| `hideFooter` | `Boolean` | `false` | Hide the footer section. |
|
|
54
|
+
| `hideCrossBtn` | `Boolean` | `false` | Hide the top-right close button. |
|
|
55
|
+
| `hideForm` | `Boolean` | `false` | Render root as plain `<div>` instead of VeeValidate `<Form>`. |
|
|
56
|
+
| `bodyClass` | `String` | `""` | Extra class on the body section. |
|
|
57
|
+
| `isModalCenter` | `Boolean` | `true` | Vertically center the modal. |
|
|
58
|
+
| `isBorder` | `Boolean` | `false` | Border around modal content. |
|
|
59
|
+
| `iconContainerClass` | `String` | `""` | Extra class on the header icon container. |
|
|
60
|
+
| `headerClass` | `String` | `""` | Extra class on the header. |
|
|
61
|
+
| `headerrClass` | `String` | `""` | Legacy alias for `headerClass`. |
|
|
62
|
+
|
|
63
|
+
## Events
|
|
64
|
+
|
|
65
|
+
| Event | Payload | Description |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `onSubmit` | `(event, { resetForm })` | Fired when the internal VeeValidate form is submitted. |
|
|
68
|
+
| `loading-status` | `Boolean` | Emitted when loader state toggles. |
|
|
69
|
+
| `close` | — | Modal was closed (✕, Escape, or `close()`). |
|
|
70
|
+
|
|
71
|
+
## Slots
|
|
72
|
+
|
|
73
|
+
| Name | Scope | Description |
|
|
74
|
+
| --- | --- | --- |
|
|
75
|
+
| `default` | VeeValidate `Form` slot-props | Form body when `hideForm` is `false`. |
|
|
76
|
+
| `header` | — | Overrides the entire header. |
|
|
77
|
+
| `headerIcon` | — | Icon at the start of the header. |
|
|
78
|
+
| `headerTitleContainer` | — | Overrides the title/subtitle wrapper. |
|
|
79
|
+
| `headerTitle` | — | Modal title text. |
|
|
80
|
+
| `headerSubTitle` | — | Modal subtitle text. |
|
|
81
|
+
| `body` | — | Overrides the body section. |
|
|
82
|
+
| `loader` | — | Overrides the default loader element. |
|
|
83
|
+
| `footer` | `{ close }` | Footer content — receives a `close()` function. |
|
|
84
|
+
|
|
85
|
+
## Exposed Methods
|
|
86
|
+
|
|
87
|
+
| Method | Description |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| `showLoader(status, msg?)` | Show/hide the loader with optional message. |
|
|
90
|
+
| `close()` | Close the modal. |
|
|
91
|
+
| `clearForm()` | Reset the VeeValidate form and close. |
|
|
92
|
+
| `returnClear()` | Reset the form without closing. |
|
|
93
|
+
| `showMsgOnly(msg, isHideFooter?)` | Switch to message-only mode. |
|
|
94
|
+
| `setMessageOnly(status)` | Toggle message-only mode programmatically. |
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
Use `AbEasyModal` when you only need a simple trigger-and-close dialog without a form.
|
|
@@ -1,112 +1,78 @@
|
|
|
1
|
-
# AbMultiSelect — AI Reference
|
|
2
|
-
|
|
3
|
-
Searchable single/multi/tag select. Custom built-in replacement for `@vueform/multiselect` — no third-party theme CSS required.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
| `
|
|
70
|
-
| `prefix` |
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `isRightIconBorder` | `Boolean` | `false` | Border on postfix icon. |
|
|
80
|
-
| `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
|
|
81
|
-
| `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot (`"left"`, `"right"`). |
|
|
82
|
-
|
|
83
|
-
## Events
|
|
84
|
-
|
|
85
|
-
| Event | Payload | Description |
|
|
86
|
-
| --- | --- | --- |
|
|
87
|
-
| `update:modelValue` | `value` | v-model sync. |
|
|
88
|
-
| `clear` | — | Selection cleared. |
|
|
89
|
-
| `change` | `value` | Value changed. |
|
|
90
|
-
| `select` | `value` | An option was selected. |
|
|
91
|
-
| `open` | — | Dropdown opened. |
|
|
92
|
-
| `close` | — | Dropdown closed. |
|
|
93
|
-
| `search-change` | `query` | Search input changed. |
|
|
94
|
-
|
|
95
|
-
## Slots
|
|
96
|
-
|
|
97
|
-
| Name | Scope | Description |
|
|
98
|
-
| --- | --- | --- |
|
|
99
|
-
| `label` | — | Custom label. |
|
|
100
|
-
| `prefix` | — | Prefix slot. |
|
|
101
|
-
| `icon` | — | Custom icon slot. |
|
|
102
|
-
| `postfix` | — | Postfix slot. |
|
|
103
|
-
| `singlelabel` | `value` | Custom single-mode label rendering. |
|
|
104
|
-
| `taglabel` | `value` | Custom tag-mode label rendering. |
|
|
105
|
-
| `option` | `{ option, isSelected }` | Custom option rendering. |
|
|
106
|
-
| `noresults` | — | Empty state content. |
|
|
107
|
-
| `option-loading` | — | Loading message. |
|
|
108
|
-
| `loader-icon` | — | Custom loader icon. |
|
|
109
|
-
|
|
110
|
-
## v-model
|
|
111
|
-
|
|
112
|
-
Yes.
|
|
1
|
+
# AbMultiSelect — AI Reference
|
|
2
|
+
|
|
3
|
+
Searchable single/multi/tag select. Custom built-in replacement for `@vueform/multiselect` — no third-party theme CSS required.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<ab-multi-select v-model="country" name="country" label="Country" :options="countries" label-key="title" value-key="val" searchable />
|
|
10
|
+
|
|
11
|
+
<ab-multi-select v-model="skills" name="skills" label="Skills" mode="multiple" :options="skillOptions" :max="5" />
|
|
12
|
+
|
|
13
|
+
<ab-multi-select v-model="hashtags" name="hashtags" mode="tags" searchable />
|
|
14
|
+
|
|
15
|
+
<ab-multi-select v-model="user" name="user" is-ajax-search searchable :on-search="searchUsers" :loading="isSearching" />
|
|
16
|
+
</template>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `modelValue` | `any` | `null` | v-model value. |
|
|
24
|
+
| `label` | `String` | `""` | Field label. |
|
|
25
|
+
| `placeholder` | `String` | `""` | Placeholder text. |
|
|
26
|
+
| `type` | `String` | `"text"` | Input type. |
|
|
27
|
+
| `name` | `String` | **required** | VeeValidate field name. |
|
|
28
|
+
| `rules` | `String \| Object` | `""` | VeeValidate rules. |
|
|
29
|
+
| `containerClass` | `String` | `"mb-3"` | Wrapper class. |
|
|
30
|
+
| `hints` | `String` | `""` | Helper text. |
|
|
31
|
+
| `multiple` | `Boolean` | `false` | Deprecated — use `mode` instead. |
|
|
32
|
+
| `searchable` | `Boolean` | `false` | Enable option search/filter. |
|
|
33
|
+
| `mode` | `String` | `"single"` | `single`, `multiple`, or `tags`. |
|
|
34
|
+
| `size` | `String` | `"md"` | Adjusts component size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
|
|
35
|
+
| `options` | `Array` | `[]` | Available options. |
|
|
36
|
+
| `labelKey` | `String` | `"title"` | Property to use for label. |
|
|
37
|
+
| `valueKey` | `String` | `"val"` | Property to use for value. |
|
|
38
|
+
| `max` | `Number` | `-1` | Max selections; `-1` = unlimited. |
|
|
39
|
+
| `object` | `Boolean` | `false` | Return full objects instead of values. |
|
|
40
|
+
| `prefix` | `String` | `""` | Prefix text. |
|
|
41
|
+
| `postfix` | `String` | `""` | Postfix text. |
|
|
42
|
+
| `isAjaxSearch` | `Boolean` | `false` | Enable async search via `onSearch`. |
|
|
43
|
+
| `onSearch` | `Function` | `null` | Async handler `(query) => Promise<options>`. |
|
|
44
|
+
| `hideSelected` | `Boolean` | `true` | Hide already-selected items from dropdown. |
|
|
45
|
+
| `loading` | `Boolean` | `false` | Show a loading spinner. |
|
|
46
|
+
| `disabled` | `Boolean` | `false` | Disable the field. |
|
|
47
|
+
| `appendToBody` | `Boolean` | `true` | Teleport the dropdown to `<body>`. |
|
|
48
|
+
| `isLeftIconBorder` | `Boolean` | `false` | Border on prefix icon. |
|
|
49
|
+
| `isRightIconBorder` | `Boolean` | `false` | Border on postfix icon. |
|
|
50
|
+
| `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
|
|
51
|
+
| `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot (`"left"`, `"right"`). |
|
|
52
|
+
|
|
53
|
+
## Events
|
|
54
|
+
|
|
55
|
+
| Event | Payload | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `update:modelValue` | `value` | v-model sync. |
|
|
58
|
+
| `clear` | — | Selection cleared. |
|
|
59
|
+
| `change` | `value` | Value changed. |
|
|
60
|
+
| `select` | `value` | An option was selected. |
|
|
61
|
+
| `open` | — | Dropdown opened. |
|
|
62
|
+
| `close` | — | Dropdown closed. |
|
|
63
|
+
| `search-change` | `query` | Search input changed. |
|
|
64
|
+
|
|
65
|
+
## Slots
|
|
66
|
+
|
|
67
|
+
| Name | Scope | Description |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `label` | — | Custom label. |
|
|
70
|
+
| `prefix` | — | Prefix slot. |
|
|
71
|
+
| `icon` | — | Custom icon slot. |
|
|
72
|
+
| `postfix` | — | Postfix slot. |
|
|
73
|
+
| `singlelabel` | `value` | Custom single-mode label rendering. |
|
|
74
|
+
| `taglabel` | `value` | Custom tag-mode label rendering. |
|
|
75
|
+
| `option` | `{ option, isSelected }` | Custom option rendering. |
|
|
76
|
+
| `noresults` | — | Empty state content. |
|
|
77
|
+
| `option-loading` | — | Loading message. |
|
|
78
|
+
| `loader-icon` | — | Custom loader icon. |
|