@universal-tennis/ui-shared 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.js +1 -0
- package/.storybook/variables.css +12 -0
- package/dist/components.d.ts +1 -0
- package/dist/stories/assets/css/variables.css +2 -0
- package/dist/stories/atoms/Typography/Typography.d.ts +38 -0
- package/dist/stories/atoms/Typography/Typography.js +38 -0
- package/dist/stories/atoms/Typography/Typography.js.map +1 -1
- package/dist/stories/molecules/Cards/Cards.stories.d.ts +1 -0
- package/dist/stories/molecules/Cards/Cards.stories.js +24 -0
- package/dist/stories/molecules/Cards/Cards.stories.js.map +1 -1
- package/dist/stories/molecules/Cards/ContactCard.d.ts +1 -7
- package/dist/stories/molecules/Cards/ContactCard.js.map +1 -1
- package/dist/stories/molecules/Cards/DrawCard.d.ts +3 -0
- package/dist/stories/molecules/Cards/DrawCard.js +66 -0
- package/dist/stories/molecules/Cards/DrawCard.js.map +1 -0
- package/dist/stories/molecules/Cards/TeamCard.d.ts +1 -5
- package/dist/stories/molecules/Cards/TeamCard.js.map +1 -1
- package/dist/stories/molecules/Cards/sharedTypes.d.ts +31 -0
- package/dist/stories/molecules/Cards/sharedTypes.js +3 -0
- package/dist/stories/molecules/Cards/sharedTypes.js.map +1 -0
- package/dist/stories/organisms/DrawCardTable.d.ts +3 -0
- package/dist/stories/organisms/DrawCardTable.js +40 -0
- package/dist/stories/organisms/DrawCardTable.js.map +1 -0
- package/dist/stories/organisms/SortableTable.js.map +1 -0
- package/dist/stories/organisms/Tables.stories.d.ts +6 -0
- package/dist/stories/organisms/Tables.stories.js +117 -0
- package/dist/stories/organisms/Tables.stories.js.map +1 -0
- package/dist/stories/organisms/sharedTypes.d.ts +7 -0
- package/dist/stories/organisms/sharedTypes.js +2 -0
- package/dist/stories/organisms/sharedTypes.js.map +1 -0
- package/package.json +1 -1
- package/src/stories/assets/css/variables.css +2 -0
- package/src/stories/atoms/Typography/Typography.tsx +42 -0
- package/src/stories/molecules/Cards/Cards.stories.tsx +30 -13
- package/src/stories/molecules/Cards/ContactCard.tsx +1 -7
- package/src/stories/molecules/Cards/DrawCard.tsx +101 -0
- package/src/stories/molecules/Cards/TeamCard.tsx +1 -5
- package/src/stories/molecules/Cards/sharedTypes.ts +37 -0
- package/src/stories/organisms/DrawCardTable.tsx +56 -0
- package/src/stories/{oraganisms/SortableTable.stories.tsx → organisms/Tables.stories.tsx} +74 -22
- package/src/stories/organisms/sharedTypes.ts +8 -0
- package/workflows/package-release-1.yml +4 -1
- package/dist/stories/oraganisms/SortableTable.js.map +0 -1
- package/dist/stories/oraganisms/SortableTable.stories.d.ts +0 -5
- package/dist/stories/oraganisms/SortableTable.stories.js +0 -67
- package/dist/stories/oraganisms/SortableTable.stories.js.map +0 -1
- /package/dist/stories/{oraganisms → organisms}/SortableTable.d.ts +0 -0
- /package/dist/stories/{oraganisms → organisms}/SortableTable.js +0 -0
- /package/src/stories/{oraganisms → organisms}/SortableTable.tsx +0 -0
package/.storybook/preview.js
CHANGED
package/dist/components.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { default as Button } from "./stories/atoms/Button/Button";
|
|
|
2
2
|
export { default as Typography } from "./stories/atoms/Typography/Typography";
|
|
3
3
|
export { default as ContactCard } from "./stories/molecules/Cards/ContactCard";
|
|
4
4
|
export { default as TeamCard } from "./stories/molecules/Cards/TeamCard";
|
|
5
|
+
export { default as SortableTable } from "./stories/organisms/SortableTable";
|
|
@@ -8,4 +8,42 @@ interface TypographyProps extends MuiTypographyProps {
|
|
|
8
8
|
weight?: number;
|
|
9
9
|
}
|
|
10
10
|
export default function Typography({ children, category, size, ...props }: TypographyProps): JSX.Element;
|
|
11
|
+
export declare const DISPLAY_SIZES_ENUM: {
|
|
12
|
+
XXXLarge: string;
|
|
13
|
+
XXLarge: string;
|
|
14
|
+
XLarge: string;
|
|
15
|
+
Large: string;
|
|
16
|
+
LargeLight: string;
|
|
17
|
+
MediumBook: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const PRIMARY_SIZES_ENUM: {
|
|
20
|
+
LargeBold: string;
|
|
21
|
+
LargeBook: string;
|
|
22
|
+
LargeLight: string;
|
|
23
|
+
MediumSemibold: string;
|
|
24
|
+
MediumMedium: string;
|
|
25
|
+
MediumBook: string;
|
|
26
|
+
SmallBook: string;
|
|
27
|
+
XSmallBook: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const SECONDARY_SIZES_ENUM: {
|
|
30
|
+
LargeMedium: string;
|
|
31
|
+
LargeBook: string;
|
|
32
|
+
MediumMedium: string;
|
|
33
|
+
MediumBook: string;
|
|
34
|
+
SmallMediumCap: string;
|
|
35
|
+
SmallMedium: string;
|
|
36
|
+
SmallBook: string;
|
|
37
|
+
XSmallMediumCap: string;
|
|
38
|
+
XSmallMedium: string;
|
|
39
|
+
XSmallBookCap: string;
|
|
40
|
+
XSmallBook: string;
|
|
41
|
+
XXSmallMediumCap: string;
|
|
42
|
+
XXSmallBook: string;
|
|
43
|
+
};
|
|
44
|
+
export declare const CATEGORY_ENUM: {
|
|
45
|
+
PRIMARY: string;
|
|
46
|
+
SECONDARY: string;
|
|
47
|
+
DISPLAY: string;
|
|
48
|
+
};
|
|
11
49
|
export {};
|
|
@@ -103,4 +103,42 @@ export default function Typography(_a) {
|
|
|
103
103
|
return (React.createElement(PrimaryTypography, Object.assign({ size: size, weight: weight }, props), children));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
export const DISPLAY_SIZES_ENUM = {
|
|
107
|
+
XXXLarge: "XXX-large",
|
|
108
|
+
XXLarge: "XX-large",
|
|
109
|
+
XLarge: "X-large",
|
|
110
|
+
Large: 'large',
|
|
111
|
+
LargeLight: "large-light",
|
|
112
|
+
MediumBook: "medium-book",
|
|
113
|
+
};
|
|
114
|
+
export const PRIMARY_SIZES_ENUM = {
|
|
115
|
+
LargeBold: "large-bold",
|
|
116
|
+
LargeBook: "large-book",
|
|
117
|
+
LargeLight: "large-light",
|
|
118
|
+
MediumSemibold: "medium-semibold",
|
|
119
|
+
MediumMedium: "medium-medium",
|
|
120
|
+
MediumBook: "medium-book",
|
|
121
|
+
SmallBook: "small-book",
|
|
122
|
+
XSmallBook: "x-small-book",
|
|
123
|
+
};
|
|
124
|
+
export const SECONDARY_SIZES_ENUM = {
|
|
125
|
+
LargeMedium: "large-medium",
|
|
126
|
+
LargeBook: "large-book",
|
|
127
|
+
MediumMedium: "medium-medium",
|
|
128
|
+
MediumBook: "medium-book",
|
|
129
|
+
SmallMediumCap: "small-medium-cap",
|
|
130
|
+
SmallMedium: "small-medium",
|
|
131
|
+
SmallBook: "small-book",
|
|
132
|
+
XSmallMediumCap: "x-small-medium-cap",
|
|
133
|
+
XSmallMedium: "x-small-medium",
|
|
134
|
+
XSmallBookCap: "x-small-book-cap",
|
|
135
|
+
XSmallBook: "x-small-book",
|
|
136
|
+
XXSmallMediumCap: "xx-small-medium-cap",
|
|
137
|
+
XXSmallBook: "xx-small-book",
|
|
138
|
+
};
|
|
139
|
+
export const CATEGORY_ENUM = {
|
|
140
|
+
PRIMARY: 'primary',
|
|
141
|
+
SECONDARY: 'secondary',
|
|
142
|
+
DISPLAY: 'display'
|
|
143
|
+
};
|
|
106
144
|
//# sourceMappingURL=Typography.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAwD,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AASzC,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,E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E,QAAQ,CAAC,MAAM,CAAC;YACzB,MAAM,GAAG,GAAG,CAAC;YACb,MAAM;QACR;YACE,MAAM,GAAG,GAAG,CAAC;YACb,MAAM;KACT;IAED,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,CACH,oBAAC,iBAAiB,kBACd,IAAI,EAAE,IAAI,IACN,KAAK,GAER,QAAQ,CACO,CACvB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACH,oBAAC,mBAAmB,kBAChB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,IACV,KAAK,GAER,QAAQ,CACS,CACzB,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO,CACH,oBAAC,iBAAiB,kBACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IACV,KAAK,GAER,QAAQ,CACO,CACvB,CAAC;QACJ;YACE,OAAO,CACH,oBAAC,iBAAiB,kBACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IACV,KAAK,GAER,QAAQ,CACO,CACvB,CAAC;KACL;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/stories/atoms/Typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAwD,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AASzC,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;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IACvB,eAAe,EAAE,oBAAoB;IACrC,YAAY,EAAE,gBAAgB;IAC9B,aAAa,EAAE,kBAAkB;IACjC,UAAU,EAAE,cAAc;IAC1B,gBAAgB,EAAE,qBAAqB;IACvC,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -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
|
+
options: [
|
|
35
|
+
{
|
|
36
|
+
id: 1,
|
|
37
|
+
label: 'Team 1',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 2,
|
|
41
|
+
label: 'Team 2',
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
selectedOptions: {
|
|
45
|
+
optionOne: 1,
|
|
46
|
+
optionTwo: 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;
|
|
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;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,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,SAAS,gBAAgB,CAAC,IAAmB;IAC3C,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;QAC1B,oBAAC,QAAQ,oBAAK,IAAI,EAAI,CACpB,CACT,CAAC;AACJ,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,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,IAAI,CAAC,IAAI,GAAG;IACV,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,sGAAsG;CACpH,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,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,eAAe,EAAE;QACf,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;KACb;IACD,SAAS,EAAE,kBAAkB;IAC7B,aAAa,EAAE,qBAAqB;CACrC,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
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,MAA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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, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } 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
|
+
const Positions = {
|
|
40
|
+
ONE: '1',
|
|
41
|
+
TWO: '2',
|
|
42
|
+
};
|
|
43
|
+
export default function DrawCard(_a) {
|
|
44
|
+
var { options, onChange, onEditClick, selectedOptions, dateLabel, locationLabel } = _a, props = __rest(_a, ["options", "onChange", "onEditClick", "selectedOptions", "dateLabel", "locationLabel"]);
|
|
45
|
+
const { optionOne, optionTwo } = selectedOptions || null;
|
|
46
|
+
const handleOnSelectionChange = (event, position) => {
|
|
47
|
+
const id = event.target.value;
|
|
48
|
+
if (onChange) {
|
|
49
|
+
onChange({ position, id });
|
|
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: optionOne, label: "teamOne", onChange: (e) => handleOnSelectionChange(e, Positions.ONE) }, options.map((option) => React.createElement(MenuItem, { key: option.id, value: option.id }, option.label))),
|
|
54
|
+
React.createElement(Box, { pt: 1 }),
|
|
55
|
+
React.createElement(StyledMuiSelect, { labelId: "draw-card-select-label-bot", id: "draw-card-select-bot", value: optionTwo, label: "teamTwo", onChange: (e) => handleOnSelectionChange(e, Positions.TWO) }, options.map((option) => React.createElement(MenuItem, { key: option.id, value: option.id }, option.label))),
|
|
56
|
+
React.createElement(BottomGrid, null,
|
|
57
|
+
React.createElement(Box, null,
|
|
58
|
+
React.createElement(Typography, { category: CATEGORY_ENUM.SECONDARY, size: SECONDARY_SIZES_ENUM.SmallBook }, dateLabel),
|
|
59
|
+
React.createElement(Typography, { category: CATEGORY_ENUM.SECONDARY, size: SECONDARY_SIZES_ENUM.SmallBook }, locationLabel)),
|
|
60
|
+
React.createElement(Button, { style: {
|
|
61
|
+
display: 'flex',
|
|
62
|
+
justifyContent: 'end'
|
|
63
|
+
}, onClick: onEditClick, category: "link" },
|
|
64
|
+
React.createElement(Typography, { category: CATEGORY_ENUM.SECONDARY, size: SECONDARY_SIZES_ENUM.XSmallMediumCap }, "Edit")))));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=DrawCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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;gBACA,oBAAC,UAAU,IAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,EAAE,IAAI,EAAE,oBAAoB,CAAC,SAAS,IAC9E,SAAS,CACD;gBACb,oBAAC,UAAU,IAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,EAAE,IAAI,EAAE,oBAAoB,CAAC,SAAS,IAC9E,aAAa,CACL,CACX;YACN,oBAAC,MAAM,IACH,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,cAAc,EAAE,KAAK;iBACtB,EACD,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAC,MAAM;gBAEf,oBAAC,UAAU,IAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,EAAE,IAAI,EAAE,oBAAoB,CAAC,eAAe,WAE5E,CACR,CACA,CACJ,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -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;
|
|
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,oBAAK,KAAK;QACjB,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,CACtE,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type SelectedOptions = {
|
|
2
|
+
optionOne: number;
|
|
3
|
+
optionTwo: number;
|
|
4
|
+
};
|
|
5
|
+
type Options = {
|
|
6
|
+
id: number;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
type OnChangeArgs = {
|
|
10
|
+
position: string;
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
export type DrawCardProps = {
|
|
14
|
+
options: Options;
|
|
15
|
+
selectedOptions: SelectedOptions;
|
|
16
|
+
dateLabel: string;
|
|
17
|
+
locationLabel: string;
|
|
18
|
+
onEditClick?: VoidFunction;
|
|
19
|
+
onChange?: ({ position, id }: OnChangeArgs) => null;
|
|
20
|
+
};
|
|
21
|
+
export interface TeamCardProps {
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ContactCardProps {
|
|
26
|
+
name: string;
|
|
27
|
+
phone: string;
|
|
28
|
+
email: string;
|
|
29
|
+
onMessageClick?: VoidFunction;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedTypes.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/sharedTypes.ts"],"names":[],"mappings":"AAAA,aAAa"}
|
|
@@ -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, { key: index, xs: totalColumns }, [...Array(sectionAmount)].map((section, idx) => (React.createElement(GridSections, { key: idx, 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;AAC9C,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,KAAK,cAH4B,2BAIrC,CADS;IAER,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAExD,MAAM,eAAe,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACnD,MAAM,gBAAgB,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;QAC7D,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;QAE9C,OAAO,CACH,oBAAC,IAAI,IAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,IAC7B,CAAC,GAAG,KAAK,CAAC,aAAa,CA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AC,CAAC,CAAC,KAAK;wBAEjE,oBAAC,cAAc,IACX,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,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableRow, TableCell, Typography } from '@mui/material';
|
|
3
|
+
import DrawCard from '../molecules/Cards/DrawCard';
|
|
4
|
+
import DrawCardTable from './DrawCardTable';
|
|
5
|
+
const rowComponent = ({ rowData, labelId }) => {
|
|
6
|
+
const { player, session, team } = rowData;
|
|
7
|
+
return (React.createElement(TableRow, null,
|
|
8
|
+
React.createElement(TableCell, { component: "th", id: labelId, scope: "row", padding: "normal" },
|
|
9
|
+
React.createElement(Typography, null, player)),
|
|
10
|
+
React.createElement(TableCell, { align: "left" },
|
|
11
|
+
React.createElement(Typography, null, team)),
|
|
12
|
+
React.createElement(TableCell, { align: "left" },
|
|
13
|
+
React.createElement(Typography, null, session))));
|
|
14
|
+
};
|
|
15
|
+
const headCells = [
|
|
16
|
+
{ id: 'player', label: 'Player Name', isSortingDisabled: false },
|
|
17
|
+
{ id: 'team', label: 'Team Name', isSortingDisabled: true },
|
|
18
|
+
{ id: 'session', label: 'Session', isSortingDisabled: false }
|
|
19
|
+
];
|
|
20
|
+
const tableData = [
|
|
21
|
+
{
|
|
22
|
+
player: 'John Smith',
|
|
23
|
+
team: 'Mavericks',
|
|
24
|
+
session: 'NorCal Adults',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
player: 'Megan Brown',
|
|
28
|
+
team: 'Mini Mavericks',
|
|
29
|
+
session: 'SoCal Juniors',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
player: 'George Fox',
|
|
33
|
+
team: 'Grey Foxes',
|
|
34
|
+
session: 'North Bay Junios',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
player: 'Alison Green',
|
|
38
|
+
team: 'Lions',
|
|
39
|
+
session: 'Outer Bay UTR 2-5',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
player: 'Linda Belinda',
|
|
43
|
+
team: 'Green Hornets',
|
|
44
|
+
session: 'Tri-State UTR 1-3',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const onOrderPropertyChange = () => { };
|
|
48
|
+
const SAMPLE_CARD_DATA = {
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
id: 1,
|
|
52
|
+
label: 'Team 1',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 2,
|
|
56
|
+
label: 'Team 2',
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
selectedOptions: {
|
|
60
|
+
optionOne: 1,
|
|
61
|
+
optionTwo: 2,
|
|
62
|
+
},
|
|
63
|
+
dateLabel: 'Dec 20 at 9:00am',
|
|
64
|
+
locationLabel: 'Taube Tennis Center',
|
|
65
|
+
};
|
|
66
|
+
// Default
|
|
67
|
+
export default {
|
|
68
|
+
title: 'Organisms/Tables',
|
|
69
|
+
};
|
|
70
|
+
// Templates
|
|
71
|
+
function DrawCardTableTemplate(args) {
|
|
72
|
+
return React.createElement(DrawCardTable, Object.assign({}, args));
|
|
73
|
+
}
|
|
74
|
+
const headerRows = [
|
|
75
|
+
{ name: 'Round 1' },
|
|
76
|
+
{ name: 'Quarterfinal' },
|
|
77
|
+
{ name: 'SemiFinal' },
|
|
78
|
+
];
|
|
79
|
+
const tableRows = [
|
|
80
|
+
[
|
|
81
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
82
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
83
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
84
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
85
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
86
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
87
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
88
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
92
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
93
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
94
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
98
|
+
React.createElement(DrawCard, Object.assign({}, SAMPLE_CARD_DATA)),
|
|
99
|
+
],
|
|
100
|
+
];
|
|
101
|
+
// Stories
|
|
102
|
+
export const DrawTable = DrawCardTableTemplate.bind({});
|
|
103
|
+
DrawTable.args = {
|
|
104
|
+
headerRows,
|
|
105
|
+
tableRows,
|
|
106
|
+
};
|
|
107
|
+
export const SortableTable = DrawCardTableTemplate.bind({});
|
|
108
|
+
SortableTable.args = {
|
|
109
|
+
headCells,
|
|
110
|
+
sortOrder: 'asc',
|
|
111
|
+
sortByProperty: 'player',
|
|
112
|
+
title: 'Player Table',
|
|
113
|
+
tableData,
|
|
114
|
+
rowComponent,
|
|
115
|
+
onOrderPropertyChange,
|
|
116
|
+
};
|
|
117
|
+
//# 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,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAc5C,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAY,EAAE,EAAE;IACtD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAC1C,OAAO,CACH,oBAAC,QAAQ;QACL,oBAAC,SAAS,IACN,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,OAAO,EACX,KAAK,EAAC,KAAK,EACX,OAAO,EAAC,QAAQ;YAEhB,oBAAC,UAAU,QAAE,MAAM,CAAc,CACzB;QACZ,oBAAC,SAAS,IAAC,KAAK,EAAC,MAAM;YACnB,oBAAC,UAAU,QAAE,IAAI,CAAc,CACvB;QACZ,oBAAC,SAAS,IAAC,KAAK,EAAC,MAAM;YACnB,oBAAC,UA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AAQ;IACxB,KAAK,EAAE,cAAc;IACrB,SAAS;IACT,YAAY;IACZ,qBAAqB;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedTypes.js","sourceRoot":"","sources":["../../../src/stories/organisms/sharedTypes.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -141,3 +141,45 @@ export default function Typography({
|
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
|
|
145
|
+
export const DISPLAY_SIZES_ENUM = {
|
|
146
|
+
XXXLarge: "XXX-large",
|
|
147
|
+
XXLarge: "XX-large",
|
|
148
|
+
XLarge: "X-large",
|
|
149
|
+
Large: 'large',
|
|
150
|
+
LargeLight: "large-light",
|
|
151
|
+
MediumBook: "medium-book",
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const PRIMARY_SIZES_ENUM = {
|
|
155
|
+
LargeBold: "large-bold",
|
|
156
|
+
LargeBook: "large-book",
|
|
157
|
+
LargeLight: "large-light",
|
|
158
|
+
MediumSemibold: "medium-semibold",
|
|
159
|
+
MediumMedium: "medium-medium",
|
|
160
|
+
MediumBook: "medium-book",
|
|
161
|
+
SmallBook: "small-book",
|
|
162
|
+
XSmallBook: "x-small-book",
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export const SECONDARY_SIZES_ENUM = {
|
|
166
|
+
LargeMedium: "large-medium",
|
|
167
|
+
LargeBook: "large-book",
|
|
168
|
+
MediumMedium: "medium-medium",
|
|
169
|
+
MediumBook: "medium-book",
|
|
170
|
+
SmallMediumCap: "small-medium-cap",
|
|
171
|
+
SmallMedium: "small-medium",
|
|
172
|
+
SmallBook: "small-book",
|
|
173
|
+
XSmallMediumCap: "x-small-medium-cap",
|
|
174
|
+
XSmallMedium: "x-small-medium",
|
|
175
|
+
XSmallBookCap: "x-small-book-cap",
|
|
176
|
+
XSmallBook: "x-small-book",
|
|
177
|
+
XXSmallMediumCap: "xx-small-medium-cap",
|
|
178
|
+
XXSmallBook: "xx-small-book",
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export const CATEGORY_ENUM = {
|
|
182
|
+
PRIMARY: 'primary',
|
|
183
|
+
SECONDARY: 'secondary',
|
|
184
|
+
DISPLAY: 'display'
|
|
185
|
+
};
|
|
@@ -2,19 +2,8 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import ContactCard from './ContactCard';
|
|
4
4
|
import TeamCard from './TeamCard';
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
options: [
|
|
47
|
+
{
|
|
48
|
+
id: 1,
|
|
49
|
+
label: 'Team 1',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 2,
|
|
53
|
+
label: 'Team 2',
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
selectedOptions: {
|
|
57
|
+
optionOne: 1,
|
|
58
|
+
optionTwo: 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,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import MuiSelect, { SelectChangeEvent } from '@mui/material/Select';
|
|
5
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
6
|
+
import Button from '../../atoms/Button/Button';
|
|
7
|
+
import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } 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
|
+
const Positions = {
|
|
35
|
+
ONE: '1',
|
|
36
|
+
TWO: '2',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default function DrawCard({
|
|
40
|
+
options, onChange, onEditClick, selectedOptions, dateLabel, locationLabel, ...props
|
|
41
|
+
}: DrawCardProps) {
|
|
42
|
+
const { optionOne, optionTwo } = selectedOptions || null;
|
|
43
|
+
|
|
44
|
+
const handleOnSelectionChange = (event: SelectChangeEvent<unknown>, position: string) => {
|
|
45
|
+
const id = event.target.value as string;
|
|
46
|
+
|
|
47
|
+
if (onChange) {
|
|
48
|
+
onChange({ position, id });
|
|
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={optionOne}
|
|
60
|
+
label="teamOne"
|
|
61
|
+
onChange={(e) => handleOnSelectionChange(e, Positions.ONE)}
|
|
62
|
+
>
|
|
63
|
+
{options.map((option) => <MenuItem key={option.id} value={option.id}>{option.label}</MenuItem>)}
|
|
64
|
+
</StyledMuiSelect>
|
|
65
|
+
|
|
66
|
+
<Box pt={1} />
|
|
67
|
+
<StyledMuiSelect
|
|
68
|
+
labelId="draw-card-select-label-bot"
|
|
69
|
+
id="draw-card-select-bot"
|
|
70
|
+
value={optionTwo}
|
|
71
|
+
label="teamTwo"
|
|
72
|
+
onChange={(e) => handleOnSelectionChange(e, Positions.TWO)}
|
|
73
|
+
>
|
|
74
|
+
{options.map((option) => <MenuItem key={option.id} value={option.id}>{option.label}</MenuItem>)}
|
|
75
|
+
</StyledMuiSelect>
|
|
76
|
+
<BottomGrid>
|
|
77
|
+
|
|
78
|
+
<Box>
|
|
79
|
+
<Typography category={CATEGORY_ENUM.SECONDARY} size={SECONDARY_SIZES_ENUM.SmallBook}>
|
|
80
|
+
{dateLabel}
|
|
81
|
+
</Typography>
|
|
82
|
+
<Typography category={CATEGORY_ENUM.SECONDARY} size={SECONDARY_SIZES_ENUM.SmallBook}>
|
|
83
|
+
{locationLabel}
|
|
84
|
+
</Typography>
|
|
85
|
+
</Box>
|
|
86
|
+
<Button
|
|
87
|
+
style={{
|
|
88
|
+
display: 'flex',
|
|
89
|
+
justifyContent: 'end'
|
|
90
|
+
}}
|
|
91
|
+
onClick={onEditClick}
|
|
92
|
+
category="link"
|
|
93
|
+
>
|
|
94
|
+
<Typography category={CATEGORY_ENUM.SECONDARY} size={SECONDARY_SIZES_ENUM.XSmallMediumCap}>
|
|
95
|
+
Edit
|
|
96
|
+
</Typography>
|
|
97
|
+
</Button>
|
|
98
|
+
</BottomGrid>
|
|
99
|
+
</StyledCard>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -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 (
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Card types
|
|
2
|
+
|
|
3
|
+
type SelectedOptions = {
|
|
4
|
+
optionOne: number;
|
|
5
|
+
optionTwo: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type Options = {
|
|
9
|
+
id: number;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
|
|
13
|
+
type OnChangeArgs = {
|
|
14
|
+
position: string;
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type DrawCardProps = {
|
|
19
|
+
options: Options;
|
|
20
|
+
selectedOptions: SelectedOptions;
|
|
21
|
+
dateLabel: string;
|
|
22
|
+
locationLabel: string;
|
|
23
|
+
onEditClick?: VoidFunction;
|
|
24
|
+
onChange?: ({ position, id }: OnChangeArgs) => null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface TeamCardProps {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ContactCardProps {
|
|
33
|
+
name: string;
|
|
34
|
+
phone: string;
|
|
35
|
+
email: string;
|
|
36
|
+
onMessageClick?: VoidFunction;
|
|
37
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Typography from '../atoms/Typography/Typography';
|
|
6
|
+
import { DrawCardTableProps } from './sharedTypes';
|
|
7
|
+
|
|
8
|
+
const StyledHeader = styled(Grid)({
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
display: 'flex',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const GridSections = styled(Box)({
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
padding: '8px'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default function DrawCardTable({
|
|
21
|
+
headerRows,
|
|
22
|
+
tableRows,
|
|
23
|
+
...props
|
|
24
|
+
}: DrawCardTableProps) {
|
|
25
|
+
const totalColumns = Math.floor(12 / headerRows.length);
|
|
26
|
+
|
|
27
|
+
const formatTableRows = tableRows.map((row, index) => {
|
|
28
|
+
const rowSectionsWidth = `${100 / tableRows[index].length}%`;
|
|
29
|
+
const sectionAmount = tableRows[index].length;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Grid key={index} xs={totalColumns}>
|
|
33
|
+
{[...Array(sectionAmount)].map((section, idx) => (
|
|
34
|
+
<GridSections key={idx} sx={{ height: rowSectionsWidth }}>
|
|
35
|
+
{row[idx]}
|
|
36
|
+
</GridSections>
|
|
37
|
+
))}
|
|
38
|
+
</Grid>
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Box {...props} sx={{ flexGrow: 1 }} aria-label="draw table">
|
|
44
|
+
<Grid container sx={{ height: '60px' }}>
|
|
45
|
+
{headerRows.map((row) => (
|
|
46
|
+
<StyledHeader key={row.name} xs={totalColumns}>
|
|
47
|
+
<Typography category="secondary" size="small-medium-cap">{row.name}</Typography>
|
|
48
|
+
</StyledHeader>
|
|
49
|
+
))}
|
|
50
|
+
</Grid>
|
|
51
|
+
<Grid container>
|
|
52
|
+
{formatTableRows}
|
|
53
|
+
</Grid>
|
|
54
|
+
</Box>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableRow, TableCell, Typography } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
// Default
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Organisms/SortableTable',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// Templates
|
|
12
|
-
function SortableTableTemplate(args: SortableTableProps) {
|
|
13
|
-
return <SortableTable {...args} />;
|
|
14
|
-
}
|
|
3
|
+
import DrawCard from '../molecules/Cards/DrawCard';
|
|
4
|
+
import DrawCardTable from './DrawCardTable';
|
|
5
|
+
import { DrawCardTableProps } from './sharedTypes';
|
|
15
6
|
|
|
16
7
|
interface RowData {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
player: string;
|
|
9
|
+
team: string;
|
|
10
|
+
session: string;
|
|
20
11
|
}
|
|
21
12
|
|
|
22
13
|
interface RowProps {
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
rowData: RowData,
|
|
15
|
+
labelId: string;
|
|
25
16
|
}
|
|
26
17
|
|
|
27
18
|
const rowComponent = ({ rowData, labelId }: RowProps) => {
|
|
@@ -43,7 +34,7 @@ const rowComponent = ({ rowData, labelId }: RowProps) => {
|
|
|
43
34
|
<Typography>{session}</Typography>
|
|
44
35
|
</TableCell>
|
|
45
36
|
</TableRow>
|
|
46
|
-
|
|
37
|
+
|
|
47
38
|
);
|
|
48
39
|
};
|
|
49
40
|
|
|
@@ -82,9 +73,73 @@ const tableData = [
|
|
|
82
73
|
|
|
83
74
|
const onOrderPropertyChange = () => {};
|
|
84
75
|
|
|
76
|
+
const SAMPLE_CARD_DATA = {
|
|
77
|
+
options: [
|
|
78
|
+
{
|
|
79
|
+
id: 1,
|
|
80
|
+
label: 'Team 1',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 2,
|
|
84
|
+
label: 'Team 2',
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
selectedOptions: {
|
|
88
|
+
optionOne: 1,
|
|
89
|
+
optionTwo: 2,
|
|
90
|
+
},
|
|
91
|
+
dateLabel: 'Dec 20 at 9:00am',
|
|
92
|
+
locationLabel: 'Taube Tennis Center',
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// Default
|
|
96
|
+
export default {
|
|
97
|
+
title: 'Organisms/Tables',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Templates
|
|
101
|
+
function DrawCardTableTemplate(args: DrawCardTableProps) {
|
|
102
|
+
return <DrawCardTable {...args} />;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const headerRows = [
|
|
106
|
+
{ name: 'Round 1' },
|
|
107
|
+
{ name: 'Quarterfinal' },
|
|
108
|
+
{ name: 'SemiFinal' },
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
const tableRows = [
|
|
112
|
+
[
|
|
113
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
114
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
115
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
116
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
117
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
118
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
119
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
120
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
121
|
+
],
|
|
122
|
+
[
|
|
123
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
124
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
125
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
126
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
130
|
+
<DrawCard {...SAMPLE_CARD_DATA} />,
|
|
131
|
+
],
|
|
132
|
+
];
|
|
133
|
+
|
|
85
134
|
// Stories
|
|
135
|
+
export const DrawTable = DrawCardTableTemplate.bind({});
|
|
136
|
+
DrawTable.args = {
|
|
137
|
+
headerRows,
|
|
138
|
+
tableRows,
|
|
139
|
+
};
|
|
86
140
|
|
|
87
|
-
const
|
|
141
|
+
export const SortableTable = DrawCardTableTemplate.bind({});
|
|
142
|
+
SortableTable.args = {
|
|
88
143
|
headCells,
|
|
89
144
|
sortOrder: 'asc',
|
|
90
145
|
sortByProperty: 'player',
|
|
@@ -93,6 +148,3 @@ const args = {
|
|
|
93
148
|
rowComponent,
|
|
94
149
|
onOrderPropertyChange,
|
|
95
150
|
};
|
|
96
|
-
|
|
97
|
-
export const DefaultTable = SortableTableTemplate.bind({});
|
|
98
|
-
DefaultTable.args = args;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SortableTable.js","sourceRoot":"","sources":["../../../src/stories/oraganisms/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,gCAAgC,CAAC;AAqBxD,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,SAAS,EACT,YAAY,EACZ,SAAS,EACT,cAAc,EACd,KAAK,GAAG,EAAE,EACV,qBAAqB,GACF;IACnB,MAAM,QAAQ,GAAG,YAAY,CAAC;IAE9B,MAAM,iBAAiB,GAAG,CAAC,QAAuB,EAAE,EAAE,CAAC,CAAC,KAAqB,EAAE,EAAE;QAC/E,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,KAAK,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE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AG,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"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TableRow, TableCell, Typography } from '@mui/material';
|
|
3
|
-
import SortableTable from './SortableTable';
|
|
4
|
-
// Default
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Organisms/SortableTable',
|
|
7
|
-
};
|
|
8
|
-
// Templates
|
|
9
|
-
function SortableTableTemplate(args) {
|
|
10
|
-
return React.createElement(SortableTable, Object.assign({}, args));
|
|
11
|
-
}
|
|
12
|
-
const rowComponent = ({ rowData, labelId }) => {
|
|
13
|
-
const { player, session, team } = rowData;
|
|
14
|
-
return (React.createElement(TableRow, null,
|
|
15
|
-
React.createElement(TableCell, { component: "th", id: labelId, scope: "row", padding: "normal" },
|
|
16
|
-
React.createElement(Typography, null, player)),
|
|
17
|
-
React.createElement(TableCell, { align: "left" },
|
|
18
|
-
React.createElement(Typography, null, team)),
|
|
19
|
-
React.createElement(TableCell, { align: "left" },
|
|
20
|
-
React.createElement(Typography, null, session))));
|
|
21
|
-
};
|
|
22
|
-
const headCells = [
|
|
23
|
-
{ id: 'player', label: 'Player Name', isSortingDisabled: false },
|
|
24
|
-
{ id: 'team', label: 'Team Name', isSortingDisabled: true },
|
|
25
|
-
{ id: 'session', label: 'Session', isSortingDisabled: false }
|
|
26
|
-
];
|
|
27
|
-
const tableData = [
|
|
28
|
-
{
|
|
29
|
-
player: 'John Smith',
|
|
30
|
-
team: 'Mavericks',
|
|
31
|
-
session: 'NorCal Adults',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
player: 'Megan Brown',
|
|
35
|
-
team: 'Mini Mavericks',
|
|
36
|
-
session: 'SoCal Juniors',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
player: 'George Fox',
|
|
40
|
-
team: 'Grey Foxes',
|
|
41
|
-
session: 'North Bay Junios',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
player: 'Alison Green',
|
|
45
|
-
team: 'Lions',
|
|
46
|
-
session: 'Outer Bay UTR 2-5',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
player: 'Linda Belinda',
|
|
50
|
-
team: 'Green Hornets',
|
|
51
|
-
session: 'Tri-State UTR 1-3',
|
|
52
|
-
},
|
|
53
|
-
];
|
|
54
|
-
const onOrderPropertyChange = () => { };
|
|
55
|
-
// Stories
|
|
56
|
-
const args = {
|
|
57
|
-
headCells,
|
|
58
|
-
sortOrder: 'asc',
|
|
59
|
-
sortByProperty: 'player',
|
|
60
|
-
title: 'Player Table',
|
|
61
|
-
tableData,
|
|
62
|
-
rowComponent,
|
|
63
|
-
onOrderPropertyChange,
|
|
64
|
-
};
|
|
65
|
-
export const DefaultTable = SortableTableTemplate.bind({});
|
|
66
|
-
DefaultTable.args = args;
|
|
67
|
-
//# sourceMappingURL=SortableTable.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SortableTable.stories.js","sourceRoot":"","sources":["../../../src/stories/oraganisms/SortableTable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,aAAqC,MAAM,iBAAiB,CAAC;AAEpE,UAAU;AACV,eAAe;IACb,KAAK,EAAE,yBAAyB;CACjC,CAAC;AAEF,YAAY;AACZ,SAAS,qBAAqB,CAAC,IAAwB;IACrD,OAAO,oB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