@adrelle/design-system 0.0.0-stage → 3.2.1

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/README.md CHANGED
@@ -1,3 +1,128 @@
1
- # Temporary Holding Version
1
+ # @adrelle/design-system
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A premium, state-of-the-art CSS-first Design System built for modern SaaS applications. Compatible with vanilla HTML/CSS and fully integrated with Tailwind CSS v4.
4
+
5
+ ---
6
+
7
+ ## 🚀 Installation
8
+
9
+ Install the package via your preferred package manager:
10
+
11
+ ```bash
12
+ npm install @adrelle/design-system
13
+ # or
14
+ yarn add @adrelle/design-system
15
+ # or
16
+ pnpm add @adrelle/design-system
17
+ ```
18
+
19
+ ---
20
+
21
+ ## 🛠️ Usage
22
+
23
+ ### 1. Vanilla CSS Integration
24
+ Import the clean CSS bundle into your main stylesheet:
25
+
26
+ ```css
27
+ @import "@adrelle/design-system";
28
+ ```
29
+
30
+ ### 2. Tailwind CSS v4 Integration
31
+ If your project is built with Tailwind CSS v4, import Tailwind and then load our theme wrapper stylesheet:
32
+
33
+ ```css
34
+ @import "tailwindcss";
35
+
36
+ /* Imports all components and links theme variables to Tailwind v4 */
37
+ @import "@adrelle/design-system/app.css";
38
+ ```
39
+
40
+ #### Theming & Dark Mode:
41
+ Theme switching is driven entirely by CSS variables. Toggling the `.dark` class on `:root` (`<html>`) switches all semantic variables (`--background`, `--foreground`, `--card`, `--border`, `--primary`, etc.) automatically without needing inline conditional classes.
42
+
43
+ #### Disabling Dark Mode (Light Mode Only):
44
+ If you want to disable dark mode entirely and force your website to stay in light mode (even if the user's OS prefers dark mode), simply add the `light` class to your root `<html>` element:
45
+
46
+ ```html
47
+ <html class="light">
48
+ ```
49
+ This disables the built-in prefers-color-scheme media query and keeps the light-mode variables active.
50
+
51
+ ---
52
+
53
+ ## 🎨 Theme Variables & Customization
54
+
55
+ The design system is engineered for modern B2B SaaS interfaces. It exposes slate neutrals, sky/ocean brand blue (`#0284C7` anchor), micro-elevations (`shadow-xs`), and strict mathematical corner radii:
56
+
57
+ ```css
58
+ :root {
59
+ --primary: var(--sky-700); /* #0369a1 - Primary brand action (Light) */
60
+ --primary-hover: var(--sky-800); /* #075985 - Hover state */
61
+ --primary-active: var(--sky-900); /* #0c4a6e - Active state */
62
+ --primary-foreground: #fff;
63
+ --radius-xl: 0.75rem; /* Page containers, cards, modals */
64
+ --radius-lg: 0.5rem; /* Action buttons, form inputs */
65
+ --radius-md: 0.375rem; /* Badges, table chips, segmented tabs */
66
+ }
67
+
68
+ .dark {
69
+ --background: #020617; /* Deep slate-950 canvas (no pitch black) */
70
+ --card: #0f172a; /* Slate-900 surface */
71
+ --border: #1e293b; /* Crisp 1px border */
72
+ --primary: var(--sky-300); /* #7dd3fc - Accessible high-contrast primary (Dark) */
73
+ --primary-foreground: #020617;
74
+ }
75
+ ```
76
+ ![Design Tokens](./src/assets/design-tokens.png)
77
+
78
+ ### Core Semantic Tokens Available:
79
+ * `--background` / `--foreground`: Base canvas (`slate-50` / `slate-950`) & text
80
+ * `--card` / `--card-nested`: Surfaces & cluster wells (`slate-50/70` / `slate-800/40`)
81
+ * `--primary` / `--primary-hover` / `--primary-active` / `--primary-foreground`: Brand actions (Sky scale anchored on `#0284C7`)
82
+ * `--primary-tint` / `--primary-border`: Subtle brand highlighting
83
+ * `--secondary` / `--secondary-hover` / `--secondary-foreground`: Secondary actions
84
+ * `--accent` / `--accent-hover` / `--accent-foreground`: Interactive highlights
85
+ * `--neutral` / `--neutral-hover` / `--neutral-foreground`: Muted helpers and subtle backgrounds
86
+ * `--border`: Structural container borders (`slate-200` / `slate-800`)
87
+ * `--success` / `--warning` / `--info` / `--danger`: High-contrast semantic indicators (Emerald, Amber, Sky, Rose)
88
+ * `--radius-xl` / `--radius-lg` / `--radius-md` / `--radius-full`: Geometry scale
89
+ * `--shadow-xs` / `--shadow-lg` / `--shadow-xl`: Crisp micro-elevation hierarchy
90
+
91
+ ---
92
+
93
+ ## ⚡ Component & Layout Reference
94
+
95
+ The package includes pre-styled, accessibility-compliant CSS components with zero AI artifacts (no purple orbs, no decorative emojis, no indiscriminate pill badges):
96
+
97
+ - **`.button`**: Standardized, transition-ready buttons with `rounded-lg` and `shadow-xs`. Variants: `.button-primary`, `.button-secondary`, `.button-outline`, `.button-destructive`, `.button-ghost`, `.button-icon`, and `.button-link`. Sizes: `.button-sm`, `.button-lg`.
98
+ - **`.segmented-switcher` & `.segmented-tab`**: Segmented view switchers.
99
+ - **`.card`**: 5-level container rhythm (`.card`, `.card-well`, `.card-tile`, `.icon-box`, `.stat-value`, `.stat-change`).
100
+ - **`.table-container` & `.table`**: Tabular ledgers with sticky headers, `.table-numeric` right-aligned monospace numbers, and `.table-footer` pagination.
101
+ - **`.form-group`**: Form elements:
102
+ * `.form-input` / `.form-select` / `.form-textarea`: Form control fields with brand focus ring (`--primary`)
103
+ * `.form-search`: Search input with inline icon positioning
104
+ * `.form-error-banner`: Structured validation callout banner
105
+ * `.form-file` / `.form-range` / `.form-checkbox` / `.form-radio`: Fully styled input components
106
+ - **`.badge`**: Rectangular status badges (`rounded-md uppercase tracking-wider`) with `.badge-dot` pulsing indicators and `.badge-mono` numeric chips. Never pill-shaped.
107
+ - **`.alert`**: Semantic feedback containers with 1px tinted borders (`.alert-success`, `.alert-warning`, `.alert-danger`, `.alert-info`).
108
+ - **`.dialog` & `.drawer`**: 5-region modal dialogs (`shadow-lg`, backdrop blur) and slide-over preview drawers (`shadow-xl`).
109
+ - **`.sidebar` & `.navbar`**: Collapsible sidebars with subtle blue tint active highlighting (`.sidebar-item.active`) and `.telemetry-pulse` operational indicators.
110
+
111
+ ---
112
+
113
+ ## 🔧 Local Development & Sandbox (Vue Playground)
114
+
115
+ If you are contributing to this design system project:
116
+
117
+ 1. Clone the repository and install local dev dependencies:
118
+ ```bash
119
+ npm install
120
+ ```
121
+ 2. Start the Vue sandbox to preview components:
122
+ ```bash
123
+ npm run dev
124
+ ```
125
+ 3. Compile the production bundles:
126
+ ```bash
127
+ npm run build
128
+ ```
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@adrelle/design-system",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "private": false,
4
+ "version": "3.2.1",
5
+ "type": "module",
6
+ "main": "src/css/index.css",
7
+ "files": [
8
+ "src/css"
9
+ ],
10
+ "exports": {
11
+ ".": "./src/css/index.css",
12
+ "./colors.css": "./src/css/theme/colors.css",
13
+ "./app.css": "./src/css/app.css"
14
+ },
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build": "vite build",
18
+ "preview": "vite preview"
19
+ },
20
+ "dependencies": {
21
+ "@tailwindcss/vite": "^4.3.1",
22
+ "lightningcss": "^1.32.0",
23
+ "tailwindcss": "^4.3.1",
24
+ "vue": "^3.5.38"
25
+ },
26
+ "devDependencies": {
27
+ "@vitejs/plugin-vue": "^6.0.7",
28
+ "stylelint": "^17.14.1",
29
+ "stylelint-config-standard": "^40.0.0",
30
+ "vite": "^8.1.0"
31
+ }
32
+ }
@@ -0,0 +1,90 @@
1
+ @import "./index.css";
2
+
3
+ @theme inline {
4
+ --font-sans:
5
+ Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
6
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
7
+ --font-mono:
8
+ "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monaco, consolas,
9
+ "Liberation Mono", "Courier New", monospace;
10
+ --radius-xl: var(--radius-xl);
11
+ --radius-lg: var(--radius-lg);
12
+ --radius-md: var(--radius-md);
13
+ --radius-sm: var(--radius-sm);
14
+ --radius-xs: var(--radius-xs);
15
+ --color-black: var(--black);
16
+ --color-white: var(--white);
17
+ --color-background: var(--background);
18
+ --color-foreground: var(--foreground);
19
+ --color-card: var(--card);
20
+ --color-card-nested: var(--card-nested);
21
+ --color-card-foreground: var(--foreground);
22
+ --color-primary: var(--primary);
23
+ --color-primary-hover: var(--primary-hover);
24
+ --color-primary-active: var(--primary-active);
25
+ --color-primary-foreground: var(--primary-foreground);
26
+ --color-primary-tint: var(--primary-tint);
27
+ --color-primary-border: var(--primary-border);
28
+ --color-secondary: var(--secondary);
29
+ --color-secondary-hover: var(--secondary-hover);
30
+ --color-secondary-active: var(--secondary-active);
31
+ --color-secondary-foreground: var(--secondary-foreground);
32
+ --color-secondary-border: var(--secondary-border);
33
+ --color-accent: var(--accent);
34
+ --color-accent-hover: var(--accent-hover);
35
+ --color-accent-active: var(--accent-active);
36
+ --color-accent-foreground: var(--accent-foreground);
37
+ --color-neutral: var(--neutral);
38
+ --color-neutral-hover: var(--neutral-hover);
39
+ --color-neutral-foreground: var(--neutral-foreground);
40
+ --color-border: var(--border);
41
+ --color-success: var(--success);
42
+ --color-success-hover: var(--success-hover);
43
+ --color-success-foreground: var(--success-foreground);
44
+ --color-success-tint: var(--success-tint);
45
+ --color-success-border: var(--success-border);
46
+ --color-warning: var(--warning);
47
+ --color-warning-hover: var(--warning-hover);
48
+ --color-warning-foreground: var(--warning-foreground);
49
+ --color-warning-tint: var(--warning-tint);
50
+ --color-warning-border: var(--warning-border);
51
+ --color-info: var(--info);
52
+ --color-info-hover: var(--info-hover);
53
+ --color-info-foreground: var(--info-foreground);
54
+ --color-info-tint: var(--info-tint);
55
+ --color-info-border: var(--info-border);
56
+ --color-danger: var(--danger);
57
+ --color-danger-hover: var(--danger-hover);
58
+ --color-danger-foreground: var(--danger-foreground);
59
+ --color-danger-tint: var(--danger-tint);
60
+ --color-danger-border: var(--danger-border);
61
+ }
62
+
63
+ /* Utility classes that rely on Tailwind rules can remain here or inside the components */
64
+ @utility muted {
65
+ color: var(--neutral-foreground);
66
+ }
67
+
68
+ @utility container-layout {
69
+ display: flex;
70
+ flex-direction: column;
71
+ min-height: 100vh;
72
+ }
73
+
74
+ @layer base {
75
+ *,
76
+ ::after,
77
+ ::before,
78
+ ::backdrop,
79
+ ::file-selector-button {
80
+ border-color: var(--color-gray-200, currentColor);
81
+ }
82
+
83
+ * {
84
+ @apply border-border outline-primary/50;
85
+ }
86
+
87
+ body {
88
+ @apply bg-background text-foreground;
89
+ }
90
+ }
@@ -0,0 +1,54 @@
1
+ .alert {
2
+ display: flex;
3
+ align-items: flex-start;
4
+ gap: 0.75rem;
5
+ padding: 0.875rem 1rem;
6
+ border-radius: var(--radius-lg, 0.5rem);
7
+ border: 1px solid var(--border);
8
+ background-color: var(--neutral);
9
+ color: var(--foreground);
10
+ font-size: 0.75rem;
11
+ line-height: 1.4;
12
+ box-shadow: var(--shadow-xs);
13
+ }
14
+
15
+ .alert-content {
16
+ flex: 1;
17
+ }
18
+
19
+ .alert-title {
20
+ font-weight: 600;
21
+ font-size: 0.75rem;
22
+ margin-bottom: 0.125rem;
23
+ }
24
+
25
+ .alert-description {
26
+ font-size: 0.6875rem;
27
+ opacity: 0.9;
28
+ }
29
+
30
+ /* Semantic Feedback Alerts (frontend-core tokens) */
31
+ .alert-success {
32
+ background-color: var(--success-tint);
33
+ border-color: var(--success-border);
34
+ color: var(--success);
35
+ }
36
+
37
+ .alert-warning {
38
+ background-color: var(--warning-tint);
39
+ border-color: var(--warning-border);
40
+ color: var(--warning);
41
+ }
42
+
43
+ .alert-danger {
44
+ background-color: var(--danger-tint);
45
+ border-color: var(--danger-border);
46
+ color: var(--danger);
47
+ }
48
+
49
+ .alert-info {
50
+ background-color: var(--info-tint);
51
+ border-color: var(--info-border);
52
+ color: var(--info);
53
+ }
54
+
@@ -0,0 +1,98 @@
1
+ /* Rectangular Badge Hierarchy (frontend-core: rounded-md, uppercase, tracking-wider) */
2
+ .badge {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: 0.375rem;
6
+ border-radius: var(--radius-md, 0.375rem);
7
+ padding: 0.125rem 0.5rem;
8
+ font-size: 0.625rem;
9
+ font-weight: 700;
10
+ text-transform: uppercase;
11
+ letter-spacing: 0.05em;
12
+ line-height: 1rem;
13
+ border: 1px solid var(--border);
14
+ user-select: none;
15
+ background-color: var(--neutral);
16
+ color: var(--neutral-foreground);
17
+ box-shadow: var(--shadow-xs);
18
+ white-space: nowrap;
19
+ }
20
+
21
+ /* Success / Active Badge */
22
+ .badge-success {
23
+ background-color: var(--success-tint);
24
+ color: var(--success);
25
+ border-color: var(--success-border);
26
+ }
27
+
28
+ /* Warning / Pending Badge */
29
+ .badge-warning {
30
+ background-color: var(--warning-tint);
31
+ color: var(--warning);
32
+ border-color: var(--warning-border);
33
+ }
34
+
35
+ /* Danger / Destructive Badge */
36
+ .badge-danger,
37
+ .badge-destructive {
38
+ background-color: var(--danger-tint);
39
+ color: var(--danger);
40
+ border-color: var(--danger-border);
41
+ }
42
+
43
+ /* Info / Telemetry Badge */
44
+ .badge-info {
45
+ background-color: var(--info-tint);
46
+ color: var(--info);
47
+ border-color: var(--info-border);
48
+ }
49
+
50
+ /* Neutral Badge */
51
+ .badge-neutral {
52
+ background-color: var(--neutral);
53
+ color: var(--neutral-foreground);
54
+ border-color: var(--border);
55
+ }
56
+
57
+ /* Monospace Numeric / Timestamp Chip */
58
+ .badge-mono {
59
+ font-family: var(--font-mono);
60
+ font-feature-settings: "tnum" 1;
61
+ }
62
+
63
+ /* Circular Status Indicator Pulse Dot (strictly rounded-full) */
64
+ .badge-dot {
65
+ width: 0.375rem;
66
+ height: 0.375rem;
67
+ border-radius: var(--radius-full, 9999px);
68
+ animation: badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
69
+ flex-shrink: 0;
70
+ background-color: currentColor;
71
+ }
72
+
73
+ .badge-dot-success {
74
+ background-color: #10b981;
75
+ }
76
+
77
+ .badge-dot-warning {
78
+ background-color: #f59e0b;
79
+ }
80
+
81
+ .badge-dot-danger {
82
+ background-color: #f43f5e;
83
+ }
84
+
85
+ .badge-dot-info {
86
+ background-color: #3b82f6;
87
+ }
88
+
89
+ .badge-dot-neutral {
90
+ background-color: #94a3b8;
91
+ }
92
+
93
+ @keyframes badge-pulse {
94
+ 50% {
95
+ opacity: 0.4;
96
+ }
97
+ }
98
+
@@ -0,0 +1,39 @@
1
+ .breadcrumb {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ align-items: center;
5
+ gap: 0.375rem;
6
+ list-style: none;
7
+ padding: 0;
8
+ margin: 0;
9
+ font-size: 0.75rem;
10
+ }
11
+
12
+ .breadcrumb-item {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 0.375rem;
16
+ color: var(--neutral-foreground);
17
+ }
18
+
19
+ .breadcrumb-item a {
20
+ color: var(--neutral-foreground);
21
+ text-decoration: none;
22
+ transition: color 0.15s ease;
23
+ }
24
+
25
+ .breadcrumb-item a:hover {
26
+ color: var(--foreground);
27
+ }
28
+
29
+ .breadcrumb-separator {
30
+ color: var(--neutral-foreground);
31
+ user-select: none;
32
+ opacity: 0.6;
33
+ }
34
+
35
+ .breadcrumb-item.active {
36
+ color: var(--foreground);
37
+ font-weight: 600;
38
+ }
39
+