@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,222 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* The header starts on a phone and is centred from the fold — FeatureCards' arrangement and its
|
|
7
|
+
* reason: centred text starts every line at a different edge, which costs little across a wide
|
|
8
|
+
* measure and a great deal across a narrow one. The header is capped narrower than the column, so
|
|
9
|
+
* `margin-inline: auto` is what centres the box rather than its words inside a box left at the
|
|
10
|
+
* start edge.
|
|
11
|
+
*
|
|
12
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
|
|
13
|
+
* width the rest of this package folds at.
|
|
14
|
+
*/
|
|
15
|
+
@container (min-width: 48rem) {
|
|
16
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__header {
|
|
17
|
+
align-items: center;
|
|
18
|
+
margin-inline: auto;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* A laurel keeps its own proportions at the width it is given. */
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__laurel {
|
|
25
|
+
block-size: auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* The words take what the two laurels leave, from a zero basis so a long award wraps inside the
|
|
30
|
+
* badge rather than pushing a laurel out of it. Here rather than in the contract, whose static CSS
|
|
31
|
+
* holds keywords and a flex shorthand is three numbers.
|
|
32
|
+
*/
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__copy {
|
|
34
|
+
flex: 1 1 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* The laurels turn in toward the words.
|
|
39
|
+
*
|
|
40
|
+
* The drawing is the left-hand branch, its leaves curling toward whatever stands to its right, so
|
|
41
|
+
* the trailing one is mirrored. In a right-to-left page the row is laid from the other edge — the
|
|
42
|
+
* leading laurel on the right — and the mirroring swaps with it. `scale` rather than a transform,
|
|
43
|
+
* so nothing else that might move the laurel has to know about it.
|
|
44
|
+
*/
|
|
45
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__laurel[data-side="trailing"],
|
|
46
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__laurel[data-side="leading"]:dir(rtl) {
|
|
47
|
+
scale: -1 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__laurel[data-side="trailing"]:dir(rtl) {
|
|
51
|
+
scale: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
* On a phone, one row across the band.
|
|
56
|
+
*
|
|
57
|
+
* This is the row as it stands still — swiped, the browser's own scrolling coming to rest on a
|
|
58
|
+
* badge. It is what a reader who asked for less motion gets, and what every reader gets until the
|
|
59
|
+
* running row below takes it over.
|
|
60
|
+
*
|
|
61
|
+
* It runs out to the band's edges while its first badge lines up with the heading — TestimonialRow's
|
|
62
|
+
* breakout. `cqi` is the band's width, the root declaring `container-type`, and the bleed is how far
|
|
63
|
+
* the column stands in from the band's edge: half of whatever the band has beyond the content
|
|
64
|
+
* measure, plus the gutter. A negative margin of that measure takes the row out to both edges, and a
|
|
65
|
+
* leading padding of it brings the first badge back. The padding is on the row that scrolls, so it
|
|
66
|
+
* scrolls away with the badges and a badge is cut off by the band rather than by the column, which
|
|
67
|
+
* is the sign that there is more. `scroll-padding-inline` matches it, or a browser reads the resting
|
|
68
|
+
* position as short of the first badge's snap point and scrolls the gutter away on load.
|
|
69
|
+
*
|
|
70
|
+
* The block padding is room for the row's focus ring and for each badge's arrival, which starts a
|
|
71
|
+
* step below where it lands and which a scroll container would otherwise clip; the negative margin
|
|
72
|
+
* gives it back.
|
|
73
|
+
*
|
|
74
|
+
* The scrollbar stays — Scroller's reasoning: with no arrows under the row it is the standing sign
|
|
75
|
+
* that the row moves.
|
|
76
|
+
*
|
|
77
|
+
* `47.9375rem` is the last width below the fold, LogoRows' bound.
|
|
78
|
+
*/
|
|
79
|
+
@container (max-width: 47.9375rem) {
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list {
|
|
81
|
+
--dds-awards-bleed: calc((100cqi - min(100cqi, var(--size-content-max))) / 2 + var(--space-inset-page));
|
|
82
|
+
flex-wrap: nowrap;
|
|
83
|
+
margin-block: calc(-1 * var(--space-gap-sm));
|
|
84
|
+
margin-inline: calc(-1 * var(--dds-awards-bleed));
|
|
85
|
+
overflow-x: auto;
|
|
86
|
+
overflow-y: hidden;
|
|
87
|
+
overscroll-behavior-x: contain;
|
|
88
|
+
padding-block: var(--space-gap-sm);
|
|
89
|
+
padding-inline-start: var(--dds-awards-bleed);
|
|
90
|
+
scroll-padding-inline: var(--dds-awards-bleed);
|
|
91
|
+
scroll-snap-type: x proximity;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
* The trailing gutter, as a spacer rather than a padding — TestimonialRow's. A scroll container
|
|
96
|
+
* leaves its end padding out of what it scrolls to once its content overflows, so the last badge
|
|
97
|
+
* would come to rest against the band's edge. A generated box is a flex item like a badge, and its
|
|
98
|
+
* width counts; the negative margin takes back the gap the row puts before it.
|
|
99
|
+
*/
|
|
100
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list::after {
|
|
101
|
+
content: '';
|
|
102
|
+
flex: none;
|
|
103
|
+
inline-size: var(--dds-awards-bleed);
|
|
104
|
+
margin-inline-start: calc(-1 * var(--space-grid-gutter));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
* A badge on the row keeps its width and does not shrink: a flex item shrinks to fit before it
|
|
109
|
+
* overflows, and a row of squeezed badges is the one thing this is not. size.grid.track-md, its
|
|
110
|
+
* ceiling from the fold, so a badge is one width at every size and an award wraps the same way.
|
|
111
|
+
*/
|
|
112
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__award {
|
|
113
|
+
flex: none;
|
|
114
|
+
inline-size: var(--size-grid-track-md);
|
|
115
|
+
scroll-snap-align: start;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* The row's focus ring is drawn inside it. The row runs out to the band's edges and the band clips
|
|
120
|
+
* its overflow, so a ring drawn outside would lose its two sides to the band.
|
|
121
|
+
*/
|
|
122
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list:focus-visible {
|
|
123
|
+
outline-offset: calc(-1 * var(--border-width-focus));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/*
|
|
128
|
+
* The running row's second set is drawn only while the row runs.
|
|
129
|
+
*/
|
|
130
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__award[data-copy] {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* On a phone, for a reader who has not asked for less motion, the row runs on its own — the
|
|
136
|
+
* reference's marquee.
|
|
137
|
+
*
|
|
138
|
+
* The awards are drawn twice, the second set hidden from assistive technology, and the row is moved
|
|
139
|
+
* along by one set's width and starts again, which lands each award exactly where its copy was: the
|
|
140
|
+
* loop has no seam. One set is half the row less half a gutter — the row is both sets and the
|
|
141
|
+
* gutters between them, one fewer gutter than it has badges.
|
|
142
|
+
*
|
|
143
|
+
* The row stops being a scroller while it runs, so nothing is scrolled under it, and starts at the
|
|
144
|
+
* band's edge rather than in line with the heading: a running row has no first badge to line up.
|
|
145
|
+
* The band clips it.
|
|
146
|
+
*
|
|
147
|
+
* It takes motion.duration.ticker per award for one loop, so a long set runs at the pace of a short
|
|
148
|
+
* one, and it holds still while the reader hovers on it, focuses inside it — the row is a tab stop
|
|
149
|
+
* while it runs past the band — or presses on it: the way to read an award that is moving, and the
|
|
150
|
+
* way to stop it.
|
|
151
|
+
*
|
|
152
|
+
* In a right-to-left page the row runs the other way, towards the edge it starts from.
|
|
153
|
+
*/
|
|
154
|
+
@container (max-width: 47.9375rem) {
|
|
155
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
156
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list {
|
|
157
|
+
animation: dds-awards-run calc(var(--motion-duration-ticker) * var(--dds-awards-count, 1)) linear
|
|
158
|
+
infinite;
|
|
159
|
+
inline-size: max-content;
|
|
160
|
+
overflow: visible;
|
|
161
|
+
padding-inline-start: 0;
|
|
162
|
+
scroll-snap-type: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list:dir(rtl) {
|
|
166
|
+
animation-name: dds-awards-run-rtl;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list:is(:hover, :focus-within, :active) {
|
|
170
|
+
animation-play-state: paused;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list::after {
|
|
174
|
+
content: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__award[data-copy] {
|
|
178
|
+
display: flex;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes dds-awards-run {
|
|
184
|
+
to {
|
|
185
|
+
translate: calc(-50% - var(--space-grid-gutter) / 2) 0;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@keyframes dds-awards-run-rtl {
|
|
190
|
+
to {
|
|
191
|
+
translate: calc(50% + var(--space-grid-gutter) / 2) 0;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Said again for the sheet's own sake: a reader who asked for less motion never gets the running row. */
|
|
196
|
+
@media (prefers-reduced-motion: reduce) {
|
|
197
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list {
|
|
198
|
+
animation: none;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/*
|
|
203
|
+
* From the fold, centred rows of five at most.
|
|
204
|
+
*
|
|
205
|
+
* Each badge grows from a shared basis and stops at size.grid.track-md, so a row holds as many as fit
|
|
206
|
+
* and a short one is not stretched across the band; `justify-content` centres the rows, the short
|
|
207
|
+
* last one included. The basis is a fifth of the row — the space five badges and their four gutters
|
|
208
|
+
* leave — so a sixth never fits, however wide the band, and it never falls below
|
|
209
|
+
* size.grid.track-sm, the narrowest a badge's words survive at: as the band narrows the row drops to
|
|
210
|
+
* four, three, two. Column count read from the room rather than from a breakpoint, the
|
|
211
|
+
* gap-names-its-relationship rule's last paragraph.
|
|
212
|
+
*/
|
|
213
|
+
@container (min-width: 48rem) {
|
|
214
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__list {
|
|
215
|
+
flex-wrap: wrap;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
:where([data-dds-context="marketing"]) .dds-awards .dds-awards__award {
|
|
220
|
+
flex: 1 1 max(var(--size-grid-track-sm), calc((100% - 4 * var(--space-grid-gutter)) / 5));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The cards a block was handed, with any fragment opened out.
|
|
4
|
+
*
|
|
5
|
+
* `Children.toArray` flattens arrays and leaves a fragment whole, so a page writing
|
|
6
|
+
* `<>{cards}</>` handed over one child: every card in a single cell, and the block reading the set
|
|
7
|
+
* as one card alone. A fragment is the page grouping its own markup, never a card, so it is opened
|
|
8
|
+
* out here and the block counts what is inside it.
|
|
9
|
+
*
|
|
10
|
+
* Shared because two blocks lay out the page's own cards, FeatureCards and FeatureCardsCarousel,
|
|
11
|
+
* and both have to count them the same way.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cardsOf(children: ReactNode, within?: string): {
|
|
14
|
+
key: string;
|
|
15
|
+
card: ReactNode;
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Children, Fragment, isValidElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The cards a block was handed, with any fragment opened out.
|
|
4
|
+
*
|
|
5
|
+
* `Children.toArray` flattens arrays and leaves a fragment whole, so a page writing
|
|
6
|
+
* `<>{cards}</>` handed over one child: every card in a single cell, and the block reading the set
|
|
7
|
+
* as one card alone. A fragment is the page grouping its own markup, never a card, so it is opened
|
|
8
|
+
* out here and the block counts what is inside it.
|
|
9
|
+
*
|
|
10
|
+
* Shared because two blocks lay out the page's own cards, FeatureCards and FeatureCardsCarousel,
|
|
11
|
+
* and both have to count them the same way.
|
|
12
|
+
*/
|
|
13
|
+
export function cardsOf(children, within = '') {
|
|
14
|
+
return Children.toArray(children).flatMap((child, at) => {
|
|
15
|
+
// `toArray` keys a fragment's children afresh — `.0`, `.1` — so a card is keyed by the
|
|
16
|
+
// fragment it came out of as well as its own place, or two cards from different groups share a
|
|
17
|
+
// key and React reconciles one into the other's cell.
|
|
18
|
+
const key = `${within}${isValidElement(child) && child.key !== null ? child.key : at}`;
|
|
19
|
+
return isValidElement(child) && child.type === Fragment
|
|
20
|
+
? cardsOf(child.props.children, `${key}/`)
|
|
21
|
+
: [{ key, card: child }];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/* GENERATED from comparisoncards.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards {
|
|
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-comparisoncards .dds-comparisoncards__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-comparisoncards .dds-comparisoncards__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-comparisoncards .dds-comparisoncards__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-comparisoncards .dds-comparisoncards__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-comparisoncards .dds-comparisoncards__grid {
|
|
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-comparisoncards .dds-comparisoncards__item {
|
|
64
|
+
display: grid;
|
|
65
|
+
min-inline-size: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__body {
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex: auto;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
padding-block: var(--space-inset-card);
|
|
75
|
+
padding-inline: var(--space-inset-card);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__intro {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
margin-block-end: var(--space-gap-md);
|
|
82
|
+
row-gap: var(--space-heading-title-description-compact);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__card-head {
|
|
86
|
+
align-items: flex-start;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
column-gap: var(--space-gap-md);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__card-title {
|
|
93
|
+
margin-block: 0;
|
|
94
|
+
font-family: var(--font-h5-family);
|
|
95
|
+
font-size: var(--font-h5-size);
|
|
96
|
+
font-weight: var(--font-h5-weight);
|
|
97
|
+
letter-spacing: var(--font-h5-letter-spacing);
|
|
98
|
+
line-height: var(--font-h5-line-height);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__highlight {
|
|
102
|
+
display: flex;
|
|
103
|
+
position: absolute;
|
|
104
|
+
padding-inline: var(--space-gap-none);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__card-description {
|
|
108
|
+
margin-block: 0;
|
|
109
|
+
font-family: var(--font-body-md-family);
|
|
110
|
+
font-size: var(--font-body-md-size);
|
|
111
|
+
font-weight: var(--font-body-md-weight);
|
|
112
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
113
|
+
line-height: var(--font-body-md-line-height);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__rows {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
margin-block: 0;
|
|
120
|
+
margin-inline: 0;
|
|
121
|
+
padding-block: 0;
|
|
122
|
+
padding-inline: 0;
|
|
123
|
+
row-gap: var(--space-gap-none);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__row {
|
|
127
|
+
align-items: baseline;
|
|
128
|
+
border-block-end-style: solid;
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: space-between;
|
|
131
|
+
border-block-end-width: var(--border-width-default);
|
|
132
|
+
column-gap: var(--space-gap-md);
|
|
133
|
+
padding-block: var(--space-inset-md);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__row-label {
|
|
137
|
+
margin-inline: 0;
|
|
138
|
+
min-inline-size: 0;
|
|
139
|
+
font-family: var(--font-body-md-family);
|
|
140
|
+
font-size: var(--font-body-md-size);
|
|
141
|
+
font-weight: var(--font-body-md-weight);
|
|
142
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
143
|
+
line-height: var(--font-body-md-line-height);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__row-value {
|
|
147
|
+
margin-inline: 0;
|
|
148
|
+
min-inline-size: 0;
|
|
149
|
+
text-align: end;
|
|
150
|
+
font-family: var(--font-label-md-family);
|
|
151
|
+
font-size: var(--font-label-md-size);
|
|
152
|
+
font-weight: var(--font-label-md-weight);
|
|
153
|
+
letter-spacing: var(--font-label-md-letter-spacing);
|
|
154
|
+
line-height: var(--font-label-md-line-height);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__footer {
|
|
158
|
+
align-items: flex-start;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
margin-block-start: var(--space-gap-md);
|
|
162
|
+
row-gap: var(--space-gap-md);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__footnote {
|
|
166
|
+
font-style: italic;
|
|
167
|
+
margin-block: 0;
|
|
168
|
+
font-family: var(--font-body-sm-family);
|
|
169
|
+
font-size: var(--font-body-sm-size);
|
|
170
|
+
font-weight: var(--font-body-sm-weight);
|
|
171
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
172
|
+
line-height: var(--font-body-sm-line-height);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards .dds-comparisoncards__action {
|
|
176
|
+
display: flex;
|
|
177
|
+
margin-block-start: var(--space-gap-none);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards[data-ground="page"] {
|
|
181
|
+
background-color: var(--color-bg-page);
|
|
182
|
+
color: var(--color-fg-default);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards[data-ground="strong"] {
|
|
186
|
+
background-color: var(--color-bg-brand-strong);
|
|
187
|
+
color: var(--color-fg-on-brand-strong);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where([data-dds-context="marketing"]) .dds-comparisoncards[data-ground="subtle"] {
|
|
191
|
+
background-color: var(--color-bg-page);
|
|
192
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
193
|
+
color: var(--color-fg-default);
|
|
194
|
+
}
|
|
195
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './ComparisonCards.css';
|
|
2
|
+
import './comparison-cards-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type ComparisonCardsProps } from './ComparisonCards.types.js';
|
|
5
|
+
export type { ComparisonCardsProps };
|
|
6
|
+
/**
|
|
7
|
+
* A heading over two or three cards that repeat the same rows — the reference site's
|
|
8
|
+
* ComparisonCards.
|
|
9
|
+
*
|
|
10
|
+
* The cards are records rather than children, the one place a block here takes its cards that way.
|
|
11
|
+
* What a comparison is made of is structured — a name, a sentence, and labels each answered with a
|
|
12
|
+
* value — and the block has to lay each card's rows against its neighbour's, which it cannot do
|
|
13
|
+
* inside a Card it was handed whole. The surface is still the page's own Card, so a light or a coral
|
|
14
|
+
* card here is the same fill and corner as anywhere else on the page.
|
|
15
|
+
*
|
|
16
|
+
* Side by side, every card shares the grid's rows: one for the intros, one per line of the
|
|
17
|
+
* comparison, one for the footnotes. The count of those rows is the one thing the stylesheet cannot
|
|
18
|
+
* read from the markup — it is the longest card's, not any one card's — so it is handed over as a
|
|
19
|
+
* custom property, FeatureScroll's way of passing a count.
|
|
20
|
+
*
|
|
21
|
+
* It arrives the way every block does: the heading and the line, then each card a step behind the
|
|
22
|
+
* one before. `'use client'` for that and for `useId`, which names the region by its heading.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ComparisonCards({ ground, variant, title, description, cards, }: ComparisonCardsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './ComparisonCards.css';
|
|
5
|
+
import './comparison-cards-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { given } from '../../given.js';
|
|
8
|
+
import { Badge } from '../../core/badge/Badge.js';
|
|
9
|
+
import { Button } from '../../core/button/Button.js';
|
|
10
|
+
import { Card } from '../../core/card/Card.js';
|
|
11
|
+
import { Link } from '../../core/link/Link.js';
|
|
12
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
13
|
+
import { comparisonCardsDefaults, comparisonCardsParts, } from './ComparisonCards.types.js';
|
|
14
|
+
/** The most cards drawn. A fifth column of label and value is too narrow to read. */
|
|
15
|
+
const MOST = 4;
|
|
16
|
+
/**
|
|
17
|
+
* The page's own Card for each surface. The standard card is Card's own `surface`, which follows the
|
|
18
|
+
* theme — the recessed grey on a light page, a dark grey in dark mode — so a set of equals reads as
|
|
19
|
+
* part of the page in either. Highlighted, the cards are gray.50 with dark ink in both themes, set
|
|
20
|
+
* against the brand's coral with white for the one the variant recommends.
|
|
21
|
+
*/
|
|
22
|
+
const SURFACE = { surface: 'surface', light: 'surface-light', coral: 'accent' };
|
|
23
|
+
/**
|
|
24
|
+
* A heading over two or three cards that repeat the same rows — the reference site's
|
|
25
|
+
* ComparisonCards.
|
|
26
|
+
*
|
|
27
|
+
* The cards are records rather than children, the one place a block here takes its cards that way.
|
|
28
|
+
* What a comparison is made of is structured — a name, a sentence, and labels each answered with a
|
|
29
|
+
* value — and the block has to lay each card's rows against its neighbour's, which it cannot do
|
|
30
|
+
* inside a Card it was handed whole. The surface is still the page's own Card, so a light or a coral
|
|
31
|
+
* card here is the same fill and corner as anywhere else on the page.
|
|
32
|
+
*
|
|
33
|
+
* Side by side, every card shares the grid's rows: one for the intros, one per line of the
|
|
34
|
+
* comparison, one for the footnotes. The count of those rows is the one thing the stylesheet cannot
|
|
35
|
+
* read from the markup — it is the longest card's, not any one card's — so it is handed over as a
|
|
36
|
+
* custom property, FeatureScroll's way of passing a count.
|
|
37
|
+
*
|
|
38
|
+
* It arrives the way every block does: the heading and the line, then each card a step behind the
|
|
39
|
+
* one before. `'use client'` for that and for `useId`, which names the region by its heading.
|
|
40
|
+
*/
|
|
41
|
+
export function ComparisonCards({ ground = comparisonCardsDefaults.ground, variant = comparisonCardsDefaults.variant, title, description, cards, }) {
|
|
42
|
+
const titleId = useId();
|
|
43
|
+
const [band, revealed] = useReveal();
|
|
44
|
+
const shown = cards.slice(0, MOST);
|
|
45
|
+
// Nothing to compare is nothing drawn: a named region holding no option leads nowhere.
|
|
46
|
+
if (shown.length === 0)
|
|
47
|
+
return null;
|
|
48
|
+
// The recommended card, in the highlighted variant: the first one marked so. One only — a
|
|
49
|
+
// recommendation made twice is no recommendation.
|
|
50
|
+
const recommended = variant === 'highlighted' ? shown.findIndex((card) => card.recommended === true) : -1;
|
|
51
|
+
// One track for the intros, one per row of the longest card, one for the feet.
|
|
52
|
+
const rows = Math.max(...shown.map((card) => card.rows.length));
|
|
53
|
+
const tracks = { '--dds-comparisoncards-tracks': rows + 2 };
|
|
54
|
+
return (_jsx("section", { className: comparisonCardsParts.root, "data-ground": ground, "data-variant": variant, "aria-labelledby": titleId, children: _jsxs("div", { className: comparisonCardsParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: comparisonCardsParts.header, children: [_jsx("h2", { className: comparisonCardsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: comparisonCardsParts.description, ...arriving(1), children: description })) : null] }), _jsx("ul", { className: comparisonCardsParts.grid, style: tracks, children: shown.map((card, at) => {
|
|
55
|
+
// Standard, every card is the page's own surface, so the options read as equals; highlighted,
|
|
56
|
+
// the recommended card alone is coral against light ones, the one card asking to be read
|
|
57
|
+
// first.
|
|
58
|
+
const chosen = at === recommended;
|
|
59
|
+
const tone = variant === 'standard' ? 'surface' : chosen ? 'coral' : 'light';
|
|
60
|
+
const footed = given(card.footnote) || card.action !== undefined;
|
|
61
|
+
return (
|
|
62
|
+
/* A card's place is its identity: the set is a list, and nothing reorders it. The cell
|
|
63
|
+
is what arrives, so the Card inside keeps its own transitions. */
|
|
64
|
+
_jsx("li", { className: comparisonCardsParts.item, "data-tone": tone, "data-recommended": chosen || undefined, ...arriving(2 + at), children: _jsx(Card, { variant: SURFACE[tone], children: _jsxs("div", { className: comparisonCardsParts.body, children: [_jsxs("div", { className: comparisonCardsParts.intro, children: [_jsxs("div", { className: comparisonCardsParts['card-head'], children: [_jsx("h3", { className: comparisonCardsParts['card-title'], children: card.title }), chosen && given(card.badge) ? (_jsx("div", { className: comparisonCardsParts.highlight, children: _jsx(Badge, { label: card.badge ?? '' }) })) : null] }), given(card.description) ? (_jsx("p", { className: comparisonCardsParts['card-description'], children: card.description })) : null] }), card.rows.length > 0 ? (_jsx("dl", { className: comparisonCardsParts.rows, children: card.rows.map((row, line) => (
|
|
65
|
+
// A wrapping div per pair is what a description list allows, and what
|
|
66
|
+
// lets the label and the value share a line and a rule.
|
|
67
|
+
_jsxs("div", { className: comparisonCardsParts.row, children: [_jsx("dt", { className: comparisonCardsParts['row-label'], children: row.label }), _jsx("dd", { className: comparisonCardsParts['row-value'], children: _jsx("bdi", { children: row.value }) })] }, line))) })) : null, footed ? (_jsxs("div", { className: comparisonCardsParts.footer, children: [given(card.footnote) ? (_jsx("p", { className: comparisonCardsParts.footnote, children: card.footnote })) : null, card.action === undefined ? null : (_jsx("div", { className: comparisonCardsParts.action, children: chosen ? (
|
|
68
|
+
/* The recommended card's way on is the band's one solid button: the
|
|
69
|
+
dark one CtaBanner puts on the coral. */
|
|
70
|
+
_jsx(Button, { variant: "inverse", tone: "brand", href: card.action.href, children: card.action.label })) : (
|
|
71
|
+
/* The card's own ink rather than the brand's: coral words on a coral
|
|
72
|
+
card would vanish, and one tone serves every card. */
|
|
73
|
+
_jsx(Link, { variant: "standalone", tone: "inherit", href: card.action.href, children: card.action.label })) }))] })) : null] }) }) }, at));
|
|
74
|
+
}) })] }) }));
|
|
75
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ComparisonCardsCard } from '../../comparison-cards-data.js';
|
|
2
|
+
export interface ComparisonCardsOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `page` — The default, and the page's own white. The standard card is the recessed surface on it, the highlighted set's light card gray.50, so both have an edge
|
|
5
|
+
* `subtle` — The grey band, the reference design's ground for this section. The standard card is raised to color.bg.surface-card-raised on it and the light card turns white, color.bg.surface-card-light-raised, because their own fills are the band's grey. Painted as the band's tint over the page's own ground, so it is the same grey whatever is behind the section
|
|
6
|
+
* `strong` — `color.bg.brand-strong`, the dark band, for a section a reader should arrive at. The heading and the line under it turn white; the standard card turns to Card's inverse surface with white ink, since its own would be dark words on near-black; the light and coral cards keep their own grounds and ink
|
|
7
|
+
*/
|
|
8
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
9
|
+
/**
|
|
10
|
+
* `standard` — The default: options set side by side as equals — every card Card's own `surface`, which follows the theme, the recessed grey on a light page and a dark grey in dark mode, nothing pointing at one of them. A card marked `recommended` is drawn like the rest here.
|
|
11
|
+
* `highlighted` — One option is the one the page recommends: the card marked `recommended` is drawn coral and lifted off the page, every other card on the light card, gray.50 in both themes, quiet beside it. Where the recommended card has a `badge`, its word stands on a badge pinned to the card's top end corner; where it has an `action`, the action is a solid button. For account and plan comparisons where the page has a recommendation and says so. A known exception: white running copy on the coral is about 3.4:1, under the 4.5:1 body text asks for — the package's ground rule keeps the coral to a headline and an action, and this card carries rows. Recorded rather than recoloured, as CtaBanner's band is; where the copy is long or the contrast matters, use the standard variant.
|
|
12
|
+
*/
|
|
13
|
+
variant?: 'standard' | 'highlighted';
|
|
14
|
+
/** Always. What is being compared, in the fewest words that name it — "What you can trade", "Choose your account". */
|
|
15
|
+
title: string;
|
|
16
|
+
/** A line saying what the options have in common, or what the reader is choosing between, when the title alone does not. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Always. The options, in reading order — two to four, each with its `title`, a `description`, its `rows` and, where it has them, a `footnote` and an `action`. Every card is drawn the same card. Keep the same labels in the same order on every card, so each row lines up with its counterpart. Two sit side by side from the fold; three stay stacked until full width; four are two rows of two from the fold and one row of four at full width. Only the first four are drawn, and an empty list draws nothing. With `variant="highlighted"`, the card marked `recommended` is the one drawn coral; give it a `badge` — "Most popular", "Recommended" — only where the page wants to say why. */
|
|
19
|
+
cards: ComparisonCardsCard[];
|
|
20
|
+
}
|
|
21
|
+
export type ComparisonCardsProps = ComparisonCardsOwnProps;
|
|
22
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
23
|
+
export declare const comparisonCardsParts: {
|
|
24
|
+
readonly root: "dds-comparisoncards";
|
|
25
|
+
readonly inner: "dds-comparisoncards__inner";
|
|
26
|
+
readonly header: "dds-comparisoncards__header";
|
|
27
|
+
readonly title: "dds-comparisoncards__title";
|
|
28
|
+
readonly description: "dds-comparisoncards__description";
|
|
29
|
+
readonly grid: "dds-comparisoncards__grid";
|
|
30
|
+
readonly item: "dds-comparisoncards__item";
|
|
31
|
+
readonly body: "dds-comparisoncards__body";
|
|
32
|
+
readonly intro: "dds-comparisoncards__intro";
|
|
33
|
+
readonly 'card-head': "dds-comparisoncards__card-head";
|
|
34
|
+
readonly 'card-title': "dds-comparisoncards__card-title";
|
|
35
|
+
readonly highlight: "dds-comparisoncards__highlight";
|
|
36
|
+
readonly 'card-description': "dds-comparisoncards__card-description";
|
|
37
|
+
readonly rows: "dds-comparisoncards__rows";
|
|
38
|
+
readonly row: "dds-comparisoncards__row";
|
|
39
|
+
readonly 'row-label': "dds-comparisoncards__row-label";
|
|
40
|
+
readonly 'row-value': "dds-comparisoncards__row-value";
|
|
41
|
+
readonly footer: "dds-comparisoncards__footer";
|
|
42
|
+
readonly footnote: "dds-comparisoncards__footnote";
|
|
43
|
+
readonly action: "dds-comparisoncards__action";
|
|
44
|
+
};
|
|
45
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
46
|
+
export declare const comparisonCardsDefaults: {
|
|
47
|
+
readonly ground: "page";
|
|
48
|
+
readonly variant: "standard";
|
|
49
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// GENERATED from comparison-cards.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const comparisonCardsParts = {
|
|
4
|
+
root: 'dds-comparisoncards',
|
|
5
|
+
inner: 'dds-comparisoncards__inner',
|
|
6
|
+
header: 'dds-comparisoncards__header',
|
|
7
|
+
title: 'dds-comparisoncards__title',
|
|
8
|
+
description: 'dds-comparisoncards__description',
|
|
9
|
+
grid: 'dds-comparisoncards__grid',
|
|
10
|
+
item: 'dds-comparisoncards__item',
|
|
11
|
+
body: 'dds-comparisoncards__body',
|
|
12
|
+
intro: 'dds-comparisoncards__intro',
|
|
13
|
+
'card-head': 'dds-comparisoncards__card-head',
|
|
14
|
+
'card-title': 'dds-comparisoncards__card-title',
|
|
15
|
+
highlight: 'dds-comparisoncards__highlight',
|
|
16
|
+
'card-description': 'dds-comparisoncards__card-description',
|
|
17
|
+
rows: 'dds-comparisoncards__rows',
|
|
18
|
+
row: 'dds-comparisoncards__row',
|
|
19
|
+
'row-label': 'dds-comparisoncards__row-label',
|
|
20
|
+
'row-value': 'dds-comparisoncards__row-value',
|
|
21
|
+
footer: 'dds-comparisoncards__footer',
|
|
22
|
+
footnote: 'dds-comparisoncards__footnote',
|
|
23
|
+
action: 'dds-comparisoncards__action',
|
|
24
|
+
};
|
|
25
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
26
|
+
export const comparisonCardsDefaults = { ground: 'page', variant: 'standard' };
|