@bwui/css 0.1.9 → 0.1.11
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/dist/brickwork.css +3184 -755
- package/package.json +2 -2
- package/src/components.css +4 -5
- package/src/layers/components.css +2579 -443
- package/src/layers/marketing.css +52 -49
- package/src/layout.css +253 -5
- package/src/reset.css +1 -1
- package/src/wave-b.css +9 -44
- package/src/wave-e.css +40 -11
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
* .bw-btn--solid is the early-draft name of primary. It is DEPRECATED, kept
|
|
144
144
|
* here as an alias through :is() (class weight) for the window ADR-125 sets
|
|
145
145
|
* for the bare size classes, and removed with them. Its old standalone rule
|
|
146
|
-
* read --bw-color-accent-fg
|
|
146
|
+
* read --bw-color-accent-fg (now --bw-color-fg-on-accent, fixed in #48), which was not a token
|
|
147
147
|
* shim (GAP-BTN-6). */
|
|
148
148
|
:is(.bw-btn--primary, .bw-btn--solid) {
|
|
149
149
|
background: var(--bw-color-accent);
|
|
@@ -285,70 +285,115 @@
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
/* --- Badges
|
|
288
|
+
/* --- Badges (docs/components/badge.md) ------------------------------------- */
|
|
289
289
|
|
|
290
|
+
/* Status tag and pace or delta pill. Display atom on the container inset
|
|
291
|
+
* scale (SIZE-COVERAGE: S for badge). Closed size subset sm and md; md is the
|
|
292
|
+
* default and always emitted by React and Vue. Padding fractions match Chip's
|
|
293
|
+
* sm/md so the two pills share one inset reading; Badge stays non-interactive
|
|
294
|
+
* (no 1.5rem floor). Neutral is the default tone (STA-008): a badge carries
|
|
295
|
+
* status information, never error communication (use Alert for that). */
|
|
290
296
|
.bw-badge {
|
|
291
297
|
display: inline-flex;
|
|
292
298
|
align-items: center;
|
|
293
299
|
gap: var(--bw-space-1);
|
|
294
|
-
|
|
295
|
-
padding-
|
|
300
|
+
/* md default: same inset fractions as .bw-chip--size-md */
|
|
301
|
+
padding-block: calc(var(--bw-size-inset-xs) / 3);
|
|
302
|
+
padding-inline: var(--bw-size-inset-xs);
|
|
296
303
|
/* transparent hairline so intent variants (tinted borders) keep the same
|
|
297
304
|
geometry as the neutral badge */
|
|
298
305
|
border: var(--bw-size-border-hairline) solid transparent;
|
|
299
306
|
border-radius: var(--bw-radius-full);
|
|
300
307
|
font-size: var(--bw-text-caption-size);
|
|
301
308
|
font-weight: var(--bw-font-weight-medium);
|
|
309
|
+
line-height: var(--bw-text-caption-line-height);
|
|
302
310
|
font-variant-numeric: tabular-nums;
|
|
303
311
|
background: var(--bw-color-surface-sunken);
|
|
304
312
|
color: var(--bw-color-fg-muted);
|
|
313
|
+
white-space: nowrap;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.bw-badge--size-sm {
|
|
317
|
+
padding-block: calc(var(--bw-size-inset-xs) / 6);
|
|
318
|
+
padding-inline: calc(var(--bw-size-inset-xs) * 2 / 3);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.bw-badge--size-md {
|
|
322
|
+
padding-block: calc(var(--bw-size-inset-xs) / 3);
|
|
323
|
+
padding-inline: var(--bw-size-inset-xs);
|
|
305
324
|
}
|
|
306
|
-
|
|
307
|
-
* variant="neutral", so the contract needs a real .bw-badge--neutral rule,
|
|
308
|
-
* not a look left implicit in the base class. The values restate the base's
|
|
309
|
-
* neutral chip treatment (sunken surface, muted fg, the transparent hairline
|
|
310
|
-
* that keeps every variant on the same geometry); fg-muted on surface-sunken
|
|
311
|
-
* measures AA in both themes (the same pairing muted body text already
|
|
312
|
-
* relies on). Neutral is the correct default per the badge-vs-alert rule
|
|
313
|
-
* (STA-008): a badge carries neutral information, never error communication. */
|
|
325
|
+
|
|
314
326
|
.bw-badge--neutral {
|
|
315
327
|
background: var(--bw-color-surface-sunken);
|
|
316
328
|
color: var(--bw-color-fg-muted);
|
|
317
329
|
border-color: transparent;
|
|
318
330
|
}
|
|
331
|
+
|
|
332
|
+
/* Quiet bordered tag (APP-007 sample / provenance). Transparent fill, hairline
|
|
333
|
+
* border, muted ink; never a filled status tone. */
|
|
334
|
+
.bw-badge--outline {
|
|
335
|
+
background: transparent;
|
|
336
|
+
color: var(--bw-color-fg-muted);
|
|
337
|
+
/* border-control: same 3:1 non-text floor as Input / Radio rings */
|
|
338
|
+
border-color: var(--bw-color-border-control);
|
|
339
|
+
}
|
|
340
|
+
|
|
319
341
|
.bw-badge--success {
|
|
320
342
|
background: var(--bw-color-success-subtle);
|
|
321
343
|
color: var(--bw-color-success-fg);
|
|
322
344
|
border-color: var(--bw-color-success-border);
|
|
323
345
|
}
|
|
346
|
+
|
|
324
347
|
.bw-badge--warning {
|
|
325
348
|
background: var(--bw-color-warning-subtle);
|
|
326
349
|
color: var(--bw-color-warning-fg);
|
|
327
350
|
border-color: var(--bw-color-warning-border);
|
|
328
351
|
}
|
|
352
|
+
|
|
329
353
|
.bw-badge--danger {
|
|
330
354
|
background: var(--bw-color-danger-subtle);
|
|
331
355
|
color: var(--bw-color-danger-fg);
|
|
332
356
|
border-color: var(--bw-color-danger-border);
|
|
333
357
|
}
|
|
358
|
+
|
|
334
359
|
.bw-badge--info {
|
|
335
360
|
background: var(--bw-color-info-subtle);
|
|
336
361
|
color: var(--bw-color-info-fg);
|
|
337
362
|
border-color: var(--bw-color-info-border);
|
|
338
363
|
}
|
|
339
364
|
|
|
340
|
-
|
|
365
|
+
.bw-badge__icon {
|
|
366
|
+
inline-size: 0.75rem;
|
|
367
|
+
block-size: 0.75rem;
|
|
368
|
+
flex-shrink: 0;
|
|
369
|
+
color: inherit;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* --- Alerts (docs/components/alert.md) ------------------------------------ */
|
|
341
373
|
|
|
374
|
+
/* Feedback unit (SIZE-COVERAGE Feedback column). Status colour grammar:
|
|
375
|
+
* subtle fill + tint border; icon full intent; title intent-fg; message fg.
|
|
376
|
+
* Modifier required: info | success | warning | danger (default info). */
|
|
342
377
|
.bw-alert {
|
|
343
378
|
display: flex;
|
|
379
|
+
align-items: flex-start;
|
|
344
380
|
gap: var(--bw-space-3);
|
|
345
381
|
padding: var(--bw-space-4);
|
|
346
382
|
border-radius: var(--bw-radius-lg); /* joins the card radius family */
|
|
347
383
|
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
348
384
|
margin-block-end: var(--bw-density-stack-gap);
|
|
385
|
+
color: var(--bw-color-fg);
|
|
386
|
+
background: var(--bw-color-surface);
|
|
387
|
+
}
|
|
388
|
+
/* Decorative status icon (R13 Icon cites this class; Alert does not own Icon). */
|
|
389
|
+
.bw-alert__icon {
|
|
390
|
+
flex-shrink: 0;
|
|
391
|
+
inline-size: 1.25rem;
|
|
392
|
+
block-size: 1.25rem;
|
|
393
|
+
margin-block-start: 0.125rem; /* optically centre beside heading-sm */
|
|
349
394
|
}
|
|
350
395
|
/* The text region between the icon and the optional close button
|
|
351
|
-
* (icvoss/django-brickwork
|
|
396
|
+
* (icvoss/django-brickwork issue 137): without a flex-grow rule of its own it
|
|
352
397
|
* collapses to content width instead of filling the row, matching
|
|
353
398
|
* .bw-toast__message and .bw-modal__body's own flex: 1 1 auto. min-inline-size:
|
|
354
399
|
* 0 lets it actually shrink below its content's natural width (the row is
|
|
@@ -371,10 +416,14 @@
|
|
|
371
416
|
font-size: var(--bw-text-body-sm-size);
|
|
372
417
|
font-weight: var(--bw-text-body-sm-weight);
|
|
373
418
|
line-height: var(--bw-text-body-sm-line-height);
|
|
419
|
+
color: var(--bw-color-fg);
|
|
420
|
+
}
|
|
421
|
+
.bw-alert__title + .bw-alert__message {
|
|
422
|
+
margin-block-start: var(--bw-space-1);
|
|
374
423
|
}
|
|
375
424
|
/* Variant borders use the per-intent tint-border tokens (decorative tint,
|
|
376
425
|
* softer than the full-strength intent colour and not relied on for
|
|
377
|
-
* contrast); icon carries the intent, title accents via X-fg
|
|
426
|
+
* contrast); icon carries the intent, title accents via X-fg. */
|
|
378
427
|
.bw-alert--info {
|
|
379
428
|
background: var(--bw-color-info-subtle);
|
|
380
429
|
border-color: var(--bw-color-info-border);
|
|
@@ -415,7 +464,7 @@
|
|
|
415
464
|
.bw-alert--danger .bw-alert__title {
|
|
416
465
|
color: var(--bw-color-danger-fg);
|
|
417
466
|
}
|
|
418
|
-
/* The dismiss control (icvoss/django-brickwork
|
|
467
|
+
/* The dismiss control (icvoss/django-brickwork issue 137): flex-shrink: 0 so it
|
|
419
468
|
* does not compress, matching .bw-modal__close/.bw-slide-over__close/
|
|
420
469
|
* .bw-toast__close. No margin-inline-start: auto needed here: .bw-alert__body
|
|
421
470
|
* already carries flex: 1 1 auto, so it fills the remaining row space and
|
|
@@ -424,6 +473,149 @@
|
|
|
424
473
|
flex-shrink: 0;
|
|
425
474
|
}
|
|
426
475
|
|
|
476
|
+
/* --- Banner (H19 / R16) ---------------------------------------------------- */
|
|
477
|
+
/*
|
|
478
|
+
* Full-bleed edge-anchored announcement strip. Distinct from .bw-alert
|
|
479
|
+
* (in-flow status, role=alert, rounded) and .bw-callout (editorial).
|
|
480
|
+
* Status colour grammar reuses Alert's public intent tokens; neutral is
|
|
481
|
+
* sunken/surface for non-status announcements. Inner-edge borders use the
|
|
482
|
+
* solid intent (not the softer *-border tint) so the hairline clears 3:1
|
|
483
|
+
* against the subtle fill (CB-03 / BAN-053). docs/components/banner.md.
|
|
484
|
+
*/
|
|
485
|
+
.bw-banner {
|
|
486
|
+
display: flex;
|
|
487
|
+
align-items: flex-start;
|
|
488
|
+
gap: var(--bw-space-3);
|
|
489
|
+
/* Density-following inset (Feedback class): sm step of the shared inset
|
|
490
|
+
* scale, which recomputes from --bw-density-card-padding. */
|
|
491
|
+
padding-block: var(--bw-size-inset-sm);
|
|
492
|
+
padding-inline: var(--bw-size-inset-md);
|
|
493
|
+
border-radius: 0;
|
|
494
|
+
border: 0;
|
|
495
|
+
color: var(--bw-color-fg);
|
|
496
|
+
background: var(--bw-color-info-subtle);
|
|
497
|
+
inline-size: 100%;
|
|
498
|
+
box-sizing: border-box;
|
|
499
|
+
}
|
|
500
|
+
.bw-banner--edge-top {
|
|
501
|
+
border-block-end: var(--bw-size-border-hairline) solid var(--bw-color-info);
|
|
502
|
+
}
|
|
503
|
+
.bw-banner--edge-bottom {
|
|
504
|
+
border-block-start: var(--bw-size-border-hairline) solid var(--bw-color-info);
|
|
505
|
+
border-block-end: 0;
|
|
506
|
+
}
|
|
507
|
+
.bw-banner__icon {
|
|
508
|
+
flex-shrink: 0;
|
|
509
|
+
inline-size: var(--bw-component-icon-size-sm);
|
|
510
|
+
block-size: var(--bw-component-icon-size-sm);
|
|
511
|
+
color: var(--bw-color-info);
|
|
512
|
+
}
|
|
513
|
+
.bw-banner__body {
|
|
514
|
+
flex: 1 1 auto;
|
|
515
|
+
min-inline-size: 0;
|
|
516
|
+
}
|
|
517
|
+
.bw-banner__title {
|
|
518
|
+
margin: 0;
|
|
519
|
+
font-family: var(--bw-text-heading-sm-family);
|
|
520
|
+
font-size: var(--bw-text-heading-sm-size);
|
|
521
|
+
font-weight: var(--bw-text-heading-sm-weight);
|
|
522
|
+
line-height: var(--bw-text-heading-sm-line-height);
|
|
523
|
+
color: var(--bw-color-info-fg);
|
|
524
|
+
}
|
|
525
|
+
.bw-banner__message {
|
|
526
|
+
margin: 0;
|
|
527
|
+
margin-block-start: var(--bw-space-1);
|
|
528
|
+
max-inline-size: var(--bw-size-max-width-prose);
|
|
529
|
+
font-size: var(--bw-text-body-sm-size);
|
|
530
|
+
font-weight: var(--bw-text-body-sm-weight);
|
|
531
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
532
|
+
}
|
|
533
|
+
.bw-banner__actions {
|
|
534
|
+
flex-shrink: 0;
|
|
535
|
+
display: flex;
|
|
536
|
+
flex-wrap: wrap;
|
|
537
|
+
align-items: center;
|
|
538
|
+
gap: var(--bw-space-2);
|
|
539
|
+
}
|
|
540
|
+
.bw-banner__close {
|
|
541
|
+
flex-shrink: 0;
|
|
542
|
+
}
|
|
543
|
+
.bw-banner--success {
|
|
544
|
+
background: var(--bw-color-success-subtle);
|
|
545
|
+
}
|
|
546
|
+
.bw-banner--success.bw-banner--edge-top {
|
|
547
|
+
border-block-end-color: var(--bw-color-success-fg);
|
|
548
|
+
}
|
|
549
|
+
.bw-banner--success.bw-banner--edge-bottom {
|
|
550
|
+
border-block-start-color: var(--bw-color-success-fg);
|
|
551
|
+
}
|
|
552
|
+
.bw-banner--success .bw-banner__icon {
|
|
553
|
+
color: var(--bw-color-success);
|
|
554
|
+
}
|
|
555
|
+
.bw-banner--success .bw-banner__title {
|
|
556
|
+
color: var(--bw-color-success-fg);
|
|
557
|
+
}
|
|
558
|
+
.bw-banner--warning {
|
|
559
|
+
background: var(--bw-color-warning-subtle);
|
|
560
|
+
}
|
|
561
|
+
.bw-banner--warning.bw-banner--edge-top {
|
|
562
|
+
border-block-end-color: var(--bw-color-warning-fg);
|
|
563
|
+
}
|
|
564
|
+
.bw-banner--warning.bw-banner--edge-bottom {
|
|
565
|
+
border-block-start-color: var(--bw-color-warning-fg);
|
|
566
|
+
}
|
|
567
|
+
.bw-banner--warning .bw-banner__icon {
|
|
568
|
+
color: var(--bw-color-warning);
|
|
569
|
+
}
|
|
570
|
+
.bw-banner--warning .bw-banner__title {
|
|
571
|
+
color: var(--bw-color-warning-fg);
|
|
572
|
+
}
|
|
573
|
+
.bw-banner--danger {
|
|
574
|
+
background: var(--bw-color-danger-subtle);
|
|
575
|
+
}
|
|
576
|
+
.bw-banner--danger.bw-banner--edge-top {
|
|
577
|
+
border-block-end-color: var(--bw-color-danger);
|
|
578
|
+
}
|
|
579
|
+
.bw-banner--danger.bw-banner--edge-bottom {
|
|
580
|
+
border-block-start-color: var(--bw-color-danger);
|
|
581
|
+
}
|
|
582
|
+
.bw-banner--danger .bw-banner__icon {
|
|
583
|
+
color: var(--bw-color-danger);
|
|
584
|
+
}
|
|
585
|
+
.bw-banner--danger .bw-banner__title {
|
|
586
|
+
color: var(--bw-color-danger-fg);
|
|
587
|
+
}
|
|
588
|
+
.bw-banner--neutral {
|
|
589
|
+
background: var(--bw-color-surface-sunken);
|
|
590
|
+
}
|
|
591
|
+
.bw-banner--neutral.bw-banner--edge-top {
|
|
592
|
+
border-block-end-color: var(--bw-color-fg-muted);
|
|
593
|
+
}
|
|
594
|
+
.bw-banner--neutral.bw-banner--edge-bottom {
|
|
595
|
+
border-block-start-color: var(--bw-color-fg-muted);
|
|
596
|
+
}
|
|
597
|
+
.bw-banner--neutral .bw-banner__icon {
|
|
598
|
+
color: var(--bw-color-fg-muted);
|
|
599
|
+
}
|
|
600
|
+
.bw-banner--neutral .bw-banner__title {
|
|
601
|
+
color: var(--bw-color-fg);
|
|
602
|
+
}
|
|
603
|
+
.bw-banner--info {
|
|
604
|
+
background: var(--bw-color-info-subtle);
|
|
605
|
+
}
|
|
606
|
+
.bw-banner--info.bw-banner--edge-top {
|
|
607
|
+
border-block-end-color: var(--bw-color-info);
|
|
608
|
+
}
|
|
609
|
+
.bw-banner--info.bw-banner--edge-bottom {
|
|
610
|
+
border-block-start-color: var(--bw-color-info);
|
|
611
|
+
}
|
|
612
|
+
.bw-banner--info .bw-banner__icon {
|
|
613
|
+
color: var(--bw-color-info);
|
|
614
|
+
}
|
|
615
|
+
.bw-banner--info .bw-banner__title {
|
|
616
|
+
color: var(--bw-color-info-fg);
|
|
617
|
+
}
|
|
618
|
+
|
|
427
619
|
/* --- Form fields ----------------------------------------------------------- */
|
|
428
620
|
|
|
429
621
|
/* Forms hold the designed measure: the max-width-form token caps the field
|
|
@@ -445,18 +637,25 @@
|
|
|
445
637
|
.bw-field {
|
|
446
638
|
display: flex;
|
|
447
639
|
flex-direction: column;
|
|
448
|
-
|
|
449
|
-
|
|
640
|
+
/* Internal stack (label → control → help → error): layout gap xs, density-
|
|
641
|
+
* following (ADR-126 section 6 / SIZE-COVERAGE gate 5). Was --bw-space-1. */
|
|
642
|
+
gap: var(--bw-size-gap-xs);
|
|
643
|
+
/* Space before the next sibling field: layout gap md (= density stack gap). */
|
|
644
|
+
margin-block-end: var(--bw-size-gap-md);
|
|
450
645
|
max-inline-size: var(--bw-size-max-width-form);
|
|
451
646
|
}
|
|
452
647
|
.bw-field__label {
|
|
648
|
+
color: var(--bw-color-fg);
|
|
649
|
+
font-family: var(--bw-text-label-family);
|
|
453
650
|
font-size: var(--bw-text-label-size);
|
|
454
651
|
font-weight: var(--bw-text-label-weight);
|
|
455
652
|
line-height: var(--bw-text-label-line-height);
|
|
653
|
+
letter-spacing: var(--bw-text-label-tracking);
|
|
456
654
|
}
|
|
457
655
|
.bw-field__required {
|
|
458
656
|
/* danger-fg, not raw danger: the text-duty tier holds AA at caption size. */
|
|
459
657
|
color: var(--bw-color-danger-fg);
|
|
658
|
+
font-weight: var(--bw-text-label-weight);
|
|
460
659
|
}
|
|
461
660
|
/* The widget wrapper (icvoss/django-brickwork#130): every field renderer
|
|
462
661
|
* (_field.html, _combobox.html, _dropzone.html, _tag_input.html) wraps its
|
|
@@ -469,15 +668,66 @@
|
|
|
469
668
|
display: block;
|
|
470
669
|
min-inline-size: 0;
|
|
471
670
|
}
|
|
472
|
-
|
|
671
|
+
/* Input size classes: re-point the five control role variables at the
|
|
672
|
+
* resolved step tokens, same grammar as .bw-btn--size-* and
|
|
673
|
+
* .bw-combobox--size-* (ADR-125; SIZE-COVERAGE gate 2). The base .bw-input
|
|
674
|
+
* reads the role variables and defaults to md; a size class overrides them
|
|
675
|
+
* for the input and any element inside the same subtree that reads the same
|
|
676
|
+
* role variables (e.g. an attached addon). */
|
|
677
|
+
.bw-input--size-xs {
|
|
678
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
679
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
680
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
681
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
682
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
683
|
+
}
|
|
684
|
+
.bw-input--size-sm {
|
|
685
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
686
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
687
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
688
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
689
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
690
|
+
}
|
|
691
|
+
.bw-input--size-md {
|
|
692
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
693
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
694
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
695
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
696
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
697
|
+
}
|
|
698
|
+
.bw-input--size-lg {
|
|
699
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
700
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
701
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
702
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
703
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
704
|
+
}
|
|
705
|
+
.bw-input--size-xl {
|
|
706
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
707
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
708
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
709
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
710
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
711
|
+
}
|
|
712
|
+
/* .bw-input is canonical for single-line and multi-line text controls.
|
|
713
|
+
* .bw-textarea is a shipped alias (React Early / Free gallery) that paints
|
|
714
|
+
* identically; size always uses bw-input--size-* (INP-003). Native Select
|
|
715
|
+
* chrome lives on .bw-select (R04); select.bw-input remains a Django-widget
|
|
716
|
+
* alias of that unit. */
|
|
717
|
+
.bw-input,
|
|
718
|
+
.bw-textarea {
|
|
473
719
|
inline-size: 100%;
|
|
474
|
-
block-size: var(--bw-
|
|
475
|
-
padding-inline: var(--bw-
|
|
720
|
+
block-size: var(--bw-control-height);
|
|
721
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
476
722
|
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
477
723
|
border-radius: var(--bw-radius-md);
|
|
478
724
|
background: var(--bw-color-surface);
|
|
479
725
|
color: var(--bw-color-fg);
|
|
480
726
|
font: inherit;
|
|
727
|
+
/* Step-aware size: inherit sets the family, weight, etc., then the role
|
|
728
|
+
* variable overrides the size so a size class (bw-input--size-*) resizes
|
|
729
|
+
* the field. */
|
|
730
|
+
font-size: var(--bw-control-font-size);
|
|
481
731
|
/* Inner top hairline (0.7.0 craft): black at 4% alpha, the faint recessed
|
|
482
732
|
* top edge that makes the field read as a well rather than a flat rectangle
|
|
483
733
|
* (the button bevel's counterpart, same black-literal shadow convention as
|
|
@@ -488,20 +738,33 @@
|
|
|
488
738
|
/* Textareas share .bw-input chrome but must honour rows= (and grow with
|
|
489
739
|
* content). Fixed block-size on .bw-input collapsed every textarea to a
|
|
490
740
|
* single-line control height (icvoss/django-brickwork#521). */
|
|
491
|
-
textarea.bw-input
|
|
741
|
+
textarea.bw-input,
|
|
742
|
+
.bw-textarea {
|
|
492
743
|
block-size: auto;
|
|
493
|
-
min-block-size: calc(var(--bw-
|
|
494
|
-
padding-block: var(--bw-
|
|
744
|
+
min-block-size: calc(var(--bw-control-height) * 3);
|
|
745
|
+
padding-block: var(--bw-control-padding-inline);
|
|
495
746
|
resize: vertical;
|
|
496
747
|
field-sizing: content;
|
|
497
748
|
}
|
|
749
|
+
/* Placeholder (INP-035): fg-muted, not fg-subtle (same floor as Combobox
|
|
750
|
+
* CMB-035). Opacity reset because Firefox dims ::placeholder on top of colour. */
|
|
751
|
+
.bw-input::placeholder,
|
|
752
|
+
.bw-textarea::placeholder {
|
|
753
|
+
color: var(--bw-color-fg-muted);
|
|
754
|
+
opacity: 1;
|
|
755
|
+
}
|
|
756
|
+
.bw-input:disabled::placeholder,
|
|
757
|
+
.bw-textarea:disabled::placeholder {
|
|
758
|
+
color: var(--bw-color-action-disabled-text);
|
|
759
|
+
}
|
|
498
760
|
/* Hover pre-light: one perceptible step from the control border toward ink.
|
|
499
761
|
* Mixing toward fg (82% border-control, 18% fg) is theme-correct in both
|
|
500
762
|
* directions automatically, because fg flips with the theme: measured 4.47:1
|
|
501
763
|
* against the light surface and 4.61:1 against the dark (the resting border's
|
|
502
764
|
* 3.23/3.39 stays the 1.4.11 floor). :where() keeps the guards at zero
|
|
503
765
|
* specificity so the later focus-visible and invalid border rules still win. */
|
|
504
|
-
.bw-input:hover:where(:not(:disabled):not([readonly]):not(:focus-visible))
|
|
766
|
+
.bw-input:hover:where(:not(:disabled):not([readonly]):not(:focus-visible)),
|
|
767
|
+
.bw-textarea:hover:where(:not(:disabled):not([readonly]):not(:focus-visible)) {
|
|
505
768
|
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
506
769
|
}
|
|
507
770
|
/* The focus ring itself comes from the global :focus-visible rule; the border
|
|
@@ -511,134 +774,310 @@ textarea.bw-input {
|
|
|
511
774
|
* the surface, purely decorative) hugs the input's own radius beneath the
|
|
512
775
|
* offset outline, so focus reads at the control edge as well as the ring;
|
|
513
776
|
* the inner hairline is restated so the well doesn't pop flat on focus. */
|
|
514
|
-
.bw-input:focus-visible
|
|
777
|
+
.bw-input:focus-visible,
|
|
778
|
+
.bw-textarea:focus-visible {
|
|
515
779
|
border-color: var(--bw-color-accent);
|
|
516
780
|
box-shadow:
|
|
517
781
|
inset 0 1px 2px 0 oklch(0 0 0 / 0.04),
|
|
518
782
|
0 0 0 3px color-mix(in oklab, var(--bw-color-accent) 18%, transparent);
|
|
519
783
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
784
|
+
.bw-input[readonly],
|
|
785
|
+
.bw-textarea[readonly] {
|
|
786
|
+
background-color: var(--bw-color-surface-sunken);
|
|
787
|
+
}
|
|
788
|
+
.bw-input:disabled,
|
|
789
|
+
.bw-textarea:disabled {
|
|
790
|
+
background-color: var(--bw-color-action-disabled-bg);
|
|
791
|
+
color: var(--bw-color-action-disabled-text);
|
|
792
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
793
|
+
cursor: not-allowed;
|
|
794
|
+
}
|
|
795
|
+
.bw-field--invalid .bw-input,
|
|
796
|
+
.bw-field--invalid .bw-textarea,
|
|
797
|
+
.bw-input[aria-invalid="true"],
|
|
798
|
+
.bw-textarea[aria-invalid="true"] {
|
|
799
|
+
border-color: var(--bw-color-danger);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/* --- Select (native, R04 / C03) --------------------------------------------- */
|
|
803
|
+
|
|
804
|
+
/* Size classes: same five role-variable re-points as Input (ADR-125;
|
|
805
|
+
* SEL-003). md is the default emitted by React. */
|
|
806
|
+
.bw-select--size-xs {
|
|
807
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
808
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
809
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
810
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
811
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
812
|
+
}
|
|
813
|
+
.bw-select--size-sm {
|
|
814
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
815
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
816
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
817
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
818
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
819
|
+
}
|
|
820
|
+
.bw-select--size-md {
|
|
821
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
822
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
823
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
824
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
825
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
826
|
+
}
|
|
827
|
+
.bw-select--size-lg {
|
|
828
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
829
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
830
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
831
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
832
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
833
|
+
}
|
|
834
|
+
.bw-select--size-xl {
|
|
835
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
836
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
837
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
838
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
839
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
840
|
+
}
|
|
841
|
+
/* .bw-select is canonical. select.bw-input is the Django bw_field_widget
|
|
842
|
+
* alias (widget class still emits bw-input for Select until the lockstep
|
|
843
|
+
* pin lands); it paints the same chrome and chevron (SEL-001). */
|
|
844
|
+
.bw-select,
|
|
527
845
|
select.bw-input {
|
|
528
846
|
appearance: none;
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
847
|
+
display: block;
|
|
848
|
+
inline-size: 100%;
|
|
849
|
+
block-size: var(--bw-control-height);
|
|
850
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
851
|
+
/* End padding clears the chevron glyph plus a breathing space (SEL-012). */
|
|
533
852
|
padding-inline-end: calc(
|
|
534
|
-
var(--bw-
|
|
853
|
+
var(--bw-control-padding-inline) + var(--bw-control-icon-size) + var(--bw-space-1)
|
|
535
854
|
);
|
|
855
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
856
|
+
border-radius: var(--bw-radius-md);
|
|
857
|
+
/* background-color + background-image, never the shorthand: state rules that
|
|
858
|
+
* change fill must not wipe the chevron (0.7.0 craft). */
|
|
859
|
+
background-color: var(--bw-color-surface);
|
|
860
|
+
background-image: var(--bw-component-select-indicator);
|
|
861
|
+
background-repeat: no-repeat;
|
|
862
|
+
background-position: right var(--bw-control-padding-inline) center;
|
|
863
|
+
background-size: var(--bw-control-icon-size);
|
|
864
|
+
color: var(--bw-color-fg);
|
|
865
|
+
font: inherit;
|
|
866
|
+
font-size: var(--bw-control-font-size);
|
|
867
|
+
box-shadow: inset 0 1px 2px 0 oklch(0 0 0 / 0.04);
|
|
868
|
+
transition: var(--bw-transition-colors), var(--bw-transition-shadow);
|
|
536
869
|
}
|
|
870
|
+
/* background-position has no logical form; RTL swaps the corner via
|
|
871
|
+
* [dir="rtl"], the same mechanism as .bw-icon-directional (SEL-015). */
|
|
872
|
+
[dir="rtl"] .bw-select,
|
|
537
873
|
[dir="rtl"] select.bw-input {
|
|
538
|
-
background-position: left var(--bw-
|
|
874
|
+
background-position: left var(--bw-control-padding-inline) center;
|
|
539
875
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
.bw-input[readonly] {
|
|
544
|
-
background-color: var(--bw-color-surface-sunken);
|
|
876
|
+
.bw-select:hover:where(:not(:disabled):not(:focus-visible)),
|
|
877
|
+
select.bw-input:hover:where(:not(:disabled):not(:focus-visible)) {
|
|
878
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
545
879
|
}
|
|
546
|
-
.bw-
|
|
880
|
+
.bw-select:focus-visible,
|
|
881
|
+
select.bw-input:focus-visible {
|
|
882
|
+
border-color: var(--bw-color-accent);
|
|
883
|
+
box-shadow:
|
|
884
|
+
inset 0 1px 2px 0 oklch(0 0 0 / 0.04),
|
|
885
|
+
0 0 0 3px color-mix(in oklab, var(--bw-color-accent) 18%, transparent);
|
|
886
|
+
}
|
|
887
|
+
.bw-select:disabled,
|
|
888
|
+
select.bw-input:disabled {
|
|
547
889
|
background-color: var(--bw-color-action-disabled-bg);
|
|
548
890
|
color: var(--bw-color-action-disabled-text);
|
|
549
891
|
border-color: var(--bw-color-action-disabled-border);
|
|
550
892
|
cursor: not-allowed;
|
|
551
893
|
}
|
|
552
|
-
.bw-field--invalid .bw-
|
|
553
|
-
.bw-
|
|
894
|
+
.bw-field--invalid .bw-select,
|
|
895
|
+
.bw-field--invalid select.bw-input,
|
|
896
|
+
.bw-select[aria-invalid="true"],
|
|
897
|
+
select.bw-input[aria-invalid="true"] {
|
|
554
898
|
border-color: var(--bw-color-danger);
|
|
555
899
|
}
|
|
900
|
+
/* Multiple: grow like a textarea; drop the single-select chevron (SEL-004). */
|
|
901
|
+
.bw-select[multiple],
|
|
902
|
+
select.bw-input[multiple] {
|
|
903
|
+
block-size: auto;
|
|
904
|
+
min-block-size: calc(var(--bw-control-height) * 3);
|
|
905
|
+
padding-block: var(--bw-control-padding-inline);
|
|
906
|
+
padding-inline-end: var(--bw-control-padding-inline);
|
|
907
|
+
background-image: none;
|
|
908
|
+
}
|
|
556
909
|
|
|
557
|
-
/* --- Checkbox +
|
|
910
|
+
/* --- Checkbox (R05) + Radio (R06) ------------------------------------------- */
|
|
558
911
|
|
|
559
912
|
/* appearance:none swaps the UA widget for a control drawn on our tokens (the
|
|
560
913
|
* moderncss pattern: with appearance removed, every modern engine renders the
|
|
561
914
|
* input as a plain box, including its ::before). inline-grid centres the
|
|
562
915
|
* glyph; vertical-align + the end margin seat the control against label
|
|
563
|
-
* text. The resting border is border-control (the WCAG 1.4.11 boundary
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
916
|
+
* text. The resting border is border-control (the WCAG 1.4.11 boundary);
|
|
917
|
+
* the focus ring comes from the global :where(input):focus-visible rule.
|
|
918
|
+
* Every selector is input-qualified: RadioSelect/CheckboxSelectMultiple
|
|
919
|
+
* rendering puts the class on the group wrapper div as well as on each
|
|
920
|
+
* option input (the option_inherits_attrs route), and the wrapper must stay
|
|
921
|
+
* unstyled.
|
|
569
922
|
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
* right" applies), but a clip/padding trick to keep an 18px-looking box
|
|
578
|
-
* inside a 24px hit area needs the border moved off `border` onto a layered
|
|
579
|
-
* box-shadow to stop it tracking the padding box, which is exactly the kind
|
|
580
|
-
* of fragile, non-obvious CSS this codebase avoids elsewhere; growing the
|
|
581
|
-
* real box is the KISS option and is verified not to unbalance the label
|
|
582
|
-
* row (row height already had headroom: the data table's select column and
|
|
583
|
-
* .bw-field__control both size to the row/control height, not to the
|
|
584
|
-
* checkbox). */
|
|
585
|
-
input.bw-checkbox,
|
|
586
|
-
input.bw-radio {
|
|
923
|
+
* Checkbox (R05) and Radio (R06) each read the control role variables: the
|
|
924
|
+
* box is --bw-control-height (floored at 1.5rem by the step tokens), the
|
|
925
|
+
* checkbox tick is --bw-control-icon-size, and the label gap is
|
|
926
|
+
* --bw-control-gap. Size classes bw-checkbox--size-* and bw-radio--size-*
|
|
927
|
+
* re-point those variables (ADR-125). The two grammars stay separate. */
|
|
928
|
+
|
|
929
|
+
input.bw-checkbox {
|
|
587
930
|
appearance: none;
|
|
588
931
|
display: inline-grid;
|
|
589
932
|
place-content: center;
|
|
590
|
-
inline-size:
|
|
591
|
-
block-size:
|
|
933
|
+
inline-size: var(--bw-control-height);
|
|
934
|
+
block-size: var(--bw-control-height);
|
|
592
935
|
flex-shrink: 0;
|
|
593
936
|
margin: 0;
|
|
594
|
-
margin-inline-end: var(--bw-
|
|
937
|
+
margin-inline-end: var(--bw-control-gap);
|
|
595
938
|
vertical-align: middle;
|
|
596
939
|
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
940
|
+
border-radius: var(--bw-radius-sm);
|
|
597
941
|
background: var(--bw-color-surface);
|
|
598
942
|
transition: var(--bw-transition-colors);
|
|
599
943
|
}
|
|
600
|
-
|
|
601
|
-
|
|
944
|
+
/* Size classes: re-point role variables only (CBX-003). md is the default
|
|
945
|
+
* from :root; React always emits an explicit size class. */
|
|
946
|
+
input.bw-checkbox.bw-checkbox--size-xs {
|
|
947
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
948
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
949
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
950
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
951
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
602
952
|
}
|
|
603
|
-
input.bw-
|
|
604
|
-
|
|
953
|
+
input.bw-checkbox.bw-checkbox--size-sm {
|
|
954
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
955
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
956
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
957
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
958
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
605
959
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
960
|
+
input.bw-checkbox.bw-checkbox--size-md {
|
|
961
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
962
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
963
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
964
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
965
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
610
966
|
}
|
|
611
|
-
|
|
612
|
-
|
|
967
|
+
input.bw-checkbox.bw-checkbox--size-lg {
|
|
968
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
969
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
970
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
971
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
972
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
973
|
+
}
|
|
974
|
+
input.bw-checkbox.bw-checkbox--size-xl {
|
|
975
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
976
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
977
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
978
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
979
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
/* Radio size classes (docs/components/radio.md RAD-003): same grammar as
|
|
984
|
+
* .bw-input--size-*, re-pointing the five control role variables at the
|
|
985
|
+
* resolved step tokens (ADR-125). The radio reads height (its square box)
|
|
986
|
+
* and gap (its label offset); the control height floor of 1.5rem keeps every
|
|
987
|
+
* step and density on the WCAG 2.5.8 target (RAD-052). */
|
|
988
|
+
.bw-radio--size-xs {
|
|
989
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
990
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
991
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
992
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
993
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
994
|
+
}
|
|
995
|
+
.bw-radio--size-sm {
|
|
996
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
997
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
998
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
999
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
1000
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
1001
|
+
}
|
|
1002
|
+
.bw-radio--size-md {
|
|
1003
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
1004
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
1005
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
1006
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
1007
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
1008
|
+
}
|
|
1009
|
+
.bw-radio--size-lg {
|
|
1010
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
1011
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
1012
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
1013
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
1014
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
1015
|
+
}
|
|
1016
|
+
.bw-radio--size-xl {
|
|
1017
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
1018
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
1019
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
1020
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
1021
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
1022
|
+
}
|
|
1023
|
+
input.bw-radio {
|
|
1024
|
+
appearance: none;
|
|
1025
|
+
display: inline-grid;
|
|
1026
|
+
place-content: center;
|
|
1027
|
+
inline-size: var(--bw-control-height);
|
|
1028
|
+
block-size: var(--bw-control-height);
|
|
1029
|
+
flex-shrink: 0;
|
|
1030
|
+
margin: 0;
|
|
1031
|
+
margin-inline-end: var(--bw-control-gap);
|
|
1032
|
+
vertical-align: middle;
|
|
1033
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1034
|
+
border-radius: var(--bw-radius-full);
|
|
1035
|
+
background: var(--bw-color-surface);
|
|
1036
|
+
transition: var(--bw-transition-colors);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
/* Shared hover pre-light, the input's own mix (constant documented there). */
|
|
1040
|
+
input.bw-checkbox:hover:where(:not(:disabled):not(:checked):not(:indeterminate)),
|
|
1041
|
+
input.bw-radio:hover:where(:not(:disabled):not(:checked)) {
|
|
1042
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
1043
|
+
}
|
|
1044
|
+
/* Checked / indeterminate: solid accent fill (measured 5.11:1 light /
|
|
1045
|
+
* 7.14:1 dark against the surface, the 1.4.11 state boundary). */
|
|
613
1046
|
input.bw-checkbox:checked,
|
|
1047
|
+
input.bw-checkbox:indeterminate,
|
|
614
1048
|
input.bw-radio:checked {
|
|
615
1049
|
border-color: var(--bw-color-accent);
|
|
616
1050
|
background-color: var(--bw-color-accent);
|
|
617
1051
|
}
|
|
618
|
-
/* The tick: --bw-component-checkbox-glyph is a colour-free alpha shape
|
|
619
|
-
* mask and PAINTED with fg-on-accent, so the glyph ink flips
|
|
620
|
-
*
|
|
621
|
-
* the
|
|
622
|
-
* fill; a baked white tick would fail dark at 2.63:1, documented on the
|
|
623
|
-
* token). No entrance animation: the fill change is feedback enough and the
|
|
624
|
-
* reduced-motion floor stays trivially honoured. */
|
|
1052
|
+
/* The tick: --bw-component-checkbox-glyph is a colour-free alpha shape
|
|
1053
|
+
* consumed as a mask and PAINTED with fg-on-accent, so the glyph ink flips
|
|
1054
|
+
* with the theme. Glyph size follows --bw-control-icon-size. No entrance
|
|
1055
|
+
* animation: the fill change is feedback enough. */
|
|
625
1056
|
input.bw-checkbox:checked::before {
|
|
626
1057
|
content: "";
|
|
627
|
-
inline-size:
|
|
628
|
-
block-size:
|
|
1058
|
+
inline-size: var(--bw-control-icon-size);
|
|
1059
|
+
block-size: var(--bw-control-icon-size);
|
|
629
1060
|
background-color: var(--bw-color-fg-on-accent);
|
|
630
1061
|
mask-image: var(--bw-component-checkbox-glyph);
|
|
631
1062
|
mask-repeat: no-repeat;
|
|
632
1063
|
mask-size: 100% 100%;
|
|
633
1064
|
}
|
|
634
|
-
/*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
1065
|
+
/* Indeterminate dash: a centred bar painted with fg-on-accent (data-table
|
|
1066
|
+
* select-all partial state). Width follows the icon role; thickness is the
|
|
1067
|
+
* hairline border token so no parallel rem table appears. */
|
|
1068
|
+
input.bw-checkbox:indeterminate::before {
|
|
1069
|
+
content: "";
|
|
1070
|
+
inline-size: var(--bw-control-icon-size);
|
|
1071
|
+
block-size: var(--bw-size-border-hairline);
|
|
1072
|
+
background-color: var(--bw-color-fg-on-accent);
|
|
1073
|
+
border-radius: var(--bw-radius-full);
|
|
1074
|
+
box-shadow: 0 0 0 var(--bw-size-border-hairline) var(--bw-color-fg-on-accent);
|
|
1075
|
+
}
|
|
1076
|
+
/* The radio dot uses the border-width trick: accent border thickens and the
|
|
1077
|
+
* background becomes the dot. Width is 0.278 of the box (5/18 of the original
|
|
1078
|
+
* 18px control), so the dot keeps its proportion at every step (RAD-013). */
|
|
640
1079
|
input.bw-radio:checked {
|
|
641
|
-
border-width:
|
|
1080
|
+
border-width: calc(var(--bw-control-height) * 0.278);
|
|
642
1081
|
background-color: var(--bw-color-fg-on-accent);
|
|
643
1082
|
}
|
|
644
1083
|
input.bw-checkbox:disabled,
|
|
@@ -647,17 +1086,31 @@ input.bw-radio:disabled {
|
|
|
647
1086
|
background: var(--bw-color-action-disabled-bg);
|
|
648
1087
|
cursor: not-allowed;
|
|
649
1088
|
}
|
|
650
|
-
input.bw-checkbox:disabled:checked
|
|
1089
|
+
input.bw-checkbox:disabled:checked,
|
|
1090
|
+
input.bw-checkbox:disabled:indeterminate {
|
|
651
1091
|
border-color: var(--bw-color-action-disabled-border);
|
|
652
1092
|
background-color: var(--bw-color-action-disabled-text);
|
|
653
1093
|
}
|
|
654
|
-
input.bw-checkbox:disabled:checked::before
|
|
1094
|
+
input.bw-checkbox:disabled:checked::before,
|
|
1095
|
+
input.bw-checkbox:disabled:indeterminate::before {
|
|
655
1096
|
background-color: var(--bw-color-action-disabled-bg);
|
|
1097
|
+
box-shadow: none;
|
|
656
1098
|
}
|
|
657
1099
|
input.bw-radio:disabled:checked {
|
|
658
1100
|
border-color: var(--bw-color-action-disabled-text);
|
|
659
1101
|
background-color: var(--bw-color-action-disabled-bg);
|
|
660
1102
|
}
|
|
1103
|
+
/* Invalid: Field chrome or aria-invalid paints a danger border (CBX-034). */
|
|
1104
|
+
.bw-field--invalid input.bw-checkbox,
|
|
1105
|
+
input.bw-checkbox[aria-invalid="true"] {
|
|
1106
|
+
border-color: var(--bw-color-danger);
|
|
1107
|
+
}
|
|
1108
|
+
/* Invalid (RAD-034): danger ring on unchecked, enabled radios of an invalid
|
|
1109
|
+
* group only. A checked radio keeps its accent ring; disabled keeps disabled. */
|
|
1110
|
+
.bw-field--invalid input.bw-radio:where(:not(:checked):not(:disabled)),
|
|
1111
|
+
input.bw-radio[aria-invalid="true"]:where(:not(:checked):not(:disabled)) {
|
|
1112
|
+
border-color: var(--bw-color-danger);
|
|
1113
|
+
}
|
|
661
1114
|
|
|
662
1115
|
/* --- Toggle switch (0.13.0, BR-BW-INPUT-001, brickwork#57) ------------------ */
|
|
663
1116
|
|
|
@@ -756,31 +1209,544 @@ input.bw-toggle:checked::before {
|
|
|
756
1209
|
input.bw-toggle:disabled {
|
|
757
1210
|
cursor: not-allowed;
|
|
758
1211
|
}
|
|
759
|
-
input.bw-toggle:disabled::after {
|
|
760
|
-
border-color: var(--bw-color-action-disabled-border);
|
|
761
|
-
background: var(--bw-color-action-disabled-bg);
|
|
1212
|
+
input.bw-toggle:disabled::after {
|
|
1213
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1214
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1215
|
+
}
|
|
1216
|
+
input.bw-toggle:disabled:checked::after {
|
|
1217
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1218
|
+
background: var(--bw-color-action-disabled-text);
|
|
1219
|
+
}
|
|
1220
|
+
input.bw-toggle:disabled::before {
|
|
1221
|
+
box-shadow: none;
|
|
1222
|
+
}
|
|
1223
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1224
|
+
input.bw-toggle::before {
|
|
1225
|
+
transition: none;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
.bw-toggle-field {
|
|
1229
|
+
display: inline-flex;
|
|
1230
|
+
align-items: center;
|
|
1231
|
+
cursor: pointer;
|
|
1232
|
+
}
|
|
1233
|
+
.bw-toggle-field__label {
|
|
1234
|
+
font-size: var(--bw-text-label-size);
|
|
1235
|
+
font-weight: var(--bw-text-label-weight);
|
|
1236
|
+
line-height: var(--bw-text-label-line-height);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/* --- Switch (docs/components/switch.md, R07 / C06) --------------------------- */
|
|
1240
|
+
|
|
1241
|
+
/* .bw-switch is the canonical switch (SW-001): a span root holding a native
|
|
1242
|
+
* <input type="checkbox" role="switch">, then a decorative track and thumb.
|
|
1243
|
+
* input.bw-toggle above is the retained Django alias (GAP-SW-1), left as it
|
|
1244
|
+
* is until the lockstep that moves Django onto this block.
|
|
1245
|
+
*
|
|
1246
|
+
* The block reads the role variables only (SW-010). Size classes re-point all
|
|
1247
|
+
* five, same grammar as .bw-input--size-* and .bw-btn--size-* (ADR-125); the
|
|
1248
|
+
* switch itself needs --bw-control-height, which carries both the density and
|
|
1249
|
+
* the step. The track is half that height, the proportion the toggle tokens
|
|
1250
|
+
* draw at the comfortable md step (2.5rem control, 1.25rem track, 0.875rem
|
|
1251
|
+
* thumb, 2.25rem track width), so md is exactly the toggle geometry and every
|
|
1252
|
+
* other density and step scales with it. The floor is the toggle thumb token,
|
|
1253
|
+
* so a compact xs track never collapses. The ratios 1.8 (width), 0.7 (thumb)
|
|
1254
|
+
* and 0.2 (inset) are the toggle tokens' own proportions, kept as unitless
|
|
1255
|
+
* multipliers of the track height so the shape stays recognisably a switch at
|
|
1256
|
+
* every step. The --bw-switch-* names are private to this block (the same
|
|
1257
|
+
* convention as --bw-combobox-chip-size), not tokens.
|
|
1258
|
+
*
|
|
1259
|
+
* Hit area (WCAG 2.5.8, SW-052): the root is never shorter than 1.5rem; the
|
|
1260
|
+
* invisible input fills the whole root, so the target is the root, not the
|
|
1261
|
+
* drawn track. Track and thumb take no pointer events, so a click anywhere on
|
|
1262
|
+
* the switch reaches the input. */
|
|
1263
|
+
.bw-switch--size-xs {
|
|
1264
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
1265
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
1266
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
1267
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
1268
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
1269
|
+
}
|
|
1270
|
+
.bw-switch--size-sm {
|
|
1271
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
1272
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
1273
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
1274
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
1275
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
1276
|
+
}
|
|
1277
|
+
.bw-switch--size-md {
|
|
1278
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
1279
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
1280
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
1281
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
1282
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
1283
|
+
}
|
|
1284
|
+
.bw-switch--size-lg {
|
|
1285
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
1286
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
1287
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
1288
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
1289
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
1290
|
+
}
|
|
1291
|
+
.bw-switch--size-xl {
|
|
1292
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
1293
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
1294
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
1295
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
1296
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
1297
|
+
}
|
|
1298
|
+
.bw-switch {
|
|
1299
|
+
--bw-switch-track-block: max(
|
|
1300
|
+
var(--bw-component-toggle-thumb-size),
|
|
1301
|
+
calc(var(--bw-control-height) / 2)
|
|
1302
|
+
);
|
|
1303
|
+
--bw-switch-track-inline: calc(var(--bw-switch-track-block) * 1.8);
|
|
1304
|
+
--bw-switch-thumb: calc(var(--bw-switch-track-block) * 0.7);
|
|
1305
|
+
--bw-switch-inset: calc(var(--bw-switch-track-block) * 0.2);
|
|
1306
|
+
--bw-switch-travel: calc(
|
|
1307
|
+
var(--bw-switch-track-inline) - var(--bw-switch-thumb) - (var(--bw-switch-inset) * 2)
|
|
1308
|
+
);
|
|
1309
|
+
position: relative;
|
|
1310
|
+
display: inline-flex;
|
|
1311
|
+
align-items: center;
|
|
1312
|
+
flex-shrink: 0;
|
|
1313
|
+
vertical-align: middle;
|
|
1314
|
+
inline-size: var(--bw-switch-track-inline);
|
|
1315
|
+
block-size: max(1.5rem, var(--bw-switch-track-block));
|
|
1316
|
+
}
|
|
1317
|
+
/* The native input is the control (SW-002): it keeps the checkbox semantics,
|
|
1318
|
+
* form value, keyboard and label wiring, and is drawn invisibly over the whole
|
|
1319
|
+
* root. */
|
|
1320
|
+
.bw-switch > input {
|
|
1321
|
+
position: absolute;
|
|
1322
|
+
inset: 0;
|
|
1323
|
+
inline-size: 100%;
|
|
1324
|
+
block-size: 100%;
|
|
1325
|
+
margin: 0;
|
|
1326
|
+
opacity: 0;
|
|
1327
|
+
cursor: pointer;
|
|
1328
|
+
}
|
|
1329
|
+
.bw-switch__track {
|
|
1330
|
+
box-sizing: border-box;
|
|
1331
|
+
inline-size: 100%;
|
|
1332
|
+
block-size: var(--bw-switch-track-block);
|
|
1333
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1334
|
+
border-radius: var(--bw-radius-full);
|
|
1335
|
+
background: var(--bw-color-surface-sunken);
|
|
1336
|
+
pointer-events: none;
|
|
1337
|
+
transition: var(--bw-transition-colors);
|
|
1338
|
+
}
|
|
1339
|
+
.bw-switch__thumb {
|
|
1340
|
+
position: absolute;
|
|
1341
|
+
inset-block-start: 50%;
|
|
1342
|
+
inset-inline-start: var(--bw-switch-inset);
|
|
1343
|
+
inline-size: var(--bw-switch-thumb);
|
|
1344
|
+
block-size: var(--bw-switch-thumb);
|
|
1345
|
+
border-radius: var(--bw-radius-full);
|
|
1346
|
+
background: var(--bw-color-surface);
|
|
1347
|
+
box-shadow: var(--bw-elevation-1);
|
|
1348
|
+
pointer-events: none;
|
|
1349
|
+
transform: translate(var(--bw-switch-offset, 0), -50%);
|
|
1350
|
+
transition: var(--bw-transition-transform);
|
|
1351
|
+
}
|
|
1352
|
+
/* Hover pre-light: the border moves one step toward ink, the same 82/18 mix as
|
|
1353
|
+
* the input and the checkbox. :where() keeps the guards at zero specificity so
|
|
1354
|
+
* the checked and disabled rules below still win. */
|
|
1355
|
+
.bw-switch > input:hover:where(:not(:disabled):not(:checked)) ~ .bw-switch__track {
|
|
1356
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
1357
|
+
}
|
|
1358
|
+
/* Checked: accent track (the 1.4.11 state boundary) and the thumb travels to
|
|
1359
|
+
* the inline end. The offset is a signed custom property so the transform and
|
|
1360
|
+
* the RTL flip share one declaration; direction is read from [dir], the same
|
|
1361
|
+
* mechanism as .bw-icon-directional. */
|
|
1362
|
+
.bw-switch > input:checked ~ .bw-switch__track {
|
|
1363
|
+
border-color: var(--bw-color-accent);
|
|
1364
|
+
background: var(--bw-color-accent);
|
|
1365
|
+
}
|
|
1366
|
+
.bw-switch > input:checked ~ .bw-switch__thumb {
|
|
1367
|
+
--bw-switch-offset: var(--bw-switch-travel);
|
|
1368
|
+
}
|
|
1369
|
+
[dir="rtl"] .bw-switch > input:checked ~ .bw-switch__thumb {
|
|
1370
|
+
--bw-switch-offset: calc(var(--bw-switch-travel) * -1);
|
|
1371
|
+
}
|
|
1372
|
+
.bw-switch > input:hover:where(:not(:disabled)):checked ~ .bw-switch__track {
|
|
1373
|
+
border-color: var(--bw-color-accent-hover);
|
|
1374
|
+
background: var(--bw-color-accent-hover);
|
|
1375
|
+
}
|
|
1376
|
+
/* Focus: the global ring is drawn on the invisible input and so cannot be
|
|
1377
|
+
* seen; the same ring (token, width, offset) is drawn on the track. */
|
|
1378
|
+
.bw-switch > input:focus-visible ~ .bw-switch__track {
|
|
1379
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
1380
|
+
outline-offset: 2px;
|
|
1381
|
+
}
|
|
1382
|
+
.bw-switch > input:disabled {
|
|
1383
|
+
cursor: not-allowed;
|
|
1384
|
+
}
|
|
1385
|
+
.bw-switch > input:disabled ~ .bw-switch__track {
|
|
1386
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1387
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1388
|
+
}
|
|
1389
|
+
.bw-switch > input:disabled:checked ~ .bw-switch__track {
|
|
1390
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1391
|
+
background: var(--bw-color-action-disabled-text);
|
|
1392
|
+
}
|
|
1393
|
+
.bw-switch > input:disabled ~ .bw-switch__thumb {
|
|
1394
|
+
box-shadow: none;
|
|
1395
|
+
}
|
|
1396
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1397
|
+
.bw-switch__track,
|
|
1398
|
+
.bw-switch__thumb {
|
|
1399
|
+
transition: none;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
/* --- Slider (docs/components/slider.md, R49 / C18) --------------------------- */
|
|
1405
|
+
|
|
1406
|
+
/* .bw-slider is a span root holding a native <input type="range"> (SLD-001,
|
|
1407
|
+
* SLD-002). The block reads the role variables only (SLD-010). Size classes
|
|
1408
|
+
* re-point all five, same grammar as .bw-input--size-* (ADR-125). Track block
|
|
1409
|
+
* size is 0.2 x control height; thumb diameter is 0.5 x control height
|
|
1410
|
+
* (SLD-011). The fill is --bw-slider-percent (0-100), Progress convention
|
|
1411
|
+
* (SLD-017). --bw-slider-* geometry names are private to this block.
|
|
1412
|
+
*
|
|
1413
|
+
* Hit area (WCAG 2.5.8, SLD-052): the root is never shorter than 1.5rem; the
|
|
1414
|
+
* range input fills the root. */
|
|
1415
|
+
.bw-slider--size-xs {
|
|
1416
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
1417
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
1418
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
1419
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
1420
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
1421
|
+
}
|
|
1422
|
+
.bw-slider--size-sm {
|
|
1423
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
1424
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
1425
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
1426
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
1427
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
1428
|
+
}
|
|
1429
|
+
.bw-slider--size-md {
|
|
1430
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
1431
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
1432
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
1433
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
1434
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
1435
|
+
}
|
|
1436
|
+
.bw-slider--size-lg {
|
|
1437
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
1438
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
1439
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
1440
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
1441
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
1442
|
+
}
|
|
1443
|
+
.bw-slider--size-xl {
|
|
1444
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
1445
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
1446
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
1447
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
1448
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
1449
|
+
}
|
|
1450
|
+
.bw-slider {
|
|
1451
|
+
--bw-slider-track-block: calc(var(--bw-control-height) * 0.2);
|
|
1452
|
+
--bw-slider-thumb: calc(var(--bw-control-height) * 0.5);
|
|
1453
|
+
--bw-slider-percent: 0;
|
|
1454
|
+
--bw-slider-fill-dir: right;
|
|
1455
|
+
position: relative;
|
|
1456
|
+
display: block;
|
|
1457
|
+
inline-size: 100%;
|
|
1458
|
+
block-size: max(1.5rem, var(--bw-slider-thumb));
|
|
1459
|
+
}
|
|
1460
|
+
[dir="rtl"] .bw-slider {
|
|
1461
|
+
--bw-slider-fill-dir: left;
|
|
1462
|
+
}
|
|
1463
|
+
.bw-slider__input {
|
|
1464
|
+
-webkit-appearance: none;
|
|
1465
|
+
appearance: none;
|
|
1466
|
+
display: block;
|
|
1467
|
+
inline-size: 100%;
|
|
1468
|
+
block-size: 100%;
|
|
1469
|
+
margin: 0;
|
|
1470
|
+
padding: 0;
|
|
1471
|
+
background: transparent;
|
|
1472
|
+
cursor: pointer;
|
|
1473
|
+
vertical-align: middle;
|
|
1474
|
+
}
|
|
1475
|
+
.bw-slider__input:disabled {
|
|
1476
|
+
cursor: not-allowed;
|
|
1477
|
+
}
|
|
1478
|
+
.bw-slider__input::-webkit-slider-runnable-track {
|
|
1479
|
+
box-sizing: border-box;
|
|
1480
|
+
inline-size: 100%;
|
|
1481
|
+
block-size: var(--bw-slider-track-block);
|
|
1482
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1483
|
+
border-radius: var(--bw-radius-full);
|
|
1484
|
+
background: linear-gradient(
|
|
1485
|
+
to var(--bw-slider-fill-dir),
|
|
1486
|
+
var(--bw-color-accent) 0%,
|
|
1487
|
+
var(--bw-color-accent) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1488
|
+
var(--bw-color-surface-sunken) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1489
|
+
var(--bw-color-surface-sunken) 100%
|
|
1490
|
+
);
|
|
1491
|
+
transition: var(--bw-transition-colors);
|
|
1492
|
+
}
|
|
1493
|
+
.bw-slider__input::-webkit-slider-thumb {
|
|
1494
|
+
-webkit-appearance: none;
|
|
1495
|
+
appearance: none;
|
|
1496
|
+
box-sizing: border-box;
|
|
1497
|
+
inline-size: var(--bw-slider-thumb);
|
|
1498
|
+
block-size: var(--bw-slider-thumb);
|
|
1499
|
+
margin-block-start: calc((var(--bw-slider-track-block) - var(--bw-slider-thumb)) / 2);
|
|
1500
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1501
|
+
border-radius: var(--bw-radius-full);
|
|
1502
|
+
background: var(--bw-color-surface);
|
|
1503
|
+
box-shadow: var(--bw-elevation-1);
|
|
1504
|
+
transition: var(--bw-transition-colors);
|
|
1505
|
+
}
|
|
1506
|
+
.bw-slider__input::-moz-range-track {
|
|
1507
|
+
box-sizing: border-box;
|
|
1508
|
+
inline-size: 100%;
|
|
1509
|
+
block-size: var(--bw-slider-track-block);
|
|
1510
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1511
|
+
border-radius: var(--bw-radius-full);
|
|
1512
|
+
background: var(--bw-color-surface-sunken);
|
|
1513
|
+
transition: var(--bw-transition-colors);
|
|
1514
|
+
}
|
|
1515
|
+
.bw-slider__input::-moz-range-progress {
|
|
1516
|
+
block-size: var(--bw-slider-track-block);
|
|
1517
|
+
border-radius: var(--bw-radius-full);
|
|
1518
|
+
background: var(--bw-color-accent);
|
|
1519
|
+
transition: var(--bw-transition-colors);
|
|
1520
|
+
}
|
|
1521
|
+
.bw-slider__input::-moz-range-thumb {
|
|
1522
|
+
box-sizing: border-box;
|
|
1523
|
+
inline-size: var(--bw-slider-thumb);
|
|
1524
|
+
block-size: var(--bw-slider-thumb);
|
|
1525
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
1526
|
+
border-radius: var(--bw-radius-full);
|
|
1527
|
+
background: var(--bw-color-surface);
|
|
1528
|
+
box-shadow: var(--bw-elevation-1);
|
|
1529
|
+
transition: var(--bw-transition-colors);
|
|
1530
|
+
}
|
|
1531
|
+
.bw-slider__input:hover:where(:not(:disabled))::-webkit-slider-runnable-track {
|
|
1532
|
+
background: linear-gradient(
|
|
1533
|
+
to var(--bw-slider-fill-dir),
|
|
1534
|
+
var(--bw-color-accent-hover) 0%,
|
|
1535
|
+
var(--bw-color-accent-hover) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1536
|
+
var(--bw-color-surface-sunken) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1537
|
+
var(--bw-color-surface-sunken) 100%
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
.bw-slider__input:hover:where(:not(:disabled))::-webkit-slider-thumb {
|
|
1541
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
1542
|
+
}
|
|
1543
|
+
.bw-slider__input:hover:where(:not(:disabled))::-moz-range-progress {
|
|
1544
|
+
background: var(--bw-color-accent-hover);
|
|
1545
|
+
}
|
|
1546
|
+
.bw-slider__input:hover:where(:not(:disabled))::-moz-range-thumb {
|
|
1547
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
1548
|
+
}
|
|
1549
|
+
.bw-slider__input:focus-visible::-webkit-slider-thumb {
|
|
1550
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
1551
|
+
outline-offset: 2px;
|
|
1552
|
+
}
|
|
1553
|
+
.bw-slider__input:focus-visible::-moz-range-thumb {
|
|
1554
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
1555
|
+
outline-offset: 2px;
|
|
1556
|
+
}
|
|
1557
|
+
.bw-slider__input:disabled::-webkit-slider-runnable-track {
|
|
1558
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1559
|
+
background: linear-gradient(
|
|
1560
|
+
to var(--bw-slider-fill-dir),
|
|
1561
|
+
var(--bw-color-action-disabled-text) 0%,
|
|
1562
|
+
var(--bw-color-action-disabled-text) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1563
|
+
var(--bw-color-action-disabled-bg) calc(var(--bw-slider-percent, 0) * 1%),
|
|
1564
|
+
var(--bw-color-action-disabled-bg) 100%
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
.bw-slider__input:disabled::-webkit-slider-thumb {
|
|
1568
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1569
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1570
|
+
box-shadow: none;
|
|
1571
|
+
}
|
|
1572
|
+
.bw-slider__input:disabled::-moz-range-track {
|
|
1573
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1574
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1575
|
+
}
|
|
1576
|
+
.bw-slider__input:disabled::-moz-range-progress {
|
|
1577
|
+
background: var(--bw-color-action-disabled-text);
|
|
1578
|
+
}
|
|
1579
|
+
.bw-slider__input:disabled::-moz-range-thumb {
|
|
1580
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1581
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1582
|
+
box-shadow: none;
|
|
1583
|
+
}
|
|
1584
|
+
.bw-field--invalid .bw-slider__input:where(:not(:disabled))::-webkit-slider-runnable-track,
|
|
1585
|
+
.bw-slider__input[aria-invalid="true"]:where(:not(:disabled))::-webkit-slider-runnable-track {
|
|
1586
|
+
border-color: var(--bw-color-danger);
|
|
1587
|
+
}
|
|
1588
|
+
.bw-field--invalid .bw-slider__input:where(:not(:disabled))::-moz-range-track,
|
|
1589
|
+
.bw-slider__input[aria-invalid="true"]:where(:not(:disabled))::-moz-range-track {
|
|
1590
|
+
border-color: var(--bw-color-danger);
|
|
1591
|
+
}
|
|
1592
|
+
.bw-field--invalid .bw-slider__input:hover:where(:not(:disabled))::-webkit-slider-runnable-track,
|
|
1593
|
+
.bw-slider__input[aria-invalid="true"]:hover:where(:not(:disabled))::-webkit-slider-runnable-track {
|
|
1594
|
+
border-color: var(--bw-color-danger);
|
|
1595
|
+
}
|
|
1596
|
+
.bw-field--invalid .bw-slider__input:hover:where(:not(:disabled))::-moz-range-track,
|
|
1597
|
+
.bw-slider__input[aria-invalid="true"]:hover:where(:not(:disabled))::-moz-range-track {
|
|
1598
|
+
border-color: var(--bw-color-danger);
|
|
1599
|
+
}
|
|
1600
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1601
|
+
.bw-slider__input::-webkit-slider-runnable-track,
|
|
1602
|
+
.bw-slider__input::-webkit-slider-thumb,
|
|
1603
|
+
.bw-slider__input::-moz-range-track,
|
|
1604
|
+
.bw-slider__input::-moz-range-progress,
|
|
1605
|
+
.bw-slider__input::-moz-range-thumb {
|
|
1606
|
+
transition: none;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/* --- Copy button (docs/components/copy-button.md, R51 / C20) ---------------- */
|
|
1611
|
+
|
|
1612
|
+
/* First build of the missing copy-to-clipboard control. Ghost chrome, five
|
|
1613
|
+
* ADR-125 size steps via the control role variables only (CPY-010). Icon-only
|
|
1614
|
+
* is square at --bw-control-height; a labelled control keeps inline padding.
|
|
1615
|
+
* Colour is tokens only (CPY-012). */
|
|
1616
|
+
.bw-copy {
|
|
1617
|
+
/* Bare host is md: role variables default to the md step tokens so HTML
|
|
1618
|
+
* without a size class still has geometry (CPY-002). */
|
|
1619
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
1620
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
1621
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
1622
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
1623
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
1624
|
+
position: relative;
|
|
1625
|
+
display: inline-flex;
|
|
1626
|
+
align-items: center;
|
|
1627
|
+
justify-content: center;
|
|
1628
|
+
gap: var(--bw-control-gap);
|
|
1629
|
+
box-sizing: border-box;
|
|
1630
|
+
block-size: max(1.5rem, var(--bw-control-height));
|
|
1631
|
+
inline-size: max(1.5rem, var(--bw-control-height));
|
|
1632
|
+
padding-block: 0;
|
|
1633
|
+
padding-inline: 0;
|
|
1634
|
+
border: var(--bw-size-border-hairline) solid transparent;
|
|
1635
|
+
border-radius: var(--bw-component-button-radius);
|
|
1636
|
+
background: transparent;
|
|
1637
|
+
color: var(--bw-color-fg-muted);
|
|
1638
|
+
font: inherit;
|
|
1639
|
+
font-family: var(--bw-text-label-family);
|
|
1640
|
+
font-size: var(--bw-control-font-size);
|
|
1641
|
+
font-weight: var(--bw-text-label-weight);
|
|
1642
|
+
line-height: var(--bw-text-label-line-height);
|
|
1643
|
+
letter-spacing: var(--bw-text-label-tracking);
|
|
1644
|
+
white-space: nowrap;
|
|
1645
|
+
cursor: pointer;
|
|
1646
|
+
transition: var(--bw-transition-colors);
|
|
1647
|
+
}
|
|
1648
|
+
.bw-copy:has(.bw-copy__label) {
|
|
1649
|
+
inline-size: auto;
|
|
1650
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
1651
|
+
}
|
|
1652
|
+
.bw-copy:hover:where(:not(:disabled)) {
|
|
1653
|
+
background-color: var(--bw-state-hover-overlay);
|
|
1654
|
+
color: var(--bw-color-fg);
|
|
1655
|
+
}
|
|
1656
|
+
.bw-copy:active:where(:not(:disabled)) {
|
|
1657
|
+
background-color: var(--bw-state-active-overlay);
|
|
1658
|
+
}
|
|
1659
|
+
.bw-copy:focus-visible {
|
|
1660
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
1661
|
+
outline-offset: 2px;
|
|
1662
|
+
}
|
|
1663
|
+
.bw-copy:disabled {
|
|
1664
|
+
background: var(--bw-color-action-disabled-bg);
|
|
1665
|
+
color: var(--bw-color-action-disabled-text);
|
|
1666
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
1667
|
+
cursor: not-allowed;
|
|
1668
|
+
}
|
|
1669
|
+
.bw-copy__icon,
|
|
1670
|
+
.bw-copy__mark {
|
|
1671
|
+
display: inline-flex;
|
|
1672
|
+
align-items: center;
|
|
1673
|
+
justify-content: center;
|
|
1674
|
+
inline-size: var(--bw-control-icon-size);
|
|
1675
|
+
block-size: var(--bw-control-icon-size);
|
|
1676
|
+
color: inherit;
|
|
1677
|
+
flex-shrink: 0;
|
|
1678
|
+
}
|
|
1679
|
+
.bw-copy__icon > svg,
|
|
1680
|
+
.bw-copy__mark > svg {
|
|
1681
|
+
inline-size: 100%;
|
|
1682
|
+
block-size: 100%;
|
|
1683
|
+
fill: none;
|
|
1684
|
+
stroke: currentColor;
|
|
1685
|
+
stroke-width: 1.5;
|
|
1686
|
+
stroke-linecap: round;
|
|
1687
|
+
stroke-linejoin: round;
|
|
1688
|
+
}
|
|
1689
|
+
/* Outcome marks: shape change, not colour alone (CPY-051, CB-06). Idle shows
|
|
1690
|
+
* the consumer icon; copied shows the check; failed shows the cross. */
|
|
1691
|
+
.bw-copy__mark {
|
|
1692
|
+
display: none;
|
|
1693
|
+
}
|
|
1694
|
+
.bw-copy[data-bw-copy-state="copied"],
|
|
1695
|
+
.bw-copy[data-bw-copy-state="failed"] {
|
|
1696
|
+
color: var(--bw-color-fg);
|
|
1697
|
+
}
|
|
1698
|
+
.bw-copy[data-bw-copy-state="copied"] .bw-copy__icon,
|
|
1699
|
+
.bw-copy[data-bw-copy-state="failed"] .bw-copy__icon {
|
|
1700
|
+
display: none;
|
|
1701
|
+
}
|
|
1702
|
+
.bw-copy[data-bw-copy-state="copied"] .bw-copy__mark--done {
|
|
1703
|
+
display: inline-flex;
|
|
762
1704
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
background: var(--bw-color-action-disabled-text);
|
|
1705
|
+
.bw-copy[data-bw-copy-state="failed"] .bw-copy__mark--fail {
|
|
1706
|
+
display: inline-flex;
|
|
766
1707
|
}
|
|
767
|
-
|
|
768
|
-
|
|
1708
|
+
.bw-copy__label {
|
|
1709
|
+
color: inherit;
|
|
769
1710
|
}
|
|
770
1711
|
@media (prefers-reduced-motion: reduce) {
|
|
771
|
-
|
|
1712
|
+
.bw-copy {
|
|
772
1713
|
transition: none;
|
|
773
1714
|
}
|
|
774
1715
|
}
|
|
775
|
-
.bw-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
1716
|
+
.bw-copy--size-xs {
|
|
1717
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
1718
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
1719
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
1720
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
1721
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
779
1722
|
}
|
|
780
|
-
.bw-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1723
|
+
.bw-copy--size-sm {
|
|
1724
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
1725
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
1726
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
1727
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
1728
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
1729
|
+
}
|
|
1730
|
+
.bw-copy--size-md {
|
|
1731
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
1732
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
1733
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
1734
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
1735
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
1736
|
+
}
|
|
1737
|
+
.bw-copy--size-lg {
|
|
1738
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
1739
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
1740
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
1741
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
1742
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
1743
|
+
}
|
|
1744
|
+
.bw-copy--size-xl {
|
|
1745
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
1746
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
1747
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
1748
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
1749
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
784
1750
|
}
|
|
785
1751
|
|
|
786
1752
|
/* --- Theme switch (icvoss/django-brickwork#117) ----------------------------- */
|
|
@@ -998,9 +1964,15 @@ input.bw-toggle:disabled::before {
|
|
|
998
1964
|
}
|
|
999
1965
|
}
|
|
1000
1966
|
|
|
1001
|
-
.bw-field__help
|
|
1967
|
+
/* Help and hint are one treatment (FLD-003). Django emits .bw-field__help
|
|
1968
|
+
* (BoundField.help_text); React Hint and Free gallery markup emit
|
|
1969
|
+
* .bw-field__hint. Both paint as caption muted. The wave-b divergent
|
|
1970
|
+
* .bw-field__hint (body-sm size, extra margin) is removed. */
|
|
1971
|
+
.bw-field__help,
|
|
1972
|
+
.bw-field__hint {
|
|
1002
1973
|
margin: 0;
|
|
1003
1974
|
color: var(--bw-color-fg-muted);
|
|
1975
|
+
font-family: var(--bw-text-caption-family);
|
|
1004
1976
|
font-size: var(--bw-text-caption-size);
|
|
1005
1977
|
font-weight: var(--bw-text-caption-weight);
|
|
1006
1978
|
line-height: var(--bw-text-caption-line-height);
|
|
@@ -1013,6 +1985,7 @@ input.bw-toggle:disabled::before {
|
|
|
1013
1985
|
/* danger-fg, not raw danger: the smallest text on the form carries the most
|
|
1014
1986
|
* important message, so it gets the text-duty danger tier (AA at 12px). */
|
|
1015
1987
|
color: var(--bw-color-danger-fg);
|
|
1988
|
+
font-family: var(--bw-text-caption-family);
|
|
1016
1989
|
font-size: var(--bw-text-caption-size);
|
|
1017
1990
|
font-weight: var(--bw-text-caption-weight);
|
|
1018
1991
|
line-height: var(--bw-text-caption-line-height);
|
|
@@ -1059,7 +2032,7 @@ input.bw-toggle:disabled::before {
|
|
|
1059
2032
|
* fight (grid: capping a field's width mid-column) the row's own layout, so
|
|
1060
2033
|
* they are neutralised here and the row takes over spacing/sizing. */
|
|
1061
2034
|
.bw-form-fields--stacked .bw-field-row {
|
|
1062
|
-
margin-block-end: var(--bw-
|
|
2035
|
+
margin-block-end: var(--bw-size-gap-md);
|
|
1063
2036
|
}
|
|
1064
2037
|
.bw-form-fields--stacked .bw-field-row:last-child {
|
|
1065
2038
|
margin-block-end: 0;
|
|
@@ -1074,7 +2047,7 @@ input.bw-toggle:disabled::before {
|
|
|
1074
2047
|
.bw-field-row--grouped {
|
|
1075
2048
|
display: flex;
|
|
1076
2049
|
flex-wrap: wrap;
|
|
1077
|
-
gap: var(--bw-
|
|
2050
|
+
gap: var(--bw-size-gap-sm);
|
|
1078
2051
|
}
|
|
1079
2052
|
.bw-field-row--grouped .bw-field {
|
|
1080
2053
|
flex: 1 1 0;
|
|
@@ -1092,7 +2065,7 @@ input.bw-toggle:disabled::before {
|
|
|
1092
2065
|
.bw-form-fields--grid {
|
|
1093
2066
|
display: grid;
|
|
1094
2067
|
grid-template-columns: repeat(var(--bw-form-grid-columns, 2), minmax(0, 1fr));
|
|
1095
|
-
gap: var(--bw-
|
|
2068
|
+
gap: var(--bw-size-gap-md) var(--bw-size-gap-md);
|
|
1096
2069
|
max-inline-size: none;
|
|
1097
2070
|
}
|
|
1098
2071
|
.bw-form-fields--grid .bw-field-row {
|
|
@@ -1136,7 +2109,14 @@ input.bw-toggle:disabled::before {
|
|
|
1136
2109
|
color-mix(in oklab, var(--bw-color-fg) 10%, var(--bw-color-surface-sunken));
|
|
1137
2110
|
border-radius: var(--bw-radius-lg);
|
|
1138
2111
|
}
|
|
2112
|
+
/* Title row: h1 and at most one status Badge sit on one wrapping line;
|
|
2113
|
+
* description takes the full inline track beneath (H05 / R59, APP-009). */
|
|
1139
2114
|
.bw-page-header__titles {
|
|
2115
|
+
display: flex;
|
|
2116
|
+
flex-wrap: wrap;
|
|
2117
|
+
align-items: center;
|
|
2118
|
+
column-gap: var(--bw-space-3);
|
|
2119
|
+
row-gap: var(--bw-space-1);
|
|
1140
2120
|
flex: 1 1 12rem;
|
|
1141
2121
|
min-inline-size: 0;
|
|
1142
2122
|
}
|
|
@@ -1156,6 +2136,7 @@ input.bw-toggle:disabled::before {
|
|
|
1156
2136
|
letter-spacing: var(--bw-text-heading-xl-tracking);
|
|
1157
2137
|
}
|
|
1158
2138
|
.bw-page-header__description {
|
|
2139
|
+
flex: 1 1 100%;
|
|
1159
2140
|
margin: var(--bw-space-1) 0 0;
|
|
1160
2141
|
color: var(--bw-color-fg-muted);
|
|
1161
2142
|
font-size: var(--bw-text-body-md-size);
|
|
@@ -1294,40 +2275,26 @@ input.bw-toggle:disabled::before {
|
|
|
1294
2275
|
.bw-data-table-wrap {
|
|
1295
2276
|
overflow-x: auto;
|
|
1296
2277
|
background: var(--bw-color-surface);
|
|
1297
|
-
/* Edge + ambient match zero-kwargs .bw-card so the table reads on white;
|
|
1298
|
-
* sunken header, zebra, hover and selected stay on the inner rows. */
|
|
1299
2278
|
border: var(--bw-size-border-hairline) solid
|
|
1300
2279
|
color-mix(in oklab, var(--bw-color-fg) 12%, var(--bw-color-surface));
|
|
1301
2280
|
border-radius: var(--bw-radius-lg);
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
0 4px 14px -4px oklch(0 0 0 / 0.1);
|
|
1305
|
-
/* Wide tables scroll inside the card: thin, border-toned scrollbar so the
|
|
1306
|
-
* apparatus stays quieter than the data (decorative chrome). */
|
|
2281
|
+
/* Token-only elevation (CB-16): no raw oklch shadow. */
|
|
2282
|
+
box-shadow: var(--bw-elevation-1);
|
|
1307
2283
|
scrollbar-width: thin;
|
|
1308
2284
|
scrollbar-color: var(--bw-color-border) transparent;
|
|
1309
|
-
/* Paint containment: without it, an ancestor that still blows out (a
|
|
1310
|
-
* consumer's own wrapper, not just the .bw-card/.bw-section-stack fixed
|
|
1311
|
-
* above) can let this wrap's overflow paint outside its own box instead of
|
|
1312
|
-
* clipping to it, which is what let the wide table drag the PAGE sideways
|
|
1313
|
-
* rather than scrolling within its own card (icvoss/django-brickwork#136).
|
|
1314
|
-
* contain: paint guarantees this element is the clipping boundary for its
|
|
1315
|
-
* own descendants regardless of what an ancestor does. */
|
|
1316
2285
|
contain: paint;
|
|
1317
2286
|
}
|
|
1318
|
-
/* density="compact" (Beat Phase C): ops/console tables with tighter rows. */
|
|
1319
2287
|
.bw-data-table-wrap--density-compact .bw-data-table__th,
|
|
1320
2288
|
.bw-data-table-wrap--density-compact .bw-data-table__td {
|
|
1321
2289
|
padding-block: var(--bw-space-2);
|
|
1322
2290
|
padding-inline: var(--bw-space-3);
|
|
1323
|
-
font-size: var(--bw-text-body-sm-size);
|
|
1324
2291
|
}
|
|
1325
2292
|
.bw-data-table {
|
|
1326
2293
|
inline-size: 100%;
|
|
1327
2294
|
border-collapse: collapse;
|
|
1328
2295
|
}
|
|
1329
|
-
/*
|
|
1330
|
-
*
|
|
2296
|
+
/* APP-001 data-head: 12 px (--bw-font-size-xs), medium, normal tracking.
|
|
2297
|
+
* Named text.data-head lands with F02 / R29; this raise cites the tokens. */
|
|
1331
2298
|
.bw-data-table__th {
|
|
1332
2299
|
text-align: start;
|
|
1333
2300
|
padding: var(--bw-density-row-padding-block) var(--bw-density-row-padding-inline);
|
|
@@ -1335,16 +2302,25 @@ input.bw-toggle:disabled::before {
|
|
|
1335
2302
|
border-block-end: var(--bw-size-border-hairline) solid var(--bw-color-border-strong);
|
|
1336
2303
|
color: var(--bw-color-fg-muted);
|
|
1337
2304
|
font-size: var(--bw-font-size-xs);
|
|
1338
|
-
font-weight: var(--bw-font-weight-
|
|
1339
|
-
line-height: var(--bw-
|
|
1340
|
-
letter-spacing: var(--bw-font-tracking-
|
|
1341
|
-
text-transform:
|
|
2305
|
+
font-weight: var(--bw-font-weight-medium);
|
|
2306
|
+
line-height: var(--bw-font-line-height-normal);
|
|
2307
|
+
letter-spacing: var(--bw-font-tracking-normal);
|
|
2308
|
+
text-transform: none;
|
|
2309
|
+
}
|
|
2310
|
+
.bw-data-table__caption {
|
|
2311
|
+
caption-side: top;
|
|
2312
|
+
text-align: start;
|
|
2313
|
+
padding: var(--bw-density-row-padding-block) var(--bw-density-row-padding-inline);
|
|
2314
|
+
color: var(--bw-color-fg-muted);
|
|
2315
|
+
font-size: var(--bw-font-size-xs);
|
|
2316
|
+
font-weight: var(--bw-font-weight-medium);
|
|
2317
|
+
}
|
|
2318
|
+
.bw-data-table__footnote {
|
|
2319
|
+
padding: var(--bw-density-row-padding-block) var(--bw-density-row-padding-inline);
|
|
2320
|
+
color: var(--bw-color-fg-muted);
|
|
2321
|
+
font-size: var(--bw-font-size-xs);
|
|
2322
|
+
border-block-start: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
1342
2323
|
}
|
|
1343
|
-
/* icvoss/django-brickwork#208: inline-flex with no minimum sized the target
|
|
1344
|
-
* to whatever the label's line-height gave it (measured 74x16 at 375px),
|
|
1345
|
-
* under the WCAG 2.5.8 floor. min-block-size only: the label text already
|
|
1346
|
-
* centres via align-items, so this changes no visual weight, just the
|
|
1347
|
-
* clickable/tappable extent above and below the text. */
|
|
1348
2324
|
.bw-data-table__sort {
|
|
1349
2325
|
display: inline-flex;
|
|
1350
2326
|
align-items: center;
|
|
@@ -1357,11 +2333,13 @@ input.bw-toggle:disabled::before {
|
|
|
1357
2333
|
.bw-data-table__sort:hover {
|
|
1358
2334
|
color: var(--bw-color-accent);
|
|
1359
2335
|
}
|
|
1360
|
-
/* Idle sort
|
|
1361
|
-
* hover and (for keyboard users) focus-visible; the affordance also stays in
|
|
1362
|
-
* the accessible name. Opacity transition only, so the reduced-motion floor
|
|
1363
|
-
* caps it globally. */
|
|
2336
|
+
/* Idle sort chevron: CSS triangle, no letter glyph (CB-14). */
|
|
1364
2337
|
.bw-data-table__sort-idle {
|
|
2338
|
+
display: inline-block;
|
|
2339
|
+
inline-size: 0;
|
|
2340
|
+
block-size: 0;
|
|
2341
|
+
border-inline: 0.25rem solid transparent;
|
|
2342
|
+
border-block-start: 0.3rem solid currentColor;
|
|
1365
2343
|
opacity: 0;
|
|
1366
2344
|
transition: var(--bw-transition-opacity);
|
|
1367
2345
|
}
|
|
@@ -1372,40 +2350,28 @@ input.bw-toggle:disabled::before {
|
|
|
1372
2350
|
.bw-data-table__td {
|
|
1373
2351
|
padding: var(--bw-density-row-padding-block) var(--bw-density-row-padding-inline);
|
|
1374
2352
|
border-block-end: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
1375
|
-
font-size: var(--bw-
|
|
1376
|
-
line-height: var(--bw-
|
|
1377
|
-
font-variant-numeric: tabular-nums;
|
|
2353
|
+
font-size: var(--bw-font-size-xs);
|
|
2354
|
+
line-height: var(--bw-font-line-height-normal);
|
|
2355
|
+
font-variant-numeric: tabular-nums;
|
|
2356
|
+
color: var(--bw-color-fg);
|
|
1378
2357
|
}
|
|
1379
|
-
/* The last row's bottom hairline would double against the card's own border. */
|
|
1380
2358
|
.bw-data-table__row:last-child > .bw-data-table__td,
|
|
1381
2359
|
.bw-data-table__row:last-child > .bw-data-table__th--label {
|
|
1382
2360
|
border-block-end: 0;
|
|
1383
2361
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
stripes. */
|
|
1389
|
-
.bw-data-table:not(.bw-data-table--definition) .bw-data-table__row:nth-child(even) {
|
|
2362
|
+
.bw-data-table:not(.bw-data-table--definition)
|
|
2363
|
+
.bw-data-table__row:where(
|
|
2364
|
+
:not(.bw-data-table__row--group):not(.bw-data-table__row--group-child):not(.bw-data-table__row--totals)
|
|
2365
|
+
):nth-child(even) {
|
|
1390
2366
|
background-color: var(--bw-color-surface-sunken);
|
|
1391
2367
|
}
|
|
1392
|
-
/* Selected row (records rows carry the hook): equal specificity to the zebra
|
|
1393
|
-
rule, later in source order, so selection beats the stripe; hover still
|
|
1394
|
-
layers its overlay image on top. */
|
|
1395
2368
|
.bw-data-table:not(.bw-data-table--definition) .bw-data-table__row.bw-data-table__row--selected {
|
|
1396
2369
|
background-color: var(--bw-state-selected-bg);
|
|
1397
2370
|
}
|
|
1398
|
-
.bw-data-table:not(.bw-data-table--definition) .bw-data-table__row:hover
|
|
2371
|
+
.bw-data-table:not(.bw-data-table--definition) .bw-data-table__row:hover,
|
|
2372
|
+
.bw-data-table:not(.bw-data-table--definition) .bw-data-table__row:focus-within {
|
|
1399
2373
|
background-image: linear-gradient(var(--bw-state-hover-overlay), var(--bw-state-hover-overlay));
|
|
1400
2374
|
}
|
|
1401
|
-
|
|
1402
|
-
/* A clickable record row (row.url, #10): the row-link fills its cell and
|
|
1403
|
-
inherits colour, so the whole first cell is the target and the row reads as
|
|
1404
|
-
actionable. The hover already comes from the records-variant row hover.
|
|
1405
|
-
min-block-size (#208): the compact density's row padding leaves less than
|
|
1406
|
-
24px of line-height alone, so the row-link's own tap target fell under
|
|
1407
|
-
the WCAG 2.5.8 floor there; comfortable/spacious density already clear it
|
|
1408
|
-
without this, so the floor is a no-op visual change for them. */
|
|
1409
2375
|
.bw-data-table__row-link {
|
|
1410
2376
|
display: block;
|
|
1411
2377
|
min-block-size: 1.5rem;
|
|
@@ -1415,21 +2381,123 @@ input.bw-toggle:disabled::before {
|
|
|
1415
2381
|
.bw-data-table__row-link:hover {
|
|
1416
2382
|
text-decoration: underline;
|
|
1417
2383
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
2384
|
+
.bw-data-table__row--group > .bw-data-table__td,
|
|
2385
|
+
.bw-data-table__row--group > .bw-data-table__th {
|
|
2386
|
+
background: var(--bw-color-surface-sunken);
|
|
2387
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
2388
|
+
}
|
|
2389
|
+
.bw-data-table__group-toggle {
|
|
2390
|
+
display: inline-flex;
|
|
2391
|
+
align-items: center;
|
|
2392
|
+
gap: var(--bw-space-2);
|
|
2393
|
+
min-block-size: 1.5rem;
|
|
2394
|
+
padding: 0;
|
|
2395
|
+
border: 0;
|
|
2396
|
+
background: transparent;
|
|
2397
|
+
color: inherit;
|
|
2398
|
+
font: inherit;
|
|
2399
|
+
cursor: pointer;
|
|
2400
|
+
}
|
|
2401
|
+
.bw-data-table__group-toggle::before {
|
|
2402
|
+
content: "";
|
|
2403
|
+
inline-size: 0;
|
|
2404
|
+
block-size: 0;
|
|
2405
|
+
border-block: 0.25rem solid transparent;
|
|
2406
|
+
border-inline-start: 0.3rem solid currentColor;
|
|
2407
|
+
transition: var(--bw-transition-transform);
|
|
2408
|
+
}
|
|
2409
|
+
.bw-data-table__group-toggle[aria-expanded="true"]::before {
|
|
2410
|
+
transform: rotate(90deg);
|
|
2411
|
+
}
|
|
2412
|
+
.bw-data-table__row--group-child[hidden] {
|
|
2413
|
+
display: none;
|
|
2414
|
+
}
|
|
2415
|
+
.bw-data-table__row--totals > .bw-data-table__td,
|
|
2416
|
+
.bw-data-table__row--totals > .bw-data-table__th {
|
|
2417
|
+
background: color-mix(in oklab, var(--bw-color-accent) 8%, var(--bw-color-surface));
|
|
2418
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
2419
|
+
border-block-start: var(--bw-size-border-hairline) solid var(--bw-color-border-strong);
|
|
2420
|
+
}
|
|
2421
|
+
.bw-data-table__entity {
|
|
2422
|
+
display: inline-flex;
|
|
2423
|
+
align-items: center;
|
|
2424
|
+
gap: var(--bw-space-2);
|
|
2425
|
+
min-inline-size: 0;
|
|
2426
|
+
}
|
|
2427
|
+
.bw-data-table__entity-mark {
|
|
2428
|
+
flex: 0 0 auto;
|
|
2429
|
+
inline-size: var(--bw-space-2);
|
|
2430
|
+
block-size: var(--bw-space-2);
|
|
2431
|
+
border-radius: var(--bw-radius-full);
|
|
2432
|
+
background: var(--bw-color-chart-1);
|
|
2433
|
+
}
|
|
2434
|
+
/* Glyph form (APP-008): short letter mark (1-2 chars). Colour is the text;
|
|
2435
|
+
* the surface stays bordered so colour is never the only cue. Empty marks
|
|
2436
|
+
* keep the swatch treatment above. */
|
|
2437
|
+
.bw-data-table__entity-mark:not(:empty) {
|
|
2438
|
+
display: inline-grid;
|
|
2439
|
+
place-items: center;
|
|
2440
|
+
inline-size: 1.8125rem;
|
|
2441
|
+
block-size: 1.8125rem;
|
|
2442
|
+
border-radius: var(--bw-radius-md);
|
|
2443
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
2444
|
+
background: var(--bw-color-surface);
|
|
2445
|
+
color: var(--bw-color-chart-1);
|
|
2446
|
+
font-size: var(--bw-font-size-xs);
|
|
2447
|
+
font-weight: var(--bw-font-weight-bold);
|
|
2448
|
+
line-height: 1;
|
|
2449
|
+
}
|
|
2450
|
+
.bw-data-table__entity-mark--chart-1 { background: var(--bw-color-chart-1); }
|
|
2451
|
+
.bw-data-table__entity-mark--chart-2 { background: var(--bw-color-chart-2); }
|
|
2452
|
+
.bw-data-table__entity-mark--chart-3 { background: var(--bw-color-chart-3); }
|
|
2453
|
+
.bw-data-table__entity-mark--chart-4 { background: var(--bw-color-chart-4); }
|
|
2454
|
+
.bw-data-table__entity-mark--chart-5 { background: var(--bw-color-chart-5); }
|
|
2455
|
+
.bw-data-table__entity-mark--chart-6 { background: var(--bw-color-chart-6); }
|
|
2456
|
+
.bw-data-table__entity-mark--chart-7 { background: var(--bw-color-chart-7); }
|
|
2457
|
+
.bw-data-table__entity-mark--chart-8 { background: var(--bw-color-chart-8); }
|
|
2458
|
+
.bw-data-table__entity-mark--chart-1:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-1); }
|
|
2459
|
+
.bw-data-table__entity-mark--chart-2:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-2); }
|
|
2460
|
+
.bw-data-table__entity-mark--chart-3:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-3); }
|
|
2461
|
+
.bw-data-table__entity-mark--chart-4:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-4); }
|
|
2462
|
+
.bw-data-table__entity-mark--chart-5:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-5); }
|
|
2463
|
+
.bw-data-table__entity-mark--chart-6:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-6); }
|
|
2464
|
+
.bw-data-table__entity-mark--chart-7:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-7); }
|
|
2465
|
+
.bw-data-table__entity-mark--chart-8:not(:empty) { background: var(--bw-color-surface); color: var(--bw-color-chart-8); }
|
|
2466
|
+
.bw-data-table__entity-text {
|
|
2467
|
+
display: grid;
|
|
2468
|
+
min-inline-size: 0;
|
|
2469
|
+
}
|
|
2470
|
+
.bw-data-table__entity-label {
|
|
2471
|
+
overflow: hidden;
|
|
2472
|
+
text-overflow: ellipsis;
|
|
2473
|
+
white-space: nowrap;
|
|
2474
|
+
}
|
|
2475
|
+
.bw-data-table__entity-subline {
|
|
2476
|
+
color: var(--bw-color-fg-muted);
|
|
2477
|
+
font-size: var(--bw-font-size-xs);
|
|
2478
|
+
}
|
|
2479
|
+
.bw-data-table__delta {
|
|
2480
|
+
display: inline-flex;
|
|
2481
|
+
align-items: center;
|
|
2482
|
+
gap: var(--bw-space-1);
|
|
2483
|
+
}
|
|
2484
|
+
.bw-data-table__na {
|
|
2485
|
+
display: grid;
|
|
2486
|
+
}
|
|
2487
|
+
.bw-data-table__na-label {
|
|
2488
|
+
color: var(--bw-color-fg-muted);
|
|
2489
|
+
font-variant-numeric: normal;
|
|
2490
|
+
}
|
|
2491
|
+
.bw-data-table__na-reason {
|
|
2492
|
+
color: var(--bw-color-fg-muted);
|
|
2493
|
+
font-size: var(--bw-font-size-xs);
|
|
2494
|
+
}
|
|
1423
2495
|
.bw-data-table--definition {
|
|
1424
2496
|
inline-size: 100%;
|
|
1425
2497
|
}
|
|
1426
|
-
/* A key/value fact card hugs its facts rather than stretching the workspace.
|
|
1427
|
-
Graceful no-op in engines without :has(). */
|
|
1428
2498
|
.bw-data-table-wrap:has(.bw-data-table--definition) {
|
|
1429
2499
|
max-inline-size: var(--bw-size-max-width-prose);
|
|
1430
2500
|
}
|
|
1431
|
-
/* The value is the payload: muted-regular key against medium value gives the
|
|
1432
|
-
quiet two-rank rhythm. */
|
|
1433
2501
|
.bw-data-table--definition .bw-data-table__td {
|
|
1434
2502
|
font-weight: var(--bw-font-weight-medium);
|
|
1435
2503
|
}
|
|
@@ -1441,20 +2509,12 @@ input.bw-toggle:disabled::before {
|
|
|
1441
2509
|
padding-inline-end: var(--bw-space-6);
|
|
1442
2510
|
vertical-align: baseline;
|
|
1443
2511
|
color: var(--bw-color-fg-muted);
|
|
1444
|
-
font-size: var(--bw-
|
|
1445
|
-
line-height: var(--bw-
|
|
1446
|
-
|
|
1447
|
-
row key, not chrome, so it keeps the plain body-sm treatment. */
|
|
1448
|
-
font-weight: var(--bw-text-label-weight);
|
|
2512
|
+
font-size: var(--bw-font-size-xs);
|
|
2513
|
+
line-height: var(--bw-font-line-height-normal);
|
|
2514
|
+
font-weight: var(--bw-font-weight-medium);
|
|
1449
2515
|
letter-spacing: var(--bw-font-tracking-normal);
|
|
1450
2516
|
text-transform: none;
|
|
1451
2517
|
}
|
|
1452
|
-
|
|
1453
|
-
/* --- Data table: bulk selection, sticky header, responsive (brickwork#54) -- */
|
|
1454
|
-
|
|
1455
|
-
/* The leading checkbox column: 1% width hugs the control (the __th--label
|
|
1456
|
-
* inline-size:1% trick reused), centred so it does not drag the header text
|
|
1457
|
-
* baseline off the other columns. */
|
|
1458
2518
|
.bw-data-table__th--select,
|
|
1459
2519
|
.bw-data-table__td--select {
|
|
1460
2520
|
inline-size: 1%;
|
|
@@ -1462,9 +2522,6 @@ input.bw-toggle:disabled::before {
|
|
|
1462
2522
|
text-align: center;
|
|
1463
2523
|
vertical-align: middle;
|
|
1464
2524
|
}
|
|
1465
|
-
/* Column alignment vocabulary (icvoss/django-brickwork#522): closed set
|
|
1466
|
-
* start (default, no modifier) | center | end, applied to both header and
|
|
1467
|
-
* body cells from the column dict's align key. */
|
|
1468
2525
|
.bw-data-table__th--center,
|
|
1469
2526
|
.bw-data-table__td--center {
|
|
1470
2527
|
text-align: center;
|
|
@@ -1474,14 +2531,6 @@ input.bw-toggle:disabled::before {
|
|
|
1474
2531
|
text-align: end;
|
|
1475
2532
|
font-variant-numeric: tabular-nums;
|
|
1476
2533
|
}
|
|
1477
|
-
|
|
1478
|
-
/* loading=True skeleton (icvoss/django-brickwork#137): without padding of its
|
|
1479
|
-
* own the placeholder bars sit flush to the wrap's card border, then jump
|
|
1480
|
-
* inward once real rows arrive with their __td/__th row-density padding. Uses
|
|
1481
|
-
* the same row-density tokens as the real cells so the loading and loaded
|
|
1482
|
-
* states share one inset, and .bw-skeleton-group's own stack-with-gap shape
|
|
1483
|
-
* (flex column, --bw-space-2 gap) so the bars read as the same house pattern
|
|
1484
|
-
* for stacked skeletons rather than a one-off. */
|
|
1485
2534
|
.bw-data-table__skeleton {
|
|
1486
2535
|
display: flex;
|
|
1487
2536
|
flex-direction: column;
|
|
@@ -1489,31 +2538,14 @@ input.bw-toggle:disabled::before {
|
|
|
1489
2538
|
padding-block: var(--bw-density-row-padding-block);
|
|
1490
2539
|
padding-inline: var(--bw-density-row-padding-inline);
|
|
1491
2540
|
}
|
|
1492
|
-
|
|
1493
|
-
/* scroll_container / sticky_header: the wrap keeps its own scroll (unchanged
|
|
1494
|
-
* from the plain wrap), the <thead> pins to the top of that scroll region.
|
|
1495
|
-
* The header cells need an opaque background of their own (they already
|
|
1496
|
-
* carry --bw-color-surface-sunken) so scrolled body rows do not show through
|
|
1497
|
-
* underneath the pinned band; the z-index keeps it above the body but below
|
|
1498
|
-
* any overlay chrome (the shared --bw-z-sticky token, the same one the
|
|
1499
|
-
* shell topbar uses, so a table's sticky head never fights the app chrome
|
|
1500
|
-
* for stacking). */
|
|
1501
2541
|
.bw-data-table-wrap--sticky {
|
|
1502
2542
|
max-block-size: 100%;
|
|
1503
2543
|
}
|
|
1504
|
-
.bw-data-table-wrap--sticky .bw-data-table__th {
|
|
2544
|
+
.bw-data-table-wrap--sticky thead .bw-data-table__th {
|
|
1505
2545
|
position: sticky;
|
|
1506
2546
|
inset-block-start: 0;
|
|
1507
2547
|
z-index: var(--bw-z-sticky);
|
|
1508
2548
|
}
|
|
1509
|
-
|
|
1510
|
-
/* responsive="stack": below the breakpoint each row becomes a labelled card
|
|
1511
|
-
* (data-label per cell, stamped by the template from the column list) and
|
|
1512
|
-
* the header row is hidden (the labels replace it). Above the breakpoint
|
|
1513
|
-
* this is a no-op: the table renders exactly as the scroll default. The
|
|
1514
|
-
* breakpoint matches the shell's own mobile cut (DESIGN.md's sidebar
|
|
1515
|
-
* collapse breakpoint), so a table's card mode and the shell's mobile nav
|
|
1516
|
-
* change together. */
|
|
1517
2549
|
@media (width < --theme(--breakpoint-md)) {
|
|
1518
2550
|
.bw-data-table--stack thead {
|
|
1519
2551
|
position: absolute;
|
|
@@ -1546,19 +2578,14 @@ input.bw-toggle:disabled::before {
|
|
|
1546
2578
|
border-block-end: 0;
|
|
1547
2579
|
text-align: end;
|
|
1548
2580
|
}
|
|
1549
|
-
/* The stamped label reads as the row's own column key, in the same muted
|
|
1550
|
-
* voice _data_table.html--definition uses for its row headers, so a
|
|
1551
|
-
* stacked card and a definition table share one "key: value" language. */
|
|
1552
2581
|
.bw-data-table--stack .bw-data-table__td[data-label]::before {
|
|
1553
2582
|
content: attr(data-label);
|
|
1554
2583
|
flex: 0 0 auto;
|
|
1555
2584
|
color: var(--bw-color-fg-muted);
|
|
1556
|
-
font-size: var(--bw-
|
|
2585
|
+
font-size: var(--bw-font-size-xs);
|
|
1557
2586
|
font-weight: var(--bw-font-weight-medium);
|
|
1558
2587
|
text-align: start;
|
|
1559
2588
|
}
|
|
1560
|
-
/* The select column carries no data-label (it is a control, not a fact);
|
|
1561
|
-
* it stays a plain leading row instead of a fake "key: value" pair. */
|
|
1562
2589
|
.bw-data-table--stack .bw-data-table__td--select {
|
|
1563
2590
|
justify-content: flex-start;
|
|
1564
2591
|
}
|
|
@@ -2020,7 +3047,7 @@ button.bw-account-menu__item {
|
|
|
2020
3047
|
}
|
|
2021
3048
|
.bw-skeleton--row {
|
|
2022
3049
|
inline-size: var(--bw-skeleton-w, 100%);
|
|
2023
|
-
block-size: var(--bw-skeleton-h, var(--bw-
|
|
3050
|
+
block-size: var(--bw-skeleton-h, var(--bw-control-height));
|
|
2024
3051
|
margin-block-end: var(--bw-space-2);
|
|
2025
3052
|
}
|
|
2026
3053
|
/* Filled rectangle (0.12.0, #56): a chart/image placeholder with no natural
|
|
@@ -2067,15 +3094,36 @@ button.bw-account-menu__item {
|
|
|
2067
3094
|
gap: var(--bw-space-2);
|
|
2068
3095
|
}
|
|
2069
3096
|
.bw-progress__track {
|
|
3097
|
+
position: relative;
|
|
2070
3098
|
flex: 1 1 auto;
|
|
2071
3099
|
block-size: var(--bw-component-progress-track-height);
|
|
2072
3100
|
background: var(--bw-color-surface-sunken);
|
|
2073
3101
|
border-radius: var(--bw-radius-full);
|
|
3102
|
+
/* Default track clips the fill to the trough. When an elapsed/pace marker
|
|
3103
|
+
* is present (APP-010), overflow must be visible so the tick can sit
|
|
3104
|
+
* slightly proud of the track. */
|
|
2074
3105
|
overflow: hidden;
|
|
2075
3106
|
/* The track's own visible contrast against the fill is the non-colour
|
|
2076
3107
|
* signal STA-007 requires: a sunken trough is legible even if the fill
|
|
2077
3108
|
* hue is indistinguishable to the viewer. */
|
|
2078
3109
|
}
|
|
3110
|
+
.bw-progress__track:has(> .bw-progress__elapsed) {
|
|
3111
|
+
overflow: visible;
|
|
3112
|
+
}
|
|
3113
|
+
/* Pace marker (APP-010 / R25): a 2px tick at --bw-progress-elapsed (0-100).
|
|
3114
|
+
* Sibling of the fill inside the track. aria-hidden: the progressbar's
|
|
3115
|
+
* accessible name states both used and elapsed. */
|
|
3116
|
+
.bw-progress__elapsed {
|
|
3117
|
+
position: absolute;
|
|
3118
|
+
inset-block-start: -0.2rem;
|
|
3119
|
+
inset-inline-start: calc(var(--bw-progress-elapsed, 0) * 1%);
|
|
3120
|
+
inline-size: 0.125rem;
|
|
3121
|
+
block-size: calc(var(--bw-component-progress-track-height) + 0.4rem);
|
|
3122
|
+
background: var(--bw-color-fg-muted);
|
|
3123
|
+
border-radius: var(--bw-radius-full);
|
|
3124
|
+
transform: translateX(-50%);
|
|
3125
|
+
pointer-events: none;
|
|
3126
|
+
}
|
|
2079
3127
|
.bw-progress__fill {
|
|
2080
3128
|
block-size: 100%;
|
|
2081
3129
|
background: var(--bw-color-accent);
|
|
@@ -2089,32 +3137,163 @@ button.bw-account-menu__item {
|
|
|
2089
3137
|
width: calc(var(--bw-progress-value, 0) * 1%);
|
|
2090
3138
|
transition: width var(--bw-duration-normal) var(--bw-ease-standard);
|
|
2091
3139
|
}
|
|
2092
|
-
.bw-progress__value {
|
|
2093
|
-
color: var(--bw-color-fg-muted);
|
|
2094
|
-
font-size: var(--bw-text-caption-size);
|
|
2095
|
-
font-weight: var(--bw-text-caption-weight);
|
|
2096
|
-
line-height: var(--bw-text-caption-line-height);
|
|
2097
|
-
font-variant-numeric: tabular-nums;
|
|
2098
|
-
white-space: nowrap;
|
|
3140
|
+
.bw-progress__value {
|
|
3141
|
+
color: var(--bw-color-fg-muted);
|
|
3142
|
+
font-size: var(--bw-text-caption-size);
|
|
3143
|
+
font-weight: var(--bw-text-caption-weight);
|
|
3144
|
+
line-height: var(--bw-text-caption-line-height);
|
|
3145
|
+
font-variant-numeric: tabular-nums;
|
|
3146
|
+
white-space: nowrap;
|
|
3147
|
+
}
|
|
3148
|
+
/* Indeterminate: a fixed-width segment sweeps the track. Gated behind
|
|
3149
|
+
* no-preference (STA-005); reduced motion falls back to a static partial
|
|
3150
|
+
* fill (below) rather than a frozen mid-sweep segment, so "work is in
|
|
3151
|
+
* progress" still reads without relying on the animation. */
|
|
3152
|
+
.bw-progress__fill--indeterminate {
|
|
3153
|
+
width: 40%;
|
|
3154
|
+
}
|
|
3155
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
3156
|
+
.bw-progress__fill--indeterminate {
|
|
3157
|
+
animation: bw-progress-sweep var(--bw-duration-shimmer) var(--bw-ease-standard) infinite;
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
@keyframes bw-progress-sweep {
|
|
3161
|
+
0% {
|
|
3162
|
+
margin-inline-start: -40%;
|
|
3163
|
+
}
|
|
3164
|
+
100% {
|
|
3165
|
+
margin-inline-start: 100%;
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
/* --- Stat summary strip (APP-010 second tier) ------------------------------- */
|
|
3172
|
+
|
|
3173
|
+
/* Plain supporting metrics under a primary bw-stat-grid. Hairline column
|
|
3174
|
+
* dividers; not a card and not the marketing bw-stat-band. */
|
|
3175
|
+
.bw-stat-summary {
|
|
3176
|
+
display: grid;
|
|
3177
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3178
|
+
margin-block: var(--bw-space-4) var(--bw-space-5);
|
|
3179
|
+
}
|
|
3180
|
+
.bw-stat-summary > * {
|
|
3181
|
+
display: flex;
|
|
3182
|
+
flex-wrap: wrap;
|
|
3183
|
+
align-items: baseline;
|
|
3184
|
+
gap: var(--bw-space-2);
|
|
3185
|
+
padding-inline: var(--bw-space-4);
|
|
3186
|
+
border-inline-end: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
3187
|
+
}
|
|
3188
|
+
.bw-stat-summary > *:first-child {
|
|
3189
|
+
padding-inline-start: 0;
|
|
3190
|
+
}
|
|
3191
|
+
.bw-stat-summary > *:last-child {
|
|
3192
|
+
border-inline-end: 0;
|
|
3193
|
+
}
|
|
3194
|
+
.bw-stat-summary__label {
|
|
3195
|
+
color: var(--bw-color-fg-muted);
|
|
3196
|
+
font-size: var(--bw-font-size-xs);
|
|
3197
|
+
}
|
|
3198
|
+
.bw-stat-summary__value {
|
|
3199
|
+
font-size: var(--bw-font-size-sm);
|
|
3200
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
3201
|
+
font-variant-numeric: tabular-nums;
|
|
3202
|
+
color: var(--bw-color-fg);
|
|
3203
|
+
}
|
|
3204
|
+
@media (width < 48rem) {
|
|
3205
|
+
.bw-stat-summary {
|
|
3206
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3207
|
+
row-gap: var(--bw-space-3);
|
|
3208
|
+
}
|
|
3209
|
+
.bw-stat-summary > *:nth-child(2) {
|
|
3210
|
+
border-inline-end: 0;
|
|
3211
|
+
}
|
|
3212
|
+
.bw-stat-summary > *:nth-child(3) {
|
|
3213
|
+
padding-inline-start: 0;
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
/* --- Reporting window control (APP craft date chip) ------------------------- */
|
|
3218
|
+
|
|
3219
|
+
.bw-window-control {
|
|
3220
|
+
display: inline-flex;
|
|
3221
|
+
align-items: center;
|
|
3222
|
+
gap: var(--bw-space-2);
|
|
3223
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
3224
|
+
border-radius: var(--bw-radius-md);
|
|
3225
|
+
background: var(--bw-color-surface);
|
|
3226
|
+
padding: var(--bw-space-2) var(--bw-space-3);
|
|
3227
|
+
color: var(--bw-color-fg);
|
|
3228
|
+
}
|
|
3229
|
+
.bw-window-control__icon {
|
|
3230
|
+
display: inline-flex;
|
|
3231
|
+
color: var(--bw-color-fg-muted);
|
|
3232
|
+
flex-shrink: 0;
|
|
3233
|
+
}
|
|
3234
|
+
.bw-window-control select,
|
|
3235
|
+
.bw-window-control .bw-select {
|
|
3236
|
+
border: 0;
|
|
3237
|
+
background: transparent;
|
|
3238
|
+
color: inherit;
|
|
3239
|
+
font: inherit;
|
|
3240
|
+
font-size: var(--bw-font-size-sm);
|
|
3241
|
+
padding: 0 var(--bw-space-1);
|
|
3242
|
+
max-inline-size: 100%;
|
|
3243
|
+
}
|
|
3244
|
+
.bw-window-control__stack {
|
|
3245
|
+
display: flex;
|
|
3246
|
+
flex-direction: column;
|
|
3247
|
+
align-items: flex-end;
|
|
3248
|
+
gap: var(--bw-space-1);
|
|
3249
|
+
}
|
|
3250
|
+
.bw-window-control__hint {
|
|
3251
|
+
margin: 0;
|
|
3252
|
+
color: var(--bw-color-fg-muted);
|
|
3253
|
+
font-size: var(--bw-font-size-xs);
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
/* --- Insight notes (APP craft under dense tables) --------------------------- */
|
|
3257
|
+
|
|
3258
|
+
.bw-insight-grid {
|
|
3259
|
+
display: grid;
|
|
3260
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
3261
|
+
gap: var(--bw-space-4);
|
|
3262
|
+
}
|
|
3263
|
+
.bw-insight {
|
|
3264
|
+
display: flex;
|
|
3265
|
+
align-items: flex-start;
|
|
3266
|
+
gap: var(--bw-space-3);
|
|
3267
|
+
padding: var(--bw-space-3) var(--bw-space-4);
|
|
3268
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
3269
|
+
border-radius: var(--bw-radius-md);
|
|
3270
|
+
background: var(--bw-color-surface);
|
|
2099
3271
|
}
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
3272
|
+
.bw-insight__icon {
|
|
3273
|
+
display: grid;
|
|
3274
|
+
place-items: center;
|
|
3275
|
+
inline-size: 1.7rem;
|
|
3276
|
+
block-size: 1.7rem;
|
|
3277
|
+
border-radius: var(--bw-radius-md);
|
|
3278
|
+
background: color-mix(in oklab, var(--bw-color-accent) 16%, var(--bw-color-surface));
|
|
3279
|
+
color: var(--bw-color-accent);
|
|
3280
|
+
flex-shrink: 0;
|
|
2106
3281
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
3282
|
+
.bw-insight__title {
|
|
3283
|
+
margin: 0 0 var(--bw-space-1);
|
|
3284
|
+
font-size: var(--bw-font-size-xs);
|
|
3285
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
3286
|
+
color: var(--bw-color-fg);
|
|
2111
3287
|
}
|
|
2112
|
-
|
|
2113
|
-
0
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
3288
|
+
.bw-insight__body {
|
|
3289
|
+
margin: 0;
|
|
3290
|
+
color: var(--bw-color-fg-muted);
|
|
3291
|
+
font-size: var(--bw-font-size-xs);
|
|
3292
|
+
line-height: 1.65;
|
|
3293
|
+
}
|
|
3294
|
+
@media (width < 64rem) {
|
|
3295
|
+
.bw-insight-grid {
|
|
3296
|
+
grid-template-columns: 1fr;
|
|
2118
3297
|
}
|
|
2119
3298
|
}
|
|
2120
3299
|
|
|
@@ -2147,10 +3326,19 @@ button.bw-account-menu__item {
|
|
|
2147
3326
|
box-shadow:
|
|
2148
3327
|
var(--bw-elevation-1),
|
|
2149
3328
|
0 4px 14px -4px oklch(0 0 0 / 0.1);
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
3329
|
+
/* The active inset is declared once as a component variable (the same
|
|
3330
|
+
* inline-token mechanism as --bw-component-stat-tile-value-size), so the
|
|
3331
|
+
* padding and every bleed margin below read one value and a size step
|
|
3332
|
+
* cannot leave a bleed region short or long (CRD-012). */
|
|
3333
|
+
--bw-component-card-inset: var(--bw-size-inset-md);
|
|
3334
|
+
padding: var(--bw-size-inset-md);
|
|
3335
|
+
}
|
|
3336
|
+
/* Flat mode (CMP-015, APP-002, CRD-020): the hairline carries the boundary
|
|
3337
|
+
alone. The edge is the app hairline token, not the soft ink-mix edge the
|
|
3338
|
+
elevated default keeps for marketing depth. Opt-in: the default card stays
|
|
3339
|
+
elevation-1 plus ambient. An explicit elevation modifier below still wins. */
|
|
2153
3340
|
.bw-card--bordered {
|
|
3341
|
+
border-color: var(--bw-color-border);
|
|
2154
3342
|
box-shadow: var(--bw-elevation-0);
|
|
2155
3343
|
}
|
|
2156
3344
|
/* Appearance suite (docs/APPEARANCE.md, #535): CSS-only surface / elevation /
|
|
@@ -2205,6 +3393,15 @@ button.bw-account-menu__item {
|
|
|
2205
3393
|
var(--bw-elevation-1),
|
|
2206
3394
|
0 4px 14px -4px oklch(0 0 0 / 0.1);
|
|
2207
3395
|
}
|
|
3396
|
+
/* Flat mode outranks the recipe and inverse ambient stacks above (two classes
|
|
3397
|
+
against one), and loses to an explicit elevation compound below. */
|
|
3398
|
+
.bw-card--bordered.bw-card--surface-inverse,
|
|
3399
|
+
.bw-card--bordered.bw-card--header-inverse,
|
|
3400
|
+
.bw-card--bordered.bw-card--header-muted,
|
|
3401
|
+
.bw-card--bordered.bw-card--header-accent,
|
|
3402
|
+
.bw-card--bordered.bw-card--media-bleed {
|
|
3403
|
+
box-shadow: var(--bw-elevation-0);
|
|
3404
|
+
}
|
|
2208
3405
|
.bw-card--surface-inverse.bw-card--elevation-0,
|
|
2209
3406
|
.bw-card--header-inverse.bw-card--elevation-0,
|
|
2210
3407
|
.bw-card--header-muted.bw-card--elevation-0,
|
|
@@ -2226,16 +3423,21 @@ button.bw-account-menu__item {
|
|
|
2226
3423
|
.bw-card--media-bleed.bw-card--elevation-3 {
|
|
2227
3424
|
box-shadow: var(--bw-elevation-3);
|
|
2228
3425
|
}
|
|
2229
|
-
/* padding arg (04-interfaces)
|
|
2230
|
-
|
|
3426
|
+
/* padding arg (04-interfaces), ADR-126 section 5 / SIZE-COVERAGE gate 6: the
|
|
3427
|
+
container inset scale (--bw-size-inset-*, md = --bw-density-card-padding).
|
|
3428
|
+
md restates the default so an explicit padding="md" and the bare card
|
|
3429
|
+
always agree; every step is density-aware (no absolute --bw-space-*). */
|
|
2231
3430
|
.bw-card--size-sm {
|
|
2232
|
-
|
|
3431
|
+
--bw-component-card-inset: var(--bw-size-inset-sm);
|
|
3432
|
+
padding: var(--bw-size-inset-sm);
|
|
2233
3433
|
}
|
|
2234
3434
|
.bw-card--size-md {
|
|
2235
|
-
|
|
3435
|
+
--bw-component-card-inset: var(--bw-size-inset-md);
|
|
3436
|
+
padding: var(--bw-size-inset-md);
|
|
2236
3437
|
}
|
|
2237
3438
|
.bw-card--size-lg {
|
|
2238
|
-
|
|
3439
|
+
--bw-component-card-inset: var(--bw-size-inset-lg);
|
|
3440
|
+
padding: var(--bw-size-inset-lg);
|
|
2239
3441
|
}
|
|
2240
3442
|
/* Card-as-link (CMP-017): the whole card is an anchor; content keeps its own
|
|
2241
3443
|
ink and no underline smears across the card. The focus ring comes from the
|
|
@@ -2248,17 +3450,39 @@ a.bw-card {
|
|
|
2248
3450
|
/* Interactive variant (MOT-010, AC-BW-071): the shadow raises 1 to 2 on
|
|
2249
3451
|
hover/focus-within, never a transform; elevation 2+ pairs with the raised
|
|
2250
3452
|
surface in both themes (DESIGN.md 4.1: in light the raised surface equals
|
|
2251
|
-
surface, so only the shadow moves; in dark the surface lightens too).
|
|
3453
|
+
surface, so only the shadow moves; in dark the surface lightens too).
|
|
3454
|
+
Flat cards (CRD-021, APP-002) never gain a shadow on hover: the hairline
|
|
3455
|
+
steps to the strong border and the surface to raised instead. */
|
|
2252
3456
|
.bw-card--interactive {
|
|
2253
3457
|
transition: var(--bw-transition-shadow), var(--bw-transition-colors);
|
|
2254
3458
|
}
|
|
2255
|
-
.bw-card--interactive:hover,
|
|
2256
|
-
.bw-card--interactive:focus-within {
|
|
3459
|
+
.bw-card--interactive:not(.bw-card--bordered):hover,
|
|
3460
|
+
.bw-card--interactive:not(.bw-card--bordered):focus-within {
|
|
2257
3461
|
box-shadow:
|
|
2258
3462
|
var(--bw-elevation-2),
|
|
2259
3463
|
0 8px 20px -6px oklch(0 0 0 / 0.12);
|
|
2260
3464
|
background: var(--bw-color-surface-raised);
|
|
2261
3465
|
}
|
|
3466
|
+
.bw-card--bordered.bw-card--interactive:hover,
|
|
3467
|
+
.bw-card--bordered.bw-card--interactive:focus-within {
|
|
3468
|
+
border-color: var(--bw-color-border-strong);
|
|
3469
|
+
background: var(--bw-color-surface-raised);
|
|
3470
|
+
}
|
|
3471
|
+
/* A tinted, muted or inverse fill keeps its own fill on hover (CRD-022):
|
|
3472
|
+
swapping in the raised surface would leave inverse text on a light fill. */
|
|
3473
|
+
.bw-card--interactive.bw-card--surface-tint:hover,
|
|
3474
|
+
.bw-card--interactive.bw-card--surface-tint:focus-within {
|
|
3475
|
+
background: var(--bw-color-surface-marketing-tint);
|
|
3476
|
+
}
|
|
3477
|
+
.bw-card--interactive.bw-card--surface-muted:hover,
|
|
3478
|
+
.bw-card--interactive.bw-card--surface-muted:focus-within {
|
|
3479
|
+
background: var(--bw-color-surface-sunken);
|
|
3480
|
+
}
|
|
3481
|
+
.bw-card--interactive.bw-card--surface-inverse:hover,
|
|
3482
|
+
.bw-card--interactive.bw-card--surface-inverse:focus-within {
|
|
3483
|
+
background: var(--bw-color-surface-inverse);
|
|
3484
|
+
border-color: transparent;
|
|
3485
|
+
}
|
|
2262
3486
|
.bw-card__header {
|
|
2263
3487
|
display: flex;
|
|
2264
3488
|
align-items: flex-start;
|
|
@@ -2275,18 +3499,18 @@ a.bw-card {
|
|
|
2275
3499
|
}
|
|
2276
3500
|
.bw-card__header--muted,
|
|
2277
3501
|
.bw-card--header-muted .bw-card__header {
|
|
2278
|
-
margin: calc(-1 * var(--bw-
|
|
3502
|
+
margin: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
2279
3503
|
margin-block-end: var(--bw-space-3);
|
|
2280
|
-
padding: var(--bw-
|
|
3504
|
+
padding: var(--bw-component-card-inset, var(--bw-size-inset-md));
|
|
2281
3505
|
background: var(--bw-color-surface-sunken);
|
|
2282
3506
|
border-start-start-radius: inherit;
|
|
2283
3507
|
border-start-end-radius: inherit;
|
|
2284
3508
|
}
|
|
2285
3509
|
.bw-card__header--inverse,
|
|
2286
3510
|
.bw-card--header-inverse .bw-card__header {
|
|
2287
|
-
margin: calc(-1 * var(--bw-
|
|
3511
|
+
margin: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
2288
3512
|
margin-block-end: var(--bw-space-3);
|
|
2289
|
-
padding: var(--bw-
|
|
3513
|
+
padding: var(--bw-component-card-inset, var(--bw-size-inset-md));
|
|
2290
3514
|
background: var(--bw-color-surface-inverse);
|
|
2291
3515
|
color: var(--bw-color-fg-on-inverse);
|
|
2292
3516
|
border-start-start-radius: inherit;
|
|
@@ -2294,9 +3518,9 @@ a.bw-card {
|
|
|
2294
3518
|
}
|
|
2295
3519
|
.bw-card__header--accent,
|
|
2296
3520
|
.bw-card--header-accent .bw-card__header {
|
|
2297
|
-
margin: calc(-1 * var(--bw-
|
|
3521
|
+
margin: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
2298
3522
|
margin-block-end: var(--bw-space-3);
|
|
2299
|
-
padding: var(--bw-
|
|
3523
|
+
padding: var(--bw-component-card-inset, var(--bw-size-inset-md));
|
|
2300
3524
|
background: var(--bw-color-accent-subtle);
|
|
2301
3525
|
border-block-end: var(--bw-size-border-hairline) solid var(--bw-color-accent);
|
|
2302
3526
|
border-start-start-radius: inherit;
|
|
@@ -2331,6 +3555,36 @@ a.bw-card {
|
|
|
2331
3555
|
color: var(--bw-color-fg-on-inverse);
|
|
2332
3556
|
background-color: var(--bw-state-hover-overlay);
|
|
2333
3557
|
}
|
|
3558
|
+
/* Description (CRD-014): the supporting line under a title, on muted ink in
|
|
3559
|
+
the body-sm role. React CardDescription emits it; Django's caption and body
|
|
3560
|
+
strings use .bw-card__footer and .bw-card__body. */
|
|
3561
|
+
.bw-card__description {
|
|
3562
|
+
margin: 0;
|
|
3563
|
+
color: var(--bw-color-fg-muted);
|
|
3564
|
+
font-size: var(--bw-text-body-sm-size);
|
|
3565
|
+
font-weight: var(--bw-text-body-sm-weight);
|
|
3566
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
3567
|
+
text-wrap: pretty;
|
|
3568
|
+
}
|
|
3569
|
+
.bw-card__title + .bw-card__description {
|
|
3570
|
+
margin-block-start: var(--bw-space-1);
|
|
3571
|
+
}
|
|
3572
|
+
/* Whole-card inverse fill (CRD-023): the region ink flips to the on-inverse
|
|
3573
|
+
token. Without this the title and body (which speak in --bw-color-fg) would
|
|
3574
|
+
paint the inverse fill's own colour on itself. */
|
|
3575
|
+
.bw-card--surface-inverse .bw-card__title,
|
|
3576
|
+
.bw-card--surface-inverse .bw-card__description,
|
|
3577
|
+
.bw-card--surface-inverse .bw-card__body,
|
|
3578
|
+
.bw-card--surface-inverse .bw-card__footer {
|
|
3579
|
+
color: var(--bw-color-fg-on-inverse);
|
|
3580
|
+
}
|
|
3581
|
+
.bw-card--surface-inverse .bw-card__footer {
|
|
3582
|
+
border-block-start-color: color-mix(
|
|
3583
|
+
in oklab,
|
|
3584
|
+
var(--bw-color-fg-on-inverse) 30%,
|
|
3585
|
+
var(--bw-color-surface-inverse)
|
|
3586
|
+
);
|
|
3587
|
+
}
|
|
2334
3588
|
/* Plain include-path body string (APPEARANCE.md): escaped text, not rich HTML. */
|
|
2335
3589
|
.bw-card__body {
|
|
2336
3590
|
margin: 0;
|
|
@@ -2341,6 +3595,7 @@ a.bw-card {
|
|
|
2341
3595
|
text-wrap: pretty;
|
|
2342
3596
|
}
|
|
2343
3597
|
.bw-card__title + .bw-card__body,
|
|
3598
|
+
.bw-card__description + .bw-card__body,
|
|
2344
3599
|
.bw-card__header + .bw-card__body,
|
|
2345
3600
|
.bw-card__media + .bw-card__body,
|
|
2346
3601
|
.bw-card__media + .bw-card__header,
|
|
@@ -2367,7 +3622,7 @@ a.bw-card {
|
|
|
2367
3622
|
}
|
|
2368
3623
|
.bw-card__media--bleed,
|
|
2369
3624
|
.bw-card--media-bleed .bw-card__media {
|
|
2370
|
-
margin: calc(-1 * var(--bw-
|
|
3625
|
+
margin: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
2371
3626
|
margin-block-end: 0;
|
|
2372
3627
|
border-start-start-radius: inherit;
|
|
2373
3628
|
border-start-end-radius: inherit;
|
|
@@ -2404,9 +3659,9 @@ a.bw-card {
|
|
|
2404
3659
|
}
|
|
2405
3660
|
.bw-card__footer--muted,
|
|
2406
3661
|
.bw-card--footer-muted .bw-card__footer {
|
|
2407
|
-
margin-inline: calc(-1 * var(--bw-
|
|
2408
|
-
margin-block-end: calc(-1 * var(--bw-
|
|
2409
|
-
padding: var(--bw-space-3) var(--bw-
|
|
3662
|
+
margin-inline: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
3663
|
+
margin-block-end: calc(-1 * var(--bw-component-card-inset, var(--bw-size-inset-md)));
|
|
3664
|
+
padding: var(--bw-space-3) var(--bw-component-card-inset, var(--bw-size-inset-md));
|
|
2410
3665
|
background: var(--bw-color-surface-sunken);
|
|
2411
3666
|
border-block-start: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
2412
3667
|
border-end-start-radius: inherit;
|
|
@@ -2434,14 +3689,20 @@ a.bw-card {
|
|
|
2434
3689
|
display: flex;
|
|
2435
3690
|
flex-direction: column;
|
|
2436
3691
|
gap: var(--bw-space-1);
|
|
3692
|
+
/* APP-002 (STA-002): hairline + tinted ground separate tiles; no ambient
|
|
3693
|
+
shadow at rest (the raw oklch drop shadow is removed). Shadow is
|
|
3694
|
+
reserved for overlays and linked-tile hover elevation only. */
|
|
2437
3695
|
background: var(--bw-color-surface);
|
|
2438
3696
|
border: var(--bw-size-border-hairline) solid
|
|
2439
|
-
color-mix(in oklab, var(--bw-color-fg)
|
|
3697
|
+
color-mix(in oklab, var(--bw-color-fg) 50%, var(--bw-color-surface));
|
|
2440
3698
|
border-radius: var(--bw-radius-lg);
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
3699
|
+
/* Value-size component token: points at 2xl (1.5rem at comfortable) per
|
|
3700
|
+
APP-CRAFT section 4 (kpi-value pick). Re-stated here so an explicit
|
|
3701
|
+
size="md" and the bare tile agree. The token is re-emitted for every
|
|
3702
|
+
density in @bwui/tokens so density cascades work without a component-
|
|
3703
|
+
level density block. */
|
|
3704
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
3705
|
+
padding: var(--bw-size-inset-md);
|
|
2445
3706
|
}
|
|
2446
3707
|
/* Clickable tile (VIZ-024): an anchor stat is definitionally hoverable, so it
|
|
2447
3708
|
takes the interactive card's shadow raise; same no-transform rule. */
|
|
@@ -2451,11 +3712,16 @@ a.bw-stat {
|
|
|
2451
3712
|
transition: var(--bw-transition-shadow), var(--bw-transition-colors);
|
|
2452
3713
|
}
|
|
2453
3714
|
a.bw-stat:hover {
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
0 8px 20px -6px oklch(0 0 0 / 0.12);
|
|
3715
|
+
/* APP-002: linked hover may use elevation tokens only (no raw oklch, CB-16). */
|
|
3716
|
+
box-shadow: var(--bw-elevation-2);
|
|
2457
3717
|
background: var(--bw-color-surface-raised);
|
|
2458
3718
|
}
|
|
3719
|
+
/* Optional leading icon (decorative; Django bw_icon sizes it). */
|
|
3720
|
+
.bw-stat__icon {
|
|
3721
|
+
block-size: var(--bw-space-5);
|
|
3722
|
+
inline-size: var(--bw-space-5);
|
|
3723
|
+
flex-shrink: 0;
|
|
3724
|
+
}
|
|
2459
3725
|
/* Overline voice for the label (uppercase applied here at the component, per
|
|
2460
3726
|
the role contract), on muted ink. */
|
|
2461
3727
|
.bw-stat__label {
|
|
@@ -2469,14 +3735,17 @@ a.bw-stat:hover {
|
|
|
2469
3735
|
}
|
|
2470
3736
|
.bw-stat__value {
|
|
2471
3737
|
margin: 0;
|
|
2472
|
-
/* The component token scales the numeral (VIZ-001, AC-BW-075)
|
|
2473
|
-
emitted by the token build
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
font-size: var(--bw-component-stat-tile-value-size, var(--bw-font-size-
|
|
3738
|
+
/* The component token scales the numeral (VIZ-001, AC-BW-075). Token is
|
|
3739
|
+
now emitted by the token build (2xl, 1.5rem at comfortable, APP-CRAFT
|
|
3740
|
+
section 4 kpi-value pick); the fallback retains the token so the cascade
|
|
3741
|
+
always wins when the stylesheet ships. */
|
|
3742
|
+
font-size: var(--bw-component-stat-tile-value-size, var(--bw-font-size-2xl));
|
|
2477
3743
|
font-weight: var(--bw-font-weight-semibold);
|
|
2478
3744
|
line-height: var(--bw-font-line-height-tight);
|
|
2479
|
-
|
|
3745
|
+
/* STA-007 (CB-17 typography, APP-001): tight tracking on large numerals
|
|
3746
|
+
(tabular-nums + tight tracking together reduce jitter in KPI rows). */
|
|
3747
|
+
letter-spacing: var(--bw-font-tracking-tight);
|
|
3748
|
+
font-variant-numeric: tabular-nums;
|
|
2480
3749
|
}
|
|
2481
3750
|
/* The trend row itself (icvoss/django-brickwork#334): _stat.html now
|
|
2482
3751
|
{% include %}s _trend_indicator.html rather than rendering its own trend
|
|
@@ -2486,13 +3755,23 @@ a.bw-stat:hover {
|
|
|
2486
3755
|
consumer stylesheet that selects .bw-stat__trend directly; #334). */
|
|
2487
3756
|
/* size arg (VIZ-027): modifiers re-point the value-size component token, so
|
|
2488
3757
|
the numeral rule itself never forks. */
|
|
3758
|
+
/* Padding rides the container inset scale (ADR-126 section 5, gate 6); md
|
|
3759
|
+
restates the default so an explicit size="md" and the bare tile agree. */
|
|
3760
|
+
/* Size steps (STA-003, CB-17 subset sm|md|lg matching Card's own subset):
|
|
3761
|
+
re-point the value-size token coherently with the md base (xl→sm, 2xl→md,
|
|
3762
|
+
3xl→lg). Padding rides the container inset scale (ADR-126 section 5). md
|
|
3763
|
+
restates the base so an explicit size="md" and the bare tile agree. */
|
|
2489
3764
|
.bw-stat--sm, .bw-stat--size-sm {
|
|
2490
|
-
--bw-component-stat-tile-value-size: var(--bw-font-size-
|
|
2491
|
-
padding: var(--bw-
|
|
3765
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-xl);
|
|
3766
|
+
padding: var(--bw-size-inset-sm);
|
|
3767
|
+
}
|
|
3768
|
+
.bw-stat--md, .bw-stat--size-md {
|
|
3769
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
3770
|
+
padding: var(--bw-size-inset-md);
|
|
2492
3771
|
}
|
|
2493
3772
|
.bw-stat--lg, .bw-stat--size-lg {
|
|
2494
|
-
--bw-component-stat-tile-value-size: var(--bw-font-size-
|
|
2495
|
-
padding: var(--bw-
|
|
3773
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-3xl);
|
|
3774
|
+
padding: var(--bw-size-inset-lg);
|
|
2496
3775
|
}
|
|
2497
3776
|
/* chrome="plain" (#694): proof figures without card chrome. Default remains
|
|
2498
3777
|
the KPI card (border, elevation, card padding). Size modifiers' padding is
|
|
@@ -2642,14 +3921,14 @@ a.bw-stat--chrome-plain:hover {
|
|
|
2642
3921
|
display: flex;
|
|
2643
3922
|
flex-direction: column;
|
|
2644
3923
|
gap: var(--bw-space-1);
|
|
3924
|
+
/* APP-002 (STA-002): same hairline-only resting chrome as .bw-stat above;
|
|
3925
|
+
raw oklch drop shadow removed (CB-16). */
|
|
3926
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
2645
3927
|
background: var(--bw-color-surface);
|
|
2646
3928
|
border: var(--bw-size-border-hairline) solid
|
|
2647
|
-
color-mix(in oklab, var(--bw-color-fg)
|
|
3929
|
+
color-mix(in oklab, var(--bw-color-fg) 50%, var(--bw-color-surface));
|
|
2648
3930
|
border-radius: var(--bw-radius-lg);
|
|
2649
|
-
|
|
2650
|
-
var(--bw-elevation-1),
|
|
2651
|
-
0 4px 14px -4px oklch(0 0 0 / 0.1);
|
|
2652
|
-
padding: var(--bw-density-card-padding);
|
|
3931
|
+
padding: var(--bw-size-inset-md);
|
|
2653
3932
|
}
|
|
2654
3933
|
.bw-stat-comparison__label {
|
|
2655
3934
|
color: var(--bw-color-fg-muted);
|
|
@@ -2662,9 +3941,10 @@ a.bw-stat--chrome-plain:hover {
|
|
|
2662
3941
|
}
|
|
2663
3942
|
.bw-stat-comparison__current {
|
|
2664
3943
|
margin: 0;
|
|
2665
|
-
font-size: var(--bw-component-stat-tile-value-size, var(--bw-font-size-
|
|
3944
|
+
font-size: var(--bw-component-stat-tile-value-size, var(--bw-font-size-2xl));
|
|
2666
3945
|
font-weight: var(--bw-font-weight-semibold);
|
|
2667
3946
|
line-height: var(--bw-font-line-height-tight);
|
|
3947
|
+
letter-spacing: var(--bw-font-tracking-tight);
|
|
2668
3948
|
font-variant-numeric: tabular-nums;
|
|
2669
3949
|
}
|
|
2670
3950
|
/* The previous-period value and its period_label caption share one line:
|
|
@@ -2680,16 +3960,21 @@ a.bw-stat--chrome-plain:hover {
|
|
|
2680
3960
|
.bw-stat-comparison__period {
|
|
2681
3961
|
color: var(--bw-color-fg-muted);
|
|
2682
3962
|
}
|
|
2683
|
-
/* size arg (mirrors _stat.html's VIZ-027 seam): modifiers re-point
|
|
2684
|
-
same value-size component token _stat.html uses, so a comparison tile
|
|
2685
|
-
sits at the same scale as a plain stat tile sharing its grid.
|
|
3963
|
+
/* size arg (mirrors _stat.html's VIZ-027 seam, STA-003): modifiers re-point
|
|
3964
|
+
the same value-size component token _stat.html uses, so a comparison tile
|
|
3965
|
+
sits at the same scale as a plain stat tile sharing its grid. Steps are
|
|
3966
|
+
coherent with .bw-stat: sm→xl, (md default→2xl), lg→3xl. */
|
|
2686
3967
|
.bw-stat-comparison--sm, .bw-stat-comparison--size-sm {
|
|
2687
|
-
--bw-component-stat-tile-value-size: var(--bw-font-size-
|
|
2688
|
-
padding: var(--bw-
|
|
3968
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-xl);
|
|
3969
|
+
padding: var(--bw-size-inset-sm);
|
|
3970
|
+
}
|
|
3971
|
+
.bw-stat-comparison--md, .bw-stat-comparison--size-md {
|
|
3972
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
3973
|
+
padding: var(--bw-size-inset-md);
|
|
2689
3974
|
}
|
|
2690
3975
|
.bw-stat-comparison--lg, .bw-stat-comparison--size-lg {
|
|
2691
|
-
--bw-component-stat-tile-value-size: var(--bw-font-size-
|
|
2692
|
-
padding: var(--bw-
|
|
3976
|
+
--bw-component-stat-tile-value-size: var(--bw-font-size-3xl);
|
|
3977
|
+
padding: var(--bw-size-inset-lg);
|
|
2693
3978
|
}
|
|
2694
3979
|
/* The trend row (_trend_indicator.html's css_class seam, matching #334's own
|
|
2695
3980
|
.bw-stat__trend alias above): this template passes
|
|
@@ -3023,6 +4308,49 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3023
4308
|
flex-direction: column;
|
|
3024
4309
|
gap: var(--bw-space-4);
|
|
3025
4310
|
}
|
|
4311
|
+
/* Optional chrome above the mount (APP craft trend panel): title row with
|
|
4312
|
+
* optional metric segmented control, then an inline total + delta. Engine
|
|
4313
|
+
* ownership stays with the consumer; these classes are layout only. */
|
|
4314
|
+
.bw-chart-card__head {
|
|
4315
|
+
display: flex;
|
|
4316
|
+
justify-content: space-between;
|
|
4317
|
+
align-items: flex-start;
|
|
4318
|
+
gap: var(--bw-space-3);
|
|
4319
|
+
flex-wrap: wrap;
|
|
4320
|
+
}
|
|
4321
|
+
.bw-chart-card__title {
|
|
4322
|
+
margin: 0;
|
|
4323
|
+
font-size: var(--bw-font-size-sm);
|
|
4324
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
4325
|
+
line-height: var(--bw-font-line-height-snug, 1.4);
|
|
4326
|
+
color: var(--bw-color-fg);
|
|
4327
|
+
}
|
|
4328
|
+
.bw-chart-card__subtitle {
|
|
4329
|
+
margin: var(--bw-space-1) 0 0;
|
|
4330
|
+
color: var(--bw-color-fg-muted);
|
|
4331
|
+
font-size: var(--bw-font-size-xs);
|
|
4332
|
+
}
|
|
4333
|
+
.bw-chart-card__total-row {
|
|
4334
|
+
display: flex;
|
|
4335
|
+
align-items: baseline;
|
|
4336
|
+
gap: var(--bw-space-2);
|
|
4337
|
+
flex-wrap: wrap;
|
|
4338
|
+
}
|
|
4339
|
+
.bw-chart-card__total {
|
|
4340
|
+
font-size: var(--bw-font-size-xl);
|
|
4341
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
4342
|
+
letter-spacing: var(--bw-font-tracking-tight);
|
|
4343
|
+
font-variant-numeric: tabular-nums;
|
|
4344
|
+
color: var(--bw-color-fg);
|
|
4345
|
+
}
|
|
4346
|
+
.bw-chart-card__delta {
|
|
4347
|
+
font-size: var(--bw-font-size-xs);
|
|
4348
|
+
color: var(--bw-color-success);
|
|
4349
|
+
}
|
|
4350
|
+
.bw-chart-card__delta.is-down,
|
|
4351
|
+
.bw-chart-card__delta[data-bw-trend="down"] {
|
|
4352
|
+
color: var(--bw-color-warning);
|
|
4353
|
+
}
|
|
3026
4354
|
.bw-chart-card--legend-bottom {
|
|
3027
4355
|
flex-direction: column-reverse;
|
|
3028
4356
|
}
|
|
@@ -3061,7 +4389,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3061
4389
|
display: block;
|
|
3062
4390
|
inline-size: 100%;
|
|
3063
4391
|
min-block-size: var(--bw-chart-mount-min-height, auto);
|
|
4392
|
+
/* Prefer an explicit height reservation when the consumer sets one; Chart.js
|
|
4393
|
+
* (and other engines that size the canvas from parent clientHeight) need a
|
|
4394
|
+
* definite block-size, not only min-block-size, or the canvas intrinsic
|
|
4395
|
+
* ratio expands the box past the CHT-024 reservation. */
|
|
4396
|
+
block-size: var(--bw-chart-mount-height, auto);
|
|
3064
4397
|
aspect-ratio: var(--bw-chart-mount-aspect-ratio, auto);
|
|
4398
|
+
overflow: hidden;
|
|
3065
4399
|
}
|
|
3066
4400
|
/* The consumer's engine draws a <canvas> or <svg> into the mount; either
|
|
3067
4401
|
* fills the reserved box exactly rather than adding its own intrinsic
|
|
@@ -3208,21 +4542,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3208
4542
|
block-size: 100%;
|
|
3209
4543
|
}
|
|
3210
4544
|
|
|
3211
|
-
/*
|
|
3212
|
-
fallback ("increased"/"decreased", AC-BW-074) and any other markup whose
|
|
3213
|
-
meaning must survive with CSS colour stripped. Standard clip pattern; the
|
|
3214
|
-
px token keeps it out of the literal ban. */
|
|
3215
|
-
.bw-visually-hidden {
|
|
3216
|
-
position: absolute;
|
|
3217
|
-
inline-size: var(--bw-space-px);
|
|
3218
|
-
block-size: var(--bw-space-px);
|
|
3219
|
-
margin: calc(var(--bw-space-px) * -1);
|
|
3220
|
-
padding: 0;
|
|
3221
|
-
overflow: hidden;
|
|
3222
|
-
clip-path: inset(50%);
|
|
3223
|
-
white-space: nowrap;
|
|
3224
|
-
border: 0;
|
|
3225
|
-
}
|
|
4545
|
+
/* .bw-visually-hidden lives in layout.css (F01 / R20). */
|
|
3226
4546
|
|
|
3227
4547
|
/* --- Scorecard (VIZ-011/012, CHT-026) --------------------------------------- */
|
|
3228
4548
|
|
|
@@ -3588,14 +4908,14 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3588
4908
|
transition-duration: var(--bw-duration-instant);
|
|
3589
4909
|
}
|
|
3590
4910
|
/* Active tab: the nav band recipe (accent-duty text tier + accent marker).
|
|
3591
|
-
*
|
|
3592
|
-
* the active anchor with the --active class; bwTabs marks its
|
|
3593
|
-
* tab with [data-bw-active]
|
|
3594
|
-
*
|
|
4911
|
+
* Three equivalent state carriers, one rule: the server-rendered floor
|
|
4912
|
+
* marks the active anchor with the --active class; bwTabs marks its
|
|
4913
|
+
* JS-selected tab with [data-bw-active]; React and upgraded markup also
|
|
4914
|
+
* set aria-selected="true" (APP-003). The :hover restatement outranks the
|
|
3595
4915
|
* plain hover rule so the active tab never dims back to fg on
|
|
3596
4916
|
* pointer-over. */
|
|
3597
|
-
.bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active]),
|
|
3598
|
-
.bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active]):hover {
|
|
4917
|
+
.bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active], [aria-selected="true"]),
|
|
4918
|
+
.bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active], [aria-selected="true"]):hover {
|
|
3599
4919
|
color: var(--bw-component-nav-item-active-text);
|
|
3600
4920
|
border-block-end-color: var(--bw-component-nav-item-active-border);
|
|
3601
4921
|
}
|
|
@@ -3615,10 +4935,12 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3615
4935
|
line-height: var(--bw-font-line-height-none);
|
|
3616
4936
|
text-align: center;
|
|
3617
4937
|
}
|
|
3618
|
-
/* Pill style (CMP-024): no rail, no marker; selection
|
|
3619
|
-
*
|
|
3620
|
-
*
|
|
3621
|
-
*
|
|
4938
|
+
/* Pill style (CMP-024): no rail, no underline marker; selection uses the
|
|
4939
|
+
* APP-003 pressed grammar owned by Segmented (accent-subtle fill, accent
|
|
4940
|
+
* text, accent border) at radius-full. Hover/pressed take the overlay
|
|
4941
|
+
* physics because a pill is a shape, not a rail position. The active
|
|
4942
|
+
* pill's hover layers the overlay over the persistent fill (DESIGN.md
|
|
4943
|
+
* 4.6 stacking). */
|
|
3622
4944
|
/* --underline is the DOCUMENTED DEFAULT. It previously had no rule at all, so
|
|
3623
4945
|
* the default variant emitted a class the stylesheet never matched (#120 defect
|
|
3624
4946
|
* class). The underline treatment is the base .bw-tabs__tab marker, so this
|
|
@@ -3642,12 +4964,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3642
4964
|
background-color: var(--bw-state-active-overlay);
|
|
3643
4965
|
transition-duration: var(--bw-duration-instant);
|
|
3644
4966
|
}
|
|
3645
|
-
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active]),
|
|
3646
|
-
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active]):hover {
|
|
3647
|
-
background-color: var(--bw-
|
|
4967
|
+
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active], [aria-selected="true"]),
|
|
4968
|
+
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active], [aria-selected="true"]):hover {
|
|
4969
|
+
background-color: var(--bw-color-accent-subtle);
|
|
3648
4970
|
color: var(--bw-component-nav-item-active-text);
|
|
4971
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-accent);
|
|
3649
4972
|
}
|
|
3650
|
-
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active]):hover {
|
|
4973
|
+
.bw-tabs--pill .bw-tabs__tab:is(.bw-tabs__tab--active, [data-bw-active], [aria-selected="true"]):hover {
|
|
3651
4974
|
background-image: linear-gradient(var(--bw-state-hover-overlay), var(--bw-state-hover-overlay));
|
|
3652
4975
|
}
|
|
3653
4976
|
/* Panel spacing: the stack gap between the tablist and the panel. */
|
|
@@ -3690,6 +5013,10 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3690
5013
|
#bw-modal-root .bw-modal:not(.bw-modal--open):not([data-bw-open]) {
|
|
3691
5014
|
display: none;
|
|
3692
5015
|
}
|
|
5016
|
+
/* Floor and overlay roots never force the page wider than the viewport. */
|
|
5017
|
+
.bw-modal {
|
|
5018
|
+
max-inline-size: 100%;
|
|
5019
|
+
}
|
|
3693
5020
|
/* The resting (floor) panel: the alone-on-a-page altitude of the auth and
|
|
3694
5021
|
* centred panels (elevation-2), raised surface, the modal radius row.
|
|
3695
5022
|
* Flex column so the header and footer hold still while the body scrolls
|
|
@@ -3698,11 +5025,11 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3698
5025
|
display: flex;
|
|
3699
5026
|
flex-direction: column;
|
|
3700
5027
|
inline-size: 100%;
|
|
3701
|
-
max-inline-size: var(--bw-size-max-width-modal-md);
|
|
5028
|
+
max-inline-size: min(100%, var(--bw-size-max-width-modal-md));
|
|
3702
5029
|
margin-inline: auto;
|
|
3703
5030
|
background: var(--bw-color-surface-raised);
|
|
3704
5031
|
border: var(--bw-size-border-hairline) solid
|
|
3705
|
-
color-mix(in oklab, var(--bw-color-fg)
|
|
5032
|
+
color-mix(in oklab, var(--bw-color-fg) 50%, var(--bw-color-surface-raised));
|
|
3706
5033
|
border-radius: var(--bw-radius-xl);
|
|
3707
5034
|
box-shadow: var(--bw-elevation-2);
|
|
3708
5035
|
}
|
|
@@ -3741,9 +5068,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3741
5068
|
position: relative;
|
|
3742
5069
|
z-index: var(--bw-z-modal);
|
|
3743
5070
|
max-block-size: 100%;
|
|
3744
|
-
box-shadow:
|
|
3745
|
-
var(--bw-elevation-4),
|
|
3746
|
-
0 16px 36px -10px oklch(0 0 0 / 0.16);
|
|
5071
|
+
box-shadow: var(--bw-elevation-4);
|
|
3747
5072
|
animation: bw-modal-in var(--bw-duration-normal) var(--bw-ease-out);
|
|
3748
5073
|
}
|
|
3749
5074
|
@keyframes bw-modal-in {
|
|
@@ -3760,10 +5085,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3760
5085
|
* panel honours them too); full is full-viewport, gutterless, radius
|
|
3761
5086
|
* squared off, and only means anything as an overlay. */
|
|
3762
5087
|
.bw-modal--sm .bw-modal__panel, .bw-modal--size-sm .bw-modal__panel {
|
|
3763
|
-
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
5088
|
+
max-inline-size: min(100%, var(--bw-size-max-width-modal-sm));
|
|
5089
|
+
}
|
|
5090
|
+
.bw-modal--md .bw-modal__panel, .bw-modal--size-md .bw-modal__panel {
|
|
5091
|
+
max-inline-size: min(100%, var(--bw-size-max-width-modal-md));
|
|
3764
5092
|
}
|
|
3765
5093
|
.bw-modal--lg .bw-modal__panel, .bw-modal--size-lg .bw-modal__panel {
|
|
3766
|
-
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
5094
|
+
max-inline-size: min(100%, var(--bw-size-max-width-modal-lg));
|
|
3767
5095
|
}
|
|
3768
5096
|
.bw-modal--full:is(.bw-modal--open, [data-bw-open]), .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) {
|
|
3769
5097
|
padding: 0;
|
|
@@ -3841,10 +5169,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3841
5169
|
/* --- Slide-over / side panel (0.14.0, brickwork#55) -------------------------- */
|
|
3842
5170
|
|
|
3843
5171
|
/* Consumed by extending _slide_over.html; two render paths, one partial
|
|
3844
|
-
* (BR-BW-HTMX-001), same shape as the modal above.
|
|
3845
|
-
*
|
|
5172
|
+
* (BR-BW-HTMX-001), same shape as the modal above. One unit (Sheet and
|
|
5173
|
+
* slide-over, docs/components/sheet.md): .bw-slide-over is the canonical
|
|
5174
|
+
* root, and .bw-sheet is its narrower mobile sheet mode (a modifier on the
|
|
5175
|
+
* same root, never a second primitive). The drawer (.bw-drawer) is the
|
|
5176
|
+
* Sidebar unit's, not this one. Markup (per _slide_over.html):
|
|
3846
5177
|
*
|
|
3847
|
-
* <div class="bw-slide-over bw-slide-over--sm
|
|
5178
|
+
* <div class="bw-slide-over bw-slide-over--size-sm|md|lg bw-slide-over--start|end [bw-sheet]">
|
|
3848
5179
|
* <div class="bw-slide-over__scrim" aria-hidden="true"></div>
|
|
3849
5180
|
* <div role="dialog" class="bw-slide-over__panel">
|
|
3850
5181
|
* <header class="bw-slide-over__header">
|
|
@@ -3917,9 +5248,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3917
5248
|
position: relative;
|
|
3918
5249
|
z-index: var(--bw-z-modal);
|
|
3919
5250
|
max-block-size: 100%;
|
|
3920
|
-
box-shadow:
|
|
3921
|
-
var(--bw-elevation-4),
|
|
3922
|
-
0 16px 36px -10px oklch(0 0 0 / 0.16);
|
|
5251
|
+
box-shadow: var(--bw-elevation-4);
|
|
3923
5252
|
animation-duration: var(--bw-duration-normal);
|
|
3924
5253
|
animation-timing-function: var(--bw-ease-out);
|
|
3925
5254
|
}
|
|
@@ -3977,20 +5306,28 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3977
5306
|
animation: none;
|
|
3978
5307
|
}
|
|
3979
5308
|
}
|
|
3980
|
-
/* Size
|
|
3981
|
-
|
|
5309
|
+
/* Size axis (SHT-003): the width ramp only, on the modal's own tokens
|
|
5310
|
+
* (--bw-size-max-width-modal-sm|md|lg, 28, 32 and 48rem). This is not the
|
|
5311
|
+
* xs to xl control-height axis and not the inset axis (SIZE-COVERAGE).
|
|
5312
|
+
* bw-slide-over--size-<step> is the only spelling; there is no bare
|
|
5313
|
+
* bw-slide-over--sm. md is the documented default and the template emits
|
|
5314
|
+
* it unconditionally, so it carries a real rule. */
|
|
5315
|
+
.bw-slide-over--size-sm .bw-slide-over__panel {
|
|
3982
5316
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
3983
5317
|
}
|
|
3984
|
-
|
|
3985
|
-
* it needs a real rule: without one the default size resolved to the panel's
|
|
3986
|
-
* base width by accident rather than by declaration (the #120 defect class,
|
|
3987
|
-
* found in the 3.0.0 options audit). */
|
|
3988
|
-
.bw-slide-over--md .bw-slide-over__panel, .bw-slide-over--size-md .bw-slide-over__panel {
|
|
5318
|
+
.bw-slide-over--size-md .bw-slide-over__panel {
|
|
3989
5319
|
max-inline-size: var(--bw-size-max-width-modal-md);
|
|
3990
5320
|
}
|
|
3991
|
-
.bw-slide-over--
|
|
5321
|
+
.bw-slide-over--size-lg .bw-slide-over__panel {
|
|
3992
5322
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
3993
5323
|
}
|
|
5324
|
+
/* Sheet mode (SHT-004): the narrow mobile sheet, on either placement. It is
|
|
5325
|
+
* a modifier on the same root and overrides the size ramp with a fixed
|
|
5326
|
+
* narrower cap: the modal sm width less 4rem, which resolves to 24rem. The
|
|
5327
|
+
* panel is still fluid below the cap. */
|
|
5328
|
+
.bw-slide-over.bw-sheet .bw-slide-over__panel {
|
|
5329
|
+
max-inline-size: calc(var(--bw-size-max-width-modal-sm) - var(--bw-space-16));
|
|
5330
|
+
}
|
|
3994
5331
|
/* Sticky header: title plus the always-present close control, divided
|
|
3995
5332
|
* from the scrolling body by a hairline. Density card padding scales the
|
|
3996
5333
|
* chrome with the density axis, matching the modal. */
|
|
@@ -4060,7 +5397,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4060
5397
|
* <svg class="bw-icon bw-toast__icon" aria-hidden="true">...</svg>
|
|
4061
5398
|
* <p class="bw-toast__message">...</p>
|
|
4062
5399
|
* [<a class="bw-toast__action" href="...">label</a>]
|
|
4063
|
-
* <button class="bw-toast__close bw-btn bw-btn--ghost bw-btn--sm bw-btn--icon-only">...</button>
|
|
5400
|
+
* <button class="bw-toast__close bw-btn bw-btn--ghost bw-btn--size-sm bw-btn--icon-only">...</button>
|
|
4064
5401
|
* </div>
|
|
4065
5402
|
* <button class="bw-toast-region__more" hidden>+N more</button>
|
|
4066
5403
|
* </div>
|
|
@@ -4130,9 +5467,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4130
5467
|
color-mix(in oklab, var(--bw-color-fg) 12%, var(--bw-color-surface-raised));
|
|
4131
5468
|
border-inline-start: var(--bw-size-border-thick) solid var(--bw-color-border);
|
|
4132
5469
|
border-radius: var(--bw-radius-xl);
|
|
4133
|
-
box-shadow:
|
|
4134
|
-
var(--bw-elevation-5),
|
|
4135
|
-
0 20px 44px -12px oklch(0 0 0 / 0.18);
|
|
5470
|
+
box-shadow: var(--bw-elevation-5);
|
|
4136
5471
|
opacity: 0;
|
|
4137
5472
|
transform: translateY(calc(-1 * var(--bw-space-2)));
|
|
4138
5473
|
transition:
|
|
@@ -4715,10 +6050,19 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4715
6050
|
* removal closes the gap in one reflow exactly as reduced motion does
|
|
4716
6051
|
* (the global floor collapses this fade to an instant removal). */
|
|
4717
6052
|
.bw-alert[data-bw-dismissing],
|
|
4718
|
-
.bw-badge[data-bw-dismissing]
|
|
6053
|
+
.bw-badge[data-bw-dismissing],
|
|
6054
|
+
.bw-banner[data-bw-dismissing] {
|
|
4719
6055
|
opacity: 0;
|
|
4720
6056
|
transition: opacity var(--bw-duration-fast) var(--bw-ease-in);
|
|
4721
6057
|
}
|
|
6058
|
+
/* reduced-motion: Banner dismiss must collapse to an instant removal; the
|
|
6059
|
+
* global floor (0.001ms) is not identical to 0s, so an explicit banner-only
|
|
6060
|
+
* override is needed to satisfy MOT-007's clear-quickly contract. */
|
|
6061
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6062
|
+
.bw-banner[data-bw-dismissing] {
|
|
6063
|
+
transition-duration: 0s !important;
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
4722
6066
|
/* The badge's close control skips the bw-btn chrome (a control-height button
|
|
4723
6067
|
* would dwarf the compact badge; the template notes the hit area is owned
|
|
4724
6068
|
* here): an inline icon run with the overlay hover physics, inline content's
|
|
@@ -4776,27 +6120,186 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4776
6120
|
inset-inline-start: 50%;
|
|
4777
6121
|
transform: translateX(-50%);
|
|
4778
6122
|
}
|
|
4779
|
-
.bw-tooltip--bottom .bw-tooltip__bubble {
|
|
4780
|
-
inset-block-start: calc(100% + var(--bw-space-1));
|
|
4781
|
-
inset-inline-start: 50%;
|
|
4782
|
-
transform: translateX(-50%);
|
|
6123
|
+
.bw-tooltip--bottom .bw-tooltip__bubble {
|
|
6124
|
+
inset-block-start: calc(100% + var(--bw-space-1));
|
|
6125
|
+
inset-inline-start: 50%;
|
|
6126
|
+
transform: translateX(-50%);
|
|
6127
|
+
}
|
|
6128
|
+
/* Logical placements: inline-start/-end flip automatically under dir="rtl"
|
|
6129
|
+
* (BR-BW-TOK-005), unlike top/bottom which are block-axis and
|
|
6130
|
+
* direction-agnostic already. */
|
|
6131
|
+
.bw-tooltip--start .bw-tooltip__bubble {
|
|
6132
|
+
inset-inline-end: calc(100% + var(--bw-space-1));
|
|
6133
|
+
inset-block-start: 50%;
|
|
6134
|
+
transform: translateY(-50%);
|
|
6135
|
+
}
|
|
6136
|
+
.bw-tooltip--end .bw-tooltip__bubble {
|
|
6137
|
+
inset-inline-start: calc(100% + var(--bw-space-1));
|
|
6138
|
+
inset-block-start: 50%;
|
|
6139
|
+
transform: translateY(-50%);
|
|
6140
|
+
}
|
|
6141
|
+
[data-theme="dark"] .bw-tooltip__bubble {
|
|
6142
|
+
box-shadow: var(--bw-elevation-3);
|
|
6143
|
+
}
|
|
6144
|
+
|
|
6145
|
+
/* --- Popover (docs/components/popover.md, R39 / H15) -------------------------- */
|
|
6146
|
+
|
|
6147
|
+
/* The small, non-modal panel that opens beside the control that asked for it
|
|
6148
|
+
* and holds interactive content. The no-JS floor is a native <details> and
|
|
6149
|
+
* <summary> (POP-003); script (@bwui/js initPopover, the Django bwPopover
|
|
6150
|
+
* module, React, Vue) upgrades the same markup. The native HTML popover
|
|
6151
|
+
* attribute is never used, so the panel stays on the --bw-z-dropdown rung.
|
|
6152
|
+
* Expected markup:
|
|
6153
|
+
*
|
|
6154
|
+
* <details class="bw-popover bw-popover--bottom">
|
|
6155
|
+
* <summary class="bw-popover__trigger bw-btn bw-btn--secondary bw-btn--size-md">
|
|
6156
|
+
* label
|
|
6157
|
+
* </summary>
|
|
6158
|
+
* <div class="bw-popover__panel" id="p" role="dialog" aria-labelledby="p-title">
|
|
6159
|
+
* <div class="bw-popover__header">
|
|
6160
|
+
* <h2 class="bw-popover__title" id="p-title">Title</h2>
|
|
6161
|
+
* [<button class="bw-popover__close" aria-label="Close" data-bw-popover-close>
|
|
6162
|
+
* <svg class="bw-icon" aria-hidden="true">...</svg>
|
|
6163
|
+
* </button>]
|
|
6164
|
+
* </div>
|
|
6165
|
+
* <div class="bw-popover__body">...</div>
|
|
6166
|
+
* [<div class="bw-popover__footer">...</div>]
|
|
6167
|
+
* </div>
|
|
6168
|
+
* </details>
|
|
6169
|
+
*
|
|
6170
|
+
* Open state is carried by [open] on the floor details and by
|
|
6171
|
+
* [data-bw-open] on the root under script; React and Vue render a div root
|
|
6172
|
+
* and a [hidden] panel, so one entrance rule serves every delivery. Close is
|
|
6173
|
+
* an instant state removal (POP-015). A closed panel is hidden by the native
|
|
6174
|
+
* details behaviour or by the [hidden] floor restated in index-extras.css.
|
|
6175
|
+
* The panel never sets overflow (POP-005), so a combobox listbox or a
|
|
6176
|
+
* date-picker panel inside it is not clipped. Every value reads a --bw-*
|
|
6177
|
+
* token directly; the block keeps no private custom properties. */
|
|
6178
|
+
.bw-popover {
|
|
6179
|
+
position: relative;
|
|
6180
|
+
display: inline-block;
|
|
6181
|
+
}
|
|
6182
|
+
.bw-popover__trigger {
|
|
6183
|
+
cursor: pointer;
|
|
6184
|
+
list-style: none;
|
|
6185
|
+
}
|
|
6186
|
+
.bw-popover__trigger::-webkit-details-marker {
|
|
6187
|
+
display: none;
|
|
6188
|
+
}
|
|
6189
|
+
/* Panel surface: raised fill, hairline border, radius-xl, elevation-3 at the
|
|
6190
|
+
* dropdown rung (POP-010; dark reset list at the end of this file). Content
|
|
6191
|
+
* sized and capped at the viewport less space-8 (POP-011); padding is the
|
|
6192
|
+
* density-computed md inset. A root with no placement modifier resolves to
|
|
6193
|
+
* bottom: the panel's inline-start edge aligns to the root's, never centred
|
|
6194
|
+
* on the trigger (POP-012). */
|
|
6195
|
+
.bw-popover__panel {
|
|
6196
|
+
position: absolute;
|
|
6197
|
+
inset-block-start: calc(100% + var(--bw-space-1));
|
|
6198
|
+
inset-inline-start: 0;
|
|
6199
|
+
z-index: var(--bw-z-dropdown);
|
|
6200
|
+
box-sizing: border-box;
|
|
6201
|
+
display: flex;
|
|
6202
|
+
flex-direction: column;
|
|
6203
|
+
gap: var(--bw-space-3);
|
|
6204
|
+
inline-size: max-content;
|
|
6205
|
+
max-inline-size: calc(100vw - var(--bw-space-8));
|
|
6206
|
+
padding: var(--bw-size-inset-md);
|
|
6207
|
+
background: var(--bw-color-surface-raised);
|
|
6208
|
+
color: var(--bw-color-fg);
|
|
6209
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
6210
|
+
border-radius: var(--bw-radius-xl);
|
|
6211
|
+
box-shadow: var(--bw-elevation-3);
|
|
6212
|
+
text-align: start;
|
|
6213
|
+
}
|
|
6214
|
+
.bw-popover--top .bw-popover__panel {
|
|
6215
|
+
inset-block-start: auto;
|
|
6216
|
+
inset-block-end: calc(100% + var(--bw-space-1));
|
|
6217
|
+
}
|
|
6218
|
+
/* start and end are logical: they flip under dir="rtl" (POP-016). The
|
|
6219
|
+
* panel's block-start edge aligns to the root's. */
|
|
6220
|
+
.bw-popover--start .bw-popover__panel {
|
|
6221
|
+
inset-block-start: 0;
|
|
6222
|
+
inset-inline-start: auto;
|
|
6223
|
+
inset-inline-end: calc(100% + var(--bw-space-1));
|
|
6224
|
+
}
|
|
6225
|
+
.bw-popover--end .bw-popover__panel {
|
|
6226
|
+
inset-block-start: 0;
|
|
6227
|
+
inset-inline-start: calc(100% + var(--bw-space-1));
|
|
6228
|
+
}
|
|
6229
|
+
.bw-popover[open] > .bw-popover__panel,
|
|
6230
|
+
.bw-popover[data-bw-open] > .bw-popover__panel {
|
|
6231
|
+
animation: bw-fade-in-up var(--bw-duration-normal) var(--bw-ease-out);
|
|
6232
|
+
}
|
|
6233
|
+
.bw-popover__header {
|
|
6234
|
+
display: flex;
|
|
6235
|
+
align-items: flex-start;
|
|
6236
|
+
justify-content: space-between;
|
|
6237
|
+
gap: var(--bw-space-3);
|
|
6238
|
+
}
|
|
6239
|
+
.bw-popover__title {
|
|
6240
|
+
margin: 0;
|
|
6241
|
+
color: var(--bw-color-fg);
|
|
6242
|
+
font-family: var(--bw-text-heading-sm-family);
|
|
6243
|
+
font-size: var(--bw-text-heading-sm-size);
|
|
6244
|
+
font-weight: var(--bw-text-heading-sm-weight);
|
|
6245
|
+
line-height: var(--bw-text-heading-sm-line-height);
|
|
6246
|
+
}
|
|
6247
|
+
.bw-popover__body {
|
|
6248
|
+
font-size: var(--bw-text-body-sm-size);
|
|
6249
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
6250
|
+
}
|
|
6251
|
+
.bw-popover__footer:empty {
|
|
6252
|
+
display: none;
|
|
6253
|
+
}
|
|
6254
|
+
.bw-popover__footer {
|
|
6255
|
+
display: flex;
|
|
6256
|
+
flex-wrap: wrap;
|
|
6257
|
+
justify-content: flex-end;
|
|
6258
|
+
gap: var(--bw-space-3);
|
|
6259
|
+
font-size: var(--bw-text-body-sm-size);
|
|
6260
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
6261
|
+
}
|
|
6262
|
+
/* Close control (POP-014): its own icon-only button, painted like the
|
|
6263
|
+
* combobox clear control. The 2rem box is above the 24px target floor. */
|
|
6264
|
+
.bw-popover__close {
|
|
6265
|
+
display: inline-flex;
|
|
6266
|
+
flex: none;
|
|
6267
|
+
align-items: center;
|
|
6268
|
+
justify-content: center;
|
|
6269
|
+
inline-size: calc(var(--bw-component-icon-size-sm) + 2 * var(--bw-space-2));
|
|
6270
|
+
block-size: calc(var(--bw-component-icon-size-sm) + 2 * var(--bw-space-2));
|
|
6271
|
+
margin-inline-start: auto;
|
|
6272
|
+
padding: 0;
|
|
6273
|
+
background: transparent;
|
|
6274
|
+
border: 0;
|
|
6275
|
+
border-radius: var(--bw-radius-full);
|
|
6276
|
+
color: var(--bw-color-fg-muted);
|
|
6277
|
+
cursor: pointer;
|
|
6278
|
+
transition: var(--bw-transition-colors);
|
|
6279
|
+
}
|
|
6280
|
+
.bw-popover__close .bw-icon,
|
|
6281
|
+
.bw-popover__close svg {
|
|
6282
|
+
inline-size: var(--bw-component-icon-size-sm);
|
|
6283
|
+
block-size: var(--bw-component-icon-size-sm);
|
|
6284
|
+
background: transparent;
|
|
6285
|
+
border-radius: 0;
|
|
6286
|
+
color: inherit;
|
|
4783
6287
|
}
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
.bw-tooltip--start .bw-tooltip__bubble {
|
|
4788
|
-
inset-inline-end: calc(100% + var(--bw-space-1));
|
|
4789
|
-
inset-block-start: 50%;
|
|
4790
|
-
transform: translateY(-50%);
|
|
6288
|
+
.bw-popover__close:hover {
|
|
6289
|
+
background-color: var(--bw-state-hover-overlay);
|
|
6290
|
+
color: var(--bw-color-fg);
|
|
4791
6291
|
}
|
|
4792
|
-
.bw-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
transform: translateY(-50%);
|
|
6292
|
+
.bw-popover__close:active {
|
|
6293
|
+
background-color: var(--bw-state-active-overlay);
|
|
6294
|
+
transition-duration: var(--bw-duration-instant);
|
|
4796
6295
|
}
|
|
4797
|
-
|
|
4798
|
-
|
|
6296
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6297
|
+
.bw-popover[open] > .bw-popover__panel,
|
|
6298
|
+
.bw-popover[data-bw-open] > .bw-popover__panel {
|
|
6299
|
+
animation: none;
|
|
6300
|
+
}
|
|
4799
6301
|
}
|
|
6302
|
+
/* --- end Popover --- */
|
|
4800
6303
|
|
|
4801
6304
|
/* reduced-motion (interaction set): explicit caret overrides on top of the
|
|
4802
6305
|
* global floor; a half-rotated caret reads as broken (DESIGN.md 8.4). The
|
|
@@ -5126,7 +6629,7 @@ input.bw-input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
|
|
|
5126
6629
|
box-shadow: var(--bw-elevation-3);
|
|
5127
6630
|
padding: var(--bw-space-4);
|
|
5128
6631
|
inline-size: max-content;
|
|
5129
|
-
max-inline-size:
|
|
6632
|
+
max-inline-size: 100%;
|
|
5130
6633
|
}
|
|
5131
6634
|
.bw-date-picker-chrome__panel[hidden] {
|
|
5132
6635
|
display: none;
|
|
@@ -5928,38 +7431,75 @@ input.bw-input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
|
|
|
5928
7431
|
flex: 0 0 var(--bw-space-6);
|
|
5929
7432
|
}
|
|
5930
7433
|
|
|
5931
|
-
/* --- Avatar
|
|
5932
|
-
/*
|
|
5933
|
-
|
|
7434
|
+
/* --- Avatar and avatar group (docs/components/avatar.md) --------------------- */
|
|
7435
|
+
/* Display atom. The box is the control height: the avatar reads only the five
|
|
7436
|
+
* control role variables (ADR-126 section 4), declared on :root and in every
|
|
7437
|
+
* [data-density] block (md at the density in force) and inherited here. A bare
|
|
7438
|
+
* .bw-avatar is md, a size class re-points them (ADR-125), and a control
|
|
7439
|
+
* container can set one step for its children. The avatar never reads a
|
|
7440
|
+
* density token or a --bw-size-control-* step token outside the size classes
|
|
7441
|
+
* (AVR-010). The 1.5rem target floor is carried by the height tokens, so a
|
|
7442
|
+
* linked avatar meets WCAG 2.5.8 at every step and density (AVR-052). There is
|
|
7443
|
+
* no bare spelling (bw-avatar--sm). --bw-avatar-size-* stays reserved. */
|
|
5934
7444
|
|
|
5935
7445
|
.bw-avatar {
|
|
5936
7446
|
display: inline-flex;
|
|
5937
7447
|
align-items: center;
|
|
5938
7448
|
justify-content: center;
|
|
5939
|
-
inline-size: var(--bw-
|
|
5940
|
-
block-size: var(--bw-
|
|
7449
|
+
inline-size: var(--bw-control-height);
|
|
7450
|
+
block-size: var(--bw-control-height);
|
|
5941
7451
|
overflow: hidden;
|
|
5942
7452
|
border-radius: var(--bw-radius-full);
|
|
5943
7453
|
background: var(--bw-color-surface-sunken);
|
|
5944
7454
|
color: var(--bw-color-fg-muted);
|
|
5945
7455
|
border: var(--bw-size-border-hairline) solid color-mix(in oklab, var(--bw-color-fg) 12%, var(--bw-color-surface));
|
|
7456
|
+
/* Type follows the step (ADR-127 section 6): the letters take the fifth role
|
|
7457
|
+
* variable, the ladder step of the same name, floored by the ladder. They
|
|
7458
|
+
* are not a ratio of the box (AVR-013). */
|
|
7459
|
+
font-size: var(--bw-control-font-size);
|
|
7460
|
+
line-height: 1;
|
|
5946
7461
|
vertical-align: middle;
|
|
5947
7462
|
flex-shrink: 0;
|
|
5948
7463
|
}
|
|
5949
7464
|
|
|
7465
|
+
.bw-avatar--size-xs {
|
|
7466
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
7467
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
7468
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
7469
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
7470
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
7471
|
+
}
|
|
7472
|
+
|
|
5950
7473
|
.bw-avatar--size-sm {
|
|
5951
|
-
|
|
5952
|
-
|
|
7474
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
7475
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
7476
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
7477
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
7478
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
5953
7479
|
}
|
|
5954
7480
|
|
|
5955
7481
|
.bw-avatar--size-md {
|
|
5956
|
-
|
|
5957
|
-
|
|
7482
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
7483
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
7484
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
7485
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
7486
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
5958
7487
|
}
|
|
5959
7488
|
|
|
5960
7489
|
.bw-avatar--size-lg {
|
|
5961
|
-
|
|
5962
|
-
|
|
7490
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
7491
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
7492
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
7493
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
7494
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
7495
|
+
}
|
|
7496
|
+
|
|
7497
|
+
.bw-avatar--size-xl {
|
|
7498
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
7499
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
7500
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
7501
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
7502
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
5963
7503
|
}
|
|
5964
7504
|
|
|
5965
7505
|
/* circle is the documented default shape (#120/#130): restates the base
|
|
@@ -5973,33 +7513,44 @@ input.bw-input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
|
|
|
5973
7513
|
}
|
|
5974
7514
|
|
|
5975
7515
|
.bw-avatar__image {
|
|
7516
|
+
display: block;
|
|
5976
7517
|
inline-size: 100%;
|
|
5977
7518
|
block-size: 100%;
|
|
5978
7519
|
object-fit: cover;
|
|
5979
7520
|
}
|
|
5980
7521
|
|
|
5981
7522
|
.bw-avatar__initials {
|
|
5982
|
-
font-size: calc(var(--bw-size-control-height-md) * 0.375);
|
|
5983
7523
|
font-weight: var(--bw-font-weight-semibold);
|
|
5984
7524
|
line-height: 1;
|
|
5985
7525
|
letter-spacing: 0.02em;
|
|
5986
7526
|
text-transform: uppercase;
|
|
7527
|
+
white-space: nowrap;
|
|
5987
7528
|
max-inline-size: 100%;
|
|
5988
7529
|
overflow: hidden;
|
|
5989
7530
|
}
|
|
5990
7531
|
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
font-size: calc(var(--bw-size-control-height-lg) * 0.375);
|
|
7532
|
+
/* The letters content shape (initials fallback, no image). The ink is the full
|
|
7533
|
+
* foreground so the letters clear 4.5:1 on the sunken fill in both themes
|
|
7534
|
+
* (AVR-014, section 4.3 of the craft document). */
|
|
7535
|
+
.bw-avatar--initials {
|
|
7536
|
+
color: var(--bw-color-fg);
|
|
5997
7537
|
}
|
|
5998
7538
|
|
|
5999
7539
|
.bw-avatar--overflow {
|
|
6000
7540
|
background: var(--bw-color-surface-raised);
|
|
6001
7541
|
color: var(--bw-color-fg);
|
|
6002
7542
|
border-color: var(--bw-color-border);
|
|
7543
|
+
/* Wide counts such as +120 must not clip; grow the box on the inline axis.
|
|
7544
|
+
* The box is the minimum; the inline padding is half the step's control gap. */
|
|
7545
|
+
inline-size: auto;
|
|
7546
|
+
min-inline-size: var(--bw-control-height);
|
|
7547
|
+
padding-inline: calc(var(--bw-control-gap) * 0.5);
|
|
7548
|
+
}
|
|
7549
|
+
|
|
7550
|
+
.bw-avatar--overflow .bw-avatar__initials {
|
|
7551
|
+
max-inline-size: none;
|
|
7552
|
+
overflow: visible;
|
|
7553
|
+
text-transform: none;
|
|
6003
7554
|
}
|
|
6004
7555
|
|
|
6005
7556
|
.bw-avatar-group {
|
|
@@ -6011,23 +7562,78 @@ input.bw-input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
|
|
|
6011
7562
|
box-shadow: 0 0 0 var(--bw-size-border-thick) var(--bw-color-surface);
|
|
6012
7563
|
}
|
|
6013
7564
|
|
|
7565
|
+
/* Overlap follows each avatar's --bw-control-gap (set by its size class). */
|
|
6014
7566
|
.bw-avatar-group .bw-avatar + .bw-avatar {
|
|
6015
|
-
margin-inline-start: calc(var(--bw-
|
|
7567
|
+
margin-inline-start: calc(var(--bw-control-gap) * -1);
|
|
6016
7568
|
}
|
|
6017
7569
|
|
|
6018
|
-
/* --- Chip
|
|
7570
|
+
/* --- Chip (R09, A04; docs/components/chip.md) ----------------------------- */
|
|
7571
|
+
|
|
7572
|
+
/* Size grammar (CHP-003): bw-chip--size-xs to -xl re-point the five control
|
|
7573
|
+
* role variables at the step they name, exactly as Button, Radio and Switch do
|
|
7574
|
+
* (ADR-125, ADR-126 section 4), and name the matching container inset step in
|
|
7575
|
+
* the block-private --bw-chip-inset (the inset axis, SIZE-COVERAGE gate 6).
|
|
7576
|
+
* There is no bare spelling. A bare .bw-chip inherits the role variables in
|
|
7577
|
+
* force (md from :root) and falls back to the md inset; emit the class to pin
|
|
7578
|
+
* a step. */
|
|
7579
|
+
.bw-chip--size-xs {
|
|
7580
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
7581
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
7582
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
7583
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
7584
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
7585
|
+
--bw-chip-inset: var(--bw-size-inset-xs);
|
|
7586
|
+
}
|
|
7587
|
+
.bw-chip--size-sm {
|
|
7588
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
7589
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
7590
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
7591
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
7592
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
7593
|
+
--bw-chip-inset: var(--bw-size-inset-sm);
|
|
7594
|
+
}
|
|
7595
|
+
.bw-chip--size-md {
|
|
7596
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
7597
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
7598
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
7599
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
7600
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
7601
|
+
--bw-chip-inset: var(--bw-size-inset-md);
|
|
7602
|
+
}
|
|
7603
|
+
.bw-chip--size-lg {
|
|
7604
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
7605
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
7606
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
7607
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
7608
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
7609
|
+
--bw-chip-inset: var(--bw-size-inset-lg);
|
|
7610
|
+
}
|
|
7611
|
+
.bw-chip--size-xl {
|
|
7612
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
7613
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
7614
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
7615
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
7616
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
7617
|
+
--bw-chip-inset: var(--bw-size-inset-xl);
|
|
7618
|
+
}
|
|
6019
7619
|
|
|
6020
7620
|
.bw-chip {
|
|
6021
7621
|
display: inline-flex;
|
|
6022
7622
|
align-items: center;
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
7623
|
+
/* Gap, text and the interactive height floor read the role variables
|
|
7624
|
+
* (CHP-010). Padding is the compact-pill model: a fixed fraction of the
|
|
7625
|
+
* container inset step the size names (inline three quarters, block a
|
|
7626
|
+
* quarter), so a chip stays a pill at every step and tracks density through
|
|
7627
|
+
* --bw-size-inset-<step>. At comfortable md that is 0.75rem and 0.25rem. */
|
|
7628
|
+
gap: var(--bw-control-gap);
|
|
7629
|
+
padding-block: calc(var(--bw-chip-inset, var(--bw-size-inset-md)) / 4);
|
|
7630
|
+
padding-inline: calc(var(--bw-chip-inset, var(--bw-size-inset-md)) * 0.75);
|
|
7631
|
+
margin: 0;
|
|
6026
7632
|
border: var(--bw-size-border-hairline) solid transparent;
|
|
6027
7633
|
border-radius: var(--bw-radius-full);
|
|
6028
|
-
font-size: var(--bw-
|
|
7634
|
+
font-size: var(--bw-control-font-size);
|
|
6029
7635
|
font-weight: var(--bw-font-weight-medium);
|
|
6030
|
-
line-height: var(--bw-
|
|
7636
|
+
line-height: var(--bw-font-line-height-tight);
|
|
6031
7637
|
background: var(--bw-color-surface-sunken);
|
|
6032
7638
|
color: var(--bw-color-fg-muted);
|
|
6033
7639
|
text-decoration: none;
|
|
@@ -6035,22 +7641,27 @@ input.bw-input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
|
|
|
6035
7641
|
transition: var(--bw-transition-colors);
|
|
6036
7642
|
}
|
|
6037
7643
|
|
|
7644
|
+
/* Interactive chips (a toggle button, a link). WCAG 2.5.8 floor: never below
|
|
7645
|
+
* 1.5rem however small the density resolves; above it the floor follows the
|
|
7646
|
+
* control height (CHP-011). Only the font family is inherited: the size, weight
|
|
7647
|
+
* and line height stay the chip's own. */
|
|
6038
7648
|
button.bw-chip,
|
|
6039
7649
|
a.bw-chip {
|
|
7650
|
+
justify-content: center;
|
|
7651
|
+
min-block-size: max(1.5rem, calc(var(--bw-control-height) * 0.6));
|
|
7652
|
+
min-inline-size: 1.5rem;
|
|
7653
|
+
font-family: inherit;
|
|
6040
7654
|
cursor: pointer;
|
|
6041
|
-
font: inherit;
|
|
6042
7655
|
}
|
|
6043
7656
|
|
|
6044
|
-
.bw-chip
|
|
6045
|
-
|
|
6046
|
-
|
|
7657
|
+
button.bw-chip:where(:hover:not(:disabled)),
|
|
7658
|
+
a.bw-chip:where(:hover:not([aria-disabled="true"])) {
|
|
7659
|
+
background-image: linear-gradient(var(--bw-state-hover-overlay), var(--bw-state-hover-overlay));
|
|
6047
7660
|
}
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
padding-block: var(--bw-space-1);
|
|
6053
|
-
padding-inline: var(--bw-space-3);
|
|
7661
|
+
button.bw-chip:where(:active:not(:disabled)),
|
|
7662
|
+
a.bw-chip:where(:active:not([aria-disabled="true"])) {
|
|
7663
|
+
background-image: linear-gradient(var(--bw-state-active-overlay), var(--bw-state-active-overlay));
|
|
7664
|
+
transition-duration: var(--bw-duration-instant);
|
|
6054
7665
|
}
|
|
6055
7666
|
|
|
6056
7667
|
.bw-chip--neutral {
|
|
@@ -6083,29 +7694,187 @@ a.bw-chip {
|
|
|
6083
7694
|
border-color: var(--bw-color-info-border);
|
|
6084
7695
|
}
|
|
6085
7696
|
|
|
7697
|
+
/* Pressed / selected paint is owned by Segmented (APP-003 / SEG-020). Chip
|
|
7698
|
+
* filter membership keeps .bw-chip--selected as the class name; the treatment
|
|
7699
|
+
* matches .bw-segmented__item[aria-pressed="true"]. GAP-CHP-1 closed by R11.
|
|
7700
|
+
*/
|
|
6086
7701
|
.bw-chip--selected {
|
|
6087
|
-
|
|
7702
|
+
background: var(--bw-color-accent-subtle);
|
|
7703
|
+
color: var(--bw-component-nav-item-active-text);
|
|
7704
|
+
border-color: var(--bw-color-accent);
|
|
7705
|
+
box-shadow: none;
|
|
7706
|
+
}
|
|
7707
|
+
|
|
7708
|
+
/* Disabled (CHP-023): a disabled toggle, or an aria-disabled link. Outranks
|
|
7709
|
+
* the tone classes so the chip is flat whatever its tone. */
|
|
7710
|
+
button.bw-chip:disabled,
|
|
7711
|
+
a.bw-chip[aria-disabled="true"] {
|
|
7712
|
+
background: var(--bw-color-action-disabled-bg);
|
|
7713
|
+
background-image: none;
|
|
7714
|
+
color: var(--bw-color-action-disabled-text);
|
|
7715
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
7716
|
+
box-shadow: none;
|
|
7717
|
+
cursor: not-allowed;
|
|
7718
|
+
}
|
|
7719
|
+
|
|
7720
|
+
/* The dismiss control (CHP-030): a real button inside a span chip. Its hit
|
|
7721
|
+
* area is at least 1.5rem square (WCAG 2.5.8); the negative block margin lets
|
|
7722
|
+
* that box overlap the chip's own padding so a dismissible chip is no taller
|
|
7723
|
+
* than a static one of the same step, and the negative end margin tucks it
|
|
7724
|
+
* into the inline padding. The glyph is the control icon size. */
|
|
7725
|
+
.bw-chip__close {
|
|
7726
|
+
display: inline-flex;
|
|
7727
|
+
align-items: center;
|
|
7728
|
+
justify-content: center;
|
|
7729
|
+
flex-shrink: 0;
|
|
7730
|
+
min-inline-size: 1.5rem;
|
|
7731
|
+
min-block-size: 1.5rem;
|
|
7732
|
+
margin-block: min(0px, calc((var(--bw-control-font-size) * var(--bw-font-line-height-tight) - 1.5rem) / 2));
|
|
7733
|
+
margin-inline-end: calc(var(--bw-control-gap) * -0.5);
|
|
7734
|
+
padding: 0;
|
|
7735
|
+
background: transparent;
|
|
7736
|
+
border: 0;
|
|
7737
|
+
border-radius: var(--bw-radius-full);
|
|
7738
|
+
color: inherit;
|
|
7739
|
+
cursor: pointer;
|
|
7740
|
+
transition: var(--bw-transition-colors);
|
|
7741
|
+
}
|
|
7742
|
+
.bw-chip__close .bw-icon,
|
|
7743
|
+
.bw-chip__close svg {
|
|
7744
|
+
inline-size: var(--bw-control-icon-size);
|
|
7745
|
+
block-size: var(--bw-control-icon-size);
|
|
7746
|
+
background: transparent;
|
|
7747
|
+
border-radius: 0;
|
|
7748
|
+
color: inherit;
|
|
7749
|
+
}
|
|
7750
|
+
.bw-chip__close:hover {
|
|
7751
|
+
background-color: var(--bw-state-hover-overlay);
|
|
7752
|
+
}
|
|
7753
|
+
.bw-chip__close:active {
|
|
7754
|
+
background-color: var(--bw-state-active-overlay);
|
|
7755
|
+
transition-duration: var(--bw-duration-instant);
|
|
7756
|
+
}
|
|
7757
|
+
|
|
7758
|
+
/* Dismissal exit, keyed on the marker bwDismissible stamps (CHP-032). The
|
|
7759
|
+
* global reduced-motion floor collapses it to an instant removal. */
|
|
7760
|
+
.bw-chip[data-bw-dismissing] {
|
|
7761
|
+
opacity: 0;
|
|
7762
|
+
transition: opacity var(--bw-duration-fast) var(--bw-ease-in);
|
|
7763
|
+
}
|
|
7764
|
+
|
|
7765
|
+
/* --- Segmented control (docs/components/segmented.md, R11 / C14) ------------ */
|
|
7766
|
+
|
|
7767
|
+
/* APP-003 pressed grammar owner. Size classes re-point the five control role
|
|
7768
|
+
* variables (SEG-010). Items read height, padding, gap and font from those
|
|
7769
|
+
* roles. Pressed paint is tinted fill, accent text and tinted border; the same
|
|
7770
|
+
* three tokens are applied to .bw-chip--selected and
|
|
7771
|
+
* .bw-button-group--segmented selected items (SEG-020). */
|
|
7772
|
+
|
|
7773
|
+
.bw-segmented--size-xs {
|
|
7774
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
7775
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
7776
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
7777
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
7778
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
7779
|
+
}
|
|
7780
|
+
.bw-segmented--size-sm {
|
|
7781
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
7782
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
7783
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
7784
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
7785
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
7786
|
+
}
|
|
7787
|
+
.bw-segmented--size-md {
|
|
7788
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
7789
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
7790
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
7791
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
7792
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
7793
|
+
}
|
|
7794
|
+
.bw-segmented--size-lg {
|
|
7795
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
7796
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
7797
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
7798
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
7799
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
7800
|
+
}
|
|
7801
|
+
.bw-segmented--size-xl {
|
|
7802
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
7803
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
7804
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
7805
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
7806
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
.bw-segmented {
|
|
7810
|
+
display: inline-flex;
|
|
7811
|
+
flex-wrap: nowrap;
|
|
7812
|
+
align-items: stretch;
|
|
7813
|
+
gap: var(--bw-control-gap);
|
|
7814
|
+
padding: var(--bw-space-1);
|
|
7815
|
+
border-radius: var(--bw-radius-md);
|
|
7816
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
7817
|
+
background: var(--bw-color-surface-sunken);
|
|
7818
|
+
vertical-align: middle;
|
|
7819
|
+
}
|
|
7820
|
+
|
|
7821
|
+
.bw-segmented__item {
|
|
7822
|
+
appearance: none;
|
|
7823
|
+
box-sizing: border-box;
|
|
7824
|
+
display: inline-flex;
|
|
7825
|
+
align-items: center;
|
|
7826
|
+
justify-content: center;
|
|
7827
|
+
margin: 0;
|
|
7828
|
+
min-block-size: max(1.5rem, var(--bw-control-height));
|
|
7829
|
+
padding-block: 0;
|
|
7830
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
7831
|
+
border: var(--bw-size-border-hairline) solid transparent;
|
|
7832
|
+
border-radius: calc(var(--bw-radius-md) - 2px);
|
|
7833
|
+
background: transparent;
|
|
7834
|
+
color: var(--bw-color-fg-muted);
|
|
7835
|
+
font: inherit;
|
|
7836
|
+
font-size: var(--bw-control-font-size);
|
|
7837
|
+
line-height: 1;
|
|
7838
|
+
cursor: pointer;
|
|
7839
|
+
transition: var(--bw-transition-colors);
|
|
7840
|
+
}
|
|
7841
|
+
|
|
7842
|
+
.bw-segmented__item:hover:where(:not(:disabled):not([aria-pressed="true"]):not([data-bw-active])) {
|
|
6088
7843
|
color: var(--bw-color-fg);
|
|
7844
|
+
background: var(--bw-state-hover-overlay);
|
|
7845
|
+
}
|
|
7846
|
+
|
|
7847
|
+
.bw-segmented__item[aria-pressed="true"],
|
|
7848
|
+
.bw-segmented__item[data-bw-active] {
|
|
7849
|
+
background: var(--bw-color-accent-subtle);
|
|
7850
|
+
color: var(--bw-component-nav-item-active-text);
|
|
7851
|
+
border-color: var(--bw-color-accent);
|
|
7852
|
+
}
|
|
7853
|
+
|
|
7854
|
+
.bw-segmented__item:focus-visible {
|
|
7855
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
7856
|
+
outline-offset: 2px;
|
|
7857
|
+
z-index: 1;
|
|
6089
7858
|
}
|
|
6090
7859
|
|
|
6091
|
-
.bw-
|
|
6092
|
-
|
|
6093
|
-
align-items: center;
|
|
6094
|
-
justify-content: center;
|
|
6095
|
-
margin-inline-end: calc(var(--bw-space-1) * -1);
|
|
6096
|
-
padding: var(--bw-space-0-5);
|
|
7860
|
+
.bw-segmented__item:disabled {
|
|
7861
|
+
color: var(--bw-color-action-disabled-text);
|
|
6097
7862
|
background: transparent;
|
|
6098
|
-
border:
|
|
6099
|
-
|
|
6100
|
-
color: inherit;
|
|
6101
|
-
cursor: pointer;
|
|
6102
|
-
opacity: 0.75;
|
|
7863
|
+
border-color: transparent;
|
|
7864
|
+
cursor: not-allowed;
|
|
6103
7865
|
}
|
|
6104
7866
|
|
|
6105
|
-
.bw-
|
|
6106
|
-
.bw-
|
|
6107
|
-
|
|
6108
|
-
|
|
7867
|
+
.bw-segmented__item:disabled[aria-pressed="true"],
|
|
7868
|
+
.bw-segmented__item:disabled[data-bw-active] {
|
|
7869
|
+
background: var(--bw-color-action-disabled-bg);
|
|
7870
|
+
color: var(--bw-color-action-disabled-text);
|
|
7871
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
7872
|
+
}
|
|
7873
|
+
|
|
7874
|
+
@media (prefers-reduced-motion: reduce) {
|
|
7875
|
+
.bw-segmented__item {
|
|
7876
|
+
transition: none;
|
|
7877
|
+
}
|
|
6109
7878
|
}
|
|
6110
7879
|
|
|
6111
7880
|
/* --- Button group (Beat Phase B, #542) ------------------------------------- */
|
|
@@ -6169,11 +7938,15 @@ a.bw-chip {
|
|
|
6169
7938
|
box-shadow: none;
|
|
6170
7939
|
}
|
|
6171
7940
|
|
|
7941
|
+
/* Selected item uses the Segmented pressed grammar (APP-003 / SEG-020), not
|
|
7942
|
+
* a raised surface card. Elevation is not the selected cue. */
|
|
6172
7943
|
.bw-button-group--segmented .bw-button-group__item--selected,
|
|
6173
|
-
.bw-button-group--segmented .bw-button-group__item[aria-checked="true"]
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
7944
|
+
.bw-button-group--segmented .bw-button-group__item[aria-checked="true"],
|
|
7945
|
+
.bw-button-group--segmented .bw-button-group__item[aria-pressed="true"] {
|
|
7946
|
+
background: var(--bw-color-accent-subtle);
|
|
7947
|
+
color: var(--bw-component-nav-item-active-text);
|
|
7948
|
+
border-color: var(--bw-color-accent);
|
|
7949
|
+
box-shadow: none;
|
|
6177
7950
|
}
|
|
6178
7951
|
|
|
6179
7952
|
/* --- List item / media row (Beat Phase B, #542) ---------------------------- */
|
|
@@ -6293,8 +8066,8 @@ a.bw-chip {
|
|
|
6293
8066
|
[data-theme="dark"] .bw-card--elevation-3 {
|
|
6294
8067
|
box-shadow: var(--bw-elevation-3);
|
|
6295
8068
|
}
|
|
6296
|
-
[data-theme="dark"] .bw-card--interactive:hover,
|
|
6297
|
-
[data-theme="dark"] .bw-card--interactive:focus-within,
|
|
8069
|
+
[data-theme="dark"] .bw-card--interactive:not(.bw-card--bordered):hover,
|
|
8070
|
+
[data-theme="dark"] .bw-card--interactive:not(.bw-card--bordered):focus-within,
|
|
6298
8071
|
[data-theme="dark"] a.bw-stat:hover {
|
|
6299
8072
|
box-shadow: var(--bw-elevation-2);
|
|
6300
8073
|
}
|
|
@@ -6305,6 +8078,7 @@ a.bw-chip {
|
|
|
6305
8078
|
[data-theme="dark"] .bw-dropdown__panel,
|
|
6306
8079
|
[data-theme="dark"] .bw-version-switch__panel,
|
|
6307
8080
|
[data-theme="dark"] .bw-theme-switch__panel,
|
|
8081
|
+
[data-theme="dark"] .bw-popover__panel,
|
|
6308
8082
|
[data-theme="dark"] .bw-combobox__listbox {
|
|
6309
8083
|
box-shadow: var(--bw-elevation-3);
|
|
6310
8084
|
}
|
|
@@ -6314,9 +8088,6 @@ a.bw-chip {
|
|
|
6314
8088
|
[data-theme="dark"] .bw-modal:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
6315
8089
|
box-shadow: var(--bw-elevation-4);
|
|
6316
8090
|
}
|
|
6317
|
-
[data-theme="dark"] .bw-slide-over[data-bw-open] .bw-slide-over__panel {
|
|
6318
|
-
box-shadow: var(--bw-elevation-4);
|
|
6319
|
-
}
|
|
6320
8091
|
|
|
6321
8092
|
/* --- Token specimen (THM-016, icvoss/django-brickwork#268) ----------------
|
|
6322
8093
|
* Live brand-token presentation: dual light/dark panes, swatch from the
|
|
@@ -6793,6 +8564,44 @@ a.bw-article-meta__tag-link:focus-visible {
|
|
|
6793
8564
|
|
|
6794
8565
|
/* --- Input group (prefix/suffix addons, #624) ------------------------------ */
|
|
6795
8566
|
|
|
8567
|
+
/* Size (ADR-125, ADR-126; SIZE-COVERAGE gate 2): the group re-points the
|
|
8568
|
+
* five control role variables so the field and every addon inherit one step.
|
|
8569
|
+
* Grammar matches bw-input--size-* / bw-btn--size-* / bw-combobox--size-*. */
|
|
8570
|
+
.bw-input-group--size-xs {
|
|
8571
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
8572
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
8573
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
8574
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
8575
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
8576
|
+
}
|
|
8577
|
+
.bw-input-group--size-sm {
|
|
8578
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
8579
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
8580
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
8581
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
8582
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
8583
|
+
}
|
|
8584
|
+
.bw-input-group--size-md {
|
|
8585
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
8586
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
8587
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
8588
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
8589
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
8590
|
+
}
|
|
8591
|
+
.bw-input-group--size-lg {
|
|
8592
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
8593
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
8594
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
8595
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
8596
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
8597
|
+
}
|
|
8598
|
+
.bw-input-group--size-xl {
|
|
8599
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
8600
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
8601
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
8602
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
8603
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
8604
|
+
}
|
|
6796
8605
|
.bw-input-group {
|
|
6797
8606
|
display: flex;
|
|
6798
8607
|
align-items: stretch;
|
|
@@ -6815,12 +8624,14 @@ a.bw-article-meta__tag-link:focus-visible {
|
|
|
6815
8624
|
display: inline-flex;
|
|
6816
8625
|
flex: 0 0 auto;
|
|
6817
8626
|
align-items: center;
|
|
6818
|
-
gap: var(--bw-
|
|
6819
|
-
padding-inline: var(--bw-
|
|
8627
|
+
gap: var(--bw-control-gap);
|
|
8628
|
+
padding-inline: var(--bw-control-padding-inline);
|
|
6820
8629
|
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
6821
8630
|
background: var(--bw-color-surface-sunken);
|
|
6822
8631
|
color: var(--bw-color-fg-muted);
|
|
6823
|
-
|
|
8632
|
+
/* Size follows the control step (role variable), not a fixed body-sm role,
|
|
8633
|
+
* so an input-group--size-* class keeps the addon text with the field. */
|
|
8634
|
+
font-size: var(--bw-control-font-size);
|
|
6824
8635
|
line-height: var(--bw-text-body-sm-line-height);
|
|
6825
8636
|
white-space: nowrap;
|
|
6826
8637
|
position: relative;
|
|
@@ -6867,3 +8678,328 @@ a.bw-article-meta__tag-link:focus-visible {
|
|
|
6867
8678
|
.bw-input-group:has(.bw-input[aria-invalid="true"]) .bw-input-group__addon {
|
|
6868
8679
|
border-color: var(--bw-color-danger);
|
|
6869
8680
|
}
|
|
8681
|
+
|
|
8682
|
+
|
|
8683
|
+
/* --- Description list (D15 / R19) ------------------------------------------- */
|
|
8684
|
+
|
|
8685
|
+
/* A semantic <dl>-based key-value display atom: stacked (default) and inline
|
|
8686
|
+
* layouts, with an optional divided hairline between groups.
|
|
8687
|
+
*
|
|
8688
|
+
* Grammar (closed; DDL-004):
|
|
8689
|
+
* .bw-description-list root <dl>
|
|
8690
|
+
* .bw-description-list__term <dt> element
|
|
8691
|
+
* .bw-description-list__details <dd> element
|
|
8692
|
+
* .bw-description-list--inline modifier: term and details on one row
|
|
8693
|
+
* .bw-description-list--divided modifier: hairline between groups
|
|
8694
|
+
*
|
|
8695
|
+
* Tokens read (DDL-015; no raw colour):
|
|
8696
|
+
* --bw-size-gap-md row gap between pairs / groups
|
|
8697
|
+
* --bw-color-fg-muted term ink (DDL-013)
|
|
8698
|
+
* --bw-color-fg details ink (DDL-014)
|
|
8699
|
+
* --bw-color-border divided hairline colour (DDL-012)
|
|
8700
|
+
* --bw-size-border-hairline divided hairline width
|
|
8701
|
+
* --bw-component-description-list-term-size term column min-inline-size in inline layout
|
|
8702
|
+
*
|
|
8703
|
+
* Type utilities applied by HTML / React / Vue consumers (not set here):
|
|
8704
|
+
* bw-text-xs on <dt> (caption role; DDL-013)
|
|
8705
|
+
* bw-text-md on <dd> (body role; DDL-014)
|
|
8706
|
+
*
|
|
8707
|
+
* Logical properties throughout (DDL-016). No breakpoint switch on this
|
|
8708
|
+
* component. At 320 px, details text wraps within its remaining column space;
|
|
8709
|
+
* overflow-wrap: anywhere on <dd> handles long unbreakable strings (DDL-017).
|
|
8710
|
+
*
|
|
8711
|
+
* Grouping <div> wrappers are optional in stacked mode and required in inline
|
|
8712
|
+
* and divided mode for column alignment and correct hairline placement (DDL-003).
|
|
8713
|
+
* React auto-wraps pairs when layout="inline" or divided is set. */
|
|
8714
|
+
|
|
8715
|
+
.bw-description-list {
|
|
8716
|
+
/* Flex column so pair spacing can target successive groups (or bare
|
|
8717
|
+
* dt/dd pairs) without putting the same gap between a term and its own
|
|
8718
|
+
* details (DDL-010: term directly above details; gap between pairs). */
|
|
8719
|
+
display: flex;
|
|
8720
|
+
flex-direction: column;
|
|
8721
|
+
margin: 0;
|
|
8722
|
+
padding: 0;
|
|
8723
|
+
}
|
|
8724
|
+
|
|
8725
|
+
/* Gap between successive pairs when grouped in a <div>. */
|
|
8726
|
+
.bw-description-list > div + div {
|
|
8727
|
+
margin-block-start: var(--bw-size-gap-md);
|
|
8728
|
+
}
|
|
8729
|
+
|
|
8730
|
+
/* Gap between successive pairs when bare: after a details, before the next term. */
|
|
8731
|
+
.bw-description-list > .bw-description-list__details + .bw-description-list__term {
|
|
8732
|
+
margin-block-start: var(--bw-size-gap-md);
|
|
8733
|
+
}
|
|
8734
|
+
|
|
8735
|
+
.bw-description-list__term {
|
|
8736
|
+
/* dt inherits display: block; reset the UA margin. */
|
|
8737
|
+
margin: 0;
|
|
8738
|
+
color: var(--bw-color-fg-muted);
|
|
8739
|
+
}
|
|
8740
|
+
|
|
8741
|
+
.bw-description-list__details {
|
|
8742
|
+
/* dd has a UA margin-inline-start; reset it. */
|
|
8743
|
+
margin: 0;
|
|
8744
|
+
color: var(--bw-color-fg);
|
|
8745
|
+
/* Prevent long unbreakable strings from overflowing at 320 px (DDL-017). */
|
|
8746
|
+
overflow-wrap: anywhere;
|
|
8747
|
+
}
|
|
8748
|
+
|
|
8749
|
+
/* Inline layout: group <div>s become flex rows so term and details sit side
|
|
8750
|
+
* by side. The term's min-inline-size aligns columns across all pairs. The
|
|
8751
|
+
* details fill remaining inline space and wrap rather than overflow (DDL-011,
|
|
8752
|
+
* DDL-017). align-items: baseline keeps short labels optically level with
|
|
8753
|
+
* value text. */
|
|
8754
|
+
.bw-description-list--inline > div {
|
|
8755
|
+
display: flex;
|
|
8756
|
+
flex-wrap: wrap;
|
|
8757
|
+
align-items: baseline;
|
|
8758
|
+
}
|
|
8759
|
+
|
|
8760
|
+
.bw-description-list--inline .bw-description-list__term {
|
|
8761
|
+
min-inline-size: var(--bw-component-description-list-term-size);
|
|
8762
|
+
flex-shrink: 0;
|
|
8763
|
+
}
|
|
8764
|
+
|
|
8765
|
+
.bw-description-list--inline .bw-description-list__details {
|
|
8766
|
+
flex: 1 1 0;
|
|
8767
|
+
min-inline-size: 0;
|
|
8768
|
+
}
|
|
8769
|
+
|
|
8770
|
+
/* Divided mode: hairline border-block-end between successive groups.
|
|
8771
|
+
* :not(:last-child) omits the trailing hairline on the final row (DDL-012,
|
|
8772
|
+
* troubleshooting note). padding-block-end preserves the visual row gap
|
|
8773
|
+
* between the content and the hairline so the hairline floats between pairs
|
|
8774
|
+
* rather than abutting the lower row's term. Groups are required in divided
|
|
8775
|
+
* mode; bare dt/dd divided is not supported (DDL-003). */
|
|
8776
|
+
.bw-description-list--divided > div:not(:last-child) {
|
|
8777
|
+
border-block-end: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
8778
|
+
padding-block-end: var(--bw-size-gap-md);
|
|
8779
|
+
}
|
|
8780
|
+
|
|
8781
|
+
/* --- Number stepper (docs/components/number-stepper.md, R50 / C19) ----------- */
|
|
8782
|
+
|
|
8783
|
+
/* .bw-number-stepper is the quantity adjuster: a flex row of a decrement
|
|
8784
|
+
* button, a native <input type="number">, and an increment button, all in a
|
|
8785
|
+
* connected group. The block reads the five control role variables only
|
|
8786
|
+
* (NST-010); size classes re-point them, same grammar as .bw-input--size-*
|
|
8787
|
+
* and .bw-switch--size-* (ADR-125). md is the default; React and Vue always
|
|
8788
|
+
* emit a size class.
|
|
8789
|
+
*
|
|
8790
|
+
* Connected group chrome (NST-012): outer corners carry --bw-radius-md via
|
|
8791
|
+
* logical properties; shared internal borders are single hairlines via
|
|
8792
|
+
* border-inline-end on the decrement button and border-inline-start on the
|
|
8793
|
+
* increment button; the input carries no additional side borders. No gap
|
|
8794
|
+
* between parts.
|
|
8795
|
+
*
|
|
8796
|
+
* RTL (NST-016): logical properties throughout. The flex row reverses through
|
|
8797
|
+
* direction inheritance so the decrement button (first in DOM) appears at the
|
|
8798
|
+
* inline end and the increment button at the inline start, which is the
|
|
8799
|
+
* correct UX in both directions. The internal side-border rules keep the
|
|
8800
|
+
* shared borders on the correct edges.
|
|
8801
|
+
*
|
|
8802
|
+
* Native spin arrows are suppressed (NST-013). No colour literals (NST-015).
|
|
8803
|
+
* Motion uses --bw-transition-colors (NST-017). */
|
|
8804
|
+
|
|
8805
|
+
.bw-number-stepper--size-xs {
|
|
8806
|
+
--bw-control-height: var(--bw-size-control-height-xs);
|
|
8807
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xs);
|
|
8808
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xs);
|
|
8809
|
+
--bw-control-gap: var(--bw-size-control-gap-xs);
|
|
8810
|
+
--bw-control-font-size: var(--bw-font-size-xs);
|
|
8811
|
+
}
|
|
8812
|
+
.bw-number-stepper--size-sm {
|
|
8813
|
+
--bw-control-height: var(--bw-size-control-height-sm);
|
|
8814
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
8815
|
+
--bw-control-icon-size: var(--bw-size-control-icon-sm);
|
|
8816
|
+
--bw-control-gap: var(--bw-size-control-gap-sm);
|
|
8817
|
+
--bw-control-font-size: var(--bw-font-size-sm);
|
|
8818
|
+
}
|
|
8819
|
+
.bw-number-stepper--size-md {
|
|
8820
|
+
--bw-control-height: var(--bw-size-control-height-md);
|
|
8821
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-md);
|
|
8822
|
+
--bw-control-icon-size: var(--bw-size-control-icon-md);
|
|
8823
|
+
--bw-control-gap: var(--bw-size-control-gap-md);
|
|
8824
|
+
--bw-control-font-size: var(--bw-font-size-md);
|
|
8825
|
+
}
|
|
8826
|
+
.bw-number-stepper--size-lg {
|
|
8827
|
+
--bw-control-height: var(--bw-size-control-height-lg);
|
|
8828
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
8829
|
+
--bw-control-icon-size: var(--bw-size-control-icon-lg);
|
|
8830
|
+
--bw-control-gap: var(--bw-size-control-gap-lg);
|
|
8831
|
+
--bw-control-font-size: var(--bw-font-size-lg);
|
|
8832
|
+
}
|
|
8833
|
+
.bw-number-stepper--size-xl {
|
|
8834
|
+
--bw-control-height: var(--bw-size-control-height-xl);
|
|
8835
|
+
--bw-control-padding-inline: var(--bw-size-control-padding-inline-xl);
|
|
8836
|
+
--bw-control-icon-size: var(--bw-size-control-icon-xl);
|
|
8837
|
+
--bw-control-gap: var(--bw-size-control-gap-xl);
|
|
8838
|
+
--bw-control-font-size: var(--bw-font-size-xl);
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8841
|
+
/* Root: flex row, no gap. The three children share borders to form one
|
|
8842
|
+
* connected group. */
|
|
8843
|
+
.bw-number-stepper {
|
|
8844
|
+
display: inline-flex;
|
|
8845
|
+
align-items: stretch;
|
|
8846
|
+
min-inline-size: 0;
|
|
8847
|
+
cursor: default;
|
|
8848
|
+
}
|
|
8849
|
+
|
|
8850
|
+
/* Buttons: square at the control height; centred icon; connected-group
|
|
8851
|
+
* outer corners via logical border-radius. */
|
|
8852
|
+
.bw-number-stepper__button {
|
|
8853
|
+
display: inline-flex;
|
|
8854
|
+
align-items: center;
|
|
8855
|
+
justify-content: center;
|
|
8856
|
+
flex: 0 0 auto;
|
|
8857
|
+
inline-size: var(--bw-control-height);
|
|
8858
|
+
block-size: var(--bw-control-height);
|
|
8859
|
+
min-block-size: 1.5rem;
|
|
8860
|
+
min-inline-size: 1.5rem;
|
|
8861
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
8862
|
+
background: var(--bw-color-surface);
|
|
8863
|
+
color: var(--bw-color-fg);
|
|
8864
|
+
cursor: pointer;
|
|
8865
|
+
transition: var(--bw-transition-colors);
|
|
8866
|
+
/* Icon inside reads the control icon size role variable. */
|
|
8867
|
+
font-size: var(--bw-control-icon-size);
|
|
8868
|
+
line-height: 1;
|
|
8869
|
+
}
|
|
8870
|
+
|
|
8871
|
+
.bw-number-stepper__button--decrement {
|
|
8872
|
+
border-start-start-radius: var(--bw-radius-md);
|
|
8873
|
+
border-end-start-radius: var(--bw-radius-md);
|
|
8874
|
+
/* Outer corners only; border-inline-end (the shared hairline to the input)
|
|
8875
|
+
* is kept so the internal boundary is visible (NST-012). */
|
|
8876
|
+
}
|
|
8877
|
+
|
|
8878
|
+
.bw-number-stepper__button--increment {
|
|
8879
|
+
border-start-end-radius: var(--bw-radius-md);
|
|
8880
|
+
border-end-end-radius: var(--bw-radius-md);
|
|
8881
|
+
/* Outer corners only; border-inline-start (the shared hairline to the input)
|
|
8882
|
+
* is kept so the internal boundary is visible (NST-012). */
|
|
8883
|
+
}
|
|
8884
|
+
|
|
8885
|
+
/* Input: fills remaining inline space; native spin arrows suppressed;
|
|
8886
|
+
* centred numeric value. No side borders (they are on the buttons). */
|
|
8887
|
+
.bw-number-stepper__input {
|
|
8888
|
+
flex: 1 1 auto;
|
|
8889
|
+
min-inline-size: 2.5rem;
|
|
8890
|
+
block-size: var(--bw-control-height);
|
|
8891
|
+
min-block-size: 1.5rem;
|
|
8892
|
+
padding-inline: var(--bw-control-gap);
|
|
8893
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
8894
|
+
border-inline: none;
|
|
8895
|
+
background: var(--bw-color-surface);
|
|
8896
|
+
color: var(--bw-color-fg);
|
|
8897
|
+
font: inherit;
|
|
8898
|
+
font-size: var(--bw-control-font-size);
|
|
8899
|
+
text-align: center;
|
|
8900
|
+
transition: var(--bw-transition-colors);
|
|
8901
|
+
/* Suppress native spin arrows (NST-013). */
|
|
8902
|
+
appearance: none;
|
|
8903
|
+
-moz-appearance: textfield;
|
|
8904
|
+
}
|
|
8905
|
+
|
|
8906
|
+
/* Suppress WebKit/Blink spin pseudo-elements. */
|
|
8907
|
+
.bw-number-stepper__input::-webkit-inner-spin-button,
|
|
8908
|
+
.bw-number-stepper__input::-webkit-outer-spin-button {
|
|
8909
|
+
-webkit-appearance: none;
|
|
8910
|
+
margin: 0;
|
|
8911
|
+
}
|
|
8912
|
+
|
|
8913
|
+
/* Placeholder: fg-muted, same floor as Input. */
|
|
8914
|
+
.bw-number-stepper__input::placeholder {
|
|
8915
|
+
color: var(--bw-color-fg-muted);
|
|
8916
|
+
opacity: 1;
|
|
8917
|
+
}
|
|
8918
|
+
|
|
8919
|
+
/* SVG icon inside the buttons: reads the icon-size role variable. */
|
|
8920
|
+
.bw-number-stepper__button .bw-icon {
|
|
8921
|
+
inline-size: var(--bw-control-icon-size);
|
|
8922
|
+
block-size: var(--bw-control-icon-size);
|
|
8923
|
+
flex-shrink: 0;
|
|
8924
|
+
fill: none;
|
|
8925
|
+
}
|
|
8926
|
+
|
|
8927
|
+
/* ---- Hover states (NST-032) ---- */
|
|
8928
|
+
|
|
8929
|
+
.bw-number-stepper__button:hover:where(:not(:disabled)) {
|
|
8930
|
+
background: var(--bw-color-surface-sunken);
|
|
8931
|
+
}
|
|
8932
|
+
|
|
8933
|
+
.bw-number-stepper__input:hover:where(:not(:disabled):not([readonly]):not(:focus-visible)) {
|
|
8934
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
8935
|
+
}
|
|
8936
|
+
|
|
8937
|
+
/* ---- Focus-visible (NST-033): ring on the focused element, not the group ---- */
|
|
8938
|
+
|
|
8939
|
+
.bw-number-stepper__button:focus-visible,
|
|
8940
|
+
.bw-number-stepper__input:focus-visible {
|
|
8941
|
+
outline: 2px solid var(--bw-color-focus-ring);
|
|
8942
|
+
outline-offset: 2px;
|
|
8943
|
+
position: relative;
|
|
8944
|
+
z-index: 1;
|
|
8945
|
+
}
|
|
8946
|
+
|
|
8947
|
+
.bw-number-stepper__input:focus-visible {
|
|
8948
|
+
border-color: var(--bw-color-accent);
|
|
8949
|
+
}
|
|
8950
|
+
|
|
8951
|
+
/* ---- Disabled (NST-040) ---- */
|
|
8952
|
+
|
|
8953
|
+
.bw-number-stepper:has(.bw-number-stepper__input:disabled) {
|
|
8954
|
+
cursor: not-allowed;
|
|
8955
|
+
}
|
|
8956
|
+
|
|
8957
|
+
.bw-number-stepper__button:disabled {
|
|
8958
|
+
background: var(--bw-color-action-disabled-bg);
|
|
8959
|
+
color: var(--bw-color-action-disabled-text);
|
|
8960
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
8961
|
+
cursor: not-allowed;
|
|
8962
|
+
}
|
|
8963
|
+
|
|
8964
|
+
.bw-number-stepper__input:disabled {
|
|
8965
|
+
background: var(--bw-color-action-disabled-bg);
|
|
8966
|
+
color: var(--bw-color-action-disabled-text);
|
|
8967
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
8968
|
+
cursor: not-allowed;
|
|
8969
|
+
}
|
|
8970
|
+
|
|
8971
|
+
.bw-number-stepper__input:disabled::placeholder {
|
|
8972
|
+
color: var(--bw-color-action-disabled-text);
|
|
8973
|
+
}
|
|
8974
|
+
|
|
8975
|
+
/* ---- Readonly (NST-041): input sunken; buttons disabled-looking ---- */
|
|
8976
|
+
|
|
8977
|
+
.bw-number-stepper__input[readonly] {
|
|
8978
|
+
background: var(--bw-color-surface-sunken);
|
|
8979
|
+
}
|
|
8980
|
+
|
|
8981
|
+
/* ---- Invalid (NST-053): danger border on the whole group ---- */
|
|
8982
|
+
|
|
8983
|
+
.bw-number-stepper__input[aria-invalid="true"],
|
|
8984
|
+
.bw-field--invalid .bw-number-stepper__input {
|
|
8985
|
+
border-color: var(--bw-color-danger);
|
|
8986
|
+
}
|
|
8987
|
+
|
|
8988
|
+
.bw-number-stepper__input[aria-invalid="true"] ~ .bw-number-stepper__button--increment,
|
|
8989
|
+
.bw-field--invalid .bw-number-stepper__button--increment {
|
|
8990
|
+
border-color: var(--bw-color-danger);
|
|
8991
|
+
}
|
|
8992
|
+
|
|
8993
|
+
.bw-number-stepper:has(.bw-number-stepper__input[aria-invalid="true"]) .bw-number-stepper__button--decrement,
|
|
8994
|
+
.bw-field--invalid .bw-number-stepper__button--decrement {
|
|
8995
|
+
border-color: var(--bw-color-danger);
|
|
8996
|
+
}
|
|
8997
|
+
|
|
8998
|
+
/* ---- Reduced motion (NST-017) ---- */
|
|
8999
|
+
|
|
9000
|
+
@media (prefers-reduced-motion: reduce) {
|
|
9001
|
+
.bw-number-stepper__button,
|
|
9002
|
+
.bw-number-stepper__input {
|
|
9003
|
+
transition: none;
|
|
9004
|
+
}
|
|
9005
|
+
}
|