@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.
Files changed (184) hide show
  1. package/.browserslistrc +2 -1
  2. package/.eslintrc.json +59 -8
  3. package/.stylelintrc.json +94 -49
  4. package/CHANGELOG.md +12 -0
  5. package/README.md +1 -3
  6. package/adapters/datatable/column.js +27 -54
  7. package/adapters/datatable/index.js +69 -81
  8. package/adapters/dom/index.js +32 -47
  9. package/adapters/search/index.js +107 -133
  10. package/components/appbar/_spec.scss +77 -137
  11. package/components/banner/_spec.scss +28 -63
  12. package/components/bottomnav/_spec.scss +46 -54
  13. package/components/bottomnav/index.js +15 -20
  14. package/components/bottomnav/item.js +4 -5
  15. package/components/button/README.md +1 -1
  16. package/components/button/_spec.scss +43 -42
  17. package/components/button/_theme.scss +27 -50
  18. package/components/card/_spec.scss +61 -69
  19. package/components/chip/_spec.scss +21 -44
  20. package/components/chip/_theme.scss +79 -151
  21. package/components/chip/index.js +6 -4
  22. package/components/datatable/_spec.scss +36 -99
  23. package/components/datatable/_theme.scss +98 -124
  24. package/components/datatable/cell.js +1 -2
  25. package/components/datatable/columnheader.js +1 -2
  26. package/components/datatable/index.js +33 -47
  27. package/components/datatable/row.js +4 -5
  28. package/components/dialog/_spec.scss +53 -63
  29. package/components/dialog/_theme.scss +7 -0
  30. package/components/dialog/index.js +62 -88
  31. package/components/divider/_spec.scss +6 -8
  32. package/components/elevation/_spec.scss +1 -1
  33. package/components/fab/_spec.scss +30 -42
  34. package/components/fab/index.js +4 -8
  35. package/components/grid/_spec.scss +68 -211
  36. package/components/layout/_mixins.scss +0 -22
  37. package/components/layout/_spec.scss +267 -363
  38. package/components/layout/_theme.scss +10 -35
  39. package/components/layout/index.js +40 -50
  40. package/components/list/_spec.scss +57 -91
  41. package/components/list/_theme.scss +75 -84
  42. package/components/list/content.js +9 -13
  43. package/components/list/index.js +34 -38
  44. package/components/list/item.js +8 -11
  45. package/components/list/secondary.js +8 -9
  46. package/components/menu/_spec.scss +134 -167
  47. package/components/menu/index.js +45 -61
  48. package/components/menu/item.js +11 -19
  49. package/components/progress/_spec.scss +43 -34
  50. package/components/selection/_spec.scss +123 -133
  51. package/components/selection/_theme.scss +88 -120
  52. package/components/selection/index.js +9 -15
  53. package/components/selection/input.js +3 -5
  54. package/components/selection/radiogroup.js +8 -15
  55. package/components/slider/_spec.scss +23 -28
  56. package/components/snackbar/_spec.scss +17 -62
  57. package/components/snackbar/index.js +15 -21
  58. package/components/tab/_spec.scss +35 -50
  59. package/components/tab/content.js +33 -28
  60. package/components/tab/index.js +30 -33
  61. package/components/tab/item.js +4 -5
  62. package/components/tab/list.js +22 -36
  63. package/components/textfield/README.md +2 -2
  64. package/components/textfield/_spec.scss +241 -287
  65. package/components/textfield/_theme.scss +197 -232
  66. package/components/textfield/index.js +8 -16
  67. package/components/tooltip/_spec.scss +23 -26
  68. package/components/type/_spec.scss +19 -16
  69. package/core/_breakpoint.scss +33 -33
  70. package/core/_elevation.scss +40 -0
  71. package/core/_length.scss +0 -1
  72. package/core/_platform.scss +0 -22
  73. package/core/_type.scss +7 -6
  74. package/core/aria/button.js +4 -5
  75. package/core/aria/keyboard.js +1 -2
  76. package/core/aria/rovingtabindex.js +14 -17
  77. package/core/aria/tab.js +1 -2
  78. package/core/dom.js +18 -109
  79. package/core/overlay/_spec.scss +5 -8
  80. package/core/overlay/_theme.scss +126 -150
  81. package/core/overlay/index.js +19 -32
  82. package/core/ripple/_spec.scss +16 -17
  83. package/core/ripple/_theme.scss +13 -33
  84. package/core/ripple/index.js +36 -44
  85. package/core/theme/_aliases.scss +15 -0
  86. package/core/theme/_config.scss +8 -2
  87. package/core/theme/_functions.scss +22 -0
  88. package/core/theme/_palettes.scss +0 -1
  89. package/core/{color → theme}/_spec.scss +0 -0
  90. package/core/theme/_theme.scss +268 -0
  91. package/core/theme/index.scss +4 -0
  92. package/core/transition/index.js +73 -76
  93. package/docs/_flex.scss +7 -1
  94. package/docs/_menuoptions.js +2 -2
  95. package/docs/_partials/_appbar.eta +12 -14
  96. package/docs/_partials/_header.eta +41 -44
  97. package/docs/_sample-utils.js +15 -20
  98. package/docs/docs.scss +123 -87
  99. package/docs/framework.scss +26 -0
  100. package/docs/index.eta +2 -6
  101. package/docs/index.js +7 -0
  102. package/docs/pages/appbar.eta +22 -28
  103. package/docs/pages/bottomnav.js +17 -14
  104. package/docs/pages/button.js +10 -10
  105. package/docs/pages/card.js +20 -22
  106. package/docs/pages/chip.js +11 -13
  107. package/docs/pages/color.js +35 -36
  108. package/docs/pages/datatable.js +11 -15
  109. package/docs/pages/dialog.eta +9 -11
  110. package/docs/pages/dialog.js +6 -9
  111. package/docs/pages/dom.js +6 -9
  112. package/docs/pages/elevation.eta +10 -10
  113. package/docs/pages/fab.js +2 -3
  114. package/docs/pages/grid.js +5 -5
  115. package/docs/pages/list.js +1 -2
  116. package/docs/pages/menu.eta +17 -19
  117. package/docs/pages/menu.js +7 -11
  118. package/docs/pages/overlay.js +1 -2
  119. package/docs/pages/progress.eta +2 -2
  120. package/docs/pages/progress.js +1 -1
  121. package/docs/pages/ripple.js +1 -2
  122. package/docs/pages/search.eta +20 -24
  123. package/docs/pages/search.js +24 -41
  124. package/docs/pages/selection.eta +2 -6
  125. package/docs/pages/selection.js +3 -4
  126. package/docs/pages/snackbar.js +3 -4
  127. package/docs/pages/tab.eta +61 -75
  128. package/docs/pages/tab.js +16 -15
  129. package/docs/pages/textfield.eta +9 -8
  130. package/docs/pages/textfield.js +26 -23
  131. package/docs/pages/tooltip.eta +10 -12
  132. package/docs/pages/transition.js +5 -7
  133. package/docs/postrender.js +7 -5
  134. package/docs/pwa/pwa.eta +14 -16
  135. package/docs/pwa/pwa.js +19 -27
  136. package/docs/pwa/pwa.scss +12 -7
  137. package/docs/themes/theme-colored.scss +9 -11
  138. package/docs/themes/theme-default.scss +0 -14
  139. package/index.scss +27 -0
  140. package/jsconfig.json +7 -3
  141. package/package.json +26 -15
  142. package/tsconfig.json +16 -0
  143. package/{webpack.config.cjs → webpack.config.js} +105 -58
  144. package/components/template/_theme.scss +0 -27
  145. package/components/textfield/_mixins.scss +0 -52
  146. package/core/color/_theme.scss +0 -390
  147. package/core/color/index.scss +0 -2
  148. package/core/theme/_mixins.scss +0 -172
  149. package/core/theme/_variables.scss +0 -24
  150. package/docs/_mixins.pug +0 -155
  151. package/docs/pages/appbar.pug +0 -78
  152. package/docs/pages/bottomnav.pug +0 -137
  153. package/docs/pages/button.pug +0 -121
  154. package/docs/pages/card.pug +0 -74
  155. package/docs/pages/chip.pug +0 -91
  156. package/docs/pages/color.pug +0 -121
  157. package/docs/pages/datatable.pug +0 -283
  158. package/docs/pages/dialog.pug +0 -132
  159. package/docs/pages/dom.pug +0 -22
  160. package/docs/pages/elevation.pug +0 -25
  161. package/docs/pages/fab.pug +0 -66
  162. package/docs/pages/grid.pug +0 -95
  163. package/docs/pages/layout.pug +0 -7
  164. package/docs/pages/list.pug +0 -326
  165. package/docs/pages/menu.pug +0 -205
  166. package/docs/pages/overlay.pug +0 -55
  167. package/docs/pages/progress.pug +0 -16
  168. package/docs/pages/ripple.pug +0 -21
  169. package/docs/pages/search.pug +0 -165
  170. package/docs/pages/selection.pug +0 -74
  171. package/docs/pages/slider.pug +0 -17
  172. package/docs/pages/snackbar.pug +0 -60
  173. package/docs/pages/tab.pug +0 -304
  174. package/docs/pages/textfield.pug +0 -360
  175. package/docs/pages/tooltip.pug +0 -78
  176. package/docs/pages/transition.pug +0 -76
  177. package/docs/pages/type.pug +0 -29
  178. package/docs/pwa/_dialogs.pug +0 -96
  179. package/docs/pwa/_menus.pug +0 -11
  180. package/docs/pwa/pwa.pug +0 -325
  181. package/docs/spec.scss +0 -26
  182. package/docs/themes/_component-themes.scss +0 -26
  183. package/docs/themes/theme-colored-fallbacks.scss +0 -17
  184. 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
