@automattic/jetpack-components 1.4.16 → 1.5.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 (75) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/components/action-button/index.d.ts +4 -14
  3. package/build/components/action-button/index.js +2 -2
  4. package/build/components/action-popover/index.js +10 -6
  5. package/build/components/admin-page/index.d.ts +1 -0
  6. package/build/components/admin-page/index.js +26 -6
  7. package/build/components/admin-page/style.module.scss +26 -0
  8. package/build/components/admin-page/types.d.ts +28 -1
  9. package/build/components/alert/index.js +2 -1
  10. package/build/components/automattic-byline-logo/index.js +3 -1
  11. package/build/components/automattic-for-agencies-logo/index.d.ts +1 -1
  12. package/build/components/automattic-icon-logo/index.d.ts +1 -1
  13. package/build/components/automattic-icon-logo/index.js +3 -1
  14. package/build/components/boost-score-bar/index.js +7 -2
  15. package/build/components/boost-score-graph/background.js +13 -1
  16. package/build/components/boost-score-graph/index.js +3 -3
  17. package/build/components/boost-score-graph/tooltip.js +23 -3
  18. package/build/components/boost-score-graph/tooltips-plugin.js +1 -1
  19. package/build/components/boost-score-graph/uplot-line-chart.js +7 -7
  20. package/build/components/button/index.js +5 -3
  21. package/build/components/contextual-upgrade-trigger/index.js +8 -3
  22. package/build/components/copy-to-clipboard/index.js +2 -2
  23. package/build/components/decorative-card/index.js +2 -1
  24. package/build/components/details-viewer/index.js +5 -3
  25. package/build/components/dialog/index.js +7 -5
  26. package/build/components/diff-viewer/index.js +12 -6
  27. package/build/components/donut-meter/index.js +4 -2
  28. package/build/components/dot-pager/index.js +4 -2
  29. package/build/components/global-notices/global-notices.js +1 -1
  30. package/build/components/global-notices/index.js +2 -2
  31. package/build/components/gridicon/index.js +4 -2
  32. package/build/components/icon-tooltip/index.js +5 -3
  33. package/build/components/icons/index.js +12 -4
  34. package/build/components/jetpack-footer/index.js +17 -12
  35. package/build/components/jetpack-logo/index.js +5 -2
  36. package/build/components/jetpack-protect-logo/index.js +5 -2
  37. package/build/components/jetpack-search-logo/index.js +6 -2
  38. package/build/components/jetpack-vaultpress-backup-logo/index.js +7 -2
  39. package/build/components/jetpack-videopress-logo/index.js +5 -2
  40. package/build/components/layout/use-breakpoint-match/index.d.ts +1 -3
  41. package/build/components/loading-placeholder/index.d.ts +1 -1
  42. package/build/components/marked-lines/index.js +5 -3
  43. package/build/components/navigator-modal/footer.js +3 -2
  44. package/build/components/navigator-modal/header.js +4 -2
  45. package/build/components/navigator-modal/index.js +2 -2
  46. package/build/components/navigator-modal/screen.js +5 -3
  47. package/build/components/notice/index.js +2 -1
  48. package/build/components/popover/index.js +3 -1
  49. package/build/components/pricing-card/index.js +9 -3
  50. package/build/components/pricing-table/index.js +18 -10
  51. package/build/components/product-offer/icons-card.js +3 -2
  52. package/build/components/product-offer/index.js +14 -9
  53. package/build/components/product-offer/product-offer-header.js +4 -2
  54. package/build/components/product-price/index.js +15 -7
  55. package/build/components/product-price/price.js +4 -3
  56. package/build/components/record-meter-bar/index.js +20 -5
  57. package/build/components/spinner/index.d.ts +8 -8
  58. package/build/components/split-button/index.js +3 -1
  59. package/build/components/stat-card/index.js +5 -2
  60. package/build/components/status/index.js +4 -2
  61. package/build/components/swipeable/index.d.ts +3 -3
  62. package/build/components/swipeable/index.js +8 -4
  63. package/build/components/terms-of-service/index.js +2 -2
  64. package/build/components/testimonials/index.js +2 -2
  65. package/build/components/testimonials/testimonial.js +11 -1
  66. package/build/components/text/index.js +2 -2
  67. package/build/components/upsell-banner/index.js +7 -2
  68. package/build/components/zendesk-chat/index.js +1 -1
  69. package/build/index.js +66 -66
  70. package/components/admin-page/index.tsx +65 -13
  71. package/components/admin-page/style.module.scss +26 -0
  72. package/components/admin-page/types.ts +34 -1
  73. package/components/jetpack-footer/index.tsx +1 -1
  74. package/package.json +9 -8
  75. package/tools/copy-scss-to-build.mjs +1 -1
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Flex, FlexBlock, FlexItem, useNavigator } from '@wordpress/components';
3
3
  import clsx from 'clsx';
4
4
  import { useCallback, useContext } from 'react';
5
- import { NavigatorModalContext } from "./context.js";
5
+ import { NavigatorModalContext } from './context.js';
6
6
  /**
7
7
  * Renders a footer.
8
8
  *
@@ -21,7 +21,8 @@ export function Footer({ children, actions, isScreenLocked, className, ...props
21
21
  context.onClose?.();
22
22
  }
23
23
  }, [isScreenLocked, navigator, context]);
24
- return (_jsxs(Flex, { className: clsx('jp-navigator-modal__footer', className), ...props, children: [_jsx(FlexBlock, { children: children }), actions ? (_jsx(FlexItem, { children: _jsx(Flex, { children: actions.map((action, index) => {
24
+ return (_jsxs(Flex, { className: clsx('jp-navigator-modal__footer', className), ...props, children: [
25
+ _jsx(FlexBlock, { children: children }), actions ? (_jsx(FlexItem, { children: _jsx(Flex, { children: actions.map((action, index) => {
25
26
  if (typeof action === 'function') {
26
27
  return action({ navigate });
27
28
  }
@@ -3,7 +3,7 @@ import { Button, useNavigator } from '@wordpress/components';
3
3
  import { __, isRTL } from '@wordpress/i18n';
4
4
  import { chevronLeft, chevronRight, close } from '@wordpress/icons';
5
5
  import { useCallback, useContext } from 'react';
6
- import { NavigatorModalContext } from "./context.js";
6
+ import { NavigatorModalContext } from './context.js';
7
7
  /**
8
8
  * Renders a header for the NavigatorModal.
9
9
  * @param {HeaderProps} props - Props
@@ -16,5 +16,7 @@ export function Header({ icon, title, isScreenLocked }) {
16
16
  const onGoBack = useCallback(() => {
17
17
  navigator.goBack();
18
18
  }, [navigator]);
19
- return (_jsxs("div", { className: "jp-navigator-modal__header", children: [_jsxs("div", { className: "jp-navigator-modal__title-wrap", children: [!isScreenLocked ? (_jsx(Button, { label: __('Go back', 'jetpack-components'), icon: isRTL() ? chevronRight : chevronLeft, onClick: onGoBack, variant: "tertiary", size: "compact" })) : null, icon, _jsx("h1", { children: title })] }), context.isDismissible ? (_jsx(Button, { size: "compact", onClick: context.onClose, icon: close, label: __('Close', 'jetpack-components'), variant: "tertiary" })) : null] }));
19
+ return (_jsxs("div", { className: "jp-navigator-modal__header", children: [
20
+ _jsxs("div", { className: "jp-navigator-modal__title-wrap", children: [!isScreenLocked ? (_jsx(Button, { label: __('Go back', 'jetpack-components'), icon: isRTL() ? chevronRight : chevronLeft, onClick: onGoBack, variant: "tertiary", size: "compact" })) : null, icon, _jsx("h1", { children: title })
21
+ ] }), context.isDismissible ? (_jsx(Button, { size: "compact", onClick: context.onClose, icon: close, label: __('Close', 'jetpack-components'), variant: "tertiary" })) : null] }));
20
22
  }
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Modal, Navigator } from '@wordpress/components';
3
3
  import clsx from 'clsx';
4
4
  import { useCallback, useContext } from 'react';
5
- import { NavigatorModalContext } from "./context.js";
6
- import { Screen } from "./screen.js";
5
+ import { NavigatorModalContext } from './context.js';
6
+ import { Screen } from './screen.js';
7
7
  import './styles.scss';
8
8
  /**
9
9
  * Renders the internal NavigatorModal component.
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Flex, Navigator } from '@wordpress/components';
3
3
  import clsx from 'clsx';
4
- import { Footer } from "./footer.js";
5
- import { Header } from "./header.js";
4
+ import { Footer } from './footer.js';
5
+ import { Header } from './header.js';
6
6
  /**
7
7
  * Renders a screen.
8
8
  *
@@ -12,5 +12,7 @@ import { Header } from "./header.js";
12
12
  */
