@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
@@ -59,116 +59,118 @@ $item-padding: calc(
59
59
  }
60
60
  }
61
61
 
62
- @mixin styles {
62
+ @mixin styles($disable-layer: false) {
63
63
  @if not $disable-everything {
64
- .rmd-tree {
65
- display: block;
66
- height: 100%;
67
- outline-style: none;
68
- overflow: auto;
69
- // this is mostly for firefox. moving the mouse even 1px while clicking will
70
- // select the current item and all items to the tree root
71
- user-select: none;
72
- width: 100%;
73
- }
64
+ @include utils.optional-layer(tree, $disable-layer) {
65
+ .rmd-tree {
66
+ display: block;
67
+ height: 100%;
68
+ outline-style: none;
69
+ overflow: auto;
70
+ // this is mostly for firefox. moving the mouse even 1px while clicking will
71
+ // select the current item and all items to the tree root
72
+ user-select: none;
73
+ width: 100%;
74
+ }
74
75
 
75
- .rmd-tree-item {
76
- @include icon.set-var(rotate-from, $expander-right-from);
77
- @include icon.set-var(rotate-to, $expander-right-to);
78
- @include set-var(item-padding, $item-padding);
76
+ .rmd-tree-item {
77
+ @include icon.set-var(rotate-from, $expander-right-from);
78
+ @include icon.set-var(rotate-to, $expander-right-to);
79
+ @include set-var(item-padding, $item-padding);
79
80
 
80
- list-style: none;
81
+ list-style: none;
81
82
 
82
- @if not $disable-expander-left {
83
- &--expander-left {
84
- @include icon.set-var(rotate-from, $expander-left-from);
85
- @include icon.set-var(rotate-to, $expander-left-to);
83
+ @if not $disable-expander-left {
84
+ &--expander-left {
85
+ @include icon.set-var(rotate-from, $expander-left-from);
86
+ @include icon.set-var(rotate-to, $expander-left-to);
87
+ }
86
88
  }
87
- }
88
89
 
89
- &__content {
90
- @include utils.auto-rtl(
91
- padding-left,
92
- get-var(item-padding),
93
- list.get-var(item-horizontal-padding)
94
- );
90
+ &__content {
91
+ @include utils.auto-rtl(
92
+ padding-left,
93
+ get-var(item-padding),
94
+ list.get-var(item-horizontal-padding)
95
+ );
95
96
 
96
- &--disabled {
97
- cursor: auto;
97
+ &--disabled {
98
+ cursor: auto;
98
99
 
99
- &:hover::before {
100
- @include interaction.set-var(background-color, transparent);
100
+ &:hover::before {
101
+ @include interaction.set-var(background-color, transparent);
102
+ }
101
103
  }
102
- }
103
104
 
104
- &--link {
105
- color: inherit;
106
- text-decoration: none;
107
- }
105
+ &--link {
106
+ color: inherit;
107
+ text-decoration: none;
108
+ }
108
109
 
109
- &--focused::before {
110
- // Note: Clicking an item and then using the keyboard to move focus
111
- // will **not** show the focus outline so might not be ideal. the tree
112
- // must be re-focused after a `Tab` keypress for it to appear again
113
- @if utils.$disable-focus-visible {
114
- .rmd-tree:focus-within & {
115
- @include utils.keyboard-only {
110
+ &--focused::before {
111
+ // Note: Clicking an item and then using the keyboard to move focus
112
+ // will **not** show the focus outline so might not be ideal. the tree
113
+ // must be re-focused after a `Tab` keypress for it to appear again
114
+ @if utils.$disable-focus-visible {
115
+ .rmd-tree:focus-within & {
116
+ @include utils.keyboard-only {
117
+ @include interaction.focus-styles;
118
+ }
119
+ }
120
+ } @else {
121
+ .rmd-tree:focus-visible & {
116
122
  @include interaction.focus-styles;
117
123
  }
118
124
  }
119
- } @else {
120
- .rmd-tree:focus-visible & {
121
- @include interaction.focus-styles;
122
- }
123
125
  }
124
- }
125
126
 
126
- @if $selected-styles {
127
- &--selected {
128
- @if not $disable-selected-background-color {
129
- @include interaction.set-var(
130
- background-color,
131
- interaction.get-var(selected-background-color)
132
- );
133
-
134
- @include utils.touch-only {
135
- &:hover::before {
136
- @include interaction.set-var(
137
- background-color,
138
- interaction.get-var(selected-background-color)
139
- );
127
+ @if $selected-styles {
128
+ &--selected {
129
+ @if not $disable-selected-background-color {
130
+ @include interaction.set-var(
131
+ background-color,
132
+ interaction.get-var(selected-background-color)
133
+ );
134
+
135
+ @include utils.touch-only {
136
+ &:hover::before {
137
+ @include interaction.set-var(
138
+ background-color,
139
+ interaction.get-var(selected-background-color)
140
+ );
141
+ }
140
142
  }
141
143
  }
144
+ @include utils.map-to-styles($selected-styles);
142
145
  }
143
- @include utils.map-to-styles($selected-styles);
144
146
  }
145
147
  }
146
- }
147
148
 
148
- @if not $disable-expander-left-as-media {
149
- &__media {
150
- align-items: center;
151
- display: flex;
152
- justify-content: space-between;
149
+ @if not $disable-expander-left-as-media {
150
+ &__media {
151
+ align-items: center;
152
+ display: flex;
153
+ justify-content: space-between;
153
154
 
154
- @if not $disable-expander-left-as-media-offset {
155
- &--single {
156
- justify-content: flex-end;
155
+ @if not $disable-expander-left-as-media-offset {
156
+ &--single {
157
+ justify-content: flex-end;
158
+ }
157
159
  }
158
160
  }
159
161
  }
160
162
  }
161
- }
162
163
 
163
- .rmd-tree-group {
164
- background-color: inherit;
165
- color: inherit;
166
- font-size: inherit;
167
- line-height: inherit;
164
+ .rmd-tree-group {
165
+ background-color: inherit;
166
+ color: inherit;
167
+ font-size: inherit;
168
+ line-height: inherit;
168
169
 
169
- // remove the list padding to make it more condensed
170
- padding-bottom: 0;
171
- padding-top: 0;
170
+ // remove the list padding to make it more condensed
171
+ padding-bottom: 0;
172
+ padding-top: 0;
173
+ }
172
174
  }
173
175
  }
174
176
  }
@@ -253,69 +253,76 @@ $typography-variables: (line-length, text-container-padding);
253
253
  #{$property}: typography-get-var($name, $fallback);
254
254
  }
255
255
 
256
- @mixin typography-text-container-styles($disabled: $disable-text-container) {
256
+ @mixin typography-text-container-styles(
257
+ $disabled: $disable-text-container,
258
+ $disable-layer: false
259
+ ) {
257
260
  @if not $disabled {
258
- .rmd-text-container {
259
- @include typography-use-var(max-width, line-length);
260
- @include typography-use-var(padding, text-container-padding);
261
-
262
- display: block;
263
- margin: 0 auto;
264
- width: 100%;
261
+ @include utils.optional-layer(typography, $disable-layer) {
262
+ .rmd-text-container {
263
+ @include typography-use-var(max-width, line-length);
264
+ @include typography-use-var(padding, text-container-padding);
265
+
266
+ display: block;
267
+ margin: 0 auto;
268
+ width: 100%;
269
+ }
265
270
  }
266
271
  }
267
272
  }
268
273
 
269
- @mixin typography-base-styles {
270
- .rmd-typography {
271
- @include utils.map-to-styles($base-font-styles);
274
+ @mixin typography-base-styles($disable-layer: false) {
275
+ @include utils.optional-layer(typography, $disable-layer) {
276
+ .rmd-typography {
277
+ @include utils.map-to-styles($base-font-styles);
272
278
 
273
- &--headline-1 {
274
- @include utils.map-to-styles($headline-1-styles);
275
- }
279
+ &--headline-1 {
280
+ @include utils.map-to-styles($headline-1-styles);
281
+ }
276
282
 
277
- &--headline-2 {
278
- @include utils.map-to-styles($headline-2-styles);
279
- }
283
+ &--headline-2 {
284
+ @include utils.map-to-styles($headline-2-styles);
285
+ }
280
286
 
281
- &--headline-3 {
282
- @include utils.map-to-styles($headline-3-styles);
283
- }
287
+ &--headline-3 {
288
+ @include utils.map-to-styles($headline-3-styles);
289
+ }
284
290
 
285
- &--headline-4 {
286
- @include utils.map-to-styles($headline-4-styles);
287
- }
291
+ &--headline-4 {
292
+ @include utils.map-to-styles($headline-4-styles);
293
+ }
288
294
 
289
- &--headline-5 {
290
- @include utils.map-to-styles($headline-5-styles);
291
- }
295
+ &--headline-5 {
296
+ @include utils.map-to-styles($headline-5-styles);
297
+ }
292
298
 
293
- &--headline-6 {
294
- @include utils.map-to-styles($headline-6-styles);
295
- }
299
+ &--headline-6 {
300
+ @include utils.map-to-styles($headline-6-styles);
301
+ }
296
302
 
297
- &--subtitle-1 {
298
- @include utils.map-to-styles($subtitle-1-styles);
299
- }
303
+ &--subtitle-1 {
304
+ @include utils.map-to-styles($subtitle-1-styles);
305
+ }
300
306
 
301
- &--subtitle-2 {
302
- @include utils.map-to-styles($subtitle-2-styles);
303
- }
307
+ &--subtitle-2 {
308
+ @include utils.map-to-styles($subtitle-2-styles);
309
+ }
304
310
 
305
- &--body-1 {
306
- @include utils.map-to-styles($body-1-styles);
307
- }
311
+ &--body-1 {
312
+ @include utils.map-to-styles($body-1-styles);
313
+ }
308
314
 
309
- &--body-2 {
310
- @include utils.map-to-styles($body-2-styles);
311
- }
315
+ &--body-2 {
316
+ @include utils.map-to-styles($body-2-styles);
317
+ }
312
318
 
313
- &--caption {
314
- @include utils.map-to-styles($caption-styles);
315
- }
319
+ &--caption {
320
+ @include utils.map-to-styles($caption-styles);
321
+ }
316
322
 
317
- &--overline {
318
- @include utils.map-to-styles($overline-styles);
323
+ &--overline {
324
+ @include utils.map-to-styles($overline-styles);
325
+ }
319
326
  }
320
327
  }
321
328
  }
@@ -344,7 +351,9 @@ $typography-variables: (line-length, text-container-padding);
344
351
  }
345
352
  }
346
353
 
347
- @mixin typography-styles {
348
- @include typography-text-container-styles;
349
- @include typography-base-styles;
354
+ @mixin typography-styles($disable-layer: false) {
355
+ @include utils.optional-layer(typography, $disable-layer) {
356
+ @include typography-text-container-styles($disable-layer: true);
357
+ @include typography-base-styles(true);
358
+ }
350
359
  }
@@ -37,104 +37,106 @@ $variables: (top, right, bottom, left, opacity, position);
37
37
  #{$property}: get-var($name, $fallback);
38
38
  }
39
39
 
40
- @mixin styles {
40
+ @mixin styles($disable-layer: false) {
41
41
  @if not $disable-everything {
42
- .rmd-window-splitter {
43
- @include use-var(opacity);
44
- @include utils.mouse-hover {
45
- @include set-var(opacity, 1);
46
- }
47
- @include utils.keyboard-only {
48
- // Do not use `:focus-visible` here since since it'll still be active
49
- // after dragging with a mouse until the user clicks something else. The
50
- // `--dragging` state handles that part
51
- &:focus {
42
+ @include utils.optional-layer(window-splitter, $disable-layer) {
43
+ .rmd-window-splitter {
44
+ @include use-var(opacity);
45
+ @include utils.mouse-hover {
52
46
  @include set-var(opacity, 1);
53
47
  }
54
- }
48
+ @include utils.keyboard-only {
49
+ // Do not use `:focus-visible` here since since it'll still be active
50
+ // after dragging with a mouse until the user clicks something else. The
51
+ // `--dragging` state handles that part
52
+ &:focus {
53
+ @include set-var(opacity, 1);
54
+ }
55
+ }
55
56
 
56
- background-color: transparent;
57
- border: 0;
58
- outline-style: none;
59
- padding: 0;
60
- position: fixed;
61
- transition: opacity transition.$linear-duration;
62
- z-index: $z-index;
63
-
64
- &::after {
65
- background-color: $background-color;
66
- content: "";
67
- inset: 0;
68
- position: absolute;
69
- }
57
+ background-color: transparent;
58
+ border: 0;
59
+ outline-style: none;
60
+ padding: 0;
61
+ position: fixed;
62
+ transition: opacity transition.$linear-duration;
63
+ z-index: $z-index;
64
+
65
+ &::after {
66
+ background-color: $background-color;
67
+ content: "";
68
+ inset: 0;
69
+ position: absolute;
70
+ }
70
71
 
71
- @if not $disable-horizontal {
72
- &--h {
73
- @include utils.auto-rtl(left, get-var(position));
74
- @include use-var(bottom);
75
- @include use-var(top);
72
+ @if not $disable-horizontal {
73
+ &--h {
74
+ @include utils.auto-rtl(left, get-var(position));
75
+ @include use-var(bottom);
76
+ @include use-var(top);
76
77
 
77
- cursor: col-resize;
78
- width: $size;
78
+ cursor: col-resize;
79
+ width: $size;
79
80
 
80
- &::after {
81
- width: $background-size;
81
+ &::after {
82
+ width: $background-size;
83
+ }
82
84
  }
83
- }
84
85
 
85
- @if not $disable-reversed {
86
- &--hr {
87
- @include utils.auto-rtl(right, get-var(position));
86
+ @if not $disable-reversed {
87
+ &--hr {
88
+ @include utils.auto-rtl(right, get-var(position));
88
89
 
89
- left: auto;
90
+ left: auto;
90
91
 
91
- &::after {
92
- @include utils.auto-rtl(margin-left, auto);
92
+ &::after {
93
+ @include utils.auto-rtl(margin-left, auto);
94
+ }
93
95
  }
94
96
  }
95
97
  }
96
- }
97
98
 
98
- @if not $disable-vertical {
99
- &--v {
100
- @include use-var(left);
101
- @include use-var(right);
102
- @include use-var(top, position);
99
+ @if not $disable-vertical {
100
+ &--v {
101
+ @include use-var(left);
102
+ @include use-var(right);
103
+ @include use-var(top, position);
103
104
 
104
- cursor: row-resize;
105
- height: $size;
106
- width: 100%;
105
+ cursor: row-resize;
106
+ height: $size;
107
+ width: 100%;
107
108
 
108
- &::after {
109
- height: $background-size;
109
+ &::after {
110
+ height: $background-size;
111
+ }
110
112
  }
111
- }
112
113
 
113
- @if not $disable-reversed {
114
- &--vr {
115
- @include use-var(bottom, position);
114
+ @if not $disable-reversed {
115
+ &--vr {
116
+ @include use-var(bottom, position);
116
117
 
117
- top: auto;
118
+ top: auto;
118
119
 
119
- &::after {
120
- top: calc(100% - $background-size);
120
+ &::after {
121
+ top: calc(100% - $background-size);
122
+ }
121
123
  }
122
124
  }
123
125
  }
124
- }
125
126
 
126
- @if not $disable-absolute-position {
127
- &--a {
128
- position: absolute;
127
+ @if not $disable-absolute-position {
128
+ &--a {
129
+ position: absolute;
130
+ }
129
131
  }
130
- }
131
132
 
132
- &--dragging {
133
- @include set-var(opacity, 1);
133
+ &--dragging {
134
+ @include set-var(opacity, 1);
134
135
 
135
- // set to important so that the `.rmd-dragging` styles do not affect
136
- // window splitter
137
- pointer-events: auto !important;
136
+ // set to important so that the `.rmd-dragging` styles do not affect
137
+ // window splitter
138
+ pointer-events: auto !important;
139
+ }
138
140
  }
139
141
  }
140
142
  }
package/tsconfig.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "allowSyntheticDefaultImports": true,
14
14
  "forceConsistentCasingInFileNames": true,
15
15
  "jsx": "preserve",
16
- "lib": ["dom", "dom.iterable", "esnext"]
16
+ "lib": ["dom", "dom.iterable", "esnext"],
17
17
  },
18
- "exclude": ["node_modules", "dist"]
18
+ "exclude": ["node_modules", "dist"],
19
19
  }