@universal-tennis/ui-shared 0.0.24 → 0.1.0

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 (52) hide show
  1. package/.storybook/preview.js +1 -0
  2. package/.storybook/variables.css +12 -0
  3. package/dist/components.js +1 -1
  4. package/dist/components.js.map +1 -1
  5. package/dist/stories/assets/css/variables.css +12 -0
  6. package/dist/stories/atoms/Button/Button.js +12 -13
  7. package/dist/stories/atoms/Button/Button.js.map +1 -1
  8. package/dist/stories/atoms/Typography/Typography.d.ts +1 -0
  9. package/dist/stories/atoms/Typography/Typography.js +4 -3
  10. package/dist/stories/atoms/Typography/Typography.js.map +1 -1
  11. package/dist/stories/molecules/Cards/Cards.stories.d.ts +1 -0
  12. package/dist/stories/molecules/Cards/Cards.stories.js +24 -0
  13. package/dist/stories/molecules/Cards/Cards.stories.js.map +1 -1
  14. package/dist/stories/molecules/Cards/ContactCard.d.ts +1 -7
  15. package/dist/stories/molecules/Cards/ContactCard.js.map +1 -1
  16. package/dist/stories/molecules/Cards/DrawCard.d.ts +3 -0
  17. package/dist/stories/molecules/Cards/DrawCard.js +66 -0
  18. package/dist/stories/molecules/Cards/DrawCard.js.map +1 -0
  19. package/dist/stories/molecules/Cards/TeamCard.d.ts +1 -5
  20. package/dist/stories/molecules/Cards/TeamCard.js.map +1 -1
  21. package/dist/stories/molecules/Cards/shared.js +1 -2
  22. package/dist/stories/molecules/Cards/shared.js.map +1 -1
  23. package/dist/stories/molecules/Cards/sharedTypes.d.ts +27 -0
  24. package/dist/stories/molecules/Cards/sharedTypes.js +3 -0
  25. package/dist/stories/molecules/Cards/sharedTypes.js.map +1 -0
  26. package/dist/stories/organisms/DrawCardTable.d.ts +3 -0
  27. package/dist/stories/organisms/DrawCardTable.js +40 -0
  28. package/dist/stories/organisms/DrawCardTable.js.map +1 -0
  29. package/dist/stories/organisms/Tables.stories.d.ts +5 -0
  30. package/dist/stories/organisms/Tables.stories.js +63 -0
  31. package/dist/stories/organisms/Tables.stories.js.map +1 -0
  32. package/dist/stories/organisms/sharedTypes.d.ts +7 -0
  33. package/dist/stories/organisms/sharedTypes.js +2 -0
  34. package/dist/stories/organisms/sharedTypes.js.map +1 -0
  35. package/package.json +1 -1
  36. package/src/components.jsx +1 -1
  37. package/src/stories/assets/css/variables.css +12 -0
  38. package/src/stories/atoms/Button/Button.tsx +12 -13
  39. package/src/stories/atoms/Typography/Typography.tsx +4 -3
  40. package/src/stories/molecules/Cards/Cards.stories.tsx +30 -13
  41. package/src/stories/molecules/Cards/ContactCard.tsx +1 -7
  42. package/src/stories/molecules/Cards/DrawCard.tsx +102 -0
  43. package/src/stories/molecules/Cards/TeamCard.tsx +1 -5
  44. package/src/stories/molecules/Cards/shared.tsx +1 -2
  45. package/src/stories/molecules/Cards/sharedTypes.ts +32 -0
  46. package/src/stories/organisms/DrawCardTable.tsx +57 -0
  47. package/src/stories/organisms/Tables.stories.tsx +69 -0
  48. package/src/stories/organisms/sharedTypes.ts +8 -0
  49. package/dist/stories/theme/colors.d.ts +0 -10
  50. package/dist/stories/theme/colors.js +0 -11
  51. package/dist/stories/theme/colors.js.map +0 -1
  52. package/src/stories/theme/colors.ts +0 -10
@@ -1,4 +1,5 @@
1
1
  import "./typography.css";
2
+ import './variables.css';
2
3
 
