@appsbd/vue3-appsbd-ui 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai/ai_ref_AbAvatar.md +41 -51
- package/.ai/ai_ref_AbBadge.md +36 -45
- package/.ai/ai_ref_AbButton.md +52 -70
- package/.ai/ai_ref_AbCard.md +51 -70
- package/.ai/ai_ref_AbCarousel.md +36 -47
- package/.ai/ai_ref_AbChart.md +46 -87
- package/.ai/ai_ref_AbColorPicker.md +42 -55
- package/.ai/ai_ref_AbConfirmPopover.md +54 -59
- package/.ai/ai_ref_AbCustomField.md +66 -74
- package/.ai/ai_ref_AbDarkModeToggler.md +33 -42
- package/.ai/ai_ref_AbDateTimePicker.md +74 -108
- package/.ai/ai_ref_AbEasyModal.md +56 -62
- package/.ai/ai_ref_AbField.md +88 -96
- package/.ai/ai_ref_AbFileUploader.md +47 -63
- package/.ai/ai_ref_AbFilterPanel.md +67 -71
- package/.ai/ai_ref_AbFormCheck.md +58 -75
- package/.ai/ai_ref_AbImageRadioInput.md +55 -63
- package/.ai/ai_ref_AbInputField.md +66 -74
- package/.ai/ai_ref_AbInputTag.md +56 -76
- package/.ai/ai_ref_AbKbd.md +23 -35
- package/.ai/ai_ref_AbKbdGroup.md +21 -33
- package/.ai/ai_ref_AbMainLayout.md +106 -0
- package/.ai/ai_ref_AbModal.md +98 -103
- package/.ai/ai_ref_AbMultiSelect.md +78 -112
- package/.ai/ai_ref_AbNumberField.md +59 -84
- package/.ai/ai_ref_AbPinInput.md +33 -45
- package/.ai/ai_ref_AbPopover.md +54 -64
- package/.ai/ai_ref_AbPricingCard.md +56 -64
- package/.ai/ai_ref_AbPricingContainer.md +41 -49
- package/.ai/ai_ref_AbPricingTable.md +56 -72
- package/.ai/ai_ref_AbProgressbar.md +34 -44
- package/.ai/ai_ref_AbScrollbar.md +38 -48
- package/.ai/ai_ref_AbSettingsForm.md +46 -54
- package/.ai/ai_ref_AbSideMenuItem.md +47 -58
- package/.ai/ai_ref_AbSidebar.md +62 -70
- package/.ai/ai_ref_AbSkeleton.md +23 -41
- package/.ai/ai_ref_AbSlider.md +52 -71
- package/.ai/ai_ref_AbTab.md +30 -38
- package/.ai/ai_ref_AbTable.md +49 -59
- package/.ai/ai_ref_AbTabs.md +37 -47
- package/.ai/ai_ref_AbToggle.md +46 -65
- package/.ai/ai_ref_AbTooltip.md +39 -53
- package/.ai/ai_ref_AbWizard.md +64 -77
- package/.ai/ai_ref_AbWizardStep.md +36 -48
- package/.ai/ai_ref_abEventBus.md +9 -37
- package/.ai/ai_ref_abRequestParam.md +2 -17
- package/.ai/ai_ref_abTranslate.md +30 -15
- package/.ai/ai_ref_abVeeRules.md +2 -11
- package/.ai/ai_ref_global_config.md +57 -66
- package/.ai/ai_ref_useAlert.md +7 -20
- package/.ai/ai_ref_useFileValidator.md +3 -18
- package/.ai/ai_ref_useResponsive.md +6 -20
- package/.ai/ai_ref_useTheme.md +4 -15
- package/.ai/ai_ref_useToast.md +5 -17
- package/AI_REF.md +114 -0
- package/AI_REFERENCE.md +87 -1157
- package/design-system.md +403 -403
- package/dist/skins/black.css +1 -1
- package/dist/skins/black.scss +3 -3
- package/dist/skins/cyan.css +1 -1
- package/dist/skins/cyan.scss +3 -3
- package/dist/skins/default.css +1 -1
- package/dist/skins/default.scss +5 -5
- package/dist/skins/gray.css +1 -1
- package/dist/skins/gray.scss +3 -3
- package/dist/skins/green.css +1 -1
- package/dist/skins/green.scss +5 -5
- package/dist/skins/orange.css +1 -1
- package/dist/skins/orange.scss +3 -3
- package/dist/skins/pink.css +1 -1
- package/dist/skins/pink.scss +3 -3
- package/dist/skins/purple.css +1 -1
- package/dist/skins/purple.scss +3 -3
- package/dist/skins/red.css +1 -1
- package/dist/skins/red.scss +3 -3
- package/dist/skins/themes/_black.scss +18 -6
- package/dist/skins/themes/_blue.scss +18 -43
- package/dist/skins/themes/_common_variable.scss +695 -590
- package/dist/skins/themes/_cyan.scss +18 -6
- package/dist/skins/themes/_gray.scss +18 -6
- package/dist/skins/themes/_green.scss +18 -6
- package/dist/skins/themes/_grid.scss +32 -27
- package/dist/skins/themes/_orange.scss +18 -6
- package/dist/skins/themes/_pink.scss +18 -6
- package/dist/skins/themes/_purple.scss +18 -6
- package/dist/skins/themes/_red.scss +18 -6
- package/dist/skins/themes/_violet.scss +18 -6
- package/dist/skins/violet.css +1 -1
- package/dist/skins/violet.scss +3 -3
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +145 -125
- package/dist/vue3-appsbd-ui.es.js +27822 -16778
- package/package.json +72 -66
- package/readme.md +194 -136
- package/scripts/postinstall.js +55 -0
- package/scripts/setup.js +16 -0
- package/scripts/skill-groups.js +38 -0
- package/skills/commands/generate-module.md +76 -0
- package/skills/commands/settings-form.md +175 -0
- package/skills/commands/use-appsbd-ui.md +40 -0
|
@@ -1,66 +1,57 @@
|
|
|
1
|
-
# Global UI Configuration (`AppsbdUIConfigure`)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `toastPauseOnFocusLoss` | `Boolean` | `true` | Default toast pause on focus loss. |
|
|
59
|
-
| `toastShowProgress` | `Boolean` | `true` | Default toast show progress. |
|
|
60
|
-
| `trueValue` | `any` | `'Y'` | Default true value for toggles/switches. |
|
|
61
|
-
| `falseValue` | `any` | `'N'` | Default false value for toggles/switches. |
|
|
62
|
-
| `size` | `String` | `'md'` | Global size for components. |
|
|
63
|
-
|
|
64
|
-
## Precedence Rule
|
|
65
|
-
|
|
66
|
-
Components follow a strict "prop > global config > built-in default" resolution order. For example, if you pass `:is-24-hour="true"` directly to an `<AbDateTimePicker>`, it will override the global config setting for that specific instance.
|
|
1
|
+
# Global UI Configuration (`AppsbdUIConfigure`)
|
|
2
|
+
|
|
3
|
+
Call `AppsbdUIConfigure` once during app initialization to set library-wide locale and formatting defaults. Components follow a strict "prop > global config > built-in default" resolution order.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
import { AppsbdUIConfigure } from "@vue3-appsbd-ui";
|
|
9
|
+
|
|
10
|
+
const banglaDigits = ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"];
|
|
11
|
+
|
|
12
|
+
AppsbdUIConfigure({
|
|
13
|
+
monthNames: ["জানুয়ারি", "ফেব্রুয়ারি", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"],
|
|
14
|
+
monthNamesShort: ["জানু", "ফেব্রু", "মার্চ", "এপ্রি", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টে", "অক্টো", "নভে", "ডিসে"],
|
|
15
|
+
dayNames: ["শনি", "রবি", "সোম", "মঙ্গল", "বুধ", "বৃহঃ", "শুক্র"],
|
|
16
|
+
formatDigit: (val) => String(val).replace(/\d/g, (d) => banglaDigits[d]),
|
|
17
|
+
is24Hour: false,
|
|
18
|
+
rangeSeparator: " থেকে ",
|
|
19
|
+
dateDataFormat: "YYYY-MM-DD",
|
|
20
|
+
dateDisplayFormat: "DD/MM/YYYY",
|
|
21
|
+
datetimeDataFormat: "YYYY-MM-DD HH:mm",
|
|
22
|
+
datetimeDisplayFormat: "DD/MM/YYYY hh:mm a",
|
|
23
|
+
timeDataFormat: "HH:mm",
|
|
24
|
+
timeDisplayFormat: "hh:mm a",
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Options Reference
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Description |
|
|
31
|
+
| :--- | :--- | :--- | :--- |
|
|
32
|
+
| `monthNames` | `String[]` | English full names | Array of 12 full month names. |
|
|
33
|
+
| `monthNamesShort` | `String[]` | English short names | Array of 12 short month names. |
|
|
34
|
+
| `dayNames` | `String[]` | English 3-letter names | Array of 7 short day names (Sat-first). |
|
|
35
|
+
| `formatDigit` | `Function` | `(val) => String(val)` | Digit formatter applied to `AbNumberField` (display-only) and `AbDateTimePicker`. |
|
|
36
|
+
| `rangeSeparator` | `String` | `' ↔ '` | Separator for date ranges in `AbDateTimePicker`. |
|
|
37
|
+
| `is24Hour` | `Boolean` | `false` | Whether to use 24-hour format in `AbDateTimePicker`. |
|
|
38
|
+
| `dateDataFormat` | `String` | `'YYYY-MM-DD'` | Global format for date data. |
|
|
39
|
+
| `dateDisplayFormat` | `String` | `'YYYY-MM-DD'` | Global format for date display. |
|
|
40
|
+
| `datetimeDataFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime data. |
|
|
41
|
+
| `datetimeDisplayFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime display. |
|
|
42
|
+
| `timeDataFormat` | `String` | `'HH:mm'` | Global format for time data. |
|
|
43
|
+
| `timeDisplayFormat` | `String` | `'HH:mm'` | Global format for time display. |
|
|
44
|
+
| `inputContainerClass` | `String` | `'mb-3'` | Global class for input containers. |
|
|
45
|
+
| `toastPosition` | `String` | `'top-right'` | Default toast position. |
|
|
46
|
+
| `toastDesign` | `String` | `'default'` | Default toast design. |
|
|
47
|
+
| `toastTimeout` | `Number` | `5000` | Default toast timeout in ms. |
|
|
48
|
+
| `toastCloseButton` | `Boolean` | `true` | Default toast close button visibility. |
|
|
49
|
+
| `toastPauseOnHover` | `Boolean` | `true` | Default toast pause on hover. |
|
|
50
|
+
| `toastPauseOnFocusLoss` | `Boolean` | `true` | Default toast pause on focus loss. |
|
|
51
|
+
| `toastShowProgress` | `Boolean` | `true` | Default toast show progress. |
|
|
52
|
+
| `trueValue` | `any` | `'Y'` | Default true value for toggles/switches. |
|
|
53
|
+
| `falseValue` | `any` | `'N'` | Default false value for toggles/switches. |
|
|
54
|
+
| `size` | `String` | `'md'` | Global size for components. |
|
|
55
|
+
| `input.iconPosition` | `String` | `'right'` | Global default icon position for input components (`left`, `right`). |
|
|
56
|
+
| `button.iconPosition` | `String` | `'left'` | Global default icon position for buttons (`left`, `right`). |
|
|
57
|
+
| `isModalBorder` | `Boolean` | `true` | Global default modal border. |
|
package/.ai/ai_ref_useAlert.md
CHANGED
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Provides a procedural API to trigger modal alerts, notifications, and confirmations using the global `$alert` instance.
|
|
4
4
|
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Ensure the library is installed:
|
|
8
|
-
|
|
9
|
-
```javascript
|
|
10
|
-
npm install @vue3-appsbd-ui
|
|
11
|
-
```
|
|
12
|
-
|
|
13
5
|
## Usage
|
|
14
6
|
|
|
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
7
|
```html
|
|
18
8
|
<script setup>
|
|
19
9
|
import { useAlert } from "@vue3-appsbd-ui";
|
|
@@ -29,26 +19,18 @@ async function handleAction() {
|
|
|
29
19
|
confirmText: "Yes, delete",
|
|
30
20
|
cancelText: "Cancel"
|
|
31
21
|
});
|
|
32
|
-
|
|
22
|
+
|
|
33
23
|
if (result) {
|
|
34
24
|
// User confirmed
|
|
35
25
|
}
|
|
36
26
|
}
|
|
37
27
|
</script>
|
|
38
|
-
|
|
39
|
-
<template>
|
|
40
|
-
<button @click="handleAction">Delete</button>
|
|
41
|
-
</template>
|
|
42
28
|
```
|
|
43
29
|
|
|
44
30
|
## API Reference
|
|
45
31
|
|
|
46
32
|
### `alert(options)`
|
|
47
33
|
|
|
48
|
-
The `alert` method accepts an options object to configure the dialog.
|
|
49
|
-
|
|
50
|
-
**Options**
|
|
51
|
-
|
|
52
34
|
| Property | Type | Default | Description |
|
|
53
35
|
|---|---|---|---|
|
|
54
36
|
| `type` | `string` | `"alert"` | Variant: `"alert"`, `"confirm"`, or `"confirm-ajax"`. |
|
|
@@ -57,7 +39,12 @@ The `alert` method accepts an options object to configure the dialog.
|
|
|
57
39
|
| `icon` | `string` | - | Status icon: `"success"`, `"error"`, `"warning"`, `"info"`, `"question"`. |
|
|
58
40
|
| `variation` | `string` | `"default"` | Visual style: `"default"`, `"modern"`, `"minimal"`, `"top-color-bar"`. |
|
|
59
41
|
| `size` | `string` | `"md"` | Width limit: `"sm"`, `"md"`, `"lg"`, `"xl"`, `"auto"`. |
|
|
60
|
-
| `confirmText
|
|
42
|
+
| `confirmText` | `string` | `"OK"` | Label for the primary accept button. |
|
|
61
43
|
| `cancelText` | `string` | `"Cancel"` | Label for the cancel/decline button. |
|
|
44
|
+
| `confirmBtnIcon` | `string \| Component` | `"save"` | Icon for the confirm button. Built-in names: `"save"`, `"cancel"`, `"delete"`, or Vue Component. |
|
|
45
|
+
| `cancelBtnIcon` | `string \| Component` | `"cancel"` | Icon for the cancel button. Built-in names: `"save"`, `"cancel"`, `"delete"`, or Vue Component. |
|
|
46
|
+
| `confirmBtnColor` | `string` | `"primary"` | Theme color for the confirm button (e.g., `"danger"`, `"success"`). |
|
|
47
|
+
| `cancelBtnColor` | `string` | `"light"` | Theme color for the cancel button (e.g., `"secondary"`, `"light"`). |
|
|
62
48
|
| `onConfirm` | `Function` | - | Async callback executed when accepting a `"confirm-ajax"` modal. |
|
|
63
49
|
| `timer` | `number` | - | Auto-close timer in milliseconds (only for `"alert"` type). |
|
|
50
|
+
| `responseMessage` | `string \| object` | `null` | Secondary message block. Can be a string or an object with string arrays for keys `error`, `info`, `debug`, `warning`. |
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# useFileValidator (Composable)
|
|
2
2
|
|
|
3
|
-
Provides file validation utilities to check
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Provides file validation utilities to check extensions, MIME types, and file sizes. Automatically spawns error toasts on validation failure and returns a structured file object with icon metadata.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
@@ -20,27 +14,18 @@ function handleFileUpload(event) {
|
|
|
20
14
|
const file = event.target.files[0];
|
|
21
15
|
if (!file) return;
|
|
22
16
|
|
|
23
|
-
// Validates if file is <= 2.0 MB and is a supported type
|
|
24
17
|
const validatedFile = getFileInfo(file, 2.0);
|
|
25
|
-
|
|
26
18
|
if (validatedFile) {
|
|
27
|
-
console.log("File is valid!", validatedFile);
|
|
28
19
|
// validatedFile.isImage
|
|
29
20
|
// validatedFile.fileIcon
|
|
30
21
|
}
|
|
31
22
|
}
|
|
32
23
|
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<input type="file" @change="handleFileUpload" />
|
|
36
|
-
</template>
|
|
37
24
|
```
|
|
38
25
|
|
|
39
26
|
## API Reference
|
|
40
27
|
|
|
41
|
-
### Returned Methods
|
|
42
|
-
|
|
43
28
|
| Method | Signature | Description |
|
|
44
29
|
|---|---|---|
|
|
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`
|
|
46
|
-
| `getFileIconByExt(ext, type)` | `Function` | Returns
|
|
30
|
+
| `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` augmented with `isImage` and `fileIcon` properties. |
|
|
31
|
+
| `getFileIconByExt(ext, type)` | `Function` | Returns `{ isImage: boolean, fileIcon: Component\|String }` based on file extension and MIME type. Uses `lucide-vue-next` icons for known formats (pdf, zip, doc, xls, ppt, mp4). |
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# useResponsive (Composable)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Tracks browser viewport width in real-time with reactive helpers for responsive layout decisions, aligned with Bootstrap 5 breakpoints.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
@@ -14,24 +8,16 @@ npm install @vue3-appsbd-ui
|
|
|
14
8
|
<script setup>
|
|
15
9
|
import { useResponsive } from "@vue3-appsbd-ui";
|
|
16
10
|
|
|
17
|
-
// Track screen size dynamically
|
|
18
11
|
const { ScreenWidth, ScreenType, isUptoTab } = useResponsive();
|
|
19
|
-
|
|
20
|
-
// Or provide a custom tablet max-width threshold in pixels
|
|
12
|
+
// Or with custom tablet threshold:
|
|
21
13
|
// const { isUptoTab } = useResponsive({ tabMaxWidth: 900 });
|
|
22
14
|
</script>
|
|
23
15
|
|
|
24
16
|
<template>
|
|
25
17
|
<div>
|
|
26
|
-
<p>Current Width: {{ ScreenWidth }}px</p>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
<div v-if="isUptoTab">
|
|
30
|
-
Showing Mobile / Tablet Layout
|
|
31
|
-
</div>
|
|
32
|
-
<div v-else>
|
|
33
|
-
Showing Desktop Layout
|
|
34
|
-
</div>
|
|
18
|
+
<p>Current Width: {{ ScreenWidth }}px — Breakpoint: {{ ScreenType }}</p>
|
|
19
|
+
<div v-if="isUptoTab">Mobile / Tablet Layout</div>
|
|
20
|
+
<div v-else>Desktop Layout</div>
|
|
35
21
|
</div>
|
|
36
22
|
</template>
|
|
37
23
|
```
|
|
@@ -52,4 +38,4 @@ const { ScreenWidth, ScreenType, isUptoTab } = useResponsive();
|
|
|
52
38
|
|---|---|---|
|
|
53
39
|
| `ScreenWidth` | `ComputedRef<number>` | Raw viewport width in pixels. |
|
|
54
40
|
| `ScreenType` | `ComputedRef<string>` | Current Bootstrap-style breakpoint (`'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`). |
|
|
55
|
-
| `isUptoTab` | `ComputedRef<boolean>` | `true` when
|
|
41
|
+
| `isUptoTab` | `ComputedRef<boolean>` | `true` when viewport is tablet-sized or smaller (`xs`, `sm`, or `<=` `tabMaxWidth`). |
|
package/.ai/ai_ref_useTheme.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# useTheme (Composable)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Handles light/dark theme toggling, stores preference in `localStorage`, and reacts to system `prefers-color-scheme: dark` changes.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
@@ -15,9 +9,6 @@ npm install @vue3-appsbd-ui
|
|
|
15
9
|
import { useTheme } from "@vue3-appsbd-ui";
|
|
16
10
|
|
|
17
11
|
const { theme, toggleTheme, applyTheme } = useTheme();
|
|
18
|
-
|
|
19
|
-
// Manually switch to 'dark' or 'light'
|
|
20
|
-
// applyTheme('dark');
|
|
21
12
|
</script>
|
|
22
13
|
|
|
23
14
|
<template>
|
|
@@ -30,10 +21,8 @@ const { theme, toggleTheme, applyTheme } = useTheme();
|
|
|
30
21
|
|
|
31
22
|
## API Reference
|
|
32
23
|
|
|
33
|
-
### Returned Properties & Methods
|
|
34
|
-
|
|
35
24
|
| Name | Type | Description |
|
|
36
25
|
|---|---|---|
|
|
37
|
-
| `theme` | `Ref<string>` |
|
|
38
|
-
| `toggleTheme` | `Function` | Toggles
|
|
39
|
-
| `applyTheme(value)` | `Function` | Explicitly sets the theme to
|
|
26
|
+
| `theme` | `Ref<string>` | Reactive current theme (`'light'` or `'dark'`). |
|
|
27
|
+
| `toggleTheme` | `Function` | Toggles between `'light'` and `'dark'`, updates the DOM (`data-bs-theme`), and saves to `localStorage`. |
|
|
28
|
+
| `applyTheme(value)` | `Function` | Explicitly sets the theme to `'light'` or `'dark'`. |
|
package/.ai/ai_ref_useToast.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# useToast (Composable)
|
|
2
2
|
|
|
3
|
-
Provides a procedural API to spawn toast notifications using the globally registered `$toast` instance
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Provides a procedural API to spawn toast notifications using the globally registered `$toast` instance.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
@@ -21,22 +15,16 @@ function showNotifications() {
|
|
|
21
15
|
toast.error("Failed to connect to server", { timeout: 5000 });
|
|
22
16
|
}
|
|
23
17
|
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<button @click="showNotifications">Show Toasts</button>
|
|
27
|
-
</template>
|
|
28
18
|
```
|
|
29
19
|
|
|
30
20
|
## API Reference
|
|
31
21
|
|
|
32
|
-
### `toast` Methods
|
|
33
|
-
|
|
34
22
|
| Method | Signature | Description |
|
|
35
23
|
|---|---|---|
|
|
36
24
|
| `toast(msg, options)` | `Function` | Spawns a default toast notification. |
|
|
37
|
-
| `toast.success(msg, options)` | `Function` | Spawns a success toast
|
|
38
|
-
| `toast.error(msg, options)` | `Function` | Spawns an error toast
|
|
39
|
-
| `toast.warning(msg, options)` | `Function` | Spawns a warning toast
|
|
40
|
-
| `toast.info(msg, options)` | `Function` | Spawns an info toast
|
|
25
|
+
| `toast.success(msg, options)` | `Function` | Spawns a success toast. |
|
|
26
|
+
| `toast.error(msg, options)` | `Function` | Spawns an error toast. |
|
|
27
|
+
| `toast.warning(msg, options)` | `Function` | Spawns a warning toast. |
|
|
28
|
+
| `toast.info(msg, options)` | `Function` | Spawns an info toast. |
|
|
41
29
|
| `toast.dismiss(id)` | `Function` | Dismisses a specific toast by its ID. |
|
|
42
30
|
| `toast.clear()` | `Function` | Clears all currently visible toasts. |
|
package/AI_REF.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Appsbd UI - Compact AI Reference
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Lightweight index for AI agents working on `vue3-appsbd-ui`.
|
|
6
|
+
For detailed props, events, slots, examples, and usage rules, open the matching per-item file in `.ai/`.
|
|
7
|
+
|
|
8
|
+
## Setup
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import AppsbdUI from "vue3-appsbd-ui";
|
|
12
|
+
import "vue3-appsbd-ui/dist/style.css";
|
|
13
|
+
|
|
14
|
+
app.use(AppsbdUI);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Global configuration: `.ai/ai_ref_global_config.md`.
|
|
18
|
+
|
|
19
|
+
## Reference Lookup
|
|
20
|
+
|
|
21
|
+
Use this pattern whenever possible:
|
|
22
|
+
|
|
23
|
+
```txt
|
|
24
|
+
Component/API name -> .ai/ai_ref_[Name].md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
|
|
29
|
+
- `AbModal` -> `.ai/ai_ref_AbModal.md`
|
|
30
|
+
- `AbButton` -> `.ai/ai_ref_AbButton.md`
|
|
31
|
+
- `useToast` -> `.ai/ai_ref_useToast.md`
|
|
32
|
+
- `abTranslate` -> `.ai/ai_ref_abTranslate.md`
|
|
33
|
+
- `AppsbdUIConfigure` -> `.ai/ai_ref_global_config.md`
|
|
34
|
+
|
|
35
|
+
## Auto-Registered Components
|
|
36
|
+
|
|
37
|
+
These are globally registered by `app.use(AppsbdUI)`:
|
|
38
|
+
|
|
39
|
+
`AbButton`, `AbCard`, `AbModal`, `AbProgressbar`, `AbInputField`, `AbNumberField`, `AbField`, `AbCustomField`, `AbDateTimePicker`, `AbFormCheck`, `AbRadioInput`, `AbToggle`, `AbInputTag`, `AbMultiSelect`, `AbPopover`.
|
|
40
|
+
|
|
41
|
+
All other components/APIs should be explicitly imported unless their detailed `.ai/` reference says otherwise.
|
|
42
|
+
|
|
43
|
+
## Component References
|
|
44
|
+
|
|
45
|
+
- `AbAvatar` -> `.ai/ai_ref_AbAvatar.md`
|
|
46
|
+
- `AbBadge` -> `.ai/ai_ref_AbBadge.md`
|
|
47
|
+
- `AbButton` -> `.ai/ai_ref_AbButton.md`
|
|
48
|
+
- `AbCard` -> `.ai/ai_ref_AbCard.md`
|
|
49
|
+
- `AbCarousel` -> `.ai/ai_ref_AbCarousel.md`
|
|
50
|
+
- `AbChart` -> `.ai/ai_ref_AbChart.md`
|
|
51
|
+
- `AbColorPicker` -> `.ai/ai_ref_AbColorPicker.md`
|
|
52
|
+
- `AbConfirmPopover` -> `.ai/ai_ref_AbConfirmPopover.md`
|
|
53
|
+
- `AbCustomField` -> `.ai/ai_ref_AbCustomField.md`
|
|
54
|
+
- `AbDarkModeToggler` -> `.ai/ai_ref_AbDarkModeToggler.md`
|
|
55
|
+
- `AbDateTimePicker` -> `.ai/ai_ref_AbDateTimePicker.md`
|
|
56
|
+
- `AbEasyModal` -> `.ai/ai_ref_AbEasyModal.md`
|
|
57
|
+
- `AbField` -> `.ai/ai_ref_AbField.md`
|
|
58
|
+
- `AbFileUploader` -> `.ai/ai_ref_AbFileUploader.md`
|
|
59
|
+
- `AbFilterPanel` -> `.ai/ai_ref_AbFilterPanel.md`
|
|
60
|
+
- `AbFormCheck` / `AbRadioInput` -> `.ai/ai_ref_AbFormCheck.md`
|
|
61
|
+
- `AbImageRadioInput` -> `.ai/ai_ref_AbImageRadioInput.md`
|
|
62
|
+
- `AbInputField` -> `.ai/ai_ref_AbInputField.md`
|
|
63
|
+
- `AbInputTag` -> `.ai/ai_ref_AbInputTag.md`
|
|
64
|
+
- `AbKbd` -> `.ai/ai_ref_AbKbd.md`
|
|
65
|
+
- `AbKbdGroup` -> `.ai/ai_ref_AbKbdGroup.md`
|
|
66
|
+
- `AbModal` -> `.ai/ai_ref_AbModal.md`
|
|
67
|
+
- `AbMultiSelect` -> `.ai/ai_ref_AbMultiSelect.md`
|
|
68
|
+
- `AbNumberField` -> `.ai/ai_ref_AbNumberField.md`
|
|
69
|
+
- `AbPinInput` -> `.ai/ai_ref_AbPinInput.md`
|
|
70
|
+
- `AbPopover` -> `.ai/ai_ref_AbPopover.md`
|
|
71
|
+
- `AbPricingCard` -> `.ai/ai_ref_AbPricingCard.md`
|
|
72
|
+
- `AbPricingContainer` -> `.ai/ai_ref_AbPricingContainer.md`
|
|
73
|
+
- `AbPricingTable` -> `.ai/ai_ref_AbPricingTable.md`
|
|
74
|
+
- `AbProgressbar` -> `.ai/ai_ref_AbProgressbar.md`
|
|
75
|
+
- `AbScrollbar` -> `.ai/ai_ref_AbScrollbar.md`
|
|
76
|
+
- `AbSettingsForm` -> `.ai/ai_ref_AbSettingsForm.md`
|
|
77
|
+
- `AbSideMenuItem` -> `.ai/ai_ref_AbSideMenuItem.md`
|
|
78
|
+
- `AbSidebar` -> `.ai/ai_ref_AbSidebar.md`
|
|
79
|
+
- `AbSkeleton` -> `.ai/ai_ref_AbSkeleton.md`
|
|
80
|
+
- `AbSlider` -> `.ai/ai_ref_AbSlider.md`
|
|
81
|
+
- `AbTab` -> `.ai/ai_ref_AbTab.md`
|
|
82
|
+
- `AbTable` -> `.ai/ai_ref_AbTable.md`
|
|
83
|
+
- `AbTabs` -> `.ai/ai_ref_AbTabs.md`
|
|
84
|
+
- `AbToggle` -> `.ai/ai_ref_AbToggle.md`
|
|
85
|
+
- `AbTooltip` -> `.ai/ai_ref_AbTooltip.md`
|
|
86
|
+
- `AbWizard` -> `.ai/ai_ref_AbWizard.md`
|
|
87
|
+
- `AbWizardStep` -> `.ai/ai_ref_AbWizardStep.md`
|
|
88
|
+
|
|
89
|
+
## API References
|
|
90
|
+
|
|
91
|
+
- `AppsbdUIConfigure` -> `.ai/ai_ref_global_config.md`
|
|
92
|
+
- `useAlert` -> `.ai/ai_ref_useAlert.md`
|
|
93
|
+
- `useToast` -> `.ai/ai_ref_useToast.md`
|
|
94
|
+
- `useTheme` -> `.ai/ai_ref_useTheme.md`
|
|
95
|
+
- `useFileValidator` -> `.ai/ai_ref_useFileValidator.md`
|
|
96
|
+
- `useResponsive` -> `.ai/ai_ref_useResponsive.md`
|
|
97
|
+
- `abEventBus` / `emitterObj` -> `.ai/ai_ref_abEventBus.md`
|
|
98
|
+
- `abTranslate` -> `.ai/ai_ref_abTranslate.md`
|
|
99
|
+
- `abVeeRules` -> `.ai/ai_ref_abVeeRules.md`
|
|
100
|
+
- `abRequestParam` -> `.ai/ai_ref_abRequestParam.md`
|
|
101
|
+
|
|
102
|
+
## Directives
|
|
103
|
+
|
|
104
|
+
- `v-tooltip` -> `.ai/ai_ref_AbTooltip.md`
|
|
105
|
+
|
|
106
|
+
## Maintenance
|
|
107
|
+
|
|
108
|
+
When a public component/API changes, update:
|
|
109
|
+
|
|
110
|
+
- matching `.ai/ai_ref_*.md`
|
|
111
|
+
- `AI_REFERENCE.md`
|
|
112
|
+
- playground docs in `playground/components/`
|
|
113
|
+
- this file only when a reference is added, renamed, removed, or auto-registration changes
|
|
114
|
+
|