@universal-tennis/ui-shared 0.1.15 → 0.1.16
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.
|
@@ -15,7 +15,7 @@ import { styled } from '@mui/material/styles';
|
|
|
15
15
|
import Select from '@mui/material/Select';
|
|
16
16
|
import MenuItem from '@mui/material/MenuItem';
|
|
17
17
|
import { Divider, FormControl, InputLabel } from '@mui/material';
|
|
18
|
-
import
|
|
18
|
+
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
|
19
19
|
import IconButton from '@mui/material/IconButton';
|
|
20
20
|
import Button from '../../atoms/Button/Button';
|
|
21
21
|
import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from '../../atoms/Typography/Typography';
|
|
@@ -30,9 +30,6 @@ const StyledCard = styled(Box)({
|
|
|
30
30
|
cursor: 'pointer'
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
|
-
const StyledMuiSelect = styled(Select)({
|
|
34
|
-
border: '1px solid var(--cool-grey-600)',
|
|
35
|
-
});
|
|
36
33
|
const BottomGrid = styled(Box)({
|
|
37
34
|
display: 'flex',
|
|
38
35
|
alignItems: 'center',
|
|
@@ -56,19 +53,19 @@ export default function DrawCard(_a) {
|
|
|
56
53
|
isSelectActive ? (React.createElement(React.Fragment, null,
|
|
57
54
|
React.createElement(FormControl, { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' } },
|
|
58
55
|
React.createElement(InputLabel, { id: "draw-card-select-top" }, emptyLabel),
|
|
59
|
-
React.createElement(
|
|
56
|
+
React.createElement(Select, { sx: { width: '100%' }, labelId: "draw-card-select-top", id: "draw-card-select-top", label: emptyLabel, value: optionOne, disabled: isDisabled, onChange: (e) => handleOnSelectionChange(e, positions.ONE) },
|
|
60
57
|
options.map((option) => React.createElement(MenuItem, { key: option.id, value: option.id }, option.label)),
|
|
61
58
|
React.createElement(MenuItem, { sx: { borderTop: '1px solid var(--cool-grey-500)' }, value: "bye" }, "Set bye")),
|
|
62
59
|
React.createElement(IconButton, { onClick: () => onChange({ position: positions.ONE, id: null }), sx: { marginLeft: '8px' }, size: "small" },
|
|
63
|
-
React.createElement(
|
|
60
|
+
React.createElement(HighlightOffIcon, { sx: { fontSize: '16px' } }))),
|
|
64
61
|
React.createElement(Box, { pt: 2 }),
|
|
65
62
|
React.createElement(FormControl, { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' } },
|
|
66
63
|
React.createElement(InputLabel, { id: "draw-card-select-bot" }, emptyLabel),
|
|
67
|
-
React.createElement(
|
|
64
|
+
React.createElement(Select, { sx: { width: '100%' }, labelId: "draw-card-select-bot", id: "draw-card-select-bot", label: emptyLabel, value: optionTwo, disabled: isDisabled, onChange: (e) => handleOnSelectionChange(e, positions.TWO) },
|
|
68
65
|
options.map((option) => React.createElement(MenuItem, { key: option.id, value: option.id }, option.label)),
|
|
69
66
|
React.createElement(MenuItem, { sx: { borderTop: '1px solid var(--cool-grey-500)' }, value: "bye" }, "Set bye")),
|
|
70
67
|
React.createElement(IconButton, { onClick: () => onChange({ position: positions.TWO, id: null }), sx: { marginLeft: '8px' }, size: "small" },
|
|
71
|
-
React.createElement(
|
|
68
|
+
React.createElement(HighlightOffIcon, { sx: { fontSize: '16px' } }))))) : (React.createElement(React.Fragment, null,
|
|
72
69
|
React.createElement(Box, { display: "flex", justifyContent: "space-between" },
|
|
73
70
|
React.createElement(Typography, { category: "secondary", size: isPosition1Winner ? 'medium-medium' : "medium-book" }, position1Team === null || position1Team === void 0 ? void 0 : position1Team.name),
|
|
74
71
|
React.createElement(Typography, { category: "secondary", size: isPosition1Winner ? 'medium-medium' : "medium-book" }, isScorelessMatch ? '-' : position1Team === null || position1Team === void 0 ? void 0 : position1Team.points)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawCard.js","sourceRoot":"","sources":["../../../../src/stories/molecules/Cards/DrawCard.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM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,WAAW,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,IACrF,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CACX;gBACb,oBAAC,UAAU,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,IACrF,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CACtC,CACX,CACP,CACN;QAED,oBAAC,UAAU;YAEP,oBAAC,GAAG;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"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { styled } from '@mui/material/styles';
|
|
|
4
4
|
import Select, { SelectChangeEvent } from '@mui/material/Select';
|
|
5
5
|
import MenuItem from '@mui/material/MenuItem';
|
|
6
6
|
import { Divider, FormControl, InputLabel } from '@mui/material';
|
|
7
|
-
import
|
|
7
|
+
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
|
8
8
|
import IconButton from '@mui/material/IconButton';
|
|
9
9
|
import Button from '../../atoms/Button/Button';
|
|
10
10
|
import Typography, { SECONDARY_SIZES_ENUM, CATEGORY_ENUM } from '../../atoms/Typography/Typography';
|
|
@@ -23,10 +23,6 @@ const StyledCard = styled(Box)({
|
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
const StyledMuiSelect = styled(Select)({
|
|
27
|
-
border: '1px solid var(--cool-grey-600)',
|
|
28
|
-
});
|
|
29
|
-
|
|
30
26
|
const BottomGrid = styled(Box)({
|
|
31
27
|
display: 'flex',
|
|
32
28
|
alignItems: 'center',
|
|
@@ -63,7 +59,7 @@ export default function DrawCard({
|
|
|
63
59
|
<>
|
|
64
60
|
<FormControl style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
65
61
|
<InputLabel id="draw-card-select-top">{emptyLabel}</InputLabel>
|
|
66
|
-
<
|
|
62
|
+
<Select
|
|
67
63
|
sx={{ width: '100%' }}
|
|
68
64
|
labelId="draw-card-select-top"
|
|
69
65
|
id="draw-card-select-top"
|
|
@@ -74,16 +70,16 @@ export default function DrawCard({
|
|
|
74
70
|
>
|
|
75
71
|
{options.map((option) => <MenuItem key={option.id} value={option.id}>{option.label}</MenuItem>)}
|
|
76
72
|
<MenuItem sx={{ borderTop: '1px solid var(--cool-grey-500)' }} value="bye">Set bye</MenuItem>
|
|
77
|
-
</
|
|
73
|
+
</Select>
|
|
78
74
|
<IconButton onClick={() => onChange({ position: positions.ONE, id: null })} sx={{ marginLeft: '8px' }} size="small">
|
|
79
|
-
<
|
|
75
|
+
<HighlightOffIcon sx={{ fontSize: '16px' }} />
|
|
80
76
|
</IconButton>
|
|
81
77
|
</FormControl>
|
|
82
78
|
|
|
83
79
|
<Box pt={2} />
|
|
84
80
|
<FormControl style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
85
81
|
<InputLabel id="draw-card-select-bot">{emptyLabel}</InputLabel>
|
|
86
|
-
<
|
|
82
|
+
<Select
|
|
87
83
|
sx={{ width: '100%' }}
|
|
88
84
|
labelId="draw-card-select-bot"
|
|
89
85
|
id="draw-card-select-bot"
|
|
@@ -94,9 +90,9 @@ export default function DrawCard({
|
|
|
94
90
|
>
|
|
95
91
|
{options.map((option) => <MenuItem key={option.id} value={option.id}>{option.label}</MenuItem>)}
|
|
96
92
|
<MenuItem sx={{ borderTop: '1px solid var(--cool-grey-500)' }} value="bye">Set bye</MenuItem>
|
|
97
|
-
</
|
|
93
|
+
</Select>
|
|
98
94
|
<IconButton onClick={() => onChange({ position: positions.TWO, id: null })} sx={{ marginLeft: '8px' }} size="small">
|
|
99
|
-
<
|
|
95
|
+
<HighlightOffIcon sx={{ fontSize: '16px' }} />
|
|
100
96
|
</IconButton>
|
|
101
97
|
</FormControl>
|
|
102
98
|
</>
|