Skip to content

Commit b1bd998

Browse files
committed
build: add tokens test for form field (#27589)
A tokens test wasn't added in #27548, because MDC wasn't exporting the light theme variable that we validate against. I've made a change internally to export it so now we can validate against it. (cherry picked from commit 7ed70fe)
1 parent 95392a6 commit b1bd998

File tree

4 files changed

+647
-633
lines changed

4 files changed

+647
-633
lines changed

package.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -98,53 +98,53 @@
9898
"@bazel/terser": "5.8.1",
9999
"@bazel/worker": "5.8.1",
100100
"@firebase/app-types": "^0.7.0",
101-
"@material/animation": "15.0.0-canary.83355c322.0",
102-
"@material/auto-init": "15.0.0-canary.83355c322.0",
103-
"@material/banner": "15.0.0-canary.83355c322.0",
104-
"@material/base": "15.0.0-canary.83355c322.0",
105-
"@material/button": "15.0.0-canary.83355c322.0",
106-
"@material/card": "15.0.0-canary.83355c322.0",
107-
"@material/checkbox": "15.0.0-canary.83355c322.0",
108-
"@material/chips": "15.0.0-canary.83355c322.0",
109-
"@material/circular-progress": "15.0.0-canary.83355c322.0",
110-
"@material/data-table": "15.0.0-canary.83355c322.0",
111-
"@material/density": "15.0.0-canary.83355c322.0",
112-
"@material/dialog": "15.0.0-canary.83355c322.0",
113-
"@material/dom": "15.0.0-canary.83355c322.0",
114-
"@material/drawer": "15.0.0-canary.83355c322.0",
115-
"@material/elevation": "15.0.0-canary.83355c322.0",
116-
"@material/fab": "15.0.0-canary.83355c322.0",
117-
"@material/feature-targeting": "15.0.0-canary.83355c322.0",
118-
"@material/floating-label": "15.0.0-canary.83355c322.0",
119-
"@material/form-field": "15.0.0-canary.83355c322.0",
120-
"@material/icon-button": "15.0.0-canary.83355c322.0",
121-
"@material/image-list": "15.0.0-canary.83355c322.0",
122-
"@material/layout-grid": "15.0.0-canary.83355c322.0",
123-
"@material/line-ripple": "15.0.0-canary.83355c322.0",
124-
"@material/linear-progress": "15.0.0-canary.83355c322.0",
125-
"@material/list": "15.0.0-canary.83355c322.0",
126-
"@material/menu": "15.0.0-canary.83355c322.0",
127-
"@material/menu-surface": "15.0.0-canary.83355c322.0",
128-
"@material/notched-outline": "15.0.0-canary.83355c322.0",
129-
"@material/radio": "15.0.0-canary.83355c322.0",
130-
"@material/ripple": "15.0.0-canary.83355c322.0",
131-
"@material/rtl": "15.0.0-canary.83355c322.0",
132-
"@material/segmented-button": "15.0.0-canary.83355c322.0",
133-
"@material/select": "15.0.0-canary.83355c322.0",
134-
"@material/shape": "15.0.0-canary.83355c322.0",
135-
"@material/slider": "15.0.0-canary.83355c322.0",
136-
"@material/snackbar": "15.0.0-canary.83355c322.0",
137-
"@material/switch": "15.0.0-canary.83355c322.0",
138-
"@material/tab": "15.0.0-canary.83355c322.0",
139-
"@material/tab-bar": "15.0.0-canary.83355c322.0",
140-
"@material/tab-indicator": "15.0.0-canary.83355c322.0",
141-
"@material/tab-scroller": "15.0.0-canary.83355c322.0",
142-
"@material/textfield": "15.0.0-canary.83355c322.0",
143-
"@material/theme": "15.0.0-canary.83355c322.0",
144-
"@material/tooltip": "15.0.0-canary.83355c322.0",
145-
"@material/top-app-bar": "15.0.0-canary.83355c322.0",
146-
"@material/touch-target": "15.0.0-canary.83355c322.0",
147-
"@material/typography": "15.0.0-canary.83355c322.0",
101+
"@material/animation": "15.0.0-canary.bc9ae6c9c.0",
102+
"@material/auto-init": "15.0.0-canary.bc9ae6c9c.0",
103+
"@material/banner": "15.0.0-canary.bc9ae6c9c.0",
104+
"@material/base": "15.0.0-canary.bc9ae6c9c.0",
105+
"@material/button": "15.0.0-canary.bc9ae6c9c.0",
106+
"@material/card": "15.0.0-canary.bc9ae6c9c.0",
107+
"@material/checkbox": "15.0.0-canary.bc9ae6c9c.0",
108+
"@material/chips": "15.0.0-canary.bc9ae6c9c.0",
109+
"@material/circular-progress": "15.0.0-canary.bc9ae6c9c.0",
110+
"@material/data-table": "15.0.0-canary.bc9ae6c9c.0",
111+
"@material/density": "15.0.0-canary.bc9ae6c9c.0",
112+
"@material/dialog": "15.0.0-canary.bc9ae6c9c.0",
113+
"@material/dom": "15.0.0-canary.bc9ae6c9c.0",
114+
"@material/drawer": "15.0.0-canary.bc9ae6c9c.0",
115+
"@material/elevation": "15.0.0-canary.bc9ae6c9c.0",
116+
"@material/fab": "15.0.0-canary.bc9ae6c9c.0",
117+
"@material/feature-targeting": "15.0.0-canary.bc9ae6c9c.0",
118+
"@material/floating-label": "15.0.0-canary.bc9ae6c9c.0",
119+
"@material/form-field": "15.0.0-canary.bc9ae6c9c.0",
120+
"@material/icon-button": "15.0.0-canary.bc9ae6c9c.0",
121+
"@material/image-list": "15.0.0-canary.bc9ae6c9c.0",
122+
"@material/layout-grid": "15.0.0-canary.bc9ae6c9c.0",
123+
"@material/line-ripple": "15.0.0-canary.bc9ae6c9c.0",
124+
"@material/linear-progress": "15.0.0-canary.bc9ae6c9c.0",
125+
"@material/list": "15.0.0-canary.bc9ae6c9c.0",
126+
"@material/menu": "15.0.0-canary.bc9ae6c9c.0",
127+
"@material/menu-surface": "15.0.0-canary.bc9ae6c9c.0",
128+
"@material/notched-outline": "15.0.0-canary.bc9ae6c9c.0",
129+
"@material/radio": "15.0.0-canary.bc9ae6c9c.0",
130+
"@material/ripple": "15.0.0-canary.bc9ae6c9c.0",
131+
"@material/rtl": "15.0.0-canary.bc9ae6c9c.0",
132+
"@material/segmented-button": "15.0.0-canary.bc9ae6c9c.0",
133+
"@material/select": "15.0.0-canary.bc9ae6c9c.0",
134+
"@material/shape": "15.0.0-canary.bc9ae6c9c.0",
135+
"@material/slider": "15.0.0-canary.bc9ae6c9c.0",
136+
"@material/snackbar": "15.0.0-canary.bc9ae6c9c.0",
137+
"@material/switch": "15.0.0-canary.bc9ae6c9c.0",
138+
"@material/tab": "15.0.0-canary.bc9ae6c9c.0",
139+
"@material/tab-bar": "15.0.0-canary.bc9ae6c9c.0",
140+
"@material/tab-indicator": "15.0.0-canary.bc9ae6c9c.0",
141+
"@material/tab-scroller": "15.0.0-canary.bc9ae6c9c.0",
142+
"@material/textfield": "15.0.0-canary.bc9ae6c9c.0",
143+
"@material/theme": "15.0.0-canary.bc9ae6c9c.0",
144+
"@material/tooltip": "15.0.0-canary.bc9ae6c9c.0",
145+
"@material/top-app-bar": "15.0.0-canary.bc9ae6c9c.0",
146+
"@material/touch-target": "15.0.0-canary.bc9ae6c9c.0",
147+
"@material/typography": "15.0.0-canary.bc9ae6c9c.0",
148148
"@octokit/rest": "18.3.5",
149149
"@rollup/plugin-commonjs": "^21.0.0",
150150
"@rollup/plugin-node-resolve": "^13.1.3",

packages.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Each individual package uses a placeholder for the version of Angular to ensure they're
22
# all in-sync. This map is passed to each ng_package rule to stamp out the appropriate
33
# version for the placeholders.
4-
MDC_PACKAGE_VERSION = "15.0.0-canary.83355c322.0"
4+
MDC_PACKAGE_VERSION = "15.0.0-canary.bc9ae6c9c.0"
55
TSLIB_PACKAGE_VERSION = "^2.3.0"
66
RXJS_PACKAGE_VERSION = "^6.5.3 || ^7.4.0"
77

src/material/core/tokens/tests/test-validate-tokens.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
@use '@material/snackbar/snackbar-theme' as mdc-snackbar-theme;
1919
@use '@material/chips/chip-theme' as mdc-chips-theme;
2020
@use '@material/dialog/dialog-theme' as mdc-dialog-theme;
21+
@use '@material/textfield/filled-text-field-theme' as mdc-filled-text-field-theme;
22+
@use '@material/textfield/outlined-text-field-theme' as mdc-outlined-text-field-theme;
2123
@use '@material/theme/validate' as mdc-validate;
2224

2325
@use '../m2/mdc/circular-progress' as tokens-mdc-circular-progress;
@@ -37,6 +39,8 @@
3739
@use '../m2/mdc/snack-bar' as tokens-mdc-snack-bar;
3840
@use '../m2/mdc/chip' as tokens-mdc-chip;
3941
@use '../m2/mdc/dialog' as tokens-mdc-dialog;
42+
@use '../m2/mdc/filled-text-field' as tokens-mdc-filled-text-field;
43+
@use '../m2/mdc/outlined-text-field' as tokens-mdc-outlined-text-field;
4044

4145
@mixin validate-slots($component, $slots, $reference) {
4246
@debug 'Validating #{$component}...';
@@ -135,3 +139,13 @@
135139
$slots: tokens-mdc-extended-fab.get-token-slots(),
136140
$reference: mdc-extended-fab-theme.$extended-light-theme
137141
);
142+
@include validate-slots(
143+
$component: 'm2.mdc.filled-text-field',
144+
$slots: tokens-mdc-filled-text-field.get-token-slots(),
145+
$reference: mdc-filled-text-field-theme.$light-theme
146+
);
147+
@include validate-slots(
148+
$component: 'm2.mdc.outlined-text-field',
149+
$slots: tokens-mdc-outlined-text-field.get-token-slots(),
150+
$reference: mdc-outlined-text-field-theme.$light-theme
151+
);

0 commit comments

Comments
 (0)