@widergy/energy-ui 1.127.0 → 1.128.2
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 +21 -0
- package/dist/components/UTDialog/index.js +3 -1
- package/dist/components/UTSwitch/theme.js +3 -0
- package/dist/components/UTTextArea/index.js +18 -17
- package/dist/components/UTTextArea/styles.module.scss +1 -1
- package/dist/components/UTTextArea/theme.js +31 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [1.128.2](https://github.com/widergy/energy-ui/compare/v1.128.1...v1.128.2) (2022-08-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* textarea theme ([#304](https://github.com/widergy/energy-ui/issues/304)) ([4ecf578](https://github.com/widergy/energy-ui/commit/4ecf578cd102f5da5b72cb122d96fb18cef50990))
|
|
7
|
+
|
|
8
|
+
## [1.128.1](https://github.com/widergy/energy-ui/compare/v1.128.0...v1.128.1) (2022-08-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add UTSwitch slider hover background color handler ([#303](https://github.com/widergy/energy-ui/issues/303)) ([9d624e7](https://github.com/widergy/energy-ui/commit/9d624e793b7a68b5036cf9eb3d11da29848414d3))
|
|
14
|
+
|
|
15
|
+
# [1.128.0](https://github.com/widergy/energy-ui/compare/v1.127.0...v1.128.0) (2022-07-07)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* added utdialog footer components ([#301](https://github.com/widergy/energy-ui/issues/301)) ([12f1eb8](https://github.com/widergy/energy-ui/commit/12f1eb817a1b42a2b0d89ceaf1f3b61f2d8cecd6))
|
|
21
|
+
|
|
1
22
|
# [1.127.0](https://github.com/widergy/energy-ui/compare/v1.126.0...v1.127.0) (2022-06-22)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -53,6 +53,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
53
53
|
disableScrollLock = _ref.disableScrollLock,
|
|
54
54
|
disableTypography = _ref.disableTypography,
|
|
55
55
|
elevation = _ref.elevation,
|
|
56
|
+
FooterComponents = _ref.FooterComponents,
|
|
56
57
|
_ref$isOpen = _ref.isOpen,
|
|
57
58
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
58
59
|
onRequestClose = _ref.onRequestClose,
|
|
@@ -106,7 +107,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
106
107
|
className: "".concat(classes.warning, " ").concat(warning)
|
|
107
108
|
}), warningAlert), (cancelButton || acceptButton) && /*#__PURE__*/_react.default.createElement(_DialogActions.default, {
|
|
108
109
|
className: "".concat(classes.dialogActions, " ").concat(dialogActions)
|
|
109
|
-
}, cancelButton && /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
|
|
110
|
+
}, FooterComponents, cancelButton && /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
|
|
110
111
|
ButtonComponent: ButtonComponent,
|
|
111
112
|
button: cancelButton,
|
|
112
113
|
className: classes.cancelButton,
|
|
@@ -140,6 +141,7 @@ UTDialog.propTypes = {
|
|
|
140
141
|
disableScrollLock: _propTypes.bool,
|
|
141
142
|
disableTypography: _propTypes.bool,
|
|
142
143
|
elevation: _propTypes.number,
|
|
144
|
+
FooterComponents: _propTypes.elementType,
|
|
143
145
|
isOpen: _propTypes.bool,
|
|
144
146
|
onRequestClose: _propTypes.func,
|
|
145
147
|
roundedCloseButton: _propTypes.bool,
|
|
@@ -31,6 +31,9 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
31
31
|
'&:hover > $sliderContainer > $sliderHover': {
|
|
32
32
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'hover', 'backgroundColor'], _colors.default.switchHover)
|
|
33
33
|
},
|
|
34
|
+
'&:hover > $sliderContainer > $slider': {
|
|
35
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'hover', 'backgroundColor'], (0, _seamlessImmutable.getIn)(['UTSwitch', 'slider', 'backgroundColor'], _colors.default.switchGrayHover))
|
|
36
|
+
},
|
|
34
37
|
'&:Active > $sliderContainer > $sliderHover': {
|
|
35
38
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'active', 'backgroundColor'], _colors.default.switchActive)
|
|
36
39
|
}
|
|
@@ -28,21 +28,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
30
|
function UTTextArea(_ref) {
|
|
31
|
-
var
|
|
32
|
-
onBlur = _ref.onBlur,
|
|
33
|
-
onFocus = _ref.onFocus,
|
|
34
|
-
value = _ref.value,
|
|
35
|
-
classes = _ref.classes,
|
|
31
|
+
var classes = _ref.classes,
|
|
36
32
|
_ref$classNames = _ref.classNames,
|
|
37
33
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
38
34
|
disabled = _ref.disabled,
|
|
35
|
+
HelpIcon = _ref.HelpIcon,
|
|
36
|
+
_ref$inputProps = _ref.inputProps,
|
|
37
|
+
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
38
|
+
onBlur = _ref.onBlur,
|
|
39
|
+
onChange = _ref.onChange,
|
|
40
|
+
onFocus = _ref.onFocus,
|
|
39
41
|
placeholder = _ref.placeholder,
|
|
40
42
|
_ref$title = _ref.title,
|
|
41
43
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
42
44
|
tooltip = _ref.tooltip,
|
|
43
|
-
|
|
44
|
-
_ref$inputProps = _ref.inputProps,
|
|
45
|
-
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps;
|
|
45
|
+
value = _ref.value;
|
|
46
46
|
var container = classNames.container,
|
|
47
47
|
icon = classNames.icon,
|
|
48
48
|
textarea = classNames.textarea,
|
|
@@ -69,22 +69,23 @@ function UTTextArea(_ref) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
UTTextArea.propTypes = {
|
|
72
|
-
|
|
73
|
-
onChange: _propTypes.func,
|
|
74
|
-
onBlur: _propTypes.func,
|
|
75
|
-
onFocus: _propTypes.func,
|
|
76
|
-
value: _propTypes.string,
|
|
77
|
-
disabled: _propTypes.bool,
|
|
78
|
-
placeholder: _propTypes.string,
|
|
72
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
79
73
|
classNames: (0, _propTypes.shape)({
|
|
80
74
|
container: _propTypes.string,
|
|
81
75
|
icon: _propTypes.string,
|
|
76
|
+
label: _propTypes.string,
|
|
82
77
|
textarea: _propTypes.string
|
|
83
78
|
}),
|
|
84
|
-
|
|
79
|
+
disabled: _propTypes.bool,
|
|
80
|
+
HelpIcon: _propTypes.elementType,
|
|
81
|
+
inputProps: _formTypes.inputPropTypes,
|
|
82
|
+
onBlur: _propTypes.func,
|
|
83
|
+
onChange: _propTypes.func,
|
|
84
|
+
onFocus: _propTypes.func,
|
|
85
|
+
placeholder: _propTypes.string,
|
|
85
86
|
title: _propTypes.string,
|
|
86
87
|
tooltip: _propTypes.string,
|
|
87
|
-
|
|
88
|
+
value: _propTypes.string
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTTextArea);
|
|
@@ -5,16 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
|
|
8
|
+
var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
8
12
|
var retrieveStyle = function retrieveStyle(theme) {
|
|
9
|
-
var _theme$UTTextArea, _theme$UTTextArea$tex, _theme$UTTextArea2, _theme$UTTextArea2$te, _theme$UTTextArea3, _theme$UTTextArea3$
|
|
13
|
+
var _theme$UTTextArea, _theme$UTTextArea$tex, _theme$UTTextArea2, _theme$UTTextArea2$te, _theme$UTTextArea3, _theme$UTTextArea3$te, _theme$UTTextArea4, _theme$UTTextArea4$te, _theme$Fonts, _theme$UTTextArea5, _theme$UTTextArea5$te, _theme$Fonts2, _theme$UTTextArea6, _theme$UTTextArea6$te, _theme$UTTextArea7, _theme$UTTextArea7$te, _theme$UTTextArea8, _theme$UTTextArea8$te, _theme$UTTextArea9, _theme$UTTextArea9$te, _theme$UTTextArea10, _theme$UTTextArea10$t, _theme$UTTextArea10$t2, _theme$UTTextArea11, _theme$UTTextArea11$t, _theme$UTTextArea11$t2, _theme$UTTextArea12, _theme$UTTextArea12$t, _theme$UTTextArea12$t2, _theme$UTTextArea13, _theme$UTTextArea13$t, _theme$UTTextArea13$t2, _theme$UTTextArea14, _theme$UTTextArea14$t, _theme$UTTextArea14$t2, _theme$UTTextArea15, _theme$UTTextArea15$t, _theme$UTTextArea15$t2, _theme$UTTextArea16, _theme$UTTextArea16$t, _theme$UTTextArea16$t2, _theme$UTTextArea17, _theme$UTTextArea17$t, _theme$UTTextArea17$t2, _theme$UTTextArea18, _theme$UTTextArea18$t, _theme$UTTextArea18$t2, _theme$UTTextArea19, _theme$UTTextArea19$t, _theme$UTTextArea19$t2, _theme$UTTextArea20, _theme$UTTextArea20$i;
|
|
10
14
|
|
|
11
15
|
return {
|
|
12
16
|
textarea: {
|
|
13
17
|
background: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea = theme.UTTextArea) === null || _theme$UTTextArea === void 0 ? void 0 : (_theme$UTTextArea$tex = _theme$UTTextArea.textarea) === null || _theme$UTTextArea$tex === void 0 ? void 0 : _theme$UTTextArea$tex.background,
|
|
14
|
-
|
|
18
|
+
border: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea2 = theme.UTTextArea) === null || _theme$UTTextArea2 === void 0 ? void 0 : (_theme$UTTextArea2$te = _theme$UTTextArea2.textarea) === null || _theme$UTTextArea2$te === void 0 ? void 0 : _theme$UTTextArea2$te.border,
|
|
19
|
+
borderRadius: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea3 = theme.UTTextArea) === null || _theme$UTTextArea3 === void 0 ? void 0 : (_theme$UTTextArea3$te = _theme$UTTextArea3.textarea) === null || _theme$UTTextArea3$te === void 0 ? void 0 : _theme$UTTextArea3$te.borderRadius,
|
|
20
|
+
color: (theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea4 = theme.UTTextArea) === null || _theme$UTTextArea4 === void 0 ? void 0 : (_theme$UTTextArea4$te = _theme$UTTextArea4.textarea) === null || _theme$UTTextArea4$te === void 0 ? void 0 : _theme$UTTextArea4$te.color) || _colors.default.black,
|
|
21
|
+
fontFamily: theme === null || theme === void 0 ? void 0 : (_theme$Fonts = theme.Fonts) === null || _theme$Fonts === void 0 ? void 0 : _theme$Fonts.fontFamily,
|
|
22
|
+
fontSize: (theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea5 = theme.UTTextArea) === null || _theme$UTTextArea5 === void 0 ? void 0 : (_theme$UTTextArea5$te = _theme$UTTextArea5.textarea) === null || _theme$UTTextArea5$te === void 0 ? void 0 : _theme$UTTextArea5$te.fontSize) || (theme === null || theme === void 0 ? void 0 : (_theme$Fonts2 = theme.Fonts) === null || _theme$Fonts2 === void 0 ? void 0 : _theme$Fonts2.medium) || 14,
|
|
23
|
+
fontWeight: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea6 = theme.UTTextArea) === null || _theme$UTTextArea6 === void 0 ? void 0 : (_theme$UTTextArea6$te = _theme$UTTextArea6.textarea) === null || _theme$UTTextArea6$te === void 0 ? void 0 : _theme$UTTextArea6$te.fontWeight,
|
|
24
|
+
height: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea7 = theme.UTTextArea) === null || _theme$UTTextArea7 === void 0 ? void 0 : (_theme$UTTextArea7$te = _theme$UTTextArea7.textarea) === null || _theme$UTTextArea7$te === void 0 ? void 0 : _theme$UTTextArea7$te.height,
|
|
25
|
+
padding: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea8 = theme.UTTextArea) === null || _theme$UTTextArea8 === void 0 ? void 0 : (_theme$UTTextArea8$te = _theme$UTTextArea8.textarea) === null || _theme$UTTextArea8$te === void 0 ? void 0 : _theme$UTTextArea8$te.padding,
|
|
26
|
+
resize: (theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea9 = theme.UTTextArea) === null || _theme$UTTextArea9 === void 0 ? void 0 : (_theme$UTTextArea9$te = _theme$UTTextArea9.textarea) === null || _theme$UTTextArea9$te === void 0 ? void 0 : _theme$UTTextArea9$te.resize) || 'vertical',
|
|
27
|
+
'&:hover': {
|
|
28
|
+
background: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea10 = theme.UTTextArea) === null || _theme$UTTextArea10 === void 0 ? void 0 : (_theme$UTTextArea10$t = _theme$UTTextArea10.textarea) === null || _theme$UTTextArea10$t === void 0 ? void 0 : (_theme$UTTextArea10$t2 = _theme$UTTextArea10$t.hover) === null || _theme$UTTextArea10$t2 === void 0 ? void 0 : _theme$UTTextArea10$t2.background,
|
|
29
|
+
border: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea11 = theme.UTTextArea) === null || _theme$UTTextArea11 === void 0 ? void 0 : (_theme$UTTextArea11$t = _theme$UTTextArea11.textarea) === null || _theme$UTTextArea11$t === void 0 ? void 0 : (_theme$UTTextArea11$t2 = _theme$UTTextArea11$t.hover) === null || _theme$UTTextArea11$t2 === void 0 ? void 0 : _theme$UTTextArea11$t2.border,
|
|
30
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea12 = theme.UTTextArea) === null || _theme$UTTextArea12 === void 0 ? void 0 : (_theme$UTTextArea12$t = _theme$UTTextArea12.textarea) === null || _theme$UTTextArea12$t === void 0 ? void 0 : (_theme$UTTextArea12$t2 = _theme$UTTextArea12$t.hover) === null || _theme$UTTextArea12$t2 === void 0 ? void 0 : _theme$UTTextArea12$t2.color
|
|
31
|
+
},
|
|
32
|
+
'&:focus, &focus-visible': {
|
|
33
|
+
background: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea13 = theme.UTTextArea) === null || _theme$UTTextArea13 === void 0 ? void 0 : (_theme$UTTextArea13$t = _theme$UTTextArea13.textarea) === null || _theme$UTTextArea13$t === void 0 ? void 0 : (_theme$UTTextArea13$t2 = _theme$UTTextArea13$t.focus) === null || _theme$UTTextArea13$t2 === void 0 ? void 0 : _theme$UTTextArea13$t2.background,
|
|
34
|
+
border: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea14 = theme.UTTextArea) === null || _theme$UTTextArea14 === void 0 ? void 0 : (_theme$UTTextArea14$t = _theme$UTTextArea14.textarea) === null || _theme$UTTextArea14$t === void 0 ? void 0 : (_theme$UTTextArea14$t2 = _theme$UTTextArea14$t.focus) === null || _theme$UTTextArea14$t2 === void 0 ? void 0 : _theme$UTTextArea14$t2.border,
|
|
35
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea15 = theme.UTTextArea) === null || _theme$UTTextArea15 === void 0 ? void 0 : (_theme$UTTextArea15$t = _theme$UTTextArea15.textarea) === null || _theme$UTTextArea15$t === void 0 ? void 0 : (_theme$UTTextArea15$t2 = _theme$UTTextArea15$t.focus) === null || _theme$UTTextArea15$t2 === void 0 ? void 0 : _theme$UTTextArea15$t2.color,
|
|
36
|
+
outline: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea16 = theme.UTTextArea) === null || _theme$UTTextArea16 === void 0 ? void 0 : (_theme$UTTextArea16$t = _theme$UTTextArea16.textarea) === null || _theme$UTTextArea16$t === void 0 ? void 0 : (_theme$UTTextArea16$t2 = _theme$UTTextArea16$t.focus) === null || _theme$UTTextArea16$t2 === void 0 ? void 0 : _theme$UTTextArea16$t2.outline
|
|
37
|
+
},
|
|
38
|
+
'&:disabled': {
|
|
39
|
+
background: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea17 = theme.UTTextArea) === null || _theme$UTTextArea17 === void 0 ? void 0 : (_theme$UTTextArea17$t = _theme$UTTextArea17.textarea) === null || _theme$UTTextArea17$t === void 0 ? void 0 : (_theme$UTTextArea17$t2 = _theme$UTTextArea17$t.disabled) === null || _theme$UTTextArea17$t2 === void 0 ? void 0 : _theme$UTTextArea17$t2.background,
|
|
40
|
+
border: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea18 = theme.UTTextArea) === null || _theme$UTTextArea18 === void 0 ? void 0 : (_theme$UTTextArea18$t = _theme$UTTextArea18.textarea) === null || _theme$UTTextArea18$t === void 0 ? void 0 : (_theme$UTTextArea18$t2 = _theme$UTTextArea18$t.disabled) === null || _theme$UTTextArea18$t2 === void 0 ? void 0 : _theme$UTTextArea18$t2.border,
|
|
41
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea19 = theme.UTTextArea) === null || _theme$UTTextArea19 === void 0 ? void 0 : (_theme$UTTextArea19$t = _theme$UTTextArea19.textarea) === null || _theme$UTTextArea19$t === void 0 ? void 0 : (_theme$UTTextArea19$t2 = _theme$UTTextArea19$t.disabled) === null || _theme$UTTextArea19$t2 === void 0 ? void 0 : _theme$UTTextArea19$t2.color
|
|
42
|
+
}
|
|
15
43
|
},
|
|
16
44
|
icon: {
|
|
17
|
-
color: theme === null || theme === void 0 ? void 0 : (_theme$
|
|
45
|
+
color: theme === null || theme === void 0 ? void 0 : (_theme$UTTextArea20 = theme.UTTextArea) === null || _theme$UTTextArea20 === void 0 ? void 0 : (_theme$UTTextArea20$i = _theme$UTTextArea20.icon) === null || _theme$UTTextArea20$i === void 0 ? void 0 : _theme$UTTextArea20$i.color
|
|
18
46
|
}
|
|
19
47
|
};
|
|
20
48
|
};
|