@automattic/jetpack-components 0.43.2 → 0.43.4
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 +11 -0
- package/SECURITY.md +11 -2
- package/components/boost-score-graph/index.tsx +1 -1
- package/components/boost-score-graph/use-boost-score-transform.ts +1 -1
- package/components/icons/README.md +0 -24
- package/components/icons/index.tsx +10 -164
- package/components/icons/types.ts +0 -5
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Components package releases.
|
|
4
4
|
|
|
5
|
+
## [0.43.4] - 2023-10-17
|
|
6
|
+
### Changed
|
|
7
|
+
- Updated package dependencies. [#33646]
|
|
8
|
+
|
|
9
|
+
## [0.43.3] - 2023-10-16
|
|
10
|
+
### Changed
|
|
11
|
+
- Replaced inline social icons with social-logos package. [#33613]
|
|
12
|
+
- Updated package dependencies. [#33584, #33429]
|
|
13
|
+
|
|
5
14
|
## [0.43.2] - 2023-10-11
|
|
6
15
|
### Changed
|
|
7
16
|
- Changed Twitter icon and label to X [#33445]
|
|
@@ -839,6 +848,8 @@
|
|
|
839
848
|
### Changed
|
|
840
849
|
- Update node version requirement to 14.16.1
|
|
841
850
|
|
|
851
|
+
[0.43.4]: https://github.com/Automattic/jetpack-components/compare/0.43.3...0.43.4
|
|
852
|
+
[0.43.3]: https://github.com/Automattic/jetpack-components/compare/0.43.2...0.43.3
|
|
842
853
|
[0.43.2]: https://github.com/Automattic/jetpack-components/compare/0.43.1...0.43.2
|
|
843
854
|
[0.43.1]: https://github.com/Automattic/jetpack-components/compare/0.43.0...0.43.1
|
|
844
855
|
[0.43.0]: https://github.com/Automattic/jetpack-components/compare/0.42.5...0.43.0
|
package/SECURITY.md
CHANGED
|
@@ -4,11 +4,20 @@ Full details of the Automattic Security Policy can be found on [automattic.com](
|
|
|
4
4
|
|
|
5
5
|
## Supported Versions
|
|
6
6
|
|
|
7
|
-
Generally, only the latest version of Jetpack
|
|
7
|
+
Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
|
|
8
8
|
|
|
9
9
|
## Reporting a Vulnerability
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
|
|
12
|
+
|
|
13
|
+
* [Jetpack](https://jetpack.com/)
|
|
14
|
+
* Jetpack Backup
|
|
15
|
+
* Jetpack Boost
|
|
16
|
+
* Jetpack CRM
|
|
17
|
+
* Jetpack Protect
|
|
18
|
+
* Jetpack Search
|
|
19
|
+
* Jetpack Social
|
|
20
|
+
* Jetpack VideoPress
|
|
12
21
|
|
|
13
22
|
**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
|
|
14
23
|
|
|
@@ -4,7 +4,7 @@ import { Period } from './index';
|
|
|
4
4
|
type ScoreGraphAlignedData = [
|
|
5
5
|
number[], // timestamps
|
|
6
6
|
number[], // desktop_overall_score
|
|
7
|
-
number[] // mobile_overall_score
|
|
7
|
+
number[], // mobile_overall_score
|
|
8
8
|
];
|
|
9
9
|
|
|
10
10
|
// Extract the value of a dimension from an array of periods
|
|
@@ -16,12 +16,6 @@ Available slugs are:
|
|
|
16
16
|
* star
|
|
17
17
|
* videopress
|
|
18
18
|
* jetpack
|
|
19
|
-
* facebook
|
|
20
|
-
* twitter
|
|
21
|
-
* linkedin
|
|
22
|
-
* tumblr
|
|
23
|
-
* google
|
|
24
|
-
* mastodon
|
|
25
19
|
|
|
26
20
|
```es6
|
|
27
21
|
import {
|
|
@@ -49,12 +43,6 @@ return (
|
|
|
49
43
|
* VideopressIcon
|
|
50
44
|
* JetpackIcon
|
|
51
45
|
* ShareIcon
|
|
52
|
-
* FacebookIcon
|
|
53
|
-
* TwitterIcon
|
|
54
|
-
* LinkedinIcon
|
|
55
|
-
* TumblrIcon
|
|
56
|
-
* GoogleIcon
|
|
57
|
-
* MastodonIcon
|
|
58
46
|
|
|
59
47
|
```es6
|
|
60
48
|
import {
|
|
@@ -69,12 +57,6 @@ import {
|
|
|
69
57
|
VideoPressIcon,
|
|
70
58
|
JetpackIcon,
|
|
71
59
|
ShareIcon,
|
|
72
|
-
FacebookIcon,
|
|
73
|
-
TwitterIcon,
|
|
74
|
-
LinkedinIcon,
|
|
75
|
-
TumblrIcon,
|
|
76
|
-
GoogleIcon,
|
|
77
|
-
MastodonIcon
|
|
78
60
|
} from '@automattic/jetpack-components';
|
|
79
61
|
|
|
80
62
|
return (
|
|
@@ -90,12 +72,6 @@ return (
|
|
|
90
72
|
<VideoPressIcon />
|
|
91
73
|
<JetpackIcon />
|
|
92
74
|
<ShareIcon />
|
|
93
|
-
<FacebookIcon />
|
|
94
|
-
<TwitterIcon />
|
|
95
|
-
<LinkedinIcon />
|
|
96
|
-
<TumblrIcon />
|
|
97
|
-
<GoogleIcon />
|
|
98
|
-
<MastodonIcon />
|
|
99
75
|
</div>
|
|
100
76
|
)
|
|
101
77
|
```
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Path, SVG, G, Polygon } from '@wordpress/components';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
import SocialLogo from 'social-logos';
|
|
3
4
|
import styles from './style.module.scss';
|
|
4
|
-
import { BaseIconProps
|
|
5
|
+
import { BaseIconProps } from './types';
|
|
5
6
|
import type React from 'react';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -211,149 +212,6 @@ export const ShareIcon: React.FC< BaseIconProps > = ( { size = 16, className, co
|
|
|
211
212
|
);
|
|
212
213
|
};
|
|
213
214
|
|
|
214
|
-
/**
|
|
215
|
-
* Wrapper of the Social Icons. Adds a default CSS class.
|
|
216
|
-
*
|
|
217
|
-
* @param {SocialIconWrapperProps} props - Component props.
|
|
218
|
-
* @returns {React.ReactNode} - Social Icon component.
|
|
219
|
-
*/
|
|
220
|
-
const SocialIconWrapper: React.FC< SocialIconWrapperProps > = ( {
|
|
221
|
-
className,
|
|
222
|
-
fill = 'none',
|
|
223
|
-
size,
|
|
224
|
-
children,
|
|
225
|
-
} ) => {
|
|
226
|
-
return (
|
|
227
|
-
<IconWrapper
|
|
228
|
-
className={ classNames( styles.socialIcon, className ) }
|
|
229
|
-
size={ size }
|
|
230
|
-
color={ fill }
|
|
231
|
-
>
|
|
232
|
-
{ children }
|
|
233
|
-
</IconWrapper>
|
|
234
|
-
);
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
export const FacebookIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
238
|
-
return (
|
|
239
|
-
<SocialIconWrapper
|
|
240
|
-
fill={ fill }
|
|
241
|
-
size={ size }
|
|
242
|
-
className={ classNames( styles.facebook, className ) }
|
|
243
|
-
>
|
|
244
|
-
<Path
|
|
245
|
-
d="M12,2C6.5,2,2,6.5,2,12c0,5,3.7,9.1,8.4,9.9v-7H7.9V12h2.5V9.8c0-2.5,1.5-3.9,3.8-3.9c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3
|
|
246
|
-
c-1.2,0-1.6,0.8-1.6,1.6V12h2.8l-0.4,2.9h-2.3v7C18.3,21.1,22,17,22,12C22,6.5,17.5,2,12,2z"
|
|
247
|
-
/>
|
|
248
|
-
</SocialIconWrapper>
|
|
249
|
-
);
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export const InstagramIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
253
|
-
return (
|
|
254
|
-
<SocialIconWrapper
|
|
255
|
-
fill={ fill }
|
|
256
|
-
size={ size }
|
|
257
|
-
className={ classNames( styles.instagram, className ) }
|
|
258
|
-
>
|
|
259
|
-
<Path d="M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" />
|
|
260
|
-
</SocialIconWrapper>
|
|
261
|
-
);
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
export const TwitterIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
265
|
-
return (
|
|
266
|
-
<SocialIconWrapper
|
|
267
|
-
fill={ fill }
|
|
268
|
-
size={ size }
|
|
269
|
-
className={ classNames( styles.twitter, className ) }
|
|
270
|
-
>
|
|
271
|
-
<Path d="M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" />
|
|
272
|
-
</SocialIconWrapper>
|
|
273
|
-
);
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
export const XIcon: React.FC< SocialIconWrapperProps > = ( {
|
|
277
|
-
fill = 'black',
|
|
278
|
-
size,
|
|
279
|
-
className,
|
|
280
|
-
} ) => {
|
|
281
|
-
return (
|
|
282
|
-
<SocialIconWrapper fill={ fill } size={ size } className={ className }>
|
|
283
|
-
<Path d="M14.117 9.622L20.446 2h-1.5l-5.495 6.618L9.062 2H4l6.637 10.007L4 20h1.5l5.803-6.989L15.938 20H21L14.117 9.622zm-2.054 2.474l-.672-.997-5.35-7.93h2.303l4.318 6.4.672.996 5.613 8.319h-2.304l-4.58-6.788z" />
|
|
284
|
-
</SocialIconWrapper>
|
|
285
|
-
);
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
export const LinkedinIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
289
|
-
return (
|
|
290
|
-
<SocialIconWrapper
|
|
291
|
-
fill={ fill }
|
|
292
|
-
size={ size }
|
|
293
|
-
className={ classNames( styles.linkedin, className ) }
|
|
294
|
-
>
|
|
295
|
-
<Path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" />
|
|
296
|
-
</SocialIconWrapper>
|
|
297
|
-
);
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export const TumblrIcon: React.FC< SocialIconWrapperProps > = ( {
|
|
301
|
-
fill,
|
|
302
|
-
size,
|
|
303
|
-
className,
|
|
304
|
-
invert,
|
|
305
|
-
} ) => {
|
|
306
|
-
return (
|
|
307
|
-
<SocialIconWrapper
|
|
308
|
-
fill={ fill }
|
|
309
|
-
size={ size }
|
|
310
|
-
className={ classNames( styles.tumblr, className ) }
|
|
311
|
-
>
|
|
312
|
-
{ invert ? (
|
|
313
|
-
<Path d="M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z" />
|
|
314
|
-
) : (
|
|
315
|
-
<Path d="M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" />
|
|
316
|
-
) }
|
|
317
|
-
</SocialIconWrapper>
|
|
318
|
-
);
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
export const GoogleIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
322
|
-
return (
|
|
323
|
-
<SocialIconWrapper
|
|
324
|
-
fill={ fill }
|
|
325
|
-
size={ size }
|
|
326
|
-
className={ classNames( styles.google, className ) }
|
|
327
|
-
>
|
|
328
|
-
<Path d="M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z" />
|
|
329
|
-
</SocialIconWrapper>
|
|
330
|
-
);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
export const MastodonIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
334
|
-
return (
|
|
335
|
-
<SocialIconWrapper
|
|
336
|
-
fill={ fill }
|
|
337
|
-
size={ size }
|
|
338
|
-
className={ classNames( styles.mastodon, className ) }
|
|
339
|
-
>
|
|
340
|
-
<Path d="M 19.997205,6.2868955 C 19.729197,4.3162778 17.992912,2.7633017 15.93468,2.4623753 15.587434,2.4115195 14.271759,2.2264681 11.224008,2.2264681 h -0.02277 c -3.0485688,0 -3.7026204,0.1850577 -4.0498676,0.2359072 C 5.1504449,2.7549655 3.3231548,4.1503966 2.879815,6.1443318 2.6665754,7.1263038 2.6438193,8.2149794 2.6834329,9.2136207 c 0.056471,1.4321143 0.067433,2.8617113 0.1989115,4.2879943 0.090908,0.947406 0.2494696,1.887266 0.4745239,2.812521 0.4214237,1.708868 2.1273496,3.130966 3.7987144,3.71116 1.7894479,0.605052 3.7138403,0.705478 5.5577463,0.290088 0.202828,-0.04667 0.403445,-0.100873 0.601781,-0.162549 0.447558,-0.140863 0.972662,-0.298434 1.358683,-0.575188 0.0052,-0.004 0.0097,-0.0089 0.01266,-0.01471 0.0031,-0.0056 0.0047,-0.01218 0.005,-0.01866 v -1.382076 c -9.4e-5,-0.006 -0.0016,-0.01202 -0.0043,-0.01754 -0.0027,-0.0054 -0.0067,-0.01028 -0.01155,-0.01392 -0.0049,-0.0038 -0.01044,-0.0063 -0.01648,-0.0078 -0.006,-0.0013 -0.01218,-0.0013 -0.01825,7.1e-5 -1.181368,0.279106 -2.391962,0.419012 -3.606552,0.416801 -2.0902554,0 -2.6524392,-0.981126 -2.8134375,-1.3896 -0.1293933,-0.353009 -0.2115739,-0.721231 -0.2444221,-1.095331 -3.29e-4,-0.0063 8.463e-4,-0.0125 0.00348,-0.01832 0.00253,-0.0056 0.00649,-0.01077 0.011389,-0.01471 0.0049,-0.004 0.010755,-0.0068 0.016957,-0.0081 0.00617,-0.0014 0.012655,-0.0012 0.018808,3.52e-4 1.1616831,0.277201 2.3525266,0.417106 3.5475526,0.416801 0.287408,0 0.573966,0 0.861395,-0.0074 1.201893,-0.03335 2.468685,-0.0942 3.6512,-0.322606 0.02952,-0.0058 0.059,-0.01091 0.0843,-0.01833 1.865209,-0.354279 3.640245,-1.466278 3.820617,-4.282163 0.0068,-0.110869 0.0236,-1.161191 0.0236,-1.276219 8.46e-4,-0.390958 0.127273,-2.7733487 -0.01856,-4.2371335 z m -2.87074,7.0263315 H 15.165179 V 8.5617567 c 0,-1.0003116 -0.421434,-1.5104614 -1.278618,-1.5104614 -0.942305,0 -1.414292,0.6035217 -1.414292,1.7955379 V 11.44764 H 10.522764 V 8.8468332 c 0,-1.1920162 -0.472832,-1.7955379 -1.4151372,-1.7955379 -0.8521293,0 -1.2777701,0.5101498 -1.2786179,1.5104614 V 13.313227 H 5.8693944 V 8.4175496 c 0,-1.0003133 0.2582014,-1.7949986 0.7745804,-2.3840846 0.5326766,-0.587672 1.2314038,-0.8894211 2.0986981,-0.8894211 1.003817,0 1.7623841,0.3817657 2.2680911,1.1445204 l 0.488023,0.8102521 0.488846,-0.8102521 c 0.505705,-0.7627547 1.264275,-1.1445204 2.26642,-1.1445204 0.866449,0 1.565152,0.3017491 2.099521,0.8894211 0.516404,0.5885211 0.774583,1.3832066 0.774583,2.3840846 z" />
|
|
341
|
-
</SocialIconWrapper>
|
|
342
|
-
);
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export const WhatsAppIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
|
|
346
|
-
return (
|
|
347
|
-
<SocialIconWrapper
|
|
348
|
-
fill={ fill }
|
|
349
|
-
size={ size }
|
|
350
|
-
className={ classNames( styles.whatsapp, className ) }
|
|
351
|
-
>
|
|
352
|
-
<Path d="M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" />
|
|
353
|
-
</SocialIconWrapper>
|
|
354
|
-
);
|
|
355
|
-
};
|
|
356
|
-
|
|
357
215
|
const jetpackIcons = {
|
|
358
216
|
'anti-spam': AntiSpamIcon,
|
|
359
217
|
backup: BackupIcon,
|
|
@@ -370,27 +228,12 @@ const jetpackIcons = {
|
|
|
370
228
|
share: ShareIcon,
|
|
371
229
|
};
|
|
372
230
|
|
|
373
|
-
const socialIcons = {
|
|
374
|
-
facebook: FacebookIcon,
|
|
375
|
-
instagram: InstagramIcon,
|
|
376
|
-
twitter: TwitterIcon,
|
|
377
|
-
linkedin: LinkedinIcon,
|
|
378
|
-
tumblr: TumblrIcon,
|
|
379
|
-
google: GoogleIcon,
|
|
380
|
-
mastodon: MastodonIcon,
|
|
381
|
-
whatsapp: WhatsAppIcon,
|
|
382
|
-
x: XIcon,
|
|
383
|
-
};
|
|
384
|
-
|
|
385
231
|
const iconsMap = {
|
|
386
232
|
...jetpackIcons,
|
|
387
|
-
...socialIcons,
|
|
388
233
|
};
|
|
389
234
|
|
|
390
235
|
export type JetpackIconSlug = keyof typeof jetpackIcons;
|
|
391
236
|
|
|
392
|
-
export type SocialIconSlug = keyof typeof socialIcons;
|
|
393
|
-
|
|
394
237
|
export type IconsMap = typeof iconsMap;
|
|
395
238
|
|
|
396
239
|
export type IconSlug = keyof IconsMap;
|
|
@@ -410,10 +253,13 @@ export function getIconBySlug< Slug extends IconSlug >( slug: Slug ): IconsMap[
|
|
|
410
253
|
}
|
|
411
254
|
|
|
412
255
|
export const SocialServiceIcon: React.FC< {
|
|
413
|
-
serviceName:
|
|
256
|
+
serviceName: React.ComponentProps< typeof SocialLogo >[ 'icon' ];
|
|
414
257
|
className?: string;
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
258
|
+
} > = ( { serviceName, className } ) => {
|
|
259
|
+
return (
|
|
260
|
+
<SocialLogo
|
|
261
|
+
className={ classNames( styles.socialIcon, styles[ serviceName ], className ) }
|
|
262
|
+
icon={ serviceName }
|
|
263
|
+
/>
|
|
264
|
+
);
|
|
419
265
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.4",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -15,7 +15,7 @@
|
|
|
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.13",
|
|
19
19
|
"@babel/runtime": "^7",
|
|
20
20
|
"@wordpress/browserslist-config": "5.26.0",
|
|
21
21
|
"@wordpress/components": "25.9.0",
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"prop-types": "^15.7.2",
|
|
30
30
|
"qrcode.react": "3.1.0",
|
|
31
31
|
"react-slider": "2.0.5",
|
|
32
|
+
"social-logos": "2.5.6",
|
|
32
33
|
"uplot": "1.6.24",
|
|
33
34
|
"uplot-react": "1.1.4"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@automattic/jetpack-base-styles": "^0.6.10",
|
|
37
|
-
"@babel/core": "7.
|
|
38
|
+
"@babel/core": "7.23.2",
|
|
38
39
|
"@babel/preset-react": "7.22.15",
|
|
39
40
|
"@jest/globals": "29.4.3",
|
|
40
|
-
"@storybook/addon-actions": "7.
|
|
41
|
-
"@storybook/blocks": "7.
|
|
42
|
-
"@storybook/react": "7.
|
|
41
|
+
"@storybook/addon-actions": "7.4.6",
|
|
42
|
+
"@storybook/blocks": "7.4.6",
|
|
43
|
+
"@storybook/react": "7.4.6",
|
|
43
44
|
"@testing-library/dom": "8.19.1",
|
|
44
45
|
"@testing-library/react": "13.4.0",
|
|
45
46
|
"@testing-library/user-event": "14.4.3",
|