@universal-tennis/ui-shared 0.1.66 → 0.1.69

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.
Files changed (29) hide show
  1. package/dist/components.d.ts +1 -1
  2. package/dist/components.js +1 -1
  3. package/dist/components.js.map +1 -1
  4. package/dist/stories/molecules/Cards/TeamDrawCard.js +2 -2
  5. package/dist/stories/molecules/Cards/TeamDrawCard.js.map +1 -1
  6. package/dist/stories/organisms/Tables/Tables.stories.js +2 -2
  7. package/dist/stories/organisms/Tables/Tables.stories.js.map +1 -1
  8. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.d.ts +3 -0
  9. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.js +52 -0
  10. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.js.map +1 -0
  11. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.d.ts +3 -0
  12. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.js +43 -0
  13. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.js.map +1 -0
  14. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.d.ts +3 -0
  15. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.js +23 -0
  16. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.js.map +1 -0
  17. package/dist/stories/organisms/Tables/TeamDrawCardTable.js +61 -31
  18. package/dist/stories/organisms/Tables/TeamDrawCardTable.js.map +1 -1
  19. package/dist/stories/organisms/Tables/sharedTypes.d.ts +7 -0
  20. package/infrastructure/azure-pipelines.yml +69 -64
  21. package/package.json +2 -3
  22. package/src/components.jsx +1 -1
  23. package/src/stories/molecules/Cards/TeamDrawCard.tsx +3 -2
  24. package/src/stories/organisms/Tables/Tables.stories.tsx +2 -2
  25. package/src/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.tsx +102 -0
  26. package/src/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.tsx +67 -0
  27. package/src/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.tsx +24 -0
  28. package/src/stories/organisms/Tables/sharedTypes.ts +9 -1
  29. package/src/stories/organisms/Tables/TeamDrawCardTable.tsx +0 -156
@@ -29,4 +29,4 @@ export { default as TeamDrawCard } from "./stories/molecules/Cards/TeamDrawCard"
29
29
  export { default as DrawCardTable } from "./stories/organisms/Tables/DrawCardTable";
30
30
  export { default as FullPageModal } from "./stories/organisms/Modals/FullPageModal";
31
31
  export { default as SortableTable } from "./stories/organisms/Tables/SortableTable";
32
- export { default as TeamDrawCardTable } from "./stories/organisms/Tables/TeamDrawCardTable";
32
+ export { default as TeamDrawCardTable } from "./stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable";
@@ -34,5 +34,5 @@ export { default as TeamDrawCard } from './stories/molecules/Cards/TeamDrawCard'
34
34
  export { default as DrawCardTable } from './stories/organisms/Tables/DrawCardTable';
35
35
  export { default as FullPageModal } from './stories/organisms/Modals/FullPageModal';
36
36
  export { default as SortableTable } from './stories/organisms/Tables/SortableTable';
37
- export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable';
37
+ export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable';
38
38
  //# sourceMappingURL=components.js.map
@@ -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,MAAM,+BA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E,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,gEAAgE,CAAC"}
@@ -12,8 +12,8 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React from "react";
13
13
  import Box from "@mui/material/Box";
14
14
  import { styled } from "@mui/material/styles";
15
- import WinnerIndicatorIcon from "stories/atoms/Icons/WinnerIndicatorIcon";
16
- import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
15
+ import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "../../utils/constants";
16
+ import WinnerIndicatorIcon from "../../atoms/Icons/WinnerIndicatorIcon";
17
17
  import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from "../../atoms/Typography/Typography";
18
18
  import SquareAvatarWithName from "../SquareAvatarWithName/SquareAvatarWithName";
