@veritone-ce/design-system 1.12.58 → 1.12.60
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 +4 -13
- package/dist/cjs/components/FileUploader/index.js +15 -8
- package/dist/cjs/components/Panel/index.js +12 -17
- package/dist/esm/components/Autocomplete/index.js +5 -14
- package/dist/esm/components/FileUploader/index.js +15 -8
- package/dist/esm/components/Panel/index.js +12 -17
- package/dist/types/components/Autocomplete/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -14,21 +14,10 @@ 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
|
-
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
17
|
function Autocomplete(props) {
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
29
19
|
disablePortal: props.disablePortal,
|
|
30
20
|
options: props.items,
|
|
31
|
-
width: props.width,
|
|
32
21
|
inputValue: props.inputValue,
|
|
33
22
|
filterOptions: props.filterOptions,
|
|
34
23
|
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
@@ -37,6 +26,7 @@ function Autocomplete(props) {
|
|
|
37
26
|
onInputChange: props.onInputChange && function (event, inputValue) {
|
|
38
27
|
return props.onInputChange(event, inputValue);
|
|
39
28
|
},
|
|
29
|
+
fullWidth: props.fullWidth,
|
|
40
30
|
renderInput: function renderInput(params) {
|
|
41
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
42
32
|
label: props.label,
|
|
@@ -46,7 +36,8 @@ function Autocomplete(props) {
|
|
|
46
36
|
},
|
|
47
37
|
onChange: function onChange(event, value) {
|
|
48
38
|
return props.onChange(event, value);
|
|
49
|
-
}
|
|
39
|
+
},
|
|
40
|
+
sx: props.sx
|
|
50
41
|
});
|
|
51
42
|
}
|
|
52
43
|
var _default = Autocomplete;
|
|
@@ -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,
|
|
@@ -15,12 +15,14 @@ var Panel = function Panel(props) {
|
|
|
15
15
|
component: "div",
|
|
16
16
|
"data-testid": props['data-testid'] ? "overlay-".concat(props['data-testid']) : 'overlay-panel',
|
|
17
17
|
sx: {
|
|
18
|
-
position: '
|
|
18
|
+
position: 'fixed',
|
|
19
19
|
top: 0,
|
|
20
20
|
right: 0,
|
|
21
21
|
bottom: 0,
|
|
22
22
|
zIndex: 1,
|
|
23
|
-
display: !props.open ? 'none' : '
|
|
23
|
+
display: !props.open ? 'none' : 'flex',
|
|
24
|
+
flexDirection: 'flex-end',
|
|
25
|
+
// right-to-left
|
|
24
26
|
marginTop: '55px'
|
|
25
27
|
},
|
|
26
28
|
className: props.className,
|
|
@@ -28,11 +30,8 @@ var Panel = function Panel(props) {
|
|
|
28
30
|
component: "div",
|
|
29
31
|
"data-testid": props['data-testid'] || 'wrapper-panel',
|
|
30
32
|
sx: {
|
|
31
|
-
position: 'fixed',
|
|
32
|
-
right: 0,
|
|
33
33
|
background: palette.common.white,
|
|
34
|
-
|
|
35
|
-
width: '100%',
|
|
34
|
+
width: props.size === 'medium' ? '560px' : props.size === 'small' ? '380px' : '720px',
|
|
36
35
|
height: '100%',
|
|
37
36
|
display: 'flex',
|
|
38
37
|
flexDirection: 'column',
|
|
@@ -91,19 +90,15 @@ var Panel = function Panel(props) {
|
|
|
91
90
|
})]
|
|
92
91
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
93
92
|
component: "div",
|
|
93
|
+
"data-testid": "panel-content",
|
|
94
94
|
sx: {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
display: 'flex',
|
|
96
|
+
flexDirection: 'column',
|
|
97
|
+
flex: 1,
|
|
98
|
+
padding: '30px',
|
|
99
|
+
overflow: 'auto'
|
|
97
100
|
},
|
|
98
|
-
children:
|
|
99
|
-
component: "div",
|
|
100
|
-
"data-testid": "panel-content",
|
|
101
|
-
sx: {
|
|
102
|
-
flex: 1,
|
|
103
|
-
padding: '30px'
|
|
104
|
-
},
|
|
105
|
-
children: props.children
|
|
106
|
-
})
|
|
101
|
+
children: props.children
|
|
107
102
|
})]
|
|
108
103
|
})
|
|
109
104
|
});
|
|
@@ -5,23 +5,12 @@ 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 as MuiAutocomplete, TextField
|
|
8
|
+
import { Autocomplete as MuiAutocomplete, TextField } from '@mui/material';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
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
10
|
function Autocomplete(props) {
|
|
21
|
-
return /*#__PURE__*/_jsx(
|
|
11
|
+
return /*#__PURE__*/_jsx(MuiAutocomplete, {
|
|
22
12
|
disablePortal: props.disablePortal,
|
|
23
13
|
options: props.items,
|
|
24
|
-
width: props.width,
|
|
25
14
|
inputValue: props.inputValue,
|
|
26
15
|
filterOptions: props.filterOptions,
|
|
27
16
|
isOptionEqualToValue: function isOptionEqualToValue(option, value) {
|
|
@@ -30,6 +19,7 @@ function Autocomplete(props) {
|
|
|
30
19
|
onInputChange: props.onInputChange && function (event, inputValue) {
|
|
31
20
|
return props.onInputChange(event, inputValue);
|
|
32
21
|
},
|
|
22
|
+
fullWidth: props.fullWidth,
|
|
33
23
|
renderInput: function renderInput(params) {
|
|
34
24
|
return /*#__PURE__*/_jsx(TextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
35
25
|
label: props.label,
|
|
@@ -39,7 +29,8 @@ function Autocomplete(props) {
|
|
|
39
29
|
},
|
|
40
30
|
onChange: function onChange(event, value) {
|
|
41
31
|
return props.onChange(event, value);
|
|
42
|
-
}
|
|
32
|
+
},
|
|
33
|
+
sx: props.sx
|
|
43
34
|
});
|
|
44
35
|
}
|
|
45
36
|
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,
|
|
@@ -11,12 +11,14 @@ var Panel = function Panel(props) {
|
|
|
11
11
|
component: "div",
|
|
12
12
|
"data-testid": props['data-testid'] ? "overlay-".concat(props['data-testid']) : 'overlay-panel',
|
|
13
13
|
sx: {
|
|
14
|
-
position: '
|
|
14
|
+
position: 'fixed',
|
|
15
15
|
top: 0,
|
|
16
16
|
right: 0,
|
|
17
17
|
bottom: 0,
|
|
18
18
|
zIndex: 1,
|
|
19
|
-
display: !props.open ? 'none' : '
|
|
19
|
+
display: !props.open ? 'none' : 'flex',
|
|
20
|
+
flexDirection: 'flex-end',
|
|
21
|
+
// right-to-left
|
|
20
22
|
marginTop: '55px'
|
|
21
23
|
},
|
|
22
24
|
className: props.className,
|
|
@@ -24,11 +26,8 @@ var Panel = function Panel(props) {
|
|
|
24
26
|
component: "div",
|
|
25
27
|
"data-testid": props['data-testid'] || 'wrapper-panel',
|
|
26
28
|
sx: {
|
|
27
|
-
position: 'fixed',
|
|
28
|
-
right: 0,
|
|
29
29
|
background: palette.common.white,
|
|
30
|
-
|
|
31
|
-
width: '100%',
|
|
30
|
+
width: props.size === 'medium' ? '560px' : props.size === 'small' ? '380px' : '720px',
|
|
32
31
|
height: '100%',
|
|
33
32
|
display: 'flex',
|
|
34
33
|
flexDirection: 'column',
|
|
@@ -87,19 +86,15 @@ var Panel = function Panel(props) {
|
|
|
87
86
|
})]
|
|
88
87
|
}), /*#__PURE__*/_jsx(Box, {
|
|
89
88
|
component: "div",
|
|
89
|
+
"data-testid": "panel-content",
|
|
90
90
|
sx: {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
display: 'flex',
|
|
92
|
+
flexDirection: 'column',
|
|
93
|
+
flex: 1,
|
|
94
|
+
padding: '30px',
|
|
95
|
+
overflow: 'auto'
|
|
93
96
|
},
|
|
94
|
-
children:
|
|
95
|
-
component: "div",
|
|
96
|
-
"data-testid": "panel-content",
|
|
97
|
-
sx: {
|
|
98
|
-
flex: 1,
|
|
99
|
-
padding: '30px'
|
|
100
|
-
},
|
|
101
|
-
children: props.children
|
|
102
|
-
})
|
|
97
|
+
children: props.children
|
|
103
98
|
})]
|
|
104
99
|
})
|
|
105
100
|
});
|
|
@@ -9,13 +9,13 @@ export type AutocompleteProps = {
|
|
|
9
9
|
items: Item[];
|
|
10
10
|
filterOptions?: (options: Item[], state: FilterOptionsState<Item>) => Item[];
|
|
11
11
|
label: string;
|
|
12
|
-
width: number;
|
|
13
12
|
disablePortal?: boolean;
|
|
14
13
|
inputValue?: string;
|
|
15
14
|
onInputChange?: (event: React.SyntheticEvent, inputValue: string) => void;
|
|
16
15
|
onChange: (event: React.SyntheticEvent, value: Item | null) => void;
|
|
17
16
|
error?: boolean;
|
|
18
17
|
sx?: SxProps<Theme>;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
19
|
};
|
|
20
20
|
declare function Autocomplete(props: AutocompleteProps): React.JSX.Element;
|
|
21
21
|
export default Autocomplete;
|