@universal-tennis/ui-shared 0.1.58 → 0.1.59

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.
@@ -9,32 +9,32 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React from 'react';
13
- import Box from '@mui/material/Box';
14
- import { styled } from '@mui/material/styles';
15
- import WinnerIndicatorIcon from 'stories/atoms/Icons/WinnerIndicatorIcon';
16
- import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from 'stories/utils/constants';
17
- import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from '../../atoms/Typography/Typography';
18
- import SquareAvatarWithName from '../SquareAvatarWithName/SquareAvatarWithName';
12
+ import React from "react";
13
+ import Box from "@mui/material/Box";
14
+ import { styled } from "@mui/material/styles";
15
+ import WinnerIndicatorIcon from "stories/atoms/Icons/WinnerIndicatorIcon";
16
+ import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
17
+ import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from "../../atoms/Typography/Typography";
18
+ import SquareAvatarWithName from "../SquareAvatarWithName/SquareAvatarWithName";
19
19
  const StyledCard = styled(Box)({
20
- display: 'flex',
21
- flexDirection: 'column',
22
- borderRadius: '4px',
23
- padding: '16px 24px',
24
- width: '100%',
25
- height: '100px',
26
- backgroundColor: 'var(--white)',
27
- border: '1px solid var(--cool-grey-600)',
20
+ display: "flex",
21
+ flexDirection: "column",
22
+ borderRadius: "4px",
23
+ padding: "16px 24px",
24
+ width: "100%",
25
+ height: "100px",
26
+ backgroundColor: "var(--white)",
27
+ border: "1px solid var(--cool-grey-600)",
28
28
  marginLeft: `${teamDrawCardSideMargin}`,
29
29
  marginRight: `${teamDrawCardSideMargin}`,
30
- position: 'relative',
30
+ position: "relative",
31
31
  marginBottom: `${teamDrawCardBottomMargin}`
32
32
  });
33
33
  const BottomGrid = styled(Box)({
34
- display: 'flex',
35
- alignItems: 'center',
36
- justifyContent: 'space-between',
37
- paddingTop: '8px',
34
+ display: "flex",
35
+ alignItems: "center",
36
+ justifyContent: "space-between",
37
+ paddingTop: "8px"
38
38
  });
