@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,177 +1,105 @@
1
- // https://material.io/design/interaction/states.html
2
- // https://material.io/design/components/chips.html
3
- // https://material.io/design/iconography/system-icons.html#color
4
-
5
- @use '../../core/theme/_mixins.scss' as theme;
1
+ /* https://material.io/design/interaction/states.html */
2
+ /* https://material.io/design/components/chips.html */
3
+ /* https://material.io/design/iconography/system-icons.html#color */
4
+
5
+ .mdw-theme {
6
+ --mdw-chip__text-color: var(--mdw-text-color);
7
+ --mdw-chip__background-color: var(--mdw-divider-color);
8
+ --mdw-chip__active-icon-color__focus: var(--mdw-text-color);
9
+ --mdw-chip__active-icon-color: var(--mdw-medium-color);
10
+ --mdw-chip__inactive-icon-color: var(--mdw-inactive-color);
11
+ --mdw-chip__overlay-color: RGBA(var(--mdw-ink-default), 1.00);
12
+
13
+ --mdw-chip__disabled-background-color: RGBA(var(--mdw-ink-default), 0.12);
14
+ --mdw-chip__outline-color: RGBA(var(--mdw-ink-default), 0.12);
15
+
16
+ --mdw-chip__default-opacity: var(--mdw-chip__default-opacity-value);
17
+ --mdw-chip__hover-opacity: var(--mdw-chip__hover-opacity-value);
18
+ --mdw-chip__focus-opacity: var(--mdw-chip__focus-opacity-value);
19
+ --mdw-chip__selected-opacity: var(--mdw-chip__selected-opacity-value);
20
+ --mdw-chip__outlined-opacity: var(--mdw-chip__outlined-opacity-value);
21
+ --mdw-chip__activated-opacity: var(--mdw-chip__activated-opacity-value);
22
+ }
6
23
 