19
19
  const StyledCard = styled(Box)({
@@ -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,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,oBAA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U,EAAE,KAAK,EAAC,sBAAsB,IAC1E,IAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,GAAG,CAClB,CACX;YACN,oBAAC,UAAU,IAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,IAC/E,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CACtC,CACX;QACN,oBAAC,UAAU;YACP,oBAAC,GAAG;gBACA,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM;oBACf,oBAAC,gBAAgB,IACb,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,SAAS,CACK;oBACnB,oBAAC,UAAU,IAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,aAEtD;oBACb,oBAAC,gBAAgB,IACb,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,SAAS,CACK;oBAClB,SAAS;2BACP,CACH;4BACI,oBAAC,UAAU,IAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,aAEtD;4BACb,oBAAC,gBAAgB,IACb,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,SAAS,CACK,CACpB,CACF,CACC;gBACN,oBAAC,gBAAgB,IACb,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,UAAU,IAEf,aAAa,CACC,CACjB,CACG,CACJ,CAChB,CAAC;AACJ,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import TeamDrawCard from 'stories/molecules/Cards/TeamDrawCard';
2
+ import TeamDrawCard from '../../molecules/Cards/TeamDrawCard';
3
3
  import DrawCard from '../../molecules/Cards/DrawCard';
4
4
  import DrawCardTable from './DrawCardTable';
5
- import TeamDrawCardTable from './TeamDrawCardTable';
5
+ import TeamDrawCardTable from './TeamDrawCardTable/TeamDrawCardTable';
6
6
  import { MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA, SAMPLE_TEAM_PAGE_CARD_DATA } from './mockData';
7
7
  const onOrderPropertyChange = () => { };
8
8
  // Default
@@ -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,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,0BAA0B,EACjG,MAAM,YAAY,CAAC;AAEpB,MAAM,qBAAqB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAEvC,UAAU;AACV,eAAe;IACb,KAAK,EAAE,kBAAkB;CAC1B,CAAC;AAEF,YAAY;AACZ,SAAS,qBAAqB,CAAC,IAAwB;IACrD,OAAO,oBAAC,aAAa,oBAAK,IAAI,EAAI,CAAC;AACrC,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAwB;IACzD,OAAO,oBAAC,iBAAiB,oBAAK,IAAI,EAAI,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,IAAI,EAAE,SAAS,EAAE;IACnB,EAAE,IAAI,EAAE,cAAc,EAAE;IACxB,EAAE,IAAI,EAAE,WAAW,EAAE;CACtB,CAAC;AAEF,MAAM,SAAS,GAAG;IAChB;QACI,oBAAC,QAAQ,kBAAC,cAAc,QAAC,WAAW,QAAC,UAAU,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EAAI;QACjE,oBAAC,YAAY,kBAAC,gBAAgB,UAAK,0BAA0B,EAAI;KACpE;IACD;QACI,oBAAC,YAAY,oBAAK,0BAA0B,EAAI;QAChD,oBAAC,YAAY,oBAAK,0BAA0B,EAAI;KACnD;IACD;QACI,oBAAC,YAAY,oBAAK,0BAA0B,EAAI;KACnD;CACF,CAAC;AAEF,UAAU;AACV,MAAM,CAAC,MAAM,SAAS,GAAG,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,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,3 @@
1
+ /// <reference types="react" />
2
+ import { TableRowProps } from '../sharedTypes';
3
+ export default function DesktopTableRows({ headerRows, totalColumns, tableRows }: TableRowProps): JSX.Element;
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { styled } from "@mui/material/styles";
3
+ import Grid from "@mui/material/Grid";
4
+ import Box from "@mui/material/Box";
5
+ import Typography from "../../../atoms/Typography/Typography";
6
+ import { teamDrawCardSideMargin, standardSideMargin } from "../../../utils/constants";
7
+ const StyledHeader = styled(Grid)({
8
+ alignItems: "center",
9
+ justifyContent: "center",
10
+ display: "flex"
11
+ });
12
+ const gridCommonStyles = {
13
+ content: "''",
14
+ position: "absolute",
15
+ backgroundColor: "var(--cool-grey-600)",
16
+ };
17
+ const horizontalLineCommonStyles = {
18
+ height: "1px",
19
+ top: "50%",
20
+ };
21
+ const StyledGrid = styled(Grid)({
22
+ position: "relative",
23
+ "&:nth-last-child(-n+2) .team-draw-card": {
24
+ "&:before": Object.assign(Object.assign(Object.assign({}, gridCommonStyles), horizontalLineCommonStyles), { width: `${teamDrawCardSideMargin}`, left: 0, transform: "translateX(-100%)" })
25
+ },
26
+ "&:nth-of-type(-n+2) .team-draw-card": {
27
+ "&:after": Object.assign(Object.assign(Object.assign({}, gridCommonStyles), horizontalLineCommonStyles), { width: `calc(${standardSideMargin + 1}px)`, right: 0, transform: "translateX(100%)" })
28
+ }
29
+ });
30
+ const GridSections = styled(Box)({
31
+ display: "flex",
32
+ alignItems: "center",
33
+ position: 'relative',
34
+ });
35
+ export default function DesktopTableRows({ headerRows, totalColumns, tableRows }) {
36
+ const formatTableRows = tableRows.map((row, index) => {
37
+ if (index > 2)
38
+ return; // Table can only support 3 columns
39
+ const rowSectionsHeight = `${100 / tableRows[index].length}%`;
40
+ const sectionAmount = tableRows[index].length;
41
+ const isFirstRow = index === 0;
42
+ return (React.createElement(StyledGrid, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, sx: {
43
+ height: rowSectionsHeight,
44
+ '&:before': Object.assign(Object.assign({ display: isFirstRow ? 'none' : 'block' }, gridCommonStyles), { height: `calc(50% + 1px)`, width: "1px", top: `calc(25% - 4px)` }),
45
+ } }, row[idx])))));
46
+ });
47
+ return (React.createElement(React.Fragment, null,
48
+ React.createElement(Grid, { container: true, sx: { height: "60px" } }, headerRows.map((row) => (React.createElement(StyledHeader, { key: row.name, xs: totalColumns },
49
+ React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, row.name))))),
50
+ React.createElement(Grid, { container: true }, formatTableRows)));
51
+ }
52
+ //# sourceMappingURL=DesktopTableRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesktopTableRows.js","sourceRoot":"","sources":["../../../../../src/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAGpC,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,MAAM;CAChB,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG;IACvB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,sBAAsB;CACxC,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,MAAM,EAAE,KAAK;IACb,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,UAAU;IAEpB,wCAAwC,EAAE;QACxC,UAAU,gDACL,gBAAgB,GAChB,0BAA0B,KAC7B,KAAK,EAAE,GAAG,sBAAsB,EAAE,EAClC,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,mBAAmB,GAC/B;KACF;IACD,qCAAqC,EAAE;QACrC,SAAS,gDACJ,gBAAgB,GAChB,0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CACO,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACH;QACI,oBAAC,IAAI,IAAC,SAAS,QAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IACjC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACrB,oBAAC,YAAY,IAAC,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY;YACzC,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,kBAAkB,IACnD,GAAG,CAAC,IAAI,CACA,CACF,CAClB,CAAC,CACC;QACP,oBAAC,IAAI,IAAC,SAAS,UAAE,eAAe,CAAQ,CACzC,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TableRowProps } from '../sharedTypes';
3
+ export default function MobileTableRows({ totalColumns, headerRows, tableRows }: TableRowProps): JSX.Element;
@@ -0,0 +1,43 @@
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 RightChevronIcon from '../../../atoms/Icons/RightChevronIcon';
7
+ import LeftChevronIcon from '../../../atoms/Icons/LeftChevronIcon';
8
+ import Typography from "../../../atoms/Typography/Typography";
9
+ const StyledHeader = styled(Grid)({
10
+ alignItems: "center",
11
+ justifyContent: "center",
12
+ display: "flex"
13
+ });
14
+ const GridSections = styled(Box)({
15
+ display: "flex",
16
+ alignItems: "center",
17
+ position: 'relative',
18
+ });
19
+ export default function MobileTableRows({ totalColumns, headerRows, tableRows }) {
20
+ const [activeStep, setActiveStep] = React.useState(0);
21
+ const handleNext = () => {
22
+ setActiveStep((prevActiveStep) => prevActiveStep + 1);
23
+ };
24
+ const handleBack = () => {
25
+ setActiveStep((prevActiveStep) => prevActiveStep - 1);
26
+ };
27
+ const disabledBackButton = activeStep === 0;
28
+ const disabledForwardButton = activeStep === tableRows.length - 1;
29
+ return (React.createElement(Box, null,
30
+ React.createElement(Grid, { container: true, justifyContent: "space-between", mb: 1 },
31
+ React.createElement(Button, { color: "inherit", disabled: disabledBackButton, onClick: handleBack, sx: { mr: 1, alignSelf: "flex-start" } },
32
+ React.createElement(LeftChevronIcon, { size: 16, color: disabledBackButton ? "transparent" : "var(--primary)" })),
33
+ React.createElement(StyledHeader, { xs: totalColumns },
34
+ React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, headerRows[activeStep].name)),
35
+ React.createElement(Button, { onClick: handleNext, disabled: disabledForwardButton },
36
+ React.createElement(RightChevronIcon, { size: 16, color: disabledForwardButton ? "transparent" : "var(--primary)" }))),
37
+ React.createElement(Grid, { flexDirection: "column", container: true },
38
+ React.createElement(GridSections, { sx: {
39
+ flexDirection: "column",
40
+ gap: "10px",
41
+ } }, tableRows[activeStep]))));
42
+ }
43
+ //# sourceMappingURL=MobileTableRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileTableRows.js","sourceRoot":"","sources":["../../../../../src/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAGtC,OAAO,gBAAgB,MAAM,uCAAuC,CAAC;AACrE,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAE9D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,MAAM;CAChB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,MAAM,C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CAAC,CAAC,IAAI,CACnB,CACF;YACf,oBAAC,MAAM,IAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,qBAAqB;gBACxD,oBAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB,GAAI,CAC1F,CACN;QACP,oBAAC,IAAI,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS;YAClC,oBAAC,YAAY,IACT,EAAE,EAAE;oBACF,aAAa,EAAE,QAAQ;oBACvB,GAAG,EAAE,MAAM;iBACZ,IAEA,SAAS,CAAC,UAAU,CAAC,CACX,CACZ,CACL,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DrawCardTableProps } from "../sharedTypes";
3
+ export default function TeamDrawCardTable({ headerRows, tableRows, isMobile, ...props }: DrawCardTableProps): JSX.Element | null;
@@ -0,0 +1,23 @@
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 DesktopTableRows from './DesktopTableRows';
15
+ import MobileTableRow from './MobileTableRows';
16
+ export default function TeamDrawCardTable(_a) {
17
+ var { headerRows, tableRows, isMobile } = _a, props = __rest(_a, ["headerRows", "tableRows", "isMobile"]);
18
+ if (!headerRows || !tableRows)
19
+ return null;
20
+ const totalColumns = Math.floor(12 / headerRows.length);
21
+ return (React.createElement(Box, Object.assign({}, props, { sx: { flexGrow: 1 }, "aria-label": "draw table" }), isMobile ? (React.createElement(MobileTableRow, { totalColumns: totalColumns, tableRows: tableRows, headerRows: headerRows })) : (React.createElement(DesktopTableRows, { totalColumns: totalColumns, tableRows: tableRows, headerRows: headerRows }))));
22
+ }
23
+ //# sourceMappingURL=TeamDrawCardTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamDrawCardTable.js","sourceRoot":"","sources":["../../../../../src/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAEpC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAG/C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAErB;QAFqB,EACxC,UAAU,EAAE,SAAS,EAAE,QAAQ,OACZ,EADiB,KAAK,cADD,uCAEzC,CAD0C;IAEzC,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAE3C,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAExD,OAAO,CACH,oBAAC,GAAG,oBAAK,KAAK,IAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,gBAAa,YAAY,KACvD,QAAQ,CAAC,CAAC,CAAC,CACR,oBAAC,cAAc,IAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAI,CAC/F,CAAC,CAAC,CAAC,CACA,oBAAC,gBAAgB,IAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAI,CACjG,CACC,CACT,CAAC;AACJ,CAAC"}
@@ -14,38 +14,76 @@ import Box from "@mui/material/Box";
14
14
  import Button from "@mui/material/Button";
