@universal-tennis/ui-shared 0.0.23 → 0.0.25
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.js +1 -0
- package/dist/components.js.map +1 -1
- package/dist/stories/assets/css/typography.css +26 -0
- package/dist/stories/assets/css/variables.css +10 -0
- package/dist/stories/atoms/Button/Button.js +12 -13
- package/dist/stories/atoms/Button/Button.js.map +1 -1
- package/dist/stories/atoms/Typography/Typography.d.ts +1 -0
- package/dist/stories/atoms/Typography/Typography.js +4 -3
- package/dist/stories/atoms/Typography/Typography.js.map +1 -1
- package/dist/stories/molecules/Cards/ContactCard.d.ts +2 -2
- package/dist/stories/molecules/Cards/ContactCard.js +2 -2
- package/dist/stories/molecules/Cards/ContactCard.js.map +1 -1
- package/dist/stories/molecules/Cards/shared.js +1 -2
- package/dist/stories/molecules/Cards/shared.js.map +1 -1
- package/package.json +1 -1
- package/src/components.jsx +2 -0
- package/src/stories/assets/css/typography.css +26 -0
- package/src/stories/assets/css/variables.css +10 -0
- package/src/stories/atoms/Button/Button.tsx +12 -13
- package/src/stories/atoms/Typography/Typography.tsx +4 -3
- package/src/stories/molecules/Cards/ContactCard.tsx +3 -3
- package/src/stories/molecules/Cards/shared.tsx +1 -2
- package/dist/stories/theme/colors.d.ts +0 -10
- package/dist/stories/theme/colors.js +0 -11
- package/dist/stories/theme/colors.js.map +0 -1
- package/src/stories/theme/colors.ts +0 -10
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, {ReactElement} from 'react';
|
|
2
2
|
import MuiButton from '@mui/material/Button';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
-
import {colors} from '../../theme/colors';
|
|
5
4
|
|
|
6
5
|
type ButtonProps = {
|
|
7
6
|
children: string | ReactElement;
|
|
@@ -29,37 +28,37 @@ const StyledButton = styled(MuiButton)({
|
|
|
29
28
|
});
|
|
30
29
|
|
|
31
30
|
const PrimaryButton = styled(StyledButton)((props: StyledButtonProps) => ({
|
|
32
|
-
backgroundColor:
|
|
33
|
-
color:
|
|
31
|
+
backgroundColor: 'var(--black)',
|
|
32
|
+
color: 'var(--white)',
|
|
34
33
|
width: props.isExpanded ? '100%' : 'inherit',
|
|
35
34
|
|
|
36
35
|
'&:hover': {
|
|
37
|
-
backgroundColor:
|
|
38
|
-
borderColor:
|
|
36
|
+
backgroundColor: 'var(--darkest-grey)',
|
|
37
|
+
borderColor: 'var(--darkest-grey)',
|
|
39
38
|
},
|
|
40
39
|
'&:disabled': {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
borderColor:
|
|
40
|
+
backgroundColor: 'var(--light-grey)',
|
|
41
|
+
borderColor: 'var(--light-grey)',
|
|
43
42
|
},
|
|
44
43
|
}));
|
|
45
44
|
|
|
46
45
|
const SecondaryButton = styled(StyledButton)({
|
|
47
|
-
borderColor:
|
|
46
|
+
borderColor: 'var(--black)',
|
|
48
47
|
backgroundColor: 'transparent',
|
|
49
|
-
color:
|
|
48
|
+
color: 'var(--black)',
|
|
50
49
|
|
|
51
50
|
'&:hover': {
|
|
52
|
-
borderColor:
|
|
51
|
+
borderColor: 'var(--darkest-grey)',
|
|
53
52
|
},
|
|
54
53
|
'&:disabled': {
|
|
55
|
-
borderColor:
|
|
54
|
+
borderColor: 'var(--disabled)'
|
|
56
55
|
},
|
|
57
56
|
});
|
|
58
57
|
|
|
59
58
|
const LinkButton = styled(MuiButton)({
|
|
60
59
|
borderColor: 'transparent',
|
|
61
60
|
backgroundColor: 'transparent',
|
|
62
|
-
color:
|
|
61
|
+
color: 'var(--primary)',
|
|
63
62
|
textTransform: 'inherit',
|
|
64
63
|
justifyContent: 'left',
|
|
65
64
|
padding: 0,
|
|
@@ -69,7 +68,7 @@ const LinkButton = styled(MuiButton)({
|
|
|
69
68
|
},
|
|
70
69
|
|
|
71
70
|
'&:disabled': {
|
|
72
|
-
borderColor:
|
|
71
|
+
borderColor: 'var(--disabled)'
|
|
73
72
|
},
|
|
74
73
|
});
|
|
75
74
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, {ReactElement} from 'react';
|
|
2
2
|
import MuiTypography from '@mui/material/Typography';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
+
import "../../assets/css/typography.css";
|
|
4
5
|
|
|
5
6
|
type TypographyProps = {
|
|
6
7
|
children: string | ReactElement;
|
|
@@ -52,19 +53,19 @@ const SECONDARY_SIZES = {
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
const DisplayTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
|
|
55
|
-
fontFamily:
|
|
56
|
+
fontFamily: 'var(--display-font)',
|
|
56
57
|
fontSize: DISPLAY_SIZES[props.size as keyof typeof DISPLAY_SIZES],
|
|
57
58
|
fontWeight: props.weight
|
|
58
59
|
}));
|
|
59
60
|
|
|
60
61
|
const PrimaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
|
|
61
|
-
fontFamily:
|
|
62
|
+
fontFamily: 'var(--primary-font)',
|
|
62
63
|
fontSize: PRIMARY_SIZES[props.size as keyof typeof PRIMARY_SIZES],
|
|
63
64
|
fontWeight: props.weight
|
|
64
65
|
}));
|
|
65
66
|
|
|
66
67
|
const SecondaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
|
|
67
|
-
fontFamily:
|
|
68
|
+
fontFamily: 'var(--secondary-font)',
|
|
68
69
|
fontSize: SECONDARY_SIZES[props.size as keyof typeof SECONDARY_SIZES],
|
|
69
70
|
textTransform: props.isCap ? 'uppercase' : 'inherit',
|
|
70
71
|
fontWeight: props.weight
|
|
@@ -13,11 +13,11 @@ type ContactCardProps = {
|
|
|
13
13
|
name: string;
|
|
14
14
|
phone: string;
|
|
15
15
|
email: string;
|
|
16
|
-
|
|
16
|
+
onMessageClick?: VoidFunction;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default function ContactCard({
|
|
20
|
-
name, phone, email,
|
|
20
|
+
name, phone, email, onMessageClick, ...props
|
|
21
21
|
}: ContactCardProps) {
|
|
22
22
|
const firstName = name.split(" ")[0];
|
|
23
23
|
const parsedNumber = parsePhoneNumber(phone || '');
|
|
@@ -40,7 +40,7 @@ export default function ContactCard({
|
|
|
40
40
|
<Typography category="secondary" size="x-small-book">{email}</Typography>
|
|
41
41
|
</Link>
|
|
42
42
|
)}
|
|
43
|
-
<Button onClick={
|
|
43
|
+
<Button onClick={onMessageClick} category="link" style={{marginTop: '8px'}}>
|
|
44
44
|
<>
|
|
45
45
|
<img src={ChatIcon} alt="message" style={{width: '20px'}} />
|
|
46
46
|
<Typography style={{paddingLeft: '8px'}} category="secondary" size="x-small-book">
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { colors } from 'stories/theme/colors';
|
|
4
3
|
|
|
5
4
|
export const StyledCard = styled(Box)({
|
|
6
5
|
display: 'flex',
|
|
7
6
|
flexDirection: 'column',
|
|
8
7
|
borderRadius: '4px',
|
|
9
8
|
padding: '16px',
|
|
10
|
-
border: `1px solid
|
|
9
|
+
border: `1px solid var(--cool-grey-300)`,
|
|
11
10
|
|
|
12
11
|
'&:hover': {
|
|
13
12
|
cursor: 'pointer'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/stories/theme/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;CACvB,CAAC"}
|