39
39
  export default function TeamDrawCard(_a) {
40
40
  var { dateLabel, locationLabel, timeLabel, matchInfo, isPosition1Winner, isPosition2Winner, isScorelessMatch, position1Team, position2Team } = _a, props = __rest(_a, ["dateLabel", "locationLabel", "timeLabel", "matchInfo", "isPosition1Winner", "isPosition2Winner", "isScorelessMatch", "position1Team", "position2Team"]);
@@ -44,53 +44,53 @@ export default function TeamDrawCard(_a) {
44
44
  React.createElement(Box, { display: "flex", justifyContent: "space-between", mb: 0.5 },
45
45
  isPosition1Winner && React.createElement(WinnerIndicatorIcon, { isBlack: true, sx: { position: "absolute", left: 0, top: 20 } }),
46
46
  React.createElement(Box, { display: "flex", alignItems: "center", gap: 0.5 },
47
- React.createElement(SquareAvatarWithName, { name: position1Team === null || position1Team === void 0 ? void 0 : position1Team.name, fontSize: isPosition1Winner ? MediumMedium : MediumBook, href: position1Team.href, isBye: !(position1Team === null || position1Team === void 0 ? void 0 : position1Team.name) }),
47
+ React.createElement(SquareAvatarWithName, { name: position1Team === null || position1Team === void 0 ? void 0 : position1Team.name, fontSize: isPosition1Winner ? MediumMedium : MediumBook, href: position1Team === null || position1Team === void 0 ? void 0 : position1Team.href, isBye: !(position1Team === null || position1Team === void 0 ? void 0 : position1Team.name) }),
48
48
  React.createElement(Typography, { category: SECONDARY, size: XSmallBook, color: "var(--cool-grey-600)" },
49
49
  "(", position1Team === null || position1Team === void 0 ? void 0 :
50
50
  position1Team.record,
51
51
  ")")),
52
- React.createElement(Typography, { category: SECONDARY, size: isPosition1Winner ? MediumMedium : MediumBook }, isScorelessMatch ? '-' : position1Team === null || position1Team === void 0 ? void 0 : position1Team.points)),
52
+ React.createElement(Typography, { category: SECONDARY, size: isPosition1Winner ? MediumMedium : MediumBook }, isScorelessMatch ? "-" : position1Team === null || position1Team === void 0 ? void 0 : position1Team.points)),
53
53
  React.createElement(Box, { display: "flex", justifyContent: "space-between" },
54
54
  isPosition2Winner && React.createElement(WinnerIndicatorIcon, { isBlack: true, sx: { position: "absolute", left: 0, top: 50 } }),
55
55
  React.createElement(Box, { display: "flex", alignItems: "center", gap: 0.5 },
56
- React.createElement(SquareAvatarWithName, { name: position2Team === null || position2Team === void 0 ? void 0 : position2Team.name, fontSize: isPosition2Winner ? MediumMedium : MediumBook, href: position2Team.href, isBye: !(position2Team === null || position2Team === void 0 ? void 0 : position2Team.name) }),
56
+ React.createElement(SquareAvatarWithName, { name: position2Team === null || position2Team === void 0 ? void 0 : position2Team.name, fontSize: isPosition2Winner ? MediumMedium : MediumBook, href: position2Team === null || position2Team === void 0 ? void 0 : position2Team.href, isBye: !(position2Team === null || position2Team === void 0 ? void 0 : position2Team.name) }),
57
57
  React.createElement(Typography, { category: SECONDARY, size: XSmallBook, color: "var(--cool-grey-600)" },
58
58
  "(", position2Team === null || position2Team === void 0 ? void 0 :
59
59
  position2Team.record,
60
60
  ")")),
61
- React.createElement(Typography, { category: SECONDARY, size: isPosition2Winner ? MediumMedium : MediumBook }, isScorelessMatch ? '-' : position2Team === null || position2Team === void 0 ? void 0 : position2Team.points)),
61
+ React.createElement(Typography, { category: SECONDARY, size: isPosition2Winner ? MediumMedium : MediumBook }, isScorelessMatch ? "-" : position2Team === null || position2Team === void 0 ? void 0 : position2Team.points)),
62
62
  React.createElement(BottomGrid, null,
63
63
  React.createElement(Box, null,
64
64
  React.createElement(Box, { display: "flex" },
65
65
  React.createElement(Typography, { style: {
66
- overflow: 'hidden',
67
- textOverflow: 'ellipsis',
68
- display: '-webkit-box',
69
- WebkitBoxOrient: 'vertical',
70
- WebkitLineClamp: 1,
66
+ overflow: "hidden",
67
+ textOverflow: "ellipsis",
68
+ display: "-webkit-box",
69
+ WebkitBoxOrient: "vertical",
70
+ WebkitLineClamp: 1
71
71
  }, category: SECONDARY, size: XSmallBook }, dateLabel),
72
72
  React.createElement(Typography, { category: SECONDARY, size: XSmallBook, pl: 0.5, pr: 0.5 }, "\u2022"),
73
73
  React.createElement(Typography, { style: {
74
- overflow: 'hidden',
75
- textOverflow: 'ellipsis',
76
- display: '-webkit-box',
77
- WebkitBoxOrient: 'vertical',
78
- WebkitLineClamp: 1,
74
+ overflow: "hidden",
75
+ textOverflow: "ellipsis",
76
+ display: "-webkit-box",
77
+ WebkitBoxOrient: "vertical",
78
+ WebkitLineClamp: 1
79
79
  }, category: SECONDARY, size: XSmallBook }, timeLabel),
80
80
  React.createElement(Typography, { category: SECONDARY, size: XSmallBook, pl: 0.5, pr: 0.5 }, "\u2022"),
81
81
  React.createElement(Typography, { style: {
82
- overflow: 'hidden',
83
- textOverflow: 'ellipsis',
84
- display: '-webkit-box',
85
- WebkitBoxOrient: 'vertical',
86
- WebkitLineClamp: 1,
82
+ overflow: "hidden",
83
+ textOverflow: "ellipsis",
84
+ display: "-webkit-box",
85
+ WebkitBoxOrient: "vertical",
86
+ WebkitLineClamp: 1
87
87
  }, category: SECONDARY, size: XSmallBook }, matchInfo)),
88
88
  React.createElement(Typography, { style: {
89
- overflow: 'hidden',
90
- textOverflow: 'ellipsis',
91
- display: '-webkit-box',
92
- WebkitBoxOrient: 'vertical',
93
- WebkitLineClamp: 1,
89
+ overflow: "hidden",
90
+ textOverflow: "ellipsis",
91
+ display: "-webkit-box",
92
+ WebkitBoxOrient: "vertical",
93
+ WebkitLineClamp: 1
94
94
  }, category: SECONDARY, size: XSmallBook }, locationLabel)))));
