@react-md/core 1.0.0-next.5 → 1.0.0-next.7

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 (75) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-lint.log +12 -0
  3. package/CHANGELOG.md +12 -0
  4. package/dist/_core.scss +157 -240
  5. package/dist/_utils.scss +10 -0
  6. package/dist/app-bar/_app-bar.scss +95 -93
  7. package/dist/avatar/_avatar.scss +49 -47
  8. package/dist/badge/_badge.scss +19 -17
  9. package/dist/box/_box.scss +57 -55
  10. package/dist/button/_button.scss +122 -120
  11. package/dist/card/_card.scss +72 -70
  12. package/dist/chip/_chip.scss +105 -103
  13. package/dist/dialog/_dialog.scss +128 -126
  14. package/dist/divider/_divider.scss +24 -22
  15. package/dist/draggable/_draggable.scss +16 -12
  16. package/dist/expansion-panel/_expansion-panel.scss +69 -52
  17. package/dist/form/Form.d.ts +1 -1
  18. package/dist/form/Form.js +2 -1
  19. package/dist/form/Form.js.map +1 -1
  20. package/dist/form/_form.scss +1175 -1128
  21. package/dist/icon/_icon.scss +64 -62
  22. package/dist/interaction/_interaction.scss +39 -35
  23. package/dist/layout/_layout.scss +68 -67
  24. package/dist/link/_link.scss +52 -50
  25. package/dist/list/_list.scss +124 -122
  26. package/dist/menu/_menu.scss +9 -7
  27. package/dist/overlay/_overlay.scss +25 -23
  28. package/dist/progress/_progress.scss +11 -6
  29. package/dist/responsive-item/_responsive-item.scss +91 -89
  30. package/dist/segmented-button/_segmented-button.scss +54 -49
  31. package/dist/sheet/_sheet.scss +84 -82
  32. package/dist/snackbar/_snackbar.scss +128 -123
  33. package/dist/table/_table.scss +159 -157
  34. package/dist/tabs/_tabs.scss +10 -8
  35. package/dist/tooltip/_tooltip.scss +60 -58
  36. package/dist/transition/_transition.scss +44 -39
  37. package/dist/tree/_tree.scss +83 -81
  38. package/dist/typography/_typography.scss +58 -49
  39. package/dist/window-splitter/_window-splitter.scss +72 -70
  40. package/package.json +1 -1
  41. package/src/_core.scss +157 -240
  42. package/src/_utils.scss +10 -0
  43. package/src/app-bar/_app-bar.scss +95 -93
  44. package/src/avatar/_avatar.scss +49 -47
  45. package/src/badge/_badge.scss +19 -17
  46. package/src/box/_box.scss +57 -55
  47. package/src/button/_button.scss +122 -120
  48. package/src/card/_card.scss +72 -70
  49. package/src/chip/_chip.scss +105 -103
  50. package/src/dialog/_dialog.scss +128 -126
  51. package/src/divider/_divider.scss +24 -22
  52. package/src/draggable/_draggable.scss +16 -12
  53. package/src/expansion-panel/_expansion-panel.scss +69 -52
  54. package/src/form/Form.tsx +2 -1
  55. package/src/form/_form.scss +1175 -1128
  56. package/src/icon/_icon.scss +64 -62
  57. package/src/interaction/_interaction.scss +39 -35
  58. package/src/layout/_layout.scss +68 -67
  59. package/src/link/_link.scss +52 -50
  60. package/src/list/_list.scss +124 -122
  61. package/src/menu/_menu.scss +9 -7
  62. package/src/overlay/_overlay.scss +25 -23
  63. package/src/progress/_progress.scss +11 -6
  64. package/src/responsive-item/_responsive-item.scss +91 -89
  65. package/src/segmented-button/_segmented-button.scss +54 -49
  66. package/src/sheet/_sheet.scss +84 -82
  67. package/src/snackbar/_snackbar.scss +128 -123
  68. package/src/table/_table.scss +159 -157
  69. package/src/tabs/_tabs.scss +10 -8
  70. package/src/tooltip/_tooltip.scss +60 -58
  71. package/src/transition/_transition.scss +44 -39
  72. package/src/tree/_tree.scss +83 -81
  73. package/src/typography/_typography.scss +58 -49
  74. package/src/window-splitter/_window-splitter.scss +72 -70
  75. package/tsconfig.json +2 -2
@@ -164,160 +164,162 @@ $variables: (
164
164
  }
165
165
  }
166
166
 
