@material/web 1.0.1 → 1.0.2-nightly.6a1fb38.0
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/all.d.ts +2 -0
- package/all.js +2 -0
- package/all.js.map +1 -1
- package/button/elevated-button.js +5 -1
- package/button/elevated-button.js.map +1 -1
- package/button/internal/_elevation.scss +32 -32
- package/button/internal/_icon.scss +22 -23
- package/button/internal/_outlined-button.scss +21 -19
- package/button/internal/_shared.scss +84 -77
- package/button/internal/_touch-target.scss +4 -0
- package/button/internal/button.d.ts +7 -11
- package/button/internal/button.js +52 -38
- package/button/internal/button.js.map +1 -1
- package/button/internal/elevated-button.d.ts +1 -1
- package/button/internal/elevated-button.js +1 -1
- package/button/internal/elevated-button.js.map +1 -1
- package/button/internal/filled-button.d.ts +1 -1
- package/button/internal/filled-button.js +1 -1
- package/button/internal/filled-button.js.map +1 -1
- package/button/internal/filled-tonal-button.d.ts +1 -1
- package/button/internal/filled-tonal-button.js +1 -1
- package/button/internal/filled-tonal-button.js.map +1 -1
- package/button/internal/outlined-button.d.ts +1 -1
- package/button/internal/outlined-button.js +2 -2
- package/button/internal/outlined-button.js.map +1 -1
- package/button/internal/outlined-styles.css.js +1 -1
- package/button/internal/outlined-styles.css.js.map +1 -1
- package/button/internal/shared-elevation-styles.css.js +1 -1
- package/button/internal/shared-elevation-styles.css.js.map +1 -1
- package/button/internal/shared-styles.css.js +1 -1
- package/button/internal/shared-styles.css.js.map +1 -1
- package/checkbox/internal/checkbox.d.ts +16 -23
- package/checkbox/internal/checkbox.js +38 -52
- package/checkbox/internal/checkbox.js.map +1 -1
- package/chips/filter-chip.js +5 -1
- package/chips/filter-chip.js.map +1 -1
- package/chips/harness.js.map +1 -1
- package/chips/input-chip.js +6 -1
- package/chips/input-chip.js.map +1 -1
- package/chips/internal/assist-chip.js +8 -4
- package/chips/internal/assist-chip.js.map +1 -1
- package/chips/internal/chip-set.js +6 -4
- package/chips/internal/chip-set.js.map +1 -1
- package/chips/internal/chip.d.ts +3 -0
- package/chips/internal/chip.js +7 -5
- package/chips/internal/chip.js.map +1 -1
- package/chips/internal/filter-chip.d.ts +2 -0
- package/chips/internal/filter-chip.js +11 -5
- package/chips/internal/filter-chip.js.map +1 -1
- package/chips/internal/input-chip.d.ts +2 -0
- package/chips/internal/input-chip.js +10 -4
- package/chips/internal/input-chip.js.map +1 -1
- package/chips/internal/multi-action-chip.js.map +1 -1
- package/chips/internal/trailing-icons.d.ts +1 -1
- package/chips/internal/trailing-icons.js +6 -5
- package/chips/internal/trailing-icons.js.map +1 -1
- package/common.d.ts +2 -0
- package/common.js +2 -0
- package/common.js.map +1 -1
- package/dialog/harness.js +1 -2
- package/dialog/harness.js.map +1 -1
- package/dialog/internal/_dialog.scss +1 -1
- package/dialog/internal/animations.js +14 -12
- package/dialog/internal/animations.js.map +1 -1
- package/dialog/internal/dialog-styles.css.js +1 -1
- package/dialog/internal/dialog-styles.css.js.map +1 -1
- package/dialog/internal/dialog.d.ts +6 -6
- package/dialog/internal/dialog.js +24 -24
- package/dialog/internal/dialog.js.map +1 -1
- package/fab/harness.js.map +1 -1
- package/fab/internal/fab.js.map +1 -1
- package/fab/internal/shared.js +10 -11
- package/fab/internal/shared.js.map +1 -1
- package/field/harness.js.map +1 -1
- package/field/internal/_content.scss +185 -174
- package/field/internal/_filled-field.scss +147 -136
- package/field/internal/_label.scss +83 -72
- package/field/internal/_outlined-field.scss +276 -262
- package/field/internal/_supporting-text.scss +53 -42
- package/field/internal/field.js +26 -22
- package/field/internal/field.js.map +1 -1
- package/field/internal/filled-styles.css.js +1 -1
- package/field/internal/filled-styles.css.js.map +1 -1
- package/field/internal/outlined-styles.css.js +1 -1
- package/field/internal/outlined-styles.css.js.map +1 -1
- package/field/internal/shared-styles.css.js +1 -1
- package/field/internal/shared-styles.css.js.map +1 -1
- package/focus/internal/focus-ring.d.ts +2 -0
- package/focus/internal/focus-ring.js +3 -3
- package/focus/internal/focus-ring.js.map +1 -1
- package/icon/internal/_icon.scss +7 -4
- package/icon/internal/icon-styles.css.js +1 -1
- package/icon/internal/icon-styles.css.js.map +1 -1
- package/iconbutton/internal/icon-button.d.ts +9 -4
- package/iconbutton/internal/icon-button.js +35 -22
- package/iconbutton/internal/icon-button.js.map +1 -1
- package/internal/aria/aria.d.ts +4 -26
- package/internal/aria/aria.js +10 -28
- package/internal/aria/aria.js.map +1 -1
- package/internal/aria/delegate.js +2 -2
- package/internal/aria/delegate.js.map +1 -1
- package/internal/controller/attachable-controller.js +3 -5
- package/internal/controller/attachable-controller.js.map +1 -1
- package/internal/controller/form-submitter.d.ts +3 -5
- package/internal/controller/form-submitter.js +5 -7
- package/internal/controller/form-submitter.js.map +1 -1
- package/internal/controller/is-rtl.js +2 -2
- package/internal/controller/is-rtl.js.map +1 -1
- package/internal/controller/string-converter.js +1 -1
- package/internal/controller/string-converter.js.map +1 -1
- package/internal/motion/animation.js.map +1 -1
- package/labs/behaviors/element-internals.d.ts +45 -0
- package/labs/behaviors/element-internals.js +50 -0
- package/labs/behaviors/element-internals.js.map +1 -0
- package/labs/behaviors/focusable.d.ts +39 -0
- package/labs/behaviors/focusable.js +82 -0
- package/labs/behaviors/focusable.js.map +1 -0
- package/labs/behaviors/form-associated.d.ts +199 -0
- package/labs/behaviors/form-associated.js +155 -0
- package/labs/behaviors/form-associated.js.map +1 -0
- package/labs/behaviors/mixin.d.ts +54 -0
- package/labs/behaviors/mixin.js +7 -0
- package/labs/behaviors/mixin.js.map +1 -0
- package/labs/card/_elevated-card.scss +6 -0
- package/labs/card/_filled-card.scss +6 -0
- package/labs/card/_outlined-card.scss +6 -0
- package/labs/card/elevated-card.d.ts +18 -0
- package/labs/card/elevated-card.js +21 -0
- package/labs/card/elevated-card.js.map +1 -0
- package/labs/card/filled-card.d.ts +18 -0
- package/labs/card/filled-card.js +21 -0
- package/labs/card/filled-card.js.map +1 -0
- package/labs/card/internal/_elevated-card.scss +35 -0
- package/labs/card/internal/_filled-card.scss +35 -0
- package/labs/card/internal/_outlined-card.scss +39 -0
- package/labs/card/internal/_shared.scss +40 -0
- package/labs/card/internal/card.d.ts +13 -0
- package/labs/card/internal/card.js +20 -0
- package/labs/card/internal/card.js.map +1 -0
- package/labs/card/internal/elevated-styles.css.js +9 -0
- package/labs/card/internal/elevated-styles.css.js.map +1 -0
- package/labs/card/internal/elevated-styles.scss +10 -0
- package/labs/card/internal/filled-styles.css.js +9 -0
- package/labs/card/internal/filled-styles.css.js.map +1 -0
- package/labs/card/internal/filled-styles.scss +10 -0
- package/labs/card/internal/outlined-styles.css.js +9 -0
- package/labs/card/internal/outlined-styles.css.js.map +1 -0
- package/labs/card/internal/outlined-styles.scss +10 -0
- package/labs/card/internal/shared-styles.css.js +9 -0
- package/labs/card/internal/shared-styles.css.js.map +1 -0
- package/labs/card/internal/shared-styles.scss +10 -0
- package/labs/card/outlined-card.d.ts +18 -0
- package/labs/card/outlined-card.js +21 -0
- package/labs/card/outlined-card.js.map +1 -0
- package/labs/item/internal/item.js +8 -8
- package/labs/item/internal/item.js.map +1 -1
- package/labs/navigationbar/internal/constants.js.map +1 -1
- package/labs/navigationbar/internal/navigation-bar.d.ts +3 -0
- package/labs/navigationbar/internal/navigation-bar.js +18 -11
- package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal.d.ts +3 -0
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js +10 -3
- package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer.d.ts +3 -0
- package/labs/navigationdrawer/internal/navigation-drawer.js +8 -1
- package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
- package/labs/navigationtab/harness.js.map +1 -1
- package/labs/navigationtab/internal/navigation-tab.d.ts +6 -0
- package/labs/navigationtab/internal/navigation-tab.js +43 -27
- package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
- package/labs/navigationtab/internal/state.js.map +1 -1
- package/labs/segmentedbutton/internal/segmented-button.d.ts +3 -0
- package/labs/segmentedbutton/internal/segmented-button.js +26 -12
- package/labs/segmentedbutton/internal/segmented-button.js.map +1 -1
- package/labs/segmentedbuttonset/internal/segmented-button-set.d.ts +5 -0
- package/labs/segmentedbuttonset/internal/segmented-button-set.js +14 -9
- package/labs/segmentedbuttonset/internal/segmented-button-set.js.map +1 -1
- package/list/harness.d.ts +1 -1
- package/list/harness.js.map +1 -1
- package/list/internal/list-controller.d.ts +1 -1
- package/list/internal/list-controller.js +7 -3
- package/list/internal/list-controller.js.map +1 -1
- package/list/internal/list-navigation-helpers.js.map +1 -1
- package/list/internal/list.d.ts +2 -2
- package/list/internal/list.js +8 -6
- package/list/internal/list.js.map +1 -1
- package/list/internal/listitem/harness.d.ts +1 -1
- package/list/internal/listitem/harness.js.map +1 -1
- package/list/internal/listitem/list-item.d.ts +3 -2
- package/list/internal/listitem/list-item.js +19 -20
- package/list/internal/listitem/list-item.js.map +1 -1
- package/list/list-item.d.ts +4 -12
- package/list/list-item.js +4 -12
- package/list/list-item.js.map +1 -1
- package/menu/harness.js.map +1 -1
- package/menu/internal/_menu.scss +12 -1
- package/menu/internal/controllers/menuItemController.js +9 -4
- package/menu/internal/controllers/menuItemController.js.map +1 -1
- package/menu/internal/controllers/shared.d.ts +9 -1
- package/menu/internal/controllers/shared.js +4 -4
- package/menu/internal/controllers/shared.js.map +1 -1
- package/menu/internal/controllers/surfacePositionController.d.ts +15 -2
- package/menu/internal/controllers/surfacePositionController.js +124 -54
- package/menu/internal/controllers/surfacePositionController.js.map +1 -1
- package/menu/internal/controllers/typeaheadController.js +19 -14
- package/menu/internal/controllers/typeaheadController.js.map +1 -1
- package/menu/internal/menu-styles.css.js +1 -1
- package/menu/internal/menu-styles.css.js.map +1 -1
- package/menu/internal/menu.d.ts +43 -12
- package/menu/internal/menu.js +124 -57
- package/menu/internal/menu.js.map +1 -1
- package/menu/internal/menuitem/harness.js.map +1 -1
- package/menu/internal/menuitem/menu-item.d.ts +3 -2
- package/menu/internal/menuitem/menu-item.js +18 -19
- package/menu/internal/menuitem/menu-item.js.map +1 -1
- package/menu/internal/submenu/sub-menu.d.ts +8 -8
- package/menu/internal/submenu/sub-menu.js +31 -22
- package/menu/internal/submenu/sub-menu.js.map +1 -1
- package/menu/internal/types.js.map +1 -1
- package/package.json +1 -1
- package/progress/internal/_circular-progress.scss +2 -2
- package/progress/internal/_linear-progress.scss +1 -1
- package/progress/internal/circular-progress-styles.css.js +1 -1
- package/progress/internal/circular-progress-styles.css.js.map +1 -1
- package/progress/internal/circular-progress.js +11 -10
- package/progress/internal/circular-progress.js.map +1 -1
- package/progress/internal/linear-progress-styles.css.js +1 -1
- package/progress/internal/linear-progress-styles.css.js.map +1 -1
- package/progress/internal/linear-progress.d.ts +1 -1
- package/progress/internal/linear-progress.js +3 -3
- package/progress/internal/linear-progress.js.map +1 -1
- package/progress/internal/progress.js +4 -2
- package/progress/internal/progress.js.map +1 -1
- package/radio/internal/radio.d.ts +11 -27
- package/radio/internal/radio.js +30 -54
- package/radio/internal/radio.js.map +1 -1
- package/radio/internal/single-selection-controller.js +1 -1
- package/radio/internal/single-selection-controller.js.map +1 -1
- package/ripple/internal/ripple.js +14 -9
- package/ripple/internal/ripple.js.map +1 -1
- package/select/filled-select.js +1 -2
- package/select/filled-select.js.map +1 -1
- package/select/harness.js +1 -1
- package/select/harness.js.map +1 -1
- package/select/internal/select.d.ts +25 -34
- package/select/internal/select.js +101 -91
- package/select/internal/select.js.map +1 -1
- package/select/internal/selectoption/select-option.d.ts +8 -6
- package/select/internal/selectoption/select-option.js +23 -22
- package/select/internal/selectoption/select-option.js.map +1 -1
- package/select/internal/selectoption/selectOptionController.js +1 -1
- package/select/internal/selectoption/selectOptionController.js.map +1 -1
- package/select/outlined-select.js +1 -2
- package/select/outlined-select.js.map +1 -1
- package/slider/harness.js +5 -5
- package/slider/harness.js.map +1 -1
- package/slider/internal/slider.d.ts +16 -25
- package/slider/internal/slider.js +110 -114
- package/slider/internal/slider.js.map +1 -1
- package/switch/internal/switch.d.ts +9 -25
- package/switch/internal/switch.js +31 -57
- package/switch/internal/switch.js.map +1 -1
- package/tabs/harness.js +3 -3
- package/tabs/harness.js.map +1 -1
- package/tabs/internal/_tab.scss +27 -35
- package/tabs/internal/primary-tab.d.ts +0 -2
- package/tabs/internal/tab-styles.css.js +1 -1
- package/tabs/internal/tab-styles.css.js.map +1 -1
- package/tabs/internal/tab.d.ts +4 -5
- package/tabs/internal/tab.js +34 -22
- package/tabs/internal/tab.js.map +1 -1
- package/tabs/internal/tabs.d.ts +6 -2
- package/tabs/internal/tabs.js +18 -11
- package/tabs/internal/tabs.js.map +1 -1
- package/textfield/filled-text-field.js +1 -2
- package/textfield/filled-text-field.js.map +1 -1
- package/textfield/harness.js +3 -2
- package/textfield/harness.js.map +1 -1
- package/textfield/internal/text-field.d.ts +26 -18
- package/textfield/internal/text-field.js +81 -58
- package/textfield/internal/text-field.js.map +1 -1
- package/textfield/outlined-text-field.js +1 -2
- package/textfield/outlined-text-field.js.map +1 -1
- package/tokens/_index.scss +3 -0
- package/tokens/_md-comp-elevated-card.scss +63 -0
- package/tokens/_md-comp-filled-card.scss +63 -0
- package/tokens/_md-comp-icon.scss +2 -0
- package/tokens/_md-comp-outlined-card.scss +69 -0
- package/tokens/_md-comp-test-table.scss +1 -0
- package/internal/controller/element-internals.d.ts +0 -35
- package/internal/controller/element-internals.js +0 -24
- package/internal/controller/element-internals.js.map +0 -1
- package/select/internal/filled-forced-colors-styles.css.js +0 -9
- package/select/internal/filled-forced-colors-styles.css.js.map +0 -1
- package/select/internal/filled-forced-colors-styles.scss +0 -29
- package/select/internal/outlined-forced-colors-styles.css.js +0 -9
- package/select/internal/outlined-forced-colors-styles.css.js.map +0 -1
- package/select/internal/outlined-forced-colors-styles.scss +0 -29
- package/textfield/internal/filled-forced-colors-styles.css.js +0 -9
- package/textfield/internal/filled-forced-colors-styles.css.js.map +0 -1
- package/textfield/internal/filled-forced-colors-styles.scss +0 -29
- package/textfield/internal/outlined-forced-colors-styles.css.js +0 -9
- package/textfield/internal/outlined-forced-colors-styles.css.js.map +0 -1
- package/textfield/internal/outlined-forced-colors-styles.scss +0 -29
- /package/{select/internal/filled-forced-colors-styles.css.d.ts → labs/card/internal/elevated-styles.css.d.ts} +0 -0
- /package/{select/internal/outlined-forced-colors-styles.css.d.ts → labs/card/internal/filled-styles.css.d.ts} +0 -0
- /package/{textfield/internal/filled-forced-colors-styles.css.d.ts → labs/card/internal/outlined-styles.css.d.ts} +0 -0
- /package/{textfield/internal/outlined-forced-colors-styles.css.d.ts → labs/card/internal/shared-styles.css.d.ts} +0 -0
|
@@ -43,174 +43,185 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
|
|
43
43
|
@mixin styles() {
|
|
44
44
|
$tokens: tokens.md-comp-filled-field-values();
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
--
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
--
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
@layer styles {
|
|
47
|
+
:host {
|
|
48
|
+
@each $token, $value in $tokens {
|
|
49
|
+
@if $token == 'container-shape' {
|
|
50
|
+
// Support logical shape properties. Filled field has a default oblong
|
|
51
|
+
// shape, which is why the fallback value is unique per corner.
|
|
52
|
+
--_container-shape-start-start: var(
|
|
53
|
+
--md-filled-field-container-shape-start-start,
|
|
54
|
+
var(--md-filled-field-container-shape, #{list.nth($value, 1)})
|
|
55
|
+
);
|
|
56
|
+
--_container-shape-start-end: var(
|
|
57
|
+
--md-filled-field-container-shape-start-end,
|
|
58
|
+
var(--md-filled-field-container-shape, #{list.nth($value, 2)})
|
|
59
|
+
);
|
|
60
|
+
--_container-shape-end-end: var(
|
|
61
|
+
--md-filled-field-container-shape-end-end,
|
|
62
|
+
var(--md-filled-field-container-shape, #{list.nth($value, 3)})
|
|
63
|
+
);
|
|
64
|
+
--_container-shape-end-start: var(
|
|
65
|
+
--md-filled-field-container-shape-end-start,
|
|
66
|
+
var(--md-filled-field-container-shape, #{list.nth($value, 4)})
|
|
67
|
+
);
|
|
68
|
+
} @else {
|
|
69
|
+
--_#{$token}: var(--md-filled-field-#{$token}, #{$value});
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
.background,
|
|
75
|
+
.state-layer {
|
|
76
|
+
border-radius: inherit;
|
|
77
|
+
inset: 0;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
position: absolute;
|
|
80
|
+
}
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
.background {
|
|
83
|
+
background: var(--_container-color);
|
|
84
|
+
}
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
.state-layer {
|
|
87
|
+
visibility: hidden;
|
|
88
|
+
}
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
.field:not(.disabled):hover .state-layer {
|
|
91
|
+
visibility: visible;
|
|
92
|
+
}
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
.label.floating {
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: var(--_with-label-top-space);
|
|
97
|
+
}
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
.field:not(.with-start) .label-wrapper {
|
|
100
|
+
margin-inline-start: var(--_leading-space);
|
|
101
|
+
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
.field:not(.with-end) .label-wrapper {
|
|
104
|
+
margin-inline-end: var(--_trailing-space);
|
|
105
|
+
}
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
inset: auto 0 0 0;
|
|
108
|
-
// Prevent click events on the indicator element since it has no width and
|
|
109
|
-
// causes bugs when handled by the foundation for updating transform-origin.
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
position: absolute;
|
|
112
|
-
width: 100%;
|
|
113
|
-
z-index: 1;
|
|
114
|
-
|
|
115
|
-
&::before,
|
|
116
|
-
&::after {
|
|
117
|
-
border-bottom: var(--_active-indicator-height) solid
|
|
118
|
-
var(--_active-indicator-color);
|
|
107
|
+
.active-indicator {
|
|
119
108
|
inset: auto 0 0 0;
|
|
120
|
-
|
|
109
|
+
// Prevent click events on the indicator element since it has no width and
|
|
110
|
+
// causes bugs when handled by the foundation for updating transform-origin.
|
|
111
|
+
pointer-events: none;
|
|
121
112
|
position: absolute;
|
|
122
113
|
width: 100%;
|
|
114
|
+
z-index: 1;
|
|
115
|
+
|
|
116
|
+
&::before,
|
|
117
|
+
&::after {
|
|
118
|
+
border-bottom: var(--_active-indicator-height) solid
|
|
119
|
+
var(--_active-indicator-color);
|
|
120
|
+
inset: auto 0 0 0;
|
|
121
|
+
content: '';
|
|
122
|
+
position: absolute;
|
|
123
|
+
width: 100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// focused indicator
|
|
127
|
+
&::after {
|
|
128
|
+
opacity: 0;
|
|
129
|
+
transition: opacity map.get($_md-sys-motion, 'duration-short3')
|
|
130
|
+
map.get($_md-sys-motion, 'easing-emphasized');
|
|
131
|
+
}
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
opacity: 0;
|
|
128
|
-
transition: opacity map.get($_md-sys-motion, 'duration-short3')
|
|
129
|
-
map.get($_md-sys-motion, 'easing-emphasized');
|
|
134
|
+
.focused .active-indicator::after {
|
|
135
|
+
opacity: 1;
|
|
130
136
|
}
|
|
131
|
-
}
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
138
|
+
.field:not(.with-start) .content ::slotted(*) {
|
|
139
|
+
padding-inline-start: var(--_leading-space);
|
|
140
|
+
}
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
.field:not(.with-end) .content ::slotted(*) {
|
|
143
|
+
padding-inline-end: var(--_trailing-space);
|
|
144
|
+
}
|
|
140
145
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
.field:not(.no-label) .content ::slotted(:not(textarea)) {
|
|
147
|
+
padding-bottom: var(--_with-label-bottom-space);
|
|
148
|
+
padding-top: calc(
|
|
149
|
+
var(--_with-label-top-space) + var(--_label-text-populated-line-height)
|
|
150
|
+
);
|
|
151
|
+
}
|
|
144
152
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
153
|
+
.field:not(.no-label) .content ::slotted(textarea) {
|
|
154
|
+
// Use margin for textareas since they will scroll over the label if not.
|
|
155
|
+
margin-bottom: var(--_with-label-bottom-space);
|
|
156
|
+
margin-top: calc(
|
|
157
|
+
var(--_with-label-top-space) + var(--_label-text-populated-line-height)
|
|
158
|
+
);
|
|
159
|
+
}
|
|
151
160
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var(--_with-label-top-space) + var(--_label-text-populated-line-height)
|
|
157
|
-
);
|
|
158
|
-
}
|
|
161
|
+
:hover .active-indicator::before {
|
|
162
|
+
border-bottom-color: var(--_hover-active-indicator-color);
|
|
163
|
+
border-bottom-width: var(--_hover-active-indicator-height);
|
|
164
|
+
}
|
|
159
165
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
// Focus is on a separate element and does not need a focus selector
|
|
167
|
+
.active-indicator::after {
|
|
168
|
+
border-bottom-color: var(--_focus-active-indicator-color);
|
|
169
|
+
border-bottom-width: var(--_focus-active-indicator-height);
|
|
170
|
+
}
|
|
164
171
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
172
|
+
:hover .state-layer {
|
|
173
|
+
background: var(--_hover-state-layer-color);
|
|
174
|
+
opacity: var(--_hover-state-layer-opacity);
|
|
175
|
+
}
|
|
170
176
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
.disabled .active-indicator::before {
|
|
178
|
+
border-bottom-color: var(--_disabled-active-indicator-color);
|
|
179
|
+
border-bottom-width: var(--_disabled-active-indicator-height);
|
|
180
|
+
opacity: var(--_disabled-active-indicator-opacity);
|
|
181
|
+
}
|
|
175
182
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
183
|
+
.disabled .background {
|
|
184
|
+
background: var(--_disabled-container-color);
|
|
185
|
+
opacity: var(--_disabled-container-opacity);
|
|
186
|
+
}
|
|
181
187
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
188
|
+
.error .active-indicator::before {
|
|
189
|
+
border-bottom-color: var(--_error-active-indicator-color);
|
|
190
|
+
}
|
|
186
191
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
.error:hover .active-indicator::before {
|
|
193
|
+
border-bottom-color: var(--_error-hover-active-indicator-color);
|
|
194
|
+
}
|
|
190
195
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
196
|
+
.error:hover .state-layer {
|
|
197
|
+
background: var(--_error-hover-state-layer-color);
|
|
198
|
+
opacity: var(--_error-hover-state-layer-opacity);
|
|
199
|
+
}
|
|
194
200
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
// Focus is on a separate element and does not need a focus selector
|
|
202
|
+
.error .active-indicator::after {
|
|
203
|
+
border-bottom-color: var(--_error-focus-active-indicator-color);
|
|
204
|
+
}
|
|
199
205
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
206
|
+
// Move the container up so that the resize handle doesn't overlap the focus
|
|
207
|
+
// indicator. Content is moved back the opposite direction.
|
|
208
|
+
.resizable .container {
|
|
209
|
+
bottom: var(--_focus-active-indicator-height);
|
|
210
|
+
// Ensures the container doesn't create an overhang that can be clicked on.
|
|
211
|
+
clip-path: inset(var(--_focus-active-indicator-height) 0 0 0);
|
|
212
|
+
}
|
|
204
213
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
bottom: var(--_focus-active-indicator-height);
|
|
209
|
-
// Ensures the container doesn't create an overhang that can be clicked on.
|
|
210
|
-
clip-path: inset(var(--_focus-active-indicator-height) 0 0 0);
|
|
214
|
+
.resizable .container > * {
|
|
215
|
+
top: var(--_focus-active-indicator-height);
|
|
216
|
+
}
|
|
211
217
|
}
|
|
212
218
|
|
|
213
|
-
|
|
214
|
-
|
|
219
|
+
@layer hcm {
|
|
220
|
+
@media (forced-colors: active) {
|
|
221
|
+
.disabled .active-indicator::before {
|
|
222
|
+
border-color: GrayText;
|
|
223
|
+
opacity: 1;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
215
226
|
}
|
|
216
227
|
}
|
|
@@ -4,91 +4,102 @@
|
|
|
4
4
|
//
|
|
5
5
|
|
|
6
6
|
@mixin styles() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
@layer styles {
|
|
8
|
+
.label {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
color: var(--_label-text-color);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
// TODO: Check with design, should there be any transition from resting to
|
|
14
|
+
// floating when there is a mismatch between ellipsis, such as opacity
|
|
15
|
+
// transition?
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
font-family: var(--_label-text-font);
|
|
20
|
+
font-size: var(--_label-text-size);
|
|
21
|
+
line-height: var(--_label-text-line-height);
|
|
22
|
+
font-weight: var(--_label-text-weight);
|
|
23
|
+
width: min-content;
|
|
24
|
+
}
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
.label-wrapper {
|
|
27
|
+
inset: 0;
|
|
28
|
+
// The resting label at 100% height can block pointer events to the content
|
|
29
|
+
// if it's very long and spans the full width of the field. Additionally,
|
|
30
|
+
// selecting the label's text doesn't present a good UX, since the user
|
|
31
|
+
// selection should be re-focused to another element (such as the input)
|
|
32
|
+
// upon focusing. Finally, since the actual label elements are swapped, it
|
|
33
|
+
// is not easy to maintain the user's label text selection.
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
position: absolute;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
.label.resting {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: var(--_top-space);
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
.label.floating {
|
|
44
|
+
font-size: var(--_label-text-populated-size);
|
|
45
|
+
line-height: var(--_label-text-populated-line-height);
|
|
46
|
+
transform-origin: top left;
|
|
47
|
+
}
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
.label.hidden {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
.no-label .label {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
// Labels need start/end padding when there isn't start/end content so they
|
|
58
|
+
// don't sit on the edge of the field. We use a wrapper element around the
|
|
59
|
+
// labels so as not to affect the dimensions used in the label keyframes.
|
|
60
|
+
.label-wrapper {
|
|
61
|
+
inset: 0;
|
|
62
|
+
position: absolute;
|
|
63
|
+
// Don't let setting text-align on the field change the label's alignment.
|
|
64
|
+
// It should only impact content text.
|
|
65
|
+
text-align: initial;
|
|
66
|
+
}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
:hover .label {
|
|
69
|
+
color: var(--_hover-label-text-color);
|
|
70
|
+
}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
.focused .label {
|
|
73
|
+
color: var(--_focus-label-text-color);
|
|
74
|
+
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
.disabled .label {
|
|
77
|
+
color: var(--_disabled-label-text-color);
|
|
78
|
+
}
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
.disabled .label:not(.hidden) {
|
|
81
|
+
opacity: var(--_disabled-label-text-opacity);
|
|
82
|
+
}
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
.error .label {
|
|
85
|
+
color: var(--_error-label-text-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.error:hover .label {
|
|
89
|
+
color: var(--_error-hover-label-text-color);
|
|
90
|
+
}
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
.error.focused .label {
|
|
93
|
+
color: var(--_error-focus-label-text-color);
|
|
94
|
+
}
|
|
89
95
|
}
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
@layer hcm {
|
|
98
|
+
@media (forced-colors: active) {
|
|
99
|
+
.disabled .label:not(.hidden) {
|
|
100
|
+
color: GrayText;
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
93
104
|
}
|
|
94
105
|
}
|