@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.
- package/.ai/ai_ref_AbAvatar.md +9 -1
- package/.ai/ai_ref_AbBadge.md +6 -5
- package/.ai/ai_ref_AbButton.md +8 -9
- package/.ai/ai_ref_AbCard.md +70 -53
- package/.ai/ai_ref_AbCarousel.md +47 -47
- package/.ai/ai_ref_AbChart.md +87 -0
- package/.ai/ai_ref_AbConfirmPopover.md +59 -59
- package/.ai/ai_ref_AbDarkModeToggler.md +42 -42
- package/.ai/ai_ref_AbDateTimePicker.md +3 -0
- package/.ai/ai_ref_AbEasyModal.md +62 -62
- package/.ai/ai_ref_AbField.md +96 -93
- package/.ai/ai_ref_AbFileUploader.md +63 -63
- package/.ai/ai_ref_AbFilterPanel.md +71 -71
- package/.ai/ai_ref_AbFormCheck.md +75 -75
- package/.ai/ai_ref_AbImageRadioInput.md +63 -63
- package/.ai/ai_ref_AbInputField.md +74 -71
- package/.ai/ai_ref_AbInputTag.md +3 -0
- package/.ai/ai_ref_AbKbd.md +35 -35
- package/.ai/ai_ref_AbKbdGroup.md +33 -33
- package/.ai/ai_ref_AbModal.md +103 -103
- package/.ai/ai_ref_AbMultiSelect.md +4 -0
- package/.ai/ai_ref_AbNumberField.md +84 -84
- package/.ai/ai_ref_AbPopover.md +64 -64
- package/.ai/ai_ref_AbPricingCard.md +64 -64
- package/.ai/ai_ref_AbPricingContainer.md +49 -49
- package/.ai/ai_ref_AbPricingTable.md +72 -72
- package/.ai/ai_ref_AbProgressbar.md +44 -37
- package/.ai/ai_ref_AbScrollbar.md +48 -48
- package/.ai/ai_ref_AbSettingsForm.md +54 -54
- package/.ai/ai_ref_AbSideMenuItem.md +58 -58
- package/.ai/ai_ref_AbSidebar.md +70 -70
- package/.ai/ai_ref_AbSkeleton.md +41 -41
- package/.ai/ai_ref_AbSlider.md +71 -71
- package/.ai/ai_ref_AbTab.md +38 -38
- package/.ai/ai_ref_AbTable.md +59 -59
- package/.ai/ai_ref_AbTabs.md +47 -47
- package/.ai/ai_ref_AbToggle.md +65 -65
- package/.ai/ai_ref_AbTooltip.md +53 -53
- package/.ai/ai_ref_AbWizard.md +77 -77
- package/.ai/ai_ref_AbWizardStep.md +48 -48
- package/.ai/ai_ref_abEventBus.md +94 -0
- package/.ai/ai_ref_abRequestParam.md +55 -0
- package/.ai/ai_ref_abTranslate.md +33 -0
- package/.ai/ai_ref_abVeeRules.md +42 -0
- package/.ai/ai_ref_useAlert.md +63 -0
- package/.ai/ai_ref_useFileValidator.md +46 -0
- package/.ai/ai_ref_useResponsive.md +55 -0
- package/.ai/ai_ref_useTheme.md +39 -0
- package/.ai/ai_ref_useToast.md +42 -0
- package/AI_REFERENCE.md +68 -112
- package/design-system.md +403 -0
- package/dist/skins/black.css +1 -1
- package/dist/skins/cyan.css +1 -1
- package/dist/skins/default.css +1 -1
- package/dist/skins/gray.css +1 -1
- package/dist/skins/green.css +1 -1
- package/dist/skins/orange.css +1 -1
- package/dist/skins/pink.css +1 -1
- package/dist/skins/purple.css +1 -1
- package/dist/skins/red.css +1 -1
- package/dist/skins/red.scss +3 -3
- package/dist/skins/themes/_common_variable.scss +2 -0
- package/dist/skins/themes/_red.scss +6 -6
- package/dist/skins/violet.css +1 -1
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +114 -41
- package/dist/vue3-appsbd-ui.es.js +27212 -4646
- package/package.json +10 -4
- package/readme.md +136 -136
package/.ai/ai_ref_AbModal.md
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
# AbModal — AI Reference
|
|
2
|
-
|
|
3
|
-
Full-featured dialog with a built-in VeeValidate `<Form>`, loader overlay, and "message-only" mode. Exposes imperative methods for showing loaders, clearing forms, and closing.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Globally registered by the plugin.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```vue
|
|
12
|
-
<template>
|
|
13
|
-
<ab-button class="btn-primary" @click="modalRef.open = true">Open</ab-button>
|
|
14
|
-
|
|
15
|
-
<ab-modal
|
|
16
|
-
ref="modal"
|
|
17
|
-
v-model:is-modal-visible="isOpen"
|
|
18
|
-
modal-size="modal-lg"
|
|
19
|
-
@on-submit="handleSubmit"
|
|
20
|
-
@close="isOpen = false"
|
|
21
|
-
>
|
|
22
|
-
<template #headerTitle>Edit profile</template>
|
|
23
|
-
|
|
24
|
-
<!-- default slot receives VeeValidate Form context -->
|
|
25
|
-
<ab-input-field name="email" label="Email" rules="required|email" v-model="form.email" />
|
|
26
|
-
|
|
27
|
-
<template #footer="{ close }">
|
|
28
|
-
<ab-button class="btn-outline-secondary" @click="close">Cancel</ab-button>
|
|
29
|
-
<ab-button class="btn-primary" type="submit">Save</ab-button>
|
|
30
|
-
</template>
|
|
31
|
-
</ab-modal>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script setup>
|
|
35
|
-
import { ref } from 'vue';
|
|
36
|
-
const isOpen = ref(false);
|
|
37
|
-
const modal = ref(null);
|
|
38
|
-
const form = ref({ email: '' });
|
|
39
|
-
|
|
40
|
-
async function handleSubmit(values, { resetForm }) {
|
|
41
|
-
modal.value.showLoader(true, 'Saving…');
|
|
42
|
-
await api.save(values);
|
|
43
|
-
modal.value.showLoader(false);
|
|
44
|
-
modal.value.close();
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Props
|
|
50
|
-
|
|
51
|
-
| Name | Type | Default | Description |
|
|
52
|
-
| --- | --- | --- | --- |
|
|
53
|
-
| `isModalVisible` | `Boolean` | — | Visibility state (supports `v-model:is-modal-visible`). |
|
|
54
|
-
| `modalSize` | `String` | `""` | Bootstrap size class (`modal-sm`, `modal-lg`, `modal-xl`). |
|
|
55
|
-
| `modalMsg` | `String` | `""` | Default message for message-only mode. |
|
|
56
|
-
| `hideHeader` | `Boolean` | `false` | Hide the header section entirely. |
|
|
57
|
-
| `hideBody` | `Boolean` | `false` | Hide the body section entirely. |
|
|
58
|
-
| `hideFooter` | `Boolean` | `false` | Hide the footer section entirely. |
|
|
59
|
-
| `hideCrossBtn` | `Boolean` | `false` | Hide the top-right close button. |
|
|
60
|
-
| `hideForm` | `Boolean` | `false` | Render the root as a plain `<div>` instead of a VeeValidate `<Form>`. |
|
|
61
|
-
| `bodyClass` | `String` | `""` | Extra class on the body section. |
|
|
62
|
-
| `isModalCenter` | `Boolean` | `true` | Vertically center the modal. |
|
|
63
|
-
| `isBorder` | `Boolean` | `false` | Show a border around the modal content. |
|
|
64
|
-
| `iconContainerClass` | `String` | `""` | Extra class on the header icon container. |
|
|
65
|
-
| `headerClass` | `String` | `""` | Preferred extra class on the header. |
|
|
66
|
-
| `headerrClass` | `String` | `""` | Legacy alias for `headerClass`. `headerClass` takes precedence when both are provided. |
|
|
67
|
-
|
|
68
|
-
## Events
|
|
69
|
-
|
|
70
|
-
| Event | Payload | Description |
|
|
71
|
-
| --- | --- | --- |
|
|
72
|
-
| `onSubmit` | `(event, { resetForm })` | Fired when the internal VeeValidate form is submitted. |
|
|
73
|
-
| `loading-status` | `Boolean` | Emitted whenever the loader state toggles. |
|
|
74
|
-
| `close` | — | Modal was closed (via ✕, Escape, or `close()`). |
|
|
75
|
-
|
|
76
|
-
## Slots
|
|
77
|
-
|
|
78
|
-
| Name | Scope | Description |
|
|
79
|
-
| --- | --- | --- |
|
|
80
|
-
| `default` | VeeValidate `Form` slot-props | Form / body content when `hideForm` is `false`. |
|
|
81
|
-
| `header` | — | Overrides the entire header. |
|
|
82
|
-
| `headerIcon` | — | Icon shown at the start of the header. |
|
|
83
|
-
| `headerTitleContainer` | — | Overrides the title/subtitle wrapper. |
|
|
84
|
-
| `headerTitle` | — | Modal title text. |
|
|
85
|
-
| `headerSubTitle` | — | Modal subtitle text. |
|
|
86
|
-
| `body` | — | Overrides the body section. |
|
|
87
|
-
| `loader` | — | Overrides the default loader element. |
|
|
88
|
-
| `footer` | `{ close }` | Footer content — receives a `close()` function. |
|
|
89
|
-
|
|
90
|
-
## Exposed Methods (via template ref)
|
|
91
|
-
|
|
92
|
-
| Method | Description |
|
|
93
|
-
| --- | --- |
|
|
94
|
-
| `showLoader(status, msg?)` | Show/hide the loader with an optional message. |
|
|
95
|
-
| `close()` | Close the modal. |
|
|
96
|
-
| `clearForm()` | Reset the VeeValidate form and close. |
|
|
97
|
-
| `returnClear()` | Reset the form without closing. |
|
|
98
|
-
| `showMsgOnly(msg, isHideFooter?)` | Switch to message-only mode. |
|
|
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. Exposes imperative methods for showing loaders, clearing forms, and closing.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-button class="btn-primary" @click="modalRef.open = true">Open</ab-button>
|
|
14
|
+
|
|
15
|
+
<ab-modal
|
|
16
|
+
ref="modal"
|
|
17
|
+
v-model:is-modal-visible="isOpen"
|
|
18
|
+
modal-size="modal-lg"
|
|
19
|
+
@on-submit="handleSubmit"
|
|
20
|
+
@close="isOpen = false"
|
|
21
|
+
>
|
|
22
|
+
<template #headerTitle>Edit profile</template>
|
|
23
|
+
|
|
24
|
+
<!-- default slot receives VeeValidate Form context -->
|
|
25
|
+
<ab-input-field name="email" label="Email" rules="required|email" v-model="form.email" />
|
|
26
|
+
|
|
27
|
+
<template #footer="{ close }">
|
|
28
|
+
<ab-button class="btn-outline-secondary" @click="close">Cancel</ab-button>
|
|
29
|
+
<ab-button class="btn-primary" type="submit">Save</ab-button>
|
|
30
|
+
</template>
|
|
31
|
+
</ab-modal>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup>
|
|
35
|
+
import { ref } from 'vue';
|
|
36
|
+
const isOpen = ref(false);
|
|
37
|
+
const modal = ref(null);
|
|
38
|
+
const form = ref({ email: '' });
|
|
39
|
+
|
|
40
|
+
async function handleSubmit(values, { resetForm }) {
|
|
41
|
+
modal.value.showLoader(true, 'Saving…');
|
|
42
|
+
await api.save(values);
|
|
43
|
+
modal.value.showLoader(false);
|
|
44
|
+
modal.value.close();
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Props
|
|
50
|
+
|
|
51
|
+
| Name | Type | Default | Description |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| `isModalVisible` | `Boolean` | — | Visibility state (supports `v-model:is-modal-visible`). |
|
|
54
|
+
| `modalSize` | `String` | `""` | Bootstrap size class (`modal-sm`, `modal-lg`, `modal-xl`). |
|
|
55
|
+
| `modalMsg` | `String` | `""` | Default message for message-only mode. |
|
|
56
|
+
| `hideHeader` | `Boolean` | `false` | Hide the header section entirely. |
|
|
57
|
+
| `hideBody` | `Boolean` | `false` | Hide the body section entirely. |
|
|
58
|
+
| `hideFooter` | `Boolean` | `false` | Hide the footer section entirely. |
|
|
59
|
+
| `hideCrossBtn` | `Boolean` | `false` | Hide the top-right close button. |
|
|
60
|
+
| `hideForm` | `Boolean` | `false` | Render the root as a plain `<div>` instead of a VeeValidate `<Form>`. |
|
|
61
|
+
| `bodyClass` | `String` | `""` | Extra class on the body section. |
|
|
62
|
+
| `isModalCenter` | `Boolean` | `true` | Vertically center the modal. |
|
|
63
|
+
| `isBorder` | `Boolean` | `false` | Show a border around the modal content. |
|
|
64
|
+
| `iconContainerClass` | `String` | `""` | Extra class on the header icon container. |
|
|
65
|
+
| `headerClass` | `String` | `""` | Preferred extra class on the header. |
|
|
66
|
+
| `headerrClass` | `String` | `""` | Legacy alias for `headerClass`. `headerClass` takes precedence when both are provided. |
|
|
67
|
+
|
|
68
|
+
## Events
|
|
69
|
+
|
|
70
|
+
| Event | Payload | Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `onSubmit` | `(event, { resetForm })` | Fired when the internal VeeValidate form is submitted. |
|
|
73
|
+
| `loading-status` | `Boolean` | Emitted whenever the loader state toggles. |
|
|
74
|
+
| `close` | — | Modal was closed (via ✕, Escape, or `close()`). |
|
|
75
|
+
|
|
76
|
+
## Slots
|
|
77
|
+
|
|
78
|
+
| Name | Scope | Description |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| `default` | VeeValidate `Form` slot-props | Form / body content when `hideForm` is `false`. |
|
|
81
|
+
| `header` | — | Overrides the entire header. |
|
|
82
|
+
| `headerIcon` | — | Icon shown at the start of the header. |
|
|
83
|
+
| `headerTitleContainer` | — | Overrides the title/subtitle wrapper. |
|
|
84
|
+
| `headerTitle` | — | Modal title text. |
|
|
85
|
+
| `headerSubTitle` | — | Modal subtitle text. |
|
|
86
|
+
| `body` | — | Overrides the body section. |
|
|
87
|
+
| `loader` | — | Overrides the default loader element. |
|
|
88
|
+
| `footer` | `{ close }` | Footer content — receives a `close()` function. |
|
|
89
|
+
|
|
90
|
+
## Exposed Methods (via template ref)
|
|
91
|
+
|
|
92
|
+
| Method | Description |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `showLoader(status, msg?)` | Show/hide the loader with an optional message. |
|
|
95
|
+
| `close()` | Close the modal. |
|
|
96
|
+
| `clearForm()` | Reset the VeeValidate form and close. |
|
|
97
|
+
| `returnClear()` | Reset the form without closing. |
|
|
98
|
+
| `showMsgOnly(msg, isHideFooter?)` | Switch to message-only mode. |
|
|
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.
|
|
@@ -77,6 +77,8 @@ Globally registered by the plugin.
|
|
|
77
77
|
| `appendToBody` | `Boolean` | `true` | Teleport the dropdown to `<body>`. |
|
|
78
78
|
| `isLeftIconBorder` | `Boolean` | `false` | Border on prefix icon. |
|
|
79
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"`). |
|
|
80
82
|
|
|
81
83
|
## Events
|
|
82
84
|
|
|
@@ -96,8 +98,10 @@ Globally registered by the plugin.
|
|
|
96
98
|
| --- | --- | --- |
|
|
97
99
|
| `label` | — | Custom label. |
|
|
98
100
|
| `prefix` | — | Prefix slot. |
|
|
101
|
+
| `icon` | — | Custom icon slot. |
|
|
99
102
|
| `postfix` | — | Postfix slot. |
|
|
100
103
|
| `singlelabel` | `value` | Custom single-mode label rendering. |
|
|
104
|
+
| `taglabel` | `value` | Custom tag-mode label rendering. |
|
|
101
105
|
| `option` | `{ option, isSelected }` | Custom option rendering. |
|
|
102
106
|
| `noresults` | — | Empty state content. |
|
|
103
107
|
| `option-loading` | — | Loading message. |
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
# AbNumberField — AI Reference
|
|
2
|
-
|
|
3
|
-
Numeric input with built-in minus/plus buttons, min/max clamping, custom step, and VeeValidate integration. Renders as a seamless pill by default; pass `is-border` to show the internal dividers between the buttons and the input.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Globally registered by the plugin. Peer dependencies: `vee-validate`, `@vee-validate/rules`, `lucide-vue-next` (for the plus/minus icons).
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```vue
|
|
12
|
-
<template>
|
|
13
|
-
<ab-number-field
|
|
14
|
-
v-model="qty"
|
|
15
|
-
name="quantity"
|
|
16
|
-
label="Quantity"
|
|
17
|
-
:min="1"
|
|
18
|
-
:max="10"
|
|
19
|
-
:step="1"
|
|
20
|
-
hints="Clamped between 1 and 10"
|
|
21
|
-
/>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup>
|
|
25
|
-
import { ref } from 'vue';
|
|
26
|
-
const qty = ref(1);
|
|
27
|
-
</script>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Bordered variant (inner borders around buttons):
|
|
31
|
-
|
|
32
|
-
```vue
|
|
33
|
-
<ab-number-field
|
|
34
|
-
v-model="qty"
|
|
35
|
-
name="quantity"
|
|
36
|
-
label="Quantity"
|
|
37
|
-
is-border
|
|
38
|
-
/>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Props
|
|
42
|
-
|
|
43
|
-
| Name | Type | Default | Description |
|
|
44
|
-
| --- | --- | --- | --- |
|
|
45
|
-
| `modelValue` | `any` | `null` | Two-way-bound numeric value. |
|
|
46
|
-
| `label` | `String` | `""` | Field label. |
|
|
47
|
-
| `placeholder` | `String` | `""` | Input placeholder. |
|
|
48
|
-
| `name` | `String` | **required** | VeeValidate field name. |
|
|
49
|
-
| `rules` | `String \| Object` | `""` | VeeValidate rules. |
|
|
50
|
-
| `containerClass` | `String` | `"mb-3"` | Class on the wrapper `<div>`. |
|
|
51
|
-
| `hints` | `String` | `""` | Helper text beneath the input. |
|
|
52
|
-
| `prefix` | `String` | `""` | Prefix text/icon (shortcut for `#prefix` slot). |
|
|
53
|
-
| `postfix` | `String` | `""` | Postfix text/icon. |
|
|
54
|
-
| `min` | `Number \| String` | `null` | Minimum allowed value. Clamps input and disables the minus button at the floor. |
|
|
55
|
-
| `max` | `Number \| String` | `null` | Maximum allowed value. Clamps input and disables the plus button at the ceiling. |
|
|
56
|
-
| `step` | `Number \| String` | `1` | Increment/decrement amount. |
|
|
57
|
-
| `showButtons` | `Boolean` | `true` | Render the minus/plus controls. |
|
|
58
|
-
| `disabled` | `Boolean` | `false` | Disable the field and both buttons. |
|
|
59
|
-
| `isBorder` | `Boolean` | `false` | Show inner borders between minus/input/plus. Default is a seamless pill. |
|
|
60
|
-
| `isLeftIconBorder` | `Boolean` | `false` | Render border between the prefix icon and the input. |
|
|
61
|
-
| `isRightIconBorder` | `Boolean` | `false` | Render border between the postfix icon and the input. |
|
|
62
|
-
|
|
63
|
-
## Events
|
|
64
|
-
|
|
65
|
-
| Event | Payload | Description |
|
|
66
|
-
| --- | --- | --- |
|
|
67
|
-
| `update:modelValue` | `number \| null` | v-model sync. |
|
|
68
|
-
| `input` | `number` | Fired on input after clamping. |
|
|
69
|
-
| `keyup` | `KeyboardEvent` | Forwarded native event. |
|
|
70
|
-
| `keydown` | `KeyboardEvent` | Forwarded native event. |
|
|
71
|
-
| `paste` | `ClipboardEvent` | Forwarded native event. |
|
|
72
|
-
|
|
73
|
-
## Slots
|
|
74
|
-
|
|
75
|
-
| Name | Description |
|
|
76
|
-
| --- | --- |
|
|
77
|
-
| `label` | Custom label content. |
|
|
78
|
-
| `prefix` | Prefix icon / text (rendered before the minus button). |
|
|
79
|
-
| `postfix` | Postfix icon / text (rendered after the plus button). |
|
|
80
|
-
| `hints` | Helper text (overrides `hints` prop). |
|
|
81
|
-
|
|
82
|
-
## v-model
|
|
83
|
-
|
|
84
|
-
Yes — `modelValue` + `update:modelValue`. Value is `number` after clamping, or `null` when the user clears the input.
|
|
1
|
+
# AbNumberField — AI Reference
|
|
2
|
+
|
|
3
|
+
Numeric input with built-in minus/plus buttons, min/max clamping, custom step, and VeeValidate integration. Renders as a seamless pill by default; pass `is-border` to show the internal dividers between the buttons and the input.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin. Peer dependencies: `vee-validate`, `@vee-validate/rules`, `lucide-vue-next` (for the plus/minus icons).
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-number-field
|
|
14
|
+
v-model="qty"
|
|
15
|
+
name="quantity"
|
|
16
|
+
label="Quantity"
|
|
17
|
+
:min="1"
|
|
18
|
+
:max="10"
|
|
19
|
+
:step="1"
|
|
20
|
+
hints="Clamped between 1 and 10"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref } from 'vue';
|
|
26
|
+
const qty = ref(1);
|
|
27
|
+
</script>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Bordered variant (inner borders around buttons):
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<ab-number-field
|
|
34
|
+
v-model="qty"
|
|
35
|
+
name="quantity"
|
|
36
|
+
label="Quantity"
|
|
37
|
+
is-border
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Props
|
|
42
|
+
|
|
43
|
+
| Name | Type | Default | Description |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| `modelValue` | `any` | `null` | Two-way-bound numeric value. |
|
|
46
|
+
| `label` | `String` | `""` | Field label. |
|
|
47
|
+
| `placeholder` | `String` | `""` | Input placeholder. |
|
|
48
|
+
| `name` | `String` | **required** | VeeValidate field name. |
|
|
49
|
+
| `rules` | `String \| Object` | `""` | VeeValidate rules. |
|
|
50
|
+
| `containerClass` | `String` | `"mb-3"` | Class on the wrapper `<div>`. |
|
|
51
|
+
| `hints` | `String` | `""` | Helper text beneath the input. |
|
|
52
|
+
| `prefix` | `String` | `""` | Prefix text/icon (shortcut for `#prefix` slot). |
|
|
53
|
+
| `postfix` | `String` | `""` | Postfix text/icon. |
|
|
54
|
+
| `min` | `Number \| String` | `null` | Minimum allowed value. Clamps input and disables the minus button at the floor. |
|
|
55
|
+
| `max` | `Number \| String` | `null` | Maximum allowed value. Clamps input and disables the plus button at the ceiling. |
|
|
56
|
+
| `step` | `Number \| String` | `1` | Increment/decrement amount. |
|
|
57
|
+
| `showButtons` | `Boolean` | `true` | Render the minus/plus controls. |
|
|
58
|
+
| `disabled` | `Boolean` | `false` | Disable the field and both buttons. |
|
|
59
|
+
| `isBorder` | `Boolean` | `false` | Show inner borders between minus/input/plus. Default is a seamless pill. |
|
|
60
|
+
| `isLeftIconBorder` | `Boolean` | `false` | Render border between the prefix icon and the input. |
|
|
61
|
+
| `isRightIconBorder` | `Boolean` | `false` | Render border between the postfix icon and the input. |
|
|
62
|
+
|
|
63
|
+
## Events
|
|
64
|
+
|
|
65
|
+
| Event | Payload | Description |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `update:modelValue` | `number \| null` | v-model sync. |
|
|
68
|
+
| `input` | `number` | Fired on input after clamping. |
|
|
69
|
+
| `keyup` | `KeyboardEvent` | Forwarded native event. |
|
|
70
|
+
| `keydown` | `KeyboardEvent` | Forwarded native event. |
|
|
71
|
+
| `paste` | `ClipboardEvent` | Forwarded native event. |
|
|
72
|
+
|
|
73
|
+
## Slots
|
|
74
|
+
|
|
75
|
+
| Name | Description |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `label` | Custom label content. |
|
|
78
|
+
| `prefix` | Prefix icon / text (rendered before the minus button). |
|
|
79
|
+
| `postfix` | Postfix icon / text (rendered after the plus button). |
|
|
80
|
+
| `hints` | Helper text (overrides `hints` prop). |
|
|
81
|
+
|
|
82
|
+
## v-model
|
|
83
|
+
|
|
84
|
+
Yes — `modelValue` + `update:modelValue`. Value is `number` after clamping, or `null` when the user clears the input.
|
package/.ai/ai_ref_AbPopover.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# AbPopover — AI Reference
|
|
2
|
-
|
|
3
|
-
Dependency-free interactive popover with click, hover, focus, touch, or manual triggers. Content slot receives imperative `close`, `hide`, `show`, and `toggle` helpers.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Globally registered by the plugin.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```vue
|
|
12
|
-
<template>
|
|
13
|
-
<ab-popover placement="bottom" trigger="click">
|
|
14
|
-
<ab-button class="btn-primary">Menu</ab-button>
|
|
15
|
-
<template #content="{ close }">
|
|
16
|
-
<div class="popover-menu">
|
|
17
|
-
<button @click="edit(); close()">Edit</button>
|
|
18
|
-
<button @click="duplicate(); close()">Duplicate</button>
|
|
19
|
-
<button class="text-danger" @click="remove(); close()">Delete</button>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
</ab-popover>
|
|
23
|
-
|
|
24
|
-
<!-- Hover + focus triggers -->
|
|
25
|
-
<ab-popover :trigger="['hover', 'focus']" placement="top">
|
|
26
|
-
<span>Hover me</span>
|
|
27
|
-
<template #content>Rich popover content</template>
|
|
28
|
-
</ab-popover>
|
|
29
|
-
</template>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Props
|
|
33
|
-
|
|
34
|
-
| Name | Type | Default | Description |
|
|
35
|
-
| --- | --- | --- | --- |
|
|
36
|
-
| `placement` | `String` | `"bottom"` | `top`, `bottom`, `left`, `right`, or `auto-*`. |
|
|
37
|
-
| `offset` | `Number \| String` | `8` | Offset from the reference. |
|
|
38
|
-
| `gap` | `Number \| String` | `null` | Gap override (used instead of `offset` when set). |
|
|
39
|
-
| `disabled` | `Boolean` | `false` | Disable the popover. |
|
|
40
|
-
| `arrow` | `Boolean` | `true` | Render the arrow pointer. |
|
|
41
|
-
| `arrowPadding` | `Number` | `4` | Padding between arrow and corner. |
|
|
42
|
-
| `trigger` | `String \| Array` | `"click"` | `click`, `hover`, `focus`, `touch`, `manual`. Space-separated string or array. |
|
|
43
|
-
| `autoHide` | `Boolean` | `true` | Close when clicking outside. |
|
|
44
|
-
| `contentClass` | `String` | `""` | Extra class on the content element. |
|
|
45
|
-
| `referenceSelector` | `String` | `null` | CSS selector inside the trigger to anchor positioning. |
|
|
46
|
-
|
|
47
|
-
## Events
|
|
48
|
-
|
|
49
|
-
| Event | Payload | Description |
|
|
50
|
-
| --- | --- | --- |
|
|
51
|
-
| `update:modelValue` | `visible: Boolean` | Visibility change (supports `v-model`). |
|
|
52
|
-
| `show` | — | Popover shown. |
|
|
53
|
-
| `hide` | — | Popover hidden. |
|
|
54
|
-
|
|
55
|
-
## Slots
|
|
56
|
-
|
|
57
|
-
| Name | Scope | Description |
|
|
58
|
-
| --- | --- | --- |
|
|
59
|
-
| `default` | — | Trigger element. |
|
|
60
|
-
| `content` | `{ close, hide, show, toggle }` | Popover content — receives imperative controls. |
|
|
61
|
-
|
|
62
|
-
## v-model
|
|
63
|
-
|
|
64
|
-
Yes — binds visibility.
|
|
1
|
+
# AbPopover — AI Reference
|
|
2
|
+
|
|
3
|
+
Dependency-free interactive popover with click, hover, focus, touch, or manual triggers. Content slot receives imperative `close`, `hide`, `show`, and `toggle` helpers.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-popover placement="bottom" trigger="click">
|
|
14
|
+
<ab-button class="btn-primary">Menu</ab-button>
|
|
15
|
+
<template #content="{ close }">
|
|
16
|
+
<div class="popover-menu">
|
|
17
|
+
<button @click="edit(); close()">Edit</button>
|
|
18
|
+
<button @click="duplicate(); close()">Duplicate</button>
|
|
19
|
+
<button class="text-danger" @click="remove(); close()">Delete</button>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</ab-popover>
|
|
23
|
+
|
|
24
|
+
<!-- Hover + focus triggers -->
|
|
25
|
+
<ab-popover :trigger="['hover', 'focus']" placement="top">
|
|
26
|
+
<span>Hover me</span>
|
|
27
|
+
<template #content>Rich popover content</template>
|
|
28
|
+
</ab-popover>
|
|
29
|
+
</template>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
| Name | Type | Default | Description |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| `placement` | `String` | `"bottom"` | `top`, `bottom`, `left`, `right`, or `auto-*`. |
|
|
37
|
+
| `offset` | `Number \| String` | `8` | Offset from the reference. |
|
|
38
|
+
| `gap` | `Number \| String` | `null` | Gap override (used instead of `offset` when set). |
|
|
39
|
+
| `disabled` | `Boolean` | `false` | Disable the popover. |
|
|
40
|
+
| `arrow` | `Boolean` | `true` | Render the arrow pointer. |
|
|
41
|
+
| `arrowPadding` | `Number` | `4` | Padding between arrow and corner. |
|
|
42
|
+
| `trigger` | `String \| Array` | `"click"` | `click`, `hover`, `focus`, `touch`, `manual`. Space-separated string or array. |
|
|
43
|
+
| `autoHide` | `Boolean` | `true` | Close when clicking outside. |
|
|
44
|
+
| `contentClass` | `String` | `""` | Extra class on the content element. |
|
|
45
|
+
| `referenceSelector` | `String` | `null` | CSS selector inside the trigger to anchor positioning. |
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
| Event | Payload | Description |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `update:modelValue` | `visible: Boolean` | Visibility change (supports `v-model`). |
|
|
52
|
+
| `show` | — | Popover shown. |
|
|
53
|
+
| `hide` | — | Popover hidden. |
|
|
54
|
+
|
|
55
|
+
## Slots
|
|
56
|
+
|
|
57
|
+
| Name | Scope | Description |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| `default` | — | Trigger element. |
|
|
60
|
+
| `content` | `{ close, hide, show, toggle }` | Popover content — receives imperative controls. |
|
|
61
|
+
|
|
62
|
+
## v-model
|
|
63
|
+
|
|
64
|
+
Yes — binds visibility.
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# AbPricingCard — AI Reference
|
|
2
|
-
|
|
3
|
-
Single pricing tier card. Use multiple inside `AbPricingContainer` to build a pricing table.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Globally registered by the plugin.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```vue
|
|
12
|
-
<template>
|
|
13
|
-
<ab-pricing-card
|
|
14
|
-
title="Pro"
|
|
15
|
-
amount="49"
|
|
16
|
-
regular-amount="79"
|
|
17
|
-
frequency="/month"
|
|
18
|
-
badge="Popular"
|
|
19
|
-
color="primary"
|
|
20
|
-
variant="highlighted"
|
|
21
|
-
recommended
|
|
22
|
-
:features="[
|
|
23
|
-
{ text: 'Unlimited projects' },
|
|
24
|
-
{ text: 'Priority support' },
|
|
25
|
-
{ text: 'Custom domain', disabled: true },
|
|
26
|
-
]"
|
|
27
|
-
>
|
|
28
|
-
<template #action>
|
|
29
|
-
<ab-button class="btn-primary w-100">Choose Pro</ab-button>
|
|
30
|
-
</template>
|
|
31
|
-
</ab-pricing-card>
|
|
32
|
-
</template>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Props
|
|
36
|
-
|
|
37
|
-
| Name | Type | Default | Description |
|
|
38
|
-
| --- | --- | --- | --- |
|
|
39
|
-
| `title` | `String` | `""` | Tier title. |
|
|
40
|
-
| `amount` | `String \| Number` | `undefined` | Current price. |
|
|
41
|
-
| `regularAmount` | `String \| Number` | `undefined` | Original price (rendered with strikethrough). |
|
|
42
|
-
| `frequency` | `String` | `""` | Billing frequency suffix (e.g. `/month`). |
|
|
43
|
-
| `badge` | `String` | `""` | Badge text (e.g. "Popular"). |
|
|
44
|
-
| `active` | `Boolean` | `false` | Highlight this card as currently active. |
|
|
45
|
-
| `recommended` | `Boolean` | `false` | Show a "Recommended" ribbon. |
|
|
46
|
-
| `color` | `String` | `"primary"` | Color theme (Bootstrap color). |
|
|
47
|
-
| `variant` | `String` | `"default"` | `default`, `minimal`, `highlighted`, `badge-price`. |
|
|
48
|
-
| `features` | `Array` | `[]` | Each `{ text, disabled? }` or a string. |
|
|
49
|
-
|
|
50
|
-
## Events
|
|
51
|
-
|
|
52
|
-
None.
|
|
53
|
-
|
|
54
|
-
## Slots
|
|
55
|
-
|
|
56
|
-
| Name | Scope | Description |
|
|
57
|
-
| --- | --- | --- |
|
|
58
|
-
| `header` | — | Custom header content. |
|
|
59
|
-
| `badge` | — | Custom badge. |
|
|
60
|
-
| `badge-icon` | — | Icon inside the badge. |
|
|
61
|
-
| `price` | — | Custom price section. |
|
|
62
|
-
| `features` | — | Custom features list. |
|
|
63
|
-
| `feature-icon` | `{ feature, index }` | Custom icon per feature row. |
|
|
64
|
-
| `action` | — | CTA button / actions. |
|
|
1
|
+
# AbPricingCard — AI Reference
|
|
2
|
+
|
|
3
|
+
Single pricing tier card. Use multiple inside `AbPricingContainer` to build a pricing table.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-pricing-card
|
|
14
|
+
title="Pro"
|
|
15
|
+
amount="49"
|
|
16
|
+
regular-amount="79"
|
|
17
|
+
frequency="/month"
|
|
18
|
+
badge="Popular"
|
|
19
|
+
color="primary"
|
|
20
|
+
variant="highlighted"
|
|
21
|
+
recommended
|
|
22
|
+
:features="[
|
|
23
|
+
{ text: 'Unlimited projects' },
|
|
24
|
+
{ text: 'Priority support' },
|
|
25
|
+
{ text: 'Custom domain', disabled: true },
|
|
26
|
+
]"
|
|
27
|
+
>
|
|
28
|
+
<template #action>
|
|
29
|
+
<ab-button class="btn-primary w-100">Choose Pro</ab-button>
|
|
30
|
+
</template>
|
|
31
|
+
</ab-pricing-card>
|
|
32
|
+
</template>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Name | Type | Default | Description |
|
|
38
|
+
| --- | --- | --- | --- |
|
|
39
|
+
| `title` | `String` | `""` | Tier title. |
|
|
40
|
+
| `amount` | `String \| Number` | `undefined` | Current price. |
|
|
41
|
+
| `regularAmount` | `String \| Number` | `undefined` | Original price (rendered with strikethrough). |
|
|
42
|
+
| `frequency` | `String` | `""` | Billing frequency suffix (e.g. `/month`). |
|
|
43
|
+
| `badge` | `String` | `""` | Badge text (e.g. "Popular"). |
|
|
44
|
+
| `active` | `Boolean` | `false` | Highlight this card as currently active. |
|
|
45
|
+
| `recommended` | `Boolean` | `false` | Show a "Recommended" ribbon. |
|
|
46
|
+
| `color` | `String` | `"primary"` | Color theme (Bootstrap color). |
|
|
47
|
+
| `variant` | `String` | `"default"` | `default`, `minimal`, `highlighted`, `badge-price`. |
|
|
48
|
+
| `features` | `Array` | `[]` | Each `{ text, disabled? }` or a string. |
|
|
49
|
+
|
|
50
|
+
## Events
|
|
51
|
+
|
|
52
|
+
None.
|
|
53
|
+
|
|
54
|
+
## Slots
|
|
55
|
+
|
|
56
|
+
| Name | Scope | Description |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `header` | — | Custom header content. |
|
|
59
|
+
| `badge` | — | Custom badge. |
|
|
60
|
+
| `badge-icon` | — | Icon inside the badge. |
|
|
61
|
+
| `price` | — | Custom price section. |
|
|
62
|
+
| `features` | — | Custom features list. |
|
|
63
|
+
| `feature-icon` | `{ feature, index }` | Custom icon per feature row. |
|
|
64
|
+
| `action` | — | CTA button / actions. |
|