15
15
  import { styled } from "@mui/material/styles";
16
16
  import Grid from "@mui/material/Grid";
17
- import LeftChevronIcon from 'stories/atoms/Icons/LeftChevronIcon';
18
- import RightChevronIcon from 'stories/atoms/Icons/RightChevronIcon';
19
- import { teamDrawCardSideMargin, standardSideMargin } from "stories/utils/constants";
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
20
  import Typography from "../../atoms/Typography/Typography";
21
21
  const StyledHeader = styled(Grid)({
22
22
  alignItems: "center",
23
23
  justifyContent: "center",
24
24
  display: "flex"
25
25
  });
26
- const gridCommonStyles = {
27
- content: "''",
28
- position: "absolute",
29
- backgroundColor: "var(--cool-grey-600)",
30
- };
31
- const horizontalLineCommonStyles = {
32
- height: "1px",
33
- top: "50%",
34
- };
35
26
  const StyledGrid = styled(Grid)({
36
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
+ },
37
59
  "&:nth-last-child(-n+2) .team-draw-card": {
38
- "&:before": Object.assign(Object.assign(Object.assign({}, gridCommonStyles), horizontalLineCommonStyles), { width: `${teamDrawCardSideMargin}`, left: 0, transform: "translateX(-100%)" })
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
+ }
39
70
  },
