matcha-theme 19.53.0 → 19.55.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,282 @@
1
+ @mixin _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions) {
2
+ &:not([inactivetype]),
3
+ &[inactivetype="solid"]{
4
+ @each $colorName, $colorFn in $color-functions {
5
+ &[inactivecolor="#{$colorName}"]{
6
+ .button-group{
7
+ button[matcha-button],
8
+ a[matcha-button]{
9
+ &:not([active]){
10
+ background: call(#{$colorFn}, $theme);
11
+ color: call(#{$colorFn}Contrast, $theme);
12
+ box-shadow: 0 0 0 0px inset;
13
+ .ripple{
14
+ background: call(#{$colorFn}ContrastAlpha, $theme);
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+ }
21
+ &[disabled],
22
+ &[disabled]:not([disabled="false"]),
23
+ &[disabled="true"] {
24
+ .button-group{
25
+ button[matcha-button],
26
+ a[matcha-button]{
27
+ &:not([active]){
28
+ @include _disabled-solid-button($theme);
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ @mixin _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions) {
37
+ &[inactivetype="basic"]{
38
+ @each $colorName, $colorFn in $color-functions {
39
+ &[inactivecolor="#{$colorName}"]{
40
+ .button-group{
41
+ button[matcha-button],
42
+ a[matcha-button]{
43
+ &:not([active]){
44
+ background: getSurface($theme);
45
+ color: call(#{$colorFn}, $theme);
46
+ box-shadow: 0 0 0 0px inset;
47
+ .ripple{
48
+ background: call(#{$colorFn}Alpha, $theme);
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ &[disabled],
56
+ &[disabled]:not([disabled="false"]),
57
+ &[disabled="true"] {
58
+ .button-group{
59
+ button[matcha-button],
60
+ a[matcha-button]{
61
+ &:not([active]){
62
+ @include _disabled-basic-button($theme);
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ @mixin _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions) {
71
+ &[inactivetype="outline"]{
72
+ //disabled false
73
+ &:not([disabled="true"]){
74
+ @each $colorName, $colorFn in $color-functions {
75
+ &[inactivecolor="#{$colorName}"]{
76
+ .button-group{
77
+ button[matcha-button],
78
+ a[matcha-button]{
79
+ //botão não ativo
80
+ &:not([active]){
81
+ color: call(#{$colorFn}, $theme);
82
+ background: transparent;
83
+ box-shadow: 0 0 0 2px call(#{$colorFn}, $theme) inset;
84
+ .ripple{
85
+ background: call(#{$colorFn}Alpha, $theme);
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ //disabled true
94
+ &[disabled],
95
+ &[disabled]:not([disabled="false"]),
96
+ &[disabled="true"] {
97
+ .button-group{
98
+ button[matcha-button],
99
+ a[matcha-button]{
100
+ //botão não ativo
101
+ &:not([active]){
102
+ @include _disabled-outline-button($theme);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+
110
+ @mixin _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions) {
111
+ &[inactivetype="alpha"]{
112
+ @each $colorName, $colorFn in $color-functions {
113
+ &[inactivecolor="#{$colorName}"]{
114
+ .button-group{
115
+ button[matcha-button],
116
+ a[matcha-button]{
117
+ &:not([active]){
118
+ color: call(#{$colorFn}, $theme);
119
+ background: call(#{$colorFn}Alpha, $theme);
120
+ box-shadow: 0 0 0 0px;
121
+ .ripple{
122
+ background: call(#{$colorFn}ContrastAlpha, $theme)
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ &[disabled],
130
+ &[disabled]:not([disabled="false"]),
131
+ &[disabled="true"] {
132
+ .button-group{
133
+ button[matcha-button],
134
+ a[matcha-button]{
135
+ //botão não ativo
136
+ &:not([active]){
137
+ @include _disabled-alpha-button($theme);
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ @mixin _colorize-inactive-type-link-button-toggle-item($theme, $color-functions) {
146
+
147
+ &[inactivetype="link"]{
148
+ @each $colorName, $colorFn in $color-functions {
149
+ &[inactivecolor="#{$colorName}"]{
150
+ .button-group{
151
+ button[matcha-button],
152
+ a[matcha-button]{
153
+ &:not([active]){
154
+
155
+ background: transparent;
156
+ color: call(#{$colorFn}, $theme);
157
+ box-shadow: 0 0 0 0px;
158
+ .ripple{
159
+ background: call(#{$colorFn}Alpha, $theme);
160
+ }
161
+
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ &[disabled],
168
+ &[disabled]:not([disabled="false"]),
169
+ &[disabled="true"] {
170
+ .button-group{
171
+ button[matcha-button],
172
+ a[matcha-button]{
173
+ //botão não ativo
174
+ &:not([active]){
175
+ @include _disabled-link-button($theme);
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+
184
+
185
+
186
+ @mixin matcha-button-toggle($theme) {
187
+ $color-functions: (
188
+ red: getRed,
189
+ pink: getPink,
190
+ purple: getPurple,
191
+ deep-purple: getDeepPurple,
192
+ indigo: getIndigo,
193
+ blue: getBlue,
194
+ light-blue: getLightBlue,
195
+ cyan: getCyan,
196
+ teal: getTeal,
197
+ green: getGreen,
198
+ light-green: getLightGreen,
199
+ lime: getLime,
200
+ yellow: getYellow,
201
+ amber: getAmber,
202
+ orange: getOrange,
203
+ deep-orange: getDeepOrange,
204
+ brown: getBrown,
205
+ grey: getGrey,
206
+ blue-grey: getBlueGrey,
207
+ primary: getPrimary,
208
+ accent: getAccent,
209
+ warn: getWarn,
210
+ disabled: getDisabled,
211
+ );
212
+
213
+ matcha-button-toggle{
214
+ display: flex;
215
+ @include _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions);
216
+ @include _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions);
217
+ @include _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions);
218
+ @include _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions);
219
+ @include _colorize-inactive-type-link-button-toggle-item($theme, $color-functions);
220
+
221
+ &[disabled],
222
+ &[disabled]:not([disabled="false"]),
223
+ &[disabled="true"] {
224
+ .button-group{
225
+ button[matcha-button],
226
+ a[matcha-button]{
227
+ &[active]{
228
+
229
+ &[outline],
230
+ &[outline]:not([outline="false"]),
231
+ &[outline="true"]{
232
+ @include _disabled-outline-button($theme);
233
+ }
234
+
235
+ &[basic],
236
+ &[basic]:not([basic="false"]),
237
+ &[basic="true"]{
238
+ @include _disabled-basic-button($theme);
239
+ }
240
+
241
+ &[alpha],
242
+ &[alpha]:not([alpha="false"]),
243
+ &[alpha="true"]{
244
+ @include _disabled-alpha-button($theme);
245
+ }
246
+
247
+ &[link],
248
+ &[link]:not([link="false"]),
249
+ &[link="true"]{
250
+ @include _disabled-link-button($theme);
251
+ }
252
+
253
+ @include _disabled-solid-button($theme);
254
+ }
255
+ }
256
+ }
257
+
258
+ }
259
+ }
260
+ }
261
+ matcha-button-toggle {
262
+ .button-group {
263
+ &.gap-0 {
264
+ gap: 0 !important;
265
+
266
+ // Ajuste border-radius quando gap = 0
267
+ button[matcha-button]:first-child {
268
+ border-top-right-radius: 0;
269
+ border-bottom-right-radius: 0;
270
+ }
271
+
272
+ button[matcha-button]:last-child {
273
+ border-top-left-radius: 0;
274
+ border-bottom-left-radius: 0;
275
+ }
276
+
277
+ button[matcha-button]:not(:first-child):not(:last-child) {
278
+ border-radius: 0;
279
+ }
280
+ }
281
+ }
282
+ }
@@ -22,6 +22,41 @@
22
22
  // [size-lg]="sizeLg"
23
23
  // [size-xl]="sizeXl">
24
24
 
25
+ @mixin _disabled-solid-button($theme) {
26
+ background: getDisabled($theme);
27
+ color: getDisabledBgContrast($theme);
28
+ box-shadow: 0 0 0 0px inset;
29
+ pointer-events: none;
30
+ }
31
+
32
+ @mixin _disabled-basic-button($theme) {
33
+ background: getSurface($theme);
34
+ color: getDisabled($theme);
35
+ box-shadow: 0 0 0 0px inset;
36
+ pointer-events: none;
37
+ }
38
+
39
+ @mixin _disabled-outline-button($theme) {
40
+ background: transparent;
41
+ color: getDisabled($theme);
42
+ box-shadow: 0 0 0 2px inset;
43
+ pointer-events: none;
44
+ }
45
+
46
+ @mixin _disabled-alpha-button($theme) {
47
+ background: getDisabledAlpha($theme);
48
+ color: getDisabled($theme);
49
+ box-shadow: 0 0 0 0px inset;
50
+ pointer-events: none;
51
+ }
52
+
53
+ @mixin _disabled-link-button($theme) {
54
+ background: transparent;
55
+ color: getDisabled($theme);
56
+ box-shadow: 0 0 0 0px inset;
57
+ pointer-events: none;
58
+ }
59
+
25
60
  @mixin generate-matcha-button-size-classes($helper-breakpoints){
26
61
  @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
27
62
  @include media-breakpoint($materialBreakpoint) {
@@ -187,472 +222,88 @@ a[matcha-button] {
187
222
  }
188
223
 
189
224
  @mixin matcha-button-theme($theme) {
225
+ $color-functions: (
226
+ red: getRed,
227
+ pink: getPink,
228
+ purple: getPurple,
229
+ deep-purple: getDeepPurple,
230
+ indigo: getIndigo,
231
+ blue: getBlue,
232
+ light-blue: getLightBlue,
233
+ cyan: getCyan,
234
+ teal: getTeal,
235
+ green: getGreen,
236
+ light-green: getLightGreen,
237
+ lime: getLime,
238
+ yellow: getYellow,
239
+ amber: getAmber,
240
+ orange: getOrange,
241
+ deep-orange: getDeepOrange,
242
+ brown: getBrown,
243
+ grey: getGrey,
244
+ blue-grey: getBlueGrey,
245
+ primary: getPrimary,
246
+ accent: getAccent,
247
+ warn: getWarn,
248
+ disabled: getDisabled,
249
+ );
190
250
 
191
251
  button[matcha-button],
192
252
  a[matcha-button] {
193
253
  &:not([color]) .ripple {
194
254
  background: getForegroundAlpha($theme)
195
255
  }
196
- // red
197
- &[color="red"][outline]:not([outline="false"]) .ripple,
198
- &[color="red"][basic]:not([basic="false"]) .ripple {
199
- background: getRedAlpha($theme)
200
- }
201
- &[color="red"][alpha]:not([alpha="false"]){
202
- background: getRedAlpha($theme);
203
- color: getRed($theme);
204
- }
205
- &[color="red"][outline]:not([outline="false"]),
206
- &[color="red"][link]:not([link="false"]),
207
- &[color="red"][basic]:not([basic="false"]) {
208
- color: getRed($theme)!important
209
- }
210
- &[color="red"]{
211
- background: getRed($theme);
212
- color: getRedContrast($theme);
213
- }
214
- &[color="red"] .ripple{background: getRedContrastAlpha($theme)}
215
256
 
216
- // pink
217
- &[color="pink"][outline]:not([outline="false"]) .ripple,
218
- &[color="pink"][basic]:not([basic="false"]) .ripple {
219
- background: getPinkAlpha($theme)
220
- }
221
- &[color="pink"][alpha]:not([alpha="false"]){
222
- background: getPinkAlpha($theme);
223
- color: getPink($theme);
224
- }
225
- &[color="pink"][outline]:not([outline="false"]),
226
- &[color="pink"][link]:not([link="false"]),
227
- &[color="pink"][basic]:not([basic="false"]) {
228
- color: getPink($theme)!important
229
- }
230
- &[color="pink"]{
231
- background: getPink($theme);
232
- color: getPinkContrast($theme);
233
- }
234
- &[color="pink"] .ripple{background: getPinkContrastAlpha($theme)}
235
-
236
- // purple
237
- &[color="purple"][outline]:not([outline="false"]) .ripple,
238
- &[color="purple"][basic]:not([basic="false"]) .ripple {
239
- background: getPurpleAlpha($theme)
240
- }
241
- &[color="purple"][alpha]:not([alpha="false"]){
242
- background: getPurpleAlpha($theme);
243
- color: getPurple($theme);
244
- }
245
- &[color="purple"][outline]:not([outline="false"]),
246
- &[color="purple"][link]:not([link="false"]),
247
- &[color="purple"][basic]:not([basic="false"]) {
248
- color: getPurple($theme)!important
249
- }
250
- &[color="purple"]{
251
- background: getPurple($theme);
252
- color: getPurpleContrast($theme);
253
- }
254
- &[color="purple"] .ripple{background: getPurpleContrastAlpha($theme)}
255
-
256
- // deep-purple
257
- &[color="deep-purple"][outline]:not([outline="false"]) .ripple,
258
- &[color="deep-purple"][basic]:not([basic="false"]) .ripple {
259
- background: getDeepPurpleAlpha($theme)
260
- }
261
- &[color="deep-purple"][alpha]:not([alpha="false"]){
262
- background: getDeepPurpleAlpha($theme);
263
- color: getDeepPurple($theme);
264
- }
265
- &[color="deep-purple"][outline]:not([outline="false"]),
266
- &[color="deep-purple"][link]:not([link="false"]),
267
- &[color="deep-purple"][basic]:not([basic="false"]) {
268
- color: getDeepPurple($theme)!important
269
- }
270
- &[color="deep-purple"]{
271
- background: getDeepPurple($theme);
272
- color: getDeepPurpleContrast($theme);
273
- }
274
- &[color="deep-purple"] .ripple{background: getDeepPurpleContrastAlpha($theme)}
275
-
276
- // indigo
277
- &[color="indigo"][outline]:not([outline="false"]) .ripple,
278
- &[color="indigo"][basic]:not([basic="false"]) .ripple {
279
- background: getIndigoAlpha($theme)
280
- }
281
- &[color="indigo"][alpha]:not([alpha="false"]){
282
- background: getIndigoAlpha($theme);
283
- color: getIndigo($theme);
284
- }
285
- &[color="indigo"][outline]:not([outline="false"]),
286
- &[color="indigo"][link]:not([link="false"]),
287
- &[color="indigo"][basic]:not([basic="false"]) {
288
- color: getIndigo($theme)!important
289
- }
290
- &[color="indigo"]{
291
- background: getIndigo($theme);
292
- color: getIndigoContrast($theme);
293
- }
294
- &[color="indigo"] .ripple{background: getIndigoContrastAlpha($theme)}
295
-
296
- // blue
297
- &[color="blue"][outline]:not([outline="false"]) .ripple,
298
- &[color="blue"][basic]:not([basic="false"]) .ripple {
299
- background: getBlueAlpha($theme)
300
- }
301
- &[color="blue"][alpha]:not([alpha="false"]){
302
- background: getBlueAlpha($theme);
303
- color: getBlue($theme);
304
- }
305
- &[color="blue"][outline]:not([outline="false"]),
306
- &[color="blue"][link]:not([link="false"]),
307
- &[color="blue"][basic]:not([basic="false"]) {
308
- color: getBlue($theme)!important
309
- }
310
- &[color="blue"]{
311
- background: getBlue($theme);
312
- color: getBlueContrast($theme);
313
- }
314
- &[color="blue"] .ripple{background: getBlueContrastAlpha($theme)}
315
-
316
- // light-blue
317
- &[color="light-blue"][outline]:not([outline="false"]) .ripple,
318
- &[color="light-blue"][basic]:not([basic="false"]) .ripple {
319
- background: getLightBlueAlpha($theme)
320
- }
321
- &[color="light-blue"][alpha]:not([alpha="false"]){
322
- background: getLightBlueAlpha($theme);
323
- color: getLightBlue($theme);
324
- }
325
- &[color="light-blue"][outline]:not([outline="false"]),
326
- &[color="light-blue"][link]:not([link="false"]),
327
- &[color="light-blue"][basic]:not([basic="false"]) {
328
- color: getLightBlue($theme)!important
329
- }
330
- &[color="light-blue"]{
331
- background: getLightBlue($theme);
332
- color: getLightBlueContrast($theme);
333
- }
334
- &[color="light-blue"] .ripple{background: getLightBlueContrastAlpha($theme)}
335
-
336
- // cyan
337
- &[color="cyan"][outline]:not([outline="false"]) .ripple,
338
- &[color="cyan"][basic]:not([basic="false"]) .ripple {
339
- background: getCyanAlpha($theme)
340
- }
341
- &[color="cyan"][alpha]:not([alpha="false"]){
342
- background: getCyanAlpha($theme);
343
- color: getCyan($theme);
344
- }
345
- &[color="cyan"][outline]:not([outline="false"]),
346
- &[color="cyan"][link]:not([link="false"]),
347
- &[color="cyan"][basic]:not([basic="false"]) {
348
- color: getCyan($theme)!important
349
- }
350
- &[color="cyan"]{
351
- background: getCyan($theme);
352
- color: getCyanContrast($theme);
353
- }
354
- &[color="cyan"] .ripple{background: getCyanContrastAlpha($theme)}
355
-
356
- // teal
357
- &[color="teal"][outline]:not([outline="false"]) .ripple,
358
- &[color="teal"][basic]:not([basic="false"]) .ripple {
359
- background: getTealAlpha($theme)
360
- }
361
- &[color="teal"][alpha]:not([alpha="false"]){
362
- background: getTealAlpha($theme);
363
- color: getTeal($theme);
364
- }
365
- &[color="teal"][outline]:not([outline="false"]),
366
- &[color="teal"][link]:not([link="false"]),
367
- &[color="teal"][basic]:not([basic="false"]) {
368
- color: getTeal($theme)!important
369
- }
370
- &[color="teal"]{
371
- background: getTeal($theme);
372
- color: getTealContrast($theme);
373
- }
374
- &[color="teal"] .ripple{background: getTealContrastAlpha($theme)}
375
-
376
- // green
377
- &[color="green"][outline]:not([outline="false"]) .ripple,
378
- &[color="green"][basic]:not([basic="false"]) .ripple {
379
- background: getGreenAlpha($theme)
380
- }
381
- &[color="green"][alpha]:not([alpha="false"]){
382
- background: getGreenAlpha($theme);
383
- color: getGreen($theme);
384
- }
385
- &[color="green"][outline]:not([outline="false"]),
386
- &[color="green"][link]:not([link="false"]),
387
- &[color="green"][basic]:not([basic="false"]) {
388
- color: getGreen($theme)!important
389
- }
390
- &[color="green"]{
391
- background: getGreen($theme);
392
- color: getGreenContrast($theme);
393
- }
394
- &[color="green"] .ripple{background: getGreenContrastAlpha($theme)}
395
-
396
- // light-green
397
- &[color="light-green"][outline]:not([outline="false"]) .ripple,
398
- &[color="light-green"][basic]:not([basic="false"]) .ripple {
399
- background: getLightGreenAlpha($theme)
400
- }
401
- &[color="light-green"][alpha]:not([alpha="false"]){
402
- background: getLightGreenAlpha($theme);
403
- color: getLightGreen($theme);
404
- }
405
- &[color="light-green"][outline]:not([outline="false"]),
406
- &[color="light-green"][link]:not([link="false"]),
407
- &[color="light-green"][basic]:not([basic="false"]) {
408
- color: getLightGreen($theme)!important
409
- }
410
- &[color="light-green"]{
411
- background: getLightGreen($theme);
412
- color: getLightGreenContrast($theme);
413
- }
414
- &[color="light-green"] .ripple{background: getLightGreenContrastAlpha($theme)}
415
-
416
- // lime
417
- &[color="lime"][outline]:not([outline="false"]) .ripple,
418
- &[color="lime"][basic]:not([basic="false"]) .ripple {
419
- background: getLimeAlpha($theme)
420
- }
421
- &[color="lime"][alpha]:not([alpha="false"]){
422
- background: getLimeAlpha($theme);
423
- color: getLime($theme);
424
- }
425
- &[color="lime"][outline]:not([outline="false"]),
426
- &[color="lime"][link]:not([link="false"]),
427
- &[color="lime"][basic]:not([basic="false"]) {
428
- color: getLime($theme)!important
429
- }
430
- &[color="lime"]{
431
- background: getLime($theme);
432
- color: getLimeContrast($theme);
433
- }
434
- &[color="lime"] .ripple{background: getLimeContrastAlpha($theme)}
435
-
436
- // yellow
437
- &[color="yellow"][outline]:not([outline="false"]) .ripple,
438
- &[color="yellow"][basic]:not([basic="false"]) .ripple {
439
- background: getYellowAlpha($theme)
440
- }
441
- &[color="yellow"][alpha]:not([alpha="false"]){
442
- background: getYellowAlpha($theme);
443
- color: getYellow($theme);
444
- }
445
- &[color="yellow"][outline]:not([outline="false"]),
446
- &[color="yellow"][link]:not([link="false"]),
447
- &[color="yellow"][basic]:not([basic="false"]) {
448
- color: getYellow($theme)!important
449
- }
450
- &[color="yellow"]{
451
- background: getYellow($theme);
452
- color: getYellowContrast($theme);
453
- }
454
- &[color="yellow"] .ripple{background: getYellowContrastAlpha($theme)}
455
-
456
- // amber
457
- &[color="amber"][outline]:not([outline="false"]) .ripple,
458
- &[color="amber"][basic]:not([basic="false"]) .ripple {
459
- background: getAmberAlpha($theme)
460
- }
461
- &[color="amber"][alpha]:not([alpha="false"]){
462
- background: getAmberAlpha($theme);
463
- color: getAmber($theme);
464
- }
465
- &[color="amber"][outline]:not([outline="false"]),
466
- &[color="amber"][link]:not([link="false"]),
467
- &[color="amber"][basic]:not([basic="false"]) {
468
- color: getAmber($theme)!important
469
- }
470
- &[color="amber"]{
471
- background: getAmber($theme);
472
- color: getAmberContrast($theme);
473
- }
474
- &[color="amber"] .ripple{background: getAmberContrastAlpha($theme)}
475
-
476
- // orange
477
- &[color="orange"][outline]:not([outline="false"]) .ripple,
478
- &[color="orange"][basic]:not([basic="false"]) .ripple {
479
- background: getOrangeAlpha($theme)
480
- }
481
- &[color="orange"][alpha]:not([alpha="false"]){
482
- background: getOrangeAlpha($theme);
483
- color: getOrange($theme);
484
- }
485
- &[color="orange"][outline]:not([outline="false"]),
486
- &[color="orange"][link]:not([link="false"]),
487
- &[color="orange"][basic]:not([basic="false"]) {
488
- color: getOrange($theme)!important
489
- }
490
- &[color="orange"]{
491
- background: getOrange($theme);
492
- color: getOrangeContrast($theme);
493
- }
494
- &[color="orange"] .ripple{background: getOrangeContrastAlpha($theme)}
495
-
496
- // deep-orange
497
- &[color="deep-orange"][outline]:not([outline="false"]) .ripple,
498
- &[color="deep-orange"][basic]:not([basic="false"]) .ripple {
499
- background: getDeepOrangeAlpha($theme)
500
- }
501
- &[color="deep-orange"][alpha]:not([alpha="false"]){
502
- background: getDeepOrangeAlpha($theme);
503
- color: getDeepOrange($theme);
504
- }
505
- &[color="deep-orange"][outline]:not([outline="false"]),
506
- &[color="deep-orange"][link]:not([link="false"]),
507
- &[color="deep-orange"][basic]:not([basic="false"]) {
508
- color: getDeepOrange($theme)!important
509
- }
510
- &[color="deep-orange"]{
511
- background: getDeepOrange($theme);
512
- color: getDeepOrangeContrast($theme);
513
- }
514
- &[color="deep-orange"] .ripple{background: getDeepOrangeContrastAlpha($theme)}
515
-
516
- // brown
517
- &[color="brown"][outline]:not([outline="false"]) .ripple,
518
- &[color="brown"][basic]:not([basic="false"]) .ripple {
519
- background: getBrownAlpha($theme)
520
- }
521
- &[color="brown"][alpha]:not([alpha="false"]){
522
- background: getBrownAlpha($theme);
523
- color: getBrown($theme);
524
- }
525
- &[color="brown"][outline]:not([outline="false"]),
526
- &[color="brown"][link]:not([link="false"]),
527
- &[color="brown"][basic]:not([basic="false"]) {
528
- color: getBrown($theme)!important
529
- }
530
- &[color="brown"]{
531
- background: getBrown($theme);
532
- color: getBrownContrast($theme);
533
- }
534
- &[color="brown"] .ripple{background: getBrownContrastAlpha($theme)}
535
-
536
- // grey
537
- &[color="grey"][outline]:not([outline="false"]) .ripple,
538
- &[color="grey"][basic]:not([basic="false"]) .ripple {
539
- background: getGreyAlpha($theme)
540
- }
541
- &[color="grey"][alpha]:not([alpha="false"]){
542
- background: getGreyAlpha($theme);
543
- color: getGrey($theme);
544
- }
545
- &[color="grey"][outline]:not([outline="false"]),
546
- &[color="grey"][link]:not([link="false"]),
547
- &[color="grey"][basic]:not([basic="false"]) {
548
- color: getGrey($theme)!important
549
- }
550
- &[color="grey"]{
551
- background: getGrey($theme);
552
- color: getGreyContrast($theme);
553
- }
554
- &[color="grey"] .ripple{background: getGreyContrastAlpha($theme)}
555
-
556
- // blue-grey
557
- &[color="blue-grey"][outline]:not([outline="false"]) .ripple,
558
- &[color="blue-grey"][basic]:not([basic="false"]) .ripple {
559
- background: getBlueGreyAlpha($theme)
560
- }
561
- &[color="blue-grey"][alpha]:not([alpha="false"]){
562
- background: getBlueGreyAlpha($theme);
563
- color: getBlueGrey($theme);
564
- }
565
- &[color="blue-grey"][outline]:not([outline="false"]),
566
- &[color="blue-grey"][link]:not([link="false"]),
567
- &[color="blue-grey"][basic]:not([basic="false"]) {
568
- color: getBlueGrey($theme)!important
569
- }
570
- &[color="blue-grey"]{
571
- background: getBlueGrey($theme);
572
- color: getBlueGreyContrast($theme);
573
- }
574
- &[color="blue-grey"] .ripple{background: getBlueGreyContrastAlpha($theme)}
575
-
576
- // primary
577
- &[color="primary"][outline]:not([outline="false"]) .ripple,
578
- &[color="primary"][basic]:not([basic="false"]) .ripple {
579
- background: getPrimaryAlpha($theme)
580
- }
581
- &[color="primary"][alpha]:not([alpha="false"]){
582
- background: getPrimaryAlpha($theme);
583
- color: getPrimary($theme);
584
- }
585
- &[color="primary"][outline]:not([outline="false"]),
586
- &[color="primary"][link]:not([link="false"]),
587
- &[color="primary"][basic]:not([basic="false"]) {
588
- color: getPrimary($theme)!important
589
- }
590
- &[color="primary"]{
591
- background: getPrimary($theme);
592
- color: getPrimaryContrast($theme);
593
- }
594
- &[color="primary"] .ripple{background: getPrimaryContrastAlpha($theme)}
595
-
596
- // accent
597
- &[color="accent"][outline]:not([outline="false"]) .ripple,
598
- &[color="accent"][basic]:not([basic="false"]) .ripple {
599
- background: getAccentAlpha($theme)
600
- }
601
- &[color="accent"][alpha]:not([alpha="false"]){
602
- background: getAccentAlpha($theme);
603
- color: getAccent($theme);
604
- }
605
- &[color="accent"][outline]:not([outline="false"]),
606
- &[color="accent"][link]:not([link="false"]),
607
- &[color="accent"][basic]:not([basic="false"]) {
608
- color: getAccent($theme)!important
609
- }
610
- &[color="accent"]{
611
- background: getAccent($theme);
612
- color: getAccentContrast($theme);
613
- }
614
- &[color="accent"] .ripple{background: getAccentContrastAlpha($theme)}
615
-
616
- // warn
617
- &[color="warn"][outline]:not([outline="false"]) .ripple,
618
- &[color="warn"][basic]:not([basic="false"]) .ripple {
619
- background: getWarnAlpha($theme)
620
- }
621
- &[color="warn"][alpha]:not([alpha="false"]){
622
- background: getWarnAlpha($theme);
623
- color: getWarn($theme);
624
- }
625
- &[color="warn"][outline]:not([outline="false"]),
626
- &[color="warn"][link]:not([link="false"]),
627
- &[color="warn"][basic]:not([basic="false"]) {
628
- color: getWarn($theme)!important
629
- }
630
- &[color="warn"]{
631
- background: getWarn($theme);
632
- color: getWarnContrast($theme);
633
- }
634
- &[color="warn"] .ripple{background: getWarnContrastAlpha($theme)}
635
-
636
- // Disabled
637
- &[color="disabled"][outline]:not([outline="false"]) .ripple,
638
- &[color="disabled"][basic]:not([basic="false"]) .ripple {
639
- background: getDisabledAlpha($theme);
640
- }
641
- &[color="disabled"][alpha]:not([alpha="false"]){
642
- background: getDisabledAlpha($theme);
643
- color: getDisabled($theme);
644
- }
645
- &[color="disabled"][outline]:not([outline="false"]),
646
- &[color="disabled"][link]:not([link="false"]),
647
- &[color="disabled"][basic]:not([basic="false"]) {
648
- color: getDisabled($theme)!important
649
- }
650
- &[color="disabled"]{
651
- background: getDisabled($theme);
652
- color: getDisabledBgContrast($theme);
257
+ @each $colorName, $colorFn in $color-functions {
258
+ &[color="#{$colorName}"][outline]:not([outline="false"]) .ripple,
259
+ &[color="#{$colorName}"][basic]:not([basic="false"]) .ripple {
260
+ background: call(#{$colorFn}Alpha, $theme)
261
+ }
262
+ &[color="#{$colorName}"][alpha]:not([alpha="false"]){
263
+ background: call(#{$colorFn}Alpha, $theme);
264
+ color: call(#{$colorFn}, $theme);
265
+ }
266
+ &[color="#{$colorName}"][outline]:not([outline="false"]),
267
+ &[color="#{$colorName}"][link]:not([link="false"]),
268
+ &[color="#{$colorName}"][basic]:not([basic="false"]) {
269
+ color: call(#{$colorFn}, $theme);
270
+ }
271
+ &[color="#{$colorName}"]{
272
+ background: call(#{$colorFn}, $theme);
273
+ color: call(#{$colorFn}Contrast, $theme);
274
+ }
275
+ &[color="#{$colorName}"] .ripple{background: call(#{$colorFn}ContrastAlpha, $theme)}
276
+
277
+ &[disabled],
278
+ &[disabled]:not([disabled="false"]),
279
+ &[disabled="true"] {
280
+ &[solid],
281
+ &[solid]:not([solid="false"]),
282
+ &[solid="true"]{
283
+ @include _disabled-solid-button($theme);
284
+ }
285
+ &[outline],
286
+ &[outline]:not([outline="false"]),
287
+ &[outline="true"]{
288
+ @include _disabled-outline-button($theme);
289
+ }
290
+ &[basic],
291
+ &[basic]:not([basic="false"]),
292
+ &[basic="true"]{
293
+ @include _disabled-basic-button($theme);
294
+ }
295
+ &[alpha],
296
+ &[alpha]:not([alpha="false"]),
297
+ &[alpha="true"]{
298
+ @include _disabled-alpha-button($theme);
299
+ }
300
+ &[link],
301
+ &[link]:not([link="false"]),
302
+ &[link="true"]{
303
+ @include _disabled-link-button($theme);
304
+ }
305
+ }
653
306
  }
654
- &[color="disabled"] .ripple{background: getDisabledContrastAlpha($theme)}
655
-
656
307
  }
657
308
 
658
309
  button[matcha-button],
@@ -667,7 +318,7 @@ a[matcha-button] {
667
318
 
668
319
  &[outline]:not([outline="false"]) {
669
320
  border: 0px solid currentColor;
670
- background: transparent !important;
321
+ background: transparent;
671
322
  &:not([color]){
672
323
  border-color: getForeground($theme);
673
324
  color: getForeground($theme);
@@ -679,7 +330,7 @@ a[matcha-button] {
679
330
  }
680
331
 
681
332
  &[basic]:not([basic="false"]){
682
- background: getSurface($theme) !important;
333
+ background: getSurface($theme);
683
334
  &:not([color]){
684
335
  color: getForeground($theme);
685
336
  }
@@ -0,0 +1,243 @@
1
+ @mixin _colorize-inactive-type-basic($theme, $color-functions) {
2
+ &[inactivetype="basic"]{
3
+ @each $colorName, $colorFn in $color-functions {
4
+ &[inactivecolor="#{$colorName}"]{
5
+ .button-group matcha-tab-item{
6
+ button[matcha-button],
7
+ a[matcha-button]{
8
+ &:not([active-item="true"]){
9
+ background: getSurface($theme);
10
+ color: call(#{$colorFn}, $theme);
11
+ box-shadow: 0 0 0 0px inset;
12
+ .ripple{
13
+ background: call(#{$colorFn}Alpha, $theme);
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+ &[disabled],
21
+ &[disabled]:not([disabled="false"]),
22
+ &[disabled="true"] {
23
+ &:not([active-item="true"]){
24
+ .button-group matcha-tab-item{
25
+ button[matcha-button],
26
+ a[matcha-button]{
27
+ @include _disabled-basic-button($theme);
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ @mixin _colorize-inactive-type-outline($theme, $color-functions) {
36
+ &[inactivetype="outline"]{
37
+ //disabled false
38
+ &:not([disabled="true"]){
39
+ @each $colorName, $colorFn in $color-functions {
40
+ &[inactivecolor="#{$colorName}"]{
41
+ .button-group matcha-tab-item{
42
+ button[matcha-button],
43
+ a[matcha-button]{
44
+ //botão não ativo
45
+ &:not([active-item="true"]){
46
+ color: call(#{$colorFn}, $theme);
47
+ background: transparent;
48
+ box-shadow: 0 0 0 2px call(#{$colorFn}, $theme) inset;
49
+ .ripple{
50
+ background: call(#{$colorFn}Alpha, $theme);
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ //disabled true
59
+ &[disabled],
60
+ &[disabled]:not([disabled="false"]),
61
+ &[disabled="true"] {
62
+ > .button-group matcha-tab-item{
63
+ button[matcha-button],
64
+ a[matcha-button]{
65
+ //botão não ativo
66
+ &:not([active-item="true"]){
67
+ @include _disabled-outline-button($theme);
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ @mixin _colorize-inactive-type-alpha($theme, $color-functions) {
76
+ &[inactivetype="alpha"]{
77
+ @each $colorName, $colorFn in $color-functions {
78
+ &[inactivecolor="#{$colorName}"]{
79
+ .button-group matcha-tab-item{
80
+ button[matcha-button],
81
+ a[matcha-button]{
82
+ &:not([active-item="true"]){
83
+ color: call(#{$colorFn}, $theme);
84
+ background: call(#{$colorFn}Alpha, $theme);
85
+ box-shadow: 0 0 0 0px;
86
+ .ripple{
87
+ background: call(#{$colorFn}ContrastAlpha, $theme)
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ &[disabled],
95
+ &[disabled]:not([disabled="false"]),
96
+ &[disabled="true"] {
97
+ .button-group matcha-tab-item{
98
+ button[matcha-button],
99
+ a[matcha-button]{
100
+ //botão não ativo
101
+ &:not([active-item="true"]){
102
+ @include _disabled-alpha-button($theme);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+
110
+ @mixin _colorize-inactive-type-link($theme, $color-functions) {
111
+
112
+ &[inactivetype="link"]{
113
+ @each $colorName, $colorFn in $color-functions {
114
+ &[inactivecolor="#{$colorName}"]{
115
+ .button-group matcha-tab-item{
116
+ button[matcha-button],
117
+ a[matcha-button]{
118
+ &:not([active-item="true"]){
119
+
120
+ background: transparent;
121
+ color: call(#{$colorFn}, $theme);
122
+ box-shadow: 0 0 0 0px;
123
+ .ripple{
124
+ background: call(#{$colorFn}Alpha, $theme);
125
+ }
126
+
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ &[disabled],
133
+ &[disabled]:not([disabled="false"]),
134
+ &[disabled="true"] {
135
+ .button-group matcha-tab-item{
136
+ button[matcha-button],
137
+ a[matcha-button]{
138
+ //botão não ativo
139
+ &:not([active-item="true"]){
140
+ @include _disabled-link-button($theme);
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+
149
+
150
+
151
+ @mixin matcha-tabs($theme) {
152
+ $color-functions: (
153
+ red: getRed,
154
+ pink: getPink,
155
+ purple: getPurple,
156
+ deep-purple: getDeepPurple,
157
+ indigo: getIndigo,
158
+ blue: getBlue,
159
+ light-blue: getLightBlue,
160
+ cyan: getCyan,
161
+ teal: getTeal,
162
+ green: getGreen,
163
+ light-green: getLightGreen,
164
+ lime: getLime,
165
+ yellow: getYellow,
166
+ amber: getAmber,
167
+ orange: getOrange,
168
+ deep-orange: getDeepOrange,
169
+ brown: getBrown,
170
+ grey: getGrey,
171
+ blue-grey: getBlueGrey,
172
+ primary: getPrimary,
173
+ accent: getAccent,
174
+ warn: getWarn,
175
+ disabled: getDisabled,
176
+ );
177
+
178
+ matcha-tabs{
179
+ display: flex;
180
+ @include _colorize-inactive-type-basic($theme, $color-functions);
181
+ @include _colorize-inactive-type-outline($theme, $color-functions);
182
+ @include _colorize-inactive-type-alpha($theme, $color-functions);
183
+ @include _colorize-inactive-type-link($theme, $color-functions);
184
+
185
+ &[disabled],
186
+ &[disabled]:not([disabled="false"]),
187
+ &[disabled="true"] {
188
+ .button-group matcha-tab-item{
189
+ button[matcha-button],
190
+ a[matcha-button]{
191
+ &[active-item="true"]{
192
+ &[outline],
193
+ &[outline]:not([outline="false"]),
194
+ &[outline="true"]{
195
+ @include _disabled-outline-button($theme);
196
+ }
197
+
198
+ &[basic],
199
+ &[basic]:not([basic="false"]),
200
+ &[basic="true"]{
201
+ @include _disabled-basic-button($theme);
202
+ }
203
+
204
+ &[alpha],
205
+ &[alpha]:not([alpha="false"]),
206
+ &[alpha="true"]{
207
+ @include _disabled-alpha-button($theme);
208
+ }
209
+
210
+ &[link],
211
+ &[link]:not([link="false"]),
212
+ &[link="true"]{
213
+ @include _disabled-link-button($theme);
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
+ }
220
+ }
221
+ }
222
+
223
+ .button-group {
224
+ &.gap-0 {
225
+ gap: 0 !important;
226
+
227
+ // Ajuste border-radius quando gap = 0
228
+ matcha-tab-item:first-child button[matcha-button] {
229
+ border-top-right-radius: 0;
230
+ border-bottom-right-radius: 0;
231
+ }
232
+
233
+ matcha-tab-item:last-child button[matcha-button] {
234
+ border-top-left-radius: 0;
235
+ border-bottom-left-radius: 0;
236
+ }
237
+
238
+ matcha-tab-item:not(:first-child):not(:last-child) button[matcha-button] {
239
+ border-radius: 0;
240
+ }
241
+ }
242
+ }
243
+
package/main.scss CHANGED
@@ -23,6 +23,7 @@
23
23
  // COMPONENTS
24
24
  @import "./components/matcha-audio-player.scss"; //matcha-audio-player-theme($theme)
25
25
  @import "./components/matcha-buttons.scss"; // matcha-button-theme($theme)
26
+ @import "./components/matcha-button-toggle.scss"; // matcha-button-toggle-theme($theme)
26
27
  @import "./components/matcha-cards.scss"; // matcha-cards-theme($theme)
27
28
  @import "./components/matcha-color-pick.scss"; // matcha-color-pick-theme($theme)
28
29
  @import "./components/matcha-draggable.scss"; // matcha-draggable-theme($theme)
@@ -40,8 +41,7 @@
40
41
  @import "./components/matcha-ripple.scss"; // matcha-ripple-theme($theme)
41
42
  @import "./components/matcha-spin.scss"; // matcha-spin-theme($theme)
42
43
  @import "./components/matcha-hint-text.scss"; // matcha-hint-theme($theme)
43
- @import "./components/matcha-button-group.scss"; // matcha-button-group($theme)
44
-
44
+ @import "./components/matcha-tabs.scss"; // matcha-tabs($theme)
45
45
  // VENDORS
46
46
  @import "./vendors/angular-editor.scss";
47
47
  @import "./vendors/angular-material-fixes.scss";
@@ -132,6 +132,7 @@
132
132
 
133
133
  @include matcha-table-theme($theme);
134
134
 
135
+ @include matcha-button-toggle($theme);
135
136
  @include matcha-button-theme($theme);
136
137
  @include matcha-ripple-theme($theme);
137
138
  @include matcha-tooltip-theme($theme);
@@ -141,5 +142,5 @@
141
142
  @include matcha-checkbox($theme);
142
143
  @include matcha-spin($theme);
143
144
  @include matcha-hint-text($theme);
144
- @include matcha-button-group($theme);
145
+ @include matcha-tabs($theme);
145
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-theme",
3
- "version": "19.53.0",
3
+ "version": "19.55.0",
4
4
  "description": "Themes for matcha-design-system",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,134 +0,0 @@
1
- @mixin matcha-button-group($theme) {
2
- $color-functions: (
3
- red: getRed,
4
- pink: getPink,
5
- purple: getPurple,
6
- deep-purple: getDeepPurple,
7
- indigo: getIndigo,
8
- blue: getBlue,
9
- light-blue: getLightBlue,
10
- cyan: getCyan,
11
- teal: getTeal,
12
- green: getGreen,
13
- light-green: getLightGreen,
14
- lime: getLime,
15
- yellow: getYellow,
16
- amber: getAmber,
17
- orange: getOrange,
18
- deep-orange: getDeepOrange,
19
- brown: getBrown,
20
- grey: getGrey,
21
- blue-grey: getBlueGrey,
22
- primary: getPrimary,
23
- accent: getAccent,
24
- warn: getWarn,
25
- disabled: getDisabled,
26
- );
27
-
28
- @each $inactiveColor, $colorFn in $color-functions {
29
- matcha-button-group[inactivecolor="#{$inactiveColor}"] > .button-group > matcha-button-item,
30
- matcha-button-group[inactivetype="basic"] > .button-group > matcha-button-item {
31
- button[matcha-button] {
32
- &:not([active-item]) {
33
- &[color] {
34
- &[outline]:not([outline="false"]) .ripple,
35
- &[basic]:not([basic="false"]) .ripple {
36
- background: call(#{$colorFn}Alpha, $theme);
37
- }
38
-
39
- &[alpha]:not([alpha="false"]) {
40
- background: call(#{$colorFn}Alpha, $theme)!important;
41
- color: call($colorFn, $theme)!important;
42
- }
43
-
44
- &[outline]:not([outline="false"]),
45
- &[link]:not([link="false"]),
46
- &[basic]:not([basic="false"]) {
47
- color: call($colorFn, $theme) !important;
48
- }
49
-
50
- background: call($colorFn, $theme);
51
- color: call(#{$colorFn}Contrast, $theme);
52
-
53
- .ripple {
54
- background: call(#{$colorFn}ContrastAlpha, $theme);
55
- }
56
- }
57
- }
58
- }
59
- }
60
- }
61
-
62
- matcha-button-group {
63
- &[disabled],
64
- &[disabled]:not([disabled="false"]),
65
- &[disabled="true"] {
66
- button[matcha-button],
67
- a[matcha-button] {
68
- pointer-events: none;
69
- user-select: none;
70
-
71
- [outline]:not([outline="false"]),
72
- [link]:not([link="false"]),
73
- [basic]:not([basic="false"]) {
74
- color: getDisabled($theme);
75
- }
76
-
77
- &[outline]:not([outline="false"]),
78
- &[link]:not([link="false"]) {
79
- color: getDisabled($theme) !important;
80
- }
81
-
82
- &[basic]:not([basic="false"]) {
83
- background: getSurface($theme);
84
- color: getDisabled($theme) !important;
85
- }
86
-
87
- background: getDisabled($theme);
88
- color: getDisabledBgContrast($theme);
89
- }
90
- }
91
- }
92
- matcha-button-group[inactivetype="basic"] > .button-group > matcha-button-item {
93
- button[matcha-button] {
94
- &:not([active-item]) {
95
- background: getSurface($theme) !important;
96
- &:not([color]) {
97
- color: getForeground($theme) !important;
98
- }
99
- &[disabled] {
100
- color: getDisabledContrast($theme) !important;
101
- }
102
- &[alpha]:not([alpha="false"]) {
103
- background: transparent;
104
- }
105
- }
106
- }
107
- }
108
- //TODO: adicionar alpha
109
- //TODO: adicionar outline
110
-
111
-
112
-
113
- }
114
-
115
- .button-group {
116
- &.gap-0 {
117
- gap: 0 !important;
118
-
119
- // Ajuste border-radius quando gap = 0
120
- matcha-button-item:first-child button[matcha-button] {
121
- border-top-right-radius: 0;
122
- border-bottom-right-radius: 0;
123
- }
124
-
125
- matcha-button-item:last-child button[matcha-button] {
126
- border-top-left-radius: 0;
127
- border-bottom-left-radius: 0;
128
- }
129
-
130
- matcha-button-item:not(:first-child):not(:last-child) button[matcha-button] {
131
- border-radius: 0;
132
- }
133
- }
134
- }