@appsbd/vue3-appsbd-ui 1.0.0
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 +43 -0
- package/.ai/ai_ref_AbBadge.md +44 -0
- package/.ai/ai_ref_AbButton.md +71 -0
- package/.ai/ai_ref_AbCard.md +53 -0
- package/.ai/ai_ref_AbCarousel.md +47 -0
- package/.ai/ai_ref_AbColorPicker.md +55 -0
- package/.ai/ai_ref_AbConfirmPopover.md +59 -0
- package/.ai/ai_ref_AbCustomField.md +74 -0
- package/.ai/ai_ref_AbDarkModeToggler.md +42 -0
- package/.ai/ai_ref_AbDateTimePicker.md +105 -0
- package/.ai/ai_ref_AbEasyModal.md +62 -0
- package/.ai/ai_ref_AbField.md +93 -0
- package/.ai/ai_ref_AbFileUploader.md +63 -0
- package/.ai/ai_ref_AbFilterPanel.md +71 -0
- package/.ai/ai_ref_AbFormCheck.md +75 -0
- package/.ai/ai_ref_AbImageRadioInput.md +63 -0
- package/.ai/ai_ref_AbInputField.md +71 -0
- package/.ai/ai_ref_AbInputTag.md +73 -0
- package/.ai/ai_ref_AbKbd.md +35 -0
- package/.ai/ai_ref_AbKbdGroup.md +33 -0
- package/.ai/ai_ref_AbModal.md +103 -0
- package/.ai/ai_ref_AbMultiSelect.md +108 -0
- package/.ai/ai_ref_AbNumberField.md +84 -0
- package/.ai/ai_ref_AbPinInput.md +45 -0
- package/.ai/ai_ref_AbPopover.md +64 -0
- package/.ai/ai_ref_AbPricingCard.md +64 -0
- package/.ai/ai_ref_AbPricingContainer.md +49 -0
- package/.ai/ai_ref_AbPricingTable.md +72 -0
- package/.ai/ai_ref_AbProgressbar.md +37 -0
- package/.ai/ai_ref_AbScrollbar.md +48 -0
- package/.ai/ai_ref_AbSettingsForm.md +54 -0
- package/.ai/ai_ref_AbSideMenuItem.md +58 -0
- package/.ai/ai_ref_AbSidebar.md +70 -0
- package/.ai/ai_ref_AbSkeleton.md +41 -0
- package/.ai/ai_ref_AbSlider.md +71 -0
- package/.ai/ai_ref_AbTab.md +38 -0
- package/.ai/ai_ref_AbTable.md +59 -0
- package/.ai/ai_ref_AbTabs.md +47 -0
- package/.ai/ai_ref_AbToggle.md +65 -0
- package/.ai/ai_ref_AbTooltip.md +53 -0
- package/.ai/ai_ref_AbWizard.md +77 -0
- package/.ai/ai_ref_AbWizardStep.md +48 -0
- package/.ai/ai_ref_global_config.md +66 -0
- package/.ai/ltr-after.png +0 -0
- package/.ai/rtl-after.png +0 -0
- package/.ai/rtl-before.png +0 -0
- package/AI_REFERENCE.md +1178 -0
- package/dist/skins/_prefix.scss +1 -0
- package/dist/skins/black.css +1 -0
- package/dist/skins/black.scss +3 -0
- package/dist/skins/cyan.css +1 -0
- package/dist/skins/cyan.scss +3 -0
- package/dist/skins/default.css +1 -0
- package/dist/skins/default.scss +5 -0
- package/dist/skins/gray.css +1 -0
- package/dist/skins/gray.scss +3 -0
- package/dist/skins/green.css +1 -0
- package/dist/skins/green.scss +5 -0
- package/dist/skins/orange.css +1 -0
- package/dist/skins/orange.scss +3 -0
- package/dist/skins/pink.css +1 -0
- package/dist/skins/pink.scss +3 -0
- package/dist/skins/purple.css +1 -0
- package/dist/skins/purple.scss +3 -0
- package/dist/skins/red.css +1 -0
- package/dist/skins/red.scss +3 -0
- package/dist/skins/themes/_black.scss +6 -0
- package/dist/skins/themes/_blue.scss +43 -0
- package/dist/skins/themes/_common_variable.scss +589 -0
- package/dist/skins/themes/_cyan.scss +6 -0
- package/dist/skins/themes/_gray.scss +6 -0
- package/dist/skins/themes/_green.scss +6 -0
- package/dist/skins/themes/_grid.scss +27 -0
- package/dist/skins/themes/_orange.scss +6 -0
- package/dist/skins/themes/_pink.scss +6 -0
- package/dist/skins/themes/_purple.scss +6 -0
- package/dist/skins/themes/_red.scss +6 -0
- package/dist/skins/themes/_violet.scss +6 -0
- package/dist/skins/violet.css +1 -0
- package/dist/skins/violet.scss +3 -0
- package/dist/style.css +1 -0
- package/dist/vue3-appsbd-ui.cjs.js +201 -0
- package/dist/vue3-appsbd-ui.es.js +9294 -0
- package/package.json +60 -0
- package/readme.md +136 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AbAvatar — AI Reference
|
|
2
|
+
|
|
3
|
+
Profile avatar component. Supports two variants: an `image` variant for displaying a photo, and an `add` variant that renders an "upload" placeholder for user-supplied files.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-avatar :src="user.avatarUrl" alt="Profile photo" />
|
|
14
|
+
|
|
15
|
+
<!-- File upload mode -->
|
|
16
|
+
<ab-avatar variant="add" />
|
|
17
|
+
</template>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
| Name | Type | Default | Description |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| `src` | `String` | `""` | Image source URL. |
|
|
25
|
+
| `alt` | `String` | `""` | Alt text. |
|
|
26
|
+
| `variant` | `String` | `"image"` | `"image"` or `"add"` (file-upload placeholder). |
|
|
27
|
+
| `size` | `String` | `"md"` | Avatar size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
|
|
28
|
+
| `isActive` | `Boolean` | `false` | Shows active status indicator. |
|
|
29
|
+
| `isVerified` | `Boolean` | `false` | Shows verified status indicator and badge. |
|
|
30
|
+
|
|
31
|
+
## Events
|
|
32
|
+
|
|
33
|
+
None.
|
|
34
|
+
|
|
35
|
+
## Slots
|
|
36
|
+
|
|
37
|
+
| Name | Description |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `default` | Additional content (overlays, badges, etc.). |
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
Sizes (`sm`, `md`, `lg`) and status indicators (`isActive`, `isVerified`) are natively supported through props.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# AbBadge — AI Reference
|
|
2
|
+
|
|
3
|
+
Lightweight Bootstrap badge wrapper used to display statuses or counts. Accepts props for size, variant, shape, and specialized icon variations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-badge variant="primary">New</ab-badge>
|
|
14
|
+
<ab-badge variant="success" is-rounded-pill>12</ab-badge>
|
|
15
|
+
<ab-badge variant="warning" is-outline>Pending</ab-badge>
|
|
16
|
+
</template>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `size` | `String` | `"md"` | Size of the badge (`sm`, `md`, `lg`). |
|
|
24
|
+
| `variant` | `String` | `"primary"` | Color theme (`primary`, `secondary`, `danger`, `warning`, `success`, `info`). |
|
|
25
|
+
| `isOutline` | `Boolean` | `false` | Outlined style with transparent background. |
|
|
26
|
+
| `isRoundedPill` | `Boolean` | `false` | Transforms badge to a fully rounded pill shape. |
|
|
27
|
+
| `isDot` | `Boolean` | `false` | Prepends a dot indicator layout. |
|
|
28
|
+
| `isAvatar` | `Boolean` | `false` | Adjusts layout to accommodate an avatar image/SVG. |
|
|
29
|
+
| `isClose` | `Boolean` | `false` | Adjusts padding and layout for a close icon. |
|
|
30
|
+
| `isAdd` | `Boolean` | `false` | Adjusts styling for an add/plus icon badge. |
|
|
31
|
+
|
|
32
|
+
## Events
|
|
33
|
+
|
|
34
|
+
None.
|
|
35
|
+
|
|
36
|
+
## Slots
|
|
37
|
+
|
|
38
|
+
| Name | Description |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `default` | Badge content. |
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
The component exposes dedicated props for the most common styling variants, but still passes `$attrs` seamlessly to the root `<span>`.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# AbButton — AI Reference
|
|
2
|
+
|
|
3
|
+
Highly customizable push button with an optional built-in loader animation and a leading icon slot. Styling variants and sizes are easily configured via props (`variant`, `size`, `isOutline`, `isIconBtn`).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the library plugin — use `<ab-button>` directly in any template after:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import AppsbdUI from 'vue3-appsbd-ui';
|
|
11
|
+
import 'vue3-appsbd-ui/dist/style.css';
|
|
12
|
+
app.use(AppsbdUI);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
No per-component import required.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```vue
|
|
20
|
+
<template>
|
|
21
|
+
<!-- Basic -->
|
|
22
|
+
<ab-button variant="primary">Save</ab-button>
|
|
23
|
+
|
|
24
|
+
<!-- With icon + divider -->
|
|
25
|
+
<ab-button outline-variant="secondary" is-outline show-icon-divider>
|
|
26
|
+
<template #icon><i class="bi bi-plus-lg"></i></template>
|
|
27
|
+
New Item
|
|
28
|
+
</ab-button>
|
|
29
|
+
|
|
30
|
+
<!-- Loading state -->
|
|
31
|
+
<ab-button variant="primary" :is-animated="isSaving" is-hide-text-on-animate>
|
|
32
|
+
Save
|
|
33
|
+
</ab-button>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup>
|
|
37
|
+
import { ref } from 'vue';
|
|
38
|
+
const isSaving = ref(false);
|
|
39
|
+
</script>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Props
|
|
43
|
+
|
|
44
|
+
| Name | Type | Default | Description |
|
|
45
|
+
| --- | --- | --- | --- |
|
|
46
|
+
| `type` | `String` | `"button"` | Native button type (`button`, `submit`, `reset`). |
|
|
47
|
+
| `variant` | `String` | `"primary"` | Color variant (primary, secondary, success, danger, warning, info, light, dark). |
|
|
48
|
+
| `outlineVariant` | `String` | `"primary"` | Color variant applied when `isOutline` is true. |
|
|
49
|
+
| `size` | `String` | `"md"` | Button size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
|
|
50
|
+
| `isOutline` | `Boolean` | `false` | Applies the outline style for the selected variant. |
|
|
51
|
+
| `isIconBtn` | `Boolean` | `false` | Formats the button styling for a single icon. |
|
|
52
|
+
| `isAnimated` | `Boolean` | `false` | When `true`, renders the loader SVG and optionally hides the label. |
|
|
53
|
+
| `isHideTextOnAnimate` | `Boolean` | `false` | Hides the default slot content while `isAnimated` is `true`. |
|
|
54
|
+
| `showIconDivider` | `Boolean` | `false` | Renders a vertical divider between the `#icon` slot and the label. |
|
|
55
|
+
|
|
56
|
+
## Events
|
|
57
|
+
|
|
58
|
+
No custom events emitted. All native button events (`click`, `focus`, `blur`, …) bubble up via `$attrs`.
|
|
59
|
+
|
|
60
|
+
## Slots
|
|
61
|
+
|
|
62
|
+
| Name | Scope | Description |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| `default` | — | Button label / content. |
|
|
65
|
+
| `icon` | — | Leading icon element (rendered before the label). |
|
|
66
|
+
| `svg` | — | Overrides the built-in loader SVG (only used while `isAnimated`). |
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Size and color are now controlled via the `size` and `variant` props rather than raw Bootstrap utility classes.
|
|
71
|
+
- If no `variant` prop is supplied, the component auto-applies `primary`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# AbCard — AI Reference
|
|
2
|
+
|
|
3
|
+
Flexible Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual variations (`tile-card`, `item-card`, `insight-card`, …) are applied through CSS classes on `containerClass` rather than separate components.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin — no import required.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
app.use(AppsbdUI);
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```vue
|
|
16
|
+
<template>
|
|
17
|
+
<ab-card container-class="insight-card" header-class="fw-semibold">
|
|
18
|
+
<template #header>Revenue this month</template>
|
|
19
|
+
<template #body>
|
|
20
|
+
<h3>$12,480</h3>
|
|
21
|
+
<p>+8.2% vs last month</p>
|
|
22
|
+
</template>
|
|
23
|
+
<template #footer>
|
|
24
|
+
<ab-button class="btn-outline-primary btn-sm">View Report</ab-button>
|
|
25
|
+
</template>
|
|
26
|
+
</ab-card>
|
|
27
|
+
</template>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
| Name | Type | Default | Description |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `containerClass` | `String` | `""` | CSS class applied to the card root (use to pick a layout variant). |
|
|
35
|
+
| `headerClass` | `String` | `""` | CSS class for the header section. |
|
|
36
|
+
| `bodyClass` | `String` | `""` | CSS class for the body section. |
|
|
37
|
+
| `footerClass` | `String` | `""` | CSS class for the footer section. |
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
## Slots
|
|
44
|
+
|
|
45
|
+
| Name | Description |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `header` | Card header content. Omit to hide the header. |
|
|
48
|
+
| `body` | Card body content. |
|
|
49
|
+
| `footer` | Card footer content. Omit to hide the footer. |
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- Do **not** create a new `.vue` file for card variations — define the variant as a CSS class in `src/styles/components/_card.scss` and pass it via `containerClass`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# AbCarousel — AI Reference
|
|
2
|
+
|
|
3
|
+
Rotating slider for images or arbitrary HTML content. Supports horizontal and vertical orientations, autoplay, edge-fade, and outside / hover-only navigation buttons.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<!-- Image carousel -->
|
|
14
|
+
<ab-carousel edge-fade autoplay :autoplay-interval="4000">
|
|
15
|
+
<img src="/slide1.jpg" alt="" />
|
|
16
|
+
<img src="/slide2.jpg" alt="" />
|
|
17
|
+
<img src="/slide3.jpg" alt="" />
|
|
18
|
+
</ab-carousel>
|
|
19
|
+
|
|
20
|
+
<!-- Card carousel, vertical orientation -->
|
|
21
|
+
<ab-carousel orientation="vertical" nav-outside nav-on-hover>
|
|
22
|
+
<ab-card v-for="card in cards" :key="card.id">…</ab-card>
|
|
23
|
+
</ab-carousel>
|
|
24
|
+
</template>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| `scrollAmount` | `Number` | `200` | Pixels scrolled per click. When children exist, falls back to item width. |
|
|
32
|
+
| `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
|
|
33
|
+
| `edgeFade` | `Boolean` | `false` | Fade the leading/trailing edges. |
|
|
34
|
+
| `autoplay` | `Boolean` | `false` | Auto-scroll enabled. |
|
|
35
|
+
| `autoplayInterval` | `Number` | `3000` | Autoplay interval in ms. |
|
|
36
|
+
| `navOutside` | `Boolean` | `false` | Render nav buttons outside the carousel. |
|
|
37
|
+
| `navOnHover` | `Boolean` | `false` | Show nav buttons only on hover. |
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
## Slots
|
|
44
|
+
|
|
45
|
+
| Name | Description |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `default` | Carousel items (images, cards, or arbitrary HTML). |
|
|
@@ -0,0 +1,55 @@
|
|
|
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).
|
|
@@ -0,0 +1,59 @@
|
|
|
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. |
|
|
@@ -0,0 +1,74 @@
|
|
|
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. |
|
|
@@ -0,0 +1,42 @@
|
|
|
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()`.
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
|
|
87
|
+
## Events
|
|
88
|
+
|
|
89
|
+
| Event | Payload | Description |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| `update:modelValue` | `value` | v-model sync. |
|
|
92
|
+
|
|
93
|
+
## Slots
|
|
94
|
+
|
|
95
|
+
| Name | Scope | Description |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| `label` | — | Custom label. |
|
|
98
|
+
| `prefix` | — | Prefix area. |
|
|
99
|
+
| `icon` | — | Calendar / clock icon. |
|
|
100
|
+
| `hints` | — | Custom hints. |
|
|
101
|
+
| `picker-container` | `{ isRange, showInInput, value }` | Override the entire picker UI. |
|
|
102
|
+
|
|
103
|
+
## v-model
|
|
104
|
+
|
|
105
|
+
Yes.
|
|
@@ -0,0 +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. |
|