@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.
Files changed (236) hide show
  1. package/dist/assets/theme.js +314 -261
  2. package/dist/components/Box/__tests__/Box.test.js +15 -9
  3. package/dist/components/Box/index.js +16 -17
  4. package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +34 -29
  5. package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.js +25 -14
  6. package/dist/components/Breadcrumbs/breadcrumbs.theme.js +16 -9
  7. package/dist/components/Breadcrumbs/index.js +50 -27
  8. package/dist/components/Button/Button.stories.js +89 -37
  9. package/dist/components/Button/Indicator.js +32 -17
  10. package/dist/components/Button/__tests__/Button.test.js +58 -33
  11. package/dist/components/Button/button.theme.js +121 -102
  12. package/dist/components/Button/index.js +44 -34
  13. package/dist/components/Button/useButtonProps.js +17 -15
  14. package/dist/components/Checkbox/Checkbox.stories.js +46 -16
  15. package/dist/components/Checkbox/__tests__/Checkbox.test.js +14 -9
  16. package/dist/components/Checkbox/checkbox.theme.js +23 -16
  17. package/dist/components/Checkbox/index.js +22 -17
  18. package/dist/components/CustomSlider/CustomSlider.stories.js +43 -24
  19. package/dist/components/CustomSlider/index.js +73 -55
  20. package/dist/components/Drawer/__tests__/Drawer.test.js +15 -9
  21. package/dist/components/Drawer/index.js +16 -17
  22. package/dist/components/FileUploader/FileUploader.stories.js +23 -24
  23. package/dist/components/FileUploader/__tests__/FileUploader.test.js +210 -220
  24. package/dist/components/FileUploader/index.js +211 -151
  25. package/dist/components/FileUploader/useUploadFile.js +69 -81
  26. package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.js +18 -9
  27. package/dist/components/FormControlLabel/index.js +16 -17
  28. package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.js +19 -20
  29. package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.js +14 -9
  30. package/dist/components/HomeOutlinedIcon/index.js +16 -17
  31. package/dist/components/IconGroups/IconGroups.stories.js +19 -20
  32. package/dist/components/IconGroups/__tests__/IconGroups.test.js +14 -9
  33. package/dist/components/IconGroups/index.js +17 -17
  34. package/dist/components/IconListItem/__tests__/IconListItem.test.js +14 -9
  35. package/dist/components/IconListItem/index.js +19 -17
  36. package/dist/components/Input/Input.stories.js +111 -51
  37. package/dist/components/Input/__tests__/Input.test.js +13 -9
  38. package/dist/components/Input/index.js +22 -19
  39. package/dist/components/Input/input.theme.js +104 -97
  40. package/dist/components/LinearProgress/LinearProgress.stories.js +42 -28
  41. package/dist/components/LinearProgress/__tests__/LinearProgress.test.js +39 -17
  42. package/dist/components/LinearProgress/index.js +71 -21
  43. package/dist/components/LinearProgress/linearProgress.theme.js +19 -12
  44. package/dist/components/Link/__tests__/Link.test.js +14 -9
  45. package/dist/components/Link/index.js +16 -17
  46. package/dist/components/List/__tests__/List.test.js +14 -9
  47. package/dist/components/List/index.js +16 -17
  48. package/dist/components/ListItem/__tests__/ListItem.test.js +14 -9
  49. package/dist/components/ListItem/index.js +16 -17
  50. package/dist/components/ListItemButton/__tests__/ListItemButton.test.js +14 -9
  51. package/dist/components/ListItemButton/index.js +16 -17
  52. package/dist/components/ListItemText/__tests__/ListItemText.test.js +14 -9
  53. package/dist/components/ListItemText/index.js +16 -17
  54. package/dist/components/MenuFlyout/MenuFlyout.stories.js +54 -32
  55. package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.js +41 -23
  56. package/dist/components/MenuFlyout/constants.js +12 -3
  57. package/dist/components/MenuFlyout/index.js +47 -26
  58. package/dist/components/MenuFlyout/menuFlyout.theme.js +46 -38
  59. package/dist/components/Modal/Modal.stories.js +190 -95
  60. package/dist/components/Modal/__tests__/Modal.test.js +16 -9
  61. package/dist/components/Modal/index.js +30 -17
  62. package/dist/components/Modal/modal.theme.js +30 -23
  63. package/dist/components/ModelGridView/ModelGridView.stories.js +40 -43
  64. package/dist/components/ModelGridView/__tests__/ModelGridView.test.js +47 -42
  65. package/dist/components/ModelGridView/index.js +258 -150
  66. package/dist/components/Panel/Panel.stories.js +61 -44
  67. package/dist/components/Panel/__tests__/Panel.test.js +73 -43
  68. package/dist/components/Panel/index.js +116 -78
  69. package/dist/components/ProgressIndicator/DefaultProgress.js +28 -20
  70. package/dist/components/ProgressIndicator/MLProgress.js +30 -24
  71. package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +41 -38
  72. package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.js +31 -17
  73. package/dist/components/ProgressIndicator/index.js +26 -18
  74. package/dist/components/RadioButton/RadioButton.stories.js +37 -28
  75. package/dist/components/RadioButton/RadioButton.theme.js +59 -52
  76. package/dist/components/RadioButton/__tests__/RadioButton.test.js +13 -9
  77. package/dist/components/RadioButton/index.js +37 -28
  78. package/dist/components/RadioGroup/__tests__/RadioGroup.test.js +14 -9
  79. package/dist/components/RadioGroup/index.js +16 -17
  80. package/dist/components/Select/Select.stories.js +82 -33
  81. package/dist/components/Select/__tests__/Select.test.js +39 -18
  82. package/dist/components/Select/index.js +99 -49
  83. package/dist/components/Select/select.theme.js +58 -51
  84. package/dist/components/StatusChip/StatusChip.stories.js +57 -43
  85. package/dist/components/StatusChip/__tests__/StatusChip.test.js +44 -27
  86. package/dist/components/StatusChip/constants.js +12 -3
  87. package/dist/components/StatusChip/index.js +28 -22
  88. package/dist/components/StatusChip/statusChip.theme.js +41 -22
  89. package/dist/components/Step/__tests__/Step.test.js +14 -9
  90. package/dist/components/Step/index.js +16 -17
  91. package/dist/components/StepLabel/__tests__/StepLabel.test.js +14 -9
  92. package/dist/components/StepLabel/index.js +16 -17
  93. package/dist/components/Stepper/Stepper.stories.js +37 -21
  94. package/dist/components/Stepper/__tests__/Stepper.test.js +14 -9
  95. package/dist/components/Stepper/index.js +15 -5
  96. package/dist/components/Stepper/stepper.theme.js +52 -45
  97. package/dist/components/Tabs/Badge.js +29 -10
  98. package/dist/components/Tabs/Tabs.stories.js +52 -33
  99. package/dist/components/Tabs/__tests__/Tabs.test.js +41 -14
  100. package/dist/components/Tabs/index.js +27 -18
  101. package/dist/components/Tabs/tabs.theme.js +34 -27
  102. package/dist/components/ThemeProvider/__tests__/Button.test.js +14 -9
  103. package/dist/components/ThemeProvider/index.js +19 -6
  104. package/dist/components/Toast/Toast.stories.js +103 -37
  105. package/dist/components/Toast/__tests__/Toast.test.js +47 -29
  106. package/dist/components/Toast/index.js +58 -38
  107. package/dist/components/Typography/Typography.stories.js +20 -20
  108. package/dist/components/Typography/__tests__/Typography.test.js +15 -9
  109. package/dist/components/Typography/index.js +16 -17
  110. package/dist/components/UtilityRail/UtilityRail.stories.js +22 -21
  111. package/dist/components/UtilityRail/__tests__/UtilityRail.test.js +17 -10
  112. package/dist/components/UtilityRail/index.js +75 -53
  113. package/dist/components/UtilityRail/mock.js +32 -32
  114. package/dist/index.js +223 -31
  115. package/dist/react-app-env.d.js +2 -0
  116. package/dist/reportWebVitals.js +26 -11
  117. package/dist/setupTests.js +3 -5
  118. package/dist/utils/tests/helpers.js +31 -20
  119. package/package.json +9 -4
  120. package/dist/assets/theme.d.ts +0 -59
  121. package/dist/components/Box/__tests__/Box.test.d.ts +0 -1
  122. package/dist/components/Box/index.d.ts +0 -6
  123. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
  124. package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.d.ts +0 -1
  125. package/dist/components/Breadcrumbs/breadcrumbs.theme.d.ts +0 -11
  126. package/dist/components/Breadcrumbs/index.d.ts +0 -15
  127. package/dist/components/Button/Button.stories.d.ts +0 -7
  128. package/dist/components/Button/Indicator.d.ts +0 -2
  129. package/dist/components/Button/__tests__/Button.test.d.ts +0 -1
  130. package/dist/components/Button/button.theme.d.ts +0 -4
  131. package/dist/components/Button/index.d.ts +0 -10
  132. package/dist/components/Button/useButtonProps.d.ts +0 -3
  133. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -5
  134. package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
  135. package/dist/components/Checkbox/checkbox.theme.d.ts +0 -18
  136. package/dist/components/Checkbox/index.d.ts +0 -7
  137. package/dist/components/CustomSlider/CustomSlider.stories.d.ts +0 -5
  138. package/dist/components/CustomSlider/index.d.ts +0 -12
  139. package/dist/components/Drawer/__tests__/Drawer.test.d.ts +0 -1
  140. package/dist/components/Drawer/index.d.ts +0 -6
  141. package/dist/components/FileUploader/FileUploader.stories.d.ts +0 -15
  142. package/dist/components/FileUploader/__tests__/FileUploader.test.d.ts +0 -1
  143. package/dist/components/FileUploader/index.d.ts +0 -21
  144. package/dist/components/FileUploader/useUploadFile.d.ts +0 -5
  145. package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.d.ts +0 -1
  146. package/dist/components/FormControlLabel/index.d.ts +0 -6
  147. package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.d.ts +0 -7
  148. package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.d.ts +0 -1
  149. package/dist/components/HomeOutlinedIcon/index.d.ts +0 -5
  150. package/dist/components/IconGroups/IconGroups.stories.d.ts +0 -7
  151. package/dist/components/IconGroups/__tests__/IconGroups.test.d.ts +0 -1
  152. package/dist/components/IconGroups/index.d.ts +0 -5
  153. package/dist/components/IconListItem/__tests__/IconListItem.test.d.ts +0 -1
  154. package/dist/components/IconListItem/index.d.ts +0 -7
  155. package/dist/components/Input/Input.stories.d.ts +0 -11
  156. package/dist/components/Input/__tests__/Input.test.d.ts +0 -1
  157. package/dist/components/Input/index.d.ts +0 -6
  158. package/dist/components/Input/input.theme.d.ts +0 -3
  159. package/dist/components/LinearProgress/LinearProgress.stories.d.ts +0 -14
  160. package/dist/components/LinearProgress/__tests__/LinearProgress.test.d.ts +0 -1
  161. package/dist/components/LinearProgress/index.d.ts +0 -27
  162. package/dist/components/LinearProgress/linearProgress.theme.d.ts +0 -14
  163. package/dist/components/Link/__tests__/Link.test.d.ts +0 -1
  164. package/dist/components/Link/index.d.ts +0 -6
  165. package/dist/components/List/__tests__/List.test.d.ts +0 -1
  166. package/dist/components/List/index.d.ts +0 -6
  167. package/dist/components/ListItem/__tests__/ListItem.test.d.ts +0 -1
  168. package/dist/components/ListItem/index.d.ts +0 -6
  169. package/dist/components/ListItemButton/__tests__/ListItemButton.test.d.ts +0 -1
  170. package/dist/components/ListItemButton/index.d.ts +0 -6
  171. package/dist/components/ListItemText/__tests__/ListItemText.test.d.ts +0 -1
  172. package/dist/components/ListItemText/index.d.ts +0 -6
  173. package/dist/components/MenuFlyout/MenuFlyout.stories.d.ts +0 -31
  174. package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.d.ts +0 -1
  175. package/dist/components/MenuFlyout/constants.d.ts +0 -3
  176. package/dist/components/MenuFlyout/index.d.ts +0 -15
  177. package/dist/components/MenuFlyout/menuFlyout.theme.d.ts +0 -41
  178. package/dist/components/Modal/Modal.stories.d.ts +0 -15
  179. package/dist/components/Modal/__tests__/Modal.test.d.ts +0 -1
  180. package/dist/components/Modal/index.d.ts +0 -11
  181. package/dist/components/Modal/modal.theme.d.ts +0 -3
  182. package/dist/components/ModelGridView/ModelGridView.stories.d.ts +0 -5
  183. package/dist/components/ModelGridView/__tests__/ModelGridView.test.d.ts +0 -1
  184. package/dist/components/ModelGridView/index.d.ts +0 -13
  185. package/dist/components/Panel/Panel.stories.d.ts +0 -14
  186. package/dist/components/Panel/__tests__/Panel.test.d.ts +0 -1
  187. package/dist/components/Panel/index.d.ts +0 -11
  188. package/dist/components/ProgressIndicator/DefaultProgress.d.ts +0 -3
  189. package/dist/components/ProgressIndicator/MLProgress.d.ts +0 -3
  190. package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +0 -7
  191. package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.d.ts +0 -1
  192. package/dist/components/ProgressIndicator/index.d.ts +0 -11
  193. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -10
  194. package/dist/components/RadioButton/RadioButton.theme.d.ts +0 -4
  195. package/dist/components/RadioButton/__tests__/RadioButton.test.d.ts +0 -1
  196. package/dist/components/RadioButton/index.d.ts +0 -7
  197. package/dist/components/RadioGroup/__tests__/RadioGroup.test.d.ts +0 -1
  198. package/dist/components/RadioGroup/index.d.ts +0 -6
  199. package/dist/components/Select/Select.stories.d.ts +0 -5
  200. package/dist/components/Select/__tests__/Select.test.d.ts +0 -1
  201. package/dist/components/Select/index.d.ts +0 -15
  202. package/dist/components/Select/select.theme.d.ts +0 -53
  203. package/dist/components/StatusChip/StatusChip.stories.d.ts +0 -51
  204. package/dist/components/StatusChip/__tests__/StatusChip.test.d.ts +0 -1
  205. package/dist/components/StatusChip/constants.d.ts +0 -3
  206. package/dist/components/StatusChip/index.d.ts +0 -28
  207. package/dist/components/StatusChip/statusChip.theme.d.ts +0 -4
  208. package/dist/components/Step/__tests__/Step.test.d.ts +0 -1
  209. package/dist/components/Step/index.d.ts +0 -6
  210. package/dist/components/StepLabel/__tests__/StepLabel.test.d.ts +0 -1
  211. package/dist/components/StepLabel/index.d.ts +0 -6
  212. package/dist/components/Stepper/Stepper.stories.d.ts +0 -21
  213. package/dist/components/Stepper/__tests__/Stepper.test.d.ts +0 -1
  214. package/dist/components/Stepper/index.d.ts +0 -13
  215. package/dist/components/Stepper/stepper.theme.d.ts +0 -50
  216. package/dist/components/Tabs/Badge.d.ts +0 -7
  217. package/dist/components/Tabs/Tabs.stories.d.ts +0 -6
  218. package/dist/components/Tabs/__tests__/Tabs.test.d.ts +0 -1
  219. package/dist/components/Tabs/index.d.ts +0 -14
  220. package/dist/components/Tabs/tabs.theme.d.ts +0 -4
  221. package/dist/components/ThemeProvider/__tests__/Button.test.d.ts +0 -1
  222. package/dist/components/ThemeProvider/index.d.ts +0 -3
  223. package/dist/components/Toast/Toast.stories.d.ts +0 -14
  224. package/dist/components/Toast/__tests__/Toast.test.d.ts +0 -1
  225. package/dist/components/Toast/index.d.ts +0 -23
  226. package/dist/components/Typography/Typography.stories.d.ts +0 -20
  227. package/dist/components/Typography/__tests__/Typography.test.d.ts +0 -1
  228. package/dist/components/Typography/index.d.ts +0 -6
  229. package/dist/components/UtilityRail/UtilityRail.stories.d.ts +0 -8
  230. package/dist/components/UtilityRail/__tests__/UtilityRail.test.d.ts +0 -1
  231. package/dist/components/UtilityRail/index.d.ts +0 -11
  232. package/dist/components/UtilityRail/mock.d.ts +0 -2
  233. package/dist/index.d.ts +0 -31
  234. package/dist/reportWebVitals.d.ts +0 -3
  235. package/dist/setupTests.d.ts +0 -1
  236. package/dist/utils/tests/helpers.d.ts +0 -6
