@inchurch/matcha-theme 21.3.3 → 22.0.0
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/abstracts/_colors.scss +236 -229
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +219 -219
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +445 -432
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +293 -293
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +440 -301
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +384 -384
- package/components/matcha-buttons.scss +913 -913
- package/components/matcha-calendar.scss +218 -218
- package/components/matcha-cards.scss +230 -230
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +255 -255
- package/components/matcha-chip.scss +292 -292
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-crop.scss +406 -406
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +100 -100
- package/components/matcha-draggable.scss +23 -23
- package/components/matcha-drawer.scss +376 -376
- package/components/matcha-drop-image.scss +14 -14
- package/components/matcha-drop-list.scss +430 -430
- package/components/matcha-emoji.scss +69 -69
- package/components/matcha-empty-state.scss +230 -230
- package/components/matcha-file-uploader.scss +471 -471
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +606 -606
- package/components/matcha-form-section.scss +100 -100
- package/components/matcha-header.scss +135 -135
- package/components/matcha-highlight.scss +164 -164
- package/components/matcha-hint-text.scss +90 -90
- package/components/matcha-horizontal-tree.scss +316 -316
- package/components/matcha-icon.scss +98 -98
- package/components/matcha-image.scss +61 -61
- package/components/matcha-list.scss +211 -211
- package/components/matcha-menu.scss +99 -99
- package/components/matcha-modal.scss +210 -210
- package/components/matcha-nav.scss +581 -581
- package/components/matcha-notification.scss +413 -413
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +689 -689
- package/components/matcha-panel.scss +194 -194
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +313 -313
- package/components/matcha-radio.scss +320 -320
- package/components/matcha-ripple.scss +7 -7
- package/components/matcha-scrollbar.scss +33 -33
- package/components/matcha-scrollbox-shadow.scss +120 -120
- package/components/matcha-section.scss +102 -102
- package/components/matcha-select-multiple.scss +56 -56
- package/components/matcha-select.scss +667 -667
- package/components/matcha-skeleton.scss +155 -155
- package/components/matcha-slide-toggle.scss +369 -369
- package/components/matcha-slider.scss +285 -285
- package/components/matcha-snack-bar.scss +259 -259
- package/components/matcha-spin.scss +164 -164
- package/components/matcha-spinner.scss +97 -97
- package/components/matcha-status-pill.scss +38 -18
- package/components/matcha-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +74 -41
- package/components/matcha-table.scss +579 -578
- package/components/matcha-tabs.scss +600 -600
- package/components/matcha-text-editor.scss +105 -105
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +359 -359
- package/components/matcha-tooltip.scss +224 -224
- package/components/matcha-tree-view.scss +257 -212
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +329 -329
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +274 -261
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +324 -324
- package/tokens/_material-palette.scss +1149 -1149
- package/tokens/_primitives.scss +98 -98
- package/tokens/_semantic-aliases.scss +120 -120
- package/tokens/_spacing-tokens.scss +94 -94
- package/tokens/_static-tokens.scss +137 -137
- package/tokens/_typography-tokens.scss +65 -65
- package/vendors/charts.scss +90 -90
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
@use "../tokens/elevation-tokens" as *;
|
|
2
|
-
@use "functions" as *;
|
|
3
|
-
@use "sass:map";
|
|
4
|
-
@use "sass:math";
|
|
5
|
-
@use "sass:meta";
|
|
6
|
-
|
|
7
|
-
// -------------------------------------------------------------------------------------------------------------------
|
|
8
|
-
// @ Elevations Mixins
|
|
9
|
-
//
|
|
10
|
-
// A collection of mixins and CSS classes that can be used to apply elevation to a material
|
|
11
|
-
// element.
|
|
12
|
-
// See: https://material.io/design/environment/elevation.html
|
|
13
|
-
// Examples:
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// .matcha-foo {
|
|
17
|
-
// @include $elevation(2);
|
|
18
|
-
//
|
|
19
|
-
// &:active {
|
|
20
|
-
// @include $elevation(8);
|
|
21
|
-
// }
|
|
22
|
-
// }
|
|
23
|
-
//
|
|
24
|
-
// <div id="external-card" class="elevation-z2"><p>Some content</p></div>
|
|
25
|
-
//
|
|
26
|
-
// For an explanation of the design behind how elevation is implemented, see the design doc at
|
|
27
|
-
// https://goo.gl/Kq0k9Z.
|
|
28
|
-
|
|
29
|
-
// Colors for umbra, penumbra, and ambient shadows. As described in the design doc, each elevation
|
|
30
|
-
// level is created using a set of 3 shadow values, one for umbra (the shadow representing the
|
|
31
|
-
// space completely obscured by an object relative to its light source), one for penumbra (the
|
|
32
|
-
// space partially obscured by an object), and one for ambient (the space which contains the object
|
|
33
|
-
// itself). For a further explanation of these terms and their meanings, see
|
|
34
|
-
// https://en.wikipedia.org/wiki/Umbra,_penumbra_and_antumbra.
|
|
35
|
-
|
|
36
|
-
// Maps for the different shadow sets and their values within each z-space. These values were
|
|
37
|
-
// created by taking a few reference shadow sets created by Google's Designers and interpolating
|
|
38
|
-
// all of the values between them.
|
|
39
|
-
//
|
|
40
|
-
// -----------------------------------------------------------------------------------------------------
|
|
41
|
-
|
|
42
|
-
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
43
|
-
// The $zValue must be between 0 and 24.
|
|
44
|
-
@mixin elevation($zValue, $color: $elevation-color, $opacity: $elevation-opacity) {
|
|
45
|
-
@if meta.type-of($zValue) !=number or not math.is-unitless($zValue) {
|
|
46
|
-
@error '$zValue must be a unitless number';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@if $zValue < 0 or $zValue >24 {
|
|
50
|
-
@error '$zValue must be between 0 and 24';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
box-shadow: #{map.get(get-umbra-map($color, $opacity), $zValue)},
|
|
54
|
-
#{map.get(get-penumbra-map($color, $opacity), $zValue)},
|
|
55
|
-
#{map.get(get-ambient-map($color, $opacity), $zValue)};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@mixin _theme-elevation($zValue, $elevation-color, $opacity: $elevation-opacity) {
|
|
59
|
-
@include elevation($zValue, $elevation-color, $opacity);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Applies the elevation to an element in a manner that allows
|
|
63
|
-
// consumers to override it via the Material elevation classes.
|
|
64
|
-
@mixin overridable-elevation($zValue, $color: $elevation-color, $opacity: $elevation-opacity) {
|
|
65
|
-
&:not([class*="#{$elevation-prefix}"]) {
|
|
66
|
-
@include elevation($zValue, $color, $opacity);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@mixin _theme-overridable-elevation($zValue, $theme, $opacity: $elevation-opacity) {
|
|
71
|
-
$foreground: map.get($theme, foreground);
|
|
72
|
-
$elevation-color: map.get($foreground, elevation);
|
|
73
|
-
$elevation-color-or-default: if($elevation-color ==null, $elevation-color, $elevation-color);
|
|
74
|
-
|
|
75
|
-
@include overridable-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Applies the correct css rules needed to have an element transition between elevations.
|
|
79
|
-
// This mixin should be applied to elements whose elevation values will change depending on their
|
|
80
|
-
// context (e.g. when active or disabled).
|
|
81
|
-
//
|
|
82
|
-
// NOTE(traviskaufman): Both this mixin and the above function use default parameters so they can
|
|
83
|
-
// be used in the same way by clients.
|
|
84
|
-
@mixin elevation-transition($duration: $elevation-transition-duration,
|
|
85
|
-
$easing: $elevation-transition-timing-function) {
|
|
86
|
-
// Returns a string that can be used as the value for a transition property for elevation.
|
|
87
|
-
// Calling this function directly is useful in situations where a component needs to transition
|
|
88
|
-
// more than one property.
|
|
89
|
-
//
|
|
90
|
-
// .foo {
|
|
91
|
-
// transition: elevation-transition-property-value(), opacity 100ms ease;
|
|
92
|
-
// }
|
|
93
|
-
transition: elevation-transition-property-value($duration, $easing);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Css class generator for shadows
|
|
97
|
-
// $elevation-prefix: "matcha-elevation-z";
|
|
98
|
-
@mixin elevation-theme($is-dark: false) {
|
|
99
|
-
// API nova: recebe SÓ o modo. Cor da sombra preservada por modo
|
|
100
|
-
// (light #1A2C1E / dark black — valores que vinham de foreground.elevation).
|
|
101
|
-
$elevation-color: if($is-dark, black, #1A2C1E);
|
|
102
|
-
|
|
103
|
-
@for $zValue from 0 through 24 {
|
|
104
|
-
.#{$elevation-prefix}#{$zValue} {
|
|
105
|
-
@include _theme-elevation($zValue, $elevation-color);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
1
|
+
@use "../tokens/elevation-tokens" as *;
|
|
2
|
+
@use "functions" as *;
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
|
|
7
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
8
|
+
// @ Elevations Mixins
|
|
9
|
+
//
|
|
10
|
+
// A collection of mixins and CSS classes that can be used to apply elevation to a material
|
|
11
|
+
// element.
|
|
12
|
+
// See: https://material.io/design/environment/elevation.html
|
|
13
|
+
// Examples:
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// .matcha-foo {
|
|
17
|
+
// @include $elevation(2);
|
|
18
|
+
//
|
|
19
|
+
// &:active {
|
|
20
|
+
// @include $elevation(8);
|
|
21
|
+
// }
|
|
22
|
+
// }
|
|
23
|
+
//
|
|
24
|
+
// <div id="external-card" class="elevation-z2"><p>Some content</p></div>
|
|
25
|
+
//
|
|
26
|
+
// For an explanation of the design behind how elevation is implemented, see the design doc at
|
|
27
|
+
// https://goo.gl/Kq0k9Z.
|
|
28
|
+
|
|
29
|
+
// Colors for umbra, penumbra, and ambient shadows. As described in the design doc, each elevation
|
|
30
|
+
// level is created using a set of 3 shadow values, one for umbra (the shadow representing the
|
|
31
|
+
// space completely obscured by an object relative to its light source), one for penumbra (the
|
|
32
|
+
// space partially obscured by an object), and one for ambient (the space which contains the object
|
|
33
|
+
// itself). For a further explanation of these terms and their meanings, see
|
|
34
|
+
// https://en.wikipedia.org/wiki/Umbra,_penumbra_and_antumbra.
|
|
35
|
+
|
|
36
|
+
// Maps for the different shadow sets and their values within each z-space. These values were
|
|
37
|
+
// created by taking a few reference shadow sets created by Google's Designers and interpolating
|
|
38
|
+
// all of the values between them.
|
|
39
|
+
//
|
|
40
|
+
// -----------------------------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
43
|
+
// The $zValue must be between 0 and 24.
|
|
44
|
+
@mixin elevation($zValue, $color: $elevation-color, $opacity: $elevation-opacity) {
|
|
45
|
+
@if meta.type-of($zValue) !=number or not math.is-unitless($zValue) {
|
|
46
|
+
@error '$zValue must be a unitless number';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@if $zValue < 0 or $zValue >24 {
|
|
50
|
+
@error '$zValue must be between 0 and 24';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
box-shadow: #{map.get(get-umbra-map($color, $opacity), $zValue)},
|
|
54
|
+
#{map.get(get-penumbra-map($color, $opacity), $zValue)},
|
|
55
|
+
#{map.get(get-ambient-map($color, $opacity), $zValue)};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@mixin _theme-elevation($zValue, $elevation-color, $opacity: $elevation-opacity) {
|
|
59
|
+
@include elevation($zValue, $elevation-color, $opacity);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Applies the elevation to an element in a manner that allows
|
|
63
|
+
// consumers to override it via the Material elevation classes.
|
|
64
|
+
@mixin overridable-elevation($zValue, $color: $elevation-color, $opacity: $elevation-opacity) {
|
|
65
|
+
&:not([class*="#{$elevation-prefix}"]) {
|
|
66
|
+
@include elevation($zValue, $color, $opacity);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@mixin _theme-overridable-elevation($zValue, $theme, $opacity: $elevation-opacity) {
|
|
71
|
+
$foreground: map.get($theme, foreground);
|
|
72
|
+
$elevation-color: map.get($foreground, elevation);
|
|
73
|
+
$elevation-color-or-default: if($elevation-color ==null, $elevation-color, $elevation-color);
|
|
74
|
+
|
|
75
|
+
@include overridable-elevation($zValue, $elevation-color-or-default, $opacity);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Applies the correct css rules needed to have an element transition between elevations.
|
|
79
|
+
// This mixin should be applied to elements whose elevation values will change depending on their
|
|
80
|
+
// context (e.g. when active or disabled).
|
|
81
|
+
//
|
|
82
|
+
// NOTE(traviskaufman): Both this mixin and the above function use default parameters so they can
|
|
83
|
+
// be used in the same way by clients.
|
|
84
|
+
@mixin elevation-transition($duration: $elevation-transition-duration,
|
|
85
|
+
$easing: $elevation-transition-timing-function) {
|
|
86
|
+
// Returns a string that can be used as the value for a transition property for elevation.
|
|
87
|
+
// Calling this function directly is useful in situations where a component needs to transition
|
|
88
|
+
// more than one property.
|
|
89
|
+
//
|
|
90
|
+
// .foo {
|
|
91
|
+
// transition: elevation-transition-property-value(), opacity 100ms ease;
|
|
92
|
+
// }
|
|
93
|
+
transition: elevation-transition-property-value($duration, $easing);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Css class generator for shadows
|
|
97
|
+
// $elevation-prefix: "matcha-elevation-z";
|
|
98
|
+
@mixin elevation-theme($is-dark: false) {
|
|
99
|
+
// API nova: recebe SÓ o modo. Cor da sombra preservada por modo
|
|
100
|
+
// (light #1A2C1E / dark black — valores que vinham de foreground.elevation).
|
|
101
|
+
$elevation-color: if($is-dark, black, #1A2C1E);
|
|
102
|
+
|
|
103
|
+
@for $zValue from 0 through 24 {
|
|
104
|
+
.#{$elevation-prefix}#{$zValue} {
|
|
105
|
+
@include _theme-elevation($zValue, $elevation-color);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|