@appsbd/vue3-appsbd-ui 1.0.1 → 1.0.3
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 -8
- package/.ai/ai_ref_AbCarousel.md +47 -47
- package/.ai/ai_ref_AbConfirmPopover.md +59 -59
- package/.ai/ai_ref_AbDarkModeToggler.md +42 -42
- package/.ai/ai_ref_AbEasyModal.md +62 -62
- 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_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 +1 -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 -44
- 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 +160 -134
- package/design-system.md +403 -403
- package/dist/skins/red.scss +3 -3
- package/dist/skins/themes/_red.scss +6 -6
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +58 -58
- package/dist/vue3-appsbd-ui.es.js +5449 -5342
- package/package.json +1 -1
- package/readme.md +136 -136
package/.ai/ai_ref_AbAvatar.md
CHANGED
|
@@ -30,7 +30,15 @@ Globally registered by the plugin.
|
|
|
30
30
|
|
|
31
31
|
## Events
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
| Name | Payload | Description |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `change` | `Event` | Fired when a file is selected in `add` variant. The selected file(s) can be accessed via `event.target.files`. |
|
|
36
|
+
|
|
37
|
+
## Exposed Methods
|
|
38
|
+
|
|
39
|
+
| Name | Description |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `triggerFileSelect()` | Programmatically triggers the file selection dialog when in `add` variant. |
|
|
34
42
|
|
|
35
43
|
## Slots
|
|
36
44
|
|
package/.ai/ai_ref_AbBadge.md
CHANGED
|
@@ -10,9 +10,9 @@ Globally registered by the plugin.
|
|
|
10
10
|
|
|
11
11
|
```vue
|
|
12
12
|
<template>
|
|
13
|
-
<ab-badge
|
|
14
|
-
<ab-badge
|
|
15
|
-
<ab-badge
|
|
13
|
+
<ab-badge color="primary">New</ab-badge>
|
|
14
|
+
<ab-badge color="success" is-rounded-pill>12</ab-badge>
|
|
15
|
+
<ab-badge color="warning" is-outline>Pending</ab-badge>
|
|
16
16
|
</template>
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -21,13 +21,13 @@ Globally registered by the plugin.
|
|
|
21
21
|
| Name | Type | Default | Description |
|
|
22
22
|
| --- | --- | --- | --- |
|
|
23
23
|
| `size` | `String` | `"md"` | Size of the badge (`sm`, `md`, `lg`). |
|
|
24
|
-
| `
|
|
24
|
+
| `color` | `String` | `"primary"` | Color theme (`primary`, `secondary`, `danger`, `warning`, `success`, `info`). |
|
|
25
25
|
| `isOutline` | `Boolean` | `false` | Outlined style with transparent background. |
|
|
26
26
|
| `isRoundedPill` | `Boolean` | `false` | Transforms badge to a fully rounded pill shape. |
|
|
27
27
|
| `isDot` | `Boolean` | `false` | Prepends a dot indicator layout. |
|
|
28
|
-
| `isAvatar` | `Boolean` | `false` | Adjusts layout to accommodate an avatar image/SVG. |
|
|
29
28
|
| `isClose` | `Boolean` | `false` | Adjusts padding and layout for a close icon. |
|
|
30
29
|
| `isAdd` | `Boolean` | `false` | Adjusts styling for an add/plus icon badge. |
|
|
30
|
+
| `position` | `String` | `"right"` | Position of the `content` slot (`"left"`, `"right"`). |
|
|
31
31
|
|
|
32
32
|
## Events
|
|
33
33
|
|
|
@@ -38,6 +38,7 @@ None.
|
|
|
38
38
|
| Name | Description |
|
|
39
39
|
| --- | --- |
|
|
40
40
|
| `default` | Badge content. |
|
|
41
|
+
| `content` | Slot for an icon, image, or avatar. Placed according to the `position` prop. |
|
|
41
42
|
|
|
42
43
|
## Notes
|
|
43
44
|
|
package/.ai/ai_ref_AbButton.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AbButton — AI Reference
|
|
2
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 (`
|
|
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 (`color`, `size`, `isOutline`, `isIconBtn`).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -19,16 +19,16 @@ No per-component import required.
|
|
|
19
19
|
```vue
|
|
20
20
|
<template>
|
|
21
21
|
<!-- Basic -->
|
|
22
|
-
<ab-button
|
|
22
|
+
<ab-button color="primary">Save</ab-button>
|
|
23
23
|
|
|
24
24
|
<!-- With icon + divider -->
|
|
25
|
-
<ab-button
|
|
25
|
+
<ab-button color="secondary" is-outline show-icon-divider>
|
|
26
26
|
<template #icon><i class="bi bi-plus-lg"></i></template>
|
|
27
27
|
New Item
|
|
28
28
|
</ab-button>
|
|
29
29
|
|
|
30
30
|
<!-- Loading state -->
|
|
31
|
-
<ab-button
|
|
31
|
+
<ab-button color="primary" :is-animated="isSaving" is-hide-text-on-animate>
|
|
32
32
|
Save
|
|
33
33
|
</ab-button>
|
|
34
34
|
</template>
|
|
@@ -44,9 +44,9 @@ const isSaving = ref(false);
|
|
|
44
44
|
| Name | Type | Default | Description |
|
|
45
45
|
| --- | --- | --- | --- |
|
|
46
46
|
| `type` | `String` | `"button"` | Native button type (`button`, `submit`, `reset`). |
|
|
47
|
-
| `
|
|
47
|
+
| `color` | `String` | `"primary"` | Color variant (primary, secondary, success, danger, warning, info, light, dark). |
|
|
48
48
|
| `size` | `String` | `"md"` | Button size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
|
|
49
|
-
| `isOutline` | `Boolean` | `false` | Applies the outline style for the selected
|
|
49
|
+
| `isOutline` | `Boolean` | `false` | Applies the outline style for the selected color. |
|
|
50
50
|
| `isIconBtn` | `Boolean` | `false` | Formats the button styling for a single icon. |
|
|
51
51
|
| `isAnimated` | `Boolean` | `false` | When `true`, renders the loader SVG and optionally hides the label. |
|
|
52
52
|
| `isHideTextOnAnimate` | `Boolean` | `false` | Hides the default slot content while `isAnimated` is `true`. |
|
|
@@ -66,5 +66,5 @@ No custom events emitted. All native button events (`click`, `focus`, `blur`,
|
|
|
66
66
|
|
|
67
67
|
## Notes
|
|
68
68
|
|
|
69
|
-
- Size and color are now controlled via the `size` and `
|
|
70
|
-
- If no `
|
|
69
|
+
- Size and color are now controlled via the `size` and `color` props rather than raw Bootstrap utility classes.
|
|
70
|
+
- If no `color` prop is supplied, the component auto-applies `primary`.
|
package/.ai/ai_ref_AbCarousel.md
CHANGED
|
@@ -1,47 +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). |
|
|
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). |
|
|
@@ -1,59 +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. |
|
|
1
|
+
# AbConfirmPopover — AI Reference
|
|
2
|
+
|
|
3
|
+
Confirmation popover with an async `onConfirm` handler and a built-in loader. Useful for destructive actions (delete, archive) that need an inline confirmation without opening a modal.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<!-- Recommended: async onConfirm handles loader automatically -->
|
|
14
|
+
<ab-confirm-popover
|
|
15
|
+
msg="Delete this record?"
|
|
16
|
+
icon="warning"
|
|
17
|
+
:on-confirm="handleDelete"
|
|
18
|
+
:item-data="record"
|
|
19
|
+
confirm-text="Delete"
|
|
20
|
+
cancel-text="Keep"
|
|
21
|
+
>
|
|
22
|
+
<ab-button class="btn-danger"><i class="bi bi-trash"></i></ab-button>
|
|
23
|
+
</ab-confirm-popover>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
async function handleDelete(record) {
|
|
28
|
+
await api.delete(record.id);
|
|
29
|
+
// loader and popover close handled by the component
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
| Name | Type | Default | Description |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| `msg` | `String` | `"Are you sure?"` | Confirmation message. |
|
|
39
|
+
| `title` | `String` | `""` | Optional title above the message. |
|
|
40
|
+
| `confirmText` | `String` | `"Yes"` | Confirm button label. |
|
|
41
|
+
| `cancelText` | `String` | `"No"` | Cancel button label. |
|
|
42
|
+
| `icon` | `String` | `"question"` | `success`, `error`, `warning`, `info`, `question`. |
|
|
43
|
+
| `type` | `String` | `"confirm"` | `confirm`, `confirm-ajax`, or `alert`. |
|
|
44
|
+
| `onConfirm` | `Function` | `null` | Async handler `(itemData) => Promise`. Preferred over `onConfirmed` event. |
|
|
45
|
+
| `itemData` | `Object \| String \| Number \| Array` | `null` | Payload passed to `onConfirm`. |
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
| Event | Payload | Description |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `onConfirmed` | `{ showLoader(status), itemData, closePopover }` | Legacy callback — used only when no `onConfirm` prop is provided. Call `showLoader(true)` to start the loader, then `closePopover()` when done. |
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
| Name | Scope | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `default` | — | Trigger element (typically an `AbButton`). |
|
|
58
|
+
| `desc` | — | Additional description below the message. |
|
|
59
|
+
| `actionButtons` | `{ removeConfirmed, state }` | Custom action buttons — call `removeConfirmed()` to trigger the confirm flow. |
|
|
@@ -1,42 +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()`.
|
|
1
|
+
# AbDarkModeToggler — AI Reference
|
|
2
|
+
|
|
3
|
+
Light / dark theme toggle. Pairs with the `useTheme()` composable — clicking the toggle flips the current theme.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Globally registered by the plugin. Uses the `useTheme` composable internally.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<ab-dark-mode-toggler size="md" />
|
|
14
|
+
|
|
15
|
+
<!-- Custom icons -->
|
|
16
|
+
<ab-dark-mode-toggler size="lg">
|
|
17
|
+
<template #dark-icon><i class="bi bi-sun"></i></template>
|
|
18
|
+
<template #light-icon><i class="bi bi-moon-stars"></i></template>
|
|
19
|
+
</ab-dark-mode-toggler>
|
|
20
|
+
</template>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Name | Type | Default | Description |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `size` | `String` | `"md"` | One of: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
|
|
28
|
+
|
|
29
|
+
## Events
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
## Slots
|
|
34
|
+
|
|
35
|
+
| Name | Description |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `dark-icon` | Icon shown when the current theme is dark (typically a sun). |
|
|
38
|
+
| `light-icon` | Icon shown when the current theme is light (typically a moon). |
|
|
39
|
+
|
|
40
|
+
## Related
|
|
41
|
+
|
|
42
|
+
- `useTheme()` composable exposes `isDarkMode`, `toggleTheme()`, `setTheme()`.
|
|
@@ -1,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,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.
|