@@ -1,51 +1,101 @@
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]];
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
- return t;
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Box, FormHelperText, InputLabel, MenuItem, Select as MuiSelect } from '@mui/material';
14
- import Circle from '@mui/icons-material/Lens';
15
- const Select = (_a) => {
16
- var { label, items, helperText, errorMessage } = _a, props = __rest(_a, ["label", "items", "helperText", "errorMessage"]);
17
- return (_jsxs(Box, Object.assign({ sx: {
18
- maxHeight: helperText ? '77px' : '56px'
19
- } }, { children: [_jsx(InputLabel, Object.assign({ id: "label-select", sx: {
20
- display: 'flex',
21
- alignItems: 'flex-end',
22
- lineHeight: '17px',
23
- marginBottom: '3px'
24
- } }, { children: label })), _jsx(Box, Object.assign({ sx: {
25
- display: 'flex',
26
- '& .MuiOutlinedInput-root': {
27
- '& .MuiSelect-outlined': {
28
- padding: helperText ? '7px 7.5px' : '5px 8px',
29
- fontSize: helperText ? '14px' : '16px',
30
- lineHeight: helperText ? '20px' : '24px'
31
- },
32
- '&.Mui-error': {
33
- '& .MuiSelect-outlined': {
34
- padding: helperText ? '7px 8px' : '5px 13px'
35
- }
36
- }
37
- }
38
- } }, { children: _jsxs(MuiSelect, Object.assign({}, props, { labelId: "label-select" }, { children: [_jsx(MenuItem, Object.assign({ value: "" }, { children: "Select" })), items.map((item, index) => (_jsx(MenuItem, Object.assign({ value: item.value }, { children: _jsxs(Box, Object.assign({ sx: { lineHeight: '20px', fontSize: '14px', opacity: 0.9 } }, { children: [_jsx(Box, Object.assign({ sx: { fontWeight: 700 } }, { children: item.title })), _jsx(Box, { children: item.name })] })) }), index)))] })) })), helperText && (_jsx(FormHelperText, Object.assign({ sx: {
39
- lineHeight: '18px',
40
- color: (theme) => theme.palette.text.disabled
41
- } }, { children: helperText }))), props.error && (_jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: [_jsx(Circle, { sx: {
42
- width: '14px',
43
- height: '14px',
44
- margin: '1px 3px 0 -2px',
45
- color: (theme) => theme.palette.error.main
46
- } }), _jsx(FormHelperText, Object.assign({ sx: {
47
- color: (theme) => theme.palette.error.main,
48
- lineHeight: '18px'
49
- } }, { children: errorMessage }))] })))] })));
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
- export default Select;
100
+ var _default = Select;
101
+ exports.default = _default;
@@ -1,52 +1,59 @@
1
- const selectTheme = (theme) => ({
2
- defaultProps: {
3
- fullWidth: true,
4
- displayEmpty: true
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
- export default selectTheme;
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
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box } from '@mui/material';
3
- import { COMPLETE, PROCESSING, ERROR } from './constants';
4
- import StatusChip from '.';
5
- export default {
6
- title: 'Components/StatusChip',
7
- component: StatusChip,
8
- argTypes: {
9
- status: {
10
- options: [COMPLETE, PROCESSING, ERROR, 'custom'],
11
- control: { type: 'radio' }
12
- },
13
- label: {
14
- control: { type: 'text' }
15
- },
16
- children: {
17
- control: 'none'
18
- },
19
- color: {
20
- options: [
21
- 'default',
22
- 'primary',
23
- 'secondary',
24
- 'error',
25
- 'info',
26
- 'success',
27
- 'warning',
28
- undefined
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
- const previewProps = [
34
- { status: COMPLETE },
35
- { status: PROCESSING },
36
- { status: ERROR }
37
- ];
38
- const Template = (args) => (_jsx(Box, Object.assign({ sx: {
39
- display: `grid`,
40
- gridTemplateRows: `repeat(4, min-content)`,
41
- justifyItems: `flex-start`,
42
- gap: 2
43
- } }, { children: previewProps.map((props, index) => (_jsx("div", { children: _jsx(StatusChip, Object.assign({}, props, args)) }, index))) })));
44
- export const Options = Template.bind({});
45
- Options.args = {};
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
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render } from '../../../utils/tests/helpers';
3
- import { screen } from '@testing-library/react';
4
- import { COMPLETE, PROCESSING, ERROR } from '../constants';
5
- import { colors } from '../../../assets/theme';
6
- import StatusChip from '..';
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
- it('should render the Default StatusChip Complete component', () => {
9
- render(_jsx(StatusChip, { "data-testid": COMPLETE, status: COMPLETE }));
10
- expect(screen.getByText(COMPLETE)).toBeInTheDocument();
11
- expect(screen.getByTestId(COMPLETE)).toHaveStyle(`background-color: ${colors.brand.success}`);
12
- });
13
- it('should render the Default StatusChip Processing component', () => {
14
- render(_jsx(StatusChip, { "data-testid": PROCESSING, status: PROCESSING }));
15
- expect(screen.getByText(PROCESSING)).toBeInTheDocument();
16
- expect(screen.getByTestId(PROCESSING)).toHaveStyle(`background-color: ${colors.brand.warning}`);
17
- });
18
- it('should render the Default StatusChip Error component', () => {
19
- render(_jsx(StatusChip, { "data-testid": ERROR, status: ERROR }));
20
- expect(screen.getByText('error')).toBeInTheDocument();
21
- expect(screen.getByTestId(ERROR)).toHaveStyle(`background-color: ${colors.brand.error}`);
22
- });
23
- it('should render a customized StatusChip component', () => {
24
- render(_jsx(StatusChip, { "data-testid": 'test', status: 'custom', label: 'customized', coloroverride: '#000' }));
25
- expect(screen.getByText('customized')).toBeInTheDocument();
26
- expect(screen.getByTestId('test')).toHaveStyle(`background-color: #000`);
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
- export const COMPLETE = 'complete';
2
- export const PROCESSING = 'processing';
3
- export const ERROR = 'error';
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
- 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 { 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
- const StatusChip = (_a) => {
25
- var { label } = _a, props = __rest(_a, ["label"]);
26
- return (_jsx(Box, Object.assign({ sx: {
27
- display: `inline-flex`,
28
- position: `relative`
29
- } }, { children: _jsx(MuiChip, Object.assign({ label: label ? label : props.status, "data-testid": true }, props)) })));
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
- export default StatusChip;
36
+ var _default = StatusChip;
37
+ exports.default = _default;
@@ -1,23 +1,42 @@
1
- import { COMPLETE, PROCESSING, ERROR } from './constants';
2
- const statusChipTheme = (theme) => ({
3
- styleOverrides: {
4
- root: ({ ownerState }) => (Object.assign({ height: '18px', width: '86px', fontSize: '9px', borderRadius: '2px', fontFamily: 'Nunito sans', fontStyle: 'normal', fontWeight: 800, textTransform: 'uppercase', color: theme.palette.common.white }, (ownerState.coloroverride
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
- export default statusChipTheme;
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
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render } from '../../../utils/tests/helpers';
3
- import { screen } from '@testing-library/react';
4
- import Step from '..';
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
- it('should render the Step component', () => {
7
- render(_jsx(Step, { "data-testid": "step" }));
8
- expect(screen.getByTestId('step')).toBeInTheDocument();
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
- 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;
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
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Step as MuiStep } from '@mui/material';
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;