@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
package/package.json
CHANGED
|
@@ -1,66 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@appsbd/vue3-appsbd-ui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Reusable Vue 3 component library",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/vue3-appsbd-ui.cjs.js",
|
|
7
|
-
"module": "./dist/vue3-appsbd-ui.es.js",
|
|
8
|
-
"style": "./dist/style.css",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"import": "./dist/vue3-appsbd-ui.es.js",
|
|
15
|
-
"require": "./dist/vue3-appsbd-ui.cjs.js"
|
|
16
|
-
},
|
|
17
|
-
"./style.css": "./dist/style.css",
|
|
18
|
-
"./skins/*.css": "./dist/skins/*.css",
|
|
19
|
-
"./skins/*.scss": "./dist/skins/*.scss",
|
|
20
|
-
"./skins/themes/*.scss": "./dist/skins/themes/*.scss"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"dist",
|
|
24
|
-
"readme.md",
|
|
25
|
-
"AI_REFERENCE.md",
|
|
26
|
-
".
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"vite"
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@appsbd/vue3-appsbd-ui",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Reusable Vue 3 component library",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/vue3-appsbd-ui.cjs.js",
|
|
7
|
+
"module": "./dist/vue3-appsbd-ui.es.js",
|
|
8
|
+
"style": "./dist/style.css",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/vue3-appsbd-ui.es.js",
|
|
15
|
+
"require": "./dist/vue3-appsbd-ui.cjs.js"
|
|
16
|
+
},
|
|
17
|
+
"./style.css": "./dist/style.css",
|
|
18
|
+
"./skins/*.css": "./dist/skins/*.css",
|
|
19
|
+
"./skins/*.scss": "./dist/skins/*.scss",
|
|
20
|
+
"./skins/themes/*.scss": "./dist/skins/themes/*.scss"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"readme.md",
|
|
25
|
+
"AI_REFERENCE.md",
|
|
26
|
+
"AI_REF.md",
|
|
27
|
+
".ai",
|
|
28
|
+
"skills",
|
|
29
|
+
"scripts/postinstall.js",
|
|
30
|
+
"scripts/setup.js",
|
|
31
|
+
"scripts/skill-groups.js",
|
|
32
|
+
"design-system.md"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"postinstall": "node scripts/postinstall.js",
|
|
36
|
+
"up": "npm run build && npm publish",
|
|
37
|
+
"dev": "vite --mode playground",
|
|
38
|
+
"lib": "vite",
|
|
39
|
+
"build": "vite build",
|
|
40
|
+
"build:playground": "vite build --mode playground",
|
|
41
|
+
"build:skins": "vite build --mode skins"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"vue",
|
|
45
|
+
"vue3",
|
|
46
|
+
"component-library",
|
|
47
|
+
"vite"
|
|
48
|
+
],
|
|
49
|
+
"author": "appsbd",
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@appsbd/vue3-elite-grid": ">=2.0.4",
|
|
53
|
+
"@vee-validate/rules": ">=4.15.1",
|
|
54
|
+
"bootstrap": ">=5.3.7",
|
|
55
|
+
"lucide-vue-next": ">=0.575.0",
|
|
56
|
+
"vee-validate": ">=4.15.1",
|
|
57
|
+
"vue": ">=3.3.0",
|
|
58
|
+
"vue-router": ">=4.5.0",
|
|
59
|
+
"vue3-gettext": ">=2.4.0",
|
|
60
|
+
"tiny-emitter": ">=2.1.0",
|
|
61
|
+
"echarts": ">=5.5.0",
|
|
62
|
+
"vue-echarts": ">=6.6.9"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
66
|
+
"bootstrap": "^5.3.0",
|
|
67
|
+
"sass-embedded": "^1.97.3",
|
|
68
|
+
"vite": "^5.0.0",
|
|
69
|
+
"highlight.js": "^11.11.1"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {}
|
|
72
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,136 +1,194 @@
|
|
|
1
|
-
# Vue 3 Appsbd UI Library
|
|
2
|
-
|
|
3
|
-
A premium, reusable Vue 3 component library built for high-performance enterprise applications. Leverages **Vite**, **SCSS**, and **Bootstrap 5** to provide a rich set of UI components with built-in Dark Mode and RTL support.
|
|
4
|
-
|
|
5
|
-
## 🚀 Key Features
|
|
6
|
-
|
|
7
|
-
- **Vue 3 Composition API**: Optimized for performance and flexibility.
|
|
8
|
-
- **Dynamic Theming**: Full dark mode support using Bootstrap's `data-bs-theme`.
|
|
9
|
-
- **RTL Ready**: Built with CSS logical properties for global accessibility.
|
|
10
|
-
- **Plugin System**: custom-built global systems for Toasts and Alerts.
|
|
11
|
-
- **Enterprise Ready**: Includes complex components like MultiSelect, DatePicker, Wizard, Pricing Tables, and Filter Panels.
|
|
12
|
-
- **Themable Skins**: 10 prebuilt color skins (default, green, red, cyan, purple, violet, pink, orange, gray, black) shipped as standalone CSS under `dist/skins/`.
|
|
13
|
-
|
|
14
|
-
## 📦 Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install @appsbd/vue3-appsbd-ui
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Peer Dependencies
|
|
21
|
-
|
|
22
|
-
Ensure you have the following installed in your project:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npm install bootstrap bootstrap-icons vee-validate @vee-validate/rules vue-router vue3-gettext lucide-vue-next tiny-emitter @appsbd/vue3-elite-grid
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 🤖 AI Assistant Integration
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
1
|
+
# Vue 3 Appsbd UI Library
|
|
2
|
+
|
|
3
|
+
A premium, reusable Vue 3 component library built for high-performance enterprise applications. Leverages **Vite**, **SCSS**, and **Bootstrap 5** to provide a rich set of UI components with built-in Dark Mode and RTL support.
|
|
4
|
+
|
|
5
|
+
## 🚀 Key Features
|
|
6
|
+
|
|
7
|
+
- **Vue 3 Composition API**: Optimized for performance and flexibility.
|
|
8
|
+
- **Dynamic Theming**: Full dark mode support using Bootstrap's `data-bs-theme`.
|
|
9
|
+
- **RTL Ready**: Built with CSS logical properties for global accessibility.
|
|
10
|
+
- **Plugin System**: custom-built global systems for Toasts and Alerts.
|
|
11
|
+
- **Enterprise Ready**: Includes complex components like MultiSelect, DatePicker, Wizard, Pricing Tables, and Filter Panels.
|
|
12
|
+
- **Themable Skins**: 10 prebuilt color skins (default, green, red, cyan, purple, violet, pink, orange, gray, black) shipped as standalone CSS under `dist/skins/`.
|
|
13
|
+
|
|
14
|
+
## 📦 Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @appsbd/vue3-appsbd-ui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Peer Dependencies
|
|
21
|
+
|
|
22
|
+
Ensure you have the following installed in your project:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install bootstrap bootstrap-icons vee-validate @vee-validate/rules vue-router vue3-gettext lucide-vue-next tiny-emitter @appsbd/vue3-elite-grid
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 🤖 AI Assistant Integration
|
|
29
|
+
|
|
30
|
+
Installing this library automatically copies AI skills into your project so Claude Code and Agent-based tools can generate correct component code without guessing props or imports.
|
|
31
|
+
|
|
32
|
+
### What gets installed
|
|
33
|
+
|
|
34
|
+
Running `npm install @appsbd/vue3-appsbd-ui` copies the following automatically:
|
|
35
|
+
|
|
36
|
+
| Destination | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `.claude/commands/` | Slash commands for Claude Code (`/use-appsbd-ui`, `/generate-module`) |
|
|
39
|
+
| `.claude/skills/` | Skills auto-detected by Claude Code |
|
|
40
|
+
| `.agent/workflows/` | Workflow commands for Agent-based tools |
|
|
41
|
+
| `.agent/skills/` | Skills for Agent-based tools |
|
|
42
|
+
|
|
43
|
+
### Available slash commands
|
|
44
|
+
|
|
45
|
+
| Command | Description |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `/use-appsbd-ui` | Loads component reference before generating any code — always run this first |
|
|
48
|
+
| `/generate-module` | Scaffolds a full CRUD module (List + Form + Composable) for a given entity |
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
/generate-module
|
|
53
|
+
|
|
54
|
+
Module: Invoice
|
|
55
|
+
Fields:
|
|
56
|
+
- title (text, required)
|
|
57
|
+
- amount (number, required, min: 0)
|
|
58
|
+
- status (select: Draft | Sent | Paid, required)
|
|
59
|
+
- due_date (date)
|
|
60
|
+
|
|
61
|
+
API: /api/invoices
|
|
62
|
+
Output: src/modules/invoices/
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Optional: enable additional AI tools
|
|
66
|
+
|
|
67
|
+
To also install skills for Cursor or Windsurf, pass `APPSBD_AGENTS` during install:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
APPSBD_AGENTS=cursor npm install @appsbd/vue3-appsbd-ui
|
|
71
|
+
APPSBD_AGENTS=cursor,windsurf npm install @appsbd/vue3-appsbd-ui
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or run the setup script any time after install:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
node node_modules/@appsbd/vue3-appsbd-ui/scripts/setup.js --cursor --windsurf
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Manual reference
|
|
81
|
+
|
|
82
|
+
If you prefer not to use auto-installed skills, the reference files are included in the package:
|
|
83
|
+
|
|
84
|
+
- `node_modules/@appsbd/vue3-appsbd-ui/AI_REF.md` — compact component index (~500 tokens, start here)
|
|
85
|
+
- `node_modules/@appsbd/vue3-appsbd-ui/AI_REFERENCE.md` — full table with descriptions
|
|
86
|
+
- `node_modules/@appsbd/vue3-appsbd-ui/.ai/ai_ref_[Name].md` — per-component props/events/slots
|
|
87
|
+
|
|
88
|
+
Point your AI to read `AI_REF.md` first, then the specific `.ai/` file for the component you need.
|
|
89
|
+
|
|
90
|
+
## 🛠️ Setup
|
|
91
|
+
|
|
92
|
+
Register the library and its styles in your main entry file (e.g., `main.js`):
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
import { createApp } from "vue";
|
|
96
|
+
import AppsbdUI from "@appsbd/vue3-appsbd-ui";
|
|
97
|
+
import "@appsbd/vue3-appsbd-ui/style.css";
|
|
98
|
+
|
|
99
|
+
const app = createApp(App);
|
|
100
|
+
app.use(AppsbdUI);
|
|
101
|
+
app.mount("#app");
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Applying a Theme Skin (optional)
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
// Default skin
|
|
108
|
+
import "@appsbd/vue3-appsbd-ui/dist/skins/default.css";
|
|
109
|
+
|
|
110
|
+
// Or any other prebuilt skin
|
|
111
|
+
import "@appsbd/vue3-appsbd-ui/dist/skins/purple.css";
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 🧩 Core Components & Composables
|
|
115
|
+
|
|
116
|
+
### Toast Notifications
|
|
117
|
+
|
|
118
|
+
The library includes a robust custom toast system with pause-on-hover and pause-on-focus-loss features.
|
|
119
|
+
|
|
120
|
+
```javascript
|
|
121
|
+
import { useToast } from "@appsbd/vue3-appsbd-ui";
|
|
122
|
+
const { toast } = useToast();
|
|
123
|
+
|
|
124
|
+
toast.success("Changes saved!", { timeout: 3000 });
|
|
125
|
+
toast.error("An error occurred", { position: "top-center" });
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Global Alerts
|
|
129
|
+
|
|
130
|
+
Integrated SweetAlert2 system focused on aesthetic consistency.
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
import { useAlert } from "@appsbd/vue3-appsbd-ui";
|
|
134
|
+
const { alert } = useAlert();
|
|
135
|
+
|
|
136
|
+
alert.success("Success!", "Your profile has been updated.");
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Theme Management
|
|
140
|
+
|
|
141
|
+
Easily toggle between light and dark modes.
|
|
142
|
+
|
|
143
|
+
```javascript
|
|
144
|
+
import { useTheme } from "@appsbd/vue3-appsbd-ui";
|
|
145
|
+
const { isDark, toggleTheme } = useTheme();
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 📚 Component Reference
|
|
149
|
+
|
|
150
|
+
| Component | Description |
|
|
151
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
152
|
+
| `AbAvatar` | Profile imagery with status indicators and size variants. |
|
|
153
|
+
| `AbBadge` | Labeling component for status and counts. |
|
|
154
|
+
| `AbButton` | Highly customizable button with loading states. |
|
|
155
|
+
| `AbCard` | Flexible container for grouped content (supports tile / item / insight variants via CSS classes). |
|
|
156
|
+
| `AbCarousel` | Responsive carousel / slider. |
|
|
157
|
+
| `AbColorPicker` | Visual color selection interface. |
|
|
158
|
+
| `AbConfirmPopover` | Multi-step interactive popover for confirmations and async flows. |
|
|
159
|
+
| `AbCustomField` | Base wrapper for creating custom form inputs. |
|
|
160
|
+
| `AbDarkModeToggler` | One-click light/dark theme toggle. |
|
|
161
|
+
| `AbDateTimePicker` | Full-featured date and time selection (powered by v-calendar). |
|
|
162
|
+
| `AbDropdown` | Custom styled dropdown menus. |
|
|
163
|
+
| `AbEasyModal` | Lightweight modal for simple dialogs. |
|
|
164
|
+
| `AbField` | Generic form field wrapper with label / help / error slots. |
|
|
165
|
+
| `AbFileUploader` | Drag-and-drop file upload interface. |
|
|
166
|
+
| `AbFilterPanel` | Comprehensive filtering UI for data-heavy views. |
|
|
167
|
+
| `AbFormCheck` / `AbRadioInput` | Standardized checkbox / radio controls. |
|
|
168
|
+
| `AbImageRadioInput` | Radio group rendered as selectable image tiles. |
|
|
169
|
+
| `AbInputField` | High-quality text input with validation/feedback. |
|
|
170
|
+
| `AbInputTag` | Tagging / multiple-value input field. |
|
|
171
|
+
| `AbKbd` / `AbKbdGroup` | Keyboard shortcut display primitives. |
|
|
172
|
+
| `AbModal` | Sophisticated dialog system with transitions. |
|
|
173
|
+
| `AbMultiSelect` | Advanced searchable multi-selection dropdown (built-in, replaces `@vueform/multiselect`). |
|
|
174
|
+
| `AbNavLink` | Navigation link for sidebars and menus. |
|
|
175
|
+
| `AbNumberField` | Numeric input with step controls. |
|
|
176
|
+
| `AbPinInput` | Segmented OTP / PIN entry input. |
|
|
177
|
+
| `AbPopover` | Floating popover powered by floating-vue. |
|
|
178
|
+
| `AbPricingCard` / `AbPricingContainer` / `AbPricingTable` | Composable pricing-plan building blocks. |
|
|
179
|
+
| `AbProgressbar` | Smooth, animated progress tracking. |
|
|
180
|
+
| `AbScrollbar` | Styled custom scroll container. |
|
|
181
|
+
| `AbSettingsForm` | Opinionated settings / preferences form layout. |
|
|
182
|
+
| `AbSidebar` / `AbSideMenuItem` | Dynamic sidebar navigation components. |
|
|
183
|
+
| `AbSkeleton` | Loading-state skeleton placeholders. |
|
|
184
|
+
| `AbSlider` | Range selection slider for numerical values. |
|
|
185
|
+
| `AbTable` | Data table with the project's default styling. |
|
|
186
|
+
| `AbTabs` / `AbTab` | Responsive tabbed interface. |
|
|
187
|
+
| `AbToast` | High-performance notification system. |
|
|
188
|
+
| `AbToggle` | Accessible switch/toggle component. |
|
|
189
|
+
| `AbTooltip` | Floating tooltip powered by floating-vue. |
|
|
190
|
+
| `AbWizard` / `AbWizardStep` | Multi-step wizard flow. |
|
|
191
|
+
|
|
192
|
+
## 📄 License
|
|
193
|
+
|
|
194
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, copyFileSync, readFileSync, readdirSync } from "fs";
|
|
2
|
+
import { join, resolve } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { getSkillGroups } from "./skill-groups.js";
|
|
5
|
+
|
|
6
|
+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
7
|
+
const pkgRoot = resolve(__dirname, "..");
|
|
8
|
+
|
|
9
|
+
// INIT_CWD = directory where `npm install` was invoked (consuming project root).
|
|
10
|
+
const projectRoot = process.env.INIT_CWD || resolve(__dirname, "../../../..");
|
|
11
|
+
|
|
12
|
+
// Skip when the library is installing its own devDependencies.
|
|
13
|
+
try {
|
|
14
|
+
const pkg = JSON.parse(readFileSync(join(projectRoot, "package.json"), "utf8"));
|
|
15
|
+
if (pkg.name === "@appsbd/vue3-appsbd-ui") process.exit(0);
|
|
16
|
+
} catch {
|
|
17
|
+
// consuming project has no package.json at that path — continue anyway
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Optional agents: APPSBD_AGENTS=cursor,windsurf npm install @appsbd/vue3-appsbd-ui
|
|
21
|
+
const agents = process.env.APPSBD_AGENTS
|
|
22
|
+
? process.env.APPSBD_AGENTS.split(",").map((a) => a.trim().toLowerCase())
|
|
23
|
+
: [];
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
copySkills(pkgRoot, projectRoot, agents);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
// Non-fatal — never break npm install
|
|
29
|
+
console.warn("[@appsbd/vue3-appsbd-ui] Could not install skills:", err.message);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function copySkills(pkgRoot, projectRoot, agents = []) {
|
|
33
|
+
const groups = getSkillGroups(pkgRoot, projectRoot, agents);
|
|
34
|
+
let copied = 0, skipped = 0;
|
|
35
|
+
|
|
36
|
+
for (const group of groups) {
|
|
37
|
+
if (!existsSync(group.src)) continue;
|
|
38
|
+
const files = readdirSync(group.src).filter((f) => f.endsWith(".md"));
|
|
39
|
+
|
|
40
|
+
for (const dest of group.dests) {
|
|
41
|
+
if (!existsSync(dest)) mkdirSync(dest, { recursive: true });
|
|
42
|
+
for (const file of files) {
|
|
43
|
+
const dst = join(dest, file);
|
|
44
|
+
if (group.override.includes(file) || !existsSync(dst)) {
|
|
45
|
+
copyFileSync(join(group.src, file), dst);
|
|
46
|
+
copied++;
|
|
47
|
+
} else {
|
|
48
|
+
skipped++;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
console.log(`[@appsbd/vue3-appsbd-ui] Skills → copied: ${copied}, skipped (preserved): ${skipped}`);
|
|
55
|
+
}
|
package/scripts/setup.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Usage: node node_modules/@appsbd/vue3-appsbd-ui/scripts/setup.js --cursor --windsurf
|
|
3
|
+
|
|
4
|
+
import { resolve } from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import { copySkills } from "./postinstall.js";
|
|
7
|
+
|
|
8
|
+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
9
|
+
const pkgRoot = resolve(__dirname, "..");
|
|
10
|
+
const projectRoot = process.env.INIT_CWD || process.cwd();
|
|
11
|
+
|
|
12
|
+
const agents = process.argv
|
|
13
|
+
.filter((a) => a.startsWith("--"))
|
|
14
|
+
.map((a) => a.slice(2).toLowerCase());
|
|
15
|
+
|
|
16
|
+
copySkills(pkgRoot, projectRoot, agents);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { join } from "path";
|
|
2
|
+
|
|
3
|
+
// Central config for all agent skill destinations.
|
|
4
|
+
// Add new agents here — postinstall.js and setup.js both use this.
|
|
5
|
+
|
|
6
|
+
const OPTIONAL_AGENTS = {
|
|
7
|
+
cursor: (pkgRoot, projectRoot) => [
|
|
8
|
+
{ src: join(pkgRoot, "skills", "commands"), dests: [join(projectRoot, ".cursor", "rules")], override: ["use-appsbd-ui.md"] },
|
|
9
|
+
{ src: join(pkgRoot, "skills", "skills"), dests: [join(projectRoot, ".cursor", "rules")], override: [] },
|
|
10
|
+
],
|
|
11
|
+
windsurf: (pkgRoot, projectRoot) => [
|
|
12
|
+
{ src: join(pkgRoot, "skills", "commands"), dests: [join(projectRoot, ".windsurf", "workflows")], override: ["use-appsbd-ui.md"] },
|
|
13
|
+
{ src: join(pkgRoot, "skills", "skills"), dests: [join(projectRoot, ".windsurf", "rules")], override: [] },
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function getSkillGroups(pkgRoot, projectRoot, agents = []) {
|
|
18
|
+
const groups = [
|
|
19
|
+
// Always installed — Claude Code + Agent
|
|
20
|
+
{
|
|
21
|
+
src: join(pkgRoot, "skills", "commands"),
|
|
22
|
+
dests: [join(projectRoot, ".claude", "commands"), join(projectRoot, ".agent", "workflows")],
|
|
23
|
+
override: ["use-appsbd-ui.md"],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
src: join(pkgRoot, "skills", "skills"),
|
|
27
|
+
dests: [join(projectRoot, ".claude", "skills"), join(projectRoot, ".agent", "skills")],
|
|
28
|
+
override: [],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
for (const agent of agents) {
|
|
33
|
+
if (OPTIONAL_AGENTS[agent]) groups.push(...OPTIONAL_AGENTS[agent](pkgRoot, projectRoot));
|
|
34
|
+
else console.warn(`[@appsbd/vue3-appsbd-ui] Unknown agent "${agent}" — skipped. Available: ${Object.keys(OPTIONAL_AGENTS).join(", ")}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return groups;
|
|
38
|
+
}
|