matcha-theme 19.132.0 → 19.135.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.
@@ -0,0 +1,223 @@
1
+ @mixin generate-matcha-spinner-size-classes($helper-breakpoints) {
2
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
3
+ @include media-breakpoint($materialBreakpoint) {
4
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
5
+
6
+ &[size#{$infix}="tiny"] {
7
+ svg {
8
+ width: px-to-rem(24px);
9
+ height: px-to-rem(24px);
10
+ }
11
+ }
12
+
13
+ &[size#{$infix}="small"] {
14
+ svg {
15
+ width: px-to-rem(32px);
16
+ height: px-to-rem(32px);
17
+ }
18
+ }
19
+
20
+ &[size#{$infix}="medium"] {
21
+ svg {
22
+ width: px-to-rem(40px);
23
+ height: px-to-rem(40px);
24
+ }
25
+ }
26
+
27
+ &[size#{$infix}="large"] {
28
+ svg {
29
+ width: px-to-rem(48px);
30
+ height: px-to-rem(48px);
31
+ }
32
+ }
33
+
34
+ &[size#{$infix}="huge"] {
35
+ svg {
36
+ width: px-to-rem(56px);
37
+ height: px-to-rem(56px);
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ &:not([size]) {
44
+ svg {
45
+ width: px-to-rem(40px);
46
+ height: px-to-rem(40px);
47
+ }
48
+ }
49
+
50
+ }
51
+ @mixin matcha-spinner($theme) {
52
+ matcha-spinner:not([color]) .spinner-progress {
53
+ stroke: getAccent($theme);
54
+ }
55
+ matcha-spinner {
56
+ // Red
57
+ &[color="red"] .spinner-progress {
58
+ stroke: getRed($theme);
59
+ }
60
+ // Pink
61
+ &[color="pink"] .spinner-progress {
62
+ stroke: getPink($theme);
63
+ }
64
+ // Purple
65
+ &[color="purple"] .spinner-progress {
66
+ stroke: getPurple($theme);
67
+ }
68
+ // Deep Purple
69
+ &[color="deep-purple"] .spinner-progress {
70
+ stroke: getDeepPurple($theme);
71
+ }
72
+ // Indigo
73
+ &[color="indigo"] .spinner-progress {
74
+ stroke: getIndigo($theme);
75
+ }
76
+ // Blue
77
+ &[color="blue"] .spinner-progress {
78
+ stroke: getBlue($theme);
79
+ }
80
+ // Light Blue
81
+ &[color="light-blue"] .spinner-progress {
82
+ stroke: getLightBlue($theme);
83
+ }
84
+ // Cyan
85
+ &[color="cyan"] .spinner-progress {
86
+ stroke: getCyan($theme);
87
+ }
88
+ // Teal
89
+ &[color="teal"] .spinner-progress {
90
+ stroke: getTeal($theme);
91
+ }
92
+ // Green
93
+ &[color="green"] .spinner-progress {
94
+ stroke: getGreen($theme);
95
+ }
96
+ // Light Green
97
+ &[color="light-green"] .spinner-progress {
98
+ stroke: getLightGreen($theme);
99
+ }
100
+ // Lime
101
+ &[color="lime"] .spinner-progress {
102
+ stroke: getLime($theme);
103
+ }
104
+ // Yellow
105
+ &[color="yellow"] .spinner-progress {
106
+ stroke: getYellow($theme);
107
+ }
108
+ // Amber
109
+ &[color="amber"] .spinner-progress {
110
+ stroke: getAmber($theme);
111
+ }
112
+ // Orange
113
+ &[color="orange"] .spinner-progress {
114
+ stroke: getOrange($theme);
115
+ }
116
+ // Deep Orange
117
+ &[color="deep-orange"] .spinner-progress {
118
+ stroke: getDeepOrange($theme);
119
+ }
120
+ // Brown
121
+ &[color="brown"] .spinner-progress {
122
+ stroke: getBrown($theme);
123
+ }
124
+ // Grey
125
+ &[color="grey"] .spinner-progress {
126
+ stroke: getGrey($theme);
127
+ }
128
+ // Blue Grey
129
+ &[color="blue-grey"] .spinner-progress {
130
+ stroke: getBlueGrey($theme);
131
+ }
132
+ // Accent
133
+ &[color="accent"] .spinner-progress {
134
+ stroke: getAccent($theme);
135
+ }
136
+ // Primary
137
+ &[color="primary"] .spinner-progress {
138
+ stroke: getPrimary($theme);
139
+ }
140
+ // Warn
141
+ &[color="warn"] .spinner-progress {
142
+ stroke: getWarn($theme);
143
+ }
144
+ .spinner-placeholder {
145
+ stroke: getDisabled($theme);
146
+ fill: none;
147
+ }
148
+ .spinner-progress {
149
+ fill: none;
150
+ }
151
+
152
+ @include generate-matcha-spinner-size-classes($helper-breakpoints);
153
+
154
+
155
+ }
156
+ }
157
+
158
+ matcha-spinner:not([progress]) {
159
+ $offset: 187;
160
+ $duration: 1.4s;
161
+
162
+ .matcha-spinner {
163
+ display: flex;
164
+ position: relative;
165
+
166
+ svg {
167
+ // transform: rotate(-90deg);
168
+ // width: 100%;
169
+ // height: 100%;
170
+ }
171
+
172
+
173
+
174
+ .spinner-progress {
175
+ stroke-linecap: round;
176
+ stroke-dasharray: $offset;
177
+ stroke-dashoffset: 0;
178
+ transform-origin: center;
179
+ animation:
180
+ rotator $duration linear infinite,
181
+ dash $duration ease-in-out infinite,
182
+ }
183
+
184
+
185
+
186
+ .spinner {
187
+ animation: rotator $duration linear infinite;
188
+ }
189
+
190
+ @keyframes rotator {
191
+ 0% { transform: rotate(0deg); }
192
+ 100% { transform: rotate(270deg); }
193
+ }
194
+
195
+
196
+
197
+
198
+
199
+ @keyframes dash {
200
+ 0% { stroke-dashoffset: $offset; }
201
+ 50% {
202
+ stroke-dashoffset: $offset/4;
203
+ transform:rotate(135deg);
204
+ }
205
+ 100% {
206
+ stroke-dashoffset: $offset;
207
+ transform:rotate(450deg);
208
+ }
209
+ }
210
+ }
211
+
212
+ }
213
+
214
+ matcha-spinner[progress] .spinner-progress {
215
+ animation: none;
216
+ }
217
+
218
+
219
+
220
+
221
+
222
+
223
+
package/main.scss CHANGED
@@ -42,6 +42,7 @@
42
42
  @import "./components/matcha-accordion.scss";
43
43
  @import "./components/matcha-ripple.scss"; // matcha-ripple-theme($theme)
44
44
  @import "./components/matcha-spin.scss"; // matcha-spin-theme($theme)
45
+ @import "./components/matcha-spinner.scss"; // matcha-spinner-theme($theme)
45
46
  @import "./components/matcha-hint-text.scss"; // matcha-hint-theme($theme)
46
47
  @import "./components/matcha-slide-toggle.scss"; // matcha-slide-toggle($theme)
47
48
 
@@ -147,6 +148,7 @@
147
148
  @include matcha-form-field($theme);
148
149
  @include matcha-checkbox($theme);
149
150
  @include matcha-spin($theme);
151
+ @include matcha-spinner($theme);
150
152
  @include matcha-hint-text($theme);
151
153
  @include matcha-slide-toggle-theme($theme);
152
154
  @include matcha-tabs($theme);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-theme",
3
- "version": "19.132.0",
3
+ "version": "19.135.0",
4
4
  "description": "Themes for matcha-design-system",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1099,7 +1099,7 @@ $dark-theme-background-palette: (
1099
1099
  card-alpha: rgba($color-base-dark-grey-500, 0.5),
1100
1100
  card-alpha-inverse: rgba($color-base-blue-grey-50, 0.5),
1101
1101
 
1102
- disabled: $color-base-dark-grey-700,
1102
+ disabled: $color-base-dark-grey-100,
1103
1103
  disabled-alpha: rgba($color-base-dark-grey-700, 0.5),
1104
1104
  // Precisa Remover
1105
1105
  sidebar: $color-base-dark-grey-700,