@shortfuse/materialdesignweb 0.4.0 → 0.5.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/.browserslistrc +2 -1
- package/.eslintrc.json +59 -8
- package/.stylelintrc.json +94 -49
- package/CHANGELOG.md +12 -0
- package/README.md +1 -3
- package/adapters/datatable/column.js +27 -54
- package/adapters/datatable/index.js +69 -81
- package/adapters/dom/index.js +32 -47
- package/adapters/search/index.js +107 -133
- package/components/appbar/_spec.scss +77 -137
- package/components/banner/_spec.scss +28 -63
- package/components/bottomnav/_spec.scss +46 -54
- package/components/bottomnav/index.js +15 -20
- package/components/bottomnav/item.js +4 -5
- package/components/button/README.md +1 -1
- package/components/button/_spec.scss +43 -42
- package/components/button/_theme.scss +27 -50
- package/components/card/_spec.scss +61 -69
- package/components/chip/_spec.scss +21 -44
- package/components/chip/_theme.scss +79 -151
- package/components/chip/index.js +6 -4
- package/components/datatable/_spec.scss +36 -99
- package/components/datatable/_theme.scss +98 -124
- package/components/datatable/cell.js +1 -2
- package/components/datatable/columnheader.js +1 -2
- package/components/datatable/index.js +33 -47
- package/components/datatable/row.js +4 -5
- package/components/dialog/_spec.scss +53 -63
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +62 -88
- package/components/divider/_spec.scss +6 -8
- package/components/elevation/_spec.scss +1 -1
- package/components/fab/_spec.scss +30 -42
- package/components/fab/index.js +4 -8
- package/components/grid/_spec.scss +68 -211
- package/components/layout/_mixins.scss +0 -22
- package/components/layout/_spec.scss +267 -363
- package/components/layout/_theme.scss +10 -35
- package/components/layout/index.js +40 -50
- package/components/list/_spec.scss +57 -91
- package/components/list/_theme.scss +75 -84
- package/components/list/content.js +9 -13
- package/components/list/index.js +34 -38
- package/components/list/item.js +8 -11
- package/components/list/secondary.js +8 -9
- package/components/menu/_spec.scss +134 -167
- package/components/menu/index.js +45 -61
- package/components/menu/item.js +11 -19
- package/components/progress/_spec.scss +43 -34
- package/components/selection/_spec.scss +123 -133
- package/components/selection/_theme.scss +88 -120
- package/components/selection/index.js +9 -15
- package/components/selection/input.js +3 -5
- package/components/selection/radiogroup.js +8 -15
- package/components/slider/_spec.scss +23 -28
- package/components/snackbar/_spec.scss +17 -62
- package/components/snackbar/index.js +15 -21
- package/components/tab/_spec.scss +35 -50
- package/components/tab/content.js +33 -28
- package/components/tab/index.js +30 -33
- package/components/tab/item.js +4 -5
- package/components/tab/list.js +22 -36
- package/components/textfield/README.md +2 -2
- package/components/textfield/_spec.scss +241 -287
- package/components/textfield/_theme.scss +197 -232
- package/components/textfield/index.js +8 -16
- package/components/tooltip/_spec.scss +23 -26
- package/components/type/_spec.scss +19 -16
- package/core/_breakpoint.scss +33 -33
- package/core/_elevation.scss +40 -0
- package/core/_length.scss +0 -1
- package/core/_platform.scss +0 -22
- package/core/_type.scss +7 -6
- package/core/aria/button.js +4 -5
- package/core/aria/keyboard.js +1 -2
- package/core/aria/rovingtabindex.js +14 -17
- package/core/aria/tab.js +1 -2
- package/core/dom.js +18 -109
- package/core/overlay/_spec.scss +5 -8
- package/core/overlay/_theme.scss +126 -150
- package/core/overlay/index.js +19 -32
- package/core/ripple/_spec.scss +16 -17
- package/core/ripple/_theme.scss +13 -33
- package/core/ripple/index.js +36 -44
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -2
- package/core/theme/_functions.scss +22 -0
- package/core/theme/_palettes.scss +0 -1
- package/core/{color → theme}/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.scss +4 -0
- package/core/transition/index.js +73 -76
- package/docs/_flex.scss +7 -1
- package/docs/_menuoptions.js +2 -2
- package/docs/_partials/_appbar.eta +12 -14
- package/docs/_partials/_header.eta +41 -44
- package/docs/_sample-utils.js +15 -20
- package/docs/docs.scss +123 -87
- package/docs/framework.scss +26 -0
- package/docs/index.eta +2 -6
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +22 -28
- package/docs/pages/bottomnav.js +17 -14
- package/docs/pages/button.js +10 -10
- package/docs/pages/card.js +20 -22
- package/docs/pages/chip.js +11 -13
- package/docs/pages/color.js +35 -36
- package/docs/pages/datatable.js +11 -15
- package/docs/pages/dialog.eta +9 -11
- package/docs/pages/dialog.js +6 -9
- package/docs/pages/dom.js +6 -9
- package/docs/pages/elevation.eta +10 -10
- package/docs/pages/fab.js +2 -3
- package/docs/pages/grid.js +5 -5
- package/docs/pages/list.js +1 -2
- package/docs/pages/menu.eta +17 -19
- package/docs/pages/menu.js +7 -11
- package/docs/pages/overlay.js +1 -2
- package/docs/pages/progress.eta +2 -2
- package/docs/pages/progress.js +1 -1
- package/docs/pages/ripple.js +1 -2
- package/docs/pages/search.eta +20 -24
- package/docs/pages/search.js +24 -41
- package/docs/pages/selection.eta +2 -6
- package/docs/pages/selection.js +3 -4
- package/docs/pages/snackbar.js +3 -4
- package/docs/pages/tab.eta +61 -75
- package/docs/pages/tab.js +16 -15
- package/docs/pages/textfield.eta +9 -8
- package/docs/pages/textfield.js +26 -23
- package/docs/pages/tooltip.eta +10 -12
- package/docs/pages/transition.js +5 -7
- package/docs/postrender.js +7 -5
- package/docs/pwa/pwa.eta +14 -16
- package/docs/pwa/pwa.js +19 -27
- package/docs/pwa/pwa.scss +12 -7
- package/docs/themes/theme-colored.scss +9 -11
- package/docs/themes/theme-default.scss +0 -14
- package/index.scss +27 -0
- package/jsconfig.json +7 -3
- package/package.json +26 -15
- package/tsconfig.json +16 -0
- package/{webpack.config.cjs → webpack.config.js} +105 -58
- package/components/template/_theme.scss +0 -27
- package/components/textfield/_mixins.scss +0 -52
- package/core/color/_theme.scss +0 -390
- package/core/color/index.scss +0 -2
- package/core/theme/_mixins.scss +0 -172
- package/core/theme/_variables.scss +0 -24
- package/docs/_mixins.pug +0 -155
- package/docs/pages/appbar.pug +0 -78
- package/docs/pages/bottomnav.pug +0 -137
- package/docs/pages/button.pug +0 -121
- package/docs/pages/card.pug +0 -74
- package/docs/pages/chip.pug +0 -91
- package/docs/pages/color.pug +0 -121
- package/docs/pages/datatable.pug +0 -283
- package/docs/pages/dialog.pug +0 -132
- package/docs/pages/dom.pug +0 -22
- package/docs/pages/elevation.pug +0 -25
- package/docs/pages/fab.pug +0 -66
- package/docs/pages/grid.pug +0 -95
- package/docs/pages/layout.pug +0 -7
- package/docs/pages/list.pug +0 -326
- package/docs/pages/menu.pug +0 -205
- package/docs/pages/overlay.pug +0 -55
- package/docs/pages/progress.pug +0 -16
- package/docs/pages/ripple.pug +0 -21
- package/docs/pages/search.pug +0 -165
- package/docs/pages/selection.pug +0 -74
- package/docs/pages/slider.pug +0 -17
- package/docs/pages/snackbar.pug +0 -60
- package/docs/pages/tab.pug +0 -304
- package/docs/pages/textfield.pug +0 -360
- package/docs/pages/tooltip.pug +0 -78
- package/docs/pages/transition.pug +0 -76
- package/docs/pages/type.pug +0 -29
- package/docs/pwa/_dialogs.pug +0 -96
- package/docs/pwa/_menus.pug +0 -11
- package/docs/pwa/pwa.pug +0 -325
- package/docs/spec.scss +0 -26
- package/docs/themes/_component-themes.scss +0 -26
- package/docs/themes/theme-colored-fallbacks.scss +0 -17
- package/docs/themes/theme-default-fallbacks.scss +0 -17
|
@@ -1,44 +1,19 @@
|
|
|
1
1
|
@use '../../core/_breakpoint.scss' as breakpoint;
|
|
2
|
-
@use '../../core/theme/_mixins.scss' as theme;
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
.mdw-layout__appbar[mdw-fab-cut],
|
|
4
|
+
.mdw-layout__appbar.mdw-theme[mdw-fab-cut] {
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
}
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
.mdw-layout__appbar-shape {
|
|
9
|
+
color: RGB(var(--mdw-surface));
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
@
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
.mdw-
|
|
12
|
+
@include breakpoint.minMediumWindow {
|
|
13
|
+
.mdw-layout__body[mdw-navdrawer-style~="floating"]:not([mdw-navdrawer-style~="card"]) > .mdw-layout__navdrawer,
|
|
14
|
+
.mdw-layout__body[mdw-sidesheet-style~="floating"]:not([mdw-sidesheet-style~="card"]) > .mdw-layout__sidesheet {
|
|
15
|
+
& > .mdw-layout__sheet-content {
|
|
14
16
|
background-color: transparent;
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
.mdw-layout__appbar-shape {
|
|
18
|
-
color: RGB(var(--mdw-surface));
|
|
19
|
-
}
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
@include breakpoint.minMediumWindow {
|
|
23
|
-
.mdw-layout__body[mdw-navdrawer-style~="floating"]:not([mdw-navdrawer-style~="card"]) > .mdw-layout__navdrawer,
|
|
24
|
-
.mdw-layout__body[mdw-sidesheet-style~="floating"]:not([mdw-sidesheet-style~="card"]) > .mdw-layout__sidesheet {
|
|
25
|
-
& > .mdw-layout__sheet-content {
|
|
26
|
-
background-color: transparent;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@include theme.addComponentFallbackRules('light') {
|
|
34
|
-
@include addThemeRules('light');
|
|
35
19
|
}
|
|
36
|
-
@include theme.addComponentFallbackRules('dark') {
|
|
37
|
-
@include addThemeRules('dark');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@include theme.addComponentCSSVariableRules('layout', $themeValues) {
|
|
42
|
-
@include addThemeRules();
|
|
43
|
-
}
|
|
44
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getPassiveEventListenerOption, iterateArrayLike } from '../../core/dom.js';
|
|
2
1
|
import Throttler from '../../core/throttler.js';
|
|
3
2
|
|
|
4
3
|
const MIN_SCROLL_DELTA = 24; // Avoid finger bounce
|
|
@@ -43,8 +42,7 @@ export function onScrimScroll(event) {
|
|
|
43
42
|
event.preventDefault();
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
|
-
/** @type {HTMLElement} */
|
|
47
|
-
const element = (event.currentTarget);
|
|
45
|
+
const element = /** @type {HTMLElement} */ (event.currentTarget);
|
|
48
46
|
if (element.scrollTop !== element.scrollHeight / 4) {
|
|
49
47
|
element.scrollTop = element.scrollHeight / 4;
|
|
50
48
|
}
|
|
@@ -137,10 +135,8 @@ export function onScrimClick(event) {
|
|
|
137
135
|
hideNavDrawer();
|
|
138
136
|
}
|
|
139
137
|
const sidesheet = document.getElementsByClassName('mdw-layout__sidesheet')[0];
|
|
140
|
-
if (sidesheet && sidesheet.getAttribute('aria-hidden') === 'false') {
|
|
141
|
-
|
|
142
|
-
hideSideSheet();
|
|
143
|
-
}
|
|
138
|
+
if (sidesheet && sidesheet.getAttribute('aria-hidden') === 'false' && (window.innerWidth < TABLET_BREAKPOINT || document.body.getAttribute('mdw-sidesheet-style') === 'modal')) {
|
|
139
|
+
hideSideSheet();
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
142
|
|
|
@@ -169,11 +165,8 @@ export function isTablet() {
|
|
|
169
165
|
|
|
170
166
|
/** @return {HTMLElement} */
|
|
171
167
|
export function getAppBarElement() {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
appBarElement = (document.getElementsByClassName('mdw-layout__appbar')[0]);
|
|
175
|
-
}
|
|
176
|
-
return appBarElement;
|
|
168
|
+
// eslint-disable-next-line no-return-assign
|
|
169
|
+
return (appBarElement ||= /** @type {HTMLElement} */ (document.getElementsByClassName('mdw-layout__appbar')[0]));
|
|
177
170
|
}
|
|
178
171
|
|
|
179
172
|
/** @return {boolean} */
|
|
@@ -189,10 +182,10 @@ export function shouldAutoHideAppBar() {
|
|
|
189
182
|
if (autoHide === '') {
|
|
190
183
|
return true;
|
|
191
184
|
}
|
|
192
|
-
if (autoHide.
|
|
185
|
+
if (autoHide.includes('tablet') && isTablet()) {
|
|
193
186
|
return true;
|
|
194
187
|
}
|
|
195
|
-
if (autoHide.
|
|
188
|
+
if (autoHide.includes('mobile') && isMobile()) {
|
|
196
189
|
return true;
|
|
197
190
|
}
|
|
198
191
|
return false;
|
|
@@ -208,7 +201,7 @@ export function openAppBarFabCut() {
|
|
|
208
201
|
if (fabCutAttr == null) {
|
|
209
202
|
return;
|
|
210
203
|
}
|
|
211
|
-
if (fabCutAttr.
|
|
204
|
+
if (!fabCutAttr.includes('open')) {
|
|
212
205
|
appBar.setAttribute('mdw-fab-cut', `open ${fabCutAttr}`.trim());
|
|
213
206
|
}
|
|
214
207
|
}
|
|
@@ -238,7 +231,7 @@ export function closeAppBarFabCut() {
|
|
|
238
231
|
if (!fabCutAttr) {
|
|
239
232
|
return;
|
|
240
233
|
}
|
|
241
|
-
if (fabCutAttr.
|
|
234
|
+
if (fabCutAttr.includes('open')) {
|
|
242
235
|
appBar.setAttribute('mdw-fab-cut', fabCutAttr.replace('open', '').trim());
|
|
243
236
|
}
|
|
244
237
|
}
|
|
@@ -270,8 +263,7 @@ export function isFabShown() {
|
|
|
270
263
|
/** @return {HTMLElement} */
|
|
271
264
|
export function getContentElement() {
|
|
272
265
|
if (!layoutContentElement) {
|
|
273
|
-
/** @type {HTMLElement} */
|
|
274
|
-
layoutContentElement = (document.getElementsByClassName('mdw-layout__content')[0]);
|
|
266
|
+
layoutContentElement = /** @type {HTMLElement} */ (document.getElementsByClassName('mdw-layout__content')[0]);
|
|
275
267
|
}
|
|
276
268
|
return layoutContentElement;
|
|
277
269
|
}
|
|
@@ -344,19 +336,15 @@ export function onScroll(isBody) {
|
|
|
344
336
|
}
|
|
345
337
|
|
|
346
338
|
// Don't perform on each scroll back, only on first
|
|
347
|
-
if (newScrollBack || isAtRest) {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
appBar.style.removeProperty('margin-top');
|
|
351
|
-
}
|
|
339
|
+
if ((newScrollBack || isAtRest) && appBar.hasAttribute('mdw-autohide')) {
|
|
340
|
+
appBar.removeAttribute('mdw-hide');
|
|
341
|
+
appBar.style.removeProperty('margin-top');
|
|
352
342
|
}
|
|
353
343
|
|
|
354
344
|
if (!scrolledPastAppBar) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
scrolledPastAppBar = currentScrollY > appBar.clientHeight;
|
|
359
|
-
}
|
|
345
|
+
scrolledPastAppBar = bottomAppBar
|
|
346
|
+
? currentScrollY <= scrollBottom - appBar.clientHeight
|
|
347
|
+
: currentScrollY > appBar.clientHeight;
|
|
360
348
|
}
|
|
361
349
|
|
|
362
350
|
if (isAtRest) {
|
|
@@ -382,10 +370,8 @@ export function onScroll(isBody) {
|
|
|
382
370
|
}
|
|
383
371
|
}
|
|
384
372
|
|
|
385
|
-
if (newScrollAway) {
|
|
386
|
-
|
|
387
|
-
appBar.setAttribute('mdw-raise', '');
|
|
388
|
-
}
|
|
373
|
+
if (newScrollAway && appBar.hasAttribute('mdw-autoraise')) {
|
|
374
|
+
appBar.setAttribute('mdw-raise', '');
|
|
389
375
|
}
|
|
390
376
|
}
|
|
391
377
|
|
|
@@ -418,26 +404,32 @@ export function attach() {
|
|
|
418
404
|
const appBar = getAppBarElement();
|
|
419
405
|
if (appBar) {
|
|
420
406
|
// Initialize with scroll up
|
|
421
|
-
document.body.addEventListener('scroll', onBodyScroll,
|
|
407
|
+
document.body.addEventListener('scroll', onBodyScroll, { passive: true });
|
|
422
408
|
const contentElement = getContentElement();
|
|
423
409
|
if (contentElement) {
|
|
424
|
-
contentElement.addEventListener('scroll', onContentScroll,
|
|
410
|
+
contentElement.addEventListener('scroll', onContentScroll, { passive: true });
|
|
425
411
|
}
|
|
426
412
|
resetScroll();
|
|
427
413
|
}
|
|
428
414
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
415
|
+
for (const el of document.getElementsByClassName('mdw-layout__navdrawer-toggle')) {
|
|
416
|
+
el.addEventListener('click', toggleNavDrawer);
|
|
417
|
+
}
|
|
418
|
+
for (const el of document.getElementsByClassName('mdw-layout__navdrawer-show')) {
|
|
419
|
+
el.addEventListener('click', showNavDrawer);
|
|
420
|
+
}
|
|
421
|
+
for (const el of document.getElementsByClassName('mdw-layout__navdrawer-hide')) {
|
|
422
|
+
el.addEventListener('click', hideNavDrawer);
|
|
423
|
+
}
|
|
424
|
+
for (const el of document.getElementsByClassName('mdw-layout__sidesheet-toggle')) {
|
|
425
|
+
el.addEventListener('click', toggleSideSheet);
|
|
426
|
+
}
|
|
427
|
+
for (const el of document.getElementsByClassName('mdw-layout__sidesheet-show')) {
|
|
428
|
+
el.addEventListener('click', showSideSheet);
|
|
429
|
+
}
|
|
430
|
+
for (const el of document.getElementsByClassName('mdw-layout__sidesheet-hide')) {
|
|
431
|
+
el.addEventListener('click', hideSideSheet);
|
|
432
|
+
}
|
|
441
433
|
const scrim = document.getElementsByClassName('mdw-layout__scrim')[0];
|
|
442
434
|
if (scrim) {
|
|
443
435
|
scrim.addEventListener('click', onScrimClick);
|
|
@@ -449,11 +441,9 @@ export function attach() {
|
|
|
449
441
|
|
|
450
442
|
/** @return {void} */
|
|
451
443
|
export function detach() {
|
|
452
|
-
document.removeEventListener('scroll', onBodyScroll
|
|
444
|
+
document.removeEventListener('scroll', onBodyScroll);
|
|
453
445
|
const content = getContentElement();
|
|
454
|
-
|
|
455
|
-
content.removeEventListener('scroll', onContentScroll, getPassiveEventListenerOption());
|
|
456
|
-
}
|
|
446
|
+
content?.removeEventListener('scroll', onContentScroll);
|
|
457
447
|
const scrim = document.getElementsByClassName('mdw-layout__scrim')[0];
|
|
458
448
|
if (scrim) {
|
|
459
449
|
scrim.removeEventListener('click', onScrimClick);
|
|
@@ -7,7 +7,15 @@
|
|
|
7
7
|
@use '../../core/_platform.scss' as platform;
|
|
8
8
|
@use '../../core/_type.scss' as type;
|
|
9
9
|
|
|
10
|
-
$dividerHeight:
|
|
10
|
+
$dividerHeight: 1px !default;
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
--mdw-list__inline-padding: 24px;
|
|
14
|
+
@include breakpoint.has16DPMargin() {
|
|
15
|
+
--mdw-list__inline-padding: 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
11
19
|
|
|
12
20
|
.mdw-list {
|
|
13
21
|
margin: 0;
|
|
@@ -16,15 +24,14 @@ $dividerHeight: dp(1) !default;
|
|
|
16
24
|
list-style-type: none;
|
|
17
25
|
|
|
18
26
|
&[mdw-margin-top] {
|
|
19
|
-
margin-
|
|
27
|
+
margin-block-start: 8px;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
&[mdw-margin-bottom] {
|
|
23
|
-
margin-
|
|
31
|
+
margin-block-end: 8px;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
|
|
27
|
-
|
|
28
35
|
li.mdw-list__item {
|
|
29
36
|
position: relative;
|
|
30
37
|
|
|
@@ -33,7 +40,7 @@ li.mdw-list__item {
|
|
|
33
40
|
-moz-appearance: none;
|
|
34
41
|
-webkit-appearance: none;
|
|
35
42
|
appearance: none;
|
|
36
|
-
|
|
43
|
+
|
|
37
44
|
text-align: start;
|
|
38
45
|
text-decoration: none;
|
|
39
46
|
text-transform: none;
|
|
@@ -43,8 +50,8 @@ a.mdw-list__content {
|
|
|
43
50
|
text-decoration: none;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
|
-
.mdw-list__content > .mdw-
|
|
47
|
-
|
|
53
|
+
.mdw-list__content > .mdw-divider[mdw-vertical] {
|
|
54
|
+
inline-size: 40px;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
.mdw-list__subheader,
|
|
@@ -54,13 +61,10 @@ a.mdw-list__content {
|
|
|
54
61
|
flex-direction: row;
|
|
55
62
|
justify-content: stretch;
|
|
56
63
|
overflow: hidden;
|
|
57
|
-
|
|
58
|
-
min-
|
|
64
|
+
|
|
65
|
+
min-block-size: 48px;
|
|
59
66
|
flex: 1;
|
|
60
|
-
padding: 0
|
|
61
|
-
@include breakpoint.has16DPMargin() {
|
|
62
|
-
padding: 0 dp(16);
|
|
63
|
-
}
|
|
67
|
+
padding: 0 var(--mdw-list__inline-padding);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
.mdw-list__subheader {
|
|
@@ -87,15 +91,14 @@ a.mdw-list__content {
|
|
|
87
91
|
flex-direction: row;
|
|
88
92
|
justify-content: flex-start;
|
|
89
93
|
order: -1;
|
|
90
|
-
|
|
91
|
-
min-width: dp(72 - 16);
|
|
92
|
-
max-width: dp(72 - 16);
|
|
93
|
-
margin: dp(16) 0;
|
|
94
|
-
}
|
|
95
94
|
|
|
95
|
+
min-inline-size: 56px; /* 72 - 16 */
|
|
96
|
+
max-inline-size: 56px; /* 72 - 16 */
|
|
97
|
+
margin: 16px 0;
|
|
98
|
+
}
|
|
96
99
|
|
|
97
100
|
.mdw-list__avatar {
|
|
98
|
-
min-
|
|
101
|
+
min-block-size: 40px;
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
.mdw-list__item {
|
|
@@ -110,12 +113,13 @@ a.mdw-list__content {
|
|
|
110
113
|
|
|
111
114
|
&::before,
|
|
112
115
|
&::after {
|
|
116
|
+
content: '';
|
|
117
|
+
|
|
113
118
|
position: absolute;
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
left: 0;
|
|
120
|
+
inset-inline: 0;
|
|
117
121
|
|
|
118
|
-
|
|
122
|
+
block-size: 1px;
|
|
119
123
|
|
|
120
124
|
transition-duration: motion.$shapeChangeDuration;
|
|
121
125
|
|
|
@@ -123,25 +127,25 @@ a.mdw-list__content {
|
|
|
123
127
|
transition-timing-function: motion.$standardEasing;
|
|
124
128
|
|
|
125
129
|
background-color: transparent;
|
|
126
|
-
content: '';
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
&::before {
|
|
130
|
-
|
|
133
|
+
inset-block-start: -1px;
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
&::after {
|
|
134
|
-
|
|
137
|
+
inset-block-end: 0;
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
& > .mdw-list__content .mdw-list__secondary {
|
|
138
|
-
min-
|
|
141
|
+
min-block-size: 48px;
|
|
142
|
+
|
|
143
|
+
pointer-events: none;
|
|
139
144
|
|
|
140
145
|
transition-duration: motion.$shapeChangeDuration;
|
|
141
146
|
transition-property: transform;
|
|
142
147
|
transition-timing-function: motion.$standardEasing;
|
|
143
148
|
|
|
144
|
-
pointer-events: none;
|
|
145
149
|
transform: rotate(0deg);
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -189,29 +193,29 @@ a.mdw-list__content {
|
|
|
189
193
|
|
|
190
194
|
@keyframes expandRow {
|
|
191
195
|
0% {
|
|
192
|
-
min-
|
|
196
|
+
min-block-size: 0;
|
|
193
197
|
flex-basis: 0;
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
99.99% {
|
|
197
|
-
min-
|
|
201
|
+
min-block-size: 48px;
|
|
198
202
|
flex-basis: 0;
|
|
199
203
|
}
|
|
200
204
|
|
|
201
205
|
100% {
|
|
202
|
-
min-
|
|
206
|
+
min-block-size: 48px;
|
|
203
207
|
flex-basis: 100%;
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
@keyframes collapseRow {
|
|
208
212
|
0% {
|
|
209
|
-
min-
|
|
213
|
+
min-block-size: 48px;
|
|
210
214
|
flex-basis: 0;
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
100% {
|
|
214
|
-
min-
|
|
218
|
+
min-block-size: 0;
|
|
215
219
|
flex-basis: 0;
|
|
216
220
|
}
|
|
217
221
|
}
|
|
@@ -219,8 +223,8 @@ a.mdw-list__content {
|
|
|
219
223
|
.mdw-list__expand-checkbox {
|
|
220
224
|
display: none;
|
|
221
225
|
|
|
222
|
-
max-
|
|
223
|
-
max-
|
|
226
|
+
max-block-size: 0;
|
|
227
|
+
max-inline-size: 0;
|
|
224
228
|
|
|
225
229
|
-moz-appearance: none;
|
|
226
230
|
-webkit-appearance: none;
|
|
@@ -238,48 +242,21 @@ a.mdw-list__content {
|
|
|
238
242
|
flex-direction: row;
|
|
239
243
|
justify-content: center;
|
|
240
244
|
order: 1;
|
|
241
|
-
|
|
242
|
-
min-
|
|
243
|
-
margin-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
padding: 0 dp(24);
|
|
245
|
+
|
|
246
|
+
min-inline-size: var(--mdw-list__inline-padding);
|
|
247
|
+
margin-inline: 0 calc(-1 * var(--mdw-list__inline-padding));
|
|
248
|
+
border-width: 1px;
|
|
249
|
+
padding: 0 var(--mdw-list__inline-padding);
|
|
247
250
|
|
|
248
251
|
pointer-events: none;
|
|
249
252
|
|
|
250
253
|
z-index: 1;
|
|
251
|
-
@include breakpoint.has16DPMargin() {
|
|
252
|
-
margin-right: dp(-16);
|
|
253
|
-
margin-left: 0;
|
|
254
|
-
padding: 0 dp(16);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
:root[dir="rtl"] & {
|
|
258
|
-
margin-right: 0;
|
|
259
|
-
margin-left: dp(-24);
|
|
260
|
-
@include breakpoint.has16DPMargin() {
|
|
261
|
-
margin-right: 0;
|
|
262
|
-
margin-left: dp(-16);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
254
|
|
|
266
255
|
&[mdw-action] {
|
|
267
256
|
pointer-events: auto;
|
|
268
257
|
}
|
|
269
258
|
}
|
|
270
259
|
|
|
271
|
-
|
|
272
|
-
@include platform.ifIE() {
|
|
273
|
-
.mdw-list__icon::after,
|
|
274
|
-
.mdw-list__secondary::after {
|
|
275
|
-
// Fix IE min-height flexbug
|
|
276
|
-
content: '';
|
|
277
|
-
|
|
278
|
-
min-height: inherit;
|
|
279
|
-
width: 0;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
260
|
// In order to render 48px, 64px, 72px and 88px heights, lines are rendered bottom-up
|
|
284
261
|
|
|
285
262
|
.mdw-list__text {
|
|
@@ -287,7 +264,7 @@ a.mdw-list__content {
|
|
|
287
264
|
overflow-x: hidden;
|
|
288
265
|
|
|
289
266
|
flex-grow: 1;
|
|
290
|
-
|
|
267
|
+
|
|
291
268
|
pointer-events: none;
|
|
292
269
|
|
|
293
270
|
text-overflow: ellipsis;
|
|
@@ -298,18 +275,17 @@ a.mdw-list__content {
|
|
|
298
275
|
content: '';
|
|
299
276
|
|
|
300
277
|
position: absolute;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
left: 0;
|
|
278
|
+
inset-block-end: 0;
|
|
279
|
+
inset-inline: 0;
|
|
304
280
|
|
|
305
|
-
|
|
306
|
-
|
|
281
|
+
block-size: $dividerHeight;
|
|
282
|
+
inline-size: 100%;
|
|
307
283
|
}
|
|
308
284
|
}
|
|
309
285
|
|
|
310
286
|
.mdw-list__avatar ~ .mdw-list__text::after,
|
|
311
287
|
.mdw-list[mdw-divider] > .mdw-list__item:not(:last-child) .mdw-list__icon ~ .mdw-list__text::after {
|
|
312
|
-
margin-
|
|
288
|
+
margin-inline-start: 72px;
|
|
313
289
|
}
|
|
314
290
|
|
|
315
291
|
.mdw-list__text-line {
|
|
@@ -330,16 +306,9 @@ a.mdw-list__content {
|
|
|
330
306
|
@include type.addRules('caption');
|
|
331
307
|
align-self: flex-start;
|
|
332
308
|
|
|
333
|
-
margin-
|
|
334
|
-
margin-left: dp(28);
|
|
335
|
-
|
|
336
|
-
:root[dir="rtl"] & {
|
|
337
|
-
margin-right: dp(28);
|
|
338
|
-
margin-left: 0;
|
|
339
|
-
}
|
|
309
|
+
margin-inline: 28px 0;
|
|
340
310
|
}
|
|
341
311
|
|
|
342
|
-
|
|
343
312
|
// First line is pushed up 20dp
|
|
344
313
|
.mdw-list__text-line:first-child {
|
|
345
314
|
@include type.baselineToBottom(20);
|
|
@@ -350,7 +319,7 @@ a.mdw-list__content {
|
|
|
350
319
|
.mdw-list__text-block:not(:first-child) {
|
|
351
320
|
@include type.addRules('body-2');
|
|
352
321
|
@include type.baselineToTop(20);
|
|
353
|
-
margin-
|
|
322
|
+
margin-block-start: -20px;
|
|
354
323
|
}
|
|
355
324
|
|
|
356
325
|
// Second line is pushed up 16dp from baseline
|
|
@@ -358,21 +327,18 @@ a.mdw-list__content {
|
|
|
358
327
|
@include type.baselineToBottom(16);
|
|
359
328
|
}
|
|
360
329
|
|
|
361
|
-
|
|
362
330
|
// When 3-lines, 2nd and 3rd lines are pushed up 20dp
|
|
363
331
|
.mdw-list__text-line:nth-child(3),
|
|
364
332
|
.mdw-list__text-line:not(:first-child):not(:last-child) {
|
|
365
333
|
@include type.baselineToBottom(20);
|
|
366
334
|
}
|
|
367
335
|
|
|
368
|
-
|
|
369
336
|
.mdw-list__text-block {
|
|
370
337
|
display: block;
|
|
371
338
|
display: -webkit-box;
|
|
372
339
|
overflow-x: hidden;
|
|
373
340
|
overflow-y: hidden;
|
|
374
|
-
|
|
375
|
-
|
|
341
|
+
|
|
376
342
|
pointer-events: none;
|
|
377
343
|
|
|
378
344
|
text-align: start;
|
|
@@ -385,12 +351,12 @@ a.mdw-list__content {
|
|
|
385
351
|
word-break: break-word;
|
|
386
352
|
|
|
387
353
|
&:not(:only-child) {
|
|
388
|
-
max-
|
|
389
|
-
|
|
390
|
-
margin-
|
|
391
|
-
padding-
|
|
354
|
+
max-block-size: sp(20 * 2);
|
|
355
|
+
block-size: sp(20 * 2);
|
|
356
|
+
margin-block-end: 16px;
|
|
357
|
+
padding-block-end: 4px;
|
|
392
358
|
}
|
|
393
|
-
|
|
359
|
+
|
|
394
360
|
&:only-child {
|
|
395
361
|
@include type.baselineToBottom(16);
|
|
396
362
|
}
|