@firestitch/style 18.4.4 → 18.4.6

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/_variables.scss CHANGED
@@ -37,6 +37,15 @@ $palette: mat.m2-define-palette(mat.$m2-blue-palette) !default;
37
37
  // it never passed.
38
38
  $primary-color: #1B474E !default;
39
39
 
40
+ // THE INK THAT SITS ON THE BRAND, and the value behind --fs-color-on-primary:
41
+ // the number in a selected calendar day, the label on anything filled with
42
+ // $primary-color. White suits a dark or saturated brand; a pale one (light
43
+ // grey, yellow, or a neutral that flips to near-white on a dark page) needs a
44
+ // dark ink instead, and only the app knows which brand it has. Set it beside
45
+ // $primary-color, as a literal or, for a brand chosen at runtime, a CSS
46
+ // variable the app works out from the brand's luminance.
47
+ $on-primary-color: #FFFFFF !default;
48
+
40
49
  $grey-color: #757575 !default;
41
50
  $grey-dark-color: #696E74 !default;
42
51
  $grey-light-color: #F2F2F2 !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestitch/style",
3
- "version": "18.4.4",
3
+ "version": "18.4.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-style"
@@ -180,6 +180,19 @@
180
180
  // to get the cascade order right.
181
181
  --fs-color-primary: #{variables.$primary-color};
182
182
 
183
+ // ===== ON PRIMARY =====
184
+ // The ink for text and glyphs drawn ON a --fs-color-primary fill: a selected
185
+ // calendar day, a filled badge's label. Paired with the brand rather than
186
+ // derived from it, because a package cannot tell a pale brand from a dark one
187
+ // -- white on a light-grey brand vanishes, and so does white on a neutral
188
+ // brand that an app flips to near-white on a dark page. The app that picked
189
+ // the brand picks its ink, through $on-primary-color; the default is the
190
+ // white every package hardcoded before this name existed.
191
+ //
192
+ // Does not flip with the scheme, for the same reason --fs-color-primary does
193
+ // not: it follows the brand, not the page.
194
+ --fs-color-on-primary: #{variables.$on-primary-color};
195
+
183
196
  // ===== CONTROL FILL =====
184
197
  // The INSIDE of an empty checkbox, radio or multi-select tick.
185
198
  //
@@ -215,9 +228,9 @@
215
228
  // Listed as separate selectors rather than one :is() so the specificity is
216
229
  // the same in every engine.
217
230
  //
218
- // --fs-color-primary and --fs-control-fill are absent on purpose: neither
219
- // flips with the scheme, so restating them here would be noise that later
220
- // drifts from the base.
231
+ // --fs-color-primary, --fs-color-on-primary and --fs-control-fill are absent
232
+ // on purpose: none flips with the scheme, so restating them here would be
233
+ // noise that later drifts from the base.
221
234
  :root.theme-light,
222
235
  :root[data-theme='light'] {
223
236
  @include -light-values;
@@ -235,9 +248,10 @@
235
248
  // `.theme-dark` mirrors the `.theme-light` the CloudCure apps set from their
236
249
  // ThemeService, `[data-theme="dark"]` is the broader web convention.
237
250
  //
238
- // --fs-color-primary is absent on purpose. A brand colour is picked to work
239
- // on its own ground and does not flip with the scheme; an app whose brand
240
- // genuinely needs to shift maps the name to a pair of its own.
251
+ // --fs-color-primary and --fs-color-on-primary are absent on purpose. A brand
252
+ // colour is picked to work on its own ground and does not flip with the
253
+ // scheme; an app whose brand genuinely needs to shift maps both names to
254
+ // pairs of its own.
241
255
  //
242
256
  // --fs-control-fill is absent for a different reason: it is near-white in
243
257
  // BOTH schemes by design — see the note on it above.
@@ -74,6 +74,36 @@
74
74
 
75
75
  --mat-button-text-container-shape: #{$button-shape};
76
76
 
77
+ // NO TOUCH TARGETS, ON ANY CONTROL.
78
+ //
79
+ // Material hangs an invisible 48px hit area, centred, on every button, icon
80
+ // button, fab, checkbox, radio, slide toggle and paginator select, and only
81
+ // drops it below density -1. At -1 an icon button is 44px, so the target
82
+ // sticks out 2px on each side, and any scroll container it sits at the edge
83
+ // of grows a scrollbar for it. Angular 20 renamed the button tokens, so the
84
+ // `--mat-text-button-*` names above stopped reaching anything and the
85
+ // targets came back; icon buttons and the selection controls were never
86
+ // covered at all. These are the Angular 20 names.
87
+ --mat-button-text-touch-target-display: none;
88
+ --mat-button-filled-touch-target-display: none;
89
+ --mat-button-outlined-touch-target-display: none;
90
+ --mat-button-protected-touch-target-display: none;
91
+ --mat-button-tonal-touch-target-display: none;
92
+ --mat-icon-button-touch-target-display: none;
93
+ --mat-fab-touch-target-display: none;
94
+ --mat-fab-small-touch-target-display: none;
95
+ --mat-checkbox-touch-target-display: none;
96
+ --mat-radio-touch-target-display: none;
97
+ --mat-slide-toggle-touch-target-display: none;
98
+ --mat-paginator-touch-target-display: none;
99
+
100
+ // Material re-declares the radio's on a list item's leading and trailing
101
+ // slots (a radio list option), which beats the :root value above.
102
+ .mdc-list-item__start,
103
+ .mdc-list-item__end {
104
+ --mat-radio-touch-target-display: none;
105
+ }
106
+
77
107
  .mat-mdc-slide-toggle {
78
108
  --mat-switch-with-icon-handle-size: 20px;
79
109
  --mdc-switch-handle-shape: 9999px;