@rblabs-dev/axiom 0.0.0-stage → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,560 @@
1
+ // Kit style classes (docs/design-system.md, section 15): forms, tables, layout composition,
2
+ // skeletons, text roles and landing pages. Buttons have no class of their own; they are Angular
3
+ // Material buttons (15.11).
4
+ //
5
+ // Every selector starts with `:where(<root>)`, so a class keeps the specificity of a single class
6
+ // plus its own parts and feature styles can adjust layout without fighting the kit. Selectors that
7
+ // must beat Angular Material's table rules add an element or a second class instead.
8
+
9
+ @use 'breakpoints';
10
+ @use 'base';
11
+
12
+ @mixin styles($root) {
13
+ $r: ':where(#{$root})';
14
+
15
+ @include _forms($r);
16
+ @include _tables($r);
17
+ @include _layout($r);
18
+ @include _skeleton($r);
19
+ @include _text($r);
20
+ @include _landing($r);
21
+ }
22
+
23
+ // Forms (15.8). Native controls; `mat-form-field` keeps Material's own anatomy and sits next to
24
+ // these fields inside `.rb-form-grid`.
25
+ @mixin _forms($r) {
26
+ #{$r} .rb-field {
27
+ display: grid;
28
+ gap: var(--rb-space-2);
29
+ min-width: 0;
30
+ margin: 0;
31
+ padding: 0;
32
+ border: 0;
33
+ }
34
+
35
+ #{$r} .rb-field__label {
36
+ padding: 0;
37
+ color: var(--rb-color-text-strong);
38
+ font: var(--rb-type-label-large);
39
+ letter-spacing: var(--rb-type-label-large-tracking);
40
+ }
41
+
42
+ #{$r} .rb-field__control {
43
+ display: block;
44
+ width: 100%;
45
+ min-width: 0;
46
+ min-height: var(--rb-size-control-height);
47
+ margin: 0;
48
+ padding: var(--rb-space-2) var(--rb-space-3);
49
+ border: 1px solid var(--rb-color-outline);
50
+ border-radius: var(--rb-radius-sm);
51
+ background-color: var(--rb-color-control);
52
+ color: var(--rb-color-text-strong);
53
+ font: var(--rb-type-body-large);
54
+ transition:
55
+ border-color var(--rb-motion-duration-fast) var(--rb-motion-easing-standard),
56
+ background-color var(--rb-motion-duration-fast) var(--rb-motion-easing-standard);
57
+ }
58
+
59
+ #{$r} textarea.rb-field__control {
60
+ min-height: calc(var(--rb-size-control-height) * 2.5);
61
+ resize: vertical;
62
+ }
63
+
64
+ // Touch target on coarse pointers (7.2). The control's own minimum outranks the
65
+ // zero-specificity touch rule in _base.scss, so the field restates it after that minimum.
66
+ // Textareas keep their taller minimum, which their element selector makes win.
67
+ @media (pointer: coarse) {
68
+ #{$r} .rb-field__control {
69
+ min-block-size: var(--rb-size-touch-target);
70
+ }
71
+ }
72
+
73
+ #{$r} .rb-field__control::placeholder {
74
+ color: var(--rb-color-text-subtle);
75
+ opacity: 1;
76
+ }
77
+
78
+ #{$r} .rb-field__control:hover:not(:disabled) {
79
+ border-color: var(--rb-color-text-muted);
80
+ }
81
+
82
+ #{$r} .rb-field__control:focus-visible {
83
+ border-color: var(--rb-color-primary);
84
+ }
85
+
86
+ #{$r} .rb-field--invalid .rb-field__control,
87
+ #{$r} .rb-field__control[aria-invalid='true'] {
88
+ border-color: var(--rb-color-danger);
89
+ }
90
+
91
+ #{$r} .rb-field__control:disabled {
92
+ border-color: var(--rb-color-border);
93
+ background-color: var(--rb-color-surface-sunken);
94
+ color: var(--rb-color-text-disabled);
95
+ cursor: not-allowed;
96
+ }
97
+
98
+ #{$r} .rb-field--disabled .rb-field__label {
99
+ color: var(--rb-color-text-disabled);
100
+ }
101
+
102
+ // Browser autofill paints its own background; an inset shadow in the control color covers it.
103
+ #{$r} .rb-field__control:autofill,
104
+ #{$r} .rb-field__control:-webkit-autofill {
105
+ box-shadow: inset 0 0 0 100vmax var(--rb-color-control);
106
+ caret-color: var(--rb-color-text-strong);
107
+ -webkit-text-fill-color: var(--rb-color-text-strong);
108
+ }
109
+
110
+ #{$r} .rb-field__hint,
111
+ #{$r} .rb-field__error {
112
+ margin: 0;
113
+ font: var(--rb-type-body-small);
114
+ letter-spacing: var(--rb-type-body-small-tracking);
115
+ }
116
+
117
+ #{$r} .rb-field__hint {
118
+ color: var(--rb-color-text-subtle);
119
+ }
120
+
121
+ #{$r} .rb-field__error {
122
+ display: flex;
123
+ gap: var(--rb-space-1);
124
+ align-items: flex-start;
125
+ color: var(--rb-color-danger);
126
+ }
127
+
128
+ #{$r} .rb-field__error .mat-icon {
129
+ flex: none;
130
+ width: var(--rb-size-icon-sm);
131
+ height: var(--rb-size-icon-sm);
132
+ font-size: var(--rb-size-icon-sm);
133
+ }
134
+
135
+ #{$r} .rb-form-grid {
136
+ display: grid;
137
+ grid-template-columns: repeat(2, minmax(0, 1fr));
138
+ gap: var(--rb-space-5);
139
+ align-items: start;
140
+ min-width: 0;
141
+
142
+ @include breakpoints.below(sm) {
143
+ grid-template-columns: minmax(0, 1fr);
144
+ }
145
+ }
146
+
147
+ #{$r} .rb-form-grid > .mat-mdc-form-field {
148
+ width: 100%;
149
+ }
150
+
151
+ #{$r} .rb-form-grid__full {
152
+ grid-column: 1 / -1;
153
+ }
154
+ }
155
+
156
+ // Tables (15.9). `.rb-table` styles a native `<table>` and `<table mat-table>`. Below `md` each row
157
+ // becomes a stacked record whose cells are labelled from `data-label`; `.rb-table--inline` keeps
158
+ // the grid and lets `.rb-table-scroll` scroll it instead.
159
+ @mixin _tables($r) {
160
+ #{$r} .rb-table-scroll {
161
+ overflow-x: auto;
162
+ min-width: 0;
163
+ border: 1px solid var(--rb-color-border);
164
+ border-radius: var(--rb-radius-lg);
165
+ background-color: var(--rb-color-surface);
166
+ }
167
+
168
+ #{$r} table.rb-table {
169
+ width: 100%;
170
+ border-collapse: collapse;
171
+ border-spacing: 0;
172
+ background-color: transparent;
173
+ color: var(--rb-color-text);
174
+ font: var(--rb-type-body-medium);
175
+ letter-spacing: var(--rb-type-body-medium-tracking);
176
+ text-align: start;
177
+ }
178
+
179
+ #{$r} .rb-table tr {
180
+ height: auto;
181
+ }
182
+
183
+ #{$r} .rb-table :is(th, td) {
184
+ padding: var(--rb-space-3) var(--rb-space-4);
185
+ border-block-end: 1px solid var(--rb-color-border);
186
+ color: inherit;
187
+ text-align: start;
188
+ vertical-align: middle;
189
+ }
190
+
191
+ #{$r} .rb-table th {
192
+ background-color: var(--rb-color-surface-sunken);
193
+ color: var(--rb-color-text-subtle);
194
+ font: var(--rb-type-label-small);
195
+ letter-spacing: var(--rb-type-label-small-tracking);
196
+ text-transform: uppercase;
197
+ white-space: nowrap;
198
+ }
199
+
200
+ #{$r} .rb-table tbody tr:last-child > :is(td, th) {
201
+ border-block-end: 0;
202
+ }
203
+
204
+ #{$r} .rb-table tbody tr:not(.rb-table__empty-row, .rb-table__skeleton-row):hover {
205
+ background-color: var(--rb-color-surface-hover);
206
+ }
207
+
208
+ #{$r} .rb-table :is(th, td).rb-table__cell--numeric {
209
+ font-variant-numeric: tabular-nums;
210
+ text-align: end;
211
+ }
212
+
213
+ #{$r} .rb-table__actions {
214
+ display: flex;
215
+ flex-wrap: nowrap;
216
+ gap: var(--rb-space-1);
217
+ align-items: center;
218
+ justify-content: flex-end;
219
+ }
220
+
221
+ // The record's name, linking to its detail view.
222
+ #{$r} .rb-table__link {
223
+ color: var(--rb-color-text-strong);
224
+ font: var(--rb-type-title-small);
225
+ overflow-wrap: anywhere;
226
+ text-decoration: none;
227
+ }
228
+
229
+ #{$r} .rb-table__link:hover {
230
+ color: var(--rb-color-primary);
231
+ text-decoration: underline;
232
+ }
233
+
234
+ #{$r} .rb-table :is(.rb-table__empty-row, .mat-mdc-no-data-row) > td {
235
+ padding: var(--rb-space-8) var(--rb-space-4);
236
+ color: var(--rb-color-text-muted);
237
+ text-align: center;
238
+ }
239
+
240
+ #{$r} .rb-table__skeleton-row .rb-skeleton {
241
+ max-inline-size: 14rem;
242
+ }
243
+
244
+ @include breakpoints.below(md) {
245
+ #{$r} table.rb-table:not(.rb-table--inline),
246
+ #{$r} .rb-table:not(.rb-table--inline) :is(tbody, tr, td) {
247
+ display: block;
248
+ }
249
+
250
+ // The header row stays in the accessibility tree; each cell repeats its label visually.
251
+ #{$r} .rb-table:not(.rb-table--inline) thead {
252
+ @include base.visually-hidden();
253
+ }
254
+
255
+ #{$r} .rb-table:not(.rb-table--inline) tbody tr {
256
+ padding: var(--rb-space-3) var(--rb-space-4);
257
+ border-block-end: 1px solid var(--rb-color-border);
258
+ }
259
+
260
+ #{$r} .rb-table:not(.rb-table--inline) tbody tr:last-child {
261
+ border-block-end: 0;
262
+ }
263
+
264
+ #{$r} .rb-table:not(.rb-table--inline) td {
265
+ display: grid;
266
+ grid-template-columns: minmax(6rem, 35%) minmax(0, 1fr);
267
+ gap: var(--rb-space-3);
268
+ align-items: baseline;
269
+ // Chips and buttons keep their own width instead of stretching across the value column.
270
+ justify-items: start;
271
+ padding: var(--rb-space-1) 0;
272
+ border-block-end: 0;
273
+ overflow-wrap: anywhere;
274
+ }
275
+
276
+ #{$r} .rb-table:not(.rb-table--inline) td[data-label]::before {
277
+ color: var(--rb-color-text-subtle);
278
+ font: var(--rb-type-label-small);
279
+ letter-spacing: var(--rb-type-label-small-tracking);
280
+ text-transform: uppercase;
281
+ content: attr(data-label);
282
+ // Hidden from assistive technology, which already reads the column header.
283
+ content: attr(data-label) / '';
284
+ }
285
+
286
+ #{$r} .rb-table:not(.rb-table--inline) td:not([data-label]) {
287
+ grid-template-columns: minmax(0, 1fr);
288
+ }
289
+
290
+ // A technical value fills the column so it can truncate.
291
+ #{$r} .rb-table:not(.rb-table--inline) td > rb-technical-value {
292
+ justify-self: stretch;
293
+ }
294
+
295
+ #{$r} .rb-table:not(.rb-table--inline) :is(th, td).rb-table__cell--numeric {
296
+ text-align: start;
297
+ }
298
+
299
+ #{$r} .rb-table:not(.rb-table--inline) .rb-table__actions {
300
+ justify-content: flex-start;
301
+ padding-block-start: var(--rb-space-2);
302
+ }
303
+
304
+ #{$r} .rb-table:not(.rb-table--inline) :is(.rb-table__empty-row, .mat-mdc-no-data-row) > td {
305
+ display: block;
306
+ padding: var(--rb-space-6) 0;
307
+ }
308
+ }
309
+ }
310
+
311
+ // Layout composition (15.10).
312
+ @mixin _layout($r) {
313
+ #{$r} .rb-stack {
314
+ display: grid;
315
+ gap: var(--rb-space-4);
316
+ align-content: start;
317
+ min-width: 0;
318
+ }
319
+
320
+ #{$r} .rb-stack--sm {
321
+ gap: var(--rb-space-2);
322
+ }
323
+
324
+ #{$r} .rb-stack--lg {
325
+ gap: var(--rb-space-6);
326
+ }
327
+
328
+ #{$r} .rb-master-detail {
329
+ display: grid;
330
+ grid-template-columns: minmax(17.5rem, 0.92fr) minmax(0, 1.08fr);
331
+ gap: var(--rb-space-6);
332
+ align-items: start;
333
+ min-width: 0;
334
+
335
+ @include breakpoints.below(xl) {
336
+ grid-template-columns: minmax(0, 1fr);
337
+ }
338
+ }
339
+
340
+ #{$r} .rb-master-detail--wide-detail {
341
+ grid-template-columns: minmax(17.5rem, 0.8fr) minmax(0, 1.2fr);
342
+
343
+ @include breakpoints.below(xl) {
344
+ grid-template-columns: minmax(0, 1fr);
345
+ }
346
+ }
347
+
348
+ #{$r} .rb-action-group {
349
+ display: flex;
350
+ flex-wrap: wrap;
351
+ gap: var(--rb-space-2);
352
+ align-items: center;
353
+ min-width: 0;
354
+ }
355
+
356
+ #{$r} .rb-action-group--end {
357
+ justify-content: flex-end;
358
+ }
359
+
360
+ #{$r} .rb-action-group--between {
361
+ justify-content: space-between;
362
+ }
363
+
364
+ @include breakpoints.below(sm) {
365
+ #{$r} .rb-action-group--mobile-stack {
366
+ flex-direction: column;
367
+ align-items: stretch;
368
+ }
369
+
370
+ #{$r} .rb-action-group--mobile-stack > * {
371
+ width: 100%;
372
+ }
373
+ }
374
+
375
+ #{$r} .rb-meta-grid {
376
+ display: grid;
377
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
378
+ gap: var(--rb-space-3);
379
+ min-width: 0;
380
+ margin: 0;
381
+ padding: 0;
382
+ }
383
+
384
+ #{$r} .rb-meta-grid__item {
385
+ display: grid;
386
+ gap: var(--rb-space-1);
387
+ align-content: start;
388
+ min-width: 0;
389
+ padding: var(--rb-space-3) var(--rb-space-4);
390
+ border: 1px solid var(--rb-color-border);
391
+ border-radius: var(--rb-radius-md);
392
+ background-color: var(--rb-color-surface-sunken);
393
+ }
394
+
395
+ #{$r} .rb-meta-grid__label {
396
+ margin: 0;
397
+ color: var(--rb-color-text-subtle);
398
+ font: var(--rb-type-label-small);
399
+ letter-spacing: var(--rb-type-label-small-tracking);
400
+ text-transform: uppercase;
401
+ }
402
+
403
+ #{$r} .rb-meta-grid__value {
404
+ min-width: 0;
405
+ margin: 0;
406
+ color: var(--rb-color-text-strong);
407
+ font: var(--rb-type-body-medium);
408
+ overflow-wrap: anywhere;
409
+ }
410
+ }
411
+
412
+ // Loading placeholders (15.10). Decorative: the container announces loading with `aria-busy` and a
413
+ // live region, and the placeholders carry `aria-hidden="true"`.
414
+ @mixin _skeleton($r) {
415
+ #{$r} .rb-skeleton {
416
+ display: block;
417
+ inline-size: 100%;
418
+ block-size: var(--rb-type-body-medium-line-height);
419
+ border-radius: var(--rb-radius-xs);
420
+ background-color: var(--rb-color-surface-sunken);
421
+ background-image: linear-gradient(
422
+ 90deg,
423
+ var(--rb-color-surface-sunken) 20%,
424
+ var(--rb-color-surface-hover) 50%,
425
+ var(--rb-color-surface-sunken) 80%
426
+ );
427
+ background-size: 200% 100%;
428
+ animation: rb-skeleton-shimmer calc(var(--rb-motion-duration-slow) * 5) ease-in-out infinite;
429
+ }
430
+
431
+ #{$r} .rb-skeleton--heading {
432
+ block-size: var(--rb-type-title-large-line-height);
433
+ max-inline-size: 60%;
434
+ }
435
+
436
+ #{$r} .rb-skeleton--control {
437
+ block-size: var(--rb-size-control-height);
438
+ border-radius: var(--rb-radius-sm);
439
+ }
440
+
441
+ // A static placeholder replaces the shimmer (7.5).
442
+ @media (prefers-reduced-motion: reduce) {
443
+ #{$r} .rb-skeleton {
444
+ animation: none;
445
+ }
446
+ }
447
+
448
+ @keyframes rb-skeleton-shimmer {
449
+ from {
450
+ background-position: 100% 0;
451
+ }
452
+
453
+ to {
454
+ background-position: -100% 0;
455
+ }
456
+ }
457
+ }
458
+
459
+ // Text roles (15.13): the uppercase labels every app wrote for itself.
460
+ @mixin _text($r) {
461
+ // Short context above a title, in the primary color; an optional leading icon is sized to it.
462
+ #{$r} .rb-eyebrow {
463
+ display: flex;
464
+ gap: var(--rb-space-2);
465
+ align-items: center;
466
+ margin: 0;
467
+ color: var(--rb-color-primary);
468
+ font: var(--rb-type-label-small);
469
+ letter-spacing: var(--rb-type-label-small-tracking);
470
+ text-transform: uppercase;
471
+ }
472
+
473
+ #{$r} .rb-eyebrow .mat-icon {
474
+ inline-size: var(--rb-size-icon-sm);
475
+ block-size: var(--rb-size-icon-sm);
476
+ font-size: var(--rb-size-icon-sm);
477
+ }
478
+
479
+ // A quiet label over a value, a list or a group: the look of `.rb-meta-grid__label` anywhere.
480
+ #{$r} .rb-overline {
481
+ margin: 0;
482
+ color: var(--rb-color-text-subtle);
483
+ font: var(--rb-type-label-small);
484
+ letter-spacing: var(--rb-type-label-small-tracking);
485
+ text-transform: uppercase;
486
+ }
487
+ }
488
+
489
+ // Landing pages (15.13): the hero, tag lists and icon tiles of the public home pages.
490
+ @mixin _landing($r) {
491
+ // The headline and its call to action beside a media column; one column below lg.
492
+ #{$r} .rb-hero {
493
+ display: grid;
494
+ grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
495
+ gap: var(--rb-space-12);
496
+ align-items: center;
497
+ min-width: 0;
498
+
499
+ @include breakpoints.below(lg) {
500
+ grid-template-columns: minmax(0, 1fr);
501
+ gap: var(--rb-space-8);
502
+ }
503
+ }
504
+
505
+ #{$r} .rb-hero__copy {
506
+ display: grid;
507
+ gap: var(--rb-space-6);
508
+ justify-items: start;
509
+ min-width: 0;
510
+ }
511
+
512
+ #{$r} .rb-hero__title {
513
+ max-inline-size: 16ch;
514
+ margin: 0;
515
+ color: var(--rb-color-text-strong);
516
+ font: var(--rb-type-hero);
517
+ letter-spacing: var(--rb-type-hero-tracking);
518
+ text-wrap: balance;
519
+ }
520
+
521
+ #{$r} .rb-hero__lead {
522
+ max-inline-size: 40rem;
523
+ margin: 0;
524
+ color: var(--rb-color-text-muted);
525
+ font: var(--rb-type-body-large);
526
+ }
527
+
528
+ // Descriptive tags (a stack, a feature list) as pills. Not interactive and not a state: state
529
+ // is an rb-status-chip.
530
+ #{$r} .rb-tag-list {
531
+ display: flex;
532
+ flex-wrap: wrap;
533
+ gap: var(--rb-space-2);
534
+ margin: 0;
535
+ padding: 0;
536
+ list-style: none;
537
+ }
538
+
539
+ #{$r} .rb-tag-list > li {
540
+ padding: var(--rb-space-1) var(--rb-space-3);
541
+ border: 1px solid var(--rb-color-border);
542
+ border-radius: var(--rb-radius-full);
543
+ background-color: var(--rb-color-surface);
544
+ color: var(--rb-color-text);
545
+ font: var(--rb-type-label-medium);
546
+ letter-spacing: var(--rb-type-label-medium-tracking);
547
+ }
548
+
549
+ // A decorative icon on a soft primary square, leading a card or a list item.
550
+ #{$r} .rb-icon-tile {
551
+ display: inline-grid;
552
+ flex: none;
553
+ place-items: center;
554
+ inline-size: var(--rb-size-control-height);
555
+ block-size: var(--rb-size-control-height);
556
+ border-radius: var(--rb-radius-md);
557
+ background-color: var(--rb-color-primary-soft);
558
+ color: var(--rb-color-on-primary-soft);
559
+ }
560
+ }
@@ -0,0 +1,63 @@
1
+ // Self-hosted fonts (docs/design-system.md, sections 6.1 and 10). Nothing here loads from a CDN:
2
+ // Inter Variable is bundled from @fontsource-variable/inter, and the Material Symbols subset is
3
+ // served by the app from public/fonts/.
4
+
5
+ // Inter Variable, Latin and Latin Extended. `optional` paints with the system fallback at once on a
6
+ // slow network instead of delaying or reflowing the first render.
7
+ @mixin inter() {
8
+ @font-face {
9
+ font-family: 'Inter Variable';
10
+ font-style: normal;
11
+ font-display: optional;
12
+ font-weight: 100 900;
13
+ src: url('@fontsource-variable/inter/files/inter-latin-wght-normal.woff2')
14
+ format('woff2-variations');
15
+ unicode-range:
16
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
17
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
18
+ }
19
+
20
+ @font-face {
21
+ font-family: 'Inter Variable';
22
+ font-style: normal;
23
+ font-display: optional;
24
+ font-weight: 100 900;
25
+ src: url('@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2')
26
+ format('woff2-variations');
27
+ unicode-range:
28
+ U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
29
+ U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
30
+ U+A720-A7FF;
31
+ }
32
+ }
33
+
34
+ // Material Symbols Outlined, the app's own subset (scripts/build-icon-font.mjs).
35
+ // `block` keeps ligature names from flashing as text while the font loads.
36
+ @mixin material-symbols($url) {
37
+ @font-face {
38
+ font-family: 'Material Symbols Outlined';
39
+ font-style: normal;
40
+ font-weight: 400;
41
+ font-display: block;
42
+ src: url($url) format('woff2');
43
+ }
44
+ }
45
+
46
+ // The class `<mat-icon fontSet="material-symbols-outlined">` renders with.
47
+ @mixin material-symbols-class() {
48
+ .material-symbols-outlined {
49
+ display: inline-block;
50
+ font-family: 'Material Symbols Outlined';
51
+ font-size: var(--rb-size-icon-lg);
52
+ font-style: normal;
53
+ font-weight: 400;
54
+ line-height: 1;
55
+ letter-spacing: normal;
56
+ text-transform: none;
57
+ white-space: nowrap;
58
+ word-wrap: normal;
59
+ direction: ltr;
60
+ font-feature-settings: 'liga';
61
+ -webkit-font-smoothing: antialiased;
62
+ }
63
+ }
@@ -0,0 +1,72 @@
1
+ // Kit entry point. `@use`-ing this file emits no CSS; an app opts in by calling the entry mixin
2
+ // once, at the root of its global stylesheet:
3
+ //
4
+ // @use '@rblabs-dev/axiom' as rb; (an app; the showcase app uses '../../axiom/src/styles')
5
+ //
6
+ // @include rb.design-system($icon-font-url: '/fonts/material-symbols-outlined-v380-400-subset.a8057a86.woff2');
7
+ //
8
+ // Pass `$scope` to apply the kit only inside elements matching a selector, for example while an
9
+ // app still has its own global styles:
10
+ //
11
+ // @include rb.design-system($scope: '.rb-scope');
12
+ //
13
+ // In scoped mode the scope element paints like `body`, and `color-scheme` is inherited from
14
+ // `<html>` (ThemeService keeps it correct). Overlays rendered outside the scope, such as menus or
15
+ // dialogs in the CDK overlay container, do not receive the kit until it is applied unscoped. An
16
+ // overlay opts in by putting the scope class on its pane (`panelClass`): the pane then receives
17
+ // the tokens, theme and kit classes without being painted like the page, as RbConfirmDialogService
18
+ // does with `rb-scope`.
19
+
20
+ @use 'base';
21
+ @use 'components';
22
+ @use 'fonts';
23
+ @use 'material-overrides';
24
+ @use 'theme';
25
+ @use 'tokens';
26
+
27
+ @forward 'breakpoints' show below, above, $breakpoints;
28
+
29
+ // Stamped from projects/axiom/package.json by the build (scripts/stamp-version.mjs).
30
+ $version: '1.2.1';
31
+
32
+ @mixin design-system($scope: null, $icon-font-url: null) {
33
+ @include fonts.inter();
34
+
35
+ @if $icon-font-url {
36
+ @include fonts.material-symbols($icon-font-url);
37
+ }
38
+
39
+ @if $scope {
40
+ #{$scope} {
41
+ @include tokens.declare();
42
+ @include theme.theme();
43
+ @include material-overrides.overrides();
44
+ }
45
+
46
+ @include base.styles($scope, '#{$scope}:not(.cdk-overlay-pane)');
47
+ @include components.styles($scope);
48
+
49
+ @if $icon-font-url {
50
+ #{$scope} {
51
+ @include fonts.material-symbols-class();
52
+ }
53
+ }
54
+ } @else {
55
+ html {
56
+ // Follows the OS before any script runs; ThemeService sets an explicit value when the user
57
+ // has chosen a theme (docs/design-system.md, section 11).
58
+ color-scheme: light dark;
59
+
60
+ @include tokens.declare();
61
+ @include theme.theme();
62
+ @include material-overrides.overrides();
63
+ }
64
+
65
+ @include base.styles(html, body);
66
+ @include components.styles(html);
67
+
68
+ @if $icon-font-url {
69
+ @include fonts.material-symbols-class();
70
+ }
71
+ }
72
+ }