@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.
- package/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-lint.log +12 -0
- package/CHANGELOG.md +12 -0
- package/dist/_core.scss +157 -240
- package/dist/_utils.scss +10 -0
- package/dist/app-bar/_app-bar.scss +95 -93
- package/dist/avatar/_avatar.scss +49 -47
- package/dist/badge/_badge.scss +19 -17
- package/dist/box/_box.scss +57 -55
- package/dist/button/_button.scss +122 -120
- package/dist/card/_card.scss +72 -70
- package/dist/chip/_chip.scss +105 -103
- package/dist/dialog/_dialog.scss +128 -126
- package/dist/divider/_divider.scss +24 -22
- package/dist/draggable/_draggable.scss +16 -12
- package/dist/expansion-panel/_expansion-panel.scss +69 -52
- package/dist/form/Form.d.ts +1 -1
- package/dist/form/Form.js +2 -1
- package/dist/form/Form.js.map +1 -1
- package/dist/form/_form.scss +1175 -1128
- package/dist/icon/_icon.scss +64 -62
- package/dist/interaction/_interaction.scss +39 -35
- package/dist/layout/_layout.scss +68 -67
- package/dist/link/_link.scss +52 -50
- package/dist/list/_list.scss +124 -122
- package/dist/menu/_menu.scss +9 -7
- package/dist/overlay/_overlay.scss +25 -23
- package/dist/progress/_progress.scss +11 -6
- package/dist/responsive-item/_responsive-item.scss +91 -89
- package/dist/segmented-button/_segmented-button.scss +54 -49
- package/dist/sheet/_sheet.scss +84 -82
- package/dist/snackbar/_snackbar.scss +128 -123
- package/dist/table/_table.scss +159 -157
- package/dist/tabs/_tabs.scss +10 -8
- package/dist/tooltip/_tooltip.scss +60 -58
- package/dist/transition/_transition.scss +44 -39
- package/dist/tree/_tree.scss +83 -81
- package/dist/typography/_typography.scss +58 -49
- package/dist/window-splitter/_window-splitter.scss +72 -70
- package/package.json +1 -1
- package/src/_core.scss +157 -240
- package/src/_utils.scss +10 -0
- package/src/app-bar/_app-bar.scss +95 -93
- package/src/avatar/_avatar.scss +49 -47
- package/src/badge/_badge.scss +19 -17
- package/src/box/_box.scss +57 -55
- package/src/button/_button.scss +122 -120
- package/src/card/_card.scss +72 -70
- package/src/chip/_chip.scss +105 -103
- package/src/dialog/_dialog.scss +128 -126
- package/src/divider/_divider.scss +24 -22
- package/src/draggable/_draggable.scss +16 -12
- package/src/expansion-panel/_expansion-panel.scss +69 -52
- package/src/form/Form.tsx +2 -1
- package/src/form/_form.scss +1175 -1128
- package/src/icon/_icon.scss +64 -62
- package/src/interaction/_interaction.scss +39 -35
- package/src/layout/_layout.scss +68 -67
- package/src/link/_link.scss +52 -50
- package/src/list/_list.scss +124 -122
- package/src/menu/_menu.scss +9 -7
- package/src/overlay/_overlay.scss +25 -23
- package/src/progress/_progress.scss +11 -6
- package/src/responsive-item/_responsive-item.scss +91 -89
- package/src/segmented-button/_segmented-button.scss +54 -49
- package/src/sheet/_sheet.scss +84 -82
- package/src/snackbar/_snackbar.scss +128 -123
- package/src/table/_table.scss +159 -157
- package/src/tabs/_tabs.scss +10 -8
- package/src/tooltip/_tooltip.scss +60 -58
- package/src/transition/_transition.scss +44 -39
- package/src/tree/_tree.scss +83 -81
- package/src/typography/_typography.scss +58 -49
- package/src/window-splitter/_window-splitter.scss +72 -70
- package/tsconfig.json +2 -2
package/src/tree/_tree.scss
CHANGED
|
@@ -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
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
81
|
+
list-style: none;
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
97
|
+
&--disabled {
|
|
98
|
+
cursor: auto;
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
&:hover::before {
|
|
101
|
+
@include interaction.set-var(background-color, transparent);
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
|
-
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
&--link {
|
|
106
|
+
color: inherit;
|
|
107
|
+
text-decoration: none;
|
|
108
|
+
}
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
.rmd-tree-group {
|
|
165
|
+
background-color: inherit;
|
|
166
|
+
color: inherit;
|
|
167
|
+
font-size: inherit;
|
|
168
|
+
line-height: inherit;
|
|
168
169
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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(
|
|
256
|
+
@mixin typography-text-container-styles(
|
|
257
|
+
$disabled: $disable-text-container,
|
|
258
|
+
$disable-layer: false
|
|
259
|
+
) {
|
|
257
260
|
@if not $disabled {
|
|
258
|
-
.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
.
|
|
271
|
-
|
|
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
&--headline-1 {
|
|
280
|
+
@include utils.map-to-styles($headline-1-styles);
|
|
281
|
+
}
|
|
276
282
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
283
|
+
&--headline-2 {
|
|
284
|
+
@include utils.map-to-styles($headline-2-styles);
|
|
285
|
+
}
|
|
280
286
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
&--headline-3 {
|
|
288
|
+
@include utils.map-to-styles($headline-3-styles);
|
|
289
|
+
}
|
|
284
290
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
291
|
+
&--headline-4 {
|
|
292
|
+
@include utils.map-to-styles($headline-4-styles);
|
|
293
|
+
}
|
|
288
294
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
&--headline-5 {
|
|
296
|
+
@include utils.map-to-styles($headline-5-styles);
|
|
297
|
+
}
|
|
292
298
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
299
|
+
&--headline-6 {
|
|
300
|
+
@include utils.map-to-styles($headline-6-styles);
|
|
301
|
+
}
|
|
296
302
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
303
|
+
&--subtitle-1 {
|
|
304
|
+
@include utils.map-to-styles($subtitle-1-styles);
|
|
305
|
+
}
|
|
300
306
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
307
|
+
&--subtitle-2 {
|
|
308
|
+
@include utils.map-to-styles($subtitle-2-styles);
|
|
309
|
+
}
|
|
304
310
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
311
|
+
&--body-1 {
|
|
312
|
+
@include utils.map-to-styles($body-1-styles);
|
|
313
|
+
}
|
|
308
314
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
&--body-2 {
|
|
316
|
+
@include utils.map-to-styles($body-2-styles);
|
|
317
|
+
}
|
|
312
318
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
319
|
+
&--caption {
|
|
320
|
+
@include utils.map-to-styles($caption-styles);
|
|
321
|
+
}
|
|
316
322
|
|
|
317
|
-
|
|
318
|
-
|
|
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-
|
|
349
|
-
|
|
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
|
-
.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@include
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
78
|
-
|
|
78
|
+
cursor: col-resize;
|
|
79
|
+
width: $size;
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
&::after {
|
|
82
|
+
width: $background-size;
|
|
83
|
+
}
|
|
82
84
|
}
|
|
83
|
-
}
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
@if not $disable-reversed {
|
|
87
|
+
&--hr {
|
|
88
|
+
@include utils.auto-rtl(right, get-var(position));
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
left: auto;
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
&::after {
|
|
93
|
+
@include utils.auto-rtl(margin-left, auto);
|
|
94
|
+
}
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
|
-
}
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
cursor: row-resize;
|
|
106
|
+
height: $size;
|
|
107
|
+
width: 100%;
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
&::after {
|
|
110
|
+
height: $background-size;
|
|
111
|
+
}
|
|
110
112
|
}
|
|
111
|
-
}
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
@if not $disable-reversed {
|
|
115
|
+
&--vr {
|
|
116
|
+
@include use-var(bottom, position);
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
top: auto;
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
&::after {
|
|
121
|
+
top: calc(100% - $background-size);
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
|
-
}
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
@if not $disable-absolute-position {
|
|
128
|
+
&--a {
|
|
129
|
+
position: absolute;
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
|
-
}
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
&--dragging {
|
|
134
|
+
@include set-var(opacity, 1);
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
}
|