matcha-theme 20.174.0 → 20.179.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/components/matcha-buttons.scss +164 -136
- package/components/matcha-menu.scss +30 -61
- package/package.json +1 -1
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
pointer-events: none;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
@mixin generate-matcha-button-size-classes($helper-breakpoints){
|
|
60
|
+
@mixin generate-matcha-button-size-classes($helper-breakpoints) {
|
|
61
61
|
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
|
|
62
62
|
@include media-breakpoint($materialBreakpoint) {
|
|
63
|
-
$infix: if($materialBreakpoint ==
|
|
63
|
+
$infix: if($materialBreakpoint ==null, "", "-#{$breakpoint}");
|
|
64
64
|
|
|
65
65
|
&[size#{$infix}="tiny"] {
|
|
66
66
|
padding: 0 px-to-rem(32px);
|
|
@@ -120,7 +120,8 @@ a[matcha-button] {
|
|
|
120
120
|
cursor: pointer;
|
|
121
121
|
box-sizing: border-box;
|
|
122
122
|
border-radius: px-to-rem(8px);
|
|
123
|
-
|
|
123
|
+
|
|
124
|
+
* {
|
|
124
125
|
pointer-events: none;
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -135,12 +136,12 @@ a[matcha-button] {
|
|
|
135
136
|
@include generate-matcha-button-size-classes($helper-breakpoints);
|
|
136
137
|
|
|
137
138
|
|
|
138
|
-
&:hover{
|
|
139
|
-
|
|
139
|
+
&:hover {
|
|
140
|
+
filter: brightness(0.98);
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
&:active{
|
|
143
|
-
|
|
143
|
+
&:active {
|
|
144
|
+
filter: brightness(0.96);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
&[disabled] {
|
|
@@ -153,26 +154,31 @@ a[matcha-button] {
|
|
|
153
154
|
|
|
154
155
|
&[outline]:not([outline="false"]) {
|
|
155
156
|
box-shadow: 0px 0px 0px 2px inset;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
|
|
158
|
+
&[link]:not([link="false"]) {
|
|
159
|
+
&[size="tiny"] {
|
|
160
|
+
padding: 0px 8px;
|
|
161
|
+
gap: 4px;
|
|
160
162
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
|
|
164
|
+
&[size="small"] {
|
|
165
|
+
padding: 0px 12px;
|
|
166
|
+
gap: 8px;
|
|
164
167
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
|
|
169
|
+
&[size="medium"] {
|
|
170
|
+
padding: 0px 16px;
|
|
171
|
+
gap: 12px;
|
|
168
172
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
|
|
174
|
+
&[size="large"] {
|
|
175
|
+
padding: 0px 16px;
|
|
176
|
+
gap: 12px;
|
|
172
177
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
|
|
179
|
+
&[size="huge"] {
|
|
180
|
+
padding: 0px 16px;
|
|
181
|
+
gap: 12px;
|
|
176
182
|
}
|
|
177
183
|
}
|
|
178
184
|
}
|
|
@@ -202,6 +208,7 @@ a[matcha-button] {
|
|
|
202
208
|
transform: scale(0);
|
|
203
209
|
pointer-events: none;
|
|
204
210
|
}
|
|
211
|
+
|
|
205
212
|
.ripple.show {
|
|
206
213
|
animation: ripple 400ms ease-out;
|
|
207
214
|
}
|
|
@@ -211,9 +218,11 @@ a[matcha-button] {
|
|
|
211
218
|
opacity: 0;
|
|
212
219
|
transform: scale(0);
|
|
213
220
|
}
|
|
221
|
+
|
|
214
222
|
25% {
|
|
215
223
|
opacity: 1;
|
|
216
224
|
}
|
|
225
|
+
|
|
217
226
|
100% {
|
|
218
227
|
opacity: 0;
|
|
219
228
|
transform: scale(2);
|
|
@@ -248,146 +257,165 @@ a[matcha-button] {
|
|
|
248
257
|
disabled: getDisabled,
|
|
249
258
|
);
|
|
250
259
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
260
|
+
button[matcha-button],
|
|
261
|
+
a[matcha-button] {
|
|
262
|
+
&:not([color]) .ripple {
|
|
263
|
+
background: getForegroundAlpha($theme)
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@each $colorName, $colorFn in $color-functions {
|
|
267
|
+
|
|
268
|
+
// Background do ripple para outline e basic
|
|
269
|
+
&[color="#{'' + $colorName}"][outline]:not([outline="false"]) .ripple,
|
|
270
|
+
&[color="#{'' + $colorName}"][basic]:not([basic="false"]) .ripple {
|
|
271
|
+
background: call(#{$colorFn}Alpha, $theme)
|
|
255
272
|
}
|
|
256
273
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
// Divider dentro do botão para alpha
|
|
269
|
-
matcha-divider {
|
|
270
|
-
.border-color-disabled {
|
|
271
|
-
border-color: call(#{$colorFn}, $theme) !important;
|
|
272
|
-
opacity: 0.3 !important;
|
|
273
|
-
}
|
|
274
|
+
// Background e color do botão para alpha
|
|
275
|
+
&[color="#{'' + $colorName}"][alpha]:not([alpha="false"]) {
|
|
276
|
+
background: call(#{$colorFn}Alpha, $theme);
|
|
277
|
+
color: call(#{$colorFn}, $theme);
|
|
278
|
+
|
|
279
|
+
// Divider dentro do botão para alpha
|
|
280
|
+
matcha-divider {
|
|
281
|
+
.border-color-disabled {
|
|
282
|
+
border-color: call(#{$colorFn}, $theme) !important;
|
|
283
|
+
opacity: 0.3 !important;
|
|
274
284
|
}
|
|
275
285
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Color do botão para outline, link e basic
|
|
289
|
+
&[color="#{'' + $colorName}"][outline]:not([outline="false"]),
|
|
290
|
+
&[color="#{'' + $colorName}"][link]:not([link="false"]),
|
|
291
|
+
&[color="#{'' + $colorName}"][basic]:not([basic="false"]) {
|
|
292
|
+
color: call(#{$colorFn}, $theme);
|
|
293
|
+
|
|
294
|
+
// Divider dentro do botão para outline, link e basic
|
|
295
|
+
matcha-divider {
|
|
296
|
+
.border-color-disabled {
|
|
297
|
+
border-color: call(#{$colorFn}, $theme) !important;
|
|
298
|
+
opacity: 0.3 !important;
|
|
287
299
|
}
|
|
288
300
|
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Background e color do botão para default
|
|
304
|
+
&[color="#{'' + $colorName}"] {
|
|
305
|
+
background: call(#{$colorFn}, $theme);
|
|
306
|
+
color: call(#{$colorFn}Contrast, $theme);
|
|
289
307
|
|
|
290
|
-
//
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
// Divider dentro do botão para default
|
|
296
|
-
matcha-divider {
|
|
297
|
-
.border-color-disabled {
|
|
298
|
-
border-color: call(#{$colorFn}Contrast, $theme) !important;
|
|
299
|
-
opacity: 0.3 !important;
|
|
300
|
-
}
|
|
308
|
+
// Divider dentro do botão para default
|
|
309
|
+
matcha-divider {
|
|
310
|
+
.border-color-disabled {
|
|
311
|
+
border-color: call(#{$colorFn}Contrast, $theme) !important;
|
|
312
|
+
opacity: 0.3 !important;
|
|
301
313
|
}
|
|
302
314
|
}
|
|
303
|
-
|
|
304
|
-
&[color="#{'' + $colorName}"] .ripple{background: call(#{$colorFn}ContrastAlpha, $theme)}
|
|
315
|
+
}
|
|
305
316
|
|
|
317
|
+
// Ripple dentro do botão para default
|
|
318
|
+
&[color="#{'' + $colorName}"] .ripple {
|
|
319
|
+
background: call(#{$colorFn}ContrastAlpha, $theme)
|
|
320
|
+
}
|
|
306
321
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
322
|
+
|
|
323
|
+
&[disabled],
|
|
324
|
+
&[disabled]:not([disabled="false"]),
|
|
325
|
+
&[disabled="true"] {
|
|
326
|
+
|
|
327
|
+
&[solid],
|
|
328
|
+
&[solid]:not([solid="false"]),
|
|
329
|
+
&[solid="true"] {
|
|
330
|
+
@include _disabled-solid-button($theme);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&[outline],
|
|
334
|
+
&[outline]:not([outline="false"]),
|
|
335
|
+
&[outline="true"] {
|
|
336
|
+
@include _disabled-outline-button($theme);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&[basic],
|
|
340
|
+
&[basic]:not([basic="false"]),
|
|
341
|
+
&[basic="true"] {
|
|
342
|
+
@include _disabled-basic-button($theme);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&[alpha],
|
|
346
|
+
&[alpha]:not([alpha="false"]),
|
|
347
|
+
&[alpha="true"] {
|
|
348
|
+
@include _disabled-alpha-button($theme);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
&[link],
|
|
352
|
+
&[link]:not([link="false"]),
|
|
353
|
+
&[link="true"] {
|
|
354
|
+
@include _disabled-link-button($theme);
|
|
335
355
|
}
|
|
336
356
|
}
|
|
337
357
|
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
button[matcha-button],
|
|
361
|
+
a[matcha-button] {
|
|
362
|
+
border: 0px solid currentColor;
|
|
363
|
+
|
|
364
|
+
&[disabled] {
|
|
365
|
+
background-color: getDisabled($theme);
|
|
366
|
+
color: getDisabledBgContrast($theme);
|
|
367
|
+
border-color: getDisabled($theme);
|
|
368
|
+
}
|
|
338
369
|
|
|
339
|
-
|
|
340
|
-
a[matcha-button] {
|
|
370
|
+
&[outline]:not([outline="false"]) {
|
|
341
371
|
border: 0px solid currentColor;
|
|
372
|
+
background: transparent;
|
|
373
|
+
|
|
374
|
+
&:not([color]) {
|
|
375
|
+
border-color: getForeground($theme);
|
|
376
|
+
color: getForeground($theme);
|
|
377
|
+
}
|
|
342
378
|
|
|
343
379
|
&[disabled] {
|
|
344
|
-
|
|
345
|
-
color:
|
|
346
|
-
|
|
380
|
+
box-shadow: 0 0 0 2px getDisabledContrast($theme);
|
|
381
|
+
color: getDisabledContrast($theme) !important;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&[basic]:not([basic="false"]) {
|
|
386
|
+
background: getSurface($theme);
|
|
387
|
+
|
|
388
|
+
&:not([color]) {
|
|
389
|
+
color: getForeground($theme);
|
|
347
390
|
}
|
|
348
391
|
|
|
349
|
-
&[
|
|
350
|
-
|
|
392
|
+
&[disabled] {
|
|
393
|
+
color: getDisabledContrast($theme) !important;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
&[alpha]:not([alpha="false"]) {
|
|
351
397
|
background: transparent;
|
|
352
|
-
&:not([color]){
|
|
353
|
-
border-color: getForeground($theme);
|
|
354
|
-
color: getForeground($theme);
|
|
355
|
-
}
|
|
356
|
-
&[disabled] {
|
|
357
|
-
box-shadow: 0 0 0 2px getDisabledContrast($theme);
|
|
358
|
-
color: getDisabledContrast($theme) !important;
|
|
359
|
-
}
|
|
360
398
|
}
|
|
399
|
+
}
|
|
361
400
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
&[disabled] {
|
|
368
|
-
color: getDisabledContrast($theme) !important;
|
|
369
|
-
}
|
|
370
|
-
&[alpha]:not([alpha="false"]){
|
|
371
|
-
background:transparent;
|
|
372
|
-
}
|
|
401
|
+
&[alpha]:not([alpha="false"]) {
|
|
402
|
+
&:not([color]) {
|
|
403
|
+
background: getForegroundAlpha($theme);
|
|
404
|
+
border-color: getForeground($theme);
|
|
405
|
+
color: getForeground($theme);
|
|
373
406
|
}
|
|
374
407
|
|
|
375
|
-
&[
|
|
376
|
-
|
|
377
|
-
background: getForegroundAlpha($theme);
|
|
378
|
-
border-color: getForeground($theme);
|
|
379
|
-
color: getForeground($theme);
|
|
380
|
-
}
|
|
381
|
-
&[disabled] {
|
|
382
|
-
background: getDisabledAlpha($theme);
|
|
383
|
-
}
|
|
408
|
+
&[disabled] {
|
|
409
|
+
background: getDisabledAlpha($theme);
|
|
384
410
|
}
|
|
411
|
+
}
|
|
385
412
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
413
|
+
&[link]:not([link="false"]) {
|
|
414
|
+
background-color: transparent;
|
|
415
|
+
|
|
416
|
+
&:not([color]) {
|
|
417
|
+
color: getForeground($theme);
|
|
391
418
|
}
|
|
392
419
|
}
|
|
393
420
|
}
|
|
421
|
+
}
|
|
@@ -1,68 +1,37 @@
|
|
|
1
1
|
@mixin matcha-menu-theme($theme) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
$primary: map-get($theme, primary);
|
|
3
|
+
$accent: map-get($theme, accent);
|
|
4
|
+
$warn: map-get($theme, warn);
|
|
5
|
+
$background: map-get($theme, background);
|
|
6
|
+
$foreground: map-get($theme, foreground);
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
.matcha-menu-content {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
padding: 8px 0;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
13
|
+
button,
|
|
14
|
+
[matcha-button] {
|
|
15
|
+
width: 100%;
|
|
16
|
+
text-align: left;
|
|
17
|
+
justify-content: flex-start;
|
|
18
|
+
border-radius: 0;
|
|
19
|
+
padding: 8px 16px;
|
|
20
|
+
height: 40px;
|
|
21
|
+
font-weight: 500;
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
23
|
+
&:hover {
|
|
24
|
+
filter: brightness(0.98);
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
background: white;
|
|
31
|
-
border: none;
|
|
32
|
-
padding: 0;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
font-size: 16px;
|
|
35
|
-
font-weight: 700;
|
|
36
|
-
height: 48px;
|
|
37
|
-
appearance: auto;
|
|
38
|
-
text-rendering: auto;
|
|
39
|
-
letter-spacing: normal;
|
|
40
|
-
word-spacing: normal;
|
|
41
|
-
line-height: normal;
|
|
42
|
-
text-transform: none;
|
|
43
|
-
text-indent: 0px;
|
|
44
|
-
text-shadow: none;
|
|
45
|
-
display: inline-block;
|
|
46
|
-
text-align: center;
|
|
47
|
-
align-items: flex-start;
|
|
48
|
-
cursor: default;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
*{
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
27
|
+
&:active {
|
|
28
|
+
filter: brightness(0.96);
|
|
29
|
+
}
|
|
55
30
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.menu-item:hover > .submenu {
|
|
62
|
-
display: block;
|
|
63
|
-
z-index: 1001; /* Ensure submenus appear above other content */
|
|
64
|
-
position:relative;
|
|
65
|
-
top: -48px;
|
|
66
|
-
}
|
|
31
|
+
matcha-icon,
|
|
32
|
+
.matcha-icon {
|
|
33
|
+
margin-right: 12px;
|
|
34
|
+
}
|
|
67
35
|
}
|
|
68
|
-
}
|
|
36
|
+
}
|
|
37
|
+
}
|