95
95
  }
96
96
  //# sourceMappingURL=TeamDrawCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeamDrawCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/TeamDrawCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAA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AC;yBACnB,EACD,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,SAAS,CACD;oBACb,oBAAC,UAAU,IAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,aAEtD;oBACb,oBAAC,UAAU,IACP,KAAK,EAAE;4BACL,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,UAAU;4BACxB,OAAO,EAAE,aAAa;4BACtB,eAAe,EAAE,UAAU;4BAC3B,eAAe,EAAE,CAAC;yBACnB,EACD,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,SAAS,CACD,CACX;gBACN,oBAAC,UAAU,IACP,KAAK,EAAE;wBACL,QAAQ,EAAE,QAAQ;wBAClB,YAAY,EAAE,UAAU;wBACxB,OAAO,EAAE,aAAa;wBACtB,eAAe,EAAE,UAAU;wBAC3B,eAAe,EAAE,CAAC;qBACnB,EACD,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,aAAa,CACL,CACX,CACG,CACJ,CAChB,CAAC;AACJ,CAAC"}
@@ -1,9 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledCard: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
- children?: import("react").ReactNode;
4
- component?: import("react").ElementType<any> | undefined;
5
- ref?: import("react").Ref<unknown> | undefined;
6
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
7
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
2
+ export declare const StyledCard: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
8
3
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
9
- }, "ref" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "component" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-tennis/ui-shared",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "main": "dist/items.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://universaltennis.com",
@@ -8,7 +8,7 @@
8
8
  "@emotion/react": "^11.10.5",
9
9
  "@emotion/styled": "^11.10.5",
10
10
  "@mui/icons-material": "^5.11.0",
11
- "@mui/material": "5.5.3",
11
+ "@mui/material": "5.14.17",
12
12
  "copyfiles": "^2.4.1",
13
13
  "cross-env": "^7.0.3",
14
14
  "libphonenumber-js": "^1.10.18",
@@ -1,38 +1,45 @@
1
- import React from 'react';
2
- import Box from '@mui/material/Box';
3
- import { styled } from '@mui/material/styles';
4
- import WinnerIndicatorIcon from 'stories/atoms/Icons/WinnerIndicatorIcon';
5
- import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from 'stories/utils/constants';
6
- import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from '../../atoms/Typography/Typography';
7
- import SquareAvatarWithName from '../SquareAvatarWithName/SquareAvatarWithName';
1
+ import React from "react";
2
+ import Box from "@mui/material/Box";
3
+ import { styled } from "@mui/material/styles";
4
+ import WinnerIndicatorIcon from "stories/atoms/Icons/WinnerIndicatorIcon";
5
+ import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
6
+ import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from "../../atoms/Typography/Typography";
7
+ import SquareAvatarWithName from "../SquareAvatarWithName/SquareAvatarWithName";
8
8
  import { TeamDrawCardProps } from "./sharedTypes";
