@widergy/energy-ui 3.22.3 → 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 +7 -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/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/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
|
@@ -94,7 +94,8 @@ const addVirtualizedElements = (data, virtualizedData, startIndex, endIndex, row
|
|
|
94
94
|
};
|
|
95
95
|
exports.addVirtualizedElements = addVirtualizedElements;
|
|
96
96
|
const updateLedger = (ledgerRef, setLedgerRef) => (key, height) => {
|
|
97
|
-
|
|
97
|
+
var _ledgerRef$current;
|
|
98
|
+
const currentHeight = (_ledgerRef$current = ledgerRef.current) === null || _ledgerRef$current === void 0 || (_ledgerRef$current = _ledgerRef$current[key]) === null || _ledgerRef$current === void 0 ? void 0 : _ledgerRef$current.height;
|
|
98
99
|
if (currentHeight !== height) {
|
|
99
100
|
const newLedger = {
|
|
100
101
|
...ledgerRef.current,
|
|
@@ -109,7 +110,7 @@ const updateLedger = (ledgerRef, setLedgerRef) => (key, height) => {
|
|
|
109
110
|
newLedger[currentKey].height = height;
|
|
110
111
|
}
|
|
111
112
|
if (index) {
|
|
112
|
-
accumulator += newLedger[
|
|
113
|
+
accumulator += newLedger["".concat(_constants.KEY).concat(index - 1)].height;
|
|
113
114
|
}
|
|
114
115
|
newLedger[currentKey] = {
|
|
115
116
|
...newLedger[currentKey],
|
|
@@ -40,7 +40,7 @@ const UTVirtualizedList = _ref => {
|
|
|
40
40
|
setReRender(!reRender);
|
|
41
41
|
}, [...reRenderOnChange]);
|
|
42
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(_stylesModule.default.container, " ").concat(className),
|
|
44
44
|
ref: listViewportRef
|
|
45
45
|
}, /*#__PURE__*/_react.default.createElement(_UTLoading.default, {
|
|
46
46
|
loading: loading
|
|
@@ -35,7 +35,7 @@ const UTWizard = _ref => {
|
|
|
35
35
|
const [isOpen, setIsOpen] = (0, _react.useState)(openByDefault);
|
|
36
36
|
const stepEnabled = !!(enabled && title && description);
|
|
37
37
|
return stepEnabled && (isOpen ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: "".concat(classes.container, " ").concat(_stylesModule.default.container)
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
40
|
className: _stylesModule.default.content
|
|
41
41
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -67,11 +67,11 @@ const UTWizard = _ref => {
|
|
|
67
67
|
colorTheme: (0, _utils.getButtonTheme)(variant),
|
|
68
68
|
weight: "medium"
|
|
69
69
|
}, _constants.DISABLE_TEXT)))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(classes.buttonContainer, " ").concat(_stylesModule.default.buttonContainer)
|
|
71
71
|
}, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
72
72
|
size: "small",
|
|
73
73
|
classNames: {
|
|
74
|
-
root:
|
|
74
|
+
root: "".concat(_stylesModule.default.button, " ").concat(classes.buttonStyle)
|
|
75
75
|
},
|
|
76
76
|
onClick: () => setIsOpen(true),
|
|
77
77
|
colorTheme: (0, _utils.getButtonMinimizedTheme)(variant),
|
|
@@ -27,10 +27,10 @@ const retrieveStyle = _ref2 => {
|
|
|
27
27
|
})
|
|
28
28
|
},
|
|
29
29
|
buttonStyle: {
|
|
30
|
-
backgroundColor:
|
|
30
|
+
backgroundColor: "".concat(getBackgroundColor({
|
|
31
31
|
theme,
|
|
32
32
|
variant: variantTheme
|
|
33
|
-
})
|
|
33
|
+
}), " !important")
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
};
|
|
@@ -14,6 +14,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
14
14
|
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; }
|
|
15
15
|
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); }
|
|
16
16
|
const ActionButton = _ref => {
|
|
17
|
+
var _button$buttonProps;
|
|
17
18
|
let {
|
|
18
19
|
button,
|
|
19
20
|
className,
|
|
@@ -22,18 +23,14 @@ const ActionButton = _ref => {
|
|
|
22
23
|
buttonProps
|
|
23
24
|
} = _ref;
|
|
24
25
|
return /*#__PURE__*/(0, _react.isValidElement)(button) ? (/*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
25
|
-
className:
|
|
26
|
+
className: "".concat(button.props.className, " ").concat(isHidden && _stylesModule.default.hiddenButton)
|
|
26
27
|
})) : /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
27
28
|
disabled: button.disabled,
|
|
28
29
|
hideTextOnResponsive: true,
|
|
29
30
|
onClick: button.onClick
|
|
30
31
|
}, buttonProps, button.buttonProps, {
|
|
31
32
|
classNames: {
|
|
32
|
-
root:
|
|
33
|
-
${className}
|
|
34
|
-
${isHidden && _stylesModule.default.hiddenButton}
|
|
35
|
-
${button?.buttonProps?.className}
|
|
36
|
-
`,
|
|
33
|
+
root: "\n ".concat(className, "\n ").concat(isHidden && _stylesModule.default.hiddenButton, "\n ").concat(button === null || button === void 0 || (_button$buttonProps = button.buttonProps) === null || _button$buttonProps === void 0 ? void 0 : _button$buttonProps.className, "\n "),
|
|
37
34
|
...buttonProps.classNames
|
|
38
35
|
}
|
|
39
36
|
}), children);
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
|
-
var _ArrowBack = _interopRequireDefault(require("@material-ui/icons/ArrowBack"));
|
|
10
|
-
var _ArrowForward = _interopRequireDefault(require("@material-ui/icons/ArrowForward"));
|
|
11
9
|
var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
12
10
|
var _UTProgressBar = _interopRequireDefault(require("../../../UTProgressBar"));
|
|
13
11
|
var _WithTheme = _interopRequireDefault(require("../../../WithTheme"));
|
|
@@ -46,8 +44,8 @@ const UTWorkflowContainer = _ref => {
|
|
|
46
44
|
} = _ref;
|
|
47
45
|
(0, _react.useEffect)(() => () => onExit && onExit(), []);
|
|
48
46
|
const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(themeClasses, classNames), [classNames]);
|
|
49
|
-
const BackIcon = backButton.Icon ||
|
|
50
|
-
const NextIcon = nextButton.Icon ||
|
|
47
|
+
const BackIcon = backButton.Icon || 'IconArrowLeft';
|
|
48
|
+
const NextIcon = nextButton.Icon || 'IconArrowRight';
|
|
51
49
|
const previousStepNumber = (0, _usePrevious.usePrevious)(currentStep);
|
|
52
50
|
const [visibleStepNumber, setVisibleStepNumber] = (0, _react.useState)(currentStep);
|
|
53
51
|
const skippedStepsQuantity = currentStep - visibleStepNumber;
|
|
@@ -66,16 +64,13 @@ const UTWorkflowContainer = _ref => {
|
|
|
66
64
|
barColorPrimary: classes.barColorPrimary
|
|
67
65
|
}
|
|
68
66
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
-
className:
|
|
67
|
+
className: "".concat(classes.workflowContainer, " ").concat(_stylesModule.default.workflowContainer)
|
|
70
68
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
-
className:
|
|
72
|
-
${_stylesModule.default.actionsContainer}
|
|
73
|
-
${classes.actionsContainer}
|
|
74
|
-
${hideActions ? _stylesModule.default.hidden : ''}`
|
|
69
|
+
className: "\n ".concat(_stylesModule.default.actionsContainer, "\n ").concat(classes.actionsContainer, "\n ").concat(hideActions ? _stylesModule.default.hidden : '')
|
|
75
70
|
}, /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
|
|
76
71
|
button: backButton,
|
|
77
72
|
isHidden: currentStep === 1 && !backButton.isVisible || backButton.isHidden,
|
|
78
|
-
className:
|
|
73
|
+
className: "".concat(classes.backButton, " ").concat(_stylesModule.default.backButton),
|
|
79
74
|
buttonProps: {
|
|
80
75
|
colorTheme: 'primary',
|
|
81
76
|
Icon: (withIcon || smallButtons) && BackIcon,
|
|
@@ -83,19 +78,19 @@ const UTWorkflowContainer = _ref => {
|
|
|
83
78
|
variant: 'semitransparent'
|
|
84
79
|
}
|
|
85
80
|
}, !smallButtons && (backButton.label || _constants.BACK)), !hideStepCounter && visibleStepNumber && (StepCounter ? /*#__PURE__*/_react.default.createElement(StepCounter, null) : /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
86
|
-
className:
|
|
81
|
+
className: "".concat(_stylesModule.default.stepInfo, " ").concat(classes.stepCounter),
|
|
87
82
|
weight: "medium"
|
|
88
|
-
},
|
|
83
|
+
}, "".concat(_constants.STEP, " ").concat(forceStepNumber ? currentStep : visibleStepNumber))), extraActions, /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
|
|
89
84
|
isHidden: nextButton.isHidden,
|
|
90
85
|
button: nextButton,
|
|
91
|
-
className:
|
|
86
|
+
className: "".concat(classes.nextButton, " ").concat(_stylesModule.default.nextButton),
|
|
92
87
|
buttonProps: {
|
|
93
88
|
colorTheme: 'primary',
|
|
94
89
|
Icon: (withIcon || smallButtons) && NextIcon,
|
|
95
90
|
iconPlacement: 'right'
|
|
96
91
|
}
|
|
97
92
|
}, !smallButtons && (nextButton.label || _constants.NEXT))), /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
-
className:
|
|
93
|
+
className: "".concat(_stylesModule.default.workflowContent, " ").concat(classes.content)
|
|
99
94
|
}, (title || subtitle) && /*#__PURE__*/_react.default.createElement("div", {
|
|
100
95
|
className: classes.titles
|
|
101
96
|
}, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -9,6 +9,7 @@ var _colorsModule = _interopRequireDefault(require("../../../../scss/variables/c
|
|
|
9
9
|
var _classesUtils = require("../../../../utils/classesUtils");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const retrieveStyle = _ref => {
|
|
12
|
+
var _theme$UTWorkflowCont, _theme$UTWorkflowCont2, _theme$UTWorkflowCont3;
|
|
12
13
|
let {
|
|
13
14
|
theme
|
|
14
15
|
} = _ref;
|
|
@@ -20,7 +21,7 @@ const retrieveStyle = _ref => {
|
|
|
20
21
|
border: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'border'], 0),
|
|
21
22
|
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'borderRadius'], '4px'),
|
|
22
23
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'backgroundColor'], _colorsModule.default.cardBackground),
|
|
23
|
-
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'boxShadow'],
|
|
24
|
+
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'boxShadow'], "1px 1px 3px 0 ".concat(_colorsModule.default.cardShadow1, ", -0.5px -0.5px 2px 0 ").concat(_colorsModule.default.cardShadow2)),
|
|
24
25
|
boxSizing: 'border-box',
|
|
25
26
|
display: 'flex',
|
|
26
27
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'container', 'margin']),
|
|
@@ -78,13 +79,13 @@ const retrieveStyle = _ref => {
|
|
|
78
79
|
backButton: {
|
|
79
80
|
minWidth: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'backButton', 'minWidth']),
|
|
80
81
|
[tabletMobile]: {
|
|
81
|
-
minWidth: (0, _classesUtils.withImportant)(theme
|
|
82
|
+
minWidth: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTWorkflowCont = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont === void 0 || (_theme$UTWorkflowCont = _theme$UTWorkflowCont.backButton) === null || _theme$UTWorkflowCont === void 0 || (_theme$UTWorkflowCont = _theme$UTWorkflowCont.tabletMobile) === null || _theme$UTWorkflowCont === void 0 ? void 0 : _theme$UTWorkflowCont.minWidth) || '1px')
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
nextButton: {
|
|
85
86
|
minWidth: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'backButton', 'minWidth']),
|
|
86
87
|
[tabletMobile]: {
|
|
87
|
-
minWidth: (0, _classesUtils.withImportant)(theme
|
|
88
|
+
minWidth: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTWorkflowCont2 = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont2 === void 0 || (_theme$UTWorkflowCont2 = _theme$UTWorkflowCont2.nextButton) === null || _theme$UTWorkflowCont2 === void 0 || (_theme$UTWorkflowCont2 = _theme$UTWorkflowCont2.tabletMobile) === null || _theme$UTWorkflowCont2 === void 0 ? void 0 : _theme$UTWorkflowCont2.minWidth) || '1px')
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
titleIcon: {
|
|
@@ -110,7 +111,7 @@ const retrieveStyle = _ref => {
|
|
|
110
111
|
justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'bottomActions', 'container', 'justifyContent']),
|
|
111
112
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'bottomActions', 'container', 'padding'], '0'),
|
|
112
113
|
minHeight: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'bottomActions', 'container', 'minHeight'], '90px'),
|
|
113
|
-
padding: (0, _classesUtils.withImportant)(theme
|
|
114
|
+
padding: (0, _classesUtils.withImportant)((theme === null || theme === void 0 || (_theme$UTWorkflowCont3 = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont3 === void 0 || (_theme$UTWorkflowCont3 = _theme$UTWorkflowCont3.bottomActions) === null || _theme$UTWorkflowCont3 === void 0 || (_theme$UTWorkflowCont3 = _theme$UTWorkflowCont3.container) === null || _theme$UTWorkflowCont3 === void 0 ? void 0 : _theme$UTWorkflowCont3.padding) || 0)
|
|
114
115
|
},
|
|
115
116
|
workflowContainer: {
|
|
116
117
|
padding: (0, _seamlessImmutable.getIn)(theme, ['UTWorkflowContainer', 'workflowContainer', 'padding']),
|
|
@@ -32,21 +32,21 @@ const NavActions = _ref => {
|
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
33
|
className: _stylesModule.default.actionsContainer
|
|
34
34
|
}, (!isMobileOrTablet || !isBackButtonHidden) && /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
-
className:
|
|
35
|
+
className: "".concat(_stylesModule.default.actionsGroup, " ").concat(!isBackButtonHidden && _stylesModule.default.actionsGroupResponsive)
|
|
36
36
|
}, !isBackButtonHidden && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
37
37
|
classNames: {
|
|
38
|
-
root:
|
|
38
|
+
root: "".concat(_stylesModule.default.navAction, " ").concat(backButton.classes, " ").concat(forceResponsive && _stylesModule.default.navActionResponsive)
|
|
39
39
|
},
|
|
40
40
|
colorTheme: "secondary",
|
|
41
41
|
disabled: backButton.disabled,
|
|
42
|
-
Icon: backButton
|
|
42
|
+
Icon: backButton === null || backButton === void 0 ? void 0 : backButton.Icon,
|
|
43
43
|
iconPlacement: "left",
|
|
44
44
|
onClick: backButton.onClick,
|
|
45
45
|
size: "large",
|
|
46
46
|
variant: "text"
|
|
47
47
|
}, backButton.label || _constants.BACK), secondaryAction && !isMobileOrTablet && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
48
48
|
classNames: {
|
|
49
|
-
root:
|
|
49
|
+
root: "".concat(_stylesModule.default.navAction, " ").concat(forceResponsive && _stylesModule.default.navActionResponsive)
|
|
50
50
|
},
|
|
51
51
|
colorTheme: secondaryAction.colorTheme || 'primary',
|
|
52
52
|
disabled: secondaryAction.disabled,
|
|
@@ -57,10 +57,10 @@ const NavActions = _ref => {
|
|
|
57
57
|
}, secondaryAction.label), checkbox && !isMobileOrTablet && /*#__PURE__*/_react.default.createElement("div", {
|
|
58
58
|
className: _stylesModule.default.checkboxContainer
|
|
59
59
|
}, /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, checkbox))), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
-
className:
|
|
60
|
+
className: "".concat(_stylesModule.default.actionsGroup, " ").concat((isMobileOrTablet || forceResponsive) && _stylesModule.default.actionsGroupResponsive)
|
|
61
61
|
}, primaryAction && !isMobileOrTablet && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
62
62
|
classNames: {
|
|
63
|
-
root:
|
|
63
|
+
root: "".concat(_stylesModule.default.navAction, " ").concat(forceResponsive && _stylesModule.default.navActionResponsive)
|
|
64
64
|
},
|
|
65
65
|
colorTheme: primaryAction.colorTheme || 'primary',
|
|
66
66
|
disabled: primaryAction.disabled,
|
|
@@ -70,11 +70,11 @@ const NavActions = _ref => {
|
|
|
70
70
|
variant: primaryAction.variant || 'semitransparent'
|
|
71
71
|
}, primaryAction.label), !nextButton.isHidden && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
72
72
|
classNames: {
|
|
73
|
-
root:
|
|
73
|
+
root: "".concat(_stylesModule.default.navAction, " ").concat(nextButton.classes, " ").concat(forceResponsive && _stylesModule.default.navActionResponsive)
|
|
74
74
|
},
|
|
75
75
|
colorTheme: "primary",
|
|
76
76
|
disabled: nextButton.disabled,
|
|
77
|
-
Icon: nextButton
|
|
77
|
+
Icon: nextButton === null || nextButton === void 0 ? void 0 : nextButton.Icon,
|
|
78
78
|
iconPlacement: "right",
|
|
79
79
|
onClick: nextButton.onClick,
|
|
80
80
|
size: "large"
|
|
@@ -56,12 +56,12 @@ const UTWorkflowContainer = _ref => {
|
|
|
56
56
|
const {
|
|
57
57
|
isMobileOrTablet
|
|
58
58
|
} = (0, _useScreenSize.useScreenSize)();
|
|
59
|
-
const isBackButtonHidden = backButton
|
|
60
|
-
const isNextButtonHidden = nextButton
|
|
59
|
+
const isBackButtonHidden = backButton === null || backButton === void 0 ? void 0 : backButton.isHidden;
|
|
60
|
+
const isNextButtonHidden = nextButton === null || nextButton === void 0 ? void 0 : nextButton.isHidden;
|
|
61
61
|
const isLastStep = stepsCount && stepsCount === currentStep;
|
|
62
62
|
const isNavHidden = isLastStep && isBackButtonHidden && isNextButtonHidden;
|
|
63
63
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
-
className:
|
|
64
|
+
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
className: _stylesModule.default.content
|
|
67
67
|
}, stages && /*#__PURE__*/_react.default.createElement(_UTStepper.default, {
|
|
@@ -73,7 +73,7 @@ const UTWorkflowContainer = _ref => {
|
|
|
73
73
|
actions: [...(headerActions || []), ...(isMobileOrTablet ? [primaryAction, secondaryAction].filter(action => action) : [])],
|
|
74
74
|
banner: title && banner,
|
|
75
75
|
classNames: {
|
|
76
|
-
outerContainer:
|
|
76
|
+
outerContainer: "".concat(_stylesModule.default.headerContainer, " ").concat(classes.headerContainer),
|
|
77
77
|
titles: classes.titles
|
|
78
78
|
},
|
|
79
79
|
helpText: title && helpText,
|
|
@@ -83,13 +83,13 @@ const UTWorkflowContainer = _ref => {
|
|
|
83
83
|
tagline: title && tagline,
|
|
84
84
|
title
|
|
85
85
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
-
className:
|
|
86
|
+
className: "".concat(_stylesModule.default.childrenContainer, " ").concat(classes.childrenContainer, " ").concat(variant === _constants.VARIANTS.FULL_WIDTH && "".concat(_stylesModule.default.childrenContainerFullWidth, " ").concat(classes.childrenContainerFullWidth))
|
|
87
87
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
-
className:
|
|
88
|
+
className: "".concat(_constants.childrenContentStyle[variant] || _stylesModule.default.childrenContent, " ").concat(classes.childrenContent)
|
|
89
89
|
}, children))), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
90
|
className: _stylesModule.default.footer
|
|
91
91
|
}, /*#__PURE__*/_react.default.createElement(_UTWizard.default, wizardConfig), !isNavHidden && /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
-
className:
|
|
92
|
+
className: "".concat(classes.bottomNav, " ").concat(_stylesModule.default.bottomNav)
|
|
93
93
|
}, checkbox && isMobileOrTablet && /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: _stylesModule.default.mobileCheckboxContainer
|
|
95
95
|
}, /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, checkbox)), stepsCount && /*#__PURE__*/_react.default.createElement(_UTProgressBar.default, {
|
|
@@ -6,28 +6,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _shadowUtils = require("../../../../utils/shadowUtils");
|
|
8
8
|
const retrieveStyle = _ref => {
|
|
9
|
+
var _theme$UTWorkflowCont, _theme$Palette$shadow, _theme$Palette, _theme$UTWorkflowCont2, _theme$UTWorkflowCont3, _theme$Palette2, _theme$Palette3;
|
|
9
10
|
let {
|
|
10
11
|
theme
|
|
11
12
|
} = _ref;
|
|
12
13
|
return {
|
|
13
14
|
container: {
|
|
14
|
-
backgroundColor: theme.UTWorkflowContainer
|
|
15
|
+
backgroundColor: (_theme$UTWorkflowCont = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont === void 0 || (_theme$UTWorkflowCont = _theme$UTWorkflowCont.container) === null || _theme$UTWorkflowCont === void 0 ? void 0 : _theme$UTWorkflowCont.backgroundColor,
|
|
15
16
|
boxShadow: (0, _shadowUtils.getShadow)({
|
|
16
|
-
color: theme.Palette.shadows
|
|
17
|
+
color: (_theme$Palette$shadow = theme.Palette.shadows) === null || _theme$Palette$shadow === void 0 ? void 0 : _theme$Palette$shadow.grayscale,
|
|
17
18
|
level: 2
|
|
18
19
|
})
|
|
19
20
|
},
|
|
20
21
|
bottomNav: {
|
|
21
|
-
backgroundColor: theme.Palette
|
|
22
|
+
backgroundColor: (_theme$Palette = theme.Palette) === null || _theme$Palette === void 0 ? void 0 : _theme$Palette.light['01']
|
|
22
23
|
},
|
|
23
24
|
barColorPrimary: {
|
|
24
|
-
backgroundColor: theme.UTWorkflowContainer
|
|
25
|
+
backgroundColor: (_theme$UTWorkflowCont2 = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont2 === void 0 || (_theme$UTWorkflowCont2 = _theme$UTWorkflowCont2.progress) === null || _theme$UTWorkflowCont2 === void 0 ? void 0 : _theme$UTWorkflowCont2.backgroundColor
|
|
25
26
|
},
|
|
26
27
|
colorPrimary: {
|
|
27
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: "".concat(((_theme$UTWorkflowCont3 = theme.UTWorkflowContainer) === null || _theme$UTWorkflowCont3 === void 0 || (_theme$UTWorkflowCont3 = _theme$UTWorkflowCont3.progress) === null || _theme$UTWorkflowCont3 === void 0 ? void 0 : _theme$UTWorkflowCont3.color) || ((_theme$Palette2 = theme.Palette) === null || _theme$Palette2 === void 0 ? void 0 : _theme$Palette2.light['04']), " !important")
|
|
28
29
|
},
|
|
29
30
|
childrenContainerFullWidth: {
|
|
30
|
-
borderTop:
|
|
31
|
+
borderTop: "1px solid ".concat((_theme$Palette3 = theme.Palette) === null || _theme$Palette3 === void 0 ? void 0 : _theme$Palette3.light['04'])
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
};
|
|
@@ -18,10 +18,10 @@ const WithGoogleMapScript = () => WrappedComponent => {
|
|
|
18
18
|
...props
|
|
19
19
|
} = _ref;
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
21
|
-
googleMapURL:
|
|
21
|
+
googleMapURL: "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&key=".concat(apiKey),
|
|
22
22
|
loadingElement: /*#__PURE__*/_react.default.createElement("div", {
|
|
23
23
|
style: {
|
|
24
|
-
height:
|
|
24
|
+
height: "100%"
|
|
25
25
|
}
|
|
26
26
|
})
|
|
27
27
|
}, props));
|
|
@@ -15,7 +15,7 @@ const WithTouch = onClick => WrappedComponent => props => {
|
|
|
15
15
|
onClick: handleClick
|
|
16
16
|
// eslint-disable-next-line react/prop-types
|
|
17
17
|
,
|
|
18
|
-
className:
|
|
18
|
+
className: "".concat(_stylesModule.default.base, " ").concat(props.touchableClassName)
|
|
19
19
|
// eslint-disable-next-line react/prop-types
|
|
20
20
|
,
|
|
21
21
|
ref: props.touchableRef
|
|
@@ -9,10 +9,10 @@ const mergeClasses = (themeClasses, classNames) => {
|
|
|
9
9
|
const classes = {};
|
|
10
10
|
const allClassNames = [...Object.keys(classNames), ...Object.keys(themeClasses)];
|
|
11
11
|
allClassNames.forEach(name => {
|
|
12
|
-
classes[name] =
|
|
12
|
+
classes[name] = "".concat(themeClasses[name] || '', " ").concat(classNames[name] || '').trim();
|
|
13
13
|
});
|
|
14
14
|
return classes;
|
|
15
15
|
};
|
|
16
16
|
exports.mergeClasses = mergeClasses;
|
|
17
|
-
const withImportant = style => style &&
|
|
17
|
+
const withImportant = style => style && "".concat(style, " !important");
|
|
18
18
|
exports.withImportant = withImportant;
|
|
@@ -10,13 +10,13 @@ const Z_CHAR_CODE = 90;
|
|
|
10
10
|
const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
11
11
|
exports.capitalize = capitalize;
|
|
12
12
|
const getAvatarColors = (userName, colors) => {
|
|
13
|
-
const hashIndex = userName
|
|
13
|
+
const hashIndex = (userName === null || userName === void 0 ? void 0 : userName.split('').reduce((acum, _letter, index) => {
|
|
14
14
|
const letterCode = userName.toUpperCase().charCodeAt(index);
|
|
15
15
|
return letterCode >= A_CHAR_CODE && letterCode <= Z_CHAR_CODE ? acum + letterCode - A_CHAR_CODE + 1 : acum;
|
|
16
|
-
}, 0) || 0;
|
|
16
|
+
}, 0)) || 0;
|
|
17
17
|
return colors[hashIndex % colors.length];
|
|
18
18
|
};
|
|
19
|
-
const getFirstLetter = userName => userName
|
|
19
|
+
const getFirstLetter = userName => (userName === null || userName === void 0 ? void 0 : userName.trim().slice(0, 1).toUpperCase()) || 'A';
|
|
20
20
|
const isUTIcon = icon => typeof icon === 'string';
|
|
21
21
|
exports.isUTIcon = isUTIcon;
|
|
22
22
|
const getDefaultColorShade = colorTheme => colorTheme === _Palette.COLOR_THEMES.gray ? _Palette.COLOR_SHADES.shade04 : colorTheme === _Palette.COLOR_THEMES.light ? _Palette.COLOR_SHADES.shade01 : _Palette.COLOR_SHADES.shade05;
|
|
@@ -37,6 +37,6 @@ const getShadow = _ref => {
|
|
|
37
37
|
const shadowLevel = levels[level] || levels[defaultLevel];
|
|
38
38
|
const shadowOrientation = orientations[orientation] || orientations[defaultOrientation];
|
|
39
39
|
const shadowOrientationLevel = shadowOrientation[level] || shadowOrientation[defaultLevel];
|
|
40
|
-
return
|
|
40
|
+
return "0 ".concat(shadowOrientationLevel, "px ").concat(shadowLevel, "px 0 ").concat(color);
|
|
41
41
|
};
|
|
42
42
|
exports.getShadow = getShadow;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widergy/energy-ui",
|
|
3
|
-
"version": "3.22.
|
|
3
|
+
"version": "3.22.4",
|
|
4
4
|
"description": "Widergy Web Components",
|
|
5
5
|
"author": "widergy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
"extends": "@widergy/semantic-release-package-config"
|
|
92
92
|
},
|
|
93
93
|
"resolutions": {
|
|
94
|
-
"@babel/preset-env": "^7.8.7"
|
|
94
|
+
"@babel/preset-env": "^7.8.7",
|
|
95
|
+
"caniuse-lite": "1.0.30001632"
|
|
95
96
|
},
|
|
96
97
|
"browserslist": [
|
|
97
98
|
">0.2%",
|