@bwui/css 0.1.3 → 0.1.4
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 +242 -44
- package/package.json +4 -3
- package/src/components.css +2 -2
- package/src/document-a11y.css +15 -7
- package/src/layers/components.css +173 -32
- package/src/primitives.css +3 -1
- package/src/reset.css +6 -1
- package/src/wave-e.css +1 -1
package/dist/brickwork.css
CHANGED
|
@@ -46,9 +46,21 @@
|
|
|
46
46
|
--bw-component-icon-size-lg: 1.5rem;
|
|
47
47
|
--bw-component-icon-size-xl: 2rem;
|
|
48
48
|
--bw-component-icon-size-2xl: 2.5rem;
|
|
49
|
-
--bw-size-
|
|
49
|
+
--bw-size-step-xs: 0.75;
|
|
50
|
+
--bw-size-step-sm: 0.875;
|
|
51
|
+
--bw-size-step-md: 1;
|
|
52
|
+
--bw-size-step-lg: 1.125;
|
|
53
|
+
--bw-size-step-xl: 1.25;
|
|
54
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
55
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
50
56
|
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
51
|
-
--bw-size-control-height-lg:
|
|
57
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
58
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
59
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
60
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
61
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
62
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
63
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
52
64
|
--bw-size-touch-target-min: 2.75rem;
|
|
53
65
|
--bw-size-max-width-prose: 65ch;
|
|
54
66
|
--bw-size-max-width-form: 32rem;
|
|
@@ -601,6 +613,16 @@
|
|
|
601
613
|
--bw-density-section-gap: 2rem;
|
|
602
614
|
--bw-density-card-padding: 1rem;
|
|
603
615
|
--bw-density-page-gutter-inline: 1.5rem;
|
|
616
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
617
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
618
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
619
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
620
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
621
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
622
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
623
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
624
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
625
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
604
626
|
}
|
|
605
627
|
|
|
606
628
|
[data-density="compact"] {
|
|
@@ -617,6 +639,16 @@
|
|
|
617
639
|
--bw-density-section-gap: 1.5rem;
|
|
618
640
|
--bw-density-card-padding: 0.75rem;
|
|
619
641
|
--bw-density-page-gutter-inline: 1rem;
|
|
642
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
643
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
644
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
645
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
646
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
647
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
648
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
649
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
650
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
651
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
620
652
|
}
|
|
621
653
|
|
|
622
654
|
[data-density="spacious"] {
|
|
@@ -633,6 +665,16 @@
|
|
|
633
665
|
--bw-density-section-gap: 3rem;
|
|
634
666
|
--bw-density-card-padding: 1.5rem;
|
|
635
667
|
--bw-density-page-gutter-inline: 2rem;
|
|
668
|
+
--bw-size-control-height-xs: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xs)));
|
|
669
|
+
--bw-size-control-height-sm: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-sm)));
|
|
670
|
+
--bw-size-control-height-md: var(--bw-density-control-height);
|
|
671
|
+
--bw-size-control-height-lg: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-lg)));
|
|
672
|
+
--bw-size-control-height-xl: max(1.5rem, calc(var(--bw-density-control-height) * var(--bw-size-step-xl)));
|
|
673
|
+
--bw-size-control-padding-inline-xs: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xs));
|
|
674
|
+
--bw-size-control-padding-inline-sm: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-sm));
|
|
675
|
+
--bw-size-control-padding-inline-md: var(--bw-density-control-padding-inline);
|
|
676
|
+
--bw-size-control-padding-inline-lg: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-lg));
|
|
677
|
+
--bw-size-control-padding-inline-xl: calc(var(--bw-density-control-padding-inline) * var(--bw-size-step-xl));
|
|
636
678
|
}
|
|
637
679
|
|
|
638
680
|
:root {
|
|
@@ -763,7 +805,12 @@ body {
|
|
|
763
805
|
font-size: var(--bw-text-body-md-size, 1rem);
|
|
764
806
|
-webkit-font-smoothing: antialiased;
|
|
765
807
|
color: var(--bw-color-fg);
|
|
766
|
-
|
|
808
|
+
/* Page ground (icvoss/brickwork#26): the surface token. A prior
|
|
809
|
+
* var(--bw-color-bg) named a token no theme defines, so the declaration was
|
|
810
|
+
* invalid at computed-value time and the body stayed transparent (a white
|
|
811
|
+
* canvas under dark text colours). Surface is white in light and near-black
|
|
812
|
+
* in dark, so light output is unchanged and dark now paints its own ground. */
|
|
813
|
+
background-color: var(--bw-color-surface);
|
|
767
814
|
}
|
|
768
815
|
|
|
769
816
|
img,
|
|
@@ -947,8 +994,10 @@ a:hover {
|
|
|
947
994
|
.bw-fg-subtle {
|
|
948
995
|
color: var(--bw-color-fg-subtle);
|
|
949
996
|
}
|
|
997
|
+
/* Page ground; the same token as the body (icvoss/brickwork#26). There is no
|
|
998
|
+
* --bw-color-bg token, so this resolves to the surface role. */
|
|
950
999
|
.bw-bg {
|
|
951
|
-
background-color: var(--bw-color-
|
|
1000
|
+
background-color: var(--bw-color-surface);
|
|
952
1001
|
}
|
|
953
1002
|
.bw-surface {
|
|
954
1003
|
background-color: var(--bw-color-surface);
|
|
@@ -3149,9 +3198,15 @@ a:hover {
|
|
|
3149
3198
|
var(--bw-transition-shadow),
|
|
3150
3199
|
var(--bw-transition-transform);
|
|
3151
3200
|
}
|
|
3152
|
-
|
|
3201
|
+
/* Size classes (ADR-125 section 6): the grammar is bw-<component>--size-<step>.
|
|
3202
|
+
* The bare spelling (bw-btn--sm, and the same for gauge, icon, modal,
|
|
3203
|
+
* slide-over, stat and stat-comparison) is DEPRECATED. Both selectors stay in
|
|
3204
|
+
* one grouped rule for the deprecation window; the bare ones are removed in
|
|
3205
|
+
* the next major of django-brickwork and in the @bwui/css release shipped with
|
|
3206
|
+
* it. Templates, React, Vue and the gallery emit the new class. */
|
|
3207
|
+
.bw-btn--sm, .bw-btn--size-sm {
|
|
3153
3208
|
block-size: var(--bw-size-control-height-sm);
|
|
3154
|
-
padding-inline: var(--bw-
|
|
3209
|
+
padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
3155
3210
|
}
|
|
3156
3211
|
/* md is the base .bw-btn size (icvoss/django-brickwork#130): every shipped
|
|
3157
3212
|
* template that names a size emits bw-btn--md explicitly rather than leaving
|
|
@@ -3160,13 +3215,16 @@ a:hover {
|
|
|
3160
3215
|
* to the base. Without this rule the class existed in markup with nothing in
|
|
3161
3216
|
* the stylesheet naming it, which is the defect class this issue is about:
|
|
3162
3217
|
* the base values happened to make it look correct by accident. */
|
|
3163
|
-
.bw-btn--md {
|
|
3164
|
-
block-size: var(--bw-
|
|
3165
|
-
padding-inline: var(--bw-
|
|
3218
|
+
.bw-btn--md, .bw-btn--size-md {
|
|
3219
|
+
block-size: var(--bw-size-control-height-md);
|
|
3220
|
+
padding-inline: var(--bw-size-control-padding-inline-md);
|
|
3166
3221
|
}
|
|
3167
|
-
|
|
3222
|
+
/* ADR-125: sm, md and lg resolve from the density control base times a
|
|
3223
|
+
* kit-wide step multiplier (--bw-size-step-*), not from absolute rem values,
|
|
3224
|
+
* so every density keeps three distinct heights. */
|
|
3225
|
+
.bw-btn--lg, .bw-btn--size-lg {
|
|
3168
3226
|
block-size: var(--bw-size-control-height-lg);
|
|
3169
|
-
padding-inline: var(--bw-
|
|
3227
|
+
padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
3170
3228
|
}
|
|
3171
3229
|
/* Solid buttons carry a border in their own hue (0.7.0 craft): 80% of the fill
|
|
3172
3230
|
* toward black is the Radix solid-button edge, a shade the fill visibly sits
|
|
@@ -3265,10 +3323,10 @@ a:hover {
|
|
|
3265
3323
|
}
|
|
3266
3324
|
/* Exact square at every size (0.7.0 craft): the sm/lg heights bring their own
|
|
3267
3325
|
* widths, so an icon button's optical padding is identical on all four sides. */
|
|
3268
|
-
.bw-btn--sm.bw-btn--icon-only {
|
|
3326
|
+
.bw-btn--sm.bw-btn--icon-only, .bw-btn--size-sm.bw-btn--icon-only {
|
|
3269
3327
|
inline-size: var(--bw-size-control-height-sm);
|
|
3270
3328
|
}
|
|
3271
|
-
.bw-btn--lg.bw-btn--icon-only {
|
|
3329
|
+
.bw-btn--lg.bw-btn--icon-only, .bw-btn--size-lg.bw-btn--icon-only {
|
|
3272
3330
|
inline-size: var(--bw-size-control-height-lg);
|
|
3273
3331
|
}
|
|
3274
3332
|
/* Flat disabled colours (COL-018 / #282), not opacity: opacity failed
|
|
@@ -3551,11 +3609,14 @@ select.bw-input {
|
|
|
3551
3609
|
[dir="rtl"] select.bw-input {
|
|
3552
3610
|
background-position: left var(--bw-density-control-padding-inline) center;
|
|
3553
3611
|
}
|
|
3612
|
+
/* background-color, not the shorthand: the shorthand also reset
|
|
3613
|
+
* background-image, so a disabled select.bw-input lost its chevron (the
|
|
3614
|
+
* select rule is less specific than these state rules). */
|
|
3554
3615
|
.bw-input[readonly] {
|
|
3555
|
-
background: var(--bw-color-surface-sunken);
|
|
3616
|
+
background-color: var(--bw-color-surface-sunken);
|
|
3556
3617
|
}
|
|
3557
3618
|
.bw-input:disabled {
|
|
3558
|
-
background: var(--bw-color-action-disabled-bg);
|
|
3619
|
+
background-color: var(--bw-color-action-disabled-bg);
|
|
3559
3620
|
color: var(--bw-color-action-disabled-text);
|
|
3560
3621
|
border-color: var(--bw-color-action-disabled-border);
|
|
3561
3622
|
cursor: not-allowed;
|
|
@@ -5495,11 +5556,11 @@ a.bw-stat:hover {
|
|
|
5495
5556
|
consumer stylesheet that selects .bw-stat__trend directly; #334). */
|
|
5496
5557
|
/* size arg (VIZ-027): modifiers re-point the value-size component token, so
|
|
5497
5558
|
the numeral rule itself never forks. */
|
|
5498
|
-
.bw-stat--sm {
|
|
5559
|
+
.bw-stat--sm, .bw-stat--size-sm {
|
|
5499
5560
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
5500
5561
|
padding: var(--bw-space-3);
|
|
5501
5562
|
}
|
|
5502
|
-
.bw-stat--lg {
|
|
5563
|
+
.bw-stat--lg, .bw-stat--size-lg {
|
|
5503
5564
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
5504
5565
|
padding: var(--bw-space-6);
|
|
5505
5566
|
}
|
|
@@ -5514,8 +5575,11 @@ a.bw-stat:hover {
|
|
|
5514
5575
|
padding: 0;
|
|
5515
5576
|
}
|
|
5516
5577
|
.bw-stat--chrome-plain.bw-stat--sm,
|
|
5578
|
+
.bw-stat--chrome-plain.bw-stat--size-sm,
|
|
5517
5579
|
.bw-stat--chrome-plain.bw-stat--lg,
|
|
5518
|
-
.bw-stat--chrome-plain.bw-stat--
|
|
5580
|
+
.bw-stat--chrome-plain.bw-stat--size-lg,
|
|
5581
|
+
.bw-stat--chrome-plain.bw-stat--md,
|
|
5582
|
+
.bw-stat--chrome-plain.bw-stat--size-md {
|
|
5519
5583
|
padding: 0;
|
|
5520
5584
|
}
|
|
5521
5585
|
a.bw-stat--chrome-plain:hover {
|
|
@@ -5689,11 +5753,11 @@ a.bw-stat--chrome-plain:hover {
|
|
|
5689
5753
|
/* size arg (mirrors _stat.html's VIZ-027 seam): modifiers re-point the
|
|
5690
5754
|
same value-size component token _stat.html uses, so a comparison tile
|
|
5691
5755
|
sits at the same scale as a plain stat tile sharing its grid. */
|
|
5692
|
-
.bw-stat-comparison--sm {
|
|
5756
|
+
.bw-stat-comparison--sm, .bw-stat-comparison--size-sm {
|
|
5693
5757
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
5694
5758
|
padding: var(--bw-space-3);
|
|
5695
5759
|
}
|
|
5696
|
-
.bw-stat-comparison--lg {
|
|
5760
|
+
.bw-stat-comparison--lg, .bw-stat-comparison--size-lg {
|
|
5697
5761
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
5698
5762
|
padding: var(--bw-space-6);
|
|
5699
5763
|
}
|
|
@@ -5998,15 +6062,15 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
5998
6062
|
}
|
|
5999
6063
|
/* size arg (VIZ-010): modifiers re-point the diameter component token, the
|
|
6000
6064
|
same mechanism .bw-stat--sm/--lg use for their own value-size token. */
|
|
6001
|
-
.bw-gauge--sm {
|
|
6065
|
+
.bw-gauge--sm, .bw-gauge--size-sm {
|
|
6002
6066
|
inline-size: var(--bw-component-gauge-diameter-sm);
|
|
6003
6067
|
block-size: var(--bw-component-gauge-diameter-sm);
|
|
6004
6068
|
}
|
|
6005
|
-
.bw-gauge--md {
|
|
6069
|
+
.bw-gauge--md, .bw-gauge--size-md {
|
|
6006
6070
|
inline-size: var(--bw-component-gauge-diameter-md);
|
|
6007
6071
|
block-size: var(--bw-component-gauge-diameter-md);
|
|
6008
6072
|
}
|
|
6009
|
-
.bw-gauge--lg {
|
|
6073
|
+
.bw-gauge--lg, .bw-gauge--size-lg {
|
|
6010
6074
|
inline-size: var(--bw-component-gauge-diameter-lg);
|
|
6011
6075
|
block-size: var(--bw-component-gauge-diameter-lg);
|
|
6012
6076
|
}
|
|
@@ -6765,16 +6829,16 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
6765
6829
|
/* Size modifiers (CMP-020): sm/lg re-point the max-width token (the floor
|
|
6766
6830
|
* panel honours them too); full is full-viewport, gutterless, radius
|
|
6767
6831
|
* squared off, and only means anything as an overlay. */
|
|
6768
|
-
.bw-modal--sm .bw-modal__panel {
|
|
6832
|
+
.bw-modal--sm .bw-modal__panel, .bw-modal--size-sm .bw-modal__panel {
|
|
6769
6833
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
6770
6834
|
}
|
|
6771
|
-
.bw-modal--lg .bw-modal__panel {
|
|
6835
|
+
.bw-modal--lg .bw-modal__panel, .bw-modal--size-lg .bw-modal__panel {
|
|
6772
6836
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
6773
6837
|
}
|
|
6774
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) {
|
|
6838
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]), .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) {
|
|
6775
6839
|
padding: 0;
|
|
6776
6840
|
}
|
|
6777
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
6841
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel, .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
6778
6842
|
max-inline-size: none;
|
|
6779
6843
|
block-size: 100%;
|
|
6780
6844
|
border-radius: var(--bw-radius-none);
|
|
@@ -6983,17 +7047,17 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
6983
7047
|
}
|
|
6984
7048
|
}
|
|
6985
7049
|
/* Size modifiers: reuse the modal's own width ramp. */
|
|
6986
|
-
.bw-slide-over--sm .bw-slide-over__panel {
|
|
7050
|
+
.bw-slide-over--sm .bw-slide-over__panel, .bw-slide-over--size-sm .bw-slide-over__panel {
|
|
6987
7051
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
6988
7052
|
}
|
|
6989
7053
|
/* --md is the DOCUMENTED DEFAULT and the template emits it unconditionally, so
|
|
6990
7054
|
* it needs a real rule: without one the default size resolved to the panel's
|
|
6991
7055
|
* base width by accident rather than by declaration (the #120 defect class,
|
|
6992
7056
|
* found in the 3.0.0 options audit). */
|
|
6993
|
-
.bw-slide-over--md .bw-slide-over__panel {
|
|
7057
|
+
.bw-slide-over--md .bw-slide-over__panel, .bw-slide-over--size-md .bw-slide-over__panel {
|
|
6994
7058
|
max-inline-size: var(--bw-size-max-width-modal-md);
|
|
6995
7059
|
}
|
|
6996
|
-
.bw-slide-over--lg .bw-slide-over__panel {
|
|
7060
|
+
.bw-slide-over--lg .bw-slide-over__panel, .bw-slide-over--size-lg .bw-slide-over__panel {
|
|
6997
7061
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
6998
7062
|
}
|
|
6999
7063
|
/* Sticky header: title plus the always-present close control, divided
|
|
@@ -7261,6 +7325,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7261
7325
|
* list too (compose, never duplicate); only combobox-specific physics live
|
|
7262
7326
|
* here. */
|
|
7263
7327
|
.bw-combobox {
|
|
7328
|
+
/* Chip block size (CMB-038): the control height less the frame's own
|
|
7329
|
+
* block padding, never below the 1.5rem WCAG 2.5.8 target plus the chip's
|
|
7330
|
+
* hairline border. Shared by the chip and the multiple-mode input. */
|
|
7331
|
+
--bw-combobox-chip-size: max(
|
|
7332
|
+
calc(1.5rem + 2 * var(--bw-size-border-hairline)),
|
|
7333
|
+
calc(var(--bw-density-control-height) - 2 * var(--bw-space-2))
|
|
7334
|
+
);
|
|
7264
7335
|
position: relative;
|
|
7265
7336
|
}
|
|
7266
7337
|
/* Chips and the input share one wrapping row; the absolutely positioned
|
|
@@ -7278,6 +7349,90 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7278
7349
|
inline-size: auto;
|
|
7279
7350
|
min-inline-size: 0;
|
|
7280
7351
|
}
|
|
7352
|
+
/* Placeholder colour (CMB-035, GAP-CMB-15): the shipped bundle had no
|
|
7353
|
+
* placeholder rule, so the UA default applied. Scoped to the combobox input;
|
|
7354
|
+
* opacity is reset because Firefox dims ::placeholder on top of its colour.
|
|
7355
|
+
* fg-muted, not fg-subtle: composed on the frame fill fg-subtle measures
|
|
7356
|
+
* 2.62:1 light and 3.84:1 dark, under the 4.5:1 text floor (AC-CMB-019),
|
|
7357
|
+
* where fg-muted clears it in both themes (combobox.md 4.3). */
|
|
7358
|
+
.bw-combobox__input::placeholder {
|
|
7359
|
+
color: var(--bw-color-fg-muted);
|
|
7360
|
+
opacity: 1;
|
|
7361
|
+
}
|
|
7362
|
+
/* A disabled control prompts in its disabled ink, not the live placeholder
|
|
7363
|
+
* colour, so the whole field reads as one inactive surface. */
|
|
7364
|
+
.bw-combobox__input:disabled::placeholder {
|
|
7365
|
+
color: var(--bw-color-action-disabled-text);
|
|
7366
|
+
}
|
|
7367
|
+
/* Multiple-mode frame (CMB-031, deliberate break, combobox.md 13.3): the chips
|
|
7368
|
+
* and the input share ONE frame. The frame moves from the input to the field
|
|
7369
|
+
* wrapper (the shared .bw-input recipe restated: control border, radius-md,
|
|
7370
|
+
* inset hairline, hover pre-light, accent border plus halo on focus) and
|
|
7371
|
+
* grows with wrapped chips (min-block-size, never a fixed height). The input
|
|
7372
|
+
* goes borderless so it reads as part of the field. Single mode is untouched:
|
|
7373
|
+
* it keeps the bare .bw-input frame (CMB-030). */
|
|
7374
|
+
.bw-combobox--multiple .bw-combobox__field {
|
|
7375
|
+
min-block-size: var(--bw-density-control-height);
|
|
7376
|
+
padding-block: var(--bw-space-1);
|
|
7377
|
+
padding-inline: var(--bw-density-control-padding-inline);
|
|
7378
|
+
background: var(--bw-color-surface);
|
|
7379
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
7380
|
+
border-radius: var(--bw-radius-md);
|
|
7381
|
+
box-shadow: inset 0 1px 2px 0 oklch(0 0 0 / 0.04);
|
|
7382
|
+
transition: var(--bw-transition-colors), var(--bw-transition-shadow);
|
|
7383
|
+
}
|
|
7384
|
+
.bw-combobox--multiple .bw-combobox__field:hover:where(
|
|
7385
|
+
:not(:focus-within):not(:has(.bw-combobox__input:disabled, .bw-combobox__input[readonly]))
|
|
7386
|
+
) {
|
|
7387
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
7388
|
+
}
|
|
7389
|
+
.bw-combobox--multiple .bw-combobox__field:focus-within {
|
|
7390
|
+
border-color: var(--bw-color-accent);
|
|
7391
|
+
box-shadow:
|
|
7392
|
+
inset 0 1px 2px 0 oklch(0 0 0 / 0.04),
|
|
7393
|
+
0 0 0 3px color-mix(in oklab, var(--bw-color-accent) 18%, transparent);
|
|
7394
|
+
}
|
|
7395
|
+
/* The global ring (reset.css :focus-visible) moves from the input to the
|
|
7396
|
+
* frame so keyboard focus is outlined at the control edge, once. */
|
|
7397
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:focus-visible) {
|
|
7398
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
7399
|
+
outline-offset: 2px;
|
|
7400
|
+
}
|
|
7401
|
+
/* Declared after focus so the danger border persists while focused, as for
|
|
7402
|
+
* .bw-input. */
|
|
7403
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[aria-invalid="true"]) {
|
|
7404
|
+
border-color: var(--bw-color-danger);
|
|
7405
|
+
}
|
|
7406
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[readonly]) {
|
|
7407
|
+
background: var(--bw-color-surface-sunken);
|
|
7408
|
+
}
|
|
7409
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:disabled) {
|
|
7410
|
+
background: var(--bw-color-action-disabled-bg);
|
|
7411
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
7412
|
+
cursor: not-allowed;
|
|
7413
|
+
}
|
|
7414
|
+
.bw-combobox--multiple .bw-combobox__input,
|
|
7415
|
+
.bw-combobox--multiple .bw-combobox__input:hover,
|
|
7416
|
+
.bw-combobox--multiple .bw-combobox__input:focus-visible,
|
|
7417
|
+
.bw-combobox--multiple .bw-combobox__input:disabled,
|
|
7418
|
+
.bw-combobox--multiple .bw-combobox__input[readonly] {
|
|
7419
|
+
/* The frame owns border, fill, well and ring; the input only types. The
|
|
7420
|
+
* block-size mirrors a chip so a wrapped row keeps one baseline rhythm. */
|
|
7421
|
+
/* A length literal: a typing run beside chips, no sizing-ramp step. Wide
|
|
7422
|
+
* enough for a short placeholder ("Add team"), so a row with no room wraps
|
|
7423
|
+
* the input to its own line instead of clipping the prompt. */
|
|
7424
|
+
flex-basis: 6rem;
|
|
7425
|
+
block-size: auto;
|
|
7426
|
+
min-block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
7427
|
+
padding-inline: var(--bw-space-1);
|
|
7428
|
+
background: transparent;
|
|
7429
|
+
border: 0;
|
|
7430
|
+
box-shadow: none;
|
|
7431
|
+
outline: none;
|
|
7432
|
+
}
|
|
7433
|
+
.bw-combobox--multiple .bw-combobox__input:disabled {
|
|
7434
|
+
color: var(--bw-color-action-disabled-text);
|
|
7435
|
+
}
|
|
7281
7436
|
/* The listbox mirrors the dropdown panel exactly (DESIGN.md reserved rows):
|
|
7282
7437
|
* raised surface, elevation-3 at z-dropdown, radius-lg, menu min-width, the
|
|
7283
7438
|
* light-theme top-light (dark reset at the end of this file), bw-fade-in-up
|
|
@@ -7319,6 +7474,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7319
7474
|
* stamps it on: the target listbox itself, or the requesting input beside
|
|
7320
7475
|
* it. First consumer of --bw-component-htmx-indicator-opacity. */
|
|
7321
7476
|
.bw-combobox__listbox.htmx-request,
|
|
7477
|
+
.bw-combobox__listbox[aria-busy="true"],
|
|
7322
7478
|
.bw-combobox__input.htmx-request ~ .bw-combobox__listbox {
|
|
7323
7479
|
opacity: var(--bw-component-htmx-indicator-opacity);
|
|
7324
7480
|
}
|
|
@@ -7349,19 +7505,47 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7349
7505
|
.bw-combobox__option[aria-selected="true"] {
|
|
7350
7506
|
font-weight: var(--bw-font-weight-medium);
|
|
7351
7507
|
}
|
|
7508
|
+
/* Disabled option (CMB-016): stays visible and filterable, paints the flat
|
|
7509
|
+
* disabled colours, shows no hover wash and cannot be chosen (the behaviour
|
|
7510
|
+
* skips it). The state is also carried by aria-disabled, not colour alone. */
|
|
7511
|
+
.bw-combobox__option[aria-disabled="true"] {
|
|
7512
|
+
color: var(--bw-color-action-disabled-text);
|
|
7513
|
+
cursor: not-allowed;
|
|
7514
|
+
}
|
|
7515
|
+
.bw-combobox__option[aria-disabled="true"]:hover {
|
|
7516
|
+
background-color: transparent;
|
|
7517
|
+
}
|
|
7518
|
+
/* Create row (CMB-020, GAP-CMB-16): the lead word is quiet and the echoed
|
|
7519
|
+
* query carries the weight, so the row reads "Create <query>". */
|
|
7520
|
+
.bw-combobox__option--create {
|
|
7521
|
+
color: var(--bw-color-fg-muted);
|
|
7522
|
+
}
|
|
7523
|
+
.bw-combobox__create-query {
|
|
7524
|
+
color: var(--bw-color-fg);
|
|
7525
|
+
font-weight: var(--bw-font-weight-medium);
|
|
7526
|
+
overflow-wrap: anywhere;
|
|
7527
|
+
}
|
|
7352
7528
|
.bw-combobox__empty {
|
|
7353
7529
|
padding: var(--bw-space-2) var(--bw-space-3);
|
|
7354
7530
|
color: var(--bw-color-fg-muted);
|
|
7355
7531
|
font-size: var(--bw-text-body-sm-size);
|
|
7356
7532
|
line-height: var(--bw-text-body-sm-line-height);
|
|
7357
7533
|
}
|
|
7534
|
+
/* Server-filter failure row (CMB-019): the same row shape as the empty
|
|
7535
|
+
* message, in the text-duty danger tier (the .bw-field__error precedent). */
|
|
7536
|
+
.bw-combobox__error {
|
|
7537
|
+
padding: var(--bw-space-2) var(--bw-space-3);
|
|
7538
|
+
color: var(--bw-color-danger-fg);
|
|
7539
|
+
font-size: var(--bw-text-body-sm-size);
|
|
7540
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
7541
|
+
}
|
|
7358
7542
|
/* Selected-value chips (multiple mode, CMP-028): the selected wash at
|
|
7359
|
-
* radius-full,
|
|
7360
|
-
*
|
|
7361
|
-
* control beside it. */
|
|
7543
|
+
* radius-full, sized by --bw-combobox-chip-size (CMB-038) so a chip row sits
|
|
7544
|
+
* inside the control's height rather than stretching it. */
|
|
7362
7545
|
.bw-combobox__chip {
|
|
7363
7546
|
display: inline-flex;
|
|
7364
7547
|
align-items: center;
|
|
7548
|
+
block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
7365
7549
|
gap: var(--bw-space-1);
|
|
7366
7550
|
padding-inline: var(--bw-space-3) var(--bw-space-1);
|
|
7367
7551
|
background: var(--bw-state-selected-bg);
|
|
@@ -7374,13 +7558,19 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
7374
7558
|
display: inline-flex;
|
|
7375
7559
|
align-items: center;
|
|
7376
7560
|
justify-content: center;
|
|
7377
|
-
|
|
7378
|
-
|
|
7561
|
+
/* 1.5rem is the WCAG 2.5.8 floor (CMB-053); the chip sizes to it, so the
|
|
7562
|
+
* remove control no longer pushes a chip taller than the control (CMB-038,
|
|
7563
|
+
* GAP-CMB-10). It fills the chip's inner block size. */
|
|
7564
|
+
block-size: 100%;
|
|
7565
|
+
min-block-size: 1.5rem;
|
|
7566
|
+
min-inline-size: 1.5rem;
|
|
7379
7567
|
padding: var(--bw-space-1);
|
|
7380
7568
|
background: transparent;
|
|
7381
7569
|
border: 0;
|
|
7382
7570
|
border-radius: var(--bw-radius-full);
|
|
7383
|
-
|
|
7571
|
+
/* fg-muted, not icon-muted: composed on the chip fill icon-muted measures
|
|
7572
|
+
* 2.39:1 in light, under the 3:1 non-text floor (AC-CMB-019, CMB-054). */
|
|
7573
|
+
color: var(--bw-color-fg-muted);
|
|
7384
7574
|
cursor: pointer;
|
|
7385
7575
|
transition: var(--bw-transition-colors);
|
|
7386
7576
|
}
|
|
@@ -13625,7 +13815,7 @@ same pattern as .bw-bio__profile-link. */
|
|
|
13625
13815
|
line-height: 1;
|
|
13626
13816
|
}
|
|
13627
13817
|
|
|
13628
|
-
.bw-icon--lg {
|
|
13818
|
+
.bw-icon--lg, .bw-icon--size-lg {
|
|
13629
13819
|
inline-size: 2.5rem;
|
|
13630
13820
|
block-size: 2.5rem;
|
|
13631
13821
|
font-size: var(--bw-text-heading-md-size);
|
|
@@ -13776,13 +13966,21 @@ same pattern as .bw-bio__profile-link. */
|
|
|
13776
13966
|
color-scheme: dark;
|
|
13777
13967
|
}
|
|
13778
13968
|
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13969
|
+
/* Zero specificity on purpose (icvoss/brickwork#25): this is a fallback for
|
|
13970
|
+
* unstyled native controls. As a bare selector its seven :not() terms scored
|
|
13971
|
+
* about (0,7,1) and outranked .bw-input:disabled and .bw-input[readonly]
|
|
13972
|
+
* (0,2,0), so disabled and read-only inputs kept the enabled fill and ink.
|
|
13973
|
+
* :where() keeps the repair for plain controls and lets every component rule
|
|
13974
|
+
* win. */
|
|
13975
|
+
:where(
|
|
13976
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
13977
|
+
[type="file"]
|
|
13978
|
+
):not([type="hidden"]):not([type="submit"]):not([type="button"]):not(
|
|
13979
|
+
[type="reset"]
|
|
13980
|
+
):not([type="image"]):not([type="color"]),
|
|
13981
|
+
textarea,
|
|
13982
|
+
select
|
|
13983
|
+
) {
|
|
13786
13984
|
background-color: var(--bw-color-surface);
|
|
13787
13985
|
color: var(--bw-color-fg);
|
|
13788
13986
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwui/css",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Framework-agnostic Brickwork primitives and component classes. Consumes @bwui/tokens and works with plain HTML, Django, or any framework — no JavaScript required.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./src/*": "./src/*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@bwui/tokens": "0.1.
|
|
24
|
+
"@bwui/tokens": "0.1.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsx": "^4.19.2"
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"build": "tsx scripts/build.ts"
|
|
37
|
+
"build": "tsx scripts/build.ts",
|
|
38
|
+
"test": "node --test \"test/*.test.mjs\""
|
|
38
39
|
}
|
|
39
40
|
}
|
package/src/components.css
CHANGED
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
pointer-events: none;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.bw-btn--sm {
|
|
39
|
+
.bw-btn--sm, .bw-btn--size-sm {
|
|
40
40
|
height: 2rem;
|
|
41
41
|
padding: 0 0.75rem;
|
|
42
42
|
font-size: var(--bw-typography-body-sm-size);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.bw-btn--lg {
|
|
45
|
+
.bw-btn--lg, .bw-btn--size-lg {
|
|
46
46
|
height: 3rem;
|
|
47
47
|
padding: 0 1.5rem;
|
|
48
48
|
font-size: var(--bw-typography-body-lg-size);
|
package/src/document-a11y.css
CHANGED
|
@@ -14,13 +14,21 @@
|
|
|
14
14
|
color-scheme: dark;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
/* Zero specificity on purpose (icvoss/brickwork#25): this is a fallback for
|
|
18
|
+
* unstyled native controls. As a bare selector its seven :not() terms scored
|
|
19
|
+
* about (0,7,1) and outranked .bw-input:disabled and .bw-input[readonly]
|
|
20
|
+
* (0,2,0), so disabled and read-only inputs kept the enabled fill and ink.
|
|
21
|
+
* :where() keeps the repair for plain controls and lets every component rule
|
|
22
|
+
* win. */
|
|
23
|
+
:where(
|
|
24
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
|
|
25
|
+
[type="file"]
|
|
26
|
+
):not([type="hidden"]):not([type="submit"]):not([type="button"]):not(
|
|
27
|
+
[type="reset"]
|
|
28
|
+
):not([type="image"]):not([type="color"]),
|
|
29
|
+
textarea,
|
|
30
|
+
select
|
|
31
|
+
) {
|
|
24
32
|
background-color: var(--bw-color-surface);
|
|
25
33
|
color: var(--bw-color-fg);
|
|
26
34
|
}
|
|
@@ -27,9 +27,15 @@
|
|
|
27
27
|
var(--bw-transition-shadow),
|
|
28
28
|
var(--bw-transition-transform);
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
/* Size classes (ADR-125 section 6): the grammar is bw-<component>--size-<step>.
|
|
31
|
+
* The bare spelling (bw-btn--sm, and the same for gauge, icon, modal,
|
|
32
|
+
* slide-over, stat and stat-comparison) is DEPRECATED. Both selectors stay in
|
|
33
|
+
* one grouped rule for the deprecation window; the bare ones are removed in
|
|
34
|
+
* the next major of django-brickwork and in the @bwui/css release shipped with
|
|
35
|
+
* it. Templates, React, Vue and the gallery emit the new class. */
|
|
36
|
+
.bw-btn--sm, .bw-btn--size-sm {
|
|
31
37
|
block-size: var(--bw-size-control-height-sm);
|
|
32
|
-
padding-inline: var(--bw-
|
|
38
|
+
padding-inline: var(--bw-size-control-padding-inline-sm);
|
|
33
39
|
}
|
|
34
40
|
/* md is the base .bw-btn size (icvoss/django-brickwork#130): every shipped
|
|
35
41
|
* template that names a size emits bw-btn--md explicitly rather than leaving
|
|
@@ -38,13 +44,16 @@
|
|
|
38
44
|
* to the base. Without this rule the class existed in markup with nothing in
|
|
39
45
|
* the stylesheet naming it, which is the defect class this issue is about:
|
|
40
46
|
* the base values happened to make it look correct by accident. */
|
|
41
|
-
.bw-btn--md {
|
|
42
|
-
block-size: var(--bw-
|
|
43
|
-
padding-inline: var(--bw-
|
|
47
|
+
.bw-btn--md, .bw-btn--size-md {
|
|
48
|
+
block-size: var(--bw-size-control-height-md);
|
|
49
|
+
padding-inline: var(--bw-size-control-padding-inline-md);
|
|
44
50
|
}
|
|
45
|
-
|
|
51
|
+
/* ADR-125: sm, md and lg resolve from the density control base times a
|
|
52
|
+
* kit-wide step multiplier (--bw-size-step-*), not from absolute rem values,
|
|
53
|
+
* so every density keeps three distinct heights. */
|
|
54
|
+
.bw-btn--lg, .bw-btn--size-lg {
|
|
46
55
|
block-size: var(--bw-size-control-height-lg);
|
|
47
|
-
padding-inline: var(--bw-
|
|
56
|
+
padding-inline: var(--bw-size-control-padding-inline-lg);
|
|
48
57
|
}
|
|
49
58
|
/* Solid buttons carry a border in their own hue (0.7.0 craft): 80% of the fill
|
|
50
59
|
* toward black is the Radix solid-button edge, a shade the fill visibly sits
|
|
@@ -143,10 +152,10 @@
|
|
|
143
152
|
}
|
|
144
153
|
/* Exact square at every size (0.7.0 craft): the sm/lg heights bring their own
|
|
145
154
|
* widths, so an icon button's optical padding is identical on all four sides. */
|
|
146
|
-
.bw-btn--sm.bw-btn--icon-only {
|
|
155
|
+
.bw-btn--sm.bw-btn--icon-only, .bw-btn--size-sm.bw-btn--icon-only {
|
|
147
156
|
inline-size: var(--bw-size-control-height-sm);
|
|
148
157
|
}
|
|
149
|
-
.bw-btn--lg.bw-btn--icon-only {
|
|
158
|
+
.bw-btn--lg.bw-btn--icon-only, .bw-btn--size-lg.bw-btn--icon-only {
|
|
150
159
|
inline-size: var(--bw-size-control-height-lg);
|
|
151
160
|
}
|
|
152
161
|
/* Flat disabled colours (COL-018 / #282), not opacity: opacity failed
|
|
@@ -429,11 +438,14 @@ select.bw-input {
|
|
|
429
438
|
[dir="rtl"] select.bw-input {
|
|
430
439
|
background-position: left var(--bw-density-control-padding-inline) center;
|
|
431
440
|
}
|
|
441
|
+
/* background-color, not the shorthand: the shorthand also reset
|
|
442
|
+
* background-image, so a disabled select.bw-input lost its chevron (the
|
|
443
|
+
* select rule is less specific than these state rules). */
|
|
432
444
|
.bw-input[readonly] {
|
|
433
|
-
background: var(--bw-color-surface-sunken);
|
|
445
|
+
background-color: var(--bw-color-surface-sunken);
|
|
434
446
|
}
|
|
435
447
|
.bw-input:disabled {
|
|
436
|
-
background: var(--bw-color-action-disabled-bg);
|
|
448
|
+
background-color: var(--bw-color-action-disabled-bg);
|
|
437
449
|
color: var(--bw-color-action-disabled-text);
|
|
438
450
|
border-color: var(--bw-color-action-disabled-border);
|
|
439
451
|
cursor: not-allowed;
|
|
@@ -2373,11 +2385,11 @@ a.bw-stat:hover {
|
|
|
2373
2385
|
consumer stylesheet that selects .bw-stat__trend directly; #334). */
|
|
2374
2386
|
/* size arg (VIZ-027): modifiers re-point the value-size component token, so
|
|
2375
2387
|
the numeral rule itself never forks. */
|
|
2376
|
-
.bw-stat--sm {
|
|
2388
|
+
.bw-stat--sm, .bw-stat--size-sm {
|
|
2377
2389
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
2378
2390
|
padding: var(--bw-space-3);
|
|
2379
2391
|
}
|
|
2380
|
-
.bw-stat--lg {
|
|
2392
|
+
.bw-stat--lg, .bw-stat--size-lg {
|
|
2381
2393
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
2382
2394
|
padding: var(--bw-space-6);
|
|
2383
2395
|
}
|
|
@@ -2392,8 +2404,11 @@ a.bw-stat:hover {
|
|
|
2392
2404
|
padding: 0;
|
|
2393
2405
|
}
|
|
2394
2406
|
.bw-stat--chrome-plain.bw-stat--sm,
|
|
2407
|
+
.bw-stat--chrome-plain.bw-stat--size-sm,
|
|
2395
2408
|
.bw-stat--chrome-plain.bw-stat--lg,
|
|
2396
|
-
.bw-stat--chrome-plain.bw-stat--
|
|
2409
|
+
.bw-stat--chrome-plain.bw-stat--size-lg,
|
|
2410
|
+
.bw-stat--chrome-plain.bw-stat--md,
|
|
2411
|
+
.bw-stat--chrome-plain.bw-stat--size-md {
|
|
2397
2412
|
padding: 0;
|
|
2398
2413
|
}
|
|
2399
2414
|
a.bw-stat--chrome-plain:hover {
|
|
@@ -2567,11 +2582,11 @@ a.bw-stat--chrome-plain:hover {
|
|
|
2567
2582
|
/* size arg (mirrors _stat.html's VIZ-027 seam): modifiers re-point the
|
|
2568
2583
|
same value-size component token _stat.html uses, so a comparison tile
|
|
2569
2584
|
sits at the same scale as a plain stat tile sharing its grid. */
|
|
2570
|
-
.bw-stat-comparison--sm {
|
|
2585
|
+
.bw-stat-comparison--sm, .bw-stat-comparison--size-sm {
|
|
2571
2586
|
--bw-component-stat-tile-value-size: var(--bw-font-size-2xl);
|
|
2572
2587
|
padding: var(--bw-space-3);
|
|
2573
2588
|
}
|
|
2574
|
-
.bw-stat-comparison--lg {
|
|
2589
|
+
.bw-stat-comparison--lg, .bw-stat-comparison--size-lg {
|
|
2575
2590
|
--bw-component-stat-tile-value-size: var(--bw-font-size-4xl);
|
|
2576
2591
|
padding: var(--bw-space-6);
|
|
2577
2592
|
}
|
|
@@ -2876,15 +2891,15 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
2876
2891
|
}
|
|
2877
2892
|
/* size arg (VIZ-010): modifiers re-point the diameter component token, the
|
|
2878
2893
|
same mechanism .bw-stat--sm/--lg use for their own value-size token. */
|
|
2879
|
-
.bw-gauge--sm {
|
|
2894
|
+
.bw-gauge--sm, .bw-gauge--size-sm {
|
|
2880
2895
|
inline-size: var(--bw-component-gauge-diameter-sm);
|
|
2881
2896
|
block-size: var(--bw-component-gauge-diameter-sm);
|
|
2882
2897
|
}
|
|
2883
|
-
.bw-gauge--md {
|
|
2898
|
+
.bw-gauge--md, .bw-gauge--size-md {
|
|
2884
2899
|
inline-size: var(--bw-component-gauge-diameter-md);
|
|
2885
2900
|
block-size: var(--bw-component-gauge-diameter-md);
|
|
2886
2901
|
}
|
|
2887
|
-
.bw-gauge--lg {
|
|
2902
|
+
.bw-gauge--lg, .bw-gauge--size-lg {
|
|
2888
2903
|
inline-size: var(--bw-component-gauge-diameter-lg);
|
|
2889
2904
|
block-size: var(--bw-component-gauge-diameter-lg);
|
|
2890
2905
|
}
|
|
@@ -3643,16 +3658,16 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3643
3658
|
/* Size modifiers (CMP-020): sm/lg re-point the max-width token (the floor
|
|
3644
3659
|
* panel honours them too); full is full-viewport, gutterless, radius
|
|
3645
3660
|
* squared off, and only means anything as an overlay. */
|
|
3646
|
-
.bw-modal--sm .bw-modal__panel {
|
|
3661
|
+
.bw-modal--sm .bw-modal__panel, .bw-modal--size-sm .bw-modal__panel {
|
|
3647
3662
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
3648
3663
|
}
|
|
3649
|
-
.bw-modal--lg .bw-modal__panel {
|
|
3664
|
+
.bw-modal--lg .bw-modal__panel, .bw-modal--size-lg .bw-modal__panel {
|
|
3650
3665
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
3651
3666
|
}
|
|
3652
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) {
|
|
3667
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]), .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) {
|
|
3653
3668
|
padding: 0;
|
|
3654
3669
|
}
|
|
3655
|
-
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
3670
|
+
.bw-modal--full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel, .bw-modal--size-full:is(.bw-modal--open, [data-bw-open]) .bw-modal__panel {
|
|
3656
3671
|
max-inline-size: none;
|
|
3657
3672
|
block-size: 100%;
|
|
3658
3673
|
border-radius: var(--bw-radius-none);
|
|
@@ -3861,17 +3876,17 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
3861
3876
|
}
|
|
3862
3877
|
}
|
|
3863
3878
|
/* Size modifiers: reuse the modal's own width ramp. */
|
|
3864
|
-
.bw-slide-over--sm .bw-slide-over__panel {
|
|
3879
|
+
.bw-slide-over--sm .bw-slide-over__panel, .bw-slide-over--size-sm .bw-slide-over__panel {
|
|
3865
3880
|
max-inline-size: var(--bw-size-max-width-modal-sm);
|
|
3866
3881
|
}
|
|
3867
3882
|
/* --md is the DOCUMENTED DEFAULT and the template emits it unconditionally, so
|
|
3868
3883
|
* it needs a real rule: without one the default size resolved to the panel's
|
|
3869
3884
|
* base width by accident rather than by declaration (the #120 defect class,
|
|
3870
3885
|
* found in the 3.0.0 options audit). */
|
|
3871
|
-
.bw-slide-over--md .bw-slide-over__panel {
|
|
3886
|
+
.bw-slide-over--md .bw-slide-over__panel, .bw-slide-over--size-md .bw-slide-over__panel {
|
|
3872
3887
|
max-inline-size: var(--bw-size-max-width-modal-md);
|
|
3873
3888
|
}
|
|
3874
|
-
.bw-slide-over--lg .bw-slide-over__panel {
|
|
3889
|
+
.bw-slide-over--lg .bw-slide-over__panel, .bw-slide-over--size-lg .bw-slide-over__panel {
|
|
3875
3890
|
max-inline-size: var(--bw-size-max-width-modal-lg);
|
|
3876
3891
|
}
|
|
3877
3892
|
/* Sticky header: title plus the always-present close control, divided
|
|
@@ -4139,6 +4154,13 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4139
4154
|
* list too (compose, never duplicate); only combobox-specific physics live
|
|
4140
4155
|
* here. */
|
|
4141
4156
|
.bw-combobox {
|
|
4157
|
+
/* Chip block size (CMB-038): the control height less the frame's own
|
|
4158
|
+
* block padding, never below the 1.5rem WCAG 2.5.8 target plus the chip's
|
|
4159
|
+
* hairline border. Shared by the chip and the multiple-mode input. */
|
|
4160
|
+
--bw-combobox-chip-size: max(
|
|
4161
|
+
calc(1.5rem + 2 * var(--bw-size-border-hairline)),
|
|
4162
|
+
calc(var(--bw-density-control-height) - 2 * var(--bw-space-2))
|
|
4163
|
+
);
|
|
4142
4164
|
position: relative;
|
|
4143
4165
|
}
|
|
4144
4166
|
/* Chips and the input share one wrapping row; the absolutely positioned
|
|
@@ -4156,6 +4178,90 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4156
4178
|
inline-size: auto;
|
|
4157
4179
|
min-inline-size: 0;
|
|
4158
4180
|
}
|
|
4181
|
+
/* Placeholder colour (CMB-035, GAP-CMB-15): the shipped bundle had no
|
|
4182
|
+
* placeholder rule, so the UA default applied. Scoped to the combobox input;
|
|
4183
|
+
* opacity is reset because Firefox dims ::placeholder on top of its colour.
|
|
4184
|
+
* fg-muted, not fg-subtle: composed on the frame fill fg-subtle measures
|
|
4185
|
+
* 2.62:1 light and 3.84:1 dark, under the 4.5:1 text floor (AC-CMB-019),
|
|
4186
|
+
* where fg-muted clears it in both themes (combobox.md 4.3). */
|
|
4187
|
+
.bw-combobox__input::placeholder {
|
|
4188
|
+
color: var(--bw-color-fg-muted);
|
|
4189
|
+
opacity: 1;
|
|
4190
|
+
}
|
|
4191
|
+
/* A disabled control prompts in its disabled ink, not the live placeholder
|
|
4192
|
+
* colour, so the whole field reads as one inactive surface. */
|
|
4193
|
+
.bw-combobox__input:disabled::placeholder {
|
|
4194
|
+
color: var(--bw-color-action-disabled-text);
|
|
4195
|
+
}
|
|
4196
|
+
/* Multiple-mode frame (CMB-031, deliberate break, combobox.md 13.3): the chips
|
|
4197
|
+
* and the input share ONE frame. The frame moves from the input to the field
|
|
4198
|
+
* wrapper (the shared .bw-input recipe restated: control border, radius-md,
|
|
4199
|
+
* inset hairline, hover pre-light, accent border plus halo on focus) and
|
|
4200
|
+
* grows with wrapped chips (min-block-size, never a fixed height). The input
|
|
4201
|
+
* goes borderless so it reads as part of the field. Single mode is untouched:
|
|
4202
|
+
* it keeps the bare .bw-input frame (CMB-030). */
|
|
4203
|
+
.bw-combobox--multiple .bw-combobox__field {
|
|
4204
|
+
min-block-size: var(--bw-density-control-height);
|
|
4205
|
+
padding-block: var(--bw-space-1);
|
|
4206
|
+
padding-inline: var(--bw-density-control-padding-inline);
|
|
4207
|
+
background: var(--bw-color-surface);
|
|
4208
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border-control);
|
|
4209
|
+
border-radius: var(--bw-radius-md);
|
|
4210
|
+
box-shadow: inset 0 1px 2px 0 oklch(0 0 0 / 0.04);
|
|
4211
|
+
transition: var(--bw-transition-colors), var(--bw-transition-shadow);
|
|
4212
|
+
}
|
|
4213
|
+
.bw-combobox--multiple .bw-combobox__field:hover:where(
|
|
4214
|
+
:not(:focus-within):not(:has(.bw-combobox__input:disabled, .bw-combobox__input[readonly]))
|
|
4215
|
+
) {
|
|
4216
|
+
border-color: color-mix(in oklab, var(--bw-color-border-control) 82%, var(--bw-color-fg));
|
|
4217
|
+
}
|
|
4218
|
+
.bw-combobox--multiple .bw-combobox__field:focus-within {
|
|
4219
|
+
border-color: var(--bw-color-accent);
|
|
4220
|
+
box-shadow:
|
|
4221
|
+
inset 0 1px 2px 0 oklch(0 0 0 / 0.04),
|
|
4222
|
+
0 0 0 3px color-mix(in oklab, var(--bw-color-accent) 18%, transparent);
|
|
4223
|
+
}
|
|
4224
|
+
/* The global ring (reset.css :focus-visible) moves from the input to the
|
|
4225
|
+
* frame so keyboard focus is outlined at the control edge, once. */
|
|
4226
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:focus-visible) {
|
|
4227
|
+
outline: 2px solid var(--bw-color-focus-ring, var(--bw-color-accent));
|
|
4228
|
+
outline-offset: 2px;
|
|
4229
|
+
}
|
|
4230
|
+
/* Declared after focus so the danger border persists while focused, as for
|
|
4231
|
+
* .bw-input. */
|
|
4232
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[aria-invalid="true"]) {
|
|
4233
|
+
border-color: var(--bw-color-danger);
|
|
4234
|
+
}
|
|
4235
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input[readonly]) {
|
|
4236
|
+
background: var(--bw-color-surface-sunken);
|
|
4237
|
+
}
|
|
4238
|
+
.bw-combobox--multiple .bw-combobox__field:has(.bw-combobox__input:disabled) {
|
|
4239
|
+
background: var(--bw-color-action-disabled-bg);
|
|
4240
|
+
border-color: var(--bw-color-action-disabled-border);
|
|
4241
|
+
cursor: not-allowed;
|
|
4242
|
+
}
|
|
4243
|
+
.bw-combobox--multiple .bw-combobox__input,
|
|
4244
|
+
.bw-combobox--multiple .bw-combobox__input:hover,
|
|
4245
|
+
.bw-combobox--multiple .bw-combobox__input:focus-visible,
|
|
4246
|
+
.bw-combobox--multiple .bw-combobox__input:disabled,
|
|
4247
|
+
.bw-combobox--multiple .bw-combobox__input[readonly] {
|
|
4248
|
+
/* The frame owns border, fill, well and ring; the input only types. The
|
|
4249
|
+
* block-size mirrors a chip so a wrapped row keeps one baseline rhythm. */
|
|
4250
|
+
/* A length literal: a typing run beside chips, no sizing-ramp step. Wide
|
|
4251
|
+
* enough for a short placeholder ("Add team"), so a row with no room wraps
|
|
4252
|
+
* the input to its own line instead of clipping the prompt. */
|
|
4253
|
+
flex-basis: 6rem;
|
|
4254
|
+
block-size: auto;
|
|
4255
|
+
min-block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
4256
|
+
padding-inline: var(--bw-space-1);
|
|
4257
|
+
background: transparent;
|
|
4258
|
+
border: 0;
|
|
4259
|
+
box-shadow: none;
|
|
4260
|
+
outline: none;
|
|
4261
|
+
}
|
|
4262
|
+
.bw-combobox--multiple .bw-combobox__input:disabled {
|
|
4263
|
+
color: var(--bw-color-action-disabled-text);
|
|
4264
|
+
}
|
|
4159
4265
|
/* The listbox mirrors the dropdown panel exactly (DESIGN.md reserved rows):
|
|
4160
4266
|
* raised surface, elevation-3 at z-dropdown, radius-lg, menu min-width, the
|
|
4161
4267
|
* light-theme top-light (dark reset at the end of this file), bw-fade-in-up
|
|
@@ -4197,6 +4303,7 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4197
4303
|
* stamps it on: the target listbox itself, or the requesting input beside
|
|
4198
4304
|
* it. First consumer of --bw-component-htmx-indicator-opacity. */
|
|
4199
4305
|
.bw-combobox__listbox.htmx-request,
|
|
4306
|
+
.bw-combobox__listbox[aria-busy="true"],
|
|
4200
4307
|
.bw-combobox__input.htmx-request ~ .bw-combobox__listbox {
|
|
4201
4308
|
opacity: var(--bw-component-htmx-indicator-opacity);
|
|
4202
4309
|
}
|
|
@@ -4227,19 +4334,47 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4227
4334
|
.bw-combobox__option[aria-selected="true"] {
|
|
4228
4335
|
font-weight: var(--bw-font-weight-medium);
|
|
4229
4336
|
}
|
|
4337
|
+
/* Disabled option (CMB-016): stays visible and filterable, paints the flat
|
|
4338
|
+
* disabled colours, shows no hover wash and cannot be chosen (the behaviour
|
|
4339
|
+
* skips it). The state is also carried by aria-disabled, not colour alone. */
|
|
4340
|
+
.bw-combobox__option[aria-disabled="true"] {
|
|
4341
|
+
color: var(--bw-color-action-disabled-text);
|
|
4342
|
+
cursor: not-allowed;
|
|
4343
|
+
}
|
|
4344
|
+
.bw-combobox__option[aria-disabled="true"]:hover {
|
|
4345
|
+
background-color: transparent;
|
|
4346
|
+
}
|
|
4347
|
+
/* Create row (CMB-020, GAP-CMB-16): the lead word is quiet and the echoed
|
|
4348
|
+
* query carries the weight, so the row reads "Create <query>". */
|
|
4349
|
+
.bw-combobox__option--create {
|
|
4350
|
+
color: var(--bw-color-fg-muted);
|
|
4351
|
+
}
|
|
4352
|
+
.bw-combobox__create-query {
|
|
4353
|
+
color: var(--bw-color-fg);
|
|
4354
|
+
font-weight: var(--bw-font-weight-medium);
|
|
4355
|
+
overflow-wrap: anywhere;
|
|
4356
|
+
}
|
|
4230
4357
|
.bw-combobox__empty {
|
|
4231
4358
|
padding: var(--bw-space-2) var(--bw-space-3);
|
|
4232
4359
|
color: var(--bw-color-fg-muted);
|
|
4233
4360
|
font-size: var(--bw-text-body-sm-size);
|
|
4234
4361
|
line-height: var(--bw-text-body-sm-line-height);
|
|
4235
4362
|
}
|
|
4363
|
+
/* Server-filter failure row (CMB-019): the same row shape as the empty
|
|
4364
|
+
* message, in the text-duty danger tier (the .bw-field__error precedent). */
|
|
4365
|
+
.bw-combobox__error {
|
|
4366
|
+
padding: var(--bw-space-2) var(--bw-space-3);
|
|
4367
|
+
color: var(--bw-color-danger-fg);
|
|
4368
|
+
font-size: var(--bw-text-body-sm-size);
|
|
4369
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
4370
|
+
}
|
|
4236
4371
|
/* Selected-value chips (multiple mode, CMP-028): the selected wash at
|
|
4237
|
-
* radius-full,
|
|
4238
|
-
*
|
|
4239
|
-
* control beside it. */
|
|
4372
|
+
* radius-full, sized by --bw-combobox-chip-size (CMB-038) so a chip row sits
|
|
4373
|
+
* inside the control's height rather than stretching it. */
|
|
4240
4374
|
.bw-combobox__chip {
|
|
4241
4375
|
display: inline-flex;
|
|
4242
4376
|
align-items: center;
|
|
4377
|
+
block-size: var(--bw-combobox-chip-size, 1.5rem);
|
|
4243
4378
|
gap: var(--bw-space-1);
|
|
4244
4379
|
padding-inline: var(--bw-space-3) var(--bw-space-1);
|
|
4245
4380
|
background: var(--bw-state-selected-bg);
|
|
@@ -4252,13 +4387,19 @@ a.bw-ranked-list__row:focus-visible .bw-ranked-list__label {
|
|
|
4252
4387
|
display: inline-flex;
|
|
4253
4388
|
align-items: center;
|
|
4254
4389
|
justify-content: center;
|
|
4255
|
-
|
|
4256
|
-
|
|
4390
|
+
/* 1.5rem is the WCAG 2.5.8 floor (CMB-053); the chip sizes to it, so the
|
|
4391
|
+
* remove control no longer pushes a chip taller than the control (CMB-038,
|
|
4392
|
+
* GAP-CMB-10). It fills the chip's inner block size. */
|
|
4393
|
+
block-size: 100%;
|
|
4394
|
+
min-block-size: 1.5rem;
|
|
4395
|
+
min-inline-size: 1.5rem;
|
|
4257
4396
|
padding: var(--bw-space-1);
|
|
4258
4397
|
background: transparent;
|
|
4259
4398
|
border: 0;
|
|
4260
4399
|
border-radius: var(--bw-radius-full);
|
|
4261
|
-
|
|
4400
|
+
/* fg-muted, not icon-muted: composed on the chip fill icon-muted measures
|
|
4401
|
+
* 2.39:1 in light, under the 3:1 non-text floor (AC-CMB-019, CMB-054). */
|
|
4402
|
+
color: var(--bw-color-fg-muted);
|
|
4262
4403
|
cursor: pointer;
|
|
4263
4404
|
transition: var(--bw-transition-colors);
|
|
4264
4405
|
}
|
package/src/primitives.css
CHANGED
|
@@ -115,8 +115,10 @@
|
|
|
115
115
|
.bw-fg-subtle {
|
|
116
116
|
color: var(--bw-color-fg-subtle);
|
|
117
117
|
}
|
|
118
|
+
/* Page ground; the same token as the body (icvoss/brickwork#26). There is no
|
|
119
|
+
* --bw-color-bg token, so this resolves to the surface role. */
|
|
118
120
|
.bw-bg {
|
|
119
|
-
background-color: var(--bw-color-
|
|
121
|
+
background-color: var(--bw-color-surface);
|
|
120
122
|
}
|
|
121
123
|
.bw-surface {
|
|
122
124
|
background-color: var(--bw-color-surface);
|
package/src/reset.css
CHANGED
|
@@ -29,7 +29,12 @@ body {
|
|
|
29
29
|
font-size: var(--bw-text-body-md-size, 1rem);
|
|
30
30
|
-webkit-font-smoothing: antialiased;
|
|
31
31
|
color: var(--bw-color-fg);
|
|
32
|
-
|
|
32
|
+
/* Page ground (icvoss/brickwork#26): the surface token. A prior
|
|
33
|
+
* var(--bw-color-bg) named a token no theme defines, so the declaration was
|
|
34
|
+
* invalid at computed-value time and the body stayed transparent (a white
|
|
35
|
+
* canvas under dark text colours). Surface is white in light and near-black
|
|
36
|
+
* in dark, so light output is unchanged and dark now paints its own ground. */
|
|
37
|
+
background-color: var(--bw-color-surface);
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
img,
|