@automattic/jetpack-components 0.53.1 → 0.53.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 +18 -0
- package/components/action-button/index.jsx +3 -9
- package/components/action-popover/index.tsx +1 -0
- package/components/alert/index.tsx +1 -6
- package/components/global-notices/styles.module.scss +2 -0
- package/components/notice/index.tsx +2 -7
- package/components/number-slider/index.tsx +7 -1
- package/components/spinner/index.jsx +9 -15
- package/components/theme-provider/index.tsx +1 -0
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Components package releases.
|
|
4
4
|
|
|
5
|
+
## [0.53.3] - 2024-05-16
|
|
6
|
+
### Added
|
|
7
|
+
- Social | Wired up confirmation UI with connect button [#37295]
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Updated package dependencies. [#37379]
|
|
11
|
+
- Updated package dependencies. [#37380]
|
|
12
|
+
- Updated package dependencies. [#37382]
|
|
13
|
+
|
|
14
|
+
## [0.53.2] - 2024-05-13
|
|
15
|
+
### Added
|
|
16
|
+
- Added --jp-gray-5 as an alias of --jp-gray to the theme [#37327]
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Fixed notices z-index for global notices when modal is open [#37196]
|
|
20
|
+
|
|
5
21
|
## [0.53.1] - 2024-05-09
|
|
6
22
|
### Added
|
|
7
23
|
- Added GlobalNotices component and useGlobalNotices hook [#37286]
|
|
@@ -1023,6 +1039,8 @@
|
|
|
1023
1039
|
### Changed
|
|
1024
1040
|
- Update node version requirement to 14.16.1
|
|
1025
1041
|
|
|
1042
|
+
[0.53.3]: https://github.com/Automattic/jetpack-components/compare/0.53.2...0.53.3
|
|
1043
|
+
[0.53.2]: https://github.com/Automattic/jetpack-components/compare/0.53.1...0.53.2
|
|
1026
1044
|
[0.53.1]: https://github.com/Automattic/jetpack-components/compare/0.53.0...0.53.1
|
|
1027
1045
|
[0.53.0]: https://github.com/Automattic/jetpack-components/compare/0.52.1...0.53.0
|
|
1028
1046
|
[0.52.1]: https://github.com/Automattic/jetpack-components/compare/0.52.0...0.52.1
|
|
@@ -26,11 +26,11 @@ const ActionButton = props => {
|
|
|
26
26
|
const {
|
|
27
27
|
label,
|
|
28
28
|
onClick,
|
|
29
|
-
isLoading,
|
|
29
|
+
isLoading = false,
|
|
30
30
|
loadingText,
|
|
31
31
|
isDisabled,
|
|
32
|
-
displayError,
|
|
33
|
-
errorMessage,
|
|
32
|
+
displayError = false,
|
|
33
|
+
errorMessage = __( 'An error occurred. Please try again.', 'jetpack' ),
|
|
34
34
|
customClass,
|
|
35
35
|
} = props;
|
|
36
36
|
|
|
@@ -72,10 +72,4 @@ ActionButton.propTypes = {
|
|
|
72
72
|
errorMessage: PropTypes.oneOfType( [ PropTypes.string, PropTypes.element ] ),
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
ActionButton.defaultProps = {
|
|
76
|
-
isLoading: false,
|
|
77
|
-
displayError: false,
|
|
78
|
-
errorMessage: __( 'An error occurred. Please try again.', 'jetpack' ),
|
|
79
|
-
};
|
|
80
|
-
|
|
81
75
|
export default ActionButton;
|
|
@@ -38,7 +38,7 @@ const getIconByLevel = ( level: AlertProps[ 'level' ] ) => {
|
|
|
38
38
|
* @param {React.Component} props.children - The alert content.
|
|
39
39
|
* @returns {React.ReactElement} The `Alert` component.
|
|
40
40
|
*/
|
|
41
|
-
const Alert: React.FC< AlertProps > = ( { level, children, showIcon } ) => {
|
|
41
|
+
const Alert: React.FC< AlertProps > = ( { level = 'warning', children, showIcon = true } ) => {
|
|
42
42
|
const classes = classNames( styles.container, styles[ `is-${ level }` ] );
|
|
43
43
|
|
|
44
44
|
return (
|
|
@@ -53,9 +53,4 @@ const Alert: React.FC< AlertProps > = ( { level, children, showIcon } ) => {
|
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
Alert.defaultProps = {
|
|
57
|
-
level: 'warning',
|
|
58
|
-
showIcon: true,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
56
|
export default Alert;
|
|
@@ -51,11 +51,11 @@ const getIconByLevel = ( level: NoticeProps[ 'level' ] ) => {
|
|
|
51
51
|
* @returns {React.ReactElement} The `Notice` component.
|
|
52
52
|
*/
|
|
53
53
|
const Notice: React.FC< NoticeProps > = ( {
|
|
54
|
-
level,
|
|
54
|
+
level = 'info',
|
|
55
55
|
title,
|
|
56
56
|
children,
|
|
57
57
|
actions,
|
|
58
|
-
hideCloseButton,
|
|
58
|
+
hideCloseButton = false,
|
|
59
59
|
onClose,
|
|
60
60
|
} ) => {
|
|
61
61
|
const classes = classNames( styles.container, styles[ `is-${ level }` ] );
|
|
@@ -90,9 +90,4 @@ const Notice: React.FC< NoticeProps > = ( {
|
|
|
90
90
|
);
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
Notice.defaultProps = {
|
|
94
|
-
level: 'info',
|
|
95
|
-
hideCloseButton: false,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
93
|
export default Notice;
|
|
@@ -47,7 +47,13 @@ const NumberSlider: React.FC< NumberSliderProps > = ( {
|
|
|
47
47
|
const renderThumbCallback = renderThumb
|
|
48
48
|
? renderThumb
|
|
49
49
|
: ( props, state ) => {
|
|
50
|
-
|
|
50
|
+
const { key, ...otherProps } = props;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div key={ key } { ...otherProps }>
|
|
54
|
+
{ state.valueNow }
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
51
57
|
};
|
|
52
58
|
|
|
53
59
|
return (
|
|
@@ -3,23 +3,23 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import './style.scss';
|
|
5
5
|
|
|
6
|
-
const Spinner =
|
|
7
|
-
const
|
|
6
|
+
const Spinner = ( { color = '#FFFFFF', className = '', size = 20 } ) => {
|
|
7
|
+
const theClassName = className + ' jp-components-spinner';
|
|
8
8
|
|
|
9
9
|
const styleOuter = {
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
12
|
-
fontSize:
|
|
13
|
-
borderTopColor:
|
|
10
|
+
width: size,
|
|
11
|
+
height: size,
|
|
12
|
+
fontSize: size, // allows border-width to be specified in em units
|
|
13
|
+
borderTopColor: color,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const styleInner = {
|
|
17
|
-
borderTopColor:
|
|
18
|
-
borderRightColor:
|
|
17
|
+
borderTopColor: color,
|
|
18
|
+
borderRightColor: color,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<div className={
|
|
22
|
+
<div className={ theClassName }>
|
|
23
23
|
<div className="jp-components-spinner__outer" style={ styleOuter }>
|
|
24
24
|
<div className="jp-components-spinner__inner" style={ styleInner } />
|
|
25
25
|
</div>
|
|
@@ -36,10 +36,4 @@ Spinner.propTypes = {
|
|
|
36
36
|
size: PropTypes.number,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
Spinner.defaultProps = {
|
|
40
|
-
color: '#FFFFFF',
|
|
41
|
-
className: '',
|
|
42
|
-
size: 20,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
39
|
export default Spinner;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.3",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/format-currency": "1.0.1",
|
|
18
|
-
"@automattic/jetpack-boost-score-api": "^0.1.
|
|
18
|
+
"@automattic/jetpack-boost-score-api": "^0.1.30",
|
|
19
19
|
"@babel/runtime": "^7",
|
|
20
|
-
"@wordpress/browserslist-config": "5.
|
|
21
|
-
"@wordpress/components": "27.
|
|
22
|
-
"@wordpress/compose": "6.
|
|
23
|
-
"@wordpress/data": "9.
|
|
24
|
-
"@wordpress/date": "4.
|
|
25
|
-
"@wordpress/element": "5.
|
|
26
|
-
"@wordpress/i18n": "4.
|
|
27
|
-
"@wordpress/icons": "9.
|
|
28
|
-
"@wordpress/notices": "4.
|
|
20
|
+
"@wordpress/browserslist-config": "5.40.0",
|
|
21
|
+
"@wordpress/components": "27.5.0",
|
|
22
|
+
"@wordpress/compose": "6.34.0",
|
|
23
|
+
"@wordpress/data": "9.27.0",
|
|
24
|
+
"@wordpress/date": "4.57.0",
|
|
25
|
+
"@wordpress/element": "5.34.0",
|
|
26
|
+
"@wordpress/i18n": "4.57.0",
|
|
27
|
+
"@wordpress/icons": "9.48.0",
|
|
28
|
+
"@wordpress/notices": "4.25.0",
|
|
29
29
|
"classnames": "2.3.2",
|
|
30
30
|
"prop-types": "^15.7.2",
|
|
31
31
|
"qrcode.react": "3.1.0",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"uplot-react": "1.1.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
38
|
+
"@automattic/jetpack-base-styles": "^0.6.25",
|
|
39
39
|
"@babel/core": "7.24.0",
|
|
40
40
|
"@babel/preset-react": "7.23.3",
|
|
41
41
|
"@jest/globals": "29.4.3",
|
|
42
42
|
"@storybook/addon-actions": "8.0.9",
|
|
43
43
|
"@storybook/blocks": "8.0.9",
|
|
44
44
|
"@storybook/react": "8.0.9",
|
|
45
|
-
"@testing-library/dom": "
|
|
46
|
-
"@testing-library/react": "
|
|
45
|
+
"@testing-library/dom": "10.1.0",
|
|
46
|
+
"@testing-library/react": "15.0.7",
|
|
47
47
|
"@testing-library/user-event": "14.5.2",
|
|
48
48
|
"@types/jest": "29.5.12",
|
|
49
49
|
"@types/qrcode.react": "1.0.5",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
55
55
|
"jest": "29.7.0",
|
|
56
56
|
"jest-environment-jsdom": "29.7.0",
|
|
57
|
-
"react": "18.
|
|
58
|
-
"react-dom": "18.
|
|
59
|
-
"react-test-renderer": "18.
|
|
57
|
+
"react": "18.3.1",
|
|
58
|
+
"react-dom": "18.3.1",
|
|
59
|
+
"react-test-renderer": "18.3.1",
|
|
60
60
|
"require-from-string": "2.0.2",
|
|
61
61
|
"resize-observer-polyfill": "1.5.1",
|
|
62
62
|
"ts-dedent": "2.2.0",
|