@veritone-ce/design-system 1.12.28 → 1.12.29
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.d.ts +13 -11
- package/dist/assets/theme.js +53 -42
- package/dist/components/Alert/index.d.ts +22 -0
- package/dist/components/Alert/index.js +62 -0
- package/dist/components/AudioSlider/index.d.ts +12 -0
- package/dist/components/AudioSlider/index.js +73 -0
- package/dist/components/Box/index.d.ts +9 -4
- package/dist/components/Box/index.js +11 -10
- package/dist/components/Breadcrumbs/index.d.ts +6 -3
- package/dist/components/Breadcrumbs/index.js +15 -13
- package/dist/components/Button/Indicator.js +6 -4
- package/dist/components/Button/index.d.ts +14 -5
- package/dist/components/Button/index.js +27 -26
- package/dist/components/Checkbox/index.d.ts +10 -3
- package/dist/components/Checkbox/index.js +11 -14
- package/dist/components/Drawer/index.d.ts +12 -4
- package/dist/components/Drawer/index.js +12 -10
- package/dist/components/FileUploader/index.d.ts +21 -8
- package/dist/components/FileUploader/index.js +70 -102
- package/dist/components/FileUploader/useUploadFile.d.ts +1 -1
- package/dist/components/FileUploader/useUploadFile.js +10 -9
- package/dist/components/FormControlLabel/index.d.ts +9 -4
- package/dist/components/FormControlLabel/index.js +11 -10
- package/dist/components/Input/index.d.ts +22 -4
- package/dist/components/Input/index.js +27 -13
- package/dist/components/LinearProgress/index.d.ts +9 -4
- package/dist/components/LinearProgress/index.js +9 -37
- package/dist/components/Link/index.d.ts +7 -4
- package/dist/components/Link/index.js +13 -4
- package/dist/components/List/index.d.ts +8 -4
- package/dist/components/List/index.js +10 -10
- package/dist/components/ListItem/index.d.ts +8 -4
- package/dist/components/ListItem/index.js +10 -10
- package/dist/components/ListItemButton/index.d.ts +10 -4
- package/dist/components/ListItemButton/index.js +12 -10
- package/dist/components/ListItemText/index.d.ts +8 -4
- package/dist/components/ListItemText/index.js +10 -10
- package/dist/components/MenuFlyout/index.d.ts +11 -5
- package/dist/components/MenuFlyout/index.js +9 -19
- package/dist/components/Modal/index.d.ts +7 -4
- package/dist/components/Modal/index.js +10 -21
- package/dist/components/Panel/index.d.ts +7 -6
- package/dist/components/Panel/index.js +7 -16
- package/dist/components/ProgressIndicator/DefaultProgress.d.ts +2 -2
- package/dist/components/ProgressIndicator/DefaultProgress.js +10 -15
- package/dist/components/ProgressIndicator/MLProgress.d.ts +5 -2
- package/dist/components/ProgressIndicator/MLProgress.js +9 -14
- package/dist/components/ProgressIndicator/index.d.ts +13 -4
- package/dist/components/ProgressIndicator/index.js +4 -2
- package/dist/components/RadioButton/index.d.ts +15 -5
- package/dist/components/RadioButton/index.js +12 -17
- package/dist/components/RadioGroup/index.d.ts +28 -4
- package/dist/components/RadioGroup/index.js +13 -10
- package/dist/components/Select/index.d.ts +35 -9
- package/dist/components/Select/index.js +29 -30
- package/dist/components/StatusChip/index.d.ts +10 -8
- package/dist/components/StatusChip/index.js +12 -16
- package/dist/components/Step/index.d.ts +21 -4
- package/dist/components/Step/index.js +12 -11
- package/dist/components/StepLabel/index.d.ts +11 -4
- package/dist/components/StepLabel/index.js +10 -10
- package/dist/components/Stepper/index.d.ts +16 -7
- package/dist/components/Stepper/index.js +9 -11
- package/dist/components/Table/index.d.ts +85 -0
- package/dist/components/Table/index.js +123 -0
- package/dist/components/Tabs/index.d.ts +10 -6
- package/dist/components/Tabs/index.js +40 -48
- package/dist/components/ThemeProvider/index.d.ts +8 -2
- package/dist/components/ThemeProvider/index.js +12 -6
- package/dist/components/Toast/index.d.ts +5 -21
- package/dist/components/Toast/index.js +17 -51
- package/dist/components/Typography/index.d.ts +9 -3
- package/dist/components/Typography/index.js +10 -11
- package/dist/components/UtilityRail/index.d.ts +4 -3
- package/dist/components/UtilityRail/index.js +10 -18
- package/dist/components/ZeroState/index.d.ts +2 -0
- package/dist/components/ZeroState/index.js +25 -0
- package/dist/components/icons/HomeOutlinedIcon/index.d.ts +5 -0
- package/dist/components/icons/HomeOutlinedIcon/index.js +15 -0
- package/dist/components/icons/IconGroups/index.d.ts +5 -0
- package/dist/components/icons/IconGroups/index.js +16 -0
- package/dist/components/icons/IconListItem/index.d.ts +7 -0
- package/dist/components/icons/IconListItem/index.js +17 -0
- package/dist/index.d.ts +57 -23
- package/dist/index.js +85 -38
- package/package.json +4 -3
- package/dist/components/Button/useButtonProps.d.ts +0 -3
- package/dist/components/Button/useButtonProps.js +0 -26
- package/dist/components/CustomSlider/index.d.ts +0 -12
- package/dist/components/CustomSlider/index.js +0 -89
- package/dist/components/HomeOutlinedIcon/index.d.ts +0 -5
- package/dist/components/HomeOutlinedIcon/index.js +0 -22
- package/dist/components/IconGroups/index.d.ts +0 -5
- package/dist/components/IconGroups/index.js +0 -23
- package/dist/components/IconListItem/index.d.ts +0 -7
- package/dist/components/IconListItem/index.js +0 -27
- package/dist/components/ModelGridView/index.d.ts +0 -15
- package/dist/components/ModelGridView/index.js +0 -330
- package/dist/components/Tabs/Badge.d.ts +0 -7
- package/dist/components/Tabs/Badge.js +0 -29
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
type PanelProps = {
|
|
2
|
+
export type PanelProps = {
|
|
3
|
+
'data-testid'?: string;
|
|
3
4
|
title: string;
|
|
4
|
-
|
|
5
|
-
size
|
|
5
|
+
open: boolean;
|
|
6
|
+
size: 'big' | 'medium' | 'small';
|
|
6
7
|
children?: ReactNode;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
onClose?(): void;
|
|
9
|
+
className?: string;
|
|
9
10
|
};
|
|
10
|
-
declare const Panel: (
|
|
11
|
+
declare const Panel: (props: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default Panel;
|
|
@@ -7,18 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _material = require("@mui/material");
|
|
8
8
|
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
var _excluded = ["title", "isOpen", "children", "size", "handleClose"];
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
-
|
|
13
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
var Panel = function Panel(_ref) {
|
|
15
|
-
var title = _ref.title,
|
|
16
|
-
isOpen = _ref.isOpen,
|
|
17
|
-
children = _ref.children,
|
|
18
|
-
_ref$size = _ref.size,
|
|
19
|
-
size = _ref$size === void 0 ? 'big' : _ref$size,
|
|
20
|
-
handleClose = _ref.handleClose,
|
|
21
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
var Panel = function Panel(props) {
|
|
22
12
|
var _useTheme = (0, _material.useTheme)(),
|
|
23
13
|
palette = _useTheme.palette;
|
|
24
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
@@ -31,15 +21,16 @@ var Panel = function Panel(_ref) {
|
|
|
31
21
|
right: 0,
|
|
32
22
|
bottom: 0,
|
|
33
23
|
zIndex: 1,
|
|
34
|
-
display: !
|
|
24
|
+
display: !props.open ? 'none' : 'block'
|
|
35
25
|
},
|
|
26
|
+
className: props.className,
|
|
36
27
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
37
28
|
component: "div",
|
|
38
29
|
"data-testid": props['data-testid'] || 'wrapper-panel',
|
|
39
30
|
sx: {
|
|
40
31
|
position: 'absolute',
|
|
41
32
|
background: palette.common.white,
|
|
42
|
-
maxWidth: size === 'medium' ? '560px' : size === 'small' ? '380px' : '720px',
|
|
33
|
+
maxWidth: props.size === 'medium' ? '560px' : props.size === 'small' ? '380px' : '720px',
|
|
43
34
|
width: '100%',
|
|
44
35
|
height: '99vh',
|
|
45
36
|
display: 'flex',
|
|
@@ -72,12 +63,12 @@ var Panel = function Panel(_ref) {
|
|
|
72
63
|
lineHeight: '23px',
|
|
73
64
|
letterSpacing: '0.25px'
|
|
74
65
|
},
|
|
75
|
-
children: title
|
|
66
|
+
children: props.title
|
|
76
67
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
77
68
|
component: "button",
|
|
78
69
|
"aria-label": "close-button-panel",
|
|
79
70
|
"data-testid": props['data-testid'] ? "close-button-".concat(props['data-testid']) : 'close-button-wrapper-panel',
|
|
80
|
-
onClick:
|
|
71
|
+
onClick: props.onClose,
|
|
81
72
|
sx: {
|
|
82
73
|
cursor: 'pointer',
|
|
83
74
|
background: 'transparent',
|
|
@@ -109,7 +100,7 @@ var Panel = function Panel(_ref) {
|
|
|
109
100
|
flex: 1,
|
|
110
101
|
padding: '30px'
|
|
111
102
|
},
|
|
112
|
-
children: children
|
|
103
|
+
children: props.children
|
|
113
104
|
})
|
|
114
105
|
})]
|
|
115
106
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const DefaultProgress: (
|
|
1
|
+
import type { SharedProgressIndicatorProps } from '.';
|
|
2
|
+
declare const DefaultProgress: (props: SharedProgressIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultProgress;
|
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports["default"] = void 0;
|
|
8
7
|
var _material = require("@mui/material");
|
|
9
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
var
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
var DefaultProgress = function DefaultProgress(_ref) {
|
|
19
|
-
var itemLoading = _ref.itemLoading,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
+
var DefaultProgress = function DefaultProgress(props) {
|
|
21
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
22
11
|
sx: {
|
|
23
12
|
display: 'flex'
|
|
24
13
|
},
|
|
25
|
-
|
|
14
|
+
className: props.className,
|
|
15
|
+
children: [props.itemLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
26
16
|
sx: {
|
|
27
17
|
fontSize: '14px',
|
|
28
18
|
mr: '10px'
|
|
29
19
|
},
|
|
30
|
-
children: " Loading ".concat(itemLoading)
|
|
31
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress,
|
|
20
|
+
children: " Loading ".concat(props.itemLoading)
|
|
21
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
22
|
+
"data-testid": props['data-testid'],
|
|
23
|
+
value: props.value,
|
|
24
|
+
variant: props.variant,
|
|
25
|
+
size: 18
|
|
26
|
+
})]
|
|
32
27
|
});
|
|
33
28
|
};
|
|
34
29
|
var _default = DefaultProgress;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { SharedProgressIndicatorProps } from '.';
|
|
2
|
+
type MLProgressProps = SharedProgressIndicatorProps & {
|
|
3
|
+
type: 'medium' | 'large';
|
|
4
|
+
};
|
|
5
|
+
declare const MLProgress: (props: MLProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
export default MLProgress;
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports["default"] = void 0;
|
|
8
7
|
var _material = require("@mui/material");
|
|
9
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
var
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
var MLProgress = function MLProgress(_ref) {
|
|
19
|
-
var itemLoading = _ref.itemLoading,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
+
var MLProgress = function MLProgress(props) {
|
|
21
10
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
22
11
|
sx: {
|
|
23
12
|
display: 'flex',
|
|
@@ -25,11 +14,17 @@ var MLProgress = function MLProgress(_ref) {
|
|
|
25
14
|
alignItems: 'center',
|
|
26
15
|
justifyContent: 'center'
|
|
27
16
|
},
|
|
28
|
-
|
|
17
|
+
className: props.className,
|
|
18
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
19
|
+
"data-testid": props['data-testid'],
|
|
20
|
+
value: props.value,
|
|
21
|
+
variant: props.variant,
|
|
22
|
+
size: props.type == 'large' ? 50 : 30
|
|
23
|
+
}), props.itemLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
29
24
|
sx: {
|
|
30
25
|
fontSize: '14px'
|
|
31
26
|
},
|
|
32
|
-
children: " Loading ".concat(itemLoading)
|
|
27
|
+
children: " Loading ".concat(props.itemLoading)
|
|
33
28
|
})]
|
|
34
29
|
});
|
|
35
30
|
};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
export type ProgressIndicatorProps = {
|
|
1
|
+
export type SharedProgressIndicatorProps = {
|
|
3
2
|
'data-testid'?: string;
|
|
4
3
|
itemLoading?: string;
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
value?: number;
|
|
5
|
+
/**
|
|
6
|
+
* The variant to use.
|
|
7
|
+
* Use indeterminate when there is no progress value.
|
|
8
|
+
* @default 'indeterminate'
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'determinate' | 'indeterminate';
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ProgressIndicatorProps = SharedProgressIndicatorProps & {
|
|
14
|
+
type?: 'default' | 'medium' | 'large';
|
|
15
|
+
};
|
|
7
16
|
/**
|
|
8
17
|
- Use a progress indicator to show the user that an operation is in progress.
|
|
9
18
|
**/
|
|
@@ -25,8 +25,10 @@ var ProgressIndicator = function ProgressIndicator(_ref) {
|
|
|
25
25
|
var _ref$type = _ref.type,
|
|
26
26
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
27
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
29
|
-
children:
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
29
|
+
children: type === 'medium' || type === 'large' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_MLProgress["default"], _objectSpread({
|
|
30
|
+
type: type
|
|
31
|
+
}, props)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_DefaultProgress["default"], _objectSpread({}, props))
|
|
30
32
|
});
|
|
31
33
|
};
|
|
32
34
|
var _default = ProgressIndicator;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
type RadioButtonProps = {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type RadioButtonProps = {
|
|
3
3
|
'data-testid'?: string;
|
|
4
|
-
label?:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The default checked state. Use when the component is not controlled.
|
|
9
|
+
*/
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
name?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
onChange?(event: React.ChangeEvent<HTMLInputElement>, checked: boolean): void;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const RadioButton: (props: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
17
|
export default RadioButton;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,21 +7,10 @@ exports["default"] = void 0;
|
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _material = require("@mui/material");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
var _excluded = ["label"];
|
|
12
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
13
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
-
var RadioButton = function RadioButton(_ref) {
|
|
22
|
-
var label = _ref.label,
|
|
23
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
+
var RadioButton = function RadioButton(props) {
|
|
24
12
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormControlLabel, {
|
|
25
|
-
label: label,
|
|
13
|
+
label: props.label,
|
|
26
14
|
sx: {
|
|
27
15
|
margin: 0,
|
|
28
16
|
height: '36px',
|
|
@@ -40,9 +28,16 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
40
28
|
}
|
|
41
29
|
}
|
|
42
30
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
className: props.className,
|
|
32
|
+
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
33
|
+
"data-testid": props['data-testid'],
|
|
34
|
+
name: props.name,
|
|
35
|
+
checked: props.checked,
|
|
36
|
+
disabled: props.disabled,
|
|
37
|
+
required: props.required,
|
|
38
|
+
defaultChecked: props.defaultChecked,
|
|
39
|
+
onChange: props.onChange
|
|
40
|
+
})
|
|
46
41
|
});
|
|
47
42
|
};
|
|
48
43
|
var _default = RadioButton;
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/system';
|
|
3
|
+
export type RadioGroupProps = {
|
|
3
4
|
'data-testid'?: string;
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The default value. Use when the component is not controlled.
|
|
7
|
+
*/
|
|
8
|
+
defaultValue?: any;
|
|
9
|
+
/**
|
|
10
|
+
* The name used to reference the value of the control.
|
|
11
|
+
* If you don't provide this prop, it falls back to a randomly generated name.
|
|
12
|
+
*/
|
|
13
|
+
name?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when a radio button is selected.
|
|
16
|
+
*
|
|
17
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
18
|
+
* @param {string} value The value of the selected radio button.
|
|
19
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
20
|
+
*/
|
|
21
|
+
onChange?(event: React.ChangeEvent<HTMLInputElement>, value: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Value of the selected radio button. The DOM API casts this to a string.
|
|
24
|
+
*/
|
|
25
|
+
value?: any;
|
|
26
|
+
sx?: SxProps<Theme>;
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
declare const RadioGroup: (props: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
30
|
export default RadioGroup;
|
|
@@ -6,17 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
var RadioGroup = function RadioGroup(props) {
|
|
14
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.RadioGroup, {
|
|
15
|
+
"data-testid": props['data-testid'],
|
|
16
|
+
defaultValue: props.defaultValue,
|
|
17
|
+
name: props.name,
|
|
18
|
+
onChange: props.onChange,
|
|
19
|
+
value: props.value,
|
|
20
|
+
sx: props.sx,
|
|
21
|
+
className: props.className
|
|
22
|
+
});
|
|
20
23
|
};
|
|
21
24
|
var _default = RadioGroup;
|
|
22
25
|
exports["default"] = _default;
|
|
@@ -1,15 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
type
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SelectValue = string | number;
|
|
3
|
+
type ItemData<V extends SelectValue> = {
|
|
3
4
|
title?: string;
|
|
4
5
|
name: string;
|
|
5
|
-
|
|
6
|
+
key?: string;
|
|
7
|
+
value: V;
|
|
6
8
|
};
|
|
7
|
-
export type SelectProps = {
|
|
9
|
+
export type SelectProps<V extends SelectValue> = {
|
|
8
10
|
'data-testid'?: string;
|
|
9
|
-
label:
|
|
10
|
-
items: ItemData[];
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
items: ItemData<V>[];
|
|
11
13
|
helperText?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
error?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The default value. Use when the component is not controlled.
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: V;
|
|
21
|
+
/**
|
|
22
|
+
* The `input` value. Providing an empty string will select no options.
|
|
23
|
+
* Set to an empty string `''` if you don't want any of the available options to be selected.
|
|
24
|
+
*
|
|
25
|
+
* If the value is an object it must have reference equality with the option in order to be selected.
|
|
26
|
+
* If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
|
|
27
|
+
*/
|
|
28
|
+
value?: V | '';
|
|
29
|
+
open?: boolean;
|
|
30
|
+
onChange?(event: SelectChangeEvent<V>, child: React.ReactNode): void;
|
|
31
|
+
onClose?(event: React.SyntheticEvent): void;
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
export type SelectChangeEvent<V = string> = (Event & {
|
|
35
|
+
target: {
|
|
36
|
+
value: V;
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
}) | React.ChangeEvent<HTMLInputElement>;
|
|
40
|
+
declare function Select<V extends SelectValue>(props: SelectProps<V>): import("react/jsx-runtime").JSX.Element;
|
|
15
41
|
export default Select;
|
|
@@ -7,57 +7,56 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
var _Lens = _interopRequireDefault(require("@mui/icons-material/Lens"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
function
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
var Select = function Select(_ref) {
|
|
21
|
-
var label = _ref.label,
|
|
22
|
-
items = _ref.items,
|
|
23
|
-
helperText = _ref.helperText,
|
|
24
|
-
errorMessage = _ref.errorMessage,
|
|
25
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
function Select(props) {
|
|
26
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
27
17
|
sx: {
|
|
28
|
-
maxHeight: helperText ? '77px' : '56px'
|
|
18
|
+
maxHeight: props.helperText ? '77px' : '56px'
|
|
29
19
|
},
|
|
20
|
+
className: props.className,
|
|
30
21
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
31
|
-
id: "label-select",
|
|
32
22
|
sx: {
|
|
33
23
|
display: 'flex',
|
|
34
24
|
alignItems: 'flex-end',
|
|
35
25
|
lineHeight: '17px',
|
|
36
26
|
marginBottom: '3px'
|
|
37
27
|
},
|
|
38
|
-
children: label
|
|
28
|
+
children: props.label
|
|
39
29
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
40
30
|
sx: {
|
|
41
31
|
display: 'flex',
|
|
42
32
|
'& .MuiOutlinedInput-root': {
|
|
43
33
|
'& .MuiSelect-outlined': {
|
|
44
|
-
padding: helperText ? '7px 7.5px' : '5px 8px',
|
|
45
|
-
fontSize: helperText ? '14px' : '16px',
|
|
46
|
-
lineHeight: helperText ? '20px' : '24px'
|
|
34
|
+
padding: props.helperText ? '7px 7.5px' : '5px 8px',
|
|
35
|
+
fontSize: props.helperText ? '14px' : '16px',
|
|
36
|
+
lineHeight: props.helperText ? '20px' : '24px'
|
|
47
37
|
},
|
|
48
38
|
'&.Mui-error': {
|
|
49
39
|
'& .MuiSelect-outlined': {
|
|
50
|
-
padding: helperText ? '7px 8px' : '5px 13px'
|
|
40
|
+
padding: props.helperText ? '7px 8px' : '5px 13px'
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
}
|
|
54
44
|
},
|
|
55
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Select,
|
|
56
|
-
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Select, {
|
|
46
|
+
"data-testid": props['data-testid'],
|
|
47
|
+
fullWidth: props.fullWidth,
|
|
48
|
+
displayEmpty: true,
|
|
49
|
+
error: props.error !== undefined,
|
|
50
|
+
disabled: props.disabled,
|
|
51
|
+
value: props.value,
|
|
52
|
+
defaultValue: props.defaultValue,
|
|
53
|
+
onChange: props.onChange,
|
|
54
|
+
onClose: props.onClose,
|
|
57
55
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
58
56
|
value: "",
|
|
59
57
|
children: "Select"
|
|
60
|
-
}), items.map(function (item, index) {
|
|
58
|
+
}), props.items.map(function (item, index) {
|
|
59
|
+
var _item$key;
|
|
61
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
62
61
|
value: item.value,
|
|
63
62
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
@@ -75,17 +74,17 @@ var Select = function Select(_ref) {
|
|
|
75
74
|
children: item.name
|
|
76
75
|
})]
|
|
77
76
|
})
|
|
78
|
-
}, index);
|
|
77
|
+
}, (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : index);
|
|
79
78
|
})]
|
|
80
|
-
})
|
|
81
|
-
}), helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormHelperText, {
|
|
79
|
+
})
|
|
80
|
+
}), props.helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormHelperText, {
|
|
82
81
|
sx: {
|
|
83
82
|
lineHeight: '18px',
|
|
84
83
|
color: function color(theme) {
|
|
85
84
|
return theme.palette.text.disabled;
|
|
86
85
|
}
|
|
87
86
|
},
|
|
88
|
-
children: helperText
|
|
87
|
+
children: props.helperText
|
|
89
88
|
}), props.error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
90
89
|
sx: {
|
|
91
90
|
display: 'flex',
|
|
@@ -107,10 +106,10 @@ var Select = function Select(_ref) {
|
|
|
107
106
|
},
|
|
108
107
|
lineHeight: '18px'
|
|
109
108
|
},
|
|
110
|
-
children:
|
|
109
|
+
children: props.error
|
|
111
110
|
})]
|
|
112
111
|
})]
|
|
113
112
|
});
|
|
114
|
-
}
|
|
113
|
+
}
|
|
115
114
|
var _default = Select;
|
|
116
115
|
exports["default"] = _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChipProps as MuiChipProps } from '@mui/material';
|
|
2
|
-
|
|
2
|
+
import React, { MouseEventHandler } from 'react';
|
|
3
|
+
export type StatusChipProps = {
|
|
3
4
|
'data-testid'?: string;
|
|
4
5
|
/**
|
|
5
6
|
Determines stock color. Used as label if no label prop is provided.
|
|
@@ -8,12 +9,13 @@ type StatusChipProps = {
|
|
|
8
9
|
/**
|
|
9
10
|
If no label prop provided, status prop is used as chip label.
|
|
10
11
|
**/
|
|
11
|
-
label?:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
clickable?: boolean;
|
|
14
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
color?: MuiChipProps['color'];
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
17
19
|
/**
|
|
18
20
|
- Use a StatusChip to display the status of some action to the user.
|
|
19
21
|
- 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.
|
|
@@ -24,5 +26,5 @@ type StatusChipProps = {
|
|
|
24
26
|
- Pass your custom string to `label` prop;
|
|
25
27
|
- Pass an MUI stock color option to `color` prop **OR** pass a custom color Hex Value to `coloroverride` prop.
|
|
26
28
|
**/
|
|
27
|
-
declare const StatusChip: (
|
|
29
|
+
declare const StatusChip: (props: StatusChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
30
|
export default StatusChip;
|