40
71
  "&:nth-of-type(-n+2) .team-draw-card": {
41
- "&:after": Object.assign(Object.assign(Object.assign({}, gridCommonStyles), horizontalLineCommonStyles), { width: `calc(${standardSideMargin + 1}px)`, right: 0, transform: "translateX(100%)" })
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
+ }
42
82
  }
43
83
  });
44
84
  const GridSections = styled(Box)({
45
85
  display: "flex",
46
- alignItems: "center",
47
- position: 'relative',
48
- "&:before": Object.assign(Object.assign({}, gridCommonStyles), { height: `calc(50% + 1px)`, width: "1px", top: `calc(25% - 4px)` })
86
+ alignItems: "center"
49
87
  });
50
88
  const TableMobileSection = styled(Grid)({
51
89
  flexDirection: "column"
@@ -67,28 +105,20 @@ export default function TeamDrawCardTable(_a) {
67
105
  return; // Table can only support 3 columns
68
106
  const rowSectionsHeight = `${100 / tableRows[index].length}%`;
69
107
  const sectionAmount = tableRows[index].length;
70
- const isFirstRow = index === 0;
71
- return (React.createElement(StyledGrid, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, sx: {
72
- height: rowSectionsHeight,
73
- '&:before': {
74
- display: isFirstRow ? 'none' : 'block',
75
- },
76
- } }, row[idx])))));
108
+ return (React.createElement(StyledGrid, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, sx: { height: rowSectionsHeight } }, row[idx])))));
77
109
  });
78
- const disabledBackButton = activeStep === 0;
79
- const disabledForwardButton = activeStep === tableRows.length - 1;
80
110
  const formatDesktopRows = (React.createElement(React.Fragment, null,
81
111
  React.createElement(Grid, { container: true, sx: { height: "60px" } }, headerRows.map((row) => (React.createElement(StyledHeader, { key: row.name, xs: totalColumns },
82
112
  React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, row.name))))),
83
113
  React.createElement(Grid, { container: true }, formatTableRows)));
84
114
  const formatMobileRows = (React.createElement(Box, null,
85
- React.createElement(Grid, { container: true, justifyContent: "space-between", mb: 1 },
86
- React.createElement(Button, { color: "inherit", disabled: disabledBackButton, onClick: handleBack, sx: { mr: 1, alignSelf: "flex-start" } },
87
- React.createElement(LeftChevronIcon, { size: 16, color: disabledBackButton ? "transparent" : "var(--primary)" })),
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)),
88
118
  React.createElement(StyledHeader, { xs: totalColumns },
89
119
  React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, headerRows[activeStep].name)),
90
- React.createElement(Button, { onClick: handleNext, disabled: disabledForwardButton },
91
- React.createElement(RightChevronIcon, { size: 16, color: disabledForwardButton ? "transparent" : "var(--primary)" }))),
120
+ React.createElement(Button, { onClick: handleNext, disabled: activeStep === tableRows.length - 1 },
121
+ React.createElement(ArrowForwardIosOutlinedIcon, null))),
92
122
  React.createElement(TableMobileSection, { container: true },
93
123
  React.createElement(GridSections, { sx: { display: "flex", flexDirection: "column", gap: "10px" } }, tableRows[activeStep]))));
94
124
  return (React.createElement(Box, Object.assign({}, props, { sx: { flexGrow: 1 }, "aria-label": "draw table" }), isMobile ? formatMobileRows : formatDesktopRows));
@@ -1 +1 @@
1
- {"version":3,"file":"TeamD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awCardTableProps = {
6
6
  tableRows: ReactNode[][];
7
7
  isMobile: boolean;
8
8
  };
9
+ export interface TableRowProps {
10
+ headerRows: {
11
+ name: string;
12
+ }[];
13
+ tableRows: ReactNode[][];
14
+ totalColumns: number;
15
+ }
@@ -12,72 +12,42 @@ variables:
12
12
  projectName: 'ui-shared'
13
13
  nodeVersion: '18.x'
14
14
  sources: 'src'
15
+ npm_token: ''
15
16
  # needed to label if the build is on a tag or not
16
17
  ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags') }}:
17
18
  gitTag: $[replace(variables['Build.SourceBranch'], 'refs/tags/', '')]
