material-inspired-component-library 7.0.2 → 8.0.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/CLAUDE.md +42 -0
- package/README.md +6 -0
- package/components/accordion/README.md +6 -3
- package/components/button/index.scss +10 -6
- package/components/card/README.md +4 -0
- package/components/card/index.scss +159 -150
- package/components/checkbox/index.scss +11 -6
- package/components/datepicker/index.ts +9 -9
- package/components/dialog/index.scss +5 -6
- package/components/iconbutton/index.scss +10 -6
- package/components/list/README.md +191 -32
- package/components/list/index.scss +256 -190
- package/components/list/index.ts +100 -100
- package/components/menu/README.md +199 -10
- package/components/menu/index.scss +224 -47
- package/components/menu/index.ts +74 -37
- package/components/navigationrail/index.scss +75 -69
- package/components/radio/index.scss +11 -6
- package/components/select/README.md +42 -5
- package/components/select/index.scss +39 -79
- package/components/stepper/index.scss +1 -5
- package/components/textfield/index.scss +1 -1
- package/components/textfield/index.ts +2 -2
- package/dist/alert.css +1 -1
- package/dist/appbar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/bottomsheet.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/datepicker.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/foundations.css +1 -1
- package/dist/iconbutton.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/select.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/snackbar.css +1 -1
- package/dist/stepper.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/textfield.css +1 -1
- package/dist/timepicker.css +1 -1
- package/docs/accordion.html +24 -24
- package/docs/bottomsheet.html +1 -4
- package/docs/dialog.html +1 -1
- package/docs/index.html +4 -4
- package/docs/list.html +38 -22
- package/docs/menu.html +246 -41
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/select.html +68 -19
- package/docs/shapes.html +85 -0
- package/foundations/index.scss +0 -1
- package/micl.ts +6 -1
- package/package.json +3 -3
- package/styles/README.md +4 -4
- package/styles/shapes.scss +81 -0
- package/styles/statelayer.scss +10 -0
package/components/list/index.ts
CHANGED
|
@@ -21,118 +21,118 @@
|
|
|
21
21
|
|
|
22
22
|
export const listSelector = '.micl-list';
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const isSelected = (item: HTMLElement | null): boolean => !!item && item.matches(':has(input[type=checkbox]:checked)');
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
keydown: (event: Event): void =>
|
|
31
|
-
{
|
|
32
|
-
if (
|
|
33
|
-
!(event instanceof KeyboardEvent)
|
|
34
|
-
|| !(event.target instanceof Element)
|
|
35
|
-
|| !event.target.matches('.micl-list-item-one,.micl-list-item-two,.micl-list-item-three')
|
|
36
|
-
) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const parent = (event.target as Element).parentElement;
|
|
40
|
-
if (!parent) return;
|
|
24
|
+
const isDisabled = (item?: HTMLElement | null) => item?.classList.contains('micl-list-item--disabled');
|
|
25
|
+
const isSelectable = (item?: HTMLElement | null) => item?.matches(':has(input[type=checkbox])');
|
|
26
|
+
const isSelected = (item?: HTMLElement | null) => item?.matches(':has(input[type=checkbox]:checked)');
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
&& !isDisabled(child)
|
|
55
|
-
&& (child.role !== 'separator')
|
|
56
|
-
) ? child : null;
|
|
57
|
-
}).filter(item => !!item);
|
|
58
|
-
}
|
|
59
|
-
if (items.length === 0) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
28
|
+
export default
|
|
29
|
+
{
|
|
30
|
+
keydown(event: KeyboardEvent | Event): void
|
|
31
|
+
{
|
|
32
|
+
const target = event.target as HTMLElement;
|
|
33
|
+
|
|
34
|
+
if (
|
|
35
|
+
!(event instanceof KeyboardEvent)
|
|
36
|
+
|| !target?.matches('.micl-list-item-one,.micl-list-item-two,.micl-list-item-three')
|
|
37
|
+
) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
62
40
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const currentIndex = items.indexOf(currentItem);
|
|
41
|
+
const parent = target.parentElement;
|
|
42
|
+
if (!parent) return;
|
|
66
43
|
|
|
67
|
-
|
|
44
|
+
const isAccordion = parent instanceof HTMLDetailsElement;
|
|
45
|
+
let items: HTMLElement[] = [];
|
|
68
46
|
|
|
69
|
-
|
|
47
|
+
if (isAccordion) {
|
|
48
|
+
items = Array.from(parent.parentElement?.children || [])
|
|
49
|
+
.map(details => details.querySelector(':scope > summary') as HTMLElement)
|
|
50
|
+
.filter(Boolean);
|
|
51
|
+
}
|
|
52
|
+
else if (['UL', 'OL'].includes(parent.tagName)) {
|
|
53
|
+
items = Array.from(parent.children).filter(child =>
|
|
54
|
+
child instanceof HTMLLIElement && child.getAttribute('role') !== 'separator'
|
|
55
|
+
) as HTMLElement[];
|
|
56
|
+
}
|
|
70
57
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
items = items.filter(item => !isDisabled(item));
|
|
59
|
+
if (!items.length) return;
|
|
60
|
+
|
|
61
|
+
const currentIndex = items.indexOf(target);
|
|
62
|
+
if (currentIndex === -1) return;
|
|
63
|
+
|
|
64
|
+
let nextIndex = currentIndex;
|
|
65
|
+
|
|
66
|
+
switch (event.key) {
|
|
67
|
+
case 'ArrowDown':
|
|
68
|
+
event.preventDefault(); // prevent page scrolling
|
|
69
|
+
nextIndex = (currentIndex + 1) % items.length;
|
|
70
|
+
break;
|
|
71
|
+
case 'ArrowUp':
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
nextIndex = (currentIndex - 1 + items.length) % items.length;
|
|
74
|
+
break;
|
|
75
|
+
case 'Tab':
|
|
76
|
+
if (!isAccordion) {
|
|
77
|
+
const selectedIndex = items.findIndex(isSelected);
|
|
78
|
+
nextIndex = selectedIndex === -1 ? 0 : selectedIndex;
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case ' ':
|
|
82
|
+
case 'Enter':
|
|
83
|
+
if (isAccordion) break;
|
|
84
|
+
if (event.key === ' ') {
|
|
84
85
|
event.preventDefault();
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
break;
|
|
103
|
-
default:
|
|
104
|
-
}
|
|
86
|
+
}
|
|
87
|
+
const el = target.querySelector<HTMLElement>(
|
|
88
|
+
'input[type=checkbox], a[href], button'
|
|
89
|
+
);
|
|
90
|
+
if (el instanceof HTMLInputElement) {
|
|
91
|
+
el.checked = !el.checked;
|
|
92
|
+
el.dispatchEvent(new Event('change', {
|
|
93
|
+
bubbles : true,
|
|
94
|
+
cancelable: true
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
el?.click();
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
default:
|
|
102
|
+
}
|
|
105
103
|
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
if (nextIndex !== currentIndex) {
|
|
105
|
+
if (!isAccordion) {
|
|
106
|
+
target.setAttribute('tabindex', '-1');
|
|
108
107
|
items[nextIndex].setAttribute('tabindex', '0');
|
|
109
|
-
items[nextIndex].focus();
|
|
110
108
|
}
|
|
111
|
-
|
|
109
|
+
items[nextIndex].focus();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
initialize(element: HTMLElement): void
|
|
114
|
+
{
|
|
115
|
+
if (element.dataset.miclinitialized) return;
|
|
116
|
+
element.dataset.miclinitialized = '1';
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
element.querySelectorAll<HTMLElement>(
|
|
119
|
+
':scope > details > summary.micl-list-item--disabled'
|
|
120
|
+
).forEach(summary => summary.setAttribute('tabindex', '-1'));
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
+
if (!element.querySelector('li[tabindex="0"]')) return;
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
))
|
|
124
|
+
element.querySelectorAll<HTMLLIElement>('li:not([role="separator"])').forEach(item =>
|
|
125
|
+
{
|
|
126
|
+
if (item.getAttribute('tabindex') !== '0') {
|
|
127
|
+
item.setAttribute('tabindex', '-1');
|
|
128
|
+
}
|
|
126
129
|
|
|
127
|
-
|
|
128
|
-
{
|
|
129
|
-
if (item.getAttribute('tabindex') !== '0') {
|
|
130
|
-
item.setAttribute('tabindex', '-1');
|
|
131
|
-
}
|
|
130
|
+
item.querySelectorAll('a, button, input').forEach(link => link.setAttribute('tabindex', '-1'));
|
|
132
131
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
132
|
+
if (isSelectable(item)) {
|
|
133
|
+
item.setAttribute('role', 'option');
|
|
134
|
+
item.parentElement?.setAttribute('role', 'listbox');
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
};
|
|
@@ -20,6 +20,8 @@ The Menu component is an extension of the [List component](../list/README.md). I
|
|
|
20
20
|
<button type="button" popovertarget="mymenu">Open Menu</button>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Adding the `micl-list-item--disabled` class to a menu item causes the item to be displayed in a disabled state.
|
|
24
|
+
|
|
23
25
|
### CSS
|
|
24
26
|
Import the styles for both the menu and list components into your project:
|
|
25
27
|
|
|
@@ -62,11 +64,11 @@ Since the Menu component is based on the **List component**, all of its list ite
|
|
|
62
64
|
</li>
|
|
63
65
|
<li class="micl-list-item-two">
|
|
64
66
|
<span class="micl-list-item__image" style="background-image:url(https://...jpg)"></span>
|
|
65
|
-
<label
|
|
67
|
+
<label class="micl-list-item__text">
|
|
66
68
|
<span class="micl-list-item__headline">Person</span>
|
|
67
69
|
<span class="micl-list-item__supporting-text">This person is an administrator</span>
|
|
70
|
+
<input type="checkbox" id="cb" class="micl-checkbox">
|
|
68
71
|
</label>
|
|
69
|
-
<input type="checkbox" id="cb" class="micl-checkbox">
|
|
70
72
|
</li>
|
|
71
73
|
</ul>
|
|
72
74
|
</nav>
|
|
@@ -113,7 +115,7 @@ A menu item may trigger opening a submenu when invoked by a button. Wrap the men
|
|
|
113
115
|
<span class="micl-list-item__headline">Item 1-1</span>
|
|
114
116
|
</span>
|
|
115
117
|
</li>
|
|
116
|
-
<li role="separator" class="micl-divider"></li>
|
|
118
|
+
<li role="separator" class="micl-divider-inset"></li>
|
|
117
119
|
<li class="micl-list-item-one">
|
|
118
120
|
<span class="micl-list-item__text">
|
|
119
121
|
<span class="micl-list-item__headline">Item 1-2</span>
|
|
@@ -131,22 +133,209 @@ A menu item may trigger opening a submenu when invoked by a button. Wrap the men
|
|
|
131
133
|
</nav>
|
|
132
134
|
```
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
**Example: A vibrant menu**
|
|
137
|
+
|
|
138
|
+
Add the `micl-menu--vibrant` class to render the menu in a high-emphasis variant.
|
|
139
|
+
|
|
140
|
+
```HTML
|
|
141
|
+
<nav id="mymenu" class="micl-menu micl-menu--vibrant" popover>
|
|
142
|
+
<ul class="micl-list">
|
|
143
|
+
<li class="micl-list-item-one" tabindex="0">
|
|
144
|
+
<span class="micl-list-item__text">
|
|
145
|
+
<span class="micl-list-item__headline">Menu item</span>
|
|
146
|
+
</span>
|
|
147
|
+
</li>
|
|
148
|
+
</ul>
|
|
149
|
+
</nav>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Example: Grouping menu items**
|
|
153
|
+
|
|
154
|
+
Menu items can be grouped by including a [Divider component](../divider/README.md) or a small gap. To create a gap between groups of menu items, bundle similar menu items in different lists.
|
|
155
|
+
|
|
156
|
+
```HTML
|
|
157
|
+
<nav id="mymenu" class="micl-menu" popover>
|
|
158
|
+
<ul class="micl-list">
|
|
159
|
+
<li role="separator" class="micl-menu__section">File</li>
|
|
160
|
+
<li class="micl-list-item-one" tabindex="0">
|
|
161
|
+
<span class="micl-list-item__text">
|
|
162
|
+
<span class="micl-list-item__headline">New</span>
|
|
163
|
+
</span>
|
|
164
|
+
</li>
|
|
165
|
+
</ul>
|
|
166
|
+
<ul class="micl-list">
|
|
167
|
+
<li role="separator" class="micl-menu__section">Edit</li>
|
|
168
|
+
<li class="micl-list-item-one">
|
|
169
|
+
<span class="micl-list-item__text">
|
|
170
|
+
<span class="micl-list-item__headline">Cut</span>
|
|
171
|
+
</span>
|
|
172
|
+
</li>
|
|
173
|
+
</ul>
|
|
174
|
+
</nav>
|
|
175
|
+
```
|
|
135
176
|
|
|
136
|
-
|
|
177
|
+
You may include an `<li>` with the `micl-menu__section` class to give the menu item group a descriptive title.
|
|
137
178
|
|
|
138
179
|
## Customizations
|
|
139
180
|
You can customize the appearance of the Menu component by overriding its global CSS variables. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child menus.
|
|
140
181
|
|
|
141
|
-
| Variable name
|
|
142
|
-
|
|
|
143
|
-
| --md-
|
|
144
|
-
| --md-
|
|
182
|
+
| Variable name | Default Value | Description |
|
|
183
|
+
| ------------------------ | ------------- | ------------------------------------ |
|
|
184
|
+
| --md-comp-menu-width-max | 320px | The maximum width allowed for a menu |
|
|
185
|
+
| --md-comp-menu-width-min | 112px | The minimum allowed width for a menu |
|
|
186
|
+
|
|
187
|
+
The Menu component supports the following CSS variables, as defined in the [Material Design 3 Expressive Menu Specification](https://m3.material.io/components/menus/specs):
|
|
188
|
+
|
|
189
|
+
| Variable name |
|
|
190
|
+
| ------------- |
|
|
191
|
+
| --md-comp-menu-container-elevation |
|
|
192
|
+
| --md-comp-menu-container-shape |
|
|
193
|
+
| --md-comp-menu-active-container-shape |
|
|
194
|
+
| --md-comp-menu-inactive-container-shape |
|
|
195
|
+
| --md-comp-menu-gap |
|
|
196
|
+
| --md-comp-menu-group-padding |
|
|
197
|
+
| --md-comp-menu-group-shape |
|
|
198
|
+
| --md-comp-menu-item-height |
|
|
199
|
+
| --md-comp-menu-item-bottom-space |
|
|
200
|
+
| --md-comp-menu-item-leading-space |
|
|
201
|
+
| --md-comp-menu-item-top-space |
|
|
202
|
+
| --md-comp-menu-item-trailing-space |
|
|
203
|
+
| --md-comp-menu-item-focus-indicator-color |
|
|
204
|
+
| --md-comp-menu-item-focus-indicator-offset |
|
|
205
|
+
| --md-comp-menu-item-focus-indicator-thickness |
|
|
206
|
+
| --md-comp-menu-item-leading-icon-size |
|
|
207
|
+
| --md-comp-menu-item-trailing-icon-size |
|
|
208
|
+
| --md-comp-menu-item-shape |
|
|
209
|
+
| --md-comp-menu-item-shape-single |
|
|
210
|
+
| --md-comp-menu-item-selected-shape |
|
|
211
|
+
| |
|
|
212
|
+
| --md-comp-menu-section-label-bottom-space |
|
|
213
|
+
| --md-comp-menu-section-label-top-space |
|
|
214
|
+
| |
|
|
215
|
+
| --md-comp-menu-standard-container-color |
|
|
216
|
+
| --md-comp-menu-standard-menu-item-container-color |
|
|
217
|
+
| --md-comp-menu-standard-menu-item-focused-label-text-color |
|
|
218
|
+
| --md-comp-menu-standard-menu-item-focused-leading-icon-color |
|
|
219
|
+
| --md-comp-menu-standard-menu-item-focused-state-layer-color |
|
|
220
|
+
| --md-comp-menu-standard-menu-item-focused-state-layer-opacity |
|
|
221
|
+
| --md-comp-menu-standard-menu-item-focused-supporting-text-color |
|
|
222
|
+
| --md-comp-menu-standard-menu-item-focused-trailing-icon-color |
|
|
223
|
+
| --md-comp-menu-standard-menu-item-focused-trailing-supporting-text-color |
|
|
224
|
+
| --md-comp-menu-standard-menu-item-hovered-label-text-color |
|
|
225
|
+
| --md-comp-menu-standard-menu-item-hovered-leading-icon-color |
|
|
226
|
+
| --md-comp-menu-standard-menu-item-hovered-state-layer-color |
|
|
227
|
+
| --md-comp-menu-standard-menu-item-hovered-state-layer-opacity |
|
|
228
|
+
| --md-comp-menu-standard-menu-item-hovered-supporting-text-color |
|
|
229
|
+
| --md-comp-menu-standard-menu-item-hovered-trailing-icon-color |
|
|
230
|
+
| --md-comp-menu-standard-menu-item-hovered-trailing-supporting-text-color |
|
|
231
|
+
| --md-comp-menu-standard-menu-item-pressed-label-text-color |
|
|
232
|
+
| --md-comp-menu-standard-menu-item-pressed-leading-icon-color |
|
|
233
|
+
| --md-comp-menu-standard-menu-item-pressed-state-layer-color |
|
|
234
|
+
| --md-comp-menu-standard-menu-item-pressed-state-layer-opacity |
|
|
235
|
+
| --md-comp-menu-standard-menu-item-pressed-supporting-text-color |
|
|
236
|
+
| --md-comp-menu-standard-menu-item-pressed-trailing-icon-color |
|
|
237
|
+
| --md-comp-menu-standard-menu-item-pressed-trailing-supporting-text-color |
|
|
238
|
+
| --md-comp-menu-standard-menu-item-label-text-color |
|
|
239
|
+
| --md-comp-menu-standard-menu-item-leading-icon-color |
|
|
240
|
+
| --md-comp-menu-standard-menu-item-supporting-text-color |
|
|
241
|
+
| --md-comp-menu-standard-menu-item-trailing-icon-color |
|
|
242
|
+
| --md-comp-menu-standard-menu-item-trailing-supporting-text-color |
|
|
243
|
+
| --md-comp-menu-standard-section-label-text-color |
|
|
244
|
+
| |
|
|
245
|
+
| --md-comp-menu-vibrant-container-color |
|
|
246
|
+
| --md-comp-menu-vibrant-menu-item-container-color |
|
|
247
|
+
| --md-comp-menu-vibrant-menu-item-focused-label-text-color |
|
|
248
|
+
| --md-comp-menu-vibrant-menu-item-focused-leading-icon-color |
|
|
249
|
+
| --md-comp-menu-vibrant-menu-item-focused-state-layer-color |
|
|
250
|
+
| --md-comp-menu-vibrant-menu-item-focused-state-layer-opacity |
|
|
251
|
+
| --md-comp-menu-vibrant-menu-item-focused-supporting-text-color |
|
|
252
|
+
| --md-comp-menu-vibrant-menu-item-focused-trailing-icon-color |
|
|
253
|
+
| --md-comp-menu-vibrant-menu-item-focused-trailing-supporting-text-color |
|
|
254
|
+
| --md-comp-menu-vibrant-menu-item-hovered-label-text-color |
|
|
255
|
+
| --md-comp-menu-vibrant-menu-item-hovered-leading-icon-color |
|
|
256
|
+
| --md-comp-menu-vibrant-menu-item-hovered-state-layer-color |
|
|
257
|
+
| --md-comp-menu-vibrant-menu-item-hovered-state-layer-opacity |
|
|
258
|
+
| --md-comp-menu-vibrant-menu-item-hovered-supporting-text-color |
|
|
259
|
+
| --md-comp-menu-vibrant-menu-item-hovered-trailing-icon-color |
|
|
260
|
+
| --md-comp-menu-vibrant-menu-item-hovered-trailing-supporting-text-color |
|
|
261
|
+
| --md-comp-menu-vibrant-menu-item-pressed-label-text-color |
|
|
262
|
+
| --md-comp-menu-vibrant-menu-item-pressed-leading-icon-color |
|
|
263
|
+
| --md-comp-menu-vibrant-menu-item-pressed-state-layer-color |
|
|
264
|
+
| --md-comp-menu-vibrant-menu-item-pressed-state-layer-opacity |
|
|
265
|
+
| --md-comp-menu-vibrant-menu-item-pressed-supporting-text-color |
|
|
266
|
+
| --md-comp-menu-vibrant-menu-item-pressed-trailing-icon-color |
|
|
267
|
+
| --md-comp-menu-vibrant-menu-item-pressed-trailing-supporting-text-color |
|
|
268
|
+
| --md-comp-menu-vibrant-menu-item-label-text-color |
|
|
269
|
+
| --md-comp-menu-vibrant-menu-item-leading-icon-color |
|
|
270
|
+
| --md-comp-menu-vibrant-menu-item-supporting-text-color |
|
|
271
|
+
| --md-comp-menu-vibrant-menu-item-trailing-icon-color |
|
|
272
|
+
| --md-comp-menu-vibrant-menu-item-trailing-supporting-text-color |
|
|
273
|
+
| --md-comp-menu-vibrant-section-label-text-color |
|
|
274
|
+
| |
|
|
275
|
+
| --md-comp-menu-standard-menu-item-selected-container-color |
|
|
276
|
+
| --md-comp-menu-standard-menu-item-selected-label-text-color |
|
|
277
|
+
| --md-comp-menu-standard-menu-item-selected-leading-icon-color |
|
|
278
|
+
| --md-comp-menu-standard-menu-item-selected-supporting-text-color |
|
|
279
|
+
| --md-comp-menu-standard-menu-item-selected-trailing-icon-color |
|
|
280
|
+
| --md-comp-menu-standard-menu-item-selected-trailing-supporting-text-color |
|
|
281
|
+
| |
|
|
282
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-container-color |
|
|
283
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-container-opacity |
|
|
284
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-label-text-color |
|
|
285
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-label-text-opacity |
|
|
286
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-leading-icon-color |
|
|
287
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-leading-icon-opacity |
|
|
288
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-trailing-icon-color |
|
|
289
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-trailing-icon-opacity |
|
|
290
|
+
| --md-comp-menu-standard-menu-item-selected-disabled-trailing-supporting-text-color |
|
|
291
|
+
| --md-comp-menu-standard-menu-item-selected-focused-label-text-color |
|
|
292
|
+
| --md-comp-menu-standard-menu-item-selected-focused-leading-icon-color |
|
|
293
|
+
| --md-comp-menu-standard-menu-item-selected-focused-state-layer-color |
|
|
294
|
+
| --md-comp-menu-standard-menu-item-selected-focused-state-layer-opacity |
|
|
295
|
+
| --md-comp-menu-standard-menu-item-selected-focused-supporting-text-color |
|
|
296
|
+
| --md-comp-menu-standard-menu-item-selected-focused-trailing-icon-color |
|
|
297
|
+
| --md-comp-menu-standard-menu-item-selected-focused-trailing-supporting-text-color |
|
|
298
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-label-text-color |
|
|
299
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-leading-icon-color |
|
|
300
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-state-layer-color |
|
|
301
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-state-layer-opacity |
|
|
302
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-supporting-text-color |
|
|
303
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-trailing-icon-color |
|
|
304
|
+
| --md-comp-menu-standard-menu-item-selected-hovered-trailing-supporting-text-color |
|
|
305
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-label-text-color |
|
|
306
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-leading-icon-color |
|
|
307
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-state-layer-color |
|
|
308
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-state-layer-opacity |
|
|
309
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-supporting-text-color |
|
|
310
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-trailing-icon-color |
|
|
311
|
+
| --md-comp-menu-standard-menu-item-selected-pressed-trailing-supporting-text-color |
|
|
312
|
+
| |
|
|
313
|
+
| --md-comp-menu-vibrant-menu-item-selected-container-color |
|
|
314
|
+
| --md-comp-menu-vibrant-menu-item-selected-label-text-color |
|
|
315
|
+
| --md-comp-menu-vibrant-menu-item-selected-leading-icon-color |
|
|
316
|
+
| --md-comp-menu-vibrant-menu-item-selected-supporting-text-color |
|
|
317
|
+
| --md-comp-menu-vibrant-menu-item-selected-trailing-icon-color |
|
|
318
|
+
| --md-comp-menu-vibrant-menu-item-selected-trailing-supporting-text-color |
|
|
319
|
+
| |
|
|
320
|
+
| --md-comp-menu-vibrant-menu-item-selected-disabled-label-text-opacity |
|
|
321
|
+
| --md-comp-menu-vibrant-menu-item-selected-disabled-leading-icon-opacity |
|
|
322
|
+
| --md-comp-menu-vibrant-menu-item-selected-disabled-supporting-text-opacity |
|
|
323
|
+
| --md-comp-menu-vibrant-menu-item-selected-disabled-trailing-icon-opacity |
|
|
324
|
+
| --md-comp-menu-vibrant-menu-item-selected-disabled-trailing-supporting-text-opacity |
|
|
325
|
+
| --md-comp-menu-vibrant-menu-item-selected-focused-state-layer-color |
|
|
326
|
+
| --md-comp-menu-vibrant-menu-item-selected-focused-state-layer-opacity |
|
|
327
|
+
| --md-comp-menu-vibrant-menu-item-selected-focused-label-text-color |
|
|
328
|
+
| --md-comp-menu-vibrant-menu-item-selected-hovered-state-layer-color |
|
|
329
|
+
| --md-comp-menu-vibrant-menu-item-selected-hovered-state-layer-opacity |
|
|
330
|
+
| --md-comp-menu-vibrant-menu-item-selected-hovered-label-text-color |
|
|
331
|
+
| --md-comp-menu-vibrant-menu-item-selected-pressed-state-layer-color |
|
|
332
|
+
| --md-comp-menu-vibrant-menu-item-selected-pressed-state-layer-opacity |
|
|
333
|
+
| --md-comp-menu-vibrant-menu-item-selected-pressed-label-text-color |
|
|
145
334
|
|
|
146
335
|
**Example: Changing the maximum width**
|
|
147
336
|
|
|
148
337
|
```HTML
|
|
149
|
-
<div style="--md-
|
|
338
|
+
<div style="--md-comp-menu-width-max:360px">
|
|
150
339
|
<nav id="mymenu" class="micl-menu" popover>
|
|
151
340
|
<ul class="micl-list">
|
|
152
341
|
<li class="micl-list-item-one" tabindex="0">
|