@occmundial/occ-atomic 1.22.1 → 1.23.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 +14 -0
- package/build/Footer/Footer.js +14 -10
- package/build/Icon/Icon.js +8 -3
- package/build/Modal/Modal.js +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# [1.23.0](https://github.com/occmundial/occ-atomic/compare/v1.22.2...v1.23.0) (2022-12-05)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* Add bottomItem children to footer ([6dc470d](https://github.com/occmundial/occ-atomic/commit/6dc470d4f06357bbd3602335ee46f39f0cbc9df7))
|
7
|
+
|
8
|
+
## [1.22.2](https://github.com/occmundial/occ-atomic/compare/v1.22.1...v1.22.2) (2022-11-15)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Moves testid to icon component ([09170b8](https://github.com/occmundial/occ-atomic/commit/09170b83c864a054da1e385077e3945b96573ef8))
|
14
|
+
|
1
15
|
## [1.22.1](https://github.com/occmundial/occ-atomic/compare/v1.22.0...v1.22.1) (2022-11-10)
|
2
16
|
|
3
17
|
|
package/build/Footer/Footer.js
CHANGED
@@ -41,6 +41,7 @@ var Footer = function Footer(_ref) {
|
|
41
41
|
bottomLinks = _ref.bottomLinks,
|
42
42
|
copyText = _ref.copyText,
|
43
43
|
aux = _ref.aux,
|
44
|
+
bottomItem = _ref.bottomItem,
|
44
45
|
listClassName = _ref.listClassName;
|
45
46
|
var text = aux.text,
|
46
47
|
icon = aux.icon,
|
@@ -79,7 +80,15 @@ var Footer = function Footer(_ref) {
|
|
79
80
|
direction: isMobile ? 'col' : 'row'
|
80
81
|
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
81
82
|
flex: "1"
|
82
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
83
|
+
}, aux && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
84
|
+
href: href,
|
85
|
+
target: target,
|
86
|
+
icon: icon,
|
87
|
+
iconRight: iconRight,
|
88
|
+
size: "md",
|
89
|
+
theme: "ghostPink",
|
90
|
+
className: "".concat(isMobile ? classes.buttonMobile : '', " ").concat(auxClassName)
|
91
|
+
}, text), /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
83
92
|
small: true,
|
84
93
|
mid: true,
|
85
94
|
bottomTiny: true,
|
@@ -102,15 +111,7 @@ var Footer = function Footer(_ref) {
|
|
102
111
|
})), copyText && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
103
112
|
small: true,
|
104
113
|
mid: true
|
105
|
-
}, copyText)),
|
106
|
-
href: href,
|
107
|
-
target: target,
|
108
|
-
icon: icon,
|
109
|
-
iconRight: iconRight,
|
110
|
-
size: "md",
|
111
|
-
theme: "ghostPink",
|
112
|
-
className: "".concat(isMobile ? classes.buttonMobile : '', " ").concat(auxClassName)
|
113
|
-
}, text))))));
|
114
|
+
}, copyText)), bottomItem)))));
|
114
115
|
};
|
115
116
|
|
116
117
|
var columnPropTypes = _propTypes["default"].arrayOf(_propTypes["default"].arrayOf(_propTypes["default"].shape({
|
@@ -158,6 +159,9 @@ Footer.propTypes = {
|
|
158
159
|
iconRight: _propTypes["default"].string
|
159
160
|
}),
|
160
161
|
|
162
|
+
/** Custom component to render on the bottom right, at the end of the footer */
|
163
|
+
bottomItem: _propTypes["default"].node,
|
164
|
+
|
161
165
|
/** Footer list className. */
|
162
166
|
listClassName: _propTypes["default"].string
|
163
167
|
};
|
package/build/Icon/Icon.js
CHANGED
@@ -55,7 +55,8 @@ var Icon = /*#__PURE__*/function (_React$Component) {
|
|
55
55
|
id = _this$props.id,
|
56
56
|
ariaLabel = _this$props.ariaLabel,
|
57
57
|
onClick = _this$props.onClick,
|
58
|
-
alt = _this$props.alt
|
58
|
+
alt = _this$props.alt,
|
59
|
+
testId = _this$props.testId;
|
59
60
|
var IconType = onClick ? 'button' : 'span';
|
60
61
|
return /*#__PURE__*/_react["default"].createElement(IconType, {
|
61
62
|
id: id,
|
@@ -63,7 +64,8 @@ var Icon = /*#__PURE__*/function (_React$Component) {
|
|
63
64
|
"aria-label": ariaLabel,
|
64
65
|
style: style,
|
65
66
|
onClick: onClick,
|
66
|
-
alt: alt
|
67
|
+
alt: alt,
|
68
|
+
"data-testid": testId
|
67
69
|
});
|
68
70
|
}
|
69
71
|
}]);
|
@@ -106,7 +108,10 @@ Icon.propTypes = {
|
|
106
108
|
id: _propTypes["default"].string,
|
107
109
|
ariaLabel: _propTypes["default"].string,
|
108
110
|
className: _propTypes["default"].string,
|
109
|
-
style: _propTypes["default"].object
|
111
|
+
style: _propTypes["default"].object,
|
112
|
+
|
113
|
+
/** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
|
114
|
+
testId: _propTypes["default"].string
|
110
115
|
};
|
111
116
|
var _default = Icon;
|
112
117
|
exports["default"] = _default;
|
package/build/Modal/Modal.js
CHANGED
@@ -123,17 +123,17 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
123
123
|
fullSize = _this$props.fullSize,
|
124
124
|
testId = _this$props.testId;
|
125
125
|
|
126
|
-
var closeButton = /*#__PURE__*/_react["default"].createElement("div",
|
126
|
+
var closeButton = /*#__PURE__*/_react["default"].createElement("div", {
|
127
127
|
className: classes.closeIcon
|
128
|
-
},
|
129
|
-
'data-testid': "".concat(testId, "__container-close-icon")
|
130
|
-
}), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], _extends({
|
131
129
|
iconName: "close",
|
132
130
|
width: 24,
|
133
131
|
height: 24,
|
134
132
|
colors: [_colors["default"].grey900],
|
135
133
|
onClick: onClose
|
136
|
-
}
|
134
|
+
}, testId && {
|
135
|
+
testId: "".concat(testId, "__close-icon")
|
136
|
+
})));
|
137
137
|
|
138
138
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
139
139
|
className: "".concat(classes.overlay, " ").concat(show ? classes.overlayShow : classes.overlayHide).concat(!onClose ? " ".concat(classes.noClose) : ''),
|
@@ -188,7 +188,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
188
188
|
disabled: secBtn.disabled,
|
189
189
|
id: secBtn.id
|
190
190
|
}, testId && {
|
191
|
-
|
191
|
+
testId: "".concat(testId, "__button_secondary")
|
192
192
|
}), secBtn.text), /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
193
193
|
className: classes.mainBtn,
|
194
194
|
onClick: mainBtn.onClick,
|
@@ -198,7 +198,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
198
198
|
disabled: mainBtn.disabled,
|
199
199
|
id: mainBtn.id
|
200
200
|
}, testId && {
|
201
|
-
|
201
|
+
testId: "".concat(testId, "__button_main")
|
202
202
|
}), mainBtn.text))))))));
|
203
203
|
}
|
204
204
|
}]);
|
package/package.json
CHANGED