matcha-theme 19.51.0 → 19.52.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.
@@ -1,8 +1,68 @@
1
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
+
2
62
  matcha-button-group {
3
63
  &[disabled],
4
- &[disabled]:not([disabled="false"]) ,
5
- &[disabled="true"]{
64
+ &[disabled]:not([disabled="false"]),
65
+ &[disabled="true"] {
6
66
  button[matcha-button],
7
67
  a[matcha-button] {
8
68
  pointer-events: none;
@@ -13,16 +73,13 @@
13
73
  [basic]:not([basic="false"]) {
14
74
  color: getDisabled($theme);
15
75
  }
16
- }
17
-
18
-
19
- button[matcha-button],
20
- a[matcha-button] {
76
+
21
77
  &[outline]:not([outline="false"]),
22
- &[link]:not([link="false"]){
78
+ &[link]:not([link="false"]) {
23
79
  color: getDisabled($theme) !important;
24
80
  }
25
- &[basic]:not([basic="false"]){
81
+
82
+ &[basic]:not([basic="false"]) {
26
83
  background: getSurface($theme);
27
84
  color: getDisabled($theme) !important;
28
85
  }
@@ -30,12 +87,31 @@
30
87
  background: getDisabled($theme);
31
88
  color: getDisabledBgContrast($theme);
32
89
  }
33
-
34
-
35
90
  }
36
-
37
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
+
38
113
  }
114
+
39
115
  .button-group {
40
116
  &.gap-0 {
41
117
  gap: 0 !important;
@@ -679,7 +679,7 @@ a[matcha-button] {
679
679
  }
680
680
 
681
681
  &[basic]:not([basic="false"]){
682
- background: getSurface($theme);
682
+ background: getSurface($theme) !important;
683
683
  &:not([color]){
684
684
  color: getForeground($theme);
685
685
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-theme",
3
- "version": "19.51.0",
3
+ "version": "19.52.0",
4
4
  "description": "Themes for matcha-design-system",
5
5
  "main": "main.scss",
6
6
  "scripts": {