@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# abVeeRules (Library)
|
|
2
|
+
|
|
3
|
+
A collection of pre-configured VeeValidate validation rules integrated with localization via `abTranslate`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
These rules are typically used internally by the library's `AbField` or form components, but can be imported and registered globally if needed.
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import { abAllRules } from "@vue3-appsbd-ui/libraries/abVeeRules";
|
|
17
|
+
import { defineRule } from "vee-validate";
|
|
18
|
+
|
|
19
|
+
// Register all custom library rules manually if needed
|
|
20
|
+
Object.keys(abAllRules).forEach(rule => {
|
|
21
|
+
defineRule(rule, abAllRules[rule]);
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API Reference
|
|
26
|
+
|
|
27
|
+
### `abAllRules` Object
|
|
28
|
+
|
|
29
|
+
An object containing validation functions conforming to VeeValidate's custom rule signature `(value, params, field)`.
|
|
30
|
+
|
|
31
|
+
Included rules:
|
|
32
|
+
- `required`: Returns translated `%{fld_name} is required`.
|
|
33
|
+
- `numeric`: Returns translated `%{fld_name} should be numeric`.
|
|
34
|
+
- `email`: Returns translated `%{fld_name} not a valid email address`.
|
|
35
|
+
- `min`: Native min validation.
|
|
36
|
+
- `min_value`: Returns translated `%{fld_name} should be more than X`.
|
|
37
|
+
- `max`: Native max validation.
|
|
38
|
+
- `max_value`: Returns translated `%{fld_name} should be less than X`.
|
|
39
|
+
- `confirmed`: Checks password confirmation match.
|
|
40
|
+
- `url`: Validates URL format.
|
|
41
|
+
- `isUnique`: Custom stub for async uniqueness check.
|
|
42
|
+
- `isValid`: Custom stub for async validity check.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# useAlert (Composable)
|
|
2
|
+
|
|
3
|
+
Provides a procedural API to trigger modal alerts, notifications, and confirmations using the global `$alert` instance.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Ensure the library is installed:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
npm install @vue3-appsbd-ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Import the composable in your `<script setup>` and call it. The `alert` function returns a Promise that resolves when the user dismisses or confirms the dialog.
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<script setup>
|
|
19
|
+
import { useAlert } from "@vue3-appsbd-ui";
|
|
20
|
+
|
|
21
|
+
const { alert } = useAlert();
|
|
22
|
+
|
|
23
|
+
async function handleAction() {
|
|
24
|
+
const result = await alert({
|
|
25
|
+
type: "confirm",
|
|
26
|
+
title: "Delete item?",
|
|
27
|
+
message: "Are you sure you want to delete this?",
|
|
28
|
+
icon: "warning",
|
|
29
|
+
confirmText: "Yes, delete",
|
|
30
|
+
cancelText: "Cancel"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (result) {
|
|
34
|
+
// User confirmed
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<button @click="handleAction">Delete</button>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## API Reference
|
|
45
|
+
|
|
46
|
+
### `alert(options)`
|
|
47
|
+
|
|
48
|
+
The `alert` method accepts an options object to configure the dialog.
|
|
49
|
+
|
|
50
|
+
**Options**
|
|
51
|
+
|
|
52
|
+
| Property | Type | Default | Description |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| `type` | `string` | `"alert"` | Variant: `"alert"`, `"confirm"`, or `"confirm-ajax"`. |
|
|
55
|
+
| `title` | `string` | - | Headline text for the dialog. |
|
|
56
|
+
| `message` | `string` | - | Detailed body text. |
|
|
57
|
+
| `icon` | `string` | - | Status icon: `"success"`, `"error"`, `"warning"`, `"info"`, `"question"`. |
|
|
58
|
+
| `variation` | `string` | `"default"` | Visual style: `"default"`, `"modern"`, `"minimal"`, `"top-color-bar"`. |
|
|
59
|
+
| `size` | `string` | `"md"` | Width limit: `"sm"`, `"md"`, `"lg"`, `"xl"`, `"auto"`. |
|
|
60
|
+
| `confirmText`| `string` | `"OK"` | Label for the primary accept button. |
|
|
61
|
+
| `cancelText` | `string` | `"Cancel"` | Label for the cancel/decline button. |
|
|
62
|
+
| `onConfirm` | `Function` | - | Async callback executed when accepting a `"confirm-ajax"` modal. |
|
|
63
|
+
| `timer` | `number` | - | Auto-close timer in milliseconds (only for `"alert"` type). |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# useFileValidator (Composable)
|
|
2
|
+
|
|
3
|
+
Provides file validation utilities to check file extensions, MIME types, and file sizes. Automatically spawns error toasts if validation fails, and returns a structured file object with icon metadata for UI display.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script setup>
|
|
15
|
+
import { useFileValidator } from "@vue3-appsbd-ui";
|
|
16
|
+
|
|
17
|
+
const { getFileInfo, getFileIconByExt } = useFileValidator();
|
|
18
|
+
|
|
19
|
+
function handleFileUpload(event) {
|
|
20
|
+
const file = event.target.files[0];
|
|
21
|
+
if (!file) return;
|
|
22
|
+
|
|
23
|
+
// Validates if file is <= 2.0 MB and is a supported type
|
|
24
|
+
const validatedFile = getFileInfo(file, 2.0);
|
|
25
|
+
|
|
26
|
+
if (validatedFile) {
|
|
27
|
+
console.log("File is valid!", validatedFile);
|
|
28
|
+
// validatedFile.isImage
|
|
29
|
+
// validatedFile.fileIcon
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<input type="file" @change="handleFileUpload" />
|
|
36
|
+
</template>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## API Reference
|
|
40
|
+
|
|
41
|
+
### Returned Methods
|
|
42
|
+
|
|
43
|
+
| Method | Signature | Description |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `getFileInfo(file, sizeLimitMb)` | `Function` | Validates a `File` object against allowed MIME types and max size (`sizeLimitMb`, default `1.0`). If invalid, spawns a toast error and returns `null`. If valid, returns the `file` object augmented with `isImage` and `fileIcon` properties. |
|
|
46
|
+
| `getFileIconByExt(ext, type)` | `Function` | Returns an object `{ isImage: boolean, fileIcon: Component\|String }` based on the file extension and MIME type. Uses `lucide-vue-next` icons for known formats (pdf, zip, doc, xls, ppt, mp4). |
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# useResponsive (Composable)
|
|
2
|
+
|
|
3
|
+
A Vue 3 composable that tracks the browser viewport width in real-time and exposes reactive helpers for responsive layout decisions. Aligned with Bootstrap 5 breakpoints.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script setup>
|
|
15
|
+
import { useResponsive } from "@vue3-appsbd-ui";
|
|
16
|
+
|
|
17
|
+
// Track screen size dynamically
|
|
18
|
+
const { ScreenWidth, ScreenType, isUptoTab } = useResponsive();
|
|
19
|
+
|
|
20
|
+
// Or provide a custom tablet max-width threshold in pixels
|
|
21
|
+
// const { isUptoTab } = useResponsive({ tabMaxWidth: 900 });
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div>
|
|
26
|
+
<p>Current Width: {{ ScreenWidth }}px</p>
|
|
27
|
+
<p>Breakpoint: {{ ScreenType }}</p>
|
|
28
|
+
|
|
29
|
+
<div v-if="isUptoTab">
|
|
30
|
+
Showing Mobile / Tablet Layout
|
|
31
|
+
</div>
|
|
32
|
+
<div v-else>
|
|
33
|
+
Showing Desktop Layout
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## API Reference
|
|
40
|
+
|
|
41
|
+
### `useResponsive(options)`
|
|
42
|
+
|
|
43
|
+
**Options**
|
|
44
|
+
|
|
45
|
+
| Property | Type | Default | Description |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| `tabMaxWidth` | `number` | `0` | Custom max-width (px) to treat as "up-to tab". When `> 0`, screens at or below this width are considered tablet-sized regardless of breakpoint. |
|
|
48
|
+
|
|
49
|
+
**Returned Properties**
|
|
50
|
+
|
|
51
|
+
| Property | Type | Description |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `ScreenWidth` | `ComputedRef<number>` | Raw viewport width in pixels. |
|
|
54
|
+
| `ScreenType` | `ComputedRef<string>` | Current Bootstrap-style breakpoint (`'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`). |
|
|
55
|
+
| `isUptoTab` | `ComputedRef<boolean>` | `true` when the viewport is tablet-sized or smaller (`xs`, `sm`, or `<=` `tabMaxWidth`). |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# useTheme (Composable)
|
|
2
|
+
|
|
3
|
+
A Vue composable that handles light and dark theme toggling, stores the user's preference in `localStorage`, and reacts to system theme changes (`prefers-color-scheme: dark`).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script setup>
|
|
15
|
+
import { useTheme } from "@vue3-appsbd-ui";
|
|
16
|
+
|
|
17
|
+
const { theme, toggleTheme, applyTheme } = useTheme();
|
|
18
|
+
|
|
19
|
+
// Manually switch to 'dark' or 'light'
|
|
20
|
+
// applyTheme('dark');
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div>
|
|
25
|
+
<p>Current Theme: {{ theme }}</p>
|
|
26
|
+
<button @click="toggleTheme">Toggle Theme</button>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API Reference
|
|
32
|
+
|
|
33
|
+
### Returned Properties & Methods
|
|
34
|
+
|
|
35
|
+
| Name | Type | Description |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `theme` | `Ref<string>` | A reactive reference containing the current theme (`'light'` or `'dark'`). |
|
|
38
|
+
| `toggleTheme` | `Function` | Toggles the current theme between `'light'` and `'dark'`, updates the DOM (`data-bs-theme`), and saves to `localStorage`. |
|
|
39
|
+
| `applyTheme(value)` | `Function` | Explicitly sets the theme to the provided `value` (`'light'` or `'dark'`). |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# useToast (Composable)
|
|
2
|
+
|
|
3
|
+
Provides a procedural API to spawn toast notifications using the globally registered `$toast` instance (usually powered by `vue-toastification`).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
npm install @vue3-appsbd-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script setup>
|
|
15
|
+
import { useToast } from "@vue3-appsbd-ui";
|
|
16
|
+
|
|
17
|
+
const { toast } = useToast();
|
|
18
|
+
|
|
19
|
+
function showNotifications() {
|
|
20
|
+
toast.success("Profile saved successfully");
|
|
21
|
+
toast.error("Failed to connect to server", { timeout: 5000 });
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<button @click="showNotifications">Show Toasts</button>
|
|
27
|
+
</template>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API Reference
|
|
31
|
+
|
|
32
|
+
### `toast` Methods
|
|
33
|
+
|
|
34
|
+
| Method | Signature | Description |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `toast(msg, options)` | `Function` | Spawns a default toast notification. |
|
|
37
|
+
| `toast.success(msg, options)` | `Function` | Spawns a success toast notification. |
|
|
38
|
+
| `toast.error(msg, options)` | `Function` | Spawns an error toast notification. |
|
|
39
|
+
| `toast.warning(msg, options)` | `Function` | Spawns a warning toast notification. |
|
|
40
|
+
| `toast.info(msg, options)` | `Function` | Spawns an info toast notification. |
|
|
41
|
+
| `toast.dismiss(id)` | `Function` | Dismisses a specific toast by its ID. |
|
|
42
|
+
| `toast.clear()` | `Function` | Clears all currently visible toasts. |
|
package/AI_REFERENCE.md
CHANGED
|
@@ -92,7 +92,17 @@ Each component also has a standalone reference under `.ai/` with installation, f
|
|
|
92
92
|
| `AbPricingCard` | Single pricing tier card. | [.ai/ai_ref_AbPricingCard.md](./.ai/ai_ref_AbPricingCard.md) |
|
|
93
93
|
| `AbPricingContainer` | Layout wrapper for pricing tables. | [.ai/ai_ref_AbPricingContainer.md](./.ai/ai_ref_AbPricingContainer.md) |
|
|
94
94
|
| `AbPricingTable` | Stylized, responsive pricing table component with feature list and package columns. | [.ai/ai_ref_AbPricingTable.md](./.ai/ai_ref_AbPricingTable.md) |
|
|
95
|
+
| `AbChart` | Flexible chart component powered by Apache ECharts. | [.ai/ai_ref_AbChart.md](./.ai/ai_ref_AbChart.md) |
|
|
95
96
|
| `AbDarkModeToggler` | Light / dark theme toggle (pairs with `useTheme`). | [.ai/ai_ref_AbDarkModeToggler.md](./.ai/ai_ref_AbDarkModeToggler.md) |
|
|
97
|
+
| `useAlert` | Procedural API to trigger SweetAlert-based modal alerts, notifications, and confirmations. | [.ai/ai_ref_useAlert.md](./.ai/ai_ref_useAlert.md) |
|
|
98
|
+
| `abEventBus` / `emitterObj` | Lightweight global event bus using `tiny-emitter`. | [.ai/ai_ref_abEventBus.md](./.ai/ai_ref_abEventBus.md) |
|
|
99
|
+
| `useTheme` | Composable for light/dark theme toggling with localStorage and system preference sync. | [.ai/ai_ref_useTheme.md](./.ai/ai_ref_useTheme.md) |
|
|
100
|
+
| `useToast` | Procedural API to spawn toast notifications (success, error, warning, info). | [.ai/ai_ref_useToast.md](./.ai/ai_ref_useToast.md) |
|
|
101
|
+
| `useFileValidator` | File validation utilities (size, MIME type) and file icon/image resolvers. | [.ai/ai_ref_useFileValidator.md](./.ai/ai_ref_useFileValidator.md) |
|
|
102
|
+
| `useResponsive` | Real-time viewport width tracker for responsive layout decisions (Bootstrap 5 aligned). | [.ai/ai_ref_useResponsive.md](./.ai/ai_ref_useResponsive.md) |
|
|
103
|
+
| `abTranslate` | Localization utility wrapping `vue3-gettext` with automatic variable interpolation. | [.ai/ai_ref_abTranslate.md](./.ai/ai_ref_abTranslate.md) |
|
|
104
|
+
| `abVeeRules` | Collection of pre-configured VeeValidate validation rules integrated with localization. | [.ai/ai_ref_abVeeRules.md](./.ai/ai_ref_abVeeRules.md) |
|
|
105
|
+
| `abRequestParam` | Data-transfer classes to build structured API request parameters (pagination, sorting, filtering). | [.ai/ai_ref_abRequestParam.md](./.ai/ai_ref_abRequestParam.md) |
|
|
96
106
|
|
|
97
107
|
## 3. Full Component API Reference
|
|
98
108
|
|
|
@@ -139,20 +149,13 @@ Global configuration setter for library-wide tokens.
|
|
|
139
149
|
| Name | Type | Default | Notes |
|
|
140
150
|
| --------------------- | ------- | ----------- | ------------------------------------------------------- |
|
|
141
151
|
| `type` | String | `"button"` | Native button type. |
|
|
142
|
-
| `
|
|
143
|
-
| `outlineVariant` | String | `"primary"` | Color variant applied when `isOutline` is true. |
|
|
152
|
+
| `color` | String | `"primary"` | Color variant (`primary`, `secondary`, `danger`, etc.). |
|
|
144
153
|
| `size` | String | `"md"` | Button size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
|
|
145
|
-
| `isOutline` | Boolean | `false` | Applies the outline style for the selected
|
|
154
|
+
| `isOutline` | Boolean | `false` | Applies the outline style for the selected color. |
|
|
146
155
|
| `isIconBtn` | Boolean | `false` | Adjusts formatting for a button with only an icon. |
|
|
147
156
|
| `isAnimated` | Boolean | `false` | Shows built-in loader animation. |
|
|
148
157
|
| `isHideTextOnAnimate` | Boolean | `false` | Hides slot text while animated. |
|
|
149
158
|
| `showIconDivider` | Boolean | `false` | Renders divider between `#icon` and label. |
|
|
150
|
-
| Name | Type | Default | Notes |
|
|
151
|
-
| --------------------- | ------- | ---------- | ------------------------------------------ |
|
|
152
|
-
| `type` | String | `"button"` | Native button type. |
|
|
153
|
-
| `isAnimated` | Boolean | `false` | Shows built-in loader animation. |
|
|
154
|
-
| `isHideTextOnAnimate` | Boolean | `false` | Hides slot text while animated. |
|
|
155
|
-
| `showIconDivider` | Boolean | `false` | Renders divider between `#icon` and label. |
|
|
156
159
|
|
|
157
160
|
**Slots**
|
|
158
161
|
|
|
@@ -160,7 +163,7 @@ Global configuration setter for library-wide tokens.
|
|
|
160
163
|
- `icon` ? leading icon element.
|
|
161
164
|
- `svg` ? replaces the built-in loader SVG when `isAnimated` is true.
|
|
162
165
|
|
|
163
|
-
**Notes** ?
|
|
166
|
+
**Notes** ? Color and size are controlled via props (`color`, `size`).
|
|
164
167
|
|
|
165
168
|
---
|
|
166
169
|
|
|
@@ -168,16 +171,21 @@ Global configuration setter for library-wide tokens.
|
|
|
168
171
|
|
|
169
172
|
**Props**
|
|
170
173
|
|
|
171
|
-
| Name
|
|
172
|
-
|
|
|
173
|
-
| `containerClass` | String | `
|
|
174
|
-
| `headerClass`
|
|
175
|
-
| `bodyClass`
|
|
176
|
-
| `footerClass`
|
|
174
|
+
| Name | Type | Default | Notes |
|
|
175
|
+
| --- | --- | --- | --- |
|
|
176
|
+
| `containerClass` | String | `undefined` | Classes to append directly to the root card container. |
|
|
177
|
+
| `headerClass` | String | `""` | Classes for the header section. |
|
|
178
|
+
| `bodyClass` | String | `""` | Classes for the body section. |
|
|
179
|
+
| `footerClass` | String | `""` | Classes for the footer section. |
|
|
180
|
+
| `isBorderCard` | Boolean | `true` | Whether to display the default card border. |
|
|
181
|
+
| `bgColorVariant` | String | `""` | Bootstrap color variant for background (`primary`, `success`, etc.). |
|
|
182
|
+
| `borderBottomVariant` | String | `""` | Adds a colored bottom border with the specified variant. |
|
|
183
|
+
| `isTileCard` | Boolean | `false` | Applies the `.tile-card` layout styles. |
|
|
184
|
+
| `variation` | String | `""` | Generic variation class to append to the root. |
|
|
177
185
|
|
|
178
|
-
**Slots**
|
|
186
|
+
**Slots** — `header`, `body`, `footer`.
|
|
179
187
|
|
|
180
|
-
**Notes**
|
|
188
|
+
**Notes** — Use built-in props (`isTileCard`, `bgColorVariant`) or CSS layout classes (applied to `containerClass`) for variations like `item-card` or `insight-card`.
|
|
181
189
|
|
|
182
190
|
---
|
|
183
191
|
|
|
@@ -247,7 +255,9 @@ A thin wrapper around `AbModal` exposing imperative open/close.
|
|
|
247
255
|
| `color` | String | `"primary"` | `success`, `danger`, `info`, `warning`, `primary`, `secondary`. |
|
|
248
256
|
| `size` | String | `"md"` | `xs`, `sm`, `md`, `lg`, `xl`, `xxl`. |
|
|
249
257
|
|
|
250
|
-
**Slots**
|
|
258
|
+
**Slots** — `default` — progress label (uses CSS custom property `--progress-value`).
|
|
259
|
+
|
|
260
|
+
**Position Classes** — `progress-right`, `progress-right-top`, `progress-right-bottom`, `progress-value-top`, `progress-value-bottom`.
|
|
251
261
|
|
|
252
262
|
---
|
|
253
263
|
|
|
@@ -272,26 +282,12 @@ A thin wrapper around `AbModal` exposing imperative open/close.
|
|
|
272
282
|
| `maxlength` | any | `null` | |
|
|
273
283
|
| `isLeftIconBorder` | Boolean | `false` | |
|
|
274
284
|
| `isRightIconBorder` | Boolean | `false` | |
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
| `modelValue` | any | `null` | v-model binding. |
|
|
278
|
-
| `label` | String | `""` | |
|
|
279
|
-
| `placeholder` | String | `""` | |
|
|
280
|
-
| `type` | String | `"text"` | Auto-detects `password`. |
|
|
281
|
-
| `name` | String | _required_ | VeeValidate field name. |
|
|
282
|
-
| `isCodeInput` | Boolean | `false` | |
|
|
283
|
-
| `rules` | String / Object | `""` | VeeValidate rules. |
|
|
284
|
-
| `containerClass` | String | `"mb-3"` | |
|
|
285
|
-
| `hints` | String | `""` | |
|
|
286
|
-
| `prefix` | String | `""` | |
|
|
287
|
-
| `postfix` | String | `""` | |
|
|
288
|
-
| `maxlength` | any | `null` | |
|
|
289
|
-
| `isLeftIconBorder` | Boolean | `false` | |
|
|
290
|
-
| `isRightIconBorder` | Boolean | `false` | |
|
|
285
|
+
| `isHideLabel` | Boolean | `false` | Hide the label visually. |
|
|
286
|
+
| `iconPosition` | String | `"right"` | Position of the custom `#icon` slot. |
|
|
291
287
|
|
|
292
288
|
**Events** ? `update:modelValue`, `input`, `keyup`, `keydown`, `paste`.
|
|
293
289
|
|
|
294
|
-
**Slots** ? `label`, `prefix`, `postfix`, `hints`.
|
|
290
|
+
**Slots** ? `label`, `prefix`, `postfix`, `icon`, `hints`.
|
|
295
291
|
|
|
296
292
|
**v-model** ? yes.
|
|
297
293
|
|
|
@@ -368,10 +364,12 @@ Polymorphic field: renders text/number/textarea/select/multiselect/tag/checkbox/
|
|
|
368
364
|
| `title` | String / null | `null` | Toggle/switch title. |
|
|
369
365
|
| `isLeftIconBorder` | Boolean | `false` | |
|
|
370
366
|
| `isRightIconBorder` | Boolean | `false` | |
|
|
367
|
+
| `isHideLabel` | Boolean | `false` | Hide the label visually. |
|
|
368
|
+
| `iconPosition` | String | `"right"` | Position of the custom `#icon` slot. |
|
|
371
369
|
|
|
372
370
|
**Events** ? `update:modelValue`, `clear(event)`, `change(value)`, `select(value)`.
|
|
373
371
|
|
|
374
|
-
**Slots** ? `label`, `prefix`, `postfix`, `description`, `helptext`, `option`, `singlelabel`.
|
|
372
|
+
**Slots** ? `label`, `prefix`, `postfix`, `icon`, `description`, `helptext`, `option`, `singlelabel`.
|
|
375
373
|
|
|
376
374
|
**v-model** ? yes.
|
|
377
375
|
|
|
@@ -443,33 +441,9 @@ Dynamic form driven by a `fieldInputs` array where each entry declares `type` (`
|
|
|
443
441
|
| `minuteStep` | Number | `1` | |
|
|
444
442
|
| `isLeftIconBorder` | Boolean | `false` | |
|
|
445
443
|
| `isRightIconBorder` | Boolean | `false` | |
|
|
446
|
-
|
|
|
447
|
-
|
|
|
448
|
-
| `
|
|
449
|
-
| `label` | String | `""` | |
|
|
450
|
-
| `placeholder` | String | `""` | |
|
|
451
|
-
| `name` | String | _required_ | |
|
|
452
|
-
| `rules` | String / Object | `""` | |
|
|
453
|
-
| `isRange` | Boolean | `false` | |
|
|
454
|
-
| `containerClass` | String | `"mb-3"` | |
|
|
455
|
-
| `hints` | String | `""` | |
|
|
456
|
-
| `isDisable` | Boolean | `false` | |
|
|
457
|
-
| `visibility` | String | `"click"` | |
|
|
458
|
-
| `mask` | String | `""` | |
|
|
459
|
-
| `dataFormat` | String | `"YYYY-MM-DD"` | |
|
|
460
|
-
| `displayFormat` | String | `"YYYY-MM-DD"` | |
|
|
461
|
-
| `maxDate` | Date / String | `undefined` | |
|
|
462
|
-
| `minDate` | Date / String | `undefined` | |
|
|
463
|
-
| `disableDates` | Array | `[]` | Accepts `Date`, string, or `{ repeat: { weekdays: [...] } }`. |
|
|
464
|
-
| `showInInput` | Boolean | `true` | Input vs button trigger. |
|
|
465
|
-
| `monthNames` / `monthNamesShort` / `dayNames` | Array | `undefined` | i18n overrides. |
|
|
466
|
-
| `formatDigit` | Function | `undefined` | Locale digit formatter. |
|
|
467
|
-
| `rangeSeparator` | String | `undefined` | |
|
|
468
|
-
| `mode` | String | `"date"` | `date`, `time`, `datetime`. |
|
|
469
|
-
| `is24Hour` | Boolean | `undefined` | |
|
|
470
|
-
| `minuteStep` | Number | `1` | |
|
|
471
|
-
| `isLeftIconBorder` | Boolean | `false` | |
|
|
472
|
-
| `isRightIconBorder` | Boolean | `false` | |
|
|
444
|
+
| `isHideLabel` | Boolean | `false` | Hide the label visually. |
|
|
445
|
+
| `defaultIconPosition` | String | `"right"` | Position of the default calendar/clock icon. |
|
|
446
|
+
| `iconPosition` | String | `"right"` | Position of the custom `#icon` slot. |
|
|
473
447
|
|
|
474
448
|
**Slots** ? `label`, `prefix`, `icon`, `hints`, `picker-container({ isRange, showInInput, value })`.
|
|
475
449
|
|
|
@@ -634,25 +608,12 @@ Option shape: `{ val, label?, img_src?, icon?, iconComponent?, icon_ctnr_class?,
|
|
|
634
608
|
| `max` | Number | `0` | `0` = unlimited. |
|
|
635
609
|
| `isLeftIconBorder` | Boolean | `false` | |
|
|
636
610
|
| `isRightIconBorder` | Boolean | `false` | |
|
|
637
|
-
|
|
|
638
|
-
|
|
|
639
|
-
| `modelValue` | Array | `[]` | |
|
|
640
|
-
| `options` | Array | `[]` | Each: `{ val, title }` or a string. |
|
|
641
|
-
| `label` | String | `""` | |
|
|
642
|
-
| `placeholder` | String | `""` | |
|
|
643
|
-
| `name` | String | _required_ | |
|
|
644
|
-
| `rules` | String / Object | `""` | |
|
|
645
|
-
| `containerClass` | String | `"mb-3"` | |
|
|
646
|
-
| `hints` | String | `""` | |
|
|
647
|
-
| `prefix` | String | `""` | |
|
|
648
|
-
| `postfix` | String | `""` | |
|
|
649
|
-
| `max` | Number | `0` | `0` = unlimited. |
|
|
650
|
-
| `isLeftIconBorder` | Boolean | `false` | |
|
|
651
|
-
| `isRightIconBorder` | Boolean | `false` | |
|
|
611
|
+
| `isHideLabel` | Boolean | `false` | Hide the label visually. |
|
|
612
|
+
| `iconPosition` | String | `"right"` | Position of the custom `#icon` slot. |
|
|
652
613
|
|
|
653
614
|
**Events** ? `update:modelValue(array)`.
|
|
654
615
|
|
|
655
|
-
**Slots** ? `label`, `prefix`, `postfix`, `hints`.
|
|
616
|
+
**Slots** ? `label`, `prefix`, `postfix`, `icon`, `hints`.
|
|
656
617
|
|
|
657
618
|
**v-model** ? yes.
|
|
658
619
|
|
|
@@ -665,15 +626,15 @@ Option shape: `{ val, label?, img_src?, icon?, iconComponent?, icon_ctnr_class?,
|
|
|
665
626
|
| Name | Type | Default | Notes |
|
|
666
627
|
| --------------- | ------- | ----------- | ----- |
|
|
667
628
|
| `size` | String | `"md"` | |
|
|
668
|
-
| `
|
|
629
|
+
| `color` | String | `"primary"` | |
|
|
669
630
|
| `isOutline` | Boolean | `false` | |
|
|
670
631
|
| `isRoundedPill` | Boolean | `false` | |
|
|
671
632
|
| `isDot` | Boolean | `false` | |
|
|
672
|
-
| `isAvatar` | Boolean | `false` | |
|
|
673
633
|
| `isClose` | Boolean | `false` | |
|
|
674
634
|
| `isAdd` | Boolean | `false` | |
|
|
635
|
+
| `position` | String | `"right"` | |
|
|
675
636
|
|
|
676
|
-
**Slots** ? `default` ? badge content.
|
|
637
|
+
**Slots** ? `default` ? badge content, `content` ? icon or image content placed via position.
|
|
677
638
|
|
|
678
639
|
---
|
|
679
640
|
|
|
@@ -772,38 +733,12 @@ Custom built-in replacement for `@vueform/multiselect`.
|
|
|
772
733
|
| `appendToBody` | Boolean | `true` | Teleport dropdown to `<body>`. |
|
|
773
734
|
| `isLeftIconBorder` | Boolean | `false` | |
|
|
774
735
|
| `isRightIconBorder` | Boolean | `false` | |
|
|
775
|
-
|
|
|
776
|
-
|
|
|
777
|
-
| `modelValue` | any | `null` | |
|
|
778
|
-
| `label` | String | `""` | |
|
|
779
|
-
| `placeholder` | String | `""` | |
|
|
780
|
-
| `type` | String | `"text"` | |
|
|
781
|
-
| `name` | String | _required_ | |
|
|
782
|
-
| `rules` | String / Object | `""` | |
|
|
783
|
-
| `containerClass` | String | `"mb-3"` | |
|
|
784
|
-
| `hints` | String | `""` | |
|
|
785
|
-
| `multiple` | Boolean | `false` | Deprecated ? use `mode`. |
|
|
786
|
-
| `searchable` | Boolean | `false` | |
|
|
787
|
-
| `mode` | String | `"single"` | `single`, `multiple`, `tags`. |
|
|
788
|
-
| `options` | Array | `[]` | |
|
|
789
|
-
| `labelKey` | String | `"title"` | |
|
|
790
|
-
| `valueKey` | String | `"val"` | |
|
|
791
|
-
| `max` | Number | `-1` | `-1` = unlimited. |
|
|
792
|
-
| `object` | Boolean | `false` | Return full objects. |
|
|
793
|
-
| `prefix` | String | `""` | |
|
|
794
|
-
| `postfix` | String | `""` | |
|
|
795
|
-
| `isAjaxSearch` | Boolean | `false` | |
|
|
796
|
-
| `onSearch` | Function | `null` | AJAX search handler. |
|
|
797
|
-
| `hideSelected` | Boolean | `true` | |
|
|
798
|
-
| `loading` | Boolean | `false` | |
|
|
799
|
-
| `disabled` | Boolean | `false` | |
|
|
800
|
-
| `appendToBody` | Boolean | `true` | Teleport dropdown to `<body>`. |
|
|
801
|
-
| `isLeftIconBorder` | Boolean | `false` | |
|
|
802
|
-
| `isRightIconBorder` | Boolean | `false` | |
|
|
736
|
+
| `isHideLabel` | Boolean | `false` | Hide the label visually. |
|
|
737
|
+
| `iconPosition` | String | `"right"` | Position of the custom `#icon` slot. |
|
|
803
738
|
|
|
804
739
|
**Events** ? `update:modelValue`, `clear`, `change(value)`, `select(value)`, `open`, `close`, `search-change(query)`.
|
|
805
740
|
|
|
806
|
-
**Slots** ? `label`, `prefix`, `postfix`, `singlelabel(value)`, `option({ option, isSelected })`, `noresults`, `option-loading`, `loader-icon`.
|
|
741
|
+
**Slots** ? `label`, `prefix`, `postfix`, `icon`, `singlelabel(value)`, `taglabel(value)`, `option({ option, isSelected })`, `noresults`, `option-loading`, `loader-icon`.
|
|
807
742
|
|
|
808
743
|
**v-model** ? yes.
|
|
809
744
|
|
|
@@ -1130,6 +1065,27 @@ No declared props. `AbKbd` renders a single `<kbd>`-like chip; `AbKbdGroup` comp
|
|
|
1130
1065
|
|
|
1131
1066
|
---
|
|
1132
1067
|
|
|
1068
|
+
### AbChart
|
|
1069
|
+
|
|
1070
|
+
**Props**
|
|
1071
|
+
|
|
1072
|
+
| Name | Type | Default | Notes |
|
|
1073
|
+
| ------------ | ------ | ------------ | ------------------------------------------------------------------------------------------- |
|
|
1074
|
+
| `option` | Object | `{}` | Full ECharts option object. Overrides other props if provided. |
|
|
1075
|
+
| `chartType` | String | `""` | Simple chart type: `"line"`, `"bar"`, `"pie"`. |
|
|
1076
|
+
| `xAxisData` | Array | `[]` | Categories for the X-axis (used for line/bar). |
|
|
1077
|
+
| `seriesData` | Array | `[]` | Data points for the series. Use objects `{ value, name }` for Pie charts. |
|
|
1078
|
+
| `xAxisType` | String | `"category"` | X-axis scale type. |
|
|
1079
|
+
| `yAxisType` | String | `"value"` | Y-axis scale type. |
|
|
1080
|
+
| `legendOrient` | String | `""` | Orientation of the chart legend (e.g., `"vertical"`, `"horizontal"`). |
|
|
1081
|
+
| `showPointValues` | Boolean | `false` | If true, displays the value label on each data point in the chart. |
|
|
1082
|
+
| `height` | String | `"400px"` | Height of the chart container (e.g., "300px", "50%"). |
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
**Slots** ? None.
|
|
1086
|
+
|
|
1087
|
+
---
|
|
1088
|
+
|
|
1133
1089
|
## 4. Composables & Directives
|
|
1134
1090
|
|
|
1135
1091
|
### Directives
|