9
9
 
10
10
  const StyledCard = styled(Box)({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- borderRadius: '4px',
14
- padding: '16px 24px',
15
- width: '100%',
16
- height: '100px',
17
- backgroundColor: 'var(--white)',
18
- border: '1px solid var(--cool-grey-600)',
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ borderRadius: "4px",
14
+ padding: "16px 24px",
15
+ width: "100%",
16
+ height: "100px",
17
+ backgroundColor: "var(--white)",
18
+ border: "1px solid var(--cool-grey-600)",
19
19
  marginLeft: `${teamDrawCardSideMargin}`,
20
20
  marginRight: `${teamDrawCardSideMargin}`,
21
- position: 'relative',
21
+ position: "relative",
22
22
  marginBottom: `${teamDrawCardBottomMargin}`
23
23
  });
24
24
 
25
25
  const BottomGrid = styled(Box)({
26
- display: 'flex',
27
- alignItems: 'center',
28
- justifyContent: 'space-between',
29
- paddingTop: '8px',
26
+ display: "flex",
27
+ alignItems: "center",
28
+ justifyContent: "space-between",
29
+ paddingTop: "8px"
30
30
  });
31
31
 
32
- export default function TeamDrawCard({
33
- dateLabel, locationLabel, timeLabel, matchInfo,
34
- isPosition1Winner, isPosition2Winner,
35
- isScorelessMatch, position1Team, position2Team, ...props
32
+ export default function TeamDrawCard({
33
+ dateLabel,
34
+ locationLabel,
35
+ timeLabel,
36
+ matchInfo,
37
+ isPosition1Winner,
38
+ isPosition2Winner,
39
+ isScorelessMatch,
40
+ position1Team,
41
+ position2Team,
42
+ ...props
36
43
  }: TeamDrawCardProps) {
37
44
  const { MediumMedium, MediumBook, XSmallBook } = SECONDARY_SIZES_ENUM;
38
45
  const { SECONDARY } = CATEGORY_ENUM;
@@ -42,10 +49,10 @@ export default function TeamDrawCard({
42
49
  <Box display="flex" justifyContent="space-between" mb={0.5}>
43
50
  {isPosition1Winner && <WinnerIndicatorIcon isBlack sx={{ position: "absolute", left: 0, top: 20 }} />}
44
51
  <Box display="flex" alignItems="center" gap={0.5}>
45
- <SquareAvatarWithName
46
- name={position1Team?.name}
47
- fontSize={isPosition1Winner ? MediumMedium : MediumBook}
48
- href={position1Team.href}
52
+ <SquareAvatarWithName
53
+ name={position1Team?.name}
54
+ fontSize={isPosition1Winner ? MediumMedium : MediumBook}
55
+ href={position1Team?.href}
49
56
  isBye={!position1Team?.name}
50
57
  />
51
58
  <Typography category={SECONDARY} size={XSmallBook} color="var(--cool-grey-600)">
@@ -55,16 +62,16 @@ export default function TeamDrawCard({
55
62
  </Typography>
56
63
  </Box>
57
64
  <Typography category={SECONDARY} size={isPosition1Winner ? MediumMedium : MediumBook}>
58
- {isScorelessMatch ? '-' : position1Team?.points}
65
+ {isScorelessMatch ? "-" : position1Team?.points}
59
66
  </Typography>
60
67
  </Box>
61
68
  <Box display="flex" justifyContent="space-between">
62
69
  {isPosition2Winner && <WinnerIndicatorIcon isBlack sx={{ position: "absolute", left: 0, top: 50 }} />}
63
70
  <Box display="flex" alignItems="center" gap={0.5}>
64
- <SquareAvatarWithName
65
- name={position2Team?.name}
66
- fontSize={isPosition2Winner ? MediumMedium : MediumBook}
67
- href={position2Team.href}
71
+ <SquareAvatarWithName
72
+ name={position2Team?.name}
73
+ fontSize={isPosition2Winner ? MediumMedium : MediumBook}
74
+ href={position2Team?.href}
68
75
  isBye={!position2Team?.name}
69
76
  />
70
77
  <Typography category={SECONDARY} size={XSmallBook} color="var(--cool-grey-600)">
@@ -74,61 +81,51 @@ export default function TeamDrawCard({
74
81
  </Typography>
75
82
  </Box>
76
83
  <Typography category={SECONDARY} size={isPosition2Winner ? MediumMedium : MediumBook}>
77
- {isScorelessMatch ? '-' : position2Team?.points}
84
+ {isScorelessMatch ? "-" : position2Team?.points}
78
85
  </Typography>
79
86
  </Box>
80
- <BottomGrid>
87
+ <BottomGrid>
81
88
  <Box>
82
89
  <Box display="flex">
83
- <Typography
90
+ <Typography
84
91
  style={{
85
- overflow: 'hidden',
86
- textOverflow: 'ellipsis',
87
- display: '-webkit-box',
88
- WebkitBoxOrient: 'vertical',
89
- WebkitLineClamp: 1,
92
+ overflow: "hidden",
93
+ textOverflow: "ellipsis",
94
+ display: "-webkit-box",
95
+ WebkitBoxOrient: "vertical",
96
+ WebkitLineClamp: 1
90
97
  }}
91
98
  category={SECONDARY}
92
99
  size={XSmallBook}
93
100
  >
94
101
  {dateLabel}
95
102
  </Typography>
96
- <Typography
97
- category={SECONDARY}
98
- size={XSmallBook}
99
- pl={0.5}
100
- pr={0.5}
101
- >
103
+ <Typography category={SECONDARY} size={XSmallBook} pl={0.5} pr={0.5}>
102
104
  &bull;
103
105
  </Typography>
104
106
  <Typography
105
107
  style={{
106
- overflow: 'hidden',
107
- textOverflow: 'ellipsis',
108
- display: '-webkit-box',
109
- WebkitBoxOrient: 'vertical',
110
- WebkitLineClamp: 1,
108
+ overflow: "hidden",
109
+ textOverflow: "ellipsis",
110
+ display: "-webkit-box",
111
+ WebkitBoxOrient: "vertical",
112
+ WebkitLineClamp: 1
111
113
  }}
112
114
  category={SECONDARY}
113
115
  size={XSmallBook}
114
116
  >
115
117
  {timeLabel}
116
118
  </Typography>
117
- <Typography
118
- category={SECONDARY}
119
- size={XSmallBook}
120
- pl={0.5}
121
- pr={0.5}
122
- >
119
+ <Typography category={SECONDARY} size={XSmallBook} pl={0.5} pr={0.5}>
123
120
  &bull;
124
121
  </Typography>
125
122
  <Typography
126
123
  style={{
127
- overflow: 'hidden',
128
- textOverflow: 'ellipsis',
129
- display: '-webkit-box',
130
- WebkitBoxOrient: 'vertical',
131
- WebkitLineClamp: 1,
124
+ overflow: "hidden",
125
+ textOverflow: "ellipsis",
126
+ display: "-webkit-box",
127
+ WebkitBoxOrient: "vertical",
128
+ WebkitLineClamp: 1
132
129
  }}
133
130
  category={SECONDARY}
134
131
  size={XSmallBook}
@@ -138,11 +135,11 @@ export default function TeamDrawCard({
138
135
  </Box>
139
136
  <Typography
140
137
  style={{
141
- overflow: 'hidden',
142
- textOverflow: 'ellipsis',
143
- display: '-webkit-box',
144
- WebkitBoxOrient: 'vertical',
145
- WebkitLineClamp: 1,
138
+ overflow: "hidden",
139
+ textOverflow: "ellipsis",
140
+ display: "-webkit-box",
141
+ WebkitBoxOrient: "vertical",
142
+ WebkitLineClamp: 1
146
143
  }}
147
144
  category={SECONDARY}
148
145
  size={XSmallBook}