@widergy/energy-ui 3.22.2 → 3.22.4
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/CHANGELOG.md +14 -0
- package/dist/components/Loading/index.js +2 -2
- package/dist/components/UTActionCard/components/AdditionalMessage/index.js +1 -1
- package/dist/components/UTActionCard/components/BottomActions/index.js +3 -3
- package/dist/components/UTActionCard/components/Header/index.js +3 -3
- package/dist/components/UTActionCard/components/Header/utils.js +2 -2
- package/dist/components/UTActionCard/components/HeaderActions/index.js +5 -4
- package/dist/components/UTActionCard/components/HeaderActions/utils.js +2 -2
- package/dist/components/UTActionCard/index.js +6 -6
- package/dist/components/UTAlert/index.js +2 -2
- package/dist/components/UTAlert/theme.js +5 -4
- package/dist/components/UTAttachment/components/Preview/index.js +3 -3
- package/dist/components/UTAttachment/index.js +7 -5
- package/dist/components/UTAttachment/layout.js +2 -2
- package/dist/components/UTAttachment/utils.js +9 -8
- package/dist/components/UTAttachmentList/components/Preview/index.js +3 -3
- package/dist/components/UTAttachmentList/components/PreviewModal/index.js +3 -3
- package/dist/components/UTAttachmentList/index.js +14 -11
- package/dist/components/UTAttachmentList/layout.js +5 -5
- package/dist/components/UTAttachmentList/theme.js +9 -8
- package/dist/components/UTAttachmentList/utils.js +10 -9
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +1 -1
- package/dist/components/UTAutocomplete/index.js +2 -2
- package/dist/components/UTAutocomplete/theme.js +52 -50
- package/dist/components/UTBadge/index.js +1 -1
- package/dist/components/UTBadge/theme.js +2 -1
- package/dist/components/UTBanner/index.js +1 -1
- package/dist/components/UTBanner/theme.js +2 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +5 -5
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +2 -2
- package/dist/components/UTBarChart/components/Bars/index.js +2 -2
- package/dist/components/UTBarChart/components/Legend/index.js +6 -6
- package/dist/components/UTBarChart/components/Pagination/index.js +2 -1
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +4 -3
- package/dist/components/UTBarChart/components/XAxis/index.js +2 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +2 -1
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +5 -4
- package/dist/components/UTBarChart/index.js +3 -3
- package/dist/components/UTBarChart/theme.js +7 -6
- package/dist/components/UTBarChart/utils.js +26 -20
- package/dist/components/UTBreadcrumbs/index.js +3 -3
- package/dist/components/UTBreadcrumbs/theme.js +2 -1
- package/dist/components/UTButton/index.js +4 -8
- package/dist/components/UTButton/theme.js +18 -14
- package/dist/components/UTButton/utils.js +1 -6
- package/dist/components/UTButtonGroup/index.js +1 -1
- package/dist/components/UTButtonGroup/theme.js +2 -1
- package/dist/components/UTCard/components/UTCardFooter/index.js +2 -2
- package/dist/components/UTCard/index.js +4 -4
- package/dist/components/UTCard/theme.js +1 -1
- package/dist/components/UTCarousel/components/Button/index.js +2 -2
- package/dist/components/UTCarousel/components/Legend/index.js +1 -1
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +5 -5
- package/dist/components/UTCarousel/components/Slider/index.js +9 -8
- package/dist/components/UTCarousel/components/Slider/layout.js +6 -6
- package/dist/components/UTCheckList/index.js +5 -7
- package/dist/components/UTCheckList/theme.js +3 -2
- package/dist/components/UTCheckbox/index.js +4 -4
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +4 -4
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicatorTop/index.js +2 -2
- package/dist/components/UTConsumptionBar/index.js +8 -8
- package/dist/components/UTCuit/theme.js +6 -6
- package/dist/components/UTDatePicker/components/Day/index.js +1 -5
- package/dist/components/UTDatePicker/index.js +6 -5
- package/dist/components/UTDatePicker/theme.js +160 -157
- package/dist/components/UTDialog/index.js +8 -8
- package/dist/components/UTDialog/theme.js +2 -1
- package/dist/components/UTEmojiPicker/index.js +6 -11
- package/dist/components/UTEmojiPicker/theme.js +24 -23
- package/dist/components/UTExternalLink/index.js +1 -1
- package/dist/components/UTExternalLink/theme.js +2 -1
- package/dist/components/UTFileInput/layout.js +5 -11
- package/dist/components/UTGoogleAutocomplete/theme.js +2 -1
- package/dist/components/UTHeader/index.js +5 -5
- package/dist/components/UTHeader/theme.js +3 -2
- package/dist/components/UTIcon/theme.js +11 -9
- package/dist/components/UTIconButton/index.js +2 -2
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +6 -6
- package/dist/components/UTImageRadio/index.js +3 -3
- package/dist/components/UTImageRadio/theme.js +14 -13
- package/dist/components/UTLabel/index.js +1 -1
- package/dist/components/UTLabel/theme.js +8 -6
- package/dist/components/UTList/index.js +1 -1
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -2
- package/dist/components/UTMenu/index.js +3 -3
- package/dist/components/UTMenu/theme.js +31 -27
- package/dist/components/UTMenu/utils.js +1 -1
- package/dist/components/UTModal/index.js +5 -9
- package/dist/components/UTModal/theme.js +2 -1
- package/dist/components/UTOnboarding/index.js +24 -16
- package/dist/components/UTOnboarding/theme.js +14 -12
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +2 -2
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +1 -4
- package/dist/components/UTPagination/components/Pagination/index.js +3 -3
- package/dist/components/UTPagination/index.js +2 -2
- package/dist/components/UTPagination/theme.js +10 -9
- package/dist/components/UTPanel/versions/V0/index.js +5 -5
- package/dist/components/UTPanel/versions/V1/components/DataItem/index.js +1 -1
- package/dist/components/UTPanel/versions/V1/index.js +6 -8
- package/dist/components/UTPanel/versions/V1/theme.js +1 -1
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +1 -1
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +2 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +2 -2
- package/dist/components/UTPasswordField/theme.js +6 -5
- package/dist/components/UTPhoneInput/index.js +11 -10
- package/dist/components/UTPhoneInput/theme.js +10 -10
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +2 -2
- package/dist/components/UTPieChart/components/Legend/index.js +4 -4
- package/dist/components/UTPieChart/index.js +5 -5
- package/dist/components/UTProductItem/index.js +3 -3
- package/dist/components/UTProductItem/theme.js +4 -3
- package/dist/components/UTProgressBar/index.js +1 -1
- package/dist/components/UTProgressBar/theme.js +12 -11
- package/dist/components/UTRadioGroup/index.js +5 -11
- package/dist/components/UTRadioGroup/theme.js +17 -17
- package/dist/components/UTRating/components/Circle/index.js +5 -5
- package/dist/components/UTRating/components/Faces/index.js +4 -8
- package/dist/components/UTRating/components/Star/index.js +3 -3
- package/dist/components/UTRating/index.js +2 -2
- package/dist/components/UTRating/theme.js +21 -21
- package/dist/components/UTRipple/Ripple.js +2 -2
- package/dist/components/UTSelect/components/Option/index.js +1 -1
- package/dist/components/UTSelect/index.js +1 -1
- package/dist/components/UTSelect/theme.js +14 -14
- package/dist/components/UTSelectableCard/index.js +5 -9
- package/dist/components/UTSelectableCard/theme.js +20 -19
- package/dist/components/UTSidebar/components/ListOption/index.js +4 -1
- package/dist/components/UTSidebar/components/LogosContainer/index.js +3 -3
- package/dist/components/UTSidebar/components/Option/index.js +9 -31
- package/dist/components/UTSidebar/components/Toggler/index.js +2 -2
- package/dist/components/UTSidebar/index.js +3 -7
- package/dist/components/UTSidebar/theme.js +17 -16
- package/dist/components/UTSkeleton/index.js +3 -2
- package/dist/components/UTStatus/index.js +2 -2
- package/dist/components/UTStepper/components/Connectors/index.js +5 -7
- package/dist/components/UTStepper/components/Step/index.js +6 -16
- package/dist/components/UTStepper/index.js +1 -1
- package/dist/components/UTStepper/theme.js +12 -11
- package/dist/components/UTSwitch/index.js +6 -6
- package/dist/components/UTSwitch/theme.js +2 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +3 -8
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +2 -1
- package/dist/components/UTTable/components/Cell/index.js +2 -2
- package/dist/components/UTTable/components/HeaderCell/index.js +5 -16
- package/dist/components/UTTable/components/PrimaryAction/index.js +1 -1
- package/dist/components/UTTable/components/ResponsiveCell/index.js +4 -4
- package/dist/components/UTTable/components/Status/index.js +2 -2
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +2 -2
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +1 -6
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +2 -6
- package/dist/components/UTTable/components/TableFooter/index.js +1 -1
- package/dist/components/UTTable/components/TableHeader/index.js +3 -3
- package/dist/components/UTTable/components/TableRow/index.js +13 -42
- package/dist/components/UTTable/components/TableRow/utils.js +7 -1
- package/dist/components/UTTable/hook.js +4 -1
- package/dist/components/UTTable/index.js +19 -22
- package/dist/components/UTTable/styles.module.scss +1 -0
- package/dist/components/UTTable/theme.js +33 -32
- package/dist/components/UTTable/utils.js +14 -14
- package/dist/components/UTTabs/components/TooltipTab/index.js +1 -1
- package/dist/components/UTTabs/index.js +7 -7
- package/dist/components/UTTabs/theme.js +2 -2
- package/dist/components/UTTextArea/index.js +6 -6
- package/dist/components/UTTextArea/theme.js +22 -21
- package/dist/components/UTTextInput/index.js +6 -10
- package/dist/components/UTTextInput/theme.js +12 -12
- package/dist/components/UTToggle/components/ToggleOption/index.js +3 -3
- package/dist/components/UTToggle/index.js +2 -2
- package/dist/components/UTToggle/theme.js +2 -2
- package/dist/components/UTTooltip/index.js +2 -2
- package/dist/components/UTTooltip/theme.js +10 -9
- package/dist/components/UTTopbar/components/Notifications/index.js +1 -1
- package/dist/components/UTTopbar/components/UserMenu/index.js +4 -8
- package/dist/components/UTTopbar/index.js +3 -3
- package/dist/components/UTTopbar/theme.js +41 -40
- package/dist/components/UTTouchableWithoutFeedback/index.js +1 -1
- package/dist/components/UTTracker/components/Step/index.js +6 -22
- package/dist/components/UTTracker/index.js +23 -20
- package/dist/components/UTTracker/theme.js +6 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +5 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -3
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +1 -1
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +3 -2
- package/dist/components/UTVirtualizedList/index.js +1 -1
- package/dist/components/UTWizard/index.js +3 -3
- package/dist/components/UTWizard/theme.js +2 -2
- package/dist/components/UTWorkflowContainer/versions/V0/components/ActionButton/index.js +3 -6
- package/dist/components/UTWorkflowContainer/versions/V0/index.js +9 -14
- package/dist/components/UTWorkflowContainer/versions/V0/theme.js +5 -4
- package/dist/components/UTWorkflowContainer/versions/V1/components/NavActions/index.js +8 -8
- package/dist/components/UTWorkflowContainer/versions/V1/index.js +7 -7
- package/dist/components/UTWorkflowContainer/versions/V1/styles.module.scss +2 -2
- package/dist/components/UTWorkflowContainer/versions/V1/theme.js +7 -6
- package/dist/components/WithGoogleMaps/index.js +2 -2
- package/dist/components/WithTouch/index.js +1 -1
- package/dist/utils/classesUtils.js +2 -2
- package/dist/utils/componentUtils.js +3 -3
- package/dist/utils/shadowUtils.js +1 -1
- package/package.json +3 -2
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.pdfAspectRatioValidation = exports.isVideo = exports.isValidFile = exports.isPDF = exports.isNewFile = exports.isImage = exports.isHTML = exports.isAudio = exports.hasPreview = exports.getSizeInMB = exports.getNotRepeatedFiles = exports.getDefaultAttachment = exports.getBlobFromUrl = exports.getAvailableFileTypesLabel = void 0;
|
|
7
7
|
var _files = require("@widergy/web-utils/lib/constants/files");
|
|
8
8
|
var _constants = require("./constants");
|
|
9
|
-
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc =
|
|
9
|
+
if (window['pdfjs-dist/build/pdf']) window['pdfjs-dist/build/pdf'].GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(window['pdfjs-dist/build/pdf'].version, "/pdf.worker.js");
|
|
10
10
|
const getImage = async imageUrl => fetch(imageUrl, {
|
|
11
11
|
method: 'GET'
|
|
12
12
|
}).catch(error => console.error(error)); // eslint-disable-line no-console
|
|
@@ -14,7 +14,7 @@ const getImage = async imageUrl => fetch(imageUrl, {
|
|
|
14
14
|
const getBlobFromUrl = async (imageUrl, callback) => {
|
|
15
15
|
if (!imageUrl || !callback) return false;
|
|
16
16
|
const response = await getImage(imageUrl);
|
|
17
|
-
if (response
|
|
17
|
+
if (response !== null && response !== void 0 && response.ok) response.blob().then(blob => callback(blob));else callback(null);
|
|
18
18
|
};
|
|
19
19
|
exports.getBlobFromUrl = getBlobFromUrl;
|
|
20
20
|
const lengthMatches = (length1, length2, toleranceInPercentage) => {
|
|
@@ -39,28 +39,29 @@ const pdfAspectRatioValidation = async (file, allowedPDFUploadSizes) => {
|
|
|
39
39
|
return pages.every(page => pageMatches(page, allowedPDFUploadSizes));
|
|
40
40
|
};
|
|
41
41
|
exports.pdfAspectRatioValidation = pdfAspectRatioValidation;
|
|
42
|
-
const isImage = file => _files.inputFiles.image.validType.includes(file
|
|
42
|
+
const isImage = file => _files.inputFiles.image.validType.includes(file === null || file === void 0 ? void 0 : file.type);
|
|
43
43
|
exports.isImage = isImage;
|
|
44
|
-
const isPDF = file => _files.inputFiles.pdf.validType.includes(file
|
|
44
|
+
const isPDF = file => _files.inputFiles.pdf.validType.includes(file === null || file === void 0 ? void 0 : file.type);
|
|
45
45
|
exports.isPDF = isPDF;
|
|
46
|
-
const isAudio = file => _files.inputFiles.audio.validType.includes(file
|
|
46
|
+
const isAudio = file => _files.inputFiles.audio.validType.includes(file === null || file === void 0 ? void 0 : file.type);
|
|
47
47
|
exports.isAudio = isAudio;
|
|
48
|
-
const isVideo = file => _files.inputFiles.video.validType.includes(file
|
|
48
|
+
const isVideo = file => _files.inputFiles.video.validType.includes(file === null || file === void 0 ? void 0 : file.type);
|
|
49
49
|
exports.isVideo = isVideo;
|
|
50
|
-
const isHTML = file => _files.inputFiles.html.validType.includes(file
|
|
50
|
+
const isHTML = file => _files.inputFiles.html.validType.includes(file === null || file === void 0 ? void 0 : file.type);
|
|
51
51
|
exports.isHTML = isHTML;
|
|
52
52
|
const hasPreview = file => isImage(file) || isAudio(file) || isVideo(file);
|
|
53
53
|
exports.hasPreview = hasPreview;
|
|
54
54
|
const isValidFile = file => hasPreview(file) || isPDF(file) || isHTML(file);
|
|
55
55
|
exports.isValidFile = isValidFile;
|
|
56
56
|
const isNewFile = (newFile, oldFile) => {
|
|
57
|
+
var _newFile$file, _oldFile$file;
|
|
57
58
|
if (!newFile && !oldFile) return false;
|
|
58
59
|
if (!newFile || !oldFile) return true;
|
|
59
60
|
const newFileType = typeof newFile;
|
|
60
61
|
const oldFileType = typeof oldFile;
|
|
61
62
|
if (newFileType !== oldFileType) return true;
|
|
62
63
|
if (newFileType === 'string') return newFile !== oldFile;
|
|
63
|
-
return newFile.file
|
|
64
|
+
return ((_newFile$file = newFile.file) === null || _newFile$file === void 0 ? void 0 : _newFile$file.lastModified) !== ((_oldFile$file = oldFile.file) === null || _oldFile$file === void 0 ? void 0 : _oldFile$file.lastModified);
|
|
64
65
|
};
|
|
65
66
|
exports.isNewFile = isNewFile;
|
|
66
67
|
const getAvailableFileTypesLabel = acceptedFileTypes => {
|
|
@@ -74,5 +75,5 @@ const getSizeInMB = maxFileSize => (maxFileSize / 1048576).toFixed(2);
|
|
|
74
75
|
exports.getSizeInMB = getSizeInMB;
|
|
75
76
|
const getNotRepeatedFiles = files => files.filter((file, index, self) => index === self.findIndex(f => f.name === file.name));
|
|
76
77
|
exports.getNotRepeatedFiles = getNotRepeatedFiles;
|
|
77
|
-
const getDefaultAttachment = (fileType, index) =>
|
|
78
|
+
const getDefaultAttachment = (fileType, index) => "".concat(_constants.DEFAULT_ATTACHMENT_NAME, "-").concat(index).concat(fileType && ".".concat(fileType));
|
|
78
79
|
exports.getDefaultAttachment = getDefaultAttachment;
|
|
@@ -17,7 +17,7 @@ const renderRow = _ref => {
|
|
|
17
17
|
style: {
|
|
18
18
|
...style
|
|
19
19
|
},
|
|
20
|
-
className:
|
|
20
|
+
className: "".concat(data[index].props.className, " ").concat(_stylesModule.default.rowRender)
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
exports.renderRow = renderRow;
|
|
@@ -51,7 +51,7 @@ const UTAutocomplete = _ref => {
|
|
|
51
51
|
const textInputLabel = (0, _array.isEmpty)(options) ? emptyOptionsLabel : label;
|
|
52
52
|
const fieldDisabled = disabled || loading || (0, _array.isEmpty)(options);
|
|
53
53
|
const onChange = (_, values) => {
|
|
54
|
-
input.onChange(multiple ? values
|
|
54
|
+
input.onChange(multiple ? values === null || values === void 0 ? void 0 : values.map(val => val[valueKey]) : values === null || values === void 0 ? void 0 : values[valueKey]);
|
|
55
55
|
if (!values) setComponentValue(initialValue);
|
|
56
56
|
if (field.onChange) field.onChange(values);
|
|
57
57
|
};
|
|
@@ -74,7 +74,7 @@ const UTAutocomplete = _ref => {
|
|
|
74
74
|
const textInputEndAdornment = loading ? /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
75
75
|
className: classes.loadingIcon
|
|
76
76
|
}) : ArrowIcon || /*#__PURE__*/_react.default.createElement(_KeyboardArrowDown.default, {
|
|
77
|
-
className:
|
|
77
|
+
className: "".concat(disabled ? classes.arrowIconDisabled : classes.arrowIcon)
|
|
78
78
|
});
|
|
79
79
|
const errorMessage = (0, _form.shouldShowErrors)(meta) && meta.error || '';
|
|
80
80
|
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, _extends({
|
|
@@ -10,145 +10,147 @@ var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.
|
|
|
10
10
|
var _classesUtils = require("../../utils/classesUtils");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const retrieveStyle = _ref => {
|
|
13
|
+
var _theme$UTAutocomplete, _theme$UTTextInput, _theme$UTAutocomplete2, _theme$UTTextInput2, _theme$UTAutocomplete3, _theme$UTTextInput3, _theme$UTAutocomplete4, _theme$UTAutocomplete5, _theme$UTAutocomplete6;
|
|
13
14
|
let {
|
|
14
15
|
theme
|
|
15
16
|
} = _ref;
|
|
16
17
|
return {
|
|
17
18
|
arrowIcon: {
|
|
18
|
-
color: theme.UTAutocomplete
|
|
19
|
+
color: ((_theme$UTAutocomplete = theme.UTAutocomplete) === null || _theme$UTAutocomplete === void 0 || (_theme$UTAutocomplete = _theme$UTAutocomplete.arrowIcon) === null || _theme$UTAutocomplete === void 0 ? void 0 : _theme$UTAutocomplete.color) || ((_theme$UTTextInput = theme.UTTextInput) === null || _theme$UTTextInput === void 0 ? void 0 : _theme$UTTextInput.color)
|
|
19
20
|
},
|
|
20
21
|
arrowIconDisabled: {
|
|
21
|
-
color: theme.UTAutocomplete
|
|
22
|
+
color: ((_theme$UTAutocomplete2 = theme.UTAutocomplete) === null || _theme$UTAutocomplete2 === void 0 || (_theme$UTAutocomplete2 = _theme$UTAutocomplete2.arrowIconDisabled) === null || _theme$UTAutocomplete2 === void 0 ? void 0 : _theme$UTAutocomplete2.color) || ((_theme$UTTextInput2 = theme.UTTextInput) === null || _theme$UTTextInput2 === void 0 ? void 0 : _theme$UTTextInput2.color)
|
|
22
23
|
},
|
|
23
24
|
loadingIcon: {
|
|
24
|
-
color: theme.UTAutocomplete
|
|
25
|
-
height: (0, _classesUtils.withImportant)(theme.UTAutocomplete
|
|
26
|
-
margin: theme.UTAutocomplete
|
|
27
|
-
width: (0, _classesUtils.withImportant)(theme.UTAutocomplete
|
|
25
|
+
color: ((_theme$UTAutocomplete3 = theme.UTAutocomplete) === null || _theme$UTAutocomplete3 === void 0 || (_theme$UTAutocomplete3 = _theme$UTAutocomplete3.loadingIcon) === null || _theme$UTAutocomplete3 === void 0 ? void 0 : _theme$UTAutocomplete3.color) || ((_theme$UTTextInput3 = theme.UTTextInput) === null || _theme$UTTextInput3 === void 0 ? void 0 : _theme$UTTextInput3.color),
|
|
26
|
+
height: (0, _classesUtils.withImportant)(((_theme$UTAutocomplete4 = theme.UTAutocomplete) === null || _theme$UTAutocomplete4 === void 0 || (_theme$UTAutocomplete4 = _theme$UTAutocomplete4.loadingIcon) === null || _theme$UTAutocomplete4 === void 0 ? void 0 : _theme$UTAutocomplete4.height) || "20px"),
|
|
27
|
+
margin: ((_theme$UTAutocomplete5 = theme.UTAutocomplete) === null || _theme$UTAutocomplete5 === void 0 || (_theme$UTAutocomplete5 = _theme$UTAutocomplete5.loadingIcon) === null || _theme$UTAutocomplete5 === void 0 ? void 0 : _theme$UTAutocomplete5.margin) || '0 10px 0 0',
|
|
28
|
+
width: (0, _classesUtils.withImportant)(((_theme$UTAutocomplete6 = theme.UTAutocomplete) === null || _theme$UTAutocomplete6 === void 0 || (_theme$UTAutocomplete6 = _theme$UTAutocomplete6.loadingIcon) === null || _theme$UTAutocomplete6 === void 0 ? void 0 : _theme$UTAutocomplete6.width) || "20px")
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
32
|
exports.retrieveStyle = retrieveStyle;
|
|
32
33
|
const retrieveMuiTheme = (theme, muiTheme) => {
|
|
34
|
+
var _theme$Fonts, _theme$UTTextInput4, _theme$UTTextInput5, _theme$UTTextInput6, _theme$Fonts2, _theme$UTTextInput7, _theme$UTTextInput8, _theme$UTTextInput9, _theme$UTTextInput10, _theme$UTTextInput11, _theme$UTTextInput12, _theme$UTTextInput13, _theme$UTTextInput14, _theme$UTTextInput15, _theme$Fonts3, _theme$UTTextInput16, _theme$UTTextInput17, _theme$UTTextInput18, _theme$UTTextInput19, _theme$UTTextInput20, _theme$UTTextInput21, _theme$UTTextInput22, _theme$UTTextInput23, _theme$UTTextInput24, _theme$UTTextInput25, _theme$UTTextInput26, _theme$UTAutocomplete7, _theme$UTAutocomplete8, _theme$UTAutocomplete9, _theme$UTTextInput27, _theme$UTTextInput28, _theme$UTTextInput29, _theme$UTTextInput30, _theme$Fonts4, _theme$UTTextInput31, _theme$UTTextInput32, _theme$UTAutocomplete10, _theme$UTAutocomplete11, _theme$UTAutocomplete12, _theme$UTAutocomplete13, _theme$UTAutocomplete14, _theme$UTAutocomplete15, _theme$UTAutocomplete16, _theme$UTAutocomplete17, _theme$UTAutocomplete18, _theme$UTAutocomplete19;
|
|
33
35
|
const mui = {
|
|
34
36
|
typography: {
|
|
35
|
-
fontFamily: theme.Fonts
|
|
37
|
+
fontFamily: (_theme$Fonts = theme.Fonts) === null || _theme$Fonts === void 0 ? void 0 : _theme$Fonts.fontFamily
|
|
36
38
|
},
|
|
37
39
|
overrides: {
|
|
38
40
|
MuiInput: {
|
|
39
41
|
input: {
|
|
40
|
-
border: theme.UTTextInput
|
|
41
|
-
borderRadius: theme.UTTextInput
|
|
42
|
-
fontSize: theme.UTTextInput
|
|
43
|
-
color: theme.UTTextInput
|
|
44
|
-
padding: theme.UTTextInput
|
|
42
|
+
border: (_theme$UTTextInput4 = theme.UTTextInput) === null || _theme$UTTextInput4 === void 0 ? void 0 : _theme$UTTextInput4.border,
|
|
43
|
+
borderRadius: (_theme$UTTextInput5 = theme.UTTextInput) === null || _theme$UTTextInput5 === void 0 ? void 0 : _theme$UTTextInput5.borderRadius,
|
|
44
|
+
fontSize: ((_theme$UTTextInput6 = theme.UTTextInput) === null || _theme$UTTextInput6 === void 0 ? void 0 : _theme$UTTextInput6.fontSize) || ((_theme$Fonts2 = theme.Fonts) === null || _theme$Fonts2 === void 0 ? void 0 : _theme$Fonts2.medium) || 14,
|
|
45
|
+
color: (_theme$UTTextInput7 = theme.UTTextInput) === null || _theme$UTTextInput7 === void 0 ? void 0 : _theme$UTTextInput7.color,
|
|
46
|
+
padding: (_theme$UTTextInput8 = theme.UTTextInput) === null || _theme$UTTextInput8 === void 0 ? void 0 : _theme$UTTextInput8.padding
|
|
45
47
|
},
|
|
46
48
|
underline: {
|
|
47
49
|
'&:hover:not($disabled):not($focused):not($error):before': {
|
|
48
|
-
borderBottom: theme.UTTextInput
|
|
50
|
+
borderBottom: ((_theme$UTTextInput9 = theme.UTTextInput) === null || _theme$UTTextInput9 === void 0 || (_theme$UTTextInput9 = _theme$UTTextInput9.underline) === null || _theme$UTTextInput9 === void 0 || (_theme$UTTextInput9 = _theme$UTTextInput9.hover) === null || _theme$UTTextInput9 === void 0 ? void 0 : _theme$UTTextInput9.borderBottom) || "1px solid ".concat(_colorsModule.default.gray)
|
|
49
51
|
},
|
|
50
52
|
'&:hover:not($disabled):before': {
|
|
51
|
-
borderBottom: theme.UTTextInput
|
|
53
|
+
borderBottom: ((_theme$UTTextInput10 = theme.UTTextInput) === null || _theme$UTTextInput10 === void 0 || (_theme$UTTextInput10 = _theme$UTTextInput10.underline) === null || _theme$UTTextInput10 === void 0 || (_theme$UTTextInput10 = _theme$UTTextInput10.hover) === null || _theme$UTTextInput10 === void 0 ? void 0 : _theme$UTTextInput10.borderBottom) || "1px solid ".concat(_colorsModule.default.gray)
|
|
52
54
|
},
|
|
53
55
|
'&$disabled:before': {
|
|
54
|
-
borderBottom: theme.UTTextInput
|
|
56
|
+
borderBottom: ((_theme$UTTextInput11 = theme.UTTextInput) === null || _theme$UTTextInput11 === void 0 || (_theme$UTTextInput11 = _theme$UTTextInput11.underline) === null || _theme$UTTextInput11 === void 0 || (_theme$UTTextInput11 = _theme$UTTextInput11.disabled) === null || _theme$UTTextInput11 === void 0 ? void 0 : _theme$UTTextInput11.borderBottom) || "1px solid ".concat(_colorsModule.default.gray)
|
|
55
57
|
},
|
|
56
58
|
'&:before': {
|
|
57
|
-
borderBottom: theme.UTTextInput
|
|
59
|
+
borderBottom: ((_theme$UTTextInput12 = theme.UTTextInput) === null || _theme$UTTextInput12 === void 0 || (_theme$UTTextInput12 = _theme$UTTextInput12.underline) === null || _theme$UTTextInput12 === void 0 || (_theme$UTTextInput12 = _theme$UTTextInput12.unfocused) === null || _theme$UTTextInput12 === void 0 ? void 0 : _theme$UTTextInput12.borderBottom) || "1px solid ".concat(_colorsModule.default.gray)
|
|
58
60
|
},
|
|
59
61
|
'&$focused:after': {
|
|
60
|
-
borderBottom: theme.UTTextInput
|
|
62
|
+
borderBottom: ((_theme$UTTextInput13 = theme.UTTextInput) === null || _theme$UTTextInput13 === void 0 || (_theme$UTTextInput13 = _theme$UTTextInput13.underline) === null || _theme$UTTextInput13 === void 0 || (_theme$UTTextInput13 = _theme$UTTextInput13.focused) === null || _theme$UTTextInput13 === void 0 ? void 0 : _theme$UTTextInput13.borderBottom) || "2px solid ".concat(_colorsModule.default.primary)
|
|
61
63
|
},
|
|
62
64
|
'&:after': {
|
|
63
|
-
borderBottom: theme.UTTextInput
|
|
65
|
+
borderBottom: ((_theme$UTTextInput14 = theme.UTTextInput) === null || _theme$UTTextInput14 === void 0 || (_theme$UTTextInput14 = _theme$UTTextInput14.underline) === null || _theme$UTTextInput14 === void 0 || (_theme$UTTextInput14 = _theme$UTTextInput14.base) === null || _theme$UTTextInput14 === void 0 ? void 0 : _theme$UTTextInput14.borderBottom) || "2px solid ".concat(_colorsModule.default.primary)
|
|
64
66
|
},
|
|
65
67
|
'&$error:after': {
|
|
66
|
-
borderBottom:
|
|
68
|
+
borderBottom: "2px solid ".concat(theme.Palette.error['05']),
|
|
67
69
|
borderBottomColor: theme.Palette.error['05']
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
},
|
|
71
73
|
MuiOutlinedInput: {
|
|
72
74
|
input: {
|
|
73
|
-
fontSize: theme.UTTextInput
|
|
74
|
-
color: theme.UTTextInput
|
|
75
|
+
fontSize: ((_theme$UTTextInput15 = theme.UTTextInput) === null || _theme$UTTextInput15 === void 0 ? void 0 : _theme$UTTextInput15.fontSize) || ((_theme$Fonts3 = theme.Fonts) === null || _theme$Fonts3 === void 0 ? void 0 : _theme$Fonts3.medium) || 14,
|
|
76
|
+
color: (_theme$UTTextInput16 = theme.UTTextInput) === null || _theme$UTTextInput16 === void 0 ? void 0 : _theme$UTTextInput16.color
|
|
75
77
|
},
|
|
76
78
|
root: {
|
|
77
79
|
'&:hover:not($disabled):not($focused):not($error) $notchedOutline': {
|
|
78
|
-
border: theme.UTTextInput
|
|
79
|
-
borderColor: theme.UTTextInput
|
|
80
|
+
border: ((_theme$UTTextInput17 = theme.UTTextInput) === null || _theme$UTTextInput17 === void 0 || (_theme$UTTextInput17 = _theme$UTTextInput17.notchedOutline) === null || _theme$UTTextInput17 === void 0 || (_theme$UTTextInput17 = _theme$UTTextInput17.hover) === null || _theme$UTTextInput17 === void 0 ? void 0 : _theme$UTTextInput17.border) || "1px solid ".concat(_colorsModule.default.gray),
|
|
81
|
+
borderColor: (_theme$UTTextInput18 = theme.UTTextInput) === null || _theme$UTTextInput18 === void 0 || (_theme$UTTextInput18 = _theme$UTTextInput18.notchedOutline) === null || _theme$UTTextInput18 === void 0 || (_theme$UTTextInput18 = _theme$UTTextInput18.hover) === null || _theme$UTTextInput18 === void 0 ? void 0 : _theme$UTTextInput18.borderColor
|
|
80
82
|
},
|
|
81
83
|
'&$focused $notchedOutline': {
|
|
82
|
-
border: theme.UTTextInput
|
|
83
|
-
borderColor: theme.UTTextInput
|
|
84
|
+
border: ((_theme$UTTextInput19 = theme.UTTextInput) === null || _theme$UTTextInput19 === void 0 || (_theme$UTTextInput19 = _theme$UTTextInput19.notchedOutline) === null || _theme$UTTextInput19 === void 0 || (_theme$UTTextInput19 = _theme$UTTextInput19.focused) === null || _theme$UTTextInput19 === void 0 ? void 0 : _theme$UTTextInput19.border) || "2px solid ".concat(_colorsModule.default.primary),
|
|
85
|
+
borderColor: (_theme$UTTextInput20 = theme.UTTextInput) === null || _theme$UTTextInput20 === void 0 || (_theme$UTTextInput20 = _theme$UTTextInput20.notchedOutline) === null || _theme$UTTextInput20 === void 0 || (_theme$UTTextInput20 = _theme$UTTextInput20.hover) === null || _theme$UTTextInput20 === void 0 ? void 0 : _theme$UTTextInput20.borderColor
|
|
84
86
|
},
|
|
85
87
|
'&$disabled $notchedOutline': {
|
|
86
|
-
border: theme.UTTextInput
|
|
87
|
-
borderColor: theme.UTTextInput
|
|
88
|
+
border: ((_theme$UTTextInput21 = theme.UTTextInput) === null || _theme$UTTextInput21 === void 0 || (_theme$UTTextInput21 = _theme$UTTextInput21.notchedOutline) === null || _theme$UTTextInput21 === void 0 || (_theme$UTTextInput21 = _theme$UTTextInput21.disabled) === null || _theme$UTTextInput21 === void 0 ? void 0 : _theme$UTTextInput21.border) || "1px solid ".concat(_colorsModule.default.gray),
|
|
89
|
+
borderColor: (_theme$UTTextInput22 = theme.UTTextInput) === null || _theme$UTTextInput22 === void 0 || (_theme$UTTextInput22 = _theme$UTTextInput22.notchedOutline) === null || _theme$UTTextInput22 === void 0 || (_theme$UTTextInput22 = _theme$UTTextInput22.hover) === null || _theme$UTTextInput22 === void 0 ? void 0 : _theme$UTTextInput22.borderColor
|
|
88
90
|
},
|
|
89
|
-
padding: theme.UTTextInput
|
|
91
|
+
padding: (_theme$UTTextInput23 = theme.UTTextInput) === null || _theme$UTTextInput23 === void 0 || (_theme$UTTextInput23 = _theme$UTTextInput23.notchedOutline) === null || _theme$UTTextInput23 === void 0 ? void 0 : _theme$UTTextInput23.padding
|
|
90
92
|
},
|
|
91
93
|
notchedOutline: {
|
|
92
|
-
border: theme.UTTextInput
|
|
93
|
-
borderColor: theme.UTTextInput
|
|
94
|
-
borderRadius: theme.UTTextInput
|
|
94
|
+
border: ((_theme$UTTextInput24 = theme.UTTextInput) === null || _theme$UTTextInput24 === void 0 || (_theme$UTTextInput24 = _theme$UTTextInput24.notchedOutline) === null || _theme$UTTextInput24 === void 0 || (_theme$UTTextInput24 = _theme$UTTextInput24.unfocused) === null || _theme$UTTextInput24 === void 0 ? void 0 : _theme$UTTextInput24.border) || "1px solid ".concat(theme.Palette.error['05']),
|
|
95
|
+
borderColor: (_theme$UTTextInput25 = theme.UTTextInput) === null || _theme$UTTextInput25 === void 0 || (_theme$UTTextInput25 = _theme$UTTextInput25.notchedOutline) === null || _theme$UTTextInput25 === void 0 || (_theme$UTTextInput25 = _theme$UTTextInput25.hover) === null || _theme$UTTextInput25 === void 0 ? void 0 : _theme$UTTextInput25.borderColor,
|
|
96
|
+
borderRadius: (_theme$UTTextInput26 = theme.UTTextInput) === null || _theme$UTTextInput26 === void 0 || (_theme$UTTextInput26 = _theme$UTTextInput26.notchedOutline) === null || _theme$UTTextInput26 === void 0 ? void 0 : _theme$UTTextInput26.borderRadius
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
MuiPaper: {
|
|
98
100
|
root: {
|
|
99
|
-
marginTop: theme.UTAutocomplete
|
|
100
|
-
maxHeight: theme.UTAutocomplete
|
|
101
|
-
overflowX: theme.UTAutocomplete
|
|
101
|
+
marginTop: ((_theme$UTAutocomplete7 = theme.UTAutocomplete) === null || _theme$UTAutocomplete7 === void 0 || (_theme$UTAutocomplete7 = _theme$UTAutocomplete7.paper) === null || _theme$UTAutocomplete7 === void 0 ? void 0 : _theme$UTAutocomplete7.marginTop) || 8,
|
|
102
|
+
maxHeight: ((_theme$UTAutocomplete8 = theme.UTAutocomplete) === null || _theme$UTAutocomplete8 === void 0 || (_theme$UTAutocomplete8 = _theme$UTAutocomplete8.paper) === null || _theme$UTAutocomplete8 === void 0 ? void 0 : _theme$UTAutocomplete8.maxHeight) || 300,
|
|
103
|
+
overflowX: ((_theme$UTAutocomplete9 = theme.UTAutocomplete) === null || _theme$UTAutocomplete9 === void 0 || (_theme$UTAutocomplete9 = _theme$UTAutocomplete9.paper) === null || _theme$UTAutocomplete9 === void 0 ? void 0 : _theme$UTAutocomplete9.overflowX) || 'hidden'
|
|
102
104
|
}
|
|
103
105
|
},
|
|
104
106
|
MuiFormLabel: {
|
|
105
107
|
root: {
|
|
106
|
-
color: theme.UTTextInput
|
|
108
|
+
color: (_theme$UTTextInput27 = theme.UTTextInput) === null || _theme$UTTextInput27 === void 0 || (_theme$UTTextInput27 = _theme$UTTextInput27.formLabel) === null || _theme$UTTextInput27 === void 0 ? void 0 : _theme$UTTextInput27.color,
|
|
107
109
|
'&$error': {
|
|
108
|
-
color: theme.UTTextInput
|
|
110
|
+
color: ((_theme$UTTextInput28 = theme.UTTextInput) === null || _theme$UTTextInput28 === void 0 || (_theme$UTTextInput28 = _theme$UTTextInput28.formLabel) === null || _theme$UTTextInput28 === void 0 ? void 0 : _theme$UTTextInput28.errorColor) || _colorsModule.default.gray
|
|
109
111
|
},
|
|
110
112
|
'&$focused': {
|
|
111
|
-
color: theme.UTTextInput
|
|
113
|
+
color: ((_theme$UTTextInput29 = theme.UTTextInput) === null || _theme$UTTextInput29 === void 0 || (_theme$UTTextInput29 = _theme$UTTextInput29.formLabel) === null || _theme$UTTextInput29 === void 0 ? void 0 : _theme$UTTextInput29.focusedColor) || _colorsModule.default.primary,
|
|
112
114
|
'&$error': {
|
|
113
115
|
color: theme.Palette.error['05']
|
|
114
116
|
}
|
|
115
117
|
},
|
|
116
|
-
fontSize: theme.UTTextInput
|
|
118
|
+
fontSize: ((_theme$UTTextInput30 = theme.UTTextInput) === null || _theme$UTTextInput30 === void 0 ? void 0 : _theme$UTTextInput30.fontSize) || ((_theme$Fonts4 = theme.Fonts) === null || _theme$Fonts4 === void 0 ? void 0 : _theme$Fonts4.medium) || 14
|
|
117
119
|
}
|
|
118
120
|
},
|
|
119
121
|
MuiFormHelperText: {
|
|
120
122
|
root: {
|
|
121
|
-
fontSize: theme.UTTextInput
|
|
123
|
+
fontSize: ((_theme$UTTextInput31 = theme.UTTextInput) === null || _theme$UTTextInput31 === void 0 || (_theme$UTTextInput31 = _theme$UTTextInput31.helperText) === null || _theme$UTTextInput31 === void 0 ? void 0 : _theme$UTTextInput31.fontSize) || 12,
|
|
122
124
|
color: theme.Palette.error['05'],
|
|
123
|
-
letterSpacing: theme.UTTextInput
|
|
125
|
+
letterSpacing: ((_theme$UTTextInput32 = theme.UTTextInput) === null || _theme$UTTextInput32 === void 0 || (_theme$UTTextInput32 = _theme$UTTextInput32.helperText) === null || _theme$UTTextInput32 === void 0 ? void 0 : _theme$UTTextInput32.letterSpacing) || 'normal'
|
|
124
126
|
}
|
|
125
127
|
},
|
|
126
128
|
MuiInputLabel: {
|
|
127
129
|
outlined: {
|
|
128
|
-
transform: theme.UTAutocomplete
|
|
130
|
+
transform: (_theme$UTAutocomplete10 = theme.UTAutocomplete) === null || _theme$UTAutocomplete10 === void 0 || (_theme$UTAutocomplete10 = _theme$UTAutocomplete10.inputLabel) === null || _theme$UTAutocomplete10 === void 0 || (_theme$UTAutocomplete10 = _theme$UTAutocomplete10.outlined) === null || _theme$UTAutocomplete10 === void 0 ? void 0 : _theme$UTAutocomplete10.transform
|
|
129
131
|
}
|
|
130
132
|
},
|
|
131
133
|
MuiAutocomplete: {
|
|
132
134
|
root: {
|
|
133
|
-
display: theme.UTAutocomplete
|
|
134
|
-
flexShrink: theme.UTAutocomplete
|
|
135
|
-
margin: theme.UTAutocomplete
|
|
136
|
-
width: (0, _classesUtils.withImportant)(theme.UTAutocomplete
|
|
135
|
+
display: ((_theme$UTAutocomplete11 = theme.UTAutocomplete) === null || _theme$UTAutocomplete11 === void 0 ? void 0 : _theme$UTAutocomplete11.display) || 'flex',
|
|
136
|
+
flexShrink: ((_theme$UTAutocomplete12 = theme.UTAutocomplete) === null || _theme$UTAutocomplete12 === void 0 ? void 0 : _theme$UTAutocomplete12.flexShrink) || '0',
|
|
137
|
+
margin: ((_theme$UTAutocomplete13 = theme.UTAutocomplete) === null || _theme$UTAutocomplete13 === void 0 ? void 0 : _theme$UTAutocomplete13.margin) || '16px 0 8px 0',
|
|
138
|
+
width: (0, _classesUtils.withImportant)(((_theme$UTAutocomplete14 = theme.UTAutocomplete) === null || _theme$UTAutocomplete14 === void 0 ? void 0 : _theme$UTAutocomplete14.width) || '100%')
|
|
137
139
|
},
|
|
138
140
|
popper: {
|
|
139
|
-
overflowX: theme.UTAutocomplete
|
|
141
|
+
overflowX: ((_theme$UTAutocomplete15 = theme.UTAutocomplete) === null || _theme$UTAutocomplete15 === void 0 || (_theme$UTAutocomplete15 = _theme$UTAutocomplete15.popper) === null || _theme$UTAutocomplete15 === void 0 ? void 0 : _theme$UTAutocomplete15.overflowX) || 'hidden'
|
|
140
142
|
},
|
|
141
143
|
option: {
|
|
142
|
-
boxSizing: theme.UTAutocomplete
|
|
144
|
+
boxSizing: ((_theme$UTAutocomplete16 = theme.UTAutocomplete) === null || _theme$UTAutocomplete16 === void 0 || (_theme$UTAutocomplete16 = _theme$UTAutocomplete16.option) === null || _theme$UTAutocomplete16 === void 0 ? void 0 : _theme$UTAutocomplete16.boxSizing) || 'border-box'
|
|
143
145
|
},
|
|
144
146
|
listbox: {
|
|
145
147
|
'& ul': {
|
|
146
|
-
padding: theme.UTAutocomplete
|
|
147
|
-
margin: theme.UTAutocomplete
|
|
148
|
+
padding: ((_theme$UTAutocomplete17 = theme.UTAutocomplete) === null || _theme$UTAutocomplete17 === void 0 || (_theme$UTAutocomplete17 = _theme$UTAutocomplete17.listbox) === null || _theme$UTAutocomplete17 === void 0 ? void 0 : _theme$UTAutocomplete17.padding) || 0,
|
|
149
|
+
margin: ((_theme$UTAutocomplete18 = theme.UTAutocomplete) === null || _theme$UTAutocomplete18 === void 0 || (_theme$UTAutocomplete18 = _theme$UTAutocomplete18.listbox) === null || _theme$UTAutocomplete18 === void 0 ? void 0 : _theme$UTAutocomplete18.margin) || 0
|
|
148
150
|
}
|
|
149
151
|
},
|
|
150
152
|
paper: {
|
|
151
|
-
boxShadow: theme.UTAutocomplete
|
|
153
|
+
boxShadow: (_theme$UTAutocomplete19 = theme.UTAutocomplete) === null || _theme$UTAutocomplete19 === void 0 || (_theme$UTAutocomplete19 = _theme$UTAutocomplete19.paper) === null || _theme$UTAutocomplete19 === void 0 ? void 0 : _theme$UTAutocomplete19.boxShadow
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
}
|
|
@@ -28,7 +28,7 @@ const UTBadge = _ref => {
|
|
|
28
28
|
weight: 'medium'
|
|
29
29
|
} : {};
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
31
|
-
className:
|
|
31
|
+
className: "".concat(classes.root, " ").concat(className)
|
|
32
32
|
}, componentProps), children);
|
|
33
33
|
};
|
|
34
34
|
UTBadge.defaultProps = _constants.DEFAULT_PROPS;
|
|
@@ -7,7 +7,8 @@ exports.variantsColorTheme = exports.retrieveStyle = void 0;
|
|
|
7
7
|
var _componentUtils = require("../../utils/componentUtils");
|
|
8
8
|
var _constants = require("./constants");
|
|
9
9
|
const variantsColorTheme = (theme, colorTheme) => {
|
|
10
|
-
|
|
10
|
+
var _theme$Palette$action;
|
|
11
|
+
const colorThemeDefinition = theme.Palette[colorTheme] || ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[colorTheme]) || theme.Palette[_constants.DEFAULT_PROPS.colorTheme];
|
|
11
12
|
const colorShade = (0, _componentUtils.getDefaultColorShade)(colorTheme);
|
|
12
13
|
return {
|
|
13
14
|
backgroundColor: colorThemeDefinition[colorShade]
|
|
@@ -24,7 +24,7 @@ const UTBanner = _ref => {
|
|
|
24
24
|
} = _ref;
|
|
25
25
|
const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(themeClasses, classNames), [classNames]);
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
-
className:
|
|
27
|
+
className: "".concat(_stylesModule.default.bannerContainer, " ").concat(classes.infoContainer)
|
|
28
28
|
}, Icon && /*#__PURE__*/_react.default.createElement(Icon, iconProps), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
29
29
|
variant: "small"
|
|
30
30
|
}, children));
|
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
const retrieveStyle = _ref => {
|
|
8
|
+
var _theme$Palette;
|
|
8
9
|
let {
|
|
9
10
|
theme
|
|
10
11
|
} = _ref;
|
|
11
12
|
return {
|
|
12
13
|
infoContainer: {
|
|
13
|
-
backgroundColor: theme.Palette
|
|
14
|
+
backgroundColor: (_theme$Palette = theme.Palette) === null || _theme$Palette === void 0 ? void 0 : _theme$Palette.light['03']
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
17
|
};
|
|
@@ -28,16 +28,16 @@ const Rect = _ref => {
|
|
|
28
28
|
const positiveHeight = height >= 0 ? height : 0;
|
|
29
29
|
const positiveY = y >= 0 ? y : 0;
|
|
30
30
|
(0, _react.useEffect)(() => {
|
|
31
|
-
d3.select(
|
|
31
|
+
d3.select("#bar-".concat(id)).attr('height', 0).attr('y', positiveY).transition().duration(transitionDuration).attr('height', positiveHeight).attr('y', positiveY - positiveHeight);
|
|
32
32
|
}, [positiveHeight, positiveY]);
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("clipPath", {
|
|
34
|
-
id:
|
|
34
|
+
id: "clip-bar-".concat(id)
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
36
|
-
d:
|
|
36
|
+
d: "M".concat(x, ",").concat(y, " v").concat(verticalStroke, " q", 0, ",").concat(-borderRadius, " ").concat(borderRadius, ",").concat(-borderRadius, " h").concat(horizontalStroke, " q").concat(borderRadius, ",", 0, " ").concat(borderRadius, ",").concat(borderRadius, " v").concat(-verticalStroke, " z")
|
|
37
37
|
})), /*#__PURE__*/_react.default.createElement("rect", {
|
|
38
|
-
id:
|
|
38
|
+
id: "bar-".concat(id),
|
|
39
39
|
className: className,
|
|
40
|
-
clipPath:
|
|
40
|
+
clipPath: "url(#clip-bar-".concat(id, ")"),
|
|
41
41
|
x: x,
|
|
42
42
|
width: width,
|
|
43
43
|
fill: color,
|
|
@@ -37,10 +37,10 @@ const Bar = _ref => {
|
|
|
37
37
|
stringContentClassName: _stylesModule.default.tooltip,
|
|
38
38
|
className: tooltipClassName
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
40
|
-
className:
|
|
40
|
+
className: "".concat(clickable && _stylesModule.default.clickable, " ").concat(_stylesModule.default.rect),
|
|
41
41
|
onClick: clickable ? () => onClick(index, data) : _constants.NO_OP
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement(_Rect.default, {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(clickable && _stylesModule.default.clickable, " ").concat(_stylesModule.default.rect),
|
|
44
44
|
width: width,
|
|
45
45
|
height: height,
|
|
46
46
|
color: color,
|
|
@@ -85,7 +85,7 @@ const Bars = _ref => {
|
|
|
85
85
|
y: graphYStart - offset,
|
|
86
86
|
borderRadius: removeBorderRadius ? 0 : barBorderRadius,
|
|
87
87
|
data: bar,
|
|
88
|
-
id:
|
|
88
|
+
id: "".concat(_constants.HIGHLIGHT_KEY, "-").concat(index, "-").concat(group, "-").concat(stackIndex)
|
|
89
89
|
}), /*#__PURE__*/_react.default.createElement(_Bar.default, {
|
|
90
90
|
index: index,
|
|
91
91
|
data: data,
|
|
@@ -100,7 +100,7 @@ const Bars = _ref => {
|
|
|
100
100
|
borderRadius: removeBorderRadius ? 0 : barBorderRadius,
|
|
101
101
|
tooltipContent: tooltipContent,
|
|
102
102
|
tooltipClassName: classes.tooltip,
|
|
103
|
-
id:
|
|
103
|
+
id: "".concat(_constants.BAR_KEY, "-").concat(index, "-").concat(group, "-").concat(stackIndex),
|
|
104
104
|
stroke: stroke,
|
|
105
105
|
strokeWidth: strokeWidth,
|
|
106
106
|
transitionDuration: transitionDuration
|
|
@@ -78,7 +78,7 @@ const Legend = _ref => {
|
|
|
78
78
|
} = _ref5;
|
|
79
79
|
return referencesToShow.includes(id);
|
|
80
80
|
};
|
|
81
|
-
const getOrderedLegend = (0, _utils.orderLegend)(references
|
|
81
|
+
const getOrderedLegend = (0, _utils.orderLegend)(references === null || references === void 0 ? void 0 : references.orderFunction);
|
|
82
82
|
return getOrderedLegend(levelsReferences.filter(filterFunction), linearReferences.filter(filterFunction), barReferences.filter(filterFunction)).filter(row => !(0, _array.isEmpty)(row));
|
|
83
83
|
};
|
|
84
84
|
const referenceRenderer = reference => {
|
|
@@ -88,12 +88,12 @@ const Legend = _ref => {
|
|
|
88
88
|
CustomIcon
|
|
89
89
|
} = reference;
|
|
90
90
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
-
className: _stylesModule.default[
|
|
91
|
+
className: _stylesModule.default["item".concat(displayAs)],
|
|
92
92
|
key: label
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: className
|
|
95
95
|
}, CustomIcon && /*#__PURE__*/_react.default.createElement(CustomIcon, null)), /*#__PURE__*/_react.default.createElement(_.UTLabel, {
|
|
96
|
-
className:
|
|
96
|
+
className: "".concat(_stylesModule.default.itemLabel, " ").concat(classes.legendItemLabel)
|
|
97
97
|
}, label));
|
|
98
98
|
};
|
|
99
99
|
const referencesToShow = getReferencesToShow(flatData);
|
|
@@ -111,18 +111,18 @@ const Legend = _ref => {
|
|
|
111
111
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
112
|
style: style
|
|
113
113
|
}, title && /*#__PURE__*/_react.default.createElement(_.UTLabel, {
|
|
114
|
-
className:
|
|
114
|
+
className: "".concat(_stylesModule.default.title, " ").concat(classes.title)
|
|
115
115
|
}, title), withButton && /*#__PURE__*/_react.default.createElement(_.UTButton, _extends({
|
|
116
116
|
classNames: {
|
|
117
117
|
icon: classes.showLegendIcon,
|
|
118
|
-
root:
|
|
118
|
+
root: "".concat(_stylesModule.default.button, " ").concat(classes.showLegendButton),
|
|
119
119
|
text: classes.showLegendLabel
|
|
120
120
|
},
|
|
121
121
|
disabled: !hasReferences,
|
|
122
122
|
Icon: _InfoOutlined.default,
|
|
123
123
|
onClick: () => setShowLegend(true)
|
|
124
124
|
}, buttonProps), showReferencesLabel), /*#__PURE__*/_react.default.createElement(Wrapper, wrapperProps, referencesToShow.map(row => /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
className: _stylesModule.default[
|
|
125
|
+
className: _stylesModule.default["row".concat(displayAs)]
|
|
126
126
|
}, row.map(item => referenceRenderer(item))))));
|
|
127
127
|
};
|
|
128
128
|
Legend.propTypes = {
|
|
@@ -14,6 +14,7 @@ var _constants = require("./constants");
|
|
|
14
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
const Pagination = _ref => {
|
|
17
|
+
var _anchor$current, _anchor$current$getBo;
|
|
17
18
|
let {
|
|
18
19
|
anchor,
|
|
19
20
|
classes,
|
|
@@ -27,7 +28,7 @@ const Pagination = _ref => {
|
|
|
27
28
|
const {
|
|
28
29
|
y = 0,
|
|
29
30
|
height = 0
|
|
30
|
-
} = anchor.current
|
|
31
|
+
} = ((_anchor$current = anchor.current) === null || _anchor$current === void 0 || (_anchor$current$getBo = _anchor$current.getBoundingClientRect) === null || _anchor$current$getBo === void 0 ? void 0 : _anchor$current$getBo.call(_anchor$current)) || {};
|
|
31
32
|
const top = y - parentYPosition + height / 2 - _constants.BUTTONS_SIZE / 2 || 0;
|
|
32
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
34
|
style: {
|
|
@@ -10,6 +10,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
12
|
const AxisElement = _ref => {
|
|
13
|
+
var _textRef$getBoundingC, _textRef$getBoundingC2, _textRef$getBoundingC3;
|
|
13
14
|
let {
|
|
14
15
|
x,
|
|
15
16
|
graphYStart,
|
|
@@ -36,10 +37,10 @@ const AxisElement = _ref => {
|
|
|
36
37
|
cx: x,
|
|
37
38
|
cy: y + yOffset + (circle.yOffset || 0)
|
|
38
39
|
}, circle)), selected && /*#__PURE__*/_react.default.createElement("rect", {
|
|
39
|
-
x: x - textRef
|
|
40
|
+
x: x - (textRef === null || textRef === void 0 || (_textRef$getBoundingC = textRef.getBoundingClientRect()) === null || _textRef$getBoundingC === void 0 ? void 0 : _textRef$getBoundingC.width) / 2 - labelBackgroundPadding,
|
|
40
41
|
y: y,
|
|
41
|
-
width: textRef
|
|
42
|
-
height: textRef
|
|
42
|
+
width: (textRef === null || textRef === void 0 || (_textRef$getBoundingC2 = textRef.getBoundingClientRect()) === null || _textRef$getBoundingC2 === void 0 ? void 0 : _textRef$getBoundingC2.width) + labelBackgroundPadding * 2,
|
|
43
|
+
height: (textRef === null || textRef === void 0 || (_textRef$getBoundingC3 = textRef.getBoundingClientRect()) === null || _textRef$getBoundingC3 === void 0 ? void 0 : _textRef$getBoundingC3.height) + labelBackgroundPadding,
|
|
43
44
|
fill: selectedLabelBackground,
|
|
44
45
|
rx: "14"
|
|
45
46
|
}), /*#__PURE__*/_react.default.createElement("text", _extends({
|
|
@@ -34,7 +34,7 @@ const XAxis = _ref => {
|
|
|
34
34
|
currentLabel
|
|
35
35
|
} = _ref;
|
|
36
36
|
const xOffset = barWidth / 2;
|
|
37
|
-
const decorations = (0, _react.useMemo)(() => decoratorRenderer
|
|
37
|
+
const decorations = (0, _react.useMemo)(() => decoratorRenderer === null || decoratorRenderer === void 0 ? void 0 : decoratorRenderer({
|
|
38
38
|
data,
|
|
39
39
|
currentPage,
|
|
40
40
|
pagination
|
|
@@ -69,7 +69,7 @@ const XAxis = _ref => {
|
|
|
69
69
|
} = _ref2;
|
|
70
70
|
const selected = index === currentLabel;
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement(_AxisElement.default, {
|
|
72
|
-
className:
|
|
72
|
+
className: "".concat(classes.xAxisMainLabel, " ").concat(selected && classes.xAxisSelectedLabel),
|
|
73
73
|
barWidth: barWidth,
|
|
74
74
|
mainLabel: mainLabel,
|
|
75
75
|
mainLabelStyles: mainLabelStyles,
|
|
@@ -15,6 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
const YAxis = _ref => {
|
|
18
|
+
var _labelRef$current, _labelRef$current$get;
|
|
18
19
|
let {
|
|
19
20
|
classes,
|
|
20
21
|
graphYEnd,
|
|
@@ -32,7 +33,7 @@ const YAxis = _ref => {
|
|
|
32
33
|
linearData
|
|
33
34
|
} = _ref;
|
|
34
35
|
const labelRef = (0, _react.useRef)();
|
|
35
|
-
const height = labelRef.current
|
|
36
|
+
const height = ((_labelRef$current = labelRef.current) === null || _labelRef$current === void 0 || (_labelRef$current$get = _labelRef$current.getBoundingClientRect) === null || _labelRef$current$get === void 0 ? void 0 : _labelRef$current$get.call(_labelRef$current).height) || 0;
|
|
36
37
|
const axis = (0, _react.useMemo)(() => new Array(yAxisTicks).fill(0).map((_, index) => index), [yAxisTicks]);
|
|
37
38
|
const linearDataUnitXPosition = graphXEnd - graphXEnd * 0.04;
|
|
38
39
|
const unitYPosition = unitSubtitle ? (graphYEnd - _constants.UNIT_PADDING) / 2 : graphYEnd - _constants.UNIT_PADDING;
|
|
@@ -21,10 +21,11 @@ const useDynamicMargins = (center, options) => {
|
|
|
21
21
|
const marginBottomRef = (0, _react.useRef)();
|
|
22
22
|
const marginTopRef = (0, _react.useRef)();
|
|
23
23
|
(0, _react.useEffect)(() => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
var _marginLeftRef$curren, _marginRightRef$curre, _marginBottomRef$curr, _marginTopRef$current;
|
|
25
|
+
setMarginLeft(Math.ceil(lateralMargin || ((_marginLeftRef$curren = marginLeftRef.current) === null || _marginLeftRef$curren === void 0 ? void 0 : _marginLeftRef$curren.getBoundingClientRect().width)) || LATERAL_DEFAULT_MARGIN);
|
|
26
|
+
setMarginRight(Math.ceil(lateralMargin || ((_marginRightRef$curre = marginRightRef.current) === null || _marginRightRef$curre === void 0 ? void 0 : _marginRightRef$curre.getBoundingClientRect().width)) || LATERAL_DEFAULT_MARGIN);
|
|
27
|
+
setMarginBottom(Math.ceil(verticalMargin || ((_marginBottomRef$curr = marginBottomRef.current) === null || _marginBottomRef$curr === void 0 ? void 0 : _marginBottomRef$curr.getBoundingClientRect().height)) || VERTICAL_DEFAULT_MARGIN);
|
|
28
|
+
setMarginTop(Math.ceil(verticalMargin || ((_marginTopRef$current = marginTopRef.current) === null || _marginTopRef$current === void 0 ? void 0 : _marginTopRef$current.getBoundingClientRect().height)) || VERTICAL_DEFAULT_MARGIN);
|
|
28
29
|
}, [marginLeftRef.current, marginRightRef.current, marginBottomRef.current, marginTopRef.current]);
|
|
29
30
|
return {
|
|
30
31
|
marginLeftRef,
|
|
@@ -90,8 +90,8 @@ const UTBarChart = _ref => {
|
|
|
90
90
|
const paginationRef = (0, _react.useRef)();
|
|
91
91
|
const groups = barData.length;
|
|
92
92
|
const totalPages = (0, _react.useMemo)(() => (0, _utils.getPages)(barData[0], pagination), [barData, pagination]);
|
|
93
|
-
const formattedData = (0, _react.useMemo)(() => pagination ? barData
|
|
94
|
-
const formattedLinearData = (0, _react.useMemo)(() => linearData
|
|
93
|
+
const formattedData = (0, _react.useMemo)(() => pagination ? barData === null || barData === void 0 ? void 0 : barData.map(data => (0, _utils.getFormattedData)(data, pagination, currentPage)) : barData, [pagination, barData, currentPage]);
|
|
94
|
+
const formattedLinearData = (0, _react.useMemo)(() => linearData === null || linearData === void 0 ? void 0 : linearData.map(_ref2 => {
|
|
95
95
|
let {
|
|
96
96
|
data,
|
|
97
97
|
...config
|
|
@@ -164,7 +164,7 @@ const UTBarChart = _ref => {
|
|
|
164
164
|
}), /*#__PURE__*/_react.default.createElement("svg", {
|
|
165
165
|
height: TOTAL_HEIGHT,
|
|
166
166
|
width: TOTAL_WIDTH
|
|
167
|
-
}, gradientGenerator
|
|
167
|
+
}, gradientGenerator === null || gradientGenerator === void 0 ? void 0 : gradientGenerator(), showGrid && /*#__PURE__*/_react.default.createElement(_Levels.default, {
|
|
168
168
|
classes: classes,
|
|
169
169
|
graphXEnd: GRAPH_X_END,
|
|
170
170
|
graphXStart: GRAPH_X_START,
|