@widergy/energy-ui 3.34.0 → 3.36.0
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 +23 -0
- package/dist/components/UTCBUInput/index.js +2 -1
- package/dist/components/UTHeader/styles.module.scss +5 -3
- package/dist/components/UTPanel/versions/V1/README.md +1 -1
- package/dist/components/UTPanel/versions/V1/components/DataItem/index.js +6 -4
- package/dist/components/UTPanel/versions/V1/index.js +1 -1
- package/dist/components/UTPanel/versions/V1/styles.module.scss +1 -1
- package/dist/components/UTWorkflowContainer/versions/V1/README.md +2 -1
- package/dist/components/UTWorkflowContainer/versions/V1/components/NavActions/index.js +3 -1
- package/dist/components/UTWorkflowContainer/versions/V1/constants.js +5 -8
- package/dist/components/UTWorkflowContainer/versions/V1/index.js +3 -2
- package/dist/components/UTWorkflowContainer/versions/V1/styles.module.scss +10 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# [3.36.0](https://github.com/widergy/energy-ui/compare/v3.35.0...v3.36.0) (2024-10-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [UG-2149] new workflow design ([#517](https://github.com/widergy/energy-ui/issues/517)) ([f3309ed](https://github.com/widergy/energy-ui/commit/f3309ed72d5dc9bbbaf0ad76cee34a919f0b1c0e))
|
|
7
|
+
|
|
8
|
+
# [3.35.0](https://github.com/widergy/energy-ui/compare/v3.34.0...v3.35.0) (2024-10-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* minor fix ([e193933](https://github.com/widergy/energy-ui/commit/e19393395060092d49c3cc2c72b699b6ba9d0c25))
|
|
14
|
+
* revert .json version change ([5084680](https://github.com/widergy/energy-ui/commit/508468005f4de5a8ed6d7b6d4d313db565eb2088))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* added cbuinput field readonly handling ([3bb18fc](https://github.com/widergy/energy-ui/commit/3bb18fcde326983adde99c6f18e91528dafe2e52))
|
|
20
|
+
* added custom value renderer to data item ([86686e0](https://github.com/widergy/energy-ui/commit/86686e0f4e8150178ccf0c4ade0e43fcbeca0099))
|
|
21
|
+
* panel adjustments ([668ec07](https://github.com/widergy/energy-ui/commit/668ec07ea2b4bf8f1b5e2f75f97f94c3dc046d4b))
|
|
22
|
+
* workflow features ([260bf87](https://github.com/widergy/energy-ui/commit/260bf876b95486a86dafb66dfe5b5a35176aa838))
|
|
23
|
+
|
|
1
24
|
# [3.34.0](https://github.com/widergy/energy-ui/compare/v3.33.1...v3.34.0) (2024-10-21)
|
|
2
25
|
|
|
3
26
|
|
|
@@ -66,7 +66,8 @@ const UTCBUInput = _ref => {
|
|
|
66
66
|
inputObjectKey: cbuNumberKey,
|
|
67
67
|
label: title,
|
|
68
68
|
meta: meta,
|
|
69
|
-
placeholder: placeholder
|
|
69
|
+
placeholder: placeholder,
|
|
70
|
+
disabled: field === null || field === void 0 ? void 0 : field.read_only
|
|
70
71
|
});
|
|
71
72
|
};
|
|
72
73
|
UTCBUInput.propTypes = {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@import '../../scss/variables/mediaQueries.module.scss';
|
|
2
2
|
|
|
3
|
+
$header-workflow-max-width: 966px;
|
|
4
|
+
|
|
3
5
|
.actionsContainer {
|
|
4
6
|
align-items: flex-start;
|
|
5
7
|
display: flex;
|
|
@@ -11,7 +13,7 @@
|
|
|
11
13
|
flex-direction: column;
|
|
12
14
|
justify-content: space-between;
|
|
13
15
|
margin: 0 auto;
|
|
14
|
-
max-width:
|
|
16
|
+
max-width: $header-workflow-max-width;
|
|
15
17
|
padding: 24px 32px 32px;
|
|
16
18
|
|
|
17
19
|
@media #{$tablet-mobile} {
|
|
@@ -38,8 +40,6 @@
|
|
|
38
40
|
.bannerContainer {
|
|
39
41
|
border-radius: 8px;
|
|
40
42
|
margin-bottom: 0;
|
|
41
|
-
max-width: calc(800px - 32px);
|
|
42
|
-
width: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.stepTitle {
|
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
.titleAndActionsContainer {
|
|
55
55
|
align-items: flex-start;
|
|
56
56
|
display: flex;
|
|
57
|
+
flex-wrap: wrap;
|
|
57
58
|
grid-gap: 16px;
|
|
59
|
+
word-break: break-word;
|
|
58
60
|
justify-content: space-between;
|
|
59
61
|
margin-bottom: 12px;
|
|
60
62
|
}
|
|
@@ -9,7 +9,7 @@ Component used for displaying a side panel.
|
|
|
9
9
|
| children | node | | Component content |
|
|
10
10
|
| classes | object | | Classes returned by UTPanel own[theme](./theme.js#L40) `retrieveStyle` and classes received from props. |
|
|
11
11
|
| classNames | object | | Overrides the default panel theme. |
|
|
12
|
-
| collapsableHeader | bool |
|
|
12
|
+
| collapsableHeader | bool | false | Indicates if "header items" section is collapsible. |
|
|
13
13
|
| currentStep | number | 1 | Workflow step number used to show the current progress in the UTProgressBar |
|
|
14
14
|
| disableScrollbar | bool | false | Render the children without scrollbar |
|
|
15
15
|
| HeaderComponent | node | | Custom header to render. |
|
|
@@ -13,10 +13,11 @@ var _constants = require("./constants");
|
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
const DataItem = _ref => {
|
|
15
15
|
let {
|
|
16
|
+
icon,
|
|
16
17
|
size = 'M',
|
|
18
|
+
title,
|
|
17
19
|
value,
|
|
18
|
-
|
|
19
|
-
title
|
|
20
|
+
valueRenderComponent
|
|
20
21
|
} = _ref;
|
|
21
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
23
|
className: "".concat(_stylesModule.default.container, " ").concat(_stylesModule.default[_constants.SIZES[size]])
|
|
@@ -29,12 +30,13 @@ const DataItem = _ref => {
|
|
|
29
30
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
30
31
|
colorTheme: "gray",
|
|
31
32
|
weight: "medium"
|
|
32
|
-
}, title), /*#__PURE__*/_react.default.createElement(_UTLabel.default, null, value)));
|
|
33
|
+
}, title), valueRenderComponent ? valueRenderComponent() : /*#__PURE__*/_react.default.createElement(_UTLabel.default, null, value)));
|
|
33
34
|
};
|
|
34
35
|
DataItem.propTypes = {
|
|
35
36
|
icon: _propTypes.string,
|
|
36
37
|
size: _propTypes.string,
|
|
37
38
|
title: _propTypes.string,
|
|
38
|
-
value: _propTypes.string
|
|
39
|
+
value: _propTypes.string,
|
|
40
|
+
valueRenderComponent: _propTypes.func
|
|
39
41
|
};
|
|
40
42
|
var _default = exports.default = DataItem;
|
|
@@ -30,6 +30,7 @@ This component serves as a wrapper for each step of a workflow
|
|
|
30
30
|
| tagline | string | | Text that will be rendered in uppercase on top of the title. |
|
|
31
31
|
| title | string | | Text that will be rendered between the stages and the content. It is required in order to show any other text header elements. |
|
|
32
32
|
| TitleIcon | element | | Icon that will be rendered on top of the title. |
|
|
33
|
+
| variant | string | 'default' | Defines which variant to show. There are two options:`default` or `fullWidth`. |
|
|
33
34
|
| withIcon | bool | false | Defines whether the nextButton and backButton will aditionally have their own icons inside. |
|
|
34
35
|
| withStepperPadding | bool | true | If false, the stepper indicator will occupy the full width of the container, rendering the first and last stage's label aligned towards the center. |
|
|
35
36
|
|
|
@@ -41,4 +42,4 @@ This component serves as a wrapper for each step of a workflow
|
|
|
41
42
|
| bannerType | `{ Icon: element, text: string }` |
|
|
42
43
|
| checkboxType | objectOf( UTCheckbox props ) |
|
|
43
44
|
| headerActionType | `{ label: string, onClick: func, main: bool, Icon: element }` |
|
|
44
|
-
| stageType | arrayOf( `{ id: number, label: string, Icon: element }` ) |
|
|
45
|
+
| stageType | arrayOf( `{ id: number, label: string, Icon: element }` ) |
|
|
@@ -19,6 +19,7 @@ const NavActions = _ref => {
|
|
|
19
19
|
let {
|
|
20
20
|
backButton = {},
|
|
21
21
|
checkbox,
|
|
22
|
+
classes,
|
|
22
23
|
currentStep,
|
|
23
24
|
forceResponsive,
|
|
24
25
|
nextButton = {},
|
|
@@ -30,7 +31,7 @@ const NavActions = _ref => {
|
|
|
30
31
|
} = (0, _useScreenSize.useScreenSize)();
|
|
31
32
|
const isBackButtonHidden = currentStep === 1 && !backButton.isVisible || backButton.isHidden;
|
|
32
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
-
className: _stylesModule.default.actionsContainer
|
|
34
|
+
className: "".concat(_stylesModule.default.actionsContainer, " ").concat(classes.actionsContainer)
|
|
34
35
|
}, (!isMobileOrTablet || !isBackButtonHidden) && /*#__PURE__*/_react.default.createElement("div", {
|
|
35
36
|
className: "".concat(_stylesModule.default.actionsGroup, " ").concat(!isBackButtonHidden && _stylesModule.default.actionsGroupResponsive)
|
|
36
37
|
}, !isBackButtonHidden && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
@@ -85,6 +86,7 @@ NavActions.propTypes = {
|
|
|
85
86
|
checkbox: (0, _propTypes.shape)({
|
|
86
87
|
text: _propTypes.string
|
|
87
88
|
}),
|
|
89
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
88
90
|
currentStep: _propTypes.number,
|
|
89
91
|
forceResponsive: _propTypes.bool,
|
|
90
92
|
nextButton: _types.buttonTypes,
|
|
@@ -6,16 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.childrenContentStyle = exports.VARIANTS = void 0;
|
|
7
7
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const CENTERED = 'centered';
|
|
10
|
-
const FULL_WIDTH = 'fullWidth';
|
|
11
9
|
const DEFAULT = 'default';
|
|
10
|
+
const FULL_WIDTH = 'fullWidth';
|
|
12
11
|
const VARIANTS = exports.VARIANTS = {
|
|
13
|
-
|
|
14
|
-
FULL_WIDTH
|
|
15
|
-
DEFAULT
|
|
12
|
+
DEFAULT,
|
|
13
|
+
FULL_WIDTH
|
|
16
14
|
};
|
|
17
15
|
const childrenContentStyle = exports.childrenContentStyle = {
|
|
18
|
-
[VARIANTS.
|
|
19
|
-
[VARIANTS.FULL_WIDTH]: _stylesModule.default.childrenContentFullWidth
|
|
20
|
-
[VARIANTS.DEFAULT]: _stylesModule.default.childrenContent
|
|
16
|
+
[VARIANTS.DEFAULT]: _stylesModule.default.childrenContent,
|
|
17
|
+
[VARIANTS.FULL_WIDTH]: _stylesModule.default.childrenContentFullWidth
|
|
21
18
|
};
|
|
@@ -59,7 +59,7 @@ const UTWorkflowContainer = _ref => {
|
|
|
59
59
|
const isBackButtonHidden = backButton === null || backButton === void 0 ? void 0 : backButton.isHidden;
|
|
60
60
|
const isNextButtonHidden = nextButton === null || nextButton === void 0 ? void 0 : nextButton.isHidden;
|
|
61
61
|
const isLastStep = stepsCount && stepsCount === currentStep;
|
|
62
|
-
const isNavHidden = isLastStep && isBackButtonHidden && isNextButtonHidden;
|
|
62
|
+
const isNavHidden = !!isLastStep && isBackButtonHidden && isNextButtonHidden;
|
|
63
63
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
64
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -92,7 +92,7 @@ const UTWorkflowContainer = _ref => {
|
|
|
92
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
|
-
}, /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, checkbox)), stepsCount && /*#__PURE__*/_react.default.createElement(_UTProgressBar.default, {
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, checkbox)), !!stepsCount && /*#__PURE__*/_react.default.createElement(_UTProgressBar.default, {
|
|
96
96
|
classNames: {
|
|
97
97
|
barColorPrimary: classes.barColorPrimary,
|
|
98
98
|
colorPrimary: classes.colorPrimary,
|
|
@@ -104,6 +104,7 @@ const UTWorkflowContainer = _ref => {
|
|
|
104
104
|
}), /*#__PURE__*/_react.default.createElement(_NavActions.default, {
|
|
105
105
|
backButton: backButton,
|
|
106
106
|
checkbox: checkbox,
|
|
107
|
+
classes: classes,
|
|
107
108
|
currentStep: currentStep,
|
|
108
109
|
forceResponsive: forceResponsive,
|
|
109
110
|
nextButton: nextButton,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@import '../../../../scss/variables/colors.module.scss';
|
|
2
2
|
@import '../../../../scss/variables/mediaQueries.module.scss';
|
|
3
3
|
|
|
4
|
+
$default-variant-max-width: 966px;
|
|
5
|
+
|
|
4
6
|
.container {
|
|
5
7
|
align-items: center;
|
|
6
8
|
border-radius: 4px;
|
|
@@ -41,8 +43,8 @@
|
|
|
41
43
|
.childrenContainer {
|
|
42
44
|
flex: 1;
|
|
43
45
|
margin: 0 auto;
|
|
44
|
-
max-width:
|
|
45
|
-
padding: 0 32px
|
|
46
|
+
max-width: $default-variant-max-width;
|
|
47
|
+
padding: 0 32px 32px;
|
|
46
48
|
width: calc(100% - 64px);
|
|
47
49
|
|
|
48
50
|
@media #{$tablet-mobile} {
|
|
@@ -52,26 +54,18 @@
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
.childrenContent {
|
|
55
|
-
max-width: 800px;
|
|
56
|
-
|
|
57
|
-
@media #{$tablet-mobile} {
|
|
58
|
-
margin: 0 auto;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.childrenContentCentered {
|
|
63
|
-
align-items: center;
|
|
64
|
-
display: flex;
|
|
65
|
-
height: 100%;
|
|
66
|
-
justify-content: center;
|
|
67
57
|
margin: 0 auto;
|
|
68
|
-
max-width:
|
|
58
|
+
max-width: 100%;
|
|
69
59
|
}
|
|
70
60
|
|
|
71
61
|
.childrenContainerFullWidth {
|
|
72
62
|
max-width: none;
|
|
73
|
-
padding: 24px 32px
|
|
63
|
+
padding: 24px 32px 32px;
|
|
74
64
|
width: calc(100% - 64px);
|
|
65
|
+
|
|
66
|
+
@media #{$tablet-mobile} {
|
|
67
|
+
padding: 24px 16px 16px !important;
|
|
68
|
+
}
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
.childrenContentFullWidth {
|