@automattic/plans-grid-next 1.0.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.
- package/CHANGELOG.md +4 -0
- package/README.md +3 -0
- package/dist/cjs/__mocks__/wpcom-proxy-request.js +17 -0
- package/dist/cjs/__mocks__/wpcom-proxy-request.js.map +1 -0
- package/dist/cjs/_media-queries.scss +14 -0
- package/dist/cjs/_mixins.scss +15 -0
- package/dist/cjs/_shared.scss +174 -0
- package/dist/cjs/components/comparison-grid/index.js +527 -0
- package/dist/cjs/components/comparison-grid/index.js.map +1 -0
- package/dist/cjs/components/comparison-grid/index.stories.js +74 -0
- package/dist/cjs/components/comparison-grid/index.stories.js.map +1 -0
- package/dist/cjs/components/comparison-grid/style.scss +318 -0
- package/dist/cjs/components/dropdown-option.js +33 -0
- package/dist/cjs/components/dropdown-option.js.map +1 -0
- package/dist/cjs/components/features-grid/billing-timeframes.js +15 -0
- package/dist/cjs/components/features-grid/billing-timeframes.js.map +1 -0
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js +106 -0
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js.map +1 -0
- package/dist/cjs/components/features-grid/client-logo-list/index.js +17 -0
- package/dist/cjs/components/features-grid/client-logo-list/index.js.map +1 -0
- package/dist/cjs/components/features-grid/client-logo-list/style.scss +52 -0
- package/dist/cjs/components/features-grid/enterprise-features.js +41 -0
- package/dist/cjs/components/features-grid/enterprise-features.js.map +1 -0
- package/dist/cjs/components/features-grid/index.js +130 -0
- package/dist/cjs/components/features-grid/index.js.map +1 -0
- package/dist/cjs/components/features-grid/index.stories.js +112 -0
- package/dist/cjs/components/features-grid/index.stories.js.map +1 -0
- package/dist/cjs/components/features-grid/mobile-free-domain.js +25 -0
- package/dist/cjs/components/features-grid/mobile-free-domain.js.map +1 -0
- package/dist/cjs/components/features-grid/plan-features-list.js +56 -0
- package/dist/cjs/components/features-grid/plan-features-list.js.map +1 -0
- package/dist/cjs/components/features-grid/plan-headers.js +15 -0
- package/dist/cjs/components/features-grid/plan-headers.js.map +1 -0
- package/dist/cjs/components/features-grid/plan-logos.js +12 -0
- package/dist/cjs/components/features-grid/plan-logos.js.map +1 -0
- package/dist/cjs/components/features-grid/plan-prices.js +14 -0
- package/dist/cjs/components/features-grid/plan-prices.js.map +1 -0
- package/dist/cjs/components/features-grid/plan-tagline.js +12 -0
- package/dist/cjs/components/features-grid/plan-tagline.js.map +1 -0
- package/dist/cjs/components/features-grid/previous-features-included-title.js +36 -0
- package/dist/cjs/components/features-grid/previous-features-included-title.js.map +1 -0
- package/dist/cjs/components/features-grid/spotlight-plan.js +24 -0
- package/dist/cjs/components/features-grid/spotlight-plan.js.map +1 -0
- package/dist/cjs/components/features-grid/spotlight-plan.scss +5 -0
- package/dist/cjs/components/features-grid/style.scss +630 -0
- package/dist/cjs/components/features-grid/table.js +38 -0
- package/dist/cjs/components/features-grid/table.js.map +1 -0
- package/dist/cjs/components/features-grid/top-buttons.js +15 -0
- package/dist/cjs/components/features-grid/top-buttons.js.map +1 -0
- package/dist/cjs/components/features.js +72 -0
- package/dist/cjs/components/features.js.map +1 -0
- package/dist/cjs/components/item.js +9 -0
- package/dist/cjs/components/item.js.map +1 -0
- package/dist/cjs/components/plan-button/index.js +21 -0
- package/dist/cjs/components/plan-button/index.js.map +1 -0
- package/dist/cjs/components/plan-button/style.scss +179 -0
- package/dist/cjs/components/plan-div-td-container.js +9 -0
- package/dist/cjs/components/plan-div-td-container.js.map +1 -0
- package/dist/cjs/components/plan-logo.js +45 -0
- package/dist/cjs/components/plan-logo.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js +39 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-selector.js +12 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-selector.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-toggle.js +55 -0
- package/dist/cjs/components/plan-type-selector/components/interval-type-toggle.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/components/popup-messages.js +108 -0
- package/dist/cjs/components/plan-type-selector/components/popup-messages.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-interval-options.js +56 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-interval-options.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js +45 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +68 -0
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/index.js +27 -0
- package/dist/cjs/components/plan-type-selector/index.js.map +1 -0
- package/dist/cjs/components/plan-type-selector/style.scss +196 -0
- package/dist/cjs/components/plans-2023-tooltip.js +46 -0
- package/dist/cjs/components/plans-2023-tooltip.js.map +1 -0
- package/dist/cjs/components/popular-badge.js +16 -0
- package/dist/cjs/components/popular-badge.js.map +1 -0
- package/dist/cjs/components/shared/action-button/index.js +91 -0
- package/dist/cjs/components/shared/action-button/index.js.map +1 -0
- package/dist/cjs/components/shared/action-button/style.scss +12 -0
- package/dist/cjs/components/shared/billing-timeframe/index.js +58 -0
- package/dist/cjs/components/shared/billing-timeframe/index.js.map +1 -0
- package/dist/cjs/components/shared/header-price/header-price-context.js +14 -0
- package/dist/cjs/components/shared/header-price/header-price-context.js.map +1 -0
- package/dist/cjs/components/shared/header-price/index.js +102 -0
- package/dist/cjs/components/shared/header-price/index.js.map +1 -0
- package/dist/cjs/components/shared/header-price/style.scss +112 -0
- package/dist/cjs/components/shared/plan-pill/index.js +6 -0
- package/dist/cjs/components/shared/plan-pill/index.js.map +1 -0
- package/dist/cjs/components/shared/plan-pill/style.scss +30 -0
- package/dist/cjs/components/shared/storage/components/plan-storage.js +28 -0
- package/dist/cjs/components/shared/storage/components/plan-storage.js.map +1 -0
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js +96 -0
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js.map +1 -0
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js +40 -0
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js.map +1 -0
- package/dist/cjs/components/shared/storage/constants.js +6 -0
- package/dist/cjs/components/shared/storage/constants.js.map +1 -0
- package/dist/cjs/components/shared/storage/hooks/use-default-storage-option.js +26 -0
- package/dist/cjs/components/shared/storage/hooks/use-default-storage-option.js.map +1 -0
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js +29 -0
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js.map +1 -0
- package/dist/cjs/components/shared/storage/hooks/use-purchased-storage-add-on.js +51 -0
- package/dist/cjs/components/shared/storage/hooks/use-purchased-storage-add-on.js.map +1 -0
- package/dist/cjs/components/shared/storage/hooks/use-storage-string.js +13 -0
- package/dist/cjs/components/shared/storage/hooks/use-storage-string.js.map +1 -0
- package/dist/cjs/components/shared/storage/index.js +14 -0
- package/dist/cjs/components/shared/storage/index.js.map +1 -0
- package/dist/cjs/components/sticky-container.js +74 -0
- package/dist/cjs/components/sticky-container.js.map +1 -0
- package/dist/cjs/constants.js +11 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/css-mixins.js +14 -0
- package/dist/cjs/css-mixins.js.map +1 -0
- package/dist/cjs/fixtures/plans.js +1542 -0
- package/dist/cjs/fixtures/plans.js.map +1 -0
- package/dist/cjs/fixtures/sites-plans.js +458 -0
- package/dist/cjs/fixtures/sites-plans.js.map +1 -0
- package/dist/cjs/fixtures/sites-purchases.js +133 -0
- package/dist/cjs/fixtures/sites-purchases.js.map +1 -0
- package/dist/cjs/grid-context.js +40 -0
- package/dist/cjs/grid-context.js.map +1 -0
- package/dist/cjs/hooks/data-store/is-popular-plan.js +9 -0
- package/dist/cjs/hooks/data-store/is-popular-plan.js.map +1 -0
- package/dist/cjs/hooks/data-store/types.js +3 -0
- package/dist/cjs/hooks/data-store/types.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plan-for-spotlight.js +18 -0
- package/dist/cjs/hooks/data-store/use-grid-plan-for-spotlight.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js +55 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js +56 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plans.js +254 -0
- package/dist/cjs/hooks/data-store/use-grid-plans.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-highlight-labels.js +60 -0
- package/dist/cjs/hooks/data-store/use-highlight-labels.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-highlighted-features.js +35 -0
- package/dist/cjs/hooks/data-store/use-highlighted-features.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js +216 -0
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js +133 -0
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-plans-from-types.js +30 -0
- package/dist/cjs/hooks/data-store/use-plans-from-types.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +90 -0
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -0
- package/dist/cjs/hooks/use-grid-size.js +33 -0
- package/dist/cjs/hooks/use-grid-size.js.map +1 -0
- package/dist/cjs/hooks/use-highlight-adjacency-matrix.js +31 -0
- package/dist/cjs/hooks/use-highlight-adjacency-matrix.js.map +1 -0
- package/dist/cjs/hooks/use-is-large-currency.js +69 -0
- package/dist/cjs/hooks/use-is-large-currency.js.map +1 -0
- package/dist/cjs/hooks/use-manage-tooltip-toggle.js +29 -0
- package/dist/cjs/hooks/use-manage-tooltip-toggle.js.map +1 -0
- package/dist/cjs/hooks/use-plan-pricing-info-from-grid-plans.js +17 -0
- package/dist/cjs/hooks/use-plan-pricing-info-from-grid-plans.js.map +1 -0
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/filter-unused-features-object.js +19 -0
- package/dist/cjs/lib/filter-unused-features-object.js.map +1 -0
- package/dist/cjs/lib/get-plan-features-object.js +11 -0
- package/dist/cjs/lib/get-plan-features-object.js.map +1 -0
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js +16 -0
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js.map +1 -0
- package/dist/cjs/lib/is-same-plan.js +12 -0
- package/dist/cjs/lib/is-same-plan.js.map +1 -0
- package/dist/cjs/lib/sort-plan-properties.js +39 -0
- package/dist/cjs/lib/sort-plan-properties.js.map +1 -0
- package/dist/cjs/lib/touch-detect/index.js +20 -0
- package/dist/cjs/lib/touch-detect/index.js.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/__mocks__/wpcom-proxy-request.js +11 -0
- package/dist/esm/__mocks__/wpcom-proxy-request.js.map +1 -0
- package/dist/esm/_media-queries.scss +14 -0
- package/dist/esm/_mixins.scss +15 -0
- package/dist/esm/_shared.scss +174 -0
- package/dist/esm/components/comparison-grid/index.js +524 -0
- package/dist/esm/components/comparison-grid/index.js.map +1 -0
- package/dist/esm/components/comparison-grid/index.stories.js +71 -0
- package/dist/esm/components/comparison-grid/index.stories.js.map +1 -0
- package/dist/esm/components/comparison-grid/style.scss +318 -0
- package/dist/esm/components/dropdown-option.js +30 -0
- package/dist/esm/components/dropdown-option.js.map +1 -0
- package/dist/esm/components/features-grid/billing-timeframes.js +12 -0
- package/dist/esm/components/features-grid/billing-timeframes.js.map +1 -0
- package/dist/esm/components/features-grid/client-logo-list/client-list.js +104 -0
- package/dist/esm/components/features-grid/client-logo-list/client-list.js.map +1 -0
- package/dist/esm/components/features-grid/client-logo-list/index.js +14 -0
- package/dist/esm/components/features-grid/client-logo-list/index.js.map +1 -0
- package/dist/esm/components/features-grid/client-logo-list/style.scss +52 -0
- package/dist/esm/components/features-grid/enterprise-features.js +38 -0
- package/dist/esm/components/features-grid/enterprise-features.js.map +1 -0
- package/dist/esm/components/features-grid/index.js +127 -0
- package/dist/esm/components/features-grid/index.js.map +1 -0
- package/dist/esm/components/features-grid/index.stories.js +109 -0
- package/dist/esm/components/features-grid/index.stories.js.map +1 -0
- package/dist/esm/components/features-grid/mobile-free-domain.js +23 -0
- package/dist/esm/components/features-grid/mobile-free-domain.js.map +1 -0
- package/dist/esm/components/features-grid/plan-features-list.js +53 -0
- package/dist/esm/components/features-grid/plan-features-list.js.map +1 -0
- package/dist/esm/components/features-grid/plan-headers.js +12 -0
- package/dist/esm/components/features-grid/plan-headers.js.map +1 -0
- package/dist/esm/components/features-grid/plan-logos.js +9 -0
- package/dist/esm/components/features-grid/plan-logos.js.map +1 -0
- package/dist/esm/components/features-grid/plan-prices.js +11 -0
- package/dist/esm/components/features-grid/plan-prices.js.map +1 -0
- package/dist/esm/components/features-grid/plan-tagline.js +9 -0
- package/dist/esm/components/features-grid/plan-tagline.js.map +1 -0
- package/dist/esm/components/features-grid/previous-features-included-title.js +33 -0
- package/dist/esm/components/features-grid/previous-features-included-title.js.map +1 -0
- package/dist/esm/components/features-grid/spotlight-plan.js +21 -0
- package/dist/esm/components/features-grid/spotlight-plan.js.map +1 -0
- package/dist/esm/components/features-grid/spotlight-plan.scss +5 -0
- package/dist/esm/components/features-grid/style.scss +630 -0
- package/dist/esm/components/features-grid/table.js +35 -0
- package/dist/esm/components/features-grid/table.js.map +1 -0
- package/dist/esm/components/features-grid/top-buttons.js +12 -0
- package/dist/esm/components/features-grid/top-buttons.js.map +1 -0
- package/dist/esm/components/features.js +69 -0
- package/dist/esm/components/features.js.map +1 -0
- package/dist/esm/components/item.js +5 -0
- package/dist/esm/components/item.js.map +1 -0
- package/dist/esm/components/plan-button/index.js +18 -0
- package/dist/esm/components/plan-button/index.js.map +1 -0
- package/dist/esm/components/plan-button/style.scss +179 -0
- package/dist/esm/components/plan-div-td-container.js +7 -0
- package/dist/esm/components/plan-div-td-container.js.map +1 -0
- package/dist/esm/components/plan-logo.js +42 -0
- package/dist/esm/components/plan-logo.js.map +1 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js +34 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-selector.js +8 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-selector.js.map +1 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-toggle.js +50 -0
- package/dist/esm/components/plan-type-selector/components/interval-type-toggle.js.map +1 -0
- package/dist/esm/components/plan-type-selector/components/popup-messages.js +105 -0
- package/dist/esm/components/plan-type-selector/components/popup-messages.js.map +1 -0
- package/dist/esm/components/plan-type-selector/hooks/use-interval-options.js +52 -0
- package/dist/esm/components/plan-type-selector/hooks/use-interval-options.js.map +1 -0
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js +42 -0
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js.map +1 -0
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +65 -0
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -0
- package/dist/esm/components/plan-type-selector/index.js +24 -0
- package/dist/esm/components/plan-type-selector/index.js.map +1 -0
- package/dist/esm/components/plan-type-selector/style.scss +196 -0
- package/dist/esm/components/plans-2023-tooltip.js +41 -0
- package/dist/esm/components/plans-2023-tooltip.js.map +1 -0
- package/dist/esm/components/popular-badge.js +13 -0
- package/dist/esm/components/popular-badge.js.map +1 -0
- package/dist/esm/components/shared/action-button/index.js +88 -0
- package/dist/esm/components/shared/action-button/index.js.map +1 -0
- package/dist/esm/components/shared/action-button/style.scss +12 -0
- package/dist/esm/components/shared/billing-timeframe/index.js +55 -0
- package/dist/esm/components/shared/billing-timeframe/index.js.map +1 -0
- package/dist/esm/components/shared/header-price/header-price-context.js +10 -0
- package/dist/esm/components/shared/header-price/header-price-context.js.map +1 -0
- package/dist/esm/components/shared/header-price/index.js +99 -0
- package/dist/esm/components/shared/header-price/index.js.map +1 -0
- package/dist/esm/components/shared/header-price/style.scss +112 -0
- package/dist/esm/components/shared/plan-pill/index.js +4 -0
- package/dist/esm/components/shared/plan-pill/index.js.map +1 -0
- package/dist/esm/components/shared/plan-pill/style.scss +30 -0
- package/dist/esm/components/shared/storage/components/plan-storage.js +25 -0
- package/dist/esm/components/shared/storage/components/plan-storage.js.map +1 -0
- package/dist/esm/components/shared/storage/components/storage-dropdown.js +93 -0
- package/dist/esm/components/shared/storage/components/storage-dropdown.js.map +1 -0
- package/dist/esm/components/shared/storage/components/storage-feature-label.js +37 -0
- package/dist/esm/components/shared/storage/components/storage-feature-label.js.map +1 -0
- package/dist/esm/components/shared/storage/constants.js +3 -0
- package/dist/esm/components/shared/storage/constants.js.map +1 -0
- package/dist/esm/components/shared/storage/hooks/use-default-storage-option.js +22 -0
- package/dist/esm/components/shared/storage/hooks/use-default-storage-option.js.map +1 -0
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js +27 -0
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js.map +1 -0
- package/dist/esm/components/shared/storage/hooks/use-purchased-storage-add-on.js +48 -0
- package/dist/esm/components/shared/storage/hooks/use-purchased-storage-add-on.js.map +1 -0
- package/dist/esm/components/shared/storage/hooks/use-storage-string.js +11 -0
- package/dist/esm/components/shared/storage/hooks/use-storage-string.js.map +1 -0
- package/dist/esm/components/shared/storage/index.js +9 -0
- package/dist/esm/components/shared/storage/index.js.map +1 -0
- package/dist/esm/components/sticky-container.js +69 -0
- package/dist/esm/components/sticky-container.js.map +1 -0
- package/dist/esm/constants.js +8 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/css-mixins.js +10 -0
- package/dist/esm/css-mixins.js.map +1 -0
- package/dist/esm/fixtures/plans.js +1540 -0
- package/dist/esm/fixtures/plans.js.map +1 -0
- package/dist/esm/fixtures/sites-plans.js +456 -0
- package/dist/esm/fixtures/sites-plans.js.map +1 -0
- package/dist/esm/fixtures/sites-purchases.js +131 -0
- package/dist/esm/fixtures/sites-purchases.js.map +1 -0
- package/dist/esm/grid-context.js +36 -0
- package/dist/esm/grid-context.js.map +1 -0
- package/dist/esm/hooks/data-store/is-popular-plan.js +5 -0
- package/dist/esm/hooks/data-store/is-popular-plan.js.map +1 -0
- package/dist/esm/hooks/data-store/types.js +2 -0
- package/dist/esm/hooks/data-store/types.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plan-for-spotlight.js +16 -0
- package/dist/esm/hooks/data-store/use-grid-plan-for-spotlight.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js +52 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js +53 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plans.js +249 -0
- package/dist/esm/hooks/data-store/use-grid-plans.js.map +1 -0
- package/dist/esm/hooks/data-store/use-highlight-labels.js +58 -0
- package/dist/esm/hooks/data-store/use-highlight-labels.js.map +1 -0
- package/dist/esm/hooks/data-store/use-highlighted-features.js +33 -0
- package/dist/esm/hooks/data-store/use-highlighted-features.js.map +1 -0
- package/dist/esm/hooks/data-store/use-plan-billing-description.js +213 -0
- package/dist/esm/hooks/data-store/use-plan-billing-description.js.map +1 -0
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js +130 -0
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -0
- package/dist/esm/hooks/data-store/use-plans-from-types.js +27 -0
- package/dist/esm/hooks/data-store/use-plans-from-types.js.map +1 -0
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +87 -0
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -0
- package/dist/esm/hooks/use-grid-size.js +29 -0
- package/dist/esm/hooks/use-grid-size.js.map +1 -0
- package/dist/esm/hooks/use-highlight-adjacency-matrix.js +29 -0
- package/dist/esm/hooks/use-highlight-adjacency-matrix.js.map +1 -0
- package/dist/esm/hooks/use-is-large-currency.js +66 -0
- package/dist/esm/hooks/use-is-large-currency.js.map +1 -0
- package/dist/esm/hooks/use-manage-tooltip-toggle.js +25 -0
- package/dist/esm/hooks/use-manage-tooltip-toggle.js.map +1 -0
- package/dist/esm/hooks/use-plan-pricing-info-from-grid-plans.js +13 -0
- package/dist/esm/hooks/use-plan-pricing-info-from-grid-plans.js.map +1 -0
- package/dist/esm/index.js +28 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/filter-unused-features-object.js +17 -0
- package/dist/esm/lib/filter-unused-features-object.js.map +1 -0
- package/dist/esm/lib/get-plan-features-object.js +9 -0
- package/dist/esm/lib/get-plan-features-object.js.map +1 -0
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js +12 -0
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js.map +1 -0
- package/dist/esm/lib/is-same-plan.js +8 -0
- package/dist/esm/lib/is-same-plan.js.map +1 -0
- package/dist/esm/lib/sort-plan-properties.js +35 -0
- package/dist/esm/lib/sort-plan-properties.js.map +1 -0
- package/dist/esm/lib/touch-detect/index.js +16 -0
- package/dist/esm/lib/touch-detect/index.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/tsconfig-cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/__mocks__/wpcom-proxy-request.d.ts +8 -0
- package/dist/types/__mocks__/wpcom-proxy-request.d.ts.map +1 -0
- package/dist/types/components/comparison-grid/index.d.ts +5 -0
- package/dist/types/components/comparison-grid/index.d.ts.map +1 -0
- package/dist/types/components/comparison-grid/index.stories.d.ts +66 -0
- package/dist/types/components/comparison-grid/index.stories.d.ts.map +1 -0
- package/dist/types/components/dropdown-option.d.ts +10 -0
- package/dist/types/components/dropdown-option.d.ts.map +1 -0
- package/dist/types/components/features-grid/billing-timeframes.d.ts +11 -0
- package/dist/types/components/features-grid/billing-timeframes.d.ts.map +1 -0
- package/dist/types/components/features-grid/client-logo-list/client-list.d.ts +11 -0
- package/dist/types/components/features-grid/client-logo-list/client-list.d.ts.map +1 -0
- package/dist/types/components/features-grid/client-logo-list/index.d.ts +4 -0
- package/dist/types/components/features-grid/client-logo-list/index.d.ts.map +1 -0
- package/dist/types/components/features-grid/enterprise-features.d.ts +11 -0
- package/dist/types/components/features-grid/enterprise-features.d.ts.map +1 -0
- package/dist/types/components/features-grid/index.d.ts +5 -0
- package/dist/types/components/features-grid/index.d.ts.map +1 -0
- package/dist/types/components/features-grid/index.stories.d.ts +173 -0
- package/dist/types/components/features-grid/index.stories.d.ts.map +1 -0
- package/dist/types/components/features-grid/mobile-free-domain.d.ts +8 -0
- package/dist/types/components/features-grid/mobile-free-domain.d.ts.map +1 -0
- package/dist/types/components/features-grid/plan-features-list.d.ts +31 -0
- package/dist/types/components/features-grid/plan-features-list.d.ts.map +1 -0
- package/dist/types/components/features-grid/plan-headers.d.ts +10 -0
- package/dist/types/components/features-grid/plan-headers.d.ts.map +1 -0
- package/dist/types/components/features-grid/plan-logos.d.ts +11 -0
- package/dist/types/components/features-grid/plan-logos.d.ts.map +1 -0
- package/dist/types/components/features-grid/plan-prices.d.ts +11 -0
- package/dist/types/components/features-grid/plan-prices.d.ts.map +1 -0
- package/dist/types/components/features-grid/plan-tagline.d.ts +10 -0
- package/dist/types/components/features-grid/plan-tagline.d.ts.map +1 -0
- package/dist/types/components/features-grid/previous-features-included-title.d.ts +10 -0
- package/dist/types/components/features-grid/previous-features-included-title.d.ts.map +1 -0
- package/dist/types/components/features-grid/spotlight-plan.d.ts +17 -0
- package/dist/types/components/features-grid/spotlight-plan.d.ts.map +1 -0
- package/dist/types/components/features-grid/table.d.ts +26 -0
- package/dist/types/components/features-grid/table.d.ts.map +1 -0
- package/dist/types/components/features-grid/top-buttons.d.ts +14 -0
- package/dist/types/components/features-grid/top-buttons.d.ts.map +1 -0
- package/dist/types/components/features.d.ts +17 -0
- package/dist/types/components/features.d.ts.map +1 -0
- package/dist/types/components/item.d.ts +5 -0
- package/dist/types/components/item.d.ts.map +1 -0
- package/dist/types/components/plan-button/index.d.ts +17 -0
- package/dist/types/components/plan-button/index.d.ts.map +1 -0
- package/dist/types/components/plan-div-td-container.d.ts +7 -0
- package/dist/types/components/plan-div-td-container.d.ts.map +1 -0
- package/dist/types/components/plan-logo.d.ts +12 -0
- package/dist/types/components/plan-logo.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/components/interval-type-dropdown.d.ts +4 -0
- package/dist/types/components/plan-type-selector/components/interval-type-dropdown.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/components/interval-type-selector.d.ts +4 -0
- package/dist/types/components/plan-type-selector/components/interval-type-selector.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/components/interval-type-toggle.d.ts +4 -0
- package/dist/types/components/plan-type-selector/components/interval-type-toggle.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/components/popup-messages.d.ts +9 -0
- package/dist/types/components/plan-type-selector/components/popup-messages.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/hooks/use-interval-options.d.ts +11 -0
- package/dist/types/components/plan-type-selector/hooks/use-interval-options.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/hooks/use-max-discount.d.ts +4 -0
- package/dist/types/components/plan-type-selector/hooks/use-max-discount.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.d.ts +10 -0
- package/dist/types/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.d.ts.map +1 -0
- package/dist/types/components/plan-type-selector/index.d.ts +6 -0
- package/dist/types/components/plan-type-selector/index.d.ts.map +1 -0
- package/dist/types/components/plans-2023-tooltip.d.ts +11 -0
- package/dist/types/components/plans-2023-tooltip.d.ts.map +1 -0
- package/dist/types/components/popular-badge.d.ts +9 -0
- package/dist/types/components/popular-badge.d.ts.map +1 -0
- package/dist/types/components/shared/action-button/index.d.ts +19 -0
- package/dist/types/components/shared/action-button/index.d.ts.map +1 -0
- package/dist/types/components/shared/billing-timeframe/index.d.ts +8 -0
- package/dist/types/components/shared/billing-timeframe/index.d.ts.map +1 -0
- package/dist/types/components/shared/header-price/header-price-context.d.ts +12 -0
- package/dist/types/components/shared/header-price/header-price-context.d.ts.map +1 -0
- package/dist/types/components/shared/header-price/index.d.ts +11 -0
- package/dist/types/components/shared/header-price/index.d.ts.map +1 -0
- package/dist/types/components/shared/plan-pill/index.d.ts +3 -0
- package/dist/types/components/shared/plan-pill/index.d.ts.map +1 -0
- package/dist/types/components/shared/storage/components/plan-storage.d.ts +13 -0
- package/dist/types/components/shared/storage/components/plan-storage.d.ts.map +1 -0
- package/dist/types/components/shared/storage/components/storage-dropdown.d.ts +9 -0
- package/dist/types/components/shared/storage/components/storage-dropdown.d.ts.map +1 -0
- package/dist/types/components/shared/storage/components/storage-feature-label.d.ts +7 -0
- package/dist/types/components/shared/storage/components/storage-feature-label.d.ts.map +1 -0
- package/dist/types/components/shared/storage/constants.d.ts +2 -0
- package/dist/types/components/shared/storage/constants.d.ts.map +1 -0
- package/dist/types/components/shared/storage/hooks/use-default-storage-option.d.ts +14 -0
- package/dist/types/components/shared/storage/hooks/use-default-storage-option.d.ts.map +1 -0
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts +4 -0
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts.map +1 -0
- package/dist/types/components/shared/storage/hooks/use-purchased-storage-add-on.d.ts +3 -0
- package/dist/types/components/shared/storage/hooks/use-purchased-storage-add-on.d.ts.map +1 -0
- package/dist/types/components/shared/storage/hooks/use-storage-string.d.ts +4 -0
- package/dist/types/components/shared/storage/hooks/use-storage-string.d.ts.map +1 -0
- package/dist/types/components/shared/storage/index.d.ts +9 -0
- package/dist/types/components/shared/storage/index.d.ts.map +1 -0
- package/dist/types/components/sticky-container.d.ts +33 -0
- package/dist/types/components/sticky-container.d.ts.map +1 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/css-mixins.d.ts +3 -0
- package/dist/types/css-mixins.d.ts.map +1 -0
- package/dist/types/fixtures/plans.d.ts +201 -0
- package/dist/types/fixtures/plans.d.ts.map +1 -0
- package/dist/types/fixtures/sites-plans.d.ts +457 -0
- package/dist/types/fixtures/sites-plans.d.ts.map +1 -0
- package/dist/types/fixtures/sites-purchases.d.ts +96 -0
- package/dist/types/fixtures/sites-purchases.d.ts.map +1 -0
- package/dist/types/grid-context.d.ts +40 -0
- package/dist/types/grid-context.d.ts.map +1 -0
- package/dist/types/hooks/data-store/is-popular-plan.d.ts +2 -0
- package/dist/types/hooks/data-store/is-popular-plan.d.ts.map +1 -0
- package/dist/types/hooks/data-store/types.d.ts +40 -0
- package/dist/types/hooks/data-store/types.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-grid-plan-for-spotlight.d.ts +10 -0
- package/dist/types/hooks/data-store/use-grid-plan-for-spotlight.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts +5 -0
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts +5 -0
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-grid-plans.d.ts +13 -0
- package/dist/types/hooks/data-store/use-grid-plans.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-highlight-labels.d.ts +20 -0
- package/dist/types/hooks/data-store/use-highlight-labels.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-highlighted-features.d.ts +22 -0
- package/dist/types/hooks/data-store/use-highlighted-features.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-plan-billing-description.d.ts +16 -0
- package/dist/types/hooks/data-store/use-plan-billing-description.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts +21 -0
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-plans-from-types.d.ts +10 -0
- package/dist/types/hooks/data-store/use-plans-from-types.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts +15 -0
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts.map +1 -0
- package/dist/types/hooks/use-grid-size.d.ts +18 -0
- package/dist/types/hooks/use-grid-size.d.ts.map +1 -0
- package/dist/types/hooks/use-highlight-adjacency-matrix.d.ts +15 -0
- package/dist/types/hooks/use-highlight-adjacency-matrix.d.ts.map +1 -0
- package/dist/types/hooks/use-is-large-currency.d.ts +16 -0
- package/dist/types/hooks/use-is-large-currency.d.ts.map +1 -0
- package/dist/types/hooks/use-manage-tooltip-toggle.d.ts +3 -0
- package/dist/types/hooks/use-manage-tooltip-toggle.d.ts.map +1 -0
- package/dist/types/hooks/use-plan-pricing-info-from-grid-plans.d.ts +11 -0
- package/dist/types/hooks/use-plan-pricing-info-from-grid-plans.d.ts.map +1 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/filter-unused-features-object.d.ts +8 -0
- package/dist/types/lib/filter-unused-features-object.d.ts.map +1 -0
- package/dist/types/lib/get-plan-features-object.d.ts +4 -0
- package/dist/types/lib/get-plan-features-object.d.ts.map +1 -0
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts +9 -0
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts.map +1 -0
- package/dist/types/lib/is-same-plan.d.ts +3 -0
- package/dist/types/lib/is-same-plan.d.ts.map +1 -0
- package/dist/types/lib/sort-plan-properties.d.ts +3 -0
- package/dist/types/lib/sort-plan-properties.d.ts.map +1 -0
- package/dist/types/lib/touch-detect/index.d.ts +11 -0
- package/dist/types/lib/touch-detect/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +225 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +83 -0
- package/src/__mocks__/wpcom-proxy-request.js +13 -0
- package/src/_media-queries.scss +14 -0
- package/src/_mixins.scss +15 -0
- package/src/_shared.scss +174 -0
- package/src/components/comparison-grid/README.md +3 -0
- package/src/components/comparison-grid/index.stories.tsx +91 -0
- package/src/components/comparison-grid/index.tsx +1215 -0
- package/src/components/comparison-grid/style.scss +318 -0
- package/src/components/dropdown-option.tsx +44 -0
- package/src/components/features-grid/README.md +3 -0
- package/src/components/features-grid/billing-timeframes.tsx +37 -0
- package/src/components/features-grid/client-logo-list/client-list.tsx +199 -0
- package/src/components/features-grid/client-logo-list/index.tsx +24 -0
- package/src/components/features-grid/client-logo-list/style.scss +52 -0
- package/src/components/features-grid/enterprise-features.tsx +101 -0
- package/src/components/features-grid/index.stories.tsx +143 -0
- package/src/components/features-grid/index.tsx +442 -0
- package/src/components/features-grid/mobile-free-domain.tsx +51 -0
- package/src/components/features-grid/plan-features-list.tsx +187 -0
- package/src/components/features-grid/plan-headers.tsx +31 -0
- package/src/components/features-grid/plan-logos.tsx +27 -0
- package/src/components/features-grid/plan-prices.tsx +37 -0
- package/src/components/features-grid/plan-tagline.tsx +25 -0
- package/src/components/features-grid/previous-features-included-title.tsx +66 -0
- package/src/components/features-grid/spotlight-plan.scss +5 -0
- package/src/components/features-grid/spotlight-plan.tsx +77 -0
- package/src/components/features-grid/style.scss +630 -0
- package/src/components/features-grid/table.tsx +185 -0
- package/src/components/features-grid/top-buttons.tsx +49 -0
- package/src/components/features.tsx +168 -0
- package/src/components/item.tsx +9 -0
- package/src/components/plan-button/index.tsx +59 -0
- package/src/components/plan-button/style.scss +179 -0
- package/src/components/plan-div-td-container.tsx +15 -0
- package/src/components/plan-logo.tsx +111 -0
- package/src/components/plan-type-selector/components/interval-type-dropdown.tsx +70 -0
- package/src/components/plan-type-selector/components/interval-type-selector.tsx +13 -0
- package/src/components/plan-type-selector/components/interval-type-toggle.tsx +100 -0
- package/src/components/plan-type-selector/components/popup-messages.tsx +128 -0
- package/src/components/plan-type-selector/hooks/use-interval-options.tsx +89 -0
- package/src/components/plan-type-selector/hooks/use-max-discount.ts +64 -0
- package/src/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.ts +99 -0
- package/src/components/plan-type-selector/index.tsx +50 -0
- package/src/components/plan-type-selector/style.scss +196 -0
- package/src/components/plans-2023-tooltip.tsx +85 -0
- package/src/components/popular-badge.tsx +30 -0
- package/src/components/shared/README.md +1 -0
- package/src/components/shared/action-button/index.tsx +205 -0
- package/src/components/shared/action-button/style.scss +12 -0
- package/src/components/shared/billing-timeframe/index.tsx +106 -0
- package/src/components/shared/header-price/header-price-context.tsx +24 -0
- package/src/components/shared/header-price/index.tsx +278 -0
- package/src/components/shared/header-price/style.scss +112 -0
- package/src/components/shared/plan-pill/index.jsx +7 -0
- package/src/components/shared/plan-pill/style.scss +30 -0
- package/src/components/shared/storage/components/plan-storage.tsx +51 -0
- package/src/components/shared/storage/components/storage-dropdown.tsx +187 -0
- package/src/components/shared/storage/components/storage-feature-label.tsx +68 -0
- package/src/components/shared/storage/constants.ts +3 -0
- package/src/components/shared/storage/hooks/use-default-storage-option.ts +34 -0
- package/src/components/shared/storage/hooks/use-plan-storage.ts +41 -0
- package/src/components/shared/storage/hooks/use-purchased-storage-add-on.ts +53 -0
- package/src/components/shared/storage/hooks/use-storage-string.ts +13 -0
- package/src/components/shared/storage/index.ts +9 -0
- package/src/components/sticky-container.tsx +146 -0
- package/src/components/test/actions-button.tsx +397 -0
- package/src/components/test/billing-timeframe.tsx +341 -0
- package/src/components/test/header-price.tsx +189 -0
- package/src/components/test/plan-type-selector.tsx +44 -0
- package/src/constants.ts +13 -0
- package/src/css-mixins.tsx +11 -0
- package/src/fixtures/plans.ts +1539 -0
- package/src/fixtures/sites-plans.ts +455 -0
- package/src/fixtures/sites-purchases.ts +130 -0
- package/src/grid-context.tsx +104 -0
- package/src/hooks/data-store/is-popular-plan.ts +5 -0
- package/src/hooks/data-store/types.ts +41 -0
- package/src/hooks/data-store/use-grid-plan-for-spotlight.ts +35 -0
- package/src/hooks/data-store/use-grid-plans-for-comparison-grid.ts +81 -0
- package/src/hooks/data-store/use-grid-plans-for-features-grid.ts +79 -0
- package/src/hooks/data-store/use-grid-plans.tsx +360 -0
- package/src/hooks/data-store/use-highlight-labels.ts +88 -0
- package/src/hooks/data-store/use-highlighted-features.ts +51 -0
- package/src/hooks/data-store/use-plan-billing-description.tsx +309 -0
- package/src/hooks/data-store/use-plan-features-for-grid-plans.ts +219 -0
- package/src/hooks/data-store/use-plans-from-types.ts +51 -0
- package/src/hooks/data-store/use-restructured-plan-features-for-comparison-grid.ts +158 -0
- package/src/hooks/test/use-is-large-currency.ts +69 -0
- package/src/hooks/use-grid-size.ts +46 -0
- package/src/hooks/use-highlight-adjacency-matrix.ts +48 -0
- package/src/hooks/use-is-large-currency.ts +91 -0
- package/src/hooks/use-manage-tooltip-toggle.ts +30 -0
- package/src/hooks/use-plan-pricing-info-from-grid-plans.ts +36 -0
- package/src/index.tsx +46 -0
- package/src/lib/filter-unused-features-object.ts +31 -0
- package/src/lib/get-plan-features-object.ts +12 -0
- package/src/lib/get-plan-pricing-info-from-grid-plans.ts +31 -0
- package/src/lib/is-same-plan.ts +8 -0
- package/src/lib/sort-plan-properties.ts +46 -0
- package/src/lib/test/filter-plan-features-object.ts +65 -0
- package/src/lib/test/sort-plan-properties.ts +104 -0
- package/src/lib/touch-detect/README.md +11 -0
- package/src/lib/touch-detect/index.js +17 -0
- package/src/types.ts +340 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const element_1 = require("@wordpress/element");
|
|
5
|
+
const resize_observer_polyfill_1 = tslib_1.__importDefault(require("resize-observer-polyfill"));
|
|
6
|
+
/**
|
|
7
|
+
* useGridSize returns the current grid size based on the width of the container
|
|
8
|
+
* and the breakpoints passed through as props.
|
|
9
|
+
*/
|
|
10
|
+
function useGridSize({ containerRef, containerBreakpoints }) {
|
|
11
|
+
const [gridSize, setGridSize] = (0, element_1.useState)(null);
|
|
12
|
+
(0, element_1.useLayoutEffect)(() => {
|
|
13
|
+
if (!containerRef.current) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const observer = new resize_observer_polyfill_1.default(([entry]) => {
|
|
17
|
+
const { width } = entry.contentRect;
|
|
18
|
+
if (width) {
|
|
19
|
+
for (const [key, value] of [...containerBreakpoints].reverse()) {
|
|
20
|
+
if (width >= value) {
|
|
21
|
+
setGridSize(key);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
observer.observe(containerRef.current);
|
|
28
|
+
return () => observer.disconnect();
|
|
29
|
+
}, [containerRef, containerBreakpoints]);
|
|
30
|
+
return gridSize;
|
|
31
|
+
}
|
|
32
|
+
exports.default = useGridSize;
|
|
33
|
+
//# sourceMappingURL=use-grid-size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-grid-size.js","sourceRoot":"","sources":["../../../src/hooks/use-grid-size.ts"],"names":[],"mappings":";;;AAAA,gDAA+D;AAC/D,gGAAsD;AAatD;;;GAGG;AACH,SAAwB,WAAW,CAAE,EAAE,YAAY,EAAE,oBAAoB,EAAS;IACjF,MAAM,CAAE,QAAQ,EAAE,WAAW,CAAE,GAAG,IAAA,kBAAQ,EAAmB,IAAI,CAAE,CAAC;IAEpE,IAAA,yBAAe,EAAE,GAAG,EAAE;QACrB,IAAK,CAAE,YAAY,CAAC,OAAO,EAAG,CAAC;YAC9B,OAAO;QACR,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,kCAAc,CAAE,CAAE,CAAE,KAAK,CAAE,EAAG,EAAE;YACpD,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC;YAEpC,IAAK,KAAK,EAAG,CAAC;gBACb,KAAM,MAAM,CAAE,GAAG,EAAE,KAAK,CAAE,IAAI,CAAE,GAAG,oBAAoB,CAAE,CAAC,OAAO,EAAE,EAAG,CAAC;oBACtE,IAAK,KAAK,IAAI,KAAK,EAAG,CAAC;wBACtB,WAAW,CAAE,GAAG,CAAE,CAAC;wBACnB,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC,CAAE,CAAC;QAEJ,QAAQ,CAAC,OAAO,CAAE,YAAY,CAAC,OAAO,CAAE,CAAC;QAEzC,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC,EAAE,CAAE,YAAY,EAAE,oBAAoB,CAAE,CAAE,CAAC;IAE5C,OAAO,QAAQ,CAAC;AACjB,CAAC;AA3BD,8BA2BC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const element_1 = require("@wordpress/element");
|
|
4
|
+
const useHighlightAdjacencyMatrix = ({ renderedGridPlans }) => {
|
|
5
|
+
return (0, element_1.useMemo)(() => {
|
|
6
|
+
const adjacencyMatrix = {};
|
|
7
|
+
const highlightIndices = renderedGridPlans.reduce((acc, gridPlan, index) => {
|
|
8
|
+
if (gridPlan.highlightLabel) {
|
|
9
|
+
acc.push(index);
|
|
10
|
+
}
|
|
11
|
+
return acc;
|
|
12
|
+
}, []);
|
|
13
|
+
renderedGridPlans.forEach(({ planSlug }, index) => {
|
|
14
|
+
adjacencyMatrix[planSlug] = { leftOfHighlight: false, rightOfHighlight: false };
|
|
15
|
+
highlightIndices.forEach((highlightIndex) => {
|
|
16
|
+
if (highlightIndex === index - 1) {
|
|
17
|
+
adjacencyMatrix[planSlug].rightOfHighlight = true;
|
|
18
|
+
}
|
|
19
|
+
if (highlightIndex === index + 1) {
|
|
20
|
+
adjacencyMatrix[planSlug].leftOfHighlight = true;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
if (highlightIndices.length === 1) {
|
|
25
|
+
adjacencyMatrix[renderedGridPlans[highlightIndices[0]].planSlug].isOnlyHighlight = true;
|
|
26
|
+
}
|
|
27
|
+
return adjacencyMatrix;
|
|
28
|
+
}, [renderedGridPlans]);
|
|
29
|
+
};
|
|
30
|
+
exports.default = useHighlightAdjacencyMatrix;
|
|
31
|
+
//# sourceMappingURL=use-highlight-adjacency-matrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-highlight-adjacency-matrix.js","sourceRoot":"","sources":["../../../src/hooks/use-highlight-adjacency-matrix.ts"],"names":[],"mappings":";;AAAA,gDAA6C;AAgB7C,MAAM,2BAA2B,GAAG,CAAE,EAAE,iBAAiB,EAAS,EAAG,EAAE;IACtE,OAAO,IAAA,iBAAO,EAAE,GAAG,EAAE;QACpB,MAAM,eAAe,GAAG,EAA8B,CAAC;QACvD,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAE,CAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAG,EAAE;YAC7E,IAAK,QAAQ,CAAC,cAAc,EAAG,CAAC;gBAC/B,GAAG,CAAC,IAAI,CAAE,KAAK,CAAE,CAAC;YACnB,CAAC;YACD,OAAO,GAAG,CAAC;QACZ,CAAC,EAAE,EAAc,CAAE,CAAC;QAEpB,iBAAiB,CAAC,OAAO,CAAE,CAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAG,EAAE;YACpD,eAAe,CAAE,QAAQ,CAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;YAElF,gBAAgB,CAAC,OAAO,CAAE,CAAE,cAAc,EAAG,EAAE;gBAC9C,IAAK,cAAc,KAAK,KAAK,GAAG,CAAC,EAAG,CAAC;oBACpC,eAAe,CAAE,QAAQ,CAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC;gBACrD,CAAC;gBACD,IAAK,cAAc,KAAK,KAAK,GAAG,CAAC,EAAG,CAAC;oBACpC,eAAe,CAAE,QAAQ,CAAE,CAAC,eAAe,GAAG,IAAI,CAAC;gBACpD,CAAC;YACF,CAAC,CAAE,CAAC;QACL,CAAC,CAAE,CAAC;QAEJ,IAAK,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAG,CAAC;YACrC,eAAe,CAAE,iBAAiB,CAAE,gBAAgB,CAAE,CAAC,CAAE,CAAE,CAAC,QAAQ,CAAE,CAAC,eAAe,GAAG,IAAI,CAAC;QAC/F,CAAC;QAED,OAAO,eAAe,CAAC;IACxB,CAAC,EAAE,CAAE,iBAAiB,CAAE,CAAE,CAAC;AAC5B,CAAC,CAAC;AAEF,kBAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const element_1 = require("@wordpress/element");
|
|
4
|
+
const i18n_calypso_1 = require("i18n-calypso");
|
|
5
|
+
const LARGE_ADD_ON_CURRENCY_CHAR_THRESHOLD = 7;
|
|
6
|
+
const LARGE_CURRENCY_CHAR_THRESHOLD = 6;
|
|
7
|
+
const LARGE_CURRENCY_COMBINED_CHAR_THRESHOLD = 9;
|
|
8
|
+
function useDisplayPrices(currencyCode, prices, ignoreWhitespace = false) {
|
|
9
|
+
/**
|
|
10
|
+
* Prices are represented in smallest units for a currency, and not as prices that
|
|
11
|
+
* are actually displayed. Ex. $20 is the integer 2000, and not 20. To determine if
|
|
12
|
+
* the display price is too long, we convert the integer to a display string.
|
|
13
|
+
*/
|
|
14
|
+
return (0, element_1.useMemo)(() => prices?.map((price) => {
|
|
15
|
+
const displayPrice = (0, i18n_calypso_1.formatCurrency)(price, currencyCode, {
|
|
16
|
+
stripZeros: true,
|
|
17
|
+
isSmallestUnit: true,
|
|
18
|
+
});
|
|
19
|
+
return ignoreWhitespace ? displayPrice.replace(/\s/g, '') : displayPrice;
|
|
20
|
+
}), [currencyCode, prices, ignoreWhitespace]);
|
|
21
|
+
}
|
|
22
|
+
function hasExceededPriceThreshold(displayPrices, isAddOn = false) {
|
|
23
|
+
const threshold = isAddOn ? LARGE_ADD_ON_CURRENCY_CHAR_THRESHOLD : LARGE_CURRENCY_CHAR_THRESHOLD;
|
|
24
|
+
return !!displayPrices?.some((price) => price.length > threshold);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Returns true if the combined length of the display prices exceeds the threshold.
|
|
28
|
+
* Checks the adjacent pairs in the displayPrices array,
|
|
29
|
+
* which correspnd to the original-price and discounted-price for each plan.
|
|
30
|
+
*/
|
|
31
|
+
function hasExceededCombinedPriceThreshold(displayPrices) {
|
|
32
|
+
if (!displayPrices || displayPrices.length < 2) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
for (let i = 0; i < displayPrices.length - 1; i++) {
|
|
36
|
+
const originalPrice = displayPrices[i];
|
|
37
|
+
const discountedPrice = displayPrices[i + 1];
|
|
38
|
+
if (originalPrice.length + discountedPrice.length > LARGE_CURRENCY_COMBINED_CHAR_THRESHOLD) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Hook that returns true if the string representation of any price (discounted/undiscounted)
|
|
46
|
+
* of any of the plan slugs exceeds 6 characters. For example, $4,000 would be 6 characters.
|
|
47
|
+
* Additionally, also returns true if the combined discounted / undiscounted prices exceed
|
|
48
|
+
* 9 characters. For example, $4,000 undiscounted and $30 discounted would be 9 characters.
|
|
49
|
+
* This is primarily used for lowering the font-size of "large" display prices.
|
|
50
|
+
*/
|
|
51
|
+
function useIsLargeCurrency({ prices, isAddOn = false, currencyCode, ignoreWhitespace = false, }) {
|
|
52
|
+
/**
|
|
53
|
+
* Because this hook is primarily used for lowering font-sizes of "large" display prices,
|
|
54
|
+
* this implementation is non-ideal. It assumes that each character in the display price,
|
|
55
|
+
* including currency symbols, comma separators, decimal points, etc. are all the same width.
|
|
56
|
+
*
|
|
57
|
+
* For the time being, however, this is a good enough approximation and works with our existing
|
|
58
|
+
* currencies. We'll need to update this in the near future, especially to prevent issues with
|
|
59
|
+
* newly introduced currencies.
|
|
60
|
+
*
|
|
61
|
+
* https://github.com/Automattic/wp-calypso/pull/81537#discussion_r1323182287
|
|
62
|
+
*/
|
|
63
|
+
const displayPrices = useDisplayPrices(currencyCode, prices, ignoreWhitespace);
|
|
64
|
+
const exceedsPriceThreshold = hasExceededPriceThreshold(displayPrices, isAddOn);
|
|
65
|
+
const exceedsCombinedPriceThreshold = hasExceededCombinedPriceThreshold(displayPrices);
|
|
66
|
+
return isAddOn ? exceedsPriceThreshold : exceedsPriceThreshold || exceedsCombinedPriceThreshold;
|
|
67
|
+
}
|
|
68
|
+
exports.default = useIsLargeCurrency;
|
|
69
|
+
//# sourceMappingURL=use-is-large-currency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-is-large-currency.js","sourceRoot":"","sources":["../../../src/hooks/use-is-large-currency.ts"],"names":[],"mappings":";;AAAA,gDAA6C;AAC7C,+CAA8C;AAC9C,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAC/C,MAAM,6BAA6B,GAAG,CAAC,CAAC;AACxC,MAAM,sCAAsC,GAAG,CAAC,CAAC;AASjD,SAAS,gBAAgB,CAAE,YAAoB,EAAE,MAAiB,EAAE,gBAAgB,GAAG,KAAK;IAC3F;;;;OAIG;IAEH,OAAO,IAAA,iBAAO,EACb,GAAG,EAAE,CACJ,MAAM,EAAE,GAAG,CAAE,CAAE,KAAK,EAAG,EAAE;QACxB,MAAM,YAAY,GAAG,IAAA,6BAAc,EAAE,KAAK,EAAE,YAAY,EAAE;YACzD,UAAU,EAAE,IAAI;YAChB,cAAc,EAAE,IAAI;SACpB,CAAE,CAAC;QAEJ,OAAO,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAE,KAAK,EAAE,EAAE,CAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAC5E,CAAC,CAAE,EACJ,CAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAE,CAC1C,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAAE,aAAwB,EAAE,OAAO,GAAG,KAAK;IAC5E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACjG,OAAO,CAAC,CAAE,aAAa,EAAE,IAAI,CAAE,CAAE,KAAK,EAAG,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAE,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACH,SAAS,iCAAiC,CAAE,aAAwB;IACnE,IAAK,CAAE,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAG,CAAC;QACnD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,KAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAG,CAAC;QACrD,MAAM,aAAa,GAAG,aAAa,CAAE,CAAC,CAAE,CAAC;QACzC,MAAM,eAAe,GAAG,aAAa,CAAE,CAAC,GAAG,CAAC,CAAE,CAAC;QAE/C,IAAK,aAAa,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,sCAAsC,EAAG,CAAC;YAC9F,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,SAAwB,kBAAkB,CAAE,EAC3C,MAAM,EACN,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,gBAAgB,GAAG,KAAK,GACjB;IACP;;;;;;;;;;OAUG;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAE,CAAC;IACjF,MAAM,qBAAqB,GAAG,yBAAyB,CAAE,aAAa,EAAE,OAAO,CAAE,CAAC;IAClF,MAAM,6BAA6B,GAAG,iCAAiC,CAAE,aAAa,CAAE,CAAC;IAEzF,OAAO,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,IAAI,6BAA6B,CAAC;AACjG,CAAC;AAtBD,qCAsBC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useManageTooltipToggle = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const touch_detect_1 = require("../lib/touch-detect");
|
|
6
|
+
function useManageTooltipToggle() {
|
|
7
|
+
const [activeTooltipId, setActiveTooltipId] = (0, react_1.useState)('');
|
|
8
|
+
const isTouch = (0, touch_detect_1.hasTouch)();
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
if (!isTouch) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
// Close all tooltips if the user touches anywhere outside a tooltip container.
|
|
14
|
+
// Since the plan logos are an SVG, we are checking the event target's parent classes to determine the tooltip container.
|
|
15
|
+
const closeAllTooltips = (event) => {
|
|
16
|
+
const eventTarget = event.target;
|
|
17
|
+
if (!eventTarget.closest('.plans-2023-tooltip__hover-area-container')) {
|
|
18
|
+
setActiveTooltipId('');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
document.addEventListener('touchstart', closeAllTooltips);
|
|
22
|
+
return () => {
|
|
23
|
+
document.removeEventListener('touchstart', closeAllTooltips);
|
|
24
|
+
};
|
|
25
|
+
}, [isTouch]);
|
|
26
|
+
return [activeTooltipId, setActiveTooltipId];
|
|
27
|
+
}
|
|
28
|
+
exports.useManageTooltipToggle = useManageTooltipToggle;
|
|
29
|
+
//# sourceMappingURL=use-manage-tooltip-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-manage-tooltip-toggle.js","sourceRoot":"","sources":["../../../src/hooks/use-manage-tooltip-toggle.ts"],"names":[],"mappings":";;;AAAA,iCAAsE;AACtE,sDAA+C;AAE/C,SAAgB,sBAAsB;IACrC,MAAM,CAAE,eAAe,EAAE,kBAAkB,CAAE,GAAG,IAAA,gBAAQ,EAAE,EAAE,CAAE,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAA,uBAAQ,GAAE,CAAC;IAE3B,IAAA,iBAAS,EAAE,GAAG,EAAE;QACf,IAAK,CAAE,OAAO,EAAG,CAAC;YACjB,OAAO;QACR,CAAC;QAED,+EAA+E;QAC/E,yHAAyH;QACzH,MAAM,gBAAgB,GAAG,CAAE,KAAiB,EAAG,EAAE;YAChD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAiB,CAAC;YAC5C,IAAK,CAAE,WAAW,CAAC,OAAO,CAAE,2CAA2C,CAAE,EAAG,CAAC;gBAC5E,kBAAkB,CAAE,EAAE,CAAE,CAAC;YAC1B,CAAC;QACF,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAE,YAAY,EAAE,gBAAgB,CAAE,CAAC;QAE5D,OAAO,GAAG,EAAE;YACX,QAAQ,CAAC,mBAAmB,CAAE,YAAY,EAAE,gBAAgB,CAAE,CAAC;QAChE,CAAC,CAAC;IACH,CAAC,EAAE,CAAE,OAAO,CAAE,CAAE,CAAC;IAEjB,OAAO,CAAE,eAAe,EAAE,kBAAkB,CAAE,CAAC;AAChD,CAAC;AA1BD,wDA0BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePlanPricingInfoFromGridPlans = void 0;
|
|
4
|
+
const element_1 = require("@wordpress/element");
|
|
5
|
+
function usePlanPricingInfoFromGridPlans({ gridPlans, returnMonthly = true, }) {
|
|
6
|
+
return (0, element_1.useMemo)(() => gridPlans.reduce((acc, gridPlan) => {
|
|
7
|
+
const { pricing: { originalPrice, discountedPrice, currencyCode }, } = gridPlan;
|
|
8
|
+
const originalPriceForTerm = originalPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
9
|
+
const discountedPriceForTerm = discountedPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
10
|
+
return {
|
|
11
|
+
prices: [...acc.prices, originalPriceForTerm, discountedPriceForTerm],
|
|
12
|
+
currencyCode: currencyCode ?? acc.currencyCode,
|
|
13
|
+
};
|
|
14
|
+
}, { prices: [], currencyCode: 'USD' }), [gridPlans, returnMonthly]);
|
|
15
|
+
}
|
|
16
|
+
exports.usePlanPricingInfoFromGridPlans = usePlanPricingInfoFromGridPlans;
|
|
17
|
+
//# sourceMappingURL=use-plan-pricing-info-from-grid-plans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-plan-pricing-info-from-grid-plans.js","sourceRoot":"","sources":["../../../src/hooks/use-plan-pricing-info-from-grid-plans.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAQ7C,SAAgB,+BAA+B,CAAE,EAChD,SAAS,EACT,aAAa,GAAG,IAAI,GAIpB;IACA,OAAO,IAAA,iBAAO,EACb,GAAG,EAAE,CACJ,SAAS,CAAC,MAAM,CACf,CAAE,GAAgB,EAAE,QAAQ,EAAG,EAAE;QAChC,MAAM,EACL,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,GACzD,GAAG,QAAQ,CAAC;QAEb,MAAM,oBAAoB,GAAG,aAAa,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QACtF,MAAM,sBAAsB,GAAG,eAAe,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QAE1F,OAAO;YACN,MAAM,EAAE,CAAE,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAE;YACvE,YAAY,EAAE,YAAY,IAAI,GAAG,CAAC,YAAY;SAC9C,CAAC;IACH,CAAC,EACD,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CACnC,EACF,CAAE,SAAS,EAAE,aAAa,CAAE,CAC5B,CAAC;AACH,CAAC;AA3BD,0EA2BC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EFFECTIVE_TERMS_LIST = exports.useRestructuredPlanFeaturesForComparisonGrid = exports.usePlanTypesWithIntent = exports.usePlansFromTypes = exports.usePlanFeaturesForGridPlans = exports.usePlanBillingDescription = exports.useGridPlanForSpotlight = exports.useGridPlansForComparisonGrid = exports.useGridPlansForFeaturesGrid = exports.useGridPlans = exports.useManageTooltipToggle = exports.Plans2023Tooltip = exports.PlanButton = exports.PlanTypeSelector = exports.FeaturesGrid = exports.ComparisonGrid = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const comparison_grid_1 = tslib_1.__importDefault(require("./components/comparison-grid"));
|
|
6
|
+
exports.ComparisonGrid = comparison_grid_1.default;
|
|
7
|
+
const features_grid_1 = tslib_1.__importDefault(require("./components/features-grid"));
|
|
8
|
+
exports.FeaturesGrid = features_grid_1.default;
|
|
9
|
+
const plan_button_1 = tslib_1.__importDefault(require("./components/plan-button"));
|
|
10
|
+
exports.PlanButton = plan_button_1.default;
|
|
11
|
+
const plan_type_selector_1 = tslib_1.__importDefault(require("./components/plan-type-selector"));
|
|
12
|
+
exports.PlanTypeSelector = plan_type_selector_1.default;
|
|
13
|
+
const plans_2023_tooltip_1 = require("./components/plans-2023-tooltip");
|
|
14
|
+
Object.defineProperty(exports, "Plans2023Tooltip", { enumerable: true, get: function () { return plans_2023_tooltip_1.Plans2023Tooltip; } });
|
|
15
|
+
const constants_1 = require("./constants");
|
|
16
|
+
Object.defineProperty(exports, "EFFECTIVE_TERMS_LIST", { enumerable: true, get: function () { return constants_1.EFFECTIVE_TERMS_LIST; } });
|
|
17
|
+
const use_grid_plan_for_spotlight_1 = tslib_1.__importDefault(require("./hooks/data-store/use-grid-plan-for-spotlight"));
|
|
18
|
+
exports.useGridPlanForSpotlight = use_grid_plan_for_spotlight_1.default;
|
|
19
|
+
const use_grid_plans_1 = tslib_1.__importStar(require("./hooks/data-store/use-grid-plans"));
|
|
20
|
+
exports.useGridPlans = use_grid_plans_1.default;
|
|
21
|
+
Object.defineProperty(exports, "usePlanTypesWithIntent", { enumerable: true, get: function () { return use_grid_plans_1.usePlanTypesWithIntent; } });
|
|
22
|
+
const use_grid_plans_for_comparison_grid_1 = tslib_1.__importDefault(require("./hooks/data-store/use-grid-plans-for-comparison-grid"));
|
|
23
|
+
exports.useGridPlansForComparisonGrid = use_grid_plans_for_comparison_grid_1.default;
|
|
24
|
+
const use_grid_plans_for_features_grid_1 = tslib_1.__importDefault(require("./hooks/data-store/use-grid-plans-for-features-grid"));
|
|
25
|
+
exports.useGridPlansForFeaturesGrid = use_grid_plans_for_features_grid_1.default;
|
|
26
|
+
const use_plan_billing_description_1 = tslib_1.__importDefault(require("./hooks/data-store/use-plan-billing-description"));
|
|
27
|
+
exports.usePlanBillingDescription = use_plan_billing_description_1.default;
|
|
28
|
+
const use_plan_features_for_grid_plans_1 = tslib_1.__importDefault(require("./hooks/data-store/use-plan-features-for-grid-plans"));
|
|
29
|
+
exports.usePlanFeaturesForGridPlans = use_plan_features_for_grid_plans_1.default;
|
|
30
|
+
const use_plans_from_types_1 = tslib_1.__importDefault(require("./hooks/data-store/use-plans-from-types"));
|
|
31
|
+
exports.usePlansFromTypes = use_plans_from_types_1.default;
|
|
32
|
+
const use_restructured_plan_features_for_comparison_grid_1 = tslib_1.__importDefault(require("./hooks/data-store/use-restructured-plan-features-for-comparison-grid"));
|
|
33
|
+
exports.useRestructuredPlanFeaturesForComparisonGrid = use_restructured_plan_features_for_comparison_grid_1.default;
|
|
34
|
+
const use_manage_tooltip_toggle_1 = require("./hooks/use-manage-tooltip-toggle");
|
|
35
|
+
Object.defineProperty(exports, "useManageTooltipToggle", { enumerable: true, get: function () { return use_manage_tooltip_toggle_1.useManageTooltipToggle; } });
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;AAAA,2FAA0D;AAwBjD,yBAxBF,yBAAc,CAwBE;AAvBvB,uFAAsD;AAuB7B,uBAvBlB,uBAAY,CAuBkB;AAtBrC,mFAAkD;AAsBO,qBAtBlD,qBAAU,CAsBkD;AArBnE,iGAA+D;AAqBxB,2BArBhC,4BAAgB,CAqBgC;AApBvD,wEAAmE;AAoBE,iGApB5D,qCAAgB,OAoB4D;AAnBrF,2CAAmD;AAwC1C,qGAxCA,gCAAoB,OAwCA;AAvC7B,yHAAqF;AA4BpF,kCA5BM,qCAAuB,CA4BN;AA3BxB,4FAAyF;AAwBxF,uBAxBM,wBAAY,CAwBN;AAOZ,uGA/BsB,uCAAsB,OA+BtB;AA9BvB,uIAAkG;AAyBjG,wCAzBM,4CAA6B,CAyBN;AAxB9B,mIAA8F;AAuB7F,sCAvBM,0CAA2B,CAuBN;AAtB5B,2HAAwF;AAyBvF,oCAzBM,sCAAyB,CAyBN;AAxB1B,mIAA8F;AAyB7F,sCAzBM,0CAA2B,CAyBN;AAxB5B,2GAAwE;AAyBvE,4BAzBM,8BAAiB,CAyBN;AAxBlB,uKAAiI;AA0BhI,uDA1BM,4DAA4C,CA0BN;AAzB7C,iFAA2E;AAgB1E,uGAhBQ,kDAAsB,OAgBR"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Removes features that are not available in any of the visible grid plans.
|
|
5
|
+
*/
|
|
6
|
+
const filterUnusedFeaturesObject = (visibleGridPlans, features) => {
|
|
7
|
+
if (!visibleGridPlans || !features) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
// Get all unique feature slugs in all gridPlans.
|
|
11
|
+
const uniqueFeaturesAvailable = new Set(visibleGridPlans
|
|
12
|
+
.map((gridPlan) => [...gridPlan.features.wpcomFeatures, ...gridPlan.features.jetpackFeatures].map((feature) => feature.getSlug()))
|
|
13
|
+
.flat());
|
|
14
|
+
return features.filter((feature) => {
|
|
15
|
+
return uniqueFeaturesAvailable.has(feature.getSlug());
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = filterUnusedFeaturesObject;
|
|
19
|
+
//# sourceMappingURL=filter-unused-features-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-unused-features-object.js","sourceRoot":"","sources":["../../../src/lib/filter-unused-features-object.ts"],"names":[],"mappings":";;AAGA;;GAEG;AACH,MAAM,0BAA0B,GAAG,CAClC,gBAA4B,EAC5B,QAAyB,EACP,EAAE;IACpB,IAAK,CAAE,gBAAgB,IAAI,CAAE,QAAQ,EAAG,CAAC;QACxC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,iDAAiD;IACjD,MAAM,uBAAuB,GAAG,IAAI,GAAG,CACtC,gBAAgB;SACd,GAAG,CAAE,CAAE,QAAQ,EAAG,EAAE,CACpB,CAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,aAAa,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAE,CAAC,GAAG,CAC/E,CAAE,OAAO,EAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAChC,CACD;SACA,IAAI,EAAE,CACR,CAAC;IAEF,OAAO,QAAQ,CAAC,MAAM,CAAE,CAAE,OAAO,EAAG,EAAE;QACrC,OAAO,uBAAuB,CAAC,GAAG,CAAE,OAAO,CAAC,OAAO,EAAE,CAAE,CAAC;IACzD,CAAC,CAAE,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// TODO: Temporary until feature definitions are ported to calypso-products package
|
|
4
|
+
const getPlanFeaturesObject = (featuresList, planFeatures) => {
|
|
5
|
+
if (!planFeatures) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
return planFeatures.map((featuresConst) => featuresList[featuresConst]);
|
|
9
|
+
};
|
|
10
|
+
exports.default = getPlanFeaturesObject;
|
|
11
|
+
//# sourceMappingURL=get-plan-features-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-plan-features-object.js","sourceRoot":"","sources":["../../../src/lib/get-plan-features-object.ts"],"names":[],"mappings":";;AAEA,mFAAmF;AACnF,MAAM,qBAAqB,GAAG,CAAE,YAAyB,EAAE,YAA8B,EAAG,EAAE;IAC7F,IAAK,CAAE,YAAY,EAAG,CAAC;QACtB,OAAO,EAAE,CAAC;IACX,CAAC;IAED,OAAO,YAAY,CAAC,GAAG,CAAE,CAAE,aAAa,EAAG,EAAE,CAAC,YAAY,CAAE,aAAa,CAAE,CAAE,CAAC;AAC/E,CAAC,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPlanPricingInfoFromGridPlans = void 0;
|
|
4
|
+
function getPlanPricingInfoFromGridPlans({ gridPlans, returnMonthly = true, }) {
|
|
5
|
+
return gridPlans.reduce((acc, gridPlan) => {
|
|
6
|
+
const { pricing: { originalPrice, discountedPrice, currencyCode }, } = gridPlan;
|
|
7
|
+
const originalPriceForTerm = originalPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
8
|
+
const discountedPriceForTerm = discountedPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
9
|
+
return {
|
|
10
|
+
prices: [...acc.prices, originalPriceForTerm, discountedPriceForTerm],
|
|
11
|
+
...(currencyCode && { currencyCode }),
|
|
12
|
+
};
|
|
13
|
+
}, { prices: [], currencyCode: 'USD' });
|
|
14
|
+
}
|
|
15
|
+
exports.getPlanPricingInfoFromGridPlans = getPlanPricingInfoFromGridPlans;
|
|
16
|
+
//# sourceMappingURL=get-plan-pricing-info-from-grid-plans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-plan-pricing-info-from-grid-plans.js","sourceRoot":"","sources":["../../../src/lib/get-plan-pricing-info-from-grid-plans.ts"],"names":[],"mappings":";;;AAOA,SAAgB,+BAA+B,CAAE,EAChD,SAAS,EACT,aAAa,GAAG,IAAI,GAIpB;IACA,OAAO,SAAS,CAAC,MAAM,CACtB,CAAE,GAAgB,EAAE,QAAQ,EAAG,EAAE;QAChC,MAAM,EACL,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,GACzD,GAAG,QAAQ,CAAC;QAEb,MAAM,oBAAoB,GAAG,aAAa,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QACtF,MAAM,sBAAsB,GAAG,eAAe,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QAE1F,OAAO;YACN,MAAM,EAAE,CAAE,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAE;YACvE,GAAG,CAAE,YAAY,IAAI,EAAE,YAAY,EAAE,CAAE;SACvC,CAAC;IACH,CAAC,EACD,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CACnC,CAAC;AACH,CAAC;AAvBD,0EAuBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSamePlan = void 0;
|
|
4
|
+
const calypso_products_1 = require("@automattic/calypso-products");
|
|
5
|
+
function isSamePlan(currentSitePlanSlug, planSlug) {
|
|
6
|
+
// Handles matching variants of the free plan, like PLAN_P2_FREE and PLAN_JETPACK_FREE
|
|
7
|
+
return currentSitePlanSlug === calypso_products_1.PLAN_FREE
|
|
8
|
+
? (0, calypso_products_1.isFreePlan)(planSlug)
|
|
9
|
+
: currentSitePlanSlug === planSlug;
|
|
10
|
+
}
|
|
11
|
+
exports.isSamePlan = isSamePlan;
|
|
12
|
+
//# sourceMappingURL=is-same-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-same-plan.js","sourceRoot":"","sources":["../../../src/lib/is-same-plan.ts"],"names":[],"mappings":";;;AAAA,mEAAoF;AAEpF,SAAgB,UAAU,CAAE,mBAA2B,EAAE,QAAkB;IAC1E,sFAAsF;IACtF,OAAO,mBAAmB,KAAK,4BAAS;QACvC,CAAC,CAAC,IAAA,6BAAU,EAAE,QAAQ,CAAE;QACxB,CAAC,CAAC,mBAAmB,KAAK,QAAQ,CAAC;AACrC,CAAC;AALD,gCAKC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortPlans = void 0;
|
|
4
|
+
const calypso_products_1 = require("@automattic/calypso-products");
|
|
5
|
+
const is_popular_plan_1 = require("../hooks/data-store/is-popular-plan");
|
|
6
|
+
function sortPlans(gridPlans, currentSitePlanProductSlug, isMobile) {
|
|
7
|
+
let firstPlanIndex = -1;
|
|
8
|
+
// Try to find the current paid plan in the plans list
|
|
9
|
+
if (currentSitePlanProductSlug && !(0, calypso_products_1.isFreePlan)(currentSitePlanProductSlug)) {
|
|
10
|
+
firstPlanIndex = gridPlans.findIndex((gridPlan) => {
|
|
11
|
+
return gridPlan.planSlug === currentSitePlanProductSlug;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (firstPlanIndex < 0) {
|
|
15
|
+
// Site is on a free plan or the current plan is not in the list. Try to find the popular plan.
|
|
16
|
+
firstPlanIndex = gridPlans.findIndex(({ planSlug }) => {
|
|
17
|
+
return (0, is_popular_plan_1.isPopularPlan)(planSlug);
|
|
18
|
+
});
|
|
19
|
+
// If the popular plan exists, on mobile, it will be second plan for comparison.
|
|
20
|
+
if (firstPlanIndex > 0 && isMobile) {
|
|
21
|
+
firstPlanIndex = firstPlanIndex - 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (firstPlanIndex < 0) {
|
|
25
|
+
return gridPlans;
|
|
26
|
+
}
|
|
27
|
+
return [
|
|
28
|
+
// The first plan
|
|
29
|
+
gridPlans[firstPlanIndex],
|
|
30
|
+
// Rest of the plans in default order
|
|
31
|
+
...gridPlans.slice(firstPlanIndex + 1),
|
|
32
|
+
// Leftover plans (before the first plan) in descending order of value
|
|
33
|
+
...gridPlans.slice(0, firstPlanIndex).sort((planA, planB) => {
|
|
34
|
+
return ((planB?.pricing.originalPrice.full || 0) - (planA?.pricing.originalPrice.full || 0));
|
|
35
|
+
}),
|
|
36
|
+
].filter((gridPlan) => Boolean(gridPlan));
|
|
37
|
+
}
|
|
38
|
+
exports.sortPlans = sortPlans;
|
|
39
|
+
//# sourceMappingURL=sort-plan-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-plan-properties.js","sourceRoot":"","sources":["../../../src/lib/sort-plan-properties.ts"],"names":[],"mappings":";;;AAAA,mEAA0D;AAC1D,yEAAoE;AAGpE,SAAgB,SAAS,CACxB,SAAqB,EACrB,0BAA0C,EAC1C,QAAkB;IAElB,IAAI,cAAc,GAAG,CAAC,CAAC,CAAC;IAExB,sDAAsD;IACtD,IAAK,0BAA0B,IAAI,CAAE,IAAA,6BAAU,EAAE,0BAA0B,CAAE,EAAG,CAAC;QAChF,cAAc,GAAG,SAAS,CAAC,SAAS,CAAE,CAAE,QAAQ,EAAG,EAAE;YACpD,OAAO,QAAQ,CAAC,QAAQ,KAAK,0BAA0B,CAAC;QACzD,CAAC,CAAE,CAAC;IACL,CAAC;IAED,IAAK,cAAc,GAAG,CAAC,EAAG,CAAC;QAC1B,+FAA+F;QAC/F,cAAc,GAAG,SAAS,CAAC,SAAS,CAAE,CAAE,EAAE,QAAQ,EAAE,EAAG,EAAE;YACxD,OAAO,IAAA,+BAAa,EAAE,QAAQ,CAAE,CAAC;QAClC,CAAC,CAAE,CAAC;QACJ,gFAAgF;QAChF,IAAK,cAAc,GAAG,CAAC,IAAI,QAAQ,EAAG,CAAC;YACtC,cAAc,GAAG,cAAc,GAAG,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;IAED,IAAK,cAAc,GAAG,CAAC,EAAG,CAAC;QAC1B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO;QACN,iBAAiB;QACjB,SAAS,CAAE,cAAc,CAAE;QAC3B,qCAAqC;QACrC,GAAG,SAAS,CAAC,KAAK,CAAE,cAAc,GAAG,CAAC,CAAE;QACxC,sEAAsE;QACtE,GAAG,SAAS,CAAC,KAAK,CAAE,CAAC,EAAE,cAAc,CAAE,CAAC,IAAI,CAAE,CAAE,KAAK,EAAE,KAAK,EAAG,EAAE;YAChE,OAAO,CACN,CAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,CAAE,GAAG,CAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,CAAE,CACvF,CAAC;QACH,CAAC,CAAE;KACH,CAAC,MAAM,CAAE,CAAE,QAAQ,EAAG,EAAE,CAAC,OAAO,CAAE,QAAQ,CAAE,CAAE,CAAC;AACjD,CAAC;AAzCD,8BAyCC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasTouch = void 0;
|
|
4
|
+
// eslint-disable-next-line inclusive-language/use-inclusive-words
|
|
5
|
+
/**
|
|
6
|
+
* This test is for touch events.
|
|
7
|
+
* It may not accurately detect a touch screen, but may be close enough depending on the use case.
|
|
8
|
+
* @copyright Modernizr © 2009-2015.
|
|
9
|
+
* @license MIT
|
|
10
|
+
* @see https://github.com/Modernizr/Modernizr/blob/master/LICENSE.md
|
|
11
|
+
* @see https://github.com/Modernizr/Modernizr/blob/HEAD/feature-detects/touchevents.js
|
|
12
|
+
* @returns {boolean} whether touch screen is available
|
|
13
|
+
*/
|
|
14
|
+
function hasTouch() {
|
|
15
|
+
/* global DocumentTouch:true */
|
|
16
|
+
return (window &&
|
|
17
|
+
('ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch)));
|
|
18
|
+
}
|
|
19
|
+
exports.hasTouch = hasTouch;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/touch-detect/index.js"],"names":[],"mappings":";;;AAAA,kEAAkE;AAClE;;;;;;;;GAQG;AACH,SAAgB,QAAQ;IACvB,+BAA+B;IAC/B,OAAO,CACN,MAAM;QACN,CAAE,cAAc,IAAI,MAAM,IAAI,CAAE,MAAM,CAAC,aAAa,IAAI,QAAQ,YAAY,aAAa,CAAE,CAAE,CAC7F,CAAC;AACH,CAAC;AAND,4BAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default async ({ path }) => {
|
|
2
|
+
const response = await fetch(path);
|
|
3
|
+
const data = await response.json();
|
|
4
|
+
return data.body;
|
|
5
|
+
};
|
|
6
|
+
export function canAccessWpcomApis() {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
export function reloadProxy() { }
|
|
10
|
+
export function requestAllBlogsAccess() { }
|
|
11
|
+
//# sourceMappingURL=wpcom-proxy-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wpcom-proxy-request.js","sourceRoot":"","sources":["../../../src/__mocks__/wpcom-proxy-request.js"],"names":[],"mappings":"AAAA,eAAe,KAAK,EAAG,EAAE,IAAI,EAAE,EAAG,EAAE;IACnC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAE,IAAI,CAAE,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,UAAU,kBAAkB;IACjC,OAAO,IAAI,CAAC;AACb,CAAC;AAED,MAAM,UAAU,WAAW,KAAI,CAAC;AAEhC,MAAM,UAAU,qBAAqB,KAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
$plans-2023-small-breakpoint: 780px;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see @automattic/plans-grid-next/src/components/plan-type-selector/style.scss
|
|
5
|
+
* This introduces mobile only sticky behavior for the plan type selector.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated
|
|
8
|
+
* TODO clk This should migrate to use grid-size on the parent container. As done for features/comparison grid.
|
|
9
|
+
*/
|
|
10
|
+
@mixin plan-type-selector-custom-mobile-breakpoint() {
|
|
11
|
+
@media (max-width: $plans-2023-small-breakpoint) {
|
|
12
|
+
@content;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@mixin plans-grid-large() {
|
|
2
|
+
.plans-grid-next.is-large &,
|
|
3
|
+
.plans-grid-next.is-xlarge &, {
|
|
4
|
+
@content;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin plans-grid-medium-large() {
|
|
9
|
+
.plans-grid-next.is-smedium &,
|
|
10
|
+
.plans-grid-next.is-medium &,
|
|
11
|
+
.plans-grid-next.is-large &,
|
|
12
|
+
.plans-grid-next.is-xlarge & {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
@import "@automattic/onboarding/styles/mixins";
|
|
2
|
+
@import "./mixins";
|
|
3
|
+
@import "./media-queries";
|
|
4
|
+
|
|
5
|
+
$table-cell-max-width: 344px;
|
|
6
|
+
$mobile-card-max-width: 440px;
|
|
7
|
+
|
|
8
|
+
/*********************************
|
|
9
|
+
* Storage Add-On Dropdown parts *
|
|
10
|
+
*********************************/
|
|
11
|
+
|
|
12
|
+
.plans-grid-next-storage-feature-label__container {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: 5px;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: baseline;
|
|
17
|
+
|
|
18
|
+
&.is-row {
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Comparison grid override
|
|
24
|
+
* Always render as column/wrapped
|
|
25
|
+
*/
|
|
26
|
+
.plans-grid-next-comparison-grid & {
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.plans-grid-next-storage-feature-label__offset-price {
|
|
33
|
+
color: var(--studio-green-50);
|
|
34
|
+
font-size: $font-body-extra-small;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.plans-grid-next-storage-dropdown__addon-offset-price-container {
|
|
39
|
+
width: 100%;
|
|
40
|
+
margin-top: 8px;
|
|
41
|
+
text-align: left;
|
|
42
|
+
|
|
43
|
+
.plans-grid-next-storage-dropdown__addon-offset-price {
|
|
44
|
+
font-size: $font-body-extra-small;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.plans-grid-next-storage-dropdown__option {
|
|
50
|
+
display: inline-block;
|
|
51
|
+
line-height: 20px;
|
|
52
|
+
min-height: 30px;
|
|
53
|
+
padding-top: 5px;
|
|
54
|
+
font-size: 0.75rem;
|
|
55
|
+
text-align: start;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.plans-grid-next-storage-dropdown__option-title, .plans-grid-next-storage-dropdown__option .title {
|
|
59
|
+
color: var(--color-text);
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
|
|
62
|
+
.plans-grid-next-features-grid__mobile-plan-card & {
|
|
63
|
+
font-size: 0.875rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.plans-grid-next-storage-dropdown__option-price,
|
|
68
|
+
.plans-grid-next-storage-dropdown__option-per-month {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
|
|
71
|
+
font-size: 0.75rem;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.plans-grid-next-storage-dropdown__option-price {
|
|
76
|
+
margin-left: 4px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.plans-grid-next-storage-feature-label__volume {
|
|
80
|
+
color: var(--studio-gray-90);
|
|
81
|
+
padding: 4px 0;
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
line-height: 20px;
|
|
84
|
+
font-size: $font-body-extra-small;
|
|
85
|
+
|
|
86
|
+
&.is-badge {
|
|
87
|
+
background: #f2f2f2;
|
|
88
|
+
/* stylelint-disable-next-line */
|
|
89
|
+
border-radius: 5px;
|
|
90
|
+
text-align: center;
|
|
91
|
+
width: fit-content;
|
|
92
|
+
min-width: 64px;
|
|
93
|
+
|
|
94
|
+
.plans-grid-next-comparison-grid & {
|
|
95
|
+
margin-top: 10px;
|
|
96
|
+
margin-left: auto;
|
|
97
|
+
margin-right: auto;
|
|
98
|
+
|
|
99
|
+
@include plans-grid-medium-large {
|
|
100
|
+
margin-top: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.plans-grid-next-plan-storage {
|
|
107
|
+
width: 100%;
|
|
108
|
+
|
|
109
|
+
.plan-features-2023-grid__plan-spotlight & {
|
|
110
|
+
padding-top: 0;
|
|
111
|
+
padding-bottom: 32px;
|
|
112
|
+
max-width: $table-cell-max-width;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.plans-grid-next-comparison-grid & {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/***********************************
|
|
120
|
+
* Custom Select Control overrides *
|
|
121
|
+
***********************************/
|
|
122
|
+
|
|
123
|
+
.components-custom-select-control {
|
|
124
|
+
line-height: 0px;
|
|
125
|
+
font-size: 0.75rem;
|
|
126
|
+
|
|
127
|
+
/**************
|
|
128
|
+
* 1. General *
|
|
129
|
+
**************/
|
|
130
|
+
|
|
131
|
+
.components-custom-select-control__label {
|
|
132
|
+
color: var(--studio-gray-100);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.components-custom-select-control__menu {
|
|
136
|
+
margin-left: 0;
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.components-custom-select-control__item {
|
|
141
|
+
&.is-highlighted {
|
|
142
|
+
background-color: var(--studio-gray-0);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/*****************************
|
|
147
|
+
* 2. Features Grid - mobile *
|
|
148
|
+
*****************************/
|
|
149
|
+
|
|
150
|
+
.plans-grid-next-features-grid__mobile-plan-card & {
|
|
151
|
+
.components-custom-select-control__button {
|
|
152
|
+
height: 40px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**********************
|
|
157
|
+
* 3. Comparison Grid *
|
|
158
|
+
**********************/
|
|
159
|
+
|
|
160
|
+
.plans-grid-next-comparison-grid & {
|
|
161
|
+
width: 100%;
|
|
162
|
+
label {
|
|
163
|
+
display: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.components-custom-select-control__menu {
|
|
167
|
+
margin-left: 0;
|
|
168
|
+
li {
|
|
169
|
+
text-align: left;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|