7
- $themeValues: (
8
- text-color: (('foreground-light', 0.87), ('foreground-dark', 1.00)),
9
- background-color: (('foreground-light', 0.12), ('foreground-dark', 0.24)),
24
+ .mdw-theme[mdw-light] {
25
+ --mdw-chip__default-opacity-value: 0.12;
26
+ --mdw-chip__hover-opacity-value: 0.04;
27
+ --mdw-chip__focus-opacity-value: 0.12;
28
+ --mdw-chip__selected-opacity-value: 0.08;
29
+ --mdw-chip__outlined-opacity-value: 0.00;
30
+ --mdw-chip__activated-opacity-value: 0.12;
31
+ --mdw-chip__activated-text-color: inherit;
10
32
 
11
- // icon
12
- active-icon-color__focus: (('foreground-light', 0.87), ('foreground-dark', 1.00)),
13
- active-icon-color: (('foreground-light', 0.54), ('foreground-dark', 0.70)),
14
- inactive-icon-color: (('foreground-light', 0.38), ('foreground-dark', 0.50)),
33
+ --mdw-chip__pressed-opacity: 0.16;
15
34
 
16
- // states
17
- overlay-color: (('foreground-light', 1.00), ('foreground-dark', 1.00)),
35
+ --mdw-chip__disabled-text-color: RGBA(var(--mdw-ink-default-light), 0.26);
36
+ }
18
37
 
19
- default-opacity: (0.12 , 0.24),
20
- hover-opacity: (0.12 + 0.04 , 0.24 + 0.08),
21
- focus-opacity: (0.12 + 0.12 , 0.24 + 0.24),
22
- hover-focus-opacity: (0.12 + 0.04 + 0.12, 0.24 + 0.08 + 0.24),
38
+ .mdw-theme[mdw-dark] {
39
+ --mdw-chip__default-opacity-value: 0.24;
40
+ --mdw-chip__hover-opacity-value: 0.08;
41
+ --mdw-chip__focus-opacity-value: 0.24;
42
+ --mdw-chip__selected-opacity-value: 0.16;
43
+ --mdw-chip__outlined-opacity-value: 0.00;
44
+ --mdw-chip__activated-opacity-value: 0.24;
45
+ --mdw-chip__activated-text-color: var(--mdw-text-color);
23
46
 
24
- selected-opacity: (0.12 + 0.08 , 0.24 + 0.16),
25
- selected-hover-opacity: (0.12 + 0.08 + 0.04 , 0.24 + 0.16 + 0.08),
26
- selected-focus-opacity: (0.12 + 0.08 + 0.12 , 0.24 + 0.16 + 0.24),
27
- selected-hover-focus-opacity: (0.12 + 0.08 + 0.04 + 0.12, 0.24 + 0.16 + 0.08 + 0.24),
47
+ --mdw-chip__pressed-opacity: 0.32;
28
48
 
29
- outlined-opacity: (0.00 , 0.00),
30
- outlined-hover-opacity: (0.04 , 0.08),
31
- outlined-focus-opacity: (0.12 , 0.24),
32
- outlined-hover-focus-opacity: (0.04 + 0.12, 0.08 + 0.24),
49
+ --mdw-chip__disabled-text-color: RGBA(var(--mdw-ink-default-dark), 0.30);
50
+ }
33
51
 
34
- outlined-selected-opacity: (0.08 , 0.16),
35
- outlined-selected-hover-opacity: (0.08 + 0.04 , 0.16 + 0.08),
36
- outlined-selected-focus-opacity: (0.08 + 0.12 , 0.16 + 0.24),
37
- outlined-selected-hover-focus-opacity: (0.08 + 0.04 + 0.12, 0.16 + 0.08 + 0.24),
52
+ .mdw-chip {
53
+ --mdw-chip__base-opacity: var(--mdw-chip__default-opacity);
54
+ --mdw-chip__border-color: transparent;
38
55
 
39
- activated-opacity: (0.12, 0.24),
56
+ &[mdw-outlined] {
57
+ --mdw-chip__base-opacity: var(--mdw-chip__outlined-opacity);
58
+ --mdw-chip__border-color: var(--mdw-chip__outline-color);
59
+ }
60
+ }
40
61
 
41
- activated-text-color: (inherit, ('foreground-dark', 1.00)),
62
+ .mdw-chip__thumbnail,
63
+ .mdw-chip__remove,
64
+ .mdw-chip__text {
65
+ color: var(--mdw-chip__text-color);
66
+ }
42
67
 
43
- activated-hover-opacity: (0.12 + 0.04, 0.24 + 0.4),
44
- activated-focus-opacity: (0.12 + 0.12, 0.24 + 0.12),
45
- activated-hover-focus-opacity: (0.12 + 0.04 + 0.12, 0.24 + 0.4 + 0.12),
68
+ .mdw-chip__input {
69
+ border-color: var(--mdw-chip__border-color);
70
+ color: inherit;
46
71
 
47
- pressed-opacity: (0.16, 0.32),
72
+ &:not(:hover) {
73
+ --mdw-chip__hover-opacity: 0;
74
+ }
48
75
 
49
- // disabled
50
- disabled-text-color: (('foreground-light', 0.26), ('foreground-dark', 0.30)),
51
- disabled-background-color: (('foreground-light', 0.12), ('foreground-dark', 0.12)),
52
- outline-color: (('foreground-light', 0.12), ('foreground-dark', 0.12)),
76
+ &:not(:focus) {
77
+ --mdw-chip__focus-opacity: 0;
78
+ }
53
79
 
54
- ) !default;
80
+ &:not(:checked) {
81
+ --mdw-chip__selected-opacity: 0;
82
+ }
55
83
 
56
- @function getThemeValue($key, $type) {
57
- @return theme.getThemeValue('chip', $themeValues, $key, $type);
58
- }
84
+ &::before {
85
+ opacity: calc(var(--mdw-chip__base-opacity) + var(--mdw-chip__hover-opacity) + var(--mdw-chip__focus-opacity) + var(--mdw-chip__selected-opacity));
59
86
 
60
- @mixin addThemeRules($type: 'var') {
61
- .mdw-chip__thumbnail,
62
- .mdw-chip__remove,
63
- .mdw-chip__text {
64
- color: RGBA(getThemeValue("text-color", $type));
87
+ background-color: var(--mdw-chip__overlay-color);
65
88
  }
66
89
 
67
- .mdw-chip__input {
90
+ &:checked::before {
68
91
  color: inherit;
69
-
70
- &::before {
71
- opacity: getThemeValue("default-opacity", $type);
72
-
73
- background-color: RGBA(getThemeValue("overlay-color", $type));
74
- }
75
-
76
- &:checked::before {
77
- color: inherit;
78
- }
79
-
80
- &:hover::before {
81
- opacity: getThemeValue("hover-opacity", $type);
82
- }
83
-
84
- &:focus::before {
85
- opacity: getThemeValue("focus-opacity", $type);
86
- }
87
-
88
- &:hover:focus::before {
89
- opacity: getThemeValue("hover-focus-opacity", $type);
90
- }
91
-
92
- &:checked {
93
- & ~ .mdw-chip__text {
94
- color: RGBA(getThemeValue("activated-text-color", $type));
95
- }
96
-
97
- &[type="radio"] {
98
- &::before {
99
- background: currentColor;
100
- }
101
- }
102
-
103
- &[type="checkbox"] {
104
- &::before {
105
- opacity: getThemeValue("selected-opacity", $type);
106
- }
107
-
108
- &:hover::before {
109
- opacity: getThemeValue("selected-hover-opacity", $type);
110
- }
111
-
112
- &:focus::before {
113
- opacity: getThemeValue("selected-focus-opacity", $type);
114
- }
115
-
116
- &:hover:focus::before {
117
- opacity: getThemeValue("selected-hover-focus-opacity", $type);
118
- }
119
- }
120
- }
121
92
  }
122
93
 
123
- .mdw-chip[mdw-outlined] .mdw-chip__input {
124
- border-color: RGBA(getThemeValue('outline-color', $type));
125
-
126
- &:not(:checked) {
127
- &::before {
128
- opacity: getThemeValue("outlined-opacity", $type);
129
- }
130
-
131
- &:hover::before {
132
- opacity: getThemeValue("outlined-hover-opacity", $type);
133
- }
134
-
135
- &:focus::before {
136
- opacity: getThemeValue("outlined-focus-opacity", $type);
137
- }
138
-
139
- &:hover:focus::before {
140
- opacity: getThemeValue("outlined-hover-focus-opacity", $type);
141
- }
94
+ &:checked {
95
+ & ~ .mdw-chip__text {
96
+ color: var(--mdw-chip__activated-text-color);
142
97
  }
143
98
 
144
- &:checked {
145
- &[type="checkbox"] {
146
- &::before {
147
- opacity: getThemeValue("outlined-selected-opacity", $type);
148
- }
149
-
150
- &:hover::before {
151
- opacity: getThemeValue("outlined-selected-hover-opacity", $type);
152
- }
153
-
154
- &:focus::before {
155
- opacity: getThemeValue("outlined-selected-focus-opacity", $type);
156
- }
157
-
158
- &:hover:focus::before {
159
- opacity: getThemeValue("outlined-selected-hover-focus-opacity", $type);
160
- }
99
+ &[type="radio"] {
100
+ &::before {
101
+ background: currentColor;
161
102
  }
162
103
  }
163
104
  }
164
105
  }
165
-
166
-
167
- @include theme.addComponentFallbackRules('light') {
168
- @include addThemeRules('light');
169
- }
170
-
171
- @include theme.addComponentFallbackRules('dark') {
172
- @include addThemeRules('dark');
173
- }
174
-
175
- @include theme.addComponentCSSVariableRules('chip', $themeValues) {
176
- @include addThemeRules();
177
- }
@@ -1,7 +1,5 @@
1
1
  // https://www.w3.org/TR/wai-aria-practices/#Listbox
2
2
 
3
- import { iterateArrayLike } from '../../core/dom.js';
4
-
5
3
  import * as ChipItem from './item.js';
6
4
 
7
5
  /**
@@ -9,7 +7,9 @@ import * as ChipItem from './item.js';
9
7
  * @return {void}
10
8
  */
11
9
  export function attach(element) {
12
- iterateArrayLike(element.getElementsByClassName('mdw-chip__item'), ChipItem.attach);
10
+ for (const el of element.getElementsByClassName('mdw-chip__item')) {
11
+ ChipItem.attach(el);
12
+ }
13
13
  }
14
14
 
15
15
  /**
@@ -17,5 +17,7 @@ export function attach(element) {
17
17
  * @return {void}
18
18
  */
19
19
  export function detach(element) {
20
- iterateArrayLike(element.getElementsByClassName('mdw-chip__item'), ChipItem.detach);
20
+ for (const el of element.getElementsByClassName('mdw-chip__item')) {
21
+ ChipItem.detach(el);
22
+ }
21
23
  }
@@ -6,7 +6,15 @@
6
6
  @use '../../core/_platform.scss' as platform;
7
7
  @use '../../core/_type.scss' as type;
8
8
 
9
- $iconSize: dp(16) !default;
9
+ $iconSize: 16px !default;
10
+
11
+ :root {
12
+ --mdw-datatable__footer-controls-transform: scaleX(1);
13
+
14
+ &[dir="rtl"] {
15
+ --mdw-datatable__footer-controls-transform: scaleX(-1);
16
+ }
17
+ }
10
18
 
11
19
  .mdw-datatable {
12
20
  display: flex;
@@ -18,28 +26,22 @@ $iconSize: dp(16) !default;
18
26
 
19
27
  border-collapse: collapse;
20
28
 
21
- width: 100%;
29
+ inline-size: 100%;
22
30
  }
23
31
 
24
32
  .mdw-datatable caption,
25
33
  .mdw-datatable__header {
26
34
  @include type.addRules('h6');
27
- min-height: dp(64);
35
+ min-block-size: 64px;
28
36
  }
29
37
 
30
38
  .mdw-datatable caption {
31
39
  caption-side: top;
32
40
 
33
- padding: 0 dp(16);
41
+ padding: 0 16px;
34
42
 
35
- line-height: dp(64);
36
- text-align: left;
43
+ line-height: 64px;
37
44
  text-align: start;
38
-
39
- :root[dir="rtl"] & {
40
- text-align: right;
41
- text-align: start;
42
- }
43
45
  }
44
46
 
45
47
  .mdw-datatable__header {
@@ -62,34 +64,26 @@ $iconSize: dp(16) !default;
62
64
  }
63
65
 
64
66
  .mdw-datatable__header-text {
65
- padding-right: 0;
66
- padding-left: dp(16);
67
-
68
- :root[dir="rtl"] & {
69
- padding-right: dp(16);
70
- padding-left: 0;
71
- }
67
+ padding-inline: 16px 0;
72
68
  }
73
69
 
74
70
  .mdw-datatable tr {
75
- height: dp(48);
76
- border-bottom-style: solid;
77
- border-bottom-width: dp(1);
71
+ block-size: 48px;
72
+ border-block-end-style: solid;
73
+ border-block-end-width: 1px;
78
74
 
79
75
  outline: none;
80
76
  }
81
77
 
82
78
  .mdw-datatable thead > tr {
83
- height: dp(48);
79
+ block-size: 48px;
84
80
  }
85
81
 
86
-
87
82
  .mdw-datatable td {
88
83
  @include type.addRules('body-2');
89
84
  // text-align: left;
90
85
  // Expected line-height is 20dp. Support two lines within 48dp
91
- padding-top: dp(4);
92
- padding-bottom: dp(4 - 1); // Remove bottom border width
86
+ padding-block: 4px 3px; // Remove 1px bottom border width
93
87
 
94
88
  outline: none;
95
89
 
@@ -102,8 +96,7 @@ $iconSize: dp(16) !default;
102
96
 
103
97
  .mdw-datatable th,
104
98
  .mdw-datatable td {
105
- padding-right: dp(16);
106
- padding-left: dp(16);
99
+ padding-inline: 16px;
107
100
 
108
101
  text-align: center;
109
102
 
@@ -112,56 +105,27 @@ $iconSize: dp(16) !default;
112
105
  }
113
106
 
114
107
  &[mdw-text] {
115
- text-align: left;
116
108
  text-align: start;
117
-
118
- :root[dir="rtl"] & {
119
- text-align: right;
120
- text-align: start;
121
- }
122
109
  }
123
110
 
124
111
  &[mdw-number] {
125
- text-align: right;
126
112
  text-align: end;
127
-
128
- :root[dir="rtl"] & {
129
- text-align: left;
130
- text-align: end;
131
- }
132
113
  }
133
114
 
134
115
  &[mdw-primary-column] {
135
- width: 100%;
136
- border-right-style: solid;
137
- border-width: dp(1);
138
-
139
- :root[dir="rtl"] & {
140
- border-right-style: none;
141
- border-left-style: solid;
142
- }
116
+ inline-size: 100%;
117
+ border-width: 1px;
118
+ border-inline-end-style: solid;
143
119
  }
144
120
  }
145
121
 
146
122
  .mdw-datatable th[mdw-selector] {
147
- width: dp(24);
148
- padding-right: 0;
149
- padding-left: dp(16);
150
-
151
- :root[dir="rtl"] & {
152
- padding-right: dp(16);
153
- padding-left: 0;
154
- }
123
+ inline-size: 24px;
124
+ padding-inline: 16px 0;
155
125
 
156
126
  & + td,
157
127
  & + th {
158
- padding-right: dp(16);
159
- padding-left: dp(12);
160
-
161
- :root[dir="rtl"] & {
162
- padding-right: dp(12);
163
- padding-left: dp(16);
164
- }
128
+ padding-inline: 12px 16px;
165
129
  }
166
130
  }
167
131
 
@@ -169,7 +133,7 @@ $iconSize: dp(16) !default;
169
133
  display: inline-block;
170
134
  vertical-align: text-bottom;
171
135
 
172
- max-width: 0;
136
+ max-inline-size: 0;
173
137
 
174
138
  transition-duration: motion.$shapeChangeDuration;
175
139
  transition-property: transform;
@@ -223,66 +187,39 @@ $iconSize: dp(16) !default;
223
187
  flex-direction: row;
224
188
  justify-content: flex-end;
225
189
 
226
- min-height: dp(56);
190
+ min-block-size: 56px;
227
191
  flex: none;
228
192
  }
229
193
 
230
- .mdw-datatable__header,
231
- .mdw-datatable__footer {
232
- @include platform.ifIE() {
233
- // Fix IE min-height flexbug
234
- &::after {
235
- content: '';
236
-
237
- min-height: inherit;
238
- width: 0;
239
- }
240
- }
241
- }
242
-
243
194
  .mdw-datatable__footer-options,
244
195
  .mdw-datatable__footer-details {
245
- margin-right: dp(28);
246
- margin-left: dp(2);
247
-
248
- :root[dir="rtl"] & {
249
- margin-right: dp(2);
250
- margin-left: dp(28);
251
- }
196
+ margin-inline: 2px 28px;
252
197
  }
253
198
 
254
199
  .mdw-datatable__header-controls,
255
200
  .mdw-datatable__footer-controls {
256
201
  display: inline-flex;
257
202
 
258
- margin-right: dp(4);
259
- margin-left: dp(4);
203
+ margin-inline: 4px;
260
204
 
261
205
  .mdw-button {
262
- margin: 0 dp(4);
206
+ margin: 0 4px;
263
207
  }
264
208
  }
265
209
 
266
210
  .mdw-datatable__footer-controls {
267
- direction: ltr;
268
-
269
- :root[dir="rtl"] & {
270
- transform: scaleX(-1);
211
+ .mdw-button {
212
+ transform: var(--mdw-datatable__footer-controls-transform);
271
213
  }
272
214
  }
273
215
 
274
216
  .mdw-datatable__footer-options {
275
217
  display: flex;
276
218
  align-items: center;
277
-
278
- select.mdw-textfield__input {
279
- min-width: dp(40 + 24);
280
219
 
281
- direction: rtl;
220
+ select.mdw-textfield__input {
221
+ min-inline-size: 64px; // 40 + 24;
282
222
 
283
- :root[dir="rtl"] & {
284
- direction: ltr;
285
- }
223
+ text-align: end;
286
224
  }
287
225
  }
288
-