13
13
  export function Screen({ path, className, title, sidebar, headerIcon, isScreenLocked, footerContent, footerActions, children, content, ...props }) {
14
14
  const hasFooter = Boolean(footerContent || (footerActions && footerActions.length));
15
- return (_jsx(Navigator.Screen, { path: path, className: clsx('jp-navigator-modal__screen', className), ...props, children: _jsxs(Flex, { direction: "column", gap: 0, children: [_jsx(Header, { title: title, isScreenLocked: isScreenLocked, icon: headerIcon }), _jsxs(Flex, { gap: 0, align: "start", className: "jp-navigator-modal__body", children: [sidebar ? _jsx("div", { className: "jp-navigator-modal__sidebar", children: sidebar }) : null, _jsx("div", { className: "jp-navigator-modal__content", children: content ?? children })] }), hasFooter ? (_jsx(Footer, { actions: footerActions, isScreenLocked: isScreenLocked, children: footerContent })) : null] }) }));
15
+ return (_jsx(Navigator.Screen, { path: path, className: clsx('jp-navigator-modal__screen', className), ...props, children: _jsxs(Flex, { direction: "column", gap: 0, children: [
16
+ _jsx(Header, { title: title, isScreenLocked: isScreenLocked, icon: headerIcon }), _jsxs(Flex, { gap: 0, align: "start", className: "jp-navigator-modal__body", children: [sidebar ? _jsx("div", { className: "jp-navigator-modal__sidebar", children: sidebar }) : null, _jsx("div", { className: "jp-navigator-modal__content", children: content ?? children })
17
+ ] }), hasFooter ? (_jsx(Footer, { actions: footerActions, isScreenLocked: isScreenLocked, children: footerContent })) : null] }) }));
16
18
  }
@@ -30,6 +30,7 @@ const getIconByLevel = (level) => {
30
30
  */
31
31
  const Notice = ({ level = 'info', title, children, actions, hideCloseButton = false, onClose, }) => {
32
32
  const classes = clsx(styles.container, styles[`is-${level}`]);
33
- return (_jsxs("div", { className: classes, children: [_jsx("div", { className: styles['icon-wrapper'], children: _jsx(Icon, { icon: getIconByLevel(level), className: styles.icon }) }), _jsxs("div", { className: styles['main-content'], children: [title && _jsx("div", { className: styles.title, children: title }), children, actions && actions.length > 0 && (_jsx("div", { className: styles['action-bar'], children: actions.map((action, index) => (_jsx("div", { className: styles.action, children: action }, index))) }))] }), !hideCloseButton && (_jsx("button", { "aria-label": "close", className: styles['close-button'], onClick: onClose, children: _jsx(Icon, { icon: close }) }))] }));
33
+ return (_jsxs("div", { className: classes, children: [
34
+ _jsx("div", { className: styles['icon-wrapper'], children: _jsx(Icon, { icon: getIconByLevel(level), className: styles.icon }) }), _jsxs("div", { className: styles['main-content'], children: [title && _jsx("div", { className: styles.title, children: title }), children, actions && actions.length > 0 && (_jsx("div", { className: styles['action-bar'], children: actions.map((action, index) => (_jsx("div", { className: styles.action, children: action }, index))) }))] }), !hideCloseButton && (_jsx("button", { "aria-label": "close", className: styles['close-button'], onClick: onClose, children: _jsx(Icon, { icon: close }) }))] }));
34
35
  };
35
36
  export default Notice;
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import './style.scss';
3
3
  const Popover = ({ icon, children, action }) => {
4
- return (_jsxs("div", { className: "jp-popover", children: [_jsx("div", { className: "jp-popover__icon", children: icon }), _jsx("div", { className: "jp-popover__body", children: children }), _jsx("div", { className: "jp-popover__action", children: action })] }));
4
+ return (_jsxs("div", { className: "jp-popover", children: [
5
+ _jsx("div", { className: "jp-popover__icon", children: icon }), _jsx("div", { className: "jp-popover__body", children: children }), _jsx("div", { className: "jp-popover__action", children: action })
6
+ ] }));
5
7
  };
6
8
  export default Popover;
@@ -1,9 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getCurrencyObject } from '@automattic/number-formatters';
3
3
  import { Button } from '@wordpress/components';
4
4
  import { sprintf, __ } from '@wordpress/i18n';
5
5
  import { LoadingPlaceholder } from '@automattic/jetpack-components';
6
- import TermsOfService from "../terms-of-service/index.js";
6
+ import TermsOfService from '../terms-of-service/index.js';
7
7
  import './style.scss';
8
8
  /**
9
9
  * Whether or not to display a price's decimal part in the UI.
@@ -27,6 +27,12 @@ const PricingCard = ({ currencyCode = 'USD', priceDetails = __('/month, paid yea
27
27
  const currencyObjectAfter = getCurrencyObject(props.priceAfter, currencyCode);
28
28
  return (_jsxs("div", { className: "jp-components__pricing-card", children: [props.icon && (_jsx("div", { className: "jp-components__pricing-card__icon", children: 'string' === typeof props.icon ? (_jsx("img", { src: props.icon, alt: sprintf(
29
29
  /* translators: %s: the product name */