3
4
  export const parameters = {
4
5
  actions: { argTypesRegex: "^on[A-Z].*" },
@@ -0,0 +1,12 @@
1
+ :root {
2
+ --primary: #008ded;
3
+ --secondary: #e0004f;
4
+ --disabled: #bac6d6;
5
+ --black: #000;
6
+ --white: #fff;
7
+ --light-grey: #d7e0ea;
8
+ --darkest-grey: #3b4859;
9
+ --cool-grey-600: #A7B2C1;
10
+ --cool-grey-300: #DDE3EB;
11
+ --cool-grey-150: #F0F4F9;
12
+ }
@@ -1,4 +1,4 @@
1
- import "./stories/assets/css/typography.css";
1
+ import "./stories/assets/css/variables.css";
2
2
  // ATOMS
3
3
  export { default as Button } from './stories/atoms/Button/Button';
4
4
  export { default as Typography } from './stories/atoms/Typography/Typography';
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAE7C,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAE9E,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEzE,aAAa"}
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,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAE9E,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEzE,aAAa"}
@@ -0,0 +1,12 @@
1
+ :root {
2
+ --primary: #008ded;
3
+ --secondary: #e0004f;
4
+ --disabled: #bac6d6;
5
+ --black: #000;
6
+ --white: #fff;
7
+ --light-grey: #d7e0ea;
8
+ --darkest-grey: #3b4859;
9
+ --cool-grey-600: #A7B2C1;
10
+ --cool-grey-300: #DDE3EB;
11
+ --cool-grey-150: #F0F4F9;
12
+ }
@@ -12,7 +12,6 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React from 'react';
13
13
  import MuiButton from '@mui/material/Button';
14
14
  import { styled } from '@mui/material/styles';
15
- import { colors } from '../../theme/colors';
16
15
  const StyledButton = styled(MuiButton)({
17
16
  borderRadius: '24px',
18
17
  fontSize: '12px',
@@ -26,33 +25,33 @@ const StyledButton = styled(MuiButton)({
26
25
  },
27
26
  });
28
27
  const PrimaryButton = styled(StyledButton)((props) => ({
29
- backgroundColor: colors.black,
30
- color: colors.white,
28
+ backgroundColor: 'var(--black)',
29
+ color: 'var(--white)',
31
30
  width: props.isExpanded ? '100%' : 'inherit',
32
31
  '&:hover': {
33
- backgroundColor: colors.darkestGrey,
34
- borderColor: colors.darkestGrey,
32
+ backgroundColor: 'var(--darkest-grey)',
33
+ borderColor: 'var(--darkest-grey)',
35
34
  },
36
35
  '&:disabled': {
37
- backgroundColor: colors.lightGrey,
38
- borderColor: colors.lightGrey,
36
+ backgroundColor: 'var(--light-grey)',
37
+ borderColor: 'var(--light-grey)',
39
38
  },
40
39
  }));
41
40
  const SecondaryButton = styled(StyledButton)({
42
- borderColor: colors.black,
41
+ borderColor: 'var(--black)',
43
42
  backgroundColor: 'transparent',
44
- color: colors.black,
43
+ color: 'var(--black)',
45
44
  '&:hover': {
46
- borderColor: colors.darkestGrey,
45
+ borderColor: 'var(--darkest-grey)',
47
46
  },
48
47
  '&:disabled': {
49
- borderColor: colors.disabled
48
+ borderColor: 'var(--disabled)'
50
49
  },
51
50
  });
52
51
  const LinkButton = styled(MuiButton)({
53
52
  borderColor: 'transparent',
54
53
  backgroundColor: 'transparent',
55
- color: colors.primary,
54
+ color: 'var(--primary)',
56
55
  textTransform: 'inherit',
57
56
  justifyContent: 'left',
58
57
  padding: 0,
@@ -60,7 +59,7 @@ const LinkButton = styled(MuiButton)({
60
59
  backgroundColor: 'transparent',
61
60
  },
62
61
  '&:disabled': {
63
- borderColor: colors.disabled
62
+ borderColor: 'var(--disabled)'
64
63
  },
65
64
  });
66
65
  export default function Button(_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAqB,MAAM,OAA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A6C;QAA7C,EAAE,QAAQ,EAAE,QAAQ,OAAyB,EAApB,KAAK,cAA9B,wBAAgC,CAAF;IAC3D,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,aAAa,oBACR,KAAK,GAER,QAAQ,CACK,CACjB,CAAC;QACJ,KAAK,kBAAkB;YACrB,OAAO,CACH,oBAAC,aAAa,kBACZ,UAAU,UACN,KAAK,GAER,QAAQ,CACK,CACnB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,eAAe,oBACV,KAAK,GAER,QAAQ,CACO,CACnB,CAAC;QACJ,KAAK,MAAM;YACT,OAAO,CACH,oBAAC,UAAU,kBACT,kBAAkB,UACd,KAAK,GAER,QAAQ,CACE,CAChB,CAAC;QACJ;YACE,OAAO,CACH,oBAAC,YAAY,oBACP,KAAK,GAEV,QAAQ,CACM,CAClB,CAAC;KACL;AACH,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React, { ReactElement } from 'react';
2
+ import "../../assets/css/typography.css";
2
3
  type TypographyProps = {
3
4
  children: string | ReactElement;
4
5
  category?: string;
@@ -12,6 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React from 'react';
13
13
  import MuiTypography from '@mui/material/Typography';
14
14
  import { styled } from '@mui/material/styles';
15
+ import "../../assets/css/typography.css";
15
16
  const DISPLAY_SIZES = {
16
17
  "XXX-large": '120px',
17
18
  "XX-large": '100px',
@@ -46,17 +47,17 @@ const SECONDARY_SIZES = {
46
47
  "xx-small-book": '10px',
47
48
  };
48
49
  const DisplayTypography = styled(MuiTypography)((props) => ({
49
- fontFamily: `'UTR Numerals', 'Tungsten A', 'Tungsten B'`,
50
+ fontFamily: 'var(--display-font)',
50
51
  fontSize: DISPLAY_SIZES[props.size],
51
52
  fontWeight: props.weight
52
53
  }));
53
54
  const PrimaryTypography = styled(MuiTypography)((props) => ({
54
- fontFamily: `'Tungsten A', 'Tungsten B', 'Helvetica', Arial, sans-serif`,
55
+ fontFamily: 'var(--primary-font)',
55
56
  fontSize: PRIMARY_SIZES[props.size],
56
57
  fontWeight: props.weight
57
58
  }));
58
59
  const SecondaryTypography = styled(MuiTypography)((props) => ({
59
- fontFamily: `'Gotham SSm A', 'Gotham SSm B', 'Helvetica', Arial, sans-serif`,
60
+ fontFamily: 'var(--secondary-font)',
60
61
  fontSize: SECONDARY_SIZES[props.size],
61
62
  textTransform: props.isCap ? 'uppercase' : 'inherit',
62
63
  fontWeight: props.weight
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAe9C,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,MAAM;IACb,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;CACtB,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,YAAY,EAAE,MAAM;IACpB,YAAY,EAAE,MAAM;IACpB,aAAa,EAAE,MAAM;IACrB,iBAAiB,EAAE,MAAM;IACzB,eAAe,EAAE,MAAM;IACvB,aAAa,EAAE,MAAM;IACrB,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,MAAM;CACvB,CAAC;AAEF,MAAM,eAAe,GAAG;IACtB,cAAc,EAAE,MAAM;IACtB,YAAY,EAAE,MAAM;IACpB,eAAe,EAAE,MAAM;IACvB,aAAa,EAAE,MAAM;IACrB,kBAAkB,EAAE,MAAM;IAC1B,cAAc,EAAE,MAAM;IACtB,YAAY,EAAE,MAAM;IACpB,oBAAoB,EAAE,MAAM;IAC5B,gBAAgB,EAAE,MAAM;IACxB,kBAAkB,EAA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AC;YAC7B,MAAM,GAAG,GAAG,CAAC;YACb,MAAM;QAER,KAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,CAAC,MAAM,CAAC;YACzB,MAAM,GAAG,GAAG,CAAC;YAEb,MAAM;QACR;YACE,MAAM,GAAG,GAAG,CAAC;YAEb,MAAM;KACT;IAED,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,iBAAiB,kBAChB,IAAI,EAAE,IAAI,IACN,KAAK,GAER,QAAQ,CACS,CACrB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,mBAAmB,kBAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,IACV,KAAK,GAER,QAAQ,CACW,CACvB,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO,CACL,oBAAC,iBAAiB,kBAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IACV,KAAK,GAER,QAAQ,CACS,CACrB,CAAC;QACJ;YACE,OAAO,CACH,oBAAC,iBAAiB,kBAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IACV,KAAK,GAEV,QAAQ,CACW,CACvB,CAAC;KACL;AACH,CAAC"}
@@ -4,3 +4,4 @@ declare const _default: {
4
4
  export default _default;
5
5
  export declare const Contact: any;
6
6
  export declare const Team: any;
7
+ export declare const Draw: any;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import ContactCard from './ContactCard';
3
3
  import TeamCard from './TeamCard';
4
+ import DrawCard from './DrawCard';
4
5
  // Default
5
6
  export default {
6
7
  title: 'Molecules/Cards',
@@ -12,6 +13,10 @@ function ContactCardTemplate(args) {
12
13
  function TeamCardTemplate(args) {
13
14
  return React.createElement(TeamCard, Object.assign({}, args));
14
15
  }
16
+ function DrawCardTemplate(args) {
17
+ return (React.createElement("div", { style: { width: '372px' } },
18
+ React.createElement(DrawCard, Object.assign({}, args))));
19
+ }
15
20
  // Stories
16
21
  export const Contact = ContactCardTemplate.bind({});
17
22
  Contact.args = {
@@ -24,4 +29,23 @@ Team.args = {
24
29
  title: 'team 1',
25
30
  description: 'Captained by Lenny McDowell, Josh Palmer, and Michael Ballast. Requires a passcode for registration.'
26
31
  };
32
+ export const Draw = DrawCardTemplate.bind({});
33
+ Draw.args = {
34
+ choices: [
35
+ {
36
+ id: 1,
37
+ label: 'Team 1',
38
+ },
39
+ {
40
+ id: 2,
41
+ label: 'Team 2',
42
+ }
43
+ ],
44
+ selectedTeams: {
45
+ teamOne: 1,
46
+ teamTwo: 2,
47
+ },
48
+ dateLabel: 'Dec 20 at 9:00am',
49
+ locationLabel: 'Taube Tennis Center',
50
+ };
27
51
  //# sourceMappingURL=Cards.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cards.stories.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/Cards.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAelC,UAAU;AACV,eAAe;IACb,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,YAAY;AACZ,SAAS,mBAAmB,CAAC,IAAsB;IACjD,OAAO,oBAAC,WAAW,oBAAK,IAAI,EAAI,CAAC;AACnC,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAmB;IAC3C,OAAO,oBAAC,QAAQ,oBAAK,IAAI,EAAI,CAAC;AAChC,CAAC;AAED,UAAU;AACV,MAAM,CAAC,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,C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,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,IAAI,CAAC,IAAI,GAAG;IACV,OAAO,EAAE;QACP;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;KACF;IACD,aAAa,EAAE;QACb,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;KACX;IACD,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,qBAAqB;CACrC,CAAC"}
@@ -1,9 +1,3 @@
1
1
  /// <reference types="react" />
2
- type ContactCardProps = {
3
- name: string;
4
- phone: string;
5
- email: string;
6
- onMessageClick?: VoidFunction;
7
- };
2
+ import { ContactCardProps } from './sharedTypes';
8
3
  export default function ContactCard({ name, phone, email, onMessageClick, ...props }: ContactCardProps): JSX.Element;
9
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ContactCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/ContactCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AACjD,OAAO,sBAAsB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAStC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAEjB;QAFiB,EAClC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,OACjB,EADsB,KAAK,cADV,4CAEnC,CAD6C;IAE5C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG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;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DrawCardProps } from "./sharedTypes";
3
+ export default function DrawCard({ choices, onChange, onEditClick, selectedTeams, dateLabel, locationLabel, ...props }: DrawCardProps): JSX.Element;
@@ -0,0 +1,66 @@
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 MuiSelect from '@mui/material/Select';
16
+ import MenuItem from '@mui/material/MenuItem';
17
+ import Button from '../../atoms/Button/Button';
18
+ import Typography from '../../atoms/Typography/Typography';
19
+ const StyledCard = styled(Box)({
20
+ display: 'flex',
21
+ flexDirection: 'column',
22
+ borderRadius: '4px',
23
+ padding: '16px 24px',
24
+ width: '100%',
25
+ backgroundColor: 'var(--cool-grey-150)',
26
+ '&:hover': {
27
+ cursor: 'pointer'
28
+ },
29
+ });
30
+ const StyledMuiSelect = styled(MuiSelect)({
31
+ border: '1px solid var(--cool-grey-600)',
32
+ });
33
+ const BottomGrid = styled(Box)({
34
+ display: 'flex',
35
+ alignItems: 'center',
36
+ justifyContent: 'space-between',
37
+ paddingTop: '32px',
38
+ });
39
+ export default function DrawCard(_a) {
40
+ var { choices, onChange, onEditClick, selectedTeams, dateLabel, locationLabel } = _a, props = __rest(_a, ["choices", "onChange", "onEditClick", "selectedTeams", "dateLabel", "locationLabel"]);
41
+ const { teamOne, teamTwo } = selectedTeams || null;
42
+ const handleOnTeamOneChange = () => {
43
+ if (onChange) {
44
+ onChange(0);
45
+ }
46
+ };
47
+ const handleOnTeamTwoChange = () => {
48
+ if (onChange) {
49
+ onChange(1);
50
+ }
51
+ };
52
+ return (React.createElement(StyledCard, Object.assign({}, props),
53
+ React.createElement(StyledMuiSelect, { labelId: "draw-card-select-label-top", id: "draw-card-select-top", value: teamOne, label: "teamOne", onChange: handleOnTeamOneChange }, choices.map((choice) => React.createElement(MenuItem, { value: choice.id }, choice.label))),
54
+ React.createElement(Box, { pt: 1 }),
55
+ React.createElement(StyledMuiSelect, { labelId: "draw-card-select-label-bot", id: "draw-card-select-bot", value: teamTwo, label: "teamTwo", onChange: handleOnTeamTwoChange }, choices.map((choice) => React.createElement(MenuItem, { value: choice.id }, choice.label))),
56
+ React.createElement(BottomGrid, null,
57
+ React.createElement(Box, null,
58
+ React.createElement(Typography, { category: "secondary", size: "small-book" }, dateLabel),
59
+ React.createElement(Typography, { category: "secondary", size: "small-book" }, locationLabel)),
60
+ React.createElement(Button, { style: {
61
+ display: 'flex',
62
+ justifyContent: 'end'
63
+ }, onClick: onEditClick, category: "link" },
64
+ React.createElement(Typography, { category: "secondary", size: "x-small-medium-cap" }, "Edit")))));
65
+ }
66
+ //# sourceMappingURL=DrawCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/DrawCard.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,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAG3D,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,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AC,KAAK,EAAE,MAAM,CAAC,EAAE,IAAG,MAAM,CAAC,KAAK,CAAY,CAAC,CAC/D;QAEhB,oBAAC,GAAG,IAAC,EAAE,EAAE,CAAC,GAAI;QAEhB,oBAAC,eAAe,IACd,OAAO,EAAC,4BAA4B,EACpC,EAAE,EAAC,sBAAsB,EACzB,KAAK,EAAE,OAAO,EACd,KAAK,EAAC,SAAS,EACf,QAAQ,EAAE,qBAAqB,IAE9B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,EAAE,IAAG,MAAM,CAAC,KAAK,CAAY,CAAC,CAC/D;QACpB,oBAAC,UAAU;YAEP,oBAAC,GAAG;gBACN,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,YAAY,IAC/C,SAAS,CACC;gBACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,YAAY,IAC/C,aAAa,CACH,CACL;YACN,oBAAC,MAAM,IACL,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,cAAc,EAAE,KAAK;iBACtB,EACD,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAC,MAAM;gBAEb,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,oBAAoB,WAE7C,CACR,CACA,CACF,CAChB,CAAC;AACJ,CAAC"}
@@ -1,7 +1,3 @@
1
1
  /// <reference types="react" />
2
- type TeamCardProps = {
3
- title: string;
4
- description: string;
5
- };
2
+ import { TeamCardProps } from './sharedTypes';
6
3
  export default function TeamCard({ title, description, ...props }: TeamCardProps): JSX.Element;
7
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TeamCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/TeamCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAA+C;QAA/C,EAAE,KAAK,EAAE,WAAW,OAA2B,EAAtB,KAAK,cAA9B,wBAAgC,CAAF;IAC7D,OAAO,CACH,oBAAC,UAAU,oBACL,KAAK;QAET,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,eAAe,IAAE,KAAK,CAAc;QAC1E,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAAE,WAAW,CAAc,CACpE,CAChB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"TeamCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/TeamCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAA+C;QAA/C,EAAE,KAAK,EAAE,WAAW,OAA2B,EAAtB,KAAK,cAA9B,wBAAgC,CAAF;IAC7D,OAAO,CACH,oBAAC,UAAU,oBACL,KAAK;QAET,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,eAAe,IAAE,KAAK,CAAc;QAC1E,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,IAAE,WAAW,CAAc,CACpE,CAChB,CAAC;AACJ,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- import { colors } from 'stories/theme/colors';
4
3
  export const StyledCard = styled(Box)({
5
4
  display: 'flex',
6
5
  flexDirection: 'column',
7
6
  borderRadius: '4px',
8
7
  padding: '16px',
9
- border: `1px solid ${colors.coolGrey300}`,
8
+ border: `1px solid var(--cool-grey-300)`,
10
9
  '&:hover': {
11
10
  cursor: 'pointer'
12
11
  },
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,aAAa,MAAM,CAAC,WAAW,EAAE;IAEzC,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,gCAAgC;IAExC,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ type SelectedTeams = {
2
+ teamOne: number;
3
+ teamTwo: number;
4
+ };
5
+ type Choices = {
6
+ id: number;
7
+ label: string;
8
+ }[];
9
+ export type DrawCardProps = {
10
+ choices: Choices;
11
+ selectedTeams: SelectedTeams;
12
+ dateLabel: string;
13
+ locationLabel: string;
14
+ onEditClick?: VoidFunction;
15
+ onChange?: (arg0: number) => null;
16
+ };
17
+ export interface TeamCardProps {
18
+ title: string;
19
+ description: string;
20
+ }
21
+ export interface ContactCardProps {
22
+ name: string;
23
+ phone: string;
24
+ email: string;
25
+ onMessageClick?: VoidFunction;
26
+ }
27
+ export {};
@@ -0,0 +1,3 @@
1
+ // Card types
2
+ export {};
3
+ //# sourceMappingURL=sharedTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedTypes.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/sharedTypes.ts"],"names":[],"mappings":"AAAA,aAAa"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DrawCardTableProps } from './sharedTypes';
3
+ export default function DrawCardTable({ headerRows, tableRows, ...props }: DrawCardTableProps): JSX.Element;
@@ -0,0 +1,40 @@
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 Grid from '@mui/material/Grid';
16
+ import Typography from '../atoms/Typography/Typography';
17
+ const StyledHeader = styled(Grid)({
18
+ alignItems: 'center',
19
+ justifyContent: 'center',
20
+ display: 'flex',
21
+ });
22
+ const GridSections = styled(Box)({
23
+ display: 'flex',
24
+ alignItems: 'center',
25
+ padding: '8px'
26
+ });
27
+ export default function DrawCardTable(_a) {
28
+ var { headerRows, tableRows } = _a, props = __rest(_a, ["headerRows", "tableRows"]);
29
+ const totalColumns = Math.floor(12 / headerRows.length);
30
+ const formatTableRows = tableRows.map((row, index) => {
31
+ const rowSectionsWidth = `${100 / tableRows[index].length}%`;
32
+ const sectionAmount = tableRows[index].length;
33
+ return (React.createElement(Grid, { xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { sx: { height: rowSectionsWidth } }, row[idx])))));
34
+ });
35
+ return (React.createElement(Box, Object.assign({}, props, { sx: { flexGrow: 1 }, "aria-label": "draw table" }),
36
+ React.createElement(Grid, { container: true, sx: { height: '60px' } }, headerRows.map((row) => (React.createElement(StyledHeader, { key: row.name, xs: totalColumns },
37
+ React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, row.name))))),
38
+ React.createElement(Grid, { container: true }, formatTableRows)));
39
+ }
40
+ //# sourceMappingURL=DrawCardTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawCardTable.js","sourceRoot":"","sources":["../../../src/stories/organisms/DrawCardTable.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAGxD,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,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,KAAK;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAIjB;QAJiB,EACpC,UAAU,EACV,SAAS,OAEU,EADhB,K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+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const DrawTable: any;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import DrawCard from '../molecules/Cards/DrawCard';
3
+ import DrawCardTable from './DrawCardTable';
4
+ const SAMPLE_CARD_DATA = {
5
+ choices: [
6
+ {
7
+ id: 1,
8
+ label: 'Team 1',
9
+ },
10
+ {
11
+ id: 2,
12
+ label: 'Team 2',
13
+ }
14
+ ],
15
+ selectedTeams: {
16
+ teamOne: 1,
17
+ teamTwo: 2,
18
+ },
19
+ dateLabel: 'Dec 20 at 9:00am',
20
+ locationLabel: 'Taube Tennis Center',
21
+ };
22
+ // Default
23
+ export default {
24
+ title: 'Organisms/Tables',
25
+ };
26
+ // Templates
27
+ function DrawCardTableTemplate(args) {
28
+ return React.createElement(DrawCardTable, Object.assign({}, args));
29
+ }
30
+ const headerRows = [
31
+ { name: 'Round 1' },
32
+ { name: 'Quarterfinal' },
33
+ { name: 'SemiFinal' },
34
+ ];
35
+ const tableRows = [
36
+ [
37
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
38
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
39
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
40
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
41
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
42
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
43
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
44
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
45
+ ],
46
+ [
47
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
48
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
49
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
50
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
51
+ ],
52
+ [
53
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
54
+ React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
55
+ ],
56
+ ];
57
+ // Stories
58
+ export const DrawTable = DrawCardTableTemplate.bind({});
59
+ DrawTable.args = {
60
+ headerRows,
61
+ tableRows,
62
+ };
63
+ //# sourceMappingURL=Tables.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tables.stories.js","sourceRoot":"","sources":["../../../src/stories/organisms/Tables.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C,MAAM,gBAAgB,GAAG;IACvB,OAAO,EAAE;QACP;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,EAAE,EAAE,CAAC;YACL,KAAK,EAAE,QAAQ;SAChB;KACF;IACD,aAAa,EAAE;QACb,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;KACX;IACD,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,qBAAqB;CACrC,CAAC;AAEF,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,MAAM,UAAU,GAAG;IACjB,EAAC,IAAI,EAAE,SAAS,EAAE;IAClB,EAAC,IAAI,EAAE,cAAc,EAAE;IACvB,EAAC,IAAI,EAAE,WAAW,EAAE;CACrB,CAAC;AAEF,MAAM,SAAS,GAAG;IAChB;QACI,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;KACrC;IACD;QACI,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;KACrC;IACD;QACM,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;QAClC,oBAAC,QAAQ,oBAAK,gBAAgB,EAAI;KACvC;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"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export type DrawCardTableProps = {
3
+ headerRows: {
4
+ name: string;
5
+ }[];
6
+ tableRows: ReactNode[][];
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sharedTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedTypes.js","sourceRoot":"","sources":["../../../src/stories/organisms/sharedTypes.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-tennis/ui-shared",
3
- "version": "0.0.24",
3
+ "version": "0.1.0",
4
4
  "main": "dist/items.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://universaltennis.com",
@@ -1,4 +1,4 @@
1
- import "./stories/assets/css/typography.css";
1
+ import "./stories/assets/css/variables.css";
2
2
 
3
3
  // ATOMS
4
4
  export { default as Button } from './stories/atoms/Button/Button';
@@ -0,0 +1,12 @@
1
+ :root {
2
+ --primary: #008ded;
3
+ --secondary: #e0004f;
4
+ --disabled: #bac6d6;
5
+ --black: #000;
6
+ --white: #fff;
7
+ --light-grey: #d7e0ea;
8
+ --darkest-grey: #3b4859;
9
+ --cool-grey-600: #A7B2C1;
10
+ --cool-grey-300: #DDE3EB;
11
+ --cool-grey-150: #F0F4F9;
12
+ }
@@ -1,7 +1,6 @@
1
1
  import React, {ReactElement} from 'react';
2
2
  import MuiButton from '@mui/material/Button';
3
3
  import { styled } from '@mui/material/styles';
4
- import {colors} from '../../theme/colors';
5
4
 
6
5
  type ButtonProps = {
7
6
  children: string | ReactElement;
@@ -29,37 +28,37 @@ const StyledButton = styled(MuiButton)({
29
28
  });
30
29
 
31
30
  const PrimaryButton = styled(StyledButton)((props: StyledButtonProps) => ({
32
- backgroundColor: colors.black,
33
- color: colors.white,
31
+ backgroundColor: 'var(--black)',
32
+ color: 'var(--white)',
34
33
  width: props.isExpanded ? '100%' : 'inherit',
35
34
 
36
35
  '&:hover': {
37
- backgroundColor: colors.darkestGrey,
38
- borderColor: colors.darkestGrey,
36
+ backgroundColor: 'var(--darkest-grey)',
37
+ borderColor: 'var(--darkest-grey)',
39
38
  },
40
39
  '&:disabled': {
41
- backgroundColor: colors.lightGrey,
42
- borderColor: colors.lightGrey,
40
+ backgroundColor: 'var(--light-grey)',
41
+ borderColor: 'var(--light-grey)',
43
42
  },
44
43
  }));
45
44
 
46
45
  const SecondaryButton = styled(StyledButton)({
47
- borderColor: colors.black,
46
+ borderColor: 'var(--black)',
48
47
  backgroundColor: 'transparent',
49
- color: colors.black,
48
+ color: 'var(--black)',
50
49
 
51
50
  '&:hover': {
52
- borderColor: colors.darkestGrey,
51
+ borderColor: 'var(--darkest-grey)',
53
52
  },
54
53
  '&:disabled': {
55
- borderColor: colors.disabled
54
+ borderColor: 'var(--disabled)'
56
55
  },
57
56
  });
58
57
 
59
58
  const LinkButton = styled(MuiButton)({
60
59
  borderColor: 'transparent',
61
60
  backgroundColor: 'transparent',
62
- color: colors.primary,
61
+ color: 'var(--primary)',
63
62
  textTransform: 'inherit',
64
63
  justifyContent: 'left',
65
64
  padding: 0,
@@ -69,7 +68,7 @@ const LinkButton = styled(MuiButton)({
69
68
  },
70
69
 
71
70
  '&:disabled': {
72
- borderColor: colors.disabled
71
+ borderColor: 'var(--disabled)'
73
72
  },
74
73
  });
75
74
 
@@ -1,6 +1,7 @@
1
1
  import React, {ReactElement} from 'react';
2
2
  import MuiTypography from '@mui/material/Typography';
3
3
  import { styled } from '@mui/material/styles';
4
+ import "../../assets/css/typography.css";
4
5
 
5
6
  type TypographyProps = {
6
7
  children: string | ReactElement;
@@ -52,19 +53,19 @@ const SECONDARY_SIZES = {
52
53
  };
53
54
 
54
55
  const DisplayTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
55
- fontFamily: `'UTR Numerals', 'Tungsten A', 'Tungsten B'`,
56
+ fontFamily: 'var(--display-font)',
56
57
  fontSize: DISPLAY_SIZES[props.size as keyof typeof DISPLAY_SIZES],
57
58
  fontWeight: props.weight
58
59
  }));
59
60
 
60
61
  const PrimaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
61
- fontFamily: `'Tungsten A', 'Tungsten B', 'Helvetica', Arial, sans-serif`,
62
+ fontFamily: 'var(--primary-font)',
62
63
  fontSize: PRIMARY_SIZES[props.size as keyof typeof PRIMARY_SIZES],
63
64
  fontWeight: props.weight
64
65
  }));
65
66
 
66
67
  const SecondaryTypography = styled(MuiTypography)((props: MuiTypographyProps) => ({
67
- fontFamily: `'Gotham SSm A', 'Gotham SSm B', 'Helvetica', Arial, sans-serif`,
68
+ fontFamily: 'var(--secondary-font)',
68
69
  fontSize: SECONDARY_SIZES[props.size as keyof typeof SECONDARY_SIZES],
69
70
  textTransform: props.isCap ? 'uppercase' : 'inherit',
70
71
  fontWeight: props.weight
@@ -2,19 +2,8 @@ import React from 'react';
2
2
 
3
3
  import ContactCard from './ContactCard';
4
4
  import TeamCard from './TeamCard';
5
-
6
- // Prop types
7
- interface ContactCardProps {
8
- name: string;
9
- phone: string;
10
- email: string;
11
- handleOnMessageClick?: VoidFunction;
12
- }
13
-
14
- interface TeamCardProps {
15
- title: string;
16
- description: string;
17
- }
5
+ import DrawCard from './DrawCard';
6
+ import {DrawCardProps, TeamCardProps, ContactCardProps} from "./sharedTypes";
18
7
 
19
8
  // Default
20
9
  export default {
@@ -30,6 +19,14 @@ function TeamCardTemplate(args: TeamCardProps) {
30
19
  return <TeamCard {...args} />;
31
20
  }
32
21
 
22
+ function DrawCardTemplate(args: DrawCardProps) {
23
+ return (
24
+ <div style={{width: '372px'}}>
25
+ <DrawCard {...args} />
26
+ </div>
27
+ );
28
+ }
29
+
33
30
  // Stories
34
31
  export const Contact = ContactCardTemplate.bind({});
35
32
  Contact.args = {
@@ -43,3 +40,23 @@ Team.args = {
43
40
  title: 'team 1',
44
41
  description: 'Captained by Lenny McDowell, Josh Palmer, and Michael Ballast. Requires a passcode for registration.'
45
42
  };
43
+
44
+ export const Draw = DrawCardTemplate.bind({});
45
+ Draw.args = {
46
+ choices: [
47
+ {
48
+ id: 1,
49
+ label: 'Team 1',
50
+ },
51
+ {
52
+ id: 2,
53
+ label: 'Team 2',
54
+ }
55
+ ],
56
+ selectedTeams: {
57
+ teamOne: 1,
58
+ teamTwo: 2,
59
+ },
60
+ dateLabel: 'Dec 20 at 9:00am',
61
+ locationLabel: 'Taube Tennis Center',
62
+ };
@@ -8,13 +8,7 @@ import Typography from '../../atoms/Typography/Typography';
8
8
  import ChatIcon from '../../assets/icon-chat-blue.svg';
9
9
 
10
10
  import { StyledCard } from './shared';
11
-
12
- type ContactCardProps = {
13
- name: string;
14
- phone: string;
15
- email: string;
16
- onMessageClick?: VoidFunction;
17
- }
11
+ import {ContactCardProps} from './sharedTypes';
18
12
 
19
13
  export default function ContactCard({
20
14
  name, phone, email, onMessageClick, ...props
@@ -0,0 +1,102 @@
1
+ import React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import { styled } from '@mui/material/styles';
4
+ import MuiSelect from '@mui/material/Select';
5
+ import MenuItem from '@mui/material/MenuItem';
6
+ import Button from '../../atoms/Button/Button';
7
+ import Typography from '../../atoms/Typography/Typography';
8
+ import {DrawCardProps} 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
+ backgroundColor: 'var(--cool-grey-150)',
17
+
18
+ '&:hover': {
19
+ cursor: 'pointer'
20
+ },
21
+ });
22
+
23
+ const StyledMuiSelect = styled(MuiSelect)({
24
+ border: '1px solid var(--cool-grey-600)',
25
+ });
26
+
27
+ const BottomGrid = styled(Box)({
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ justifyContent: 'space-between',
31
+ paddingTop: '32px',
32
+
33
+ });
34
+
35
+ export default function DrawCard({
36
+ choices, onChange, onEditClick, selectedTeams, dateLabel, locationLabel, ...props
37
+ }: DrawCardProps) {
38
+ const {teamOne, teamTwo} = selectedTeams || null;
39
+
40
+ const handleOnTeamOneChange = () => {
41
+ if (onChange) {
42
+ onChange(0);
43
+ }
44
+ };
45
+
46
+ const handleOnTeamTwoChange = () => {
47
+ if (onChange) {
48
+ onChange(1);
49
+ }
50
+ };
51
+
52
+ return (
53
+ <StyledCard
54
+ {...props}
55
+ >
56
+ <StyledMuiSelect
57
+ labelId="draw-card-select-label-top"
58
+ id="draw-card-select-top"
59
+ value={teamOne}
60
+ label="teamOne"
61
+ onChange={handleOnTeamOneChange}
62
+ >
63
+ {choices.map((choice) => <MenuItem value={choice.id}>{choice.label}</MenuItem>)}
64
+ </StyledMuiSelect>
65
+
66
+ <Box pt={1} />
67
+
68
+ <StyledMuiSelect
69
+ labelId="draw-card-select-label-bot"
70
+ id="draw-card-select-bot"
71
+ value={teamTwo}
72
+ label="teamTwo"
73
+ onChange={handleOnTeamTwoChange}
74
+ >
75
+ {choices.map((choice) => <MenuItem value={choice.id}>{choice.label}</MenuItem>)}
76
+ </StyledMuiSelect>
77
+ <BottomGrid>
78
+
79
+ <Box>
80
+ <Typography category="secondary" size="small-book">
81
+ {dateLabel}
82
+ </Typography>
83
+ <Typography category="secondary" size="small-book">
84
+ {locationLabel}
85
+ </Typography>
86
+ </Box>
87
+ <Button
88
+ style={{
89
+ display: 'flex',
90
+ justifyContent: 'end'
91
+ }}
92
+ onClick={onEditClick}
93
+ category="link"
94
+ >
95
+ <Typography category="secondary" size="x-small-medium-cap">
96
+ Edit
97
+ </Typography>
98
+ </Button>
99
+ </BottomGrid>
100
+ </StyledCard>
101
+ );
102
+ }
@@ -2,11 +2,7 @@ import React from 'react';
2
2
 
3
3
  import Typography from '../../atoms/Typography/Typography';
4
4
  import { StyledCard } from './shared';
5
-
6
- type TeamCardProps = {
7
- title: string;
8
- description: string;
9
- }
5
+ import {TeamCardProps} from './sharedTypes';
10
6
 
11
7
  export default function TeamCard({ title, description, ...props }: TeamCardProps) {
12
8
  return (
@@ -1,13 +1,12 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
- import { colors } from 'stories/theme/colors';
4
3
 
5
4
  export const StyledCard = styled(Box)({
6
5
  display: 'flex',
7
6
  flexDirection: 'column',
8
7
  borderRadius: '4px',
9
8
  padding: '16px',
10
- border: `1px solid ${colors.coolGrey300}`,
9
+ border: `1px solid var(--cool-grey-300)`,
11
10
 
12
11
  '&:hover': {
13
12
  cursor: 'pointer'
@@ -0,0 +1,32 @@
1
+ // Card types
2
+
3
+ type SelectedTeams = {
4
+ teamOne: number;
5
+ teamTwo: number;
6
+ }
7
+
8
+ type Choices = {
9
+ id: number;
10
+ label: string;
11
+ }[];
12
+
13
+ export type DrawCardProps = {
14
+ choices: Choices;
15
+ selectedTeams: SelectedTeams;
16
+ dateLabel: string;
17
+ locationLabel: string;
18
+ onEditClick?: VoidFunction;
19
+ onChange?: (arg0: number) => null;
20
+ }
21
+
22
+ export interface TeamCardProps {
23
+ title: string;
24
+ description: string;
25
+ }
26
+
27
+ export interface ContactCardProps {
28
+ name: string;
29
+ phone: string;
30
+ email: string;
31
+ onMessageClick?: VoidFunction;
32
+ }
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import { styled } from '@mui/material/styles';
4
+ import Paper from '@mui/material/Paper';
5
+ import Grid from '@mui/material/Grid';
6
+ import Typography from '../atoms/Typography/Typography';
7
+ import {DrawCardTableProps} from './sharedTypes';
8
+
9
+ const StyledHeader = styled(Grid)({
10
+ alignItems: 'center',
11
+ justifyContent: 'center',
12
+ display: 'flex',
13
+ });
14
+
15
+ const GridSections = styled(Box)({
16
+ display: 'flex',
17
+ alignItems: 'center',
18
+ padding: '8px'
19
+ });
20
+
21
+ export default function DrawCardTable({
22
+ headerRows,
23
+ tableRows,
24
+ ...props
25
+ }: DrawCardTableProps) {
26
+ const totalColumns = Math.floor(12 / headerRows.length);
27
+
28
+ const formatTableRows = tableRows.map((row, index) => {
29
+ const rowSectionsWidth = `${100 / tableRows[index].length}%`;
30
+ const sectionAmount = tableRows[index].length;
31
+
32
+ return (
33
+ <Grid xs={totalColumns}>
34
+ {[...Array(sectionAmount)].map((section, idx) => (
35
+ <GridSections sx={{height: rowSectionsWidth}}>
36
+ {row[idx]}
37
+ </GridSections>
38
+ ))}
39
+ </Grid>
40
+ );
41
+ });
42
+
43
+ return (
44
+ <Box {...props} sx={{ flexGrow: 1 }} aria-label="draw table">
45
+ <Grid container sx={{height: '60px'}}>
46
+ {headerRows.map((row) => (
47
+ <StyledHeader key={row.name} xs={totalColumns}>
48
+ <Typography category="secondary" size="small-medium-cap">{row.name}</Typography>
49
+ </StyledHeader>
50
+ ))}
51
+ </Grid>
52
+ <Grid container>
53
+ {formatTableRows}
54
+ </Grid>
55
+ </Box>
56
+ );
57
+ }
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ import DrawCard from '../molecules/Cards/DrawCard';
3
+ import DrawCardTable from './DrawCardTable';
4
+ import {DrawCardTableProps } from './sharedTypes';
5
+
6
+ const SAMPLE_CARD_DATA = {
7
+ choices: [
8
+ {
9
+ id: 1,
10
+ label: 'Team 1',
11
+ },
12
+ {
13
+ id: 2,
14
+ label: 'Team 2',
15
+ }
16
+ ],
17
+ selectedTeams: {
18
+ teamOne: 1,
19
+ teamTwo: 2,
20
+ },
21
+ dateLabel: 'Dec 20 at 9:00am',
22
+ locationLabel: 'Taube Tennis Center',
23
+ };
24
+
25
+ // Default
26
+ export default {
27
+ title: 'Organisms/Tables',
28
+ };
29
+
30
+ // Templates
31
+ function DrawCardTableTemplate(args: DrawCardTableProps) {
32
+ return <DrawCardTable {...args} />;
33
+ }
34
+
35
+ const headerRows = [
36
+ {name: 'Round 1' },
37
+ {name: 'Quarterfinal' },
38
+ {name: 'SemiFinal' },
39
+ ];
40
+
41
+ const tableRows = [
42
+ [
43
+ <DrawCard {...SAMPLE_CARD_DATA} />,
44
+ <DrawCard {...SAMPLE_CARD_DATA} />,
45
+ <DrawCard {...SAMPLE_CARD_DATA} />,
46
+ <DrawCard {...SAMPLE_CARD_DATA} />,
47
+ <DrawCard {...SAMPLE_CARD_DATA} />,
48
+ <DrawCard {...SAMPLE_CARD_DATA} />,
49
+ <DrawCard {...SAMPLE_CARD_DATA} />,
50
+ <DrawCard {...SAMPLE_CARD_DATA} />,
51
+ ],
52
+ [
53
+ <DrawCard {...SAMPLE_CARD_DATA} />,
54
+ <DrawCard {...SAMPLE_CARD_DATA} />,
55
+ <DrawCard {...SAMPLE_CARD_DATA} />,
56
+ <DrawCard {...SAMPLE_CARD_DATA} />,
57
+ ],
58
+ [
59
+ <DrawCard {...SAMPLE_CARD_DATA} />,
60
+ <DrawCard {...SAMPLE_CARD_DATA} />,
61
+ ],
62
+ ];
63
+
64
+ // Stories
65
+ export const DrawTable = DrawCardTableTemplate.bind({});
66
+ DrawTable.args = {
67
+ headerRows,
68
+ tableRows,
69
+ };
@@ -0,0 +1,8 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ export type DrawCardTableProps = {
4
+ headerRows: {
5
+ name: string;
6
+ }[],
7
+ tableRows: ReactNode[][];
8
+ }
@@ -1,10 +0,0 @@
1
- export declare const colors: {
2
- primary: string;
3
- secondary: string;
4
- disabled: string;
5
- black: string;
6
- white: string;
7
- lightGrey: string;
8
- darkestGrey: string;
9
- coolGrey300: string;
10
- };
@@ -1,11 +0,0 @@
1
- export const colors = {
2
- primary: '#008ded',
3
- secondary: '#e0004f',
4
- disabled: '#bac6d6',
5
- black: '#000',
6
- white: '#fff',
7
- lightGrey: '#d7e0ea',
8
- darkestGrey: '#3b4859',
9
- coolGrey300: '#DDE3EB'
10
- };
11
- //# sourceMappingURL=colors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/stories/theme/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;CACvB,CAAC"}
@@ -1,10 +0,0 @@
1
- export const colors = {
2
- primary: '#008ded',
3
- secondary: '#e0004f',
4
- disabled: '#bac6d6',
5
- black: '#000',
6
- white: '#fff',
7
- lightGrey: '#d7e0ea',
8
- darkestGrey: '#3b4859',
9
- coolGrey300: '#DDE3EB'
10
- };