@automattic/jetpack-components 0.42.5 → 0.43.1

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
@@ -2,10 +2,19 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.43.1] - 2023-10-10
6
+ ### Changed
7
+ - Boost Score Graph: Show a straight line before the first data point. [#33133]
8
+ - Updated package dependencies. [#33428]
9
+
10
+ ## [0.43.0] - 2023-10-03
11
+ ### Added
12
+ - Added new sharing icon [#33244]
13
+
5
14
  ## [0.42.5] - 2023-09-25
6
15
  ### Added
7
16
  - Added WhatsApp social icon. [#33074]
8
- - Aded CopyToClipboard component. [#33265]
17
+ - Added CopyToClipboard component. [#33265]
9
18
 
10
19
  ## [0.42.4] - 2023-09-19
11
20
 
@@ -826,6 +835,8 @@
826
835
  ### Changed
827
836
  - Update node version requirement to 14.16.1
828
837
 
838
+ [0.43.1]: https://github.com/Automattic/jetpack-components/compare/0.43.0...0.43.1
839
+ [0.43.0]: https://github.com/Automattic/jetpack-components/compare/0.42.5...0.43.0
829
840
  [0.42.5]: https://github.com/Automattic/jetpack-components/compare/0.42.4...0.42.5
830
841
  [0.42.4]: https://github.com/Automattic/jetpack-components/compare/0.42.3...0.42.4
831
842
  [0.42.3]: https://github.com/Automattic/jetpack-components/compare/0.42.2...0.42.3
@@ -61,6 +61,17 @@ export const BoostScoreGraph: FunctionComponent< BoostScoreGraphProps > = ( {
61
61
  startDate = Math.min( periods[ 0 ].timestamp, dayBeforeEndDate );
62
62
  }
63
63
 
64
+ // Add a fake period before the start date to make the chart look better
65
+ if ( periods.length > 0 ) {
66
+ periods = [
67
+ {
68
+ timestamp: startDate - 24 * 60 * 60 * 1000,
69
+ dimensions: periods[ 0 ].dimensions,
70
+ },
71
+ ...periods,
72
+ ];
73
+ }
74
+
64
75
  return (
65
76
  <div className="jb-score-graph">
66
77
  { title && <Text variant="title-medium">{ title }</Text> }
@@ -48,6 +48,7 @@ return (
48
48
  * StarIcon
49
49
  * VideopressIcon
50
50
  * JetpackIcon
51
+ * ShareIcon
51
52
  * FacebookIcon
52
53
  * TwitterIcon
53
54
  * LinkedinIcon
@@ -67,6 +68,7 @@ import {
67
68
  StarIcon,
68
69
  VideoPressIcon,
69
70
  JetpackIcon,
71
+ ShareIcon,
70
72
  FacebookIcon,
71
73
  TwitterIcon,
72
74
  LinkedinIcon,
@@ -87,6 +89,7 @@ return (
87
89
  <StarIcon />
88
90
  <VideoPressIcon />
89
91
  <JetpackIcon />
92
+ <ShareIcon />
90
93
  <FacebookIcon />
91
94
  <TwitterIcon />
92
95
  <LinkedinIcon />
@@ -198,6 +198,19 @@ export const JetpackIcon: React.FC< BaseIconProps > = ( {
198
198
  );
199
199
  };
200
200
 
201
+ export const ShareIcon: React.FC< BaseIconProps > = ( { size = 16, className, color } ) => {
202
+ return (
203
+ <IconWrapper className={ className } size={ size } color={ color } viewBox="0 0 16 16">
204
+ <Path
205
+ fill="#161722"
206
+ fillRule="evenodd"
207
+ d="M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z"
208
+ clipRule="evenodd"
209
+ ></Path>
210
+ </IconWrapper>
211
+ );
212
+ };
213
+
201
214
  /**
202
215
  * Wrapper of the Social Icons. Adds a default CSS class.
203
216
  *
@@ -342,6 +355,7 @@ const jetpackIcons = {
342
355
  star: StarIcon,
343
356
  videopress: VideopressIcon,
344
357
  jetpack: JetpackIcon,
358
+ share: ShareIcon,
345
359
  };
346
360
 
347
361
  const socialIcons = {
@@ -31,6 +31,7 @@ const StatCard = ( { className, icon, label, value, variant = 'square' }: StatCa
31
31
  <div className={ classnames( styles.info ) }>
32
32
  <Text className={ styles.label }>{ label }</Text>
33
33
  { variant === 'square' ? (
34
+ // @todo Switch to `placement` once WordPress 6.4 is the minimum.
34
35
  <Tooltip text={ formattedValue } position="top center">
35
36
  <Text variant="headline-small" className={ classnames( styles.value ) }>
36
37
  { compactValue }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.42.5",
3
+ "version": "0.43.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -15,16 +15,16 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@automattic/format-currency": "1.0.1",
18
- "@automattic/jetpack-boost-score-api": "^0.1.11",
18
+ "@automattic/jetpack-boost-score-api": "^0.1.12",
19
19
  "@babel/runtime": "^7",
20
- "@wordpress/browserslist-config": "5.24.0",
21
- "@wordpress/components": "25.7.0",
22
- "@wordpress/compose": "6.18.0",
23
- "@wordpress/data": "9.11.0",
24
- "@wordpress/date": "4.41.0",
25
- "@wordpress/element": "5.18.0",
26
- "@wordpress/i18n": "4.41.0",
27
- "@wordpress/icons": "9.32.0",
20
+ "@wordpress/browserslist-config": "5.26.0",
21
+ "@wordpress/components": "25.9.0",
22
+ "@wordpress/compose": "6.20.0",
23
+ "@wordpress/data": "9.13.0",
24
+ "@wordpress/date": "4.43.0",
25
+ "@wordpress/element": "5.20.0",
26
+ "@wordpress/i18n": "4.43.0",
27
+ "@wordpress/icons": "9.34.0",
28
28
  "classnames": "2.3.2",
29
29
  "prop-types": "^15.7.2",
30
30
  "qrcode.react": "3.1.0",
@@ -33,7 +33,7 @@
33
33
  "uplot-react": "1.1.4"
34
34
  },
35
35
  "devDependencies": {
36
- "@automattic/jetpack-base-styles": "^0.6.9",
36
+ "@automattic/jetpack-base-styles": "^0.6.10",
37
37
  "@babel/core": "7.22.17",
38
38
  "@babel/preset-react": "7.22.15",
39
39
  "@jest/globals": "29.4.3",