@rblabs-dev/axiom 0.0.0-stage → 1.2.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/LICENSE +21 -0
- package/README.md +155 -2
- package/brand/favicon.template.svg +21 -0
- package/brand/og-image.template.svg +37 -0
- package/brand/rb-monogram.svg +16 -0
- package/cli/axiom.mjs +56 -0
- package/cli/build-brand-assets.mjs +115 -0
- package/cli/build-icon-font.mjs +134 -0
- package/cli/check-style-literals.mjs +94 -0
- package/cli/project.mjs +105 -0
- package/cli/verify-production-assets.mjs +146 -0
- package/fesm2022/rblabs-dev-axiom-showcase.mjs +1027 -0
- package/fesm2022/rblabs-dev-axiom-showcase.mjs.map +1 -0
- package/fesm2022/rblabs-dev-axiom.mjs +2955 -0
- package/fesm2022/rblabs-dev-axiom.mjs.map +1 -0
- package/material-symbols-icons.txt +24 -0
- package/package.json +66 -3
- package/showcase/package.json +4 -0
- package/styles/_base.scss +135 -0
- package/styles/_breakpoints.scss +35 -0
- package/styles/_components.scss +551 -0
- package/styles/_fonts.scss +63 -0
- package/styles/_index.scss +72 -0
- package/styles/_material-overrides.scss +79 -0
- package/styles/_palette.scss +139 -0
- package/styles/_theme.scss +183 -0
- package/styles/_tokens.scss +341 -0
- package/types/rblabs-dev-axiom-showcase.d.ts +81 -0
- package/types/rblabs-dev-axiom.d.ts +675 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
// Every --rb-* token from docs/design-system.md (sections 5 to 7). The maps are the single source of
|
|
2
|
+
// the values; `declare()` turns them into custom properties and is only emitted where the entry
|
|
3
|
+
// mixin includes it. Colors are `light-dark()` pairs, so they follow the active `color-scheme`.
|
|
4
|
+
|
|
5
|
+
@use 'sass:list';
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
|
|
8
|
+
// Color roles: name -> (light, dark). Contrast is verified in docs/design-system.md, section 5.8.
|
|
9
|
+
$colors: (
|
|
10
|
+
// Primary and tertiary (5.3)
|
|
11
|
+
'primary': (#1f63d1, #67a2ff),
|
|
12
|
+
'primary-hover': (#1859bf, #8bb8ff),
|
|
13
|
+
'on-primary': (#ffffff, #06101c),
|
|
14
|
+
'primary-soft': (#e8f1ff, #12284a),
|
|
15
|
+
'on-primary-soft': (#0f3f8c, #cfe0ff),
|
|
16
|
+
'tertiary': (#00708c, #7dd3fc),
|
|
17
|
+
'on-tertiary': (#ffffff, #04111d),
|
|
18
|
+
// Neutral surfaces (5.4)
|
|
19
|
+
'bg': (#f4f7fb, #08111d),
|
|
20
|
+
'surface-sunken': (#edf2f8, #0b1726),
|
|
21
|
+
'surface': (#ffffff, #0e1b2c),
|
|
22
|
+
'surface-raised': (#ffffff, #132339),
|
|
23
|
+
'surface-hover': (#e8eef6, #172a42),
|
|
24
|
+
'surface-nav': (#ffffff, #0a1524),
|
|
25
|
+
'control': (#ffffff, #0a1625),
|
|
26
|
+
// Text and borders (5.5)
|
|
27
|
+
'text-strong': (#132338, #f6f9fd),
|
|
28
|
+
'text': (#2d4056, #dce7f5),
|
|
29
|
+
'text-muted': (#4f6379, #a3b4c9),
|
|
30
|
+
'text-subtle': (#566a81, #8b9db4),
|
|
31
|
+
'text-disabled': (#8a9bb0, #5a6d85),
|
|
32
|
+
'border': (#dce5ef, #1d3049),
|
|
33
|
+
'border-strong': (#b9cadb, #315174),
|
|
34
|
+
'outline': (#7a8ea5, #5f7a99),
|
|
35
|
+
'focus': (#1d63d0, #8bb8ff),
|
|
36
|
+
// Status (5.6)
|
|
37
|
+
'info': (#1a5f9e, #7cc4ff),
|
|
38
|
+
'info-soft': (#eaf4ff, #0c223b),
|
|
39
|
+
'info-border': (#9bc4ee, #245280),
|
|
40
|
+
'on-info': (#ffffff, #04121f),
|
|
41
|
+
'success': (#1b6a4b, #6fdcaa),
|
|
42
|
+
'success-soft': (#e9f8f1, #0d281f),
|
|
43
|
+
'success-border': (#8bcbb0, #236248),
|
|
44
|
+
'on-success': (#ffffff, #03140d),
|
|
45
|
+
'warning': (#7a5500, #f4c45a),
|
|
46
|
+
'warning-soft': (#fff8e4, #2a210d),
|
|
47
|
+
'warning-border': (#e3c56f, #745c20),
|
|
48
|
+
'on-warning': (#ffffff, #1d1400),
|
|
49
|
+
'danger': (#b42339, #ff9aab),
|
|
50
|
+
'danger-soft': (#fff0f2, #30151d),
|
|
51
|
+
'danger-border': (#e6a2ad, #7b3142),
|
|
52
|
+
'on-danger': (#ffffff, #2a0710)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
// Fixed values, identical in both themes (5.2 and 13.1).
|
|
56
|
+
$fixed-colors: (
|
|
57
|
+
'brand-start': #67a2ff,
|
|
58
|
+
'brand-end': #2f78ed,
|
|
59
|
+
'brand-ink': #f6f9fd,
|
|
60
|
+
'brand-navy': #08111d,
|
|
61
|
+
'stage': #05080f,
|
|
62
|
+
'on-stage': #f6f9fd,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
// Translucent tokens (5.7). Always derived from a role; the two rgb() values live only here.
|
|
66
|
+
$overlays: (
|
|
67
|
+
'overlay-hover': color-mix(in srgb, var(--rb-color-text-strong) 6%, transparent),
|
|
68
|
+
'overlay-pressed': color-mix(in srgb, var(--rb-color-text-strong) 10%, transparent),
|
|
69
|
+
'overlay-primary': color-mix(in srgb, var(--rb-color-primary) 10%, transparent),
|
|
70
|
+
'overlay-selected': color-mix(in srgb, var(--rb-color-primary) 16%, transparent),
|
|
71
|
+
'selection': color-mix(in srgb, var(--rb-color-primary) 32%, transparent),
|
|
72
|
+
'glass': color-mix(in srgb, var(--rb-color-bg) 88%, transparent),
|
|
73
|
+
'scrim': light-dark(rgb(19 35 56 / 40%), rgb(2 6 12 / 64%)),
|
|
74
|
+
'shadow': light-dark(rgb(26 52 82 / 13%), rgb(0 0 0 / 28%)),
|
|
75
|
+
'stage-scrim': color-mix(in srgb, var(--rb-color-stage) 64%, transparent),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
$font-sans: "'Inter Variable', Inter, 'Segoe UI', system-ui, -apple-system, sans-serif";
|
|
79
|
+
$font-mono: "ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Menlo, Consolas, monospace";
|
|
80
|
+
|
|
81
|
+
$font-weights: (
|
|
82
|
+
'regular': 400,
|
|
83
|
+
'medium': 500,
|
|
84
|
+
'semibold': 600,
|
|
85
|
+
'bold': 700,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
// Type scale (6.2): role -> (size, line height, weight, tracking).
|
|
89
|
+
$type-scale: (
|
|
90
|
+
'display-large': (
|
|
91
|
+
3.5rem,
|
|
92
|
+
4rem,
|
|
93
|
+
600,
|
|
94
|
+
-0.02em,
|
|
95
|
+
),
|
|
96
|
+
'display-medium': (
|
|
97
|
+
2.75rem,
|
|
98
|
+
3.25rem,
|
|
99
|
+
600,
|
|
100
|
+
-0.02em,
|
|
101
|
+
),
|
|
102
|
+
'display-small': (
|
|
103
|
+
2.25rem,
|
|
104
|
+
2.75rem,
|
|
105
|
+
600,
|
|
106
|
+
-0.015em,
|
|
107
|
+
),
|
|
108
|
+
'headline-large': (
|
|
109
|
+
2rem,
|
|
110
|
+
2.5rem,
|
|
111
|
+
600,
|
|
112
|
+
-0.01em,
|
|
113
|
+
),
|
|
114
|
+
'headline-medium': (
|
|
115
|
+
1.75rem,
|
|
116
|
+
2.25rem,
|
|
117
|
+
600,
|
|
118
|
+
-0.01em,
|
|
119
|
+
),
|
|
120
|
+
'headline-small': (
|
|
121
|
+
1.5rem,
|
|
122
|
+
2rem,
|
|
123
|
+
600,
|
|
124
|
+
0,
|
|
125
|
+
),
|
|
126
|
+
'title-large': (
|
|
127
|
+
1.375rem,
|
|
128
|
+
1.75rem,
|
|
129
|
+
600,
|
|
130
|
+
0,
|
|
131
|
+
),
|
|
132
|
+
'title-medium': (
|
|
133
|
+
1rem,
|
|
134
|
+
1.5rem,
|
|
135
|
+
600,
|
|
136
|
+
0,
|
|
137
|
+
),
|
|
138
|
+
'title-small': (
|
|
139
|
+
0.875rem,
|
|
140
|
+
1.25rem,
|
|
141
|
+
600,
|
|
142
|
+
0,
|
|
143
|
+
),
|
|
144
|
+
'body-large': (
|
|
145
|
+
1rem,
|
|
146
|
+
1.5rem,
|
|
147
|
+
400,
|
|
148
|
+
0,
|
|
149
|
+
),
|
|
150
|
+
'body-medium': (
|
|
151
|
+
0.875rem,
|
|
152
|
+
1.25rem,
|
|
153
|
+
400,
|
|
154
|
+
0,
|
|
155
|
+
),
|
|
156
|
+
'body-small': (
|
|
157
|
+
0.75rem,
|
|
158
|
+
1rem,
|
|
159
|
+
400,
|
|
160
|
+
0,
|
|
161
|
+
),
|
|
162
|
+
'label-large': (
|
|
163
|
+
0.875rem,
|
|
164
|
+
1.25rem,
|
|
165
|
+
500,
|
|
166
|
+
0.01em,
|
|
167
|
+
),
|
|
168
|
+
'label-medium': (
|
|
169
|
+
0.75rem,
|
|
170
|
+
1rem,
|
|
171
|
+
500,
|
|
172
|
+
0.02em,
|
|
173
|
+
),
|
|
174
|
+
'label-small': (
|
|
175
|
+
0.75rem,
|
|
176
|
+
1rem,
|
|
177
|
+
600,
|
|
178
|
+
0.06em,
|
|
179
|
+
),
|
|
180
|
+
'page-title': (
|
|
181
|
+
clamp(1.5rem, 1.25rem + 1vw, 2rem),
|
|
182
|
+
1.2,
|
|
183
|
+
700,
|
|
184
|
+
-0.015em,
|
|
185
|
+
),
|
|
186
|
+
'hero': (
|
|
187
|
+
clamp(2.25rem, 1.5rem + 3vw, 3.5rem),
|
|
188
|
+
1.1,
|
|
189
|
+
700,
|
|
190
|
+
-0.025em,
|
|
191
|
+
),
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
// Roles that exist in Material 3 (everything except page-title and hero).
|
|
195
|
+
$material-type-roles: (
|
|
196
|
+
'display-large',
|
|
197
|
+
'display-medium',
|
|
198
|
+
'display-small',
|
|
199
|
+
'headline-large',
|
|
200
|
+
'headline-medium',
|
|
201
|
+
'headline-small',
|
|
202
|
+
'title-large',
|
|
203
|
+
'title-medium',
|
|
204
|
+
'title-small',
|
|
205
|
+
'body-large',
|
|
206
|
+
'body-medium',
|
|
207
|
+
'body-small',
|
|
208
|
+
'label-large',
|
|
209
|
+
'label-medium',
|
|
210
|
+
'label-small'
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
$space: (
|
|
214
|
+
'0': 0,
|
|
215
|
+
'1': 0.25rem,
|
|
216
|
+
'2': 0.5rem,
|
|
217
|
+
'3': 0.75rem,
|
|
218
|
+
'4': 1rem,
|
|
219
|
+
'5': 1.25rem,
|
|
220
|
+
'6': 1.5rem,
|
|
221
|
+
'8': 2rem,
|
|
222
|
+
'10': 2.5rem,
|
|
223
|
+
'12': 3rem,
|
|
224
|
+
'16': 4rem,
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
$size: (
|
|
228
|
+
'control-height': 2.5rem,
|
|
229
|
+
'control-height-sm': 2rem,
|
|
230
|
+
'touch-target': 2.75rem,
|
|
231
|
+
'icon-sm': 1rem,
|
|
232
|
+
'icon-md': 1.25rem,
|
|
233
|
+
'icon-lg': 1.5rem,
|
|
234
|
+
'shell-topbar': 4.25rem,
|
|
235
|
+
'shell-nav': 17rem,
|
|
236
|
+
'shell-module-nav': 12rem,
|
|
237
|
+
'monogram': 2.5rem,
|
|
238
|
+
'monogram-sm': 2rem,
|
|
239
|
+
'content-max': 90rem,
|
|
240
|
+
'card': 28rem,
|
|
241
|
+
'card-wide': 34rem,
|
|
242
|
+
'focus-ring': 2px,
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
$radius: (
|
|
246
|
+
'xs': 0.25rem,
|
|
247
|
+
'sm': 0.5rem,
|
|
248
|
+
'md': 0.75rem,
|
|
249
|
+
'lg': 1rem,
|
|
250
|
+
'xl': 1.5rem,
|
|
251
|
+
'full': 9999px,
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
$elevation: (
|
|
255
|
+
'0': none,
|
|
256
|
+
'1': (
|
|
257
|
+
0 1px 3px var(--rb-color-shadow),
|
|
258
|
+
),
|
|
259
|
+
'2': (
|
|
260
|
+
0 8px 20px var(--rb-color-shadow),
|
|
261
|
+
),
|
|
262
|
+
'3': (
|
|
263
|
+
0 16px 36px var(--rb-color-shadow),
|
|
264
|
+
),
|
|
265
|
+
);
|
|
266
|
+
|
|
267
|
+
$motion: (
|
|
268
|
+
'duration-fast': 120ms,
|
|
269
|
+
'duration-base': 180ms,
|
|
270
|
+
'duration-slow': 280ms,
|
|
271
|
+
'easing-standard': cubic-bezier(0.2, 0, 0, 1),
|
|
272
|
+
'easing-decelerate': cubic-bezier(0, 0, 0, 1),
|
|
273
|
+
'easing-accelerate': cubic-bezier(0.3, 0, 1, 1),
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
$z: (
|
|
277
|
+
'base': 0,
|
|
278
|
+
'raised': 1,
|
|
279
|
+
'sticky': 100,
|
|
280
|
+
'nav': 200,
|
|
281
|
+
'overlay': 1000,
|
|
282
|
+
'skip-link': 1100,
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
// Background per theme; also the <meta name="theme-color"> value (section 11).
|
|
286
|
+
$theme-color-light: list.nth(map.get($colors, 'bg'), 1);
|
|
287
|
+
$theme-color-dark: list.nth(map.get($colors, 'bg'), 2);
|
|
288
|
+
|
|
289
|
+
@mixin declare() {
|
|
290
|
+
@each $name, $pair in $colors {
|
|
291
|
+
--rb-color-#{$name}: light-dark(#{list.nth($pair, 1)}, #{list.nth($pair, 2)});
|
|
292
|
+
}
|
|
293
|
+
@each $name, $value in $fixed-colors {
|
|
294
|
+
--rb-color-#{$name}: #{$value};
|
|
295
|
+
}
|
|
296
|
+
@each $name, $value in $overlays {
|
|
297
|
+
--rb-color-#{$name}: #{$value};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
--rb-font-sans: #{$font-sans};
|
|
301
|
+
--rb-font-mono: #{$font-mono};
|
|
302
|
+
@each $name, $value in $font-weights {
|
|
303
|
+
--rb-font-weight-#{$name}: #{$value};
|
|
304
|
+
}
|
|
305
|
+
@each $role, $spec in $type-scale {
|
|
306
|
+
$size: list.nth($spec, 1);
|
|
307
|
+
$line-height: list.nth($spec, 2);
|
|
308
|
+
--rb-type-#{$role}: #{list.nth($spec, 3)} #{$size}/#{$line-height} var(--rb-font-sans);
|
|
309
|
+
--rb-type-#{$role}-size: #{$size};
|
|
310
|
+
--rb-type-#{$role}-line-height: #{$line-height};
|
|
311
|
+
--rb-type-#{$role}-weight: #{list.nth($spec, 3)};
|
|
312
|
+
--rb-type-#{$role}-tracking: #{list.nth($spec, 4)};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@each $name, $value in $space {
|
|
316
|
+
--rb-space-#{$name}: #{$value};
|
|
317
|
+
}
|
|
318
|
+
--rb-space-page: clamp(var(--rb-space-4), 3vw, var(--rb-space-8));
|
|
319
|
+
@each $name, $value in $size {
|
|
320
|
+
--rb-size-#{$name}: #{$value};
|
|
321
|
+
}
|
|
322
|
+
@each $name, $value in $radius {
|
|
323
|
+
--rb-radius-#{$name}: #{$value};
|
|
324
|
+
}
|
|
325
|
+
@each $name, $value in $elevation {
|
|
326
|
+
--rb-elevation-#{$name}: #{$value};
|
|
327
|
+
}
|
|
328
|
+
@each $name, $value in $motion {
|
|
329
|
+
--rb-motion-#{$name}: #{$value};
|
|
330
|
+
}
|
|
331
|
+
@each $name, $value in $z {
|
|
332
|
+
--rb-z-#{$name}: #{$value};
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Reduced motion (7.5): every duration collapses to zero.
|
|
336
|
+
@media (prefers-reduced-motion: reduce) {
|
|
337
|
+
--rb-motion-duration-fast: 0ms;
|
|
338
|
+
--rb-motion-duration-base: 0ms;
|
|
339
|
+
--rb-motion-duration-slow: 0ms;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { SafeResourceUrl } from "@angular/platform-browser";
|
|
2
|
+
import { RbMessageTone, RbPageHeaderMetric, RbStatusTone, ThemeService } from "@rblabs-dev/axiom";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type RbShellExampleKind = 'app-sidenav' | 'app-modules' | 'public' | 'sign-in';
|
|
5
|
+
interface ColorGroup {
|
|
6
|
+
title: string;
|
|
7
|
+
roles: {
|
|
8
|
+
token: string;
|
|
9
|
+
on?: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export interface ShowcaseRow {
|
|
13
|
+
name: string;
|
|
14
|
+
clientId: string;
|
|
15
|
+
status: {
|
|
16
|
+
tone: RbStatusTone;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
updated: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Living reference of the kit (docs/design-system.md): tokens, type, spacing, shape, elevation,
|
|
23
|
+
* Material components, the content components and the kit style classes, in the active theme.
|
|
24
|
+
*/
|
|
25
|
+
export declare class DesignSystemShowcaseComponent {
|
|
26
|
+
protected readonly theme: ThemeService;
|
|
27
|
+
private readonly confirmDialog;
|
|
28
|
+
protected readonly version: string;
|
|
29
|
+
protected readonly colorGroups: ColorGroup[];
|
|
30
|
+
protected readonly typeRoles: string[];
|
|
31
|
+
protected readonly spaceSteps: string[];
|
|
32
|
+
protected readonly radii: string[];
|
|
33
|
+
protected readonly elevations: string[];
|
|
34
|
+
protected readonly messageSamples: {
|
|
35
|
+
tone: RbMessageTone;
|
|
36
|
+
title: string;
|
|
37
|
+
body: string;
|
|
38
|
+
}[];
|
|
39
|
+
protected readonly chipSamples: {
|
|
40
|
+
tone: RbStatusTone;
|
|
41
|
+
label: string;
|
|
42
|
+
}[];
|
|
43
|
+
protected readonly tableRows: ShowcaseRow[];
|
|
44
|
+
protected readonly tableColumns: string[];
|
|
45
|
+
protected readonly buttonRoles: {
|
|
46
|
+
role: string;
|
|
47
|
+
markup: string;
|
|
48
|
+
legacy: string;
|
|
49
|
+
}[];
|
|
50
|
+
protected readonly monogramSizes: {
|
|
51
|
+
token: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}[];
|
|
54
|
+
protected readonly iconTiles: {
|
|
55
|
+
icon: string;
|
|
56
|
+
overline: string;
|
|
57
|
+
label: string;
|
|
58
|
+
}[];
|
|
59
|
+
/** `?example=<kind>` renders one shell example full page instead of the reference. */
|
|
60
|
+
protected readonly example: import("@angular/core").Signal<RbShellExampleKind | null>;
|
|
61
|
+
private readonly sanitizer;
|
|
62
|
+
protected readonly shellExamples: {
|
|
63
|
+
src: SafeResourceUrl;
|
|
64
|
+
kind: RbShellExampleKind;
|
|
65
|
+
title: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}[];
|
|
68
|
+
protected readonly headerMetrics: import("@angular/core").Signal<RbPageHeaderMetric[]>;
|
|
69
|
+
protected readonly defaultScopes: string[];
|
|
70
|
+
protected readonly scopes: import("@angular/core").WritableSignal<string[]>;
|
|
71
|
+
/** Mounted from the start so the result of each dialog is announced (section 9.5). */
|
|
72
|
+
protected readonly dialogResult: import("@angular/core").WritableSignal<string>;
|
|
73
|
+
protected readonly dialogResultTone: import("@angular/core").WritableSignal<RbMessageTone>;
|
|
74
|
+
protected openConfirm(kind: 'primary' | 'danger' | 'reason'): Promise<void>;
|
|
75
|
+
protected removeScope(scope: string): void;
|
|
76
|
+
protected resetScopes(): void;
|
|
77
|
+
private showResult;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignSystemShowcaseComponent, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DesignSystemShowcaseComponent, "rb-design-system-showcase", never, {}, {}, never, never, true, never>;
|
|
80
|
+
}
|
|
81
|
+
export {};
|