matcha-theme 20.187.0 → 20.189.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 +197 -122
- package/abstracts/_functions.scss +278 -114
- package/components/matcha-buttons.scss +28 -0
- package/components/matcha-progress-bar.scss +169 -76
- package/main.scss +2 -0
- package/package.json +1 -1
- package/tokens/_color-tokens.scss +95 -136
package/abstracts/_colors.scss
CHANGED
|
@@ -3,12 +3,14 @@ $saturationLevels: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200,
|
|
|
3
3
|
|
|
4
4
|
// Hues Palette Colors
|
|
5
5
|
$index: 0;
|
|
6
|
+
|
|
6
7
|
// -------------------------------------------------------------------------------------------------------------------
|
|
7
8
|
// @ Text color levels generator
|
|
8
9
|
// -------------------------------------------------------------------------------------------------------------------
|
|
9
10
|
@mixin _generate-text-color-levels($classes, $contrast) {
|
|
10
|
-
@if ($contrast ==
|
|
11
|
+
@if ($contrast =="dark") {
|
|
11
12
|
#{$classes} {
|
|
13
|
+
|
|
12
14
|
&.secondary-text,
|
|
13
15
|
.secondary-text {
|
|
14
16
|
color: rgba(0, 0, 0, 0.54) !important;
|
|
@@ -26,8 +28,11 @@ $index: 0;
|
|
|
26
28
|
color: rgba(0, 0, 0, 0.12) !important;
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
|
-
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@else {
|
|
30
34
|
#{$classes} {
|
|
35
|
+
|
|
31
36
|
&.secondary-text,
|
|
32
37
|
.secondary-text {
|
|
33
38
|
color: rgba(255, 255, 255, 0.7) !important;
|
|
@@ -72,7 +77,7 @@ $index: 0;
|
|
|
72
77
|
color: $color !important;
|
|
73
78
|
}
|
|
74
79
|
|
|
75
|
-
@if ($saturation ==
|
|
80
|
+
@if ($saturation =="-500") {
|
|
76
81
|
$colorSelectorDefault: unquote(".#{$colorName}");
|
|
77
82
|
|
|
78
83
|
#{$colorSelectorDefault}-bg {
|
|
@@ -87,56 +92,59 @@ $index: 0;
|
|
|
87
92
|
|
|
88
93
|
@mixin colors-classes-static($theme) {
|
|
89
94
|
$palettes: getAllPalettes($theme);
|
|
90
|
-
$light-contrasting-classes: (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
$light-contrasting-classes: (
|
|
96
|
+
);
|
|
97
|
+
$dark-contrasting-classes: (
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
@each $paletteName, $palette in $palettes {
|
|
101
|
+
// $contrasts: map-get($red, "contrast");
|
|
102
|
+
// $contrasts = all contrast colors of $red palette
|
|
103
|
+
$contrasts: map-get($palette, "contrast");
|
|
104
|
+
|
|
105
|
+
@each $saturation in $saturationLevels {
|
|
106
|
+
// $color: map-get($red, 500)
|
|
107
|
+
// $contrast: map-get($contrasts, 500); 500 contrast color of $red palette
|
|
108
|
+
$color: map-get($palette, $saturation);
|
|
109
|
+
$contrast: map-get($contrasts, $saturation);
|
|
110
|
+
|
|
111
|
+
@if ($color !=null and $contrast !=null) {
|
|
112
|
+
@include _generate-static-color-classes($paletteName, $color, $contrast, "-#{$saturation}");
|
|
113
|
+
|
|
114
|
+
// If the contrast color is dark
|
|
115
|
+
@if (rgba(black, 1)==rgba($contrast, 1)) {
|
|
116
|
+
$dark-contrasting-classes: append($dark-contrasting-classes,
|
|
111
117
|
unquote(".#{$paletteName}-#{$saturation}"),
|
|
112
118
|
"comma"
|
|
113
119
|
);
|
|
114
|
-
|
|
120
|
+
}
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
$light-contrasting-classes,
|
|
122
|
+
// if the contrast color is light
|
|
123
|
+
@else {
|
|
124
|
+
$light-contrasting-classes: append($light-contrasting-classes,
|
|
120
125
|
unquote(".#{$paletteName}-#{$saturation}"),
|
|
121
126
|
"comma"
|
|
122
127
|
);
|
|
123
|
-
}
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
}
|
|
131
|
+
}
|
|
127
132
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
// Generate contrasting colors
|
|
134
|
+
@include _generate-text-color-levels($dark-contrasting-classes, "dark");
|
|
135
|
+
@include _generate-text-color-levels($light-contrasting-classes, "light");
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
// -------------------------------------------------------------------------------------------------------------------
|
|
134
139
|
// @ Dynamic color classes generator
|
|
135
140
|
// -------------------------------------------------------------------------------------------------------------------
|
|
136
141
|
@mixin colors-classes-dynamic($theme) {
|
|
142
|
+
$primary: map-get($theme, primary);
|
|
137
143
|
$accent: map-get($theme, accent);
|
|
144
|
+
$danger: map-get($theme, danger);
|
|
145
|
+
$success: map-get($theme, success);
|
|
138
146
|
$warn: map-get($theme, warn);
|
|
139
|
-
$
|
|
147
|
+
$info: map-get($theme, info);
|
|
140
148
|
$background: map-get($theme, background);
|
|
141
149
|
$foreground: map-get($theme, foreground);
|
|
142
150
|
|
|
@@ -162,123 +170,190 @@ $index: 0;
|
|
|
162
170
|
blue-grey: getBlueGrey,
|
|
163
171
|
primary: getPrimary,
|
|
164
172
|
accent: getAccent,
|
|
173
|
+
danger: getDanger,
|
|
165
174
|
warn: getWarn,
|
|
175
|
+
success: getSuccess,
|
|
176
|
+
info: getInfo,
|
|
166
177
|
disabled: getDisabled,
|
|
167
178
|
);
|
|
168
179
|
|
|
169
|
-
|
|
180
|
+
@include colors-classes-static($theme);
|
|
170
181
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
.color-unset {
|
|
183
|
+
color: map-get($foreground, foreground);
|
|
184
|
+
|
|
185
|
+
.ripple {
|
|
186
|
+
background: map-get($foreground, foreground);
|
|
176
187
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
.color-#{$colorName}{color: call(#{$colorFn}, $theme)!important}
|
|
183
|
-
.fill-#{$colorName}{fill: call(#{$colorFn}, $theme)}
|
|
184
|
-
.stroke-#{$colorName}{stroke: call(#{$colorFn}, $theme)}
|
|
185
|
-
.color-#{$colorName}-alpha{color: call(#{$colorFn}Alpha, $theme)!important}
|
|
186
|
-
.#{$colorName}-alpha{
|
|
187
|
-
background: call(#{$colorFn}Alpha, $theme);
|
|
188
|
-
color: call(#{$colorFn}, $theme);
|
|
189
|
-
}
|
|
190
|
-
.#{$colorName}{
|
|
191
|
-
background: call(#{$colorFn}, $theme);
|
|
192
|
-
color: call(#{$colorFn}Contrast, $theme);
|
|
193
|
-
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@each $colorName, $colorFn in $color-functions {
|
|
191
|
+
.background-#{$colorName}-alpha {
|
|
192
|
+
background: call(#{$colorFn}Alpha, $theme)
|
|
194
193
|
}
|
|
195
194
|
|
|
196
|
-
.
|
|
197
|
-
|
|
198
|
-
.background-basic{background: getSurface($theme)}
|
|
199
|
-
.border-color-basic{border-color:getForeground($theme)}
|
|
200
|
-
.color-basic{color: getForeground($theme)!important}
|
|
201
|
-
.fill-basic{fill: getSurface($theme)}
|
|
202
|
-
.stroke-basic{stroke: getForeground($theme)}
|
|
203
|
-
.color-basic-alpha{color: getForegroundAlpha($theme)!important}
|
|
204
|
-
.basic-alpha{
|
|
205
|
-
background: getForegroundAlpha($theme);
|
|
206
|
-
color: getForeground($theme);
|
|
195
|
+
.#{$colorName} .ripple {
|
|
196
|
+
background: call(#{$colorFn}Alpha, $theme)
|
|
207
197
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
198
|
+
|
|
199
|
+
.background-#{$colorName} {
|
|
200
|
+
background: call(#{$colorFn}, $theme)
|
|
211
201
|
}
|
|
212
202
|
|
|
213
|
-
.color
|
|
214
|
-
color:
|
|
203
|
+
.border-color-#{$colorName} {
|
|
204
|
+
border-color: call(#{$colorFn}, $theme)
|
|
215
205
|
}
|
|
216
206
|
|
|
217
|
-
.
|
|
218
|
-
|
|
207
|
+
.color-#{$colorName} {
|
|
208
|
+
color: call(#{$colorFn}, $theme) !important
|
|
219
209
|
}
|
|
220
210
|
|
|
221
|
-
$
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
@if ($attribute != "color") {
|
|
225
|
-
.#{$attribute}-bg {
|
|
226
|
-
#{$attribute}: getBackground($theme) !important;
|
|
227
|
-
}
|
|
228
|
-
.#{$attribute}-bg-alpha {
|
|
229
|
-
#{$attribute}: getBackgroundAlpha($theme) !important;
|
|
230
|
-
}
|
|
231
|
-
.#{$attribute}-bg-inverse {
|
|
232
|
-
#{$attribute}: getBackgroundInverse($theme) !important;
|
|
233
|
-
}
|
|
234
|
-
.#{$attribute}-bg-alpha-inverse {
|
|
235
|
-
#{$attribute}: getBackgroundAlphaInverse($theme) !important;
|
|
236
|
-
}
|
|
237
|
-
.#{$attribute}-surface-inverse {
|
|
238
|
-
#{$attribute}: getSurfaceInverse($theme) !important;
|
|
239
|
-
}
|
|
240
|
-
.#{$attribute}-surface-alpha-inverse {
|
|
241
|
-
#{$attribute}: getSurfaceAlphaInverse($theme) !important;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
211
|
+
.fill-#{$colorName} {
|
|
212
|
+
fill: call(#{$colorFn}, $theme)
|
|
213
|
+
}
|
|
244
214
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
215
|
+
.stroke-#{$colorName} {
|
|
216
|
+
stroke: call(#{$colorFn}, $theme)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.color-#{$colorName}-alpha {
|
|
220
|
+
color: call(#{$colorFn}Alpha, $theme) !important
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.#{$colorName}-alpha {
|
|
224
|
+
background: call(#{$colorFn}Alpha, $theme);
|
|
225
|
+
color: call(#{$colorFn}, $theme);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.#{$colorName} {
|
|
229
|
+
background: call(#{$colorFn}, $theme);
|
|
230
|
+
color: call(#{$colorFn}Contrast, $theme);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.background-basic-alpha {
|
|
235
|
+
background: getForegroundAlpha($theme)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.basic .ripple {
|
|
239
|
+
background: getForegroundAlpha($theme)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.background-basic {
|
|
243
|
+
background: getSurface($theme)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.border-color-basic {
|
|
247
|
+
border-color: getForeground($theme)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.color-basic {
|
|
251
|
+
color: getForeground($theme) !important
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.fill-basic {
|
|
255
|
+
fill: getSurface($theme)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.stroke-basic {
|
|
259
|
+
stroke: getForeground($theme)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.color-basic-alpha {
|
|
263
|
+
color: getForegroundAlpha($theme) !important
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.basic-alpha {
|
|
267
|
+
background: getForegroundAlpha($theme);
|
|
268
|
+
color: getForeground($theme);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.basic {
|
|
272
|
+
background: getSurface($theme);
|
|
273
|
+
color: getForeground($theme);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.color-unset {
|
|
277
|
+
color: unset;
|
|
278
|
+
}
|
|
250
279
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
280
|
+
.background-transparent {
|
|
281
|
+
background: transparent;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
$attributes: (
|
|
285
|
+
color,
|
|
286
|
+
border-color,
|
|
287
|
+
background,
|
|
288
|
+
fill,
|
|
289
|
+
stroke
|
|
290
|
+
);
|
|
291
|
+
|
|
292
|
+
@each $attribute in $attributes {
|
|
293
|
+
@if ($attribute !="color") {
|
|
294
|
+
.#{$attribute}-bg {
|
|
295
|
+
#{$attribute}: getBackground($theme) !important;
|
|
255
296
|
}
|
|
256
297
|
|
|
257
|
-
.#{$attribute}-
|
|
258
|
-
#{$attribute}:
|
|
298
|
+
.#{$attribute}-bg-alpha {
|
|
299
|
+
#{$attribute}: getBackgroundAlpha($theme) !important;
|
|
259
300
|
}
|
|
260
301
|
|
|
261
|
-
.#{$attribute}-
|
|
262
|
-
#{$attribute}:
|
|
302
|
+
.#{$attribute}-bg-inverse {
|
|
303
|
+
#{$attribute}: getBackgroundInverse($theme) !important;
|
|
263
304
|
}
|
|
264
305
|
|
|
265
|
-
.#{$attribute}-
|
|
266
|
-
#{$attribute}:
|
|
267
|
-
&-alpha {
|
|
268
|
-
background: rgba(getGrey($theme), 0.2) !important;
|
|
269
|
-
}
|
|
306
|
+
.#{$attribute}-bg-alpha-inverse {
|
|
307
|
+
#{$attribute}: getBackgroundAlphaInverse($theme) !important;
|
|
270
308
|
}
|
|
271
309
|
|
|
272
|
-
.#{$attribute}-
|
|
273
|
-
#{$attribute}:
|
|
310
|
+
.#{$attribute}-surface-inverse {
|
|
311
|
+
#{$attribute}: getSurfaceInverse($theme) !important;
|
|
274
312
|
}
|
|
275
313
|
|
|
276
|
-
.#{$attribute}-
|
|
277
|
-
#{$attribute}:
|
|
314
|
+
.#{$attribute}-surface-alpha-inverse {
|
|
315
|
+
#{$attribute}: getSurfaceAlphaInverse($theme) !important;
|
|
278
316
|
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.#{$attribute}-fg,
|
|
320
|
+
.#{$attribute}-base,
|
|
321
|
+
.#{$attribute}-text {
|
|
322
|
+
#{$attribute}: getForeground($theme) !important;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.#{$attribute}-fg-inverse,
|
|
326
|
+
.#{$attribute}-base-inverse,
|
|
327
|
+
.#{$attribute}-text-inverse {
|
|
328
|
+
#{$attribute}: getForegroundInverse($theme) !important;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.#{$attribute}-surface {
|
|
332
|
+
#{$attribute}: getSurface($theme) !important;
|
|
333
|
+
}
|
|
279
334
|
|
|
280
|
-
|
|
281
|
-
|
|
335
|
+
.#{$attribute}-surface-alpha {
|
|
336
|
+
#{$attribute}: getSurfaceAlpha($theme) !important;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.#{$attribute}-placeholder {
|
|
340
|
+
#{$attribute}: getGrey($theme) !important;
|
|
341
|
+
|
|
342
|
+
&-alpha {
|
|
343
|
+
background: rgba(getGrey($theme), 0.2) !important;
|
|
282
344
|
}
|
|
283
345
|
}
|
|
346
|
+
|
|
347
|
+
.#{$attribute}-label {
|
|
348
|
+
#{$attribute}: getBlueGrey($theme) !important;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.#{$attribute}-disabled {
|
|
352
|
+
#{$attribute}: getDisabled($theme) !important;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.#{$attribute}-disabled-icon {
|
|
356
|
+
#{$attribute}: getDisabledContrast($theme) !important;
|
|
357
|
+
}
|
|
284
358
|
}
|
|
359
|
+
}
|