30
- __('Icon for the product %s', 'jetpack-components'), props.title) })) : (props.icon) })), _jsx("h1", { className: "jp-components__pricing-card__title", children: props.title }), _jsxs("div", { className: "jp-components__pricing-card__pricing", children: [props.priceAfter === 0 && _jsx(LoadingPlaceholder, { width: "100%", height: 48 }), props.priceBefore !== props.priceAfter && props.priceAfter > 0 && (_jsxs("div", { className: "jp-components__pricing-card__price-before", children: [_jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectBefore.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectBefore.integer }), showPriceDecimals(currencyObjectBefore) && (_jsxs("span", { className: "jp-components__pricing-card__price-decimal", children: [' ', currencyObjectBefore.fraction] })), _jsx("div", { className: "jp-components__pricing-card__price-strikethrough" })] })), props.priceAfter > 0 && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "jp-components__pricing-card__price-after", children: [_jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectAfter.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectAfter.integer }), showPriceDecimals(currencyObjectAfter) && (_jsx("span", { className: "jp-components__pricing-card__price-decimal", children: currencyObjectAfter.fraction }))] }), _jsx("span", { className: "jp-components__pricing-card__price-details", children: priceDetails })] }))] }), props.children && (_jsx("div", { className: "jp-components__pricing-card__extra-content-wrapper", children: props.children })), props.tosText && _jsx("div", { className: "jp-components__pricing-card__tos", children: props.tosText }), props.ctaText && (_jsxs(_Fragment, { children: [!props.tosText && (_jsx("div", { className: "jp-components__pricing-card__tos", children: _jsx(TermsOfService, { agreeButtonLabel: props.ctaText }) })), _jsx("div", { className: "jp-components__pricing-card__cta", children: _jsx(Button, { className: "jp-components__pricing-card__button", label: props.ctaText, onClick: props.onCtaClick, children: props.ctaText }) })] })), props.infoText && (_jsx("div", { className: "jp-components__pricing-card__info", children: props.infoText }))] }));
30
+ __('Icon for the product %s', 'jetpack-components'), props.title) })) : (props.icon) })), _jsx("h1", { className: "jp-components__pricing-card__title", children: props.title }), _jsxs("div", { className: "jp-components__pricing-card__pricing", children: [props.priceAfter === 0 && _jsx(LoadingPlaceholder, { width: "100%", height: 48 }), props.priceBefore !== props.priceAfter && props.priceAfter > 0 && (_jsxs("div", { className: "jp-components__pricing-card__price-before", children: [
31
+ _jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectBefore.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectBefore.integer }), showPriceDecimals(currencyObjectBefore) && (_jsxs("span", { className: "jp-components__pricing-card__price-decimal", children: [' ', currencyObjectBefore.fraction] })), _jsx("div", { className: "jp-components__pricing-card__price-strikethrough" })
32
+ ] })), props.priceAfter > 0 && (_jsxs(_Fragment, { children: [
33
+ _jsxs("div", { className: "jp-components__pricing-card__price-after", children: [
34
+ _jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectAfter.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectAfter.integer }), showPriceDecimals(currencyObjectAfter) && (_jsx("span", { className: "jp-components__pricing-card__price-decimal", children: currencyObjectAfter.fraction }))] }), _jsx("span", { className: "jp-components__pricing-card__price-details", children: priceDetails })
35
+ ] }))] }), props.children && (_jsx("div", { className: "jp-components__pricing-card__extra-content-wrapper", children: props.children })), props.tosText && _jsx("div", { className: "jp-components__pricing-card__tos", children: props.tosText }), props.ctaText && (_jsxs(_Fragment, { children: [!props.tosText && (_jsx("div", { className: "jp-components__pricing-card__tos", children: _jsx(TermsOfService, { agreeButtonLabel: props.ctaText }) })), _jsx("div", { className: "jp-components__pricing-card__cta", children: _jsx(Button, { className: "jp-components__pricing-card__button", label: props.ctaText, onClick: props.onCtaClick, children: props.ctaText }) })
36
+ ] })), props.infoText && (_jsx("div", { className: "jp-components__pricing-card__info", children: props.infoText }))] }));
31
37
  };
32
38
  export default PricingCard;
@@ -3,10 +3,10 @@ import { __, sprintf } from '@wordpress/i18n';
3
3
  import { Icon, check, closeSmall } from '@wordpress/icons';
4
4
  import clsx from 'clsx';
5
5
  import { createContext, useContext, Children, cloneElement, } from 'react';
6
- import IconTooltip from "../icon-tooltip/index.js";
7
- import useBreakpointMatch from "../layout/use-breakpoint-match/index.js";
8
- import TermsOfService from "../terms-of-service/index.js";
9
- import Text from "../text/index.js";
6
+ import IconTooltip from '../icon-tooltip/index.js';
7
+ import useBreakpointMatch from '../layout/use-breakpoint-match/index.js';
8
+ import TermsOfService from '../terms-of-service/index.js';
9
+ import Text from '../text/index.js';
10
10
  import styles from './styles.module.scss';
11
11
  const INCLUDED_TEXT = __('Included', 'jetpack-components');
12
12
  const NOT_INCLUDED_TEXT = __('Not included', 'jetpack-components');
