@firestitch/style 18.0.65 → 18.0.67

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestitch/style",
3
- "version": "18.0.65",
3
+ "version": "18.0.67",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-style"
@@ -39,13 +39,17 @@
39
39
  // a border instead of the gray tint + underline. Colors come from the
40
40
  // outlined MDC tokens, so hover/focus/error/disabled states track the
41
41
  // project's outline theme exactly.
42
+ // Tokens are set/read under both the v18/v19 --mdc-* names and the
43
+ // v20+ --mat-form-field-* names so consumers on Material 18-22 all work.
42
44
  .mat-mdc-form-field.mat-form-field-appearance-fill {
43
45
  --mdc-filled-text-field-container-color: white;
44
46
  --mdc-filled-text-field-disabled-container-color: #F5F5F5;
47
+ --mat-form-field-filled-container-color: white;
48
+ --mat-form-field-filled-disabled-container-color: #F5F5F5;
45
49
 
46
50
  .mat-mdc-text-field-wrapper {
47
- border: 1px solid var(--mdc-outlined-text-field-outline-color, rgba(0, 0, 0, 0.38));
48
- border-radius: var(--mdc-outlined-text-field-container-shape, 4px);
51
+ border: 1px solid var(--mdc-outlined-text-field-outline-color, var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, 0.38)));
52
+ border-radius: var(--mdc-outlined-text-field-container-shape, var(--mat-form-field-outlined-container-shape, 4px));
49
53
  }
50
54
 
51
55
  .mdc-line-ripple {
@@ -58,34 +62,34 @@
58
62
 
59
63
  &:hover:not(.mat-focused):not(.mat-form-field-invalid):not(.mat-form-field-disabled) {
60
64
  .mat-mdc-text-field-wrapper {
61
- border-color: var(--mdc-outlined-text-field-hover-outline-color, rgba(0, 0, 0, 0.87));
65
+ border-color: var(--mdc-outlined-text-field-hover-outline-color, var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, 0.87)));
62
66
  }
63
67
  }
64
68
 
65
69
  // Outline's focused border is 2px; the inset shadow adds the second
66
70
  // pixel so the field doesn't reflow
67
71
  &.mat-focused .mat-mdc-text-field-wrapper {
68
- border-color: var(--mdc-outlined-text-field-focus-outline-color);
69
- box-shadow: inset 0 0 0 1px var(--mdc-outlined-text-field-focus-outline-color);
72
+ border-color: var(--mdc-outlined-text-field-focus-outline-color, var(--mat-form-field-outlined-focus-outline-color));
73
+ box-shadow: inset 0 0 0 1px var(--mdc-outlined-text-field-focus-outline-color, var(--mat-form-field-outlined-focus-outline-color));
70
74
  }
71
75
 
72
76
  &.mat-form-field-invalid {
73
77
  .mat-mdc-text-field-wrapper {
74
- border-color: var(--mdc-outlined-text-field-error-outline-color);
78
+ border-color: var(--mdc-outlined-text-field-error-outline-color, var(--mat-form-field-outlined-error-outline-color));
75
79
  }
76
80
 
77
81
  &:hover:not(.mat-focused) .mat-mdc-text-field-wrapper {
78
- border-color: var(--mdc-outlined-text-field-error-hover-outline-color);
82
+ border-color: var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-form-field-outlined-error-hover-outline-color));
79
83
  }
80
84
 
81
85
  &.mat-focused .mat-mdc-text-field-wrapper {
82
- border-color: var(--mdc-outlined-text-field-error-focus-outline-color);
83
- box-shadow: inset 0 0 0 1px var(--mdc-outlined-text-field-error-focus-outline-color);
86
+ border-color: var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-form-field-outlined-error-focus-outline-color));
87
+ box-shadow: inset 0 0 0 1px var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-form-field-outlined-error-focus-outline-color));
84
88
  }
85
89
  }
86
90
 
87
91
  &.mat-form-field-disabled .mat-mdc-text-field-wrapper {
88
- border-color: var(--mdc-outlined-text-field-disabled-outline-color, rgba(0, 0, 0, 0.06));
92
+ border-color: var(--mdc-outlined-text-field-disabled-outline-color, var(--mat-form-field-outlined-disabled-outline-color, rgba(0, 0, 0, 0.06)));
89
93
  }
90
94
  }
91
95
 
@@ -101,12 +105,23 @@
101
105
  }
102
106
 
103
107
  .form-field-lineless:not(.mat-focused) {
108
+ // !important: Material injects its component styles after this sheet,
109
+ // and its hover/invalid border selectors out-rank anything reasonable
110
+ // here. The lineless contract — no line until focused — must always win;
111
+ // focus still shows the border because of the :not(.mat-focused) above.
104
112
  .mdc-text-field--outlined .mat-mdc-notch-piece {
105
- border-color: transparent;
113
+ border-color: transparent !important;
106
114
  }
107
115
 
108
- &.mat-form-field-appearance-fill:not(:hover) .mat-mdc-text-field-wrapper {
109
- border-color: transparent;
116
+ // Fill renders its outline-style border on the wrapper (see the fill
117
+ // block above); hide it and the container tint until focus
118
+ &.mat-form-field-appearance-fill {
119
+ --mdc-filled-text-field-container-color: transparent;
120
+ --mat-form-field-filled-container-color: transparent;
121
+
122
+ .mat-mdc-text-field-wrapper {
123
+ border-color: transparent !important;
124
+ }
110
125
  }
111
126
 
112
127
  input {