@finstack-com-public/design 0.4.0 → 0.5.0
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 +47 -0
- package/README.md +2 -2
- package/THIRD_PARTY_NOTICES.md +12 -0
- package/dist/charts/index.js +6 -5
- package/dist/css/appbar.css +1 -1
- package/dist/css/appbar.md +1 -1
- package/dist/css/button.css +2 -2
- package/dist/css/button.md +1 -1
- package/dist/css/card.css +6 -2
- package/dist/css/codemirror.md +14 -0
- package/dist/css/dialog.css +2 -1
- package/dist/css/icon-button.css +1 -1
- package/dist/css/input.css +1 -1
- package/dist/css/kicker.css +2 -1
- package/dist/css/panel.css +4 -1
- package/dist/css/panel.md +2 -2
- package/dist/css/segmented.css +2 -2
- package/dist/css/sheet.css +1 -0
- package/dist/css/site.css +1 -0
- package/dist/css/tokens.css +426 -388
- package/dist/css/widget.css +4 -1
- package/dist/css-text/appbar.js +1 -1
- package/dist/css-text/button.js +1 -1
- package/dist/css-text/card.js +1 -1
- package/dist/css-text/dialog.js +1 -1
- package/dist/css-text/icon-button.js +1 -1
- package/dist/css-text/input.js +1 -1
- package/dist/css-text/kicker.js +1 -1
- package/dist/css-text/kit.js +1 -1
- package/dist/css-text/panel.js +1 -1
- package/dist/css-text/segmented.js +1 -1
- package/dist/css-text/sheet.js +1 -1
- package/dist/css-text/site.js +1 -1
- package/dist/css-text/tokens.js +1 -1
- package/dist/css-text/widget.js +1 -1
- package/dist/fonts/OFL-plus-jakarta-sans.txt +93 -0
- package/dist/fonts/faces.d.ts +1 -1
- package/dist/fonts/faces.js +2 -0
- package/dist/fonts/index.d.ts +1 -1
- package/dist/fonts/index.js +3 -1
- package/dist/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-400-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-500-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-600-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-700-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-ext-400-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-ext-500-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-ext-600-normal.ttf +0 -0
- package/dist/fonts/print/plus-jakarta-sans-latin-ext-700-normal.ttf +0 -0
- package/dist/fonts-print.css +74 -2
- package/dist/fonts.css +19 -1
- package/dist/kit.css +453 -401
- package/dist/tokens/color.d.ts +5 -0
- package/dist/tokens/color.js +69 -59
- package/dist/tokens/contrast-pairs.js +11 -6
- package/dist/tokens/index.d.ts +14 -7
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/primitives.d.ts +8 -5
- package/dist/tokens/primitives.js +8 -5
- package/dist/tokens/scale.d.ts +10 -3
- package/dist/tokens/scale.js +9 -2
- package/dist/tokens/syntax.js +5 -5
- package/dist/tokens.json +188 -171
- package/package.json +2 -1
package/dist/tokens/color.d.ts
CHANGED
|
@@ -86,6 +86,10 @@ export declare const colorRoles: {
|
|
|
86
86
|
'primary-bg-hover': Schemed;
|
|
87
87
|
'primary-ink': Schemed;
|
|
88
88
|
ring: Schemed;
|
|
89
|
+
'brand-start': Schemed;
|
|
90
|
+
'brand-end': Schemed;
|
|
91
|
+
'brand-wash-start': Schemed;
|
|
92
|
+
'brand-wash-end': Schemed;
|
|
89
93
|
'ring-halo': Schemed;
|
|
90
94
|
'bg-surface': Schemed;
|
|
91
95
|
'bg-page': Schemed;
|
|
@@ -107,6 +111,7 @@ export declare const colorRoles: {
|
|
|
107
111
|
line: Schemed;
|
|
108
112
|
'line-strong': Schemed;
|
|
109
113
|
'line-control': Schemed;
|
|
114
|
+
'line-button': Schemed;
|
|
110
115
|
};
|
|
111
116
|
export type ColorRole = keyof typeof colorRoles;
|
|
112
117
|
export declare const toneNames: readonly ["neutral", "info", "positive", "caution", "warning", "danger", "gap"];
|
package/dist/tokens/color.js
CHANGED
|
@@ -1,53 +1,62 @@
|
|
|
1
1
|
// Colour roles, light and dark (spec 01 §3). CSS name: `--fs-<role>`.
|
|
2
2
|
import { both, p, r, s } from "./values.js";
|
|
3
3
|
const surfaces = {
|
|
4
|
-
'bg-surface': s('#ffffff', '#
|
|
5
|
-
'bg-page': s('#
|
|
6
|
-
'bg-plane': s('#
|
|
7
|
-
'bg-chrome': s('#
|
|
8
|
-
'bg-sunken': s('#
|
|
9
|
-
'bg-hover': s('rgba(
|
|
10
|
-
'bg-active': s('rgba(
|
|
11
|
-
'bg-selected': s('#
|
|
12
|
-
'bg-disabled': s('#
|
|
13
|
-
'bg-highlight': s('#fff6cc', '#
|
|
14
|
-
'bg-backdrop': s('rgba(
|
|
15
|
-
ink: s('
|
|
16
|
-
'ink-2': s('#
|
|
17
|
-
'ink-muted': s('#
|
|
18
|
-
'ink-disabled': s('#
|
|
4
|
+
'bg-surface': s('#ffffff', '#0e1d45'),
|
|
5
|
+
'bg-page': s('#f3f7fd', p('navy-950')),
|
|
6
|
+
'bg-plane': s('#e9f0fb', '#050d26'),
|
|
7
|
+
'bg-chrome': s('#f8fbff', '#13244f'),
|
|
8
|
+
'bg-sunken': s('#eef3fa', '#152a5a'),
|
|
9
|
+
'bg-hover': s('rgba(11,26,63,0.05)', 'rgba(232,238,252,0.06)'),
|
|
10
|
+
'bg-active': s('rgba(11,26,63,0.09)', 'rgba(232,238,252,0.10)'),
|
|
11
|
+
'bg-selected': s('#e8f0fe', '#172d64'),
|
|
12
|
+
'bg-disabled': s('#eef3fa', '#152a5a'),
|
|
13
|
+
'bg-highlight': s('#fff6cc', '#3b3416'),
|
|
14
|
+
'bg-backdrop': s('rgba(11,26,63,0.40)', 'rgba(2,6,20,0.65)'),
|
|
15
|
+
ink: s(p('navy-900'), '#e8eefc'),
|
|
16
|
+
'ink-2': s('#3b4a6b', '#b9c6e2'),
|
|
17
|
+
'ink-muted': s('#5b6785', '#93a1c2'),
|
|
18
|
+
'ink-disabled': s('#828ba1', '#6c7a9e'),
|
|
19
19
|
'ink-on-accent': both('#ffffff'),
|
|
20
|
-
'ink-link': s(p('
|
|
21
|
-
line: s('#
|
|
22
|
-
'line-strong': s('#
|
|
23
|
-
'line-control': s('#
|
|
20
|
+
'ink-link': s(p('blue-600'), p('blue-300')),
|
|
21
|
+
line: s('#dfe6f1', '#22356a'),
|
|
22
|
+
'line-strong': s('#c9d4e6', '#30467f'),
|
|
23
|
+
'line-control': s('#7a88a6', '#6f81ad'),
|
|
24
|
+
// Softer, for edges that a label already identifies: secondary buttons and the segmented
|
|
25
|
+
// control (D30). WCAG 1.4.11 doesn't ask a labelled button's edge for 3:1.
|
|
26
|
+
'line-button': s('#a3afc6', '#475a8b'),
|
|
24
27
|
};
|
|
25
28
|
const accent = {
|
|
26
|
-
accent: s(p('
|
|
27
|
-
'accent-strong': s(p('
|
|
28
|
-
'accent-wash': s('#
|
|
29
|
-
'primary-bg': s(p('
|
|
30
|
-
'primary-bg-hover': s(p('
|
|
29
|
+
accent: s(p('blue-600'), p('blue-300')),
|
|
30
|
+
'accent-strong': s(p('blue-700'), '#c4d9ff'),
|
|
31
|
+
'accent-wash': s('#e8f0fe', '#172d64'),
|
|
32
|
+
'primary-bg': s(p('blue-600'), '#2d5be8'),
|
|
33
|
+
'primary-bg-hover': s(p('blue-700'), '#1f4fe0'),
|
|
31
34
|
'primary-ink': both('#ffffff'),
|
|
32
|
-
ring:
|
|
33
|
-
|
|
35
|
+
// Darker than the accent: ring/halo stays ≥9:1 so the pair reaches 3:1 on any ground (spec 06 §3).
|
|
36
|
+
ring: s(p('blue-800'), p('blue-300')),
|
|
37
|
+
// The brand gradient's stops (spec 01 §3.1): decoration only, read by `--fs-gradient-brand*`.
|
|
38
|
+
'brand-start': s(p('blue-600'), p('blue-500')),
|
|
39
|
+
'brand-end': both(p('cyan-400')),
|
|
40
|
+
'brand-wash-start': s('#e8f0fe', '#13244f'),
|
|
41
|
+
'brand-wash-end': s('#e3f8fb', '#0f3358'),
|
|
42
|
+
'ring-halo': s('#ffffff', p('navy-950')),
|
|
34
43
|
};
|
|
35
44
|
// Seven tones, each ink / wash / edge / fill (spec 01 §3.3).
|
|
36
45
|
const tones = {
|
|
37
|
-
'neutral-ink': s('#
|
|
38
|
-
'neutral-wash': s('#
|
|
39
|
-
'neutral-edge': s('#
|
|
40
|
-
'neutral-fill': s('#
|
|
41
|
-
'info-ink': s(p('
|
|
42
|
-
'info-wash': s('#
|
|
43
|
-
'info-edge': s(p('
|
|
44
|
-
'info-fill': s(p('
|
|
46
|
+
'neutral-ink': s('#3b4a6b', '#b9c6e2'),
|
|
47
|
+
'neutral-wash': s('#eef3fa', '#152a5a'),
|
|
48
|
+
'neutral-edge': s('#7a88a6', '#6f81ad'),
|
|
49
|
+
'neutral-fill': s('#3b4a6b', '#b9c6e2'),
|
|
50
|
+
'info-ink': s(p('blue-600'), p('blue-300')),
|
|
51
|
+
'info-wash': s('#e8f0fe', '#172d64'),
|
|
52
|
+
'info-edge': s(p('blue-600'), p('blue-300')),
|
|
53
|
+
'info-fill': s(p('blue-600'), p('blue-300')),
|
|
45
54
|
'positive-ink': s('#2e7d32', '#7fc98a'),
|
|
46
|
-
'positive-wash': s('#e8f5e9', '#
|
|
55
|
+
'positive-wash': s('#e8f5e9', '#13382b'),
|
|
47
56
|
'positive-edge': s('#2e7d32', '#7fc98a'),
|
|
48
57
|
'positive-fill': s('#2e7d32', '#5fae6c'),
|
|
49
58
|
'caution-ink': s('#7f6a00', '#e0c34a'),
|
|
50
|
-
'caution-wash': s('#fbf6dd', '#
|
|
59
|
+
'caution-wash': s('#fbf6dd', '#352f10'),
|
|
51
60
|
'caution-edge': s('#7f6a00', '#e0c34a'),
|
|
52
61
|
'caution-fill': s('#7f6a00', '#e0c34a'),
|
|
53
62
|
// Orange is 3.05:1 on white: icon and edge on the plain surface only, never text or a wash.
|
|
@@ -57,14 +66,14 @@ const tones = {
|
|
|
57
66
|
'warning-fill': both(p('orange-500')),
|
|
58
67
|
'warning-icon': both(p('orange-500')),
|
|
59
68
|
'danger-ink': s('#c62828', '#ff8a80'),
|
|
60
|
-
'danger-wash': s('#fdecea', '#
|
|
69
|
+
'danger-wash': s('#fdecea', '#3d1a26'),
|
|
61
70
|
'danger-edge': s('#c62828', '#ff8a80'),
|
|
62
71
|
'danger-fill': s('#c62828', '#e5534b'),
|
|
63
|
-
'gap-ink': s('#
|
|
64
|
-
'gap-wash': s('#
|
|
65
|
-
'gap-edge': s('#
|
|
66
|
-
'gap-fill': s('#
|
|
67
|
-
'gap-hatch-tint': s('rgba(
|
|
72
|
+
'gap-ink': s('#646a72', '#9399a4'),
|
|
73
|
+
'gap-wash': s('#edeff2', '#232a38'),
|
|
74
|
+
'gap-edge': s('#b1b6bd', '#4b5363'),
|
|
75
|
+
'gap-fill': s('#7a8089', '#80868f'),
|
|
76
|
+
'gap-hatch-tint': s('rgba(100,106,114,0.12)', 'rgba(147,153,164,0.14)'),
|
|
68
77
|
};
|
|
69
78
|
const figures = {
|
|
70
79
|
'figure-good': both(r('positive-ink')),
|
|
@@ -84,15 +93,15 @@ const marks = {
|
|
|
84
93
|
'mark-none-fill': both(r('gap-fill')),
|
|
85
94
|
};
|
|
86
95
|
const types = {
|
|
87
|
-
'type-organise': s('#
|
|
96
|
+
'type-organise': s('#5b6785', '#93a1c2'),
|
|
88
97
|
'type-view': s('#388e3c', '#7fc98a'),
|
|
89
98
|
'type-input': s('#0b7a75', '#5cc2bb'),
|
|
90
|
-
'type-model': s('#
|
|
99
|
+
'type-model': s('#7445b8', '#b79bea'),
|
|
91
100
|
'type-access': s('#546e7a', '#9fb3bd'),
|
|
92
101
|
};
|
|
93
102
|
const values = {
|
|
94
|
-
'computed-bg': s('#
|
|
95
|
-
'computed-line': s('#
|
|
103
|
+
'computed-bg': s('#eef3fa', '#152a5a'),
|
|
104
|
+
'computed-line': s('#7a88a6', '#6f81ad'),
|
|
96
105
|
};
|
|
97
106
|
// Editor chrome beside the syntax table (spec 01 §3.11).
|
|
98
107
|
const editor = {
|
|
@@ -112,16 +121,17 @@ const editor = {
|
|
|
112
121
|
'editor-tooltip-line': both(r('line-strong')),
|
|
113
122
|
};
|
|
114
123
|
// The chart theme's CSS form (spec 04 §2, §5). The series were chosen for colour-blind
|
|
115
|
-
// separation; T5's tests hold them to the floors of spec 04 §2.1.
|
|
124
|
+
// separation; T5's tests hold them to the floors of spec 04 §2.1. Blue then cyan first (D29, T48),
|
|
125
|
+
// then the same hue order in both schemes: violet, amber, raspberry, navy, sage, brick.
|
|
116
126
|
const chart = {
|
|
117
|
-
'chart-1': s(p('
|
|
118
|
-
'chart-2': s('#
|
|
119
|
-
'chart-3': s('#
|
|
120
|
-
'chart-4': s('#
|
|
121
|
-
'chart-5': s('#
|
|
122
|
-
'chart-6': s('#
|
|
123
|
-
'chart-7': s('#
|
|
124
|
-
'chart-8': s('#
|
|
127
|
+
'chart-1': s(p('blue-600'), p('blue-500')),
|
|
128
|
+
'chart-2': s('#0891b2', p('cyan-400')),
|
|
129
|
+
'chart-3': s('#6646a8', '#b49df8'),
|
|
130
|
+
'chart-4': s('#d1811f', '#ffba64'),
|
|
131
|
+
'chart-5': s('#d53f6f', '#d569a2'),
|
|
132
|
+
'chart-6': s('#0e3a6d', '#6c6bb8'),
|
|
133
|
+
'chart-7': s('#648c85', '#90cead'),
|
|
134
|
+
'chart-8': s('#b14e46', '#f06756'),
|
|
125
135
|
'chart-other': both(r('line-control')),
|
|
126
136
|
'chart-comparison': both(r('ink-2')),
|
|
127
137
|
'chart-axis': both(r('line-strong')),
|
|
@@ -143,9 +153,9 @@ export const colorRoles = {
|
|
|
143
153
|
...chart,
|
|
144
154
|
};
|
|
145
155
|
export const toneNames = ['neutral', 'info', 'positive', 'caution', 'warning', 'danger', 'gap'];
|
|
146
|
-
// Shadows: dark doubles
|
|
156
|
+
// Shadows: navy-tinted; dark doubles each layer's alpha on a near-black navy base (spec 01 §7). CSS name: `--fs-shadow-<n>`.
|
|
147
157
|
export const shadows = {
|
|
148
|
-
'1': s('0 1px 2px rgba(
|
|
149
|
-
'2': s('0 4px
|
|
150
|
-
'3': s('0
|
|
158
|
+
'1': s('0 1px 2px rgba(11,26,63,0.05), 0 8px 28px rgba(31,79,224,0.08)', '0 1px 2px rgba(2,6,20,0.10), 0 8px 28px rgba(2,6,20,0.16)'),
|
|
159
|
+
'2': s('0 4px 20px rgba(11,26,63,0.12)', '0 4px 20px rgba(2,6,20,0.24)'),
|
|
160
|
+
'3': s('0 24px 64px rgba(11,26,63,0.22)', '0 24px 64px rgba(2,6,20,0.44)'),
|
|
151
161
|
};
|
|
@@ -30,6 +30,11 @@ export function contrastPairs() {
|
|
|
30
30
|
role('text', fg, bg);
|
|
31
31
|
role('text', fg, 'bg-hover', 'bg-surface');
|
|
32
32
|
}
|
|
33
|
+
// Text on the soft brand gradient's two stops (D29); the bright gradient carries no text.
|
|
34
|
+
role('text', 'ink', 'brand-wash-start');
|
|
35
|
+
role('text', 'ink', 'brand-wash-end');
|
|
36
|
+
role('text', 'ink-2', 'brand-wash-start');
|
|
37
|
+
role('text', 'ink-2', 'brand-wash-end');
|
|
33
38
|
role('text', 'ink', 'bg-highlight');
|
|
34
39
|
role('text', 'ink', 'computed-bg');
|
|
35
40
|
role('text', 'primary-ink', 'primary-bg');
|
|
@@ -63,13 +68,13 @@ export function contrastPairs() {
|
|
|
63
68
|
// CodeMirror's lint tooltip on the editor tokens (codemirror.md): its text and source line.
|
|
64
69
|
role('text', 'ink', 'editor-tooltip-bg');
|
|
65
70
|
role('text', 'ink-muted', 'editor-tooltip-bg');
|
|
66
|
-
// The app bar is a dark island on
|
|
71
|
+
// The app bar is a dark island on navy-900 (spec 01 §3.9), so it takes the dark inks.
|
|
67
72
|
if (scheme === 'dark') {
|
|
68
|
-
const appbar = primitives['
|
|
69
|
-
add('text', 'ink', c.ink, 'p-
|
|
70
|
-
add('text', 'ink-2', c['ink-2'], 'p-
|
|
71
|
-
add('text', 'ink-muted', c['ink-muted'], 'p-
|
|
72
|
-
add('non-text', 'ring', c.ring, 'p-
|
|
73
|
+
const appbar = primitives['navy-900'];
|
|
74
|
+
add('text', 'ink', c.ink, 'p-navy-900', appbar);
|
|
75
|
+
add('text', 'ink-2', c['ink-2'], 'p-navy-900', appbar);
|
|
76
|
+
add('text', 'ink-muted', c['ink-muted'], 'p-navy-900', appbar);
|
|
77
|
+
add('non-text', 'ring', c.ring, 'p-navy-900', appbar);
|
|
73
78
|
}
|
|
74
79
|
// BI App's grid (spec 01 §3.10).
|
|
75
80
|
for (const bg of ['header-bg', 'label-bg', 'subtotal-bg', 'input-bg', 'editing-bg'])
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ColorRole, type ShadowKey } from './color.ts';
|
|
2
2
|
import { type Density, type DensityToken } from './density.ts';
|
|
3
3
|
import { type GridRole } from './grid.ts';
|
|
4
|
-
import { chartScale, fonts, lines, motion, patterns, radii, sizes, sizesEm, space, textSteps, tracking, weights, zLayers } from './scale.ts';
|
|
4
|
+
import { chartScale, fonts, gradients, lines, motion, patterns, radii, sizes, sizesEm, space, textSteps, tracking, weights, zLayers } from './scale.ts';
|
|
5
5
|
import { type SyntaxTag } from './syntax.ts';
|
|
6
6
|
import { type Scheme } from './values.ts';
|
|
7
7
|
export type { ColorRole, Density, DensityToken, GridRole, Scheme, ShadowKey, SyntaxTag };
|
|
8
8
|
export type TextStep = keyof typeof textSteps;
|
|
9
9
|
export declare const tokens: {
|
|
10
10
|
readonly color: {
|
|
11
|
-
light: Record<"bg-surface" | "bg-page" | "bg-plane" | "bg-chrome" | "bg-sunken" | "bg-hover" | "bg-active" | "bg-selected" | "bg-disabled" | "bg-highlight" | "bg-backdrop" | "ink" | "ink-2" | "ink-muted" | "ink-disabled" | "ink-on-accent" | "ink-link" | "line" | "line-strong" | "line-control" | "accent" | "accent-strong" | "accent-wash" | "primary-bg" | "primary-bg-hover" | "primary-ink" | "ring" | "ring-halo" | "neutral-ink" | "neutral-wash" | "neutral-edge" | "neutral-fill" | "info-ink" | "info-wash" | "info-edge" | "info-fill" | "positive-ink" | "positive-wash" | "positive-edge" | "positive-fill" | "caution-ink" | "caution-wash" | "caution-edge" | "caution-fill" | "warning-ink" | "warning-wash" | "warning-edge" | "warning-fill" | "warning-icon" | "danger-ink" | "danger-wash" | "danger-edge" | "danger-fill" | "gap-ink" | "gap-wash" | "gap-edge" | "gap-fill" | "gap-hatch-tint" | "figure-good" | "figure-bad" | "figure-plain" | "mark-exact-ink" | "mark-exact-wash" | "mark-exact-fill" | "mark-approx-ink" | "mark-approx-wash" | "mark-approx-fill" | "mark-none-ink" | "mark-none-wash" | "mark-none-fill" | "type-organise" | "type-view" | "type-input" | "type-model" | "type-access" | "computed-bg" | "computed-line" | "editor-gutter-bg" | "editor-gutter-ink" | "editor-gutter-line" | "editor-selection" | "editor-selection-blur" | "editor-caret" | "editor-active-line" | "editor-match" | "editor-mismatch" | "editor-lint-error" | "editor-lint-warning" | "editor-lint-refusal" | "editor-tooltip-bg" | "editor-tooltip-line" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "chart-6" | "chart-7" | "chart-8" | "chart-other" | "chart-comparison" | "chart-axis" | "chart-label" | "chart-grid" | "chart-zero" | "chart-good" | "chart-bad", string>;
|
|
12
|
-
dark: Record<"bg-surface" | "bg-page" | "bg-plane" | "bg-chrome" | "bg-sunken" | "bg-hover" | "bg-active" | "bg-selected" | "bg-disabled" | "bg-highlight" | "bg-backdrop" | "ink" | "ink-2" | "ink-muted" | "ink-disabled" | "ink-on-accent" | "ink-link" | "line" | "line-strong" | "line-control" | "accent" | "accent-strong" | "accent-wash" | "primary-bg" | "primary-bg-hover" | "primary-ink" | "ring" | "ring-halo" | "neutral-ink" | "neutral-wash" | "neutral-edge" | "neutral-fill" | "info-ink" | "info-wash" | "info-edge" | "info-fill" | "positive-ink" | "positive-wash" | "positive-edge" | "positive-fill" | "caution-ink" | "caution-wash" | "caution-edge" | "caution-fill" | "warning-ink" | "warning-wash" | "warning-edge" | "warning-fill" | "warning-icon" | "danger-ink" | "danger-wash" | "danger-edge" | "danger-fill" | "gap-ink" | "gap-wash" | "gap-edge" | "gap-fill" | "gap-hatch-tint" | "figure-good" | "figure-bad" | "figure-plain" | "mark-exact-ink" | "mark-exact-wash" | "mark-exact-fill" | "mark-approx-ink" | "mark-approx-wash" | "mark-approx-fill" | "mark-none-ink" | "mark-none-wash" | "mark-none-fill" | "type-organise" | "type-view" | "type-input" | "type-model" | "type-access" | "computed-bg" | "computed-line" | "editor-gutter-bg" | "editor-gutter-ink" | "editor-gutter-line" | "editor-selection" | "editor-selection-blur" | "editor-caret" | "editor-active-line" | "editor-match" | "editor-mismatch" | "editor-lint-error" | "editor-lint-warning" | "editor-lint-refusal" | "editor-tooltip-bg" | "editor-tooltip-line" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "chart-6" | "chart-7" | "chart-8" | "chart-other" | "chart-comparison" | "chart-axis" | "chart-label" | "chart-grid" | "chart-zero" | "chart-good" | "chart-bad", string>;
|
|
11
|
+
light: Record<"bg-surface" | "bg-page" | "bg-plane" | "bg-chrome" | "bg-sunken" | "bg-hover" | "bg-active" | "bg-selected" | "bg-disabled" | "bg-highlight" | "bg-backdrop" | "ink" | "ink-2" | "ink-muted" | "ink-disabled" | "ink-on-accent" | "ink-link" | "line" | "line-strong" | "line-control" | "line-button" | "accent" | "accent-strong" | "accent-wash" | "primary-bg" | "primary-bg-hover" | "primary-ink" | "ring" | "brand-start" | "brand-end" | "brand-wash-start" | "brand-wash-end" | "ring-halo" | "neutral-ink" | "neutral-wash" | "neutral-edge" | "neutral-fill" | "info-ink" | "info-wash" | "info-edge" | "info-fill" | "positive-ink" | "positive-wash" | "positive-edge" | "positive-fill" | "caution-ink" | "caution-wash" | "caution-edge" | "caution-fill" | "warning-ink" | "warning-wash" | "warning-edge" | "warning-fill" | "warning-icon" | "danger-ink" | "danger-wash" | "danger-edge" | "danger-fill" | "gap-ink" | "gap-wash" | "gap-edge" | "gap-fill" | "gap-hatch-tint" | "figure-good" | "figure-bad" | "figure-plain" | "mark-exact-ink" | "mark-exact-wash" | "mark-exact-fill" | "mark-approx-ink" | "mark-approx-wash" | "mark-approx-fill" | "mark-none-ink" | "mark-none-wash" | "mark-none-fill" | "type-organise" | "type-view" | "type-input" | "type-model" | "type-access" | "computed-bg" | "computed-line" | "editor-gutter-bg" | "editor-gutter-ink" | "editor-gutter-line" | "editor-selection" | "editor-selection-blur" | "editor-caret" | "editor-active-line" | "editor-match" | "editor-mismatch" | "editor-lint-error" | "editor-lint-warning" | "editor-lint-refusal" | "editor-tooltip-bg" | "editor-tooltip-line" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "chart-6" | "chart-7" | "chart-8" | "chart-other" | "chart-comparison" | "chart-axis" | "chart-label" | "chart-grid" | "chart-zero" | "chart-good" | "chart-bad", string>;
|
|
12
|
+
dark: Record<"bg-surface" | "bg-page" | "bg-plane" | "bg-chrome" | "bg-sunken" | "bg-hover" | "bg-active" | "bg-selected" | "bg-disabled" | "bg-highlight" | "bg-backdrop" | "ink" | "ink-2" | "ink-muted" | "ink-disabled" | "ink-on-accent" | "ink-link" | "line" | "line-strong" | "line-control" | "line-button" | "accent" | "accent-strong" | "accent-wash" | "primary-bg" | "primary-bg-hover" | "primary-ink" | "ring" | "brand-start" | "brand-end" | "brand-wash-start" | "brand-wash-end" | "ring-halo" | "neutral-ink" | "neutral-wash" | "neutral-edge" | "neutral-fill" | "info-ink" | "info-wash" | "info-edge" | "info-fill" | "positive-ink" | "positive-wash" | "positive-edge" | "positive-fill" | "caution-ink" | "caution-wash" | "caution-edge" | "caution-fill" | "warning-ink" | "warning-wash" | "warning-edge" | "warning-fill" | "warning-icon" | "danger-ink" | "danger-wash" | "danger-edge" | "danger-fill" | "gap-ink" | "gap-wash" | "gap-edge" | "gap-fill" | "gap-hatch-tint" | "figure-good" | "figure-bad" | "figure-plain" | "mark-exact-ink" | "mark-exact-wash" | "mark-exact-fill" | "mark-approx-ink" | "mark-approx-wash" | "mark-approx-fill" | "mark-none-ink" | "mark-none-wash" | "mark-none-fill" | "type-organise" | "type-view" | "type-input" | "type-model" | "type-access" | "computed-bg" | "computed-line" | "editor-gutter-bg" | "editor-gutter-ink" | "editor-gutter-line" | "editor-selection" | "editor-selection-blur" | "editor-caret" | "editor-active-line" | "editor-match" | "editor-mismatch" | "editor-lint-error" | "editor-lint-warning" | "editor-lint-refusal" | "editor-tooltip-bg" | "editor-tooltip-line" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "chart-6" | "chart-7" | "chart-8" | "chart-other" | "chart-comparison" | "chart-axis" | "chart-label" | "chart-grid" | "chart-zero" | "chart-good" | "chart-bad", string>;
|
|
13
13
|
};
|
|
14
14
|
readonly shadow: {
|
|
15
15
|
light: Record<"1" | "2" | "3", string>;
|
|
@@ -26,6 +26,7 @@ export declare const tokens: {
|
|
|
26
26
|
readonly density: Record<Density, Record<"gap" | "text-body-size" | "text-body-line" | "control-h" | "row-h" | "pad-x" | "icon-size" | "cell-pad-x", number>>;
|
|
27
27
|
readonly font: {
|
|
28
28
|
readonly sans: "\"Inter\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
29
|
+
readonly display: "\"Plus Jakarta Sans\", \"Inter\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
29
30
|
readonly figures: "\"Inter Tabular\", \"Inter\", system-ui, sans-serif";
|
|
30
31
|
readonly mono: "ui-monospace, \"SF Mono\", Menlo, Consolas, monospace";
|
|
31
32
|
};
|
|
@@ -89,6 +90,7 @@ export declare const tokens: {
|
|
|
89
90
|
readonly tight: "-0.01em";
|
|
90
91
|
readonly tighter: "-0.02em";
|
|
91
92
|
readonly caps: "0.06em";
|
|
93
|
+
readonly 'caps-wide': "0.18em";
|
|
92
94
|
};
|
|
93
95
|
readonly space: {
|
|
94
96
|
readonly '0': 0;
|
|
@@ -105,9 +107,10 @@ export declare const tokens: {
|
|
|
105
107
|
readonly '12': 48;
|
|
106
108
|
};
|
|
107
109
|
readonly radius: {
|
|
108
|
-
readonly sm:
|
|
109
|
-
readonly md:
|
|
110
|
-
readonly lg:
|
|
110
|
+
readonly sm: 6;
|
|
111
|
+
readonly md: 10;
|
|
112
|
+
readonly lg: 16;
|
|
113
|
+
readonly xl: 20;
|
|
111
114
|
readonly pill: 999;
|
|
112
115
|
};
|
|
113
116
|
readonly size: {
|
|
@@ -164,13 +167,17 @@ export declare const tokens: {
|
|
|
164
167
|
readonly 'gap-hatch': "repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 6px, transparent 6px 14px)";
|
|
165
168
|
readonly 'gap-hatch-sm': "repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 5px, transparent 5px 11px)";
|
|
166
169
|
};
|
|
170
|
+
readonly gradient: {
|
|
171
|
+
readonly 'gradient-brand': "linear-gradient(135deg, var(--fs-brand-start), var(--fs-brand-end))";
|
|
172
|
+
readonly 'gradient-brand-soft': "linear-gradient(135deg, var(--fs-brand-wash-start), var(--fs-brand-wash-end))";
|
|
173
|
+
};
|
|
167
174
|
readonly chart: {
|
|
168
175
|
readonly 'chart-area-alpha': 0.18;
|
|
169
176
|
};
|
|
170
177
|
};
|
|
171
178
|
export type Tokens = typeof tokens;
|
|
172
179
|
/** Every custom property the kit declares, without its `--fs-` prefix. */
|
|
173
|
-
export type TokenName = ColorRole | DensityToken | `shadow-${ShadowKey}` | `grid-${GridRole}` | `syntax-${SyntaxTag}` | `font-${keyof typeof fonts}` | `text-${TextStep}-size` | `text-${TextStep}-line` | `weight-${keyof typeof weights}` | `tracking-${keyof typeof tracking}` | `space-${keyof typeof space}` | `radius-${keyof typeof radii}` | `size-${keyof typeof sizes}` | `size-${keyof typeof sizesEm}` | keyof typeof lines | 'icon-stroke' | keyof typeof motion | `z-${keyof typeof zLayers}` | keyof typeof patterns | keyof typeof chartScale;
|
|
180
|
+
export type TokenName = ColorRole | DensityToken | `shadow-${ShadowKey}` | `grid-${GridRole}` | `syntax-${SyntaxTag}` | `font-${keyof typeof fonts}` | `text-${TextStep}-size` | `text-${TextStep}-line` | `weight-${keyof typeof weights}` | `tracking-${keyof typeof tracking}` | `space-${keyof typeof space}` | `radius-${keyof typeof radii}` | `size-${keyof typeof sizes}` | `size-${keyof typeof sizesEm}` | keyof typeof lines | 'icon-stroke' | keyof typeof motion | `z-${keyof typeof zLayers}` | keyof typeof patterns | keyof typeof gradients | keyof typeof chartScale;
|
|
174
181
|
/** `cssVar('accent')` → `'var(--fs-accent)'`. */
|
|
175
182
|
export declare function cssVar(name: TokenName): string;
|
|
176
183
|
/**
|
package/dist/tokens/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { colorRoles, shadows } from "./color.js";
|
|
|
3
3
|
import { densities } from "./density.js";
|
|
4
4
|
import { gridRoles } from "./grid.js";
|
|
5
5
|
import { primitives } from "./primitives.js";
|
|
6
|
-
import { chartScale, fonts, iconStroke, lines, motion, motionReduced, patterns, radii, sizes, sizesEm, space, textSteps, tracking, weights, zLayers, } from "./scale.js";
|
|
6
|
+
import { chartScale, fonts, gradients, iconStroke, lines, motion, motionReduced, patterns, radii, sizes, sizesEm, space, textSteps, tracking, weights, zLayers, } from "./scale.js";
|
|
7
7
|
import { syntaxTags } from "./syntax.js";
|
|
8
8
|
import { isPrimitiveRef, isRoleRef } from "./values.js";
|
|
9
9
|
function resolver(table, scheme) {
|
|
@@ -52,6 +52,7 @@ export const tokens = {
|
|
|
52
52
|
motionReduced,
|
|
53
53
|
z: zLayers,
|
|
54
54
|
pattern: patterns,
|
|
55
|
+
gradient: gradients,
|
|
55
56
|
chart: chartScale,
|
|
56
57
|
};
|
|
57
58
|
/** `cssVar('accent')` → `'var(--fs-accent)'`. */
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export declare const primitives: {
|
|
2
|
-
readonly '
|
|
3
|
-
readonly '
|
|
4
|
-
readonly '
|
|
5
|
-
readonly '
|
|
6
|
-
readonly '
|
|
2
|
+
readonly 'blue-800': "#1a37a6";
|
|
3
|
+
readonly 'blue-700': "#1a3fb8";
|
|
4
|
+
readonly 'blue-600': "#1f4fe0";
|
|
5
|
+
readonly 'blue-500': "#2b7cf6";
|
|
6
|
+
readonly 'blue-300': "#8db8ff";
|
|
7
|
+
readonly 'cyan-400': "#14d4e0";
|
|
8
|
+
readonly 'navy-900': "#0b1a3f";
|
|
9
|
+
readonly 'navy-950': "#071233";
|
|
7
10
|
readonly 'orange-500': "#f26b1d";
|
|
8
11
|
readonly 'orange-600': "#d85a10";
|
|
9
12
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// Primitives (spec 01 §2). Only the role tier reads them; consumers never set or read them.
|
|
2
2
|
export const primitives = {
|
|
3
|
-
'
|
|
4
|
-
'
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
3
|
+
'blue-800': '#1a37a6',
|
|
4
|
+
'blue-700': '#1a3fb8',
|
|
5
|
+
'blue-600': '#1f4fe0',
|
|
6
|
+
'blue-500': '#2b7cf6',
|
|
7
|
+
'blue-300': '#8db8ff',
|
|
8
|
+
'cyan-400': '#14d4e0',
|
|
9
|
+
'navy-900': '#0b1a3f',
|
|
10
|
+
'navy-950': '#071233',
|
|
8
11
|
'orange-500': '#f26b1d',
|
|
9
12
|
'orange-600': '#d85a10',
|
|
10
13
|
};
|
package/dist/tokens/scale.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const fonts: {
|
|
2
2
|
readonly sans: "\"Inter\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
3
|
+
readonly display: "\"Plus Jakarta Sans\", \"Inter\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
3
4
|
readonly figures: "\"Inter Tabular\", \"Inter\", system-ui, sans-serif";
|
|
4
5
|
readonly mono: "ui-monospace, \"SF Mono\", Menlo, Consolas, monospace";
|
|
5
6
|
};
|
|
@@ -63,6 +64,7 @@ export declare const tracking: {
|
|
|
63
64
|
readonly tight: "-0.01em";
|
|
64
65
|
readonly tighter: "-0.02em";
|
|
65
66
|
readonly caps: "0.06em";
|
|
67
|
+
readonly 'caps-wide': "0.18em";
|
|
66
68
|
};
|
|
67
69
|
export declare const space: {
|
|
68
70
|
readonly '0': 0;
|
|
@@ -79,9 +81,10 @@ export declare const space: {
|
|
|
79
81
|
readonly '12': 48;
|
|
80
82
|
};
|
|
81
83
|
export declare const radii: {
|
|
82
|
-
readonly sm:
|
|
83
|
-
readonly md:
|
|
84
|
-
readonly lg:
|
|
84
|
+
readonly sm: 6;
|
|
85
|
+
readonly md: 10;
|
|
86
|
+
readonly lg: 16;
|
|
87
|
+
readonly xl: 20;
|
|
85
88
|
readonly pill: 999;
|
|
86
89
|
};
|
|
87
90
|
export declare const sizes: {
|
|
@@ -139,3 +142,7 @@ export declare const patterns: {
|
|
|
139
142
|
readonly 'gap-hatch': "repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 6px, transparent 6px 14px)";
|
|
140
143
|
readonly 'gap-hatch-sm': "repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 5px, transparent 5px 11px)";
|
|
141
144
|
};
|
|
145
|
+
export declare const gradients: {
|
|
146
|
+
readonly 'gradient-brand': "linear-gradient(135deg, var(--fs-brand-start), var(--fs-brand-end))";
|
|
147
|
+
readonly 'gradient-brand-soft': "linear-gradient(135deg, var(--fs-brand-wash-start), var(--fs-brand-wash-end))";
|
|
148
|
+
};
|
package/dist/tokens/scale.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Numbers are px.
|
|
3
3
|
export const fonts = {
|
|
4
4
|
sans: '"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
5
|
+
display: '"Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
5
6
|
figures: '"Inter Tabular", "Inter", system-ui, sans-serif',
|
|
6
7
|
mono: 'ui-monospace, "SF Mono", Menlo, Consolas, monospace',
|
|
7
8
|
};
|
|
@@ -21,7 +22,7 @@ export const textSteps = {
|
|
|
21
22
|
'fig-xl': { size: 40, line: 44 },
|
|
22
23
|
};
|
|
23
24
|
export const weights = { regular: 400, medium: 500, semibold: 600, bold: 700 };
|
|
24
|
-
export const tracking = { tight: '-0.01em', tighter: '-0.02em', caps: '0.06em' };
|
|
25
|
+
export const tracking = { tight: '-0.01em', tighter: '-0.02em', caps: '0.06em', 'caps-wide': '0.18em' };
|
|
25
26
|
export const space = {
|
|
26
27
|
'0': 0,
|
|
27
28
|
px: 1,
|
|
@@ -36,7 +37,7 @@ export const space = {
|
|
|
36
37
|
'10': 40,
|
|
37
38
|
'12': 48,
|
|
38
39
|
};
|
|
39
|
-
export const radii = { sm:
|
|
40
|
+
export const radii = { sm: 6, md: 10, lg: 16, xl: 20, pill: 999 };
|
|
40
41
|
export const sizes = {
|
|
41
42
|
appbar: 48,
|
|
42
43
|
tabbar: 28,
|
|
@@ -90,3 +91,9 @@ export const patterns = {
|
|
|
90
91
|
'gap-hatch': 'repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 6px, transparent 6px 14px)',
|
|
91
92
|
'gap-hatch-sm': 'repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 5px, transparent 5px 11px)',
|
|
92
93
|
};
|
|
94
|
+
// The brand gradient (spec 01 §3.11): deep blue to cyan, and a pale wash of it. Decoration only; the
|
|
95
|
+
// stops are colour roles, so the dark scheme and islands recolour it.
|
|
96
|
+
export const gradients = {
|
|
97
|
+
'gradient-brand': 'linear-gradient(135deg, var(--fs-brand-start), var(--fs-brand-end))',
|
|
98
|
+
'gradient-brand-soft': 'linear-gradient(135deg, var(--fs-brand-wash-start), var(--fs-brand-wash-end))',
|
|
99
|
+
};
|
package/dist/tokens/syntax.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// One syntax table keyed by Lezer highlight-tag names (D17; spec 01 §3.11).
|
|
2
2
|
// CSS name: `--fs-syntax-<tag>`, with the tag name verbatim (case-sensitive).
|
|
3
|
-
import {
|
|
4
|
-
const keyword = s(
|
|
3
|
+
import { s } from "./values.js";
|
|
4
|
+
const keyword = s('#790373', '#e3a3de');
|
|
5
5
|
const fn = s('#1f5fa8', '#8ab8f0');
|
|
6
6
|
const str = s('#2e6b2f', '#8fd197');
|
|
7
7
|
const num = s('#a03a0e', '#f5a57a');
|
|
8
|
-
const quiet = s('#
|
|
8
|
+
const quiet = s('#5b6785', '#93a1c2');
|
|
9
9
|
export const syntaxTags = {
|
|
10
10
|
keyword,
|
|
11
|
-
operator: s('#
|
|
11
|
+
operator: s('#3b4a6b', '#b9c6e2'),
|
|
12
12
|
function: fn,
|
|
13
13
|
variableName: s('#4c51bf', '#a6a9ec'),
|
|
14
14
|
propertyName: s('#0b6a66', '#6ccac3'),
|
|
@@ -24,7 +24,7 @@ export const syntaxTags = {
|
|
|
24
24
|
tagName: keyword,
|
|
25
25
|
attributeName: fn,
|
|
26
26
|
attributeValue: str,
|
|
27
|
-
content: s('#
|
|
27
|
+
content: s('#0b1a3f', '#e8eefc'),
|
|
28
28
|
meta: quiet,
|
|
29
29
|
invalid: s('#c62828', '#ff8a80'),
|
|
30
30
|
};
|