@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,14 @@
|
|
|
1
|
+
// GENERATED from feature-stack.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const featureStackParts = {
|
|
4
|
+
root: 'dds-featurestack',
|
|
5
|
+
inner: 'dds-featurestack__inner',
|
|
6
|
+
header: 'dds-featurestack__header',
|
|
7
|
+
title: 'dds-featurestack__title',
|
|
8
|
+
description: 'dds-featurestack__description',
|
|
9
|
+
link: 'dds-featurestack__link',
|
|
10
|
+
media: 'dds-featurestack__media',
|
|
11
|
+
image: 'dds-featurestack__image',
|
|
12
|
+
};
|
|
13
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
14
|
+
export const featureStackDefaults = { ground: 'page' };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* From the fold, the words are centred over the picture.
|
|
7
|
+
*
|
|
8
|
+
* FeatureCards' rule and its reason: content stacked under a heading takes a centred heading. The
|
|
9
|
+
* header and its line are capped narrower than the column, so `margin-inline: auto` centres those
|
|
10
|
+
* boxes rather than their words inside a box left at the start edge; the link centres with them.
|
|
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-featurestack .dds-featurestack__header {
|
|
17
|
+
align-items: center;
|
|
18
|
+
margin-inline: auto;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__description {
|
|
23
|
+
margin-inline: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__link {
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* A heading with nothing under it closes up: its bound step is the distance to the line, and with
|
|
33
|
+
* nothing there it would only add to the step from the words to the picture. `:last-child` is the
|
|
34
|
+
* condition itself, DataTable's way, rather than a prop standing in for it.
|
|
35
|
+
*/
|
|
36
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__title:last-child {
|
|
37
|
+
margin-block-end: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* The illustration stands on the section's foot.
|
|
42
|
+
*
|
|
43
|
+
* It reaches down through the section's own bottom padding to the band's edge, so the picture
|
|
44
|
+
* stands on the band rather than floating above the next one — the reference design's globe, which
|
|
45
|
+
* the band ends on. space.section.default is the inner's padding, given back.
|
|
46
|
+
*/
|
|
47
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__media {
|
|
48
|
+
margin-block-end: calc(-1 * var(--space-section-default));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* The picture keeps its own shape; the screen only decides how tall it may grow.
|
|
53
|
+
*
|
|
54
|
+
* The frame wraps the picture rather than a box the block chose: as wide as the picture's shape
|
|
55
|
+
* allows, up to the column, and centred. The picture shows at its own proportions — a square stays
|
|
56
|
+
* square, a landscape stays landscape — so a page that brings a 1:1 picture gets a 1:1 picture,
|
|
57
|
+
* whatever shape the block's own example is. What changes with the screen is the tallest it may be:
|
|
58
|
+
* aspect.portrait of the column on a phone, where the column is narrow and a portrait is what fills
|
|
59
|
+
* it; aspect.landscape of its widest from the fold, so a band never becomes a picture with a heading
|
|
60
|
+
* on top. A picture past that limit is drawn smaller, keeping its shape, never cropped.
|
|
61
|
+
*
|
|
62
|
+
* The limits are aspect.portrait (4:5) and aspect.landscape (4:3) said as factors, 1.25 and 0.75 —
|
|
63
|
+
* a ratio token is a pair, and a height has to be a length. `100cqi` is the section's width, the
|
|
64
|
+
* root declaring `container-type`; the column is that less the page gutter each side.
|
|
65
|
+
*
|
|
66
|
+
* `47.9375rem` is the last width below the fold, LogoRows' bound.
|
|
67
|
+
*/
|
|
68
|
+
/* Set on the frame rather than the section: a container query styles what is inside the container,
|
|
69
|
+
never the container itself, so the section could not take the fold's value. */
|
|
70
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__media {
|
|
71
|
+
--dds-featurestack-column: calc(100cqi - 2 * var(--space-inset-page));
|
|
72
|
+
--dds-featurestack-tallest: calc(var(--dds-featurestack-column) * 1.25);
|
|
73
|
+
inline-size: fit-content;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@container (min-width: 48rem) {
|
|
77
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__media {
|
|
78
|
+
--dds-featurestack-tallest: calc(min(var(--dds-featurestack-column), var(--size-feature-stack-media)) * 0.75);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-dds-context="marketing"]) .dds-featurestack .dds-featurestack__image {
|
|
83
|
+
block-size: auto;
|
|
84
|
+
inline-size: auto;
|
|
85
|
+
max-block-size: var(--dds-featurestack-tallest);
|
|
86
|
+
max-inline-size: 100%;
|
|
87
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* GENERATED from imagebanner.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner {
|
|
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-imagebanner .dds-imagebanner__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
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__card {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
overflow: clip;
|
|
29
|
+
position: relative;
|
|
30
|
+
border-radius: var(--radius-container);
|
|
31
|
+
color: var(--color-fg-on-brand-strong);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__content {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
min-inline-size: 0;
|
|
40
|
+
position: relative;
|
|
41
|
+
padding-block: var(--space-inset-card);
|
|
42
|
+
padding-inline: var(--space-inset-card);
|
|
43
|
+
row-gap: var(--space-gap-none);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__title {
|
|
47
|
+
margin-block: 0;
|
|
48
|
+
text-wrap: balance;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__description {
|
|
52
|
+
margin-block: 0;
|
|
53
|
+
font-family: var(--font-body-md-family);
|
|
54
|
+
font-size: var(--font-body-md-size);
|
|
55
|
+
font-weight: var(--font-body-md-weight);
|
|
56
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
57
|
+
line-height: var(--font-body-md-line-height);
|
|
58
|
+
margin-block-end: var(--space-heading-description-actions);
|
|
59
|
+
max-inline-size: var(--size-measure-description);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__action {
|
|
63
|
+
display: flex;
|
|
64
|
+
column-gap: var(--space-actions-gap);
|
|
65
|
+
row-gap: var(--space-actions-gap);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__media {
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
min-inline-size: 0;
|
|
71
|
+
overflow: clip;
|
|
72
|
+
position: relative;
|
|
73
|
+
border-radius: var(--radius-none);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-media-position="end"] .dds-imagebanner__card {
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-media-position="start"] .dds-imagebanner__card {
|
|
81
|
+
flex-direction: row-reverse;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="page"] {
|
|
85
|
+
background-color: var(--color-bg-page);
|
|
86
|
+
color: var(--color-fg-default);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="page"] .dds-imagebanner__card {
|
|
90
|
+
background-color: var(--color-bg-brand-strong);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="strong"] {
|
|
94
|
+
background-color: var(--color-bg-brand-strong);
|
|
95
|
+
color: var(--color-fg-on-brand-strong);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="strong"] .dds-imagebanner__card {
|
|
99
|
+
background-color: var(--color-bg-surface-card-strong);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="subtle"] {
|
|
103
|
+
background-color: var(--color-bg-page);
|
|
104
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
105
|
+
color: var(--color-fg-default);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-ground="subtle"] .dds-imagebanner__card {
|
|
109
|
+
background-color: var(--color-bg-brand-strong);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__title {
|
|
113
|
+
font-family: var(--font-h2-family);
|
|
114
|
+
font-size: var(--font-h2-size);
|
|
115
|
+
font-weight: var(--font-h2-weight);
|
|
116
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
117
|
+
line-height: var(--font-h2-line-height);
|
|
118
|
+
margin-block-end: var(--space-heading-title-description);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__media {
|
|
122
|
+
aspect-ratio: var(--aspect-landscape);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__title {
|
|
126
|
+
font-family: var(--font-h2-family);
|
|
127
|
+
font-size: var(--font-h2-size);
|
|
128
|
+
font-weight: var(--font-h2-weight);
|
|
129
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
130
|
+
line-height: var(--font-h2-line-height);
|
|
131
|
+
margin-block-end: var(--space-heading-title-description);
|
|
132
|
+
}
|
|
133
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import './ImageBanner.css';
|
|
2
|
+
import './image-banner-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type ImageBannerProps } from './ImageBanner.types.js';
|
|
5
|
+
export type { ImageBannerProps };
|
|
6
|
+
/**
|
|
7
|
+
* A dark card in the middle of a page, pairing a headline and a line under it with a photograph.
|
|
8
|
+
*
|
|
9
|
+
* The reference site's ImageBanner, and two of its layouts are `variant`: the photograph beside the
|
|
10
|
+
* words (split) or behind them (cover), each with one action. The reference's third, a collage
|
|
11
|
+
* beside a row of checked features with no action, is not offered: a set of features is a list a
|
|
12
|
+
* page composes, and FeatureBullets is that.
|
|
13
|
+
*
|
|
14
|
+
* The reference wrote each layout twice, `-left` and `-right`. Here that is `mediaPosition`, start
|
|
15
|
+
* and end, which is the axis FeatureSplit already names and the one a mirrored page reads without
|
|
16
|
+
* translating. The reference also ranged the words to the far edge on its right-hand layouts; they
|
|
17
|
+
* start here on either side, because a heading beside its content starts with it.
|
|
18
|
+
*
|
|
19
|
+
* The card is dark on every ground, which is what the block is for. `ground` paints the band around
|
|
20
|
+
* it the way every block's does, and on the dark band the card steps up to the strong card fill so
|
|
21
|
+
* it still reads as a card.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* The photograph is the page's. It is not hidden from assistive technology the way FeatureSplit's
|
|
25
|
+
* is: the reference asks for alt text where the photograph means something, so the page says
|
|
26
|
+
* whether it does, with an empty alt where it does not.
|
|
27
|
+
*
|
|
28
|
+
* It arrives the way every block does — the headline, the line, then the action, and
|
|
29
|
+
* the photograph after them. A cover photograph is the card's ground rather than a part of what it
|
|
30
|
+
* says, so it is there from the start and only the words arrive over it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ImageBanner({ ground, variant, mediaPosition, parallax, title, headingLevel, description, action, media, }: ImageBannerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './ImageBanner.css';
|
|
5
|
+
import './image-banner-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { imageBannerDefaults, imageBannerParts } from './ImageBanner.types.js';
|
|
10
|
+
/**
|
|
11
|
+
* A dark card in the middle of a page, pairing a headline and a line under it with a photograph.
|
|
12
|
+
*
|
|
13
|
+
* The reference site's ImageBanner, and two of its layouts are `variant`: the photograph beside the
|
|
14
|
+
* words (split) or behind them (cover), each with one action. The reference's third, a collage
|
|
15
|
+
* beside a row of checked features with no action, is not offered: a set of features is a list a
|
|
16
|
+
* page composes, and FeatureBullets is that.
|
|
17
|
+
*
|
|
18
|
+
* The reference wrote each layout twice, `-left` and `-right`. Here that is `mediaPosition`, start
|
|
19
|
+
* and end, which is the axis FeatureSplit already names and the one a mirrored page reads without
|
|
20
|
+
* translating. The reference also ranged the words to the far edge on its right-hand layouts; they
|
|
21
|
+
* start here on either side, because a heading beside its content starts with it.
|
|
22
|
+
*
|
|
23
|
+
* The card is dark on every ground, which is what the block is for. `ground` paints the band around
|
|
24
|
+
* it the way every block's does, and on the dark band the card steps up to the strong card fill so
|
|
25
|
+
* it still reads as a card.
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* The photograph is the page's. It is not hidden from assistive technology the way FeatureSplit's
|
|
29
|
+
* is: the reference asks for alt text where the photograph means something, so the page says
|
|
30
|
+
* whether it does, with an empty alt where it does not.
|
|
31
|
+
*
|
|
32
|
+
* It arrives the way every block does — the headline, the line, then the action, and
|
|
33
|
+
* the photograph after them. A cover photograph is the card's ground rather than a part of what it
|
|
34
|
+
* says, so it is there from the start and only the words arrive over it.
|
|
35
|
+
*/
|
|
36
|
+
export function ImageBanner({ ground = imageBannerDefaults.ground, variant = imageBannerDefaults.variant, mediaPosition = imageBannerDefaults.mediaPosition, parallax = imageBannerDefaults.parallax, title, headingLevel = imageBannerDefaults.headingLevel, description, action, media, }) {
|
|
37
|
+
const titleId = useId();
|
|
38
|
+
const Title = headingLevel;
|
|
39
|
+
const [band, revealed] = useReveal();
|
|
40
|
+
return (_jsx("section", { className: imageBannerParts.root, "data-ground": ground, "data-variant": variant, "data-media-position": mediaPosition, "data-parallax": parallax, "aria-labelledby": titleId, children: _jsx("div", { className: imageBannerParts.inner, ref: band, "data-revealed": revealed, children: _jsxs("div", { className: imageBannerParts.card, children: [_jsxs("div", { className: imageBannerParts.content, children: [_jsx(Title, { className: imageBannerParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: imageBannerParts.description, ...arriving(1), children: description })) : null, action ? (_jsx("div", { className: imageBannerParts.action, ...arriving(2), children: action })) : null] }), _jsx("div", { className: imageBannerParts.media, ...(variant === 'cover' ? {} : arriving(3)), children: media })] }) }) }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ImageBannerOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `page` — The default, and the page's own white, with the dark card set into it. Most of the time: the card is already the break
|
|
5
|
+
* `subtle` — The grey band, for a card that follows a white section the page wants told apart from this one. Painted as the band's tint laid 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, with the card a step lighter at color.bg.surface-card-strong so it still reads as a card. For a page whose dark band is already here and wants the card inside it
|
|
7
|
+
*/
|
|
8
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
9
|
+
/**
|
|
10
|
+
* `split` — The default. The words in one half and the photograph filling the other, edge to edge, with one action under the words. On a phone the card runs the width of the screen and the photograph stacks with the words
|
|
11
|
+
* `cover` — The photograph fills the whole card, with the words over it behind a scrim that darkens the side they are on and leaves the photograph clear on the other. For a photograph wide enough to be the band rather than half of it
|
|
12
|
+
*/
|
|
13
|
+
variant?: 'split' | 'cover';
|
|
14
|
+
/**
|
|
15
|
+
* `end` — The default. The words lead and the photograph follows, which is the order the card argues in
|
|
16
|
+
* `start` — The photograph leads — the second of two cards on a page, or a photograph whose subject faces the words. A split card puts it above the words on a phone as well, as the reference design does
|
|
17
|
+
*/
|
|
18
|
+
mediaPosition?: 'end' | 'start';
|
|
19
|
+
/** Always. The one thing the card says, in under eight words — "Join our global community". */
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* `h2` — The default: the card is a section of the page, under the page's own h1
|
|
23
|
+
* `h3` — The card sits inside a section that already carries the h2 it belongs to
|
|
24
|
+
*/
|
|
25
|
+
headingLevel?: 'h2' | 'h3';
|
|
26
|
+
/** The line under the headline saying what it means for the reader, in one or two sentences. */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** The one thing the card asks for. The card is dark in both themes, so a Button here takes tone="inverse": the primary is the coral fill and it is the card's one primary. On a phone it fills the width of the card. */
|
|
29
|
+
action?: ReactNode;
|
|
30
|
+
/** Always. The page's photograph, through AspectRatio or as an image — people or product. Split and cover crop it to fill the space they give it. Alt text is the page's to give, empty where the photograph is decoration. */
|
|
31
|
+
media: ReactNode;
|
|
32
|
+
/** The photograph drifts against the scroll as the card passes through the view, by motion.distance.drift over the whole pass, so it reads as further away than the card — the reference design's ParallaxBanner, which this replaces. For a careers or about page, where the photograph of the people is the point. Off by default: a card selling one action does not need its picture moving under the button. */
|
|
33
|
+
parallax?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export type ImageBannerProps = ImageBannerOwnProps;
|
|
36
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
37
|
+
export declare const imageBannerParts: {
|
|
38
|
+
readonly root: "dds-imagebanner";
|
|
39
|
+
readonly inner: "dds-imagebanner__inner";
|
|
40
|
+
readonly card: "dds-imagebanner__card";
|
|
41
|
+
readonly content: "dds-imagebanner__content";
|
|
42
|
+
readonly title: "dds-imagebanner__title";
|
|
43
|
+
readonly description: "dds-imagebanner__description";
|
|
44
|
+
readonly action: "dds-imagebanner__action";
|
|
45
|
+
readonly media: "dds-imagebanner__media";
|
|
46
|
+
};
|
|
47
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
48
|
+
export declare const imageBannerDefaults: {
|
|
49
|
+
readonly ground: "page";
|
|
50
|
+
readonly variant: "split";
|
|
51
|
+
readonly mediaPosition: "end";
|
|
52
|
+
readonly headingLevel: "h2";
|
|
53
|
+
readonly parallax: false;
|
|
54
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED from image-banner.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const imageBannerParts = {
|
|
4
|
+
root: 'dds-imagebanner',
|
|
5
|
+
inner: 'dds-imagebanner__inner',
|
|
6
|
+
card: 'dds-imagebanner__card',
|
|
7
|
+
content: 'dds-imagebanner__content',
|
|
8
|
+
title: 'dds-imagebanner__title',
|
|
9
|
+
description: 'dds-imagebanner__description',
|
|
10
|
+
action: 'dds-imagebanner__action',
|
|
11
|
+
media: 'dds-imagebanner__media',
|
|
12
|
+
};
|
|
13
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
14
|
+
export const imageBannerDefaults = { ground: 'page', variant: 'split', mediaPosition: 'end', headingLevel: 'h2', parallax: false };
|
|
@@ -0,0 +1,281 @@
|
|
|
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
|
+
* A title with nothing under it carries no step under it.
|
|
10
|
+
*
|
|
11
|
+
* The steps inside the column sit on each part's own `margin-block-end`, as FeatureSplit's do,
|
|
12
|
+
* because title-to-description and description-to-what-follows are two roles. With nothing after
|
|
13
|
+
* the title or the line, that step is measured against nothing, so the last of them drops it.
|
|
14
|
+
*/
|
|
15
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__title:last-child,
|
|
16
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__description:last-child {
|
|
17
|
+
margin-block-end: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* One column below the fold.
|
|
22
|
+
*
|
|
23
|
+
* The row direction is the contract's to say, and the generated sheet carries both values. What is
|
|
24
|
+
* left here is the fold, which `structure` has no width to attach to. Written an attribute deeper
|
|
25
|
+
* than the generated rule — `.dds-imagebanner[data-media-position="end"] .dds-imagebanner__card` —
|
|
26
|
+
* so it wins however the two sheets are ordered.
|
|
27
|
+
*
|
|
28
|
+
* The words lead, except on a split card whose photograph was asked to lead: the reference design
|
|
29
|
+
* puts that photograph above the words on a phone as well, which is the one place this block
|
|
30
|
+
* differs from FeatureSplit's words-first fold.
|
|
31
|
+
*
|
|
32
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
|
|
33
|
+
* width the rest of this package folds at.
|
|
34
|
+
*/
|
|
35
|
+
@container (max-width: 47.9375rem) {
|
|
36
|
+
:where([data-dds-context="marketing"])
|
|
37
|
+
.dds-imagebanner[data-variant][data-media-position]
|
|
38
|
+
.dds-imagebanner__card {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-dds-context="marketing"])
|
|
43
|
+
.dds-imagebanner[data-variant="split"][data-media-position="start"]
|
|
44
|
+
.dds-imagebanner__card {
|
|
45
|
+
flex-direction: column-reverse;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* A split or cover card runs the width of a phone, as the reference design's does: the gutter
|
|
50
|
+
* goes, and so do the corners, which at the screen's edge would round into nothing.
|
|
51
|
+
*/
|
|
52
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__inner {
|
|
53
|
+
padding-inline: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__card {
|
|
57
|
+
border-radius: var(--radius-none);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* The action fills the card's width on a phone, and the row is what does it: it becomes a column
|
|
62
|
+
* and stretches what it holds, so the Button is full width here and its own size from the fold.
|
|
63
|
+
* That is the package's rule for a section's actions, a single one included.
|
|
64
|
+
*/
|
|
65
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__action {
|
|
66
|
+
align-items: stretch;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__action > * {
|
|
71
|
+
inline-size: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* The words take half the card at full width and the photograph the rest.
|
|
78
|
+
*
|
|
79
|
+
* Split is side by side from the fold. It stretches the photograph to the card's height and asks a
|
|
80
|
+
* height of the card, size.image-banner.card, so a short line beside a wide photograph is still a
|
|
81
|
+
* band rather than a strip; the landscape ratio the phone uses is let go, since the card now decides
|
|
82
|
+
* the photograph's shape.
|
|
83
|
+
*/
|
|
84
|
+
@container (min-width: 48rem) {
|
|
85
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__content {
|
|
86
|
+
flex: 1 1 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__card {
|
|
90
|
+
min-block-size: var(--size-image-banner-card);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant] .dds-imagebanner__media {
|
|
94
|
+
flex: 1 1 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__media {
|
|
98
|
+
aspect-ratio: auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* The cover card's words hold three fifths of it, on the side away from where the photograph
|
|
103
|
+
* shows clear — the reference design's measure.
|
|
104
|
+
*/
|
|
105
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__content {
|
|
106
|
+
flex: 0 1 60%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant] .dds-imagebanner__action {
|
|
110
|
+
align-items: center;
|
|
111
|
+
flex-direction: row;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* More room inside the card once it is a desktop's width, as the reference design gives it.
|
|
117
|
+
*/
|
|
118
|
+
@container (min-width: 64rem) {
|
|
119
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__content {
|
|
120
|
+
padding: var(--space-inset-2xl);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*
|
|
125
|
+
* Whatever the page put in a split photograph fills it.
|
|
126
|
+
*
|
|
127
|
+
* The slot takes a node, so what arrives is the page's element — an AspectRatio box or an image —
|
|
128
|
+
* and this cannot know whether it carries dimensions. `cover`, because the half is a shape the card
|
|
129
|
+
* decided on and a photograph letterboxed in it would show the card through the gaps.
|
|
130
|
+
*/
|
|
131
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__media > *,
|
|
132
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="split"] .dds-imagebanner__media img,
|
|
133
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__media > *,
|
|
134
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__media img {
|
|
135
|
+
block-size: 100%;
|
|
136
|
+
inline-size: 100%;
|
|
137
|
+
object-fit: cover;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* Bare media is a block; a component keeps its own display.
|
|
142
|
+
*
|
|
143
|
+
* `display: block` is for what arrives as a raw element — an image, a video, an inline SVG — which
|
|
144
|
+
* sits on a text baseline otherwise and leaves a gap under it. Written at no weight at all, so a
|
|
145
|
+
* component the page placed here — an IllustrationScene, whose grid lays its pane over its photo —
|
|
146
|
+
* keeps the display its own sheet gives it. In the rule above, a class deeper than the component's
|
|
147
|
+
* root, it turned the scene's grid into a block, and the pane fell below the photo and was clipped.
|
|
148
|
+
*/
|
|
149
|
+
:where([data-dds-context="marketing"] .dds-imagebanner .dds-imagebanner__media > *, [data-dds-context="marketing"] .dds-imagebanner .dds-imagebanner__media img) {
|
|
150
|
+
display: block;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
/*
|
|
155
|
+
* The cover photograph is the card's ground: it fills the card behind the words, and the words are
|
|
156
|
+
* stacked over it. A stacking order is an integer, which is why it is here rather than bound.
|
|
157
|
+
*
|
|
158
|
+
* The card asks a height so the photograph has somewhere to show, size.image-banner.card at every
|
|
159
|
+
* width — the reference design's band.
|
|
160
|
+
*/
|
|
161
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__card {
|
|
162
|
+
min-block-size: var(--size-image-banner-card);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__media {
|
|
166
|
+
inset: 0;
|
|
167
|
+
position: absolute;
|
|
168
|
+
z-index: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__content {
|
|
172
|
+
z-index: 1;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/*
|
|
176
|
+
* The scrim over the cover photograph, darkest where the words are.
|
|
177
|
+
*
|
|
178
|
+
* color.bg.overlay held across the whole of the words' column — three fifths of the card, the
|
|
179
|
+
* content's share — so white body copy keeps AA over even a pale photograph; then
|
|
180
|
+
* color.bg.overlay-subtle, the role for an image overlay, and clear at the far side, so the
|
|
181
|
+
* photograph shows where nothing is written on it. Darkest only at the words' edge was not enough:
|
|
182
|
+
* over a light photograph the end of a line of copy sat at about 2:1.
|
|
183
|
+
* On a phone the words are at the top across the whole width, so the scrim runs down rather than
|
|
184
|
+
* across.
|
|
185
|
+
*
|
|
186
|
+
* A gradient takes a physical direction — there is no `to inline-end` — so the direction is a
|
|
187
|
+
* custom property set once per case: toward the photograph's side, and mirrored under `:dir(rtl)`,
|
|
188
|
+
* which is the package's rule for a pattern that must follow the reading direction. Set on the
|
|
189
|
+
* photograph rather than the section, because a container query styles what is inside the
|
|
190
|
+
* container and never the container itself.
|
|
191
|
+
*
|
|
192
|
+
* The words need no rule to change sides: the photograph is out of flow behind them, so the row
|
|
193
|
+
* `mediaPosition` sets holds the words alone, at the start or, reversed, at the end.
|
|
194
|
+
*/
|
|
195
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"] .dds-imagebanner__media::after {
|
|
196
|
+
background-image: linear-gradient(
|
|
197
|
+
var(--dds-imagebanner-scrim-toward, to bottom),
|
|
198
|
+
var(--color-bg-overlay),
|
|
199
|
+
var(--color-bg-overlay) 60%,
|
|
200
|
+
var(--color-bg-overlay-subtle) 80%,
|
|
201
|
+
transparent
|
|
202
|
+
);
|
|
203
|
+
content: '';
|
|
204
|
+
inset: 0;
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
position: absolute;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@container (min-width: 48rem) {
|
|
210
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"][data-media-position="end"] .dds-imagebanner__media {
|
|
211
|
+
--dds-imagebanner-scrim-toward: to right;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"][data-media-position="start"] .dds-imagebanner__media {
|
|
215
|
+
--dds-imagebanner-scrim-toward: to left;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"][data-media-position="end"]:dir(rtl) .dds-imagebanner__media {
|
|
219
|
+
--dds-imagebanner-scrim-toward: to left;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-variant="cover"][data-media-position="start"]:dir(rtl) .dds-imagebanner__media {
|
|
223
|
+
--dds-imagebanner-scrim-toward: to right;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
* `parallax`: the photograph drifts against the scroll as the card passes through the view — the
|
|
229
|
+
* reference design's ParallaxBanner, folded in here as an option on the split and cover cards.
|
|
230
|
+
*
|
|
231
|
+
* The photograph is drawn taller than its frame by the drift, half above and half below, so the
|
|
232
|
+
* movement never shows an edge at either end; the frame clips it. The image itself is the thing
|
|
233
|
+
* that moves, so the frame keeps its size and the card its layout.
|
|
234
|
+
*
|
|
235
|
+
* Scroll-driven, the way LogoColumns moves its wall: the frame names a view timeline and the image
|
|
236
|
+
* runs down it from half the drift above centre to half below, over the whole pass (`cover`), so as
|
|
237
|
+
* the page carries the card up the photograph falls behind a little and reads as further away.
|
|
238
|
+
* Linear, because the scroll is the easing. The card and the frame clip with `overflow: clip`, not
|
|
239
|
+
* `hidden`: `hidden` makes a box a scroll container, and a view timeline measured against one that
|
|
240
|
+
* never scrolls stands still.
|
|
241
|
+
*
|
|
242
|
+
* A browser with no scroll timeline, and a reader who asked for less motion, get the photograph
|
|
243
|
+
* still and centred, as with `parallax` off.
|
|
244
|
+
*/
|
|
245
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-parallax="true"]:is([data-variant="split"], [data-variant="cover"]) .dds-imagebanner__media img {
|
|
246
|
+
block-size: calc(100% + var(--motion-distance-drift));
|
|
247
|
+
margin-block-start: calc(var(--motion-distance-drift) / -2);
|
|
248
|
+
object-position: center top;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@keyframes dds-imagebanner-drift {
|
|
252
|
+
from {
|
|
253
|
+
translate: 0 calc(var(--motion-distance-drift) / -2);
|
|
254
|
+
}
|
|
255
|
+
to {
|
|
256
|
+
translate: 0 calc(var(--motion-distance-drift) / 2);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@supports (animation-timeline: view()) {
|
|
261
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner .dds-imagebanner__media {
|
|
262
|
+
view-timeline: --dds-imagebanner-frame block;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Only for a reader who has not asked for less motion — asked here, around the rule, rather than
|
|
266
|
+
undone after it: the drift's selector outweighs any plain reset, and a reset that loses to it
|
|
267
|
+
leaves the photograph moving for exactly the reader who asked it not to. */
|
|
268
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
269
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-parallax="true"]:is([data-variant="split"], [data-variant="cover"]) .dds-imagebanner__media img {
|
|
270
|
+
animation: dds-imagebanner-drift linear both;
|
|
271
|
+
animation-range: cover;
|
|
272
|
+
animation-timeline: --dds-imagebanner-frame;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@media (prefers-reduced-motion: reduce) {
|
|
278
|
+
:where([data-dds-context="marketing"]) .dds-imagebanner[data-parallax="true"]:is([data-variant="split"], [data-variant="cover"]) .dds-imagebanner__media img {
|
|
279
|
+
animation: none;
|
|
280
|
+
}
|
|
281
|
+
}
|