18
19
 
19
20
  stages:
20
- # - stage: sonarcloud
21
- # displayName: SonarCloud
22
- # jobs:
23
- # - job: run_sonarcloud
24
- # displayName: Prepare and Run SonarCloud
25
- # steps:
26
- # - checkout: self
27
- # fetchDepth: 0
28
- # - task: SonarCloudPrepare@1
29
- # displayName: 'Prepare SonarCloud'
30
- # inputs:
31
- # # This is an eng-admin user service connection in ADO
32
- # SonarCloud: 'utr-sonar-eng-admin'
33
- # organization: 'utr'
34
- # scannerMode: 'CLI'
35
- # configMode: 'manual'
36
- # cliProjectKey: $(projectKey)
37
- # cliProjectName: $(projectName)
38
- # cliSources: $(sources)
39
- # extraProperties: |
40
- # sonar.qualitygate.wait=true
41
- # sonar.eslint.reportPaths=$(Build.SourcesDirectory)/reports/eslint-result.json
42
- # - task: UseNode@1
43
- # displayName: 'Use Node $(nodeVersion)'
44
- # inputs:
45
- # version: $(nodeVersion)
46
- # checkLatest: true
47
- # - task: YarnInstaller@3
48
- # displayName: 'Install yarn'
49
- # inputs:
50
- # checkLatest: true
51
- # includePrerelease: false
52
- # - task: Yarn@3
53
- # displayName: 'yarn install'
54
- # inputs:
55
- # arguments: 'install'
56
- # - task: Yarn@3
57
- # displayName: 'yarn run eslint:ci'
58
- # continueOnError: true
59
- # inputs:
60
- # arguments: 'run eslint:ci'
61
- # - task: SonarCloudAnalyze@1
62
- # - task: SonarCloudPublish@1
63
- # inputs:
64
- # pollingTimeoutSec: '300'
65
-
66
- # - ${{ if ne(variables['gitTag'], '') }}:
67
- - stage: publish
68
- displayName: Publish NPM Package
69
- # dependsOn: sonarcloud
21
+ - stage: sonarcloud
22
+ displayName: SonarCloud
70
23
  jobs:
71
- - job: publish
72
- displayName: publish npm
24
+ - job: run_sonarcloud
25
+ displayName: Prepare and Run SonarCloud
73
26
  steps:
27
+ - checkout: self
28
+ fetchDepth: 0
74
29
  - task: AzureKeyVault@2
75
30
  inputs:
76
31
  azureSubscription: 'utr-azure'
77
32
  KeyVaultName: 'utr-shared-akv'
78
33
  SecretsFilter: 'NpmPublishToken'
79
- RunAsPreJob: true
34
+ OutputVariable: 'npm_token'
35
+ - task: SonarCloudPrepare@1
36
+ displayName: 'Prepare SonarCloud'
37
+ inputs:
38
+ # This is an eng-admin user service connection in ADO
39
+ SonarCloud: 'utr-sonar-eng-admin'
40
+ organization: 'utr'
41
+ scannerMode: 'CLI'
42
+ configMode: 'manual'
43
+ cliProjectKey: $(projectKey)
44
+ cliProjectName: $(projectName)
45
+ cliSources: $(sources)
46
+ extraProperties: |
47
+ sonar.qualitygate.wait=true
48
+ sonar.eslint.reportPaths=$(Build.SourcesDirectory)/reports/eslint-result.json
80
49
  - task: UseNode@1
50
+ displayName: 'Use Node $(nodeVersion)'
81
51
  inputs:
82
52
  version: $(nodeVersion)
83
53
  checkLatest: true
@@ -91,17 +61,52 @@ stages:
91
61
  inputs:
92
62
  arguments: 'install'
93
63
  env:
94
- NPM_TOKEN: $(NpmPublishToken)
64
+ NPM_TOKEN: $(npm_token)
95
65
  - task: Yarn@3
96
- displayName: 'yarn run publish:npm'
66
+ displayName: 'yarn run eslint:ci'
67
+ continueOnError: true
97
68
  inputs:
98
- arguments: 'run publish:npm'
99
- env:
100
- NPM_TOKEN: $(NpmPublishToken)
101
- - task: Bash@3
69
+ arguments: 'run eslint:ci'
70
+ - task: SonarCloudAnalyze@1
71
+ - task: SonarCloudPublish@1
102
72
  inputs:
103
- targetType: 'inline'
104
- script: |
105
- npm publish
106
- env:
107
- NPM_TOKEN: $(NpmPublishToken)
73
+ pollingTimeoutSec: '300'
74
+
75
+ - ${{ if ne(variables['gitTag'], '') }}:
76
+ - stage: publish
77
+ displayName: Publish NPM Package
78
+ # dependsOn: sonarcloud
79
+ jobs:
80
+ - job: publish
81
+ displayName: publish npm
82
+ steps:
83
+ - checkout: self
84
+ fetchDepth: 0
85
+ - task: UseNode@1
86
+ inputs:
87
+ version: $(nodeVersion)
88
+ checkLatest: true
89
+ - task: YarnInstaller@3
90
+ displayName: 'Install yarn'
91
+ inputs:
92
+ checkLatest: true
93
+ includePrerelease: false
94
+ - task: Yarn@3
95
+ displayName: 'yarn install'
96
+ inputs:
97
+ arguments: 'install'
98
+ env:
99
+ NPM_TOKEN: $(npm_token)
100
+ - task: Yarn@3
101
+ displayName: 'yarn run publish:npm'
102
+ inputs:
103
+ arguments: 'run publish:npm'
104
+ env:
105
+ NPM_TOKEN: $(npm_token)
106
+ - task: Bash@3
107
+ inputs:
108
+ targetType: 'inline'
109
+ script: |
110
+ npm publish
111
+ env:
112
+ NPM_TOKEN: $(npm_token)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-tennis/ui-shared",
3
- "version": "0.1.66",
3
+ "version": "0.1.69",
4
4
  "main": "dist/items.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://universaltennis.com",
