@ponchia/ui 0.3.6 → 0.4.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/CHANGELOG.md +1063 -0
- package/README.md +31 -14
- package/behaviors/index.d.ts +3 -1
- package/behaviors/index.js +179 -106
- package/classes/index.d.ts +41 -0
- package/classes/index.js +42 -0
- package/classes/vscode.css-custom-data.json +18 -22
- package/css/dataviz.css +96 -0
- package/css/disclosure.css +29 -0
- package/css/dots.css +32 -2
- package/css/feedback.css +53 -0
- package/css/motion.css +88 -0
- package/css/overlay.css +52 -1
- package/css/report.css +382 -0
- package/css/skins.css +54 -0
- package/css/tokens.css +56 -32
- package/dist/bronto.css +1 -1
- package/dist/css/dataviz.css +1 -0
- package/dist/css/disclosure.css +1 -1
- package/dist/css/dots.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/motion.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/report.css +1 -0
- package/dist/css/skins.css +1 -0
- package/dist/css/tokens.css +1 -1
- package/docs/adr/0001-color-system.md +271 -0
- package/docs/adr/0002-scope-and-2026-baseline.md +104 -0
- package/docs/adr/0003-theme-model.md +94 -0
- package/docs/contrast.md +170 -51
- package/docs/reference.md +118 -19
- package/docs/reporting.md +270 -0
- package/docs/stability.md +37 -0
- package/docs/theming.md +84 -7
- package/docs/usage.md +67 -8
- package/glyphs/glyphs.d.ts +14 -1
- package/glyphs/glyphs.js +143 -2
- package/llms.txt +101 -5
- package/package.json +79 -5
- package/qwik/index.d.ts +55 -0
- package/qwik/index.js +129 -0
- package/react/index.d.ts +57 -0
- package/react/index.js +84 -0
- package/solid/index.d.ts +57 -0
- package/solid/index.js +85 -0
- package/tokens/charts.d.ts +37 -0
- package/tokens/charts.js +96 -0
- package/tokens/charts.json +61 -0
- package/tokens/index.d.ts +3 -3
- package/tokens/index.js +16 -18
- package/tokens/index.json +32 -36
- package/tokens/resolved.json +39 -41
- package/tokens/skins.d.ts +27 -0
- package/tokens/skins.js +62 -0
- package/tokens/tokens.dtcg.json +22 -34
package/tokens/index.js
CHANGED
|
@@ -56,10 +56,10 @@ export const cssVars = {
|
|
|
56
56
|
'--z-overlay': '30',
|
|
57
57
|
'--z-popover': '50',
|
|
58
58
|
'--z-toast': '60',
|
|
59
|
-
'--accent-1': 'color-mix(in
|
|
60
|
-
'--accent-2': 'color-mix(in
|
|
61
|
-
'--accent-3': 'color-mix(in
|
|
62
|
-
'--accent-4': 'color-mix(in
|
|
59
|
+
'--accent-1': 'color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))',
|
|
60
|
+
'--accent-2': 'color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))',
|
|
61
|
+
'--accent-3': 'color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))',
|
|
62
|
+
'--accent-4': 'color-mix(in oklch, var(--accent) 60%, var(--accent-ramp-end))',
|
|
63
63
|
'--accent-5': 'var(--accent)',
|
|
64
64
|
'--accent-6': 'var(--accent-strong)',
|
|
65
65
|
'--surface-1': 'var(--bg)',
|
|
@@ -102,6 +102,7 @@ export const cssVars = {
|
|
|
102
102
|
'--text-soft': '#353533',
|
|
103
103
|
'--text-dim': '#686863',
|
|
104
104
|
'--accent': '#d71921',
|
|
105
|
+
'--accent-ramp-end': '#ffffff',
|
|
105
106
|
'--accent-strong': 'color-mix(in srgb, var(--accent) 83%, #000)',
|
|
106
107
|
'--accent-text': 'var(--accent-strong)',
|
|
107
108
|
'--accent-soft': 'color-mix(in srgb, var(--accent) 10%, transparent)',
|
|
@@ -109,8 +110,6 @@ export const cssVars = {
|
|
|
109
110
|
'--success-soft': 'rgb(47, 125, 79, 0.12)',
|
|
110
111
|
'--warning': '#806414',
|
|
111
112
|
'--warning-soft': 'rgb(128, 100, 20, 0.13)',
|
|
112
|
-
'--orange': '#a85f32',
|
|
113
|
-
'--orange-soft': 'rgb(168, 95, 50, 0.13)',
|
|
114
113
|
'--danger': '#c01622',
|
|
115
114
|
'--danger-soft': 'rgb(192, 22, 34, 0.1)',
|
|
116
115
|
'--info': '#1f63c4',
|
|
@@ -126,18 +125,19 @@ export const cssVars = {
|
|
|
126
125
|
},
|
|
127
126
|
// Dark palette — both the prefers-color-scheme and [data-theme='dark'] blocks.
|
|
128
127
|
dark: {
|
|
129
|
-
'--bg': '#
|
|
130
|
-
'--bg-elevated': '#
|
|
128
|
+
'--bg': '#121212',
|
|
129
|
+
'--bg-elevated': '#181818',
|
|
131
130
|
'--bg-accent': 'color-mix(in srgb, var(--accent) 8%, transparent)',
|
|
132
|
-
'--panel': '#
|
|
133
|
-
'--panel-strong': '#
|
|
134
|
-
'--panel-soft': '#
|
|
135
|
-
'--line': '#
|
|
136
|
-
'--line-strong': '#
|
|
137
|
-
'--text': '#
|
|
138
|
-
'--text-soft': '#
|
|
139
|
-
'--text-dim': '#
|
|
131
|
+
'--panel': '#1c1c1c',
|
|
132
|
+
'--panel-strong': '#222222',
|
|
133
|
+
'--panel-soft': '#242424',
|
|
134
|
+
'--line': '#383838',
|
|
135
|
+
'--line-strong': '#555555',
|
|
136
|
+
'--text': '#e6e6e6',
|
|
137
|
+
'--text-soft': '#c8c8c8',
|
|
138
|
+
'--text-dim': '#a0a0a0',
|
|
140
139
|
'--accent': '#ff3b41',
|
|
140
|
+
'--accent-ramp-end': '#000000',
|
|
141
141
|
'--accent-strong': 'color-mix(in srgb, var(--accent) 84%, #fff)',
|
|
142
142
|
'--accent-text': 'var(--accent-strong)',
|
|
143
143
|
'--accent-soft': 'color-mix(in srgb, var(--accent) 14%, transparent)',
|
|
@@ -145,8 +145,6 @@ export const cssVars = {
|
|
|
145
145
|
'--success-soft': 'rgb(78, 194, 126, 0.14)',
|
|
146
146
|
'--warning': '#d8bd72',
|
|
147
147
|
'--warning-soft': 'rgb(216, 189, 114, 0.14)',
|
|
148
|
-
'--orange': '#d08c5b',
|
|
149
|
-
'--orange-soft': 'rgb(208, 140, 91, 0.15)',
|
|
150
148
|
'--danger': '#ff4d54',
|
|
151
149
|
'--danger-soft': 'rgb(255, 77, 84, 0.15)',
|
|
152
150
|
'--info': '#6fb0e6',
|
package/tokens/index.json
CHANGED
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"--z-overlay": "30",
|
|
40
40
|
"--z-popover": "50",
|
|
41
41
|
"--z-toast": "60",
|
|
42
|
-
"--accent-1": "color-mix(in
|
|
43
|
-
"--accent-2": "color-mix(in
|
|
44
|
-
"--accent-3": "color-mix(in
|
|
45
|
-
"--accent-4": "color-mix(in
|
|
42
|
+
"--accent-1": "color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))",
|
|
43
|
+
"--accent-2": "color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))",
|
|
44
|
+
"--accent-3": "color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))",
|
|
45
|
+
"--accent-4": "color-mix(in oklch, var(--accent) 60%, var(--accent-ramp-end))",
|
|
46
46
|
"--accent-5": "var(--accent)",
|
|
47
47
|
"--accent-6": "var(--accent-strong)",
|
|
48
48
|
"--surface-1": "var(--bg)",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"--text-soft": "#353533",
|
|
85
85
|
"--text-dim": "#686863",
|
|
86
86
|
"--accent": "#d71921",
|
|
87
|
+
"--accent-ramp-end": "#ffffff",
|
|
87
88
|
"--accent-strong": "color-mix(in srgb, var(--accent) 83%, #000)",
|
|
88
89
|
"--accent-text": "var(--accent-strong)",
|
|
89
90
|
"--accent-soft": "color-mix(in srgb, var(--accent) 10%, transparent)",
|
|
@@ -91,8 +92,6 @@
|
|
|
91
92
|
"--success-soft": "rgb(47, 125, 79, 0.12)",
|
|
92
93
|
"--warning": "#806414",
|
|
93
94
|
"--warning-soft": "rgb(128, 100, 20, 0.13)",
|
|
94
|
-
"--orange": "#a85f32",
|
|
95
|
-
"--orange-soft": "rgb(168, 95, 50, 0.13)",
|
|
96
95
|
"--danger": "#c01622",
|
|
97
96
|
"--danger-soft": "rgb(192, 22, 34, 0.1)",
|
|
98
97
|
"--info": "#1f63c4",
|
|
@@ -107,18 +106,19 @@
|
|
|
107
106
|
"--shadow-raised": "0 0 0 1px var(--line-strong)"
|
|
108
107
|
},
|
|
109
108
|
"dark": {
|
|
110
|
-
"--bg": "#
|
|
111
|
-
"--bg-elevated": "#
|
|
109
|
+
"--bg": "#121212",
|
|
110
|
+
"--bg-elevated": "#181818",
|
|
112
111
|
"--bg-accent": "color-mix(in srgb, var(--accent) 8%, transparent)",
|
|
113
|
-
"--panel": "#
|
|
114
|
-
"--panel-strong": "#
|
|
115
|
-
"--panel-soft": "#
|
|
116
|
-
"--line": "#
|
|
117
|
-
"--line-strong": "#
|
|
118
|
-
"--text": "#
|
|
119
|
-
"--text-soft": "#
|
|
120
|
-
"--text-dim": "#
|
|
112
|
+
"--panel": "#1c1c1c",
|
|
113
|
+
"--panel-strong": "#222222",
|
|
114
|
+
"--panel-soft": "#242424",
|
|
115
|
+
"--line": "#383838",
|
|
116
|
+
"--line-strong": "#555555",
|
|
117
|
+
"--text": "#e6e6e6",
|
|
118
|
+
"--text-soft": "#c8c8c8",
|
|
119
|
+
"--text-dim": "#a0a0a0",
|
|
121
120
|
"--accent": "#ff3b41",
|
|
121
|
+
"--accent-ramp-end": "#000000",
|
|
122
122
|
"--accent-strong": "color-mix(in srgb, var(--accent) 84%, #fff)",
|
|
123
123
|
"--accent-text": "var(--accent-strong)",
|
|
124
124
|
"--accent-soft": "color-mix(in srgb, var(--accent) 14%, transparent)",
|
|
@@ -126,8 +126,6 @@
|
|
|
126
126
|
"--success-soft": "rgb(78, 194, 126, 0.14)",
|
|
127
127
|
"--warning": "#d8bd72",
|
|
128
128
|
"--warning-soft": "rgb(216, 189, 114, 0.14)",
|
|
129
|
-
"--orange": "#d08c5b",
|
|
130
|
-
"--orange-soft": "rgb(208, 140, 91, 0.15)",
|
|
131
129
|
"--danger": "#ff4d54",
|
|
132
130
|
"--danger-soft": "rgb(255, 77, 84, 0.15)",
|
|
133
131
|
"--info": "#6fb0e6",
|
|
@@ -182,10 +180,10 @@
|
|
|
182
180
|
"z-overlay": "30",
|
|
183
181
|
"z-popover": "50",
|
|
184
182
|
"z-toast": "60",
|
|
185
|
-
"accent-1": "color-mix(in
|
|
186
|
-
"accent-2": "color-mix(in
|
|
187
|
-
"accent-3": "color-mix(in
|
|
188
|
-
"accent-4": "color-mix(in
|
|
183
|
+
"accent-1": "color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))",
|
|
184
|
+
"accent-2": "color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))",
|
|
185
|
+
"accent-3": "color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))",
|
|
186
|
+
"accent-4": "color-mix(in oklch, var(--accent) 60%, var(--accent-ramp-end))",
|
|
189
187
|
"accent-5": "var(--accent)",
|
|
190
188
|
"accent-6": "var(--accent-strong)",
|
|
191
189
|
"surface-1": "var(--bg)",
|
|
@@ -228,6 +226,7 @@
|
|
|
228
226
|
"text-soft": "#353533",
|
|
229
227
|
"text-dim": "#686863",
|
|
230
228
|
"accent": "#d71921",
|
|
229
|
+
"accent-ramp-end": "#ffffff",
|
|
231
230
|
"accent-strong": "color-mix(in srgb, var(--accent) 83%, #000)",
|
|
232
231
|
"accent-text": "var(--accent-strong)",
|
|
233
232
|
"accent-soft": "color-mix(in srgb, var(--accent) 10%, transparent)",
|
|
@@ -235,8 +234,6 @@
|
|
|
235
234
|
"success-soft": "rgb(47, 125, 79, 0.12)",
|
|
236
235
|
"warning": "#806414",
|
|
237
236
|
"warning-soft": "rgb(128, 100, 20, 0.13)",
|
|
238
|
-
"orange": "#a85f32",
|
|
239
|
-
"orange-soft": "rgb(168, 95, 50, 0.13)",
|
|
240
237
|
"danger": "#c01622",
|
|
241
238
|
"danger-soft": "rgb(192, 22, 34, 0.1)",
|
|
242
239
|
"info": "#1f63c4",
|
|
@@ -251,18 +248,19 @@
|
|
|
251
248
|
"shadow-raised": "0 0 0 1px var(--line-strong)"
|
|
252
249
|
},
|
|
253
250
|
"dark": {
|
|
254
|
-
"bg": "#
|
|
255
|
-
"bg-elevated": "#
|
|
251
|
+
"bg": "#121212",
|
|
252
|
+
"bg-elevated": "#181818",
|
|
256
253
|
"bg-accent": "color-mix(in srgb, var(--accent) 8%, transparent)",
|
|
257
|
-
"panel": "#
|
|
258
|
-
"panel-strong": "#
|
|
259
|
-
"panel-soft": "#
|
|
260
|
-
"line": "#
|
|
261
|
-
"line-strong": "#
|
|
262
|
-
"text": "#
|
|
263
|
-
"text-soft": "#
|
|
264
|
-
"text-dim": "#
|
|
254
|
+
"panel": "#1c1c1c",
|
|
255
|
+
"panel-strong": "#222222",
|
|
256
|
+
"panel-soft": "#242424",
|
|
257
|
+
"line": "#383838",
|
|
258
|
+
"line-strong": "#555555",
|
|
259
|
+
"text": "#e6e6e6",
|
|
260
|
+
"text-soft": "#c8c8c8",
|
|
261
|
+
"text-dim": "#a0a0a0",
|
|
265
262
|
"accent": "#ff3b41",
|
|
263
|
+
"accent-ramp-end": "#000000",
|
|
266
264
|
"accent-strong": "color-mix(in srgb, var(--accent) 84%, #fff)",
|
|
267
265
|
"accent-text": "var(--accent-strong)",
|
|
268
266
|
"accent-soft": "color-mix(in srgb, var(--accent) 14%, transparent)",
|
|
@@ -270,8 +268,6 @@
|
|
|
270
268
|
"success-soft": "rgb(78, 194, 126, 0.14)",
|
|
271
269
|
"warning": "#d8bd72",
|
|
272
270
|
"warning-soft": "rgb(216, 189, 114, 0.14)",
|
|
273
|
-
"orange": "#d08c5b",
|
|
274
|
-
"orange-soft": "rgb(208, 140, 91, 0.15)",
|
|
275
271
|
"danger": "#ff4d54",
|
|
276
272
|
"danger-soft": "rgb(255, 77, 84, 0.15)",
|
|
277
273
|
"info": "#6fb0e6",
|
package/tokens/resolved.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "@ponchia/ui colour tokens resolved to static values per theme (var() + sRGB color-mix() evaluated at build). For non-CSS render targets: MapLibre/canvas/WebGL/SVG. Generated from tokens/index.js — do not edit by hand; run `npm run resolved:build`. Drift-checked in CI.",
|
|
2
|
+
"$comment": "@ponchia/ui colour tokens resolved to static values per theme (var() + sRGB/OKLCH color-mix() evaluated at build). For non-CSS render targets: MapLibre/canvas/WebGL/SVG. Generated from tokens/index.js — do not edit by hand; run `npm run resolved:build`. Drift-checked in CI.",
|
|
3
3
|
"light": {
|
|
4
|
-
"--accent-1": "#
|
|
5
|
-
"--accent-2": "#
|
|
6
|
-
"--accent-3": "#
|
|
7
|
-
"--accent-4": "#
|
|
4
|
+
"--accent-1": "#ffefed",
|
|
5
|
+
"--accent-2": "#ffe0db",
|
|
6
|
+
"--accent-3": "#fbc0b9",
|
|
7
|
+
"--accent-4": "#f1877d",
|
|
8
8
|
"--accent-5": "#d71921",
|
|
9
9
|
"--accent-6": "#b2151b",
|
|
10
10
|
"--surface-1": "#f4f4f2",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"--text-soft": "#353533",
|
|
45
45
|
"--text-dim": "#686863",
|
|
46
46
|
"--accent": "#d71921",
|
|
47
|
+
"--accent-ramp-end": "#ffffff",
|
|
47
48
|
"--accent-strong": "#b2151b",
|
|
48
49
|
"--accent-text": "#b2151b",
|
|
49
50
|
"--accent-soft": "rgba(215, 25, 33, 0.1)",
|
|
@@ -51,8 +52,6 @@
|
|
|
51
52
|
"--success-soft": "rgba(47, 125, 79, 0.12)",
|
|
52
53
|
"--warning": "#806414",
|
|
53
54
|
"--warning-soft": "rgba(128, 100, 20, 0.13)",
|
|
54
|
-
"--orange": "#a85f32",
|
|
55
|
-
"--orange-soft": "rgba(168, 95, 50, 0.13)",
|
|
56
55
|
"--danger": "#c01622",
|
|
57
56
|
"--danger-soft": "rgba(192, 22, 34, 0.1)",
|
|
58
57
|
"--info": "#1f63c4",
|
|
@@ -65,25 +64,25 @@
|
|
|
65
64
|
"--focus-ring": "#d71921"
|
|
66
65
|
},
|
|
67
66
|
"dark": {
|
|
68
|
-
"--accent-1": "#
|
|
69
|
-
"--accent-2": "#
|
|
70
|
-
"--accent-3": "#
|
|
71
|
-
"--accent-4": "#
|
|
67
|
+
"--accent-1": "#020000",
|
|
68
|
+
"--accent-2": "#0d0101",
|
|
69
|
+
"--accent-3": "#330506",
|
|
70
|
+
"--accent-4": "#80191c",
|
|
72
71
|
"--accent-5": "#ff3b41",
|
|
73
72
|
"--accent-6": "#ff5a5f",
|
|
74
|
-
"--surface-1": "#
|
|
75
|
-
"--surface-2": "#
|
|
76
|
-
"--surface-3": "#
|
|
77
|
-
"--surface-4": "#
|
|
78
|
-
"--surface-5": "#
|
|
79
|
-
"--surface-6": "#
|
|
80
|
-
"--bronto-color-bg": "#
|
|
81
|
-
"--bronto-color-surface": "#
|
|
82
|
-
"--bronto-color-surface-raised": "#
|
|
83
|
-
"--bronto-color-border": "#
|
|
84
|
-
"--bronto-color-border-strong": "#
|
|
85
|
-
"--bronto-color-text": "#
|
|
86
|
-
"--bronto-color-text-muted": "#
|
|
73
|
+
"--surface-1": "#121212",
|
|
74
|
+
"--surface-2": "#181818",
|
|
75
|
+
"--surface-3": "#1c1c1c",
|
|
76
|
+
"--surface-4": "#242424",
|
|
77
|
+
"--surface-5": "#383838",
|
|
78
|
+
"--surface-6": "#555555",
|
|
79
|
+
"--bronto-color-bg": "#121212",
|
|
80
|
+
"--bronto-color-surface": "#1c1c1c",
|
|
81
|
+
"--bronto-color-surface-raised": "#222222",
|
|
82
|
+
"--bronto-color-border": "#383838",
|
|
83
|
+
"--bronto-color-border-strong": "#555555",
|
|
84
|
+
"--bronto-color-text": "#e6e6e6",
|
|
85
|
+
"--bronto-color-text-muted": "#a0a0a0",
|
|
87
86
|
"--bronto-color-action": "#ff3b41",
|
|
88
87
|
"--bronto-color-on-action": "#000000",
|
|
89
88
|
"--bronto-color-focus": "#ff3b41",
|
|
@@ -91,23 +90,24 @@
|
|
|
91
90
|
"--bronto-color-warning": "#d8bd72",
|
|
92
91
|
"--bronto-color-danger": "#ff4d54",
|
|
93
92
|
"--bronto-color-info": "#6fb0e6",
|
|
94
|
-
"--surface": "#
|
|
95
|
-
"--surface-raised": "#
|
|
96
|
-
"--surface-muted": "#
|
|
97
|
-
"--border": "#
|
|
98
|
-
"--border-strong": "#
|
|
99
|
-
"--bg": "#
|
|
100
|
-
"--bg-elevated": "#
|
|
93
|
+
"--surface": "#1c1c1c",
|
|
94
|
+
"--surface-raised": "#222222",
|
|
95
|
+
"--surface-muted": "#242424",
|
|
96
|
+
"--border": "#383838",
|
|
97
|
+
"--border-strong": "#555555",
|
|
98
|
+
"--bg": "#121212",
|
|
99
|
+
"--bg-elevated": "#181818",
|
|
101
100
|
"--bg-accent": "rgba(255, 59, 65, 0.08)",
|
|
102
|
-
"--panel": "#
|
|
103
|
-
"--panel-strong": "#
|
|
104
|
-
"--panel-soft": "#
|
|
105
|
-
"--line": "#
|
|
106
|
-
"--line-strong": "#
|
|
107
|
-
"--text": "#
|
|
108
|
-
"--text-soft": "#
|
|
109
|
-
"--text-dim": "#
|
|
101
|
+
"--panel": "#1c1c1c",
|
|
102
|
+
"--panel-strong": "#222222",
|
|
103
|
+
"--panel-soft": "#242424",
|
|
104
|
+
"--line": "#383838",
|
|
105
|
+
"--line-strong": "#555555",
|
|
106
|
+
"--text": "#e6e6e6",
|
|
107
|
+
"--text-soft": "#c8c8c8",
|
|
108
|
+
"--text-dim": "#a0a0a0",
|
|
110
109
|
"--accent": "#ff3b41",
|
|
110
|
+
"--accent-ramp-end": "#000000",
|
|
111
111
|
"--accent-strong": "#ff5a5f",
|
|
112
112
|
"--accent-text": "#ff5a5f",
|
|
113
113
|
"--accent-soft": "rgba(255, 59, 65, 0.14)",
|
|
@@ -115,8 +115,6 @@
|
|
|
115
115
|
"--success-soft": "rgba(78, 194, 126, 0.14)",
|
|
116
116
|
"--warning": "#d8bd72",
|
|
117
117
|
"--warning-soft": "rgba(216, 189, 114, 0.14)",
|
|
118
|
-
"--orange": "#d08c5b",
|
|
119
|
-
"--orange-soft": "rgba(208, 140, 91, 0.15)",
|
|
120
118
|
"--danger": "#ff4d54",
|
|
121
119
|
"--danger-soft": "rgba(255, 77, 84, 0.15)",
|
|
122
120
|
"--info": "#6fb0e6",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @ponchia/ui — GENERATED from tokens/skins.js by scripts/gen-skins.mjs.
|
|
2
|
+
* Do not edit by hand; run `npm run skins:build`. Drift-checked in CI. */
|
|
3
|
+
|
|
4
|
+
/** Every display-colorway name @ponchia/ui ships (literal union). Use as a
|
|
5
|
+
* type for a `data-bronto-skin` value (`const s: SkinName = 'amber-crt'`). */
|
|
6
|
+
export type SkinName =
|
|
7
|
+
| 'amber-crt'
|
|
8
|
+
| 'e-ink'
|
|
9
|
+
| 'phosphor-green';
|
|
10
|
+
|
|
11
|
+
/** A colorway: a display label + per-theme custom-property overrides (CSS
|
|
12
|
+
* value strings). `light`/`dark` always set `--accent`; `dark` may add a
|
|
13
|
+
* display knob such as `--dotmatrix-glow`. */
|
|
14
|
+
export interface Skin {
|
|
15
|
+
label: string;
|
|
16
|
+
light: Record<string, string>;
|
|
17
|
+
dark: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The frozen name→colorway registry. */
|
|
21
|
+
export declare const skins: Record<SkinName, Skin>;
|
|
22
|
+
|
|
23
|
+
/** Every colorway name, frozen and sorted. */
|
|
24
|
+
export declare const SKIN_NAMES: readonly SkinName[];
|
|
25
|
+
|
|
26
|
+
declare const _default: Record<SkinName, Skin>;
|
|
27
|
+
export default _default;
|
package/tokens/skins.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ponchia/ui — optional display colorways ("skins").
|
|
3
|
+
*
|
|
4
|
+
* The single source for the opt-in `data-bronto-skin` looks (ADR-0001 step 4).
|
|
5
|
+
* A skin is NOT a second brand colour — it *re-points the one accent* (and the
|
|
6
|
+
* Tier-3 dot-matrix display knobs) to a different single hue, so the
|
|
7
|
+
* one-accent-per-scope discipline holds while the palette gains creative range
|
|
8
|
+
* *across* skins. The neutral canvas, status palette, and every component stay
|
|
9
|
+
* exactly as they are.
|
|
10
|
+
*
|
|
11
|
+
* Accents are authored in **OKLCH** (ADR-0001 step 5 — "OKLCH for new work
|
|
12
|
+
* first"): perceptually-uniform lightness makes the light/dark pair easy to
|
|
13
|
+
* reason about, and it is within the package browser floor (Chrome 111+,
|
|
14
|
+
* Safari 16.4+, Firefox 121+ all support `oklch()` and `color-mix()`).
|
|
15
|
+
*
|
|
16
|
+
* Each skin gives a per-theme accent because — exactly like the core red
|
|
17
|
+
* (#d71921 light / #ff3b41 dark) — one hue cannot stay AA against both a white
|
|
18
|
+
* and a black button label; the light accent is darker, the dark one brighter.
|
|
19
|
+
* The derived family (`--accent-strong`/`-text`/`-soft`, `--focus-ring`,
|
|
20
|
+
* `--bg-accent`, `--field-dot-accent`) recomputes in the browser from the live
|
|
21
|
+
* `var(--accent)`, so a skin only sets `--accent` plus any display knobs.
|
|
22
|
+
*
|
|
23
|
+
* This module is the source for BOTH:
|
|
24
|
+
* - css/skins.css (generated by scripts/gen-skins.mjs, drift-checked)
|
|
25
|
+
* - the skin contrast audit (scripts/gen-contrast.mjs gates every skin accent)
|
|
26
|
+
*
|
|
27
|
+
* Skins are shipped OPT-IN: a separate `./css/skins.css` entrypoint, never part
|
|
28
|
+
* of the default `dist/bronto.css` bundle.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* name → { label, light, dark }. `light`/`dark` are CSS custom-property maps
|
|
33
|
+
* applied under the same conditions as the core light/dark palettes. Keep the
|
|
34
|
+
* key set of light and dark identical (a drift check enforces it).
|
|
35
|
+
*/
|
|
36
|
+
export const skins = {
|
|
37
|
+
'amber-crt': {
|
|
38
|
+
label: 'Amber CRT',
|
|
39
|
+
// Phosphor amber. Dark+saturated in light theme (AA under a white label),
|
|
40
|
+
// bright with a warm bloom in dark theme (the classic CRT glow).
|
|
41
|
+
light: { '--accent': 'oklch(52% 0.11 67deg)' },
|
|
42
|
+
dark: { '--accent': 'oklch(82% 0.15 82deg)', '--dotmatrix-glow': '0.4em' },
|
|
43
|
+
},
|
|
44
|
+
'phosphor-green': {
|
|
45
|
+
label: 'Phosphor Green',
|
|
46
|
+
// P1-phosphor green. Same light=dark-ink / dark=bright-glow split.
|
|
47
|
+
light: { '--accent': 'oklch(52% 0.13 150deg)' },
|
|
48
|
+
dark: { '--accent': 'oklch(84% 0.19 150deg)', '--dotmatrix-glow': '0.4em' },
|
|
49
|
+
},
|
|
50
|
+
'e-ink': {
|
|
51
|
+
label: 'E-ink',
|
|
52
|
+
// The opposite move: drop the hue almost entirely → a near-monochrome
|
|
53
|
+
// ink/paper accent, no glow. The most restrained look in the set.
|
|
54
|
+
light: { '--accent': 'oklch(34% 0.012 250deg)' },
|
|
55
|
+
dark: { '--accent': 'oklch(84% 0.008 250deg)' },
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** Skin names, frozen + sorted. */
|
|
60
|
+
export const SKIN_NAMES = Object.freeze(Object.keys(skins).sort());
|
|
61
|
+
|
|
62
|
+
export default skins;
|
package/tokens/tokens.dtcg.json
CHANGED
|
@@ -225,28 +225,28 @@
|
|
|
225
225
|
"$type": "color",
|
|
226
226
|
"$value": null,
|
|
227
227
|
"$extensions": {
|
|
228
|
-
"com.ponchia.css": "color-mix(in
|
|
228
|
+
"com.ponchia.css": "color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))"
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
"2": {
|
|
232
232
|
"$type": "color",
|
|
233
233
|
"$value": null,
|
|
234
234
|
"$extensions": {
|
|
235
|
-
"com.ponchia.css": "color-mix(in
|
|
235
|
+
"com.ponchia.css": "color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))"
|
|
236
236
|
}
|
|
237
237
|
},
|
|
238
238
|
"3": {
|
|
239
239
|
"$type": "color",
|
|
240
240
|
"$value": null,
|
|
241
241
|
"$extensions": {
|
|
242
|
-
"com.ponchia.css": "color-mix(in
|
|
242
|
+
"com.ponchia.css": "color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))"
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
"4": {
|
|
246
246
|
"$type": "color",
|
|
247
247
|
"$value": null,
|
|
248
248
|
"$extensions": {
|
|
249
|
-
"com.ponchia.css": "color-mix(in
|
|
249
|
+
"com.ponchia.css": "color-mix(in oklch, var(--accent) 60%, var(--accent-ramp-end))"
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"5": {
|
|
@@ -508,6 +508,10 @@
|
|
|
508
508
|
"$type": "color",
|
|
509
509
|
"$value": "#d71921"
|
|
510
510
|
},
|
|
511
|
+
"ramp-end": {
|
|
512
|
+
"$type": "color",
|
|
513
|
+
"$value": "#ffffff"
|
|
514
|
+
},
|
|
511
515
|
"strong": {
|
|
512
516
|
"$type": "color",
|
|
513
517
|
"$value": null,
|
|
@@ -550,16 +554,6 @@
|
|
|
550
554
|
"$value": "rgb(128, 100, 20, 0.13)"
|
|
551
555
|
}
|
|
552
556
|
},
|
|
553
|
-
"orange": {
|
|
554
|
-
"DEFAULT": {
|
|
555
|
-
"$type": "color",
|
|
556
|
-
"$value": "#a85f32"
|
|
557
|
-
},
|
|
558
|
-
"soft": {
|
|
559
|
-
"$type": "color",
|
|
560
|
-
"$value": "rgb(168, 95, 50, 0.13)"
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
557
|
"danger": {
|
|
564
558
|
"DEFAULT": {
|
|
565
559
|
"$type": "color",
|
|
@@ -636,11 +630,11 @@
|
|
|
636
630
|
"bg": {
|
|
637
631
|
"DEFAULT": {
|
|
638
632
|
"$type": "color",
|
|
639
|
-
"$value": "#
|
|
633
|
+
"$value": "#121212"
|
|
640
634
|
},
|
|
641
635
|
"elevated": {
|
|
642
636
|
"$type": "color",
|
|
643
|
-
"$value": "#
|
|
637
|
+
"$value": "#181818"
|
|
644
638
|
},
|
|
645
639
|
"accent": {
|
|
646
640
|
"$type": "color",
|
|
@@ -653,39 +647,39 @@
|
|
|
653
647
|
"panel": {
|
|
654
648
|
"DEFAULT": {
|
|
655
649
|
"$type": "color",
|
|
656
|
-
"$value": "#
|
|
650
|
+
"$value": "#1c1c1c"
|
|
657
651
|
},
|
|
658
652
|
"strong": {
|
|
659
653
|
"$type": "color",
|
|
660
|
-
"$value": "#
|
|
654
|
+
"$value": "#222222"
|
|
661
655
|
},
|
|
662
656
|
"soft": {
|
|
663
657
|
"$type": "color",
|
|
664
|
-
"$value": "#
|
|
658
|
+
"$value": "#242424"
|
|
665
659
|
}
|
|
666
660
|
},
|
|
667
661
|
"line": {
|
|
668
662
|
"DEFAULT": {
|
|
669
663
|
"$type": "color",
|
|
670
|
-
"$value": "#
|
|
664
|
+
"$value": "#383838"
|
|
671
665
|
},
|
|
672
666
|
"strong": {
|
|
673
667
|
"$type": "color",
|
|
674
|
-
"$value": "#
|
|
668
|
+
"$value": "#555555"
|
|
675
669
|
}
|
|
676
670
|
},
|
|
677
671
|
"text": {
|
|
678
672
|
"DEFAULT": {
|
|
679
673
|
"$type": "color",
|
|
680
|
-
"$value": "#
|
|
674
|
+
"$value": "#e6e6e6"
|
|
681
675
|
},
|
|
682
676
|
"soft": {
|
|
683
677
|
"$type": "color",
|
|
684
|
-
"$value": "#
|
|
678
|
+
"$value": "#c8c8c8"
|
|
685
679
|
},
|
|
686
680
|
"dim": {
|
|
687
681
|
"$type": "color",
|
|
688
|
-
"$value": "#
|
|
682
|
+
"$value": "#a0a0a0"
|
|
689
683
|
}
|
|
690
684
|
},
|
|
691
685
|
"accent": {
|
|
@@ -693,6 +687,10 @@
|
|
|
693
687
|
"$type": "color",
|
|
694
688
|
"$value": "#ff3b41"
|
|
695
689
|
},
|
|
690
|
+
"ramp-end": {
|
|
691
|
+
"$type": "color",
|
|
692
|
+
"$value": "#000000"
|
|
693
|
+
},
|
|
696
694
|
"strong": {
|
|
697
695
|
"$type": "color",
|
|
698
696
|
"$value": null,
|
|
@@ -735,16 +733,6 @@
|
|
|
735
733
|
"$value": "rgb(216, 189, 114, 0.14)"
|
|
736
734
|
}
|
|
737
735
|
},
|
|
738
|
-
"orange": {
|
|
739
|
-
"DEFAULT": {
|
|
740
|
-
"$type": "color",
|
|
741
|
-
"$value": "#d08c5b"
|
|
742
|
-
},
|
|
743
|
-
"soft": {
|
|
744
|
-
"$type": "color",
|
|
745
|
-
"$value": "rgb(208, 140, 91, 0.15)"
|
|
746
|
-
}
|
|
747
|
-
},
|
|
748
736
|
"danger": {
|
|
749
737
|
"DEFAULT": {
|
|
750
738
|
"$type": "color",
|