@veritone-ce/design-system 1.12.57 → 1.12.59
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/cjs/components/Autocomplete/index.js +27 -16
- package/dist/cjs/components/FileUploader/index.js +15 -8
- package/dist/cjs/components/Table/AutoTable/virtual.js +6 -1
- package/dist/cjs/components/Table/index.js +5 -1
- package/dist/esm/components/Autocomplete/index.js +28 -17
- package/dist/esm/components/FileUploader/index.js +15 -8
- package/dist/esm/components/Table/AutoTable/virtual.js +6 -1
- package/dist/esm/components/Table/index.js +5 -1
- package/dist/types/components/Autocomplete/index.d.ts +9 -2
- package/package.json +1 -1
|
@@ -14,29 +14,40 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
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; }
|
|
15
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
16
|
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); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
var StyledAutocomplete = (0, _material.styled)(_material.Autocomplete, {
|
|
18
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
19
|
+
return prop !== 'width';
|
|
20
|
+
}
|
|
21
|
+
})(function (_ref) {
|
|
22
|
+
var width = _ref.width;
|
|
23
|
+
return {
|
|
24
|
+
width: width
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
function Autocomplete(props) {
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledAutocomplete, {
|
|
29
|
+
disablePortal: props.disablePortal,
|
|
30
|
+
options: props.items,
|
|
31
|
+
width: props.width,
|
|
32
|
+
inputValue: props.inputValue,
|
|
33
|
+
filterOptions: props.filterOptions,
|
|
34
|
+
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
35
|
+
return option.value === value.value;
|
|
36
|
+
},
|
|
37
|
+
onInputChange: props.onInputChange && function (event, inputValue) {
|
|
38
|
+
return props.onInputChange(event, inputValue);
|
|
28
39
|
},
|
|
29
40
|
renderInput: function renderInput(params) {
|
|
30
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
31
|
-
label: label,
|
|
32
|
-
error: error,
|
|
33
|
-
helperText: error ? "Please select a ".concat(label) : ''
|
|
42
|
+
label: props.label,
|
|
43
|
+
error: props.error,
|
|
44
|
+
helperText: props.error ? "Please select a ".concat(props.label) : ''
|
|
34
45
|
}));
|
|
35
46
|
},
|
|
36
47
|
onChange: function onChange(event, value) {
|
|
37
|
-
return
|
|
48
|
+
return props.onChange(event, value);
|
|
38
49
|
}
|
|
39
50
|
});
|
|
40
51
|
}
|
|
41
|
-
var _default =
|
|
52
|
+
var _default = Autocomplete;
|
|
42
53
|
exports["default"] = _default;
|
|
@@ -95,7 +95,7 @@ function FileUploader(props) {
|
|
|
95
95
|
}
|
|
96
96
|
})
|
|
97
97
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
98
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
99
99
|
sx: {
|
|
100
100
|
fontSize: '14px',
|
|
101
101
|
width: '352px',
|
|
@@ -103,15 +103,22 @@ function FileUploader(props) {
|
|
|
103
103
|
lineHeight: '22px',
|
|
104
104
|
color: palette.text.primary
|
|
105
105
|
},
|
|
106
|
-
children:
|
|
107
|
-
component: "span",
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
108
107
|
sx: {
|
|
109
|
-
|
|
110
|
-
textDecoration: 'underline',
|
|
111
|
-
color: palette.button.main
|
|
108
|
+
display: 'flex'
|
|
112
109
|
},
|
|
113
|
-
children:
|
|
114
|
-
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
111
|
+
sx: {
|
|
112
|
+
marginRight: '4px',
|
|
113
|
+
textDecoration: 'underline',
|
|
114
|
+
color: palette.button.main,
|
|
115
|
+
fontWeight: 400
|
|
116
|
+
},
|
|
117
|
+
children: "Browse files"
|
|
118
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
119
|
+
children: "from your computer or drag and drop here"
|
|
120
|
+
})]
|
|
121
|
+
})
|
|
115
122
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
116
123
|
sx: {
|
|
117
124
|
fontWeight: 600,
|
|
@@ -12,6 +12,7 @@ var _material = require("@mui/material");
|
|
|
12
12
|
var _utils = require("@mui/utils");
|
|
13
13
|
var _common = require("./common.js");
|
|
14
14
|
var _reactVirtual = require("@tanstack/react-virtual");
|
|
15
|
+
var _isPropValid = _interopRequireDefault(require("@emotion/is-prop-valid"));
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
var _excluded = ["stickyHeader", "loading", "zeroStateMessage", "error", "ErrorContainer", "scrollOffset", "getScrollElement", "renderWhenNotVisible", "rowSize", "headerSize", "overscan", "sx", "className"];
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -23,7 +24,11 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
23
24
|
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); }
|
|
24
25
|
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; }
|
|
25
26
|
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; }
|
|
26
|
-
var TableContainer = (0, _material.styled)(_material.Box
|
|
27
|
+
var TableContainer = (0, _material.styled)(_material.Box, {
|
|
28
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
29
|
+
return (0, _isPropValid["default"])(prop);
|
|
30
|
+
}
|
|
31
|
+
})(function (_ref) {
|
|
27
32
|
var virtualizerTotalHeight = _ref.virtualizerTotalHeight;
|
|
28
33
|
return {
|
|
29
34
|
height: "".concat(virtualizerTotalHeight, "px")
|
|
@@ -40,7 +40,11 @@ var TableBody = function TableBody(props) {
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
exports.TableBody = TableBody;
|
|
43
|
-
var StyledMuiTableCell = (0, _styles.styled)(_material.TableCell
|
|
43
|
+
var StyledMuiTableCell = (0, _styles.styled)(_material.TableCell, {
|
|
44
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
45
|
+
return prop !== 'noVerticalPadding';
|
|
46
|
+
}
|
|
47
|
+
})(function (_ref) {
|
|
44
48
|
var theme = _ref.theme,
|
|
45
49
|
noVerticalPadding = _ref.noVerticalPadding;
|
|
46
50
|
return {
|
|
@@ -5,30 +5,41 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
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); }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { Autocomplete, TextField } from '@mui/material';
|
|
8
|
+
import { Autocomplete as MuiAutocomplete, TextField, styled } from '@mui/material';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
var StyledAutocomplete = styled(MuiAutocomplete, {
|
|
11
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
12
|
+
return prop !== 'width';
|
|
13
|
+
}
|
|
14
|
+
})(function (_ref) {
|
|
15
|
+
var width = _ref.width;
|
|
16
|
+
return {
|
|
17
|
+
width: width
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
function Autocomplete(props) {
|
|
21
|
+
return /*#__PURE__*/_jsx(StyledAutocomplete, {
|
|
22
|
+
disablePortal: props.disablePortal,
|
|
23
|
+
options: props.items,
|
|
24
|
+
width: props.width,
|
|
25
|
+
inputValue: props.inputValue,
|
|
26
|
+
filterOptions: props.filterOptions,
|
|
27
|
+
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
28
|
+
return option.value === value.value;
|
|
29
|
+
},
|
|
30
|
+
onInputChange: props.onInputChange && function (event, inputValue) {
|
|
31
|
+
return props.onInputChange(event, inputValue);
|
|
21
32
|
},
|
|
22
33
|
renderInput: function renderInput(params) {
|
|
23
34
|
return /*#__PURE__*/_jsx(TextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
24
|
-
label: label,
|
|
25
|
-
error: error,
|
|
26
|
-
helperText: error ? "Please select a ".concat(label) : ''
|
|
35
|
+
label: props.label,
|
|
36
|
+
error: props.error,
|
|
37
|
+
helperText: props.error ? "Please select a ".concat(props.label) : ''
|
|
27
38
|
}));
|
|
28
39
|
},
|
|
29
40
|
onChange: function onChange(event, value) {
|
|
30
|
-
return
|
|
41
|
+
return props.onChange(event, value);
|
|
31
42
|
}
|
|
32
43
|
});
|
|
33
44
|
}
|
|
34
|
-
export default
|
|
45
|
+
export default Autocomplete;
|
|
@@ -89,7 +89,7 @@ export default function FileUploader(props) {
|
|
|
89
89
|
}
|
|
90
90
|
})
|
|
91
91
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
92
|
-
children: [/*#__PURE__*/
|
|
92
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
93
93
|
sx: {
|
|
94
94
|
fontSize: '14px',
|
|
95
95
|
width: '352px',
|
|
@@ -97,15 +97,22 @@ export default function FileUploader(props) {
|
|
|
97
97
|
lineHeight: '22px',
|
|
98
98
|
color: palette.text.primary
|
|
99
99
|
},
|
|
100
|
-
children:
|
|
101
|
-
component: "span",
|
|
100
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
102
101
|
sx: {
|
|
103
|
-
|
|
104
|
-
textDecoration: 'underline',
|
|
105
|
-
color: palette.button.main
|
|
102
|
+
display: 'flex'
|
|
106
103
|
},
|
|
107
|
-
children:
|
|
108
|
-
|
|
104
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
105
|
+
sx: {
|
|
106
|
+
marginRight: '4px',
|
|
107
|
+
textDecoration: 'underline',
|
|
108
|
+
color: palette.button.main,
|
|
109
|
+
fontWeight: 400
|
|
110
|
+
},
|
|
111
|
+
children: "Browse files"
|
|
112
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
113
|
+
children: "from your computer or drag and drop here"
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
109
116
|
}), /*#__PURE__*/_jsxs(Typography, {
|
|
110
117
|
sx: {
|
|
111
118
|
fontWeight: 600,
|
|
@@ -16,9 +16,14 @@ import { Box, CircularProgress, styled } from '@mui/material';
|
|
|
16
16
|
import { visuallyHidden } from '@mui/utils';
|
|
17
17
|
import { DefaultErrorContainer, useAutoTable } from './common.js';
|
|
18
18
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
19
|
+
import isPropValid from '@emotion/is-prop-valid';
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
-
var TableContainer = styled(Box
|
|
22
|
+
var TableContainer = styled(Box, {
|
|
23
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
24
|
+
return isPropValid(prop);
|
|
25
|
+
}
|
|
26
|
+
})(function (_ref) {
|
|
22
27
|
var virtualizerTotalHeight = _ref.virtualizerTotalHeight;
|
|
23
28
|
return {
|
|
24
29
|
height: "".concat(virtualizerTotalHeight, "px")
|
|
@@ -31,7 +31,11 @@ export var TableBody = function TableBody(props) {
|
|
|
31
31
|
children: props.children
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
var StyledMuiTableCell = styled(MuiTableCell
|
|
34
|
+
var StyledMuiTableCell = styled(MuiTableCell, {
|
|
35
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
36
|
+
return prop !== 'noVerticalPadding';
|
|
37
|
+
}
|
|
38
|
+
})(function (_ref) {
|
|
35
39
|
var theme = _ref.theme,
|
|
36
40
|
noVerticalPadding = _ref.noVerticalPadding;
|
|
37
41
|
return {
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FilterOptionsState } from '@mui/material';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
4
|
type Item = {
|
|
3
5
|
label: string;
|
|
4
6
|
value: string;
|
|
5
7
|
};
|
|
6
8
|
export type AutocompleteProps = {
|
|
7
9
|
items: Item[];
|
|
10
|
+
filterOptions?: (options: Item[], state: FilterOptionsState<Item>) => Item[];
|
|
8
11
|
label: string;
|
|
9
12
|
width: number;
|
|
13
|
+
disablePortal?: boolean;
|
|
14
|
+
inputValue?: string;
|
|
15
|
+
onInputChange?: (event: React.SyntheticEvent, inputValue: string) => void;
|
|
10
16
|
onChange: (event: React.SyntheticEvent, value: Item | null) => void;
|
|
11
17
|
error?: boolean;
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
12
19
|
};
|
|
13
|
-
declare function
|
|
14
|
-
export default
|
|
20
|
+
declare function Autocomplete(props: AutocompleteProps): React.JSX.Element;
|
|
21
|
+
export default Autocomplete;
|