material 3.7.1 → 3.7.3
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/README.md +2 -2
- package/dist/components/slider/features/controller.js +24 -8
- package/dist/elements/css/bottom-app-bar.css +1 -1
- package/dist/elements/css/bottom-app-bar.js +1 -1
- package/dist/elements/css/card.css +1 -1
- package/dist/elements/css/card.js +1 -1
- package/dist/elements/css/checkbox.css +1 -1
- package/dist/elements/css/checkbox.js +1 -1
- package/dist/elements/css/datepicker.css +1 -1
- package/dist/elements/css/datepicker.js +1 -1
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/dialog.js +1 -1
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +1 -1
- package/dist/elements/css/radios.css +1 -1
- package/dist/elements/css/radios.js +1 -1
- package/dist/elements/css/select.css +1 -1
- package/dist/elements/css/select.js +1 -1
- package/dist/elements/css/slider.css +1 -1
- package/dist/elements/css/slider.js +1 -1
- package/dist/elements/css/tabs.css +1 -1
- package/dist/elements/css/tabs.js +1 -1
- package/dist/elements/css/text-field.css +1 -1
- package/dist/elements/css/text-field.js +1 -1
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/timepicker.js +1 -1
- package/dist/elements/css/top-app-bar.css +1 -1
- package/dist/elements/css/top-app-bar.js +1 -1
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +2 -2
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +2 -2
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +2 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +2 -2
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +2 -2
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +2 -2
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/package.json +2 -1
- package/src/styles/abstract/_base.scss +0 -1
- package/src/styles/abstract/_direction.scss +121 -152
- package/src/styles/abstract/_emit.scss +7 -16
- package/src/styles/abstract/_floating-placement.scss +9 -10
- package/src/styles/abstract/_functions.scss +64 -79
- package/src/styles/abstract/_mixins.scss +355 -459
- package/src/styles/abstract/_theme.scss +122 -136
- package/src/styles/abstract/_variables.scss +320 -390
- package/src/styles/abstract/chips/_assist.scss +2 -3
- package/src/styles/abstract/chips/_filter.scss +2 -3
- package/src/styles/abstract/chips/_input.scss +2 -3
- package/src/styles/abstract/chips/_suggestion.scss +2 -3
- package/src/styles/base/_body-theme.scss +10 -15
- package/src/styles/base/_document.scss +10 -33
- package/src/styles/base/_reset.scss +20 -40
- package/src/styles/base/_tokens.scss +6 -21
- package/src/styles/base/_typescale-tokens.scss +12 -16
- package/src/styles/base/_typography.scss +28 -37
- package/src/styles/components/_badge.scss +171 -193
- package/src/styles/components/_bottom-app-bar.scss +72 -88
- package/src/styles/components/_bottom-sheet.scss +188 -232
- package/src/styles/components/_button-group.scss +140 -189
- package/src/styles/components/_button.scss +382 -478
- package/src/styles/components/_card.scss +349 -473
- package/src/styles/components/_carousel.scss +134 -156
- package/src/styles/components/_checkbox.scss +208 -247
- package/src/styles/components/_chips.scss +239 -304
- package/src/styles/components/_datepicker.scss +172 -220
- package/src/styles/components/_dialog.scss +428 -553
- package/src/styles/components/_divider.scss +37 -46
- package/src/styles/components/_drawer.scss +571 -678
- package/src/styles/components/_extended-fab.scss +263 -294
- package/src/styles/components/_fab-menu.scss +225 -267
- package/src/styles/components/_fab.scss +197 -218
- package/src/styles/components/_icon-button.scss +483 -588
- package/src/styles/components/_list.scss +115 -144
- package/src/styles/components/_loading-indicator.scss +23 -29
- package/src/styles/components/_menu.scss +543 -699
- package/src/styles/components/_navigation-bar.scss +189 -234
- package/src/styles/components/_navigation-rail.scss +256 -312
- package/src/styles/components/_progress.scss +60 -85
- package/src/styles/components/_radios.scss +170 -205
- package/src/styles/components/_search.scss +369 -455
- package/src/styles/components/_select.scss +78 -185
- package/src/styles/components/_side-sheet.scss +234 -292
- package/src/styles/components/_slider.scss +289 -367
- package/src/styles/components/_snackbar.scss +149 -198
- package/src/styles/components/_split-button.scss +139 -228
- package/src/styles/components/_switch.scss +282 -349
- package/src/styles/components/_tabs.scss +350 -547
- package/src/styles/components/_text-field.scss +788 -978
- package/src/styles/components/_timepicker.scss +435 -506
- package/src/styles/components/_toolbar.scss +178 -242
- package/src/styles/components/_tooltip.scss +152 -197
- package/src/styles/components/_top-app-bar.scss +206 -224
- package/src/styles/elements/_badge.scss +42 -61
- package/src/styles/elements/_bottom-app-bar.scss +14 -20
- package/src/styles/elements/_bottom-sheet.scss +0 -3
- package/src/styles/elements/_button-group.scss +80 -80
- package/src/styles/elements/_button.scss +72 -88
- package/src/styles/elements/_card.scss +48 -57
- package/src/styles/elements/_carousel.scss +2 -5
- package/src/styles/elements/_checkbox.scss +32 -43
- package/src/styles/elements/_chips.scss +18 -22
- package/src/styles/elements/_config.scss +11 -26
- package/src/styles/elements/_datepicker.scss +17 -22
- package/src/styles/elements/_dialog.scss +0 -3
- package/src/styles/elements/_divider.scss +11 -13
- package/src/styles/elements/_drawer.scss +9 -14
- package/src/styles/elements/_extended-fab.scss +36 -40
- package/src/styles/elements/_fab-menu.scss +21 -25
- package/src/styles/elements/_fab.scss +17 -20
- package/src/styles/elements/_field.scss +93 -114
- package/src/styles/elements/_icon-button.scss +34 -38
- package/src/styles/elements/_index.scss +0 -4
- package/src/styles/elements/_list.scss +19 -26
- package/src/styles/elements/_loading-indicator.scss +6 -9
- package/src/styles/elements/_menu.scss +0 -3
- package/src/styles/elements/_navigation-bar.scss +5 -9
- package/src/styles/elements/_navigation-rail.scss +10 -15
- package/src/styles/elements/_progress.scss +15 -18
- package/src/styles/elements/_radios.scss +24 -49
- package/src/styles/elements/_search.scss +19 -24
- package/src/styles/elements/_select.scss +4 -9
- package/src/styles/elements/_side-sheet.scss +0 -3
- package/src/styles/elements/_slider.scss +15 -35
- package/src/styles/elements/_snackbar.scss +0 -3
- package/src/styles/elements/_split-button.scss +33 -39
- package/src/styles/elements/_switch.scss +50 -90
- package/src/styles/elements/_tabs.scss +9 -13
- package/src/styles/elements/_text-field.scss +150 -178
- package/src/styles/elements/_timepicker.scss +0 -3
- package/src/styles/elements/_toolbar.scss +30 -35
- package/src/styles/elements/_tooltip.scss +0 -3
- package/src/styles/elements/_top-app-bar.scss +38 -45
- package/src/styles/main.scss +0 -15
- package/src/styles/themes/_autumn.scss +240 -258
- package/src/styles/themes/_base-theme.scss +96 -128
- package/src/styles/themes/_baseline.scss +273 -314
- package/src/styles/themes/_brownbeige.scss +242 -250
- package/src/styles/themes/_content.scss +240 -248
- package/src/styles/themes/_desert.scss +242 -250
- package/src/styles/themes/_expressive.scss +242 -250
- package/src/styles/themes/_fidelity.scss +240 -248
- package/src/styles/themes/_forest.scss +242 -259
- package/src/styles/themes/_fruit-salad.scss +242 -250
- package/src/styles/themes/_highcontrast.scss +164 -172
- package/src/styles/themes/_index.scss +0 -1
- package/src/styles/themes/_monochrome.scss +226 -234
- package/src/styles/themes/_neutral.scss +242 -250
- package/src/styles/themes/_ocean.scss +242 -259
- package/src/styles/themes/_rainbow.scss +242 -250
- package/src/styles/themes/_sageivory.scss +242 -250
- package/src/styles/themes/_spring.scss +238 -255
- package/src/styles/themes/_summer.scss +242 -250
- package/src/styles/themes/_sunset.scss +242 -259
- package/src/styles/themes/_tealcaramel.scss +242 -250
- package/src/styles/themes/_vibrant.scss +242 -250
- package/src/styles/utilities/_colors.scss +44 -50
- package/src/styles/utilities/_flexbox.scss +48 -59
- package/src/styles/utilities/_layout.scss +516 -591
- package/src/styles/utilities/_ripple.scss +61 -70
- package/src/styles/utilities/_spacing.scss +120 -127
- package/src/styles/utilities/_typography.scss +45 -58
- package/src/styles/utilities/_visibility.scss +61 -76
- package/dist/package.json +0 -488
|
@@ -1,103 +1,63 @@
|
|
|
1
|
-
// src/styles/elements/_switch.scss
|
|
2
|
-
// <m-switch> before upgrade: the label, then the track (unchecked or checked),
|
|
3
|
-
// with the supporting text under the label.
|
|
4
1
|
@use '../abstract/variables' as v;
|
|
5
2
|
@use '../abstract/mixins' as m;
|
|
6
3
|
@use '../abstract/theme' as t;
|
|
7
4
|
@use 'config' as c;
|
|
8
5
|
|
|
9
|
-
// As components/_switch.scss: the 48px row with 4px above and below, the
|
|
10
|
-
// 12px gap, the 52 x 32 track with its 2px outline and its 16px thumb.
|
|
11
6
|
@include c.host('switch') {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
display: inline-grid;
|
|
8
|
+
grid-template-columns: auto auto;
|
|
9
|
+
align-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
column-gap: 12px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
min-height: 56px;
|
|
14
|
+
padding: 4px 0;
|
|
15
|
+
color: t.color('on-surface');
|
|
16
|
+
@include m.typography('body-large');
|
|
17
|
+
|
|
18
|
+
&::after {
|
|
19
|
+
content: '';
|
|
20
|
+
grid-column: 2;
|
|
21
|
+
grid-row: 1;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
width: 52px;
|
|
24
|
+
height: 32px;
|
|
25
|
+
border: 2px solid t.color('outline');
|
|
26
|
+
border-radius: v.shape('full');
|
|
27
|
+
background: radial-gradient(circle at 14px 50%, t.color('outline') 8px, transparent 8.5px) t.color('surface-container-highest');
|
|
28
|
+
}
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
&[checked]::after {
|
|
31
|
+
border-color: t.color('primary');
|
|
32
|
+
background: radial-gradient(circle at calc(100% - 14px) 50%, t.color('on-primary') 12px, transparent 12.5px) t.color('primary');
|
|
33
|
+
}
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
&[supporting-text]::after {
|
|
36
|
+
grid-row: 1 / span 2;
|
|
37
|
+
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
&[supporting-text]::before {
|
|
40
|
+
content: attr(supporting-text);
|
|
41
|
+
grid-column: 1;
|
|
42
|
+
grid-row: 2;
|
|
43
|
+
color: t.color('on-surface-variant');
|
|
44
|
+
@include m.typography('body-medium');
|
|
45
|
+
}
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// upgrade, and inline text beside the switch moved 11px at upgrade (the
|
|
58
|
-
// check's `[supporting-text no label]` rows). With no label above it the
|
|
59
|
-
// track belongs beside the text, in the row `[supporting-text]::before`
|
|
60
|
-
// places the text in: without it the first row keeps no height, the track's
|
|
61
|
-
// box does not move, and the text's baseline — the first row with one — is
|
|
62
|
-
// the host's before upgrade too. The labelled case keeps the span there: its
|
|
63
|
-
// label leads the first row and carries the baseline. An empty
|
|
64
|
-
// `supporting-text` is no supporting text (the element builds no helper from
|
|
65
|
-
// an empty value) and is the track box below, not this.
|
|
66
|
-
&:empty:is(:not([label]), [label=''])[supporting-text]:not([supporting-text='']) {
|
|
67
|
-
&::after {
|
|
68
|
-
grid-row: 2;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
47
|
+
&:empty:is(:not([label]), [label=''])[supporting-text]:not([supporting-text='']) {
|
|
48
|
+
&::after {
|
|
49
|
+
grid-row: 2;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
71
52
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// empty value): the host is the 52 x 48 track box itself, as
|
|
76
|
-
// components/_switch.scss has it — the 12px gap stands between text (a
|
|
77
|
-
// label or supporting text) and the track, and there is none. A
|
|
78
|
-
// whitespace-only text node is not matched here: CSS cannot see it, so
|
|
79
|
-
// `<m-switch> </m-switch>` (or the tag with a line break inside) keeps the
|
|
80
|
-
// labelled layout before upgrade although the element then builds no label.
|
|
81
|
-
// Write the tag with nothing between its tags.
|
|
82
|
-
&:empty:is(:not([label]), [label='']):is(:not([supporting-text]), [supporting-text='']) {
|
|
83
|
-
column-gap: 0;
|
|
84
|
-
min-height: 48px;
|
|
53
|
+
&:empty:is(:not([label]), [label='']):is(:not([supporting-text]), [supporting-text='']) {
|
|
54
|
+
column-gap: 0;
|
|
55
|
+
min-height: 48px;
|
|
85
56
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// baseline before upgrade too; it is 0 x 0, so the host's box, the track's
|
|
93
|
-
// box and the zero gap do not change. `span 2` matches the empty
|
|
94
|
-
// `supporting-text`'s spanning `::after` above: with an item in the first
|
|
95
|
-
// row, that span gives the first row none of the track's 32px, so the item
|
|
96
|
-
// has to span with it to stay centred in the track.
|
|
97
|
-
&::before {
|
|
98
|
-
content: '';
|
|
99
|
-
grid-column: 1;
|
|
100
|
-
grid-row: 1 / span 2;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
57
|
+
&::before {
|
|
58
|
+
content: '';
|
|
59
|
+
grid-column: 1;
|
|
60
|
+
grid-row: 1 / span 2;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
103
63
|
}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
// src/styles/elements/_tabs.scss
|
|
2
|
-
// <m-tabs> before upgrade: the row of tabs, 48px, or 64px when they have
|
|
3
|
-
// icons; the <m-tab> declarations are drawn on upgrade.
|
|
4
1
|
@use '../abstract/theme' as t;
|
|
5
2
|
@use 'config' as c;
|
|
6
3
|
|
|
7
|
-
// As components/_tabs.scss: the tab heights and the 1px divider under them.
|
|
8
4
|
@include c.host('tabs') {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
display: block;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
height: 48px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border-bottom: 1px solid t.color('outline-variant');
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
&:has(> [icon]) {
|
|
12
|
+
height: 64px;
|
|
13
|
+
}
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
@include c.declarations('tabs') {
|
|
21
|
-
|
|
17
|
+
display: none;
|
|
22
18
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// <m-text-field> keeps the consumer's line box around its inline field,
|
|
2
|
-
// just as the upgraded host does. The surrogate carries the field's own
|
|
3
|
-
// typography, box and baseline; a tall inherited strut can enlarge the host.
|
|
4
1
|
@use 'config' as c;
|
|
5
2
|
@use 'field';
|
|
6
3
|
@use '../abstract/variables' as v;
|
|
@@ -8,179 +5,154 @@
|
|
|
8
5
|
@use '../abstract/theme' as t;
|
|
9
6
|
|
|
10
7
|
@include c.host('text-field') {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// A password or hidden field paints no value (#53): the value attribute can
|
|
165
|
-
// hold a password or a token in clear text, and the shared rule above paints
|
|
166
|
-
// it for every type. The space is the empty field's line box, so a password's
|
|
167
|
-
// box does not move at upgrade; no mask either — its length is information
|
|
168
|
-
// too. `i`: HTML reads an input's type case-insensitively, so
|
|
169
|
-
// `type="PASSWORD"` upgrades to a masked input and must not paint here.
|
|
170
|
-
&[type='password' i]::before,
|
|
171
|
-
&[type='hidden' i]::before {
|
|
172
|
-
content: ' ';
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// A hidden field takes no space, before upgrade or after: the upgraded host
|
|
176
|
-
// is not rendered at all — a host rule for `type="hidden"` in the element's
|
|
177
|
-
// host styles, as for `[hidden]` — so reserving a box here would move the
|
|
178
|
-
// page twice, at paint and at upgrade. `display: none` is that, and with it
|
|
179
|
-
// the field's chrome never renders either; the value still submits with the
|
|
180
|
-
// form, the element being form-associated.
|
|
181
|
-
&[type='hidden' i] {
|
|
182
|
-
display: none;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
> * { display: none; }
|
|
8
|
+
display: inline-block;
|
|
9
|
+
position: relative;
|
|
10
|
+
width: v.text-field('width');
|
|
11
|
+
|
|
12
|
+
&::before {
|
|
13
|
+
content: attr(value) ' ';
|
|
14
|
+
display: inline-block;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: v.text-field('height');
|
|
18
|
+
padding: 24.5px v.text-field('padding-horizontal') 0;
|
|
19
|
+
border-radius: v.text-field('border-radius') v.text-field('border-radius') 0 0;
|
|
20
|
+
border-bottom: v.text-field('border-width') solid t.color('on-surface-variant');
|
|
21
|
+
background-color: t.color('surface-container-highest');
|
|
22
|
+
color: t.color('on-surface');
|
|
23
|
+
white-space: pre;
|
|
24
|
+
overflow: clip;
|
|
25
|
+
@include m.typography('body-large');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:not([label])::before {
|
|
29
|
+
padding-top: 16.5px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&[variant='outlined']::before {
|
|
33
|
+
padding-top: 15.5px;
|
|
34
|
+
border: v.text-field('border-width') solid t.color('outline');
|
|
35
|
+
border-radius: v.text-field('border-radius');
|
|
36
|
+
background: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&[density='compact'] {
|
|
40
|
+
&::before {
|
|
41
|
+
height: 40px;
|
|
42
|
+
padding-top: 13.5px;
|
|
43
|
+
@include m.typography('body-medium');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:not([label])::before { padding-top: 10px; }
|
|
47
|
+
&[variant='outlined']::before { padding-top: 9px; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[supporting-text]:not([supporting-text='']),
|
|
51
|
+
&[maxlength] {
|
|
52
|
+
&::before {
|
|
53
|
+
height: calc(#{v.text-field('height')} + #{field.$supporting-row});
|
|
54
|
+
border-bottom: field.$supporting-row solid transparent;
|
|
55
|
+
background-clip: padding-box;
|
|
56
|
+
background-image: linear-gradient(to top, #{t.color('on-surface-variant')} v.text-field('border-width'), transparent v.text-field('border-width'));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&[variant='outlined']::before {
|
|
60
|
+
padding-top: calc(15.5px + #{v.text-field('border-width')});
|
|
61
|
+
padding-left: calc(#{v.text-field('padding-horizontal')} + #{v.text-field('border-width')});
|
|
62
|
+
border-width: 0 0 field.$supporting-row;
|
|
63
|
+
border-radius: v.text-field('border-radius') / v.text-field('border-radius') v.text-field('border-radius') calc(#{v.text-field('border-radius')} + #{field.$supporting-row}) calc(#{v.text-field('border-radius')} + #{field.$supporting-row});
|
|
64
|
+
background-image: none;
|
|
65
|
+
box-shadow: inset 0 0 0 v.text-field('border-width') t.color('outline');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&[density='compact']::before {
|
|
69
|
+
height: calc(40px + #{field.$supporting-row});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&[label]::after {
|
|
74
|
+
content: attr(label);
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: v.text-field('padding-vertical');
|
|
78
|
+
left: v.text-field('padding-horizontal');
|
|
79
|
+
color: t.color('on-surface-variant');
|
|
80
|
+
@include m.typography('body-large');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[label][value]:not([value=''])::after {
|
|
84
|
+
top: 8px;
|
|
85
|
+
@include m.typography('body-small');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[variant='outlined'][label][value]:not([value=''])::after {
|
|
89
|
+
top: -8px;
|
|
90
|
+
padding: 0 4px;
|
|
91
|
+
left: 12px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&[density='compact']::after {
|
|
95
|
+
top: 10px;
|
|
96
|
+
@include m.typography('body-medium');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&[type='multiline'] {
|
|
100
|
+
&::before {
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
height: v.text-field('height-multiline');
|
|
103
|
+
padding-top: v.text-field('padding-top-multiline');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&[label]::before {
|
|
107
|
+
padding-top: v.text-field('padding-top-multiline-label');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&[variant='outlined']::before {
|
|
111
|
+
padding-top: calc(#{v.text-field('padding-top-multiline')} - #{v.text-field('border-width')});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[density='compact'] {
|
|
115
|
+
&::before {
|
|
116
|
+
height: 40px;
|
|
117
|
+
padding-top: v.text-field('padding-top-multiline-compact');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[label]::before {
|
|
121
|
+
padding-top: v.text-field('padding-top-multiline-compact-label');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&[variant='outlined']::before {
|
|
125
|
+
padding-top: calc(#{v.text-field('padding-top-multiline-compact')} - #{v.text-field('border-width')});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[supporting-text]:not([supporting-text='']),
|
|
130
|
+
&[maxlength] {
|
|
131
|
+
&::before {
|
|
132
|
+
height: calc(#{v.text-field('height-multiline')} + #{field.$supporting-row});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&[variant='outlined']::before {
|
|
136
|
+
padding-top: v.text-field('padding-top-multiline');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&[density='compact'] {
|
|
140
|
+
&::before { height: calc(40px + #{field.$supporting-row}); }
|
|
141
|
+
&[variant='outlined']::before {
|
|
142
|
+
padding-top: v.text-field('padding-top-multiline-compact');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&[type='password' i]::before,
|
|
149
|
+
&[type='hidden' i]::before {
|
|
150
|
+
content: ' ';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&[type='hidden' i] {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
> * { display: none; }
|
|
186
158
|
}
|
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
// src/styles/elements/_toolbar.scss
|
|
2
|
-
// <m-toolbar> before upgrade: the docked bar or the floating pill, with the
|
|
3
|
-
// items in a row (a column when vertical) and the FAB after them.
|
|
4
1
|
@use '../abstract/variables' as v;
|
|
5
2
|
@use '../abstract/mixins' as m;
|
|
6
3
|
@use '../abstract/theme' as t;
|
|
7
4
|
@use 'config' as c;
|
|
8
5
|
|
|
9
|
-
// As components/_toolbar.scss: 64px, docked padded 16px at each end with the
|
|
10
|
-
// items spread, floating padded 8px with the items 4px apart.
|
|
11
6
|
@include c.host('toolbar') {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
min-height: 64px;
|
|
13
|
+
padding-inline: 16px;
|
|
14
|
+
background-color: t.color('surface-container');
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
&[arrangement='center'] {
|
|
17
|
+
justify-content: center;
|
|
18
|
+
gap: 32px;
|
|
19
|
+
}
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
&[variant='floating'] {
|
|
22
|
+
width: fit-content;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
gap: 4px;
|
|
25
|
+
padding: 8px;
|
|
26
|
+
border-radius: v.shape('full');
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
&:not([flat]) {
|
|
29
|
+
@include m.elevation(1);
|
|
30
|
+
}
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
&[orientation='vertical'] {
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
min-width: 64px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
&[color='vibrant'] {
|
|
40
|
+
background-color: t.color('primary-container');
|
|
41
|
+
}
|
|
47
42
|
}
|