@automattic/jetpack-components 1.1.6 → 1.1.8

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 (189) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/components/action-button/index.d.ts +2 -3
  3. package/build/components/action-button/index.js +1 -8
  4. package/build/components/action-popover/types.d.ts +4 -3
  5. package/build/components/admin-page/index.d.ts +3 -3
  6. package/build/components/admin-page/index.js +1 -1
  7. package/build/components/admin-page/types.d.ts +3 -2
  8. package/build/components/admin-section/basic/index.d.ts +3 -3
  9. package/build/components/admin-section/basic/index.js +1 -1
  10. package/build/components/admin-section/hero/index.d.ts +3 -3
  11. package/build/components/admin-section/hero/index.js +1 -1
  12. package/build/components/admin-section/types.d.ts +2 -1
  13. package/build/components/alert/index.d.ts +9 -9
  14. package/build/components/alert/index.js +7 -7
  15. package/build/components/automattic-byline-logo/index.d.ts +3 -3
  16. package/build/components/automattic-byline-logo/index.js +1 -1
  17. package/build/components/automattic-byline-logo/types.d.ts +2 -2
  18. package/build/components/automattic-for-agencies-logo/index.d.ts +3 -3
  19. package/build/components/automattic-for-agencies-logo/index.js +1 -1
  20. package/build/components/automattic-icon-logo/index.d.ts +3 -3
  21. package/build/components/automattic-icon-logo/index.js +1 -1
  22. package/build/components/badge/index.d.ts +4 -4
  23. package/build/components/badge/index.js +1 -1
  24. package/build/components/boost-score-graph/index.d.ts +2 -2
  25. package/build/components/boost-score-graph/index.js +1 -1
  26. package/build/components/boost-score-graph/uplot-line-chart.d.ts +3 -3
  27. package/build/components/boost-score-graph/uplot-line-chart.js +1 -1
  28. package/build/components/boost-score-graph/use-resize.d.ts +4 -4
  29. package/build/components/boost-score-graph/use-resize.js +2 -2
  30. package/build/components/button/index.d.ts +2 -3
  31. package/build/components/button/index.js +1 -7
  32. package/build/components/button/types.d.ts +4 -4
  33. package/build/components/chip/index.d.ts +3 -3
  34. package/build/components/chip/index.js +1 -1
  35. package/build/components/contextual-upgrade-trigger/index.d.ts +2 -2
  36. package/build/components/copy-to-clipboard/index.d.ts +2 -2
  37. package/build/components/decorative-card/index.d.ts +3 -3
  38. package/build/components/decorative-card/index.js +2 -2
  39. package/build/components/dialog/index.d.ts +10 -10
  40. package/build/components/dialog/index.js +6 -6
  41. package/build/components/donut-meter/index.d.ts +3 -3
  42. package/build/components/donut-meter/index.js +1 -1
  43. package/build/components/icon-tooltip/index.d.ts +3 -3
  44. package/build/components/icon-tooltip/index.js +1 -1
  45. package/build/components/icon-tooltip/types.d.ts +2 -1
  46. package/build/components/icons/index.d.ts +51 -51
  47. package/build/components/icons/index.js +4 -4
  48. package/build/components/icons/types.d.ts +2 -2
  49. package/build/components/indeterminate-progress-bar/index.d.ts +3 -3
  50. package/build/components/indeterminate-progress-bar/index.js +1 -1
  51. package/build/components/jetpack-footer/index.d.ts +3 -3
  52. package/build/components/jetpack-footer/index.js +1 -1
  53. package/build/components/jetpack-logo/index.d.ts +2 -2
  54. package/build/components/jetpack-protect-logo/index.d.ts +2 -2
  55. package/build/components/jetpack-search-logo/index.d.ts +2 -2
  56. package/build/components/jetpack-vaultpress-backup-logo/index.d.ts +2 -2
  57. package/build/components/jetpack-videopress-logo/index.d.ts +2 -2
  58. package/build/components/layout/col/index.d.ts +3 -3
  59. package/build/components/layout/col/index.js +1 -1
  60. package/build/components/layout/container/index.d.ts +1 -2
  61. package/build/components/layout/container/index.js +3 -3
  62. package/build/components/layout/types.d.ts +3 -2
  63. package/build/components/loading-placeholder/index.d.ts +2 -2
  64. package/build/components/notice/index.d.ts +12 -12
  65. package/build/components/notice/index.js +8 -8
  66. package/build/components/number-slider/index.d.ts +3 -3
  67. package/build/components/number-slider/index.js +3 -3
  68. package/build/components/number-slider/types.d.ts +2 -2
  69. package/build/components/popover/index.d.ts +5 -4
  70. package/build/components/pricing-card/index.d.ts +3 -3
  71. package/build/components/pricing-card/index.js +1 -1
  72. package/build/components/pricing-card/types.d.ts +6 -6
  73. package/build/components/pricing-table/index.d.ts +5 -5
  74. package/build/components/pricing-table/types.d.ts +7 -6
  75. package/build/components/product-offer/icons-card.d.ts +3 -3
  76. package/build/components/product-offer/icons-card.js +1 -1
  77. package/build/components/product-offer/index.d.ts +3 -3
  78. package/build/components/product-offer/index.js +1 -1
  79. package/build/components/product-offer/product-offer-header.d.ts +3 -3
  80. package/build/components/product-offer/product-offer-header.js +1 -1
  81. package/build/components/product-offer/types.d.ts +2 -1
  82. package/build/components/product-price/index.d.ts +3 -3
  83. package/build/components/product-price/index.js +1 -1
  84. package/build/components/product-price/price.d.ts +3 -3
  85. package/build/components/product-price/price.js +1 -1
  86. package/build/components/product-price/types.d.ts +2 -1
  87. package/build/components/progress-bar/index.d.ts +3 -3
  88. package/build/components/progress-bar/index.js +1 -1
  89. package/build/components/qr-code/index.d.ts +5 -5
  90. package/build/components/qr-code/index.js +1 -1
  91. package/build/components/radio-control/index.d.ts +4 -3
  92. package/build/components/record-meter-bar/index.d.ts +3 -3
  93. package/build/components/record-meter-bar/index.js +1 -1
  94. package/build/components/spinner/index.js +0 -1
  95. package/build/components/split-button/index.d.ts +2 -2
  96. package/build/components/split-button/types.d.ts +3 -5
  97. package/build/components/stat-card/index.d.ts +1 -1
  98. package/build/components/stat-card/index.js +1 -1
  99. package/build/components/stat-card/types.d.ts +2 -1
  100. package/build/components/status/index.d.ts +2 -1
  101. package/build/components/swipeable/index.js +1 -1
  102. package/build/components/terms-of-service/index.d.ts +2 -1
  103. package/build/components/text/index.d.ts +9 -9
  104. package/build/components/text/index.js +4 -4
  105. package/build/components/text/types.d.ts +5 -5
  106. package/build/components/theme-provider/index.d.ts +3 -3
  107. package/build/components/theme-provider/index.js +1 -1
  108. package/build/components/theme-provider/types.d.ts +2 -1
  109. package/build/components/toggle-control/index.d.ts +4 -3
  110. package/build/components/upsell-banner/index.d.ts +3 -3
  111. package/build/components/upsell-banner/index.js +1 -1
  112. package/components/action-button/index.jsx +1 -8
  113. package/components/action-popover/index.tsx +0 -1
  114. package/components/action-popover/types.ts +4 -3
  115. package/components/admin-page/index.tsx +3 -3
  116. package/components/admin-page/types.ts +3 -2
  117. package/components/admin-section/basic/index.tsx +3 -3
  118. package/components/admin-section/hero/index.tsx +3 -3
  119. package/components/admin-section/types.ts +3 -1
  120. package/components/alert/index.tsx +9 -14
  121. package/components/automattic-byline-logo/index.tsx +3 -3
  122. package/components/automattic-byline-logo/types.ts +2 -2
  123. package/components/automattic-for-agencies-logo/index.tsx +3 -3
  124. package/components/automattic-icon-logo/index.tsx +3 -3
  125. package/components/badge/index.tsx +4 -4
  126. package/components/boost-score-graph/index.tsx +2 -2
  127. package/components/boost-score-graph/uplot-line-chart.tsx +5 -4
  128. package/components/boost-score-graph/use-resize.ts +6 -5
  129. package/components/button/index.tsx +3 -8
  130. package/components/button/types.ts +4 -4
  131. package/components/chip/index.tsx +3 -3
  132. package/components/contextual-upgrade-trigger/index.tsx +2 -2
  133. package/components/copy-to-clipboard/index.tsx +4 -4
  134. package/components/decorative-card/index.tsx +3 -7
  135. package/components/details-viewer/index.tsx +0 -1
  136. package/components/dialog/index.tsx +10 -10
  137. package/components/donut-meter/index.tsx +3 -3
  138. package/components/dot-pager/index.tsx +1 -1
  139. package/components/icon-tooltip/index.tsx +3 -3
  140. package/components/icon-tooltip/types.ts +3 -1
  141. package/components/icons/index.tsx +23 -32
  142. package/components/icons/types.ts +2 -2
  143. package/components/indeterminate-progress-bar/index.tsx +3 -3
  144. package/components/jetpack-footer/index.tsx +5 -5
  145. package/components/jetpack-logo/index.tsx +2 -2
  146. package/components/jetpack-protect-logo/index.tsx +2 -2
  147. package/components/jetpack-search-logo/index.tsx +2 -2
  148. package/components/jetpack-vaultpress-backup-logo/index.tsx +2 -2
  149. package/components/jetpack-videopress-logo/index.tsx +2 -2
  150. package/components/layout/col/index.tsx +3 -3
  151. package/components/layout/container/index.tsx +6 -6
  152. package/components/layout/types.ts +4 -2
  153. package/components/loading-placeholder/index.tsx +2 -2
  154. package/components/notice/index.tsx +12 -12
  155. package/components/number-slider/index.tsx +6 -5
  156. package/components/number-slider/types.ts +2 -2
  157. package/components/popover/index.tsx +5 -4
  158. package/components/pricing-card/index.tsx +3 -3
  159. package/components/pricing-card/types.ts +6 -6
  160. package/components/pricing-table/index.tsx +6 -5
  161. package/components/pricing-table/types.ts +7 -6
  162. package/components/product-offer/icons-card.tsx +4 -3
  163. package/components/product-offer/index.tsx +3 -3
  164. package/components/product-offer/product-offer-header.tsx +3 -3
  165. package/components/product-offer/types.ts +2 -1
  166. package/components/product-price/index.tsx +3 -3
  167. package/components/product-price/price.tsx +3 -3
  168. package/components/product-price/types.ts +3 -1
  169. package/components/progress-bar/index.tsx +3 -3
  170. package/components/qr-code/index.tsx +5 -5
  171. package/components/radio-control/index.tsx +4 -3
  172. package/components/record-meter-bar/index.tsx +4 -3
  173. package/components/spinner/README.md +2 -2
  174. package/components/spinner/index.jsx +0 -1
  175. package/components/split-button/index.tsx +2 -2
  176. package/components/split-button/types.ts +3 -5
  177. package/components/stat-card/index.tsx +2 -2
  178. package/components/stat-card/types.ts +3 -1
  179. package/components/status/index.tsx +2 -1
  180. package/components/swipeable/index.tsx +4 -3
  181. package/components/terms-of-service/index.tsx +3 -2
  182. package/components/text/index.tsx +9 -12
  183. package/components/text/types.ts +4 -4
  184. package/components/theme-provider/index.tsx +4 -3
  185. package/components/theme-provider/types.ts +3 -1
  186. package/components/toggle-control/index.tsx +4 -3
  187. package/components/upsell-banner/index.tsx +3 -3
  188. package/components/zendesk-chat/README.md +0 -1
  189. package/package.json +5 -5
