@firestitch/style 18.1.0 → 18.1.2
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/package.json +1 -1
- package/styles/_form-controls.scss +56 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
2
|
// THE SELECTION CONTROLS
|
|
3
3
|
// =============================================================================
|
|
4
|
-
// Checkbox, radio, slide toggle, slider and
|
|
4
|
+
// Checkbox, radio, slide toggle, slider, chip and pseudo-checkbox.
|
|
5
5
|
//
|
|
6
6
|
// WHY THIS FILE EXISTS - Ray 2026-09-14. Material themes these five entirely
|
|
7
7
|
// through its own tokens, and an app on an M2 theme gets the LIGHT theme's
|
|
@@ -24,10 +24,16 @@
|
|
|
24
24
|
//
|
|
25
25
|
// ONE FILE FOR THE FAMILY, not one control at a time. These were fixed app-side
|
|
26
26
|
// one control at a time for years, which is why a project could have a correct
|
|
27
|
-
// select and an invisible checkbox in the same dialog.
|
|
27
|
+
// select and an invisible checkbox in the same dialog. They share three
|
|
28
28
|
// questions - what colour is the control unselected, selected, and what colour
|
|
29
29
|
// is its label - so they are answered together or they drift.
|
|
30
30
|
//
|
|
31
|
+
// The pseudo-checkbox arrived a version later than the rest and proves the
|
|
32
|
+
// point: it looks like the checkbox, so it was assumed to be themed by the
|
|
33
|
+
// checkbox, and a multi-select shipped with an invisible tick while the
|
|
34
|
+
// checkbox beside it was correct. A control belongs in this file because of
|
|
35
|
+
// what it IS, not because of what it resembles - add the next one here too.
|
|
36
|
+
//
|
|
31
37
|
// GLOBAL, NOT SCOPED. These emit at :root like every other block in this
|
|
32
38
|
// package. A checkbox inside a dialog, menu or select panel renders in a CDK
|
|
33
39
|
// overlay attached to <body>, outside any app shell class, so a scoped block
|
|
@@ -38,9 +44,23 @@
|
|
|
38
44
|
// =========================================================================
|
|
39
45
|
// CHECKBOX
|
|
40
46
|
// =========================================================================
|
|
41
|
-
// The unselected box is
|
|
42
|
-
//
|
|
43
|
-
|
|
47
|
+
// The unselected box is a CONTROL OUTLINE, so it takes a text colour rather
|
|
48
|
+
// than the hairline.
|
|
49
|
+
//
|
|
50
|
+
// It was the hairline until 18.1.2, on the reasoning that a box outline is a
|
|
51
|
+
// drawn edge. That was wrong, and wrong in a way this package cannot see:
|
|
52
|
+
// --fs-hairline-strong means "a fold in a surface" - a card edge, a divider,
|
|
53
|
+
// a progress track - and an app is entitled to tune it down to almost
|
|
54
|
+
// nothing for exactly that purpose. CloudCure sets it to 22% white, which is
|
|
55
|
+
// correct for a divider and leaves an empty checkbox all but invisible.
|
|
56
|
+
//
|
|
57
|
+
// An empty checkbox is not a fold in a surface. It is the control's entire
|
|
58
|
+
// resting state, the only thing telling the user there is something here to
|
|
59
|
+
// click, and it must read as a line at any value an app might reasonably
|
|
60
|
+
// pick for its dividers. --fs-color-text-muted is the token that means
|
|
61
|
+
// "visible but secondary", which is the job, and it lands near Material's
|
|
62
|
+
// own default (0.54) rather than under it.
|
|
63
|
+
--mat-checkbox-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
44
64
|
--mat-checkbox-unselected-hover-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
45
65
|
--mat-checkbox-unselected-focus-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
46
66
|
--mat-checkbox-unselected-pressed-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
@@ -70,7 +90,7 @@
|
|
|
70
90
|
// =========================================================================
|
|
71
91
|
// Same three questions as the checkbox, same answers - the two controls
|
|
72
92
|
// differ in shape and in whether they are exclusive, never in colour.
|
|
73
|
-
--mat-radio-unselected-icon-color: var(--fs-
|
|
93
|
+
--mat-radio-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
74
94
|
--mat-radio-unselected-hover-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
75
95
|
--mat-radio-unselected-focus-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
76
96
|
--mat-radio-unselected-pressed-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
@@ -167,5 +187,35 @@
|
|
|
167
187
|
--mat-chip-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
|
|
168
188
|
--mat-chip-selected-hover-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
|
|
169
189
|
--mat-chip-selected-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
|
|
190
|
+
|
|
191
|
+
// =========================================================================
|
|
192
|
+
// PSEUDO-CHECKBOX
|
|
193
|
+
// =========================================================================
|
|
194
|
+
// The tick in a multi-select option, and in a selection list. It LOOKS like
|
|
195
|
+
// the checkbox above and is a different component with its own token
|
|
196
|
+
// family - which is exactly why it was missed when the other five were
|
|
197
|
+
// themed: a <mat-select [multiple]> renders a mat-pseudo-checkbox, never a
|
|
198
|
+
// mat-checkbox, so none of the --mat-checkbox-* values above reach it.
|
|
199
|
+
//
|
|
200
|
+
// Left unset it falls through to Material's M2 light default
|
|
201
|
+
// (rgba(0, 0, 0, 0.54) unselected), which on a dark panel is a near-black
|
|
202
|
+
// outline on a near-black surface - the same invisible-control bug this
|
|
203
|
+
// file was written to end, one control short of the family.
|
|
204
|
+
//
|
|
205
|
+
// FULL is the variant that draws a box; MINIMAL draws only a checkmark with
|
|
206
|
+
// no container. Both are themed: an app choosing either gets a control that
|
|
207
|
+
// reads, and the two never disagree about what "selected" looks like.
|
|
208
|
+
--mat-pseudo-checkbox-full-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
|
|
209
|
+
--mat-pseudo-checkbox-full-selected-icon-color: var(--fs-color-primary, #1B474E);
|
|
210
|
+
--mat-pseudo-checkbox-full-selected-checkmark-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
|
|
211
|
+
|
|
212
|
+
--mat-pseudo-checkbox-full-disabled-unselected-icon-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
|
|
213
|
+
--mat-pseudo-checkbox-full-disabled-selected-icon-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
|
|
214
|
+
--mat-pseudo-checkbox-full-disabled-selected-checkmark-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
|
|
215
|
+
|
|
216
|
+
// The minimal variant has no box to fill, so the CHECKMARK carries the
|
|
217
|
+
// brand rather than sitting on it - the inverse of the full variant above.
|
|
218
|
+
--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--fs-color-primary, #1B474E);
|
|
219
|
+
--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
|
|
170
220
|
}
|
|
171
221
|
}
|