components-test-pb 0.2.2 → 0.2.4
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/dist/components/Button/src/useButtonStyles.styles.js +24 -2
- package/dist/theme/defaultTheme.js +4 -0
- package/dist/theme/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/Button/src/useButtonStyles.styles.ts +22 -0
- package/src/theme/defaultTheme.ts +5 -0
- package/src/theme/types.ts +5 -0
|
@@ -56,7 +56,18 @@ const useVariationStyles = makeStyles({
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
secondary: {},
|
|
59
|
-
ghost: {
|
|
59
|
+
ghost: {
|
|
60
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
61
|
+
...shorthands.borderColor('transparent'),
|
|
62
|
+
':hover': {
|
|
63
|
+
backgroundColor: tokens.colorTransparentBackgroundHover,
|
|
64
|
+
...shorthands.borderColor('transparent')
|
|
65
|
+
},
|
|
66
|
+
':hover:active,:active:focus-visible': {
|
|
67
|
+
backgroundColor: tokens.colorTransparentBackgroundPressed,
|
|
68
|
+
...shorthands.borderColor('transparent')
|
|
69
|
+
}
|
|
70
|
+
},
|
|
60
71
|
square: { borderRadius: 0 },
|
|
61
72
|
rounded: {},
|
|
62
73
|
circular: { borderRadius: '9999px' },
|
|
@@ -106,7 +117,18 @@ const useDisabledStyles = makeStyles({
|
|
|
106
117
|
}
|
|
107
118
|
},
|
|
108
119
|
secondary: {},
|
|
109
|
-
ghost: {
|
|
120
|
+
ghost: {
|
|
121
|
+
backgroundColor: 'transparent',
|
|
122
|
+
...shorthands.borderColor('transparent'),
|
|
123
|
+
':hover': {
|
|
124
|
+
backgroundColor: 'transparent',
|
|
125
|
+
...shorthands.borderColor('transparent')
|
|
126
|
+
},
|
|
127
|
+
':hover:active,:active:focus-visible': {
|
|
128
|
+
backgroundColor: 'transparent',
|
|
129
|
+
...shorthands.borderColor('transparent')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
110
132
|
});
|
|
111
133
|
export const useButtonStyles = (state) => {
|
|
112
134
|
const resetStyles = useResetStyles();
|
|
@@ -32,6 +32,10 @@ export const defaultTheme = {
|
|
|
32
32
|
colorNeutralStroke1Pressed: '#b3b3b3',
|
|
33
33
|
colorNeutralStroke2: '#e0e0e0',
|
|
34
34
|
colorNeutralStrokeDisabled: '#e0e0e0',
|
|
35
|
+
// Colors — Transparent
|
|
36
|
+
colorTransparentBackground: 'transparent',
|
|
37
|
+
colorTransparentBackgroundHover: 'transparent',
|
|
38
|
+
colorTransparentBackgroundPressed: 'transparent',
|
|
35
39
|
// Colors — Subtle
|
|
36
40
|
colorSubtleBackground: 'transparent',
|
|
37
41
|
colorSubtleBackgroundHover: '#f5f5f5',
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export interface Theme {
|
|
|
28
28
|
colorNeutralStroke1Pressed: string;
|
|
29
29
|
colorNeutralStroke2: string;
|
|
30
30
|
colorNeutralStrokeDisabled: string;
|
|
31
|
+
colorTransparentBackground: string;
|
|
32
|
+
colorTransparentBackgroundHover: string;
|
|
33
|
+
colorTransparentBackgroundPressed: string;
|
|
31
34
|
colorSubtleBackground: string;
|
|
32
35
|
colorSubtleBackgroundHover: string;
|
|
33
36
|
colorSubtleBackgroundPressed: string;
|
package/package.json
CHANGED
|
@@ -74,7 +74,18 @@ const useVariationStyles = makeStyles({
|
|
|
74
74
|
},
|
|
75
75
|
secondary: {},
|
|
76
76
|
ghost: {
|
|
77
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
78
|
+
...shorthands.borderColor('transparent'),
|
|
79
|
+
|
|
80
|
+
':hover': {
|
|
81
|
+
backgroundColor: tokens.colorTransparentBackgroundHover,
|
|
82
|
+
...shorthands.borderColor('transparent')
|
|
83
|
+
},
|
|
77
84
|
|
|
85
|
+
':hover:active,:active:focus-visible': {
|
|
86
|
+
backgroundColor: tokens.colorTransparentBackgroundPressed,
|
|
87
|
+
...shorthands.borderColor('transparent')
|
|
88
|
+
}
|
|
78
89
|
},
|
|
79
90
|
|
|
80
91
|
square: { borderRadius: 0 },
|
|
@@ -137,7 +148,18 @@ const useDisabledStyles = makeStyles({
|
|
|
137
148
|
},
|
|
138
149
|
secondary: {},
|
|
139
150
|
ghost: {
|
|
151
|
+
backgroundColor: 'transparent',
|
|
152
|
+
...shorthands.borderColor('transparent'),
|
|
153
|
+
|
|
154
|
+
':hover': {
|
|
155
|
+
backgroundColor: 'transparent',
|
|
156
|
+
...shorthands.borderColor('transparent')
|
|
157
|
+
},
|
|
140
158
|
|
|
159
|
+
':hover:active,:active:focus-visible': {
|
|
160
|
+
backgroundColor: 'transparent',
|
|
161
|
+
...shorthands.borderColor('transparent')
|
|
162
|
+
}
|
|
141
163
|
}
|
|
142
164
|
});
|
|
143
165
|
|
|
@@ -38,6 +38,11 @@ export const defaultTheme: Theme = {
|
|
|
38
38
|
colorNeutralStroke2: '#e0e0e0',
|
|
39
39
|
colorNeutralStrokeDisabled: '#e0e0e0',
|
|
40
40
|
|
|
41
|
+
// Colors — Transparent
|
|
42
|
+
colorTransparentBackground: 'transparent',
|
|
43
|
+
colorTransparentBackgroundHover: 'transparent',
|
|
44
|
+
colorTransparentBackgroundPressed: 'transparent',
|
|
45
|
+
|
|
41
46
|
// Colors — Subtle
|
|
42
47
|
colorSubtleBackground: 'transparent',
|
|
43
48
|
colorSubtleBackgroundHover: '#f5f5f5',
|
package/src/theme/types.ts
CHANGED
|
@@ -36,6 +36,11 @@ export interface Theme {
|
|
|
36
36
|
colorNeutralStroke2: string;
|
|
37
37
|
colorNeutralStrokeDisabled: string;
|
|
38
38
|
|
|
39
|
+
// Colors — Transparent
|
|
40
|
+
colorTransparentBackground: string;
|
|
41
|
+
colorTransparentBackgroundHover: string;
|
|
42
|
+
colorTransparentBackgroundPressed: string;
|
|
43
|
+
|
|
39
44
|
// Colors — Subtle
|
|
40
45
|
colorSubtleBackground: string;
|
|
41
46
|
colorSubtleBackgroundHover: string;
|