@@ -44,9 +44,11 @@ export const PricingTableItem = ({ isIncluded = false, isComingSoon = false, ind
44
44
  if (isExplicitlyEmpty) {
45
45
  return (_jsx("div", { className: clsx(styles.item, styles.value, styles.empty) }));
46
46
  }
47
- return (_jsxs("div", { className: clsx(styles.item, styles.value), children: [_jsx(Icon, { className: clsx(styles.icon, showTick ? styles['icon-check'] : styles['icon-cross']), size: 32, icon: showTick ? check : closeSmall }), _jsx(Text, { variant: "body-small", children: label || defaultLabel }), showTooltip && (_jsx(IconTooltip, { title: tooltipTitle ? tooltipTitle : defaultTooltipTitle, iconClassName: styles['popover-icon'], className: clsx(styles.popover, tooltipClassName), placement: 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(tooltipTitle && tooltipInfo), children: _jsx(Text, { variant: "body-small", component: "div", children: tooltipInfo || defaultTooltipInfo }) }))] }));
47
+ return (_jsxs("div", { className: clsx(styles.item, styles.value), children: [
48
+ _jsx(Icon, { className: clsx(styles.icon, showTick ? styles['icon-check'] : styles['icon-cross']), size: 32, icon: showTick ? check : closeSmall }), _jsx(Text, { variant: "body-small", children: label || defaultLabel }), showTooltip && (_jsx(IconTooltip, { title: tooltipTitle ? tooltipTitle : defaultTooltipTitle, iconClassName: styles['popover-icon'], className: clsx(styles.popover, tooltipClassName), placement: 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(tooltipTitle && tooltipInfo), children: _jsx(Text, { variant: "body-small", component: "div", children: tooltipInfo || defaultTooltipInfo }) }))] }));
48
49
  };
49
- export const PricingTableHeader = ({ title, children }) => (_jsxs("div", { className: styles.headerContainer, children: [title && (_jsx(Text, { variant: "headline-small", className: styles.title, children: title })), _jsx("div", { className: styles.header, children: children })] }));
50
+ export const PricingTableHeader = ({ title, children }) => (_jsxs("div", { className: styles.headerContainer, children: [title && (_jsx(Text, { variant: "headline-small", className: styles.title, children: title })), _jsx("div", { className: styles.header, children: children })
51
+ ] }));
50
52
  export const PricingTableColumn = ({ primary = false, children, className, }) => {
51
53
  let index = 0;
52
54
  return (_jsx("div", { className: clsx(styles.card, { [styles['is-primary']]: primary }, className), children: Children.map(children, child => {
@@ -60,10 +62,13 @@ export const PricingTableColumn = ({ primary = false, children, className, }) =>
60
62
  };
61
63
  const PricingTable = ({ title, headerLogo, items, children, showIntroOfferDisclaimer = false, }) => {
62
64
  const [isLg] = useBreakpointMatch('lg');
63
- return (_jsxs(PricingTableContext.Provider, { value: items, children: [_jsx("div", { className: clsx(styles.container, { [styles['is-viewport-large']]: isLg }), style: {
65
+ return (_jsxs(PricingTableContext.Provider, { value: items, children: [
66
+ _jsx("div", { className: clsx(styles.container, { [styles['is-viewport-large']]: isLg }), style: {
64
67
  '--rows': items.length + 1,
65
68
  '--columns': Children.toArray(children).length + 1,
66
- }, children: _jsxs("div", { className: styles.table, children: [_jsxs("div", { children: [headerLogo && _jsx("div", { className: styles['header-logo'], children: headerLogo }), _jsx(Text, { variant: "headline-small", className: styles.tableTitle, children: title })] }), isLg &&
69
+ }, children: _jsxs("div", { className: styles.table, children: [
70
+ _jsxs("div", { children: [headerLogo && _jsx("div", { className: styles['header-logo'], children: headerLogo }), _jsx(Text, { variant: "headline-small", className: styles.tableTitle, children: title })
71
+ ] }), isLg &&
67
72
  items.map((item, i) => {
68
73
  // Skip rendering feature names that are empty
69
74
  if (!item.name) {
@@ -71,7 +76,10 @@ const PricingTable = ({ title, headerLogo, items, children, showIntroOfferDiscla
71
76
  }
72
77
  return (_jsxs("div", { className: clsx(styles.item, styles.feature, {
73
78
  [styles['last-feature']]: i === items.length - 1,
74
- }), children: [_jsx(Text, { variant: "body-small", children: _jsx("strong", { children: item.name }) }), item.tooltipInfo && (_jsx(IconTooltip, { title: item.tooltipTitle, iconClassName: styles['popover-icon'], className: styles.popover, placement: item.tooltipPlacement ? item.tooltipPlacement : 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(item.tooltipTitle && item.tooltipInfo), children: _jsx(Text, { variant: "body-small", children: item.tooltipInfo }) }))] }, i));
75
- }), children] }) }), _jsx("div", { className: styles['tos-container'], children: _jsxs("div", { className: styles.tos, children: [showIntroOfferDisclaimer && (_jsx(Text, { variant: "body-small", children: __('Reduced pricing is a limited offer for the first year and renews at regular price.', 'jetpack-components') })), _jsx(TermsOfService, { multipleButtons: true })] }) })] }));
79
+ }), children: [
80
+ _jsx(Text, { variant: "body-small", children: _jsx("strong", { children: item.name }) }), item.tooltipInfo && (_jsx(IconTooltip, { title: item.tooltipTitle, iconClassName: styles['popover-icon'], className: styles.popover, placement: item.tooltipPlacement ? item.tooltipPlacement : 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(item.tooltipTitle && item.tooltipInfo), children: _jsx(Text, { variant: "body-small", children: item.tooltipInfo }) }))] }, i));
81
+ }), children] }) }), _jsx("div", { className: styles['tos-container'], children: _jsxs("div", { className: styles.tos, children: [showIntroOfferDisclaimer && (_jsx(Text, { variant: "body-small", children: __('Reduced pricing is a limited offer for the first year and renews at regular price.', 'jetpack-components') })), _jsx(TermsOfService, { multipleButtons: true })
82
+ ] }) })
83
+ ] }));
76
84
  };
77
85
  export default PricingTable;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Icon, plus } from '@wordpress/icons';
3
3
  import { Fragment } from 'react';
4
- import { getIconBySlug } from "../icons/index.js";
4
+ import { getIconBySlug } from '../icons/index.js';
5
5
  import styles from './style.module.scss';