- $themeValues: () !default;
3
+ .mdw-layout__appbar[mdw-fab-cut],
4
+ .mdw-layout__appbar.mdw-theme[mdw-fab-cut] {
5
+ background-color: transparent;
6
+ }
5
7
 
6
- @function getThemeValue($key, $type) {
7
- @return theme.getThemeValue('layout', $themeValues, $key, $type);
8
+ .mdw-layout__appbar-shape {
9
+ color: RGB(var(--mdw-surface));
8
10
  }
9
11
 
10
- @mixin addThemeRules($type: 'var') {
11
- @if ($type == 'var') {
12
- .mdw-layout__appbar[mdw-fab-cut],
13
- .mdw-layout__appbar.mdw-theme[mdw-fab-cut] {
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
- if (window.innerWidth < TABLET_BREAKPOINT || document.body.getAttribute('mdw-sidesheet-style') === 'modal') {
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
- if (!appBarElement) {
173
- /** @type {HTMLElement} */
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.indexOf('tablet') !== -1 && isTablet()) {
185
+ if (autoHide.includes('tablet') && isTablet()) {
193
186
  return true;
194
187
  }
195
- if (autoHide.indexOf('mobile') !== -1 && isMobile()) {
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.indexOf('open') === -1) {
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.indexOf('open') !== -1) {
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
- if (appBar.hasAttribute('mdw-autohide')) {
349
- appBar.removeAttribute('mdw-hide');
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
- if (bottomAppBar) {
356
- scrolledPastAppBar = currentScrollY <= scrollBottom - appBar.clientHeight;
357
- } else {
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
- if (appBar.hasAttribute('mdw-autoraise')) {
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, getPassiveEventListenerOption());
407
+ document.body.addEventListener('scroll', onBodyScroll, { passive: true });
422
408
  const contentElement = getContentElement();
423
409
  if (contentElement) {
424
- contentElement.addEventListener('scroll', onContentScroll, getPassiveEventListenerOption());
410
+ contentElement.addEventListener('scroll', onContentScroll, { passive: true });
425
411
  }
426
412
  resetScroll();
427
413
  }
428
414
 
429
- iterateArrayLike(document.getElementsByClassName('mdw-layout__navdrawer-toggle'),
430
- (el) => el.addEventListener('click', toggleNavDrawer));
431
- iterateArrayLike(document.getElementsByClassName('mdw-layout__navdrawer-show'),
432
- (el) => el.addEventListener('click', showNavDrawer));
433
- iterateArrayLike(document.getElementsByClassName('mdw-layout__navdrawer-hide'),
434
- (el) => el.addEventListener('click', hideNavDrawer));
435
- iterateArrayLike(document.getElementsByClassName('mdw-layout__sidesheet-toggle'),
436
- (el) => el.addEventListener('click', toggleSideSheet));
437
- iterateArrayLike(document.getElementsByClassName('mdw-layout__sidesheet-show'),
438
- (el) => el.addEventListener('click', showSideSheet));
439
- iterateArrayLike(document.getElementsByClassName('mdw-layout__sidesheet-hide'),
440
- (el) => el.addEventListener('click', hideSideSheet));
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, getPassiveEventListenerOption());
444
+ document.removeEventListener('scroll', onBodyScroll);
453
445
  const content = getContentElement();
454
- if (content) {
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: dp(1) !default;
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-top: dp(8);
27
+ margin-block-start: 8px;
20
28
  }
21
29
 
22
30
  &[mdw-margin-bottom] {
23
- margin-bottom: dp(8);
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-divider__vertical {
47
- height: dp(40);
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-height: dp(48);
64
+
65
+ min-block-size: 48px;
59
66
  flex: 1;
60
- padding: 0 dp(24);
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-height: dp(40);
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
- right: 0;
116
- left: 0;
120
+ inset-inline: 0;
117
121
 
118
- height: dp(1);
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
- top: dp(-1);
133
+ inset-block-start: -1px;
131
134
  }
132
135
 
133
136
  &::after {
134
- bottom: 0;
137
+ inset-block-end: 0;
135
138
  }
136
139
 
137
140
  & > .mdw-list__content .mdw-list__secondary {
138
- min-height: dp(48);
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-height: 0;
196
+ min-block-size: 0;
193
197
  flex-basis: 0;
194
198
  }
195
199
 
196
200
  99.99% {
197
- min-height: dp(48);
201
+ min-block-size: 48px;
198
202
  flex-basis: 0;
199
203
  }
200
204
 
201
205
  100% {
202
- min-height: dp(48);
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-height: dp(48);
213
+ min-block-size: 48px;
210
214
  flex-basis: 0;
211
215
  }
212
216
 
213
217
  100% {
214
- min-height: 0;
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-height: 0;
223
- max-width: 0;
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-width: dp(24);
243
- margin-right: dp(-24);
244
- margin-left: 0;
245
- border-width: dp(1);
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
- right: 0;
302
- bottom: 0;
303
- left: 0;
278
+ inset-block-end: 0;
279
+ inset-inline: 0;
304
280
 
305
- height: $dividerHeight;
306
- width: 100%;
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-left: dp(72);
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-right: 0;
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-top: dp(-20);
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-height: sp(20 * 2);
389
- height: sp(20 * 2);
390
- margin-bottom: dp(16);
391
- padding-bottom: dp(4);
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
  }