@material/web 1.0.0-pre.3 → 1.0.0-pre.4
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/LICENSE +1 -1
- package/README.md +41 -41
- package/controller/form-controller.d.ts +1 -1
- package/controller/form-controller.js +21 -29
- package/controller/form-controller.js.map +1 -1
- package/field/lib/_content.scss +91 -13
- package/field/lib/_filled-field.scss +19 -57
- package/field/lib/_label.scss +1 -2
- package/field/lib/_md-comp-filled-field.scss +123 -64
- package/field/lib/_md-comp-outlined-field.scss +100 -59
- package/field/lib/_outlined-field.scss +13 -11
- package/field/lib/_shared.scss +21 -17
- package/field/lib/field.d.ts +2 -1
- package/field/lib/field.js +73 -62
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-field.d.ts +0 -5
- package/field/lib/filled-field.js +2 -41
- package/field/lib/filled-field.js.map +1 -1
- package/field/lib/filled-styles.css.js +1 -1
- package/field/lib/filled-styles.css.js.map +1 -1
- package/field/lib/outlined-field.js +1 -1
- package/field/lib/outlined-field.js.map +1 -1
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/field/lib/shared-styles.css.js +1 -1
- package/field/lib/shared-styles.css.js.map +1 -1
- package/icon/lib/_icon.scss +1 -1
- package/icon/lib/_md-comp-icon.scss +1 -2
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/list/lib/_list.scss +19 -9
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +293 -102
- package/list/lib/listitem/list-item-styles.css.js +1 -1
- package/list/lib/listitem/list-item-styles.css.js.map +1 -1
- package/list/lib/listitem/list-item.d.ts +7 -6
- package/list/lib/listitem/list-item.js +22 -26
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/list-item-link.d.ts +18 -0
- package/list/list-item-link.js +19 -2
- package/list/list-item-link.js.map +1 -1
- package/list/list-item.d.ts +19 -0
- package/list/list-item.js +20 -2
- package/list/list-item.js.map +1 -1
- package/menu/lib/_menu.scss +26 -5
- package/menu/lib/menu-styles.css.js +1 -1
- package/menu/lib/menu-styles.css.js.map +1 -1
- package/menu/lib/menu.js +8 -7
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/_menu-item.scss +39 -79
- package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
- package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
- package/menu/lib/submenuitem/sub-menu-item.d.ts +0 -1
- package/menu/lib/submenuitem/sub-menu-item.js +0 -1
- package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
- package/menu/menu-item-link.js +1 -2
- package/menu/menu-item-link.js.map +1 -1
- package/menu/menu-item.js +2 -3
- package/menu/menu-item.js.map +1 -1
- package/menu/sub-menu-item.js +1 -2
- package/menu/sub-menu-item.js.map +1 -1
- package/menusurface/lib/_md-comp-menu-surface.scss +1 -1
- package/package.json +1 -1
- package/textfield/lib/_filled-text-field.scss +98 -96
- package/textfield/lib/_icon.scss +11 -55
- package/textfield/lib/_input.scss +4 -6
- package/textfield/lib/_outlined-text-field.scss +87 -88
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/shared-styles.css.js +1 -1
- package/textfield/lib/shared-styles.css.js.map +1 -1
- package/tokens/_index.scss +1 -1
- package/tokens/v0_161/_index.scss +107 -0
- package/tokens/v0_161/_md-comp-assist-chip.scss +109 -0
- package/tokens/v0_161/_md-comp-badge.scss +58 -0
- package/tokens/v0_161/_md-comp-banner.scss +75 -0
- package/tokens/v0_161/_md-comp-bottom-app-bar.scss +35 -0
- package/tokens/v0_161/_md-comp-carousel-item.scss +65 -0
- package/tokens/v0_161/_md-comp-checkbox.scss +126 -0
- package/tokens/v0_161/_md-comp-circular-progress-indicator.scss +39 -0
- package/tokens/v0_161/_md-comp-data-table.scss +96 -0
- package/tokens/v0_161/_md-comp-date-input-modal.scss +89 -0
- package/tokens/v0_161/_md-comp-date-picker-docked.scss +246 -0
- package/tokens/v0_161/_md-comp-date-picker-modal.scss +305 -0
- package/tokens/v0_161/_md-comp-dialog.scss +123 -0
- package/tokens/v0_161/_md-comp-divider.scss +25 -0
- package/tokens/v0_161/_md-comp-elevated-button.scss +91 -0
- package/tokens/v0_161/_md-comp-elevated-card.scss +59 -0
- package/tokens/v0_161/_md-comp-extended-fab-branded.scss +86 -0
- package/tokens/v0_161/_md-comp-extended-fab-primary.scss +94 -0
- package/tokens/v0_161/_md-comp-extended-fab-secondary.scss +95 -0
- package/tokens/v0_161/_md-comp-extended-fab-surface.scss +90 -0
- package/tokens/v0_161/_md-comp-extended-fab-tertiary.scss +95 -0
- package/tokens/v0_161/_md-comp-fab-branded-large.scss +60 -0
- package/tokens/v0_161/_md-comp-fab-branded.scss +60 -0
- package/tokens/v0_161/_md-comp-fab-primary-large.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-primary-small.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-primary.scss +65 -0
- package/tokens/v0_161/_md-comp-fab-secondary-large.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-secondary-small.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-secondary.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-surface-large.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-surface-small.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-surface.scss +64 -0
- package/tokens/v0_161/_md-comp-fab-tertiary-large.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-tertiary-small.scss +66 -0
- package/tokens/v0_161/_md-comp-fab-tertiary.scss +66 -0
- package/tokens/v0_161/_md-comp-filled-autocomplete.scss +267 -0
- package/tokens/v0_161/_md-comp-filled-button.scss +89 -0
- package/tokens/v0_161/_md-comp-filled-card.scss +58 -0
- package/tokens/v0_161/_md-comp-filled-icon-button.scss +79 -0
- package/tokens/v0_161/_md-comp-filled-menu-button.scss +98 -0
- package/tokens/v0_161/_md-comp-filled-select.scss +272 -0
- package/tokens/v0_161/_md-comp-filled-text-field.scss +189 -0
- package/tokens/v0_161/_md-comp-filled-tonal-button.scss +99 -0
- package/tokens/v0_161/_md-comp-filled-tonal-icon-button.scss +86 -0
- package/tokens/v0_161/_md-comp-filter-chip.scss +209 -0
- package/tokens/v0_161/_md-comp-full-screen-dialog.scss +111 -0
- package/tokens/v0_161/_md-comp-icon-button.scss +70 -0
- package/tokens/v0_161/_md-comp-input-chip.scss +184 -0
- package/tokens/v0_161/_md-comp-linear-progress-indicator.scss +41 -0
- package/tokens/v0_161/_md-comp-list.scss +248 -0
- package/tokens/v0_161/_md-comp-menu.scss +37 -0
- package/tokens/v0_161/_md-comp-navigation-bar.scss +114 -0
- package/tokens/v0_161/_md-comp-navigation-drawer.scss +162 -0
- package/tokens/v0_161/_md-comp-navigation-rail.scss +131 -0
- package/tokens/v0_161/_md-comp-outlined-autocomplete.scss +257 -0
- package/tokens/v0_161/_md-comp-outlined-button.scss +84 -0
- package/tokens/v0_161/_md-comp-outlined-card.scss +65 -0
- package/tokens/v0_161/_md-comp-outlined-icon-button.scss +79 -0
- package/tokens/v0_161/_md-comp-outlined-menu-button.scss +94 -0
- package/tokens/v0_161/_md-comp-outlined-segmented-button.scss +112 -0
- package/tokens/v0_161/_md-comp-outlined-select.scss +262 -0
- package/tokens/v0_161/_md-comp-outlined-text-field.scss +171 -0
- package/tokens/v0_161/_md-comp-plain-tooltip.scss +55 -0
- package/tokens/v0_161/_md-comp-primary-navigation-tab.scss +121 -0
- package/tokens/v0_161/_md-comp-radio-button.scss +68 -0
- package/tokens/v0_161/_md-comp-rich-tooltip.scss +121 -0
- package/tokens/v0_161/_md-comp-scrim.scss +25 -0
- package/tokens/v0_161/_md-comp-search-bar.scss +99 -0
- package/tokens/v0_161/_md-comp-search-view.scss +93 -0
- package/tokens/v0_161/_md-comp-secondary-navigation-tab.scss +84 -0
- package/tokens/v0_161/_md-comp-sheet-bottom.scss +45 -0
- package/tokens/v0_161/_md-comp-sheet-floating.scss +34 -0
- package/tokens/v0_161/_md-comp-sheet-side.scss +91 -0
- package/tokens/v0_161/_md-comp-slider.scss +114 -0
- package/tokens/v0_161/_md-comp-snackbar.scss +127 -0
- package/tokens/v0_161/_md-comp-standard-menu-button.scss +98 -0
- package/tokens/v0_161/_md-comp-suggestion-chip.scss +125 -0
- package/tokens/v0_161/_md-comp-switch.scss +136 -0
- package/tokens/v0_161/_md-comp-text-button.scss +77 -0
- package/tokens/v0_161/_md-comp-time-input.scss +218 -0
- package/tokens/v0_161/_md-comp-time-picker.scss +264 -0
- package/tokens/v0_161/_md-comp-top-app-bar-large.scss +63 -0
- package/tokens/v0_161/_md-comp-top-app-bar-medium.scss +63 -0
- package/tokens/v0_161/_md-comp-top-app-bar-small-centered.scss +66 -0
- package/tokens/v0_161/_md-comp-top-app-bar-small.scss +64 -0
- package/tokens/v0_161/_md-ref-palette.scss +107 -0
- package/tokens/v0_161/_md-ref-typeface.scss +21 -0
- package/tokens/v0_161/_md-sys-color.scss +904 -0
- package/tokens/v0_161/_md-sys-elevation.scss +21 -0
- package/tokens/v0_161/_md-sys-motion.scss +53 -0
- package/tokens/v0_161/_md-sys-shape.scss +30 -0
- package/tokens/v0_161/_md-sys-state.scss +19 -0
- package/tokens/v0_161/_md-sys-typescale.scss +284 -0
- package/tokens/v0_161/index.test.css.js +9 -0
- package/tokens/v0_161/index.test.css.js.map +1 -0
- package/tokens/v0_161/index.test.scss +584 -0
- package/tokens/v0_161/lib.test.css.js +9 -0
- package/tokens/v0_161/lib.test.css.js.map +1 -0
- package/tokens/v0_161/lib.test.scss +663 -0
- package/controller/foundation.d.ts +0 -24
- package/controller/foundation.js +0 -18
- package/controller/foundation.js.map +0 -1
- package/controller/observer-foundation.d.ts +0 -25
- package/controller/observer-foundation.js +0 -37
- package/controller/observer-foundation.js.map +0 -1
- package/controller/observer.d.ts +0 -52
- package/controller/observer.js +0 -149
- package/controller/observer.js.map +0 -1
- package/decorators/bound.d.ts +0 -40
- package/decorators/bound.js +0 -49
- package/decorators/bound.js.map +0 -1
- package/list/lib/avatar/_list-item-avatar.scss +0 -40
- package/list/lib/avatar/list-item-avatar-styles.css.js +0 -9
- package/list/lib/avatar/list-item-avatar-styles.css.js.map +0 -1
- package/list/lib/avatar/list-item-avatar-styles.scss +0 -10
- package/list/lib/avatar/list-item-avatar.d.ts +0 -21
- package/list/lib/avatar/list-item-avatar.js +0 -48
- package/list/lib/avatar/list-item-avatar.js.map +0 -1
- package/list/lib/icon/_list-item-icon.scss +0 -71
- package/list/lib/icon/list-item-icon-styles.css.js +0 -9
- package/list/lib/icon/list-item-icon-styles.css.js.map +0 -1
- package/list/lib/icon/list-item-icon-styles.scss +0 -10
- package/list/lib/icon/list-item-icon.d.ts +0 -9
- package/list/lib/icon/list-item-icon.js +0 -15
- package/list/lib/icon/list-item-icon.js.map +0 -1
- package/list/lib/image/_list-item-image.scss +0 -63
- package/list/lib/image/list-item-image-styles.css.d.ts +0 -1
- package/list/lib/image/list-item-image-styles.css.js +0 -9
- package/list/lib/image/list-item-image-styles.css.js.map +0 -1
- package/list/lib/image/list-item-image-styles.scss +0 -10
- package/list/lib/image/list-item-image.d.ts +0 -21
- package/list/lib/image/list-item-image.js +0 -48
- package/list/lib/image/list-item-image.js.map +0 -1
- package/list/lib/listitem/list-item-private-styles.css.d.ts +0 -1
- package/list/lib/listitem/list-item-private-styles.css.js +0 -9
- package/list/lib/listitem/list-item-private-styles.css.js.map +0 -1
- package/list/lib/listitem/list-item-private-styles.scss +0 -10
- package/list/lib/video/_list-item-video.scss +0 -71
- package/list/lib/video/list-item-video-styles.css.d.ts +0 -1
- package/list/lib/video/list-item-video-styles.css.js +0 -9
- package/list/lib/video/list-item-video-styles.css.js.map +0 -1
- package/list/lib/video/list-item-video-styles.scss +0 -10
- package/list/lib/video/list-item-video.d.ts +0 -53
- package/list/lib/video/list-item-video.js +0 -115
- package/list/lib/video/list-item-video.js.map +0 -1
- package/list/list-item-avatar.d.ts +0 -20
- package/list/list-item-avatar.js +0 -23
- package/list/list-item-avatar.js.map +0 -1
- package/list/list-item-icon.d.ts +0 -20
- package/list/list-item-icon.js +0 -23
- package/list/list-item-icon.js.map +0 -1
- package/list/list-item-image.d.ts +0 -20
- package/list/list-item-image.js +0 -23
- package/list/list-item-image.js.map +0 -1
- package/list/list-item-video.d.ts +0 -20
- package/list/list-item-video.js +0 -23
- package/list/list-item-video.js.map +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.css.d.ts +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.css.js +0 -9
- package/menu/lib/menuitem/menu-item-private-styles.css.js.map +0 -1
- package/menu/lib/menuitem/menu-item-private-styles.scss +0 -10
- /package/{list/lib/avatar/list-item-avatar-styles.css.d.ts → tokens/v0_161/index.test.css.d.ts} +0 -0
- /package/{list/lib/icon/list-item-icon-styles.css.d.ts → tokens/v0_161/lib.test.css.d.ts} +0 -0
|
@@ -11,76 +11,135 @@
|
|
|
11
11
|
// go/keep-sorted end
|
|
12
12
|
|
|
13
13
|
$_default-deps: (
|
|
14
|
-
md-sys-color: tokens.md-sys-color-values-light(),
|
|
15
|
-
md-sys-shape: tokens.md-sys-shape-values(),
|
|
16
|
-
md-sys-state: tokens.md-sys-state-values(),
|
|
17
|
-
md-sys-typescale: tokens.md-sys-typescale-values(),
|
|
14
|
+
'md-sys-color': tokens.md-sys-color-values-light(),
|
|
15
|
+
'md-sys-shape': tokens.md-sys-shape-values(),
|
|
16
|
+
'md-sys-state': tokens.md-sys-state-values(),
|
|
17
|
+
'md-sys-typescale': tokens.md-sys-typescale-values(),
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
@function values($deps: $_default-deps, $exclude-hardcoded-values: false) {
|
|
21
|
-
$text-field
|
|
21
|
+
$text-field: tokens.md-comp-filled-text-field-values(
|
|
22
22
|
$deps,
|
|
23
23
|
$exclude-hardcoded-values
|
|
24
24
|
);
|
|
25
|
-
// TODO(b/203778922): Remove *-type when type composite tokens are removed
|
|
26
|
-
// Remove unused tokens.
|
|
27
|
-
$values: map.remove(
|
|
28
|
-
$text-field-values,
|
|
29
|
-
caret-color,
|
|
30
|
-
disabled-input-text-color,
|
|
31
|
-
disabled-input-text-opacity,
|
|
32
|
-
error-focus-caret-color,
|
|
33
|
-
error-focus-input-text-color,
|
|
34
|
-
error-hover-input-text-color,
|
|
35
|
-
error-input-text-color,
|
|
36
|
-
focus-input-text-color,
|
|
37
|
-
hover-input-text-color,
|
|
38
|
-
input-text-color,
|
|
39
|
-
input-text-font,
|
|
40
|
-
input-text-line-height,
|
|
41
|
-
input-text-size,
|
|
42
|
-
input-text-tracking,
|
|
43
|
-
input-text-type,
|
|
44
|
-
input-text-weight,
|
|
45
|
-
input-text-placeholder-color,
|
|
46
|
-
input-text-prefix-color,
|
|
47
|
-
input-text-suffix-color,
|
|
48
|
-
label-text-font,
|
|
49
|
-
label-text-line-height,
|
|
50
|
-
label-text-size,
|
|
51
|
-
label-text-tracking,
|
|
52
|
-
label-text-weight,
|
|
53
|
-
supporting-text-font,
|
|
54
|
-
supporting-text-line-height,
|
|
55
|
-
supporting-text-size,
|
|
56
|
-
supporting-text-tracking,
|
|
57
|
-
supporting-text-weight
|
|
58
|
-
);
|
|
59
25
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
$
|
|
63
|
-
(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
26
|
+
@return (
|
|
27
|
+
// go/keep-sorted start
|
|
28
|
+
'active-indicator-color': map.get($text-field, 'active-indicator-color'),
|
|
29
|
+
'active-indicator-height': map.get($text-field, 'active-indicator-height'),
|
|
30
|
+
'container-color': map.get($text-field, 'container-color'),
|
|
31
|
+
'container-padding-horizontal': if($exclude-hardcoded-values, null, 16px),
|
|
32
|
+
'container-padding-vertical': if($exclude-hardcoded-values, null, 16px),
|
|
33
|
+
'container-shape': map.get($text-field, 'container-shape'),
|
|
34
|
+
'content-color': map.get($text-field, 'input-text-color'),
|
|
35
|
+
'content-type': map.get($text-field, 'input-text-type'),
|
|
36
|
+
'disabled-active-indicator-color':
|
|
37
|
+
map.get($text-field, 'disabled-active-indicator-color'),
|
|
38
|
+
'disabled-active-indicator-height':
|
|
39
|
+
map.get($text-field, 'disabled-active-indicator-height'),
|
|
40
|
+
'disabled-active-indicator-opacity':
|
|
41
|
+
map.get($text-field, 'disabled-active-indicator-opacity'),
|
|
42
|
+
'disabled-container-color': map.get($text-field, 'disabled-container-color'),
|
|
43
|
+
'disabled-container-opacity':
|
|
44
|
+
map.get($text-field, 'disabled-container-opacity'),
|
|
45
|
+
'disabled-content-color': map.get($text-field, 'disabled-input-text-color'),
|
|
46
|
+
'disabled-content-opacity':
|
|
47
|
+
map.get($text-field, 'disabled-input-text-opacity'),
|
|
48
|
+
'disabled-label-text-color':
|
|
49
|
+
map.get($text-field, 'disabled-label-text-color'),
|
|
50
|
+
'disabled-label-text-opacity':
|
|
51
|
+
map.get($text-field, 'disabled-label-text-opacity'),
|
|
52
|
+
'disabled-leading-content-color':
|
|
53
|
+
map.get($text-field, 'disabled-leading-icon-color'),
|
|
54
|
+
'disabled-leading-content-opacity':
|
|
55
|
+
map.get($text-field, 'disabled-leading-icon-opacity'),
|
|
56
|
+
'disabled-supporting-text-color':
|
|
57
|
+
map.get($text-field, 'disabled-supporting-text-color'),
|
|
58
|
+
'disabled-supporting-text-opacity':
|
|
59
|
+
map.get($text-field, 'disabled-supporting-text-opacity'),
|
|
60
|
+
'disabled-trailing-content-color':
|
|
61
|
+
map.get($text-field, 'disabled-trailing-icon-color'),
|
|
62
|
+
'disabled-trailing-content-opacity':
|
|
63
|
+
map.get($text-field, 'disabled-trailing-icon-opacity'),
|
|
64
|
+
'error-active-indicator-color':
|
|
65
|
+
map.get($text-field, 'error-active-indicator-color'),
|
|
66
|
+
'error-content-color': map.get($text-field, 'error-input-text-color'),
|
|
67
|
+
'error-focus-active-indicator-color':
|
|
68
|
+
map.get($text-field, 'error-focus-active-indicator-color'),
|
|
69
|
+
'error-focus-content-color':
|
|
70
|
+
map.get($text-field, 'error-focus-leading-icon-color'),
|
|
71
|
+
'error-focus-label-text-color':
|
|
72
|
+
map.get($text-field, 'error-focus-label-text-color'),
|
|
73
|
+
'error-focus-leading-content-color':
|
|
74
|
+
map.get($text-field, 'error-focus-leading-icon-color'),
|
|
75
|
+
'error-focus-supporting-text-color':
|
|
76
|
+
map.get($text-field, 'error-focus-supporting-text-color'),
|
|
77
|
+
'error-focus-trailing-content-color':
|
|
78
|
+
map.get($text-field, 'error-focus-trailing-icon-color'),
|
|
79
|
+
'error-hover-active-indicator-color':
|
|
80
|
+
map.get($text-field, 'error-hover-active-indicator-color'),
|
|
81
|
+
'error-hover-content-color':
|
|
82
|
+
map.get($text-field, 'error-hover-input-text-color'),
|
|
83
|
+
'error-hover-label-text-color':
|
|
84
|
+
map.get($text-field, 'error-hover-label-text-color'),
|
|
85
|
+
'error-hover-leading-content-color':
|
|
86
|
+
map.get($text-field, 'error-hover-leading-icon-color'),
|
|
87
|
+
'error-hover-state-layer-color':
|
|
88
|
+
map.get($text-field, 'error-hover-state-layer-color'),
|
|
89
|
+
'error-hover-state-layer-opacity':
|
|
90
|
+
map.get($text-field, 'error-hover-state-layer-opacity'),
|
|
91
|
+
'error-hover-supporting-text-color':
|
|
92
|
+
map.get($text-field, 'error-hover-supporting-text-color'),
|
|
93
|
+
'error-hover-trailing-content-color':
|
|
94
|
+
map.get($text-field, 'error-hover-trailing-icon-color'),
|
|
95
|
+
'error-label-text-color': map.get($text-field, 'error-label-text-color'),
|
|
96
|
+
'error-leading-content-color':
|
|
97
|
+
map.get($text-field, 'error-leading-icon-color'),
|
|
98
|
+
'error-supporting-text-color':
|
|
99
|
+
map.get($text-field, 'error-supporting-text-color'),
|
|
100
|
+
'error-trailing-content-color':
|
|
101
|
+
map.get($text-field, 'error-trailing-icon-color'),
|
|
102
|
+
'focus-active-indicator-color':
|
|
103
|
+
map.get($text-field, 'focus-active-indicator-color'),
|
|
104
|
+
'focus-active-indicator-height':
|
|
105
|
+
map.get($text-field, 'focus-active-indicator-height'),
|
|
106
|
+
'focus-content-color': map.get($text-field, 'focus-input-text-color'),
|
|
107
|
+
'focus-label-text-color': map.get($text-field, 'focus-label-text-color'),
|
|
108
|
+
'focus-leading-content-color':
|
|
109
|
+
map.get($text-field, 'focus-leading-icon-color'),
|
|
110
|
+
'focus-supporting-text-color':
|
|
111
|
+
map.get($text-field, 'focus-supporting-text-color'),
|
|
112
|
+
'focus-trailing-content-color':
|
|
113
|
+
map.get($text-field, 'focus-trailing-icon-color'),
|
|
114
|
+
'hover-active-indicator-color':
|
|
115
|
+
map.get($text-field, 'hover-active-indicator-color'),
|
|
116
|
+
'hover-active-indicator-height':
|
|
117
|
+
map.get($text-field, 'hover-active-indicator-height'),
|
|
118
|
+
'hover-content-color': map.get($text-field, 'hover-input-text-color'),
|
|
119
|
+
'hover-label-text-color': map.get($text-field, 'hover-label-text-color'),
|
|
120
|
+
'hover-leading-content-color':
|
|
121
|
+
map.get($text-field, 'hover-leading-icon-color'),
|
|
122
|
+
'hover-state-layer-color': map.get($text-field, 'hover-state-layer-color'),
|
|
123
|
+
'hover-state-layer-opacity':
|
|
124
|
+
map.get($text-field, 'hover-state-layer-opacity'),
|
|
125
|
+
'hover-supporting-text-color':
|
|
126
|
+
map.get($text-field, 'hover-supporting-text-color'),
|
|
127
|
+
'hover-trailing-content-color':
|
|
128
|
+
map.get($text-field, 'hover-trailing-icon-color'),
|
|
129
|
+
'label-text-color': map.get($text-field, 'label-text-color'),
|
|
130
|
+
'label-text-populated-line-height':
|
|
131
|
+
map.get($text-field, 'label-text-populated-line-height'),
|
|
132
|
+
'label-text-populated-size':
|
|
133
|
+
map.get($text-field, 'label-text-populated-size'),
|
|
134
|
+
'label-text-type': map.get($text-field, 'label-text-type'),
|
|
135
|
+
'leading-content-color': map.get($text-field, 'leading-icon-color'),
|
|
136
|
+
'supporting-text-color': map.get($text-field, 'supporting-text-color'),
|
|
137
|
+
'supporting-text-padding': if($exclude-hardcoded-values, null, 16px),
|
|
138
|
+
'supporting-text-padding-top': if($exclude-hardcoded-values, null, 4px),
|
|
139
|
+
'supporting-text-type': map.get($text-field, 'supporting-text-type'),
|
|
140
|
+
'trailing-content-color': map.get($text-field, 'trailing-icon-color'),
|
|
141
|
+
'with-label-container-padding-vertical':
|
|
142
|
+
if($exclude-hardcoded-values, null, 8px),
|
|
143
|
+
// go/keep-sorted end
|
|
83
144
|
);
|
|
84
|
-
|
|
85
|
-
@return $values;
|
|
86
145
|
}
|
|
@@ -18,68 +18,109 @@ $_default-deps: (
|
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
@function values($deps: $_default-deps, $exclude-hardcoded-values: false) {
|
|
21
|
-
$text-field
|
|
21
|
+
$text-field: tokens.md-comp-outlined-text-field-values(
|
|
22
22
|
$deps,
|
|
23
23
|
$exclude-hardcoded-values
|
|
24
24
|
);
|
|
25
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
|
-
|
|
26
|
+
@return (
|
|
27
|
+
// go/keep-sorted start
|
|
28
|
+
'container-padding-horizontal': if($exclude-hardcoded-values, null, 16px),
|
|
29
|
+
'container-padding-vertical': if($exclude-hardcoded-values, null, 16px),
|
|
30
|
+
'container-shape': map.get($text-field, 'container-shape'),
|
|
31
|
+
'content-color': map.get($text-field, 'input-text-color'),
|
|
32
|
+
'content-type': map.get($text-field, 'input-text-type'),
|
|
33
|
+
'disabled-content-color': map.get($text-field, 'disabled-input-text-color'),
|
|
34
|
+
'disabled-content-opacity':
|
|
35
|
+
map.get($text-field, 'disabled-input-text-opacity'),
|
|
36
|
+
'disabled-label-text-color':
|
|
37
|
+
map.get($text-field, 'disabled-label-text-color'),
|
|
38
|
+
'disabled-label-text-opacity':
|
|
39
|
+
map.get($text-field, 'disabled-label-text-opacity'),
|
|
40
|
+
'disabled-leading-content-color':
|
|
41
|
+
map.get($text-field, 'disabled-leading-icon-color'),
|
|
42
|
+
'disabled-leading-content-opacity':
|
|
43
|
+
map.get($text-field, 'disabled-leading-icon-opacity'),
|
|
44
|
+
'disabled-outline-color': map.get($text-field, 'disabled-outline-color'),
|
|
45
|
+
'disabled-outline-opacity': map.get($text-field, 'disabled-outline-opacity'),
|
|
46
|
+
'disabled-outline-width': map.get($text-field, 'disabled-outline-width'),
|
|
47
|
+
'disabled-supporting-text-color':
|
|
48
|
+
map.get($text-field, 'disabled-supporting-text-color'),
|
|
49
|
+
'disabled-supporting-text-opacity':
|
|
50
|
+
map.get($text-field, 'disabled-supporting-text-opacity'),
|
|
51
|
+
'disabled-trailing-content-color':
|
|
52
|
+
map.get($text-field, 'disabled-trailing-icon-color'),
|
|
53
|
+
'disabled-trailing-content-opacity':
|
|
54
|
+
map.get($text-field, 'disabled-trailing-icon-opacity'),
|
|
55
|
+
'error-content-color': map.get($text-field, 'error-input-text-color'),
|
|
56
|
+
'error-focus-content-color':
|
|
57
|
+
map.get($text-field, 'error-focus-input-text-color'),
|
|
58
|
+
'error-focus-label-text-color':
|
|
59
|
+
map.get($text-field, 'error-focus-label-text-color'),
|
|
60
|
+
'error-focus-leading-content-color':
|
|
61
|
+
map.get($text-field, 'error-focus-leading-icon-color'),
|
|
62
|
+
'error-focus-outline-color':
|
|
63
|
+
map.get($text-field, 'error-focus-outline-color'),
|
|
64
|
+
'error-focus-supporting-text-color':
|
|
65
|
+
map.get($text-field, 'error-focus-supporting-text-color'),
|
|
66
|
+
'error-focus-trailing-content-color':
|
|
67
|
+
map.get($text-field, 'error-focus-trailing-icon-color'),
|
|
68
|
+
'error-hover-content-color':
|
|
69
|
+
map.get($text-field, 'error-hover-input-text-color'),
|
|
70
|
+
'error-hover-label-text-color':
|
|
71
|
+
map.get($text-field, 'error-hover-label-text-color'),
|
|
72
|
+
'error-hover-leading-content-color':
|
|
73
|
+
map.get($text-field, 'error-hover-leading-icon-color'),
|
|
74
|
+
'error-hover-outline-color':
|
|
75
|
+
map.get($text-field, 'error-hover-outline-color'),
|
|
76
|
+
'error-hover-supporting-text-color':
|
|
77
|
+
map.get($text-field, 'error-hover-supporting-text-color'),
|
|
78
|
+
'error-hover-trailing-content-color':
|
|
79
|
+
map.get($text-field, 'error-hover-trailing-icon-color'),
|
|
80
|
+
'error-label-text-color': map.get($text-field, 'error-label-text-color'),
|
|
81
|
+
'error-leading-content-color':
|
|
82
|
+
map.get($text-field, 'error-leading-icon-color'),
|
|
83
|
+
'error-outline-color': map.get($text-field, 'error-outline-color'),
|
|
84
|
+
'error-supporting-text-color':
|
|
85
|
+
map.get($text-field, 'error-supporting-text-color'),
|
|
86
|
+
'error-trailing-content-color':
|
|
87
|
+
map.get($text-field, 'error-trailing-icon-color'),
|
|
88
|
+
'focus-content-color': map.get($text-field, 'focus-input-text-color'),
|
|
89
|
+
'focus-label-text-color': map.get($text-field, 'focus-label-text-color'),
|
|
90
|
+
'focus-leading-content-color':
|
|
91
|
+
map.get($text-field, 'focus-leading-icon-color'),
|
|
92
|
+
'focus-outline-color': map.get($text-field, 'focus-outline-color'),
|
|
93
|
+
'focus-outline-width': map.get($text-field, 'focus-outline-width'),
|
|
94
|
+
'focus-supporting-text-color':
|
|
95
|
+
map.get($text-field, 'focus-supporting-text-color'),
|
|
96
|
+
'focus-trailing-content-color':
|
|
97
|
+
map.get($text-field, 'focus-trailing-icon-color'),
|
|
98
|
+
'hover-content-color': map.get($text-field, 'hover-input-text-color'),
|
|
99
|
+
'hover-label-text-color': map.get($text-field, 'hover-label-text-color'),
|
|
100
|
+
'hover-leading-content-color':
|
|
101
|
+
map.get($text-field, 'hover-leading-icon-color'),
|
|
102
|
+
'hover-outline-color': map.get($text-field, 'hover-outline-color'),
|
|
103
|
+
'hover-outline-width': map.get($text-field, 'hover-outline-width'),
|
|
104
|
+
'hover-supporting-text-color':
|
|
105
|
+
map.get($text-field, 'hover-supporting-text-color'),
|
|
106
|
+
'hover-trailing-content-color':
|
|
107
|
+
map.get($text-field, 'hover-trailing-icon-color'),
|
|
108
|
+
'label-text-color': map.get($text-field, 'label-text-color'),
|
|
109
|
+
'label-text-padding-bottom': if($exclude-hardcoded-values, null, 8px),
|
|
110
|
+
'label-text-populated-line-height':
|
|
111
|
+
map.get($text-field, 'label-text-populated-line-height'),
|
|
112
|
+
'label-text-populated-size':
|
|
113
|
+
map.get($text-field, 'label-text-populated-size'),
|
|
114
|
+
'label-text-type': map.get($text-field, 'label-text-type'),
|
|
115
|
+
'leading-content-color': map.get($text-field, 'leading-icon-color'),
|
|
116
|
+
'outline-color': map.get($text-field, 'outline-color'),
|
|
117
|
+
'outline-label-padding': if($exclude-hardcoded-values, null, 4px),
|
|
118
|
+
'outline-width': map.get($text-field, 'outline-width'),
|
|
119
|
+
'supporting-text-color': map.get($text-field, 'supporting-text-color'),
|
|
120
|
+
'supporting-text-padding': if($exclude-hardcoded-values, null, 16px),
|
|
121
|
+
'supporting-text-padding-top': if($exclude-hardcoded-values, null, 4px),
|
|
122
|
+
'supporting-text-type': map.get($text-field, 'supporting-text-type'),
|
|
123
|
+
'trailing-content-color': map.get($text-field, 'trailing-icon-color'),
|
|
124
|
+
// go/keep-sorted end
|
|
57
125
|
);
|
|
58
|
-
|
|
59
|
-
// Add missing tokens.
|
|
60
|
-
$values: map.merge(
|
|
61
|
-
$values,
|
|
62
|
-
(
|
|
63
|
-
container-padding-horizontal: if($exclude-hardcoded-values, null, 16px),
|
|
64
|
-
container-padding-vertical: if($exclude-hardcoded-values, null, 16px),
|
|
65
|
-
content-color: map.get($text-field-values, input-text-color),
|
|
66
|
-
disabled-content-color:
|
|
67
|
-
map.get($text-field-values, disabled-input-text-color),
|
|
68
|
-
disabled-content-opacity:
|
|
69
|
-
map.get($text-field-values, disabled-input-text-opacity),
|
|
70
|
-
error-content-color: map.get($text-field-values, error-input-text-color),
|
|
71
|
-
error-focus-content-color:
|
|
72
|
-
map.get($text-field-values, error-focus-input-text-color),
|
|
73
|
-
error-hover-content-color:
|
|
74
|
-
map.get($text-field-values, error-hover-input-text-color),
|
|
75
|
-
focus-content-color: map.get($text-field-values, focus-input-text-color),
|
|
76
|
-
hover-content-color: map.get($text-field-values, hover-input-text-color),
|
|
77
|
-
label-text-padding-bottom: if($exclude-hardcoded-values, null, 8px),
|
|
78
|
-
outline-label-padding: if($exclude-hardcoded-values, null, 4px),
|
|
79
|
-
supporting-text-padding: if($exclude-hardcoded-values, null, 16px),
|
|
80
|
-
supporting-text-padding-top: if($exclude-hardcoded-values, null, 4px),
|
|
81
|
-
)
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
@return $values;
|
|
85
126
|
}
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
@use 'sass:map';
|
|
8
8
|
// go/keep-sorted end
|
|
9
9
|
// go/keep-sorted start
|
|
10
|
-
@use '../../motion/animation';
|
|
11
10
|
@use '../../sass/shape';
|
|
12
11
|
@use '../../sass/theme';
|
|
12
|
+
@use '../../tokens';
|
|
13
13
|
@use './md-comp-outlined-field';
|
|
14
14
|
// go/keep-sorted end
|
|
15
15
|
|
|
16
|
-
$
|
|
16
|
+
$_md-sys-motion: tokens.md-sys-motion-values();
|
|
17
17
|
|
|
18
18
|
@mixin theme($tokens) {
|
|
19
19
|
$reference: md-comp-outlined-field.values();
|
|
@@ -36,11 +36,8 @@ $_animation-duration: 150ms;
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.outline {
|
|
39
|
-
border-start-start-radius: var(--_container-shape-start-start);
|
|
40
|
-
border-start-end-radius: var(--_container-shape-start-end);
|
|
41
|
-
border-end-end-radius: var(--_container-shape-end-end);
|
|
42
|
-
border-end-start-radius: var(--_container-shape-end-start);
|
|
43
39
|
border-color: var(--_outline-color);
|
|
40
|
+
border-radius: inherit;
|
|
44
41
|
color: var(--_outline-color); // Needed for Firefox HCM
|
|
45
42
|
display: flex;
|
|
46
43
|
// Allow events to target elements underneath the outline, such as icons.
|
|
@@ -80,7 +77,8 @@ $_animation-duration: 150ms;
|
|
|
80
77
|
|
|
81
78
|
&::after {
|
|
82
79
|
opacity: 0;
|
|
83
|
-
transition:
|
|
80
|
+
transition: opacity map.get($_md-sys-motion, 'duration-short3')
|
|
81
|
+
map.get($_md-sys-motion, 'easing-emphasized');
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -145,7 +143,8 @@ $_animation-duration: 150ms;
|
|
|
145
143
|
border-bottom: none;
|
|
146
144
|
bottom: auto;
|
|
147
145
|
transform: scaleX(1);
|
|
148
|
-
transition:
|
|
146
|
+
transition: transform map.get($_md-sys-motion, 'duration-short3')
|
|
147
|
+
map.get($_md-sys-motion, 'easing-emphasized');
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
// Note: no need to do any RTL flipping here. If RTLCSS flips this, it's also
|
|
@@ -173,15 +172,18 @@ $_animation-duration: 150ms;
|
|
|
173
172
|
|
|
174
173
|
.outline-panel-active {
|
|
175
174
|
opacity: 0;
|
|
176
|
-
transition:
|
|
175
|
+
transition: opacity map.get($_md-sys-motion, 'duration-short3')
|
|
176
|
+
map.get($_md-sys-motion, 'easing-emphasized');
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
.focused .outline-panel-active {
|
|
180
180
|
opacity: 1;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.label
|
|
184
|
-
|
|
183
|
+
.outline-label {
|
|
184
|
+
display: flex;
|
|
185
|
+
max-width: 100%;
|
|
186
|
+
// Center the floating label within the outline stroke
|
|
185
187
|
transform: translateY(calc(-100% + var(--_label-text-padding-bottom)));
|
|
186
188
|
}
|
|
187
189
|
|
package/field/lib/_shared.scss
CHANGED
|
@@ -18,41 +18,45 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.field {
|
|
21
|
-
display:
|
|
21
|
+
display: flex;
|
|
22
22
|
flex: 1;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
// Allow the use of block/inline reflexive RTL properties without impacting
|
|
25
25
|
// structure when languages change.
|
|
26
26
|
writing-mode: horizontal-tb;
|
|
27
|
+
max-width: 100%; // Do not allow field to grow beyond explicitly set width
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// A separate wrapper is needed around the container for the outline, whose
|
|
31
|
+
// floating label needs overflow: visible. The container itself needs
|
|
32
|
+
// overflow: hidden for resizability.
|
|
33
|
+
.container-overflow {
|
|
34
|
+
border-start-start-radius: var(--_container-shape-start-start);
|
|
35
|
+
border-start-end-radius: var(--_container-shape-start-end);
|
|
36
|
+
border-end-end-radius: var(--_container-shape-end-end);
|
|
37
|
+
border-end-start-radius: var(--_container-shape-end-start);
|
|
38
|
+
display: flex;
|
|
39
|
+
position: relative;
|
|
27
40
|
}
|
|
28
41
|
|
|
29
42
|
.container {
|
|
30
43
|
align-items: center;
|
|
31
|
-
|
|
44
|
+
border-radius: inherit;
|
|
32
45
|
display: flex;
|
|
33
46
|
flex: 1;
|
|
34
|
-
|
|
47
|
+
min-width: min-content;
|
|
48
|
+
overflow: hidden;
|
|
35
49
|
padding-top: var(--_container-padding-vertical);
|
|
36
50
|
padding-bottom: var(--_container-padding-vertical);
|
|
37
51
|
position: relative;
|
|
38
52
|
}
|
|
39
53
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// TODO(b/239188049): remove when layout tokens are ready
|
|
45
|
-
.with-start .start,
|
|
46
|
-
.with-end .end {
|
|
47
|
-
min-width: 48px;
|
|
54
|
+
.resizable .container {
|
|
55
|
+
resize: both;
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
.
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.with-end .end {
|
|
55
|
-
margin-inline-start: 4px;
|
|
58
|
+
.disabled {
|
|
59
|
+
pointer-events: none;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
@include content.styles;
|
package/field/lib/field.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class Field extends LitElement {
|
|
|
13
13
|
focused: boolean;
|
|
14
14
|
label?: string;
|
|
15
15
|
populated: boolean;
|
|
16
|
+
resizable: boolean;
|
|
16
17
|
required: boolean;
|
|
17
18
|
/**
|
|
18
19
|
* Whether or not the field has leading content.
|
|
@@ -23,7 +24,7 @@ export declare class Field extends LitElement {
|
|
|
23
24
|
*/
|
|
24
25
|
hasEnd: boolean;
|
|
25
26
|
private isAnimating;
|
|
26
|
-
private
|
|
27
|
+
private labelAnimation?;
|
|
27
28
|
private readonly floatingLabelEl;
|
|
28
29
|
private readonly restingLabelEl;
|
|
29
30
|
protected update(props: PropertyValues<Field>): void;
|