6
6
  /**
7
7
  * Icons composition for a bundle product,
@@ -18,6 +18,7 @@ export const IconsCard = ({ products, icon, size = 24 }) => {
18
18
  return (_jsx("div", { className: styles['product-bundle-icons'], children: products.map((product, index) => {
19
19
  const ProductIcon = getIconBySlug(product);
20
20
  const ProIcon = ProductIcon ? ProductIcon : () => null;
21
- return (_jsxs(Fragment, { children: [_jsx(ProIcon, { size: size }), index !== products.length - 1 && (_jsx(Icon, { className: styles['plus-icon'], icon: plus, size: 16 }, `icon-plugs${index * 2 + 1}`))] }, index));
21
+ return (_jsxs(Fragment, { children: [
22
+ _jsx(ProIcon, { size: size }), index !== products.length - 1 && (_jsx(Icon, { className: styles['plus-icon'], icon: plus, size: 16 }, `icon-plugs${index * 2 + 1}`))] }, index));
22
23
  }) }));
23
24
  };
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { __, sprintf } from '@wordpress/i18n';
3
3
  import { Icon, check } from '@wordpress/icons';
4
4
  import clsx from 'clsx';
5
- import Alert from "../alert/index.js";
6
- import Button from "../button/index.js";
7
- import { CheckmarkIcon } from "../icons/index.js";
8
- import ProductPrice from "../product-price/index.js";
9
- import Text, { H3, Title } from "../text/index.js";
10
- import { IconsCard } from "./icons-card.js";
11
- import { ProductOfferHeader } from "./product-offer-header.js";
5
+ import Alert from '../alert/index.js';
6
+ import Button from '../button/index.js';
7
+ import { CheckmarkIcon } from '../icons/index.js';
8
+ import ProductPrice from '../product-price/index.js';
9
+ import Text, { H3, Title } from '../text/index.js';
10
+ import { IconsCard } from './icons-card.js';
11
+ import { ProductOfferHeader } from './product-offer-header.js';
12
12
  import styles from './style.module.scss';
13
13
  /**
14
14
  * Product Detail component.
@@ -25,7 +25,12 @@ const ProductOffer = ({ addProductUrl, buttonDisclaimer, buttonText = '', classN
25
25
  return (_jsxs("div", { className: clsx(styles.wrapper, className, {
26
26
  [styles['is-bundle-card']]: isBundle,
27
27
  [styles['is-card']]: isCard || isBundle, // is card when is bundle.
28
- }), children: [isBundle && _jsx(ProductOfferHeader, {}), _jsxs("div", { className: styles['card-container'], children: [_jsx(IconsCard, { icon: icon, products: supportedProducts?.length ? supportedProducts : [slug], size: 32 }), _jsx(H3, { children: title }), subTitle && _jsx(Title, { mb: 3, children: subTitle }), description && _jsx(Text, { mb: 3, children: description }), _jsx("ul", { className: styles.features, children: features.map((feature, id) => (_jsxs(Text, { component: "li", variant: "body", children: [_jsx(Icon, { icon: check, size: 24, className: styles.check }), feature] }, `feature-${id}`))) }), needsPurchase && (_jsx(ProductPrice, { price: price, offPrice: offPrice, currency: currency })), isFree && _jsx(H3, { children: __('Free', 'jetpack-components') }), _jsx(Alert, { level: "error", showIcon: !!error, children: error }), buttonDisclaimer, (!isBundle || (isBundle && !hasRequiredPlan)) && (_jsx(Button, { onClick: addProductUrl ? null : onAdd, isLoading: isLoading, disabled: isLoading, variant: isLoading || !isBundle ? 'primary' : 'secondary', className: styles['add-button'], ...(addProductUrl ? { href: addProductUrl } : {}), children: buttonText || defautlButtonText })), isBundle && hasRequiredPlan && (_jsxs("div", { className: styles['product-has-required-plan'], children: [_jsx(CheckmarkIcon, { size: 36 }), _jsx(Text, { children: __('Active on your site', 'jetpack-components') })] }))] })] }));
28
+ }), children: [isBundle && _jsx(ProductOfferHeader, {}), _jsxs("div", { className: styles['card-container'], children: [
29
+ _jsx(IconsCard, { icon: icon, products: supportedProducts?.length ? supportedProducts : [slug], size: 32 }), _jsx(H3, { children: title }), subTitle && _jsx(Title, { mb: 3, children: subTitle }), description && _jsx(Text, { mb: 3, children: description }), _jsx("ul", { className: styles.features, children: features.map((feature, id) => (_jsxs(Text, { component: "li", variant: "body", children: [
30
+ _jsx(Icon, { icon: check, size: 24, className: styles.check }), feature] }, `feature-${id}`))) }), needsPurchase && (_jsx(ProductPrice, { price: price, offPrice: offPrice, currency: currency })), isFree && _jsx(H3, { children: __('Free', 'jetpack-components') }), _jsx(Alert, { level: "error", showIcon: !!error, children: error }), buttonDisclaimer, (!isBundle || (isBundle && !hasRequiredPlan)) && (_jsx(Button, { onClick: addProductUrl ? null : onAdd, isLoading: isLoading, disabled: isLoading, variant: isLoading || !isBundle ? 'primary' : 'secondary', className: styles['add-button'], ...(addProductUrl ? { href: addProductUrl } : {}), children: buttonText || defautlButtonText })), isBundle && hasRequiredPlan && (_jsxs("div", { className: styles['product-has-required-plan'], children: [
31
+ _jsx(CheckmarkIcon, { size: 36 }), _jsx(Text, { children: __('Active on your site', 'jetpack-components') })
32
+ ] }))] })
33
+ ] }));
29
34
  };
30
35
  export default ProductOffer;
31
- export * from "./icons-card.js";
36
+ export * from './icons-card.js';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { __ } from '@wordpress/i18n';
3
3
  import { Icon, starFilled as star } from '@wordpress/icons';
4
- import Text from "../text/index.js";
4
+ import Text from '../text/index.js';
5
5
  import styles from './style.module.scss';
6
6
  /**
7
7
  * Product Detail Card Header component.
@@ -10,5 +10,7 @@ import styles from './style.module.scss';
10
10
  * @return {ReactNode} ProductOfferHeader react component.
11
11
  */
12
12
  export const ProductOfferHeader = ({ title = __('Popular upgrade', 'jetpack-components'), }) => {
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 })] }));
13
+ return (_jsxs("div", { className: styles['card-header'], children: [
14
+ _jsx(Icon, { icon: star, className: styles['product-bundle-icon'], size: 24 }), _jsx(Text, { variant: "label", children: title })
15
+ ] }));
14
16
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
3
  * External dependencies
4
4
  */
@@ -7,8 +7,8 @@ import clsx from 'clsx';
7
7
  /*
8
8
  * Internal dependencies
9
9
  */
10
- import Text from "../text/index.js";
11
- import { Price } from "./price.js";
10
+ import Text from '../text/index.js';
11
+ import { Price } from './price.js';
12
12
  import styles from './style.module.scss';