167
- @mixin styles {
167
+ @mixin styles($disable-layer: false) {
168
168
  @if not $disable-everything {
169
- .rmd-button {
170
- @if not $disable-circular-progress {
171
- @include progress.set-var(circular-size, $circular-progress-size);
172
- }
169
+ @include utils.optional-layer(button, $disable-layer) {
170
+ .rmd-button {
171
+ @if not $disable-circular-progress {
172
+ @include progress.set-var(circular-size, $circular-progress-size);
173
+ }
173
174
 
174
- @include icon.set-var(color, currentcolor);
175
- @include icon.use-var(gap, spacing);
176
- @include use-var(background-color);
177
- @include use-var(color);
178
- @include use-var(border-radius);
179
-
180
- align-items: center;
181
- border-width: 0;
182
- display: inline-flex;
183
- flex-shrink: 0;
184
- justify-content: center;
185
-
186
- @if not $disable-text {
187
- &--text {
188
- @include text-styles;
175
+ @include icon.set-var(color, currentcolor);
176
+ @include icon.use-var(gap, spacing);
177
+ @include use-var(background-color);
178
+ @include use-var(color);
179
+ @include use-var(border-radius);
180
+
181
+ align-items: center;
182
+ border-width: 0;
183
+ display: inline-flex;
184
+ flex-shrink: 0;
185
+ justify-content: center;
186
+
187
+ @if not $disable-text {
188
+ &--text {
189
+ @include text-styles;
190
+ }
189
191
  }
190
- }
191
192
 
192
- @if not $disable-icon {
193
- &--icon {
194
- @include icon.set-var(size, 1em);
195
- @include set-var(border-radius, get-var(icon-border-radius));
196
- @include use-var(font-size, icon-font-size);
197
- @include use-var(height, icon-size);
198
- @include use-var(width, icon-size);
193
+ @if not $disable-icon {
194
+ &--icon {
195
+ @include icon.set-var(size, 1em);
196
+ @include set-var(border-radius, get-var(icon-border-radius));
197
+ @include use-var(font-size, icon-font-size);
198
+ @include use-var(height, icon-size);
199
+ @include use-var(width, icon-size);
199
200
 
200
- padding: $icon-padding;
201
- }
201
+ padding: $icon-padding;
202
+ }
202
203
 
203
- @if not $disable-icon-square {
204
- &--icon-square {
205
- @include set-var(icon-border-radius, $icon-square-border-radius);
204
+ @if not $disable-icon-square {
205
+ &--icon-square {
206
+ @include set-var(icon-border-radius, $icon-square-border-radius);
207
+ }
206
208
  }
207
- }
208
209
 
209
- @if $icon-small-size {
210
- &--small {
211
- font-size: $icon-small-size;
210
+ @if $icon-small-size {
211
+ &--small {
212
+ font-size: $icon-small-size;
213
+ }
212
214
  }
213
- }
214
215
 
215
- @if $icon-large-size {
216
- &--large {
217
- font-size: $icon-large-size;
216
+ @if $icon-large-size {
217
+ &--large {
218
+ font-size: $icon-large-size;
219
+ }
218
220
  }
219
221
  }
220
- }
221
222
 
222
- &--responsive {
223
- @include media-queries.tablet-media {
224
- @include text-styles;
223
+ &--responsive {
224
+ @include media-queries.tablet-media {
225
+ @include text-styles;
225
226
 
226
- height: auto;
227
- width: auto;
227
+ height: auto;
228
+ width: auto;
229
+ }
228
230
  }
229
- }
230
231
 
231
- &:disabled,
232
- &--disabled {
233
- @include theme.theme-set-var(outline-color, currentcolor);
234
- // this was added for the file input
235
- @include interaction.surface-disabled($clickable: false);
236
- }
232
+ &:disabled,
233
+ &--disabled {
234
+ @include theme.theme-set-var(outline-color, currentcolor);
235
+ // this was added for the file input
236
+ @include interaction.surface-disabled($clickable: false);
237
+ }
237
238
 
238
- @if not $disable-contained {
239
- &--contained {
240
- @include box-shadows.elevation-transition(
241
- $contained-elevation,
242
- if(
243
- $disable-contained-pressed-elevation,
244
- null,
245
- $contained-pressed-elevation
246
- ),
247
- "&.rmd-button--pressed",
248
- $pseudo-before: false,
249
- $position-relative: false
250
- );
251
-
252
- // contained buttons should _normally_ always force dark background
253
- // colors for the interaction states This means use the default light
254
- // theme since it is based off of the root background color
255
- @if not $disable-contained-interaction-colors {
256
- @include interaction.use-light-surface;
257
- }
239
+ @if not $disable-contained {
240
+ &--contained {
241
+ @include box-shadows.elevation-transition(
242
+ $contained-elevation,
243
+ if(
244
+ $disable-contained-pressed-elevation,
245
+ null,
246
+ $contained-pressed-elevation
247
+ ),
248
+ "&.rmd-button--pressed",
249
+ $pseudo-before: false,
250
+ $position-relative: false
251
+ );
252
+
253
+ // contained buttons should _normally_ always force dark background
254
+ // colors for the interaction states This means use the default light
255
+ // theme since it is based off of the root background color
256
+ @if not $disable-contained-interaction-colors {
257
+ @include interaction.use-light-surface;
258
+ }
258
259
 
259
- @include set-var(
260
- background-color,
261
- get-var(contained-background-color)
262
- );
263
- @include set-var(color, get-var(contained-color));
260
+ @include set-var(
261
+ background-color,
262
+ get-var(contained-background-color)
263
+ );
264
+ @include set-var(color, get-var(contained-color));
265
+ }
264
266
  }
265
- }
266
267
 
267
- @if not $disable-async {
268
- &--async {
269
- @include overlay.set-var(background-color, transparent);
270
- @include progress.set-var(color, currentcolor);
271
- // @include progress.set-var(background-color, currentcolor);
272
- }
268
+ @if not $disable-async {
269
+ &--async {
270
+ @include overlay.set-var(background-color, transparent);
271
+ @include progress.set-var(color, currentcolor);
272
+ // @include progress.set-var(background-color, currentcolor);
273
+ }
273
274
 
274
- &--async-overlay {
275
- > * {
276
- opacity: 0;
275
+ &--async-overlay {
276
+ > * {
277
+ opacity: 0;
278
+ }
277
279
  }
278
280
  }
279
281
  }
280
- }
281
282
 
282
- @if not $disable-unstyled-utility-class {
283
- .rmd-button-unstyled {
284
- @include unstyled;
283
+ @if not $disable-unstyled-utility-class {
284
+ .rmd-button-unstyled {
285
+ @include unstyled;
286
+ }
285
287
  }
286
- }
287
288
 
288
- @if not $disable-floating {
289
- .rmd-fab {
290
- position: fixed;
291
- z-index: $floating-z-index;
289
+ @if not $disable-floating {
290
+ .rmd-fab {
291
+ position: fixed;
292
+ z-index: $floating-z-index;
292
293
 
293
- @if not $disable-floating-absolute-position {
294
- &--absolute {
295
- @include set-var(fab-offset, 0px);
294
+ @if not $disable-floating-absolute-position {
295
+ &--absolute {
296
+ @include set-var(fab-offset, 0px);
296
297
 
297
- position: absolute;
298
- z-index: $floating-absolute-z-index;
298
+ position: absolute;
299
+ z-index: $floating-absolute-z-index;
300
+ }
299
301
  }
300
- }
301
302
 
302
- @each $suffix, $styles in $floating-positions {
303
- &--#{$suffix} {
304
- @each $property, $value in $styles {
305
- @if $property == left {
306
- @include utils.rtl {
307
- left: auto;
308
- right: calc(#{$value} + #{get-var(fab-offset)});
309
- }
303
+ @each $suffix, $styles in $floating-positions {
304
+ &--#{$suffix} {
305
+ @each $property, $value in $styles {
306
+ @if $property == left {
307
+ @include utils.rtl {
308
+ left: auto;
309
+ right: calc(#{$value} + #{get-var(fab-offset)});
310
+ }
310
311
 
311
- left: $value;
312
- } @else if $property == right {
313
- @include utils.rtl {
314
312
  left: $value;
315
- right: auto;
316
- }
313
+ } @else if $property == right {
314
+ @include utils.rtl {
315
+ left: $value;
316
+ right: auto;
317
+ }
317
318
 
318
- right: calc(#{$value} + #{get-var(fab-offset)});
319
- } @else {
320
- #{$property}: #{$value};
319
+ right: calc(#{$value} + #{get-var(fab-offset)});
320
+ } @else {
321
+ #{$property}: #{$value};
322
+ }
321
323
  }
322
324
  }
323
325
  }
@@ -86,100 +86,102 @@ $variables: (background-color, color, secondary-color);
86
86
  }
87
87
  }
88
88
 
89
- @mixin styles {
89
+ @mixin styles($disable-layer: false) {
90
90
  @if not $disable-everything {
91
- @include theme.default-system-theme {
92
- @include use-dark-theme;
93
- }
91
+ @include utils.optional-layer(card, $disable-layer) {
92
+ @include theme.default-system-theme {
93
+ @include use-dark-theme;
94
+ }
94
95
 
95
- .rmd-card {
96
- @include use-var(background-color);
97
- @include use-var(color);
98
-
99
- border-radius: $border-radius;
100
- display: inline-block;
101
- max-width: 100%;
102
-
103
- @if not $disable-raisable {
104
- &--raisable {
105
- @include box-shadows.elevation-transition(
106
- $raisable-start-elevation,
107
- $raisable-end-elevation,
108
- "&:hover"
109
- );
96
+ .rmd-card {
97
+ @include use-var(background-color);
98
+ @include use-var(color);
99
+
100
+ border-radius: $border-radius;
101
+ display: inline-block;
102
+ max-width: 100%;
103
+
104
+ @if not $disable-raisable {
105
+ &--raisable {
106
+ @include box-shadows.elevation-transition(
107
+ $raisable-start-elevation,
108
+ $raisable-end-elevation,
109
+ "&:hover"
110
+ );
111
+ }
110
112
  }
111
- }
112
113
 
113
- @if not $disable-shadowed {
114
- &--shadowed {
115
- @include box-shadows.box-shadow($elevation);
114
+ @if not $disable-shadowed {
115
+ &--shadowed {
116
+ @include box-shadows.box-shadow($elevation);
117
+ }
116
118
  }
117
- }
118
119
 
119
- @if not $disable-bordered {
120
- &--bordered {
121
- border: $border-width inset $border-color;
120
+ @if not $disable-bordered {
121
+ &--bordered {
122
+ border: $border-width inset $border-color;
123
+ }
122
124
  }
123
- }
124
125
 
125
- @if not $disable-full-width {
126
- &--full-width {
127
- display: block;
128
- width: 100%;
126
+ @if not $disable-full-width {
127
+ &--full-width {
128
+ display: block;
129
+ width: 100%;
130
+ }
129
131
  }
130
- }
131
132
 
132
- @if not $disable-clickable {
133
- &--clickable {
134
- @include interaction.surface;
133
+ @if not $disable-clickable {
134
+ &--clickable {
135
+ @include interaction.surface;
136
+ }
135
137
  }
136
- }
137
138
 
138
- &__header {
139
- align-items: center;
140
- column-gap: $header-spacing;
141
- display: flex;
142
- padding: $header-padding-top $header-padding $header-padding;
143
- }
139
+ &__header {
140
+ align-items: center;
141
+ column-gap: $header-spacing;
142
+ display: flex;
143
+ padding: $header-padding-top $header-padding $header-padding;
144
+ }
144
145
 
145
- &__header-content {
146
- @include typography.text-overflow;
146
+ &__header-content {
147
+ @include typography.text-overflow;
147
148
 
148
- flex: 1 1 auto;
149
- min-width: 0;
150
- }
149
+ flex: 1 1 auto;
150
+ min-width: 0;
151
+ }
151
152
 
152
- // does not require custom styles
153
- // &__title {
154
- // }
153
+ // does not require custom styles
154
+ // &__title {
155
+ // }
155
156
 
156
- // does not require custom styles
157
- // &__subtitle {
158
- // }
157
+ // does not require custom styles
158
+ // &__subtitle {
159
+ // }
159
160
 
160
- &__content {
161
- @if not $disable-content-secondary-color {
162
- &--secondary {
163
- @include theme.theme-use-var(color, text-secondary-color);
161
+ &__content {
162
+ @if not $disable-content-secondary-color {
163
+ &--secondary {
164
+ @include theme.theme-use-var(color, text-secondary-color);
165
+ }
164
166
  }
165
- }
166
167
 
167
- @if $content-padding {
168
- &--padded {
169
- padding: $content-padding;
168
+ @if $content-padding {
169
+ &--padded {
170
+ padding: $content-padding;
171
+ }
170
172
  }
171
- }
172
173
 
173
- @if not $disable-content-last-child-padding {
174
- &--padded-bottom:last-child {
175
- padding-bottom: $content-padding-bottom;
174
+ @if not $disable-content-last-child-padding {
175
+ &--padded-bottom:last-child {
176
+ padding-bottom: $content-padding-bottom;
177
+ }
176
178
  }
177
179
  }
178
- }
179
180
 
180
- @if $footer-padding {
181
- &__footer {
182
- padding: $footer-padding;
181
+ @if $footer-padding {
182
+ &__footer {
183
+ padding: $footer-padding;
184
+ }
183
185
  }
184
186
  }
185
187
  }