@react-md/core 1.0.0-next.1 → 1.0.0-next.2
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 +1 -1
- package/CHANGELOG.md +8 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/DefaultToastRenderer.tsx.html +166 -112
- package/coverage/lcov-report/Snackbar.tsx.html +360 -402
- package/coverage/lcov-report/Toast.tsx.html +868 -0
- package/coverage/lcov-report/ToastManager.tsx.html +1783 -0
- package/coverage/lcov-report/ToastManagerProvider.tsx.html +216 -216
- package/coverage/lcov-report/icon/FontIcon.tsx.html +28 -28
- package/coverage/lcov-report/icon/index.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/snackbar/Snackbar.tsx.html +55 -97
- package/coverage/lcov-report/snackbar/Toast.tsx.html +546 -501
- package/coverage/lcov-report/snackbar/ToastManager.tsx.html +269 -269
- package/coverage/lcov-report/snackbar/ToastManagerProvider.tsx.html +23 -23
- package/coverage/lcov-report/snackbar/index.html +59 -14
- package/coverage/lcov-report/snackbar/snackbarStyles.ts.html +12 -87
- package/coverage/lcov-report/snackbar/toastStyles.ts.html +206 -146
- package/coverage/lcov-report/snackbar/useCurrentToastActions.ts.html +226 -0
- package/coverage/lcov-report/snackbarStyles.ts.html +46 -121
- package/coverage/lcov-report/transition/config.ts.html +5 -5
- package/coverage/lcov-report/transition/index.html +1 -1
- package/coverage/lcov-report/typography/Typography.tsx.html +108 -402
- package/coverage/lcov-report/typography/index.html +10 -10
- package/dist/_core.scss +34 -1
- package/dist/_utils.scss +57 -0
- package/dist/app-bar/_app-bar.scss +15 -23
- package/dist/avatar/_avatar.scss +25 -34
- package/dist/badge/_badge.scss +71 -44
- package/dist/box/_box.scss +18 -29
- package/dist/button/_button.scss +50 -62
- package/dist/card/_card.scss +14 -23
- package/dist/chip/_chip.scss +33 -46
- package/dist/dialog/_dialog.scss +95 -93
- package/dist/divider/Divider.d.ts +0 -1
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/_divider.scss +33 -43
- package/dist/form/Label.d.ts +5 -5
- package/dist/form/Label.js.map +1 -1
- package/dist/form/TextArea.js +1 -1
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextFieldContainerStyles.d.ts +7 -7
- package/dist/form/TextFieldContainerStyles.js.map +1 -1
- package/dist/form/_form.scss +200 -203
- package/dist/form/textAreaStyles.d.ts +2 -2
- package/dist/form/textAreaStyles.js.map +1 -1
- package/dist/form/types.d.ts +0 -2
- package/dist/form/types.js.map +1 -1
- package/dist/icon/_icon.scss +31 -47
- package/dist/interaction/_interaction.scss +47 -57
- package/dist/layout/_layout.scss +14 -19
- package/dist/link/_link.scss +15 -23
- package/dist/list/_list.scss +53 -63
- package/dist/menu/_menu.scss +16 -27
- package/dist/overlay/_overlay.scss +14 -19
- package/dist/progress/_progress.scss +25 -30
- package/dist/segmented-button/_segmented-button.scss +32 -43
- package/dist/sheet/_sheet.scss +24 -42
- package/dist/snackbar/DefaultToastRenderer.js +1 -1
- package/dist/snackbar/DefaultToastRenderer.js.map +1 -1
- package/dist/snackbar/Snackbar.d.ts +1 -3
- package/dist/snackbar/Snackbar.js +2 -3
- package/dist/snackbar/Snackbar.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +1 -1
- package/dist/snackbar/Toast.js +5 -1
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastManager.d.ts +2 -1
- package/dist/snackbar/ToastManager.js +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/_snackbar.scss +15 -23
- package/dist/table/_table.scss +55 -70
- package/dist/tabs/_tabs.scss +25 -30
- package/dist/theme/_theme.scss +31 -89
- package/dist/tooltip/_tooltip.scss +16 -25
- package/dist/transition/_transition.scss +38 -37
- package/dist/tree/_tree.scss +102 -109
- package/dist/typography/_typography.scss +17 -22
- package/dist/window-splitter/_window-splitter.scss +19 -45
- package/package.json +1 -1
- package/src/_core.scss +34 -1
- package/src/_utils.scss +57 -0
- package/src/app-bar/_app-bar.scss +15 -23
- package/src/avatar/_avatar.scss +25 -34
- package/src/badge/_badge.scss +71 -44
- package/src/box/_box.scss +18 -29
- package/src/button/_button.scss +50 -62
- package/src/card/_card.scss +14 -23
- package/src/chip/_chip.scss +33 -46
- package/src/dialog/_dialog.scss +95 -93
- package/src/divider/Divider.tsx +0 -1
- package/src/divider/_divider.scss +33 -43
- package/src/form/Label.tsx +5 -5
- package/src/form/TextArea.tsx +1 -1
- package/src/form/TextFieldContainerStyles.ts +7 -7
- package/src/form/_form.scss +200 -203
- package/src/form/textAreaStyles.ts +2 -2
- package/src/form/types.ts +0 -2
- package/src/icon/_icon.scss +31 -47
- package/src/interaction/_interaction.scss +47 -57
- package/src/layout/_layout.scss +14 -19
- package/src/link/_link.scss +15 -23
- package/src/list/_list.scss +53 -63
- package/src/menu/_menu.scss +16 -27
- package/src/overlay/_overlay.scss +14 -19
- package/src/progress/_progress.scss +25 -30
- package/src/segmented-button/_segmented-button.scss +32 -43
- package/src/sheet/_sheet.scss +24 -42
- package/src/snackbar/DefaultToastRenderer.tsx +1 -1
- package/src/snackbar/Snackbar.tsx +17 -25
- package/src/snackbar/Toast.tsx +7 -2
- package/src/snackbar/ToastManager.tsx +3 -2
- package/src/snackbar/__tests__/Snackbar.tsx +12 -11
- package/src/snackbar/__tests__/ToastManagerProvider.tsx +20 -42
- package/src/snackbar/__tests__/__snapshots__/Snackbar.tsx.snap +127 -27
- package/src/snackbar/__tests__/__snapshots__/ToastManagerProvider.tsx.snap +23 -8
- package/src/snackbar/_snackbar.scss +15 -23
- package/src/table/_table.scss +55 -70
- package/src/tabs/_tabs.scss +25 -30
- package/src/theme/_theme.scss +31 -89
- package/src/tooltip/_tooltip.scss +16 -25
- package/src/transition/_transition.scss +38 -37
- package/src/tree/_tree.scss +102 -109
- package/src/typography/_typography.scss +17 -22
- package/src/window-splitter/_window-splitter.scss +19 -45
- package/.turbo/turbo-lint.log +0 -12
- package/.turbo/turbo-test.log +0 -166
- package/.turbo/turbo-typecheck.log +0 -4
- package/dist/divider/VerticalDivider.d.ts +0 -32
- package/dist/divider/useVerticalDividerHeight.d.ts +0 -37
- package/dist/icon/MaterialIconsProvider.d.ts +0 -12
- package/dist/icon/MaterialIconsProvider.js +0 -17
- package/dist/icon/MaterialIconsProvider.js.map +0 -1
- package/dist/icon/MaterialSymbolsProvider.d.ts +0 -145
- package/dist/icon/MaterialSymbolsProvider.js +0 -60
- package/dist/icon/MaterialSymbolsProvider.js.map +0 -1
- package/dist/link/LinkProvider.d.ts +0 -29
- package/dist/menu/menuConfig.d.ts +0 -60
- package/dist/tooltip/useOverflowTooltip.d.ts +0 -61
package/src/theme/_theme.scss
CHANGED
|
@@ -129,96 +129,34 @@ $_validated_color_scheme: utils.validate(
|
|
|
129
129
|
"$color-scheme"
|
|
130
130
|
);
|
|
131
131
|
|
|
132
|
-
$theme-
|
|
133
|
-
background-color
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
on-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
secondary-color: (
|
|
154
|
-
var: --rmd-secondary-color,
|
|
155
|
-
value: $secondary-color,
|
|
156
|
-
),
|
|
157
|
-
on-secondary-color: (
|
|
158
|
-
var: --rmd-on-secondary-color,
|
|
159
|
-
value: $on-secondary-color,
|
|
160
|
-
),
|
|
161
|
-
warning-color: (
|
|
162
|
-
var: --rmd-warning-color,
|
|
163
|
-
value: $warning-color,
|
|
164
|
-
),
|
|
165
|
-
on-warning-color: (
|
|
166
|
-
var: --rmd-on-warning-color,
|
|
167
|
-
value: $on-warning-color,
|
|
168
|
-
),
|
|
169
|
-
error-color: (
|
|
170
|
-
var: --rmd-error-color,
|
|
171
|
-
value: $error-color,
|
|
172
|
-
),
|
|
173
|
-
on-error-color: (
|
|
174
|
-
var: --rmd-on-error-color,
|
|
175
|
-
value: $on-error-color,
|
|
176
|
-
),
|
|
177
|
-
success-color: (
|
|
178
|
-
var: --rmd-success-color,
|
|
179
|
-
value: $success-color,
|
|
180
|
-
),
|
|
181
|
-
on-success-color: (
|
|
182
|
-
var: --rmd-on-success-color,
|
|
183
|
-
value: $on-success-color,
|
|
184
|
-
),
|
|
185
|
-
text-primary-color: (
|
|
186
|
-
var: --rmd-text-primary-color,
|
|
187
|
-
value: $text-primary-color,
|
|
188
|
-
),
|
|
189
|
-
text-secondary-color: (
|
|
190
|
-
var: --rmd-text-secondary-color,
|
|
191
|
-
value: $text-secondary-color,
|
|
192
|
-
),
|
|
193
|
-
text-hint-color: (
|
|
194
|
-
var: --rmd-text-hint-color,
|
|
195
|
-
value: $text-hint-color,
|
|
196
|
-
),
|
|
197
|
-
text-disabled-color: (
|
|
198
|
-
var: --rmd-text-disabled-color,
|
|
199
|
-
value: $text-disabled-color,
|
|
200
|
-
),
|
|
201
|
-
outline-width: (
|
|
202
|
-
var: --rmd-outline-width,
|
|
203
|
-
value: $outline-width,
|
|
204
|
-
),
|
|
205
|
-
outline-color: (
|
|
206
|
-
var: --rmd-outline-color,
|
|
207
|
-
value: $outline-color,
|
|
208
|
-
),
|
|
209
|
-
outline-grey-color: (
|
|
210
|
-
var: --rmd-outline-grey-color,
|
|
211
|
-
value: $outline-grey-color,
|
|
212
|
-
),
|
|
132
|
+
$theme-variables: (
|
|
133
|
+
background-color,
|
|
134
|
+
on-background-color,
|
|
135
|
+
surface-color,
|
|
136
|
+
primary-color,
|
|
137
|
+
on-primary-color,
|
|
138
|
+
secondary-color,
|
|
139
|
+
on-secondary-color,
|
|
140
|
+
warning-color,
|
|
141
|
+
on-warning-color,
|
|
142
|
+
success-color,
|
|
143
|
+
on-success-color,
|
|
144
|
+
error-color,
|
|
145
|
+
on-error-color,
|
|
146
|
+
text-primary-color,
|
|
147
|
+
text-secondary-color,
|
|
148
|
+
text-hint-color,
|
|
149
|
+
text-disabled-color,
|
|
150
|
+
outline-width,
|
|
151
|
+
outline-color,
|
|
152
|
+
outline-grey-color
|
|
213
153
|
);
|
|
214
154
|
|
|
215
155
|
@function theme-get-var($name, $fallback: null) {
|
|
216
|
-
$
|
|
217
|
-
$var: map.get($found, var);
|
|
218
|
-
$value: if($fallback, $fallback, map.get($found, value));
|
|
156
|
+
$var: utils.get-var-name($theme-variables, $name, "theme");
|
|
219
157
|
|
|
220
|
-
@if $
|
|
221
|
-
@return var(#{$var}, #{$
|
|
158
|
+
@if $fallback {
|
|
159
|
+
@return var(#{$var}, #{$fallback});
|
|
222
160
|
}
|
|
223
161
|
|
|
224
162
|
@return var(#{$var});
|
|
@@ -237,9 +175,9 @@ $theme-var-lookup: (
|
|
|
237
175
|
}
|
|
238
176
|
|
|
239
177
|
@mixin theme-set-var($name, $value-or-theme-name) {
|
|
240
|
-
$var:
|
|
178
|
+
$var: utils.get-var-name($theme-variables, $name, "theme");
|
|
241
179
|
$value: $value-or-theme-name;
|
|
242
|
-
@if
|
|
180
|
+
@if list.index($theme-variables, $value-or-theme-name) {
|
|
243
181
|
$name: $value-or-theme-name;
|
|
244
182
|
$value: theme-get-var($name);
|
|
245
183
|
}
|
|
@@ -291,7 +229,7 @@ $theme-var-lookup: (
|
|
|
291
229
|
}
|
|
292
230
|
}
|
|
293
231
|
|
|
294
|
-
@mixin
|
|
232
|
+
@mixin theme-variables {
|
|
295
233
|
@include theme-set-var(background-color, $background-color);
|
|
296
234
|
@if $disable-dark-elevation {
|
|
297
235
|
@include theme-set-var(surface-color, $surface-color);
|
|
@@ -317,6 +255,10 @@ $theme-var-lookup: (
|
|
|
317
255
|
@include set-dark-elevation-color($z-value, $background-color);
|
|
318
256
|
}
|
|
319
257
|
}
|
|
258
|
+
|
|
259
|
+
@include theme-set-var(outline-width, $outline-width);
|
|
260
|
+
@include theme-set-var(outline-color, $outline-color);
|
|
261
|
+
@include theme-set-var(outline-grey-color, $outline-grey-color);
|
|
320
262
|
}
|
|
321
263
|
|
|
322
264
|
@mixin create-surface($z-value, $disable-colors: $disable-dark-elevation) {
|
|
@@ -45,45 +45,36 @@ $leave-duration: transition.$linear-duration !default;
|
|
|
45
45
|
$leave-timing-function: transition.$acceleration-timing-function !default;
|
|
46
46
|
$transition-distance: 0.5rem !default;
|
|
47
47
|
|
|
48
|
-
$
|
|
49
|
-
background-color: (
|
|
50
|
-
var: --rmd-tooltip-background-color,
|
|
51
|
-
value: $background-color,
|
|
52
|
-
),
|
|
53
|
-
color: (
|
|
54
|
-
var: --rmd-tooltip-color,
|
|
55
|
-
value: $color,
|
|
56
|
-
),
|
|
57
|
-
spacing: (
|
|
58
|
-
// this is only added so you can safely do:
|
|
59
|
-
// @include react-md.tooltip-set-var(spacing, $custom-spacing);
|
|
60
|
-
var: --rmd-tooltip-spacing,
|
|
61
|
-
value: $spacing,
|
|
62
|
-
),
|
|
63
|
-
);
|
|
48
|
+
$variables: (background-color, color, spacing);
|
|
64
49
|
|
|
65
50
|
@function get-var($name, $fallback: null) {
|
|
66
|
-
$
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@if $value {
|
|
71
|
-
@return var(#{$var}, #{$value});
|
|
51
|
+
$var: utils.get-var-name($variables, $name, "tooltip");
|
|
52
|
+
@if $fallback {
|
|
53
|
+
@return var(#{$var}, #{$fallback});
|
|
72
54
|
}
|
|
73
55
|
|
|
74
56
|
@return var(#{$var});
|
|
75
57
|
}
|
|
76
58
|
|
|
77
59
|
@mixin set-var($name, $value) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
@if $value {
|
|
61
|
+
#{utils.get-var-name($variables, $name, "tooltip")}: #{$value};
|
|
62
|
+
}
|
|
81
63
|
}
|
|
82
64
|
|
|
83
65
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
84
66
|
#{$property}: get-var($name, $fallback);
|
|
85
67
|
}
|
|
86
68
|
|
|
69
|
+
@mixin variables {
|
|
70
|
+
@if not $disable-everything {
|
|
71
|
+
@include set-var(background-color, $background-color);
|
|
72
|
+
@include set-var(color, $color);
|
|
73
|
+
|
|
74
|
+
// do not include spacing
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
87
78
|
@mixin styles {
|
|
88
79
|
@if not $disable-everything {
|
|
89
80
|
.rmd-tooltip {
|
|
@@ -64,52 +64,28 @@ $max-width-transition-duration: $linear-duration !default;
|
|
|
64
64
|
$max-width-transition-timing-function: $linear-timing-function !default;
|
|
65
65
|
$max-width-transition-default: 100% !default;
|
|
66
66
|
|
|
67
|
-
$transition-
|
|
68
|
-
skeleton-placeholder-background-color
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
value: $skeleton-placeholder-height,
|
|
75
|
-
),
|
|
76
|
-
skeleton-placeholder-width: (
|
|
77
|
-
var: --rmd-skeleton-placeholder-width,
|
|
78
|
-
value: null,
|
|
79
|
-
),
|
|
80
|
-
slide-duration: (
|
|
81
|
-
var: --rmd-slide-duration,
|
|
82
|
-
value: $slide-duration,
|
|
83
|
-
),
|
|
84
|
-
max-width: (
|
|
85
|
-
var: --rmd-max-width,
|
|
86
|
-
value: $max-width-transition-default,
|
|
87
|
-
),
|
|
88
|
-
max-width-gap: (
|
|
89
|
-
var: --rmd-max-width-gap,
|
|
90
|
-
value: 0,
|
|
91
|
-
),
|
|
67
|
+
$transition-variables: (
|
|
68
|
+
skeleton-placeholder-background-color,
|
|
69
|
+
skeleton-placeholder-height,
|
|
70
|
+
skeleton-placeholder-width,
|
|
71
|
+
slide-duration,
|
|
72
|
+
max-width,
|
|
73
|
+
max-width-gap
|
|
92
74
|
);
|
|
93
75
|
|
|
94
76
|
@function transition-get-var($name, $fallback: null) {
|
|
95
|
-
$
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@if $value {
|
|
100
|
-
@return var(#{$var}, #{$value});
|
|
77
|
+
$var: utils.get-var-name($transition-variables, $name, "transition");
|
|
78
|
+
@if $fallback {
|
|
79
|
+
@return var(#{$var}, #{$fallback});
|
|
101
80
|
}
|
|
102
81
|
|
|
103
82
|
@return var(#{$var});
|
|
104
83
|
}
|
|
105
84
|
|
|
106
85
|
@mixin transition-set-var($name, $value) {
|
|
107
|
-
$
|
|
108
|
-
utils.
|
|
109
|
-
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
#{$var}: #{$value};
|
|
86
|
+
@if $value {
|
|
87
|
+
#{utils.get-var-name($transition-variables, $name, "transition")}: #{$value};
|
|
88
|
+
}
|
|
113
89
|
}
|
|
114
90
|
|
|
115
91
|
@mixin transition-use-var($property, $name: $property, $fallback: null) {
|
|
@@ -301,6 +277,31 @@ $transition-var-lookup: (
|
|
|
301
277
|
}
|
|
302
278
|
}
|
|
303
279
|
|
|
280
|
+
@mixin transition-variables {
|
|
281
|
+
@if not $disable-skeleton-placeholder {
|
|
282
|
+
@include transition-set-var(
|
|
283
|
+
skeleton-placeholder-background-color,
|
|
284
|
+
$skeleton-placeholder-background-color
|
|
285
|
+
);
|
|
286
|
+
@include transition-set-var(
|
|
287
|
+
skeleton-placeholder-height,
|
|
288
|
+
$skeleton-placeholder-height
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@if not $disable-slide-transition {
|
|
293
|
+
@include transition-set-var(slide-duration, $slide-duration);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
@if not $disable-max-width-transition {
|
|
297
|
+
@include transition-set-var(max-width, $max-width-transition-default);
|
|
298
|
+
|
|
299
|
+
@if not $disable-max-width-transition-gap {
|
|
300
|
+
@include transition-set-var(max-width-gap, 0);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
304
305
|
@mixin transition-styles {
|
|
305
306
|
@if not $disable-collapse-transition {
|
|
306
307
|
@include collapse-transition;
|
package/src/tree/_tree.scss
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use "../typography/typography";
|
|
7
7
|
@use "../interaction/interaction";
|
|
8
8
|
|
|
9
|
+
$disable-everything: false !default;
|
|
9
10
|
$disable-expander-left: false !default;
|
|
10
11
|
$disable-expander-left-as-media: false !default;
|
|
11
12
|
$disable-expander-left-as-media-offset: false !default;
|
|
@@ -22,153 +23,145 @@ $selected-styles: (
|
|
|
22
23
|
font-weight: typography.$font-weight-bold,
|
|
23
24
|
) !default;
|
|
24
25
|
|
|
25
|
-
$
|
|
26
|
-
depth: (
|
|
27
|
-
var: --rmd-tree-depth,
|
|
28
|
-
value: -1,
|
|
29
|
-
),
|
|
30
|
-
item-padding: (
|
|
31
|
-
var: --rmd-tree-item-padding,
|
|
32
|
-
value: 0,
|
|
33
|
-
),
|
|
34
|
-
padding-base: (
|
|
35
|
-
var: --rmd-tree-item-padding-base,
|
|
36
|
-
value: $padding-base,
|
|
37
|
-
),
|
|
38
|
-
padding-incrementor: (
|
|
39
|
-
var: --rmd-tree-item-padding-incrementor,
|
|
40
|
-
value: $padding-incrementor,
|
|
41
|
-
),
|
|
42
|
-
);
|
|
26
|
+
$variables: (depth, item-padding, item-padding-base, item-padding-incrementor);
|
|
43
27
|
|
|
44
28
|
@function get-var($name, $fallback: null) {
|
|
45
|
-
$
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
@if $value {
|
|
50
|
-
@return var(#{$var}, #{$value});
|
|
29
|
+
$var: utils.get-var-name($variables, $name, "tree");
|
|
30
|
+
@if $fallback {
|
|
31
|
+
@return var(#{$var}, #{$fallback});
|
|
51
32
|
}
|
|
52
33
|
|
|
53
34
|
@return var(#{$var});
|
|
54
35
|
}
|
|
55
36
|
|
|
56
37
|
@mixin set-var($name, $value) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
@if $value {
|
|
39
|
+
#{utils.get-var-name($variables, $name, "tree")}: #{$value};
|
|
40
|
+
}
|
|
60
41
|
}
|
|
61
42
|
|
|
62
43
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
63
44
|
#{$property}: get-var($name, $fallback);
|
|
64
45
|
}
|
|
65
46
|
|
|
66
|
-
@mixin
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// this is mostly for firefox. moving the mouse even 1px while clicking will
|
|
73
|
-
// select the current item and all items to the tree root
|
|
74
|
-
user-select: none;
|
|
75
|
-
width: 100%;
|
|
47
|
+
@mixin variables {
|
|
48
|
+
@if not $disable-everything {
|
|
49
|
+
@include set-var(depth, -1);
|
|
50
|
+
@include set-var(item-padding, 0);
|
|
51
|
+
@include set-var(item-padding-base, $padding-base);
|
|
52
|
+
@include set-var(item-padding-incrementor, $padding-incrementor);
|
|
76
53
|
}
|
|
54
|
+
}
|
|
77
55
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
@if not $disable-expander-left {
|
|
91
|
-
&--expander-left {
|
|
92
|
-
@include icon.set-var(rotate-from, $expander-left-from);
|
|
93
|
-
@include icon.set-var(rotate-to, $expander-left-to);
|
|
94
|
-
}
|
|
56
|
+
@mixin styles {
|
|
57
|
+
@if not $disable-everything {
|
|
58
|
+
.rmd-tree {
|
|
59
|
+
display: block;
|
|
60
|
+
height: 100%;
|
|
61
|
+
outline-style: none;
|
|
62
|
+
overflow: auto;
|
|
63
|
+
// this is mostly for firefox. moving the mouse even 1px while clicking will
|
|
64
|
+
// select the current item and all items to the tree root
|
|
65
|
+
user-select: none;
|
|
66
|
+
width: 100%;
|
|
95
67
|
}
|
|
96
68
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
69
|
+
.rmd-tree-item {
|
|
70
|
+
@include icon.set-var(rotate-from, $expander-right-from);
|
|
71
|
+
@include icon.set-var(rotate-to, $expander-right-to);
|
|
72
|
+
@include set-var(
|
|
73
|
+
item-padding,
|
|
74
|
+
calc(
|
|
75
|
+
get-var(depth) * get-var(item-padding-incrementor) +
|
|
76
|
+
get-var(item-padding-base)
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
list-style: none;
|
|
81
|
+
|
|
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);
|
|
103
86
|
}
|
|
104
87
|
}
|
|
105
88
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
89
|
+
&__content {
|
|
90
|
+
&--disabled {
|
|
91
|
+
cursor: auto;
|
|
110
92
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
93
|
+
&:hover::before {
|
|
94
|
+
@include interaction.set-var(background-color, transparent);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--link {
|
|
99
|
+
color: inherit;
|
|
100
|
+
text-decoration: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&--padded {
|
|
104
|
+
@include utils.auto-rtl(
|
|
105
|
+
padding-left,
|
|
106
|
+
get-var(item-padding),
|
|
107
|
+
list.get-var(item-horizontal-padding)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
118
110
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
&--focused::before {
|
|
112
|
+
.rmd-tree:focus-within & {
|
|
113
|
+
@include utils.keyboard-only {
|
|
114
|
+
@include interaction.focus-styles;
|
|
115
|
+
}
|
|
123
116
|
}
|
|
124
117
|
}
|
|
125
|
-
}
|
|
126
118
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
119
|
+
@if $selected-styles {
|
|
120
|
+
&--selected {
|
|
121
|
+
@if not $disable-selected-background-color {
|
|
122
|
+
@include interaction.set-var(
|
|
123
|
+
background-color,
|
|
124
|
+
interaction.get-var(selected-background-color)
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
@include utils.touch-only {
|
|
128
|
+
&:hover::before {
|
|
129
|
+
@include interaction.set-var(
|
|
130
|
+
background-color,
|
|
131
|
+
interaction.get-var(selected-background-color)
|
|
132
|
+
);
|
|
133
|
+
}
|
|
141
134
|
}
|
|
142
135
|
}
|
|
136
|
+
@include utils.map-to-styles($selected-styles);
|
|
143
137
|
}
|
|
144
|
-
@include utils.map-to-styles($selected-styles);
|
|
145
138
|
}
|
|
146
139
|
}
|
|
147
|
-
}
|
|
148
140
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
@if not $disable-expander-left-as-media {
|
|
142
|
+
&__media {
|
|
143
|
+
align-items: center;
|
|
144
|
+
display: flex;
|
|
145
|
+
justify-content: space-between;
|
|
154
146
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
147
|
+
@if not $disable-expander-left-as-media-offset {
|
|
148
|
+
&--single {
|
|
149
|
+
justify-content: flex-end;
|
|
150
|
+
}
|
|
158
151
|
}
|
|
159
152
|
}
|
|
160
153
|
}
|
|
161
154
|
}
|
|
162
|
-
}
|
|
163
155
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
.rmd-tree-group {
|
|
157
|
+
background-color: inherit;
|
|
158
|
+
color: inherit;
|
|
159
|
+
font-size: inherit;
|
|
160
|
+
line-height: inherit;
|
|
169
161
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
162
|
+
// remove the list padding to make it more condensed
|
|
163
|
+
padding-bottom: 0;
|
|
164
|
+
padding-top: 0;
|
|
165
|
+
}
|
|
173
166
|
}
|
|
174
167
|
}
|
|
@@ -222,36 +222,21 @@ $button-styles: map.merge(
|
|
|
222
222
|
$text-container-padding: 1rem !default;
|
|
223
223
|
$text-line-length: 65ch !default;
|
|
224
224
|
|
|
225
|
-
$typography-
|
|
226
|
-
line-length: (
|
|
227
|
-
var: --rmd-line-length,
|
|
228
|
-
value: $text-line-length,
|
|
229
|
-
),
|
|
230
|
-
text-container-padding: (
|
|
231
|
-
var: --rmd-text-container-padding,
|
|
232
|
-
value: $text-container-padding,
|
|
233
|
-
),
|
|
234
|
-
);
|
|
225
|
+
$typography-variables: (line-length, text-container-padding);
|
|
235
226
|
|
|
236
227
|
@function typography-get-var($name, $fallback: null) {
|
|
237
|
-
$
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
@if $value {
|
|
242
|
-
@return var(#{$var}, #{$value});
|
|
228
|
+
$var: utils.get-var-name($typography-variables, $name, "typography");
|
|
229
|
+
@if $fallback {
|
|
230
|
+
@return var(#{$var}, #{$fallback});
|
|
243
231
|
}
|
|
244
232
|
|
|
245
233
|
@return var(#{$var});
|
|
246
234
|
}
|
|
247
235
|
|
|
248
236
|
@mixin typography-set-var($name, $value) {
|
|
249
|
-
$
|
|
250
|
-
utils.
|
|
251
|
-
|
|
252
|
-
);
|
|
253
|
-
|
|
254
|
-
#{$var}: #{$value};
|
|
237
|
+
@if $value {
|
|
238
|
+
#{utils.get-var-name($typography-variables, $name, "typography")}: #{$value};
|
|
239
|
+
}
|
|
255
240
|
}
|
|
256
241
|
|
|
257
242
|
@mixin typography-use-var($property, $name: $property, $fallback: null) {
|
|
@@ -339,6 +324,16 @@ $typography-var-lookup: (
|
|
|
339
324
|
display: -webkit-box;
|
|
340
325
|
}
|
|
341
326
|
|
|
327
|
+
@mixin typography-variables {
|
|
328
|
+
@if not $disable-text-container {
|
|
329
|
+
@include typography-set-var(line-length, $text-line-length);
|
|
330
|
+
@include typography-set-var(
|
|
331
|
+
text-container-padding,
|
|
332
|
+
$text-container-padding
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
342
337
|
@mixin typography-styles {
|
|
343
338
|
@include typography-text-container-styles;
|
|
344
339
|
@include typography-base-styles;
|