13
13
  /**
14
14
  * React component to render the price.
@@ -27,11 +27,19 @@ const ProductPrice = ({ price, offPrice, currency = '', showNotOffPrice = true,
27
27
  const showDiscountLabel = !hideDiscountLabel && discount && discount > 0;
28
28
  const discountElt = showDiscountLabel ? discount + __('% off', 'jetpack-components') : null;
29
29
  if (variant === 'simple') {
30
- return (_jsxs("div", { className: styles.simple, children: [_jsxs("div", { className: styles.currentPrice, children: [_jsx(Price, { value: offPrice ?? price, currency: currency, isOff: !isNotConvenientPrice, hidePriceFraction: hidePriceFraction, inline: true }), _jsx("div", { children: legend })] }), showNotOffPrice && (_jsxs("div", { className: styles.originalPrice, children: [_jsx(Price, { value: price, currency: currency, isOff: false, hidePriceFraction: hidePriceFraction, inline: true }), _jsx("div", { children: discount &&
30
+ return (_jsxs("div", { className: styles.simple, children: [
31
+ _jsxs("div", { className: styles.currentPrice, children: [
32
+ _jsx(Price, { value: offPrice ?? price, currency: currency, isOff: !isNotConvenientPrice, hidePriceFraction: hidePriceFraction, inline: true }), _jsx("div", { children: legend })
33
+ ] }), showNotOffPrice && (_jsxs("div", { className: styles.originalPrice, children: [
34
+ _jsx(Price, { value: price, currency: currency, isOff: false, hidePriceFraction: hidePriceFraction, inline: true }), _jsx("div", { children: discount &&
31
35
  discount > 0 &&
32
- discount + __('% off the first year', 'jetpack-components') })] }))] }));
36
+ discount + __('% off the first year', 'jetpack-components') })
37
+ ] }))] }));
33
38
  }
34
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.container, children: _jsxs("div", { className: clsx(styles['price-container'], 'product-price_container'), children: [_jsx(Price, { value: offPrice ?? price, currency: currency, isOff: !isNotConvenientPrice, hidePriceFraction: hidePriceFraction }), showNotOffPrice && (_jsx(Price, { value: price, currency: currency, isOff: false, hidePriceFraction: hidePriceFraction })), discountElt && (_jsx(Text, { className: clsx(styles['promo-label'], 'product-price_promo_label'), children: discountElt }))] }) }), _jsxs("div", { className: styles.footer, children: [children ? (children) : (_jsx(Text, { className: clsx(styles.legend, 'product-price_legend'), children: legend })), promoLabel && (_jsx(Text, { className: clsx(styles['promo-label'], 'product-price_promo_label'), children: promoLabel }))] })] }));
39
+ return (_jsxs(_Fragment, { children: [
40
+ _jsx("div", { className: styles.container, children: _jsxs("div", { className: clsx(styles['price-container'], 'product-price_container'), children: [
41
+ _jsx(Price, { value: offPrice ?? price, currency: currency, isOff: !isNotConvenientPrice, hidePriceFraction: hidePriceFraction }), showNotOffPrice && (_jsx(Price, { value: price, currency: currency, isOff: false, hidePriceFraction: hidePriceFraction })), discountElt && (_jsx(Text, { className: clsx(styles['promo-label'], 'product-price_promo_label'), children: discountElt }))] }) }), _jsxs("div", { className: styles.footer, children: [children ? (children) : (_jsx(Text, { className: clsx(styles.legend, 'product-price_legend'), children: legend })), promoLabel && (_jsx(Text, { className: clsx(styles['promo-label'], 'product-price_promo_label'), children: promoLabel }))] })
42
+ ] }));
35
43
  };
36
44
  export default ProductPrice;
37
- export * from "./price.js";
45
+ export * from './price.js';
@@ -1,7 +1,7 @@
1
- import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getCurrencyObject } from '@automattic/number-formatters';
3
3
  import clsx from 'clsx';
4
- import Text from "../text/index.js";
4
+ import Text from '../text/index.js';
5
5
  import styles from './style.module.scss';
6
6
  /**
7
7
  * React component to render a Price composition.
@@ -16,5 +16,6 @@ export const Price = ({ value, currency, isOff, hidePriceFraction, inline = fals
16
16
  });
17
17
  const { symbol, integer, fraction } = getCurrencyObject(value, currency);
18
18
  const showPriceFraction = !hidePriceFraction || !fraction.endsWith('00');
19
- return (_jsxs(Text, { className: classNames, variant: "headline-medium", component: "p", children: [inline ? (_jsxs(_Fragment, { children: [symbol, integer] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { className: styles.symbol, component: "sup", variant: "title-medium", children: symbol }), integer] })), showPriceFraction && (_jsx(Text, { component: "sup", variant: "body-small", "data-testid": "PriceFraction", children: _jsx("strong", { children: fraction }) }))] }));
19
+ return (_jsxs(Text, { className: classNames, variant: "headline-medium", component: "p", children: [inline ? (_jsxs(_Fragment, { children: [symbol, integer] })) : (_jsxs(_Fragment, { children: [
20
+ _jsx(Text, { className: styles.symbol, component: "sup", variant: "title-medium", children: symbol }), integer] })), showPriceFraction && (_jsx(Text, { component: "sup", variant: "body-small", "data-testid": "PriceFraction", children: _jsx("strong", { children: fraction }) }))] }));
20
21
  };
@@ -27,14 +27,29 @@ const RecordMeterBar = ({ totalCount, items = [], showLegendLabelBeforeCount = f
27
27
  }
28
28
  return items;
29
29
  }, [items, sortByCount]);
30
- return (_jsxs("div", { className: clsx('record-meter-bar', className), children: [_jsx("div", { className: "record-meter-bar__items", "aria-hidden": "true", children: itemsToRender.map(({ count, label, backgroundColor }) => {
30
+ return (_jsxs("div", { className: clsx('record-meter-bar', className), children: [
31
+ _jsx("div", { className: "record-meter-bar__items", "aria-hidden": "true", children: itemsToRender.map(({ count, label, backgroundColor }) => {
31
32
  const widthPercent = ((count / total) * 100).toPrecision(2);
32
33
  return (_jsx("div", { style: { backgroundColor, flexBasis: `${widthPercent}%` } }, label));
33
34
  }) }), _jsxs("div", { className: "record-meter-bar__legend", "aria-hidden": "true", children: [legendTitle && _jsx("div", { className: "record-meter-bar__legend--title", children: legendTitle }), _jsx("ul", { className: "record-meter-bar__legend--items", children: itemsToRender.map(({ count, label, backgroundColor }) => {
34
35
  const formattedCount = formatNumber(count);
35
- return (_jsxs("li", { className: "record-meter-bar__legend--item", children: [_jsx("div", { className: "record-meter-bar__legend--item-circle", style: { backgroundColor } }), !showLegendLabelBeforeCount && (_jsxs("span", { children: [_jsx("span", { className: "record-meter-bar__legend--item-count", children: formattedCount }), _jsx("span", { className: "record-meter-bar__legend--item-label", children: label })] })), showLegendLabelBeforeCount && (_jsxs("span", { children: [_jsx("span", { className: "record-meter-bar__legend--item-label record-meter-bar__legend--item-label-first", children: label }), _jsxs("span", { className: "record-meter-bar__legend--item-count", children: ["(", formattedCount, ")"] })] }))] }, label));
36
- }) })] }), _jsxs("table", { className: "screen-reader-text", children: [_jsx("caption", { children: tableCaption || __('Summary of the records', 'jetpack-components') }), _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("th", { scope: "col", children: recordTypeLabel || __('Record type', 'jetpack-components') }), _jsx("th", { scope: "col", children: recordCountLabel || __('Record count', 'jetpack-components') })] }), itemsToRender.map(({ label, count }) => {
37
- return (_jsxs("tr", { children: [_jsx("td", { children: label }), _jsx("td", { children: count })] }, label));
38
- })] })] })] }));
36
+ return (_jsxs("li", { className: "record-meter-bar__legend--item", children: [
37
+ _jsx("div", { className: "record-meter-bar__legend--item-circle", style: { backgroundColor } }), !showLegendLabelBeforeCount && (_jsxs("span", { children: [
38
+ _jsx("span", { className: "record-meter-bar__legend--item-count", children: formattedCount }), _jsx("span", { className: "record-meter-bar__legend--item-label", children: label })
39
+ ] })), showLegendLabelBeforeCount && (_jsxs("span", { children: [
40
+ _jsx("span", { className: "record-meter-bar__legend--item-label record-meter-bar__legend--item-label-first", children: label }), _jsxs("span", { className: "record-meter-bar__legend--item-count", children: ["(", formattedCount, ")"] })
41
+ ] }))] }, label));
42
+ }) })
43
+ ] }), _jsxs("table", { className: "screen-reader-text", children: [
44
+ _jsx("caption", { children: tableCaption || __('Summary of the records', 'jetpack-components') }), _jsxs("tbody", { children: [
45
+ _jsxs("tr", { children: [
46
+ _jsx("th", { scope: "col", children: recordTypeLabel || __('Record type', 'jetpack-components') }), _jsx("th", { scope: "col", children: recordCountLabel || __('Record count', 'jetpack-components') })
47
+ ] }), itemsToRender.map(({ label, count }) => {
48
+ return (_jsxs("tr", { children: [
49
+ _jsx("td", { children: label }), _jsx("td", { children: count })
50
+ ] }, label));
51
+ })] })
52
+ ] })
53
+ ] }));
39
54
  };
40
55
  export default RecordMeterBar;
@@ -1,11 +1,11 @@
1
1
  import './style.scss';
2
- declare const Spinner: {
3
- ({ color, className, size }: {
4
- color?: string;
5
- className?: string;
6
- size?: number;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- propTypes: {
2
+ declare function Spinner({ color, className, size }: {
3
+ className?: string;
4
+ color?: string;
5
+ size?: number;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare namespace Spinner {
8
+ var propTypes: {
9
9
  /** The spinner color. */
