@deriv-com/dds-marketing 1.0.1 → 1.1.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/.llm/components/awards.md +209 -0
- package/.llm/components/background.md +420 -0
- package/.llm/components/bottomsheet.md +5 -0
- package/.llm/components/comparisoncards.md +257 -0
- package/.llm/components/comparisontable.md +231 -0
- package/.llm/components/ctabanner.md +22 -0
- package/.llm/components/ctabannerslider.md +36 -2
- package/.llm/components/datatable.md +273 -0
- package/.llm/components/downloadbanner.md +283 -0
- package/.llm/components/featurecards.md +41 -3
- package/.llm/components/featurecardscarousel.md +311 -0
- package/.llm/components/featuresplit.md +5 -0
- package/.llm/components/featurestack.md +227 -0
- package/.llm/components/illustrationcard.md +236 -0
- package/.llm/components/illustrationscene.md +229 -0
- package/.llm/components/imagebanner.md +278 -0
- package/.llm/components/landinghero.md +24 -0
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/pageheader.md +22 -0
- package/.llm/components/paginationdots.md +6 -1
- package/.llm/components/producthero.md +35 -11
- package/.llm/components/resourcebanner.md +247 -0
- package/.llm/components/scenescroll.md +222 -0
- package/.llm/components/select.md +17 -0
- package/.llm/components/stats.md +219 -0
- package/.llm/components/steps.md +286 -0
- package/.llm/components/stickycards.md +251 -0
- package/.llm/components/tableheadercell.md +19 -0
- package/.llm/components/teamgrid.md +243 -0
- package/.llm/components/testimonialrow.md +5 -0
- package/.llm/components/testimonialslider.md +14 -1
- package/.llm/components/textarea.md +13 -0
- package/.llm/components/textinput.md +13 -0
- package/.llm/components/textscroll.md +187 -0
- package/.llm/components/tiers.md +227 -0
- package/.llm/digest/awards.md +45 -0
- package/.llm/digest/background.md +53 -0
- package/.llm/digest/bottomsheet.md +2 -0
- package/.llm/digest/comparisoncards.md +51 -0
- package/.llm/digest/comparisontable.md +53 -0
- package/.llm/digest/ctabanner.md +4 -0
- package/.llm/digest/ctabannerslider.md +7 -0
- package/.llm/digest/datatable.md +65 -0
- package/.llm/digest/downloadbanner.md +65 -0
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +54 -0
- package/.llm/digest/featuresplit.md +1 -0
- package/.llm/digest/featurestack.md +48 -0
- package/.llm/digest/illustrationcard.md +46 -0
- package/.llm/digest/illustrationscene.md +50 -0
- package/.llm/digest/imagebanner.md +64 -0
- package/.llm/digest/landinghero.md +7 -0
- package/.llm/digest/navbaritem.md +1 -0
- package/.llm/digest/pageheader.md +4 -0
- package/.llm/digest/paginationdots.md +3 -1
- package/.llm/digest/producthero.md +4 -2
- package/.llm/digest/resourcebanner.md +53 -0
- package/.llm/digest/scenescroll.md +49 -0
- package/.llm/digest/select.md +5 -0
- package/.llm/digest/stats.md +46 -0
- package/.llm/digest/steps.md +55 -0
- package/.llm/digest/stickycards.md +52 -0
- package/.llm/digest/tableheadercell.md +4 -0
- package/.llm/digest/teamgrid.md +53 -0
- package/.llm/digest/testimonialrow.md +2 -0
- package/.llm/digest/testimonialslider.md +4 -0
- package/.llm/digest/textarea.md +4 -0
- package/.llm/digest/textinput.md +4 -0
- package/.llm/digest/textscroll.md +43 -0
- package/.llm/digest/tiers.md +50 -0
- package/.llm/index.md +25 -2
- package/.llm/tokens.md +37 -1
- package/AGENTS.md +20 -1
- package/dist/components/awards-data.d.ts +24 -0
- package/dist/components/awards-data.js +11 -0
- package/dist/components/block-image-data.d.ts +24 -0
- package/dist/components/block-image-data.js +9 -0
- package/dist/components/blocks/awards/Awards.css +134 -0
- package/dist/components/blocks/awards/Awards.d.ts +24 -0
- package/dist/components/blocks/awards/Awards.js +114 -0
- package/dist/components/blocks/awards/Awards.types.d.ts +31 -0
- package/dist/components/blocks/awards/Awards.types.js +16 -0
- package/dist/components/blocks/awards/awards-impl.css +222 -0
- package/dist/components/blocks/cards-of.d.ts +16 -0
- package/dist/components/blocks/cards-of.js +23 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.css +195 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.d.ts +24 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.js +75 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.d.ts +49 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.js +26 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +262 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.css +111 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.d.ts +25 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.js +100 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.d.ts +36 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.js +15 -0
- package/dist/components/blocks/comparison-table/comparison-table-impl.css +143 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +1 -0
- package/dist/components/blocks/cta-banner/CtaBanner.d.ts +1 -1
- package/dist/components/blocks/cta-banner/CtaBanner.js +3 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +6 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
- package/dist/components/blocks/cta-banner/cta-banner-impl.css +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +1 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +10 -5
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +12 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
- package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +8 -0
- package/dist/components/blocks/data-table/DataTable.css +170 -0
- package/dist/components/blocks/data-table/DataTable.d.ts +29 -0
- package/dist/components/blocks/data-table/DataTable.js +84 -0
- package/dist/components/blocks/data-table/DataTable.types.d.ts +69 -0
- package/dist/components/blocks/data-table/DataTable.types.js +19 -0
- package/dist/components/blocks/data-table/data-table-impl.css +155 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +228 -0
- package/dist/components/blocks/download-banner/DownloadBanner.d.ts +28 -0
- package/dist/components/blocks/download-banner/DownloadBanner.js +75 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +56 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.js +23 -0
- package/dist/components/blocks/download-banner/download-banner-impl.css +216 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +1 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +3 -7
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +1 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +14 -1
- package/dist/components/blocks/feature-cards/FeatureCards.css +1 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +4 -21
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +10 -9
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.css +115 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.d.ts +30 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.js +160 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +52 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.js +17 -0
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +207 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +1 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +1 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +14 -1
- package/dist/components/blocks/feature-stack/FeatureStack.css +86 -0
- package/dist/components/blocks/feature-stack/FeatureStack.d.ts +19 -0
- package/dist/components/blocks/feature-stack/FeatureStack.js +27 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.d.ts +34 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.js +14 -0
- package/dist/components/blocks/feature-stack/feature-stack-impl.css +87 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +133 -0
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +32 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +41 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +54 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.js +14 -0
- package/dist/components/blocks/image-banner/image-banner-impl.css +281 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +1 -0
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +1 -1
- package/dist/components/blocks/landing-hero/LandingHero.js +4 -3
- package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +7 -3
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.d.ts +1 -1
- package/dist/components/blocks/page-header/PageHeader.js +3 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +6 -0
- package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
- package/dist/components/blocks/page-header/page-header-impl.css +10 -0
- package/dist/components/blocks/product-hero/ProductHero.css +8 -3
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +5 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +5 -1
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +43 -12
- package/dist/components/blocks/resource-banner/ResourceBanner.css +106 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.d.ts +32 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.js +51 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.d.ts +44 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.js +14 -0
- package/dist/components/blocks/resource-banner/resource-banner-impl.css +69 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.css +93 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +36 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.js +54 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +32 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +15 -0
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +275 -0
- package/dist/components/blocks/stats/Stats.css +139 -0
- package/dist/components/blocks/stats/Stats.d.ts +24 -0
- package/dist/components/blocks/stats/Stats.js +120 -0
- package/dist/components/blocks/stats/Stats.types.d.ts +36 -0
- package/dist/components/blocks/stats/Stats.types.js +19 -0
- package/dist/components/blocks/stats/stats-count.d.ts +34 -0
- package/dist/components/blocks/stats/stats-count.js +61 -0
- package/dist/components/blocks/stats/stats-impl.css +284 -0
- package/dist/components/blocks/stats/use-wheel.d.ts +37 -0
- package/dist/components/blocks/stats/use-wheel.js +126 -0
- package/dist/components/blocks/steps/Steps.css +202 -0
- package/dist/components/blocks/steps/Steps.d.ts +32 -0
- package/dist/components/blocks/steps/Steps.js +65 -0
- package/dist/components/blocks/steps/Steps.types.d.ts +48 -0
- package/dist/components/blocks/steps/Steps.types.js +21 -0
- package/dist/components/blocks/steps/steps-impl.css +216 -0
- package/dist/components/blocks/steps/use-turn.d.ts +33 -0
- package/dist/components/blocks/steps/use-turn.js +75 -0
- package/dist/components/blocks/sticky-cards/StickyCards.css +154 -0
- package/dist/components/blocks/sticky-cards/StickyCards.d.ts +35 -0
- package/dist/components/blocks/sticky-cards/StickyCards.js +153 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.d.ts +43 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.js +18 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +393 -0
- package/dist/components/blocks/team-grid/TeamGrid.css +159 -0
- package/dist/components/blocks/team-grid/TeamGrid.d.ts +28 -0
- package/dist/components/blocks/team-grid/TeamGrid.js +74 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.d.ts +51 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.js +20 -0
- package/dist/components/blocks/team-grid/team-grid-impl.css +129 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +4 -3
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +3 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +1 -1
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +2 -2
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +1 -1
- package/dist/components/blocks/text-scroll/TextScroll.css +53 -0
- package/dist/components/blocks/text-scroll/TextScroll.d.ts +5 -0
- package/dist/components/blocks/text-scroll/TextScroll.js +71 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.d.ts +22 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.js +10 -0
- package/dist/components/blocks/text-scroll/text-scroll-impl.css +115 -0
- package/dist/components/blocks/tiers/Tiers.css +233 -0
- package/dist/components/blocks/tiers/Tiers.d.ts +32 -0
- package/dist/components/blocks/tiers/Tiers.js +68 -0
- package/dist/components/blocks/tiers/Tiers.types.d.ts +45 -0
- package/dist/components/blocks/tiers/Tiers.types.js +25 -0
- package/dist/components/blocks/tiers/tiers-impl.css +185 -0
- package/dist/components/blocks/use-rotation.d.ts +12 -2
- package/dist/components/blocks/use-rotation.js +6 -28
- package/dist/components/comparison-cards-data.d.ts +59 -0
- package/dist/components/comparison-cards-data.js +12 -0
- package/dist/components/comparison-table-data.d.ts +39 -0
- package/dist/components/comparison-table-data.js +11 -0
- package/dist/components/core/accordion-item/AccordionItem.css +1 -5
- package/dist/components/core/background/Background.css +92 -0
- package/dist/components/core/background/Background.d.ts +27 -0
- package/dist/components/core/background/Background.js +45 -0
- package/dist/components/core/background/Background.types.d.ts +39 -0
- package/dist/components/core/background/Background.types.js +11 -0
- package/dist/components/core/background/background-impl.css +760 -0
- package/dist/components/core/background/halftone.d.ts +134 -0
- package/dist/components/core/background/halftone.js +722 -0
- package/dist/components/core/background/patterns.d.ts +66 -0
- package/dist/components/core/background/patterns.js +244 -0
- package/dist/components/core/background/shader.d.ts +44 -0
- package/dist/components/core/background/shader.js +307 -0
- package/dist/components/core/background/use-halftone.d.ts +15 -0
- package/dist/components/core/background/use-halftone.js +27 -0
- package/dist/components/core/background/use-offscreen.d.ts +10 -0
- package/dist/components/core/background/use-offscreen.js +30 -0
- package/dist/components/core/background/use-shader.d.ts +11 -0
- package/dist/components/core/background/use-shader.js +25 -0
- package/dist/components/core/background/use-spotlight.d.ts +14 -0
- package/dist/components/core/background/use-spotlight.js +73 -0
- package/dist/components/core/bottom-sheet/BottomSheet.js +2 -2
- package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +3 -1
- package/dist/components/core/breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/core/breadcrumb/Breadcrumb.js +1 -0
- package/dist/components/core/breadcrumb/breadcrumb-impl.css +11 -0
- package/dist/components/core/button/button-impl.css +14 -1
- package/dist/components/core/illustration-card/IllustrationCard.css +40 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +22 -0
- package/dist/components/core/illustration-card/IllustrationCard.js +82 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.js +8 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +47 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +41 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +14 -0
- package/dist/components/core/illustration-scene/IllustrationScene.js +16 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +32 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +8 -0
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +46 -0
- package/dist/components/core/link/Link.js +7 -3
- package/dist/components/core/link/link-impl.css +29 -2
- package/dist/components/core/navbar/Navbar.css +2 -2
- package/dist/components/core/navbar/Navbar.types.d.ts +1 -1
- package/dist/components/core/navbar-item/NavbarItem.d.ts +2 -1
- package/dist/components/core/navbar-item/NavbarItem.js +3 -10
- package/dist/components/core/navbar-item/NavbarItem.types.d.ts +4 -1
- package/dist/components/core/navbar-item/NavbarItem.types.js +1 -1
- package/dist/components/core/navbar-item/navbar-item-impl.css +10 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +9 -0
- package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +19 -0
- package/dist/components/core/pagination/Pagination.js +1 -1
- package/dist/components/core/pagination/pagination-impl.css +9 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +1 -1
- package/dist/components/core/pagination-dots/PaginationDots.js +3 -3
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +3 -1
- package/dist/components/core/segmented-control/SegmentedControl.css +4 -3
- package/dist/components/core/segmented-control/SegmentedControl.js +17 -3
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +2 -1
- package/dist/components/core/select/Select.js +3 -3
- package/dist/components/core/select/Select.types.d.ts +11 -1
- package/dist/components/core/select/Select.types.js +1 -1
- package/dist/components/core/tab-list/TabList.js +9 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +1 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.js +5 -2
- package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +7 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.types.js +1 -1
- package/dist/components/core/text-area/TextArea.d.ts +1 -1
- package/dist/components/core/text-area/TextArea.js +2 -2
- package/dist/components/core/text-area/TextArea.types.d.ts +9 -1
- package/dist/components/core/text-area/TextArea.types.js +1 -1
- package/dist/components/core/text-input/TextInput.d.ts +1 -1
- package/dist/components/core/text-input/TextInput.js +2 -2
- package/dist/components/core/text-input/TextInput.types.d.ts +9 -1
- package/dist/components/core/text-input/TextInput.types.js +1 -1
- package/dist/components/data-table-data.d.ts +33 -0
- package/dist/components/data-table-data.js +12 -0
- package/dist/components/download-banner-data.d.ts +52 -0
- package/dist/components/download-banner-data.js +11 -0
- package/dist/components/index.d.ts +51 -0
- package/dist/components/index.js +38 -0
- package/dist/components/resource-banner-data.d.ts +34 -0
- package/dist/components/resource-banner-data.js +13 -0
- package/dist/components/scene-scroll-data.d.ts +24 -0
- package/dist/components/scene-scroll-data.js +9 -0
- package/dist/components/stats-data.d.ts +28 -0
- package/dist/components/stats-data.js +11 -0
- package/dist/components/steps-data.d.ts +38 -0
- package/dist/components/steps-data.js +13 -0
- package/dist/components/sticky-cards-data.d.ts +43 -0
- package/dist/components/sticky-cards-data.js +12 -0
- package/dist/components/team-grid-data.d.ts +38 -0
- package/dist/components/team-grid-data.js +11 -0
- package/dist/components/tiers-data.d.ts +47 -0
- package/dist/components/tiers-data.js +13 -0
- package/dist/marketing.css +101 -28
- package/package.json +1 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/* GENERATED from tiers.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-tiers {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
display: flex;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
overflow-wrap: anywhere;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__inner {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
inline-size: 100%;
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
max-inline-size: var(--size-content-max);
|
|
19
|
+
padding-block: var(--space-section-default);
|
|
20
|
+
padding-inline: var(--space-inset-page);
|
|
21
|
+
row-gap: var(--space-heading-content);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__header {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
max-inline-size: var(--size-measure-heading);
|
|
29
|
+
row-gap: var(--space-gap-none);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__title {
|
|
33
|
+
margin-block: 0;
|
|
34
|
+
text-wrap: balance;
|
|
35
|
+
font-family: var(--font-h2-family);
|
|
36
|
+
font-size: var(--font-h2-size);
|
|
37
|
+
font-weight: var(--font-h2-weight);
|
|
38
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
39
|
+
line-height: var(--font-h2-line-height);
|
|
40
|
+
margin-block-end: var(--space-heading-title-description);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__description {
|
|
44
|
+
margin-block: 0;
|
|
45
|
+
font-family: var(--font-body-md-family);
|
|
46
|
+
font-size: var(--font-body-md-size);
|
|
47
|
+
font-weight: var(--font-body-md-weight);
|
|
48
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
49
|
+
line-height: var(--font-body-md-line-height);
|
|
50
|
+
max-inline-size: var(--size-measure-description);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
|
|
54
|
+
display: grid;
|
|
55
|
+
list-style: none;
|
|
56
|
+
margin: 0;
|
|
57
|
+
min-inline-size: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
column-gap: var(--space-grid-gutter);
|
|
60
|
+
row-gap: var(--space-grid-gutter);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
min-inline-size: 0;
|
|
67
|
+
row-gap: var(--space-gap-md);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row {
|
|
71
|
+
align-items: center;
|
|
72
|
+
display: flex;
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
column-gap: var(--space-gap-md);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__line-start {
|
|
78
|
+
border-block-start-style: solid;
|
|
79
|
+
display: none;
|
|
80
|
+
min-inline-size: 0;
|
|
81
|
+
border-width: var(--border-width-emphasis);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal {
|
|
85
|
+
display: block;
|
|
86
|
+
flex: none;
|
|
87
|
+
object-fit: cover;
|
|
88
|
+
block-size: var(--size-tiers-medal);
|
|
89
|
+
border-radius: var(--radius-subtle);
|
|
90
|
+
inline-size: var(--size-tiers-medal);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__line-end {
|
|
94
|
+
border-block-start-style: solid;
|
|
95
|
+
display: none;
|
|
96
|
+
min-inline-size: 0;
|
|
97
|
+
border-width: var(--border-width-emphasis);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__heading {
|
|
101
|
+
align-items: baseline;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-wrap: wrap;
|
|
104
|
+
min-inline-size: 0;
|
|
105
|
+
column-gap: var(--space-gap-sm);
|
|
106
|
+
row-gap: var(--space-gap-xs);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__name {
|
|
110
|
+
margin-block: 0;
|
|
111
|
+
font-family: var(--font-h5-family);
|
|
112
|
+
font-size: var(--font-h5-size);
|
|
113
|
+
font-weight: var(--font-h5-weight);
|
|
114
|
+
letter-spacing: var(--font-h5-letter-spacing);
|
|
115
|
+
line-height: var(--font-h5-line-height);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__stage {
|
|
119
|
+
margin-block: 0;
|
|
120
|
+
font-family: var(--font-body-md-family);
|
|
121
|
+
font-size: var(--font-body-md-size);
|
|
122
|
+
font-weight: var(--font-body-md-weight);
|
|
123
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
124
|
+
line-height: var(--font-body-md-line-height);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__benefit {
|
|
128
|
+
box-sizing: border-box;
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
min-inline-size: 0;
|
|
132
|
+
padding-block: var(--space-inset-card);
|
|
133
|
+
padding-inline: var(--space-inset-card);
|
|
134
|
+
row-gap: var(--space-heading-title-description-compact);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__benefit-title {
|
|
138
|
+
margin-block: 0;
|
|
139
|
+
font-family: var(--font-subtitle-family);
|
|
140
|
+
font-size: var(--font-subtitle-size);
|
|
141
|
+
font-weight: var(--font-subtitle-weight);
|
|
142
|
+
letter-spacing: var(--font-subtitle-letter-spacing);
|
|
143
|
+
line-height: var(--font-subtitle-line-height);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__benefit-description {
|
|
147
|
+
margin-block: 0;
|
|
148
|
+
font-family: var(--font-body-md-family);
|
|
149
|
+
font-size: var(--font-body-md-size);
|
|
150
|
+
font-weight: var(--font-body-md-weight);
|
|
151
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
152
|
+
line-height: var(--font-body-md-line-height);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__qualification {
|
|
156
|
+
margin-block: 0;
|
|
157
|
+
white-space: pre-line;
|
|
158
|
+
font-family: var(--font-body-sm-family);
|
|
159
|
+
font-size: var(--font-body-sm-size);
|
|
160
|
+
font-weight: var(--font-body-sm-weight);
|
|
161
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
162
|
+
line-height: var(--font-body-sm-line-height);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__footer {
|
|
166
|
+
display: flex;
|
|
167
|
+
margin-block-start: var(--space-gap-none);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="page"] {
|
|
171
|
+
background-color: var(--color-bg-page);
|
|
172
|
+
color: var(--color-fg-default);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="page"] .dds-tiers__benefit-description {
|
|
176
|
+
color: var(--color-fg-muted);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="page"] .dds-tiers__line-end {
|
|
180
|
+
border-color: var(--color-border-default);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="page"] .dds-tiers__line-start {
|
|
184
|
+
border-color: var(--color-border-default);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="page"] .dds-tiers__stage {
|
|
188
|
+
color: var(--color-fg-muted);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="strong"] {
|
|
192
|
+
background-color: var(--color-bg-brand-strong);
|
|
193
|
+
color: var(--color-fg-on-brand-strong);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="strong"] .dds-tiers__benefit-description {
|
|
197
|
+
color: var(--color-fg-muted-inverse);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="strong"] .dds-tiers__line-end {
|
|
201
|
+
border-color: var(--color-border-subtle-inverse);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="strong"] .dds-tiers__line-start {
|
|
205
|
+
border-color: var(--color-border-subtle-inverse);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="strong"] .dds-tiers__stage {
|
|
209
|
+
color: var(--color-fg-muted-inverse);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="subtle"] {
|
|
213
|
+
background-color: var(--color-bg-page);
|
|
214
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
215
|
+
color: var(--color-fg-default);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="subtle"] .dds-tiers__benefit-description {
|
|
219
|
+
color: var(--color-fg-muted);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="subtle"] .dds-tiers__line-end {
|
|
223
|
+
border-color: var(--color-border-default);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="subtle"] .dds-tiers__line-start {
|
|
227
|
+
border-color: var(--color-border-default);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:where([data-dds-context="marketing"]) .dds-tiers[data-ground="subtle"] .dds-tiers__stage {
|
|
231
|
+
color: var(--color-fg-muted);
|
|
232
|
+
}
|
|
233
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import './Tiers.css';
|
|
2
|
+
import './tiers-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type TiersProps } from './Tiers.types.js';
|
|
5
|
+
export type { TiersProps };
|
|
6
|
+
/**
|
|
7
|
+
* A partnership-tier section: a heading over a row of tiers, each a medal, a name and its stage, a
|
|
8
|
+
* card saying what the tier gives and the bar that reaches it — the reference site's Tiers.
|
|
9
|
+
*
|
|
10
|
+
* The tiers are a ladder, and the order is the argument. So the list is an `<ol>`, and a screen
|
|
11
|
+
* reader announces the count and each tier's place without being told; at full width a rule runs
|
|
12
|
+
* through the medals and joins them into one track, read start to end. The tiers are records rather
|
|
13
|
+
* than children for the reason Steps' are: a tier is words and a picture, nothing a page composes,
|
|
14
|
+
* and the order is the list's to hold rather than the page's to restate.
|
|
15
|
+
*
|
|
16
|
+
* Each benefit is the page's own Card, so its fill and corner are a card's anywhere else on the
|
|
17
|
+
* page, with the benefit's words inside it at the card's own inset. The block knows its ground and
|
|
18
|
+
* the card does not, so the card is re-coloured for the painted grounds in the stylesheet rather
|
|
19
|
+
* than here — the way FeatureCards and ComparisonCards answer the same question.
|
|
20
|
+
*
|
|
21
|
+
* The reference template took its way on as `showLink`, `linkText`, `linkHref` and `onLinkClick`.
|
|
22
|
+
* Here it is one node, the page's own Link, as FeatureCards' is: a link already knows its words,
|
|
23
|
+
* its destination and what it does when pressed. Its per-tier `accent`, which coloured the track in
|
|
24
|
+
* four metals, is gone — this package has no metal colours and a set of them for one block would be
|
|
25
|
+
* a palette of its own — and so is `iconAlt`: the medal is decoration, because the name under it is
|
|
26
|
+
* the heading a reader hears.
|
|
27
|
+
*
|
|
28
|
+
* It arrives the way every block does: the heading and the line, then each tier a step behind the
|
|
29
|
+
* one before, lowest first, and the way on last. `'use client'` for that and for `useId`, which
|
|
30
|
+
* names the region by its heading.
|
|
31
|
+
*/
|
|
32
|
+
export declare function Tiers({ ground, title, description, tiers, link }: TiersProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './Tiers.css';
|
|
5
|
+
import './tiers-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { given } from '../../given.js';
|
|
8
|
+
import { Card } from '../../core/card/Card.js';
|
|
9
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
10
|
+
import { tiersDefaults, tiersParts } from './Tiers.types.js';
|
|
11
|
+
/**
|
|
12
|
+
* The most tiers drawn. The row holds four at full width, and the track through the medals has
|
|
13
|
+
* nowhere to run past the last column — a fifth would start a second row the line cannot reach.
|
|
14
|
+
*/
|
|
15
|
+
const MOST = 4;
|
|
16
|
+
/**
|
|
17
|
+
* Says once that tiers past the fourth were left out — a page that passes five gets
|
|
18
|
+
* four drawn and would otherwise never learn why. Navbar's way of saying so about its actions.
|
|
19
|
+
*/
|
|
20
|
+
let warned = false;
|
|
21
|
+
function warnIfTooMany(count) {
|
|
22
|
+
if (count <= MOST || warned)
|
|
23
|
+
return;
|
|
24
|
+
warned = true;
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.warn(`Tiers was handed ${count} tiers and draws the first ${MOST}. A ladder of more than four rungs is ` +
|
|
27
|
+
'read as a table; put the rest on a page of their own, or use DataTable.');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A partnership-tier section: a heading over a row of tiers, each a medal, a name and its stage, a
|
|
31
|
+
* card saying what the tier gives and the bar that reaches it — the reference site's Tiers.
|
|
32
|
+
*
|
|
33
|
+
* The tiers are a ladder, and the order is the argument. So the list is an `<ol>`, and a screen
|
|
34
|
+
* reader announces the count and each tier's place without being told; at full width a rule runs
|
|
35
|
+
* through the medals and joins them into one track, read start to end. The tiers are records rather
|
|
36
|
+
* than children for the reason Steps' are: a tier is words and a picture, nothing a page composes,
|
|
37
|
+
* and the order is the list's to hold rather than the page's to restate.
|
|
38
|
+
*
|
|
39
|
+
* Each benefit is the page's own Card, so its fill and corner are a card's anywhere else on the
|
|
40
|
+
* page, with the benefit's words inside it at the card's own inset. The block knows its ground and
|
|
41
|
+
* the card does not, so the card is re-coloured for the painted grounds in the stylesheet rather
|
|
42
|
+
* than here — the way FeatureCards and ComparisonCards answer the same question.
|
|
43
|
+
*
|
|
44
|
+
* The reference template took its way on as `showLink`, `linkText`, `linkHref` and `onLinkClick`.
|
|
45
|
+
* Here it is one node, the page's own Link, as FeatureCards' is: a link already knows its words,
|
|
46
|
+
* its destination and what it does when pressed. Its per-tier `accent`, which coloured the track in
|
|
47
|
+
* four metals, is gone — this package has no metal colours and a set of them for one block would be
|
|
48
|
+
* a palette of its own — and so is `iconAlt`: the medal is decoration, because the name under it is
|
|
49
|
+
* the heading a reader hears.
|
|
50
|
+
*
|
|
51
|
+
* It arrives the way every block does: the heading and the line, then each tier a step behind the
|
|
52
|
+
* one before, lowest first, and the way on last. `'use client'` for that and for `useId`, which
|
|
53
|
+
* names the region by its heading.
|
|
54
|
+
*/
|
|
55
|
+
export function Tiers({ ground = tiersDefaults.ground, title, description, tiers, link }) {
|
|
56
|
+
const titleId = useId();
|
|
57
|
+
const [band, revealed] = useReveal();
|
|
58
|
+
// A tier with no name is somebody mid-sentence in the workbench rather than a tier, and a medal
|
|
59
|
+
// over nothing is a rung the page did not write — so it is dropped before the row is counted.
|
|
60
|
+
const named = tiers.filter((tier) => given(tier.name));
|
|
61
|
+
warnIfTooMany(named.length);
|
|
62
|
+
const shown = named.slice(0, MOST);
|
|
63
|
+
return (_jsx("section", { className: tiersParts.root, "data-ground": ground, "aria-labelledby": titleId, children: _jsxs("div", { className: tiersParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: tiersParts.header, children: [_jsx("h2", { className: tiersParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: tiersParts.description, ...arriving(1), children: description })) : null] }), _jsx("ol", { className: tiersParts.list, role: "list", children: shown.map((tier, at) => (
|
|
64
|
+
/* Keyed by the tier's own name: an index would key the ladder by position, and removing a
|
|
65
|
+
rung would have React reconcile every tier above it into its neighbour. Two tiers with
|
|
66
|
+
one name are one tier written twice. */
|
|
67
|
+
_jsxs("li", { className: tiersParts.tier, ...arriving(2 + at), children: [_jsxs("div", { className: tiersParts['medal-row'], children: [_jsx("span", { className: tiersParts['line-start'], "aria-hidden": "true" }), _jsx("img", { className: tiersParts.medal, src: tier.medal, alt: "", loading: "lazy", decoding: "async" }), _jsx("span", { className: tiersParts['line-end'], "aria-hidden": "true" })] }), _jsxs("div", { className: tiersParts.heading, children: [_jsx("h3", { className: tiersParts.name, children: tier.name }), _jsx("p", { className: tiersParts.stage, children: tier.stage })] }), _jsx(Card, { variant: "surface", children: _jsxs("div", { className: tiersParts.benefit, children: [_jsx("p", { className: tiersParts['benefit-title'], children: tier.benefit }), _jsx("p", { className: tiersParts['benefit-description'], children: tier.description })] }) }), given(tier.qualification) ? (_jsx("p", { className: tiersParts.qualification, children: tier.qualification })) : null] }, `${at}:${tier.name}`))) }), link ? (_jsx("div", { className: tiersParts.footer, ...arriving(2 + shown.length), children: link })) : null] }) }));
|
|
68
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TiersItem } from '../../tiers-data.js';
|
|
3
|
+
export interface TiersOwnProps {
|
|
4
|
+
/**
|
|
5
|
+
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them. The benefit cards are Card's recessed grey on it.
|
|
6
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The reference design paints this section grey, and a page following it closely takes this. The benefit cards turn white on it, color.bg.surface-card-raised, because their recessed grey is the band's own and would vanish into it.
|
|
7
|
+
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The benefit cards turn round to the inverse surface and white ink, and the track between the medals to the band's own quiet rule.
|
|
8
|
+
*/
|
|
9
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
10
|
+
/** Always. What the tiers add up to, in the fewest words that say it — 'Growing rewards as you scale'. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** A line saying how the tiers work, when the title alone does not — 'Our tiered partnership model rewards performance.' */
|
|
13
|
+
description?: string;
|
|
14
|
+
/** Always. The tiers, lowest first — two to four, four for a partnership programme. Each is a one-word `name`, a one-verb `stage`, a `medal` picture, a `benefit` headline and the sentence under it, and — on every tier above the entry one — the `qualification` that reaches it, with a line break before the amount. The order of the list is the order of the ladder, so reordering it reorders the tiers. */
|
|
15
|
+
tiers: TiersItem[];
|
|
16
|
+
/** A way on to the programme's full terms — 'Learn more about partner tiers'. A standalone Link, under the row. */
|
|
17
|
+
link?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export type TiersProps = TiersOwnProps;
|
|
20
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
21
|
+
export declare const tiersParts: {
|
|
22
|
+
readonly root: "dds-tiers";
|
|
23
|
+
readonly inner: "dds-tiers__inner";
|
|
24
|
+
readonly header: "dds-tiers__header";
|
|
25
|
+
readonly title: "dds-tiers__title";
|
|
26
|
+
readonly description: "dds-tiers__description";
|
|
27
|
+
readonly list: "dds-tiers__list";
|
|
28
|
+
readonly tier: "dds-tiers__tier";
|
|
29
|
+
readonly 'medal-row': "dds-tiers__medal-row";
|
|
30
|
+
readonly 'line-start': "dds-tiers__line-start";
|
|
31
|
+
readonly medal: "dds-tiers__medal";
|
|
32
|
+
readonly 'line-end': "dds-tiers__line-end";
|
|
33
|
+
readonly heading: "dds-tiers__heading";
|
|
34
|
+
readonly name: "dds-tiers__name";
|
|
35
|
+
readonly stage: "dds-tiers__stage";
|
|
36
|
+
readonly benefit: "dds-tiers__benefit";
|
|
37
|
+
readonly 'benefit-title': "dds-tiers__benefit-title";
|
|
38
|
+
readonly 'benefit-description': "dds-tiers__benefit-description";
|
|
39
|
+
readonly qualification: "dds-tiers__qualification";
|
|
40
|
+
readonly footer: "dds-tiers__footer";
|
|
41
|
+
};
|
|
42
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
43
|
+
export declare const tiersDefaults: {
|
|
44
|
+
readonly ground: "page";
|
|
45
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// GENERATED from tiers.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const tiersParts = {
|
|
4
|
+
root: 'dds-tiers',
|
|
5
|
+
inner: 'dds-tiers__inner',
|
|
6
|
+
header: 'dds-tiers__header',
|
|
7
|
+
title: 'dds-tiers__title',
|
|
8
|
+
description: 'dds-tiers__description',
|
|
9
|
+
list: 'dds-tiers__list',
|
|
10
|
+
tier: 'dds-tiers__tier',
|
|
11
|
+
'medal-row': 'dds-tiers__medal-row',
|
|
12
|
+
'line-start': 'dds-tiers__line-start',
|
|
13
|
+
medal: 'dds-tiers__medal',
|
|
14
|
+
'line-end': 'dds-tiers__line-end',
|
|
15
|
+
heading: 'dds-tiers__heading',
|
|
16
|
+
name: 'dds-tiers__name',
|
|
17
|
+
stage: 'dds-tiers__stage',
|
|
18
|
+
benefit: 'dds-tiers__benefit',
|
|
19
|
+
'benefit-title': 'dds-tiers__benefit-title',
|
|
20
|
+
'benefit-description': 'dds-tiers__benefit-description',
|
|
21
|
+
qualification: 'dds-tiers__qualification',
|
|
22
|
+
footer: 'dds-tiers__footer',
|
|
23
|
+
};
|
|
24
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
25
|
+
export const tiersDefaults = { ground: 'page' };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing specificity,
|
|
5
|
+
* so each is decided against the generated rule on its own terms.
|
|
6
|
+
*
|
|
7
|
+
* The section has no motion of its own beyond the arrival every block shares, which block-reveal.css
|
|
8
|
+
* states once and turns off under reduced motion. Nothing here animates.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* The header and the way on start on a phone and are centred once the band is wide enough.
|
|
13
|
+
*
|
|
14
|
+
* PageHeader's rule and FeatureCards' copy of it: centred text starts every line at a different
|
|
15
|
+
* edge, which costs little across a wide measure and a great deal across a narrow one. The header
|
|
16
|
+
* and the line under it are capped narrower than the column, so `margin-inline: auto` is what
|
|
17
|
+
* centres those boxes rather than their words inside a box left at the start edge.
|
|
18
|
+
*
|
|
19
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
|
|
20
|
+
* width the rest of this package folds at.
|
|
21
|
+
*/
|
|
22
|
+
@container (min-width: 48rem) {
|
|
23
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__header {
|
|
24
|
+
align-items: center;
|
|
25
|
+
margin-inline: auto;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__description {
|
|
30
|
+
margin-inline: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__footer {
|
|
34
|
+
justify-content: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* One column on a phone, two from the fold, and at full width one row holding every tier.
|
|
40
|
+
*
|
|
41
|
+
* `minmax(0, 1fr)` rather than `1fr`, so a long unbroken word in a benefit shrinks to the column
|
|
42
|
+
* instead of pushing the row past the page. At full width the row is as many columns as there are
|
|
43
|
+
* tiers — two, three, or four, the most this draws — read from the markup with `:has()`, the way
|
|
44
|
+
* FeatureCards counts its cards, so the ladder is always one row and the track through the medals
|
|
45
|
+
* always has every medal on it. Where `:has()` is not supported every count takes four columns: a
|
|
46
|
+
* shorter ladder leaves the end of the row empty, and still reads.
|
|
47
|
+
*/
|
|
48
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
|
|
49
|
+
grid-template-columns: minmax(0, 1fr);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@container (min-width: 48rem) {
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
|
|
54
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@container (min-width: 64rem) {
|
|
59
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
|
|
60
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list:has(> :nth-child(3):last-child) {
|
|
64
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list:has(> :nth-child(2):last-child) {
|
|
68
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* A tier starts at the edge on a phone and is centred from the fold.
|
|
74
|
+
*
|
|
75
|
+
* On a phone the medal, the name and the card all start where the heading above them starts, and
|
|
76
|
+
* the name and its stage share a line — the reference design's narrow arrangement, which keeps a
|
|
77
|
+
* column of four tiers from running to four screens. From the fold each tier is a column of its
|
|
78
|
+
* own, centred under its medal, with the stage under the name.
|
|
79
|
+
*/
|
|
80
|
+
@container (min-width: 48rem) {
|
|
81
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier {
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row {
|
|
86
|
+
justify-content: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__heading {
|
|
90
|
+
align-items: center;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/*
|
|
96
|
+
* From the fold, the tiers in a row share their rows: the medals on one line, the names on the
|
|
97
|
+
* next, the cards level, and the qualifications under them starting on one line.
|
|
98
|
+
*
|
|
99
|
+
* Each tier spans four of the list's rows and lays its parts on them as a subgrid, so the card row
|
|
100
|
+
* is as tall as the tallest card in it and every card stretches to it. Growing the card to fill the
|
|
101
|
+
* tier instead made the entry tier's card — the one with no qualification under it — the tallest in
|
|
102
|
+
* the row, by exactly the qualification it does not have. The tier keeps its own gap between its
|
|
103
|
+
* parts; the list's gutter is still what separates one row of tiers from the next.
|
|
104
|
+
*
|
|
105
|
+
* Where subgrid is not supported the tier stays a column: the cards end ragged, and still read.
|
|
106
|
+
*/
|
|
107
|
+
@container (min-width: 48rem) {
|
|
108
|
+
@supports (grid-template-rows: subgrid) {
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier {
|
|
110
|
+
display: grid;
|
|
111
|
+
grid-row: span 4;
|
|
112
|
+
grid-template-rows: subgrid;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
* The track through the medals, at full width only.
|
|
119
|
+
*
|
|
120
|
+
* Each tier draws its own two halves, either side of its medal, and the row they sit in reaches
|
|
121
|
+
* half a gutter past the tier at each end — so one tier's outgoing half meets the next one's
|
|
122
|
+
* incoming half in the middle of the gutter, and the rule reads as one line through every medal
|
|
123
|
+
* rather than a dash under each. Below this width the tiers are stacked or in two columns, and a
|
|
124
|
+
* line would join a medal to nothing.
|
|
125
|
+
*
|
|
126
|
+
* The first tier's incoming half and the last one's outgoing half are kept for their width and not
|
|
127
|
+
* drawn: kept, so every medal sits in the middle of its tier; not drawn, so the track starts at the
|
|
128
|
+
* first medal and stops at the last rather than running to the edges of the page.
|
|
129
|
+
*
|
|
130
|
+
* `64rem` longhand for the reason the fold is.
|
|
131
|
+
*/
|
|
132
|
+
@container (min-width: 64rem) {
|
|
133
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row {
|
|
134
|
+
margin-inline: calc(var(--space-grid-gutter) / -2);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row > :is(.dds-tiers__line-start, .dds-tiers__line-end) {
|
|
138
|
+
display: block;
|
|
139
|
+
flex: 1 1 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier:first-child .dds-tiers__line-start,
|
|
143
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier:last-child .dds-tiers__line-end {
|
|
144
|
+
visibility: hidden;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* The benefit card on the painted grounds — FeatureCards' and ComparisonCards' rules for the same
|
|
150
|
+
* card, and their reasons.
|
|
151
|
+
*
|
|
152
|
+
* Card's surface is the recessed grey made for the page. On the grey band that is the band's own
|
|
153
|
+
* grey and the card vanishes, so it takes the raised fill, color.bg.surface-card-raised. On the
|
|
154
|
+
* dark band its fill and ink are made for a light page — dark words on near-black — so it turns
|
|
155
|
+
* round to the inverse surface and white ink, the values Card's own inverse uses. The block knows
|
|
156
|
+
* its ground and the card does not, so the answer is here rather than in Card.
|
|
157
|
+
*/
|
|
158
|
+
:where([data-dds-context="marketing"])
|
|
159
|
+
.dds-tiers[data-ground="subtle"]
|
|
160
|
+
.dds-tiers__tier
|
|
161
|
+
> .dds-card[data-variant="surface"] {
|
|
162
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-dds-context="marketing"])
|
|
166
|
+
.dds-tiers[data-ground="strong"]
|
|
167
|
+
.dds-tiers__tier
|
|
168
|
+
> .dds-card[data-variant="surface"] {
|
|
169
|
+
background-color: var(--color-bg-surface-inverse);
|
|
170
|
+
color: var(--color-fg-on-brand-strong);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/*
|
|
174
|
+
* Stacked — one to a row on a phone, two to a row before the full width — the tiers are held further
|
|
175
|
+
* apart than a tier's own parts: the grid's gutter alone left one tier's qualification about as close
|
|
176
|
+
* to the next tier's medal as to its own card, and the ladder ran together. space.gap.2xl between
|
|
177
|
+
* rungs; from 64rem they stand in one row and the gutter is the gap between columns again.
|
|
178
|
+
*
|
|
179
|
+
* `63.9375rem` is the last width below the full-width fold.
|
|
180
|
+
*/
|
|
181
|
+
@container (max-width: 63.9375rem) {
|
|
182
|
+
:where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
|
|
183
|
+
row-gap: var(--space-gap-2xl);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -17,13 +17,23 @@ import { type FocusEvent, type MouseEvent, type PointerEvent } from 'react';
|
|
|
17
17
|
* - `region`, spread on that element: the carousel's role description and the hold and stop
|
|
18
18
|
* handlers;
|
|
19
19
|
* - `track`, spread on the element holding the items: the swipe and what is announced;
|
|
20
|
-
* - `item(at)`, spread on each item: its group role, its "2
|
|
20
|
+
* - `item(at)`, spread on each item: its group role, its "2 of 3" name and its inert state;
|
|
21
21
|
* - `dots`, spread on PaginationDots alongside the block's own label.
|
|
22
22
|
*
|
|
23
23
|
* Fewer than two items is a set with nothing to move to, drawn still rather than broken: every
|
|
24
24
|
* attribute that says "carousel" is left off and the dots are the block's to omit.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The words the set is announced in. Every one is the page's to translate: a role description is
|
|
28
|
+
* read out exactly as given, so one left in English is heard in English on a page in any language.
|
|
29
|
+
*/
|
|
30
|
+
export interface RotationWords {
|
|
31
|
+
roleDescription: string;
|
|
32
|
+
slideRoleDescription: string;
|
|
33
|
+
/** An item's name from its place, counting from one. */
|
|
34
|
+
positionLabel?: (position: number, count: number) => string;
|
|
35
|
+
}
|
|
36
|
+
export declare function useRotation(count: number, autoplay: boolean, words: RotationWords): {
|
|
27
37
|
current: number;
|
|
28
38
|
rotating: boolean;
|
|
29
39
|
root: import("react").RefObject<HTMLElement | null>;
|
|
@@ -9,31 +9,7 @@ const SWIPE_CLICK_MS = 300;
|
|
|
9
9
|
function tokenOn(element, name) {
|
|
10
10
|
return element === null ? '' : getComputedStyle(element).getPropertyValue(name);
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
* One block rotating between a few things in place — which one is in view, and every way a reader
|
|
14
|
-
* moves it, holds it or stops it.
|
|
15
|
-
*
|
|
16
|
-
* Shared because two blocks rotate, CtaBannerSlider and TestimonialSlider, and a carousel is the
|
|
17
|
-
* kind of thing that drifts: one stops on a press and the other does not, one swallows the click a swipe
|
|
18
|
-
* ends in and the other follows the link. The rules are stated once here and each block spreads
|
|
19
|
-
* what this hands back onto its own parts.
|
|
20
|
-
*
|
|
21
|
-
* The clock is not here. PaginationDots holds the timer and the reduced-motion stillness, and this
|
|
22
|
-
* tells it when to wait — so there is one clock per block, and it is the one a reader can see.
|
|
23
|
-
*
|
|
24
|
-
* What it hands back:
|
|
25
|
-
* - `root`, the ref for the block's own element, which the swipe threshold and the reading
|
|
26
|
-
* direction are read off;
|
|
27
|
-
* - `region`, spread on that element: the carousel's role description and the hold and stop
|
|
28
|
-
* handlers;
|
|
29
|
-
* - `track`, spread on the element holding the items: the swipe and what is announced;
|
|
30
|
-
* - `item(at)`, spread on each item: its group role, its "2 / 3" name and its inert state;
|
|
31
|
-
* - `dots`, spread on PaginationDots alongside the block's own label.
|
|
32
|
-
*
|
|
33
|
-
* Fewer than two items is a set with nothing to move to, drawn still rather than broken: every
|
|
34
|
-
* attribute that says "carousel" is left off and the dots are the block's to omit.
|
|
35
|
-
*/
|
|
36
|
-
export function useRotation(count, autoplay) {
|
|
12
|
+
export function useRotation(count, autoplay, words) {
|
|
37
13
|
const rotating = count > 1;
|
|
38
14
|
const root = useRef(null);
|
|
39
15
|
const [index, setIndex] = useState(0);
|
|
@@ -122,7 +98,7 @@ export function useRotation(count, autoplay) {
|
|
|
122
98
|
rotating,
|
|
123
99
|
root,
|
|
124
100
|
region: {
|
|
125
|
-
'aria-roledescription': rotating ?
|
|
101
|
+
'aria-roledescription': rotating ? words.roleDescription : undefined,
|
|
126
102
|
onPointerEnter: (event) => {
|
|
127
103
|
if (event.pointerType === 'mouse')
|
|
128
104
|
setHeld(true);
|
|
@@ -159,8 +135,10 @@ export function useRotation(count, autoplay) {
|
|
|
159
135
|
const away = rotating && at !== current;
|
|
160
136
|
return {
|
|
161
137
|
role: rotating ? 'group' : undefined,
|
|
162
|
-
'aria-roledescription': rotating ?
|
|
163
|
-
'aria-label': rotating
|
|
138
|
+
'aria-roledescription': rotating ? words.slideRoleDescription : undefined,
|
|
139
|
+
'aria-label': rotating
|
|
140
|
+
? words.positionLabel?.(at + 1, count) ?? `${at + 1} of ${count}`
|
|
141
|
+
: undefined,
|
|
164
142
|
'aria-hidden': away || undefined,
|
|
165
143
|
inert: away || undefined,
|
|
166
144
|
};
|