@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
@@ -6,17 +6,19 @@
6
6
  @use '../../core/_motion.scss' as motion;
7
7
  @use '../../core/_platform.scss' as platform;
8
8
  @use '../../core/_type.scss' as type;
9
- @use './_mixins.scss' as *;
10
9
 
11
- $border-line-height: dp(1) !default;
12
- $border-line-height__focused: dp(2) !default;
10
+ $border-line-height: 1px !default;
11
+ $border-line-height__focused: 2px !default;
13
12
 
14
- $textarea-padding-horizontal: dp(16) !default;
15
- $outline-start-width: dp(10) !default;
16
- $outline-end-width: dp(8) !default;
13
+ $textarea-padding-horizontal: 16px !default;
14
+ $outline-start-width: 10px !default;
15
+ $outline-end-width: 8px !default;
17
16
 
18
17
  $input-top-alignment: calc(#{dp(8 + 4)} + #{sp(12)} + 0.125em) !default; // Extra 1/8em for font alignment
19
- $input-bottom-alignment: dp(8) !default;
18
+ $input-bottom-alignment: 8px !default;
19
+ $input-dense-reduction: 8px !default;
20
+ $input-top-alignment-dense: calc(#{dp(8 + 2)} + #{sp(12)} + 0.125em) !default;
21
+ $input-bottom-alignment-dense: 4px !default;
20
22
 
21
23
  // CSS Grid Layout
22
24
  // 1 | 2 | 3 | 4 | 5 | 6 | 7
@@ -28,29 +30,24 @@ $input-bottom-alignment: dp(8) !default;
28
30
  // 2: Dropdown ---------------------------------------------------
29
31
 
30
32
  .mdw-textfield {
31
- display: -ms-grid;
32
33
  display: grid;
33
34
  position: relative;
34
35
  align-items: baseline;
35
- grid-template-columns: dp(12) auto auto 1fr auto auto dp(8);
36
- -ms-grid-columns: dp(12) auto auto 1fr auto auto dp(8);
36
+ grid-template-columns: 12px auto auto 1fr auto auto 8px;
37
37
  grid-template-rows: auto auto;
38
- -ms-grid-rows: auto auto;
39
38
 
40
- padding: dp(8) 0;
39
+ padding: 8px 0;
41
40
 
42
41
  transition-duration: motion.$simpleDuration;
43
42
  transition-timing-function: motion.$standardEasing;
44
43
 
45
-
46
- &[mdw-solo] {
44
+ &[mdw-solo],
45
+ &[mdw-solo][mdw-dense] {
47
46
  grid-template-columns: 0 auto auto 1fr auto auto 0;
48
- -ms-grid-columns: 0 auto auto 1fr auto auto 0;
49
47
 
50
48
  padding: 0;
51
49
 
52
50
  .mdw-textfield__input {
53
- -ms-grid-row-align: center;
54
51
  align-self: center;
55
52
 
56
53
  margin: 0;
@@ -78,62 +75,60 @@ $input-bottom-alignment: dp(8) !default;
78
75
 
79
76
  display: inline-block;
80
77
 
81
- -ms-grid-column: 4;
82
78
  grid-column: 4;
83
- -ms-grid-row: 1;
84
79
  grid-row: 1;
85
80
 
86
81
  box-sizing: content-box; // Don't allow global override
87
- height: 1em;
88
- margin-top: dp(8 + 4);
89
- margin-bottom: dp(16);
90
- padding-top: sp(12);
82
+ block-size: 1em;
83
+ margin-block: dp(8 + 4) 16px;
84
+ padding-block-start: sp(12);
85
+
86
+ }
87
+
88
+ .mdw-textfield[mdw-dense]::before {
89
+ margin-block: 8px 12px;
91
90
  }
92
91
 
93
92
  .mdw-textfield[mdw-solo],
93
+ .mdw-textfield[mdw-solo][mdw-dense],
94
94
  .mdw-textfield[mdw-outlined] {
95
95
  .mdw-textfield__prefix,
96
96
  .mdw-textfield__suffix,
97
97
  .mdw-textfield__icon {
98
- -ms-grid-row-align: center;
99
98
  align-self: center;
100
99
 
101
- margin-top: 0;
102
- margin-bottom: 0;
100
+ margin-block: 0;
103
101
  }
104
102
 
105
103
  textarea.mdw-textfield__input {
106
104
  & ~ .mdw-textfield__prefix,
107
105
  & ~ .mdw-textfield__suffix {
108
- -ms-grid-row-align: start;
109
106
  align-self: flex-start;
110
107
 
111
- margin-top: dp(8);
112
- margin-bottom: dp(8);
108
+ margin-block: 0;
109
+
110
+ transform: translateY(calc((8px + sp(12) + 4px + 1em + 16px) * 0.5)) translateY(-50%);
113
111
  }
114
112
  }
115
113
  }
116
114
 
117
115
  .mdw-textfield__prefix,
118
116
  .mdw-textfield__suffix {
119
- -ms-grid-row: 1;
120
117
  grid-row: 1;
121
-
118
+
119
+ pointer-events: none;
120
+
122
121
  transition-duration: motion.$simpleDuration;
123
122
  transition-property: color;
124
123
  transition-timing-function: motion.$standardEasing;
125
124
  will-change: color;
126
-
127
- pointer-events: none;
128
125
  }
129
126
 
130
127
  .mdw-textfield__prefix {
131
- -ms-grid-column: 3;
132
128
  grid-column: 3;
133
129
  }
134
130
 
135
131
  .mdw-textfield__suffix {
136
- -ms-grid-column: 6;
137
132
  grid-column: 6;
138
133
  }
139
134
 
@@ -143,35 +138,27 @@ $input-bottom-alignment: dp(8) !default;
143
138
 
144
139
  display: inline-block;
145
140
 
146
- width: dp(4);
141
+ inline-size: 4px;
147
142
  }
148
143
 
149
144
  .mdw-textfield__outline-gap {
150
145
  // Using transform would create a new composition layer and cause subpixel rendering issues
151
146
  position: absolute;
152
- top: $border-line-height__focused;
153
- right: dp(12);
154
- bottom: 0;
155
- left: dp(12);
156
- -ms-grid-column: 2;
147
+ inset-block: $border-line-height__focused 0;
148
+ inset-inline: dp(12);
149
+
157
150
  grid-column: 2;
158
- -ms-grid-row: 1;
159
151
  grid-row: 1;
160
152
 
161
- margin-top: -$border-line-height__focused;
162
- margin-bottom: -$border-line-height;
153
+ margin-block: -$border-line-height__focused #{-$border-line-height};
163
154
 
164
155
  .mdw-textfield[mdw-outlined] & {
165
156
  position: relative;
166
- top: auto;
167
- right: auto;
168
- bottom: auto;
169
- left: auto;
170
-
171
- max-width: calc(100% - #{dp(24)});
172
- margin-top: -$border-line-height;
173
- margin-bottom: -$border-line-height;
174
-
157
+ inset: auto;
158
+
159
+ max-inline-size: calc(100% - 24px);
160
+ margin-block: -$border-line-height;
161
+
175
162
  color: inherit;
176
163
  }
177
164
 
@@ -180,10 +167,10 @@ $input-bottom-alignment: dp(8) !default;
180
167
  content: none;
181
168
 
182
169
  position: absolute;
183
- top: 0;
170
+ inset-block-start: 0;
184
171
 
185
- border-top-style: solid;
186
- border-top-width: $border-line-height;
172
+ border-block-start-style: solid;
173
+ border-block-start-width: $border-line-height;
187
174
 
188
175
  transition-delay: 1ms;
189
176
  transition-duration: motion.$simpleDuration * 0.5;
@@ -196,14 +183,17 @@ $input-bottom-alignment: dp(8) !default;
196
183
  content: "";
197
184
 
198
185
  // Height must exactly match parent to avoid subpixel rendering issues
199
- bottom: 0;
200
-
201
- border-style: none;
202
- border-top-style: solid;
203
- border-bottom-style: solid;
204
-
205
- border-top-color: currentColor;
206
- border-bottom-color: transparent;
186
+ inset-block-end: 0;
187
+
188
+ border-block-start-style: solid;
189
+ border-block-end-style: solid;
190
+
191
+ &:not(:focus) {
192
+ border-style: none;
193
+ }
194
+
195
+ border-block-start-color: currentColor;
196
+ border-block-end-color: transparent;
207
197
  border-radius: 0;
208
198
  color: inherit;
209
199
  }
@@ -213,22 +203,22 @@ $input-bottom-alignment: dp(8) !default;
213
203
  .mdw-textfield__border {
214
204
  display: flex;
215
205
  position: relative;
216
- -ms-grid-row-align: stretch;
217
206
  align-self: stretch;
218
- -ms-grid-column: 1;
219
207
  grid-column-start: 1;
220
- -ms-grid-column-span: 7;
221
208
  grid-column-end: span 7;
222
- -ms-grid-row: 1;
223
209
  grid-row: 1;
224
210
 
225
211
  box-sizing: border-box;
226
- min-width: 100%; // Fixes FireFox Grid bug
227
- border-top-style: none;
228
- border-right-style: none;
229
- border-bottom-style: solid;
230
- border-left-style: none;
212
+ min-inline-size: 100%; // Fixes FireFox Grid bug
213
+ border-block-start-style: none;
214
+ border-block-end-style: solid;
231
215
  border-width: $border-line-height;
216
+ border-start-start-radius: 4px;
217
+ border-start-end-radius: 4px;
218
+ border-end-start-radius: 0;
219
+ border-end-end-radius: 0;
220
+ border-inline-start-style: none;
221
+ border-inline-end-style: none;
232
222
 
233
223
  cursor: pointer;
234
224
  -webkit-tap-highlight-color: transparent;
@@ -238,25 +228,21 @@ $input-bottom-alignment: dp(8) !default;
238
228
  transition-property: color, border-color;
239
229
  transition-timing-function: motion.$standardEasing;
240
230
 
241
- border-top-color: transparent;
242
- border-right-color: transparent;
243
- border-bottom-color: currentColor;
244
- border-left-color: transparent;
245
- border-top-left-radius: dp(4);
246
- border-top-right-radius: dp(4);
247
- border-bottom-right-radius: 0;
248
- border-bottom-left-radius: 0;
231
+ border-block-start-color: transparent;
232
+ border-block-end-color: currentColor;
233
+ border-inline-start-color: transparent;
234
+ border-inline-end-color: transparent;
249
235
 
250
236
  .mdw-textfield[mdw-outlined] & {
251
- border-top-style: solid;
252
- border-right-style: solid;
253
- border-bottom-style: solid;
254
- border-left-style: solid;
237
+ border-block-start-style: solid;
238
+ border-block-end-style: solid;
239
+ border-end-start-radius: 4px;
255
240
 
256
- transition: none;
241
+ border-end-end-radius: 4px;
242
+ border-inline-start-style: solid;
243
+ border-inline-end-style: solid;
257
244
 
258
- border-bottom-right-radius: dp(4);
259
- border-bottom-left-radius: dp(4);
245
+ transition: none;
260
246
  }
261
247
 
262
248
  .mdw-textfield__input:focus ~ & {
@@ -272,12 +258,11 @@ $input-bottom-alignment: dp(8) !default;
272
258
  content: "";
273
259
 
274
260
  position: absolute;
275
- right: 0;
276
- bottom: -$border-line-height__focused;
277
- left: 0;
261
+ inset-block-end: -$border-line-height__focused;
262
+ inset-inline: 0;
278
263
 
279
- height: 100%;
280
- border-bottom-style: solid;
264
+ block-size: 100%;
265
+ border-block-end-style: solid;
281
266
  border-width: $border-line-height__focused;
282
267
 
283
268
  transition-delay: 1ms;
@@ -286,19 +271,16 @@ $input-bottom-alignment: dp(8) !default;
286
271
  transition-timing-function: motion.$accelerateEasing;
287
272
  will-change: transform;
288
273
 
289
- transform: scaleX(0) translateY(-$border-line-height*0.5);
274
+ transform: scaleX(0) translateY(-$border-line-height * 0.5);
290
275
 
291
276
  border-radius: inherit;
292
277
  color: transparent;
293
-
278
+
294
279
  .mdw-textfield[mdw-outlined] & {
295
280
  content: "";
296
281
 
297
282
  position: relative;
298
- top: auto;
299
- right: auto;
300
- bottom: auto;
301
- left: auto;
283
+ inset: auto;
302
284
 
303
285
  transition: none;
304
286
  will-change: auto;
@@ -313,56 +295,50 @@ $input-bottom-alignment: dp(8) !default;
313
295
  flex-grow: 1;
314
296
  }
315
297
 
316
- .mdw-textfield[mdw-outlined] &::before,
317
- :root[dir="rtl"] .mdw-textfield[mdw-outlined] &::after {
318
- min-width: $outline-start-width - $border-line-height;
319
- margin-top: -$border-line-height;
320
- margin-right: 0;
321
- margin-left: -$border-line-height;
322
- border-top-style: solid;
323
- border-right-style: none;
324
- border-bottom-style: solid;
325
- border-left-style: solid;
298
+ .mdw-textfield[mdw-outlined] &::before {
299
+ min-inline-size: $outline-start-width - $border-line-height;
300
+ margin-block-start: -$border-line-height;
301
+ margin-inline: -$border-line-height 0;
302
+ border-block-start-style: solid;
303
+ border-block-end-style: solid;
326
304
  border-width: inherit;
305
+ border-start-start-radius: inherit;
306
+ border-start-end-radius: 0;
307
+ border-end-start-radius: inherit;
308
+ border-end-end-radius: 0;
309
+ border-inline-start-style: solid;
310
+ border-inline-end-style: none;
327
311
 
328
- border-top-color: currentColor;
329
- border-right-color: transparent;
330
- border-bottom-color: transparent;
331
- border-left-color: currentColor;
332
- border-top-left-radius: inherit;
333
- border-top-right-radius: 0;
334
- border-bottom-right-radius: 0;
335
- border-bottom-left-radius: inherit;
336
- }
337
-
338
- .mdw-textfield[mdw-outlined] &::after,
339
- :root[dir="rtl"] .mdw-textfield[mdw-outlined] &::before {
340
- min-width: $outline-end-width - $border-line-height;
341
- margin-top: -$border-line-height;
342
- margin-right: -$border-line-height;
343
- margin-left: 0;
344
- border-top-style: solid;
345
- border-right-style: solid;
346
- border-bottom-style: solid;
347
- border-left-style: none;
348
- border-width: inherit;
312
+ border-block-start-color: currentColor;
313
+ border-block-end-color: transparent;
314
+ border-inline-start-color: currentColor;
315
+ border-inline-end-color: transparent;
316
+ }
349
317
 
350
- border-top-color: currentColor;
351
- border-right-color: currentColor;
352
- border-bottom-color: transparent;
353
- border-left-color: transparent;
354
- border-top-left-radius: 0;
355
- border-top-right-radius: inherit;
356
- border-bottom-right-radius: inherit;
357
- border-bottom-left-radius: 0;
318
+ .mdw-textfield[mdw-outlined] &::after {
319
+ min-inline-size: $outline-end-width - $border-line-height;
320
+ margin-block-start: -$border-line-height;
321
+ margin-inline: 0 #{-$border-line-height};
322
+ border-block-start-style: solid;
323
+ border-block-end-style: solid;
324
+ border-width: inherit;
325
+ border-start-start-radius: 0;
326
+ border-start-end-radius: inherit;
327
+ border-end-start-radius: 0;
328
+ border-end-end-radius: inherit;
329
+ border-inline-start-style: none;
330
+ border-inline-end-style: solid;
331
+
332
+ border-block-start-color: currentColor;
333
+ border-block-end-color: transparent;
334
+ border-inline-start-color: transparent;
335
+ border-inline-end-color: currentColor;
358
336
  }
359
337
  }
360
338
 
361
339
  .mdw-textfield__label {
362
340
  position: absolute;
363
- right: 0;
364
- left: 0;
365
- -ms-grid-row-align: start;
341
+ inset-inline: 0;
366
342
  align-self: flex-start;
367
343
  overflow-x: hidden;
368
344
  overflow-y: hidden;
@@ -370,36 +346,35 @@ $input-bottom-alignment: dp(8) !default;
370
346
  margin: 0;
371
347
  padding: 0;
372
348
 
349
+ pointer-events: none; // allow clickthrough
350
+
373
351
  transition-duration: motion.$shapeChangeDuration;
374
352
  transition-property: top, transform, font-size;
375
353
  transition-timing-function: motion.$standardEasing;
376
354
  will-change: top, transform, font-size;
377
355
 
378
- pointer-events: none; // allow clickthrough
379
-
380
356
  text-overflow: ellipsis;
381
357
  white-space: nowrap;
382
358
 
383
359
  .mdw-textfield[mdw-outlined] & {
384
360
  position: relative; // reflow DOM
385
361
 
386
- padding: 0 dp(4);
362
+ padding: 0 4px;
387
363
  }
388
364
 
389
-
390
365
  &::before {
391
366
  // Add upper 8dp from text-top to top for positioning
392
367
  // Add lower 8dp from baseline to keep vertically centered
393
368
  @include type.addRules('caption');
394
369
  content: "";
395
-
370
+
396
371
  display: inline-block;
397
- vertical-align: dp(-8);
372
+ vertical-align: -8px;
398
373
 
399
374
  box-sizing: content-box; // Don't allow global override
400
- height: 1em;
401
- margin-top: dp(8);
402
- padding-top: dp(8);
375
+ block-size: 1em;
376
+ margin-block-start: 8px;
377
+ padding-block-start: 8px;
403
378
 
404
379
  .mdw-textfield[mdw-outlined] & {
405
380
  content: none;
@@ -408,79 +383,67 @@ $input-bottom-alignment: dp(8) !default;
408
383
  }
409
384
 
410
385
  .mdw-textfield__signifier {
411
- -ms-grid-row-align: center;
412
386
  align-self: center;
413
- -ms-grid-column: 2;
414
387
  grid-column: 2;
415
- -ms-grid-row: 1;
416
388
  grid-row: 1;
417
389
 
418
- margin-top: dp(8);
419
- margin-bottom: dp(8);
390
+ margin-block: 8px;
420
391
 
421
392
  &::after {
422
393
  content: "";
423
394
 
424
395
  display: inline-block;
425
396
 
426
- width: dp(8);
397
+ inline-size: 8px;
427
398
  }
428
399
 
429
400
  & ~ .mdw-textfield__border .mdw-textfield__outline-gap {
430
- margin-right: 0;
431
- margin-left: dp(24 + 8);
432
-
433
- :root[dir="rtl"] & {
434
- margin-right: dp(24 + 8);
435
- margin-left: 0;
436
- }
401
+ margin-inline: dp(24 + 8) 0;
437
402
  }
438
403
 
439
404
  .mdw-textfield[mdw-outlined] & ~ .mdw-textfield__border {
440
405
  &::before {
441
- padding-right: dp(24 + 8);
442
- padding-left: 0;
443
-
444
- :root[dir="rtl"] & {
445
- padding-right: 0;
446
- padding-left: dp(24 + 8);
447
- }
406
+ padding-inline: 0 dp(24 + 8);
448
407
  }
449
408
 
450
409
  .mdw-textfield__outline-gap {
451
- max-width: calc(100% - #{dp(24 + 24 + 8)});
452
- margin-left: 0;
453
-
454
- :root[dir="rtl"] & {
455
- margin-right: 0;
456
- }
410
+ max-inline-size: calc(100% - #{dp(24 + 24 + 8)});
411
+ margin-inline-start: 0;
412
+ }
413
+ }
414
+ }
457
415
 
416
+ .mdw-textfield[mdw-outlined] {
417
+ &,
418
+ &[mdw-dense], {
419
+ .mdw-textfield__input,
420
+ textfield.mdw-textfield__input,
421
+ .mdw-textfield__prefix,
422
+ .mdw-textfield__suffix {
423
+ margin-block: calc(#{sp(6)} + 2px); // Half of label + 2px // Equidistant from border
458
424
  }
459
425
  }
460
426
  }
461
427
 
462
428
  .mdw-textfield__input {
463
- -ms-grid-column: 4;
464
429
  grid-column-start: 4;
465
- -ms-grid-column-span: 2;
466
430
  grid-column-end: span 2;
467
- -ms-grid-row: 1;
468
431
  grid-row: 1;
469
-
432
+
470
433
  box-sizing: border-box;
471
- min-width: 0; // Firefox CSS Grid fix
472
- width: 100%;
434
+ min-inline-size: 0; // Firefox CSS Grid fix
435
+ inline-size: 100%;
473
436
  border: none;
474
437
  padding: 0;
475
-
438
+
476
439
  -moz-appearance: none;
477
440
  -webkit-appearance: none;
478
441
  appearance: none;
479
442
  outline: none;
480
443
  -webkit-tap-highlight-color: transparent;
481
-
444
+
482
445
  z-index: 1;
483
-
446
+
484
447
  background: none;
485
448
  box-shadow: none; // Firefox :invalid styling
486
449
 
@@ -491,18 +454,11 @@ $input-bottom-alignment: dp(8) !default;
491
454
  letter-spacing: inherit;
492
455
 
493
456
  .mdw-textfield[mdw-outlined] & {
494
- -ms-grid-row-align: center;
495
457
  align-self: center;
496
458
 
497
- margin-top: calc(#{sp(6)} + #{dp(2)}); // Half of label + 2px
498
- margin-bottom: calc(#{sp(6)} + #{dp(2)}); // Equidistant from border
499
- border-right: none;
500
- border-left: dp(2) solid transparent;
501
-
502
- :root[dir="rtl"] & {
503
- border-right: dp(2) solid transparent;
504
- border-left: none;
505
- }
459
+ margin-block: calc(#{sp(6)} + 2px); // Half of label + 2px // Equidistant from border
460
+ border-inline-start: 2px solid transparent;
461
+ border-inline-end: none;
506
462
  }
507
463
 
508
464
  &::placeholder {
@@ -525,11 +481,16 @@ $input-bottom-alignment: dp(8) !default;
525
481
  .mdw-textfield__input,
526
482
  .mdw-textfield__prefix,
527
483
  .mdw-textfield__suffix {
528
- -ms-grid-row-align: flex-start;
529
484
  align-self: flex-start;
530
485
 
531
- margin-top: $input-top-alignment;
532
- margin-bottom: $input-bottom-alignment;
486
+ margin-block: $input-top-alignment $input-bottom-alignment;
487
+
488
+ // margin-top: $input-top-alignment-dense;
489
+ // margin-bottom: $input-bottom-alignment-dense;
490
+ .mdw-textfield[mdw-dense] > & {
491
+ // margin-top: $input-top-alignment-dense;
492
+ // margin-bottom: $input-bottom-alignment-dense;
493
+ }
533
494
  }
534
495
 
535
496
  textarea.mdw-textfield__input {
@@ -537,42 +498,31 @@ textarea.mdw-textfield__input {
537
498
  overflow-y: auto;
538
499
  -webkit-overflow-scrolling: touch;
539
500
 
540
- min-height: 1em; // Avoid clipping on resize
541
- min-width: 100%; // Always fill container horizontally
542
- max-width: 100%; // Don't allow resize beyond bounds
543
- margin-top: $input-top-alignment;
544
- margin-bottom: $input-bottom-alignment;
545
- padding-right: $textarea-padding-horizontal;
546
- padding-left: 0;
501
+ min-block-size: 1em; // Avoid clipping on resize
502
+ min-inline-size: 100%; // Always fill container horizontally
503
+ max-inline-size: 100%; // Don't allow resize beyond bounds
504
+ inline-size: 100% !important; // Unfortunately required
505
+ margin-block: $input-top-alignment $input-bottom-alignment;
506
+ padding-inline: 0 $textarea-padding-horizontal;
547
507
 
548
- :root[dir="rtl"] & {
549
- padding-right: 0;
550
- padding-left: $textarea-padding-horizontal;
508
+ // margin-top: $input-top-alignment-dense;
509
+ // margin-bottom: $input-bottom-alignment-dense;
510
+ .mdw-textfield[mdw-dense] > & {
511
+ margin-block: $input-top-alignment-dense $input-bottom-alignment-dense;
551
512
  }
552
513
 
553
514
  .mdw-textfield[mdw-autosize] > & {
554
- min-height: 1em;
515
+ min-block-size: 1em;
555
516
 
556
517
  resize: none;
557
518
  }
558
519
  }
559
520
 
560
521
  select.mdw-textfield__input {
561
- padding-right: dp(24);
562
- padding-left: 0;
522
+ padding-inline: 0 24px;
563
523
 
564
524
  cursor: pointer;
565
525
 
566
- :root[dir="rtl"] & {
567
- padding-right: 0;
568
- padding-left: dp(24);
569
- }
570
-
571
- &::-ms-expand {
572
- // Remove IE11 dropdown button
573
- display: none;
574
- }
575
-
576
526
  option {
577
527
  -moz-appearance: none;
578
528
  -webkit-appearance: none;
@@ -593,11 +543,8 @@ select.mdw-textfield__input {
593
543
  .mdw-textfield__error-text {
594
544
  @include type.textTopToTop(4);
595
545
  @include type.addRules('caption');
596
- -ms-grid-column: 3;
597
546
  grid-column: 3;
598
- -ms-grid-column-span: 4;
599
547
  grid-column-end: span 4;
600
- -ms-grid-row: 2;
601
548
  grid-row: 2;
602
549
  overflow: hidden;
603
550
 
@@ -607,15 +554,12 @@ select.mdw-textfield__input {
607
554
 
608
555
  .mdw-textfield__icon {
609
556
  display: flex;
610
- -ms-grid-row-align: center;
611
557
  align-self: center;
612
- -ms-grid-column: 5;
613
558
  grid-column: 5;
614
- -ms-grid-row: 1;
615
559
  grid-row: 1;
616
-
617
- height: dp(24);
618
- width: dp(24);
560
+
561
+ block-size: 24px;
562
+ inline-size: 24px;
619
563
 
620
564
  &[mdw-dropdown] {
621
565
  pointer-events: none;
@@ -624,32 +568,32 @@ select.mdw-textfield__input {
624
568
  content: "";
625
569
 
626
570
  // Triangle shape
627
- width: 0;
628
- margin-top: dp(10);
629
- margin-right: auto;
630
- margin-left: auto;
631
- border-top: dp(5) solid currentColor;
632
- border-right: dp(5) solid transparent;
633
- border-left: dp(5) solid transparent;
571
+ inline-size: 0;
572
+ margin-block-start: 10px;
573
+ margin-inline: auto;
574
+ border-block-start: 5px solid currentColor;
575
+ border-inline-start: 5px solid transparent;
576
+ border-inline-end: 5px solid transparent;
634
577
  }
635
578
  }
636
579
  }
637
580
 
638
581
  .mdw-textfield__dropdown {
639
582
  position: absolute;
640
- -ms-grid-column: 1;
641
583
  grid-column: 1;
642
- -ms-grid-column-span: 7;
643
584
  grid-column-end: span 7;
644
- -ms-grid-row: 2;
645
585
  grid-row: 2;
646
586
  overflow: hidden;
647
587
 
648
- max-height: 0;
649
- max-width: 100%;
650
- width: 100%;
651
- margin-top: 0;
652
- margin-bottom: dp(8);
588
+ max-block-size: 0;
589
+ max-inline-size: 100%;
590
+ inline-size: 100%;
591
+ margin-block: 0 8px;
592
+
593
+ border-start-start-radius: 0;
594
+ border-start-end-radius: 0;
595
+ border-end-start-radius: 4px;
596
+ border-end-end-radius: 4px;
653
597
 
654
598
  transition-duration: motion.$collapseDuration;
655
599
  transition-property: box-shadow, max-height;
@@ -657,18 +601,13 @@ select.mdw-textfield__input {
657
601
 
658
602
  z-index: 2;
659
603
 
660
- border-top-left-radius: dp(0);
661
- border-top-right-radius: dp(0);
662
- border-bottom-right-radius: dp(4);
663
- border-bottom-left-radius: dp(4);
664
-
665
604
  box-shadow: none;
666
605
 
667
606
  .mdw-textfield[mdw-outlined] & {
668
- margin-top: dp(8);
607
+ margin-block-start: 8px;
669
608
 
670
- border-top-left-radius: dp(4);
671
- border-top-right-radius: dp(4);
609
+ border-start-start-radius: 4px;
610
+ border-start-end-radius: 4px;
672
611
  }
673
612
 
674
613
  &:active,
@@ -681,7 +620,7 @@ select.mdw-textfield__input {
681
620
  box-shadow: elevation.boxShadow(24);
682
621
 
683
622
  &[mdw-type="list"] {
684
- max-height: dp(300);
623
+ max-block-size: 300px;
685
624
  }
686
625
  }
687
626
  }
@@ -693,29 +632,51 @@ select.mdw-textfield__input {
693
632
 
694
633
  }
695
634
 
696
- // Default state of centered or when [mdw-value-empty] is present (IE)
697
- @include centerLabel();
635
+ .mdw-textfield__label {
636
+ @include type.addRules('subtitle');
637
+
638
+ inset-block-start: 50%;
698
639
 
699
- .mdw-textfield[mdw-value-empty] {
700
- @include centerLabel();
640
+ transform: translateY(-50%);
701
641
  }
702
642
 
703
- // Floating states:
704
- // IE/Edge, HTMLSelectElement, :focus, :autofill, or has texted (unfocused with placeholder)
643
+ .mdw-textfield__outline-gap {
644
+ &::before {
645
+ inset-inline: 0 50%;
646
+ }
705
647
 
706
- @include platform.ifMS() {
707
- @include floatLabel();
648
+ &::after {
649
+ inset-inline: 50% 0;
650
+ }
708
651
  }
709
652
 
710
- select.mdw-textfield__input ~ .mdw-textfield__border,
711
- .mdw-textfield__input:focus ~ .mdw-textfield__border {
712
- @include floatLabel();
713
- }
653
+ // Floating states:
654
+ // HTMLSelectElement, :focus, :autofill, or has texted (unfocused with placeholder)
714
655
 
715
- // Rules are intentionally separated because IE won't parse rules with unknown psuedos
656
+ select.mdw-textfield__input ~ .mdw-textfield__border,
657
+ .mdw-textfield__input:focus ~ .mdw-textfield__border,
716
658
  .mdw-textfield__input:-webkit-autofill ~ .mdw-textfield__border,
717
659
  .mdw-textfield__input:not(:placeholder-shown):not(:focus) ~ .mdw-textfield__border {
718
- @include floatLabel();
660
+ .mdw-textfield__label {
661
+ @include type.addRules('caption');
662
+ inset-block-start: 0;
663
+
664
+ transform: translateY(0);
665
+
666
+ .mdw-textfield[mdw-outlined] & {
667
+ transform: translateY(-50%);
668
+ }
669
+ }
670
+
671
+ .mdw-textfield__outline-gap {
672
+ &::before {
673
+ inset-inline: 0 100%;
674
+ }
675
+
676
+ &::after {
677
+ inset-inline: 100% 0;
678
+ }
679
+ }
719
680
  }
720
681
 
721
682
  // Invalid state
@@ -740,7 +701,7 @@ select.mdw-textfield__input ~ .mdw-textfield__border,
740
701
  transition-duration: motion.$expandDuration;
741
702
  transition-timing-function: motion.$decelerateEasing;
742
703
 
743
- transform: scaleX(1) translateY(-$border-line-height*0.5);
704
+ transform: scaleX(1) translateY(-$border-line-height * 0.5);
744
705
  }
745
706
  }
746
707
  }
@@ -750,34 +711,28 @@ select.mdw-textfield__input ~ .mdw-textfield__border,
750
711
  .mdw-textfield[mdw-outlined] > .mdw-textfield__input:not(:disabled):focus ~ .mdw-textfield__border {
751
712
  border-width: $border-line-height__focused;
752
713
 
753
- &::before,
754
- html[dir="rtl"] &::after {
755
- min-width: $outline-start-width - $border-line-height__focused;
756
- margin-top: -$border-line-height__focused;
757
- margin-right: 0;
758
- margin-left: -$border-line-height__focused;
714
+ &::before {
715
+ min-inline-size: $outline-start-width - $border-line-height__focused;
716
+ margin-block-start: -$border-line-height__focused;
717
+ margin-inline: -$border-line-height__focused 0;
759
718
  }
760
719
 
761
- &::after,
762
- html[dir="rtl"] &::before {
763
- min-width: $outline-end-width - $border-line-height__focused;
764
- margin-top: -$border-line-height__focused;
765
- margin-right: -$border-line-height__focused;
766
- margin-left: 0;
720
+ &::after {
721
+ min-inline-size: $outline-end-width - $border-line-height__focused;
722
+ margin-block-start: -$border-line-height__focused;
723
+ margin-inline: 0 -$border-line-height__focused;
767
724
  }
768
725
 
769
726
  .mdw-textfield__outline-gap {
770
- margin-top: -$border-line-height__focused;
771
- margin-bottom: -$border-line-height__focused;
727
+ margin-block: -$border-line-height__focused;
772
728
 
773
729
  &::before,
774
730
  &::after {
775
- border-top-width: $border-line-height__focused;
731
+ border-block-start-width: $border-line-height__focused;
776
732
  }
777
733
  }
778
734
  }
779
735
 
780
-
781
736
  // Invalid
782
737
  .mdw-textfield__input:focus:invalid ~ .mdw-textfield__error-text {
783
738
  transition-duration: motion.$fadeInDuration;
@@ -789,18 +744,17 @@ select.mdw-textfield__input ~ .mdw-textfield__border,
789
744
  transform: translateY(0);
790
745
  }
791
746
 
792
-
793
747
  @keyframes labelShake {
794
748
  0% {
795
749
  transform: translateX(0);
796
750
  }
797
751
 
798
752
  33% {
799
- transform: translateX(dp(4));
753
+ transform: translateX(4px);
800
754
  }
801
755
 
802
756
  66% {
803
- transform: translateX(dp(-4));
757
+ transform: translateX(-4px);
804
758
  }
805
759
 
806
760
  100% {