@universal-tennis/ui-shared 0.1.68 → 0.1.70

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 (285) hide show
  1. package/.eslintignore +1 -1
  2. package/.eslintrc.js +73 -73
  3. package/.storybook/preview.js +12 -12
  4. package/.storybook/variables.css +15 -15
  5. package/README.md +129 -129
  6. package/dist/App.d.ts +2 -2
  7. package/dist/App.js +12 -12
  8. package/dist/components.d.ts +32 -4
  9. package/dist/components.js +37 -8
  10. package/dist/components.js.map +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +12 -12
  13. package/dist/items.d.ts +2 -2
  14. package/dist/items.js +1 -1
  15. package/dist/stories/assets/css/variables.css +6 -3
  16. package/dist/stories/assets/icon-chat-blue.svg +10 -10
  17. package/dist/stories/atoms/Button/Button.d.ts +10 -9
  18. package/dist/stories/atoms/Button/Button.js +95 -79
  19. package/dist/stories/atoms/Button/Button.js.map +1 -1
  20. package/dist/stories/atoms/Button/Button.stories.d.ts +17 -16
  21. package/dist/stories/atoms/Button/Button.stories.js +45 -36
  22. package/dist/stories/atoms/Button/Button.stories.js.map +1 -1
  23. package/dist/stories/atoms/Icons/AddIcon.d.ts +3 -0
  24. package/dist/stories/atoms/Icons/AddIcon.js +9 -0
  25. package/dist/stories/atoms/Icons/AddIcon.js.map +1 -0
  26. package/dist/stories/atoms/Icons/AvailabilityMaybeIcon.d.ts +3 -0
  27. package/dist/stories/atoms/Icons/AvailabilityMaybeIcon.js +7 -0
  28. package/dist/stories/atoms/Icons/AvailabilityMaybeIcon.js.map +1 -0
  29. package/dist/stories/atoms/Icons/AvailabilityNoIcon.d.ts +3 -0
  30. package/dist/stories/atoms/Icons/AvailabilityNoIcon.js +7 -0
  31. package/dist/stories/atoms/Icons/AvailabilityNoIcon.js.map +1 -0
  32. package/dist/stories/atoms/Icons/AvailabilityNotSetIcon.d.ts +3 -0
  33. package/dist/stories/atoms/Icons/AvailabilityNotSetIcon.js +8 -0
  34. package/dist/stories/atoms/Icons/AvailabilityNotSetIcon.js.map +1 -0
  35. package/dist/stories/atoms/Icons/AvailabilityYesIcon.d.ts +3 -0
  36. package/dist/stories/atoms/Icons/AvailabilityYesIcon.js +7 -0
  37. package/dist/stories/atoms/Icons/AvailabilityYesIcon.js.map +1 -0
  38. package/dist/stories/atoms/Icons/CalendarIcon.d.ts +3 -0
  39. package/dist/stories/atoms/Icons/CalendarIcon.js +7 -0
  40. package/dist/stories/atoms/Icons/CalendarIcon.js.map +1 -0
  41. package/dist/stories/atoms/Icons/ClockIcon.d.ts +3 -0
  42. package/dist/stories/atoms/Icons/ClockIcon.js +9 -0
  43. package/dist/stories/atoms/Icons/ClockIcon.js.map +1 -0
  44. package/dist/stories/atoms/Icons/CloseIcon.d.ts +3 -0
  45. package/dist/stories/atoms/Icons/CloseIcon.js +7 -0
  46. package/dist/stories/atoms/Icons/CloseIcon.js.map +1 -0
  47. package/dist/stories/atoms/Icons/DeleteIcon.d.ts +3 -0
  48. package/dist/stories/atoms/Icons/DeleteIcon.js +11 -0
  49. package/dist/stories/atoms/Icons/DeleteIcon.js.map +1 -0
  50. package/dist/stories/atoms/Icons/EditIcon.d.ts +3 -0
  51. package/dist/stories/atoms/Icons/EditIcon.js +7 -0
  52. package/dist/stories/atoms/Icons/EditIcon.js.map +1 -0
  53. package/dist/stories/atoms/Icons/Icons.stories.d.ts +23 -0
  54. package/dist/stories/atoms/Icons/Icons.stories.js +178 -0
  55. package/dist/stories/atoms/Icons/Icons.stories.js.map +1 -0
  56. package/dist/stories/atoms/Icons/LeftChevronIcon.d.ts +3 -0
  57. package/dist/stories/atoms/Icons/LeftChevronIcon.js +7 -0
  58. package/dist/stories/atoms/Icons/LeftChevronIcon.js.map +1 -0
  59. package/dist/stories/atoms/Icons/LocationIcon.d.ts +3 -0
  60. package/dist/stories/atoms/Icons/LocationIcon.js +8 -0
  61. package/dist/stories/atoms/Icons/LocationIcon.js.map +1 -0
  62. package/dist/stories/atoms/Icons/MessageIcon.d.ts +3 -0
  63. package/dist/stories/atoms/Icons/MessageIcon.js +7 -0
  64. package/dist/stories/atoms/Icons/MessageIcon.js.map +1 -0
  65. package/dist/stories/atoms/Icons/RightChevronIcon.d.ts +3 -0
  66. package/dist/stories/atoms/Icons/RightChevronIcon.js +7 -0
  67. package/dist/stories/atoms/Icons/RightChevronIcon.js.map +1 -0
  68. package/dist/stories/atoms/Icons/SessionIcon.d.ts +3 -0
  69. package/dist/stories/atoms/Icons/SessionIcon.js +7 -0
  70. package/dist/stories/atoms/Icons/SessionIcon.js.map +1 -0
  71. package/dist/stories/atoms/Icons/SwapIcon.d.ts +3 -0
  72. package/dist/stories/atoms/Icons/SwapIcon.js +7 -0
  73. package/dist/stories/atoms/Icons/SwapIcon.js.map +1 -0
  74. package/dist/stories/atoms/Icons/VisibilityIcon.d.ts +3 -0
  75. package/dist/stories/atoms/Icons/VisibilityIcon.js +8 -0
  76. package/dist/stories/atoms/Icons/VisibilityIcon.js.map +1 -0
  77. package/dist/stories/atoms/Icons/VisibilityOffIcon.d.ts +3 -0
  78. package/dist/stories/atoms/Icons/VisibilityOffIcon.js +9 -0
  79. package/dist/stories/atoms/Icons/VisibilityOffIcon.js.map +1 -0
  80. package/dist/stories/atoms/Icons/WinnerIndicatorIcon.d.ts +3 -0
  81. package/dist/stories/atoms/Icons/WinnerIndicatorIcon.js +32 -0
  82. package/dist/stories/atoms/Icons/WinnerIndicatorIcon.js.map +1 -0
  83. package/dist/stories/atoms/Icons/sharedTypes.d.ts +9 -0
  84. package/dist/stories/atoms/Icons/sharedTypes.js +2 -0
  85. package/dist/stories/atoms/Icons/sharedTypes.js.map +1 -0
  86. package/dist/stories/atoms/Map/Map.d.ts +7 -0
  87. package/dist/stories/atoms/Map/Map.js +9 -0
  88. package/dist/stories/atoms/Map/Map.js.map +1 -0
  89. package/dist/stories/atoms/Map/Map.stories.d.ts +9 -0
  90. package/dist/stories/atoms/Map/Map.stories.js +36 -0
  91. package/dist/stories/atoms/Map/Map.stories.js.map +1 -0
  92. package/dist/stories/atoms/Typography/Typography.d.ts +49 -10
  93. package/dist/stories/atoms/Typography/Typography.js +143 -99
  94. package/dist/stories/atoms/Typography/Typography.js.map +1 -1
  95. package/dist/stories/atoms/Typography/Typography.stories.d.ts +37 -37
  96. package/dist/stories/atoms/Typography/Typography.stories.js +190 -190
  97. package/dist/stories/molecules/AvatarWithName/AvatarWithName.d.ts +27 -0
  98. package/dist/stories/molecules/AvatarWithName/AvatarWithName.js +21 -0
  99. package/dist/stories/molecules/AvatarWithName/AvatarWithName.js.map +1 -0
  100. package/dist/stories/molecules/AvatarWithName/AvatarWithName.stories.d.ts +15 -0
  101. package/dist/stories/molecules/AvatarWithName/AvatarWithName.stories.js +73 -0
  102. package/dist/stories/molecules/AvatarWithName/AvatarWithName.stories.js.map +1 -0
  103. package/dist/stories/molecules/Cards/Cards.stories.d.ts +7 -6
  104. package/dist/stories/molecules/Cards/Cards.stories.js +64 -26
  105. package/dist/stories/molecules/Cards/Cards.stories.js.map +1 -1
  106. package/dist/stories/molecules/Cards/ContactCard.d.ts +3 -9
  107. package/dist/stories/molecules/Cards/ContactCard.js +38 -38
  108. package/dist/stories/molecules/Cards/ContactCard.js.map +1 -1
  109. package/dist/stories/molecules/Cards/DrawCard.d.ts +3 -0
  110. package/dist/stories/molecules/Cards/DrawCard.js +117 -0
  111. package/dist/stories/molecules/Cards/DrawCard.js.map +1 -0
  112. package/dist/stories/molecules/Cards/Modals.stories.d.ts +5 -0
  113. package/dist/stories/molecules/Cards/Modals.stories.js +73 -0
  114. package/dist/stories/molecules/Cards/Modals.stories.js.map +1 -0
  115. package/dist/stories/molecules/Cards/TeamCard.d.ts +3 -7
  116. package/dist/stories/molecules/Cards/TeamCard.js +20 -20
  117. package/dist/stories/molecules/Cards/TeamCard.js.map +1 -1
  118. package/dist/stories/molecules/Cards/TeamDrawCard.d.ts +3 -0
  119. package/dist/stories/molecules/Cards/TeamDrawCard.js +77 -0
  120. package/dist/stories/molecules/Cards/TeamDrawCard.js.map +1 -0
  121. package/dist/stories/molecules/Cards/shared.d.ts +4 -9
  122. package/dist/stories/molecules/Cards/shared.js +12 -12
  123. package/dist/stories/molecules/Cards/sharedTypes.d.ts +59 -0
  124. package/dist/stories/molecules/Cards/sharedTypes.js +3 -0
  125. package/dist/stories/molecules/Cards/sharedTypes.js.map +1 -0
  126. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.d.ts +27 -0
  127. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.js +25 -0
  128. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.js.map +1 -0
  129. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.d.ts +13 -0
  130. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.js +66 -0
  131. package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.js.map +1 -0
  132. package/dist/stories/organisms/Modals/FullPageModal.d.ts +4 -0
  133. package/dist/stories/organisms/Modals/FullPageModal.js +60 -0
  134. package/dist/stories/organisms/Modals/FullPageModal.js.map +1 -0
  135. package/dist/stories/organisms/Modals/Modals.stories.d.ts +5 -0
  136. package/dist/stories/organisms/Modals/Modals.stories.js +74 -0
  137. package/dist/stories/organisms/Modals/Modals.stories.js.map +1 -0
  138. package/dist/stories/organisms/Modals/sharedTypes.d.ts +14 -0
  139. package/dist/stories/organisms/Modals/sharedTypes.js +2 -0
  140. package/dist/stories/organisms/Modals/sharedTypes.js.map +1 -0
  141. package/dist/stories/organisms/Tables/DrawCardTable.d.ts +3 -0
  142. package/dist/stories/organisms/Tables/DrawCardTable.js +59 -0
  143. package/dist/stories/organisms/Tables/DrawCardTable.js.map +1 -0
  144. package/dist/stories/organisms/Tables/SortableTable.d.ts +23 -0
  145. package/dist/stories/organisms/Tables/SortableTable.js +34 -0
  146. package/dist/stories/organisms/Tables/SortableTable.js.map +1 -0
  147. package/dist/stories/organisms/Tables/Tables.stories.d.ts +8 -0
  148. package/dist/stories/organisms/Tables/Tables.stories.js +91 -0
  149. package/dist/stories/organisms/Tables/Tables.stories.js.map +1 -0
  150. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.d.ts +3 -0
  151. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.js +62 -0
  152. package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.js.map +1 -0
  153. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.d.ts +3 -0
  154. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.js +43 -0
  155. package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.js.map +1 -0
  156. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.d.ts +3 -0
  157. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.js +23 -0
  158. package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.js.map +1 -0
  159. package/dist/stories/organisms/Tables/TeamDrawCardTable.d.ts +3 -0
  160. package/dist/stories/organisms/Tables/TeamDrawCardTable.js +126 -0
  161. package/dist/stories/organisms/Tables/TeamDrawCardTable.js.map +1 -0
  162. package/dist/stories/organisms/Tables/mockData.d.ts +69 -0
  163. package/dist/stories/organisms/Tables/mockData.js +98 -0
  164. package/dist/stories/organisms/Tables/mockData.js.map +1 -0
  165. package/dist/stories/organisms/Tables/sharedTypes.d.ts +15 -0
  166. package/dist/stories/organisms/Tables/sharedTypes.js +2 -0
  167. package/dist/stories/organisms/Tables/sharedTypes.js.map +1 -0
  168. package/dist/stories/utils/constants.d.ts +3 -0
  169. package/dist/stories/utils/constants.js +4 -0
  170. package/dist/stories/utils/constants.js.map +1 -0
  171. package/dist/stories/utils/useScreenSize.d.ts +4 -0
  172. package/dist/stories/utils/useScreenSize.js +28 -0
  173. package/dist/stories/utils/useScreenSize.js.map +1 -0
  174. package/dist/types/tableDataTypes.d.ts +38 -0
  175. package/dist/types/tableDataTypes.js +2 -0
  176. package/dist/types/tableDataTypes.js.map +1 -0
  177. package/infrastructure/azure-pipelines.yml +112 -112
  178. package/package.json +93 -94
  179. package/src/App.js +25 -25
  180. package/src/components.jsx +41 -41
  181. package/src/custom.d.ts +13 -13
  182. package/src/index.js +17 -17
  183. package/src/items.jsx +1 -1
  184. package/src/stories/assets/css/variables.css +14 -14
  185. package/src/stories/assets/icon-chat-blue.svg +10 -10
  186. package/src/stories/assets/icons/icon-add.svg +7 -7
  187. package/src/stories/assets/icons/icon-availability-maybe.svg +3 -3
  188. package/src/stories/assets/icons/icon-availability-no.svg +3 -3
  189. package/src/stories/assets/icons/icon-availability-not-set.svg +8 -8
  190. package/src/stories/assets/icons/icon-availability-yes.svg +3 -3
  191. package/src/stories/assets/icons/icon-calendar.svg +4 -4
  192. package/src/stories/assets/icons/icon-clock.svg +7 -7
  193. package/src/stories/assets/icons/icon-close.svg +3 -3
  194. package/src/stories/assets/icons/icon-delete.svg +9 -9
  195. package/src/stories/assets/icons/icon-edit.svg +3 -3
  196. package/src/stories/assets/icons/icon-location.svg +6 -6
  197. package/src/stories/assets/icons/icon-message.svg +3 -3
  198. package/src/stories/assets/icons/icon-session.svg +3 -3
  199. package/src/stories/assets/icons/icon-swap.svg +3 -3
  200. package/src/stories/assets/icons/icon-visibility-off.svg +7 -7
  201. package/src/stories/assets/icons/icon-visibility.svg +6 -6
  202. package/src/stories/atoms/Button/Button.stories.tsx +63 -63
  203. package/src/stories/atoms/Button/Button.tsx +145 -145
  204. package/src/stories/atoms/Icons/AddIcon.tsx +13 -13
  205. package/src/stories/atoms/Icons/AvailabilityMaybeIcon.tsx +11 -11
  206. package/src/stories/atoms/Icons/AvailabilityNoIcon.tsx +11 -11
  207. package/src/stories/atoms/Icons/AvailabilityNotSetIcon.tsx +12 -12
  208. package/src/stories/atoms/Icons/AvailabilityYesIcon.tsx +11 -11
  209. package/src/stories/atoms/Icons/CalendarIcon.tsx +11 -11
  210. package/src/stories/atoms/Icons/ClockIcon.tsx +14 -14
  211. package/src/stories/atoms/Icons/CloseIcon.tsx +11 -11
  212. package/src/stories/atoms/Icons/DeleteIcon.tsx +15 -15
  213. package/src/stories/atoms/Icons/EditIcon.tsx +11 -11
  214. package/src/stories/atoms/Icons/Icons.stories.tsx +218 -218
  215. package/src/stories/atoms/Icons/LeftChevronIcon.tsx +13 -13
  216. package/src/stories/atoms/Icons/LocationIcon.tsx +12 -12
  217. package/src/stories/atoms/Icons/MessageIcon.tsx +12 -12
  218. package/src/stories/atoms/Icons/RightChevronIcon.tsx +11 -11
  219. package/src/stories/atoms/Icons/SessionIcon.tsx +16 -16
  220. package/src/stories/atoms/Icons/SwapIcon.tsx +11 -11
  221. package/src/stories/atoms/Icons/VisibilityIcon.tsx +12 -12
  222. package/src/stories/atoms/Icons/VisibilityOffIcon.tsx +13 -13
  223. package/src/stories/atoms/Icons/WinnerIndicatorIcon.tsx +39 -39
  224. package/src/stories/atoms/Icons/sharedTypes.tsx +10 -10
  225. package/src/stories/atoms/Map/Map.stories.tsx +43 -43
  226. package/src/stories/atoms/Map/Map.tsx +25 -25
  227. package/src/stories/atoms/Typography/Typography.tsx +185 -185
  228. package/src/stories/molecules/AvatarWithName/AvatarWithName.stories.tsx +86 -86
  229. package/src/stories/molecules/AvatarWithName/AvatarWithName.tsx +68 -68
  230. package/src/stories/molecules/Cards/Cards.stories.tsx +76 -76
  231. package/src/stories/molecules/Cards/ContactCard.tsx +45 -45
  232. package/src/stories/molecules/Cards/DrawCard.tsx +211 -211
  233. package/src/stories/molecules/Cards/Modals.stories.tsx +137 -137
  234. package/src/stories/molecules/Cards/TeamCard.tsx +14 -14
  235. package/src/stories/molecules/Cards/TeamDrawCard.tsx +146 -135
  236. package/src/stories/molecules/Cards/sharedTypes.ts +67 -67
  237. package/src/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.tsx +77 -77
  238. package/src/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.tsx +84 -84
  239. package/src/stories/organisms/Modals/FullPageModal.tsx +93 -93
  240. package/src/stories/organisms/Modals/Modals.stories.tsx +138 -138
  241. package/src/stories/organisms/Modals/sharedTypes.ts +15 -15
  242. package/src/stories/organisms/Tables/DrawCardTable.tsx +92 -92
  243. package/src/stories/organisms/Tables/SortableTable.tsx +112 -112
  244. package/src/stories/organisms/Tables/Tables.stories.tsx +104 -104
  245. package/src/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.tsx +111 -102
  246. package/src/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.tsx +67 -67
  247. package/src/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.tsx +24 -24
  248. package/src/stories/organisms/Tables/mockData.tsx +129 -129
  249. package/src/stories/organisms/Tables/sharedTypes.ts +17 -17
  250. package/src/stories/utils/constants.ts +3 -3
  251. package/src/stories/utils/useScreenSize.ts +28 -28
  252. package/src/types/tableDataTypes.ts +42 -42
  253. package/tsconfig.json +23 -23
  254. package/dist/stories/Button.d.ts +0 -27
  255. package/dist/stories/Button.js +0 -51
  256. package/dist/stories/Button.js.map +0 -1
  257. package/dist/stories/Button.stories.d.ts +0 -15
  258. package/dist/stories/Button.stories.js +0 -34
  259. package/dist/stories/Button.stories.js.map +0 -1
  260. package/dist/stories/Header.d.ts +0 -19
  261. package/dist/stories/Header.js +0 -31
  262. package/dist/stories/Header.js.map +0 -1
  263. package/dist/stories/Header.stories.d.ts +0 -11
  264. package/dist/stories/Header.stories.js +0 -20
  265. package/dist/stories/Header.stories.js.map +0 -1
  266. package/dist/stories/Page.d.ts +0 -1
  267. package/dist/stories/Page.js +0 -38
  268. package/dist/stories/Page.js.map +0 -1
  269. package/dist/stories/Page.stories.d.ts +0 -11
  270. package/dist/stories/Page.stories.js +0 -30
  271. package/dist/stories/Page.stories.js.map +0 -1
  272. package/dist/stories/assets/comments.svg +0 -1
  273. package/dist/stories/assets/direction.svg +0 -1
  274. package/dist/stories/atoms/Button/index.d.ts +0 -1
  275. package/dist/stories/atoms/Button/index.js +0 -2
  276. package/dist/stories/atoms/Button/index.js.map +0 -1
  277. package/dist/stories/atoms/Button.d.ts +0 -7
  278. package/dist/stories/atoms/Button.js +0 -20
  279. package/dist/stories/atoms/Button.js.map +0 -1
  280. package/dist/stories/atoms/Button.stories.d.ts +0 -13
  281. package/dist/stories/atoms/Button.stories.js +0 -22
  282. package/dist/stories/atoms/Button.stories.js.map +0 -1
  283. package/dist/stories/atoms/Typography/index.d.ts +0 -1
  284. package/dist/stories/atoms/Typography/index.js +0 -2
  285. package/dist/stories/atoms/Typography/index.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ export interface SquareAvatarWithNameProps {
3
+ avatarOnly: boolean;
4
+ avatarFontCategory: string;
5
+ avatarFontSize: string;
6
+ avatarWidth: string;
7
+ avatarHeight: string;
8
+ href: string;
9
+ maxLinkWidth: string;
10
+ name: string;
11
+ fontCategory: string;
12
+ fontSize: string;
13
+ disabled: boolean;
14
+ }
15
+ export default function SquareAvatarWithName({ avatarOnly, name, avatarFontSize, href, avatarFontCategory, avatarWidth, avatarHeight, fontSize, fontCategory, disabled, maxLinkWidth }: {
16
+ avatarOnly?: boolean | undefined;
17
+ name?: string | undefined;
18
+ avatarFontSize?: string | undefined;
19
+ href?: string | undefined;
20
+ avatarFontCategory?: string | undefined;
21
+ avatarWidth?: string | undefined;
22
+ avatarHeight?: string | undefined;
23
+ fontSize?: string | undefined;
24
+ fontCategory?: string | undefined;
25
+ disabled?: boolean | undefined;
26
+ maxLinkWidth?: string | undefined;
27
+ }): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import Avatar from '@mui/material/Avatar';
3
+ import Box from '@mui/material/Box';
4
+ import Link from '@mui/material/Link';
5
+ import Typography from '../../atoms/Typography/Typography';
6
+ export default function SquareAvatarWithName({ avatarOnly = false, name = '', avatarFontSize = 'small-medium', href = '', avatarFontCategory = 'primary', avatarWidth = '26px', avatarHeight = '26px', fontSize = 'medium-book', fontCategory = 'secondary', disabled = false, maxLinkWidth = "auto" }) {
7
+ const getAcronym = (str) => {
8
+ const acronym = str === null || str === void 0 ? void 0 : str.split(' ').map((word) => word.charAt(0)).join('');
9
+ return acronym;
10
+ };
11
+ const SquareAvatarComponent = (React.createElement(Avatar, { sx: {
12
+ backgroundColor: disabled ? 'var(--grey)' : 'var(--black)',
13
+ marginRight: '8px',
14
+ width: `${avatarWidth}`,
15
+ height: `${avatarHeight}`
16
+ }, variant: "rounded" },
17
+ React.createElement(Typography, { sx: { textTransform: 'uppercase' }, size: avatarFontSize, category: avatarFontCategory }, disabled ? '—' : getAcronym(name))));
18
+ return (avatarOnly ? (SquareAvatarComponent) : (React.createElement(Box, { display: "flex", alignItems: "center" },
19
+ SquareAvatarComponent,
20
+ href ? (React.createElement(Link, { href: href, sx: { textDecoration: 'none' } },
21
+ React.createElement(Typography, { category: fontCategory, size: fontSize, maxWidth: maxLinkWidth, sx: { whiteSpace: 'noWrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, name))) : (React.createElement(Typography, { category: fontCategory, size: fontSize, sx: {
22
+ whiteSpace: 'noWrap', overflow: 'hidden', textOverflow: 'ellipsis', color: disabled ? 'grey' : 'black'
23
+ } }, name)))));
24
+ }
25
+ //# sourceMappingURL=SquareAvatarWithName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SquareAvatarWithName.js","sourceRoot":"","sources":["../../../../src/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAgB3D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,UAAU,GAAG,KAAK,EAAE,IAAI,GAAG,EA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AE,IAAI,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE;YAC5C,oBAAC,UAAU,IACP,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,YAAY,EACtB,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,IAEzE,IAAI,CACI,CACV,CACV,CAAC,CAAC,CAAC,CACA,oBAAC,UAAU,IACP,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,QAAQ,EACd,EAAE,EAAE;gBACF,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;aACvG,IAEA,IAAI,CACI,CAChB,CACC,CACT,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: any;
6
+ export declare const WithCustomTypography: any;
7
+ export declare const WithCustomAvatarSize: any;
8
+ export declare const WithAvatarOnly: any;
9
+ export declare const WithLink: any;
10
+ export declare const WithLowercaseName: any;
11
+ export declare const WithLongName: any;
12
+ export declare const WithLongLinkName: any;
13
+ export declare const Disabled: any;
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import SquareAvatarWithName from './SquareAvatarWithName';
4
+ // Default
5
+ export default {
6
+ title: 'Molecules/SquareAvatarWithName',
7
+ };
8
+ // Templates
9
+ function SquareAvatarWithNameTemplate(args) {
10
+ return React.createElement(SquareAvatarWithName, Object.assign({}, args));
11
+ }
12
+ function SquareAvatarWithLongNameTemplate(args) {
13
+ return React.createElement(Box, { width: "200px" },
14
+ React.createElement(SquareAvatarWithName, Object.assign({}, args)));
15
+ }
16
+ // Stories
17
+ export const Default = SquareAvatarWithNameTemplate.bind({});
18
+ Default.args = {
19
+ name: "Team Dream",
20
+ };
21
+ export const WithCustomTypography = SquareAvatarWithNameTemplate.bind({});
22
+ WithCustomTypography.args = {
23
+ name: "Team Dream",
24
+ avatarFontCategory: "secondary",
25
+ avatarFontSize: "small-book",
26
+ fontCategory: "primary",
27
+ fontSize: "medium-book"
28
+ };
29
+ export const WithCustomAvatarSize = SquareAvatarWithNameTemplate.bind({});
30
+ WithCustomAvatarSize.args = {
31
+ name: "Team Dream",
32
+ avatarWidth: '40px',
33
+ avatarHeight: '40px',
34
+ avatarFontCategory: "primary",
35
+ avatarFontSize: "small-book",
36
+ };
37
+ export const WithAvatarOnly = SquareAvatarWithNameTemplate.bind({});
38
+ WithAvatarOnly.args = {
39
+ avatarOnly: true,
40
+ name: "Team Dream",
41
+ };
42
+ export const WithLink = SquareAvatarWithNameTemplate.bind({});
43
+ WithLink.args = {
44
+ href: "https://www.reddit.com",
45
+ name: "Team Dream",
46
+ };
47
+ export const WithLowercaseName = SquareAvatarWithNameTemplate.bind({});
48
+ WithLowercaseName.args = {
49
+ name: "team dream",
50
+ };
51
+ export const WithLongName = SquareAvatarWithLongNameTemplate.bind({});
52
+ WithLongName.args = {
53
+ name: "Team Dreamadeamadeamadeamadeam",
54
+ };
55
+ export const WithLongLinkName = SquareAvatarWithLongNameTemplate.bind({});
56
+ WithLongLinkName.args = {
57
+ name: "Team Dreamadeamadeamadeamadeam",
58
+ href: "https://www.reddit.com",
59
+ maxLinkWidth: "200px"
60
+ };
61
+ export const Disabled = SquareAvatarWithNameTemplate.bind({});
62
+ Disabled.args = {
63
+ name: "Bye",
64
+ disabled: true,
65
+ };
66
+ //# sourceMappingURL=SquareAvatarWithName.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SquareAvatarWithName.stories.js","sourceRoot":"","sources":["../../../../src/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO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Y;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvE,iBAAiB,CAAC,IAAI,GAAG;IACvB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,gCAAgC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtE,YAAY,CAAC,IAAI,GAAG;IAClB,IAAI,EAAE,gCAAgC;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,gCAAgC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1E,gBAAgB,CAAC,IAAI,GAAG;IACtB,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,wBAAwB;IAC9B,YAAY,EAAE,OAAO;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,IAAI;CACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FullPageModalType } from './sharedTypes';
3
+ declare function FullPageModal({ isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children, ...props }: FullPageModalType): JSX.Element;
4
+ export default FullPageModal;
@@ -0,0 +1,60 @@
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 AppBar from '@mui/material/AppBar';
14
+ import Box from '@mui/material/Box';
15
+ import CloseIcon from '@mui/icons-material/Close';
16
+ import Container from '@mui/material/Container';
17
+ import Dialog from '@mui/material/Dialog';
18
+ import IconButton from '@mui/material/IconButton';
19
+ import Toolbar from '@mui/material/Toolbar';
20
+ import Typography from '@mui/material/Typography';
21
+ import Grid from '@mui/material/Grid';
22
+ import Button from '../../atoms/Button/Button';
23
+ function FullPageModal(_a) {
24
+ var { isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children } = _a, props = __rest(_a, ["isOpen", "onClose", "pageTitle", "bottomCTAText", "secondaryBottomCTAText", "onBottomCTAClick", "onSecondaryBottomCTAClick", "isBottomCTAdisabled", "isSecondaryBottomCTAdisabled", "PagePopupModal", "children"]);
25
+ const handleOnClose = () => {
26
+ onClose();
27
+ };
28
+ return (React.createElement(Box, Object.assign({ position: "relative" }, props),
29
+ React.createElement(Dialog, { PaperProps: {
30
+ style: {
31
+ backgroundColor: 'var(--cool-grey-150)',
32
+ boxShadow: 'none',
33
+ overflow: 'hidden'
34
+ },
35
+ }, fullScreen: true, open: isOpen, onClose: handleOnClose },
36
+ React.createElement(AppBar, { sx: { position: 'relative', backgroundColor: 'var(--white)' } },
37
+ React.createElement(Toolbar, null,
38
+ React.createElement(Container, { maxWidth: false },
39
+ React.createElement(Box, { display: "flex", justifyContent: "space-between", alignItems: "center" },
40
+ React.createElement(Typography, { variant: "h6" }, pageTitle),
41
+ React.createElement(IconButton, { edge: "start", onClick: handleOnClose, "aria-label": "close" },
42
+ React.createElement(CloseIcon, null)))))),
43
+ React.createElement(Grid, { sx: { minHeight: "100vh", paddingBottom: '136px' }, container: true },
44
+ children,
45
+ bottomCTAText && !!onBottomCTAClick && (React.createElement(Box, { sx: {
46
+ position: "fixed",
47
+ width: "100%",
48
+ backgroundColor: 'black',
49
+ zIndex: 2,
50
+ display: 'flex',
51
+ justifyContent: 'flex-end'
52
+ }, p: 2, bottom: 0 },
53
+ !!onSecondaryBottomCTAClick && secondaryBottomCTAText && (React.createElement(Box, { sx: { marginRight: '16px' } },
54
+ React.createElement(Button, { onClick: onSecondaryBottomCTAClick, disabled: isSecondaryBottomCTAdisabled, category: "secondary-flipped" }, secondaryBottomCTAText))),
55
+ React.createElement(Box, null,
56
+ React.createElement(Button, { onClick: onBottomCTAClick, disabled: isBottomCTAdisabled, category: "secondary-flipped" }, bottomCTAText))))),
57
+ PagePopupModal)));
58
+ }
59
+ export default FullPageModal;
60
+ //# sourceMappingURL=FullPageModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullPageModal.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Modals/FullPageModal.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAG/C,SAAS,aAAa,CAAC,EAaH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;wBACb,eAAe,EAAE,OAAO;wBACxB,MAAM,EAAE,CAAC;wBACT,OAAO,EAAE,MAAM;wBACf,cAAc,EAAE,UAAU;qBAC3B,EACD,CAAC,EAAE,CAAC,EACJ,MAAM,EAAE,CAAC;oBAER,CAAC,CAAC,yBAAyB,IAAI,sBAAsB,IAAI,CAC1D,oBAAC,GAAG,IAAC,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;wBAC5B,oBAAC,MAAM,IAAC,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,4BAA4B,EAAE,QAAQ,EAAC,mBAAmB,IAC3G,sBAAsB,CAClB,CACP,CACL;oBACD,oBAAC,GAAG;wBACA,oBAAC,MAAM,IAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,QAAQ,EAAC,mBAAmB,IACzF,aAAa,CACT,CACP,CACJ,CACL,CACE;YACN,cAAc,CACV,CACP,CACT,CAAC;AACJ,CAAC;AACD,eAAe,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const FullPage: any;
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import InputLabel from '@mui/material/InputLabel';
3
+ import FormControl from '@mui/material/FormControl';
4
+ import Checkbox from '@mui/material/Checkbox';
5
+ import Select from '@mui/material/Select';
6
+ import MenuItem from '@mui/material/MenuItem';
7
+ import Typography from 'stories/atoms/Typography/Typography';
8
+ import Button from 'stories/atoms/Button/Button';
9
+ import Box from '@mui/material/Box';
10
+ import Grid from '@mui/material/Grid';
11
+ import Paper from '@mui/material/Paper';
12
+ import Pagination from '@mui/material/Pagination';
13
+ import FullPageModal from "./FullPageModal";
14
+ import SortableTable from "../Tables/SortableTable";
15
+ import { MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA } from "../Tables/mockData";
16
+ // Fake data for rendering sections
17
+ const conferences = [{ id: 1, name: 'philly' }, { id: 2, name: 'NJ' }, { id: 3, name: 'PA' }];
18
+ const sessions = [{ sessionId: 1, sessionName: 'philly' }, { sessionId: 2, sessionName: 'NJ' }, { sessionId: 3, sessionName: 'PA' }];
19
+ const selectedSessionIds = [1];
20
+ const teamsToAdd = [{ id: 1, name: 'test', sessionName: 'test' }];
21
+ const selectedTeamIds = [1];
22
+ const InputSelections = [
23
+ React.createElement(FormControl, { sx: { width: 300, mr: 3 } },
24
+ React.createElement(InputLabel, { id: "conference-select" }, "Select Conference"),
25
+ React.createElement(Select, { value: 1 || '', label: "Select Conference", labelId: "conference-select" }, conferences === null || conferences === void 0 ? void 0 : conferences.map((option) => (React.createElement(MenuItem, { key: option.id, value: option.id }, option.name))))),
26
+ React.createElement(FormControl, { sx: { width: 300 } },
27
+ React.createElement(InputLabel, { id: "session-select" }, "test"),
28
+ React.createElement(Select, { value: selectedSessionIds, label: "sample", multiple: true, labelId: "session-select" }, sessions === null || sessions === void 0 ? void 0 :
29
+ sessions.map((option) => (React.createElement(MenuItem, { key: option.sessionId, value: option.sessionId },
30
+ React.createElement(Checkbox, { checked: (selectedSessionIds === null || selectedSessionIds === void 0 ? void 0 : selectedSessionIds.indexOf(option.sessionId)) > -1 }),
31
+ React.createElement(Typography, null, option.sessionName)))),
32
+ React.createElement(Box, { mt: 1, boxShadow: "0px -3px 3px #00000024", display: "flex", justifyContent: "center", pt: 1, px: 1 },
33
+ React.createElement(Button, { category: "primary-extended" }, "Apply"))))
34
+ ];
35
+ const MainComponent = (React.createElement(Grid, { container: true },
36
+ React.createElement(Grid, { item: true, borderRight: 1, lg: 10 },
37
+ React.createElement(Box, { p: 6 },
38
+ React.createElement(Box, { display: "flex", alignItems: "center" }, InputSelections && InputSelections.map((select) => (select)))),
39
+ React.createElement(Box, { p: 6 },
40
+ React.createElement(SortableTable, { headCells: MOCK_HEAD_CELLS, sortOrder: "asc", sortByProperty: "player", title: "Player Table", tableData: MOCK_TABLE_DATA,
41
+ // @ts-ignore
42
+ rowComponent: mockRowComponent }),
43
+ React.createElement(Pagination, { variant: "text", color: "primary", page: 1, count: 10 }))),
44
+ React.createElement(Grid, { item: true, lg: 2 },
45
+ React.createElement(Box, { p: 6 },
46
+ React.createElement(Typography, { variant: "h5" }, `${teamsToAdd.length} selected teams`),
47
+ React.createElement(Typography, null, `This session allows a max of ${1} teams`),
48
+ teamsToAdd.map((team) => (React.createElement(Paper, { key: team.id, sx: { my: 1 } },
49
+ React.createElement(Box, { p: 2, display: "flex" },
50
+ React.createElement(Checkbox, { color: "primary", checked: selectedTeamIds.indexOf(team.id) !== -1 }),
51
+ React.createElement(Box, { ml: 1 },
52
+ React.createElement(Typography, null, team.name),
53
+ React.createElement(Typography, null, team.sessionName))))))))));
54
+ // Default
55
+ export default {
56
+ title: 'Organisms/Modals',
57
+ };
58
+ // Templates
59
+ function FullPageModalTemplate(args) {
60
+ return (React.createElement(FullPageModal, Object.assign({}, args), MainComponent));
61
+ }
62
+ // Stories
63
+ export const FullPage = FullPageModalTemplate.bind({});
64
+ FullPage.args = {
65
+ isOpen: true,
66
+ onClose: () => { },
67
+ pageTitle: 'Sample Page',
68
+ bottomCTAText: 'Add here!',
69
+ onBottomCTAClick: () => { },
70
+ onSecondaryBottomCTAClick: () => { },
71
+ secondaryBottomCTAText: 'skip',
72
+ isBottomCTAdisabled: false,
73
+ };
74
+ //# sourceMappingURL=Modals.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modals.stories.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Modals/Modals.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,qCAAqC,CAA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AAC,KAAK,CAAC,CAAC,GAClD;oBACF,oBAAC,GAAG,IAAC,EAAE,EAAE,CAAC;wBACN,oBAAC,UAAU,QAAE,IAAI,CAAC,IAAI,CAAc;wBACpC,oBAAC,UAAU,QAAE,IAAI,CAAC,WAAW,CAAc,CACzC,CACJ,CACF,CACX,CAAC,CACA,CACH,CACJ,CACV,CAAC;AAEF,UAAU;AACV,eAAe;IACb,KAAK,EAAE,kBAAkB;CAC1B,CAAC;AAEF,YAAY;AACZ,SAAS,qBAAqB,CAAC,IAAuB;IACpD,OAAO,CACH,oBAAC,aAAa,oBAAK,IAAI,GAClB,aAAa,CACF,CACnB,CAAC;AACJ,CAAC;AAED,UAAU;AACV,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvD,QAAQ,CAAC,IAAI,GAAG;IACd,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,WAAW;IAC1B,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,yBAAyB,EAAE,GAAG,EAAE,GAAE,CAAC;IACnC,sBAAsB,EAAE,MAAM;IAC9B,mBAAmB,EAAE,KAAK;CAC3B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export type FullPageModalType = {
3
+ isOpen: boolean;
4
+ onClose: VoidFunction;
5
+ pageTitle: string;
6
+ children?: ReactNode;
7
+ bottomCTAText?: string;
8
+ secondaryBottomCTAText?: string;
9
+ onBottomCTAClick?: VoidFunction;
10
+ onSecondaryBottomCTAClick?: VoidFunction;
11
+ isSecondaryBottomCTAdisabled?: boolean;
12
+ isBottomCTAdisabled?: boolean;
13
+ PagePopupModal?: ReactNode;
14
+ };
@@ -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/Modals/sharedTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DrawCardTableProps } from './sharedTypes';
3
+ export default function DrawCardTable({ headerRows, tableRows, isMobile, ...props }: DrawCardTableProps): JSX.Element | null;
@@ -0,0 +1,59 @@
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
+ const TableMobileSection = styled(Grid) `
28
+ flex-direction: column;
29
+ `;
30
+ export default function DrawCardTable(_a) {
31
+ var { headerRows, tableRows, isMobile } = _a, props = __rest(_a, ["headerRows", "tableRows", "isMobile"]);
32
+ if (!headerRows || !tableRows)
33
+ return null;
34
+ const totalColumns = Math.floor(12 / headerRows.length);
35
+ const formatTableRows = tableRows.map((row, index) => {
36
+ if (index > 2)
37
+ return; // Table can only support 3 columns
38
+ const rowSectionsHeight = `${100 / tableRows[index].length}%`;
39
+ const sectionAmount = tableRows[index].length;
40
+ return (React.createElement(Grid, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, sx: { height: rowSectionsHeight } }, row[idx])))));
41
+ });
42
+ const formatMobileRows = tableRows.map((row, index) => {
43
+ if (index > 2)
44
+ return; // Table can only support 3 columns
45
+ const headerRow = headerRows[index];
46
+ const sectionAmount = tableRows[index].length;
47
+ return (React.createElement(React.Fragment, null,
48
+ React.createElement(Grid, { container: true, sx: { height: '60px', justifyContent: 'center' } },
49
+ React.createElement(StyledHeader, null,
50
+ React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, headerRow.name))),
51
+ React.createElement(TableMobileSection, { container: true }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx }, row[idx]))))));
52
+ });
53
+ const formatDesktopRows = (React.createElement(React.Fragment, null,
54
+ React.createElement(Grid, { container: true, sx: { height: '60px' } }, headerRows.map((row) => (React.createElement(StyledHeader, { key: row.name, xs: totalColumns },
55
+ React.createElement(Typography, { category: "secondary", size: "small-medium-cap" }, row.name))))),
56
+ React.createElement(Grid, { container: true }, formatTableRows)));
57
+ return (React.createElement(Box, Object.assign({}, props, { sx: { flexGrow: 1 }, "aria-label": "draw table" }), isMobile ? formatMobileRows : formatDesktopRows));
58
+ }
59
+ //# sourceMappingURL=DrawCardTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawCardTable.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Tables/DrawCardTable.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,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAG3D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,OAAO,EAAE,MAAM;CAChB,C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IAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,gBAAa,YAAY,KACvD,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAC9C,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ComponentType } from "react";
2
+ import { TableData } from "types/tableDataTypes";
3
+ type Order = 'asc' | 'desc';
4
+ type OrderProperty = string | number;
5
+ interface HeadCell {
6
+ id: string;
7
+ label?: string;
8
+ isSortingDisabled: boolean;
9
+ }
10
+ export type SortableTableProps = {
11
+ headCells: Array<HeadCell>;
12
+ tableData: Array<TableData>;
13
+ sortOrder: Order;
14
+ sortByProperty: OrderProperty;
15
+ rowComponent: ComponentType<{
16
+ rowData: TableData;
17
+ labelId: string;
18
+ }>;
19
+ title?: string;
20
+ onOrderPropertyChange?: (property: OrderProperty) => VoidFunction;
21
+ };
22
+ declare function SortableTable({ headCells, tableData, rowComponent, sortOrder, sortByProperty, title, onOrderPropertyChange, }: SortableTableProps): JSX.Element;
23
+ export default SortableTable;
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import Table from "@mui/material/Table";
3
+ import TableBody from "@mui/material/TableBody";
4
+ import TableCell from "@mui/material/TableCell";
5
+ import TableContainer from "@mui/material/TableContainer";
6
+ import TableHead from "@mui/material/TableHead";
7
+ import MuiTableRow from "@mui/material/TableRow";
8
+ import TableSortLabel from "@mui/material/TableSortLabel";
9
+ import Toolbar from "@mui/material/Toolbar";
10
+ import Paper from "@mui/material/Paper";
11
+ import Typography from '../../atoms/Typography/Typography';
12
+ function SortableTable({ headCells, tableData, rowComponent, sortOrder, sortByProperty, title = '', onOrderPropertyChange, }) {
13
+ const TableRow = rowComponent;
14
+ const handleRequestSort = (property) => (event) => {
15
+ event.preventDefault();
16
+ if (onOrderPropertyChange) {
17
+ onOrderPropertyChange(property);
18
+ }
19
+ };
20
+ return (React.createElement(Paper, { sx: { width: "100%", mb: 2 } },
21
+ title && (React.createElement(Toolbar, { sx: { pl: { sm: 2 }, pr: { xs: 1, sm: 1 } } },
22
+ React.createElement(Typography, { category: "secondary", size: "large-medium", id: "tableTitle" }, title))),
23
+ React.createElement(TableContainer, null,
24
+ React.createElement(Table, { sx: { minWidth: 750 }, "aria-labelledby": "tableTitle", size: "medium" },
25
+ React.createElement(TableHead, null,
26
+ React.createElement(MuiTableRow, null, headCells.map((headCell) => (React.createElement(TableCell, { key: headCell.id, align: "left", padding: "normal", sortDirection: sortByProperty === headCell.id ? sortOrder : false },
27
+ React.createElement(TableSortLabel, { disabled: headCell.isSortingDisabled, hideSortIcon: !(headCell === null || headCell === void 0 ? void 0 : headCell.label), active: sortByProperty === headCell.id, direction: sortByProperty === headCell.id ? sortOrder : 'asc', onClick: handleRequestSort(headCell.id) }, headCell === null || headCell === void 0 ? void 0 : headCell.label)))))),
28
+ React.createElement(TableBody, null, tableData && tableData.map((data, index) => {
29
+ const labelId = `table-${index}`;
30
+ return (React.createElement(TableRow, { key: data.id, rowData: data, labelId: labelId }));
31
+ }))))));
32
+ }
33
+ export default SortableTable;
34
+ //# sourceMappingURL=SortableTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortableTable.js","sourceRoot":"","sources":["../../../../src/stories/organisms/Tables/SortableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAGxC,OAAO,UAAU,MAAM,mCAAm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,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,EACpC,YAAY,EAAE,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAA,EAC9B,MAAM,EAAE,cAAc,KAAK,QAAQ,CAAC,EAAE,EACtC,SAAS,EAAE,cAAc,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAC7D,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC,IAEtC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CACH,CACT,CACf,CAAC,CACQ,CACN;gBACZ,oBAAC,SAAS,QACL,SAAS,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,IAAe,EAAE,KAAa,EAAE,EAAE;oBAC7D,MAAM,OAAO,GAAG,SAAS,KAAK,EAAE,CAAC;oBACjC,OAAO,CACH,oBAAC,QAAQ,IACL,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,OAAO,GAClB,CACL,CAAC;gBACJ,CAAC,CAAC,CACM,CACR,CACK,CACb,CACX,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const DrawTable: any;
6
+ export declare const TeamDrawTable: any;
7
+ export declare const MobileTeamDrawTable: any;
8
+ export declare const SortableTable: any;
@@ -0,0 +1,91 @@
1
+ import React from 'react';
2
+ import TeamDrawCard from '../../molecules/Cards/TeamDrawCard';
3
+ import DrawCard from '../../molecules/Cards/DrawCard';
4
+ import DrawCardTable from './DrawCardTable';
5
+ import TeamDrawCardTable from './TeamDrawCardTable/TeamDrawCardTable';
6
+ import { MOCK_HEAD_CELLS, mockRowComponent, MOCK_TABLE_DATA, SAMPLE_CARD_DATA, SAMPLE_TEAM_PAGE_CARD_DATA } from './mockData';
7
+ const onOrderPropertyChange = () => { };
8
+ // Default
9
+ export default {
10
+ title: 'Organisms/Tables',
11
+ };
12
+ // Templates
13
+ function DrawCardTableTemplate(args) {
14
+ return React.createElement(DrawCardTable, Object.assign({}, args));
15
+ }
16
+ function TeamDrawCardTableTemplate(args) {
17
+ return React.createElement(TeamDrawCardTable, Object.assign({}, args));
18
+ }
19
+ const headerRows = [
20
+ { name: 'Round 1' },
21
+ { name: 'Quarterfinal' },
22
+ { name: 'SemiFinal' },
23
+ ];
24
+ const tableRows = [
25
+ [
26
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
27
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA, { locationLabel: "hi" })),
28
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
29
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA, { locationLabel: "hi" })),
30
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
31
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
32
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA, { locationLabel: "hi" })),
33
+ React.createElement(DrawCard, Object.assign({ isSelectActive: true, isFlexWidth: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
34
+ ],
35
+ [
36
+ React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA, { onViewClick: () => { } })),
37
+ React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
38
+ React.createElement(DrawCard, Object.assign({ isScorelessMatch: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
39
+ React.createElement(DrawCard, Object.assign({ isScorelessMatch: true, emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
40
+ ],
41
+ [
42
+ React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
43
+ React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
44
+ ],
45
+ [
46
+ React.createElement(DrawCard, Object.assign({ emptyLabel: "Select a team" }, SAMPLE_CARD_DATA)),
47
+ ],
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
+ ];
64
+ // Stories
65
+ export const DrawTable = DrawCardTableTemplate.bind({});
66
+ DrawTable.args = {
67
+ headerRows,
68
+ tableRows,
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
+ };
81
+ export const SortableTable = DrawCardTableTemplate.bind({});
82
+ SortableTable.args = {
83
+ headCells: MOCK_HEAD_CELLS,
84
+ sortOrder: 'asc',
85
+ sortByProperty: 'player',
86
+ title: 'Player Table',
87
+ tableData: MOCK_TABLE_DATA,
88
+ rowComponent: mockRowComponent,
89
+ onOrderPropertyChange,
90
+ };
91
+ //# sourceMappingURL=Tables.stories.js.map
@@ -0,0 +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,oCAAoC,CAAC;AAC9D,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AAEtE,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,QA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AS,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;