@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
|
@@ -7,6 +7,7 @@ exports.retrieveStyle = void 0;
|
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
8
|
var _classesUtils = require("../../utils/classesUtils");
|
|
9
9
|
const retrieveStyle = _ref => {
|
|
10
|
+
var _theme$UTBarChart, _theme$UTBarChart2, _theme$UTBarChart3, _theme$UTBarChart4, _theme$UTBarChart5, _theme$UTBarChart6;
|
|
10
11
|
let {
|
|
11
12
|
theme
|
|
12
13
|
} = _ref;
|
|
@@ -35,8 +36,8 @@ const retrieveStyle = _ref => {
|
|
|
35
36
|
userSelect: 'none'
|
|
36
37
|
},
|
|
37
38
|
showLegendButton: {
|
|
38
|
-
backgroundColor: (0, _classesUtils.withImportant)(theme
|
|
39
|
-
padding: (0, _classesUtils.withImportant)(theme
|
|
39
|
+
backgroundColor: (0, _classesUtils.withImportant)(theme === null || theme === void 0 || (_theme$UTBarChart = theme.UTBarChart) === null || _theme$UTBarChart === void 0 || (_theme$UTBarChart = _theme$UTBarChart.showLegendButton) === null || _theme$UTBarChart === void 0 ? void 0 : _theme$UTBarChart.backgroundColor),
|
|
40
|
+
padding: (0, _classesUtils.withImportant)(theme === null || theme === void 0 || (_theme$UTBarChart2 = theme.UTBarChart) === null || _theme$UTBarChart2 === void 0 || (_theme$UTBarChart2 = _theme$UTBarChart2.showLegendButton) === null || _theme$UTBarChart2 === void 0 ? void 0 : _theme$UTBarChart2.padding),
|
|
40
41
|
borderRadius: '0 !important'
|
|
41
42
|
},
|
|
42
43
|
showLegendIcon: {
|
|
@@ -44,10 +45,10 @@ const retrieveStyle = _ref => {
|
|
|
44
45
|
marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendIcon', 'marginRight'], 10)
|
|
45
46
|
},
|
|
46
47
|
showLegendLabel: {
|
|
47
|
-
color: (0, _classesUtils.withImportant)(theme
|
|
48
|
-
fontFamily: theme
|
|
49
|
-
fontSize: (0, _classesUtils.withImportant)(theme
|
|
50
|
-
fontWeight: (0, _classesUtils.withImportant)(theme
|
|
48
|
+
color: (0, _classesUtils.withImportant)(theme === null || theme === void 0 || (_theme$UTBarChart3 = theme.UTBarChart) === null || _theme$UTBarChart3 === void 0 || (_theme$UTBarChart3 = _theme$UTBarChart3.showLegendLabel) === null || _theme$UTBarChart3 === void 0 ? void 0 : _theme$UTBarChart3.color),
|
|
49
|
+
fontFamily: theme === null || theme === void 0 || (_theme$UTBarChart4 = theme.UTBarChart) === null || _theme$UTBarChart4 === void 0 || (_theme$UTBarChart4 = _theme$UTBarChart4.Fonts) === null || _theme$UTBarChart4 === void 0 ? void 0 : _theme$UTBarChart4.fontFamily,
|
|
50
|
+
fontSize: (0, _classesUtils.withImportant)(theme === null || theme === void 0 || (_theme$UTBarChart5 = theme.UTBarChart) === null || _theme$UTBarChart5 === void 0 || (_theme$UTBarChart5 = _theme$UTBarChart5.showLegendLabel) === null || _theme$UTBarChart5 === void 0 ? void 0 : _theme$UTBarChart5.fontSize),
|
|
51
|
+
fontWeight: (0, _classesUtils.withImportant)(theme === null || theme === void 0 || (_theme$UTBarChart6 = theme.UTBarChart) === null || _theme$UTBarChart6 === void 0 || (_theme$UTBarChart6 = _theme$UTBarChart6.showLegendLabel) === null || _theme$UTBarChart6 === void 0 ? void 0 : _theme$UTBarChart6.fontWeight),
|
|
51
52
|
userSelect: 'none'
|
|
52
53
|
},
|
|
53
54
|
paginationButton: {
|
|
@@ -78,27 +78,33 @@ const getGraphAttributes = (containerWidth, containerHeight, marginLeft, marginR
|
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
exports.getGraphAttributes = getGraphAttributes;
|
|
81
|
-
const flattenBarData = data =>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
const flattenBarData = data => {
|
|
82
|
+
var _data$0$;
|
|
83
|
+
return data && Array.isArray((_data$0$ = data[0][0]) === null || _data$0$ === void 0 ? void 0 : _data$0$.values) ? data.flat().map(_ref4 => {
|
|
84
|
+
let {
|
|
85
|
+
values
|
|
86
|
+
} = _ref4;
|
|
87
|
+
return values;
|
|
88
|
+
}).flat() : data.flat();
|
|
89
|
+
};
|
|
90
|
+
const flattenAndReduceBarData = data => {
|
|
91
|
+
var _data$0$2;
|
|
92
|
+
return data && (Array.isArray((_data$0$2 = data[0][0]) === null || _data$0$2 === void 0 ? void 0 : _data$0$2.values) ? data.flat().map(_ref5 => {
|
|
93
|
+
let {
|
|
94
|
+
values
|
|
95
|
+
} = _ref5;
|
|
96
|
+
return {
|
|
97
|
+
value: values.reduce((acc, _ref6) => {
|
|
98
|
+
let {
|
|
99
|
+
value
|
|
100
|
+
} = _ref6;
|
|
101
|
+
return acc + value;
|
|
102
|
+
}, 0)
|
|
103
|
+
};
|
|
104
|
+
}) : data.flat());
|
|
105
|
+
};
|
|
100
106
|
exports.flattenAndReduceBarData = flattenAndReduceBarData;
|
|
101
|
-
const flattenLinearData = linearData => linearData
|
|
107
|
+
const flattenLinearData = linearData => linearData === null || linearData === void 0 ? void 0 : linearData.map(_ref7 => {
|
|
102
108
|
let {
|
|
103
109
|
data
|
|
104
110
|
} = _ref7;
|
|
@@ -145,8 +145,8 @@ const UTBreadcrumbs = _ref => {
|
|
|
145
145
|
const overflowControl = index === 0 && firstItemOverflow;
|
|
146
146
|
const colorThemesDefinition = buttonColorTheme ? _constants.COMPONENTS_THEME_PROPS[_constants.COLOR_THEMES_MAPPER[buttonColorTheme]] : _constants.COMPONENTS_THEME_PROPS[colorTheme];
|
|
147
147
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
-
className:
|
|
149
|
-
key:
|
|
148
|
+
className: "".concat(_stylesModule.default.section, " ").concat(overflowControl && _stylesModule.default.firstItem),
|
|
149
|
+
key: "".concat(route, "-").concat(label)
|
|
150
150
|
}, !route && !menuItems || disableMenu ? /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
151
151
|
className: _stylesModule.default.label,
|
|
152
152
|
variant: "small",
|
|
@@ -160,7 +160,7 @@ const UTBreadcrumbs = _ref => {
|
|
|
160
160
|
onClick: handleClick,
|
|
161
161
|
size: "small",
|
|
162
162
|
variant: "text"
|
|
163
|
-
}, colorThemesDefinition.button),
|
|
163
|
+
}, colorThemesDefinition.button), "".concat(label)), !isLast && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
164
164
|
className: classes.separator,
|
|
165
165
|
variant: "small",
|
|
166
166
|
weight: "medium"
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _classesUtils = require("../../utils/classesUtils");
|
|
8
8
|
const retrieveStyle = _ref => {
|
|
9
|
+
var _theme$UTBreadcrumbs;
|
|
9
10
|
let {
|
|
10
11
|
theme
|
|
11
12
|
} = _ref;
|
|
12
13
|
return {
|
|
13
14
|
separator: {
|
|
14
|
-
margin: (0, _classesUtils.withImportant)(theme
|
|
15
|
+
margin: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTBreadcrumbs = theme.UTBreadcrumbs) === null || _theme$UTBreadcrumbs === void 0 || (_theme$UTBreadcrumbs = _theme$UTBreadcrumbs.separator) === null || _theme$UTBreadcrumbs === void 0 ? void 0 : _theme$UTBreadcrumbs.margin) || '0 12px')
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
18
|
};
|
|
@@ -62,26 +62,22 @@ const UTButton = _ref => {
|
|
|
62
62
|
const counterColorTheme = (0, _utils.getCounterColorTheme)(colorTheme, variant);
|
|
63
63
|
const labelProps = (0, _utils.getLabelProps)(colorTheme, variant, size);
|
|
64
64
|
const RenderedChildren = /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className:
|
|
65
|
+
className: "".concat(childrenContainer, " ").concat(_stylesModule.default.childrenContainer)
|
|
66
66
|
}, count && /*#__PURE__*/_react.default.createElement(_UTBadge.default, {
|
|
67
67
|
colorTheme: counterColorTheme
|
|
68
68
|
}, count), iconPlacement === _constants.ICON_PLACEMENTS.left && IconToShow, children !== null && children !== undefined && children !== false && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({}, labelProps, {
|
|
69
|
-
className:
|
|
69
|
+
className: "".concat(_stylesModule.default.textContainer, " ").concat(classes.text)
|
|
70
70
|
}), children), iconPlacement !== _constants.ICON_PLACEMENTS.left && IconToShow);
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
72
72
|
classes: materialButtonClasses,
|
|
73
|
-
className:
|
|
74
|
-
${_stylesModule.default[`padding${(0, _componentUtils.capitalize)(size)}`]}
|
|
75
|
-
${hideTextOnResponsive && _stylesModule.default.hideTextOnResponsive}
|
|
76
|
-
${!hideTextOnResponsive && !children && _stylesModule.default.noChildren}
|
|
77
|
-
`,
|
|
73
|
+
className: "\n ".concat(_stylesModule.default["padding".concat((0, _componentUtils.capitalize)(size))], "\n ").concat(hideTextOnResponsive && _stylesModule.default.hideTextOnResponsive, "\n ").concat(!hideTextOnResponsive && !children && _stylesModule.default.noChildren, "\n "),
|
|
78
74
|
"data-testid": dataTestId,
|
|
79
75
|
disabled: disabled || loading,
|
|
80
76
|
onClick: onClick,
|
|
81
77
|
type: type
|
|
82
78
|
}, RenderedChildren, loading && /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
83
79
|
size: 24,
|
|
84
|
-
className:
|
|
80
|
+
className: "".concat(_stylesModule.default.loading, " ").concat(circularProgress)
|
|
85
81
|
}));
|
|
86
82
|
};
|
|
87
83
|
UTButton.defaultProps = _constants.DEFAULT_PROPS;
|
|
@@ -8,10 +8,11 @@ var _classesUtils = require("../../utils/classesUtils");
|
|
|
8
8
|
var _shadowUtils = require("../../utils/shadowUtils");
|
|
9
9
|
var _constants = require("./constants");
|
|
10
10
|
const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
11
|
+
var _theme$Palette$shadow;
|
|
11
12
|
const actionColorName = _constants.COLORS_MAPPER[colorTheme] || _constants.COLORS_MAPPER[_constants.DEFAULT_PROPS.colorTheme];
|
|
12
13
|
const actionPaletteColors = theme.Palette.actions || theme.Palette;
|
|
13
14
|
const actionTheme = actionPaletteColors[actionColorName];
|
|
14
|
-
const shadowTheme = theme.Palette.shadows
|
|
15
|
+
const shadowTheme = ((_theme$Palette$shadow = theme.Palette.shadows) === null || _theme$Palette$shadow === void 0 ? void 0 : _theme$Palette$shadow[_constants.SHADOW_MAPPER[actionColorName]]) || 'transparent';
|
|
15
16
|
const negativeTheme = actionPaletteColors[_constants.COLORS_MAPPER.negative];
|
|
16
17
|
const neutralTheme = actionPaletteColors[_constants.COLORS_MAPPER.secondary];
|
|
17
18
|
const definition = {
|
|
@@ -48,7 +49,7 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
48
49
|
}
|
|
49
50
|
},
|
|
50
51
|
[_constants.VARIANTS_NAMES.outlined]: {
|
|
51
|
-
border:
|
|
52
|
+
border: "1px solid ".concat(actionTheme['05']),
|
|
52
53
|
fill: actionTheme['05'],
|
|
53
54
|
'&:hover': {
|
|
54
55
|
backgroundColor: actionTheme['01'],
|
|
@@ -104,18 +105,21 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
107
|
exports.variantsColorTheme = variantsColorTheme;
|
|
107
|
-
const baseButtonTheme = theme =>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
const baseButtonTheme = theme => {
|
|
109
|
+
var _theme$UTButton;
|
|
110
|
+
return {
|
|
111
|
+
root: {
|
|
112
|
+
borderRadius: 4,
|
|
113
|
+
boxShadow: 'none',
|
|
114
|
+
minWidth: 'auto',
|
|
115
|
+
textTransform: 'none',
|
|
116
|
+
transition: 'background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms'
|
|
117
|
+
},
|
|
118
|
+
circularProgress: {
|
|
119
|
+
color: ((_theme$UTButton = theme.UTButton) === null || _theme$UTButton === void 0 || (_theme$UTButton = _theme$UTButton.circularProgress) === null || _theme$UTButton === void 0 ? void 0 : _theme$UTButton.color) || '484848'
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
};
|
|
119
123
|
const retrieveStyle = _ref => {
|
|
120
124
|
let {
|
|
121
125
|
colorTheme,
|
|
@@ -23,12 +23,7 @@ const getIconProps = _ref => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
return Icon ? {
|
|
25
25
|
IconComponent: (0, _componentUtils.isUTIcon)(Icon) ? _UTIcon.default : Icon,
|
|
26
|
-
className:
|
|
27
|
-
${_stylesModule.default.baseIcon}
|
|
28
|
-
${className}
|
|
29
|
-
${hasContent ? _stylesModule.default.icon : _stylesModule.default[`iconOnly${(0, _componentUtils.capitalize)(size)}`]}
|
|
30
|
-
${hideTextOnResponsive ? _stylesModule.default[`adaptableIcon${(0, _componentUtils.capitalize)(size)}`] : ''}
|
|
31
|
-
`,
|
|
26
|
+
className: "\n ".concat(_stylesModule.default.baseIcon, "\n ").concat(className, "\n ").concat(hasContent ? _stylesModule.default.icon : _stylesModule.default["iconOnly".concat((0, _componentUtils.capitalize)(size))], "\n ").concat(hideTextOnResponsive ? _stylesModule.default["adaptableIcon".concat((0, _componentUtils.capitalize)(size))] : '', "\n "),
|
|
32
27
|
...((0, _componentUtils.isUTIcon)(Icon) ? {
|
|
33
28
|
colorTheme: getButtonElementColorTheme(buttonColorTheme, buttonVariant),
|
|
34
29
|
name: Icon
|
|
@@ -22,7 +22,7 @@ const UTButtonGroup = _ref => {
|
|
|
22
22
|
} = _ref;
|
|
23
23
|
const backgroundColor = (0, _constants.BACKGROUND_COLOR_MAPPER)(theme)[colorTheme] || (0, _constants.BACKGROUND_COLOR_MAPPER)(theme).primary;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
className:
|
|
25
|
+
className: "".concat(_stylesModule.default["".concat(type, "Container")], " ").concat(backgroundColor)
|
|
26
26
|
}, actions.map(_ref2 => {
|
|
27
27
|
let {
|
|
28
28
|
Icon,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
const retrieveStyle = _ref => {
|
|
8
|
+
var _theme$Palette$action;
|
|
8
9
|
let {
|
|
9
10
|
theme
|
|
10
11
|
} = _ref;
|
|
@@ -13,7 +14,7 @@ const retrieveStyle = _ref => {
|
|
|
13
14
|
backgroundColor: theme.Palette.light['03']
|
|
14
15
|
},
|
|
15
16
|
negativeBackground: {
|
|
16
|
-
backgroundColor: theme.Palette.actions
|
|
17
|
+
backgroundColor: ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.negative['02']) || theme.Palette.negative['02']
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
};
|
|
@@ -19,11 +19,11 @@ const UTCardFooter = _ref => {
|
|
|
19
19
|
} = _ref;
|
|
20
20
|
const Button = customButton || _UTButton.default;
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
-
className:
|
|
22
|
+
className: "".concat(_stylesModule.default.base, " ").concat(footerClassName)
|
|
23
23
|
}, footer.map(button => /*#__PURE__*/_react.default.createElement(Button, _extends({
|
|
24
24
|
key: button.name,
|
|
25
25
|
classNames: {
|
|
26
|
-
root:
|
|
26
|
+
root: "".concat(_stylesModule.default.button, " ").concat(button.className),
|
|
27
27
|
icon: button.iconClassName
|
|
28
28
|
}
|
|
29
29
|
}, button), button.name)));
|
|
@@ -81,16 +81,16 @@ class UTCard extends _react.PureComponent {
|
|
|
81
81
|
footerClassName: classes.footer
|
|
82
82
|
});
|
|
83
83
|
return !isCollapsible ? /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
-
className:
|
|
84
|
+
className: "".concat(classes.base, " ").concat(flat && classes.flat, " ").concat(!horizontal && _stylesModule.default.column, " ").concat(classes.base),
|
|
85
85
|
style: style
|
|
86
86
|
}, header && /*#__PURE__*/_react.default.createElement("div", {
|
|
87
87
|
className: _stylesModule.default.headerContent
|
|
88
88
|
}, header), children, CustomFooter ? /*#__PURE__*/_react.default.createElement(CustomFooter, null) : Footer) : /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
-
className:
|
|
89
|
+
className: "".concat(classes.base, " ").concat(flat && classes.flat, " ").concat(_stylesModule.default.column),
|
|
90
90
|
style: style
|
|
91
91
|
}, /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
92
92
|
onClick: this.handleOnPress,
|
|
93
|
-
className:
|
|
93
|
+
className: "".concat(_stylesModule.default.header, " ").concat(classes.header)
|
|
94
94
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
95
|
className: _stylesModule.default.headerContent
|
|
96
96
|
}, header), /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
@@ -106,7 +106,7 @@ class UTCard extends _react.PureComponent {
|
|
|
106
106
|
ref: ref => this.setState({
|
|
107
107
|
childrenRef: ref
|
|
108
108
|
}),
|
|
109
|
-
className:
|
|
109
|
+
className: "".concat(_stylesModule.default.children, " ").concat(expanded && _stylesModule.default.active, " ").concat(classes.expandableContent),
|
|
110
110
|
style: {
|
|
111
111
|
height: expanded && childrenHeight !== null ? childrenHeight : '0px'
|
|
112
112
|
}
|
|
@@ -17,7 +17,7 @@ const retrieveStyle = _ref => {
|
|
|
17
17
|
border: (0, _seamlessImmutable.getIn)(theme, ['UTCard', 'base', 'border'], 0),
|
|
18
18
|
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTCard', 'base', 'borderRadius'], '4px'),
|
|
19
19
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTCard', 'base', 'backgroundColor'], _colorsModule.default.cardBackground),
|
|
20
|
-
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTCard', 'base', 'boxShadow'],
|
|
20
|
+
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTCard', 'base', 'boxShadow'], "1px 1px 3px 0 ".concat(_colorsModule.default.cardShadow1, ", -0.5px -0.5px 2px 0 ").concat(_colorsModule.default.cardShadow2)),
|
|
21
21
|
boxSizing: 'border-box',
|
|
22
22
|
display: 'flex',
|
|
23
23
|
overflow: 'hidden',
|
|
@@ -27,10 +27,10 @@ const Button = _ref => {
|
|
|
27
27
|
callback && callback();
|
|
28
28
|
};
|
|
29
29
|
return ArrowCustom ? /*#__PURE__*/_react.default.createElement(ArrowCustom, {
|
|
30
|
-
className:
|
|
30
|
+
className: "".concat(classes.arrowStyle, " ").concat(className),
|
|
31
31
|
onClick: handleOnPress
|
|
32
32
|
}) : /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
33
|
-
className:
|
|
33
|
+
className: "".concat(classes.arrowStyle, " ").concat(className),
|
|
34
34
|
onClick: handleOnPress
|
|
35
35
|
}, left ? /*#__PURE__*/_react.default.createElement(_KeyboardArrowLeft.default, null) : /*#__PURE__*/_react.default.createElement(_KeyboardArrowRight.default, null));
|
|
36
36
|
};
|
|
@@ -26,7 +26,7 @@ const LegendContainer = _ref => {
|
|
|
26
26
|
className: classes.legendStyleTouchable,
|
|
27
27
|
onClick: handleOnClick
|
|
28
28
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: "".concat(classes.legendStyleContainer, " ").concat(isActive && classes.legendStyleIsActive)
|
|
30
30
|
}));
|
|
31
31
|
};
|
|
32
32
|
LegendContainer.propTypes = {
|
|
@@ -25,19 +25,19 @@ const Slide = _ref => {
|
|
|
25
25
|
} = _ref;
|
|
26
26
|
const slide = currentSlide === position ? border / 2 : currentSlide === position - 1 ? -border / 4 : currentSlide === position + 1 && border + border / 4;
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
28
|
-
className:
|
|
28
|
+
className: "".concat(_stylesModule.default.imageContainer),
|
|
29
29
|
style: {
|
|
30
30
|
left: position * (slide ? widthContainer + slide : widthContainer),
|
|
31
|
-
width:
|
|
32
|
-
transition:
|
|
31
|
+
width: "".concat(border ? widthContainer - border : widthContainer, "px"),
|
|
32
|
+
transition: "".concat(shouldAnimate ? "left ".concat(animationTime, "s linear 0s") : 'none')
|
|
33
33
|
},
|
|
34
34
|
draggable: "false",
|
|
35
35
|
onClick: onClick
|
|
36
36
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
37
|
style: {
|
|
38
|
-
backgroundImage:
|
|
38
|
+
backgroundImage: "url(".concat(imgSrc, ")")
|
|
39
39
|
},
|
|
40
|
-
className:
|
|
40
|
+
className: "".concat(_stylesModule.default.image, " ").concat(classes === null || classes === void 0 ? void 0 : classes.image),
|
|
41
41
|
draggable: "false"
|
|
42
42
|
}));
|
|
43
43
|
};
|
|
@@ -118,10 +118,10 @@ class SliderContainer extends _react.PureComponent {
|
|
|
118
118
|
const lastSlide = this.props.slides[this.props.slides.length - 1];
|
|
119
119
|
const arr = [{
|
|
120
120
|
...lastSlide,
|
|
121
|
-
id:
|
|
121
|
+
id: "lastSlide-".concat(lastSlide.id || lastSlide.imgSrc)
|
|
122
122
|
}, ...this.props.slides, {
|
|
123
123
|
...firstSlide,
|
|
124
|
-
id:
|
|
124
|
+
id: "firstSlide-".concat(firstSlide.id || firstSlide.imgSrc)
|
|
125
125
|
}];
|
|
126
126
|
this.setState({
|
|
127
127
|
slideArray: arr
|
|
@@ -147,10 +147,10 @@ class SliderContainer extends _react.PureComponent {
|
|
|
147
147
|
const lastSlide = this.props.slides[this.props.slides.length - 1];
|
|
148
148
|
const arr = [{
|
|
149
149
|
...lastSlide,
|
|
150
|
-
id:
|
|
150
|
+
id: "lastSlide-".concat(lastSlide.id || lastSlide.imgSrc)
|
|
151
151
|
}, ...this.props.slides, {
|
|
152
152
|
...firstSlide,
|
|
153
|
-
id:
|
|
153
|
+
id: "firstSlide-".concat(firstSlide.id || firstSlide.imgSrc)
|
|
154
154
|
}];
|
|
155
155
|
this.setState({
|
|
156
156
|
slideArray: arr
|
|
@@ -167,7 +167,8 @@ class SliderContainer extends _react.PureComponent {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
componentWillUnmount() {
|
|
170
|
-
|
|
170
|
+
var _this$containerRef;
|
|
171
|
+
if ((_this$containerRef = this.containerRef) !== null && _this$containerRef !== void 0 && _this$containerRef.current) {
|
|
171
172
|
this.containerRef.current.removeEventListener('touchstart', this.handleTouchDown);
|
|
172
173
|
this.containerRef.current.removeEventListener('mousedown', this.handleMouseDown);
|
|
173
174
|
this.containerRef.current.removeEventListener('mousemove', this.handleMouseMove);
|
|
@@ -220,9 +221,9 @@ class SliderContainer extends _react.PureComponent {
|
|
|
220
221
|
const baseSlidePosition = (index - 1) * -containerWidth;
|
|
221
222
|
const transitionSlide = !this.props.enableMove ? baseSlidePosition - this.state.finishPosition : baseSlidePosition;
|
|
222
223
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
223
|
-
className:
|
|
224
|
+
className: "".concat(_stylesModule.default.generalContainer, " ").concat(className),
|
|
224
225
|
style: {
|
|
225
|
-
pointerEvents:
|
|
226
|
+
pointerEvents: "".concat(this.state.disable || !activeEvents ? 'none' : 'all'),
|
|
226
227
|
height
|
|
227
228
|
},
|
|
228
229
|
draggable: "false"
|
|
@@ -263,7 +264,7 @@ class SliderContainer extends _react.PureComponent {
|
|
|
263
264
|
currentSlide: index === slideArray.length - 1 ? 0 : index === 0 ? 1 : index - 1,
|
|
264
265
|
onClick: this.handleLegend,
|
|
265
266
|
classes: classes,
|
|
266
|
-
key:
|
|
267
|
+
key: "legend-out-".concat(slide.id || slide.imgSrc)
|
|
267
268
|
})))), arrow && arrow.position === _constants.OUTSIDE && /*#__PURE__*/_react.default.createElement("div", {
|
|
268
269
|
className: _stylesModule.default.arrowContainer
|
|
269
270
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -42,11 +42,11 @@ class Slider extends _react.PureComponent {
|
|
|
42
42
|
classes: classes
|
|
43
43
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
44
|
style: {
|
|
45
|
-
transform:
|
|
46
|
-
width:
|
|
47
|
-
transition:
|
|
45
|
+
transform: "translate3d(".concat(transitionSlide, "px, 0px, 0px)"),
|
|
46
|
+
width: "".concat(containerWidth * slideArray.length, "px"),
|
|
47
|
+
transition: "".concat(shouldAnimate ? "transform ".concat(animationTime, "s linear 0s") : 'none')
|
|
48
48
|
},
|
|
49
|
-
className:
|
|
49
|
+
className: "".concat(_stylesModule.default.slideContainer),
|
|
50
50
|
draggable: "false"
|
|
51
51
|
}, slideArray.map((slide, _index) => /*#__PURE__*/_react.default.createElement(_Slide.default, {
|
|
52
52
|
animationTime: animationTime,
|
|
@@ -54,7 +54,7 @@ class Slider extends _react.PureComponent {
|
|
|
54
54
|
classes: classes,
|
|
55
55
|
currentSlide: index - 1,
|
|
56
56
|
imgSrc: slide.imgSrc,
|
|
57
|
-
key:
|
|
57
|
+
key: "slide-".concat(slide.id || slide.imgSrc),
|
|
58
58
|
onClick: slide.onClick,
|
|
59
59
|
position: _index - 1,
|
|
60
60
|
shouldAnimate: shouldAnimate,
|
|
@@ -64,7 +64,7 @@ class Slider extends _react.PureComponent {
|
|
|
64
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
65
|
className: _stylesModule.default.legend
|
|
66
66
|
}, slides.map((slide, itemIndex) => /*#__PURE__*/_react.default.createElement(_Legend.default, {
|
|
67
|
-
key:
|
|
67
|
+
key: "legend-in-".concat(slide.id || slide.imgSrc),
|
|
68
68
|
classes: classes,
|
|
69
69
|
currentSlide: index === slideArray.length - 1 ? 0 : index === 0 ? 1 : index - 1,
|
|
70
70
|
index: itemIndex,
|
|
@@ -22,6 +22,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
22
22
|
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; }
|
|
23
23
|
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); }
|
|
24
24
|
const UTCheckList = _ref => {
|
|
25
|
+
var _field$configuration;
|
|
25
26
|
let {
|
|
26
27
|
additionalInfo,
|
|
27
28
|
allChecked,
|
|
@@ -49,7 +50,7 @@ const UTCheckList = _ref => {
|
|
|
49
50
|
withCheckRow,
|
|
50
51
|
withUpperTitle
|
|
51
52
|
} = _ref;
|
|
52
|
-
const shouldShowUpperTitle = field
|
|
53
|
+
const shouldShowUpperTitle = (field === null || field === void 0 || (_field$configuration = field.configuration) === null || _field$configuration === void 0 ? void 0 : _field$configuration.ignore_title) && withUpperTitle;
|
|
53
54
|
const handleChange = id => {
|
|
54
55
|
const newValues = input.value.indexOf(id) === -1 ? [...input.value, id] : input.value.filter(elem => elem !== id);
|
|
55
56
|
input.onChange((0, _array.isEmpty)(newValues) ? null : newValues);
|
|
@@ -76,7 +77,7 @@ const UTCheckList = _ref => {
|
|
|
76
77
|
}, item[keyValue]));
|
|
77
78
|
};
|
|
78
79
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
-
className:
|
|
80
|
+
className: "".concat(_stylesModule.default.container, " ").concat(className)
|
|
80
81
|
}, shouldShowUpperTitle && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
81
82
|
className: classes.title
|
|
82
83
|
}, titleProps, {
|
|
@@ -102,12 +103,9 @@ const UTCheckList = _ref => {
|
|
|
102
103
|
CustomCheckedIcon: CustomCheckedIcon,
|
|
103
104
|
CustomUncheckedIcon: CustomUncheckedIcon
|
|
104
105
|
})), /*#__PURE__*/_react.default.createElement(_FormGroup.default, {
|
|
105
|
-
className:
|
|
106
|
+
className: "".concat(_stylesModule.default.rows, " ").concat(classes.rowContainerClassName)
|
|
106
107
|
}, list.map(item => /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
-
className:
|
|
108
|
-
${_stylesModule.default.row}
|
|
109
|
-
${withCheckRow && classes.checkRowContainer}
|
|
110
|
-
${!(0, _array.isEmpty)(input.value) && !!input.value.find(val => val === item[valueKey]) && classes.customRowRootChecked} `,
|
|
108
|
+
className: "\n ".concat(_stylesModule.default.row, "\n ").concat(withCheckRow && classes.checkRowContainer, "\n ").concat(!(0, _array.isEmpty)(input.value) && !!input.value.find(val => val === item[valueKey]) && classes.customRowRootChecked, " "),
|
|
111
109
|
key: item[valueKey]
|
|
112
110
|
}, withCheckRow && label([valueKey, labelKey], item), /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, {
|
|
113
111
|
disabled: disabled || item.disabled,
|
|
@@ -44,6 +44,7 @@ const retrieveMuiTheme = theme => (0, _styles.createTheme)({
|
|
|
44
44
|
});
|
|
45
45
|
exports.retrieveMuiTheme = retrieveMuiTheme;
|
|
46
46
|
const retrieveStyle = _ref => {
|
|
47
|
+
var _theme$UTCheckList, _theme$UTCheckList2;
|
|
47
48
|
let {
|
|
48
49
|
theme
|
|
49
50
|
} = _ref;
|
|
@@ -68,7 +69,7 @@ const retrieveStyle = _ref => {
|
|
|
68
69
|
},
|
|
69
70
|
headerItem: {
|
|
70
71
|
marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'customCheckRow', 'headerItem', 'marginRight'], '60px'),
|
|
71
|
-
fontSize: (0, _classesUtils.withImportant)(theme
|
|
72
|
+
fontSize: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTCheckList = theme.UTCheckList) === null || _theme$UTCheckList === void 0 || (_theme$UTCheckList = _theme$UTCheckList.customCheckRow) === null || _theme$UTCheckList === void 0 || (_theme$UTCheckList = _theme$UTCheckList.headerItem) === null || _theme$UTCheckList === void 0 ? void 0 : _theme$UTCheckList.fontSize) || 14)
|
|
72
73
|
},
|
|
73
74
|
checkRowContainer: {
|
|
74
75
|
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'customCheckRow', 'container', 'alignItems']),
|
|
@@ -83,7 +84,7 @@ const retrieveStyle = _ref => {
|
|
|
83
84
|
},
|
|
84
85
|
rowItem: {
|
|
85
86
|
display: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'customCheckRow', 'rowItem', 'display']),
|
|
86
|
-
fontSize: (0, _classesUtils.withImportant)(theme
|
|
87
|
+
fontSize: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTCheckList2 = theme.UTCheckList) === null || _theme$UTCheckList2 === void 0 || (_theme$UTCheckList2 = _theme$UTCheckList2.customCheckRow) === null || _theme$UTCheckList2 === void 0 || (_theme$UTCheckList2 = _theme$UTCheckList2.rowItem) === null || _theme$UTCheckList2 === void 0 ? void 0 : _theme$UTCheckList2.fontSize) || 12),
|
|
87
88
|
justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'customCheckRow', 'rowItem', 'justifyContent']),
|
|
88
89
|
width: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'customCheckRow', 'rowItem', 'width'])
|
|
89
90
|
}
|
|
@@ -62,11 +62,11 @@ const UTCheckbox = _ref => {
|
|
|
62
62
|
const [checkedRef, setChecked] = (0, _energyHooks.useMutableState)(value);
|
|
63
63
|
const handleChange = event => {
|
|
64
64
|
if (onChange) onChange(value);
|
|
65
|
-
if (input
|
|
65
|
+
if (input !== null && input !== void 0 && input.onChange) input.onChange(event.target.checked);
|
|
66
66
|
};
|
|
67
67
|
(0, _react.useEffect)(() => {
|
|
68
|
-
setChecked(value || input
|
|
69
|
-
}, [input
|
|
68
|
+
setChecked(value || (input === null || input === void 0 ? void 0 : input.value));
|
|
69
|
+
}, [input === null || input === void 0 ? void 0 : input.value, value]);
|
|
70
70
|
const classes = (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_FormControlLabel.default, {
|
|
72
72
|
disabled: disabled,
|
|
@@ -87,7 +87,7 @@ const UTCheckbox = _ref => {
|
|
|
87
87
|
}),
|
|
88
88
|
checked: checkedRef.current || false,
|
|
89
89
|
onChange: handleChange,
|
|
90
|
-
value: input
|
|
90
|
+
value: (input === null || input === void 0 ? void 0 : input.value) || value,
|
|
91
91
|
color: color,
|
|
92
92
|
disableRipple: disableRipple,
|
|
93
93
|
disabled: disabled
|
|
@@ -21,17 +21,17 @@ const ConsumptionBarIndicator = _ref => {
|
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
22
|
className: _stylesModule.default.indicator,
|
|
23
23
|
style: {
|
|
24
|
-
left:
|
|
24
|
+
left: "".concat(left, "%")
|
|
25
25
|
}
|
|
26
26
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
-
className:
|
|
27
|
+
className: "".concat(_stylesModule.default.indicatorMarker, " ").concat(classes === null || classes === void 0 ? void 0 : classes.indicatorMarker)
|
|
28
28
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: "".concat(_stylesModule.default.indicatorText, " ").concat(classes === null || classes === void 0 ? void 0 : classes.indicatorText)
|
|
30
30
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
31
31
|
className: _stylesModule.default.alignCenter,
|
|
32
32
|
colorTheme: "information",
|
|
33
33
|
weight: "bold"
|
|
34
|
-
},
|
|
34
|
+
}, "".concat(Math.round(value), " ").concat(unit)), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
35
35
|
className: _stylesModule.default.lightGray,
|
|
36
36
|
colorTheme: "gray",
|
|
37
37
|
weight: "bold"
|
|
@@ -19,10 +19,10 @@ const ConsumptionBarIndicatorTop = _ref => {
|
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
20
|
className: _stylesModule.default.indicator,
|
|
21
21
|
style: {
|
|
22
|
-
left:
|
|
22
|
+
left: "".concat(left, "%")
|
|
23
23
|
}
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
className:
|
|
25
|
+
className: "".concat(_stylesModule.default.indicatorText, " ").concat(classes === null || classes === void 0 ? void 0 : classes.indicatorText)
|
|
26
26
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
27
27
|
className: _stylesModule.default.alignCenter,
|
|
28
28
|
colorTheme: "information",
|