@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
@@ -2,64 +2,41 @@
2
2
  // https://material.io/design/components/buttons.html
3
3
  // https://material.io/design/iconography/system-icons.html#color
4
4
 
5
- @use '../../core/theme/_mixins.scss' as theme;
6
-
7
- $themeValues: (
8
- default-text-rgb: theme.$foreground,
9
- disabled-text-rgb: theme.$foreground,
10
- disabled-surface-text-rgb: theme.$foreground,
11
- disabled-surface-background-rgb: theme.$foreground,
12
- default-text-alpha: theme.$high-opacity,
13
- disabled-text-alpha: theme.$inactive-opacity,
14
- disabled-surface-text-alpha: theme.$high-opacity,
15
- disabled-surface-background-alpha: theme.$inactive-opacity,
16
- ) !default;
17
-
18
- @function getThemeValue($key, $type) {
19
- @return theme.getThemeValue('button', $themeValues, $key, $type);
5
+ .mdw-theme {
6
+ --mdw-button__default-text-rgb: var(--mdw-ink-default);
7
+ --mdw-button__disabled-text-rgb: var(--mdw-ink-default);
8
+ --mdw-button__disabled-surface-text-rgb: var(--mdw-ink-default);
9
+ --mdw-button__disabled-surface-background-rgb: var(--mdw-ink-default);
10
+ --mdw-button__default-text-opacity: var(--mdw-high-opacity);
11
+ --mdw-button__disabled-text-opacity: var(--mdw-inactive-opacity);
12
+ --mdw-button__disabled-surface-text-opacity: var(--mdw-high-opacity);
13
+ --mdw-button__disabled-surface-background-opacity: var(--mdw-inactive-opacity);
20
14
  }
21
15
 
22
- @mixin addThemeRules($type: 'var') {
23
- .mdw-button {
24
- &:disabled:not([aria-disabled="true"]) {
25
- color: RGBA(getThemeValue("disabled-text-rgb", $type), getThemeValue("disabled-text-alpha", $type));
16
+ .mdw-button {
17
+ &:disabled:not([aria-disabled="true"]) {
18
+ color: RGBA(var(--mdw-button__disabled-text-rgb), var(--mdw-button__disabled-text-opacity));
26
19
 
27
- &.mdw-overlay::before {
28
- display: none;
29
- }
20
+ &.mdw-overlay::before {
21
+ display: none;
30
22
  }
23
+ }
31
24
 
32
- &.mdw-overlay[aria-disabled="true"] {
33
- // Sets foreground to default ink color
34
- color: RGBA(getThemeValue("default-text-rgb", $type), getThemeValue("default-text-alpha", $type));
25
+ &.mdw-overlay[aria-disabled="true"] {
26
+ // Sets foreground to default ink color
27
+ color: RGBA(var(--mdw-button__default-text-rgb), var(--mdw-button__default-text-opacity));
35
28
 
36
- &[mdw-surface] {
37
- background-color: RGBA(getThemeValue("disabled-surface-background-rgb", $type), getThemeValue("disabled-surface-background-alpha", $type));
38
- color: RGBA(getThemeValue("disabled-surface-text-rgb", $type), getThemeValue("disabled-surface-text-alpha", $type));
29
+ &[mdw-surface] {
30
+ background-color: RGBA(var(--mdw-button__disabled-surface-background-rgb), var(--mdw-button__disabled-surface-background-opacity));
31
+ color: RGBA(var(--mdw-button__disabled-surface-text-rgb), var(--mdw-button__disabled-surface-text-opacity));
39
32
 
40
- // Disabled filled buttons use parent's theming context
41
- @if ($type == 'var') {
42
- &[mdw-dark],
43
- &[mdw-light] {
44
- --mdw-button__disabled-surface-text-rgb: inherit;
45
- --mdw-button__disabled-surface-text-opacity: inherit;
46
- --mdw-button__disabled-surface-background-rgb: inherit;
47
- --mdw-button__disabled-surface-background-opacity: inherit;
48
- }
49
- }
33
+ &[mdw-dark],
34
+ &[mdw-light] {
35
+ --mdw-button__disabled-surface-text-rgb: inherit;
36
+ --mdw-button__disabled-surface-text-opacity: inherit;
37
+ --mdw-button__disabled-surface-background-rgb: inherit;
38
+ --mdw-button__disabled-surface-background-opacity: inherit;
50
39
  }
51
40
  }
52
41
  }
53
42
  }
54
-
55
-
56
- @include theme.addComponentFallbackRules('light') {
57
- @include addThemeRules('light');
58
- }
59
- @include theme.addComponentFallbackRules('dark') {
60
- @include addThemeRules('dark');
61
- }
62
-
63
- @include theme.addComponentCSSVariableRules('button', $themeValues) {
64
- @include addThemeRules();
65
- }
@@ -1,4 +1,4 @@
1
- // https://material.io/design/components/cards.html#specs
1
+ /* https://material.io/design/components/cards.html#specs */
2
2
 
3
3
  @use "sass:math";
4
4
 
@@ -9,13 +9,30 @@
9
9
  @use '../../core/_platform.scss' as platform;
10
10
  @use '../../core/_type.scss' as type;
11
11
 
12
+ $horizontalPadding: 16px !default;
12
13
 
13
- $horizontalPadding: dp(16) !default;
14
+ :root {
15
+ --mdw-card__inline-start: left;
16
+ --mdw-card__inline-end: right;
17
+ --mdw-card__box-shadow: #{elevation.boxShadow(0)};
18
+ --mdw-card__border-color: inherit;
19
+
20
+ &[dir="rtl"] {
21
+ --mdw-card__inline-start: right;
22
+ --mdw-card__inline-end: left;
23
+ }
24
+
25
+ @include breakpoint.maxTabletDevice() {
26
+ --mdw-card__box-shadow: #{elevation.boxShadow(1)};
27
+ --mdw-card__border-color: transparent;
28
+ }
29
+ }
14
30
 
15
31
  .mdw-card {
16
32
  @include type.addRules('body-2');
17
33
 
18
34
  display: block;
35
+
19
36
  position: relative;
20
37
 
21
38
  outline: none;
@@ -24,35 +41,28 @@ $horizontalPadding: dp(16) !default;
24
41
  transition-property: box-shadow;
25
42
  transition-timing-function: motion.$standardEasing;
26
43
 
27
- border-radius: dp(4);
28
- box-shadow: elevation.boxShadow(0);
44
+ border-radius: 4px;
45
+ box-shadow: var(--mdw-card__box-shadow);
29
46
 
30
47
  &::before {
31
48
  // Outline is behind content, not around it
32
49
  content: "";
33
50
 
34
51
  position: absolute;
35
- top: 0;
36
- right: 0;
37
- bottom: 0;
38
- left: 0;
52
+ inset: 0;
53
+
54
+ // Separated to avoid minification
55
+ border-block-style: solid;
56
+ border-block-width: 1px;
57
+ border-inline-style: solid;
58
+ border-inline-width: 1px;
39
59
 
40
- border: solid dp(1);
41
-
42
60
  pointer-events: none;
43
61
 
44
- border-color: inherit;
45
- border-radius: inherit;
46
- }
62
+ border-color: var(--mdw-card__border-color, inherit);
47
63
 
48
- @include breakpoint.maxTabletDevice() {
49
- &:not([mdw-elevation]) {
50
- box-shadow: elevation.boxShadow(1);
64
+ border-radius: inherit;
51
65
 
52
- &::before {
53
- border-color: transparent;
54
- }
55
- }
56
66
  }
57
67
 
58
68
  &[mdw-elevation="1"] {
@@ -74,13 +84,12 @@ $horizontalPadding: dp(16) !default;
74
84
  }
75
85
  }
76
86
 
77
-
78
87
  .mdw-card__actions,
79
88
  .mdw-card__start,
80
89
  .mdw-card__end {
81
90
  // Position z-index higher than .mdw-card__button
82
91
  position: relative;
83
-
92
+
84
93
  z-index: 2;
85
94
  }
86
95
 
@@ -97,37 +106,28 @@ $horizontalPadding: dp(16) !default;
97
106
  }
98
107
 
99
108
  .mdw-card > .mdw-divider {
100
- width: calc(100% - #{$horizontalPadding * 2});
101
- margin-right: $horizontalPadding;
102
- margin-left: $horizontalPadding;
109
+ inline-size: calc(100% - #{$horizontalPadding * 2});
110
+ margin-inline: $horizontalPadding;
103
111
  }
104
112
 
105
113
  .mdw-card__thumbnail {
106
- margin-top: dp(16);
107
- margin-right: $horizontalPadding;
108
- margin-bottom: 0;
109
- margin-left: $horizontalPadding;
114
+ margin-block: 16px 0;
115
+ margin-inline: $horizontalPadding;
110
116
  }
111
117
 
112
118
  .mdw-card__start {
113
- float: left;
114
-
115
- :root[dir="rtl"] & {
116
- float: right;
117
- }
119
+ float: var(--mdw-card__inline-start);
120
+ float: inline-start;
118
121
  }
119
122
 
120
123
  .mdw-card__end {
121
- float: right;
122
-
123
- :root[dir="rtl"] & {
124
- float: left;
125
- }
124
+ float: var(--mdw-card__inline-end);
125
+ float: inline-end;
126
126
  }
127
127
 
128
128
  .mdw-card__image {
129
- height: auto;
130
- width: 100%;
129
+ block-size: auto;
130
+ inline-size: 100%;
131
131
  }
132
132
 
133
133
  .mdw-card__media {
@@ -138,7 +138,7 @@ $horizontalPadding: dp(16) !default;
138
138
  &[mdw-ratio] > .mdw-card__image {
139
139
  position: absolute;
140
140
 
141
- height: 100%;
141
+ block-size: 100%;
142
142
 
143
143
  object-fit: cover;
144
144
  }
@@ -148,39 +148,33 @@ $horizontalPadding: dp(16) !default;
148
148
 
149
149
  display: inline-block;
150
150
 
151
- height: 0;
152
- width: auto;
151
+ block-size: 0;
152
+ inline-size: auto;
153
153
  }
154
154
 
155
155
  &[mdw-ratio="16:9"]::after {
156
- padding-bottom: #{math.div(100%, 16) * 9};
156
+ padding-block-end: #{math.div(100%, 16) * 9};
157
157
  }
158
158
 
159
159
  &[mdw-ratio="3:2"]::after {
160
- padding-bottom: #{math.div(100%, 3) * 2};
160
+ padding-block-end: #{math.div(100%, 3) * 2};
161
161
  }
162
162
 
163
163
  &[mdw-ratio="4:3"]::after {
164
- padding-bottom: #{math.div(100%, 4) * 3};
164
+ padding-block-end: #{math.div(100%, 4) * 3};
165
165
  }
166
166
 
167
167
  &[mdw-ratio="1:1"]::after {
168
- padding-bottom: #{math.div(100%, 1) * 1};
168
+ padding-block-end: #{math.div(100%, 1) * 1};
169
169
  }
170
170
  }
171
171
 
172
172
  .mdw-card__header-thumbnail {
173
173
  align-self: center;
174
174
 
175
- min-height: dp(40);
176
- min-width: dp(40);
177
- margin-right: $horizontalPadding;
178
- margin-left: 0;
179
-
180
- :root[dir="rtl"] & {
181
- margin-right: 0;
182
- margin-left: $horizontalPadding;
183
- }
175
+ min-block-size: 40px;
176
+ min-inline-size: 40px;
177
+ margin-inline: 0 $horizontalPadding;
184
178
  }
185
179
 
186
180
  .mdw-card__header {
@@ -191,7 +185,7 @@ h5.mdw-card__header {
191
185
  @include type.textTopToTop(16);
192
186
  @include type.addRules('h5');
193
187
  @include type.baselineToBottom(28);
194
- margin-bottom: dp(-28);
188
+ margin-block-end: -28px;
195
189
  }
196
190
 
197
191
  h6.mdw-card__header {
@@ -201,7 +195,7 @@ h6.mdw-card__header {
201
195
 
202
196
  .mdw-card__header[mdw-two-line] {
203
197
  @include type.baselineToBottom(22);
204
- margin-bottom: dp(-22);
198
+ margin-block-end: -22px;
205
199
 
206
200
  & ~ .mdw-card__subheader {
207
201
  @include type.textTopToTop(8);
@@ -212,12 +206,11 @@ h6.mdw-card__header {
212
206
  .mdw-card__actions {
213
207
  display: flex;
214
208
 
215
- padding-top: dp(8);
216
- padding-right: dp(4);
217
- padding-left: dp(4);
209
+ padding-block-start: 8px;
210
+ padding-inline: 4px;
218
211
 
219
212
  & > .mdw-button {
220
- margin: 0 dp(4);
213
+ margin: 0 4px;
221
214
  }
222
215
 
223
216
  & > span {
@@ -228,17 +221,17 @@ h6.mdw-card__header {
228
221
  .mdw-card__actions,
229
222
  .mdw-card__supporting-text {
230
223
  &:last-child {
231
- padding-bottom: dp(8);
224
+ padding-block-end: 8px;
232
225
  }
233
226
  }
234
227
 
235
228
  .mdw-button.mdw-card__button {
236
229
  position: absolute;
237
- top: 0;
238
- left: 0;
230
+ inset-block-start: 0;
231
+ inset-inline-start: 0;
239
232
 
240
- height: 100%;
241
- width: 100%;
233
+ block-size: 100%;
234
+ inline-size: 100%;
242
235
  margin: 0;
243
236
  padding: 0;
244
237
 
@@ -246,4 +239,3 @@ h6.mdw-card__header {
246
239
 
247
240
  border-radius: inherit;
248
241
  }
249
-
@@ -2,14 +2,11 @@
2
2
 
3
3
  @use '../../core/_length.scss' as *;
4
4
 
5
- $borderWidth: dp(1) !default;
5
+ $borderWidth: 1px !default;
6
6
 
7
7
  .mdw-chip {
8
- margin: 0 0 dp(-8) dp(-8);
9
-
10
- :root[dir="rtl"] & {
11
- margin: 0 dp(-8) dp(-8) 0;
12
- }
8
+ margin-block: 0 -8px;
9
+ margin-inline: -8px 0;
13
10
  }
14
11
 
15
12
  .mdw-chip__item {
@@ -18,17 +15,15 @@ $borderWidth: dp(1) !default;
18
15
  align-items: center;
19
16
  overflow: hidden;
20
17
 
21
- min-height: dp(32);
22
- margin: 0 0 dp(8) dp(8);
23
- padding: 0 dp(12);
18
+ min-block-size: 32px;
24
19
 
25
- transition: inherit;
20
+ margin-block: 0 8px;
21
+ margin-inline: 8px 0;
22
+ padding: 0 12px;
26
23
 
27
- border-radius: dp(32); // unlikely to be taller than 64dp
24
+ transition: inherit;
28
25
 
29
- :root[dir="rtl"] & {
30
- margin: 0 dp(8) dp(8) 0;
31
- }
26
+ border-radius: 32px; // unlikely to be taller than 64dp
32
27
  }
33
28
 
34
29
  .mdw-chip__checkmark,
@@ -37,28 +32,21 @@ $borderWidth: dp(1) !default;
37
32
  align-items: center;
38
33
  order: -1;
39
34
 
40
- margin-right: dp(8);
41
- margin-left: dp(-8);
35
+ margin-inline: -8px 8px;
42
36
 
43
37
  transition: inherit;
44
- transition-property: max-width, opacity;
45
-
38
+ transition-property: max-inline-size, opacity;
46
39
 
47
- :root[dir="rtl"] & {
48
- margin-right: dp(-8);
49
- margin-left: dp(8);
50
- }
51
-
52
40
  }
53
41
 
54
42
  .mdw-chip__input {
55
43
  position: absolute;
56
- top: 0;
57
- left: 0;
44
+ inset-block-start: 0;
45
+ inset-inline-start: 0;
58
46
 
59
47
  box-sizing: border-box;
60
- height: 100%;
61
- width: 100%;
48
+ block-size: 100%;
49
+ inline-size: 100%;
62
50
  margin: 0;
63
51
  border-style: solid;
64
52
  border-width: $borderWidth;
@@ -79,10 +67,7 @@ $borderWidth: dp(1) !default;
79
67
  content: '';
80
68
 
81
69
  position: absolute;
82
- top: -$borderWidth;
83
- right: -$borderWidth;
84
- bottom: -$borderWidth;
85
- left: -$borderWidth;
70
+ inset: -$borderWidth;
86
71
 
87
72
  transition: inherit;
88
73
  transition-property: background-color, opacity;
@@ -91,18 +76,16 @@ $borderWidth: dp(1) !default;
91
76
  }
92
77
 
93
78
  & ~ .mdw-chip__checkmark {
94
- max-width: 0;
79
+ max-inline-size: 0;
95
80
 
96
81
  opacity: 0;
97
82
  }
98
83
 
99
84
  &:checked ~ .mdw-chip__checkmark {
100
- max-width: dp(24);
85
+ max-inline-size: 24px;
101
86
 
102
87
  opacity: 1;
103
88
  }
104
-
105
-
106
89
  }
107
90
 
108
91
  .mdw-chip__text {
@@ -115,20 +98,14 @@ $borderWidth: dp(1) !default;
115
98
  align-items: center;
116
99
  order: 1;
117
100
 
118
- margin-right: dp(-4);
119
- margin-left: dp(8);
120
-
101
+ margin-inline: 8px -4px;
102
+
121
103
  cursor: pointer;
122
104
 
123
105
  z-index: 1;
124
106
 
125
- :root[dir="rtl"] & {
126
- margin-right: dp(8);
127
- margin-left: dp(-4);
128
- }
129
-
130
107
  /* stylelint-disable-next-line selector-class-pattern */
131
108
  &.material-icons {
132
- font-size: dp(18);
109
+ font-size: 18px;
133
110
  }
134
111
  }