@veritone-ce/design-system 1.12.14 → 1.12.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.
- package/dist/assets/theme.js +314 -261
- package/dist/components/Box/__tests__/Box.test.js +15 -9
- package/dist/components/Box/index.js +16 -17
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +34 -29
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.js +25 -14
- package/dist/components/Breadcrumbs/breadcrumbs.theme.js +16 -9
- package/dist/components/Breadcrumbs/index.js +50 -27
- package/dist/components/Button/Button.stories.js +89 -37
- package/dist/components/Button/Indicator.js +32 -17
- package/dist/components/Button/__tests__/Button.test.js +58 -33
- package/dist/components/Button/button.theme.js +121 -102
- package/dist/components/Button/index.js +44 -34
- package/dist/components/Button/useButtonProps.js +17 -15
- package/dist/components/Checkbox/Checkbox.stories.js +46 -16
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +14 -9
- package/dist/components/Checkbox/checkbox.theme.js +23 -16
- package/dist/components/Checkbox/index.js +22 -17
- package/dist/components/CustomSlider/CustomSlider.stories.js +43 -24
- package/dist/components/CustomSlider/index.js +73 -55
- package/dist/components/Drawer/__tests__/Drawer.test.js +15 -9
- package/dist/components/Drawer/index.js +16 -17
- package/dist/components/FileUploader/FileUploader.stories.js +23 -24
- package/dist/components/FileUploader/__tests__/FileUploader.test.js +210 -220
- package/dist/components/FileUploader/index.js +211 -151
- package/dist/components/FileUploader/useUploadFile.js +69 -81
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.js +18 -9
- package/dist/components/FormControlLabel/index.js +16 -17
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.js +19 -20
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.js +14 -9
- package/dist/components/HomeOutlinedIcon/index.js +16 -17
- package/dist/components/IconGroups/IconGroups.stories.js +19 -20
- package/dist/components/IconGroups/__tests__/IconGroups.test.js +14 -9
- package/dist/components/IconGroups/index.js +17 -17
- package/dist/components/IconListItem/__tests__/IconListItem.test.js +14 -9
- package/dist/components/IconListItem/index.js +19 -17
- package/dist/components/Input/Input.stories.js +111 -51
- package/dist/components/Input/__tests__/Input.test.js +13 -9
- package/dist/components/Input/index.js +22 -19
- package/dist/components/Input/input.theme.js +104 -97
- package/dist/components/LinearProgress/LinearProgress.stories.js +42 -28
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.js +39 -17
- package/dist/components/LinearProgress/index.js +71 -21
- package/dist/components/LinearProgress/linearProgress.theme.js +19 -12
- package/dist/components/Link/__tests__/Link.test.js +14 -9
- package/dist/components/Link/index.js +16 -17
- package/dist/components/List/__tests__/List.test.js +14 -9
- package/dist/components/List/index.js +16 -17
- package/dist/components/ListItem/__tests__/ListItem.test.js +14 -9
- package/dist/components/ListItem/index.js +16 -17
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.js +14 -9
- package/dist/components/ListItemButton/index.js +16 -17
- package/dist/components/ListItemText/__tests__/ListItemText.test.js +14 -9
- package/dist/components/ListItemText/index.js +16 -17
- package/dist/components/MenuFlyout/MenuFlyout.stories.js +54 -32
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.js +41 -23
- package/dist/components/MenuFlyout/constants.js +12 -3
- package/dist/components/MenuFlyout/index.js +47 -26
- package/dist/components/MenuFlyout/menuFlyout.theme.js +46 -38
- package/dist/components/Modal/Modal.stories.js +190 -95
- package/dist/components/Modal/__tests__/Modal.test.js +16 -9
- package/dist/components/Modal/index.js +30 -17
- package/dist/components/Modal/modal.theme.js +30 -23
- package/dist/components/ModelGridView/ModelGridView.stories.js +40 -43
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.js +47 -42
- package/dist/components/ModelGridView/index.js +258 -150
- package/dist/components/Panel/Panel.stories.js +61 -44
- package/dist/components/Panel/__tests__/Panel.test.js +73 -43
- package/dist/components/Panel/index.js +116 -78
- package/dist/components/ProgressIndicator/DefaultProgress.js +28 -20
- package/dist/components/ProgressIndicator/MLProgress.js +30 -24
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +41 -38
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.js +31 -17
- package/dist/components/ProgressIndicator/index.js +26 -18
- package/dist/components/RadioButton/RadioButton.stories.js +37 -28
- package/dist/components/RadioButton/RadioButton.theme.js +59 -52
- package/dist/components/RadioButton/__tests__/RadioButton.test.js +13 -9
- package/dist/components/RadioButton/index.js +37 -28
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.js +14 -9
- package/dist/components/RadioGroup/index.js +16 -17
- package/dist/components/Select/Select.stories.js +82 -33
- package/dist/components/Select/__tests__/Select.test.js +39 -18
- package/dist/components/Select/index.js +99 -49
- package/dist/components/Select/select.theme.js +58 -51
- package/dist/components/StatusChip/StatusChip.stories.js +57 -43
- package/dist/components/StatusChip/__tests__/StatusChip.test.js +44 -27
- package/dist/components/StatusChip/constants.js +12 -3
- package/dist/components/StatusChip/index.js +28 -22
- package/dist/components/StatusChip/statusChip.theme.js +41 -22
- package/dist/components/Step/__tests__/Step.test.js +14 -9
- package/dist/components/Step/index.js +16 -17
- package/dist/components/StepLabel/__tests__/StepLabel.test.js +14 -9
- package/dist/components/StepLabel/index.js +16 -17
- package/dist/components/Stepper/Stepper.stories.js +37 -21
- package/dist/components/Stepper/__tests__/Stepper.test.js +14 -9
- package/dist/components/Stepper/index.js +15 -5
- package/dist/components/Stepper/stepper.theme.js +52 -45
- package/dist/components/Tabs/Badge.js +29 -10
- package/dist/components/Tabs/Tabs.stories.js +52 -33
- package/dist/components/Tabs/__tests__/Tabs.test.js +41 -14
- package/dist/components/Tabs/index.js +27 -18
- package/dist/components/Tabs/tabs.theme.js +34 -27
- package/dist/components/ThemeProvider/__tests__/Button.test.js +14 -9
- package/dist/components/ThemeProvider/index.js +19 -6
- package/dist/components/Toast/Toast.stories.js +103 -37
- package/dist/components/Toast/__tests__/Toast.test.js +47 -29
- package/dist/components/Toast/index.js +58 -38
- package/dist/components/Typography/Typography.stories.js +20 -20
- package/dist/components/Typography/__tests__/Typography.test.js +15 -9
- package/dist/components/Typography/index.js +16 -17
- package/dist/components/UtilityRail/UtilityRail.stories.js +22 -21
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.js +17 -10
- package/dist/components/UtilityRail/index.js +75 -53
- package/dist/components/UtilityRail/mock.js +32 -32
- package/dist/index.js +223 -31
- package/dist/react-app-env.d.js +2 -0
- package/dist/reportWebVitals.js +26 -11
- package/dist/setupTests.js +3 -5
- package/dist/utils/tests/helpers.js +31 -20
- package/package.json +9 -4
- package/dist/assets/theme.d.ts +0 -59
- package/dist/components/Box/__tests__/Box.test.d.ts +0 -1
- package/dist/components/Box/index.d.ts +0 -6
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.d.ts +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.theme.d.ts +0 -11
- package/dist/components/Breadcrumbs/index.d.ts +0 -15
- package/dist/components/Button/Button.stories.d.ts +0 -7
- package/dist/components/Button/Indicator.d.ts +0 -2
- package/dist/components/Button/__tests__/Button.test.d.ts +0 -1
- package/dist/components/Button/button.theme.d.ts +0 -4
- package/dist/components/Button/index.d.ts +0 -10
- package/dist/components/Button/useButtonProps.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/checkbox.theme.d.ts +0 -18
- package/dist/components/Checkbox/index.d.ts +0 -7
- package/dist/components/CustomSlider/CustomSlider.stories.d.ts +0 -5
- package/dist/components/CustomSlider/index.d.ts +0 -12
- package/dist/components/Drawer/__tests__/Drawer.test.d.ts +0 -1
- package/dist/components/Drawer/index.d.ts +0 -6
- package/dist/components/FileUploader/FileUploader.stories.d.ts +0 -15
- package/dist/components/FileUploader/__tests__/FileUploader.test.d.ts +0 -1
- package/dist/components/FileUploader/index.d.ts +0 -21
- package/dist/components/FileUploader/useUploadFile.d.ts +0 -5
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.d.ts +0 -1
- package/dist/components/FormControlLabel/index.d.ts +0 -6
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.d.ts +0 -7
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.d.ts +0 -1
- package/dist/components/HomeOutlinedIcon/index.d.ts +0 -5
- package/dist/components/IconGroups/IconGroups.stories.d.ts +0 -7
- package/dist/components/IconGroups/__tests__/IconGroups.test.d.ts +0 -1
- package/dist/components/IconGroups/index.d.ts +0 -5
- package/dist/components/IconListItem/__tests__/IconListItem.test.d.ts +0 -1
- package/dist/components/IconListItem/index.d.ts +0 -7
- package/dist/components/Input/Input.stories.d.ts +0 -11
- package/dist/components/Input/__tests__/Input.test.d.ts +0 -1
- package/dist/components/Input/index.d.ts +0 -6
- package/dist/components/Input/input.theme.d.ts +0 -3
- package/dist/components/LinearProgress/LinearProgress.stories.d.ts +0 -14
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.d.ts +0 -1
- package/dist/components/LinearProgress/index.d.ts +0 -27
- package/dist/components/LinearProgress/linearProgress.theme.d.ts +0 -14
- package/dist/components/Link/__tests__/Link.test.d.ts +0 -1
- package/dist/components/Link/index.d.ts +0 -6
- package/dist/components/List/__tests__/List.test.d.ts +0 -1
- package/dist/components/List/index.d.ts +0 -6
- package/dist/components/ListItem/__tests__/ListItem.test.d.ts +0 -1
- package/dist/components/ListItem/index.d.ts +0 -6
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.d.ts +0 -1
- package/dist/components/ListItemButton/index.d.ts +0 -6
- package/dist/components/ListItemText/__tests__/ListItemText.test.d.ts +0 -1
- package/dist/components/ListItemText/index.d.ts +0 -6
- package/dist/components/MenuFlyout/MenuFlyout.stories.d.ts +0 -31
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.d.ts +0 -1
- package/dist/components/MenuFlyout/constants.d.ts +0 -3
- package/dist/components/MenuFlyout/index.d.ts +0 -15
- package/dist/components/MenuFlyout/menuFlyout.theme.d.ts +0 -41
- package/dist/components/Modal/Modal.stories.d.ts +0 -15
- package/dist/components/Modal/__tests__/Modal.test.d.ts +0 -1
- package/dist/components/Modal/index.d.ts +0 -11
- package/dist/components/Modal/modal.theme.d.ts +0 -3
- package/dist/components/ModelGridView/ModelGridView.stories.d.ts +0 -5
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.d.ts +0 -1
- package/dist/components/ModelGridView/index.d.ts +0 -13
- package/dist/components/Panel/Panel.stories.d.ts +0 -14
- package/dist/components/Panel/__tests__/Panel.test.d.ts +0 -1
- package/dist/components/Panel/index.d.ts +0 -11
- package/dist/components/ProgressIndicator/DefaultProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/MLProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +0 -7
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.d.ts +0 -1
- package/dist/components/ProgressIndicator/index.d.ts +0 -11
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -10
- package/dist/components/RadioButton/RadioButton.theme.d.ts +0 -4
- package/dist/components/RadioButton/__tests__/RadioButton.test.d.ts +0 -1
- package/dist/components/RadioButton/index.d.ts +0 -7
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.d.ts +0 -1
- package/dist/components/RadioGroup/index.d.ts +0 -6
- package/dist/components/Select/Select.stories.d.ts +0 -5
- package/dist/components/Select/__tests__/Select.test.d.ts +0 -1
- package/dist/components/Select/index.d.ts +0 -15
- package/dist/components/Select/select.theme.d.ts +0 -53
- package/dist/components/StatusChip/StatusChip.stories.d.ts +0 -51
- package/dist/components/StatusChip/__tests__/StatusChip.test.d.ts +0 -1
- package/dist/components/StatusChip/constants.d.ts +0 -3
- package/dist/components/StatusChip/index.d.ts +0 -28
- package/dist/components/StatusChip/statusChip.theme.d.ts +0 -4
- package/dist/components/Step/__tests__/Step.test.d.ts +0 -1
- package/dist/components/Step/index.d.ts +0 -6
- package/dist/components/StepLabel/__tests__/StepLabel.test.d.ts +0 -1
- package/dist/components/StepLabel/index.d.ts +0 -6
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -21
- package/dist/components/Stepper/__tests__/Stepper.test.d.ts +0 -1
- package/dist/components/Stepper/index.d.ts +0 -13
- package/dist/components/Stepper/stepper.theme.d.ts +0 -50
- package/dist/components/Tabs/Badge.d.ts +0 -7
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -6
- package/dist/components/Tabs/__tests__/Tabs.test.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -14
- package/dist/components/Tabs/tabs.theme.d.ts +0 -4
- package/dist/components/ThemeProvider/__tests__/Button.test.d.ts +0 -1
- package/dist/components/ThemeProvider/index.d.ts +0 -3
- package/dist/components/Toast/Toast.stories.d.ts +0 -14
- package/dist/components/Toast/__tests__/Toast.test.d.ts +0 -1
- package/dist/components/Toast/index.d.ts +0 -23
- package/dist/components/Typography/Typography.stories.d.ts +0 -20
- package/dist/components/Typography/__tests__/Typography.test.d.ts +0 -1
- package/dist/components/Typography/index.d.ts +0 -6
- package/dist/components/UtilityRail/UtilityRail.stories.d.ts +0 -8
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.d.ts +0 -1
- package/dist/components/UtilityRail/index.d.ts +0 -11
- package/dist/components/UtilityRail/mock.d.ts +0 -2
- package/dist/index.d.ts +0 -31
- package/dist/reportWebVitals.d.ts +0 -3
- package/dist/setupTests.d.ts +0 -1
- package/dist/utils/tests/helpers.d.ts +0 -6
|
@@ -1,51 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _Lens = _interopRequireDefault(require("@mui/icons-material/Lens"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const Select = ({
|
|
12
|
+
label,
|
|
13
|
+
items,
|
|
14
|
+
helperText,
|
|
15
|
+
errorMessage,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
19
|
+
sx: {
|
|
20
|
+
maxHeight: helperText ? '77px' : '56px'
|
|
21
|
+
},
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
23
|
+
id: "label-select",
|
|
24
|
+
sx: {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'flex-end',
|
|
27
|
+
lineHeight: '17px',
|
|
28
|
+
marginBottom: '3px'
|
|
29
|
+
},
|
|
30
|
+
children: label
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
32
|
+
sx: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
'& .MuiOutlinedInput-root': {
|
|
35
|
+
'& .MuiSelect-outlined': {
|
|
36
|
+
padding: helperText ? '7px 7.5px' : '5px 8px',
|
|
37
|
+
fontSize: helperText ? '14px' : '16px',
|
|
38
|
+
lineHeight: helperText ? '20px' : '24px'
|
|
39
|
+
},
|
|
40
|
+
'&.Mui-error': {
|
|
41
|
+
'& .MuiSelect-outlined': {
|
|
42
|
+
padding: helperText ? '7px 8px' : '5px 13px'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
9
45
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
},
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Select, {
|
|
48
|
+
...props,
|
|
49
|
+
labelId: "label-select",
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
51
|
+
value: "",
|
|
52
|
+
children: "Select"
|
|
53
|
+
}), items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
54
|
+
value: item.value,
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
56
|
+
sx: {
|
|
57
|
+
lineHeight: '20px',
|
|
58
|
+
fontSize: '14px',
|
|
59
|
+
opacity: 0.9
|
|
60
|
+
},
|
|
61
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
62
|
+
sx: {
|
|
63
|
+
fontWeight: 700
|
|
64
|
+
},
|
|
65
|
+
children: item.title
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
67
|
+
children: item.name
|
|
68
|
+
})]
|
|
69
|
+
})
|
|
70
|
+
}, index))]
|
|
71
|
+
})
|
|
72
|
+
}), helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormHelperText, {
|
|
73
|
+
sx: {
|
|
74
|
+
lineHeight: '18px',
|
|
75
|
+
color: theme => theme.palette.text.disabled
|
|
76
|
+
},
|
|
77
|
+
children: helperText
|
|
78
|
+
}), props.error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
79
|
+
sx: {
|
|
80
|
+
display: 'flex',
|
|
81
|
+
alignItems: 'center'
|
|
82
|
+
},
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Lens.default, {
|
|
84
|
+
sx: {
|
|
85
|
+
width: '14px',
|
|
86
|
+
height: '14px',
|
|
87
|
+
margin: '1px 3px 0 -2px',
|
|
88
|
+
color: theme => theme.palette.error.main
|
|
89
|
+
}
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormHelperText, {
|
|
91
|
+
sx: {
|
|
92
|
+
color: theme => theme.palette.error.main,
|
|
93
|
+
lineHeight: '18px'
|
|
94
|
+
},
|
|
95
|
+
children: errorMessage
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
50
99
|
};
|
|
51
|
-
|
|
100
|
+
var _default = Select;
|
|
101
|
+
exports.default = _default;
|
|
@@ -1,52 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
styleOverrides: {
|
|
7
|
-
root: () => ({
|
|
8
|
-
'&.MuiOutlinedInput-root': {
|
|
9
|
-
'& .MuiSelect-outlined': {
|
|
10
|
-
border: '1px solid ' + theme.palette.text.secondary
|
|
11
|
-
},
|
|
12
|
-
'&.Mui-focused': {
|
|
13
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
14
|
-
borderColor: theme.palette.secondary.main
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
'&.Mui-error': {
|
|
18
|
-
'& .MuiSelect-outlined': {
|
|
19
|
-
color: theme.palette.error.main,
|
|
20
|
-
border: '1px solid ' + theme.palette.error.main,
|
|
21
|
-
fontSize: '16px',
|
|
22
|
-
lineHeight: '24px'
|
|
23
|
-
},
|
|
24
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
25
|
-
borderColor: theme.palette.error.main
|
|
26
|
-
},
|
|
27
|
-
'& .MuiSelect-iconOutlined': {
|
|
28
|
-
color: theme.palette.text.tertiary
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
'&.Mui-disabled': {
|
|
32
|
-
'& .MuiSelect-iconOutlined': {
|
|
33
|
-
color: theme.palette.text.disabled
|
|
34
|
-
},
|
|
35
|
-
'& .MuiSelect-outlined': {
|
|
36
|
-
background: theme.palette.misc.rowHoverGreyOne,
|
|
37
|
-
borderColor: theme.palette.misc.altBackground,
|
|
38
|
-
color: theme.palette.text.disabled,
|
|
39
|
-
WebkitTextFillColor: theme.palette.text.disabled
|
|
40
|
-
},
|
|
41
|
-
'& .MuiOutlinedInput-notchedOutline': {
|
|
42
|
-
border: 'none'
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
'& .MuiSelect-iconOutlined': {
|
|
46
|
-
color: theme.palette.secondary.main
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
51
5
|
});
|
|
52
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const selectTheme = theme => ({
|
|
8
|
+
defaultProps: {
|
|
9
|
+
fullWidth: true,
|
|
10
|
+
displayEmpty: true
|
|
11
|
+
},
|
|
12
|
+
styleOverrides: {
|
|
13
|
+
root: () => ({
|
|
14
|
+
'&.MuiOutlinedInput-root': {
|
|
15
|
+
'& .MuiSelect-outlined': {
|
|
16
|
+
border: '1px solid ' + theme.palette.text.secondary
|
|
17
|
+
},
|
|
18
|
+
'&.Mui-focused': {
|
|
19
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
20
|
+
borderColor: theme.palette.secondary.main
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
'&.Mui-error': {
|
|
24
|
+
'& .MuiSelect-outlined': {
|
|
25
|
+
color: theme.palette.error.main,
|
|
26
|
+
border: '1px solid ' + theme.palette.error.main,
|
|
27
|
+
fontSize: '16px',
|
|
28
|
+
lineHeight: '24px'
|
|
29
|
+
},
|
|
30
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
31
|
+
borderColor: theme.palette.error.main
|
|
32
|
+
},
|
|
33
|
+
'& .MuiSelect-iconOutlined': {
|
|
34
|
+
color: theme.palette.text.tertiary
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
'&.Mui-disabled': {
|
|
38
|
+
'& .MuiSelect-iconOutlined': {
|
|
39
|
+
color: theme.palette.text.disabled
|
|
40
|
+
},
|
|
41
|
+
'& .MuiSelect-outlined': {
|
|
42
|
+
background: theme.palette.misc.rowHoverGreyOne,
|
|
43
|
+
borderColor: theme.palette.misc.altBackground,
|
|
44
|
+
color: theme.palette.text.disabled,
|
|
45
|
+
WebkitTextFillColor: theme.palette.text.disabled
|
|
46
|
+
},
|
|
47
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
48
|
+
border: 'none'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
'& .MuiSelect-iconOutlined': {
|
|
52
|
+
color: theme.palette.secondary.main
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
var _default = selectTheme;
|
|
59
|
+
exports.default = _default;
|
|
@@ -1,45 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Options = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
var _ = _interopRequireDefault(require("."));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _default = {
|
|
13
|
+
title: 'Components/StatusChip',
|
|
14
|
+
component: _.default,
|
|
15
|
+
argTypes: {
|
|
16
|
+
status: {
|
|
17
|
+
options: [_constants.COMPLETE, _constants.PROCESSING, _constants.ERROR, 'custom'],
|
|
18
|
+
control: {
|
|
19
|
+
type: 'radio'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
control: {
|
|
24
|
+
type: 'text'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
children: {
|
|
28
|
+
control: 'none'
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
options: ['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning', undefined]
|
|
31
32
|
}
|
|
33
|
+
}
|
|
32
34
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
exports.default = _default;
|
|
36
|
+
const previewProps = [{
|
|
37
|
+
status: _constants.COMPLETE
|
|
38
|
+
}, {
|
|
39
|
+
status: _constants.PROCESSING
|
|
40
|
+
}, {
|
|
41
|
+
status: _constants.ERROR
|
|
42
|
+
}];
|
|
43
|
+
const Template = args => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
44
|
+
sx: {
|
|
45
|
+
display: `grid`,
|
|
46
|
+
gridTemplateRows: `repeat(4, min-content)`,
|
|
47
|
+
justifyItems: `flex-start`,
|
|
48
|
+
gap: 2
|
|
49
|
+
},
|
|
50
|
+
children: previewProps.map((props, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
52
|
+
...props,
|
|
53
|
+
...args
|
|
54
|
+
})
|
|
55
|
+
}, index))
|
|
56
|
+
});
|
|
57
|
+
const Options = Template.bind({});
|
|
58
|
+
exports.Options = Options;
|
|
59
|
+
Options.args = {};
|
|
@@ -1,28 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _helpers = require("../../../utils/tests/helpers");
|
|
4
|
+
var _react = require("@testing-library/react");
|
|
5
|
+
var _constants = require("../constants");
|
|
6
|
+
var _theme = require("../../../assets/theme");
|
|
7
|
+
var _ = _interopRequireDefault(require(".."));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7
10
|
describe('<StatusChip />', () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
11
|
+
it('should render the Default StatusChip Complete component', () => {
|
|
12
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
13
|
+
"data-testid": _constants.COMPLETE,
|
|
14
|
+
status: _constants.COMPLETE
|
|
15
|
+
}));
|
|
16
|
+
expect(_react.screen.getByText(_constants.COMPLETE)).toBeInTheDocument();
|
|
17
|
+
expect(_react.screen.getByTestId(_constants.COMPLETE)).toHaveStyle(`background-color: ${_theme.colors.brand.success}`);
|
|
18
|
+
});
|
|
19
|
+
it('should render the Default StatusChip Processing component', () => {
|
|
20
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
21
|
+
"data-testid": _constants.PROCESSING,
|
|
22
|
+
status: _constants.PROCESSING
|
|
23
|
+
}));
|
|
24
|
+
expect(_react.screen.getByText(_constants.PROCESSING)).toBeInTheDocument();
|
|
25
|
+
expect(_react.screen.getByTestId(_constants.PROCESSING)).toHaveStyle(`background-color: ${_theme.colors.brand.warning}`);
|
|
26
|
+
});
|
|
27
|
+
it('should render the Default StatusChip Error component', () => {
|
|
28
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
29
|
+
"data-testid": _constants.ERROR,
|
|
30
|
+
status: _constants.ERROR
|
|
31
|
+
}));
|
|
32
|
+
expect(_react.screen.getByText('error')).toBeInTheDocument();
|
|
33
|
+
expect(_react.screen.getByTestId(_constants.ERROR)).toHaveStyle(`background-color: ${_theme.colors.brand.error}`);
|
|
34
|
+
});
|
|
35
|
+
it('should render a customized StatusChip component', () => {
|
|
36
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
37
|
+
"data-testid": 'test',
|
|
38
|
+
status: 'custom',
|
|
39
|
+
label: 'customized',
|
|
40
|
+
coloroverride: '#000'
|
|
41
|
+
}));
|
|
42
|
+
expect(_react.screen.getByText('customized')).toBeInTheDocument();
|
|
43
|
+
expect(_react.screen.getByTestId('test')).toHaveStyle(`background-color: #000`);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PROCESSING = exports.ERROR = exports.COMPLETE = void 0;
|
|
7
|
+
const COMPLETE = 'complete';
|
|
8
|
+
exports.COMPLETE = COMPLETE;
|
|
9
|
+
const PROCESSING = 'processing';
|
|
10
|
+
exports.PROCESSING = PROCESSING;
|
|
11
|
+
const ERROR = 'error';
|
|
12
|
+
exports.ERROR = ERROR;
|
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { Chip as MuiChip, Box } from '@mui/material';
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
9
|
/**
|
|
15
|
-
- Use a StatusChip to display the status of some action to the user.
|
|
10
|
+
- Use a StatusChip to display the status of some action to the user.
|
|
16
11
|
- Veritone stock options derive from the required `status` prop and include Complete, Processing, or Error. Their corresponding colors derive from Veritone's Design System guidelines.
|
|
17
12
|
- To override Stock Option labels, but retain corresponding chip color, use the `label` prop.
|
|
18
13
|
- To override Stock Option colors, but retain corresponding label, either use the `color` prop (for MUI stock color options) **OR** use the `coloroverride` prop (for full color customization).
|
|
19
14
|
- To fully customize StatusChip:
|
|
20
15
|
- Set `status` prop to "custom";
|
|
21
16
|
- Pass your custom string to `label` prop;
|
|
22
|
-
- Pass an MUI stock color option to `color` prop **OR** pass a custom color Hex Value to `coloroverride` prop.
|
|
17
|
+
- Pass an MUI stock color option to `color` prop **OR** pass a custom color Hex Value to `coloroverride` prop.
|
|
23
18
|
**/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
|
|
20
|
+
const StatusChip = ({
|
|
21
|
+
label,
|
|
22
|
+
...props
|
|
23
|
+
}) => {
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
25
|
+
sx: {
|
|
26
|
+
display: `inline-flex`,
|
|
27
|
+
position: `relative`
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, {
|
|
30
|
+
label: label ? label : props.status,
|
|
31
|
+
"data-testid": true,
|
|
32
|
+
...props
|
|
33
|
+
})
|
|
34
|
+
});
|
|
30
35
|
};
|
|
31
|
-
|
|
36
|
+
var _default = StatusChip;
|
|
37
|
+
exports.default = _default;
|
|
@@ -1,23 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
? {
|
|
6
|
-
backgroundColor: ownerState.coloroverride
|
|
7
|
-
}
|
|
8
|
-
: Object.assign(Object.assign(Object.assign({}, (ownerState.status === COMPLETE &&
|
|
9
|
-
{
|
|
10
|
-
//@ts-ignore
|
|
11
|
-
backgroundColor: theme.palette.success.main
|
|
12
|
-
})), (ownerState.status === PROCESSING &&
|
|
13
|
-
{
|
|
14
|
-
//@ts-ignore
|
|
15
|
-
backgroundColor: theme.palette.warning.main
|
|
16
|
-
})), (ownerState.status === ERROR &&
|
|
17
|
-
{
|
|
18
|
-
//@ts-ignore
|
|
19
|
-
backgroundColor: theme.palette.error.main
|
|
20
|
-
})))))
|
|
21
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
22
5
|
});
|
|
23
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _constants = require("./constants");
|
|
8
|
+
const statusChipTheme = theme => ({
|
|
9
|
+
styleOverrides: {
|
|
10
|
+
root: ({
|
|
11
|
+
ownerState
|
|
12
|
+
}) => ({
|
|
13
|
+
height: '18px',
|
|
14
|
+
width: '86px',
|
|
15
|
+
fontSize: '9px',
|
|
16
|
+
borderRadius: '2px',
|
|
17
|
+
fontFamily: 'Nunito sans',
|
|
18
|
+
fontStyle: 'normal',
|
|
19
|
+
fontWeight: 800,
|
|
20
|
+
textTransform: 'uppercase',
|
|
21
|
+
color: theme.palette.common.white,
|
|
22
|
+
...(ownerState.coloroverride ? {
|
|
23
|
+
backgroundColor: ownerState.coloroverride
|
|
24
|
+
} : {
|
|
25
|
+
...(ownerState.status === _constants.COMPLETE && {
|
|
26
|
+
//@ts-ignore
|
|
27
|
+
backgroundColor: theme.palette.success.main
|
|
28
|
+
}),
|
|
29
|
+
...(ownerState.status === _constants.PROCESSING && {
|
|
30
|
+
//@ts-ignore
|
|
31
|
+
backgroundColor: theme.palette.warning.main
|
|
32
|
+
}),
|
|
33
|
+
...(ownerState.status === _constants.ERROR && {
|
|
34
|
+
//@ts-ignore
|
|
35
|
+
backgroundColor: theme.palette.error.main
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
var _default = statusChipTheme;
|
|
42
|
+
exports.default = _default;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _helpers = require("../../../utils/tests/helpers");
|
|
4
|
+
var _react = require("@testing-library/react");
|
|
5
|
+
var _ = _interopRequireDefault(require(".."));
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5
8
|
describe('<Step />', () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
|
|
9
|
+
it('should render the Step component', () => {
|
|
10
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
11
|
+
"data-testid": "step"
|
|
12
|
+
}));
|
|
13
|
+
expect(_react.screen.getByTestId('step')).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const Step = ({
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
12
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Step, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
11
15
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const Step = (_a) => {
|
|
15
|
-
var props = __rest(_a, []);
|
|
16
|
-
return _jsx(MuiStep, Object.assign({}, props));
|
|
17
|
-
};
|
|
18
|
-
export default Step;
|
|
16
|
+
var _default = Step;
|
|
17
|
+
exports.default = _default;
|