@dataimago/tokens 0.1.0-alpha.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 +36 -0
- package/dist/index.cjs +420 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.mjs +419 -0
- package/dist/tokens.css +202 -0
- package/dist/tokens.scss +202 -0
- package/package.json +48 -0
- package/src/README.md +175 -0
- package/src/colors.json +68 -0
- package/src/components.json +44 -0
- package/src/effects.json +43 -0
- package/src/frequent.json +51 -0
- package/src/spacing.json +56 -0
- package/src/theme-colors.json +124 -0
- package/src/typography.json +148 -0
package/dist/tokens.scss
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--color-palette-ink-50: #f5f5f4;
|
|
3
|
+
--color-palette-ink-100: #e7e5e4;
|
|
4
|
+
--color-palette-ink-200: #d6d3d1;
|
|
5
|
+
--color-palette-ink-300: #a8a29e;
|
|
6
|
+
--color-palette-ink-400: #78716c;
|
|
7
|
+
--color-palette-ink-500: #57534e;
|
|
8
|
+
--color-palette-ink-600: #44403c;
|
|
9
|
+
--color-palette-ink-700: #292524;
|
|
10
|
+
--color-palette-ink-800: #1c1917;
|
|
11
|
+
--color-palette-ink-900: #0c0a09;
|
|
12
|
+
--color-palette-cream-50: #fefdfb;
|
|
13
|
+
--color-palette-cream-100: #fdf9f2;
|
|
14
|
+
--color-palette-cream-200: #faf2e3;
|
|
15
|
+
--color-palette-cream-300: #f5e8cf;
|
|
16
|
+
--color-palette-cream-400: #edd9b3;
|
|
17
|
+
--color-palette-cream-500: #e0c088;
|
|
18
|
+
--color-palette-copper-50: #fdf4ee;
|
|
19
|
+
--color-palette-copper-100: #fbe5d1;
|
|
20
|
+
--color-palette-copper-200: #f6c79c;
|
|
21
|
+
--color-palette-copper-300: #f0a467;
|
|
22
|
+
--color-palette-copper-400: #ea8441;
|
|
23
|
+
--color-palette-copper-500: #d46820;
|
|
24
|
+
--color-palette-copper-600: #b55017;
|
|
25
|
+
--color-palette-copper-700: #913d15;
|
|
26
|
+
--color-palette-copper-800: #753318;
|
|
27
|
+
--color-palette-copper-900: #612b16;
|
|
28
|
+
--color-palette-accent-50: #fdf2f2;
|
|
29
|
+
--color-palette-accent-500: #b54a27;
|
|
30
|
+
--color-palette-accent-600: #9a3e20;
|
|
31
|
+
--color-palette-accent-700: #7d321a;
|
|
32
|
+
--color-palette-presentation-blue-50: #f0f8fc;
|
|
33
|
+
--color-palette-presentation-blue-500: #3498DB;
|
|
34
|
+
--color-palette-presentation-blue-600: #2980B9;
|
|
35
|
+
--color-palette-presentation-blue-700: #1f618d;
|
|
36
|
+
--color-functional-success: #27AE60;
|
|
37
|
+
--color-functional-warning: #F39C12;
|
|
38
|
+
--color-functional-error: #E74C3C;
|
|
39
|
+
--color-functional-info: #3498DB;
|
|
40
|
+
--font-family-sans: Fira Sans, system-ui, sans-serif;
|
|
41
|
+
--font-family-mono: JetBrains Mono, SF Mono, Monaco, Inconsolata, monospace;
|
|
42
|
+
--font-family-display: Josefin Sans, system-ui, sans-serif;
|
|
43
|
+
--font-family-brand: Futura, system-ui, sans-serif;
|
|
44
|
+
--font-family-math: Fira Math, Fira Sans Math, system-ui, sans-serif;
|
|
45
|
+
--font-size-micro: 0.75rem;
|
|
46
|
+
--font-size-small: 0.875rem;
|
|
47
|
+
--font-size-base: 1rem;
|
|
48
|
+
--font-size-readable: 1.125rem;
|
|
49
|
+
--font-size-emphasis: 1.25rem;
|
|
50
|
+
--font-size-heading-small: 1.5rem;
|
|
51
|
+
--font-size-heading-medium: 1.875rem;
|
|
52
|
+
--font-size-heading-large: 2.25rem;
|
|
53
|
+
--font-size-heading-xl: 3rem;
|
|
54
|
+
--font-weight-extralight: 200;
|
|
55
|
+
--font-weight-light: 300;
|
|
56
|
+
--font-weight-normal: 400;
|
|
57
|
+
--font-weight-medium: 500;
|
|
58
|
+
--font-weight-semibold: 600;
|
|
59
|
+
--font-weight-bold: 700;
|
|
60
|
+
--font-weight-heading-h1: var(--font-weight-bold);
|
|
61
|
+
--font-weight-heading-h2: var(--font-weight-medium);
|
|
62
|
+
--font-weight-heading-h3: var(--font-weight-normal);
|
|
63
|
+
--font-weight-heading-h4: var(--font-weight-light);
|
|
64
|
+
--font-weight-heading-h5: var(--font-weight-light);
|
|
65
|
+
--font-weight-heading-h6: var(--font-weight-light);
|
|
66
|
+
--font-weight-heading-subtitle: var(--font-weight-semibold);
|
|
67
|
+
--font-style-normal: normal;
|
|
68
|
+
--font-style-italic: italic;
|
|
69
|
+
--font-style-oblique: oblique;
|
|
70
|
+
--font-lineHeight-tight: 1.25;
|
|
71
|
+
--font-lineHeight-normal: 1.5;
|
|
72
|
+
--font-lineHeight-relaxed: 1.625;
|
|
73
|
+
--spacing-xs: 0.25rem;
|
|
74
|
+
--spacing-sm: 0.5rem;
|
|
75
|
+
--spacing-md: 1rem;
|
|
76
|
+
--spacing-lg: 1.5rem;
|
|
77
|
+
--spacing-xl: 2rem;
|
|
78
|
+
--spacing-2xl: 3rem;
|
|
79
|
+
--spacing-3xl: 4rem;
|
|
80
|
+
--radius-sm: 0.25rem;
|
|
81
|
+
--radius-md: 0.5rem;
|
|
82
|
+
--radius-lg: 0.75rem;
|
|
83
|
+
--radius-xl: 1rem;
|
|
84
|
+
--radius-full: 9999px;
|
|
85
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
86
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
|
87
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
|
88
|
+
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:root, [data-bs-theme="light"] {
|
|
92
|
+
--color-surface-page: #fdf9f2;
|
|
93
|
+
--color-surface-page-scrolled: #fdf9f2;
|
|
94
|
+
--color-surface-elevated: #fefdfb;
|
|
95
|
+
--color-surface-sunken: #faf2e3;
|
|
96
|
+
--color-surface-navbar: #fdf9f2;
|
|
97
|
+
--color-surface-navbar-scrolled: #fdf9f2;
|
|
98
|
+
--color-surface-code: #faf2e3;
|
|
99
|
+
--color-border-subtle: rgba(12, 10, 9, 0.08);
|
|
100
|
+
--color-border-moderate: rgba(12, 10, 9, 0.15);
|
|
101
|
+
--color-border-strong: rgba(12, 10, 9, 0.25);
|
|
102
|
+
--color-border-card: rgba(12, 10, 9, 0.15);
|
|
103
|
+
--color-border-code: #d6d3d1;
|
|
104
|
+
--color-content-primary: #0c0a09;
|
|
105
|
+
--color-content-secondary: #57534e;
|
|
106
|
+
--color-content-muted: #78716c;
|
|
107
|
+
--color-content-inverse: #fdf9f2;
|
|
108
|
+
--color-interactive-primary: #d46820;
|
|
109
|
+
--color-interactive-hover: #b55017;
|
|
110
|
+
--color-interactive-accent: #b54a27;
|
|
111
|
+
--color-interactive-focus: #d46820;
|
|
112
|
+
--color-presentation-accent: #3498DB;
|
|
113
|
+
--color-presentation-accent-hover: #2980B9;
|
|
114
|
+
--contrast-high: rgb(20, 20, 16);
|
|
115
|
+
--contrast-readable: rgb(20, 20, 16);
|
|
116
|
+
--contrast-medium: #7c7c7c;
|
|
117
|
+
--contrast-subtle: #7c7c7c;
|
|
118
|
+
--shadow-subtle: 0 1px 2px 0 rgb(20 20 16 / 0.05);
|
|
119
|
+
--shadow-moderate: 0 4px 6px -1px rgb(20 20 16 / 0.1);
|
|
120
|
+
--shadow-prominent: 0 10px 15px -3px rgb(20 20 16 / 0.1);
|
|
121
|
+
--border-subtle: rgba(20, 20, 16, 0.1);
|
|
122
|
+
--border-moderate: rgba(20, 20, 16, 0.15);
|
|
123
|
+
--border-focus: #3498DB;
|
|
124
|
+
--navigation-hover-background: rgba(20, 20, 16, 0.05);
|
|
125
|
+
--navigation-active-background: rgba(20, 20, 16, 0.1);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-bs-theme="dark"] {
|
|
129
|
+
--color-surface-page: #0c0a09;
|
|
130
|
+
--color-surface-page-scrolled: #0c0a09;
|
|
131
|
+
--color-surface-elevated: #1c1917;
|
|
132
|
+
--color-surface-sunken: #0c0a09;
|
|
133
|
+
--color-surface-navbar: #0c0a09;
|
|
134
|
+
--color-surface-navbar-scrolled: #0c0a09;
|
|
135
|
+
--color-surface-code: #1c1917;
|
|
136
|
+
--color-border-subtle: rgba(253, 249, 242, 0.08);
|
|
137
|
+
--color-border-moderate: rgba(253, 249, 242, 0.15);
|
|
138
|
+
--color-border-strong: rgba(253, 249, 242, 0.25);
|
|
139
|
+
--color-border-card: rgba(253, 249, 242, 0.15);
|
|
140
|
+
--color-border-code: #292524;
|
|
141
|
+
--color-content-primary: #fdf9f2;
|
|
142
|
+
--color-content-secondary: #a8a29e;
|
|
143
|
+
--color-content-muted: #78716c;
|
|
144
|
+
--color-content-inverse: #0c0a09;
|
|
145
|
+
--color-interactive-primary: #f0a467;
|
|
146
|
+
--color-interactive-hover: #ea8441;
|
|
147
|
+
--color-interactive-accent: #b54a27;
|
|
148
|
+
--color-interactive-focus: #f0a467;
|
|
149
|
+
--color-presentation-accent: #3498DB;
|
|
150
|
+
--color-presentation-accent-hover: #2980B9;
|
|
151
|
+
--contrast-high: rgb(237, 237, 235);
|
|
152
|
+
--contrast-readable: rgb(237, 237, 235);
|
|
153
|
+
--contrast-medium: #83838f;
|
|
154
|
+
--contrast-subtle: #83838f;
|
|
155
|
+
--shadow-subtle: 0 1px 2px 0 rgb(237 237 235 / 0.03);
|
|
156
|
+
--shadow-moderate: 0 4px 6px -1px rgb(237 237 235 / 0.05);
|
|
157
|
+
--shadow-prominent: 0 10px 15px -3px rgb(237 237 235 / 0.4);
|
|
158
|
+
--border-subtle: rgba(237, 237, 235, 0.1);
|
|
159
|
+
--border-moderate: rgba(237, 237, 235, 0.15);
|
|
160
|
+
--border-focus: #4FC3F7;
|
|
161
|
+
--navigation-hover-background: rgba(237, 237, 235, 0.05);
|
|
162
|
+
--navigation-active-background: rgba(237, 237, 235, 0.1);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@media (prefers-color-scheme: dark) {
|
|
166
|
+
:root {
|
|
167
|
+
--color-surface-page: #0c0a09;
|
|
168
|
+
--color-surface-page-scrolled: #0c0a09;
|
|
169
|
+
--color-surface-elevated: #1c1917;
|
|
170
|
+
--color-surface-sunken: #0c0a09;
|
|
171
|
+
--color-surface-navbar: #0c0a09;
|
|
172
|
+
--color-surface-navbar-scrolled: #0c0a09;
|
|
173
|
+
--color-surface-code: #1c1917;
|
|
174
|
+
--color-border-subtle: rgba(253, 249, 242, 0.08);
|
|
175
|
+
--color-border-moderate: rgba(253, 249, 242, 0.15);
|
|
176
|
+
--color-border-strong: rgba(253, 249, 242, 0.25);
|
|
177
|
+
--color-border-card: rgba(253, 249, 242, 0.15);
|
|
178
|
+
--color-border-code: #292524;
|
|
179
|
+
--color-content-primary: #fdf9f2;
|
|
180
|
+
--color-content-secondary: #a8a29e;
|
|
181
|
+
--color-content-muted: #78716c;
|
|
182
|
+
--color-content-inverse: #0c0a09;
|
|
183
|
+
--color-interactive-primary: #f0a467;
|
|
184
|
+
--color-interactive-hover: #ea8441;
|
|
185
|
+
--color-interactive-accent: #b54a27;
|
|
186
|
+
--color-interactive-focus: #f0a467;
|
|
187
|
+
--color-presentation-accent: #3498DB;
|
|
188
|
+
--color-presentation-accent-hover: #2980B9;
|
|
189
|
+
--contrast-high: rgb(237, 237, 235);
|
|
190
|
+
--contrast-readable: rgb(237, 237, 235);
|
|
191
|
+
--contrast-medium: #83838f;
|
|
192
|
+
--contrast-subtle: #83838f;
|
|
193
|
+
--shadow-subtle: 0 1px 2px 0 rgb(237 237 235 / 0.03);
|
|
194
|
+
--shadow-moderate: 0 4px 6px -1px rgb(237 237 235 / 0.05);
|
|
195
|
+
--shadow-prominent: 0 10px 15px -3px rgb(237 237 235 / 0.4);
|
|
196
|
+
--border-subtle: rgba(237, 237, 235, 0.1);
|
|
197
|
+
--border-moderate: rgba(237, 237, 235, 0.15);
|
|
198
|
+
--border-focus: #4FC3F7;
|
|
199
|
+
--navigation-hover-background: rgba(237, 237, 235, 0.05);
|
|
200
|
+
--navigation-active-background: rgba(237, 237, 235, 0.1);
|
|
201
|
+
}
|
|
202
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dataimago/tokens",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "dataimago design tokens — canonical JSON sources plus generated TS/CSS artifacts",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/dataimago/dataimago-design.git",
|
|
9
|
+
"directory": "packages/tokens"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.cjs",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.mjs",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./colors": "./src/colors.json",
|
|
26
|
+
"./theme-colors": "./src/theme-colors.json",
|
|
27
|
+
"./typography": "./src/typography.json",
|
|
28
|
+
"./spacing": "./src/spacing.json",
|
|
29
|
+
"./effects": "./src/effects.json",
|
|
30
|
+
"./frequent": "./src/frequent.json",
|
|
31
|
+
"./components": "./src/components.json",
|
|
32
|
+
"./css": "./dist/tokens.css",
|
|
33
|
+
"./scss": "./dist/tokens.scss"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"src",
|
|
37
|
+
"dist",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"keywords": [
|
|
41
|
+
"design-tokens",
|
|
42
|
+
"dataimago",
|
|
43
|
+
"design-system"
|
|
44
|
+
],
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "node build.mjs"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# dataimago Design Tokens - Developer Guide
|
|
2
|
+
|
|
3
|
+
## 🎯 Source of Truth Architecture
|
|
4
|
+
|
|
5
|
+
This directory contains the **authoritative source** for all design decisions across the dataimago ecosystem. These JSON-based tokens serve as the foundation for:
|
|
6
|
+
|
|
7
|
+
- **CSS Custom Properties**: Generated via idempotent build process
|
|
8
|
+
- **Theme Support**: Automatic light/dark mode generation
|
|
9
|
+
- **Consumer Integration**: Distributed to all consumer repositories via git submodules
|
|
10
|
+
- **Design Consistency**: Single definition → multiple output formats
|
|
11
|
+
|
|
12
|
+
## 🔄 Idempotent Token Processing
|
|
13
|
+
|
|
14
|
+
The token build system follows strict deterministic principles:
|
|
15
|
+
|
|
16
|
+
- **✅ Stable Output**: Same tokens → identical CSS every time
|
|
17
|
+
- **✅ No Timestamps**: Generated CSS excludes dynamic timestamps
|
|
18
|
+
- **✅ Version Controlled**: Only source tokens are committed, generated files are build artifacts
|
|
19
|
+
- **✅ Consumer Ready**: Generated assets integrate seamlessly into consumer repositories
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
These tokens are processed into CSS custom properties that work across light and dark themes via our idempotent build system.
|
|
23
|
+
|
|
24
|
+
## Token Structure
|
|
25
|
+
|
|
26
|
+
### 🎨 **theme-colors.json** - Theme-Aware Colors
|
|
27
|
+
Your carefully tuned light/dark color scheme:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"color": {
|
|
32
|
+
"surface": {
|
|
33
|
+
"page": {
|
|
34
|
+
"light": "rgb(237, 237, 235)", // Your warm light gray
|
|
35
|
+
"dark": "rgb(20, 20, 16)" // Your warm dark background
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"content": {
|
|
39
|
+
"primary": {
|
|
40
|
+
"light": "rgb(20, 20, 16)", // Near Black text on light
|
|
41
|
+
"dark": "rgb(237, 237, 235)" // Near white on dark
|
|
42
|
+
},
|
|
43
|
+
"secondary": {
|
|
44
|
+
"light": "#7c7c7c", // Your tuned light gray
|
|
45
|
+
"dark": "#83838f" // Your tuned dark gray
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 🏃 **frequent.json** - High-Change Values
|
|
53
|
+
Most commonly adjusted in DevTools:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"spacing": {
|
|
58
|
+
"component": {
|
|
59
|
+
"padding": "1rem", // Card/button internal spacing
|
|
60
|
+
"margin": "1.5rem", // Between-component spacing
|
|
61
|
+
"gap": "0.75rem" // Flex/grid gaps
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"contrast": {
|
|
65
|
+
"readable": "...", // Comfortable reading contrast
|
|
66
|
+
"medium": "...", // Secondary information
|
|
67
|
+
"subtle": "..." // De-emphasized text
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 🎯 **effects.json** - Theme-Aware Effects
|
|
73
|
+
Shadows and borders that adapt to themes:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"shadow": {
|
|
78
|
+
"subtle": {
|
|
79
|
+
"light": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
80
|
+
"dark": "0 1px 2px 0 rgb(255 255 255 / 0.03)"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"border": {
|
|
84
|
+
"subtle": {
|
|
85
|
+
"light": "rgba(0, 0, 0, 0.1)",
|
|
86
|
+
"dark": "rgba(255, 255, 255, 0.1)"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 🧩 **components.json** - Component References
|
|
93
|
+
Components reference semantic tokens:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"card": {
|
|
98
|
+
"background": "surface.elevated",
|
|
99
|
+
"padding": "spacing.component.padding",
|
|
100
|
+
"shadow": "shadow.moderate"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## DevTools → Token Workflow
|
|
106
|
+
|
|
107
|
+
### Common Adjustments:
|
|
108
|
+
|
|
109
|
+
| **DevTools Change** | **Edit This Token** | **CSS Variable Generated** |
|
|
110
|
+
|---------------------|--------------------|-----------------------------|
|
|
111
|
+
| Card padding too tight | `frequent.json` → `spacing.component.padding` | `--spacing-component-padding` |
|
|
112
|
+
| Text too light in dark | `theme-colors.json` → `content.secondary.dark` | `--color-content-secondary` |
|
|
113
|
+
| Button needs more emphasis | `theme-colors.json` → `interactive.primary` | `--color-interactive-primary` |
|
|
114
|
+
| Borders invisible | `effects.json` → `border.subtle.dark` | `--color-border-subtle` |
|
|
115
|
+
|
|
116
|
+
### Quick Edit Workflow:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 1. Edit token JSON file
|
|
120
|
+
edit ui/src/tokens/frequent.json
|
|
121
|
+
|
|
122
|
+
# 2. Quick rebuild
|
|
123
|
+
cd ui && npm run watch # Auto-rebuilds on save
|
|
124
|
+
|
|
125
|
+
# 3. Changes appear instantly in browser
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Generated CSS Structure
|
|
129
|
+
|
|
130
|
+
The build system creates theme-aware CSS custom properties:
|
|
131
|
+
|
|
132
|
+
```css
|
|
133
|
+
/* Theme-agnostic values */
|
|
134
|
+
:root {
|
|
135
|
+
--color-brand-dataimago-primary: #3498DB;
|
|
136
|
+
--spacing-component-padding: 1rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Light theme */
|
|
140
|
+
:root, [data-bs-theme="light"] {
|
|
141
|
+
--color-surface-page: rgb(237, 237, 235);
|
|
142
|
+
--color-content-primary: #000000;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Dark theme */
|
|
146
|
+
[data-bs-theme="dark"], @media (prefers-color-scheme: dark) {
|
|
147
|
+
--color-surface-page: rgb(20, 20, 16);
|
|
148
|
+
--color-content-primary: rgb(237, 237, 235);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Token Naming Convention
|
|
153
|
+
|
|
154
|
+
**Pattern**: `category-purpose-variant`
|
|
155
|
+
|
|
156
|
+
- `--color-surface-page` = Color for surface/page level
|
|
157
|
+
- `--color-content-primary` = Color for content/primary emphasis
|
|
158
|
+
- `--spacing-component-padding` = Spacing for component/padding use
|
|
159
|
+
- `--shadow-moderate` = Shadow for moderate elevation
|
|
160
|
+
|
|
161
|
+
## Theme Philosophy
|
|
162
|
+
|
|
163
|
+
- **Semantic naming** = Describes purpose, not appearance
|
|
164
|
+
- **Your colors preserved** = Light/dark values from your tuned SCSS files
|
|
165
|
+
- **DevTools friendly** = Easy to find the token you need to change
|
|
166
|
+
- **Automatic theming** = Components work in both themes without extra code
|
|
167
|
+
|
|
168
|
+
## Integration with Existing System
|
|
169
|
+
|
|
170
|
+
- **Quarto themes** continue working (website-light.scss, website-dark.scss)
|
|
171
|
+
- **New tokens** complement existing system
|
|
172
|
+
- **Backward compatible** = Old CSS still works during transition
|
|
173
|
+
- **Build system** automatically distributes to all channels
|
|
174
|
+
|
|
175
|
+
Your carefully tuned color relationships are now systematized and ready for efficient DevTools-driven development! 🎯
|
package/src/colors.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"color": {
|
|
3
|
+
"palette": {
|
|
4
|
+
"ink": {
|
|
5
|
+
"50": { "value": "#f5f5f4", "description": "Ink scale — warmest near-white; use for large surfaces when cream feels too yellow" },
|
|
6
|
+
"100": { "value": "#e7e5e4", "description": "Ink scale — subtle neutral surface tint" },
|
|
7
|
+
"200": { "value": "#d6d3d1", "description": "Ink scale — borders, dividers on light surfaces" },
|
|
8
|
+
"300": { "value": "#a8a29e", "description": "Ink scale — muted text on dark surfaces" },
|
|
9
|
+
"400": { "value": "#78716c", "description": "Ink scale — secondary text on dark surfaces" },
|
|
10
|
+
"500": { "value": "#57534e", "description": "Ink scale — secondary text on light surfaces" },
|
|
11
|
+
"600": { "value": "#44403c", "description": "Ink scale — primary text on mid surfaces" },
|
|
12
|
+
"700": { "value": "#292524", "description": "Ink scale — primary text, high contrast" },
|
|
13
|
+
"800": { "value": "#1c1917", "description": "Ink scale — surfaces in dark mode" },
|
|
14
|
+
"900": { "value": "#0c0a09", "description": "Ink scale — near-black; primary dark surface and text color" }
|
|
15
|
+
},
|
|
16
|
+
"cream": {
|
|
17
|
+
"50": { "value": "#fefdfb", "description": "Cream scale — lightest warm surface" },
|
|
18
|
+
"100": { "value": "#fdf9f2", "description": "Cream scale — canonical page background (light mode)" },
|
|
19
|
+
"200": { "value": "#faf2e3", "description": "Cream scale — slightly richer surface tint" },
|
|
20
|
+
"300": { "value": "#f5e8cf", "description": "Cream scale — pull-quote background, subtle panels" },
|
|
21
|
+
"400": { "value": "#edd9b3", "description": "Cream scale — muted warm accent" },
|
|
22
|
+
"500": { "value": "#e0c088", "description": "Cream scale — strong warm accent; wheat" }
|
|
23
|
+
},
|
|
24
|
+
"copper": {
|
|
25
|
+
"50": { "value": "#fdf4ee", "description": "Copper scale — warm tint wash" },
|
|
26
|
+
"100": { "value": "#fbe5d1", "description": "Copper scale — soft copper backdrop" },
|
|
27
|
+
"200": { "value": "#f6c79c", "description": "Copper scale — muted copper accent" },
|
|
28
|
+
"300": { "value": "#f0a467", "description": "Copper scale — interactive primary on dark mode" },
|
|
29
|
+
"400": { "value": "#ea8441", "description": "Copper scale — hover on dark mode" },
|
|
30
|
+
"500": { "value": "#d46820", "description": "Copper scale — canonical interactive primary (light mode)" },
|
|
31
|
+
"600": { "value": "#b55017", "description": "Copper scale — hover on light mode" },
|
|
32
|
+
"700": { "value": "#913d15", "description": "Copper scale — active/pressed state" },
|
|
33
|
+
"800": { "value": "#753318", "description": "Copper scale — on dark surfaces" },
|
|
34
|
+
"900": { "value": "#612b16", "description": "Copper scale — deep foundation" }
|
|
35
|
+
},
|
|
36
|
+
"accent": {
|
|
37
|
+
"50": { "value": "#fdf2f2", "description": "Accent scale — faint wash for emancipation-coded panels" },
|
|
38
|
+
"500": { "value": "#b54a27", "description": "Accent scale — canonical moral/emancipation accent" },
|
|
39
|
+
"600": { "value": "#9a3e20", "description": "Accent scale — hover on accent" },
|
|
40
|
+
"700": { "value": "#7d321a", "description": "Accent scale — pressed state" }
|
|
41
|
+
},
|
|
42
|
+
"presentation-blue": {
|
|
43
|
+
"50": { "value": "#f0f8fc", "description": "Presentation-blue scale — pale wash for reveal.js callout backgrounds" },
|
|
44
|
+
"500": { "value": "#3498DB", "description": "Presentation-blue scale — Flat-UI peter-river; reserved presentation accent (distinct from functional.info)" },
|
|
45
|
+
"600": { "value": "#2980B9", "description": "Presentation-blue scale — Flat-UI belize-hole; hover/emphasized on presentation accent" },
|
|
46
|
+
"700": { "value": "#1f618d", "description": "Presentation-blue scale — pressed/deep emphasis on presentation accent" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"functional": {
|
|
50
|
+
"success": {
|
|
51
|
+
"value": "#27AE60",
|
|
52
|
+
"description": "Success states and positive actions"
|
|
53
|
+
},
|
|
54
|
+
"warning": {
|
|
55
|
+
"value": "#F39C12",
|
|
56
|
+
"description": "Warning states and caution"
|
|
57
|
+
},
|
|
58
|
+
"error": {
|
|
59
|
+
"value": "#E74C3C",
|
|
60
|
+
"description": "Error states and critical issues"
|
|
61
|
+
},
|
|
62
|
+
"info": {
|
|
63
|
+
"value": "#3498DB",
|
|
64
|
+
"description": "Informational content"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"card": {
|
|
3
|
+
"background": "surface.elevated",
|
|
4
|
+
"padding": "spacing.component.padding",
|
|
5
|
+
"radius": "radius.component",
|
|
6
|
+
"shadow": "shadow.moderate",
|
|
7
|
+
"border": "border.subtle",
|
|
8
|
+
"description": "Card component tokens - references semantic tokens"
|
|
9
|
+
},
|
|
10
|
+
"button": {
|
|
11
|
+
"padding-x": "spacing.component.padding",
|
|
12
|
+
"padding-y": "spacing.micro.normal",
|
|
13
|
+
"radius": "radius.component",
|
|
14
|
+
"font-weight": "typography.weight.medium",
|
|
15
|
+
"primary": {
|
|
16
|
+
"background": "interactive.primary",
|
|
17
|
+
"text": "content.inverse",
|
|
18
|
+
"hover": "interactive.hover"
|
|
19
|
+
},
|
|
20
|
+
"secondary": {
|
|
21
|
+
"background": "surface.elevated",
|
|
22
|
+
"text": "content.primary",
|
|
23
|
+
"hover": "surface.page"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"navbar": {
|
|
27
|
+
"background": "surface.navbar",
|
|
28
|
+
"background-scrolled": "surface.navbar-scrolled",
|
|
29
|
+
"text": "content.secondary",
|
|
30
|
+
"text-hover": "interactive.accent",
|
|
31
|
+
"transition": "transition.smooth"
|
|
32
|
+
},
|
|
33
|
+
"navigation": {
|
|
34
|
+
"item-spacing": "spacing.micro.loose",
|
|
35
|
+
"hover-background": {
|
|
36
|
+
"light": "rgba(20, 20, 16, 0.05)",
|
|
37
|
+
"dark": "rgba(237, 237, 235, 0.05)"
|
|
38
|
+
},
|
|
39
|
+
"active-background": {
|
|
40
|
+
"light": "rgba(20, 20, 16, 0.1)",
|
|
41
|
+
"dark": "rgba(237, 237, 235, 0.1)"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/effects.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shadow": {
|
|
3
|
+
"subtle": {
|
|
4
|
+
"light": "0 1px 2px 0 rgb(20 20 16 / 0.05)",
|
|
5
|
+
"dark": "0 1px 2px 0 rgb(237 237 235 / 0.03)",
|
|
6
|
+
"description": "Subtle elevation - barely perceptible"
|
|
7
|
+
},
|
|
8
|
+
"moderate": {
|
|
9
|
+
"light": "0 4px 6px -1px rgb(20 20 16 / 0.1)",
|
|
10
|
+
"dark": "0 4px 6px -1px rgb(237 237 235 / 0.05)",
|
|
11
|
+
"description": "Moderate elevation - cards, dropdowns"
|
|
12
|
+
},
|
|
13
|
+
"prominent": {
|
|
14
|
+
"light": "0 10px 15px -3px rgb(20 20 16 / 0.1)",
|
|
15
|
+
"dark": "0 10px 15px -3px rgb(237 237 235 / 0.4)",
|
|
16
|
+
"description": "Strong elevation - modals, floating elements"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"border": {
|
|
20
|
+
"subtle": {
|
|
21
|
+
"light": "rgba(20, 20, 16, 0.1)",
|
|
22
|
+
"dark": "rgba(237, 237, 235, 0.1)",
|
|
23
|
+
"description": "Subtle borders - element separation"
|
|
24
|
+
},
|
|
25
|
+
"moderate": {
|
|
26
|
+
"light": "rgba(20, 20, 16, 0.15)",
|
|
27
|
+
"dark": "rgba(237, 237, 235, 0.15)",
|
|
28
|
+
"description": "Moderate borders - defined boundaries"
|
|
29
|
+
},
|
|
30
|
+
"focus": {
|
|
31
|
+
"light": "#3498DB",
|
|
32
|
+
"dark": "#4FC3F7",
|
|
33
|
+
"description": "Focus indicators - accessibility"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"transition": {
|
|
37
|
+
"quick": "0.15s ease",
|
|
38
|
+
"standard": "0.25s ease-in-out",
|
|
39
|
+
"smooth": "0.35s ease",
|
|
40
|
+
"logo": "0.3s",
|
|
41
|
+
"description": "Animation durations - consistent timing"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spacing": {
|
|
3
|
+
"component": {
|
|
4
|
+
"padding": "1rem",
|
|
5
|
+
"margin": "1.5rem",
|
|
6
|
+
"gap": "0.75rem",
|
|
7
|
+
"description": "Most frequently adjusted spacing - component internals"
|
|
8
|
+
},
|
|
9
|
+
"layout": {
|
|
10
|
+
"section": "3rem",
|
|
11
|
+
"container": "2rem",
|
|
12
|
+
"comfortable": "1rem",
|
|
13
|
+
"description": "Layout-level spacing - between major elements"
|
|
14
|
+
},
|
|
15
|
+
"micro": {
|
|
16
|
+
"tight": "0.25rem",
|
|
17
|
+
"normal": "0.5rem",
|
|
18
|
+
"loose": "1rem",
|
|
19
|
+
"description": "Fine-tuning spacing - when things feel cramped or loose"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"radius": {
|
|
23
|
+
"component": "0.5rem",
|
|
24
|
+
"subtle": "0.25rem",
|
|
25
|
+
"prominent": "0.75rem",
|
|
26
|
+
"full": "9999px",
|
|
27
|
+
"description": "Border radius values - component rounding"
|
|
28
|
+
},
|
|
29
|
+
"contrast": {
|
|
30
|
+
"high": {
|
|
31
|
+
"light": "rgb(20, 20, 16)",
|
|
32
|
+
"dark": "rgb(237, 237, 235)",
|
|
33
|
+
"description": "Maximum contrast text - accessibility focus"
|
|
34
|
+
},
|
|
35
|
+
"readable": {
|
|
36
|
+
"light": "rgb(20, 20, 16)",
|
|
37
|
+
"dark": "rgb(237, 237, 235)",
|
|
38
|
+
"description": "Comfortable reading contrast - primary text"
|
|
39
|
+
},
|
|
40
|
+
"medium": {
|
|
41
|
+
"light": "#7c7c7c",
|
|
42
|
+
"dark": "#83838f",
|
|
43
|
+
"description": "Medium emphasis - secondary information"
|
|
44
|
+
},
|
|
45
|
+
"subtle": {
|
|
46
|
+
"light": "#7c7c7c",
|
|
47
|
+
"dark": "#83838f",
|
|
48
|
+
"description": "De-emphasized text - captions, meta info"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|