@@ -25,8 +25,7 @@
25
25
  "publish:npm": "tsc && yarn copy-files",
26
26
  "publish-package": "npm publish --access public",
27
27
  "copy-files": "copyfiles -u 1 src/stories/assets/*.svg src/stories/assets/*.png src/stories/assets/*.gif src/stories/assets/css/*.css dist/",
28
- "eslint": "npx eslint --ext .jsx,.js src --fix",
29
- "eslint:ci": "npx eslint --ext .jsx,.js src --format json --output-file reports/eslint-result.json"
28
+ "eslint": "npx eslint --ext .jsx,.js src --fix"
30
29
  },
31
30
  "eslintConfig": {
32
31
  "extends": [
@@ -38,4 +38,4 @@ export { default as TeamDrawCard } from './stories/molecules/Cards/TeamDrawCard'
38
38
  export { default as DrawCardTable } from './stories/organisms/Tables/DrawCardTable';
39
39
  export { default as FullPageModal } from './stories/organisms/Modals/FullPageModal';
40
40
  export { default as SortableTable } from './stories/organisms/Tables/SortableTable';
41
- export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable';
41
+ export { default as TeamDrawCardTable } from './stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable';
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
2
  import Box from "@mui/material/Box";
3
3
  import { styled } from "@mui/material/styles";
4
- import WinnerIndicatorIcon from "stories/atoms/Icons/WinnerIndicatorIcon";
5
- import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "stories/utils/constants";
4
+
5
+ import { teamDrawCardSideMargin, teamDrawCardBottomMargin } from "../../utils/constants";
6
+ import WinnerIndicatorIcon from "../../atoms/Icons/WinnerIndicatorIcon";
6
7
  import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from "../../atoms/Typography/Typography";
7
8
  import SquareAvatarWithName from "../SquareAvatarWithName/SquareAvatarWithName";
8
9
  import { TeamDrawCardProps } from "./sharedTypes";
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import TeamDrawCard from 'stories/molecules/Cards/TeamDrawCard';
2
+ import TeamDrawCard from '../../molecules/Cards/TeamDrawCard';
3
3
  import DrawCard from '../../molecules/Cards/DrawCard';
4
4
  import DrawCardTable from './DrawCardTable';
5
- import TeamDrawCardTable from './TeamDrawCardTable';
5
+ import TeamDrawCardTable from './TeamDrawCardTable/TeamDrawCardTable';
6
6
  import { DrawCardTableProps } from './sharedTypes';
7
7
  import {
8
8
  MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA, SAMPLE_TEAM_PAGE_CARD_DATA
@@ -0,0 +1,102 @@
1
+ import React from "react";
2
+ import { styled } from "@mui/material/styles";
3
+ import Grid from "@mui/material/Grid";
4
+ import Box from "@mui/material/Box";
5
+
6
+ import { TableRowProps } from '../sharedTypes';
7
+ import Typography from "../../../atoms/Typography/Typography";
8
+ import { teamDrawCardSideMargin, standardSideMargin } from "../../../utils/constants";
9
+
10
+ const StyledHeader = styled(Grid)({
11
+ alignItems: "center",
12
+ justifyContent: "center",
13
+ display: "flex"
14
+ });
15
+
16
+ const gridCommonStyles = {
17
+ content: "''",
18
+ position: "absolute",
19
+ backgroundColor: "var(--cool-grey-600)",
20
+ };
21
+
22
+ const horizontalLineCommonStyles = {
23
+ height: "1px",
24
+ top: "50%",
25
+ };
26
+
27
+ const StyledGrid = styled(Grid)({
28
+ position: "relative",
29
+
30
+ "&:nth-last-child(-n+2) .team-draw-card": {
31
+ "&:before": {
32
+ ...gridCommonStyles,
33
+ ...horizontalLineCommonStyles,
34
+ width: `${teamDrawCardSideMargin}`,
35
+ left: 0,
36
+ transform: "translateX(-100%)"
37
+ }
38
+ },
39
+ "&:nth-of-type(-n+2) .team-draw-card": {
40
+ "&:after": {
41
+ ...gridCommonStyles,
42
+ ...horizontalLineCommonStyles,
43
+ width: `calc(${standardSideMargin + 1}px)`,
44
+ right: 0,
45
+ transform: "translateX(100%)"
46
+ }
47
+ }
48
+ });
49
+
50
+ const GridSections = styled(Box)({
51
+ display: "flex",
52
+ alignItems: "center",
53
+ position: 'relative',
54
+ });
55
+
56
+ export default function DesktopTableRows({
57
+ headerRows, totalColumns, tableRows
58
+ }: TableRowProps) {
59
+ const formatTableRows = tableRows.map((row, index) => {
60
+ if (index > 2) return; // Table can only support 3 columns
61
+ const rowSectionsHeight = `${100 / tableRows[index].length}%`;
62
+ const sectionAmount = tableRows[index].length;
63
+ const isFirstRow = index === 0;
64
+
65
+ return (
66
+ <StyledGrid key={index} xs={totalColumns}>
67
+ {[...Array(sectionAmount)].map((section, idx) => (
68
+ <GridSections
69
+ key={idx}
70
+ sx={{
71
+ height: rowSectionsHeight,
72
+ '&:before': {
73
+ display: isFirstRow ? 'none' : 'block',
74
+ ...gridCommonStyles,
75
+ height: `calc(50% + 1px)`,
76
+ width: "1px",
77
+ top: `calc(25% - 4px)`
78
+ },
79
+ }}
80
+ >
81
+ {row[idx]}
82
+ </GridSections>
83
+ ))}
84
+ </StyledGrid>
85
+ );
86
+ });
87
+
88
+ return (
89
+ <>
90
+ <Grid container sx={{ height: "60px" }}>
91
+ {headerRows.map((row) => (
92
+ <StyledHeader key={row.name} xs={totalColumns}>
93
+ <Typography category="secondary" size="small-medium-cap">
94
+ {row.name}
95
+ </Typography>
96
+ </StyledHeader>
97
+ ))}
98
+ </Grid>
99
+ <Grid container>{formatTableRows}</Grid>
100
+ </>
101
+ );
102
+ }
@@ -0,0 +1,67 @@
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
+
7
+ import { TableRowProps } from '../sharedTypes';
8
+ import RightChevronIcon from '../../../atoms/Icons/RightChevronIcon';
9
+ import LeftChevronIcon from '../../../atoms/Icons/LeftChevronIcon';
10
+ import Typography from "../../../atoms/Typography/Typography";
11
+
12
+ const StyledHeader = styled(Grid)({
13
+ alignItems: "center",
14
+ justifyContent: "center",
15
+ display: "flex"
16
+ });
17
+
18
+ const GridSections = styled(Box)({
19
+ display: "flex",
20
+ alignItems: "center",
21
+ position: 'relative',
22
+ });
23
+
24
+ export default function MobileTableRows({
25
+ totalColumns, headerRows, tableRows
26
+ }: TableRowProps) {
27
+ const [activeStep, setActiveStep] = React.useState(0);
28
+
29
+ const handleNext = () => {
30
+ setActiveStep((prevActiveStep) => prevActiveStep + 1);
31
+ };
32
+
33
+ const handleBack = () => {
34
+ setActiveStep((prevActiveStep) => prevActiveStep - 1);
35
+ };
36
+
37
+ const disabledBackButton = activeStep === 0;
38
+ const disabledForwardButton = activeStep === tableRows.length - 1;
39
+
40
+ return (
41
+ <Box>
42
+ <Grid container justifyContent="space-between" mb={1}>
43
+ <Button color="inherit" disabled={disabledBackButton} onClick={handleBack} sx={{ mr: 1, alignSelf: "flex-start" }}>
44
+ <LeftChevronIcon size={16} color={disabledBackButton ? "transparent" : "var(--primary)"} />
45
+ </Button>
46
+ <StyledHeader xs={totalColumns}>
47
+ <Typography category="secondary" size="small-medium-cap">
48
+ {headerRows[activeStep].name}
49
+ </Typography>
50
+ </StyledHeader>
51
+ <Button onClick={handleNext} disabled={disabledForwardButton}>
52
+ <RightChevronIcon size={16} color={disabledForwardButton ? "transparent" : "var(--primary)"} />
53
+ </Button>
54
+ </Grid>
55
+ <Grid flexDirection="column" container>
56
+ <GridSections
57
+ sx={{
58
+ flexDirection: "column",
59
+ gap: "10px",
60
+ }}
61
+ >
62
+ {tableRows[activeStep]}
63
+ </GridSections>
64
+ </Grid>
65
+ </Box>
66
+ );
67
+ }
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import Box from "@mui/material/Box";
3
+
4
+ import DesktopTableRows from './DesktopTableRows';
5
+ import MobileTableRow from './MobileTableRows';
6
+ import { DrawCardTableProps } from "../sharedTypes";
7
+
8
+ export default function TeamDrawCardTable({
9
+ headerRows, tableRows, isMobile, ...props
10
+ }: DrawCardTableProps) {
11
+ if (!headerRows || !tableRows) return null;
12
+
13
+ const totalColumns = Math.floor(12 / headerRows.length);
14
+
15
+ return (
16
+ <Box {...props} sx={{ flexGrow: 1 }} aria-label="draw table">
17
+ {isMobile ? (
18
+ <MobileTableRow totalColumns={totalColumns} tableRows={tableRows} headerRows={headerRows} />
19
+ ) : (
20
+ <DesktopTableRows totalColumns={totalColumns} tableRows={tableRows} headerRows={headerRows} />
21
+ )}
22
+ </Box>
23
+ );
24
+ }
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  export type DrawCardTableProps = {
4
4
  headerRows: {
@@ -7,3 +7,11 @@ export type DrawCardTableProps = {
7
7
  tableRows: ReactNode[][];
8
8
  isMobile: boolean;
9
9
  }
10
+
11
+ export interface TableRowProps {
12
+ headerRows: {
13
+ name: string;
14
+ }[],
15
+ tableRows: ReactNode[][];
16
+ totalColumns: number;
17
+ }
@@ -1,156 +0,0 @@
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
-
7
- import LeftChevronIcon from 'stories/atoms/Icons/LeftChevronIcon';
8
- import RightChevronIcon from 'stories/atoms/Icons/RightChevronIcon';
9
- import { teamDrawCardSideMargin, standardSideMargin } from "stories/utils/constants";
10
- import Typography from "../../atoms/Typography/Typography";
11
- import { DrawCardTableProps } from "./sharedTypes";
12
-
13
- const StyledHeader = styled(Grid)({
14
- alignItems: "center",
15
- justifyContent: "center",
16
- display: "flex"
17
- });
18
-
19
- const gridCommonStyles = {
20
- content: "''",
21
- position: "absolute",
22
- backgroundColor: "var(--cool-grey-600)",
23
- };
24
-
25
- const horizontalLineCommonStyles = {
26
- height: "1px",
27
- top: "50%",
28
- };
29
-
30
- const StyledGrid = styled(Grid)({
31
- position: "relative",
32
-
33
- "&:nth-last-child(-n+2) .team-draw-card": {
34
- "&:before": {
35
- ...gridCommonStyles,
36
- ...horizontalLineCommonStyles,
37
- width: `${teamDrawCardSideMargin}`,
38
- left: 0,
39
- transform: "translateX(-100%)"
40
- }
41
- },
42
- "&:nth-of-type(-n+2) .team-draw-card": {
43
- "&:after": {
44
- ...gridCommonStyles,
45
- ...horizontalLineCommonStyles,
46
- width: `calc(${standardSideMargin + 1}px)`,
47
- right: 0,
48
- transform: "translateX(100%)"
49
- }
50
- }
51
- });
52
-
53
- const GridSections = styled(Box)({
54
- display: "flex",
55
- alignItems: "center",
56
- position: 'relative',
57
-
58
- "&:before": {
59
- ...gridCommonStyles,
60
- height: `calc(50% + 1px)`,
61
- width: "1px",
62
- top: `calc(25% - 4px)`
63
- }
64
- });
65
-
66
- const TableMobileSection = styled(Grid)({
67
- flexDirection: "column"
68
- });
69
-
70
- export default function TeamDrawCardTable({
71
- headerRows, tableRows, isMobile, ...props
72
- }: DrawCardTableProps) {
73
- const [activeStep, setActiveStep] = React.useState(0);
74
-
75
- const handleNext = () => {
76
- setActiveStep((prevActiveStep) => prevActiveStep + 1);
77
- };
78
-
79
- const handleBack = () => {
80
- setActiveStep((prevActiveStep) => prevActiveStep - 1);
81
- };
82
-
83
- if (!headerRows || !tableRows) return null;
84
-
85
- const totalColumns = Math.floor(12 / headerRows.length);
86
-
87
- const formatTableRows = tableRows.map((row, index) => {
88
- if (index > 2) return; // Table can only support 3 columns
89
- const rowSectionsHeight = `${100 / tableRows[index].length}%`;
90
- const sectionAmount = tableRows[index].length;
91
- const isFirstRow = index === 0;
92
-
93
- return (
94
- <StyledGrid key={index} xs={totalColumns}>
95
- {[...Array(sectionAmount)].map((section, idx) => (
96
- <GridSections
97
- key={idx}
98
- sx={{
99
- height: rowSectionsHeight,
100
- '&:before': {
101
- display: isFirstRow ? 'none' : 'block',
102
- },
103
- }}
104
- >
105
- {row[idx]}
106
- </GridSections>
107
- ))}
108
- </StyledGrid>
109
- );
110
- });
111
-
112
- const disabledBackButton = activeStep === 0;
113
- const disabledForwardButton = activeStep === tableRows.length - 1;
114
-
115
- const formatDesktopRows = (
116
- <>
117
- <Grid container sx={{ height: "60px" }}>
118
- {headerRows.map((row) => (
119
- <StyledHeader key={row.name} xs={totalColumns}>
120
- <Typography category="secondary" size="small-medium-cap">
121
- {row.name}
122
- </Typography>
123
- </StyledHeader>
124
- ))}
125
- </Grid>
126
- <Grid container>{formatTableRows}</Grid>
127
- </>
128
- );
129
-
130
- const formatMobileRows = (
131
- <Box>
132
- <Grid container justifyContent="space-between" mb={1}>
133
- <Button color="inherit" disabled={disabledBackButton} onClick={handleBack} sx={{ mr: 1, alignSelf: "flex-start" }}>
134
- <LeftChevronIcon size={16} color={disabledBackButton ? "transparent" : "var(--primary)"} />
135
- </Button>
136
- <StyledHeader xs={totalColumns}>
137
- <Typography category="secondary" size="small-medium-cap">
138
- {headerRows[activeStep].name}
139
- </Typography>
140
- </StyledHeader>
141
- <Button onClick={handleNext} disabled={disabledForwardButton}>
142
- <RightChevronIcon size={16} color={disabledForwardButton ? "transparent" : "var(--primary)"} />
143
- </Button>
144
- </Grid>
145
- <TableMobileSection container>
146
- <GridSections sx={{ display: "flex", flexDirection: "column", gap: "10px" }}>{tableRows[activeStep]}</GridSections>
147
- </TableMobileSection>
148
- </Box>
149
- );
150
-
151
- return (
152
- <Box {...props} sx={{ flexGrow: 1 }} aria-label="draw table">
153
- {isMobile ? formatMobileRows : formatDesktopRows}
154
- </Box>
155
- );
156
- }