@automattic/jetpack-components 0.39.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.
Files changed (235) hide show
  1. package/.gitattributes +8 -0
  2. package/CHANGELOG.md +747 -0
  3. package/LICENSE.txt +357 -0
  4. package/README.md +11 -0
  5. package/SECURITY.md +38 -0
  6. package/components/action-button/index.jsx +70 -0
  7. package/components/action-button/stories/index.stories.jsx +38 -0
  8. package/components/action-button/style.module.scss +11 -0
  9. package/components/action-button/test/component.jsx +16 -0
  10. package/components/action-popover/index.tsx +105 -0
  11. package/components/action-popover/stories/index.stories.jsx +115 -0
  12. package/components/action-popover/stories/styles.module.scss +7 -0
  13. package/components/action-popover/styles.module.scss +49 -0
  14. package/components/action-popover/types.ts +20 -0
  15. package/components/admin-page/index.tsx +58 -0
  16. package/components/admin-page/stories/index.stories.tsx +35 -0
  17. package/components/admin-page/stories/style.module.scss +13 -0
  18. package/components/admin-page/style.module.scss +11 -0
  19. package/components/admin-page/types.ts +41 -0
  20. package/components/admin-section/basic/index.tsx +15 -0
  21. package/components/admin-section/basic/style.module.scss +3 -0
  22. package/components/admin-section/hero/index.tsx +15 -0
  23. package/components/admin-section/hero/style.module.scss +3 -0
  24. package/components/admin-section/stories/index.stories.tsx +60 -0
  25. package/components/admin-section/types.ts +6 -0
  26. package/components/alert/index.tsx +61 -0
  27. package/components/alert/stories/index.stories.jsx +24 -0
  28. package/components/alert/style.module.scss +43 -0
  29. package/components/automattic-byline-logo/README.md +16 -0
  30. package/components/automattic-byline-logo/index.tsx +38 -0
  31. package/components/automattic-byline-logo/stories/index.stories.tsx +20 -0
  32. package/components/automattic-byline-logo/test/component.tsx +28 -0
  33. package/components/automattic-byline-logo/types.ts +18 -0
  34. package/components/boost-score-bar/index.tsx +103 -0
  35. package/components/boost-score-bar/stories/index.stories.tsx +39 -0
  36. package/components/boost-score-bar/style.scss +184 -0
  37. package/components/boost-score-bar/test/component.tsx +102 -0
  38. package/components/boost-score-bar/types.ts +9 -0
  39. package/components/button/index.tsx +84 -0
  40. package/components/button/stories/index.mdx +90 -0
  41. package/components/button/stories/index.stories.tsx +400 -0
  42. package/components/button/stories/style.module.scss +20 -0
  43. package/components/button/style.module.scss +212 -0
  44. package/components/button/types.ts +21 -0
  45. package/components/contextual-upgrade-trigger/README.md +81 -0
  46. package/components/contextual-upgrade-trigger/index.tsx +44 -0
  47. package/components/contextual-upgrade-trigger/stories/index.stories.tsx +25 -0
  48. package/components/contextual-upgrade-trigger/style.module.scss +75 -0
  49. package/components/contextual-upgrade-trigger/types.ts +9 -0
  50. package/components/decorative-card/index.tsx +44 -0
  51. package/components/decorative-card/stories/index.stories.tsx +18 -0
  52. package/components/decorative-card/style.scss +116 -0
  53. package/components/decorative-card/types.ts +16 -0
  54. package/components/dialog/index.tsx +69 -0
  55. package/components/dialog/stories/boost.png +0 -0
  56. package/components/dialog/stories/declaration.d.ts +1 -0
  57. package/components/dialog/stories/index.stories.tsx +118 -0
  58. package/components/dialog/stories/js-components.components.dialog.mdx +62 -0
  59. package/components/dialog/stories/js-components.components.dialog.stories.js +37 -0
  60. package/components/dialog/stories/style.module.scss +21 -0
  61. package/components/dialog/style.module.scss +30 -0
  62. package/components/donut-meter/index.tsx +147 -0
  63. package/components/donut-meter/stories/index.stories.tsx +51 -0
  64. package/components/donut-meter/style.scss +11 -0
  65. package/components/donut-meter/test/component.tsx +24 -0
  66. package/components/gridicon/index.tsx +298 -0
  67. package/components/gridicon/stories/index.stories.tsx +18 -0
  68. package/components/gridicon/style.scss +16 -0
  69. package/components/gridicon/types.ts +48 -0
  70. package/components/icon-tooltip/index.tsx +96 -0
  71. package/components/icon-tooltip/stories/index.stories.tsx +108 -0
  72. package/components/icon-tooltip/stories/style.scss +36 -0
  73. package/components/icon-tooltip/style.scss +121 -0
  74. package/components/icon-tooltip/test/component.tsx +15 -0
  75. package/components/icon-tooltip/types.ts +76 -0
  76. package/components/icons/README.md +98 -0
  77. package/components/icons/index.tsx +369 -0
  78. package/components/icons/stories/index.stories.tsx +65 -0
  79. package/components/icons/stories/style.module.scss +33 -0
  80. package/components/icons/style.module.scss +40 -0
  81. package/components/icons/types.ts +38 -0
  82. package/components/indeterminate-progress-bar/index.tsx +28 -0
  83. package/components/indeterminate-progress-bar/stories/index.stories.tsx +14 -0
  84. package/components/indeterminate-progress-bar/style.module.scss +34 -0
  85. package/components/indeterminate-progress-bar/types.ts +6 -0
  86. package/components/jetpack-footer/README.md +21 -0
  87. package/components/jetpack-footer/index.tsx +94 -0
  88. package/components/jetpack-footer/stories/index.stories.tsx +40 -0
  89. package/components/jetpack-footer/style.scss +116 -0
  90. package/components/jetpack-footer/test/component.tsx +45 -0
  91. package/components/jetpack-footer/types.ts +36 -0
  92. package/components/jetpack-logo/README.md +20 -0
  93. package/components/jetpack-logo/index.tsx +46 -0
  94. package/components/jetpack-logo/stories/index.stories.tsx +20 -0
  95. package/components/jetpack-logo/test/component.tsx +16 -0
  96. package/components/jetpack-logo/types.ts +7 -0
  97. package/components/jetpack-search-logo/README.md +20 -0
  98. package/components/jetpack-search-logo/index.tsx +93 -0
  99. package/components/jetpack-search-logo/stories/index.stories.tsx +21 -0
  100. package/components/jetpack-search-logo/test/component.tsx +16 -0
  101. package/components/jetpack-search-logo/types.ts +7 -0
  102. package/components/jetpack-vaultpress-backup-logo/README.md +19 -0
  103. package/components/jetpack-vaultpress-backup-logo/index.tsx +113 -0
  104. package/components/jetpack-vaultpress-backup-logo/stories/index.stories.tsx +20 -0
  105. package/components/jetpack-vaultpress-backup-logo/test/component.tsx +18 -0
  106. package/components/jetpack-vaultpress-backup-logo/types.ts +6 -0
  107. package/components/jetpack-videopress-logo/README.md +19 -0
  108. package/components/jetpack-videopress-logo/index.tsx +93 -0
  109. package/components/jetpack-videopress-logo/stories/index.stories.tsx +20 -0
  110. package/components/jetpack-videopress-logo/test/component.tsx +16 -0
  111. package/components/jetpack-videopress-logo/types.tsx +6 -0
  112. package/components/layout/README.md +9 -0
  113. package/components/layout/breakpoints.module.scss +20 -0
  114. package/components/layout/col/README.md +81 -0
  115. package/components/layout/col/index.tsx +49 -0
  116. package/components/layout/col/style.module.scss +28 -0
  117. package/components/layout/container/README.md +77 -0
  118. package/components/layout/container/index.tsx +42 -0
  119. package/components/layout/container/style.module.scss +35 -0
  120. package/components/layout/stories/index.stories.tsx +145 -0
  121. package/components/layout/stories/styles.module.scss +22 -0
  122. package/components/layout/types.ts +55 -0
  123. package/components/layout/use-breakpoint-match/README.md +43 -0
  124. package/components/layout/use-breakpoint-match/declaration.d.ts +9 -0
  125. package/components/layout/use-breakpoint-match/index.ts +79 -0
  126. package/components/loading-placeholder/README.md +22 -0
  127. package/components/loading-placeholder/index.tsx +23 -0
  128. package/components/loading-placeholder/stories/index.stories.tsx +78 -0
  129. package/components/loading-placeholder/style.module.scss +18 -0
  130. package/components/notice/index.tsx +98 -0
  131. package/components/notice/stories/index.stories.jsx +90 -0
  132. package/components/notice/style.module.scss +107 -0
  133. package/components/number-format/README.md +25 -0
  134. package/components/number-format/index.ts +16 -0
  135. package/components/pricing-card/index.tsx +127 -0
  136. package/components/pricing-card/stories/index.stories.tsx +55 -0
  137. package/components/pricing-card/style.scss +112 -0
  138. package/components/pricing-card/test/component.tsx +89 -0
  139. package/components/pricing-card/types.ts +52 -0
  140. package/components/pricing-slider/index.tsx +53 -0
  141. package/components/pricing-slider/stories/index.stories.tsx +44 -0
  142. package/components/pricing-slider/style.scss +55 -0
  143. package/components/pricing-slider/test/component.tsx +14 -0
  144. package/components/pricing-slider/types.ts +58 -0
  145. package/components/pricing-table/index.tsx +200 -0
  146. package/components/pricing-table/stories/index.stories.tsx +74 -0
  147. package/components/pricing-table/styles.module.scss +160 -0
  148. package/components/pricing-table/test/component.tsx +41 -0
  149. package/components/pricing-table/types.ts +84 -0
  150. package/components/product-offer/icons-card.tsx +47 -0
  151. package/components/product-offer/index.tsx +115 -0
  152. package/components/product-offer/product-offer-header.tsx +23 -0
  153. package/components/product-offer/stories/index.stories.tsx +104 -0
  154. package/components/product-offer/style.module.scss +93 -0
  155. package/components/product-offer/types.ts +125 -0
  156. package/components/product-price/index.tsx +90 -0
  157. package/components/product-price/price.tsx +35 -0
  158. package/components/product-price/stories/index.stories.tsx +33 -0
  159. package/components/product-price/style.module.scss +69 -0
  160. package/components/product-price/test/component.tsx +26 -0
  161. package/components/product-price/types.ts +73 -0
  162. package/components/qr-code/Readme.md +5 -0
  163. package/components/qr-code/index.tsx +78 -0
  164. package/components/qr-code/stories/index.stories.tsx +32 -0
  165. package/components/record-meter-bar/index.tsx +135 -0
  166. package/components/record-meter-bar/stories/index.stories.tsx +39 -0
  167. package/components/record-meter-bar/style.scss +38 -0
  168. package/components/record-meter-bar/test/component.tsx +52 -0
  169. package/components/spinner/README.md +28 -0
  170. package/components/spinner/index.jsx +45 -0
  171. package/components/spinner/stories/index.stories.jsx +20 -0
  172. package/components/spinner/style.scss +31 -0
  173. package/components/spinner/test/component.jsx +17 -0
  174. package/components/split-button/index.tsx +39 -0
  175. package/components/split-button/stories/index.stories.tsx +35 -0
  176. package/components/split-button/style.module.scss +21 -0
  177. package/components/split-button/types.ts +14 -0
  178. package/components/stat-card/index.tsx +49 -0
  179. package/components/stat-card/stories/index.mdx +35 -0
  180. package/components/stat-card/stories/index.stories.tsx +41 -0
  181. package/components/stat-card/style.module.scss +49 -0
  182. package/components/stat-card/test/component.tsx +24 -0
  183. package/components/stat-card/types.ts +28 -0
  184. package/components/status/README.md +42 -0
  185. package/components/status/index.tsx +40 -0
  186. package/components/status/stories/index.stories.tsx +44 -0
  187. package/components/status/style.module.scss +72 -0
  188. package/components/terms-of-service/index.tsx +63 -0
  189. package/components/terms-of-service/styles.scss +10 -0
  190. package/components/terms-of-service/test/index.test.jsx +52 -0
  191. package/components/terms-of-service/types.ts +30 -0
  192. package/components/testimonials/index.tsx +58 -0
  193. package/components/testimonials/style.scss +127 -0
  194. package/components/testimonials/test/component.tsx +103 -0
  195. package/components/testimonials/testimonial.tsx +47 -0
  196. package/components/testimonials/types.ts +17 -0
  197. package/components/text/constants.ts +30 -0
  198. package/components/text/index.tsx +91 -0
  199. package/components/text/stories/headings.index.stories.tsx +80 -0
  200. package/components/text/stories/index.mdx +195 -0
  201. package/components/text/stories/index.stories.tsx +69 -0
  202. package/components/text/stories/style.module.scss +64 -0
  203. package/components/text/stories/title.index.stories.tsx +34 -0
  204. package/components/text/style.module.scss +125 -0
  205. package/components/text/types.ts +53 -0
  206. package/components/theme-provider/Readme.md +49 -0
  207. package/components/theme-provider/globals.module.scss +6 -0
  208. package/components/theme-provider/index.tsx +151 -0
  209. package/components/theme-provider/stories/index.stories.tsx +164 -0
  210. package/components/theme-provider/stories/style.module.scss +79 -0
  211. package/components/theme-provider/types.ts +25 -0
  212. package/components/toggle-control/README.md +5 -0
  213. package/components/toggle-control/index.tsx +67 -0
  214. package/components/toggle-control/stories/index.stories.tsx +83 -0
  215. package/components/toggle-control/styles.module.scss +41 -0
  216. package/components/zendesk-chat/README.md +26 -0
  217. package/components/zendesk-chat/constants.ts +2 -0
  218. package/components/zendesk-chat/index.tsx +22 -0
  219. package/components/zendesk-chat/stories/index.stories.tsx +15 -0
  220. package/components/zendesk-chat/test/component.tsx +16 -0
  221. package/components/zendesk-chat/types.ts +3 -0
  222. package/index.ts +69 -0
  223. package/lib/locale/index.ts +48 -0
  224. package/lib/locale/test/index.ts +21 -0
  225. package/package.json +80 -0
  226. package/tools/get-product-checkout-url/Readme.md +32 -0
  227. package/tools/get-product-checkout-url/index.ts +31 -0
  228. package/tools/jp-redirect/README.md +61 -0
  229. package/tools/jp-redirect/index.ts +62 -0
  230. package/tools/jp-redirect/test/index.tsx +89 -0
  231. package/tools/jp-redirect/types.ts +49 -0
  232. package/tools/pricing-utils/README.md +16 -0
  233. package/tools/pricing-utils/index.ts +11 -0
  234. package/tools/pricing-utils/test/index.ts +39 -0
  235. package/tools/pricing-utils/types.ts +12 -0
