@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
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>314/314</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">100% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>19/19</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>3/3</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>314/314</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -79,18 +79,18 @@
|
|
|
79
79
|
</tr>
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
|
-
<td class="file high" data-value="
|
|
82
|
+
<td class="file high" data-value="Typography.tsx"><a href="Typography.tsx.html">Typography.tsx</a></td>
|
|
83
83
|
<td data-value="100" class="pic high">
|
|
84
84
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="100" class="pct high">100%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="314" class="abs high">314/314</td>
|
|
88
88
|
<td data-value="100" class="pct high">100%</td>
|
|
89
|
-
<td data-value="
|
|
89
|
+
<td data-value="19" class="abs high">19/19</td>
|
|
90
90
|
<td data-value="100" class="pct high">100%</td>
|
|
91
|
-
<td data-value="
|
|
91
|
+
<td data-value="3" class="abs high">3/3</td>
|
|
92
92
|
<td data-value="100" class="pct high">100%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="314" class="abs high">314/314</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2023-11-
|
|
104
|
+
at 2023-11-18T21:34:40.818Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
package/dist/_core.scss
CHANGED
|
@@ -312,6 +312,7 @@ $_layer-order: (
|
|
|
312
312
|
@include form.use-light-theme;
|
|
313
313
|
@include table.use-light-theme;
|
|
314
314
|
@include segmented-button.use-light-theme;
|
|
315
|
+
@include badge.use-light-theme;
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
@mixin use-dark-theme {
|
|
@@ -326,6 +327,38 @@ $_layer-order: (
|
|
|
326
327
|
@include form.use-dark-theme;
|
|
327
328
|
@include table.use-dark-theme;
|
|
328
329
|
@include segmented-button.use-dark-theme;
|
|
330
|
+
@include badge.use-dark-theme;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@mixin variables {
|
|
334
|
+
@include theme.theme-variables;
|
|
335
|
+
@include app-bar.variables;
|
|
336
|
+
@include avatar.variables;
|
|
337
|
+
@include badge.variables;
|
|
338
|
+
@include box.variables;
|
|
339
|
+
@include button.variables;
|
|
340
|
+
@include card.variables;
|
|
341
|
+
@include chip.variables;
|
|
342
|
+
@include dialog.variables;
|
|
343
|
+
@include divider.variables;
|
|
344
|
+
@include form.variables;
|
|
345
|
+
@include icon.variables;
|
|
346
|
+
@include interaction.variables;
|
|
347
|
+
@include layout.variables;
|
|
348
|
+
@include link.variables;
|
|
349
|
+
@include list.variables;
|
|
350
|
+
@include menu.variables;
|
|
351
|
+
@include overlay.variables;
|
|
352
|
+
@include progress.variables;
|
|
353
|
+
@include segmented-button.variables;
|
|
354
|
+
@include sheet.variables;
|
|
355
|
+
@include snackbar.variables;
|
|
356
|
+
@include table.variables;
|
|
357
|
+
@include tabs.variables;
|
|
358
|
+
@include tooltip.variables;
|
|
359
|
+
@include transition.transition-variables;
|
|
360
|
+
@include tree.variables;
|
|
361
|
+
@include typography.typography-variables;
|
|
329
362
|
}
|
|
330
363
|
|
|
331
364
|
@mixin styles {
|
|
@@ -453,7 +486,7 @@ $_layer-order: (
|
|
|
453
486
|
|
|
454
487
|
@if not theme.$disable-default-root-theme {
|
|
455
488
|
:root {
|
|
456
|
-
@include
|
|
489
|
+
@include variables;
|
|
457
490
|
|
|
458
491
|
@if not
|
|
459
492
|
theme.$disable-default-system-theme and
|
package/dist/_utils.scss
CHANGED
|
@@ -64,6 +64,63 @@ $_swappable-properties: text-align;
|
|
|
64
64
|
@return if($is-list, $key-or-value, map.get($list-or-map, $key-or-value));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
@function get-var-name($variables, $name, $group) {
|
|
68
|
+
@if $group == icon {
|
|
69
|
+
@if $name == symbol-grade {
|
|
70
|
+
@return --rmd-symbol-grad;
|
|
71
|
+
}
|
|
72
|
+
@if $name == symbol-weight {
|
|
73
|
+
@return --rmd-symbol-wght;
|
|
74
|
+
}
|
|
75
|
+
@if $name == optical-size {
|
|
76
|
+
@return --rmd-symbol-opsz;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
@if $group == name and $name == fab-offset {
|
|
80
|
+
@return --rmd-fab-offset;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@if $group == form {
|
|
84
|
+
@if $name ==
|
|
85
|
+
addon-top or
|
|
86
|
+
$name ==
|
|
87
|
+
addon-margin-top or
|
|
88
|
+
$name ==
|
|
89
|
+
active-color or
|
|
90
|
+
$name ==
|
|
91
|
+
focus-color
|
|
92
|
+
{
|
|
93
|
+
@return --rmd-form-#{$name};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@if $group == interaction and $name == background-color {
|
|
97
|
+
@return --rmd-interaction-#{$name};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@if $group == list {
|
|
101
|
+
$updated: str-replace(
|
|
102
|
+
str-replace($name, "horizontal-padding", "padding-h"),
|
|
103
|
+
"vertical-padding",
|
|
104
|
+
"padding-v"
|
|
105
|
+
);
|
|
106
|
+
@if $updated != $name {
|
|
107
|
+
@return --rmd-list-#{$name};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if $group == snackbar and $name != offset {
|
|
112
|
+
@return --rmd-toast-#{$name};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
$prefix: "";
|
|
116
|
+
@if not list.index((theme, form, interaction, transition, typography), $group)
|
|
117
|
+
{
|
|
118
|
+
$prefix: $group + "-";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@return "--rmd-" + $prefix + validate($variables, $name, $group + " var");
|
|
122
|
+
}
|
|
123
|
+
|
|
67
124
|
@mixin map-to-styles($map) {
|
|
68
125
|
@each $property, $value in $map {
|
|
69
126
|
@if meta.type-of($value) == map {
|
|
@@ -60,37 +60,21 @@ $vertical-padding: 0 !default;
|
|
|
60
60
|
$keyline: 1rem !default;
|
|
61
61
|
$title-keyline: 4.5rem !default;
|
|
62
62
|
|
|
63
|
-
$
|
|
64
|
-
height: (
|
|
65
|
-
var: --rmd-app-bar-height,
|
|
66
|
-
value: $height,
|
|
67
|
-
),
|
|
68
|
-
surface-background-color: (
|
|
69
|
-
var: --rmd-app-bar-surface-background-color,
|
|
70
|
-
value: $surface-background-color,
|
|
71
|
-
),
|
|
72
|
-
surface-color: (
|
|
73
|
-
var: --rmd-app-bar-surface-color,
|
|
74
|
-
value: $surface-color,
|
|
75
|
-
),
|
|
76
|
-
);
|
|
63
|
+
$variables: (height, surface-background-color, surface-color);
|
|
77
64
|
|
|
78
65
|
@function get-var($name, $fallback: null) {
|
|
79
|
-
$
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@if $value {
|
|
84
|
-
@return var(#{$var}, #{$value});
|
|
66
|
+
$var: utils.get-var-name($variables, $name, "app-bar");
|
|
67
|
+
@if $fallback {
|
|
68
|
+
@return var(#{$var}, #{$fallback});
|
|
85
69
|
}
|
|
86
70
|
|
|
87
71
|
@return var(#{$var});
|
|
88
72
|
}
|
|
89
73
|
|
|
90
74
|
@mixin set-var($name, $value) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
@if $value {
|
|
76
|
+
#{utils.get-var-name($variables, $name, "app-bar")}: #{$value};
|
|
77
|
+
}
|
|
94
78
|
}
|
|
95
79
|
|
|
96
80
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
@@ -121,6 +105,14 @@ $var-lookup: (
|
|
|
121
105
|
@include set-var(height, $dense-height);
|
|
122
106
|
}
|
|
123
107
|
|
|
108
|
+
@mixin variables {
|
|
109
|
+
@if not $disable-everything {
|
|
110
|
+
@include set-var(height, $height);
|
|
111
|
+
@include set-var(surface-background-color, $surface-background-color);
|
|
112
|
+
@include set-var(surface-color, $surface-color);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
124
116
|
@mixin styles {
|
|
125
117
|
@if not $disable-everything {
|
|
126
118
|
@include theme.default-system-theme {
|
package/dist/avatar/_avatar.scss
CHANGED
|
@@ -14,6 +14,7 @@ $disable-auto-image: false !default;
|
|
|
14
14
|
$color: colors.$grey-100 !default;
|
|
15
15
|
$background-color: colors.$grey-700 !default;
|
|
16
16
|
$line-height: map.get(typography.$subtitle-1-styles, line-height) !default;
|
|
17
|
+
$border-color: transparent !default;
|
|
17
18
|
$border-radius: 50% !default;
|
|
18
19
|
$size: 2.5rem !default;
|
|
19
20
|
$font-size: 1.5rem !default;
|
|
@@ -44,49 +45,28 @@ $default-colors: (
|
|
|
44
45
|
|
|
45
46
|
$colors: $default-colors !default;
|
|
46
47
|
|
|
47
|
-
$
|
|
48
|
-
background-color
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
value: $color,
|
|
55
|
-
),
|
|
56
|
-
border-color: (
|
|
57
|
-
var: --rmd-avatar-border-color,
|
|
58
|
-
value: transparent,
|
|
59
|
-
),
|
|
60
|
-
border-radius: (
|
|
61
|
-
var: --rmd-avatar-border-radius,
|
|
62
|
-
value: $border-radius,
|
|
63
|
-
),
|
|
64
|
-
size: (
|
|
65
|
-
var: --rmd-avatar-size,
|
|
66
|
-
value: $size,
|
|
67
|
-
),
|
|
68
|
-
font-size: (
|
|
69
|
-
var: --rmd-avatar-font-size,
|
|
70
|
-
value: $font-size,
|
|
71
|
-
),
|
|
48
|
+
$variables: (
|
|
49
|
+
background-color,
|
|
50
|
+
color,
|
|
51
|
+
border-color,
|
|
52
|
+
border-radius,
|
|
53
|
+
size,
|
|
54
|
+
font-size
|
|
72
55
|
);
|
|
73
56
|
|
|
74
57
|
@function get-var($name, $fallback: null) {
|
|
75
|
-
$
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
@if $value {
|
|
80
|
-
@return var(#{$var}, #{$value});
|
|
58
|
+
$var: utils.get-var-name($variables, $name, "avatar");
|
|
59
|
+
@if $fallback {
|
|
60
|
+
@return var(#{$var}, #{$fallback});
|
|
81
61
|
}
|
|
82
62
|
|
|
83
63
|
@return var(#{$var});
|
|
84
64
|
}
|
|
85
65
|
|
|
86
66
|
@mixin set-var($name, $value) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
67
|
+
@if $value {
|
|
68
|
+
#{utils.get-var-name($variables, $name, "avatar")}: #{$value};
|
|
69
|
+
}
|
|
90
70
|
}
|
|
91
71
|
|
|
92
72
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
@@ -102,6 +82,17 @@ $var-lookup: (
|
|
|
102
82
|
}
|
|
103
83
|
}
|
|
104
84
|
|
|
85
|
+
@mixin variables {
|
|
86
|
+
@if not $disable-everything {
|
|
87
|
+
@include set-var(background-color, $background-color);
|
|
88
|
+
@include set-var(color, $color);
|
|
89
|
+
@include set-var(border-color, $border-color);
|
|
90
|
+
@include set-var(border-radius, $border-radius);
|
|
91
|
+
@include set-var(size, $size);
|
|
92
|
+
@include set-var(font-size, $font-size);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
105
96
|
@mixin styles {
|
|
106
97
|
@if not $disable-everything {
|
|
107
98
|
.rmd-avatar {
|
package/dist/badge/_badge.scss
CHANGED
|
@@ -22,50 +22,91 @@ $typography: map.merge(
|
|
|
22
22
|
)
|
|
23
23
|
) !default;
|
|
24
24
|
|
|
25
|
-
$greyscale-background-color:
|
|
26
|
-
$greyscale-color: a11y.contrast-color(
|
|
25
|
+
$light-theme-greyscale-background-color: #ccc !default;
|
|
26
|
+
$light-theme-greyscale-color: a11y.contrast-color(
|
|
27
|
+
$light-theme-greyscale-background-color
|
|
28
|
+
) !default;
|
|
29
|
+
$dark-theme-greyscale-background-color: colors.$grey-700 !default;
|
|
30
|
+
$dark-theme-greyscale-color: a11y.contrast-color(
|
|
31
|
+
$dark-theme-greyscale-background-color
|
|
32
|
+
) !default;
|
|
33
|
+
$greyscale-background-color: theme.get-default-color(
|
|
34
|
+
$light-theme-greyscale-background-color,
|
|
35
|
+
$dark-theme-greyscale-background-color
|
|
36
|
+
) !default;
|
|
37
|
+
$greyscale-color: theme.get-default-color(
|
|
38
|
+
$light-theme-greyscale-color,
|
|
39
|
+
$dark-theme-greyscale-color
|
|
40
|
+
) !default;
|
|
27
41
|
|
|
28
|
-
$
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
offset
|
|
34
|
-
|
|
35
|
-
value: 0,
|
|
36
|
-
),
|
|
37
|
-
offset-top: (
|
|
38
|
-
var: --rmd-badge-offset-top,
|
|
39
|
-
value: var(--rmd-badge-offset, $offset-top),
|
|
40
|
-
),
|
|
41
|
-
offset-right: (
|
|
42
|
-
var: --rmd-badge-offset-right,
|
|
43
|
-
value: var(--rmd-badge-offset, $offset-right),
|
|
44
|
-
),
|
|
42
|
+
$variables: (
|
|
43
|
+
greyscale-background-color,
|
|
44
|
+
greyscale-color,
|
|
45
|
+
size,
|
|
46
|
+
offset,
|
|
47
|
+
offset-top,
|
|
48
|
+
offset-right
|
|
45
49
|
);
|
|
46
50
|
|
|
47
51
|
@function get-var($name, $fallback: null) {
|
|
48
|
-
$
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
@if $value {
|
|
53
|
-
@return var(#{$var}, #{$value});
|
|
52
|
+
$var: utils.get-var-name($variables, $name, "badge");
|
|
53
|
+
@if $fallback {
|
|
54
|
+
@return var(#{$var}, #{$fallback});
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
@return var(#{$var});
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
@mixin set-var($name, $value) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
@if $value {
|
|
62
|
+
#{utils.get-var-name($variables, $name, "badge")}: #{$value};
|
|
63
|
+
}
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
66
67
|
#{$property}: get-var($name, $fallback);
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
@mixin use-light-theme {
|
|
71
|
+
@if $light-theme-greyscale-background-color !=
|
|
72
|
+
$dark-theme-greyscale-background-color
|
|
73
|
+
{
|
|
74
|
+
@include set-var(
|
|
75
|
+
greyscale-background-color,
|
|
76
|
+
$light-theme-greyscale-background-color
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
@if $light-theme-greyscale-color != $dark-theme-greyscale-color {
|
|
80
|
+
@include set-var(greyscale-color, $light-theme-greyscale-color);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@mixin use-dark-theme {
|
|
85
|
+
@if $light-theme-greyscale-background-color !=
|
|
86
|
+
$dark-theme-greyscale-background-color
|
|
87
|
+
{
|
|
88
|
+
@include set-var(
|
|
89
|
+
greyscale-background-color,
|
|
90
|
+
$dark-theme-greyscale-background-color
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@if $light-theme-greyscale-color != $dark-theme-greyscale-color {
|
|
95
|
+
@include set-var(greyscale-color, $dark-theme-greyscale-color);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@mixin variables {
|
|
100
|
+
@if not $disable-everything {
|
|
101
|
+
@include set-var(greyscale-background-color, $greyscale-background-color);
|
|
102
|
+
@include set-var(greyscale-color, $greyscale-color);
|
|
103
|
+
@include set-var(size, $size);
|
|
104
|
+
@include set-var(offset, 0);
|
|
105
|
+
@include set-var(offset-top, get-var(offset));
|
|
106
|
+
@include set-var(offset-right, get-var(offset));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
69
110
|
@mixin styles {
|
|
70
111
|
@if not $disable-everything {
|
|
71
112
|
.rmd-badge {
|
|
@@ -84,22 +125,8 @@ $var-lookup: (
|
|
|
84
125
|
|
|
85
126
|
@if not $disable-greyscale-theme {
|
|
86
127
|
&--greyscale {
|
|
87
|
-
background-color
|
|
88
|
-
color
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@if not $disable-primary-theme {
|
|
93
|
-
&--primary {
|
|
94
|
-
@include theme.theme-use-var(background-color, primary-color);
|
|
95
|
-
@include theme.theme-use-var(color, on-primary-color);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@if not $disable-secondary-theme {
|
|
100
|
-
&--secondary {
|
|
101
|
-
@include theme.theme-use-var(background-color, secondary-color);
|
|
102
|
-
@include theme.theme-use-var(color, on-secondary-color);
|
|
128
|
+
@include use-var(background-color, greyscale-background-color);
|
|
129
|
+
@include use-var(color, greyscale-color);
|
|
103
130
|
}
|
|
104
131
|
}
|
|
105
132
|
}
|
package/dist/box/_box.scss
CHANGED
|
@@ -33,41 +33,21 @@ $item-min-size: 8rem !default;
|
|
|
33
33
|
/// ```
|
|
34
34
|
$grids: () !default;
|
|
35
35
|
|
|
36
|
-
$
|
|
37
|
-
gap: (
|
|
38
|
-
var: --rmd-box-gap,
|
|
39
|
-
value: $gap,
|
|
40
|
-
),
|
|
41
|
-
padding: (
|
|
42
|
-
var: --rmd-box-padding,
|
|
43
|
-
value: $padding,
|
|
44
|
-
),
|
|
45
|
-
min-size: (
|
|
46
|
-
var: --rmd-box-item-min-size,
|
|
47
|
-
value: $item-min-size,
|
|
48
|
-
),
|
|
49
|
-
columns: (
|
|
50
|
-
var: --rmd-box-columns,
|
|
51
|
-
value: auto-fit,
|
|
52
|
-
),
|
|
53
|
-
);
|
|
36
|
+
$variables: (gap, padding, item-min-size, columns);
|
|
54
37
|
|
|
55
38
|
@function get-var($name, $fallback: null) {
|
|
56
|
-
$
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@if $value {
|
|
61
|
-
@return var(#{$var}, #{$value});
|
|
39
|
+
$var: utils.get-var-name($variables, $name, "box");
|
|
40
|
+
@if $fallback {
|
|
41
|
+
@return var(#{$var}, #{$fallback});
|
|
62
42
|
}
|
|
63
43
|
|
|
64
44
|
@return var(#{$var});
|
|
65
45
|
}
|
|
66
46
|
|
|
67
47
|
@mixin set-var($name, $value) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
@if $value {
|
|
49
|
+
#{utils.get-var-name($variables, $name, "box")}: #{$value};
|
|
50
|
+
}
|
|
71
51
|
}
|
|
72
52
|
|
|
73
53
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
@@ -94,6 +74,15 @@ $var-lookup: (
|
|
|
94
74
|
}
|
|
95
75
|
}
|
|
96
76
|
|
|
77
|
+
@mixin variables {
|
|
78
|
+
@if not $disable-everything {
|
|
79
|
+
@include set-var(gap, $gap);
|
|
80
|
+
@include set-var(padding, $padding);
|
|
81
|
+
@include set-var(item-min-size, $item-min-size);
|
|
82
|
+
@include set-var(columns, auto-fit);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
97
86
|
@mixin styles {
|
|
98
87
|
@if not $disable-everything {
|
|
99
88
|
.rmd-box {
|
|
@@ -149,7 +138,7 @@ $var-lookup: (
|
|
|
149
138
|
display: grid;
|
|
150
139
|
grid-template-columns: repeat(
|
|
151
140
|
get-var(columns),
|
|
152
|
-
minmax(get-var(min-size), 1fr)
|
|
141
|
+
minmax(get-var(item-min-size), 1fr)
|
|
153
142
|
);
|
|
154
143
|
}
|
|
155
144
|
|
|
@@ -159,7 +148,7 @@ $var-lookup: (
|
|
|
159
148
|
|
|
160
149
|
@if not $disable-grid-columns {
|
|
161
150
|
&--grid-columns {
|
|
162
|
-
@include set-var(min-size, 0);
|
|
151
|
+
@include set-var(item-min-size, 0);
|
|
163
152
|
}
|
|
164
153
|
}
|
|
165
154
|
|
package/dist/button/_button.scss
CHANGED
|
@@ -72,77 +72,35 @@ $floating-positions: (
|
|
|
72
72
|
),
|
|
73
73
|
) !default;
|
|
74
74
|
|
|
75
|
-
$
|
|
76
|
-
background-color
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
color
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var: --rmd-button-contained-background-color,
|
|
90
|
-
value: $clear-contained-background-color,
|
|
91
|
-
),
|
|
92
|
-
contained-color: (
|
|
93
|
-
var: --rmd-button-contained-color,
|
|
94
|
-
value: $clear-contained-color,
|
|
95
|
-
),
|
|
96
|
-
text-horizontal-padding: (
|
|
97
|
-
var: --rmd-button-text-horizontal-padding,
|
|
98
|
-
value: $text-horizontal-padding,
|
|
99
|
-
),
|
|
100
|
-
text-vertical-padding: (
|
|
101
|
-
var: --rmd-button-text-vertical-padding,
|
|
102
|
-
value: $text-vertical-padding,
|
|
103
|
-
),
|
|
104
|
-
text-min-height: (
|
|
105
|
-
var: --rmd-button-text-min-height,
|
|
106
|
-
value: $text-min-height,
|
|
107
|
-
),
|
|
108
|
-
text-min-width: (
|
|
109
|
-
var: --rmd-button-text-min-width,
|
|
110
|
-
value: $text-min-width,
|
|
111
|
-
),
|
|
112
|
-
icon-size: (
|
|
113
|
-
var: --rmd-button-icon-size,
|
|
114
|
-
value: $icon-size,
|
|
115
|
-
),
|
|
116
|
-
icon-font-size: (
|
|
117
|
-
var: --rmd-button-icon-font-size,
|
|
118
|
-
value: $icon-font-size,
|
|
119
|
-
),
|
|
120
|
-
icon-border-radius: (
|
|
121
|
-
var: --rmd-button-icon-radius,
|
|
122
|
-
value: $icon-border-radius,
|
|
123
|
-
),
|
|
124
|
-
fab-offset: (
|
|
125
|
-
var: --rmd-fab-offset,
|
|
126
|
-
value: utils.scrollbar-size(),
|
|
127
|
-
),
|
|
75
|
+
$variables: (
|
|
76
|
+
background-color,
|
|
77
|
+
color,
|
|
78
|
+
border-radius,
|
|
79
|
+
contained-background-color,
|
|
80
|
+
contained-color,
|
|
81
|
+
text-horizontal-padding,
|
|
82
|
+
text-vertical-padding,
|
|
83
|
+
text-min-height,
|
|
84
|
+
text-min-width,
|
|
85
|
+
icon-size,
|
|
86
|
+
icon-font-size,
|
|
87
|
+
icon-border-radius,
|
|
88
|
+
fab-offset
|
|
128
89
|
);
|
|
129
90
|
|
|
130
91
|
@function get-var($name, $fallback: null) {
|
|
131
|
-
$
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
@if $value {
|
|
136
|
-
@return var(#{$var}, #{$value});
|
|
92
|
+
$var: utils.get-var-name($variables, $name, "button");
|
|
93
|
+
@if $fallback {
|
|
94
|
+
@return var(#{$var}, #{$fallback});
|
|
137
95
|
}
|
|
138
96
|
|
|
139
97
|
@return var(#{$var});
|
|
140
98
|
}
|
|
141
99
|
|
|
142
100
|
@mixin set-var($name, $value) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
101
|
+
@if $value {
|
|
102
|
+
#{utils.get-var-name($variables, $name, "button")}: #{$value};
|
|
103
|
+
}
|
|
146
104
|
}
|
|
147
105
|
|
|
148
106
|
@mixin use-var($property, $name: $property, $fallback: null) {
|
|
@@ -176,6 +134,36 @@ $var-lookup: (
|
|
|
176
134
|
padding: get-var(text-vertical-padding) get-var(text-horizontal-padding);
|
|
177
135
|
}
|
|
178
136
|
|
|
137
|
+
@mixin variables {
|
|
138
|
+
@if not $disable-everything {
|
|
139
|
+
@include set-var(background-color, transparent);
|
|
140
|
+
@if not $disable-contained {
|
|
141
|
+
@include set-var(
|
|
142
|
+
contained-background-color,
|
|
143
|
+
$clear-contained-background-color
|
|
144
|
+
);
|
|
145
|
+
@include set-var(contained-color, $clear-contained-color);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@if not $disable-text {
|
|
149
|
+
@include set-var(text-horizontal-padding, $text-horizontal-padding);
|
|
150
|
+
@include set-var(text-vertical-padding, $text-vertical-padding);
|
|
151
|
+
@include set-var(text-min-height, $text-min-height);
|
|
152
|
+
@include set-var(text-min-width, $text-min-width);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@if not $disable-icon {
|
|
156
|
+
@include set-var(icon-size, $icon-size);
|
|
157
|
+
@include set-var(icon-font-size, $icon-font-size);
|
|
158
|
+
@include set-var(icon-border-radius, $icon-border-radius);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@if not $disable-floating {
|
|
162
|
+
@include set-var(fab-offset, utils.scrollbar-size());
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
179
167
|
@mixin styles {
|
|
180
168
|
@if not $disable-everything {
|
|
181
169
|
.rmd-button {
|