10
10
  color: any;
11
11
  /** CSS class names. */
@@ -13,5 +13,5 @@ declare const Spinner: {
13
13
  /** The spinner size. */
14
14
  size: any;
15
15
  };
16
- };
16
+ }
17
17
  export default Spinner;
@@ -9,6 +9,8 @@ const SplitButton = ({ variant, controls, popoverProps, toggleProps, label, ...b
9
9
  className: styles.button,
10
10
  ...buttonProps,
11
11
  };
12
- return (_jsx(Flex, { className: styles['split-button'], children: _jsxs("div", { role: "group", className: "components-button-group", children: [_jsx(Button, { ...wpButtonProps }), _jsx(DropdownMenu, { toggleProps: { variant, className: styles.button, ...toggleProps }, popoverProps: { noArrow: false, ...popoverProps }, icon: _jsx(DownIcon, {}), disableOpenOnArrowDown: true, controls: controls, label: label })] }) }));
12
+ return (_jsx(Flex, { className: styles['split-button'], children: _jsxs("div", { role: "group", className: "components-button-group", children: [
13
+ _jsx(Button, { ...wpButtonProps }), _jsx(DropdownMenu, { toggleProps: { variant, className: styles.button, ...toggleProps }, popoverProps: { noArrow: false, ...popoverProps }, icon: _jsx(DownIcon, {}), disableOpenOnArrowDown: true, controls: controls, label: label })
14
+ ] }) }));
13
15
  };
14
16
  export default SplitButton;
@@ -8,7 +8,7 @@ import clsx from 'clsx';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
- import Text from "../text/index.js";
11
+ import Text from '../text/index.js';
12
12
  import styles from './style.module.scss';
