@deriv-com/dds-marketing 1.0.2 → 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 +89 -40
- 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 +9 -12
- package/.llm/components/ctabannerslider.md +15 -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 +2 -2
- package/.llm/components/illustrationscene.md +6 -10
- package/.llm/components/imagebanner.md +278 -0
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/pageheader.md +4 -3
- 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 +11 -10
- 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 -4
- package/.llm/digest/ctabannerslider.md +4 -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/illustrationscene.md +2 -3
- package/.llm/digest/imagebanner.md +64 -0
- package/.llm/digest/navbaritem.md +1 -0
- package/.llm/digest/pageheader.md +2 -1
- 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 +19 -3
- package/.llm/tokens.md +26 -1
- package/AGENTS.md +17 -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.js +2 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +4 -3
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
- 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 +6 -2
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
- 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/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.js +2 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +4 -2
- package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
- package/dist/components/blocks/page-header/page-header-impl.css +5 -3
- 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 +23 -0
- package/dist/components/core/background/Background.d.ts +10 -4
- package/dist/components/core/background/Background.js +16 -7
- package/dist/components/core/background/Background.types.d.ts +11 -8
- package/dist/components/core/background/Background.types.js +3 -1
- package/dist/components/core/background/background-impl.css +334 -1
- package/dist/components/core/background/halftone.d.ts +11 -0
- package/dist/components/core/background/halftone.js +43 -3
- 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-shader.d.ts +11 -0
- package/dist/components/core/background/use-shader.js +25 -0
- package/dist/components/core/background/use-spotlight.d.ts +2 -1
- package/dist/components/core/background/use-spotlight.js +9 -1
- 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.js +1 -1
- package/dist/components/core/illustration-card/illustration-card-impl.css +20 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +4 -7
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +2 -3
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +7 -1
- 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 +45 -0
- package/dist/components/index.js +32 -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 +77 -28
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Centred from the fold, and at the start on a phone — the section-title rule and its reason: on a
|
|
10
|
+
* phone the measure is the screen, and a centred statement wraps to ragged lines whose left edge
|
|
11
|
+
* the eye loses. The reference design turns at 768px, which is this package's `48rem`.
|
|
12
|
+
*
|
|
13
|
+
* The paragraph is held to a measure, so centring its words is half of it: the capped box has to
|
|
14
|
+
* come to the middle as well, or the lines are centred inside a column sitting at the start.
|
|
15
|
+
*
|
|
16
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition.
|
|
17
|
+
*/
|
|
18
|
+
@container (min-width: 48rem) {
|
|
19
|
+
:where([data-dds-context="marketing"]) .dds-textscroll .dds-textscroll__text {
|
|
20
|
+
margin-inline: auto;
|
|
21
|
+
text-align: center;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The words brighten with the scroll, one after another.
|
|
27
|
+
*
|
|
28
|
+
* The section names a view timeline, and every word runs down it from opacity.track — the dimmed
|
|
29
|
+
* share of the same ink, which is the job that role already does for a track behind what travels
|
|
30
|
+
* over it — up to the full strength it has at rest. Scroll-driven, so the reveal moves forward as
|
|
31
|
+
* the reader scrolls down and back as they scroll up, and stands still while the page does. Linear,
|
|
32
|
+
* because the scroll is the easing; a curve here would be a second one on top of the reader's own.
|
|
33
|
+
* Only `from` is written: the end of the animation is the word's own resting opacity, so nothing
|
|
34
|
+
* here restates full strength as a number.
|
|
35
|
+
*
|
|
36
|
+
* The window runs from the section's top edge a quarter of the way up the viewport to its bottom
|
|
37
|
+
* edge reaching the viewport's foot. On the `cover` range that is `25vh` in from the start to
|
|
38
|
+
* `100% - 100vh` — the section's own height. The reference design ran it until the bottom edge
|
|
39
|
+
* crossed the middle of the viewport instead, and that is a point a page cannot always reach: as
|
|
40
|
+
* the last section, or above less than half a screen of page, the last words stayed dim for good,
|
|
41
|
+
* at about 1.6:1. The bottom edge reaching the foot of the viewport is the one end every section
|
|
42
|
+
* can be scrolled to. The start is held to the end where a section is shorter than a quarter of the
|
|
43
|
+
* viewport, so the window never runs backwards.
|
|
44
|
+
*
|
|
45
|
+
* Each word takes its own stretch of that window, the reference's stagger said as arithmetic. There
|
|
46
|
+
* a word brightened over five steps and the next one started a step later, so a word is still
|
|
47
|
+
* coming up while the four after it begin and the front of the reveal is a soft edge rather than a
|
|
48
|
+
* hard one. With `n` words that is `n + 4` steps in all: a word at place `i` starts at step `i` and
|
|
49
|
+
* lands at step `i + 5`. The place and the count are set on the word and the paragraph by the
|
|
50
|
+
* component, the only two numbers that change from one statement to the next.
|
|
51
|
+
*
|
|
52
|
+
* The timeline measures against the nearest scroll container, which is why nothing between the
|
|
53
|
+
* section and the page may clip with `overflow: hidden`: `hidden` makes a box a scroll container
|
|
54
|
+
* even when it never scrolls, and the words would then sit wherever they started however far the
|
|
55
|
+
* page moved. Clip with `overflow: clip` instead.
|
|
56
|
+
*
|
|
57
|
+
* A browser with no scroll timeline never applies the dim at all, so every word is at full strength
|
|
58
|
+
* from the start, which is the whole of the fallback — and the same is true before any script,
|
|
59
|
+
* because nothing here waits for one.
|
|
60
|
+
*/
|
|
61
|
+
@keyframes dds-textscroll-brighten {
|
|
62
|
+
from {
|
|
63
|
+
opacity: var(--opacity-track);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@supports (animation-timeline: view()) {
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-textscroll {
|
|
69
|
+
view-timeline: --dds-textscroll-pass block;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where([data-dds-context="marketing"]) .dds-textscroll .dds-textscroll__word {
|
|
73
|
+
/* How many steps a word takes to come up; the next word starts one step after it. */
|
|
74
|
+
--dds-textscroll-span: 5;
|
|
75
|
+
--dds-textscroll-steps: calc(var(--dds-textscroll-words) + var(--dds-textscroll-span) - 1);
|
|
76
|
+
--dds-textscroll-to: calc(100% - 100vh);
|
|
77
|
+
--dds-textscroll-from: min(25vh, var(--dds-textscroll-to));
|
|
78
|
+
--dds-textscroll-step: calc((var(--dds-textscroll-to) - var(--dds-textscroll-from)) / var(--dds-textscroll-steps));
|
|
79
|
+
animation: dds-textscroll-brighten linear both;
|
|
80
|
+
animation-range:
|
|
81
|
+
cover calc(var(--dds-textscroll-from) + var(--dds-textscroll-step) * var(--dds-textscroll-at))
|
|
82
|
+
cover calc(var(--dds-textscroll-from) + var(--dds-textscroll-step) * (var(--dds-textscroll-at) + var(--dds-textscroll-span)));
|
|
83
|
+
animation-timeline: --dds-textscroll-pass;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* A reader who asked for less movement gets none of it: the whole statement at full strength and
|
|
89
|
+
* still, exactly as it is in a browser that cannot scroll-drive it.
|
|
90
|
+
*/
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
:where([data-dds-context="marketing"]) .dds-textscroll .dds-textscroll__word {
|
|
93
|
+
animation: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* On a phone the statement takes the h3 step rather than h4.
|
|
99
|
+
*
|
|
100
|
+
* h4 there is 24px, the size of a card's title, and this is the one thing the band says, the width of
|
|
101
|
+
* the screen to itself — set at h4 it read as a caption waiting for something bigger. h3 is 32px on a
|
|
102
|
+
* phone. From the fold it is h4 again, 36px, the reference's size, where the wider measure already
|
|
103
|
+
* gives the line its presence. The whole h3 step, its heavier weight too, so the phone's line is
|
|
104
|
+
* one of the scale's steps rather than h4's weight at h3's size.
|
|
105
|
+
*
|
|
106
|
+
* `47.9375rem` is the last width below the fold, LogoRows' bound.
|
|
107
|
+
*/
|
|
108
|
+
@container (max-width: 47.9375rem) {
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-textscroll .dds-textscroll__text {
|
|
110
|
+
font-size: var(--font-h3-size);
|
|
111
|
+
font-weight: var(--font-h3-weight);
|
|
112
|
+
letter-spacing: var(--font-h3-letter-spacing);
|
|
113
|
+
line-height: var(--font-h3-line-height);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -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' };
|