@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
@@ -138,65 +138,70 @@ $variables: (
138
138
  }
139
139
  }
140
140
 
141
- @mixin styles {
141
+ @mixin styles($disable-layer: false) {
142
142
  @if not $disable-everything {
143
- .rmd-segmented-button-container {
144
- display: grid;
145
- grid-auto-columns: 1fr;
146
- grid-auto-flow: column;
147
-
148
- &--full-width {
149
- width: 100%;
150
- }
151
- }
152
-
153
- .rmd-segmented-button {
154
- @include theme.theme-use-var(color, text-primary-color);
155
- @include icon.set-var(color, currentcolor);
156
- @include icon.set-var(size, 1.125rem);
157
- @include utils.map-to-styles($typography-styles);
158
-
159
- align-items: center;
160
- background-color: transparent;
161
- border: 0;
162
- box-shadow: inset 0 0 0 get-var(outline-width) get-var(outline-color);
163
- display: inline-flex;
164
- gap: $gap;
165
- justify-content: center;
166
- min-height: $min-height;
167
- min-width: $min-width;
168
- padding: $vertical-padding $horizontal-padding;
169
-
170
- &:first-child {
171
- @include utils.rtl {
172
- border-bottom-left-radius: 0;
173
- border-bottom-right-radius: $border-radius;
174
- border-top-left-radius: 0;
175
- border-top-right-radius: $border-radius;
143
+ @include utils.optional-layer(segmented-button, $disable-layer) {
144
+ .rmd-segmented-button-container {
145
+ display: grid;
146
+ grid-auto-columns: 1fr;
147
+ grid-auto-flow: column;
148
+
149
+ &--full-width {
150
+ width: 100%;
176
151
  }
177
-
178
- border-bottom-left-radius: $border-radius;
179
- border-top-left-radius: $border-radius;
180
152
  }
181
153
 
182
- &:last-child {
183
- @include utils.rtl {
154
+ .rmd-segmented-button {
155
+ @include theme.theme-use-var(color, text-primary-color);
156
+ @include icon.set-var(color, currentcolor);
157
+ @include icon.set-var(size, 1.125rem);
158
+ @include utils.map-to-styles($typography-styles);
159
+
160
+ align-items: center;
161
+ background-color: transparent;
162
+ border: 0;
163
+ box-shadow: inset 0 0 0 get-var(outline-width) get-var(outline-color);
164
+ display: inline-flex;
165
+ gap: $gap;
166
+ justify-content: center;
167
+ min-height: $min-height;
168
+ min-width: $min-width;
169
+ padding: $vertical-padding $horizontal-padding;
170
+
171
+ &:first-child {
172
+ @include utils.rtl {
173
+ border-bottom-left-radius: 0;
174
+ border-bottom-right-radius: $border-radius;
175
+ border-top-left-radius: 0;
176
+ border-top-right-radius: $border-radius;
177
+ }
178
+
184
179
  border-bottom-left-radius: $border-radius;
185
- border-bottom-right-radius: 0;
186
180
  border-top-left-radius: $border-radius;
187
- border-top-right-radius: 0;
188
181
  }
189
182
 
190
- border-bottom-right-radius: $border-radius;
191
- border-top-right-radius: $border-radius;
192
- }
183
+ &:last-child {
184
+ @include utils.rtl {
185
+ border-bottom-left-radius: $border-radius;
186
+ border-bottom-right-radius: 0;
187
+ border-top-left-radius: $border-radius;
188
+ border-top-right-radius: 0;
189
+ }
190
+
191
+ border-bottom-right-radius: $border-radius;
192
+ border-top-right-radius: $border-radius;
193
+ }
193
194
 
194
- &--selected {
195
- @if not $disable-selected-icon {
196
- @include transition.transition-set-var(max-width, icon.get-var(size));
195
+ &--selected {
196
+ @if not $disable-selected-icon {
197
+ @include transition.transition-set-var(
198
+ max-width,
199
+ icon.get-var(size)
200
+ );
201
+ }
202
+ @include use-var(background-color, selected-background-color);
203
+ @include use-var(color, selected-color);
197
204
  }
198
- @include use-var(background-color, selected-background-color);
199
- @include use-var(color, selected-color);
200
205
  }
201
206
  }
202
207
  }
@@ -69,118 +69,120 @@ $variables: (
69
69
  }
70
70
  }
71
71
 
72
- @mixin styles {
72
+ @mixin styles($disable-layer: false) {
73
73
  @if not $disable-everything {
74
- .rmd-sheet {
75
- @include box-shadows.box-shadow($elevation);
76
- @include use-var(height);
77
- @include use-var(max-height);
78
- @include use-var(width);
79
- @include use-var(z-index);
80
-
81
- overflow: auto;
82
- position: fixed;
83
-
84
- @if not $disable-position-left or not $disable-position-right {
85
- &--horizontal {
86
- bottom: 0;
87
- top: 0;
74
+ @include utils.optional-layer(sheet, $disable-layer) {
75
+ .rmd-sheet {
76
+ @include box-shadows.box-shadow($elevation);
77
+ @include use-var(height);
78
+ @include use-var(max-height);
79
+ @include use-var(width);
80
+ @include use-var(z-index);
81
+
82
+ overflow: auto;
83
+ position: fixed;
84
+
85
+ @if not $disable-position-left or not $disable-position-right {
86
+ &--horizontal {
87
+ bottom: 0;
88
+ top: 0;
89
+ }
88
90
  }
89
- }
90
91
 
91
- @if not $disable-position-bottom or not $disable-position-top {
92
- &--vertical {
93
- left: 0;
94
- right: 0;
92
+ @if not $disable-position-bottom or not $disable-position-top {
93
+ &--vertical {
94
+ left: 0;
95
+ right: 0;
96
+ }
95
97
  }
96
- }
97
98
 
98
- &--raised {
99
- @include set-var(z-index, $raised-z-index);
100
- @include box-shadows.box-shadow($raised-elevation);
101
- }
99
+ &--raised {
100
+ @include set-var(z-index, $raised-z-index);
101
+ @include box-shadows.box-shadow($raised-elevation);
102
+ }
102
103
 
103
- @if not $disable-position-left {
104
- &--left {
105
- @include utils.auto-rtl(left, 0) {
106
- @include set-var(transform-offscreen, translate3d(100%, 0, 0));
104
+ @if not $disable-position-left {
105
+ &--left {
106
+ @include utils.auto-rtl(left, 0) {
107
+ @include set-var(transform-offscreen, translate3d(100%, 0, 0));
108
+ }
109
+ @include set-var(transform-offscreen, translate3d(-100%, 0, 0));
107
110
  }
108
- @include set-var(transform-offscreen, translate3d(-100%, 0, 0));
109
111
  }
110
- }
111
112
 
112
- @if not $disable-position-right {
113
- &--right {
114
- @include utils.auto-rtl(right, 0) {
115
- @include set-var(transform-offscreen, translate3d(-100%, 0, 0));
113
+ @if not $disable-position-right {
114
+ &--right {
115
+ @include utils.auto-rtl(right, 0) {
116
+ @include set-var(transform-offscreen, translate3d(-100%, 0, 0));
117
+ }
118
+ @include set-var(transform-offscreen, translate3d(100%, 0, 0));
116
119
  }
117
- @include set-var(transform-offscreen, translate3d(100%, 0, 0));
118
120
  }
119
- }
120
121
 
121
- @if not $disable-position-bottom {
122
- &--bottom {
123
- @include set-var(transform-offscreen, translate3d(0, 100%, 0));
122
+ @if not $disable-position-bottom {
123
+ &--bottom {
124
+ @include set-var(transform-offscreen, translate3d(0, 100%, 0));
124
125
 
125
- bottom: 0;
126
+ bottom: 0;
127
+ }
126
128
  }
127
- }
128
129
 
129
- @if not $disable-position-top {
130
- &--top {
131
- @include set-var(transform-offscreen, translate3d(0, -100%, 0));
130
+ @if not $disable-position-top {
131
+ &--top {
132
+ @include set-var(transform-offscreen, translate3d(0, -100%, 0));
132
133
 
133
- top: 0;
134
+ top: 0;
135
+ }
134
136
  }
135
- }
136
137
 
137
- &--touch-width {
138
- @include set-var(width, get-var(touch-width));
139
- }
140
-
141
- &--static-width {
142
- @include set-var(width, get-var(static-width));
143
- }
138
+ &--touch-width {
139
+ @include set-var(width, get-var(touch-width));
140
+ }
144
141
 
145
- &--media-width {
146
- @include media-queries.tablet-media {
142
+ &--static-width {
147
143
  @include set-var(width, get-var(static-width));
148
144
  }
149
145
 
150
- @include set-var(width, get-var(touch-width));
151
- }
146
+ &--media-width {
147
+ @include media-queries.tablet-media {
148
+ @include set-var(width, get-var(static-width));
149
+ }
152
150
 
153
- &--viewport-height {
154
- @include set-var(max-height, $max-height);
155
- }
151
+ @include set-var(width, get-var(touch-width));
152
+ }
156
153
 
157
- &--touchable-height {
158
- @include set-var(max-height, get-var(touch-max-height));
159
- }
154
+ &--viewport-height {
155
+ @include set-var(max-height, $max-height);
156
+ }
160
157
 
161
- &--recommended-height {
162
- max-height: $recommended-max-height;
163
- min-height: $recommended-min-height;
164
- }
158
+ &--touchable-height {
159
+ @include set-var(max-height, get-var(touch-max-height));
160
+ }
165
161
 
166
- &--offscreen {
167
- @include use-var(transform, transform-offscreen);
168
- }
162
+ &--recommended-height {
163
+ max-height: $recommended-max-height;
164
+ min-height: $recommended-min-height;
165
+ }
169
166
 
170
- &--hidden {
171
- box-shadow: none;
172
- }
167
+ &--offscreen {
168
+ @include use-var(transform, transform-offscreen);
169
+ }
173
170
 
174
- &--visible {
175
- transform: translate3d(0, 0, 0);
176
- }
171
+ &--hidden {
172
+ box-shadow: none;
173
+ }
177
174
 
178
- &--enter {
179
- transition: transform $enter-duration $enter-timing-function;
180
- }
175
+ &--visible {
176
+ transform: translate3d(0, 0, 0);
177
+ }
181
178
 
182
- &--exit {
183
- transition: transform $leave-duration $leave-timing-function;
179
+ &--enter {
180
+ transition: transform $enter-duration $enter-timing-function;
181
+ }
182
+
183
+ &--exit {
184
+ transition: transform $leave-duration $leave-timing-function;
185
+ }
184
186
  }
185
187
  }
186
188
  }
@@ -89,164 +89,169 @@ $variables: (background-color, color, offset);
89
89
  }
90
90
  }
91
91
 
92
- @mixin styles {
92
+ @mixin styles($disable-layer: false) {
93
93
  @if not $disable-everything {
94
- .rmd-snackbar {
95
- align-items: $default-align-items;
96
- display: flex;
97
- flex-direction: column;
98
- gap: $gap;
99
- left: 0;
100
- margin: $margin;
101
- pointer-events: none;
102
- position: fixed;
103
- right: 0;
104
- z-index: $z-index;
105
-
106
- @if not $disable-top or not $disable-top-left or not $disable-bottom-left
107
- {
108
- &--top {
109
- @include use-var(top, offset);
110
- }
111
- }
112
-
113
- @if not
114
- $disable-bottom or not
115
- $disable-bottom-left or not
116
- $disable-bottom-right
117
- {
118
- &--bottom {
119
- @include use-var(bottom, offset);
94
+ @include utils.optional-layer(snackbar, $disable-layer) {
95
+ .rmd-snackbar {
96
+ align-items: $default-align-items;
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: $gap;
100
+ left: 0;
101
+ margin: $margin;
102
+ pointer-events: none;
103
+ position: fixed;
104
+ right: 0;
105
+ z-index: $z-index;
106
+
107
+ @if not
108
+ $disable-top or not
109
+ $disable-top-left or not
110
+ $disable-bottom-left
111
+ {
112
+ &--top {
113
+ @include use-var(top, offset);
114
+ }
120
115
  }
121
- }
122
116
 
123
- @if not $disable-top-left or not $disable-bottom-left {
124
- &--start {
125
- align-items: flex-start;
117
+ @if not
118
+ $disable-bottom or not
119
+ $disable-bottom-left or not
120
+ $disable-bottom-right
121
+ {
122
+ &--bottom {
123
+ @include use-var(bottom, offset);
124
+ }
126
125
  }
127
- }
128
126
 
129
- @if not $disable-top-right or not $disable-bottom-right {
130
- &--end {
131
- align-items: flex-end;
127
+ @if not $disable-top-left or not $disable-bottom-left {
128
+ &--start {
129
+ align-items: flex-start;
130
+ }
132
131
  }
133
- }
134
- }
135
132
 
136
- .rmd-toast {
137
- @include box-shadows.box-shadow($box-shadow, $disable-colors: true);
138
- @include utils.map-to-styles($typography);
139
- @include use-var(background-color);
140
- @include use-var(color);
141
-
142
- align-items: center;
143
- border-radius: $border-radius;
144
- display: flex;
145
- gap: $toast-gap;
146
- justify-content: space-between;
147
- max-width: $max-width;
148
- min-height: $min-height;
149
- padding-left: $horizontal-padding;
150
- padding-right: $horizontal-padding;
151
- pointer-events: auto;
152
- width: 100%;
153
-
154
- @include media-queries.tablet-media {
155
- min-width: $min-width;
156
- width: auto;
157
- }
158
-
159
- @if not $disable-action-button {
160
- &--action {
161
- @include utils.auto-rtl(
162
- padding-right,
163
- $action-horizontal-padding,
164
- $horizontal-padding
165
- );
133
+ @if not $disable-top-right or not $disable-bottom-right {
134
+ &--end {
135
+ align-items: flex-end;
136
+ }
166
137
  }
167
138
  }
168
139
 
169
- @if not $disable-close-button {
170
- &--x {
171
- @include utils.auto-rtl(
172
- padding-right,
173
- $close-button-horizontal-padding,
174
- $horizontal-padding
175
- );
140
+ .rmd-toast {
141
+ @include box-shadows.box-shadow($box-shadow, $disable-colors: true);
142
+ @include utils.map-to-styles($typography);
143
+ @include use-var(background-color);
144
+ @include use-var(color);
145
+
146
+ align-items: center;
147
+ border-radius: $border-radius;
148
+ display: flex;
149
+ gap: $toast-gap;
150
+ justify-content: space-between;
151
+ max-width: $max-width;
152
+ min-height: $min-height;
153
+ padding-left: $horizontal-padding;
154
+ padding-right: $horizontal-padding;
155
+ pointer-events: auto;
156
+ width: 100%;
157
+
158
+ @include media-queries.tablet-media {
159
+ min-width: $min-width;
160
+ width: auto;
176
161
  }
177
162
 
178
163
  @if not $disable-action-button {
179
- &--small-gap {
180
- gap: $toast-gap-both-buttons;
164
+ &--action {
165
+ @include utils.auto-rtl(
166
+ padding-right,
167
+ $action-horizontal-padding,
168
+ $horizontal-padding
169
+ );
181
170
  }
182
171
  }
183
- }
184
172
 
185
- @if not $disable-stacked {
186
- &--stacked {
187
- display: grid;
188
- gap: $toast-gap-stacked;
189
- grid-template-columns: 1fr;
190
- padding-bottom: $vertical-padding;
191
- padding-top: $vertical-padding;
173
+ @if not $disable-close-button {
174
+ &--x {
175
+ @include utils.auto-rtl(
176
+ padding-right,
177
+ $close-button-horizontal-padding,
178
+ $horizontal-padding
179
+ );
180
+ }
181
+
182
+ @if not $disable-action-button {
183
+ &--small-gap {
184
+ gap: $toast-gap-both-buttons;
185
+ }
186
+ }
192
187
  }
193
188
 
194
- &--reordered {
195
- grid-template-columns: 1fr min-content;
196
- padding-top: 0;
189
+ @if not $disable-stacked {
190
+ &--stacked {
191
+ display: grid;
192
+ gap: $toast-gap-stacked;
193
+ grid-template-columns: 1fr;
194
+ padding-bottom: $vertical-padding;
195
+ padding-top: $vertical-padding;
196
+ }
197
+
198
+ &--reordered {
199
+ grid-template-columns: 1fr min-content;
200
+ padding-top: 0;
201
+ }
197
202
  }
198
203
  }
199
- }
200
204
 
201
- .rmd-toast-content {
202
- flex: 1 1 auto;
205
+ .rmd-toast-content {
206
+ flex: 1 1 auto;
203
207
 
204
- p {
205
- margin: 0;
206
- }
208
+ p {
209
+ margin: 0;
210
+ }
207
211
 
208
- &--v-padding {
209
- padding: $vertical-padding 0;
210
- }
212
+ &--v-padding {
213
+ padding: $vertical-padding 0;
214
+ }
211
215
 
212
- &--t-padding {
213
- padding-bottom: 0;
214
- }
216
+ &--t-padding {
217
+ padding-bottom: 0;
218
+ }
215
219
 
216
- @if not $disable-action-button {
217
- &--action {
218
- @include utils.auto-rtl(
219
- padding-right,
220
- button.$text-horizontal-padding
221
- );
220
+ @if not $disable-action-button {
221
+ &--action {
222
+ @include utils.auto-rtl(
223
+ padding-right,
224
+ button.$text-horizontal-padding
225
+ );
226
+ }
222
227
  }
223
- }
224
228
 
225
- @if not $disable-close-button and not $disable-action-button {
226
- &--gap {
227
- @include utils.auto-rtl(margin-right, $toast-gap);
229
+ @if not $disable-close-button and not $disable-action-button {
230
+ &--gap {
231
+ @include utils.auto-rtl(margin-right, $toast-gap);
232
+ }
228
233
  }
229
234
  }
230
- }
231
235
 
232
- @if not $disable-close-button {
233
- .rmd-toast-x {
234
- &--reordered {
235
- align-self: flex-start;
236
- order: 2;
236
+ @if not $disable-close-button {
237
+ .rmd-toast-x {
238
+ &--reordered {
239
+ align-self: flex-start;
240
+ order: 2;
241
+ }
237
242
  }
238
243
  }
239
- }
240
244
 
241
- @if not $disable-action-button {
242
- .rmd-toast-action {
243
- justify-self: flex-end;
245
+ @if not $disable-action-button {
246
+ .rmd-toast-action {
247
+ justify-self: flex-end;
244
248
 
245
- &--reordered {
246
- @include utils.auto-rtl(margin-right, $action-horizontal-padding);
249
+ &--reordered {
250
+ @include utils.auto-rtl(margin-right, $action-horizontal-padding);
247
251
 
248
- grid-column-end: span 2;
249
- order: 3;
252
+ grid-column-end: span 2;
253
+ order: 3;
254
+ }
250
255
  }
251
256
  }
252
257
  }