13
13
  /**
14
14
  * StatCard component
@@ -19,6 +19,9 @@ import styles from './style.module.scss';
19
19
  const StatCard = ({ className, hideValue, icon, label, value, variant = 'square', }) => {
20
20
  const formattedValue = formatNumber(value);
21
21
  const compactValue = formatNumberCompact(value);
22
- return (_jsxs("div", { className: clsx(className, styles.wrapper, styles[variant]), children: [_jsx("div", { className: clsx(styles.icon), children: icon }), _jsxs("div", { className: clsx(styles.info), children: [_jsx(Text, { className: styles.label, children: label }), variant === 'square' ? (_jsx(Tooltip, { text: formattedValue, placement: "top", children: _jsx(Text, { variant: "headline-small", className: clsx(styles.value), children: hideValue ? '-' : compactValue }) })) : (_jsx(Text, { variant: "title-medium-semi-bold", className: clsx(styles.value), children: hideValue ? '-' : formattedValue }))] })] }));
22
+ return (_jsxs("div", { className: clsx(className, styles.wrapper, styles[variant]), children: [
23
+ _jsx("div", { className: clsx(styles.icon), children: icon }), _jsxs("div", { className: clsx(styles.info), children: [
24
+ _jsx(Text, { className: styles.label, children: label }), variant === 'square' ? (_jsx(Tooltip, { text: formattedValue, placement: "top", children: _jsx(Text, { variant: "headline-small", className: clsx(styles.value), children: hideValue ? '-' : compactValue }) })) : (_jsx(Text, { variant: "title-medium-semi-bold", className: clsx(styles.value), children: hideValue ? '-' : formattedValue }))] })
25
+ ] }));
23
26
  };
24
27
  export default StatCard;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { __ } from '@wordpress/i18n';
3
3
  import clsx from 'clsx';
4
- import Text from "../text/index.js";
4
+ import Text from '../text/index.js';
5
5
  import styles from './style.module.scss';
6
6
  const Status = ({ className, label, status = 'inactive' }) => {
7
7
  const defaultLabels = {
@@ -13,6 +13,8 @@ const Status = ({ className, label, status = 'inactive' }) => {
13
13
  };
14
14
  return (_jsxs(Text, { variant: "body-extra-small", className: clsx(styles.status, {
15
15
  [styles[`is-${status}`]]: status,
16
- }, className), children: [_jsx("span", { className: styles.status__indicator }), _jsx("span", { className: styles.status__label, children: label || label === '' ? label : defaultLabels[status] })] }));
16
+ }, className), children: [
17
+ _jsx("span", { className: styles.status__indicator }), _jsx("span", { className: styles.status__label, children: label || label === '' ? label : defaultLabels[status] })
18
+ ] }));
17
19
  };
18
20
  export default Status;
@@ -1,12 +1,12 @@
1
1
  import './style.scss';
2
2
  export declare const Swipeable: ({ hasDynamicHeight, children, currentPage, onPageSelect, pageClassName, containerClassName, isClickEnabled, ...otherProps }: {
3
3
  [x: string]: any;
4
- hasDynamicHeight?: boolean;
5
4
  children: any;
5
+ containerClassName: any;
6
6
  currentPage?: number;
7
+ hasDynamicHeight?: boolean;
8
+ isClickEnabled: any;
7
9
  onPageSelect: any;
8
10
  pageClassName: any;
9
- containerClassName: any;
10
- isClickEnabled: any;
11
11
  }) => import("react/jsx-runtime").JSX.Element;
12
12
  export default Swipeable;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement as _createElement } from "react";
3
3
  import clsx from 'clsx';
4
4
  import { Children, useState, useLayoutEffect, useRef, useCallback, useEffect } from 'react';
@@ -275,14 +275,16 @@ export const Swipeable = ({ hasDynamicHeight = false, children, currentPage = 0,
275
275
  return null;
276
276
  }, [handleDragStart, handleDrag, handleDragEnd]);
277
277
  const offset = getOffset(currentPage);
278
- return (_jsxs(_Fragment, { children: [_createElement("div", { ...getTouchEvents(), className: "swipeable__container", ref: pagesRef, ...otherProps,
278
+ return (_jsxs(_Fragment, { children: [
279
+ _createElement("div", { ...getTouchEvents(), className: "swipeable__container", ref: pagesRef, ...otherProps,
279
280
  // Ensure that state is reset when the window is resized
280
281
  key: containerWidth?.toString() },
281
282
  _jsxs("div", { className: clsx('swipeable__pages', containerClassName), style: {
282
283
  ...pagesStyle,
283
284
  width: getPagesWidth(containerWidth, numPages + 2),
284
285
  transform: `translate3d(${offset}px, 0px, 0px)`,
285
- }, onTransitionEnd: handleTransitionEnd, children: [_jsx("div", { style: { width: `${containerWidth}px` }, className: clsx('swipeable__page', pageClassName, {
286
+ }, onTransitionEnd: handleTransitionEnd, children: [
287
+ _jsx("div", { style: { width: `${containerWidth}px` }, className: clsx('swipeable__page', pageClassName, {
286
288
  'is-clone': true,
287
289
  'is-prev': currentPage === 0,
288
290
  }), children: Children.toArray(children)[numPages - 1] }, `clone-prev-${numPages - 1}`), Children.map(children, (child, index) => (_jsx("div", { style: { width: `${containerWidth}px` }, className: clsx('swipeable__page', pageClassName, {
@@ -292,6 +294,8 @@ export const Swipeable = ({ hasDynamicHeight = false, children, currentPage = 0,
292
294
  }), "data-testid": `swipeable-page-${index + 1}`, children: child }, `page-${index}`))), _jsx("div", { style: { width: `${containerWidth}px` }, className: clsx('swipeable__page', pageClassName, {
293
295
  'is-clone': true,
294
296
  'is-next': currentPage === numPages - 1,
295
- }), children: Children.toArray(children)[0] }, `clone-next-0`)] })), _jsx("div", { ref: resizeObserverRef, className: "swipeable__resize-observer" })] }));
297
+ }), children: Children.toArray(children)[0] }, `clone-next-0`)
298
+ ] })), _jsx("div", { ref: resizeObserverRef, className: "swipeable__resize-observer" })
299
+ ] }));
296
300
  };
297
301
  export default Swipeable;
@@ -3,8 +3,8 @@ import { ExternalLink } from '@wordpress/components';
3
3
  import { createInterpolateElement } from '@wordpress/element';
4
4
  import { __, sprintf } from '@wordpress/i18n';
5
5
  import clsx from 'clsx';
6
- import { getRedirectUrl } from "../../index.js";
7
- import Text from "../text/index.js";
6
+ import { getRedirectUrl } from '../../index.js';
7
+ import Text from '../text/index.js';
8
8
  import './styles.scss';
9
9
  const TermsOfService = ({ className, multipleButtons, agreeButtonLabel, isTextOnly, ...textProps }) => {
10
10
  const getTOSContent = () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from '@wordpress/element';
3
- import Gridicon from "../gridicon/index.js";
4
- import { Testimonial } from "./testimonial.js";
3
+ import Gridicon from '../gridicon/index.js';
4
+ import { Testimonial } from './testimonial.js';
5
5
  const Testimonials = ({ testimonials }) => {
6
6
  const [currentTestimonialIndex, setcurrentTestimonialIndex] = useState(0);
7
7
  const incrementTestimonial = useCallback(() => {
@@ -2,6 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import './style.scss';
4
4
  const Testimonial = ({ quote, author, profession, img, hidden }) => {
5
- return (_jsxs("div", { className: clsx('testimonial', hidden ? 'hidden' : 'show'), children: [_jsx("img", { className: "testimonial__author-img", src: img, alt: author }), _jsxs("div", { className: "testimonial__content", children: [_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "testimonial__quote-icon", children: [_jsx("path", { d: "M14.6667 24L6.66675 24L6.66675 16L14.6667 16L14.6667 24Z", fill: "#1E1E1E" }), _jsx("path", { d: "M26.6667 24L18.6667 24L18.6667 16L26.6667 16L26.6667 24Z", fill: "#1E1E1E" }), _jsx("path", { d: "M6.66675 24.0001C6.66675 19.5573 6.66675 14.9337 6.66675 10.6686C6.66675 6.40254 10.0001 6.67016 12.0001 6.66987", stroke: "#1E1E1E", strokeWidth: "1.5" }), _jsx("path", { d: "M18.6668 24.0001C18.6667 19.5573 18.6667 14.9337 18.6667 10.6686C18.6667 6.40254 22.0001 6.67016 24.0001 6.66987", stroke: "#1E1E1E", strokeWidth: "1.5" })] }), _jsxs("div", { className: "testimonial__text-block", children: [_jsxs("blockquote", { className: "testimonial__quote", children: ["\u201C", quote, "\u201D"] }), _jsxs("figcaption", { children: [_jsx("span", { className: "testimonial__author", children: author }), _jsx("span", { className: "testimonial__profession", children: profession })] })] })] })] }, author));
5
+ return (_jsxs("div", { className: clsx('testimonial', hidden ? 'hidden' : 'show'), children: [
6
+ _jsx("img", { className: "testimonial__author-img", src: img, alt: author }), _jsxs("div", { className: "testimonial__content", children: [
7
+ _jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "testimonial__quote-icon", children: [
8
+ _jsx("path", { d: "M14.6667 24L6.66675 24L6.66675 16L14.6667 16L14.6667 24Z", fill: "#1E1E1E" }), _jsx("path", { d: "M26.6667 24L18.6667 24L18.6667 16L26.6667 16L26.6667 24Z", fill: "#1E1E1E" }), _jsx("path", { d: "M6.66675 24.0001C6.66675 19.5573 6.66675 14.9337 6.66675 10.6686C6.66675 6.40254 10.0001 6.67016 12.0001 6.66987", stroke: "#1E1E1E", strokeWidth: "1.5" }), _jsx("path", { d: "M18.6668 24.0001C18.6667 19.5573 18.6667 14.9337 18.6667 10.6686C18.6667 6.40254 22.0001 6.67016 24.0001 6.66987", stroke: "#1E1E1E", strokeWidth: "1.5" })
9
+ ] }), _jsxs("div", { className: "testimonial__text-block", children: [
10
+ _jsxs("blockquote", { className: "testimonial__quote", children: ["\u201C", quote, "\u201D"] }), _jsxs("figcaption", { children: [
11
+ _jsx("span", { className: "testimonial__author", children: author }), _jsx("span", { className: "testimonial__profession", children: profession })
12
+ ] })
13
+ ] })
14
+ ] })
15
+ ] }, author));
6
16
  };
7
17
  export { Testimonial };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef, useMemo } from 'react';
4
- import { BOX_MODEL_VALUES, VARIANTS_MAPPING } from "./constants.js";
4
+ import { BOX_MODEL_VALUES, VARIANTS_MAPPING } from './constants.js';
5
5
  import styles from './style.module.scss';
6
6
  /**
7
7
  * Text component.
@@ -50,4 +50,4 @@ export const H3 = ({ children, weight = 'bold', ...componentProps }) => {
50
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
- export * from "./constants.js";
53
+ export * from './constants.js';