@@ -20,7 +20,7 @@ const showPriceDecimals = (currencyObject) => {
20
20
  * The Pricing card component.
21
21
  *
22
22
  * @param {PricingCardProps} props -- The component props.
23
- * @return {React.ReactNode} The rendered component.
23
+ * @return {ReactNode} The rendered component.
24
24
  */
25
25
  const PricingCard = ({ currencyCode = 'USD', priceDetails = __('/month, paid yearly', 'jetpack-components'), ...props }) => {
26
26
  const currencyObjectBefore = getCurrencyObject(props.priceBefore, currencyCode);
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import type { Button } from '@wordpress/components';
5
- import type React from 'react';
5
+ import type { ComponentProps, ReactNode } from 'react';
6
6
  export type PricingCardProps = {
7
7
  /**
8
8
  * The Title.
@@ -11,7 +11,7 @@ export type PricingCardProps = {
11
11
  /**
12
12
  * The Icon.
13
13
  */
14
- icon?: string | React.ReactNode;
14
+ icon?: string | ReactNode;
15
15
  /**
16
16
  * Price before discount.
17
17
  */
@@ -35,17 +35,17 @@ export type PricingCardProps = {
35
35
  /**
36
36
  * The CTA callback to be called on click.
37
37
  */
38
- onCtaClick?: React.ComponentProps<typeof Button>['onClick'];
38
+ onCtaClick?: ComponentProps<typeof Button>['onClick'];
39
39
  /**
40
40
  * Optional informative text.
41
41
  */
42
- infoText?: React.ReactNode;
42
+ infoText?: ReactNode;
43
43
  /**
44
44
  * The TOS copy.
45
45
  */
46
- tosText?: React.ReactNode;
46
+ tosText?: ReactNode;
47
47
  /**
48
48
  * Optional Child nodes
49
49
  */
50
- children?: React.ReactNode;
50
+ children?: ReactNode;
51
51
  };
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import { PricingTableProps, PricingTableColumnProps, PricingTableHeaderProps, PricingTableItemProps } from './types.ts';
3
- export declare const PricingTableItem: React.FC<PricingTableItemProps>;
4
- export declare const PricingTableHeader: React.FC<PricingTableHeaderProps>;
5
- export declare const PricingTableColumn: React.FC<PricingTableColumnProps>;
6
- declare const PricingTable: React.FC<PricingTableProps>;
2
+ import type { FC } from 'react';
3
+ export declare const PricingTableItem: FC<PricingTableItemProps>;
4
+ export declare const PricingTableHeader: FC<PricingTableHeaderProps>;
5
+ export declare const PricingTableColumn: FC<PricingTableColumnProps>;
6
+ declare const PricingTable: FC<PricingTableProps>;
7
7
  export default PricingTable;
@@ -1,4 +1,5 @@
1
1
  import type { Placement } from '../icon-tooltip/types.ts';
2
+ import type { ReactElement, ReactNode } from 'react';
2
3
  export type PricingTableProps = {
3
4
  /**
4
5
  * Title of the pricing table.
@@ -9,14 +10,14 @@ export type PricingTableProps = {
9
10
  */
10
11
  items: {
11
12
  name: string;
12
- tooltipInfo?: React.ReactNode;
13
+ tooltipInfo?: ReactNode;
13
14
  tooltipTitle?: string;
14
15
  tooltipPlacement?: Placement;
15
16
  }[];
16
17
  /**
17
18
  * The columns to add to the table.
18
19
  */
19
- children: React.ReactNode;
20
+ children: ReactNode;
20
21
  /**
21
22
  * Whether to show the intro offer disclaimer text with the ToS.
22
23
  */
@@ -30,13 +31,13 @@ export type PricingTableColumnProps = {
30
31
  /**
31
32
  * Items to show in a column.
32
33
  */
33
- children: React.ReactElement[];
34
+ children: ReactElement[];
34
35
  };
35
36
  export type PricingTableHeaderProps = {
36
37
  /**
37
38
  * Items to show in a header.
38
39
  */
39
- children: React.ReactNode;
40
+ children: ReactNode;
40
41
  };
41
42
  export type PricingTableItemProps = {
42
43
  /**
@@ -50,12 +51,12 @@ export type PricingTableItemProps = {
50
51
  /**
51
52
  * A custom label to display instead of the default one.
52
53
  */
53
- label?: string | number | React.ReactElement;
54
+ label?: string | number | ReactElement;
54
55
  /**
55
56
  * Index of the item, relative to other PricingTableItem components. Internal use only.
56
57
  */
57
58
  index?: number;
58
- tooltipInfo?: React.ReactNode;
59
+ tooltipInfo?: ReactNode;
59
60
  /**
60
61
  * Title for the popover, not required.
61
62
  */
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
1
  import { IconsCardProps } from './types.ts';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * Icons composition for a bundle product,
5
5
  * based on the list of supported products.
6
6
  *
7
7
  * @param {IconsCardProps} props - Component props.
8
- * @return {React.ReactNode} Bundle product icons react component.
8
+ * @return {ReactNode} Bundle product icons react component.
9
9
  */
10
- export declare const IconsCard: React.FC<IconsCardProps>;
10
+ export declare const IconsCard: FC<IconsCardProps>;
@@ -8,7 +8,7 @@ import styles from './style.module.scss';
8
8
  * based on the list of supported products.
9
9
  *
10
10
  * @param {IconsCardProps} props - Component props.
11
- * @return {React.ReactNode} Bundle product icons react component.
11
+ * @return {ReactNode} Bundle product icons react component.
12
12
  */
13
13
  export const IconsCard = ({ products, icon, size = 24 }) => {
14
14
  if (icon) {
@@ -1,11 +1,11 @@
1
1
  import { ProductOfferProps } from './types.ts';
2
- import type React from 'react';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * Product Detail component.
5
5
  *
6
6
  * @param {ProductOfferProps} props - Component props.
7
- * @return {React.ReactNode} - ProductOffer react component.
7
+ * @return {ReactNode} - ProductOffer react component.
8
8
  */
9
- declare const ProductOffer: React.FC<ProductOfferProps>;
9
+ declare const ProductOffer: FC<ProductOfferProps>;
10
10
  export default ProductOffer;
11
11
  export * from './icons-card.tsx';
@@ -14,7 +14,7 @@ import styles from './style.module.scss';
14
14
  * Product Detail component.
15
15
  *
16
16
  * @param {ProductOfferProps} props - Component props.
17
- * @return {React.ReactNode} - ProductOffer react component.
17
+ * @return {ReactNode} - ProductOffer react component.
18
18
  */
19
19
  const ProductOffer = ({ addProductUrl, buttonDisclaimer, buttonText = '', className, description, error = '', features, hasRequiredPlan, icon, isBundle = false, isCard, isLoading, onAdd, pricing = {}, slug, subTitle = '', supportedProducts, title = '', }) => {
20
20
  const { isFree, price, currency, offPrice } = pricing;
@@ -1,9 +1,9 @@
1
1
  import { ProductOfferHeaderProps } from './types.ts';
2
- import type React from 'react';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * Product Detail Card Header component.
5
5
  *
6
6
  * @param {ProductOfferHeaderProps} props - Component props.
7
- * @return {React.ReactNode} ProductOfferHeader react component.
7
+ * @return {ReactNode} ProductOfferHeader react component.
8
8
  */
9
- export declare const ProductOfferHeader: React.FC<ProductOfferHeaderProps>;
9
+ export declare const ProductOfferHeader: FC<ProductOfferHeaderProps>;
@@ -7,7 +7,7 @@ import styles from './style.module.scss';
7
7
  * Product Detail Card Header component.
8
8
  *
9
9
  * @param {ProductOfferHeaderProps} props - Component props.
10
- * @return {React.ReactNode} ProductOfferHeader react component.
10
+ * @return {ReactNode} ProductOfferHeader react component.
11
11
  */
12
12
  export const ProductOfferHeader = ({ title = __('Popular upgrade', 'jetpack-components'), }) => {
13
13
  return (_jsxs("div", { className: styles['card-header'], children: [_jsx(Icon, { icon: star, className: styles['product-bundle-icon'], size: 24 }), _jsx(Text, { variant: "label", children: title })] }));
@@ -1,5 +1,6 @@
1
1
  import { ProductPriceProps } from '../product-price/types.ts';
2
2
  import type { JetpackIconSlug } from '../icons/index.tsx';
3
+ import type { ReactNode } from 'react';
3
4
  export type ProductOfferProps = {
4
5
  /**
5
6
  * Product slug.
@@ -72,7 +73,7 @@ export type ProductOfferProps = {
72
73
  /**
73
74
  * Content displayed below the Add button.
74
75
  */
75
- buttonDisclaimer?: React.ReactNode;
76
+ buttonDisclaimer?: ReactNode;
76
77
  /**
77
78
  * Error message.
78
79
  */
@@ -1,11 +1,11 @@
1
1
  import type { ProductPriceProps } from './types.ts';
2
- import type React from 'react';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * React component to render the price.
5
5
  *
6
6
  * @param {ProductPriceProps} props - Component props.
7
- * @return {React.ReactNode} Price react component.
7
+ * @return {ReactNode} Price react component.
8
8
  */
9
- declare const ProductPrice: React.FC<ProductPriceProps>;
9
+ declare const ProductPrice: FC<ProductPriceProps>;
10
10
  export default ProductPrice;
11
11
  export * from './price.tsx';
@@ -14,7 +14,7 @@ import styles from './style.module.scss';
14
14
  * React component to render the price.
15
15
  *
16
16
  * @param {ProductPriceProps} props - Component props.
17
- * @return {React.ReactNode} Price react component.
17
+ * @return {ReactNode} Price react component.
18
18
  */
19
19
  const ProductPrice = ({ price, offPrice, currency = '', showNotOffPrice = true, hideDiscountLabel = true, promoLabel = '', legend = __('/month, paid yearly', 'jetpack-components'), isNotConvenientPrice = false, hidePriceFraction = false, children, }) => {
20
20
  if ((price == null && offPrice == null) || !currency) {
@@ -1,9 +1,9 @@
1
1
  import type { PriceProps } from './types.ts';
2
- import type React from 'react';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * React component to render a Price composition.
5
5
  *
6
6
  * @param {PriceProps} props - Component props.
7
- * @return {React.ReactNode} -Price react component.
7
+ * @return {ReactNode} -Price react component.
8
8
  */
9
- export declare const Price: React.FC<PriceProps>;
9
+ export declare const Price: FC<PriceProps>;
@@ -7,7 +7,7 @@ import styles from './style.module.scss';
7
7
  * React component to render a Price composition.
8
8
  *
9
9
  * @param {PriceProps} props - Component props.
10
- * @return {React.ReactNode} -Price react component.
10
+ * @return {ReactNode} -Price react component.
11
11
  */
12
12
  export const Price = ({ value, currency, isOff, hidePriceFraction }) => {
13
13
  const classNames = clsx(styles.price, 'product-price_price', {
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  export type ProductPriceProps = {
2
3
  /**
3
4
  * Product price.
@@ -38,7 +39,7 @@ export type ProductPriceProps = {
38
39
  /**
39
40
  * Alternative legend with HTML syntax
40
41
  */
41
- children?: React.ReactNode;
42
+ children?: ReactNode;
42
43
  };
43
44
  export type PriceProps = {
44
45
  /**
@@ -1,10 +1,10 @@
1
1
  import { ProgressBarProps } from './types.ts';
2
- import type React from 'react';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * Progress Bar component
5
5
  *
6
6
  * @param {ProgressBarProps} props - Component props.
7
- * @return {React.ReactNode} - ProgressBar react component.
7
+ * @return {ReactNode} - ProgressBar react component.
8
8
  */
9
- declare const ProgressBar: React.FC<ProgressBarProps>;
9
+ declare const ProgressBar: FC<ProgressBarProps>;
10
10
  export default ProgressBar;
@@ -11,7 +11,7 @@ import styles from './style.module.scss';
11
11
  * Progress Bar component
12
12
  *
13
13
  * @param {ProgressBarProps} props - Component props.
14
- * @return {React.ReactNode} - ProgressBar react component.
14
+ * @return {ReactNode} - ProgressBar react component.
15
15
  */
16
16
  const ProgressBar = ({ className, progressClassName, progress, size = 'normal', }) => {
17
17
  if (progress == null) {
@@ -1,7 +1,7 @@
1
1
  import { QRCodeCanvas, QRCodeSVG } from 'qrcode.react';
2
- import type React from 'react';
3
- type QRCodeCanvasProps = React.ComponentProps<typeof QRCodeCanvas>;
4
- type QRCodeSVGProps = React.ComponentProps<typeof QRCodeSVG>;
2
+ import type { ComponentProps, FC } from 'react';
3
+ type QRCodeCanvasProps = ComponentProps<typeof QRCodeCanvas>;
4
+ type QRCodeSVGProps = ComponentProps<typeof QRCodeSVG>;
5
5
  export type QRCodeProps = {
6
6
  /**
7
7
  * The value to encode.
@@ -40,7 +40,7 @@ export type QRCodeProps = {
40
40
  * Renders a QR Code.
41
41
  *
42
42
  * @param {QRCodeProps} props - Component props
43
- * @return {React.ReactNode} - React component.
43
+ * @return {ReactNode} - React component.
44
44
  */
45
- declare const QRCode: React.FC<QRCodeProps>;
45
+ declare const QRCode: FC<QRCodeProps>;
46
46
  export default QRCode;
@@ -4,7 +4,7 @@ import { QRCodeCanvas, QRCodeSVG } from 'qrcode.react';
4
4
  * Renders a QR Code.
5
5
  *
6
6
  * @param {QRCodeProps} props - Component props
7
- * @return {React.ReactNode} - React component.
7
+ * @return {ReactNode} - React component.
8
8
  */
9
9
  const QRCode = ({ value = 'https://jetpack.com', size = 248, bgColor, fgColor, level, includeMargin, imageSettings, renderAs = 'canvas', }) => {
10
10
  const commonProps = {
@@ -1,3 +1,4 @@
1
+ import type { FC, ReactNode } from 'react';
1
2
  interface RadioControlProps {
2
3
  /** The current value. */
3
4
  selected: string;
@@ -6,9 +7,9 @@ interface RadioControlProps {
6
7
  /** Whether or not the radio control is currently disabled. */
7
8
  disabled?: boolean;
8
9
  /** Additional information to display below the radio control. */
9
- help?: React.ReactNode;
10
+ help?: ReactNode;
10
11
  /** The label for the radio control. */
11
- label?: React.ReactNode;
12
+ label?: ReactNode;
12
13
  /** If true, the label will only be visible to screen readers. */
13
14
  hideLabelFromVision?: boolean;
14
15
  /** A list of options to show. */
@@ -19,5 +20,5 @@ interface RadioControlProps {
19
20
  /** A callback function invoked when the value is changed. */
20
21
  onChange: (value: string) => void;
21
22
  }
22
- declare const RadioControl: React.FC<RadioControlProps>;
23
+ declare const RadioControl: FC<RadioControlProps>;
23
24
  export default RadioControl;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type { FC } from 'react';
2
2
  import './style.scss';
3
3
  type RecordMeterBarItem = {
4
4
  /**
@@ -56,7 +56,7 @@ export type RecordMeterBarProps = {
56
56
  * Generate Record Meter bar
57
57
  *
58
58
  * @param {RecordMeterBarProps} props - Props
59
- * @return {React.ReactElement} - JSX element
59
+ * @return {ReactElement} - JSX element
60
60
  */
61
- declare const RecordMeterBar: React.FC<RecordMeterBarProps>;
61
+ declare const RecordMeterBar: FC<RecordMeterBarProps>;
62
62
  export default RecordMeterBar;
@@ -8,7 +8,7 @@ import './style.scss';
8
8
  * Generate Record Meter bar
9
9
  *
10
10
  * @param {RecordMeterBarProps} props - Props
11
- * @return {React.ReactElement} - JSX element
11
+ * @return {ReactElement} - JSX element
12
12
  */
13
13
  const RecordMeterBar = ({ totalCount, items = [], showLegendLabelBeforeCount = false, sortByCount, className, tableCaption, legendTitle, recordTypeLabel, recordCountLabel, }) => {
14
14
  const total = useMemo(() => {
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import PropTypes from 'prop-types';
3
- import React from 'react';
4
3
  import './style.scss';
5
4
  const Spinner = ({ color = '#FFFFFF', className = '', size = 20 }) => {
6
5
  const theClassName = className + ' jp-components-spinner';
@@ -1,4 +1,4 @@
1
1
  import { SplitButtonProps } from './types.ts';
2
- import type React from 'react';
3
- declare const SplitButton: React.FC<SplitButtonProps>;
2
+ import type { FC } from 'react';
3
+ declare const SplitButton: FC<SplitButtonProps>;
4
4
  export default SplitButton;
@@ -1,7 +1,5 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import type { Button, DropdownMenu } from '@wordpress/components';
5
- type AllowedDropdownMenuProps = Pick<React.ComponentProps<typeof DropdownMenu>, 'controls' | 'popoverProps' | 'toggleProps' | 'label'>;
6
- export type SplitButtonProps = Omit<React.ComponentProps<typeof Button>, 'controls'> & AllowedDropdownMenuProps & Required<Pick<AllowedDropdownMenuProps, 'controls'>>;
2
+ import type { ComponentProps } from 'react';
3
+ type AllowedDropdownMenuProps = Pick<ComponentProps<typeof DropdownMenu>, 'controls' | 'popoverProps' | 'toggleProps' | 'label'>;
4
+ export type SplitButtonProps = Omit<ComponentProps<typeof Button>, 'controls'> & AllowedDropdownMenuProps & Required<Pick<AllowedDropdownMenuProps, 'controls'>>;
7
5
  export {};
@@ -3,7 +3,7 @@ import { StatCardProps } from './types.ts';
3
3
  * StatCard component
4
4
  *
5
5
  * @param {StatCardProps} props - Component props.
6
- * @return {React.ReactNode} - StatCard react component.
6
+ * @return {ReactNode} - StatCard react component.
7
7
  */
8
8
  declare const StatCard: ({ className, hideValue, icon, label, value, variant, }: StatCardProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export default StatCard;
@@ -14,7 +14,7 @@ import styles from './style.module.scss';
14
14
  * StatCard component
15
15
  *
16
16
  * @param {StatCardProps} props - Component props.
17
- * @return {React.ReactNode} - StatCard react component.
17
+ * @return {ReactNode} - StatCard react component.
18
18
  */
19
19
  const StatCard = ({ className, hideValue, icon, label, value, variant = 'square', }) => {
20
20
  const formattedValue = formatNumber(value);
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  export type StatCardProps = {
2
3
  /**
3
4
  * Custom className to be inserted.
@@ -10,7 +11,7 @@ export type StatCardProps = {
10
11
  /**
11
12
  * The stat card icon.
12
13
  */
13
- icon: React.JSX.Element;
14
+ icon: JSX.Element;
14
15
  /**
15
16
  * The stat label.
16
17
  */
@@ -1,7 +1,8 @@
1
+ import type { JSX } from 'react';
1
2
  interface StatusProps {
2
3
  status?: 'active' | 'error' | 'inactive' | 'action' | 'initializing';
3
4
  label?: string;
4
5
  className?: string;
5
6
  }
6
- declare const Status: ({ className, label, status }: StatusProps) => React.JSX.Element;
7
+ declare const Status: ({ className, label, status }: StatusProps) => JSX.Element;
7
8
  export default Status;
@@ -10,7 +10,7 @@ const TRANSITION_DURATION = '300ms';
10
10
  /**
11
11
  * Custom hook to observe and handle resize events on a DOM element.
12
12
  *
13
- * @return {[React.Dispatch<React.SetStateAction<HTMLElement | null>>, ResizeObserverEntry | null]} Tuple containing setter and entry
13
+ * @return {[Dispatch<SetStateAction<HTMLElement | null>>, ResizeObserverEntry | null]} Tuple containing setter and entry
14
14
  */
15
15
  function useResizeObserver() {
16
16
  const [observerEntry, setObserverEntry] = useState(null);
@@ -1,4 +1,5 @@
1
1
  import type { TermsOfServiceProps } from './types.ts';
2
+ import type { FC } from 'react';
2
3
  import './styles.scss';
3
- declare const TermsOfService: React.FC<TermsOfServiceProps>;
4
+ declare const TermsOfService: FC<TermsOfServiceProps>;
4
5
  export default TermsOfService;
@@ -1,32 +1,32 @@
1
- import React from 'react';
2
1
  import type { H3Props, TextProps, TitleProps } from './types.ts';
2
+ import type { FC } from 'react';
3
3
  /**
4
4
  * Text component.
5
5
  *
6
6
  * @param {TextProps} props - Component props.
7
- * @return {React.ReactElement} - JSX.Element
7
+ * @return {ReactElement} - JSX.Element
8
8
  */
9
- declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
9
+ declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLElement>>;
10
10
  export default Text;
11
11
  /**
12
12
  * Heading component - Medium size.
13
13
  *
14
14
  * @param {TextProps} props - Component props.
15
- * @return {React.ReactElement} - JSX.Element
15
+ * @return {ReactElement} - JSX.Element
16
16
  */
17
- export declare const H2: React.FC<TextProps>;
17
+ export declare const H2: FC<TextProps>;
18
18
  /**
19
19
  * Heading component - Small size,
20
20
  *
21
21
  * @param {H3Props} props - Component props.
22
- * @return {React.ReactElement} - JSX.Element
22
+ * @return {ReactElement} - JSX.Element
23
23
  */
24
- export declare const H3: React.FC<H3Props>;
24
+ export declare const H3: FC<H3Props>;
25
25
  /**
26
26
  * Title component, based on Text component.
27
27
  *
28
28
  * @param {TitleProps} props - Component props.
29
- * @return {React.ReactElement} - JSX.Element
29
+ * @return {ReactElement} - JSX.Element
30
30
  */
31
- export declare const Title: React.FC<TitleProps>;
31
+ export declare const Title: FC<TitleProps>;
32
32
  export * from './constants.ts';
@@ -7,7 +7,7 @@ import styles from './style.module.scss';
7
7
  * Text component.
8
8
  *
9
9
  * @param {TextProps} props - Component props.
10
- * @return {React.ReactElement} - JSX.Element
10
+ * @return {ReactElement} - JSX.Element
11
11
  */
12
12
  const Text = forwardRef(({ variant = 'body', children, component, className, ...componentProps }, ref) => {
13
13
  const Component = component || VARIANTS_MAPPING[variant] || 'span';
@@ -30,14 +30,14 @@ export default Text;
30
30
  * Heading component - Medium size.
31
31
  *
32
32
  * @param {TextProps} props - Component props.
33
- * @return {React.ReactElement} - JSX.Element
33
+ * @return {ReactElement} - JSX.Element
34
34
  */
35
35
  export const H2 = ({ children, ...componentProps }) => (_jsx(Text, { variant: "headline-medium", mb: 3, ...componentProps, children: children }));
36
36
  /**
37
37
  * Heading component - Small size,
38
38
  *
39
39
  * @param {H3Props} props - Component props.
40
- * @return {React.ReactElement} - JSX.Element
40
+ * @return {ReactElement} - JSX.Element
41
41
  */
42
42
  export const H3 = ({ children, weight = 'bold', ...componentProps }) => {
43
43
  const variant = `headline-small${weight === 'bold' ? '' : `-${weight}`}`;
@@ -47,7 +47,7 @@ export const H3 = ({ children, weight = 'bold', ...componentProps }) => {
47
47
  * Title component, based on Text component.
48
48
  *
49
49
  * @param {TitleProps} props - Component props.
50
- * @return {React.ReactElement} - JSX.Element
50
+ * @return {ReactElement} - JSX.Element
51
51
  */
52
52
  export const Title = ({ children, size = 'medium', ...componentProps }) => (_jsx(Text, { variant: `title-${size}`, mb: 1, ...componentProps, children: children }));
53
53
  export * from "./constants.js";
@@ -1,5 +1,5 @@
1
1
  import { VARIANTS_MAPPING } from './constants.ts';
2
- import type React from 'react';
2
+ import type { CSSProperties, ElementType, FC, ReactNode } from 'react';
3
3
  export type SpacingValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
4
4
  export type TextProps = {
5
5
  variant?: keyof typeof VARIANTS_MAPPING;
@@ -34,12 +34,12 @@ export type TextProps = {
34
34
  /** HTML Class */
35
35
  className?: string;
36
36
  /** The text itself that will be rendered. */
37
- children: React.ReactNode;
37
+ children: ReactNode;
38
38
  /** Force an specific tag (span, div) or use a custom component that will receive className and children */
39
- component?: React.FC<{
39
+ component?: FC<{
40
40
  [prop: string]: unknown;
41
- }> | React.ElementType;
42
- style?: React.CSSProperties;
41
+ }> | ElementType;
42
+ style?: CSSProperties;
43
43
  };
44
44
  export type H3Props = TextProps & {
45
45
  /** Font weight: 'bold' (default) | 'regular'. */
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { ThemeProviderProps } from './types.ts';
2
+ import type { FC } from 'react';
3
3
  export declare const typography: {
4
4
  '--font-headline-medium': string;
5
5
  '--font-headline-small': string;
@@ -74,7 +74,7 @@ export declare const spacing: {
74
74
  * ThemeProvider React component.
75
75
  *
76
76
  * @param {ThemeProviderProps} props - Component properties.
77
- * @return {React.ReactNode} ThemeProvider component.
77
+ * @return {ReactNode} ThemeProvider component.
78
78
  */
79
- declare const ThemeProvider: React.FC<ThemeProviderProps>;
79
+ declare const ThemeProvider: FC<ThemeProviderProps>;
80
80
  export default ThemeProvider;
@@ -102,7 +102,7 @@ const setup = (root, id, withGlobalStyles) => {
102
102
  * ThemeProvider React component.
103
103
  *
104
104
  * @param {ThemeProviderProps} props - Component properties.
105
- * @return {React.ReactNode} ThemeProvider component.
105
+ * @return {ReactNode} ThemeProvider component.
106
106
  */
107
107
  const ThemeProvider = ({ children = null, targetDom, id, withGlobalStyles = true, }) => {
108
108
  const themeWrapperRef = useRef();
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  export type ThemeProviderProps = {
2
3
  /**
3
4
  * An optional id to register and identify the provider instance.
@@ -10,7 +11,7 @@ export type ThemeProviderProps = {
10
11
  /**
11
12
  * Content
12
13
  */
13
- children?: React.ReactNode;
14
+ children?: ReactNode;
14
15
  /**
15
16
  * Inser global/reset styles
16
17
  */