@@ -0,0 +1,369 @@
1
+ import { Path, SVG, G, Polygon } from '@wordpress/components';
2
+ import classNames from 'classnames';
3
+ import styles from './style.module.scss';
4
+ import { BaseIconProps, SocialIconWrapperProps } from './types';
5
+ import type React from 'react';
6
+
7
+ /**
8
+ * Icon Wrapper component.
9
+ *
10
+ * @param {BaseIconProps} props - Component props.
11
+ * @returns {React.ReactNode} Icon Wrapper component.
12
+ */
13
+ const IconWrapper: React.FC< BaseIconProps > = ( {
14
+ className,
15
+ size = 24,
16
+ viewBox = '0 0 24 24',
17
+ opacity = 1,
18
+ color = '#2C3338',
19
+ children,
20
+ } ) => {
21
+ const iconProps = {
22
+ className: classNames( styles.iconWrapper, className ),
23
+ width: size,
24
+ height: size,
25
+ viewBox,
26
+ opacity,
27
+ fill: undefined,
28
+ };
29
+ if ( color ) {
30
+ iconProps.fill = color;
31
+ }
32
+
33
+ return (
34
+ <SVG { ...iconProps } fillRule="evenodd" clipRule="evenodd" xmlns="http://www.w3.org/2000/svg">
35
+ <G opacity={ opacity }>{ children }</G>
36
+ </SVG>
37
+ );
38
+ };
39
+
40
+ export const AntiSpamIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
41
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
42
+ <Path
43
+ d="M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1
44
+ s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1
45
+ c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1
46
+ c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0
47
+ L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0
48
+ c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5
49
+ l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4
50
+ c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1
51
+ c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"
52
+ />
53
+ <Path
54
+ d="M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1
55
+ s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1
56
+ c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1
57
+ c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0
58
+ L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0
59
+ c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5
60
+ l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4
61
+ c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1
62
+ c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"
63
+ />
64
+ <Path d="M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z" />
65
+ <Path d="M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z" />
66
+ </IconWrapper>
67
+ );
68
+
69
+ export const BackupIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
70
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
71
+ <Path
72
+ d="M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1
73
+ l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4
74
+ c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1
75
+ c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4
76
+ C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6
77
+ c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2
78
+ c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8
79
+ c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2
80
+ l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8
81
+ C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0
82
+ c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1
83
+ c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4
84
+ C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0
85
+ C6.6,8.5,6.3,7.6,5.9,6.7z"
86
+ />
87
+ </IconWrapper>
88
+ );
89
+
90
+ export const BoostIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
91
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
92
+ <Path
93
+ fillRule="evenodd"
94
+ clipRule="evenodd"
95
+ d="M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"
96
+ />
97
+ </IconWrapper>
98
+ );
99
+
100
+ export const CrmIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
101
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
102
+ <Path d="M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" />
103
+ </IconWrapper>
104
+ );
105
+
106
+ export const ExtrasIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
107
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
108
+ <Path d="M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z" />
109
+ </IconWrapper>
110
+ );
111
+
112
+ export const ProtectIcon: React.FC< BaseIconProps > = ( {
113
+ opacity = 1,
114
+ size,
115
+ className,
116
+ color,
117
+ } ) => (
118
+ <IconWrapper className={ className } size={ size } opacity={ opacity } color={ color }>
119
+ <Path d="M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z" />
120
+ <Path d="M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z" />
121
+ </IconWrapper>
122
+ );
123
+
124
+ export const ScanIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
125
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
126
+ <Path d="m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z" />
127
+ </IconWrapper>
128
+ );
129
+
130
+ export const SearchIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
131
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
132
+ <Path d="M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z" />
133
+ </IconWrapper>
134
+ );
135
+
136
+ export const SocialIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
137
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
138
+ <Path d="M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z" />
139
+ </IconWrapper>
140
+ );
141
+
142
+ export const VideopressIcon: React.FC< BaseIconProps > = ( { opacity = 1, size, color } ) => (
143
+ <IconWrapper size={ size } opacity={ opacity } color={ color }>
144
+ <Path
145
+ fillRule="evenodd"
146
+ clipRule="evenodd"
147
+ d="M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7
148
+ h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9
149
+ c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"
150
+ />
151
+ </IconWrapper>
152
+ );
153
+
154
+ export const StarIcon: React.FC< BaseIconProps > = ( {
155
+ size,
156
+ className = styles[ 'star-icon' ],
157
+ color,
158
+ } ) => (
159
+ <IconWrapper className={ className } size={ size } color={ color }>
160
+ <Path d="M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304" />
161
+ </IconWrapper>
162
+ );
163
+
164
+ export const CheckmarkIcon: React.FC< BaseIconProps > = ( {
165
+ size,
166
+ className = styles[ 'checkmark-icon' ],
167
+ color,
168
+ } ) => (
169
+ <IconWrapper className={ className } size={ size } color={ color }>
170
+ <Path d="M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z" />
171
+ </IconWrapper>
172
+ );
173
+
174
+ export const JetpackIcon: React.FC< BaseIconProps > = ( {
175
+ size,
176
+ className = styles.jetpack,
177
+ color,
178
+ } ) => {
179
+ return (
180
+ <IconWrapper className={ className } size={ size } color={ color } viewBox="0 0 32 32">
181
+ <Path
182
+ className="jetpack-logo__icon-circle"
183
+ d="M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"
184
+ />
185
+ <Polygon fill="#fff" points="15,19 7,19 15,3" />
186
+ <Polygon fill="#fff" points="17,29 17,13 25,13" />
187
+ </IconWrapper>
188
+ );
189
+ };
190
+
191
+ /**
192
+ * Wrapper of the Social Icons. Adds a default CSS class.
193
+ *
194
+ * @param {SocialIconWrapperProps} props - Component props.
195
+ * @returns {React.ReactNode} - Social Icon component.
196
+ */
197
+ const SocialIconWrapper: React.FC< SocialIconWrapperProps > = ( {
198
+ className,
199
+ fill = 'none',
200
+ size,
201
+ children,
202
+ } ) => {
203
+ return (
204
+ <IconWrapper
205
+ className={ classNames( styles.socialIcon, className ) }
206
+ size={ size }
207
+ color={ fill }
208
+ >
209
+ { children }
210
+ </IconWrapper>
211
+ );
212
+ };
213
+
214
+ export const FacebookIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
215
+ return (
216
+ <SocialIconWrapper
217
+ fill={ fill }
218
+ size={ size }
219
+ className={ classNames( styles.facebook, className ) }
220
+ >
221
+ <Path
222
+ 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
223
+ 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"
224
+ />
225
+ </SocialIconWrapper>
226
+ );
227
+ };
228
+
229
+ export const InstagramIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
230
+ return (
231
+ <SocialIconWrapper
232
+ fill={ fill }
233
+ size={ size }
234
+ className={ classNames( styles.instagram, className ) }
235
+ >
236
+ <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" />
237
+ </SocialIconWrapper>
238
+ );
239
+ };
240
+
241
+ export const TwitterIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
242
+ return (
243
+ <SocialIconWrapper
244
+ fill={ fill }
245
+ size={ size }
246
+ className={ classNames( styles.twitter, className ) }
247
+ >
248
+ <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" />
249
+ </SocialIconWrapper>
250
+ );
251
+ };
252
+
253
+ export const LinkedinIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
254
+ return (
255
+ <SocialIconWrapper
256
+ fill={ fill }
257
+ size={ size }
258
+ className={ classNames( styles.linkedin, className ) }
259
+ >
260
+ <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" />
261
+ </SocialIconWrapper>
262
+ );
263
+ };
264
+
265
+ export const TumblrIcon: React.FC< SocialIconWrapperProps > = ( {
266
+ fill,
267
+ size,
268
+ className,
269
+ invert,
270
+ } ) => {
271
+ return (
272
+ <SocialIconWrapper
273
+ fill={ fill }
274
+ size={ size }
275
+ className={ classNames( styles.tumblr, className ) }
276
+ >
277
+ { invert ? (
278
+ <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" />
279
+ ) : (
280
+ <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" />
281
+ ) }
282
+ </SocialIconWrapper>
283
+ );
284
+ };
285
+
286
+ export const GoogleIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
287
+ return (
288
+ <SocialIconWrapper
289
+ fill={ fill }
290
+ size={ size }
291
+ className={ classNames( styles.google, className ) }
292
+ >
293
+ <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" />
294
+ </SocialIconWrapper>
295
+ );
296
+ };
297
+
298
+ export const MastodonIcon: React.FC< SocialIconWrapperProps > = ( { fill, size, className } ) => {
299
+ return (
300
+ <SocialIconWrapper
301
+ fill={ fill }
302
+ size={ size }
303
+ className={ classNames( styles.mastodon, className ) }
304
+ >
305
+ <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" />
306
+ </SocialIconWrapper>
307
+ );
308
+ };
309
+
310
+ const jetpackIcons = {
311
+ 'anti-spam': AntiSpamIcon,
312
+ backup: BackupIcon,
313
+ boost: BoostIcon,
314
+ crm: CrmIcon,
315
+ extras: ExtrasIcon,
316
+ protect: ProtectIcon,
317
+ scan: ScanIcon,
318
+ search: SearchIcon,
319
+ social: SocialIcon,
320
+ star: StarIcon,
321
+ videopress: VideopressIcon,
322
+ jetpack: JetpackIcon,
323
+ };
324
+
325
+ const socialIcons = {
326
+ facebook: FacebookIcon,
327
+ instagram: InstagramIcon,
328
+ twitter: TwitterIcon,
329
+ linkedin: LinkedinIcon,
330
+ tumblr: TumblrIcon,
331
+ google: GoogleIcon,
332
+ mastodon: MastodonIcon,
333
+ };
334
+
335
+ const iconsMap = {
336
+ ...jetpackIcons,
337
+ ...socialIcons,
338
+ };
339
+
340
+ export type JetpackIconSlug = keyof typeof jetpackIcons;
341
+
342
+ export type SocialIconSlug = keyof typeof socialIcons;
343
+
344
+ export type IconsMap = typeof iconsMap;
345
+
346
+ export type IconSlug = keyof IconsMap;
347
+
348
+ /**
349
+ * Return icon component by slug.
350
+ *
351
+ * @param {string} slug - Icon slug.
352
+ * @returns {React.ComponentType<BaseIconProps>} Icon component.
353
+ */
354
+ export function getIconBySlug< Slug extends IconSlug >( slug: Slug ): IconsMap[ Slug ] {
355
+ if ( ! iconsMap[ slug ] ) {
356
+ return null;
357
+ }
358
+
359
+ return iconsMap[ slug ];
360
+ }
361
+
362
+ export const SocialServiceIcon: React.FC< {
363
+ serviceName: keyof typeof socialIcons;
364
+ className?: string;
365
+ invert?: boolean;
366
+ } > = ( { serviceName, className, invert } ) => {
367
+ const Icon = getIconBySlug( serviceName );
368
+ return Icon ? <Icon className={ className } invert={ invert } /> : null;
369
+ };
@@ -0,0 +1,65 @@
1
+ import * as allIcons from '../index';
2
+ import styles from './style.module.scss';
3
+ import type { ComponentStory, ComponentMeta } from '@storybook/react';
4
+
5
+ export default {
6
+ title: 'JS Packages/Components/Icons',
7
+ component: allIcons,
8
+ parameters: {},
9
+ } as ComponentMeta< typeof allIcons >;
10
+
11
+ const sizes = [
12
+ {
13
+ label: 'small',
14
+ value: '24',
15
+ },
16
+ {
17
+ label: 'medium',
18
+ value: '48',
19
+ },
20
+ {
21
+ label: 'large',
22
+ value: '72',
23
+ },
24
+ ];
25
+
26
+ /**
27
+ * Icons story components.
28
+ *
29
+ * @returns {object} - story component
30
+ */
31
+ function IconsStory() {
32
+ return (
33
+ <div>
34
+ { sizes.map( size => (
35
+ <div key={ size.label }>
36
+ <h3>{ size.label }</h3>
37
+ <div className={ styles[ 'icons-container' ] }>
38
+ { Object.keys( allIcons ).map( key => {
39
+ const Icon = allIcons[ key ];
40
+ if ( ! Icon.displayName || 'getIconBySlug' === Icon.displayName ) {
41
+ return null;
42
+ }
43
+
44
+ return (
45
+ <div
46
+ className={ `${ styles[ 'icon-wrapper' ] } ${ styles[ size.label ] }` }
47
+ key={ key }
48
+ >
49
+ <Icon size={ size.value } />
50
+ <span>{ Icon.displayName.replace( /icon/gi, '' ) }</span>
51
+ </div>
52
+ );
53
+ } ) }
54
+ </div>
55
+ </div>
56
+ ) ) }
57
+ </div>
58
+ );
59
+ }
60
+
61
+ const Template: ComponentStory< typeof allIcons > = args => <IconsStory { ...args } />;
62
+
63
+ const DefaultArgs = {};
64
+ export const Default = Template.bind( {} );
65
+ Default.args = DefaultArgs;
@@ -0,0 +1,33 @@
1
+ .icons-container {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ margin-bottom: 20px;
5
+ }
6
+
7
+ .icon-wrapper {
8
+ padding: 10px;
9
+ box-shadow: 0 0 1px inset rgba(0, 0, 0 , 0.5 );
10
+ background-color: white;
11
+ border-radius: 5px;
12
+ margin: 2px;
13
+ display: flex;
14
+ flex-direction: column;
15
+ align-items: center;
16
+
17
+ &.small {
18
+ font-size: 11px;
19
+ }
20
+
21
+ &.medium {
22
+ font-size: 12px;
23
+ }
24
+
25
+ &.large {
26
+ font-size: 14px;
27
+ }
28
+
29
+ span {
30
+ margin-top: 10px;
31
+ color: #444;
32
+ }
33
+ }
@@ -0,0 +1,40 @@
1
+ @import '@automattic/jetpack-base-styles/gutenberg-base-styles';
2
+
3
+ .star-icon {
4
+ fill: black;
5
+ }
6
+
7
+ .jetpack,
8
+ .checkmark-icon {
9
+ fill: var(--jp-green-primary);
10
+ }
11
+
12
+ .socialIcon {
13
+ fill: $gray-700;
14
+ &.facebook {
15
+ fill: var( --color-facebook );
16
+ border-radius: 50% !important;
17
+ }
18
+ &.instagram {
19
+ fill: var( --color-instagram );
20
+ }
21
+ &.twitter {
22
+ fill: var( --color-twitter );
23
+ }
24
+ &.linkedin {
25
+ fill: var( --color-linkedin );
26
+ }
27
+ &.tumblr {
28
+ fill: var( --color-tumblr );
29
+ }
30
+ &.google {
31
+ fill: var( --color-gplus );
32
+ }
33
+ &.mastodon {
34
+ fill: var( --color-mastodon );
35
+ }
36
+ &.instagram {
37
+ fill: var( --color-instagram );
38
+ }
39
+ }
40
+
@@ -0,0 +1,38 @@
1
+ import type React from 'react';
2
+
3
+ export type BaseIconProps = {
4
+ /**
5
+ * Icon size.
6
+ */
7
+ size?: number;
8
+
9
+ /**
10
+ * Opacity for SVG shapes
11
+ */
12
+ opacity?: number;
13
+
14
+ /**
15
+ * Icon viewBox.
16
+ */
17
+ viewBox?: string;
18
+
19
+ /**
20
+ * Icon component children.
21
+ */
22
+ children?: React.ReactNode;
23
+
24
+ /**
25
+ * Icon class name. Optional.
26
+ */
27
+ className?: string;
28
+
29
+ /**
30
+ * RGB Icon color. Optional.
31
+ */
32
+ color?: string;
33
+ };
34
+
35
+ export type SocialIconWrapperProps = Pick< BaseIconProps, 'className' | 'size' | 'children' > & {
36
+ fill?: string;
37
+ invert?: boolean;
38
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import classnames from 'classnames';
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import styles from './style.module.scss';
10
+ import { IndeterminateProgressBarProps } from './types';
11
+ import type React from 'react';
12
+
13
+ /**
14
+ * Indeterminate Progress Bar component
15
+ *
16
+ * @param {IndeterminateProgressBarProps} props - Component props.
17
+ * @returns {React.ReactNode} - IndeterminateProgressBar react component.
18
+ */
19
+ const IndeterminateProgressBar: React.FC< IndeterminateProgressBarProps > = ( { className } ) => {
20
+ return (
21
+ <div
22
+ className={ classnames( className, styles[ 'indeterminate-progress-bar' ] ) }
23
+ aria-label={ __( 'Indeterminate Progress Bar', 'jetpack' ) }
24
+ />
25
+ );
26
+ };
27
+
28
+ export default IndeterminateProgressBar;
@@ -0,0 +1,14 @@
1
+ import IndeterminateProgressBar from '..';
2
+ import type { ComponentStory, ComponentMeta } from '@storybook/react';
3
+
4
+ export default {
5
+ title: 'JS Packages/Components/Indeterminate Progress Bar',
6
+ component: IndeterminateProgressBar,
7
+ } as ComponentMeta< typeof IndeterminateProgressBar >;
8
+
9
+ const Template: ComponentStory< typeof IndeterminateProgressBar > = args => {
10
+ return <IndeterminateProgressBar { ...args } />;
11
+ };
12
+
13
+ export const _default = Template.bind( {} );
14
+ _default.args = {};
@@ -0,0 +1,34 @@
1
+ :root {
2
+ --jp-indeterminate-progress-bar__light-color: #F6F7F7;
3
+ --jp-indeterminate-progress-bar__dark-color: #EDEDEE;
4
+ }
5
+
6
+ .indeterminate-progress-bar {
7
+ width: 100%;
8
+ height: 24px;
9
+ background-color: transparent;
10
+ border-radius: calc(var(--spacing-base) * 3);
11
+
12
+ pointer-events: none;
13
+ background-size: 68px 100%;
14
+ background-image: linear-gradient(
15
+ -45deg,
16
+ var(--jp-indeterminate-progress-bar__light-color) 33%,
17
+ var(--jp-indeterminate-progress-bar__dark-color) 33%,
18
+ var(--jp-indeterminate-progress-bar__dark-color) 71%,
19
+ var(--jp-indeterminate-progress-bar__light-color) 71%
20
+ );
21
+ display: inline-block;
22
+ }
23
+
24
+ @keyframes indeterminate_progress_bar__animation {
25
+ 0% {
26
+ background-position: 136px 0;
27
+ }
28
+ }
29
+
30
+ @media (prefers-reduced-motion: no-preference) {
31
+ .indeterminate-progress-bar {
32
+ animation: indeterminate_progress_bar__animation 2000ms infinite linear;
33
+ }
34
+ }
@@ -0,0 +1,6 @@
1
+ export type IndeterminateProgressBarProps = {
2
+ /**
3
+ * Optional classname to apply to the root element.
4
+ */
5
+ className?: string;
6
+ };
@@ -0,0 +1,21 @@
1
+ # Jetpack Admin Footer
2
+
3
+ Component that renders Jetpack Admin Footer.
4
+ It takes moduleName and URL to show in the footer.
5
+
6
+ #### How to use:
7
+
8
+ ```js
9
+ <JetpackFooter
10
+ moduleName="Jetpack Search"
11
+ a8cLogoHref="https://www.jetpack.com"
12
+ className="jp-dashboard-footer"
13
+ />
14
+ ```
15
+
16
+ #### Props
17
+
18
+ - `className`: String - (default: `jp-dashboard-footer`) the additional class name set on the element.
19
+ - `a8cLogoHref`: String - (default: `https://www.jetpack.com`) link to be added on 'An Automattic Airline'.
20
+ - `moduleName`: String - (default: `Jetpack`) set the name of the Module, e.g. `Jetpack Search`.
21
+ - `menu`: JetpackFooterMenuItem[] - (default: `null`) set the menu items to be rendered in the footer.