@widergy/energy-ui 3.68.2 → 3.68.3
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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.68.3](https://github.com/widergy/energy-ui/compare/v3.68.2...v3.68.3) (2025-04-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* [UGC-1266] backdrop resolve css fixes ([#596](https://github.com/widergy/energy-ui/issues/596)) ([e0ff417](https://github.com/widergy/energy-ui/commit/e0ff417df199f70533c213eb39e999c104b30ebf))
|
|
7
|
+
|
|
1
8
|
## [3.68.2](https://github.com/widergy/energy-ui/compare/v3.68.1...v3.68.2) (2025-04-03)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
7
8
|
var _shadowUtils = require("../../utils/shadowUtils");
|
|
8
9
|
const retrieveStyle = _ref => {
|
|
9
10
|
var _theme$Palette$shadow;
|
|
@@ -18,10 +19,7 @@ const retrieveStyle = _ref => {
|
|
|
18
19
|
level: 2
|
|
19
20
|
}),
|
|
20
21
|
'&::backdrop': {
|
|
21
|
-
|
|
22
|
-
// no hereda las variables seteadas en html/:root.
|
|
23
|
-
// backgroundColor: theme.Palette.dark['05']
|
|
24
|
-
backgroundColor: '#091E42',
|
|
22
|
+
backgroundColor: (0, _classesUtils.resolveCssValue)(theme.Palette.dark['05']),
|
|
25
23
|
opacity: '0.25'
|
|
26
24
|
}
|
|
27
25
|
},
|
|
@@ -34,9 +34,10 @@ const {
|
|
|
34
34
|
} = _testIds.COMPONENT_IDS.panelIds;
|
|
35
35
|
const UTPanel = _ref => {
|
|
36
36
|
let {
|
|
37
|
+
BackdropProps = {},
|
|
37
38
|
children,
|
|
38
|
-
classNames,
|
|
39
39
|
classes: theme,
|
|
40
|
+
classNames,
|
|
40
41
|
closeButtonDataTestId = closeButtonId,
|
|
41
42
|
collapsableHeader = false,
|
|
42
43
|
currentStep = 1,
|
|
@@ -96,7 +97,14 @@ const UTPanel = _ref => {
|
|
|
96
97
|
onClose: onClose,
|
|
97
98
|
onOpen: onOpen,
|
|
98
99
|
open: open,
|
|
99
|
-
swipeAreaWidth: 0
|
|
100
|
+
swipeAreaWidth: 0,
|
|
101
|
+
BackdropProps: {
|
|
102
|
+
...BackdropProps,
|
|
103
|
+
classes: {
|
|
104
|
+
root: drawerClasses.backdrop,
|
|
105
|
+
...(BackdropProps === null || BackdropProps === void 0 ? void 0 : BackdropProps.classes)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
100
108
|
}, props), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
109
|
className: _stylesModule.default.controlAreaContainer
|
|
102
110
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -177,8 +185,9 @@ const UTPanel = _ref => {
|
|
|
177
185
|
}, mainButton), (mainButton === null || mainButton === void 0 ? void 0 : mainButton.text) || _constants.ACCEPT_BUTTON_TEXT));
|
|
178
186
|
};
|
|
179
187
|
UTPanel.propTypes = {
|
|
180
|
-
|
|
188
|
+
BackdropProps: _propTypes.object,
|
|
181
189
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
190
|
+
classNames: _propTypes.object,
|
|
182
191
|
closeButtonDataTestId: _propTypes.string,
|
|
183
192
|
collapsableHeader: _propTypes.bool,
|
|
184
193
|
currentStep: _propTypes.number,
|
|
@@ -15,6 +15,10 @@ const retrieveStyle = _ref => {
|
|
|
15
15
|
},
|
|
16
16
|
colorPrimary: {
|
|
17
17
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTPanel', 'progressBar', 'colorPrimary', 'backgroundColor'], "".concat(theme.Palette.light['04'], " !important"))
|
|
18
|
+
},
|
|
19
|
+
backdrop: {
|
|
20
|
+
backgroundColor: theme.Palette.dark['05'],
|
|
21
|
+
opacity: '0.25 !important'
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
24
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.withImportant = exports.mergeClasses = void 0;
|
|
6
|
+
exports.withImportant = exports.resolveCssValue = exports.mergeClasses = void 0;
|
|
7
7
|
const mergeClasses = (themeClasses, classNames) => {
|
|
8
8
|
if (!classNames) return themeClasses;
|
|
9
9
|
const classes = {};
|
|
@@ -15,4 +15,15 @@ const mergeClasses = (themeClasses, classNames) => {
|
|
|
15
15
|
};
|
|
16
16
|
exports.mergeClasses = mergeClasses;
|
|
17
17
|
const withImportant = style => style && "".concat(style, " !important");
|
|
18
|
-
exports.withImportant = withImportant;
|
|
18
|
+
exports.withImportant = withImportant;
|
|
19
|
+
const resolveCssValue = value => {
|
|
20
|
+
if (typeof value === 'string' && value.startsWith('var(')) {
|
|
21
|
+
const variableName = value.slice(4, -1).trim();
|
|
22
|
+
if (typeof window !== 'undefined' && window.getComputedStyle) {
|
|
23
|
+
const computedValue = window.getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();
|
|
24
|
+
return computedValue || value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
};
|
|
29
|
+
exports.resolveCssValue = resolveCssValue;
|