@universal-tennis/ui-shared 0.1.57 → 0.1.58
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.d.ts +3 -0
- package/dist/components.js +3 -0
- package/dist/components.js.map +1 -1
- package/dist/stories/atoms/Icons/Icons.stories.d.ts +1 -0
- package/dist/stories/atoms/Icons/Icons.stories.js +8 -0
- package/dist/stories/atoms/Icons/Icons.stories.js.map +1 -1
- package/dist/stories/atoms/Icons/WinnerIndicatorIcon.d.ts +3 -0
- package/dist/stories/atoms/Icons/WinnerIndicatorIcon.js +32 -0
- package/dist/stories/atoms/Icons/WinnerIndicatorIcon.js.map +1 -0
- package/dist/stories/atoms/Icons/sharedTypes.d.ts +5 -0
- package/dist/stories/molecules/Cards/TeamDrawCard.d.ts +3 -0
- package/dist/stories/molecules/Cards/TeamDrawCard.js +96 -0
- package/dist/stories/molecules/Cards/TeamDrawCard.js.map +1 -0
- package/dist/stories/molecules/Cards/shared.d.ts +7 -2
- package/dist/stories/molecules/Cards/sharedTypes.d.ts +13 -0
- package/dist/stories/organisms/Tables/Tables.stories.d.ts +2 -0
- package/dist/stories/organisms/Tables/Tables.stories.js +32 -1
- package/dist/stories/organisms/Tables/Tables.stories.js.map +1 -1
- package/dist/stories/organisms/Tables/TeamDrawCardTable.d.ts +3 -0
- package/dist/stories/organisms/Tables/TeamDrawCardTable.js +126 -0
- package/dist/stories/organisms/Tables/TeamDrawCardTable.js.map +1 -0
- package/dist/stories/organisms/Tables/mockData.d.ts +20 -0
- package/dist/stories/organisms/Tables/mockData.js +20 -0
- package/dist/stories/organisms/Tables/mockData.js.map +1 -1
- package/dist/stories/utils/constants.d.ts +2 -0
- package/dist/stories/utils/constants.js +3 -0
- package/dist/stories/utils/constants.js.map +1 -0
- package/package.json +2 -2
- package/src/components.jsx +3 -0
- package/src/stories/atoms/Icons/Icons.stories.tsx +11 -1
- package/src/stories/atoms/Icons/WinnerIndicatorIcon.tsx +39 -0
- package/src/stories/atoms/Icons/sharedTypes.tsx +6 -0
- package/src/stories/molecules/Cards/TeamDrawCard.tsx +156 -0
- package/src/stories/molecules/Cards/sharedTypes.ts +14 -0
- package/src/stories/organisms/Tables/Tables.stories.tsx +36 -1
- package/src/stories/organisms/Tables/TeamDrawCardTable.tsx +160 -0
- package/src/stories/organisms/Tables/mockData.tsx +21 -0
- package/src/stories/utils/constants.ts +2 -0
package/dist/components.d.ts
CHANGED
|
@@ -17,11 +17,14 @@ export { default as SessionIcon } from "./stories/atoms/Icons/SessionIcon";
|
|
|
17
17
|
export { default as SwapIcon } from "./stories/atoms/Icons/SwapIcon";
|
|
18
18
|
export { default as VisibilityIcon } from "./stories/atoms/Icons/VisibilityIcon";
|
|
19
19
|
export { default as VisibilityOffIcon } from "./stories/atoms/Icons/VisibilityOffIcon";
|
|
20
|
+
export { default as WinnerIndicatorIcon } from "./stories/atoms/Icons/WinnerIndicatorIcon";
|
|
20
21
|
export { default as AvatarWithName } from "./stories/molecules/AvatarWithName/AvatarWithName";
|
|
21
22
|
export { default as ContactCard } from "./stories/molecules/Cards/ContactCard";
|
|
22
23
|
export { default as DrawCard } from "./stories/molecules/Cards/DrawCard";
|
|
23
24
|
export { default as SquareAvatarWithName } from "./stories/molecules/SquareAvatarWithName/SquareAvatarWithName";
|
|
24
25
|
export { default as TeamCard } from "./stories/molecules/Cards/TeamCard";
|
|
26
|
+
export { default as TeamDrawCard } from "./stories/molecules/Cards/TeamDrawCard";
|
|
25
27
|
export { default as DrawCardTable } from "./stories/organisms/Tables/DrawCardTable";
|
|
26
28
|
export { default as FullPageModal } from "./stories/organisms/Modals/FullPageModal";
|
|
27
29
|
export { default as SortableTable } from "./stories/organisms/Tables/SortableTable";
|
|
30
|
+
export { default as TeamDrawCardTable } from "./stories/organisms/Tables/TeamDrawCardTable";
|
package/dist/components.js
CHANGED
|
@@ -20,14 +20,17 @@ export { default as SessionIcon } from './stories/atoms/Icons/SessionIcon';
|
|
|
20
20
|
export { default as SwapIcon } from './stories/atoms/Icons/SwapIcon';
|
|
21
21
|
export { default as VisibilityIcon } from './stories/atoms/Icons/VisibilityIcon';
|
|
22
22
|
export { default as VisibilityOffIcon } from './stories/atoms/Icons/VisibilityOffIcon';
|
|
23
|
+
export { default as WinnerIndicatorIcon } from './stories/atoms/Icons/WinnerIndicatorIcon';
|
|
23
24
|
// MOLECULES
|
|
24
25
|
export { default as AvatarWithName } from './stories/molecules/AvatarWithName/AvatarWithName';
|
|
25
26
|
export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
|
|
26
27
|
export { default as DrawCard } from './stories/molecules/Cards/DrawCard';
|
|
27
28
|
export { default as SquareAvatarWithName } from './stories/molecules/SquareAvatarWithName/SquareAvatarWithName';
|
|
28
29
|
export { default as TeamCard } from './stories/molecules/Cards/TeamCard';
|
|
30
|
+
export { default as TeamDrawCard } from './stories/molecules/Cards/TeamDrawCard';
|
|
29
31
|
// ORGANISMS
|
|
30
32
|
export { default as DrawCardTable } from './stories/organisms/Tables/DrawCardTable';
|
|
31
33
|
export { default as FullPageModal } from './stories/organisms/Modals/FullPageModal';
|
|
32
34
|
export { default as SortableTable } from './stories/organisms/Tables/SortableTable';
|
|
35
|
+
export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable';
|
|
33
36
|
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAE5C,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAE9E,gBAAgB;AAChB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,M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OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAEjF,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAC"}
|
|
@@ -15,6 +15,7 @@ import SessionIcon from './SessionIcon';
|
|
|
15
15
|
import SwapIcon from './SwapIcon';
|
|
16
16
|
import VisibilityIcon from './VisibilityIcon';
|
|
17
17
|
import VisibilityOffIcon from './VisibilityOffIcon';
|
|
18
|
+
import WinnerIndicatorIcon from './WinnerIndicatorIcon';
|
|
18
19
|
// Default
|
|
19
20
|
export default {
|
|
20
21
|
title: 'Atoms/Icons',
|
|
@@ -68,6 +69,9 @@ function VisibilityIconTemplate(args) {
|
|
|
68
69
|
function VisibilityOffIconTemplate(args) {
|
|
69
70
|
return React.createElement(VisibilityOffIcon, Object.assign({}, args));
|
|
70
71
|
}
|
|
72
|
+
function WinnerIndicatorIconTemplate(args) {
|
|
73
|
+
return React.createElement(WinnerIndicatorIcon, Object.assign({}, args));
|
|
74
|
+
}
|
|
71
75
|
// Stories
|
|
72
76
|
export const Add = AddIconTemplate.bind({});
|
|
73
77
|
Add.args = {
|
|
@@ -149,4 +153,8 @@ VisibilityOff.args = {
|
|
|
149
153
|
size: 150,
|
|
150
154
|
color: 'black'
|
|
151
155
|
};
|
|
156
|
+
export const WinnerIndicator = WinnerIndicatorIconTemplate.bind({});
|
|
157
|
+
WinnerIndicator.args = {
|
|
158
|
+
isBlack: true
|
|
159
|
+
};
|
|
152
160
|
//# sourceMappingURL=Icons.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.stories.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Icons/Icons.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Icons.stories.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Icons/Icons.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,mBAAmB,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f,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpE,eAAe,CAAC,IAAI,GAAG;IACrB,OAAO,EAAE,IAAI;CACd,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
const arrowStyles = {
|
|
4
|
+
borderTop: '10px solid transparent',
|
|
5
|
+
borderBottom: '10px solid transparent',
|
|
6
|
+
borderLeft: '10px solid white',
|
|
7
|
+
height: 0,
|
|
8
|
+
width: 0
|
|
9
|
+
};
|
|
10
|
+
const rectangleStyles = {
|
|
11
|
+
background: 'white',
|
|
12
|
+
height: 20,
|
|
13
|
+
width: 3
|
|
14
|
+
};
|
|
15
|
+
const blackArrowStyles = {
|
|
16
|
+
borderTop: '8px solid transparent',
|
|
17
|
+
borderBottom: '8px solid transparent',
|
|
18
|
+
borderLeft: '8px solid black',
|
|
19
|
+
height: 0,
|
|
20
|
+
width: 0
|
|
21
|
+
};
|
|
22
|
+
const blackRectangleStyles = {
|
|
23
|
+
background: 'black',
|
|
24
|
+
height: 16,
|
|
25
|
+
width: 3
|
|
26
|
+
};
|
|
27
|
+
export default function WinnerIndicatorIcon({ sx, isBlack }) {
|
|
28
|
+
return (React.createElement(Box, { sx: sx, display: "flex" },
|
|
29
|
+
React.createElement(Box, { style: isBlack ? blackRectangleStyles : rectangleStyles }),
|
|
30
|
+
React.createElement(Box, { style: isBlack ? blackArrowStyles : arrowStyles })));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=WinnerIndicatorIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WinnerIndicatorIcon.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Icons/WinnerIndicatorIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAGpC,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,wBAAwB;IACnC,YAAY,EAAE,wBAAwB;IACtC,UAAU,EAAE,kBAAkB;IAC9B,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACT,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,UAAU,EAAE,OAAO;IACnB,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,SAAS,EAAE,uBAAuB;IAClC,YAAY,EAAE,uBAAuB;IACrC,UAAU,EAAE,iBAAiB;IAC7B,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,oBAAoB,GAAG;IAC3B,UAAU,EAAE,OAAO;IACnB,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,EAAE,EAAE,OAAO,EAA4B;IACnF,OAAO,CACH,oBAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAC,MAAM;QACvB,oBAAC,GAAG,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,eAAe,GAAI;QAChE,oBAAC,GAAG,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,GAAI,CACtD,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TeamDrawCardProps } from "./sharedTypes";
|
|
3
|
+
export default function TeamDrawCard({ dateLabel, locationLabel, timeLabel, matchInfo, isPosition1Winner, isPosition2Winner, isScorelessMatch, position1Team, position2Team, ...props }: TeamDrawCardProps): JSX.Element;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
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';
|
|
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)',
|
|
28
|
+
marginLeft: `${teamDrawCardSideMargin}`,
|
|
29
|
+
marginRight: `${teamDrawCardSideMargin}`,
|
|
30
|
+
position: 'relative',
|
|
31
|
+
marginBottom: `${teamDrawCardBottomMargin}`
|
|
32
|
+
});
|
|
33
|
+
const BottomGrid = styled(Box)({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justifyContent: 'space-between',
|
|
37
|
+
paddingTop: '8px',
|
|
38
|
+
});
|
|
39
|
+
export default function TeamDrawCard(_a) {
|
|
40
|
+
var { dateLabel, locationLabel, timeLabel, matchInfo, isPosition1Winner, isPosition2Winner, isScorelessMatch, position1Team, position2Team } = _a, props = __rest(_a, ["dateLabel", "locationLabel", "timeLabel", "matchInfo", "isPosition1Winner", "isPosition2Winner", "isScorelessMatch", "position1Team", "position2Team"]);
|
|
41
|
+
const { MediumMedium, MediumBook, XSmallBook } = SECONDARY_SIZES_ENUM;
|
|
42
|
+
const { SECONDARY } = CATEGORY_ENUM;
|
|
43
|
+
return (React.createElement(StyledCard, Object.assign({ className: "team-draw-card" }, props),
|
|
44
|
+
React.createElement(Box, { display: "flex", justifyContent: "space-between", mb: 0.5 },
|
|
45
|
+
isPosition1Winner && React.createElement(WinnerIndicatorIcon, { isBlack: true, sx: { position: "absolute", left: 0, top: 20 } }),
|
|
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) }),
|
|
48
|
+
React.createElement(Typography, { category: SECONDARY, size: XSmallBook, color: "var(--cool-grey-600)" },
|
|
49
|
+
"(", position1Team === null || position1Team === void 0 ? void 0 :
|
|
50
|
+
position1Team.record,
|
|
51
|
+
")")),
|
|
52
|
+
React.createElement(Typography, { category: SECONDARY, size: isPosition1Winner ? MediumMedium : MediumBook }, isScorelessMatch ? '-' : position1Team === null || position1Team === void 0 ? void 0 : position1Team.points)),
|
|
53
|
+
React.createElement(Box, { display: "flex", justifyContent: "space-between" },
|
|
54
|
+
isPosition2Winner && React.createElement(WinnerIndicatorIcon, { isBlack: true, sx: { position: "absolute", left: 0, top: 50 } }),
|
|
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) }),
|
|
57
|
+
React.createElement(Typography, { category: SECONDARY, size: XSmallBook, color: "var(--cool-grey-600)" },
|
|
58
|
+
"(", position2Team === null || position2Team === void 0 ? void 0 :
|
|
59
|
+
position2Team.record,
|
|
60
|
+
")")),
|
|
61
|
+
React.createElement(Typography, { category: SECONDARY, size: isPosition2Winner ? MediumMedium : MediumBook }, isScorelessMatch ? '-' : position2Team === null || position2Team === void 0 ? void 0 : position2Team.points)),
|
|
62
|
+
React.createElement(BottomGrid, null,
|
|
63
|
+
React.createElement(Box, null,
|
|
64
|
+
React.createElement(Box, { display: "flex" },
|
|
65
|
+
React.createElement(Typography, { style: {
|
|
66
|
+
overflow: 'hidden',
|
|
67
|
+
textOverflow: 'ellipsis',
|
|
68
|
+
display: '-webkit-box',
|
|
69
|
+
WebkitBoxOrient: 'vertical',
|
|
70
|
+
WebkitLineClamp: 1,
|
|
71
|
+
}, category: SECONDARY, size: XSmallBook }, dateLabel),
|
|
72
|
+
React.createElement(Typography, { category: SECONDARY, size: XSmallBook, pl: 0.5, pr: 0.5 }, "\u2022"),
|
|
73
|
+
React.createElement(Typography, { style: {
|
|
74
|
+
overflow: 'hidden',
|
|
75
|
+
textOverflow: 'ellipsis',
|
|
76
|
+
display: '-webkit-box',
|
|
77
|
+
WebkitBoxOrient: 'vertical',
|
|
78
|
+
WebkitLineClamp: 1,
|
|
79
|
+
}, category: SECONDARY, size: XSmallBook }, timeLabel),
|
|
80
|
+
React.createElement(Typography, { category: SECONDARY, size: XSmallBook, pl: 0.5, pr: 0.5 }, "\u2022"),
|
|
81
|
+
React.createElement(Typography, { style: {
|
|
82
|
+
overflow: 'hidden',
|
|
83
|
+
textOverflow: 'ellipsis',
|
|
84
|
+
display: '-webkit-box',
|
|
85
|
+
WebkitBoxOrient: 'vertical',
|
|
86
|
+
WebkitLineClamp: 1,
|
|
87
|
+
}, category: SECONDARY, size: XSmallBook }, matchInfo)),
|
|
88
|
+
React.createElement(Typography, { style: {
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
textOverflow: 'ellipsis',
|
|
91
|
+
display: '-webkit-box',
|
|
92
|
+
WebkitBoxOrient: 'vertical',
|
|
93
|
+
WebkitLineClamp: 1,
|
|
94
|
+
}, category: SECONDARY, size: XSmallBook }, locationLabel)))));
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=TeamDrawCard.js.map
|
|
@@ -0,0 +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,sBAAsB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,UAAU,EAAE,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,oBAAoB,MAAM,8CAA8C,CAAC;AAGhF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO;IACf,eAAe,EAAE,cAAc;IAC/B,MAAM,EAAE,gCAAgC;IACxC,UAAU,EAAE,GAAG,sBAAsB,EAAE;IACvC,WAAW,EAAE,GAAG,sBAAsB,EAAE;IACxC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,GAAG,wBAAwB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;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,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledCard: import("@emotion/styled").StyledComponent<import("@mui/system").
|
|
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>> & {
|
|
3
8
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, keyof import("@mui/
|
|
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>, {}, {}>;
|
|
@@ -13,6 +13,8 @@ type OnChangeArgs = {
|
|
|
13
13
|
type PositionTeam = {
|
|
14
14
|
name: string;
|
|
15
15
|
points: number;
|
|
16
|
+
href?: string;
|
|
17
|
+
record?: number;
|
|
16
18
|
};
|
|
17
19
|
export type DrawCardProps = {
|
|
18
20
|
options: Options;
|
|
@@ -33,6 +35,17 @@ export type DrawCardProps = {
|
|
|
33
35
|
onViewClick?: VoidFunction;
|
|
34
36
|
onChange: ({ position, id }: OnChangeArgs) => void;
|
|
35
37
|
};
|
|
38
|
+
export type TeamDrawCardProps = {
|
|
39
|
+
dateLabel: string;
|
|
40
|
+
locationLabel: string;
|
|
41
|
+
timeLabel: string;
|
|
42
|
+
matchInfo?: string;
|
|
43
|
+
isPosition1Winner?: boolean;
|
|
44
|
+
isPosition2Winner?: boolean;
|
|
45
|
+
isScorelessMatch?: boolean;
|
|
46
|
+
position1Team: PositionTeam;
|
|
47
|
+
position2Team: PositionTeam;
|
|
48
|
+
};
|
|
36
49
|
export interface TeamCardProps {
|
|
37
50
|
title: string;
|
|
38
51
|
description: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import TeamDrawCard from 'stories/molecules/Cards/TeamDrawCard';
|
|
2
3
|
import DrawCard from '../../molecules/Cards/DrawCard';
|
|
3
4
|
import DrawCardTable from './DrawCardTable';
|
|
4
|
-
import
|
|
5
|
+
import TeamDrawCardTable from './TeamDrawCardTable';
|
|
6
|
+
import { MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA, SAMPLE_TEAM_PAGE_CARD_DATA } from './mockData';
|
|
5
7
|
const onOrderPropertyChange = () => { };
|
|
6
8
|
// Default
|
|
7
9
|
export default {
|
|
@@ -11,6 +13,9 @@ export default {
|
|
|
11
13
|
function DrawCardTableTemplate(args) {
|
|
12
14
|
return React.createElement(DrawCardTable, Object.assign({}, args));
|
|
13
15
|
}
|
|
16
|
+
function TeamDrawCardTableTemplate(args) {
|
|
17
|
+
return React.createElement(TeamDrawCardTable, Object.assign({}, args));
|
|
18
|
+
}
|
|
14
19
|
const headerRows = [
|
|
15
20
|
{ name: 'Round 1' },
|
|
16
21
|
{ name: 'Quarterfinal' },
|
|
@@ -41,12 +46,38 @@ const tableRows = [
|
|
|
41
46
|
React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
|
|
42
47
|
],
|
|
43
48
|
];
|
|
49
|
+
const teamTableRows = [
|
|
50
|
+
[
|
|
51
|
+
React.createElement(TeamDrawCard, Object.assign({}, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
52
|
+
React.createElement(TeamDrawCard, Object.assign({}, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
53
|
+
React.createElement(TeamDrawCard, Object.assign({ isScorelessMatch: true }, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
54
|
+
React.createElement(TeamDrawCard, Object.assign({ isScorelessMatch: true }, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
React.createElement(TeamDrawCard, Object.assign({}, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
58
|
+
React.createElement(TeamDrawCard, Object.assign({}, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
React.createElement(TeamDrawCard, Object.assign({}, SAMPLE_TEAM_PAGE_CARD_DATA)),
|
|
62
|
+
],
|
|
63
|
+
];
|
|
44
64
|
// Stories
|
|
45
65
|
export const DrawTable = DrawCardTableTemplate.bind({});
|
|
46
66
|
DrawTable.args = {
|
|
47
67
|
headerRows,
|
|
48
68
|
tableRows,
|
|
49
69
|
};
|
|
70
|
+
export const TeamDrawTable = TeamDrawCardTableTemplate.bind({});
|
|
71
|
+
TeamDrawTable.args = {
|
|
72
|
+
headerRows,
|
|
73
|
+
tableRows: teamTableRows,
|
|
74
|
+
};
|
|
75
|
+
export const MobileTeamDrawTable = TeamDrawCardTableTemplate.bind({});
|
|
76
|
+
MobileTeamDrawTable.args = {
|
|
77
|
+
headerRows,
|
|
78
|
+
tableRows: teamTableRows,
|
|
79
|
+
isMobile: true
|
|
80
|
+
};
|
|
50
81
|
export const SortableTable = DrawCardTableTemplate.bind({});
|
|
51
82
|
SortableTable.args = {
|
|
52
83
|
headCells: MOCK_HEAD_CELLS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tables.stories.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Tables/Tables.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Tables.stories.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Tables/Tables.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAA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C,CAAC;AACxD,SAAS,CAAC,IAAI,GAAG;IACf,UAAU;IACV,SAAS;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChE,aAAa,CAAC,IAAI,GAAG;IACnB,UAAU;IACV,SAAS,EAAE,aAAa;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtE,mBAAmB,CAAC,IAAI,GAAG;IACzB,UAAU;IACV,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5D,aAAa,CAAC,IAAI,GAAG;IACnB,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,KAAK;IAChB,cAAc,EAAE,QAAQ;IACxB,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,eAAe;IAC1B,YAAY,EAAE,gBAAgB;IAC9B,qBAAqB;CACtB,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
import Box from "@mui/material/Box";
|
|
14
|
+
import Button from "@mui/material/Button";
|
|
15
|
+
import { styled } from "@mui/material/styles";
|
|
16
|
+
import Grid from "@mui/material/Grid";
|
|
17
|
+
import ArrowForwardIosOutlinedIcon from "@mui/icons-material/ArrowForwardIosOutlined";
|
|
18
|
+
import ArrowBackIosOutlinedIcon from "@mui/icons-material/ArrowBackIosOutlined";
|
|
19
|
+
import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
|
|
20
|
+
import Typography from "../../atoms/Typography/Typography";
|
|
21
|
+
const StyledHeader = styled(Grid)({
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "center",
|
|
24
|
+
display: "flex"
|
|
25
|
+
});
|
|
26
|
+
const StyledGrid = styled(Grid)({
|
|
27
|
+
position: "relative",
|
|
28
|
+
"&:nth-of-type(1)": {
|
|
29
|
+
"&:after": {
|
|
30
|
+
content: "''",
|
|
31
|
+
position: "absolute",
|
|
32
|
+
right: 0,
|
|
33
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
34
|
+
height: "25%",
|
|
35
|
+
width: "1px",
|
|
36
|
+
top: `calc(12.5% - ${teamDrawCardBottomMargin}/2)`
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"&:nth-of-type(2)": {
|
|
40
|
+
"&:before": {
|
|
41
|
+
content: "''",
|
|
42
|
+
position: "absolute",
|
|
43
|
+
left: 0,
|
|
44
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
45
|
+
height: "25%",
|
|
46
|
+
width: "1px",
|
|
47
|
+
bottom: `calc(12.5% + ${teamDrawCardBottomMargin}/2)`
|
|
48
|
+
},
|
|
49
|
+
"&:after": {
|
|
50
|
+
content: "''",
|
|
51
|
+
position: "absolute",
|
|
52
|
+
right: 0,
|
|
53
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
54
|
+
height: "50%",
|
|
55
|
+
width: "1px",
|
|
56
|
+
top: `calc(25% - ${teamDrawCardBottomMargin}/2)`
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"&:nth-last-child(-n+2) .team-draw-card": {
|
|
60
|
+
"&:before": {
|
|
61
|
+
position: "absolute",
|
|
62
|
+
content: '""',
|
|
63
|
+
width: `${teamDrawCardSideMargin}`,
|
|
64
|
+
height: "1px",
|
|
65
|
+
left: 0,
|
|
66
|
+
top: "50%",
|
|
67
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
68
|
+
transform: "translateX(-100%)"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"&:nth-of-type(-n+2) .team-draw-card": {
|
|
72
|
+
"&:after": {
|
|
73
|
+
position: "absolute",
|
|
74
|
+
content: '""',
|
|
75
|
+
width: `${teamDrawCardSideMargin}`,
|
|
76
|
+
height: "1px",
|
|
77
|
+
right: 0,
|
|
78
|
+
top: "50%",
|
|
79
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
80
|
+
transform: "translateX(100%)"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const GridSections = styled(Box)({
|
|
85
|
+
display: "flex",
|
|
86
|
+
alignItems: "center"
|
|
87
|
+
});
|
|
88
|
+
const TableMobileSection = styled(Grid)({
|
|
89
|
+
flexDirection: "column"
|
|
90
|
+
});
|
|
91
|
+
export default function TeamDrawCardTable(_a) {
|
|
92
|
+
var { headerRows, tableRows, isMobile } = _a, props = __rest(_a, ["headerRows", "tableRows", "isMobile"]);
|
|
93
|
+
const [activeStep, setActiveStep] = React.useState(0);
|
|
94
|
+
const handleNext = () => {
|
|
95
|
+
setActiveStep((prevActiveStep) => prevActiveStep + 1);
|
|
96
|
+
};
|
|
97
|
+
const handleBack = () => {
|
|
98
|
+
setActiveStep((prevActiveStep) => prevActiveStep - 1);
|
|
99
|
+
};
|
|
100
|
+
if (!headerRows || !tableRows)
|
|
101
|
+
return null;
|
|
102
|
+
const totalColumns = Math.floor(12 / headerRows.length);
|
|
103
|
+
const formatTableRows = tableRows.map((row, index) => {
|
|
104
|
+
if (index > 2)
|
|
105
|
+
return; // Table can only support 3 columns
|
|
106
|
+
const rowSectionsHeight = `${100 / tableRows[index].length}%`;
|
|
107
|
+
const sectionAmount = tableRows[index].length;
|
|
108
|
+
return (React.createElement(StyledGrid, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, sx: { height: rowSectionsHeight } }, row[idx])))));
|
|
109
|
+
});
|
|
110
|
+
const formatDesktopRows = (React.createElement(React.Fragment, null,
|
|
111
|
+
React.createElement(Grid, { container: true, sx: { height: "60px" } }, headerRows.map((row) => (React.createElement(StyledHeader, { key: row.name, xs: totalColumns },
|
|
112
|
+
React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, row.name))))),
|
|
113
|
+
React.createElement(Grid, { container: true }, formatTableRows)));
|
|
114
|
+
const formatMobileRows = (React.createElement(Box, null,
|
|
115
|
+
React.createElement(Grid, { container: true, justifyContent: "space-between" },
|
|
116
|
+
React.createElement(Button, { color: "inherit", disabled: activeStep === 0, onClick: handleBack, sx: { mr: 1, alignSelf: "flex-start" } },
|
|
117
|
+
React.createElement(ArrowBackIosOutlinedIcon, null)),
|
|
118
|
+
React.createElement(StyledHeader, { xs: totalColumns },
|
|
119
|
+
React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, headerRows[activeStep].name)),
|
|
120
|
+
React.createElement(Button, { onClick: handleNext, disabled: activeStep === tableRows.length - 1 },
|
|
121
|
+
React.createElement(ArrowForwardIosOutlinedIcon, null))),
|
|
122
|
+
React.createElement(TableMobileSection, { container: true },
|
|
123
|
+
React.createElement(GridSections, { sx: { display: "flex", flexDirection: "column", gap: "10px" } }, tableRows[activeStep]))));
|
|
124
|
+
return (React.createElement(Box, Object.assign({}, props, { sx: { flexGrow: 1 }, "aria-label": "draw table" }), isMobile ? formatMobileRows : formatDesktopRows));
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=TeamDrawCardTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamDrawCardTable.js","sourceRoot":"","sources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47,24 @@ export declare const SAMPLE_CARD_DATA: {
|
|
|
47
47
|
points: number;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
+
export declare const SAMPLE_TEAM_PAGE_CARD_DATA: {
|
|
51
|
+
dateLabel: string;
|
|
52
|
+
timeLabel: string;
|
|
53
|
+
locationLabel: string;
|
|
54
|
+
matchInfo: string;
|
|
55
|
+
isPosition1Winner: boolean;
|
|
56
|
+
isPosition2Winner: boolean;
|
|
57
|
+
position1Team: {
|
|
58
|
+
name: string;
|
|
59
|
+
points: number;
|
|
60
|
+
href: string;
|
|
61
|
+
record: number;
|
|
62
|
+
};
|
|
63
|
+
position2Team: {
|
|
64
|
+
name: string;
|
|
65
|
+
points: number;
|
|
66
|
+
href: string;
|
|
67
|
+
record: number;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
50
70
|
export {};
|
|
@@ -76,4 +76,24 @@ export const SAMPLE_CARD_DATA = {
|
|
|
76
76
|
points: 4,
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
+
export const SAMPLE_TEAM_PAGE_CARD_DATA = {
|
|
80
|
+
dateLabel: 'Dec 20',
|
|
81
|
+
timeLabel: '9:00pm',
|
|
82
|
+
locationLabel: 'Taube Tennis Center',
|
|
83
|
+
matchInfo: 'Round 1, Match 2',
|
|
84
|
+
isPosition1Winner: true,
|
|
85
|
+
isPosition2Winner: false,
|
|
86
|
+
position1Team: {
|
|
87
|
+
name: 'Apples',
|
|
88
|
+
points: 10,
|
|
89
|
+
href: 'https://www.reddit.com',
|
|
90
|
+
record: 2
|
|
91
|
+
},
|
|
92
|
+
position2Team: {
|
|
93
|
+
name: 'Pears',
|
|
94
|
+
points: 4,
|
|
95
|
+
href: 'https://www.reddit.com',
|
|
96
|
+
record: 2
|
|
97
|
+
}
|
|
98
|
+
};
|
|
79
99
|
//# sourceMappingURL=mockData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockData.js","sourceRoot":"","sources":["../../../../src/stories/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gB;QACtB,OAAO,EAAE,eAAe;KACzB;IACD;QACE,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,kBAAkB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,mBAAmB;KAC7B;IACD;QACE,EAAE,EAAE,CAAC;QACL,MAAM,EAAE,eAAe;QACvB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,mBAAmB;KAC7B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE;QACP;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;KACF;IACD,eAAe,EAAE;QACf,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;KACb;IACD,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAgB,EAAE,EAAE,GAAE,CAAC;IAChD,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,GAAG;IAClB,iBAAiB,EAAE,IAAI;IACvB,iBAAiB,EAAE,KAAK;IACxB,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,EAAE;KACX;IACD,aAAa,EAAE;QACb,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,CAAC;KACV;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"mockData.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Tables/mockData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAkBhE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAY,EA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ot":"","sources":["../../../src/stories/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@universal-tennis/ui-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
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.
|
|
11
|
+
"@mui/material": "5.5.3",
|
|
12
12
|
"copyfiles": "^2.4.1",
|
|
13
13
|
"cross-env": "^7.0.3",
|
|
14
14
|
"libphonenumber-js": "^1.10.18",
|
package/src/components.jsx
CHANGED
|
@@ -22,6 +22,7 @@ export { default as SessionIcon } from './stories/atoms/Icons/SessionIcon';
|
|
|
22
22
|
export { default as SwapIcon } from './stories/atoms/Icons/SwapIcon';
|
|
23
23
|
export { default as VisibilityIcon } from './stories/atoms/Icons/VisibilityIcon';
|
|
24
24
|
export { default as VisibilityOffIcon } from './stories/atoms/Icons/VisibilityOffIcon';
|
|
25
|
+
export { default as WinnerIndicatorIcon } from './stories/atoms/Icons/WinnerIndicatorIcon';
|
|
25
26
|
|
|
26
27
|
// MOLECULES
|
|
27
28
|
export { default as AvatarWithName } from './stories/molecules/AvatarWithName/AvatarWithName';
|
|
@@ -29,8 +30,10 @@ export { default as ContactCard } from './stories/molecules/Cards/ContactCard';
|
|
|
29
30
|
export { default as DrawCard } from './stories/molecules/Cards/DrawCard';
|
|
30
31
|
export { default as SquareAvatarWithName } from './stories/molecules/SquareAvatarWithName/SquareAvatarWithName';
|
|
31
32
|
export { default as TeamCard } from './stories/molecules/Cards/TeamCard';
|
|
33
|
+
export { default as TeamDrawCard } from './stories/molecules/Cards/TeamDrawCard';
|
|
32
34
|
|
|
33
35
|
// ORGANISMS
|
|
34
36
|
export { default as DrawCardTable } from './stories/organisms/Tables/DrawCardTable';
|
|
35
37
|
export { default as FullPageModal } from './stories/organisms/Modals/FullPageModal';
|
|
36
38
|
export { default as SortableTable } from './stories/organisms/Tables/SortableTable';
|
|
39
|
+
export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable';
|
|
@@ -16,7 +16,8 @@ import SessionIcon from './SessionIcon';
|
|
|
16
16
|
import SwapIcon from './SwapIcon';
|
|
17
17
|
import VisibilityIcon from './VisibilityIcon';
|
|
18
18
|
import VisibilityOffIcon from './VisibilityOffIcon';
|
|
19
|
-
import
|
|
19
|
+
import WinnerIndicatorIcon from './WinnerIndicatorIcon';
|
|
20
|
+
import { IconProps, WinnerIndicatorIconProps } from './sharedTypes';
|
|
20
21
|
|
|
21
22
|
// Default
|
|
22
23
|
export default {
|
|
@@ -88,6 +89,10 @@ function VisibilityOffIconTemplate(args: IconProps) {
|
|
|
88
89
|
return <VisibilityOffIcon {...args} />;
|
|
89
90
|
}
|
|
90
91
|
|
|
92
|
+
function WinnerIndicatorIconTemplate(args: WinnerIndicatorIconProps) {
|
|
93
|
+
return <WinnerIndicatorIcon {...args} />;
|
|
94
|
+
}
|
|
95
|
+
|
|
91
96
|
// Stories
|
|
92
97
|
export const Add = AddIconTemplate.bind({});
|
|
93
98
|
Add.args = {
|
|
@@ -184,3 +189,8 @@ VisibilityOff.args = {
|
|
|
184
189
|
size: 150,
|
|
185
190
|
color: 'black'
|
|
186
191
|
};
|
|
192
|
+
|
|
193
|
+
export const WinnerIndicator = WinnerIndicatorIconTemplate.bind({});
|
|
194
|
+
WinnerIndicator.args = {
|
|
195
|
+
isBlack: true
|
|
196
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import { WinnerIndicatorIconProps } from './sharedTypes';
|
|
4
|
+
|
|
5
|
+
const arrowStyles = {
|
|
6
|
+
borderTop: '10px solid transparent',
|
|
7
|
+
borderBottom: '10px solid transparent',
|
|
8
|
+
borderLeft: '10px solid white',
|
|
9
|
+
height: 0,
|
|
10
|
+
width: 0
|
|
11
|
+
};
|
|
12
|
+
const rectangleStyles = {
|
|
13
|
+
background: 'white',
|
|
14
|
+
height: 20,
|
|
15
|
+
width: 3
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const blackArrowStyles = {
|
|
19
|
+
borderTop: '8px solid transparent',
|
|
20
|
+
borderBottom: '8px solid transparent',
|
|
21
|
+
borderLeft: '8px solid black',
|
|
22
|
+
height: 0,
|
|
23
|
+
width: 0
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const blackRectangleStyles = {
|
|
27
|
+
background: 'black',
|
|
28
|
+
height: 16,
|
|
29
|
+
width: 3
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default function WinnerIndicatorIcon({ sx, isBlack }: WinnerIndicatorIconProps) {
|
|
33
|
+
return (
|
|
34
|
+
<Box sx={sx} display="flex">
|
|
35
|
+
<Box style={isBlack ? blackRectangleStyles : rectangleStyles} />
|
|
36
|
+
<Box style={isBlack ? blackArrowStyles : arrowStyles} />
|
|
37
|
+
</Box>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
import { TeamDrawCardProps } from "./sharedTypes";
|
|
9
|
+
|
|
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)',
|
|
19
|
+
marginLeft: `${teamDrawCardSideMargin}`,
|
|
20
|
+
marginRight: `${teamDrawCardSideMargin}`,
|
|
21
|
+
position: 'relative',
|
|
22
|
+
marginBottom: `${teamDrawCardBottomMargin}`
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const BottomGrid = styled(Box)({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'space-between',
|
|
29
|
+
paddingTop: '8px',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export default function TeamDrawCard({
|
|
33
|
+
dateLabel, locationLabel, timeLabel, matchInfo,
|
|
34
|
+
isPosition1Winner, isPosition2Winner,
|
|
35
|
+
isScorelessMatch, position1Team, position2Team, ...props
|
|
36
|
+
}: TeamDrawCardProps) {
|
|
37
|
+
const { MediumMedium, MediumBook, XSmallBook } = SECONDARY_SIZES_ENUM;
|
|
38
|
+
const { SECONDARY } = CATEGORY_ENUM;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<StyledCard className="team-draw-card" {...props}>
|
|
42
|
+
<Box display="flex" justifyContent="space-between" mb={0.5}>
|
|
43
|
+
{isPosition1Winner && <WinnerIndicatorIcon isBlack sx={{ position: "absolute", left: 0, top: 20 }} />}
|
|
44
|
+
<Box display="flex" alignItems="center" gap={0.5}>
|
|
45
|
+
<SquareAvatarWithName
|
|
46
|
+
name={position1Team?.name}
|
|
47
|
+
fontSize={isPosition1Winner ? MediumMedium : MediumBook}
|
|
48
|
+
href={position1Team.href}
|
|
49
|
+
isBye={!position1Team?.name}
|
|
50
|
+
/>
|
|
51
|
+
<Typography category={SECONDARY} size={XSmallBook} color="var(--cool-grey-600)">
|
|
52
|
+
(
|
|
53
|
+
{position1Team?.record}
|
|
54
|
+
)
|
|
55
|
+
</Typography>
|
|
56
|
+
</Box>
|
|
57
|
+
<Typography category={SECONDARY} size={isPosition1Winner ? MediumMedium : MediumBook}>
|
|
58
|
+
{isScorelessMatch ? '-' : position1Team?.points}
|
|
59
|
+
</Typography>
|
|
60
|
+
</Box>
|
|
61
|
+
<Box display="flex" justifyContent="space-between">
|
|
62
|
+
{isPosition2Winner && <WinnerIndicatorIcon isBlack sx={{ position: "absolute", left: 0, top: 50 }} />}
|
|
63
|
+
<Box display="flex" alignItems="center" gap={0.5}>
|
|
64
|
+
<SquareAvatarWithName
|
|
65
|
+
name={position2Team?.name}
|
|
66
|
+
fontSize={isPosition2Winner ? MediumMedium : MediumBook}
|
|
67
|
+
href={position2Team.href}
|
|
68
|
+
isBye={!position2Team?.name}
|
|
69
|
+
/>
|
|
70
|
+
<Typography category={SECONDARY} size={XSmallBook} color="var(--cool-grey-600)">
|
|
71
|
+
(
|
|
72
|
+
{position2Team?.record}
|
|
73
|
+
)
|
|
74
|
+
</Typography>
|
|
75
|
+
</Box>
|
|
76
|
+
<Typography category={SECONDARY} size={isPosition2Winner ? MediumMedium : MediumBook}>
|
|
77
|
+
{isScorelessMatch ? '-' : position2Team?.points}
|
|
78
|
+
</Typography>
|
|
79
|
+
</Box>
|
|
80
|
+
<BottomGrid>
|
|
81
|
+
<Box>
|
|
82
|
+
<Box display="flex">
|
|
83
|
+
<Typography
|
|
84
|
+
style={{
|
|
85
|
+
overflow: 'hidden',
|
|
86
|
+
textOverflow: 'ellipsis',
|
|
87
|
+
display: '-webkit-box',
|
|
88
|
+
WebkitBoxOrient: 'vertical',
|
|
89
|
+
WebkitLineClamp: 1,
|
|
90
|
+
}}
|
|
91
|
+
category={SECONDARY}
|
|
92
|
+
size={XSmallBook}
|
|
93
|
+
>
|
|
94
|
+
{dateLabel}
|
|
95
|
+
</Typography>
|
|
96
|
+
<Typography
|
|
97
|
+
category={SECONDARY}
|
|
98
|
+
size={XSmallBook}
|
|
99
|
+
pl={0.5}
|
|
100
|
+
pr={0.5}
|
|
101
|
+
>
|
|
102
|
+
•
|
|
103
|
+
</Typography>
|
|
104
|
+
<Typography
|
|
105
|
+
style={{
|
|
106
|
+
overflow: 'hidden',
|
|
107
|
+
textOverflow: 'ellipsis',
|
|
108
|
+
display: '-webkit-box',
|
|
109
|
+
WebkitBoxOrient: 'vertical',
|
|
110
|
+
WebkitLineClamp: 1,
|
|
111
|
+
}}
|
|
112
|
+
category={SECONDARY}
|
|
113
|
+
size={XSmallBook}
|
|
114
|
+
>
|
|
115
|
+
{timeLabel}
|
|
116
|
+
</Typography>
|
|
117
|
+
<Typography
|
|
118
|
+
category={SECONDARY}
|
|
119
|
+
size={XSmallBook}
|
|
120
|
+
pl={0.5}
|
|
121
|
+
pr={0.5}
|
|
122
|
+
>
|
|
123
|
+
•
|
|
124
|
+
</Typography>
|
|
125
|
+
<Typography
|
|
126
|
+
style={{
|
|
127
|
+
overflow: 'hidden',
|
|
128
|
+
textOverflow: 'ellipsis',
|
|
129
|
+
display: '-webkit-box',
|
|
130
|
+
WebkitBoxOrient: 'vertical',
|
|
131
|
+
WebkitLineClamp: 1,
|
|
132
|
+
}}
|
|
133
|
+
category={SECONDARY}
|
|
134
|
+
size={XSmallBook}
|
|
135
|
+
>
|
|
136
|
+
{matchInfo}
|
|
137
|
+
</Typography>
|
|
138
|
+
</Box>
|
|
139
|
+
<Typography
|
|
140
|
+
style={{
|
|
141
|
+
overflow: 'hidden',
|
|
142
|
+
textOverflow: 'ellipsis',
|
|
143
|
+
display: '-webkit-box',
|
|
144
|
+
WebkitBoxOrient: 'vertical',
|
|
145
|
+
WebkitLineClamp: 1,
|
|
146
|
+
}}
|
|
147
|
+
category={SECONDARY}
|
|
148
|
+
size={XSmallBook}
|
|
149
|
+
>
|
|
150
|
+
{locationLabel}
|
|
151
|
+
</Typography>
|
|
152
|
+
</Box>
|
|
153
|
+
</BottomGrid>
|
|
154
|
+
</StyledCard>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
@@ -18,6 +18,8 @@ type OnChangeArgs = {
|
|
|
18
18
|
type PositionTeam = {
|
|
19
19
|
name: string;
|
|
20
20
|
points: number;
|
|
21
|
+
href?: string;
|
|
22
|
+
record?: number;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export type DrawCardProps = {
|
|
@@ -40,6 +42,18 @@ export type DrawCardProps = {
|
|
|
40
42
|
onChange: ({ position, id }: OnChangeArgs) => void;
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
export type TeamDrawCardProps = {
|
|
46
|
+
dateLabel: string;
|
|
47
|
+
locationLabel: string;
|
|
48
|
+
timeLabel: string;
|
|
49
|
+
matchInfo?: string;
|
|
50
|
+
isPosition1Winner?: boolean;
|
|
51
|
+
isPosition2Winner?: boolean;
|
|
52
|
+
isScorelessMatch?: boolean;
|
|
53
|
+
position1Team: PositionTeam;
|
|
54
|
+
position2Team: PositionTeam;
|
|
55
|
+
}
|
|
56
|
+
|
|
43
57
|
export interface TeamCardProps {
|
|
44
58
|
title: string;
|
|
45
59
|
description: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import TeamDrawCard from 'stories/molecules/Cards/TeamDrawCard';
|
|
2
3
|
import DrawCard from '../../molecules/Cards/DrawCard';
|
|
3
4
|
import DrawCardTable from './DrawCardTable';
|
|
5
|
+
import TeamDrawCardTable from './TeamDrawCardTable';
|
|
4
6
|
import { DrawCardTableProps } from './sharedTypes';
|
|
5
7
|
import {
|
|
6
|
-
MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA
|
|
8
|
+
MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA, SAMPLE_TEAM_PAGE_CARD_DATA
|
|
7
9
|
} from './mockData';
|
|
8
10
|
|
|
9
11
|
const onOrderPropertyChange = () => {};
|
|
@@ -18,6 +20,10 @@ function DrawCardTableTemplate(args: DrawCardTableProps) {
|
|
|
18
20
|
return <DrawCardTable {...args} />;
|
|
19
21
|
}
|
|
20
22
|
|
|
23
|
+
function TeamDrawCardTableTemplate(args: DrawCardTableProps) {
|
|
24
|
+
return <TeamDrawCardTable {...args} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
const headerRows = [
|
|
22
28
|
{ name: 'Round 1' },
|
|
23
29
|
{ name: 'Quarterfinal' },
|
|
@@ -50,6 +56,22 @@ const tableRows = [
|
|
|
50
56
|
],
|
|
51
57
|
];
|
|
52
58
|
|
|
59
|
+
const teamTableRows = [
|
|
60
|
+
[
|
|
61
|
+
<TeamDrawCard {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
62
|
+
<TeamDrawCard {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
63
|
+
<TeamDrawCard isScorelessMatch {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
64
|
+
<TeamDrawCard isScorelessMatch {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
<TeamDrawCard {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
68
|
+
<TeamDrawCard {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
<TeamDrawCard {...SAMPLE_TEAM_PAGE_CARD_DATA} />,
|
|
72
|
+
],
|
|
73
|
+
];
|
|
74
|
+
|
|
53
75
|
// Stories
|
|
54
76
|
export const DrawTable = DrawCardTableTemplate.bind({});
|
|
55
77
|
DrawTable.args = {
|
|
@@ -57,6 +79,19 @@ DrawTable.args = {
|
|
|
57
79
|
tableRows,
|
|
58
80
|
};
|
|
59
81
|
|
|
82
|
+
export const TeamDrawTable = TeamDrawCardTableTemplate.bind({});
|
|
83
|
+
TeamDrawTable.args = {
|
|
84
|
+
headerRows,
|
|
85
|
+
tableRows: teamTableRows,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const MobileTeamDrawTable = TeamDrawCardTableTemplate.bind({});
|
|
89
|
+
MobileTeamDrawTable.args = {
|
|
90
|
+
headerRows,
|
|
91
|
+
tableRows: teamTableRows,
|
|
92
|
+
isMobile: true
|
|
93
|
+
};
|
|
94
|
+
|
|
60
95
|
export const SortableTable = DrawCardTableTemplate.bind({});
|
|
61
96
|
SortableTable.args = {
|
|
62
97
|
headCells: MOCK_HEAD_CELLS,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Box from "@mui/material/Box";
|
|
3
|
+
import Button from "@mui/material/Button";
|
|
4
|
+
import { styled } from "@mui/material/styles";
|
|
5
|
+
import Grid from "@mui/material/Grid";
|
|
6
|
+
import ArrowForwardIosOutlinedIcon from "@mui/icons-material/ArrowForwardIosOutlined";
|
|
7
|
+
import ArrowBackIosOutlinedIcon from "@mui/icons-material/ArrowBackIosOutlined";
|
|
8
|
+
import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
|
|
9
|
+
import Typography from "../../atoms/Typography/Typography";
|
|
10
|
+
import { DrawCardTableProps } from "./sharedTypes";
|
|
11
|
+
|
|
12
|
+
const StyledHeader = styled(Grid)({
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
display: "flex"
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const StyledGrid = styled(Grid)({
|
|
19
|
+
position: "relative",
|
|
20
|
+
"&:nth-of-type(1)": {
|
|
21
|
+
"&:after": {
|
|
22
|
+
content: "''",
|
|
23
|
+
position: "absolute",
|
|
24
|
+
right: 0,
|
|
25
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
26
|
+
height: "25%",
|
|
27
|
+
width: "1px",
|
|
28
|
+
top: `calc(12.5% - ${teamDrawCardBottomMargin}/2)`
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"&:nth-of-type(2)": {
|
|
32
|
+
"&:before": {
|
|
33
|
+
content: "''",
|
|
34
|
+
position: "absolute",
|
|
35
|
+
left: 0,
|
|
36
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
37
|
+
height: "25%",
|
|
38
|
+
width: "1px",
|
|
39
|
+
bottom: `calc(12.5% + ${teamDrawCardBottomMargin}/2)`
|
|
40
|
+
},
|
|
41
|
+
"&:after": {
|
|
42
|
+
content: "''",
|
|
43
|
+
position: "absolute",
|
|
44
|
+
right: 0,
|
|
45
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
46
|
+
height: "50%",
|
|
47
|
+
width: "1px",
|
|
48
|
+
top: `calc(25% - ${teamDrawCardBottomMargin}/2)`
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"&:nth-last-child(-n+2) .team-draw-card": {
|
|
52
|
+
"&:before": {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
content: '""',
|
|
55
|
+
width: `${teamDrawCardSideMargin}`,
|
|
56
|
+
height: "1px",
|
|
57
|
+
left: 0,
|
|
58
|
+
top: "50%",
|
|
59
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
60
|
+
transform: "translateX(-100%)"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"&:nth-of-type(-n+2) .team-draw-card": {
|
|
64
|
+
"&:after": {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
content: '""',
|
|
67
|
+
width: `${teamDrawCardSideMargin}`,
|
|
68
|
+
height: "1px",
|
|
69
|
+
right: 0,
|
|
70
|
+
top: "50%",
|
|
71
|
+
backgroundColor: "var(--cool-grey-600)",
|
|
72
|
+
transform: "translateX(100%)"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const GridSections = styled(Box)({
|
|
78
|
+
display: "flex",
|
|
79
|
+
alignItems: "center"
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const TableMobileSection = styled(Grid)({
|
|
83
|
+
flexDirection: "column"
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export default function TeamDrawCardTable({
|
|
87
|
+
headerRows, tableRows, isMobile, ...props
|
|
88
|
+
}: DrawCardTableProps) {
|
|
89
|
+
const [activeStep, setActiveStep] = React.useState(0);
|
|
90
|
+
|
|
91
|
+
const handleNext = () => {
|
|
92
|
+
setActiveStep((prevActiveStep) => prevActiveStep + 1);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleBack = () => {
|
|
96
|
+
setActiveStep((prevActiveStep) => prevActiveStep - 1);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
if (!headerRows || !tableRows) return null;
|
|
100
|
+
|
|
101
|
+
const totalColumns = Math.floor(12 / headerRows.length);
|
|
102
|
+
|
|
103
|
+
const formatTableRows = tableRows.map((row, index) => {
|
|
104
|
+
if (index > 2) return; // Table can only support 3 columns
|
|
105
|
+
const rowSectionsHeight = `${100 / tableRows[index].length}%`;
|
|
106
|
+
const sectionAmount = tableRows[index].length;
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<StyledGrid key={index} xs={totalColumns}>
|
|
110
|
+
{[...Array(sectionAmount)].map((section, idx) => (
|
|
111
|
+
<GridSections key={idx} sx={{ height: rowSectionsHeight }}>
|
|
112
|
+
{row[idx]}
|
|
113
|
+
</GridSections>
|
|
114
|
+
))}
|
|
115
|
+
</StyledGrid>
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const formatDesktopRows = (
|
|
120
|
+
<>
|
|
121
|
+
<Grid container sx={{ height: "60px" }}>
|
|
122
|
+
{headerRows.map((row) => (
|
|
123
|
+
<StyledHeader key={row.name} xs={totalColumns}>
|
|
124
|
+
<Typography category="secondary" size="small-medium-cap">
|
|
125
|
+
{row.name}
|
|
126
|
+
</Typography>
|
|
127
|
+
</StyledHeader>
|
|
128
|
+
))}
|
|
129
|
+
</Grid>
|
|
130
|
+
<Grid container>{formatTableRows}</Grid>
|
|
131
|
+
</>
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const formatMobileRows = (
|
|
135
|
+
<Box>
|
|
136
|
+
<Grid container justifyContent="space-between">
|
|
137
|
+
<Button color="inherit" disabled={activeStep === 0} onClick={handleBack} sx={{ mr: 1, alignSelf: "flex-start" }}>
|
|
138
|
+
<ArrowBackIosOutlinedIcon />
|
|
139
|
+
</Button>
|
|
140
|
+
<StyledHeader xs={totalColumns}>
|
|
141
|
+
<Typography category="secondary" size="small-medium-cap">
|
|
142
|
+
{headerRows[activeStep].name}
|
|
143
|
+
</Typography>
|
|
144
|
+
</StyledHeader>
|
|
145
|
+
<Button onClick={handleNext} disabled={activeStep === tableRows.length - 1}>
|
|
146
|
+
<ArrowForwardIosOutlinedIcon />
|
|
147
|
+
</Button>
|
|
148
|
+
</Grid>
|
|
149
|
+
<TableMobileSection container>
|
|
150
|
+
<GridSections sx={{ display: "flex", flexDirection: "column", gap: "10px" }}>{tableRows[activeStep]}</GridSections>
|
|
151
|
+
</TableMobileSection>
|
|
152
|
+
</Box>
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<Box {...props} sx={{ flexGrow: 1 }} aria-label="draw table">
|
|
157
|
+
{isMobile ? formatMobileRows : formatDesktopRows}
|
|
158
|
+
</Box>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
@@ -107,3 +107,24 @@ export const SAMPLE_CARD_DATA = {
|
|
|
107
107
|
points: 4,
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
+
|
|
111
|
+
export const SAMPLE_TEAM_PAGE_CARD_DATA = {
|
|
112
|
+
dateLabel: 'Dec 20',
|
|
113
|
+
timeLabel: '9:00pm',
|
|
114
|
+
locationLabel: 'Taube Tennis Center',
|
|
115
|
+
matchInfo: 'Round 1, Match 2',
|
|
116
|
+
isPosition1Winner: true,
|
|
117
|
+
isPosition2Winner: false,
|
|
118
|
+
position1Team: {
|
|
119
|
+
name: 'Apples',
|
|
120
|
+
points: 10,
|
|
121
|
+
href: 'https://www.reddit.com',
|
|
122
|
+
record: 2
|
|
123
|
+
},
|
|
124
|
+
position2Team: {
|
|
125
|
+
name: 'Pears',
|
|
126
|
+
points: 4,
|
|
127
|
+
href: 'https://www.reddit.com',
|
|
128
|
+
record: 2
|
|
129
|
+
}
|
|
130
|
+
};
|