@automattic/plans-grid-next 1.0.1 → 1.0.3
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 -1
- package/dist/cjs/_shared.scss +4 -3
- package/dist/cjs/components/comparison-grid/index.js +101 -71
- package/dist/cjs/components/comparison-grid/index.js.map +1 -1
- package/dist/cjs/components/comparison-grid/index.stories.js.map +1 -1
- package/dist/cjs/components/comparison-grid/style.scss +10 -2
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js +0 -12
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js.map +1 -1
- package/dist/cjs/components/features-grid/index.js +9 -6
- package/dist/cjs/components/features-grid/index.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-features-list.js +10 -3
- package/dist/cjs/components/features-grid/plan-features-list.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-headers.js +2 -2
- package/dist/cjs/components/features-grid/plan-headers.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-tagline.js +1 -1
- package/dist/cjs/components/features-grid/plan-tagline.js.map +1 -1
- package/dist/cjs/components/features-grid/style.scss +111 -21
- package/dist/cjs/components/features-grid/table.js +1 -1
- package/dist/cjs/components/features-grid/table.js.map +1 -1
- package/dist/cjs/components/features.js +43 -4
- package/dist/cjs/components/features.js.map +1 -1
- package/dist/cjs/components/item.js +1 -1
- package/dist/cjs/components/item.js.map +1 -1
- package/dist/cjs/components/plan-button/index.js +5 -3
- package/dist/cjs/components/plan-button/index.js.map +1 -1
- package/dist/cjs/components/plan-button/style.scss +71 -47
- package/dist/cjs/components/plan-div-td-container.js +4 -1
- package/dist/cjs/components/plan-div-td-container.js.map +1 -1
- package/dist/cjs/components/plan-logo.js +6 -3
- package/dist/cjs/components/plan-logo.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js +12 -1
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js +4 -33
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +11 -13
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -1
- package/dist/cjs/components/plans-2023-tooltip.js +16 -5
- package/dist/cjs/components/plans-2023-tooltip.js.map +1 -1
- package/dist/cjs/components/shared/action-button/index.js +22 -7
- package/dist/cjs/components/shared/action-button/index.js.map +1 -1
- package/dist/cjs/components/shared/action-button/style.scss +4 -0
- package/dist/cjs/components/shared/billing-timeframe/index.js +8 -4
- package/dist/cjs/components/shared/billing-timeframe/index.js.map +1 -1
- package/dist/cjs/components/shared/header-price/index.js +60 -15
- package/dist/cjs/components/shared/header-price/index.js.map +1 -1
- package/dist/cjs/components/shared/header-price/style.scss +10 -2
- package/dist/cjs/components/shared/storage/components/plan-storage.js +2 -2
- package/dist/cjs/components/shared/storage/components/plan-storage.js.map +1 -1
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js +29 -6
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js.map +1 -1
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js +2 -1
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js.map +1 -1
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js +2 -0
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js.map +1 -1
- package/dist/cjs/fixtures/sites-purchases.js +2 -4
- package/dist/cjs/fixtures/sites-purchases.js.map +1 -1
- package/dist/cjs/grid-context.js +4 -1
- package/dist/cjs/grid-context.js.map +1 -1
- package/dist/cjs/hooks/data-store/get-renewal-pricing-text.js +50 -0
- package/dist/cjs/hooks/data-store/get-renewal-pricing-text.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js +6 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js +6 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-grid-plans.js +175 -21
- package/dist/cjs/hooks/data-store/use-grid-plans.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-highlight-labels.js +13 -4
- package/dist/cjs/hooks/data-store/use-highlight-labels.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js +68 -13
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-plan-billing-period.js +14 -0
- package/dist/cjs/hooks/data-store/use-plan-billing-period.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js +76 -2
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +60 -12
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-title-badges.js +19 -0
- package/dist/cjs/hooks/data-store/use-title-badges.js.map +1 -0
- package/dist/cjs/hooks/use-grid-size.js.map +1 -1
- package/dist/cjs/hooks/use-is-large-currency.js +2 -2
- package/dist/cjs/hooks/use-is-large-currency.js.map +1 -1
- package/dist/cjs/hooks/use-visible-grid-plans.js +70 -0
- package/dist/cjs/hooks/use-visible-grid-plans.js.map +1 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/get-plan-features-object.js +15 -2
- package/dist/cjs/lib/get-plan-features-object.js.map +1 -1
- package/dist/cjs/lib/plan-pricing-utils.js +135 -0
- package/dist/cjs/lib/plan-pricing-utils.js.map +1 -0
- package/dist/esm/_shared.scss +4 -3
- package/dist/esm/components/comparison-grid/index.js +102 -72
- package/dist/esm/components/comparison-grid/index.js.map +1 -1
- package/dist/esm/components/comparison-grid/index.stories.js.map +1 -1
- package/dist/esm/components/comparison-grid/style.scss +10 -2
- package/dist/esm/components/features-grid/client-logo-list/client-list.js +0 -12
- package/dist/esm/components/features-grid/client-logo-list/client-list.js.map +1 -1
- package/dist/esm/components/features-grid/index.js +9 -6
- package/dist/esm/components/features-grid/index.js.map +1 -1
- package/dist/esm/components/features-grid/plan-features-list.js +10 -3
- package/dist/esm/components/features-grid/plan-features-list.js.map +1 -1
- package/dist/esm/components/features-grid/plan-headers.js +3 -3
- package/dist/esm/components/features-grid/plan-headers.js.map +1 -1
- package/dist/esm/components/features-grid/plan-tagline.js +1 -1
- package/dist/esm/components/features-grid/plan-tagline.js.map +1 -1
- package/dist/esm/components/features-grid/style.scss +111 -21
- package/dist/esm/components/features-grid/table.js +1 -1
- package/dist/esm/components/features-grid/table.js.map +1 -1
- package/dist/esm/components/features.js +44 -5
- package/dist/esm/components/features.js.map +1 -1
- package/dist/esm/components/item.js +1 -1
- package/dist/esm/components/item.js.map +1 -1
- package/dist/esm/components/plan-button/index.js +5 -3
- package/dist/esm/components/plan-button/index.js.map +1 -1
- package/dist/esm/components/plan-button/style.scss +71 -47
- package/dist/esm/components/plan-div-td-container.js +4 -1
- package/dist/esm/components/plan-div-td-container.js.map +1 -1
- package/dist/esm/components/plan-logo.js +7 -4
- package/dist/esm/components/plan-logo.js.map +1 -1
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js +12 -1
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -1
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js +3 -33
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js.map +1 -1
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +11 -13
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -1
- package/dist/esm/components/plans-2023-tooltip.js +16 -5
- package/dist/esm/components/plans-2023-tooltip.js.map +1 -1
- package/dist/esm/components/shared/action-button/index.js +22 -7
- package/dist/esm/components/shared/action-button/index.js.map +1 -1
- package/dist/esm/components/shared/action-button/style.scss +4 -0
- package/dist/esm/components/shared/billing-timeframe/index.js +8 -4
- package/dist/esm/components/shared/billing-timeframe/index.js.map +1 -1
- package/dist/esm/components/shared/header-price/index.js +60 -15
- package/dist/esm/components/shared/header-price/index.js.map +1 -1
- package/dist/esm/components/shared/header-price/style.scss +10 -2
- package/dist/esm/components/shared/storage/components/plan-storage.js +2 -2
- package/dist/esm/components/shared/storage/components/plan-storage.js.map +1 -1
- package/dist/esm/components/shared/storage/components/storage-dropdown.js +30 -7
- package/dist/esm/components/shared/storage/components/storage-dropdown.js.map +1 -1
- package/dist/esm/components/shared/storage/components/storage-feature-label.js +2 -1
- package/dist/esm/components/shared/storage/components/storage-feature-label.js.map +1 -1
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js +3 -1
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js.map +1 -1
- package/dist/esm/fixtures/sites-purchases.js +2 -4
- package/dist/esm/fixtures/sites-purchases.js.map +1 -1
- package/dist/esm/grid-context.js +4 -1
- package/dist/esm/grid-context.js.map +1 -1
- package/dist/esm/hooks/data-store/get-renewal-pricing-text.js +47 -0
- package/dist/esm/hooks/data-store/get-renewal-pricing-text.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js +6 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js +6 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-grid-plans.js +176 -22
- package/dist/esm/hooks/data-store/use-grid-plans.js.map +1 -1
- package/dist/esm/hooks/data-store/use-highlight-labels.js +14 -5
- package/dist/esm/hooks/data-store/use-highlight-labels.js.map +1 -1
- package/dist/esm/hooks/data-store/use-plan-billing-description.js +66 -11
- package/dist/esm/hooks/data-store/use-plan-billing-description.js.map +1 -1
- package/dist/esm/hooks/data-store/use-plan-billing-period.js +12 -0
- package/dist/esm/hooks/data-store/use-plan-billing-period.js.map +1 -0
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js +77 -3
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -1
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +59 -11
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-title-badges.js +17 -0
- package/dist/esm/hooks/data-store/use-title-badges.js.map +1 -0
- package/dist/esm/hooks/use-grid-size.js.map +1 -1
- package/dist/esm/hooks/use-is-large-currency.js +1 -1
- package/dist/esm/hooks/use-is-large-currency.js.map +1 -1
- package/dist/esm/hooks/use-visible-grid-plans.js +66 -0
- package/dist/esm/hooks/use-visible-grid-plans.js.map +1 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/get-plan-features-object.js +15 -2
- package/dist/esm/lib/get-plan-features-object.js.map +1 -1
- package/dist/esm/lib/plan-pricing-utils.js +129 -0
- package/dist/esm/lib/plan-pricing-utils.js.map +1 -0
- package/dist/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/comparison-grid/index.d.ts +1 -1
- package/dist/types/components/comparison-grid/index.d.ts.map +1 -1
- package/dist/types/components/comparison-grid/index.stories.d.ts +2 -2
- package/dist/types/components/dropdown-option.d.ts.map +1 -1
- package/dist/types/components/features-grid/billing-timeframes.d.ts.map +1 -1
- package/dist/types/components/features-grid/client-logo-list/client-list.d.ts.map +1 -1
- package/dist/types/components/features-grid/client-logo-list/index.d.ts.map +1 -1
- package/dist/types/components/features-grid/enterprise-features.d.ts.map +1 -1
- package/dist/types/components/features-grid/index.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-features-list.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-headers.d.ts +2 -0
- package/dist/types/components/features-grid/plan-headers.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-logos.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-prices.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-tagline.d.ts.map +1 -1
- package/dist/types/components/features-grid/previous-features-included-title.d.ts.map +1 -1
- package/dist/types/components/features-grid/spotlight-plan.d.ts.map +1 -1
- package/dist/types/components/features-grid/table.d.ts.map +1 -1
- package/dist/types/components/features-grid/top-buttons.d.ts.map +1 -1
- package/dist/types/components/features.d.ts.map +1 -1
- package/dist/types/components/item.d.ts +2 -1
- package/dist/types/components/item.d.ts.map +1 -1
- package/dist/types/components/plan-button/index.d.ts +2 -1
- package/dist/types/components/plan-button/index.d.ts.map +1 -1
- package/dist/types/components/plan-div-td-container.d.ts +2 -0
- package/dist/types/components/plan-div-td-container.d.ts.map +1 -1
- package/dist/types/components/plan-logo.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/components/interval-type-dropdown.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/hooks/use-max-discount.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.d.ts.map +1 -1
- package/dist/types/components/plans-2023-tooltip.d.ts.map +1 -1
- package/dist/types/components/shared/action-button/index.d.ts +2 -1
- package/dist/types/components/shared/action-button/index.d.ts.map +1 -1
- package/dist/types/components/shared/billing-timeframe/index.d.ts.map +1 -1
- package/dist/types/components/shared/header-price/header-price-context.d.ts.map +1 -1
- package/dist/types/components/shared/header-price/index.d.ts.map +1 -1
- package/dist/types/components/shared/storage/components/plan-storage.d.ts.map +1 -1
- package/dist/types/components/shared/storage/components/storage-dropdown.d.ts.map +1 -1
- package/dist/types/components/shared/storage/components/storage-feature-label.d.ts.map +1 -1
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts +1 -1
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts.map +1 -1
- package/dist/types/css-mixins.d.ts.map +1 -1
- package/dist/types/fixtures/sites-purchases.d.ts +2 -4
- package/dist/types/fixtures/sites-purchases.d.ts.map +1 -1
- package/dist/types/grid-context.d.ts +4 -1
- package/dist/types/grid-context.d.ts.map +1 -1
- package/dist/types/hooks/data-store/get-renewal-pricing-text.d.ts +14 -0
- package/dist/types/hooks/data-store/get-renewal-pricing-text.d.ts.map +1 -0
- package/dist/types/hooks/data-store/types.d.ts +21 -0
- package/dist/types/hooks/data-store/types.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plan-for-spotlight.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-highlight-labels.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-plan-billing-description.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-plan-billing-period.d.ts +8 -0
- package/dist/types/hooks/data-store/use-plan-billing-period.d.ts.map +1 -0
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts +4 -1
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-plans-from-types.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts +4 -1
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-title-badges.d.ts +9 -0
- package/dist/types/hooks/data-store/use-title-badges.d.ts.map +1 -0
- package/dist/types/hooks/use-grid-size.d.ts +3 -2
- package/dist/types/hooks/use-grid-size.d.ts.map +1 -1
- package/dist/types/hooks/use-highlight-adjacency-matrix.d.ts.map +1 -1
- package/dist/types/hooks/use-visible-grid-plans.d.ts +14 -0
- package/dist/types/hooks/use-visible-grid-plans.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/filter-unused-features-object.d.ts.map +1 -1
- package/dist/types/lib/get-plan-features-object.d.ts +1 -1
- package/dist/types/lib/get-plan-features-object.d.ts.map +1 -1
- package/dist/types/lib/plan-pricing-utils.d.ts +105 -0
- package/dist/types/lib/plan-pricing-utils.d.ts.map +1 -0
- package/dist/types/types.d.ts +33 -6
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +39 -28
- package/src/_shared.scss +4 -3
- package/src/components/comparison-grid/index.stories.tsx +1 -1
- package/src/components/comparison-grid/index.tsx +263 -158
- package/src/components/comparison-grid/style.scss +10 -2
- package/src/components/features-grid/client-logo-list/client-list.tsx +0 -25
- package/src/components/features-grid/index.tsx +37 -19
- package/src/components/features-grid/plan-features-list.tsx +15 -4
- package/src/components/features-grid/plan-headers.tsx +10 -3
- package/src/components/features-grid/plan-tagline.tsx +1 -1
- package/src/components/features-grid/style.scss +111 -21
- package/src/components/features-grid/table.tsx +4 -2
- package/src/components/features.tsx +66 -6
- package/src/components/item.tsx +6 -3
- package/src/components/plan-button/index.tsx +7 -1
- package/src/components/plan-button/style.scss +71 -47
- package/src/components/plan-div-td-container.tsx +6 -2
- package/src/components/plan-logo.tsx +16 -9
- package/src/components/plan-type-selector/components/interval-type-dropdown.tsx +14 -1
- package/src/components/plan-type-selector/hooks/use-max-discount.ts +8 -47
- package/src/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.ts +19 -17
- package/src/components/plans-2023-tooltip.tsx +17 -5
- package/src/components/shared/action-button/index.tsx +46 -5
- package/src/components/shared/action-button/style.scss +4 -0
- package/src/components/shared/billing-timeframe/index.tsx +12 -7
- package/src/components/shared/header-price/index.tsx +129 -27
- package/src/components/shared/header-price/style.scss +10 -2
- package/src/components/shared/storage/components/plan-storage.tsx +2 -2
- package/src/components/shared/storage/components/storage-dropdown.tsx +36 -15
- package/src/components/shared/storage/components/storage-feature-label.tsx +2 -1
- package/src/components/shared/storage/hooks/use-plan-storage.ts +3 -0
- package/src/components/test/actions-button.tsx +5 -0
- package/src/components/test/billing-timeframe.tsx +1 -1
- package/src/components/test/header-price.tsx +342 -4
- package/src/fixtures/sites-purchases.ts +2 -4
- package/src/grid-context.tsx +9 -0
- package/src/hooks/data-store/get-renewal-pricing-text.ts +73 -0
- package/src/hooks/data-store/types.ts +21 -0
- package/src/hooks/data-store/use-grid-plans-for-comparison-grid.ts +10 -0
- package/src/hooks/data-store/use-grid-plans-for-features-grid.ts +10 -0
- package/src/hooks/data-store/use-grid-plans.tsx +189 -23
- package/src/hooks/data-store/use-highlight-labels.ts +12 -3
- package/src/hooks/data-store/use-plan-billing-description.tsx +80 -15
- package/src/hooks/data-store/use-plan-billing-period.tsx +28 -0
- package/src/hooks/data-store/use-plan-features-for-grid-plans.ts +135 -1
- package/src/hooks/data-store/use-restructured-plan-features-for-comparison-grid.ts +93 -20
- package/src/hooks/data-store/use-title-badges.ts +31 -0
- package/src/hooks/test/use-visible-grid-plans.tsx +116 -0
- package/src/hooks/use-grid-size.ts +3 -2
- package/src/hooks/use-is-large-currency.ts +1 -1
- package/src/hooks/use-visible-grid-plans.tsx +102 -0
- package/src/index.tsx +20 -0
- package/src/lib/get-plan-features-object.ts +23 -2
- package/src/lib/plan-pricing-utils.ts +211 -0
- package/src/lib/test/plan-pricing-utils.ts +594 -0
- package/src/style-imports.d.ts +3 -0
- package/src/types.ts +45 -4
- package/dist/cjs/components/features-grid/mobile-free-domain.js +0 -25
- package/dist/cjs/components/features-grid/mobile-free-domain.js.map +0 -1
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js +0 -15
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js.map +0 -1
- package/dist/cjs/lib/sort-plan-properties.js +0 -26
- package/dist/cjs/lib/sort-plan-properties.js.map +0 -1
- package/dist/esm/components/features-grid/mobile-free-domain.js +0 -23
- package/dist/esm/components/features-grid/mobile-free-domain.js.map +0 -1
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js +0 -12
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js.map +0 -1
- package/dist/esm/lib/sort-plan-properties.js +0 -23
- package/dist/esm/lib/sort-plan-properties.js.map +0 -1
- package/dist/types/components/features-grid/mobile-free-domain.d.ts +0 -8
- package/dist/types/components/features-grid/mobile-free-domain.d.ts.map +0 -1
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts +0 -9
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts.map +0 -1
- package/dist/types/lib/sort-plan-properties.d.ts +0 -3
- package/dist/types/lib/sort-plan-properties.d.ts.map +0 -1
- package/src/components/features-grid/mobile-free-domain.tsx +0 -51
- package/src/lib/get-plan-pricing-info-from-grid-plans.ts +0 -31
- package/src/lib/sort-plan-properties.ts +0 -27
- package/src/lib/test/sort-plan-properties.ts +0 -122
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
@import "../../shared";
|
|
2
2
|
|
|
3
3
|
.plans-grid-next-comparison-grid {
|
|
4
|
-
// fixes mobile view cards in features grid not containing content properly
|
|
5
4
|
min-width: fit-content;
|
|
5
|
+
border: solid 1px #e0e0e0;
|
|
6
|
+
background: hsl(0, 0%, 100%);
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
|
|
10
|
+
> .is-sticky-header-row {
|
|
11
|
+
border-bottom: solid 1px #e0e0e0;
|
|
12
|
+
background: #fff;
|
|
13
|
+
}
|
|
6
14
|
|
|
7
15
|
&.has-highlighted-plan {
|
|
8
16
|
@include plans-grid-medium-large {
|
|
9
|
-
|
|
17
|
+
margin-top: 43px; // enough to cover `plans-grid__popular-badge` repositioning (top: -43px)
|
|
10
18
|
}
|
|
11
19
|
}
|
|
12
20
|
|
|
@@ -86,17 +86,6 @@ const CLIENT_LIST: Client[] = [
|
|
|
86
86
|
</svg>
|
|
87
87
|
),
|
|
88
88
|
},
|
|
89
|
-
{
|
|
90
|
-
slug: 'time',
|
|
91
|
-
// translators: Company name
|
|
92
|
-
name: __( 'Time' ),
|
|
93
|
-
Logo: ( { title } ) => (
|
|
94
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86 60">
|
|
95
|
-
<title>{ title }</title>
|
|
96
|
-
<path d="m39.14 17.51-.52 4.05a1149.38 1149.38 0 0 1-3.9 21.06c-.67.08-1.45.15-1.97.17l-.24.03v.6c.07 0 .4.02.64.01.56-.01 2.17-.1 2.48-.1 1.15 0 1.93.09 3 .1l.43-.01v-.61h-.27c-.3 0-1.42-.08-1.98-.16a418 418 0 0 1 1.52-8.86c.9-4.47 1.52-7.64 1.52-7.64l.17.4 7.1 16.91h1.29s.74-1.83 1.62-3.88l.17-.4c.92-2.14 5.49-12.96 5.49-12.96l.11.54c.44 2.12 1.9 9.77 2.22 11.61l.37 2.48c.12.8.2 1.58.2 1.8-.15.01-1.6.14-2.14.16l-.24.01v.62h.58c1.12-.02 2.2-.1 3.3-.1 1.26 0 3.3.1 4.6.11l.41-.01v-.62l-.52-.03c-.59-.05-1.57-.14-1.82-.15 0 0-.16-.9-.38-1.93-.85-4.13-3.28-16.67-3.65-19.76-.12-1.06-.48-3.44-.48-3.44h-1.46l-1.43 4.09c-.46 1.33-1.1 2.98-1.57 4.24-2.37 6.23-5.03 12.04-5.03 12.04S43.1 24.4 42.8 23.61c-.3-.78-2.15-6.11-2.15-6.11s-.96.02-1.51.01ZM0 17.51l.01 1.42L0 22.4h.38l.04-3.1 2.32-.01H6.6l2.48.01v23.33l-.04.01c-.33.03-1.6.1-2.12.12h-.2v.64h.37c1.23-.01 2.88-.12 4.05-.12 1.2 0 2.87.12 3.9.13h.33v-.6h-.13c-.33 0-2.16-.11-2.35-.14l-.04-1.7.01-21.67h6.81l1.65.02c0 .12.1 1.68.09 1.72 0 .12.06 1.28.06 1.57h.39l-.03-3.5.02-1.59c-1.45.04-5.14.1-10.88.09-4.91 0-9.65-.05-10.96-.1Zm22.96 0v.62c.2 0 1.34.1 1.62.12l.75.08.01 2.09a2604.29 2604.29 0 0 1-.02 22.18c-.14.05-.45.06-.8.08l-1.56.12v.61l.37.02c1.18 0 2.83-.14 4.04-.14 1.23 0 2.86.15 3.82.15l.37-.02v-.62h-.09c-.03 0-1.28-.06-1.58-.09a8.4 8.4 0 0 1-.85-.1v-1.8l.01-20.46v-1.98l1.76-.17.75-.04v-.64c-1.34 0-3.11.1-4.42.1-1.36 0-3.05-.1-4.18-.1Zm61.95.02h-.4l-5.87.04-4.63.02c-1.2.01-2.85.06-3.88.06-1.64 0-2.98-.1-3.71-.11h-.63v.61c.07.01.2.03.31.02a32.44 32.44 0 0 1 2.15.22l.02 2.6-.01 20-.04 1.66c-.65.12-1.9.18-2.33.19h-.13v.6l.5.02c.69 0 2.46-.11 4.27-.12 1.27 0 2.67.05 4.08.07 1.74.03 3.5.03 5.09.05 2.61.04 4.73.04 5.41.04l.09-5.23h-.38c0 .41-.15 1.95-.16 2.01-.05.58-.1 1.19-.14 1.49h-.27c-.43 0-1.8.05-1.83.05h-6.11l-4.3-.07-.02-1.19v-9.24a81.1 81.1 0 0 1 2.64-.07l2.83-.03c1.93 0 3.66.02 3.8.02.31 0 .9.03 1.13.04 0 .08.04.21.04.25.11.7.18 1.2.25 1.89l.03.18h.44v-.4c0-.55-.04-1.64-.04-2.84 0-.84.05-2.11.06-2.73l-.02-.33-.4.01c0 .13-.04.33-.04.33-.03.46-.16 1.04-.27 1.66l-.05.18c-.04.02-1.3.09-1.42.08l-1.91.06-7.07-.03v-10.2s.9-.03 1.16-.02l4.36-.01c2.48 0 4.88.02 4.88.02l.76.03 1.16.05.03.17c.1 1.08.18 2.35.22 2.8v.19h.38l-.04-3.98v-1.11Z" />
|
|
97
|
-
</svg>
|
|
98
|
-
),
|
|
99
|
-
},
|
|
100
89
|
{
|
|
101
90
|
slug: 'intuit',
|
|
102
91
|
// translators: Company name
|
|
@@ -119,20 +108,6 @@ const CLIENT_LIST: Client[] = [
|
|
|
119
108
|
</svg>
|
|
120
109
|
),
|
|
121
110
|
},
|
|
122
|
-
{
|
|
123
|
-
slug: 'chevron',
|
|
124
|
-
// translators: Company name
|
|
125
|
-
name: __( 'Chevron' ),
|
|
126
|
-
Logo: ( { title } ) => (
|
|
127
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 54 60">
|
|
128
|
-
<title>{ title }</title>
|
|
129
|
-
<path
|
|
130
|
-
fillRule="evenodd"
|
|
131
|
-
d="m27.04 11-2.5-7.41h2.5l1.35 5.24h.05l1.35-5.24h2.5l-2.5 7.4h-2.75Zm-18.97-.13c-.4.2-1.2.44-2.41.44A4.97 4.97 0 0 1 .4 6.09C.41 2.61 2.85.77 5.88.77c1.17 0 1.8.22 2.19.44L7.7 3.29a3.9 3.9 0 0 0-1.73-.38C4.53 2.91 3 3.77 3 6.05 3 8.1 4.22 9.18 5.98 9.18c.7 0 1.17-.14 1.72-.39l.37 2.08Zm24.86-4.84c0-1.1-.04-1.8-.08-2.44h2.12l.07 1.38h.05c.38-1.1 1.1-1.5 1.82-1.55.35-.02.54 0 .76.05v2.16c-.2-.04-.62-.08-.9-.06-.88.08-1.4.71-1.55 1.44a2.9 2.9 0 0 0-.05.51V11h-2.24V6.03Zm-10.8.4c0-.56-.27-1.53-1.32-1.53-.92 0-1.35.79-1.41 1.52h2.73Zm-2.72 1.6c.09.95.88 1.46 2.1 1.47.73 0 1.59-.21 2.16-.55l.34 1.76c-.86.43-1.84.6-2.83.6-2.7 0-4.13-1.62-4.13-4.1 0-2.39 1.55-3.93 3.87-3.93 2.39 0 3.46 1.76 3.46 3.96 0 .24-.02.61-.05.8H19.4Zm23.85-.74c0-1.2-.41-2.25-1.49-2.25s-1.5 1.05-1.5 2.25.42 2.26 1.5 2.26 1.5-1.05 1.5-2.26m2.34 0c0 2.43-1.47 4.02-3.84 4.02s-3.83-1.6-3.83-4.02c0-2.43 1.46-4.02 3.83-4.02s3.84 1.6 3.84 4.02m1-1.34c0-.92-.04-1.71-.09-2.36h2.14l.05 1.03h.04a2.74 2.74 0 0 1 2.3-1.27c1.48 0 2.45 1.02 2.45 3.2V11h-2.26V6.9c0-.96-.32-1.62-1.14-1.62-.62 0-1.01.44-1.16.87-.05.15-.07.36-.07.57V11H46.6V5.95Zm-33-2.6c-.9 0-1.77.41-2.21 1.06h-.03V.81l-2.26.78v9.4h2.26V6.6c0-.63.41-1.32 1.2-1.32.85 0 1.18.67 1.18 1.64V11H16V6.6c0-2.23-.97-3.25-2.4-3.25M.5 33.5l24.69 8.23L2.95 50.4 27 42.33l26.5-8.83v17.67L27 60 .5 51.17V33.5Zm0-20.54 24.69 8.23-22.24 8.66L27 21.8l26.5-8.84v17.67L27 39.47.5 30.64V12.96Z"
|
|
132
|
-
/>
|
|
133
|
-
</svg>
|
|
134
|
-
),
|
|
135
|
-
},
|
|
136
111
|
{
|
|
137
112
|
slug: 'al-jazeera',
|
|
138
113
|
// translators: Company name
|
|
@@ -16,7 +16,6 @@ import { PlanFeaturesItem } from '../item';
|
|
|
16
16
|
import { PlanStorage } from '../shared/storage';
|
|
17
17
|
import BillingTimeframes from './billing-timeframes';
|
|
18
18
|
import EnterpriseFeatures from './enterprise-features';
|
|
19
|
-
import MobileFreeDomain from './mobile-free-domain';
|
|
20
19
|
import PlanFeaturesList from './plan-features-list';
|
|
21
20
|
import PlanHeaders from './plan-headers';
|
|
22
21
|
import PlanLogos from './plan-logos';
|
|
@@ -31,8 +30,10 @@ import type {
|
|
|
31
30
|
FeaturesGridExternalProps,
|
|
32
31
|
FeaturesGridProps,
|
|
33
32
|
GridPlan,
|
|
33
|
+
GridSize,
|
|
34
34
|
PlanActionOverrides,
|
|
35
35
|
} from '../../types';
|
|
36
|
+
import type { JSX } from 'react';
|
|
36
37
|
|
|
37
38
|
import './style.scss';
|
|
38
39
|
|
|
@@ -117,7 +118,7 @@ const MobileView = ( {
|
|
|
117
118
|
enableShowAllFeaturesButton,
|
|
118
119
|
}: MobileViewProps ) => {
|
|
119
120
|
const translate = useTranslate();
|
|
120
|
-
const { featureGroupMap } = usePlansGridContext();
|
|
121
|
+
const { featureGroupMap, hideFeatureGroupTitles, intent } = usePlansGridContext();
|
|
121
122
|
const featureGroups = useMemo(
|
|
122
123
|
() =>
|
|
123
124
|
Object.keys( featureGroupMap ).filter(
|
|
@@ -165,22 +166,37 @@ const MobileView = ( {
|
|
|
165
166
|
<div className={ planCardClasses } key={ `${ gridPlan.planSlug }-${ index }` }>
|
|
166
167
|
<PlanLogos renderedGridPlans={ [ gridPlan ] } isInSignup={ false } />
|
|
167
168
|
<PlanHeaders renderedGridPlans={ [ gridPlan ] } />
|
|
168
|
-
{
|
|
169
|
-
{ isNotFreePlan && (
|
|
169
|
+
{ isInSignup && <PlanTagline renderedGridPlans={ [ gridPlan ] } /> }
|
|
170
|
+
{ ( isNotFreePlan || isInSignup ) && (
|
|
170
171
|
<PlanPrices
|
|
171
172
|
renderedGridPlans={ [ gridPlan ] }
|
|
172
173
|
currentSitePlanSlug={ currentSitePlanSlug }
|
|
173
174
|
/>
|
|
174
175
|
) }
|
|
175
|
-
{ isNotFreePlan
|
|
176
|
-
|
|
176
|
+
{ ( isNotFreePlan || isInSignup ) && (
|
|
177
|
+
<BillingTimeframes renderedGridPlans={ [ gridPlan ] } />
|
|
178
|
+
) }
|
|
179
|
+
<TopButtons
|
|
180
|
+
renderedGridPlans={ [ gridPlan ] }
|
|
181
|
+
isInSignup={ isInSignup }
|
|
182
|
+
currentSitePlanSlug={ currentSitePlanSlug }
|
|
183
|
+
planActionOverrides={ planActionOverrides }
|
|
184
|
+
/>
|
|
177
185
|
{ storageFeatureGroup && ! isEnterprisePlan && (
|
|
178
186
|
<>
|
|
179
|
-
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
{ ! hideFeatureGroupTitles && 'plans-wordpress-hosting' !== intent && (
|
|
188
|
+
<PlanFeaturesItem>
|
|
189
|
+
<h2
|
|
190
|
+
className={ clsx( 'plans-grid-next-features-grid__feature-group-title', {
|
|
191
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
'is-wordpress-hosting': 'plans-wordpress-hosting' === intent,
|
|
194
|
+
} ) }
|
|
195
|
+
>
|
|
196
|
+
{ storageFeatureGroup?.getTitle() }
|
|
197
|
+
</h2>
|
|
198
|
+
</PlanFeaturesItem>
|
|
199
|
+
) }
|
|
184
200
|
<div className="plan-features-2023-grid__highlighted-feature">
|
|
185
201
|
<PlanFeaturesItem>
|
|
186
202
|
<PlanStorage
|
|
@@ -192,12 +208,6 @@ const MobileView = ( {
|
|
|
192
208
|
</div>
|
|
193
209
|
</>
|
|
194
210
|
) }
|
|
195
|
-
<TopButtons
|
|
196
|
-
renderedGridPlans={ [ gridPlan ] }
|
|
197
|
-
isInSignup={ isInSignup }
|
|
198
|
-
currentSitePlanSlug={ currentSitePlanSlug }
|
|
199
|
-
planActionOverrides={ planActionOverrides }
|
|
200
|
-
/>
|
|
201
211
|
{ enableShowAllFeaturesButton ? (
|
|
202
212
|
<CardContainer
|
|
203
213
|
header={ translate( 'Show all features' ) }
|
|
@@ -387,6 +397,9 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => {
|
|
|
387
397
|
hideFeatureGroupTitles,
|
|
388
398
|
enterpriseFeaturesList,
|
|
389
399
|
enableTermSavingsPriceDisplay,
|
|
400
|
+
showSimplifiedBillingDescription,
|
|
401
|
+
showBillingDescriptionForIncreasedRenewalPrice,
|
|
402
|
+
isExperimentVariant,
|
|
390
403
|
} = props;
|
|
391
404
|
|
|
392
405
|
const gridContainerRef = useRef< HTMLDivElement >( null );
|
|
@@ -403,9 +416,9 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => {
|
|
|
403
416
|
}
|
|
404
417
|
|
|
405
418
|
// we want to fit 3 plans per row in this breakpoint
|
|
406
|
-
const mediumBreakpoint =
|
|
419
|
+
const mediumBreakpoint = 669;
|
|
407
420
|
|
|
408
|
-
return new Map( [
|
|
421
|
+
return new Map< GridSize, number >( [
|
|
409
422
|
[ 'small', 0 ],
|
|
410
423
|
[ 'medium', mediumBreakpoint ],
|
|
411
424
|
[ 'large', largeBreakpoint ],
|
|
@@ -444,6 +457,11 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => {
|
|
|
444
457
|
featureGroupMap={ featureGroupMap }
|
|
445
458
|
enterpriseFeaturesList={ enterpriseFeaturesList }
|
|
446
459
|
enableTermSavingsPriceDisplay={ enableTermSavingsPriceDisplay }
|
|
460
|
+
showSimplifiedBillingDescription={ showSimplifiedBillingDescription }
|
|
461
|
+
showBillingDescriptionForIncreasedRenewalPrice={
|
|
462
|
+
showBillingDescriptionForIncreasedRenewalPrice
|
|
463
|
+
}
|
|
464
|
+
isExperimentVariant={ isExperimentVariant }
|
|
447
465
|
>
|
|
448
466
|
<FeaturesGrid { ...props } gridSize={ gridSize ?? undefined } />
|
|
449
467
|
</PlansGridContextProvider>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from '@automattic/calypso-products';
|
|
7
7
|
import { JetpackLogo } from '@automattic/components';
|
|
8
8
|
import { AddOns } from '@automattic/data-stores';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import { useTranslate } from 'i18n-calypso';
|
|
10
11
|
import { useMemo } from 'react';
|
|
11
12
|
import { usePlansGridContext } from '../../grid-context';
|
|
@@ -55,7 +56,7 @@ const PlanFeaturesList = ( {
|
|
|
55
56
|
}: PlanFeaturesListProps ) => {
|
|
56
57
|
const [ activeTooltipId, setActiveTooltipId ] = useManageTooltipToggle();
|
|
57
58
|
const translate = useTranslate();
|
|
58
|
-
const { featureGroupMap, hideFeatureGroupTitles } = usePlansGridContext();
|
|
59
|
+
const { featureGroupMap, hideFeatureGroupTitles, intent } = usePlansGridContext();
|
|
59
60
|
const featureGroup = featureGroupSlug && featureGroupMap[ featureGroupSlug ];
|
|
60
61
|
|
|
61
62
|
/**
|
|
@@ -88,9 +89,15 @@ const PlanFeaturesList = ( {
|
|
|
88
89
|
isTableCell={ options?.isTableCell }
|
|
89
90
|
className="plan-features-2023-grid__table-item"
|
|
90
91
|
>
|
|
91
|
-
{ ! hideFeatureGroupTitles && (
|
|
92
|
+
{ ! hideFeatureGroupTitles && 'plans-wordpress-hosting' !== intent && (
|
|
92
93
|
<PlanFeaturesItem>
|
|
93
|
-
<h2
|
|
94
|
+
<h2
|
|
95
|
+
className={ clsx( 'plans-grid-next-features-grid__feature-group-title', {
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
'is-wordpress-hosting': 'plans-wordpress-hosting' === intent,
|
|
99
|
+
} ) }
|
|
100
|
+
>
|
|
94
101
|
{ featureGroup?.getTitle() }
|
|
95
102
|
</h2>
|
|
96
103
|
</PlanFeaturesItem>
|
|
@@ -136,7 +143,11 @@ const PlanFeaturesList = ( {
|
|
|
136
143
|
>
|
|
137
144
|
{ ! hideFeatureGroupTitles && featureGroup?.getTitle() && (
|
|
138
145
|
<PlanFeaturesItem>
|
|
139
|
-
<h2
|
|
146
|
+
<h2
|
|
147
|
+
className={ clsx( 'plans-grid-next-features-grid__feature-group-title', {
|
|
148
|
+
'is-wordpress-hosting': intent === 'plans-wordpress-hosting',
|
|
149
|
+
} ) }
|
|
150
|
+
>
|
|
140
151
|
{ featureGroup.getTitle() }
|
|
141
152
|
</h2>
|
|
142
153
|
</PlanFeaturesItem>
|
|
@@ -7,11 +7,13 @@ type PlanHeadersProps = {
|
|
|
7
7
|
renderedGridPlans: GridPlan[];
|
|
8
8
|
options?: {
|
|
9
9
|
isTableCell?: boolean;
|
|
10
|
+
isHeader?: boolean;
|
|
11
|
+
scope?: string;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
const PlanHeaders = ( { options, renderedGridPlans }: PlanHeadersProps ) => {
|
|
14
|
-
return renderedGridPlans.map( ( { planSlug, planTitle } ) => {
|
|
16
|
+
return renderedGridPlans.map( ( { planSlug, planTitle, titleBadge } ) => {
|
|
15
17
|
const headerClasses = clsx( 'plan-features-2023-grid__header', getPlanClass( planSlug ) );
|
|
16
18
|
|
|
17
19
|
return (
|
|
@@ -19,10 +21,15 @@ const PlanHeaders = ( { options, renderedGridPlans }: PlanHeadersProps ) => {
|
|
|
19
21
|
key={ planSlug }
|
|
20
22
|
className="plan-features-2023-grid__table-item"
|
|
21
23
|
isTableCell={ options?.isTableCell }
|
|
24
|
+
scope={ options?.scope }
|
|
25
|
+
isHeader={ options?.isHeader }
|
|
22
26
|
>
|
|
23
|
-
<
|
|
27
|
+
<div role="columnheader" className={ headerClasses }>
|
|
24
28
|
<h4 className="plan-features-2023-grid__header-title">{ planTitle }</h4>
|
|
25
|
-
|
|
29
|
+
{ titleBadge && (
|
|
30
|
+
<span className="plan-features-2023-grid__header-badge">{ titleBadge }</span>
|
|
31
|
+
) }
|
|
32
|
+
</div>
|
|
26
33
|
</PlanDivOrTdContainer>
|
|
27
34
|
);
|
|
28
35
|
} );
|
|
@@ -16,7 +16,7 @@ const PlanTagline = ( { options, renderedGridPlans }: PlanTaglineProps ) => {
|
|
|
16
16
|
className="plan-features-2023-grid__table-item"
|
|
17
17
|
isTableCell={ options?.isTableCell }
|
|
18
18
|
>
|
|
19
|
-
<
|
|
19
|
+
<p className="plan-features-2023-grid__header-tagline">{ tagline }</p>
|
|
20
20
|
</PlanDivOrTdContainer>
|
|
21
21
|
);
|
|
22
22
|
} );
|
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
background-color: var(--color-surface);
|
|
10
10
|
justify-content: flex-start;
|
|
11
11
|
font-weight: 400;
|
|
12
|
+
|
|
13
|
+
&.is-woo-hosted-basic-plan {
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
}
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
.plan-features-2023-grid__header-logo {
|
|
15
20
|
padding-left: 20px;
|
|
16
21
|
|
|
17
22
|
@include plans-grid-medium-large {
|
|
18
|
-
margin-top:
|
|
23
|
+
margin-top: 32px;
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
.plan-features-2023-grid__table-top & {
|
|
@@ -115,10 +120,6 @@
|
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
|
|
118
|
-
.plans-grid-next-features-grid__mobile-plan-card-no-foldable-container {
|
|
119
|
-
margin-top: 24px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
123
|
.plan-features-2023-grid__mobile-view {
|
|
123
124
|
display: flex;
|
|
124
125
|
flex-direction: column;
|
|
@@ -130,9 +131,8 @@
|
|
|
130
131
|
.plans-grid-next-features-grid__mobile-plan-card {
|
|
131
132
|
background-color: var(--studio-white);
|
|
132
133
|
border: 1px solid #e0e0e0;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
padding: 38px 0 20px 0;
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
padding: 20px 0 20px 0;
|
|
136
136
|
|
|
137
137
|
/*
|
|
138
138
|
* TODO: Remove/refactor this once we have a better way to handle.
|
|
@@ -154,10 +154,42 @@
|
|
|
154
154
|
padding-top: 0;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
+
|
|
158
|
+
.plan-features-2023-grid__header,
|
|
159
|
+
.plan-features-2023-grid__header-logo,
|
|
160
|
+
.plans-grid-next-header-price,
|
|
161
|
+
.plan-features-2023-grid__header-tagline,
|
|
162
|
+
.plan-features-2023-grid__header-billing-info,
|
|
163
|
+
.plan-features-2023-grid__table-item.is-top-buttons,
|
|
164
|
+
.plan-features-2023-grid__item {
|
|
165
|
+
padding-inline: 16px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.plans-grid-next-storage-feature-label__volume {
|
|
170
|
+
font-size: 14px;
|
|
171
|
+
font-weight: 500;
|
|
157
172
|
}
|
|
158
173
|
|
|
159
174
|
.plan-features-2023-grid__highlighted-feature .plan-features-2023-grid__item {
|
|
160
|
-
padding-
|
|
175
|
+
padding-top: 16px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.plan-features-2023-grid__header-title {
|
|
179
|
+
line-height: normal;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.plan-features-2023-grid__table-item .is-experiment-last-feature {
|
|
183
|
+
margin-block-end: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.plan-features-2023-grid__header {
|
|
187
|
+
padding-block-end: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.plan-features-2023-grid__header-tagline {
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
padding: 0 20px 16px 20px
|
|
161
193
|
}
|
|
162
194
|
}
|
|
163
195
|
|
|
@@ -166,7 +198,7 @@
|
|
|
166
198
|
color: var(--color-text-subtle);
|
|
167
199
|
table-layout: fixed;
|
|
168
200
|
border: 1px solid #e0e0e0;
|
|
169
|
-
border-radius:
|
|
201
|
+
border-radius: 4px;
|
|
170
202
|
background-color: #fff;
|
|
171
203
|
margin: 0 auto;
|
|
172
204
|
border-spacing: 0;
|
|
@@ -205,12 +237,25 @@
|
|
|
205
237
|
letter-spacing: 0;
|
|
206
238
|
}
|
|
207
239
|
|
|
240
|
+
.plan-features-2023-grid__header-badge {
|
|
241
|
+
background-color: var(--studio-blue-5);
|
|
242
|
+
color: var(--studio-blue-50);
|
|
243
|
+
border-radius: 3px;
|
|
244
|
+
display: inline-block;
|
|
245
|
+
font-size: $font-body-extra-small;
|
|
246
|
+
font-weight: 500;
|
|
247
|
+
line-height: 20px;
|
|
248
|
+
padding: 0 8px;
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
}
|
|
251
|
+
|
|
208
252
|
.plan-features-2023-grid__header-tagline {
|
|
209
253
|
font-size: $font-body;
|
|
210
254
|
line-height: 24px;
|
|
211
255
|
color: var(--studio-gray-80);
|
|
212
256
|
font-weight: 400;
|
|
213
257
|
padding: 0 20px 24px 20px;
|
|
258
|
+
margin-bottom: 0;
|
|
214
259
|
|
|
215
260
|
@include plans-grid-medium-large {
|
|
216
261
|
font-size: $font-body-small;
|
|
@@ -238,18 +283,24 @@
|
|
|
238
283
|
font-weight: 600;
|
|
239
284
|
}
|
|
240
285
|
|
|
286
|
+
.is-plan-differentiators-experiment & .has-min-height {
|
|
287
|
+
min-height: 32px;
|
|
288
|
+
}
|
|
289
|
+
|
|
241
290
|
&.is-top-buttons {
|
|
242
291
|
padding: 0 20px;
|
|
243
292
|
@include plans-grid-medium-large {
|
|
244
|
-
|
|
245
|
-
|
|
293
|
+
button {
|
|
294
|
+
margin-top: 16px;
|
|
295
|
+
margin-bottom: 16px;
|
|
296
|
+
}
|
|
246
297
|
}
|
|
247
298
|
}
|
|
248
299
|
|
|
249
300
|
@include plans-grid-medium-large {
|
|
250
301
|
// The .plan-features-2023-grid__table-item is used to render the plan spotlight which doesn't
|
|
251
302
|
// use a table layout, but borders are only appropriate in table layout.
|
|
252
|
-
&:is(td) {
|
|
303
|
+
&:is(td, th) {
|
|
253
304
|
border-left: solid 1px #e0e0e0;
|
|
254
305
|
}
|
|
255
306
|
}
|
|
@@ -268,10 +319,9 @@
|
|
|
268
319
|
max-width: 100%;
|
|
269
320
|
margin-bottom: 64px;
|
|
270
321
|
border: 1px solid #e0e0e0;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
justify-content: space-between;
|
|
322
|
+
border-radius: 4px;
|
|
323
|
+
display: flex;
|
|
324
|
+
justify-content: space-between;
|
|
275
325
|
|
|
276
326
|
div.spotlight-plan__buttons {
|
|
277
327
|
display: flex;
|
|
@@ -316,6 +366,11 @@
|
|
|
316
366
|
.plans-grid-next-features-grid__feature-group-title {
|
|
317
367
|
font-weight: 600;
|
|
318
368
|
color: var(--studio-gray-80);
|
|
369
|
+
|
|
370
|
+
&.is-wordpress-hosting {
|
|
371
|
+
padding-top: 12px;
|
|
372
|
+
font-size: 12px;
|
|
373
|
+
}
|
|
319
374
|
}
|
|
320
375
|
|
|
321
376
|
.plans-grid-next-features-grid__feature-group-row {
|
|
@@ -344,13 +399,20 @@
|
|
|
344
399
|
flex: 1 0 0;
|
|
345
400
|
width: 100%;
|
|
346
401
|
|
|
402
|
+
.plan-features-2023-grid__ai-website-builder-break {
|
|
403
|
+
@media ( max-width: 480px ) {
|
|
404
|
+
display: none;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
347
408
|
.plan-features-2023-grid__item-title {
|
|
348
409
|
color: var(--studio-gray-80);
|
|
349
410
|
font-size: $font-body-small;
|
|
350
411
|
font-weight: 400;
|
|
351
412
|
line-height: 20px;
|
|
352
413
|
overflow-wrap: break-word;
|
|
353
|
-
text-wrap: balance;
|
|
414
|
+
text-wrap: balance; // Fallback until Safari supports `pretty`.
|
|
415
|
+
text-wrap: pretty;
|
|
354
416
|
margin: 0;
|
|
355
417
|
flex: 1 0 0;
|
|
356
418
|
width: 100%;
|
|
@@ -359,6 +421,12 @@
|
|
|
359
421
|
font-weight: 600;
|
|
360
422
|
}
|
|
361
423
|
|
|
424
|
+
// Experiment variants: domain included text gets green color
|
|
425
|
+
// Applies to variants with "Everything in X, plus:" features (not focused long-list or control)
|
|
426
|
+
&.is-domain-included-highlight {
|
|
427
|
+
color: var(--studio-green-60);
|
|
428
|
+
}
|
|
429
|
+
|
|
362
430
|
@include plans-grid-medium-large {
|
|
363
431
|
font-size: $font-body-extra-small;
|
|
364
432
|
line-height: 16px;
|
|
@@ -381,6 +449,11 @@
|
|
|
381
449
|
}
|
|
382
450
|
}
|
|
383
451
|
|
|
452
|
+
// Pricing differentiators experiment (non-control): extra bottom margin after last feature in column
|
|
453
|
+
.plan-features-2023-grid__table-item .is-experiment-last-feature {
|
|
454
|
+
margin-block-end: 37px;
|
|
455
|
+
}
|
|
456
|
+
|
|
384
457
|
.plan-features-2023-grid__row:last-of-type .plan-features-2023-grid__table-item {
|
|
385
458
|
border-bottom: solid 1px var(--color-neutral-5);
|
|
386
459
|
|
|
@@ -395,6 +468,10 @@
|
|
|
395
468
|
padding: 0 20px 12px;
|
|
396
469
|
text-align: left;
|
|
397
470
|
|
|
471
|
+
.is-plan-differentiators-experiment & {
|
|
472
|
+
padding-inline-end: 12px;
|
|
473
|
+
}
|
|
474
|
+
|
|
398
475
|
&.plan-features-2023-grid__item-available {
|
|
399
476
|
display: flex;
|
|
400
477
|
flex-direction: column;
|
|
@@ -476,13 +553,17 @@
|
|
|
476
553
|
// the alternative (oveflow: auto) would break the sticky behavior on the headers
|
|
477
554
|
padding: 1px;
|
|
478
555
|
|
|
556
|
+
&.is-small {
|
|
557
|
+
padding: 0;
|
|
558
|
+
}
|
|
559
|
+
|
|
479
560
|
.plan-features-2023-grid__table-item {
|
|
480
561
|
border-right: none;
|
|
481
562
|
background-color: transparent;
|
|
482
563
|
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
&:first-of-type:is(td) {
|
|
564
|
+
// Match both `td` and `th` so the first header cell has its border-left removed too;
|
|
565
|
+
// the `:is()` keeps the specificity aligned with the rule that adds the border-left above.
|
|
566
|
+
&:first-of-type:is(td, th) {
|
|
486
567
|
border-left: none;
|
|
487
568
|
}
|
|
488
569
|
|
|
@@ -611,3 +692,12 @@
|
|
|
611
692
|
}
|
|
612
693
|
}
|
|
613
694
|
}
|
|
695
|
+
|
|
696
|
+
// Conditional styles for visual split layout (website-builder and wordpress-hosting intents)
|
|
697
|
+
.plans-features-main__group.is-visual-split-layout {
|
|
698
|
+
.plans-grid-next-features-grid__feature-group-row {
|
|
699
|
+
&:last-child > .plan-features-2023-grid__table-item {
|
|
700
|
+
padding-bottom: 18px;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
@@ -91,7 +91,7 @@ const Table = ( {
|
|
|
91
91
|
<caption className="plan-features-2023-grid__screen-reader-text screen-reader-text">
|
|
92
92
|
{ translate( 'Available plans to choose from' ) }
|
|
93
93
|
</caption>
|
|
94
|
-
<
|
|
94
|
+
<thead>
|
|
95
95
|
<tr>
|
|
96
96
|
<PlanLogos
|
|
97
97
|
renderedGridPlans={ gridPlansWithoutSpotlight }
|
|
@@ -102,9 +102,11 @@ const Table = ( {
|
|
|
102
102
|
<tr>
|
|
103
103
|
<PlanHeaders
|
|
104
104
|
renderedGridPlans={ gridPlansWithoutSpotlight }
|
|
105
|
-
options={ {
|
|
105
|
+
options={ { isHeader: true, scope: 'col' } }
|
|
106
106
|
/>
|
|
107
107
|
</tr>
|
|
108
|
+
</thead>
|
|
109
|
+
<tbody>
|
|
108
110
|
<tr>
|
|
109
111
|
<PlanTagline
|
|
110
112
|
renderedGridPlans={ gridPlansWithoutSpotlight }
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getPlanClass,
|
|
3
|
+
FEATURE_AI_WEBSITE_BUILDER,
|
|
4
|
+
FEATURE_CUSTOM_DOMAIN,
|
|
5
|
+
isFreePlan,
|
|
6
|
+
} from '@automattic/calypso-products';
|
|
2
7
|
import { LoadingPlaceholder } from '@automattic/components';
|
|
3
8
|
import styled from '@emotion/styled';
|
|
4
9
|
import clsx from 'clsx';
|
|
@@ -22,6 +27,31 @@ const SubdomainSuggestion = styled.div`
|
|
|
22
27
|
}
|
|
23
28
|
`;
|
|
24
29
|
|
|
30
|
+
// Pricing differentiation pills — colors match @automattic/components Badge type="info-green" (.badge--info-green).
|
|
31
|
+
const FeatureBadge = styled.span`
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
padding: 0 6px;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 8px;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
background-color: rgba( 184, 230, 191, 0.64 );
|
|
39
|
+
color: var( --studio-green-80 );
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 11px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
line-height: inherit;
|
|
44
|
+
margin-inline-start: 8px;
|
|
45
|
+
vertical-align: baseline;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
|
|
49
|
+
@media ( max-width: 480px ) {
|
|
50
|
+
padding: 0 4px;
|
|
51
|
+
margin-inline-start: 6px;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
25
55
|
const FreePlanCustomDomainFeature: React.FC< {
|
|
26
56
|
paidDomainName: string;
|
|
27
57
|
generatedWPComSubdomain?: DataResponse< { domain_name: string } >;
|
|
@@ -72,7 +102,7 @@ const PlanFeatures2023GridFeatures: React.FC< {
|
|
|
72
102
|
setActiveTooltipId,
|
|
73
103
|
} ) => {
|
|
74
104
|
const translate = useTranslate();
|
|
75
|
-
const { enableFeatureTooltips } = usePlansGridContext();
|
|
105
|
+
const { enableFeatureTooltips, gridPlans, isExperimentVariant } = usePlansGridContext();
|
|
76
106
|
|
|
77
107
|
return (
|
|
78
108
|
<>
|
|
@@ -96,8 +126,27 @@ const PlanFeatures2023GridFeatures: React.FC< {
|
|
|
96
126
|
( currentFeature.getSlug() === FEATURE_CUSTOM_DOMAIN && paidDomainName ) ||
|
|
97
127
|
! currentFeature.availableForCurrentPlan;
|
|
98
128
|
|
|
129
|
+
const featureSlug = currentFeature.getSlug();
|
|
130
|
+
const shouldBreakAfterAiWebsiteBuilderTitle =
|
|
131
|
+
gridPlans.length === 6 && featureSlug === FEATURE_AI_WEBSITE_BUILDER;
|
|
132
|
+
const featuresWithMinHeight = [
|
|
133
|
+
'support-from-experts',
|
|
134
|
+
'priority-24-7-support',
|
|
135
|
+
'upload-video',
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
// Apply green styling for domain feature in the rolled-out cohort.
|
|
139
|
+
const isCustomDomainFeatureWithPaidDomain =
|
|
140
|
+
currentFeature.getSlug() === FEATURE_CUSTOM_DOMAIN &&
|
|
141
|
+
paidDomainName &&
|
|
142
|
+
! isFreePlan( planSlug );
|
|
143
|
+
const shouldHighlightDomainFeature =
|
|
144
|
+
isCustomDomainFeatureWithPaidDomain && isExperimentVariant;
|
|
145
|
+
|
|
99
146
|
const divClasses = clsx( '', getPlanClass( planSlug ), {
|
|
100
147
|
'is-last-feature': featureIndex + 1 === features.length,
|
|
148
|
+
'has-min-height': featuresWithMinHeight.includes( featureSlug ),
|
|
149
|
+
'is-experiment-last-feature': currentFeature.isExperimentLastFeature,
|
|
101
150
|
} );
|
|
102
151
|
const spanClasses = clsx( 'plan-features-2023-grid__item-info', {
|
|
103
152
|
'is-annual-plan-feature': currentFeature.availableOnlyForAnnualPlans,
|
|
@@ -106,6 +155,7 @@ const PlanFeatures2023GridFeatures: React.FC< {
|
|
|
106
155
|
} );
|
|
107
156
|
const itemTitleClasses = clsx( 'plan-features-2023-grid__item-title', {
|
|
108
157
|
'is-bold': isHighlightedFeature,
|
|
158
|
+
'is-domain-included-highlight': shouldHighlightDomainFeature,
|
|
109
159
|
} );
|
|
110
160
|
|
|
111
161
|
return (
|
|
@@ -142,13 +192,23 @@ const PlanFeatures2023GridFeatures: React.FC< {
|
|
|
142
192
|
id={ key }
|
|
143
193
|
>
|
|
144
194
|
<>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
195
|
+
<span className="plan-features-2023-grid__item-text-content">
|
|
196
|
+
{ currentFeature.getTitle( {
|
|
197
|
+
domainName: paidDomainName,
|
|
198
|
+
} ) }
|
|
199
|
+
{ currentFeature.badgeText && (
|
|
200
|
+
<FeatureBadge>{ currentFeature.badgeText }</FeatureBadge>
|
|
201
|
+
) }
|
|
202
|
+
</span>
|
|
203
|
+
{ shouldBreakAfterAiWebsiteBuilderTitle && (
|
|
204
|
+
<div className="plan-features-2023-grid__ai-website-builder-break">
|
|
205
|
+
{ '\u00A0' }
|
|
206
|
+
</div>
|
|
207
|
+
) }
|
|
148
208
|
{ currentFeature?.getSubFeatureObjects?.()?.length ? (
|
|
149
209
|
<ul className="plan-features-2023-grid__item-sub-feature-list">
|
|
150
210
|
{ currentFeature.getSubFeatureObjects().map( ( subFeature ) => (
|
|
151
|
-
<li>{ subFeature?.getTitle() }</li>
|
|
211
|
+
<li key={ subFeature.getSlug() }>{ subFeature?.getTitle() }</li>
|
|
152
212
|
) ) }
|
|
153
213
|
</ul>
|
|
154
214
|
) : null }
|