@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/design-system.md
CHANGED
|
@@ -1,403 +1,403 @@
|
|
|
1
|
-
# Appsbd UI Library — Design System
|
|
2
|
-
|
|
3
|
-
**AI Assistant Instructions**:
|
|
4
|
-
This document is the **visual-language counterpart** to [AI_REFERENCE.md](./AI_REFERENCE.md). Where `AI_REFERENCE.md` documents component **APIs** (props, events, slots), this file documents the **design tokens** (colors, typography, spacing, radii, shadows, motion) that those components are built on. Use this file when you need to:
|
|
5
|
-
|
|
6
|
-
- Pick the right color, font size, radius, or spacing for new UI
|
|
7
|
-
- Style custom layouts that should feel consistent with built-in `Ab*` components
|
|
8
|
-
- Theme the library (light/dark, brand re-skinning)
|
|
9
|
-
- Translate a Figma mock from the Appsbd Design System to library code
|
|
10
|
-
|
|
11
|
-
**Source of truth.** The visual foundations below are derived from the **Appsbd Design System** folder (`./Appsbd Design System/`) — itself extracted from the **"Kigen design system"** Figma file. The library implements these tokens in SCSS using the `bb-` CSS-variable prefix and the `.apbd-` class prefix. Where a design-system token has a direct library variable, both names are listed.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. Design Philosophy
|
|
16
|
-
|
|
17
|
-
The library follows four rules, in priority order:
|
|
18
|
-
|
|
19
|
-
1. **Bootstrap variables first.** If a need can be met by overriding a Bootstrap CSS variable (e.g. `--bb-primary`, `--bb-border-radius`), do that.
|
|
20
|
-
2. **Custom tokens second.** When Bootstrap has no matching variable (skeletons, sliders, custom panels), define a new token in `src/styles/_variables.scss` using the **`apbd-`** namespace under the **`bb-`** prefix, e.g. `--bb-apbd-bg-color`.
|
|
21
|
-
3. **Class-variant over new component.** Layout variations of an existing base component (e.g. `tile-card`, `item-card`, `insight-card` for `AbCard`) are **CSS class extensions** in the corresponding `_component.scss`, not new SFCs.
|
|
22
|
-
4. **Dark-mode safe colors.** Use `var(--bb-apbd-bg-color)` and `var(--bb-apbd-border-color)` inside component styles instead of `body-bg` or `border-color`, so light/dark switching just works.
|
|
23
|
-
|
|
24
|
-
> **Prefix rule.** CSS **class names** use `.apbd-` (e.g. `.apbd-skeleton`). CSS **variables** use `#{$prefix}` interpolation (e.g. `var(--#{$prefix}apbd-border-color)`, which compiles to `var(--bb-apbd-border-color)`).
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## 2. Brand & Color System
|
|
29
|
-
|
|
30
|
-
### 2.1 Primary brand color
|
|
31
|
-
|
|
32
|
-
The library's primary brand color is **Brand/600 — `#155EEF`** (Appsbd blue). It is the value of `--bb-primary` in the default (`blue`) skin and drives the focus ring, primary buttons, active nav, links, and component accents.
|
|
33
|
-
|
|
34
|
-
### 2.2 Brand blue scale
|
|
35
|
-
|
|
36
|
-
Used for primary actions, links, focus rings, active states.
|
|
37
|
-
|
|
38
|
-
| Token | Hex | Library variable | Usage |
|
|
39
|
-
| ----------- | --------- | ------------------------- | ------------------------------ |
|
|
40
|
-
| Brand/25 | `#F5F8FF` | — | Very light tint |
|
|
41
|
-
| Brand/50 | `#EFF4FF` | `--bb-primary-light` | Active nav bg, light highlight |
|
|
42
|
-
| Brand/100 | `#D1E0FF` | — | Hover tint |
|
|
43
|
-
| Brand/200 | `#B2CCFF` | — | Border on blue tint |
|
|
44
|
-
| Brand/300 | `#84ADFF` | `--bb-apbd-border-color-focus` | Focus ring (light) |
|
|
45
|
-
| Brand/400 | `#528BFF` | — | Secondary interactive |
|
|
46
|
-
| Brand/500 | `#2970FF` | (dark-mode `--bb-primary`) | Hover on primary |
|
|
47
|
-
| **Brand/600** | **`#155EEF`** | **`--bb-primary` (light)** | **Primary action, brand blue** |
|
|
48
|
-
| Brand/700 | `#004EEB` | `--bb-primary-btn-hover` | Pressed / hover-darkened |
|
|
49
|
-
| Brand/800 | `#0040C1` | — | Dark brand |
|
|
50
|
-
| Brand/900 | `#00359E` | — | Very dark |
|
|
51
|
-
| Brand/950 | `#002266` | — | Darkest |
|
|
52
|
-
|
|
53
|
-
### 2.3 Neutral / gray scale
|
|
54
|
-
|
|
55
|
-
Used for text, borders, surfaces, and dividers.
|
|
56
|
-
|
|
57
|
-
| Token | Hex | Usage |
|
|
58
|
-
| -------- | --------- | ------------------------------ |
|
|
59
|
-
| Gray/25 | `#FCFCFD` | Subtle backgrounds |
|
|
60
|
-
| Gray/50 | `#F9FAFB` | Table headers, inputs |
|
|
61
|
-
| Gray/100 | `#F2F4F7` | Light backgrounds, subtle border |
|
|
62
|
-
| Gray/200 | `#EAECF0` | Default dividers |
|
|
63
|
-
| Gray/300 | `#D0D5DD` | Borders |
|
|
64
|
-
| Gray/400 | `#98A2B3` | Disabled, placeholder |
|
|
65
|
-
| Gray/500 | `#667085` | Muted text |
|
|
66
|
-
| Gray/600 | `#475569` | Secondary text |
|
|
67
|
-
| Gray/700 | `#344054` | Body text |
|
|
68
|
-
| Gray/800 | `#1D2939` | Heading text |
|
|
69
|
-
| Gray/900 | `#101828` | Primary text |
|
|
70
|
-
|
|
71
|
-
### 2.4 Semantic colors
|
|
72
|
-
|
|
73
|
-
Used by `AbBaseAlert`, `AbBadge`, `AbToast`, `AbButton variant`, form error states.
|
|
74
|
-
|
|
75
|
-
| Role | Background | Border | Text/Icon | Solid |
|
|
76
|
-
| ----------- | ---------- | --------- | --------- | --------- |
|
|
77
|
-
| **Success** | `#ECFDF3` | `#ABEFC6` | `#085D3A` | `#00C950` |
|
|
78
|
-
| **Error** | `#FEF2F2` | `#FECACA` | `#B91C1C` | `#FB2C36` |
|
|
79
|
-
| **Warning** | `#FFFBEB` | `#FDE68A` | `#92400E` | `#EEB004` |
|
|
80
|
-
| **Info** | `#EFF4FF` | `#B2CCFF` | `#155EEF` | `#2970FF` |
|
|
81
|
-
|
|
82
|
-
These map to Bootstrap's `--bb-success`, `--bb-danger`, `--bb-warning`, `--bb-info` variants used by `AbButton`'s `variant` prop and `AbBadge`'s `variant` prop.
|
|
83
|
-
|
|
84
|
-
### 2.5 Surface & layout colors
|
|
85
|
-
|
|
86
|
-
| Role | Hex | Library variable |
|
|
87
|
-
| ------------------ | --------- | ------------------------------ |
|
|
88
|
-
| App shell bg | `#EBEFF5` | (page wrapper) |
|
|
89
|
-
| Card / panel | `#FFFFFF` | `--bb-apbd-bg-color` (light) |
|
|
90
|
-
| Sidebar bg | `#FFFFFF` | (`AbSidebar` root) |
|
|
91
|
-
| Topbar bg | `#FFFFFF` | |
|
|
92
|
-
| Table header bg | `#F9FAFB` | (`AbTable` thead) |
|
|
93
|
-
| Input bg | `#FFFFFF` | |
|
|
94
|
-
| Active nav-item bg | `#EFF4FF` | `--bb-apbd-sidebar-item-active-bg` |
|
|
95
|
-
|
|
96
|
-
> **Dark-mode rule.** Component styles must read from `var(--bb-apbd-bg-color)` / `var(--bb-apbd-border-color)` instead of hard-coding `#FFFFFF` / `#EAECF0`, so the values flip cleanly when `[data-bs-theme="dark"]` is set on the root.
|
|
97
|
-
|
|
98
|
-
### 2.6 Borders
|
|
99
|
-
|
|
100
|
-
| Role | Hex | Library variable |
|
|
101
|
-
| -------------- | --------- | ------------------------------ |
|
|
102
|
-
| Default | `#EAECF0` | `--bb-apbd-border-color` |
|
|
103
|
-
| Strong | `#D5D7DA` | `--bb-apbd-border-color-strong` |
|
|
104
|
-
| Subtle | `#F2F4F7` | — |
|
|
105
|
-
| Brand / focus | `#155EEF` | `--bb-primary` |
|
|
106
|
-
| Focus ring | `#84ADFF` | `--bb-apbd-border-color-focus` |
|
|
107
|
-
| Error | `#FDA29B` | `--bb-apbd-input-error-border` |
|
|
108
|
-
|
|
109
|
-
### 2.7 Theme skins
|
|
110
|
-
|
|
111
|
-
The library ships **multiple color skins** under `playground/skins/themes/`. Each is a `_<name>.scss` partial defining `$theme-color`, `$theme-color-light`, `$theme-color-dark`, `$theme-color-hover`, and `$border-color-focus-light`, then re-emitting them as `--bb-primary`, `--bb-primary-light`, `--bb-primary-rgb`, etc.
|
|
112
|
-
|
|
113
|
-
**Built-in skins:** `blue` (default), `black`, `cyan`, `gray`, `green`, `orange`, `pink`, `purple`, `red`, `violet`.
|
|
114
|
-
|
|
115
|
-
Skin switching is wired through the `AbColorPicker` in the playground; use the **`add-theme-skin`** project skill to add a new skin so all five wiring steps (theme partial, skin wrapper, vite rollup entry, picker option, `toggleTheme` mapping) are applied consistently.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## 3. Typography
|
|
120
|
-
|
|
121
|
-
### 3.1 Font families
|
|
122
|
-
|
|
123
|
-
| Role | Family | Library token (CSS) | Usage |
|
|
124
|
-
| --------------- | ---------------- | ------------------- | ---------------------------------------- |
|
|
125
|
-
| **Sans (UI)** | **Inter** | `--font-sans` | All body, labels, headings, form fields |
|
|
126
|
-
| Nav | Geist | `--font-nav` | Sidebar nav items, app brand name |
|
|
127
|
-
| Display | Inter | `--font-display` | Hero / marketing display text |
|
|
128
|
-
| Auth headings | Inter Tight | `--font-auth` | Login / register screen titles |
|
|
129
|
-
| Mono | Geist | `--font-mono` | `<code>`, mono helpers |
|
|
130
|
-
|
|
131
|
-
`Inter` is the variable font shipped in `Appsbd Design System/fonts/`. `Geist` and `Inter Tight` come from Google Fonts.
|
|
132
|
-
|
|
133
|
-
### 3.2 Display scale
|
|
134
|
-
|
|
135
|
-
For marketing pages, dashboards' hero numbers, and landing screens.
|
|
136
|
-
|
|
137
|
-
| Style | Size | Weight | Line height | Token |
|
|
138
|
-
| -------------- | ---- | ------ | ----------- | ------------------------------ |
|
|
139
|
-
| Display 2xl | 72px | 700 | 1.0 | `--text-display-2xl-*` |
|
|
140
|
-
| Display xl | 60px | 600 | 1.1 | `--text-display-xl-*` |
|
|
141
|
-
| Display lg | 48px | 600 | 1.1 | `--text-display-lg-*` |
|
|
142
|
-
| Display md | 44px | 600 | 1.15 | `--text-display-md-*` |
|
|
143
|
-
| Display sm | 30px | 600 | 1.2 | `--text-display-sm-*` |
|
|
144
|
-
| Display xs | 24px | 600 | 1.2 | `--text-display-xs-*` |
|
|
145
|
-
|
|
146
|
-
### 3.3 Text scale
|
|
147
|
-
|
|
148
|
-
For app body, labels, captions.
|
|
149
|
-
|
|
150
|
-
| Style | Size | Weight | Line height | Library variable | Usage |
|
|
151
|
-
| -------- | ---- | ------ | ----------- | ------------------------------------ | ---------------------- |
|
|
152
|
-
| Text xl | 20px | 400 | 30px | `--bb-apbd-fs-lg` (1.5rem) | Large body, subheaders |
|
|
153
|
-
| Text lg | 18px | 400 | 28px | — | Subheadings |
|
|
154
|
-
| Text md | 16px | 400 | 24px | `--bb-apbd-fs-md` (1rem) | Body text (default) |
|
|
155
|
-
| Text sm | 14px | 400 | 20px | `--bb-apbd-fs-sm` (0.875rem) | Labels, nav, hints |
|
|
156
|
-
| Text xs | 12px | 400 | 16px | `--bb-apbd-fs-xs` (0.75rem) | Captions, meta |
|
|
157
|
-
| Text xxs | 11px | 400 | 14px | — | Micro labels |
|
|
158
|
-
|
|
159
|
-
### 3.4 Font weights
|
|
160
|
-
|
|
161
|
-
| Token | Weight | Library variable |
|
|
162
|
-
| ------ | ------ | ----------------------------- |
|
|
163
|
-
| Thin | 300 | `--bb-apbd-fw-thin` |
|
|
164
|
-
| Normal | 400 | `--bb-apbd-fw-normal` |
|
|
165
|
-
| Bold | 500 | `--bb-apbd-fw-bold` (medium) |
|
|
166
|
-
| Bolder | 600 | `--bb-apbd-fw-bolder` (semi) |
|
|
167
|
-
| Boldest| 700 | `--bb-apbd-fw-boldest` |
|
|
168
|
-
|
|
169
|
-
### 3.5 Semantic type helpers
|
|
170
|
-
|
|
171
|
-
These class names exist in `Appsbd Design System/colors_and_type.css` as a cheat-sheet for ad-hoc HTML; library components apply equivalent styles internally.
|
|
172
|
-
|
|
173
|
-
- `.h1` — 24/32 medium, primary text
|
|
174
|
-
- `.h2` — 20/28 semibold, primary text
|
|
175
|
-
- `.h3` — 16/24 bold, primary text
|
|
176
|
-
- `.body` — 16/24 regular, secondary text
|
|
177
|
-
- `.label` — 14/20 medium, primary text
|
|
178
|
-
- `.caption` — 12/16 regular, muted text
|
|
179
|
-
- `.nav-label` / `.nav-label--active` — 16/24 Geist
|
|
180
|
-
- `.auth-heading` — 22/28 Inter Tight medium
|
|
181
|
-
|
|
182
|
-
### 3.6 Tone & voice
|
|
183
|
-
|
|
184
|
-
When generating copy for screens built with this library:
|
|
185
|
-
|
|
186
|
-
- **Professional but approachable** — direct, benefit-led. Not overly casual.
|
|
187
|
-
- **Second person ("you")** — e.g. "Welcome back, Sarah."
|
|
188
|
-
- **Action-oriented labels** — "Add Application", "Renew", "Sign out".
|
|
189
|
-
- **Sentence case for body UI**, **Title Case for nav labels**.
|
|
190
|
-
- **No emoji in production UI copy.**
|
|
191
|
-
- **Numbers used sparingly and cleanly** — `7`, `$13,710`, `2`.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## 4. Spacing & Layout
|
|
196
|
-
|
|
197
|
-
### 4.1 Spacing scale (4px base)
|
|
198
|
-
|
|
199
|
-
| Token | Value | CSS var |
|
|
200
|
-
| -------------- | ----- | ---------------- |
|
|
201
|
-
| `--space-1` | 4px | |
|
|
202
|
-
| `--space-2` | 8px | |
|
|
203
|
-
| `--space-2-5` | 10px | |
|
|
204
|
-
| `--space-3` | 12px | |
|
|
205
|
-
| `--space-4` | 16px | |
|
|
206
|
-
| `--space-5` | 20px | |
|
|
207
|
-
| `--space-6` | 24px | |
|
|
208
|
-
| `--space-8` | 32px | |
|
|
209
|
-
| `--space-10` | 40px | |
|
|
210
|
-
| `--space-12` | 48px | |
|
|
211
|
-
| `--space-16` | 64px | |
|
|
212
|
-
|
|
213
|
-
Common gaps: **4, 8, 12, 16, 24, 32, 48, 64**.
|
|
214
|
-
|
|
215
|
-
### 4.2 App layout
|
|
216
|
-
|
|
217
|
-
| Region | Size | Note |
|
|
218
|
-
| ---------------- | ----------------- | ------------------------------------------------------- |
|
|
219
|
-
| Sidebar width | **256px** fixed | `AbSidebar` collapsed state managed via provide/inject |
|
|
220
|
-
| Topbar height | **80px** | |
|
|
221
|
-
| Content padding | **24px** | `--bb-apbd-container-page-padding` (≈ 0.937rem default) |
|
|
222
|
-
| Card padding | **24–32px** | `--bb-apbd-card-*` variables |
|
|
223
|
-
|
|
224
|
-
### 4.3 Component sizing scale
|
|
225
|
-
|
|
226
|
-
Many components expose a `size` prop with values **`xs`, `sm`, `md`, `lg`, `xl`, `xxl`** (default `md`). The size is mapped to per-component padding/font tokens in `_variables.scss` (e.g. `--bb-input-field-padding-md`, `--bb-apbd-btn-padding-md-x`). Pick:
|
|
227
|
-
|
|
228
|
-
- `xs` / `sm` — dense forms, table inline editors, filter panels
|
|
229
|
-
- `md` — default app content, settings forms, modals
|
|
230
|
-
- `lg` / `xl` — auth screens, wizard steps, marketing surfaces
|
|
231
|
-
- `xxl` — display / hero CTAs
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## 5. Corner Radii
|
|
236
|
-
|
|
237
|
-
| Token | Value | Library variable | Usage |
|
|
238
|
-
| ------------- | ------ | ------------------------- | -------------------------------- |
|
|
239
|
-
| `--radius-xs` | 4px | — | Tags, small pills |
|
|
240
|
-
| `--radius-sm` | 6px | `--bb-border-radius-sm` | Small buttons |
|
|
241
|
-
| `--radius-md` | 8px | `--bb-border-radius` | Inputs, buttons (sm/md) |
|
|
242
|
-
| `--radius-lg` | 10px | `--bb-border-radius-lg` | Nav items, buttons (lg/xl) |
|
|
243
|
-
| `--radius-xl` | 12px | — | Search bar, medium cards |
|
|
244
|
-
| `--radius-2xl`| 14px | — | Icon containers |
|
|
245
|
-
| `--radius-3xl`| 16px | `--bb-apbd-card-border-radius` (≈ 0.875rem) | Cards |
|
|
246
|
-
| `--radius-pill` | 9999px | — | Badges, avatars (`AbAvatar`) |
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## 6. Shadows & Elevation
|
|
251
|
-
|
|
252
|
-
Flat by default. Shadows are reserved for cards, dropdowns, popovers, and elevated modals.
|
|
253
|
-
|
|
254
|
-
| Token | Value | Usage |
|
|
255
|
-
| ---------------- | ------------------------------------------------------------------------------------ | ---------------------------------- |
|
|
256
|
-
| `--shadow-xs` | `0px 1px 2px 0px rgba(16,24,40,0.05)` | Subtle resting elevation |
|
|
257
|
-
| `--shadow-sm` | `0px 1px 2px -1px rgba(0,0,0,0.1), 0px 1px 3px 0px rgba(0,0,0,0.1)` | Cards (default `AbCard`) |
|
|
258
|
-
| `--shadow-md` | `0px 2px 4px -2px rgba(16,24,40,0.06), 0px 4px 8px -2px rgba(16,24,40,0.10)` | Dropdowns, popovers (`AbPopover`) |
|
|
259
|
-
| `--shadow-lg` | `0px 4px 6px -2px rgba(16,24,40,0.03), 0px 12px 16px -4px rgba(16,24,40,0.08)` | Modals (`AbModal`, `AbEasyModal`) |
|
|
260
|
-
| `--shadow-card` | `0px 2px 2px 0px rgba(0,0,0,0.03)` | Soft card variant |
|
|
261
|
-
|
|
262
|
-
**No gradients on UI surfaces.** Gradients appear only in design documentation headers, never in app chrome.
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
## 7. Iconography
|
|
267
|
-
|
|
268
|
-
**Library: [Lucide Icons](https://lucide.dev/)** — installed as the `lucide-vue-next` peer dependency. Bootstrap Icons is also a peer dep and may be used for a few legacy components.
|
|
269
|
-
|
|
270
|
-
### Sizing
|
|
271
|
-
|
|
272
|
-
| Size | Usage |
|
|
273
|
-
| ----- | ------------------------------------------- |
|
|
274
|
-
| 16×16 | Inline / topbar buttons / dense controls |
|
|
275
|
-
| 20×20 | Nav items (default), most `AbButton` icons |
|
|
276
|
-
| 24×24 | Larger nav, prominent actions, empty states |
|
|
277
|
-
|
|
278
|
-
- **Stroke weight:** 1.5–2px (Lucide default).
|
|
279
|
-
- **Color:** inherits text color; active nav/icons = `--bb-primary` (`#155EEF`); muted = `#717680`.
|
|
280
|
-
|
|
281
|
-
### Common icons in use
|
|
282
|
-
|
|
283
|
-
`panel-right-open`, `plus`, `arrow-up`, `arrow-right`, `chevron-left`, `chevron-down`, `sparkles`, `house`, `log-out`, `alert-circle`, `x`, `user`, `refresh-ccw`, `mail`, `search`.
|
|
284
|
-
|
|
285
|
-
**Rules:** All icons are SVG via Lucide. **No emoji in production UI.** No PNG icons. No custom icon font.
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## 8. Interaction & Motion
|
|
290
|
-
|
|
291
|
-
### 8.1 Hover / focus / pressed
|
|
292
|
-
|
|
293
|
-
| State | Treatment |
|
|
294
|
-
| ---------------------- | -------------------------------------------------------------------------- |
|
|
295
|
-
| Primary button hover | Darken to Brand/700 `#004EEB` (`--bb-primary-btn-hover`) |
|
|
296
|
-
| Nav item hover | Light blue tint `#EFF4FF` background |
|
|
297
|
-
| Card hover | Static — no shadow animation by default |
|
|
298
|
-
| Link | Brand/600 `#155EEF`; underline on hover |
|
|
299
|
-
| Input focus | Border `#155EEF`; subtle focus ring `--bb-apbd-input-box-shadow` |
|
|
300
|
-
| Form check / toggle on | `--bb-apbd-checkbox-checked-form-check-bg` / `--bb-apbd-toggle-checked-bg` |
|
|
301
|
-
|
|
302
|
-
### 8.2 Motion principles
|
|
303
|
-
|
|
304
|
-
- **Minimal animation.** No bounces or springs.
|
|
305
|
-
- **Implied CSS ease** (no overrides). Treat `transition: 150–200ms ease` as default.
|
|
306
|
-
- **Sidebar collapse** — toggled via `panel-right-open` icon; uses CSS width transition.
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## 9. Dark mode
|
|
311
|
-
|
|
312
|
-
Dark mode is opt-in via `[data-bs-theme="dark"]` on the root and managed by the **`useTheme`** composable + **`AbDarkModeToggler`** component (see [AI_REFERENCE.md §4](./AI_REFERENCE.md#4-composables--directives)).
|
|
313
|
-
|
|
314
|
-
Each theme partial in `playground/skins/themes/_<name>.scss` re-emits brand variables for dark mode. Authors of new components must:
|
|
315
|
-
|
|
316
|
-
- Use `var(--bb-apbd-bg-color)` and `var(--bb-apbd-border-color)` for surfaces and dividers.
|
|
317
|
-
- Avoid hard-coded `#FFFFFF` / `#EAECF0` etc.
|
|
318
|
-
- Test both light and dark in the playground before shipping.
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## 10. Component → Token Map
|
|
323
|
-
|
|
324
|
-
How design tokens land in built-in components. Use this when generating layouts so the look stays consistent. For full component APIs, follow each link to [AI_REFERENCE.md](./AI_REFERENCE.md).
|
|
325
|
-
|
|
326
|
-
| Component | Primary tokens |
|
|
327
|
-
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
328
|
-
| [`AbButton`](./AI_REFERENCE.md#abbutton) | `--bb-primary`, `--bb-primary-btn-hover`, radii via `--bb-border-radius` / `-lg`, `--bb-apbd-btn-padding-*` |
|
|
329
|
-
| [`AbCard`](./AI_REFERENCE.md#abcard) | `--bb-apbd-card-border-radius` (`16px`), `--shadow-sm`, surface white, border `#D5D7DA` |
|
|
330
|
-
| [`AbModal`](./AI_REFERENCE.md#abmodal) / [`AbEasyModal`](./AI_REFERENCE.md#abeasymodal) | `--bb-apbd-modal-*` paddings, backdrop `rgba(0,0,0,0.7)` (`--bb-apbd-modal-bg-opacity`), `--shadow-lg` |
|
|
331
|
-
| [`AbInputField`](./AI_REFERENCE.md#abinputfield) / [`AbNumberField`](./AI_REFERENCE.md#abnumberfield) / [`AbMultiSelect`](./AI_REFERENCE.md#abmultiselect) | `--bb-input-field-padding-*`, `--bb-apbd-border-color-focus`, `--bb-apbd-input-box-shadow` |
|
|
332
|
-
| [`AbBadge`](./AI_REFERENCE.md#abbadge) | Semantic palette (success / error / warning / info), pill radius `9999px` |
|
|
333
|
-
| [`AbAvatar`](./AI_REFERENCE.md#abavatar) | `--radius-pill`, sizing scale `xs–xxl` |
|
|
334
|
-
| [`AbSidebar`](./AI_REFERENCE.md#absidebar) / [`AbSideMenuItem`](./AI_REFERENCE.md#absidemenuitem) | width `256px`, active bg `#EFF4FF`, active text `--bb-primary`, font `--font-nav` (Geist) |
|
|
335
|
-
| [`AbProgressbar`](./AI_REFERENCE.md#abprogressbar) | `--bb-apbd-progressbar-fill-bg-primary`, semantic color variants |
|
|
336
|
-
| [`AbSlider`](./AI_REFERENCE.md#abslider) | `--bb-apbd-slider-fill-bg`, `--bb-apbd-slider-thumb-border-color`, `--bb-apbd-slider-thumb-focus-shadow` |
|
|
337
|
-
| [`AbToggle`](./AI_REFERENCE.md#abtoggle) / [`AbFormCheck`](./AI_REFERENCE.md#abformcheck--abradioinput) | `--bb-apbd-toggle-checked-bg`, `--bb-apbd-checkbox-checked-form-check-bg` |
|
|
338
|
-
| [`AbToast`](./AI_REFERENCE.md#abtoast) (via `useToast`) | Semantic palette, `--shadow-md` |
|
|
339
|
-
| [`AbTable`](./AI_REFERENCE.md#abtable) | Header bg `#F9FAFB`, divider `--bb-apbd-border-color` |
|
|
340
|
-
| [`AbDarkModeToggler`](./AI_REFERENCE.md#abdarkmodetoggler) | Pairs with `useTheme`; flips `[data-bs-theme]` on root |
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
## 11. Implementation Notes
|
|
345
|
-
|
|
346
|
-
### 11.1 SCSS structure
|
|
347
|
-
|
|
348
|
-
```
|
|
349
|
-
src/styles/
|
|
350
|
-
├── index.scss # Main entry; wraps imports in .#{$app_class}
|
|
351
|
-
├── _prefix.scss # $prefix: "bb-" / $app_class: "appsbd-app"
|
|
352
|
-
├── _variables.scss # All --bb-apbd-* design tokens
|
|
353
|
-
├── _mixins.scss
|
|
354
|
-
├── components/ # Per-component partials (do NOT wrap in .#{$app_class})
|
|
355
|
-
│ ├── _button.scss
|
|
356
|
-
│ ├── _card.scss
|
|
357
|
-
│ └── ...
|
|
358
|
-
└── rtl/ # RTL-specific overrides
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
When editing any `.scss` under `src/styles/`, invoke the **`scss-conventions`** project skill — it encodes the prefix-vs-class rule, the no-double-nesting rule for component partials, and the dark-mode tokens.
|
|
362
|
-
|
|
363
|
-
### 11.2 Adding a new design token
|
|
364
|
-
|
|
365
|
-
1. Decide whether Bootstrap already has a variable for it. If yes, override there.
|
|
366
|
-
2. Otherwise, add it to `src/styles/_variables.scss` under the `apbd-` namespace: `--#{$prefix}apbd-<component>-<property>`.
|
|
367
|
-
3. Use the new token in component partials via `var(--#{$prefix}apbd-...)`.
|
|
368
|
-
4. If the token participates in theming, add a corresponding line to each `playground/skins/themes/_<color>.scss` partial.
|
|
369
|
-
|
|
370
|
-
### 11.3 Adding a new color skin
|
|
371
|
-
|
|
372
|
-
Use the **`add-theme-skin`** project skill — it wires the 5 places a new skin must touch:
|
|
373
|
-
|
|
374
|
-
1. `playground/skins/themes/_<name>.scss` (defines `$theme-color`, `$theme-color-light`, `$theme-color-dark`, `$theme-color-hover`, `$border-color-focus-light`)
|
|
375
|
-
2. `playground/skins/<name>.scss` (skin wrapper)
|
|
376
|
-
3. `vite.config.js` rollup input + `assetFileNames` allow-list
|
|
377
|
-
4. `AbColorPicker` option in the playground
|
|
378
|
-
5. `toggleTheme` name → CSS mapping
|
|
379
|
-
|
|
380
|
-
### 11.4 Adding a new component
|
|
381
|
-
|
|
382
|
-
Use the **`add-ab-component`** project skill — it walks the 9-step wiring (SFC + barrel export, SCSS partial + correct import location, playground docs page, router entry, sidebar menu item, `ComponentsOverview` entry, AI reference files).
|
|
383
|
-
|
|
384
|
-
### 11.5 Updating tokens or component APIs
|
|
385
|
-
|
|
386
|
-
Whenever a component's public API or visual tokens change, update **all four** of:
|
|
387
|
-
|
|
388
|
-
1. The component's playground `*Test.vue` (use the **`write-component-docs`** skill).
|
|
389
|
-
2. [AI_REFERENCE.md](./AI_REFERENCE.md) (component table row + section-3 API block).
|
|
390
|
-
3. `.ai/ai_ref_<ComponentName>.md`.
|
|
391
|
-
4. This file (**`design-system.md`**) if the change adds/renames a public design token.
|
|
392
|
-
|
|
393
|
-
The **`update-ai-reference`** project skill enforces (2) and (3).
|
|
394
|
-
|
|
395
|
-
---
|
|
396
|
-
|
|
397
|
-
## 12. Source materials
|
|
398
|
-
|
|
399
|
-
- **`Appsbd Design System/README.md`** — design system narrative (foundations, tone, iconography).
|
|
400
|
-
- **`Appsbd Design System/colors_and_type.css`** — CSS-variable form of every token below; copy-paste-ready.
|
|
401
|
-
- **`Appsbd Design System/preview/*.html`** — visual specimens for colors, type, spacing, shadows, buttons, badges, inputs, nav, cards, avatars, tabs.
|
|
402
|
-
- **`Appsbd Design System/ui_kits/system-admin/`** — interactive prototype (Dashboard, Tickets, Auth) that exercises every token in context.
|
|
403
|
-
- **`AI_REFERENCE.md`** — component API reference; the "what props/events/slots" companion to this "what colors/sizes/spacings" document.
|
|
1
|
+
# Appsbd UI Library — Design System
|
|
2
|
+
|
|
3
|
+
**AI Assistant Instructions**:
|
|
4
|
+
This document is the **visual-language counterpart** to [AI_REFERENCE.md](./AI_REFERENCE.md). Where `AI_REFERENCE.md` documents component **APIs** (props, events, slots), this file documents the **design tokens** (colors, typography, spacing, radii, shadows, motion) that those components are built on. Use this file when you need to:
|
|
5
|
+
|
|
6
|
+
- Pick the right color, font size, radius, or spacing for new UI
|
|
7
|
+
- Style custom layouts that should feel consistent with built-in `Ab*` components
|
|
8
|
+
- Theme the library (light/dark, brand re-skinning)
|
|
9
|
+
- Translate a Figma mock from the Appsbd Design System to library code
|
|
10
|
+
|
|
11
|
+
**Source of truth.** The visual foundations below are derived from the **Appsbd Design System** folder (`./Appsbd Design System/`) — itself extracted from the **"Kigen design system"** Figma file. The library implements these tokens in SCSS using the `bb-` CSS-variable prefix and the `.apbd-` class prefix. Where a design-system token has a direct library variable, both names are listed.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Design Philosophy
|
|
16
|
+
|
|
17
|
+
The library follows four rules, in priority order:
|
|
18
|
+
|
|
19
|
+
1. **Bootstrap variables first.** If a need can be met by overriding a Bootstrap CSS variable (e.g. `--bb-primary`, `--bb-border-radius`), do that.
|
|
20
|
+
2. **Custom tokens second.** When Bootstrap has no matching variable (skeletons, sliders, custom panels), define a new token in `src/styles/_variables.scss` using the **`apbd-`** namespace under the **`bb-`** prefix, e.g. `--bb-apbd-bg-color`.
|
|
21
|
+
3. **Class-variant over new component.** Layout variations of an existing base component (e.g. `tile-card`, `item-card`, `insight-card` for `AbCard`) are **CSS class extensions** in the corresponding `_component.scss`, not new SFCs.
|
|
22
|
+
4. **Dark-mode safe colors.** Use `var(--bb-apbd-bg-color)` and `var(--bb-apbd-border-color)` inside component styles instead of `body-bg` or `border-color`, so light/dark switching just works.
|
|
23
|
+
|
|
24
|
+
> **Prefix rule.** CSS **class names** use `.apbd-` (e.g. `.apbd-skeleton`). CSS **variables** use `#{$prefix}` interpolation (e.g. `var(--#{$prefix}apbd-border-color)`, which compiles to `var(--bb-apbd-border-color)`).
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Brand & Color System
|
|
29
|
+
|
|
30
|
+
### 2.1 Primary brand color
|
|
31
|
+
|
|
32
|
+
The library's primary brand color is **Brand/600 — `#155EEF`** (Appsbd blue). It is the value of `--bb-primary` in the default (`blue`) skin and drives the focus ring, primary buttons, active nav, links, and component accents.
|
|
33
|
+
|
|
34
|
+
### 2.2 Brand blue scale
|
|
35
|
+
|
|
36
|
+
Used for primary actions, links, focus rings, active states.
|
|
37
|
+
|
|
38
|
+
| Token | Hex | Library variable | Usage |
|
|
39
|
+
| ----------- | --------- | ------------------------- | ------------------------------ |
|
|
40
|
+
| Brand/25 | `#F5F8FF` | — | Very light tint |
|
|
41
|
+
| Brand/50 | `#EFF4FF` | `--bb-primary-light` | Active nav bg, light highlight |
|
|
42
|
+
| Brand/100 | `#D1E0FF` | — | Hover tint |
|
|
43
|
+
| Brand/200 | `#B2CCFF` | — | Border on blue tint |
|
|
44
|
+
| Brand/300 | `#84ADFF` | `--bb-apbd-border-color-focus` | Focus ring (light) |
|
|
45
|
+
| Brand/400 | `#528BFF` | — | Secondary interactive |
|
|
46
|
+
| Brand/500 | `#2970FF` | (dark-mode `--bb-primary`) | Hover on primary |
|
|
47
|
+
| **Brand/600** | **`#155EEF`** | **`--bb-primary` (light)** | **Primary action, brand blue** |
|
|
48
|
+
| Brand/700 | `#004EEB` | `--bb-primary-btn-hover` | Pressed / hover-darkened |
|
|
49
|
+
| Brand/800 | `#0040C1` | — | Dark brand |
|
|
50
|
+
| Brand/900 | `#00359E` | — | Very dark |
|
|
51
|
+
| Brand/950 | `#002266` | — | Darkest |
|
|
52
|
+
|
|
53
|
+
### 2.3 Neutral / gray scale
|
|
54
|
+
|
|
55
|
+
Used for text, borders, surfaces, and dividers.
|
|
56
|
+
|
|
57
|
+
| Token | Hex | Usage |
|
|
58
|
+
| -------- | --------- | ------------------------------ |
|
|
59
|
+
| Gray/25 | `#FCFCFD` | Subtle backgrounds |
|
|
60
|
+
| Gray/50 | `#F9FAFB` | Table headers, inputs |
|
|
61
|
+
| Gray/100 | `#F2F4F7` | Light backgrounds, subtle border |
|
|
62
|
+
| Gray/200 | `#EAECF0` | Default dividers |
|
|
63
|
+
| Gray/300 | `#D0D5DD` | Borders |
|
|
64
|
+
| Gray/400 | `#98A2B3` | Disabled, placeholder |
|
|
65
|
+
| Gray/500 | `#667085` | Muted text |
|
|
66
|
+
| Gray/600 | `#475569` | Secondary text |
|
|
67
|
+
| Gray/700 | `#344054` | Body text |
|
|
68
|
+
| Gray/800 | `#1D2939` | Heading text |
|
|
69
|
+
| Gray/900 | `#101828` | Primary text |
|
|
70
|
+
|
|
71
|
+
### 2.4 Semantic colors
|
|
72
|
+
|
|
73
|
+
Used by `AbBaseAlert`, `AbBadge`, `AbToast`, `AbButton variant`, form error states.
|
|
74
|
+
|
|
75
|
+
| Role | Background | Border | Text/Icon | Solid |
|
|
76
|
+
| ----------- | ---------- | --------- | --------- | --------- |
|
|
77
|
+
| **Success** | `#ECFDF3` | `#ABEFC6` | `#085D3A` | `#00C950` |
|
|
78
|
+
| **Error** | `#FEF2F2` | `#FECACA` | `#B91C1C` | `#FB2C36` |
|
|
79
|
+
| **Warning** | `#FFFBEB` | `#FDE68A` | `#92400E` | `#EEB004` |
|
|
80
|
+
| **Info** | `#EFF4FF` | `#B2CCFF` | `#155EEF` | `#2970FF` |
|
|
81
|
+
|
|
82
|
+
These map to Bootstrap's `--bb-success`, `--bb-danger`, `--bb-warning`, `--bb-info` variants used by `AbButton`'s `variant` prop and `AbBadge`'s `variant` prop.
|
|
83
|
+
|
|
84
|
+
### 2.5 Surface & layout colors
|
|
85
|
+
|
|
86
|
+
| Role | Hex | Library variable |
|
|
87
|
+
| ------------------ | --------- | ------------------------------ |
|
|
88
|
+
| App shell bg | `#EBEFF5` | (page wrapper) |
|
|
89
|
+
| Card / panel | `#FFFFFF` | `--bb-apbd-bg-color` (light) |
|
|
90
|
+
| Sidebar bg | `#FFFFFF` | (`AbSidebar` root) |
|
|
91
|
+
| Topbar bg | `#FFFFFF` | |
|
|
92
|
+
| Table header bg | `#F9FAFB` | (`AbTable` thead) |
|
|
93
|
+
| Input bg | `#FFFFFF` | |
|
|
94
|
+
| Active nav-item bg | `#EFF4FF` | `--bb-apbd-sidebar-item-active-bg` |
|
|
95
|
+
|
|
96
|
+
> **Dark-mode rule.** Component styles must read from `var(--bb-apbd-bg-color)` / `var(--bb-apbd-border-color)` instead of hard-coding `#FFFFFF` / `#EAECF0`, so the values flip cleanly when `[data-bs-theme="dark"]` is set on the root.
|
|
97
|
+
|
|
98
|
+
### 2.6 Borders
|
|
99
|
+
|
|
100
|
+
| Role | Hex | Library variable |
|
|
101
|
+
| -------------- | --------- | ------------------------------ |
|
|
102
|
+
| Default | `#EAECF0` | `--bb-apbd-border-color` |
|
|
103
|
+
| Strong | `#D5D7DA` | `--bb-apbd-border-color-strong` |
|
|
104
|
+
| Subtle | `#F2F4F7` | — |
|
|
105
|
+
| Brand / focus | `#155EEF` | `--bb-primary` |
|
|
106
|
+
| Focus ring | `#84ADFF` | `--bb-apbd-border-color-focus` |
|
|
107
|
+
| Error | `#FDA29B` | `--bb-apbd-input-error-border` |
|
|
108
|
+
|
|
109
|
+
### 2.7 Theme skins
|
|
110
|
+
|
|
111
|
+
The library ships **multiple color skins** under `playground/skins/themes/`. Each is a `_<name>.scss` partial defining `$theme-color`, `$theme-color-light`, `$theme-color-dark`, `$theme-color-hover`, and `$border-color-focus-light`, then re-emitting them as `--bb-primary`, `--bb-primary-light`, `--bb-primary-rgb`, etc.
|
|
112
|
+
|
|
113
|
+
**Built-in skins:** `blue` (default), `black`, `cyan`, `gray`, `green`, `orange`, `pink`, `purple`, `red`, `violet`.
|
|
114
|
+
|
|
115
|
+
Skin switching is wired through the `AbColorPicker` in the playground; use the **`add-theme-skin`** project skill to add a new skin so all five wiring steps (theme partial, skin wrapper, vite rollup entry, picker option, `toggleTheme` mapping) are applied consistently.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 3. Typography
|
|
120
|
+
|
|
121
|
+
### 3.1 Font families
|
|
122
|
+
|
|
123
|
+
| Role | Family | Library token (CSS) | Usage |
|
|
124
|
+
| --------------- | ---------------- | ------------------- | ---------------------------------------- |
|
|
125
|
+
| **Sans (UI)** | **Inter** | `--font-sans` | All body, labels, headings, form fields |
|
|
126
|
+
| Nav | Geist | `--font-nav` | Sidebar nav items, app brand name |
|
|
127
|
+
| Display | Inter | `--font-display` | Hero / marketing display text |
|
|
128
|
+
| Auth headings | Inter Tight | `--font-auth` | Login / register screen titles |
|
|
129
|
+
| Mono | Geist | `--font-mono` | `<code>`, mono helpers |
|
|
130
|
+
|
|
131
|
+
`Inter` is the variable font shipped in `Appsbd Design System/fonts/`. `Geist` and `Inter Tight` come from Google Fonts.
|
|
132
|
+
|
|
133
|
+
### 3.2 Display scale
|
|
134
|
+
|
|
135
|
+
For marketing pages, dashboards' hero numbers, and landing screens.
|
|
136
|
+
|
|
137
|
+
| Style | Size | Weight | Line height | Token |
|
|
138
|
+
| -------------- | ---- | ------ | ----------- | ------------------------------ |
|
|
139
|
+
| Display 2xl | 72px | 700 | 1.0 | `--text-display-2xl-*` |
|
|
140
|
+
| Display xl | 60px | 600 | 1.1 | `--text-display-xl-*` |
|
|
141
|
+
| Display lg | 48px | 600 | 1.1 | `--text-display-lg-*` |
|
|
142
|
+
| Display md | 44px | 600 | 1.15 | `--text-display-md-*` |
|
|
143
|
+
| Display sm | 30px | 600 | 1.2 | `--text-display-sm-*` |
|
|
144
|
+
| Display xs | 24px | 600 | 1.2 | `--text-display-xs-*` |
|
|
145
|
+
|
|
146
|
+
### 3.3 Text scale
|
|
147
|
+
|
|
148
|
+
For app body, labels, captions.
|
|
149
|
+
|
|
150
|
+
| Style | Size | Weight | Line height | Library variable | Usage |
|
|
151
|
+
| -------- | ---- | ------ | ----------- | ------------------------------------ | ---------------------- |
|
|
152
|
+
| Text xl | 20px | 400 | 30px | `--bb-apbd-fs-lg` (1.5rem) | Large body, subheaders |
|
|
153
|
+
| Text lg | 18px | 400 | 28px | — | Subheadings |
|
|
154
|
+
| Text md | 16px | 400 | 24px | `--bb-apbd-fs-md` (1rem) | Body text (default) |
|
|
155
|
+
| Text sm | 14px | 400 | 20px | `--bb-apbd-fs-sm` (0.875rem) | Labels, nav, hints |
|
|
156
|
+
| Text xs | 12px | 400 | 16px | `--bb-apbd-fs-xs` (0.75rem) | Captions, meta |
|
|
157
|
+
| Text xxs | 11px | 400 | 14px | — | Micro labels |
|
|
158
|
+
|
|
159
|
+
### 3.4 Font weights
|
|
160
|
+
|
|
161
|
+
| Token | Weight | Library variable |
|
|
162
|
+
| ------ | ------ | ----------------------------- |
|
|
163
|
+
| Thin | 300 | `--bb-apbd-fw-thin` |
|
|
164
|
+
| Normal | 400 | `--bb-apbd-fw-normal` |
|
|
165
|
+
| Bold | 500 | `--bb-apbd-fw-bold` (medium) |
|
|
166
|
+
| Bolder | 600 | `--bb-apbd-fw-bolder` (semi) |
|
|
167
|
+
| Boldest| 700 | `--bb-apbd-fw-boldest` |
|
|
168
|
+
|
|
169
|
+
### 3.5 Semantic type helpers
|
|
170
|
+
|
|
171
|
+
These class names exist in `Appsbd Design System/colors_and_type.css` as a cheat-sheet for ad-hoc HTML; library components apply equivalent styles internally.
|
|
172
|
+
|
|
173
|
+
- `.h1` — 24/32 medium, primary text
|
|
174
|
+
- `.h2` — 20/28 semibold, primary text
|
|
175
|
+
- `.h3` — 16/24 bold, primary text
|
|
176
|
+
- `.body` — 16/24 regular, secondary text
|
|
177
|
+
- `.label` — 14/20 medium, primary text
|
|
178
|
+
- `.caption` — 12/16 regular, muted text
|
|
179
|
+
- `.nav-label` / `.nav-label--active` — 16/24 Geist
|
|
180
|
+
- `.auth-heading` — 22/28 Inter Tight medium
|
|
181
|
+
|
|
182
|
+
### 3.6 Tone & voice
|
|
183
|
+
|
|
184
|
+
When generating copy for screens built with this library:
|
|
185
|
+
|
|
186
|
+
- **Professional but approachable** — direct, benefit-led. Not overly casual.
|
|
187
|
+
- **Second person ("you")** — e.g. "Welcome back, Sarah."
|
|
188
|
+
- **Action-oriented labels** — "Add Application", "Renew", "Sign out".
|
|
189
|
+
- **Sentence case for body UI**, **Title Case for nav labels**.
|
|
190
|
+
- **No emoji in production UI copy.**
|
|
191
|
+
- **Numbers used sparingly and cleanly** — `7`, `$13,710`, `2`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 4. Spacing & Layout
|
|
196
|
+
|
|
197
|
+
### 4.1 Spacing scale (4px base)
|
|
198
|
+
|
|
199
|
+
| Token | Value | CSS var |
|
|
200
|
+
| -------------- | ----- | ---------------- |
|
|
201
|
+
| `--space-1` | 4px | |
|
|
202
|
+
| `--space-2` | 8px | |
|
|
203
|
+
| `--space-2-5` | 10px | |
|
|
204
|
+
| `--space-3` | 12px | |
|
|
205
|
+
| `--space-4` | 16px | |
|
|
206
|
+
| `--space-5` | 20px | |
|
|
207
|
+
| `--space-6` | 24px | |
|
|
208
|
+
| `--space-8` | 32px | |
|
|
209
|
+
| `--space-10` | 40px | |
|
|
210
|
+
| `--space-12` | 48px | |
|
|
211
|
+
| `--space-16` | 64px | |
|
|
212
|
+
|
|
213
|
+
Common gaps: **4, 8, 12, 16, 24, 32, 48, 64**.
|
|
214
|
+
|
|
215
|
+
### 4.2 App layout
|
|
216
|
+
|
|
217
|
+
| Region | Size | Note |
|
|
218
|
+
| ---------------- | ----------------- | ------------------------------------------------------- |
|
|
219
|
+
| Sidebar width | **256px** fixed | `AbSidebar` collapsed state managed via provide/inject |
|
|
220
|
+
| Topbar height | **80px** | |
|
|
221
|
+
| Content padding | **24px** | `--bb-apbd-container-page-padding` (≈ 0.937rem default) |
|
|
222
|
+
| Card padding | **24–32px** | `--bb-apbd-card-*` variables |
|
|
223
|
+
|
|
224
|
+
### 4.3 Component sizing scale
|
|
225
|
+
|
|
226
|
+
Many components expose a `size` prop with values **`xs`, `sm`, `md`, `lg`, `xl`, `xxl`** (default `md`). The size is mapped to per-component padding/font tokens in `_variables.scss` (e.g. `--bb-input-field-padding-md`, `--bb-apbd-btn-padding-md-x`). Pick:
|
|
227
|
+
|
|
228
|
+
- `xs` / `sm` — dense forms, table inline editors, filter panels
|
|
229
|
+
- `md` — default app content, settings forms, modals
|
|
230
|
+
- `lg` / `xl` — auth screens, wizard steps, marketing surfaces
|
|
231
|
+
- `xxl` — display / hero CTAs
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 5. Corner Radii
|
|
236
|
+
|
|
237
|
+
| Token | Value | Library variable | Usage |
|
|
238
|
+
| ------------- | ------ | ------------------------- | -------------------------------- |
|
|
239
|
+
| `--radius-xs` | 4px | — | Tags, small pills |
|
|
240
|
+
| `--radius-sm` | 6px | `--bb-border-radius-sm` | Small buttons |
|
|
241
|
+
| `--radius-md` | 8px | `--bb-border-radius` | Inputs, buttons (sm/md) |
|
|
242
|
+
| `--radius-lg` | 10px | `--bb-border-radius-lg` | Nav items, buttons (lg/xl) |
|
|
243
|
+
| `--radius-xl` | 12px | — | Search bar, medium cards |
|
|
244
|
+
| `--radius-2xl`| 14px | — | Icon containers |
|
|
245
|
+
| `--radius-3xl`| 16px | `--bb-apbd-card-border-radius` (≈ 0.875rem) | Cards |
|
|
246
|
+
| `--radius-pill` | 9999px | — | Badges, avatars (`AbAvatar`) |
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 6. Shadows & Elevation
|
|
251
|
+
|
|
252
|
+
Flat by default. Shadows are reserved for cards, dropdowns, popovers, and elevated modals.
|
|
253
|
+
|
|
254
|
+
| Token | Value | Usage |
|
|
255
|
+
| ---------------- | ------------------------------------------------------------------------------------ | ---------------------------------- |
|
|
256
|
+
| `--shadow-xs` | `0px 1px 2px 0px rgba(16,24,40,0.05)` | Subtle resting elevation |
|
|
257
|
+
| `--shadow-sm` | `0px 1px 2px -1px rgba(0,0,0,0.1), 0px 1px 3px 0px rgba(0,0,0,0.1)` | Cards (default `AbCard`) |
|
|
258
|
+
| `--shadow-md` | `0px 2px 4px -2px rgba(16,24,40,0.06), 0px 4px 8px -2px rgba(16,24,40,0.10)` | Dropdowns, popovers (`AbPopover`) |
|
|
259
|
+
| `--shadow-lg` | `0px 4px 6px -2px rgba(16,24,40,0.03), 0px 12px 16px -4px rgba(16,24,40,0.08)` | Modals (`AbModal`, `AbEasyModal`) |
|
|
260
|
+
| `--shadow-card` | `0px 2px 2px 0px rgba(0,0,0,0.03)` | Soft card variant |
|
|
261
|
+
|
|
262
|
+
**No gradients on UI surfaces.** Gradients appear only in design documentation headers, never in app chrome.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## 7. Iconography
|
|
267
|
+
|
|
268
|
+
**Library: [Lucide Icons](https://lucide.dev/)** — installed as the `lucide-vue-next` peer dependency. Bootstrap Icons is also a peer dep and may be used for a few legacy components.
|
|
269
|
+
|
|
270
|
+
### Sizing
|
|
271
|
+
|
|
272
|
+
| Size | Usage |
|
|
273
|
+
| ----- | ------------------------------------------- |
|
|
274
|
+
| 16×16 | Inline / topbar buttons / dense controls |
|
|
275
|
+
| 20×20 | Nav items (default), most `AbButton` icons |
|
|
276
|
+
| 24×24 | Larger nav, prominent actions, empty states |
|
|
277
|
+
|
|
278
|
+
- **Stroke weight:** 1.5–2px (Lucide default).
|
|
279
|
+
- **Color:** inherits text color; active nav/icons = `--bb-primary` (`#155EEF`); muted = `#717680`.
|
|
280
|
+
|
|
281
|
+
### Common icons in use
|
|
282
|
+
|
|
283
|
+
`panel-right-open`, `plus`, `arrow-up`, `arrow-right`, `chevron-left`, `chevron-down`, `sparkles`, `house`, `log-out`, `alert-circle`, `x`, `user`, `refresh-ccw`, `mail`, `search`.
|
|
284
|
+
|
|
285
|
+
**Rules:** All icons are SVG via Lucide. **No emoji in production UI.** No PNG icons. No custom icon font.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 8. Interaction & Motion
|
|
290
|
+
|
|
291
|
+
### 8.1 Hover / focus / pressed
|
|
292
|
+
|
|
293
|
+
| State | Treatment |
|
|
294
|
+
| ---------------------- | -------------------------------------------------------------------------- |
|
|
295
|
+
| Primary button hover | Darken to Brand/700 `#004EEB` (`--bb-primary-btn-hover`) |
|
|
296
|
+
| Nav item hover | Light blue tint `#EFF4FF` background |
|
|
297
|
+
| Card hover | Static — no shadow animation by default |
|
|
298
|
+
| Link | Brand/600 `#155EEF`; underline on hover |
|
|
299
|
+
| Input focus | Border `#155EEF`; subtle focus ring `--bb-apbd-input-box-shadow` |
|
|
300
|
+
| Form check / toggle on | `--bb-apbd-checkbox-checked-form-check-bg` / `--bb-apbd-toggle-checked-bg` |
|
|
301
|
+
|
|
302
|
+
### 8.2 Motion principles
|
|
303
|
+
|
|
304
|
+
- **Minimal animation.** No bounces or springs.
|
|
305
|
+
- **Implied CSS ease** (no overrides). Treat `transition: 150–200ms ease` as default.
|
|
306
|
+
- **Sidebar collapse** — toggled via `panel-right-open` icon; uses CSS width transition.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 9. Dark mode
|
|
311
|
+
|
|
312
|
+
Dark mode is opt-in via `[data-bs-theme="dark"]` on the root and managed by the **`useTheme`** composable + **`AbDarkModeToggler`** component (see [AI_REFERENCE.md §4](./AI_REFERENCE.md#4-composables--directives)).
|
|
313
|
+
|
|
314
|
+
Each theme partial in `playground/skins/themes/_<name>.scss` re-emits brand variables for dark mode. Authors of new components must:
|
|
315
|
+
|
|
316
|
+
- Use `var(--bb-apbd-bg-color)` and `var(--bb-apbd-border-color)` for surfaces and dividers.
|
|
317
|
+
- Avoid hard-coded `#FFFFFF` / `#EAECF0` etc.
|
|
318
|
+
- Test both light and dark in the playground before shipping.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## 10. Component → Token Map
|
|
323
|
+
|
|
324
|
+
How design tokens land in built-in components. Use this when generating layouts so the look stays consistent. For full component APIs, follow each link to [AI_REFERENCE.md](./AI_REFERENCE.md).
|
|
325
|
+
|
|
326
|
+
| Component | Primary tokens |
|
|
327
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
328
|
+
| [`AbButton`](./AI_REFERENCE.md#abbutton) | `--bb-primary`, `--bb-primary-btn-hover`, radii via `--bb-border-radius` / `-lg`, `--bb-apbd-btn-padding-*` |
|
|
329
|
+
| [`AbCard`](./AI_REFERENCE.md#abcard) | `--bb-apbd-card-border-radius` (`16px`), `--shadow-sm`, surface white, border `#D5D7DA` |
|
|
330
|
+
| [`AbModal`](./AI_REFERENCE.md#abmodal) / [`AbEasyModal`](./AI_REFERENCE.md#abeasymodal) | `--bb-apbd-modal-*` paddings, backdrop `rgba(0,0,0,0.7)` (`--bb-apbd-modal-bg-opacity`), `--shadow-lg` |
|
|
331
|
+
| [`AbInputField`](./AI_REFERENCE.md#abinputfield) / [`AbNumberField`](./AI_REFERENCE.md#abnumberfield) / [`AbMultiSelect`](./AI_REFERENCE.md#abmultiselect) | `--bb-input-field-padding-*`, `--bb-apbd-border-color-focus`, `--bb-apbd-input-box-shadow` |
|
|
332
|
+
| [`AbBadge`](./AI_REFERENCE.md#abbadge) | Semantic palette (success / error / warning / info), pill radius `9999px` |
|
|
333
|
+
| [`AbAvatar`](./AI_REFERENCE.md#abavatar) | `--radius-pill`, sizing scale `xs–xxl` |
|
|
334
|
+
| [`AbSidebar`](./AI_REFERENCE.md#absidebar) / [`AbSideMenuItem`](./AI_REFERENCE.md#absidemenuitem) | width `256px`, active bg `#EFF4FF`, active text `--bb-primary`, font `--font-nav` (Geist) |
|
|
335
|
+
| [`AbProgressbar`](./AI_REFERENCE.md#abprogressbar) | `--bb-apbd-progressbar-fill-bg-primary`, semantic color variants |
|
|
336
|
+
| [`AbSlider`](./AI_REFERENCE.md#abslider) | `--bb-apbd-slider-fill-bg`, `--bb-apbd-slider-thumb-border-color`, `--bb-apbd-slider-thumb-focus-shadow` |
|
|
337
|
+
| [`AbToggle`](./AI_REFERENCE.md#abtoggle) / [`AbFormCheck`](./AI_REFERENCE.md#abformcheck--abradioinput) | `--bb-apbd-toggle-checked-bg`, `--bb-apbd-checkbox-checked-form-check-bg` |
|
|
338
|
+
| [`AbToast`](./AI_REFERENCE.md#abtoast) (via `useToast`) | Semantic palette, `--shadow-md` |
|
|
339
|
+
| [`AbTable`](./AI_REFERENCE.md#abtable) | Header bg `#F9FAFB`, divider `--bb-apbd-border-color` |
|
|
340
|
+
| [`AbDarkModeToggler`](./AI_REFERENCE.md#abdarkmodetoggler) | Pairs with `useTheme`; flips `[data-bs-theme]` on root |
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 11. Implementation Notes
|
|
345
|
+
|
|
346
|
+
### 11.1 SCSS structure
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
src/styles/
|
|
350
|
+
├── index.scss # Main entry; wraps imports in .#{$app_class}
|
|
351
|
+
├── _prefix.scss # $prefix: "bb-" / $app_class: "appsbd-app"
|
|
352
|
+
├── _variables.scss # All --bb-apbd-* design tokens
|
|
353
|
+
├── _mixins.scss
|
|
354
|
+
├── components/ # Per-component partials (do NOT wrap in .#{$app_class})
|
|
355
|
+
│ ├── _button.scss
|
|
356
|
+
│ ├── _card.scss
|
|
357
|
+
│ └── ...
|
|
358
|
+
└── rtl/ # RTL-specific overrides
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
When editing any `.scss` under `src/styles/`, invoke the **`scss-conventions`** project skill — it encodes the prefix-vs-class rule, the no-double-nesting rule for component partials, and the dark-mode tokens.
|
|
362
|
+
|
|
363
|
+
### 11.2 Adding a new design token
|
|
364
|
+
|
|
365
|
+
1. Decide whether Bootstrap already has a variable for it. If yes, override there.
|
|
366
|
+
2. Otherwise, add it to `src/styles/_variables.scss` under the `apbd-` namespace: `--#{$prefix}apbd-<component>-<property>`.
|
|
367
|
+
3. Use the new token in component partials via `var(--#{$prefix}apbd-...)`.
|
|
368
|
+
4. If the token participates in theming, add a corresponding line to each `playground/skins/themes/_<color>.scss` partial.
|
|
369
|
+
|
|
370
|
+
### 11.3 Adding a new color skin
|
|
371
|
+
|
|
372
|
+
Use the **`add-theme-skin`** project skill — it wires the 5 places a new skin must touch:
|
|
373
|
+
|
|
374
|
+
1. `playground/skins/themes/_<name>.scss` (defines `$theme-color`, `$theme-color-light`, `$theme-color-dark`, `$theme-color-hover`, `$border-color-focus-light`)
|
|
375
|
+
2. `playground/skins/<name>.scss` (skin wrapper)
|
|
376
|
+
3. `vite.config.js` rollup input + `assetFileNames` allow-list
|
|
377
|
+
4. `AbColorPicker` option in the playground
|
|
378
|
+
5. `toggleTheme` name → CSS mapping
|
|
379
|
+
|
|
380
|
+
### 11.4 Adding a new component
|
|
381
|
+
|
|
382
|
+
Use the **`add-ab-component`** project skill — it walks the 9-step wiring (SFC + barrel export, SCSS partial + correct import location, playground docs page, router entry, sidebar menu item, `ComponentsOverview` entry, AI reference files).
|
|
383
|
+
|
|
384
|
+
### 11.5 Updating tokens or component APIs
|
|
385
|
+
|
|
386
|
+
Whenever a component's public API or visual tokens change, update **all four** of:
|
|
387
|
+
|
|
388
|
+
1. The component's playground `*Test.vue` (use the **`write-component-docs`** skill).
|
|
389
|
+
2. [AI_REFERENCE.md](./AI_REFERENCE.md) (component table row + section-3 API block).
|
|
390
|
+
3. `.ai/ai_ref_<ComponentName>.md`.
|
|
391
|
+
4. This file (**`design-system.md`**) if the change adds/renames a public design token.
|
|
392
|
+
|
|
393
|
+
The **`update-ai-reference`** project skill enforces (2) and (3).
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## 12. Source materials
|
|
398
|
+
|
|
399
|
+
- **`Appsbd Design System/README.md`** — design system narrative (foundations, tone, iconography).
|
|
400
|
+
- **`Appsbd Design System/colors_and_type.css`** — CSS-variable form of every token below; copy-paste-ready.
|
|
401
|
+
- **`Appsbd Design System/preview/*.html`** — visual specimens for colors, type, spacing, shadows, buttons, badges, inputs, nav, cards, avatars, tabs.
|
|
402
|
+
- **`Appsbd Design System/ui_kits/system-admin/`** — interactive prototype (Dashboard, Tickets, Auth) that exercises every token in context.
|
|
403
|
+
- **`AI_REFERENCE.md`** — component API reference; the "what props/events/slots" companion to this "what colors/sizes/spacings" document.
|