@superdispatch/ui-lab 0.47.0 → 0.48.0
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-node/index.js +9 -22
- package/dist-node/index.js.map +1 -1
- package/dist-src/chat/ChatMessage.js +1 -1
- package/dist-src/email-autocomplate/EmailAutocomplete.js +6 -17
- package/dist-src/navbar/NavbarContext.js +2 -3
- package/dist-web/index.js +9 -22
- package/dist-web/index.js.map +1 -1
- package/package.json +10 -3
package/dist-node/index.js
CHANGED
|
@@ -16,11 +16,9 @@ var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/o
|
|
|
16
16
|
var reactTransitionGroup = require('react-transition-group');
|
|
17
17
|
var core = require('@material-ui/core');
|
|
18
18
|
var dates = require('@superdispatch/dates');
|
|
19
|
-
var uiLab = require('@superdispatch/ui-lab');
|
|
20
19
|
var js = require('@mdi/js');
|
|
21
20
|
var Dropzone = _interopDefault(require('react-dropzone'));
|
|
22
21
|
var reactAnchorme = require('react-anchorme');
|
|
23
|
-
var lodash = require('lodash');
|
|
24
22
|
|
|
25
23
|
function colorMixin(textColor, iconColor, backgroundColor, buttonHoverColor) {
|
|
26
24
|
return styled.css(["color:", ";border-color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{color:", ";& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, textColor, backgroundColor, iconColor, iconColor, buttonHoverColor);
|
|
@@ -590,7 +588,7 @@ var ChatMessage = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
590
588
|
color: "textSecondary",
|
|
591
589
|
children: time
|
|
592
590
|
})]
|
|
593
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
591
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
594
592
|
display: "inline-block",
|
|
595
593
|
padding: "xsmall",
|
|
596
594
|
marginTop: "none",
|
|
@@ -903,26 +901,15 @@ var EmailAutocomplete = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
903
901
|
ref: ref,
|
|
904
902
|
multiple: true,
|
|
905
903
|
freeSolo: true,
|
|
906
|
-
filterSelectedOptions: true,
|
|
907
|
-
disableClearable: true,
|
|
908
904
|
value: value,
|
|
905
|
+
disableClearable: true,
|
|
906
|
+
filterSelectedOptions: true,
|
|
909
907
|
filterOptions: _filterOptions => {
|
|
910
908
|
return _filterOptions.filter(option => option !== '');
|
|
911
909
|
},
|
|
912
|
-
onChange: (
|
|
913
|
-
var
|
|
914
|
-
|
|
915
|
-
if (keyboardEvent.key === 'Backspace') {
|
|
916
|
-
var removeLatesElement = value === null || value === void 0 ? void 0 : value.filter((_, index) => index < value.length - 1);
|
|
917
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(removeLatesElement, 'remove-option');
|
|
918
|
-
} else if (keyboardEvent.key === 'Enter' && lastElement) {
|
|
919
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange([...(value || []), lastElement], 'select-option');
|
|
920
|
-
} else if (lastElement) {
|
|
921
|
-
var emails = lastElement.split(',').map(item => item.replace(' ', ''));
|
|
922
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(emails, 'select-option');
|
|
923
|
-
} else {
|
|
924
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(selectedValue, 'select-option');
|
|
925
|
-
}
|
|
910
|
+
onChange: (_event, selectedValue, reason) => {
|
|
911
|
+
var emails = selectedValue.flatMap(item => item.split(',')).map(item => item.trim());
|
|
912
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(emails, reason);
|
|
926
913
|
},
|
|
927
914
|
renderTags: items => {
|
|
928
915
|
return /*#__PURE__*/jsxRuntime.jsx(ui.Inline, {
|
|
@@ -933,7 +920,7 @@ var EmailAutocomplete = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
933
920
|
variant: "subtle",
|
|
934
921
|
children: /*#__PURE__*/jsxRuntime.jsxs(ui.Inline, {
|
|
935
922
|
space: "xxsmall",
|
|
936
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
923
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TextBox, {
|
|
937
924
|
wrapOverflow: true,
|
|
938
925
|
color: "primary",
|
|
939
926
|
children: option
|
|
@@ -1361,8 +1348,8 @@ var NavbarContext = /*#__PURE__*/react.createContext({
|
|
|
1361
1348
|
isDrawerOpen: false,
|
|
1362
1349
|
isMenuExpanded: false,
|
|
1363
1350
|
isNavbarExpanded: false,
|
|
1364
|
-
setMenuExpanded:
|
|
1365
|
-
setDrawerOpen:
|
|
1351
|
+
setMenuExpanded: () => void 0,
|
|
1352
|
+
setDrawerOpen: () => void 0
|
|
1366
1353
|
});
|
|
1367
1354
|
function useNavbarContext() {
|
|
1368
1355
|
return react.useContext(NavbarContext);
|