@deriv-com/dds-marketing 1.1.2 → 1.2.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/accordion.md +10 -0
- package/.llm/components/accordionitem.md +10 -0
- package/.llm/components/aspectratio.md +10 -0
- package/.llm/components/awards.md +10 -0
- package/.llm/components/background.md +52 -9
- package/.llm/components/badge.md +13 -3
- package/.llm/components/bottomsheet.md +13 -3
- package/.llm/components/breadcrumb.md +10 -0
- package/.llm/components/breadcrumbitem.md +10 -0
- package/.llm/components/button.md +13 -3
- package/.llm/components/buttonicon.md +17 -7
- package/.llm/components/card.md +11 -1
- package/.llm/components/cardbody.md +12 -2
- package/.llm/components/cardbutton.md +10 -0
- package/.llm/components/checkbox.md +7 -1
- package/.llm/components/comparisoncards.md +13 -3
- package/.llm/components/comparisontable.md +10 -0
- package/.llm/components/ctabanner.md +10 -0
- package/.llm/components/ctabannerslider.md +10 -0
- package/.llm/components/datatable.md +10 -0
- package/.llm/components/divider.md +10 -0
- package/.llm/components/documentlink.md +237 -0
- package/.llm/components/documents.md +268 -0
- package/.llm/components/downloadbanner.md +11 -1
- package/.llm/components/dropdownmenu.md +15 -5
- package/.llm/components/estimator.md +342 -0
- package/.llm/components/faqaccordion.md +10 -0
- package/.llm/components/featurebullets.md +10 -0
- package/.llm/components/featurecards.md +47 -3
- package/.llm/components/featurecardscarousel.md +11 -1
- package/.llm/components/featurescroll.md +10 -0
- package/.llm/components/featuresplit.md +10 -0
- package/.llm/components/featurestack.md +10 -0
- package/.llm/components/featuretabs.md +369 -0
- package/.llm/components/filterchip.md +11 -1
- package/.llm/components/footer.md +10 -0
- package/.llm/components/footergroup.md +10 -0
- package/.llm/components/grid.md +34 -1
- package/.llm/components/icon.md +15 -5
- package/.llm/components/illustrationcard.md +56 -2
- package/.llm/components/illustrationcheck.md +193 -0
- package/.llm/components/illustrationchoice.md +187 -0
- package/.llm/components/illustrationcode.md +192 -0
- package/.llm/components/illustrationlist.md +175 -0
- package/.llm/components/illustrationscene.md +33 -3
- package/.llm/components/imagebanner.md +35 -6
- package/.llm/components/landinghero.md +10 -0
- package/.llm/components/link.md +12 -2
- package/.llm/components/logocolumns.md +11 -1
- package/.llm/components/logorows.md +46 -2
- package/.llm/components/menuitem.md +12 -2
- package/.llm/components/navbar.md +11 -1
- package/.llm/components/navbaritem.md +10 -0
- package/.llm/components/navbarmenu.md +10 -0
- package/.llm/components/navbarmenugroup.md +10 -0
- package/.llm/components/navbarpanel.md +10 -0
- package/.llm/components/navbarswitcher.md +16 -6
- package/.llm/components/navbarswitcheroption.md +10 -0
- package/.llm/components/option.md +11 -1
- package/.llm/components/pageheader.md +10 -0
- package/.llm/components/pagination.md +10 -0
- package/.llm/components/paginationdots.md +10 -0
- package/.llm/components/producthero.md +33 -4
- package/.llm/components/progressbar.md +305 -0
- package/.llm/components/removablechip.md +11 -1
- package/.llm/components/resourcebanner.md +10 -0
- package/.llm/components/row.md +10 -0
- package/.llm/components/scenescroll.md +42 -24
- package/.llm/components/scenescrollword.md +267 -0
- package/.llm/components/scroller.md +10 -0
- package/.llm/components/searchinput.md +10 -0
- package/.llm/components/segmentedcontrol.md +33 -2
- package/.llm/components/segmentedcontrolitem.md +12 -2
- package/.llm/components/select.md +10 -0
- package/.llm/components/selectchip.md +10 -0
- package/.llm/components/spinner.md +10 -0
- package/.llm/components/stack.md +10 -0
- package/.llm/components/stats.md +50 -1
- package/.llm/components/statscarousel.md +227 -0
- package/.llm/components/statusdot.md +45 -1
- package/.llm/components/steps.md +10 -0
- package/.llm/components/stickycards.md +10 -0
- package/.llm/components/subdomainnavbar.md +11 -1
- package/.llm/components/tab.md +12 -2
- package/.llm/components/table.md +10 -0
- package/.llm/components/tablebody.md +10 -0
- package/.llm/components/tablecell.md +10 -0
- package/.llm/components/tablehead.md +10 -0
- package/.llm/components/tableheadercell.md +10 -0
- package/.llm/components/tablerow.md +10 -0
- package/.llm/components/tablist.md +10 -0
- package/.llm/components/teamgrid.md +10 -0
- package/.llm/components/testimonialrow.md +47 -3
- package/.llm/components/testimonialslider.md +12 -2
- package/.llm/components/textarea.md +10 -0
- package/.llm/components/textinput.md +11 -1
- package/.llm/components/textscroll.md +10 -0
- package/.llm/components/tiers.md +17 -7
- package/.llm/components/tooltip.md +6 -0
- package/.llm/components/typography.md +67 -1
- package/.llm/digest/accordion.md +1 -1
- package/.llm/digest/accordionitem.md +1 -1
- package/.llm/digest/aspectratio.md +1 -1
- package/.llm/digest/awards.md +1 -1
- package/.llm/digest/background.md +14 -6
- package/.llm/digest/badge.md +1 -1
- package/.llm/digest/bottomsheet.md +1 -1
- package/.llm/digest/breadcrumb.md +1 -1
- package/.llm/digest/breadcrumbitem.md +1 -1
- package/.llm/digest/button.md +2 -2
- package/.llm/digest/buttonicon.md +2 -2
- package/.llm/digest/card.md +1 -1
- package/.llm/digest/cardbody.md +1 -1
- package/.llm/digest/cardbutton.md +1 -1
- package/.llm/digest/checkbox.md +1 -1
- package/.llm/digest/comparisoncards.md +1 -1
- package/.llm/digest/comparisontable.md +1 -1
- package/.llm/digest/ctabanner.md +1 -1
- package/.llm/digest/ctabannerslider.md +1 -1
- package/.llm/digest/datatable.md +1 -1
- package/.llm/digest/divider.md +1 -1
- package/.llm/digest/documentlink.md +52 -0
- package/.llm/digest/documents.md +51 -0
- package/.llm/digest/downloadbanner.md +2 -2
- package/.llm/digest/dropdownmenu.md +1 -1
- package/.llm/digest/estimator.md +66 -0
- package/.llm/digest/faqaccordion.md +1 -1
- package/.llm/digest/featurebullets.md +1 -1
- package/.llm/digest/featurecards.md +8 -1
- package/.llm/digest/featurecardscarousel.md +1 -1
- package/.llm/digest/featurescroll.md +1 -1
- package/.llm/digest/featuresplit.md +1 -1
- package/.llm/digest/featurestack.md +1 -1
- package/.llm/digest/featuretabs.md +50 -0
- package/.llm/digest/filterchip.md +1 -1
- package/.llm/digest/footer.md +1 -1
- package/.llm/digest/footergroup.md +1 -1
- package/.llm/digest/grid.md +2 -1
- package/.llm/digest/icon.md +1 -1
- package/.llm/digest/illustrationcard.md +7 -2
- package/.llm/digest/illustrationcheck.md +42 -0
- package/.llm/digest/illustrationchoice.md +43 -0
- package/.llm/digest/illustrationcode.md +41 -0
- package/.llm/digest/illustrationlist.md +38 -0
- package/.llm/digest/illustrationscene.md +5 -3
- package/.llm/digest/imagebanner.md +11 -5
- package/.llm/digest/landinghero.md +1 -1
- package/.llm/digest/link.md +1 -1
- package/.llm/digest/logocolumns.md +2 -2
- package/.llm/digest/logorows.md +9 -2
- package/.llm/digest/menuitem.md +1 -1
- package/.llm/digest/navbar.md +1 -1
- package/.llm/digest/navbaritem.md +1 -1
- package/.llm/digest/navbarmenu.md +1 -1
- package/.llm/digest/navbarmenugroup.md +1 -1
- package/.llm/digest/navbarpanel.md +1 -1
- package/.llm/digest/navbarswitcher.md +1 -1
- package/.llm/digest/navbarswitcheroption.md +1 -1
- package/.llm/digest/option.md +1 -1
- package/.llm/digest/pageheader.md +1 -1
- package/.llm/digest/pagination.md +1 -1
- package/.llm/digest/paginationdots.md +1 -1
- package/.llm/digest/producthero.md +9 -3
- package/.llm/digest/progressbar.md +56 -0
- package/.llm/digest/removablechip.md +1 -1
- package/.llm/digest/resourcebanner.md +1 -1
- package/.llm/digest/row.md +1 -1
- package/.llm/digest/scenescroll.md +7 -6
- package/.llm/digest/scenescrollword.md +56 -0
- package/.llm/digest/scroller.md +1 -1
- package/.llm/digest/searchinput.md +1 -1
- package/.llm/digest/segmentedcontrol.md +4 -1
- package/.llm/digest/segmentedcontrolitem.md +2 -2
- package/.llm/digest/select.md +1 -1
- package/.llm/digest/selectchip.md +1 -1
- package/.llm/digest/spinner.md +1 -1
- package/.llm/digest/stack.md +1 -1
- package/.llm/digest/stats.md +9 -1
- package/.llm/digest/statscarousel.md +48 -0
- package/.llm/digest/statusdot.md +8 -1
- package/.llm/digest/steps.md +1 -1
- package/.llm/digest/stickycards.md +1 -1
- package/.llm/digest/subdomainnavbar.md +1 -1
- package/.llm/digest/tab.md +1 -1
- package/.llm/digest/table.md +1 -1
- package/.llm/digest/tablebody.md +1 -1
- package/.llm/digest/tablecell.md +1 -1
- package/.llm/digest/tablehead.md +1 -1
- package/.llm/digest/tableheadercell.md +1 -1
- package/.llm/digest/tablerow.md +1 -1
- package/.llm/digest/tablist.md +1 -1
- package/.llm/digest/teamgrid.md +1 -1
- package/.llm/digest/testimonialrow.md +9 -2
- package/.llm/digest/testimonialslider.md +2 -2
- package/.llm/digest/textarea.md +1 -1
- package/.llm/digest/textinput.md +1 -1
- package/.llm/digest/textscroll.md +1 -1
- package/.llm/digest/tiers.md +1 -1
- package/.llm/digest/typography.md +19 -1
- package/.llm/index.md +15 -4
- package/.llm/rules.md +10 -0
- package/.llm/tokens.md +13 -3
- package/AGENTS.md +14 -2
- package/README.md +28 -3
- package/dist/components/arrival.d.ts +32 -0
- package/dist/components/arrival.js +140 -0
- package/dist/components/arrives.d.ts +17 -0
- package/dist/components/arrives.js +14 -0
- package/dist/components/blocks/awards/Awards.js +2 -27
- package/dist/components/blocks/block-pattern.css +23 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -12
- package/dist/components/blocks/documents/Documents.css +90 -0
- package/dist/components/blocks/documents/Documents.d.ts +22 -0
- package/dist/components/blocks/documents/Documents.js +30 -0
- package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
- package/dist/components/blocks/documents/Documents.types.js +14 -0
- package/dist/components/blocks/documents/documents-impl.css +103 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
- package/dist/components/blocks/estimator/Estimator.css +206 -0
- package/dist/components/blocks/estimator/Estimator.d.ts +27 -0
- package/dist/components/blocks/estimator/Estimator.js +61 -0
- package/dist/components/blocks/estimator/Estimator.types.d.ts +63 -0
- package/dist/components/blocks/estimator/Estimator.types.js +25 -0
- package/dist/components/blocks/estimator/estimator-impl.css +159 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
- package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +2 -1
- package/dist/components/blocks/image-banner/ImageBanner.js +3 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +10 -8
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +78 -71
- package/dist/components/blocks/laurel.d.ts +16 -0
- package/dist/components/blocks/laurel.js +28 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
- package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
- package/dist/components/blocks/pattern-tone.d.ts +11 -0
- package/dist/components/blocks/pattern-tone.js +7 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +2 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +8 -3
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -1
- package/dist/components/blocks/product-hero/product-hero-impl.css +54 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +6 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.js +8 -7
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +61 -44
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
- package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
- package/dist/components/blocks/stats/Stats.d.ts +2 -1
- package/dist/components/blocks/stats/Stats.js +17 -14
- package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
- package/dist/components/blocks/stats/stats-impl.css +4 -1
- package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
- package/dist/components/blocks/stats/use-wheel.js +8 -4
- package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
- package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
- package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
- package/dist/components/core/background/Background.css +19 -0
- package/dist/components/core/background/Background.types.d.ts +2 -1
- package/dist/components/core/background/background-impl.css +47 -15
- package/dist/components/core/background/halftone.js +1 -1
- package/dist/components/core/button/Button.css +5 -5
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.css +5 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
- package/dist/components/core/document-link/DocumentLink.css +59 -0
- package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
- package/dist/components/core/document-link/DocumentLink.js +21 -0
- package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
- package/dist/components/core/document-link/DocumentLink.types.js +11 -0
- package/dist/components/core/document-link/document-link-impl.css +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
- package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +113 -0
- package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
- package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
- package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
- package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
- package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
- package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
- package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
- package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
- package/dist/components/core/illustration-list/IllustrationList.css +19 -0
- package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
- package/dist/components/core/illustration-list/IllustrationList.js +18 -0
- package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
- package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
- package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
- package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
- package/dist/components/core/link/link-impl.css +5 -19
- package/dist/components/core/progress-bar/ProgressBar.css +101 -0
- package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
- package/dist/components/core/progress-bar/ProgressBar.js +34 -0
- package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
- package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
- package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
- package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +1 -1
- package/dist/components/core/select/Select.css +2 -0
- package/dist/components/core/select/select-impl.css +58 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
- package/dist/components/core/status-dot/StatusDot.js +7 -4
- package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
- package/dist/components/core/status-dot/status-dot-impl.css +101 -0
- package/dist/components/core/text-area/TextArea.css +2 -0
- package/dist/components/core/text-area/text-area-impl.css +54 -0
- package/dist/components/core/text-input/TextInput.css +2 -0
- package/dist/components/core/text-input/text-input-impl.css +63 -0
- package/dist/components/core/typography/Typography.d.ts +3 -283
- package/dist/components/core/typography/Typography.js +9 -1
- package/dist/components/core/typography/Typography.types.d.ts +9 -15
- package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
- package/dist/components/core/typography/TypographyMotion.js +43 -0
- package/dist/components/core/typography/typography-impl.css +106 -0
- package/dist/components/estimator-data.d.ts +29 -0
- package/dist/components/estimator-data.js +12 -0
- package/dist/components/illustration-data.d.ts +15 -0
- package/dist/components/illustration-data.js +7 -0
- package/dist/components/index.d.ts +25 -1
- package/dist/components/index.js +22 -0
- package/dist/components/layout/grid/Grid.css +5 -0
- package/dist/components/layout/grid/Grid.types.d.ts +2 -1
- package/dist/components/scene-scroll-data.d.ts +35 -0
- package/dist/components/tiers-data.d.ts +3 -2
- package/dist/icons/accounts.d.ts +1 -0
- package/dist/icons/accounts.js +1 -0
- package/dist/icons/app-stores.d.ts +1 -0
- package/dist/icons/app-stores.js +1 -0
- package/dist/icons/currency.d.ts +1 -0
- package/dist/icons/currency.js +1 -0
- package/dist/icons/flag.d.ts +1 -0
- package/dist/icons/flag.js +1 -0
- package/dist/icons/illustrative.d.ts +1 -0
- package/dist/icons/illustrative.js +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/markets.d.ts +1 -0
- package/dist/icons/markets.js +1 -0
- package/dist/icons/social.d.ts +1 -0
- package/dist/icons/social.js +1 -0
- package/dist/icons/system.d.ts +1 -0
- package/dist/icons/system.js +1 -0
- package/dist/icons/trade.d.ts +1 -0
- package/dist/icons/trade.js +1 -0
- package/dist/marketing.css +26 -6
- package/package.json +44 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<!-- GENERATED from illustration-code.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# IllustrationCode
|
|
4
|
+
|
|
5
|
+
A drawn row of code boxes, filled or not, for a picture of the product asking for a code.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
The boxes a verification code is typed into, drawn as a picture of the product: a row of equal boxes, each filled with a dot or waiting. It is never a field; a page that asks for a code uses one.
|
|
10
|
+
|
|
11
|
+
It can fill once on arrival — the boxes fill one after another — so a pane shows the code going in rather than a code already entered. At rest, and for a reader who asked for less movement, the boxes are simply as filled as `filled` says.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A pane, or any picture of the product, showing a verification step — confirming it is you, two-step sign-in
|
|
16
|
+
- The code going in is the point of the picture, played once with `motion="fill"`
|
|
17
|
+
|
|
18
|
+
## Do not use
|
|
19
|
+
|
|
20
|
+
- The reader types a code on this page → `TextInput`
|
|
21
|
+
- A real code entry. Nothing in it can be focused or typed into, and it holds no digits — only dots, because a picture should never show a code
|
|
22
|
+
- More than one moving thing in a pane. One lead motion per pane
|
|
23
|
+
|
|
24
|
+
## Anatomy
|
|
25
|
+
|
|
26
|
+
IllustrationCode renders 2 elements. A token binding names the part it applies to.
|
|
27
|
+
|
|
28
|
+
- `root` — `<div>`, class `dds-illustrationcode`. The row of boxes, `length` of them in equal columns a space.gap.sm apart. Decoration to assistive technology unless `label` names it as an image. Under `motion="fill"` it moves once on arrival (`data-arrival`).
|
|
29
|
+
- `box` — `<span>`, class `dds-illustrationcode__box`. One box, an outline of border.width.emphasis at radius.control.sm, in color.border.strong while empty and in the text's ink once filled with its dot, at font.label.md. Filling, each box takes its dot and its ink a step of motion.duration.stagger after the one before.
|
|
30
|
+
|
|
31
|
+
Apply these classes from the generated `illustrationCodeParts` constant rather than writing the strings by hand.
|
|
32
|
+
|
|
33
|
+
## Composition
|
|
34
|
+
|
|
35
|
+
- Takes no children. Everything it renders comes from props
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
### length — `number` (default `6`)
|
|
40
|
+
|
|
41
|
+
Use when: How many boxes: six, the default, for the usual verification code; four for a short one
|
|
42
|
+
Never for: A code longer than eight. A row of more boxes than that is too narrow to read as boxes
|
|
43
|
+
|
|
44
|
+
### filled — `number`
|
|
45
|
+
|
|
46
|
+
Use when: How many boxes are filled, from the start. Left out, all of them — a code entered
|
|
47
|
+
Never for: Showing a code half typed with `motion="fill"`. The motion fills the boxes it is given; a picture of a code mid-entry is still, with no motion
|
|
48
|
+
|
|
49
|
+
### motion — `fill`
|
|
50
|
+
|
|
51
|
+
- `fill` — The boxes fill one after another, a step of motion.duration.stagger apart
|
|
52
|
+
|
|
53
|
+
Use when: The row moves once, on arrival — in an IllustrationCard when the pane has landed, otherwise when it is well into view. At rest, and for a reader who asked for less movement, the boxes are as filled as `filled` says
|
|
54
|
+
Never for: A row beside another moving part in the same pane. One lead motion per pane
|
|
55
|
+
|
|
56
|
+
### label — `string`
|
|
57
|
+
|
|
58
|
+
Use when: Where the picture stands on its own — "A verification code, entered". It names the row as one image
|
|
59
|
+
Never for: A row inside an IllustrationCard, which is one image named by its own label
|
|
60
|
+
|
|
61
|
+
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
62
|
+
|
|
63
|
+
## Accessibility
|
|
64
|
+
|
|
65
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
66
|
+
|
|
67
|
+
- it is never a field: nothing in it can be focused or typed into. Decoration unless `label` names it as one image, and its motion is never announced
|
|
68
|
+
|
|
69
|
+
## Rules
|
|
70
|
+
|
|
71
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
72
|
+
|
|
73
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
74
|
+
|
|
75
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
76
|
+
|
|
77
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
78
|
+
|
|
79
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
80
|
+
|
|
81
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
82
|
+
Guidance only — cannot be checked automatically.
|
|
83
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
84
|
+
Guidance only — cannot be checked automatically.
|
|
85
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
86
|
+
|
|
87
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
88
|
+
|
|
89
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
90
|
+
Guidance only — cannot be checked automatically.
|
|
91
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
92
|
+
|
|
93
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
94
|
+
|
|
95
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
96
|
+
Guidance only — cannot be checked automatically.
|
|
97
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
98
|
+
|
|
99
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
100
|
+
|
|
101
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
102
|
+
|
|
103
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
104
|
+
|
|
105
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
106
|
+
|
|
107
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
108
|
+
|
|
109
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
110
|
+
|
|
111
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
112
|
+
|
|
113
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
114
|
+
Guidance only — cannot be checked automatically.
|
|
115
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
116
|
+
|
|
117
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
118
|
+
|
|
119
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
120
|
+
|
|
121
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
122
|
+
|
|
123
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
124
|
+
|
|
125
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
126
|
+
|
|
127
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
128
|
+
|
|
129
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
130
|
+
|
|
131
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
132
|
+
Guidance only — cannot be checked automatically.
|
|
133
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
134
|
+
|
|
135
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
136
|
+
|
|
137
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
138
|
+
|
|
139
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
140
|
+
Guidance only — cannot be checked automatically.
|
|
141
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
142
|
+
|
|
143
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
144
|
+
|
|
145
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
146
|
+
|
|
147
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
148
|
+
Guidance only — cannot be checked automatically.
|
|
149
|
+
|
|
150
|
+
## Anti-examples
|
|
151
|
+
|
|
152
|
+
❌ IllustrationCode for: The reader types a code on this page
|
|
153
|
+
A real code is entered into a field a reader can focus; this is a picture of one and takes no input
|
|
154
|
+
→ use `TextInput` instead.
|
|
155
|
+
|
|
156
|
+
## Example
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
import { IllustrationCode } from '@deriv-com/dds-marketing'
|
|
160
|
+
|
|
161
|
+
<IllustrationCode length={6} />
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## In use
|
|
165
|
+
|
|
166
|
+
### How full
|
|
167
|
+
|
|
168
|
+
All the boxes filled — a code entered — or the first few, as a still picture of one going in.
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
import { IllustrationCode } from '@deriv-com/dds-marketing'
|
|
172
|
+
|
|
173
|
+
// six, all filled
|
|
174
|
+
<IllustrationCode length={6} />
|
|
175
|
+
|
|
176
|
+
// six, three filled
|
|
177
|
+
<IllustrationCode length={6} filled={3} />
|
|
178
|
+
|
|
179
|
+
// four, all filled
|
|
180
|
+
<IllustrationCode length={4} />
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Filling once on arrival
|
|
184
|
+
|
|
185
|
+
The boxes fill one after another.
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
import { IllustrationCode } from '@deriv-com/dds-marketing'
|
|
189
|
+
|
|
190
|
+
// motion="fill"
|
|
191
|
+
<IllustrationCode length={6} motion="fill" />
|
|
192
|
+
```
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<!-- GENERATED from illustration-list.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# IllustrationList
|
|
4
|
+
|
|
5
|
+
A drawn list of rows — a glyph and a name each — for a picture of the product listing things.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
Rows down a column, ruled apart by a hairline: the markets a platform offers, the steps an account has, drawn the way the product lists them. Each child is one row, usually an Icon beside a Typography.
|
|
10
|
+
|
|
11
|
+
It can arrive once: the rows come in one after another and each glyph pops in as its row lands, so a pane shows the list filling rather than a list already there. At rest, and for a reader who asked for less movement, it is simply the list.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A pane, or any picture of the product, listing a few things — the forex pairs on a platform, the documents a check needs
|
|
16
|
+
- The list arriving is the point of the picture, played once with `motion="arrive"`
|
|
17
|
+
|
|
18
|
+
## Do not use
|
|
19
|
+
|
|
20
|
+
- A list of benefits or features the page itself is making → `FeatureBullets`
|
|
21
|
+
- A data table the reader compares across → `Table`
|
|
22
|
+
- More than five or six rows. A picture of a long list reads as a list to scroll, and its arrival as a page loading
|
|
23
|
+
- Rows a reader acts on. Nothing in it can be pressed
|
|
24
|
+
- More than one moving thing in a pane. One lead motion per pane
|
|
25
|
+
|
|
26
|
+
## Anatomy
|
|
27
|
+
|
|
28
|
+
IllustrationList renders 2 elements. A token binding names the part it applies to.
|
|
29
|
+
|
|
30
|
+
- `root` — `<div>`, class `dds-illustrationlist`. The column of rows. Under `motion="arrive"` it moves once on arrival (`data-arrival`): the rows come in a step of motion.duration.stagger apart over motion.duration.reveal, and any glyph in a row pops as it lands.
|
|
31
|
+
- `row` — `<div>`, class `dds-illustrationlist__row`. One row, holding one child: padded by space.inset.xs top and bottom, and ruled from the row above by a hairline of color.border.subtle, which the first row does not carry.
|
|
32
|
+
|
|
33
|
+
Apply these classes from the generated `illustrationListParts` constant rather than writing the strings by hand.
|
|
34
|
+
|
|
35
|
+
## Composition
|
|
36
|
+
|
|
37
|
+
- Can contain: any content
|
|
38
|
+
- Never contains: `IllustrationList`, `IllustrationCard` — in children or in any prop that takes a node
|
|
39
|
+
|
|
40
|
+
## Props
|
|
41
|
+
|
|
42
|
+
### motion — `arrive`
|
|
43
|
+
|
|
44
|
+
- `arrive` — The rows come in one after another, and each glyph pops in as its row lands
|
|
45
|
+
|
|
46
|
+
Use when: The list moves once, on arrival — in an IllustrationCard when the pane has landed, otherwise when it is well into view. At rest, and for a reader who asked for less movement, the list is simply there
|
|
47
|
+
Never for: A list beside another moving part in the same pane. One lead motion per pane
|
|
48
|
+
|
|
49
|
+
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
50
|
+
|
|
51
|
+
## Accessibility
|
|
52
|
+
|
|
53
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
54
|
+
|
|
55
|
+
- its rows are read as plain content, in order; its motion is never announced
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
60
|
+
|
|
61
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
62
|
+
|
|
63
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
64
|
+
|
|
65
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
66
|
+
|
|
67
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
68
|
+
|
|
69
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
70
|
+
Guidance only — cannot be checked automatically.
|
|
71
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
72
|
+
Guidance only — cannot be checked automatically.
|
|
73
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
74
|
+
|
|
75
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
76
|
+
|
|
77
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
78
|
+
Guidance only — cannot be checked automatically.
|
|
79
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
80
|
+
|
|
81
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
82
|
+
|
|
83
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
84
|
+
Guidance only — cannot be checked automatically.
|
|
85
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
86
|
+
|
|
87
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
88
|
+
|
|
89
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
90
|
+
|
|
91
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
92
|
+
|
|
93
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
94
|
+
|
|
95
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
96
|
+
|
|
97
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
98
|
+
|
|
99
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
100
|
+
|
|
101
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
102
|
+
Guidance only — cannot be checked automatically.
|
|
103
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
104
|
+
|
|
105
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
106
|
+
|
|
107
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
108
|
+
|
|
109
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
110
|
+
|
|
111
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
112
|
+
|
|
113
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
114
|
+
|
|
115
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
116
|
+
|
|
117
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
118
|
+
|
|
119
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
120
|
+
Guidance only — cannot be checked automatically.
|
|
121
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
122
|
+
|
|
123
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
124
|
+
|
|
125
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
126
|
+
|
|
127
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
128
|
+
Guidance only — cannot be checked automatically.
|
|
129
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
130
|
+
|
|
131
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
132
|
+
|
|
133
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
134
|
+
|
|
135
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
136
|
+
Guidance only — cannot be checked automatically.
|
|
137
|
+
|
|
138
|
+
## Anti-examples
|
|
139
|
+
|
|
140
|
+
❌ IllustrationList for: A list of benefits or features the page itself is making
|
|
141
|
+
Words the page says to the reader are a section's list; this is a picture of a list inside the product
|
|
142
|
+
→ use `FeatureBullets` instead.
|
|
143
|
+
|
|
144
|
+
❌ IllustrationList for: A data table the reader compares across
|
|
145
|
+
Rows compared column by column are a table; these are a few names in a picture
|
|
146
|
+
→ use `Table` instead.
|
|
147
|
+
|
|
148
|
+
## Example
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { IllustrationList, Typography } from '@deriv-com/dds-marketing'
|
|
152
|
+
|
|
153
|
+
<IllustrationList>
|
|
154
|
+
<Typography variant="body-md">EUR/USD</Typography>
|
|
155
|
+
<Typography variant="body-md">GBP/USD</Typography>
|
|
156
|
+
<Typography variant="body-md">USD/JPY</Typography>
|
|
157
|
+
</IllustrationList>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## In use
|
|
161
|
+
|
|
162
|
+
### Arriving once
|
|
163
|
+
|
|
164
|
+
The rows come in one after another; a glyph in a row pops in as its row lands.
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import { IllustrationList, Typography } from '@deriv-com/dds-marketing'
|
|
168
|
+
|
|
169
|
+
// motion="arrive"
|
|
170
|
+
<IllustrationList motion="arrive">
|
|
171
|
+
<Typography variant="body-md">EUR/USD</Typography>
|
|
172
|
+
<Typography variant="body-md">GBP/USD</Typography>
|
|
173
|
+
<Typography variant="body-md">USD/JPY</Typography>
|
|
174
|
+
</IllustrationList>
|
|
175
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# IllustrationScene
|
|
4
4
|
|
|
5
|
+
A photograph with an IllustrationCard laid over it.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A photograph with an IllustrationCard laid over it — the product shown in the hands of the people who use it: a trade ticket over a trader on the move, a balance over someone at a desk. The scene owns how the two meet, so every such picture across a site is composed the same way: the photograph fills one of three shapes, and the glass card sits over it at a fixed share of the frame, centred or towards one edge.
|
|
6
10
|
|
|
7
11
|
The photograph is the scene and the card is what it says. The card's `label` describes the whole picture to assistive technology; the photograph is decoration unless `alt` says otherwise.
|
|
@@ -21,10 +25,11 @@ The photograph is the scene and the card is what it says. The card's `label` des
|
|
|
21
25
|
|
|
22
26
|
## Anatomy
|
|
23
27
|
|
|
24
|
-
IllustrationScene renders
|
|
28
|
+
IllustrationScene renders 3 elements. A token binding names the part it applies to.
|
|
25
29
|
|
|
26
|
-
- `root` — `<div>`, class `dds-illustrationscene`. The frame, and the shape: one of three proportions — the aspect tokens, the same three IllustrationCard takes — holding radius.surface like a Card and clipping the photograph to it. It places the card it holds over the photograph, at a share of its width that depends on the shape, so every scene across a site composes the same way.
|
|
30
|
+
- `root` — `<div>`, class `dds-illustrationscene`. The frame, and the shape: one of three proportions — the aspect tokens, the same three IllustrationCard takes — holding radius.surface like a Card and clipping the photograph to it. It places the card it holds over the photograph, at a share of its width that depends on the shape, so every scene across a site composes the same way. At the foot the card is a strip at most two fifths of the frame tall, and the UI in it is scaled down to fit that, as a centred card's already is — so a narrow column never has the card bury its photograph or run off the top of it. Inside a block's arrival the scene arrives in two beats: the photograph with whatever holds it, the card three steps of motion.duration.stagger later, rising onto it.
|
|
27
31
|
- `image` — `<img>`, class `dds-illustrationscene__image`. The photograph, filling the frame and cropped to it from the centre. Decoration unless `alt` says otherwise: the card's `label` already describes the whole picture, so most scenes leave the photograph out of the accessibility tree. While it loads, the frame shows color.bg.surface, so the card is never left floating on nothing.
|
|
32
|
+
- `shade` — `<div>`, class `dds-illustrationscene__shade`. Under `shade`, a shade of color.bg.overlay between the photograph and the card, under the card only: up from the foot to just above a card at the foot and clear above it, or an oval behind a centred card and clear at the frame's edges. It is there for the card's small type, which on the glass over a bright photograph comes out below 4.5:1; the shade darkens what the glass blurs rather than the whole photograph. Decoration, with nothing in it. Rendered only when `shade` is set.
|
|
28
33
|
|
|
29
34
|
Apply these classes from the generated `illustrationSceneParts` constant rather than writing the strings by hand.
|
|
30
35
|
|
|
@@ -51,7 +56,7 @@ Never for: Fitting a particular photograph. The shape is a decision about the la
|
|
|
51
56
|
- `bottom` — The card centred along the foot of the frame, held off it by the card's own inset — for a photograph whose subject fills the top: a face, a person reaching up, a skyline
|
|
52
57
|
|
|
53
58
|
Use when: Where the card sits over the photograph, so the subject of the photograph stays clear of it
|
|
54
|
-
Never for: Anything but keeping the photograph's subject clear. The card's
|
|
59
|
+
Never for: Anything but keeping the photograph's subject clear. The card's width is fixed by the shape; placement moves it, and at the foot holds it to at most two fifths of the frame's height
|
|
55
60
|
|
|
56
61
|
### src — `string` **Required.**
|
|
57
62
|
|
|
@@ -63,6 +68,11 @@ Never for: A data URI holding a photograph. A scene's photograph is the heaviest
|
|
|
63
68
|
Use when: Empty by default, because the card's `label` describes the whole picture and the photograph is decoration. Write one only where the photograph says something the label does not
|
|
64
69
|
Never for: Repeating the card's label. A screen reader would hear the picture described twice
|
|
65
70
|
|
|
71
|
+
### shade — `boolean` (default `false`)
|
|
72
|
+
|
|
73
|
+
Use when: The photograph is bright where the card sits — a sunny sky, a white wall — so the glass would come out mid-grey and the card's small lines would fall below AA. A shade under the card only, following the card's placement, so the rest of the photograph keeps its light.
|
|
74
|
+
Never for: A photograph already dark where the card sits, or darkening the whole photograph. The shade is for the card's type, and on a dark photograph it only takes light out of the scene.
|
|
75
|
+
|
|
66
76
|
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
67
77
|
|
|
68
78
|
## Accessibility
|
|
@@ -88,6 +98,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
88
98
|
Guidance only — cannot be checked automatically.
|
|
89
99
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
90
100
|
Guidance only — cannot be checked automatically.
|
|
101
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
102
|
+
|
|
103
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
104
|
+
|
|
105
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
106
|
+
Guidance only — cannot be checked automatically.
|
|
91
107
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
92
108
|
|
|
93
109
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
@@ -227,3 +243,17 @@ import { IllustrationScene } from '@deriv-com/dds-marketing'
|
|
|
227
243
|
// bottom
|
|
228
244
|
<IllustrationScene ratio="square" src="/sample-card-image.svg" placement="bottom">{illustrationcards}</IllustrationScene>
|
|
229
245
|
```
|
|
246
|
+
|
|
247
|
+
### A shade for a bright photograph
|
|
248
|
+
|
|
249
|
+
shade darkens under the card only, so its small type keeps AA over a bright photograph and the rest keeps its light.
|
|
250
|
+
|
|
251
|
+
```tsx
|
|
252
|
+
import { IllustrationScene } from '@deriv-com/dds-marketing'
|
|
253
|
+
|
|
254
|
+
// bottom, shade
|
|
255
|
+
<IllustrationScene ratio="square" src="/sample-banner-art.svg" placement="bottom" shade>{illustrationcards}</IllustrationScene>
|
|
256
|
+
|
|
257
|
+
// center, shade
|
|
258
|
+
<IllustrationScene ratio="square" src="/sample-banner-art.svg" placement="center" shade>{illustrationcards}</IllustrationScene>
|
|
259
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# ImageBanner
|
|
4
4
|
|
|
5
|
+
A dark card pairing a headline and one action with a photograph.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A dark card in the middle of a page, pairing a headline and a line under it with a photograph — beside it or behind it, with one action.
|
|
6
10
|
|
|
7
11
|
The reference site's ImageBanner, and a break rather than an opening: a dark, editorial moment between lighter sections that asks for one thing. The card is dark on every ground; `ground` paints the band it sits in, the way it does for every block.
|
|
@@ -27,8 +31,8 @@ ImageBanner renders 8 elements. A token binding names the part it applies to.
|
|
|
27
31
|
|
|
28
32
|
- `root` — `<section>`, class `dds-imagebanner`. The section. It paints one of the page's three grounds and the ink that goes with it — see `ground` — and asks its own width, so the card folds on the section's measure rather than the window's. A region named by its headline.
|
|
29
33
|
- `inner` — `<div>`, class `dds-imagebanner__inner`. The measure and the gutter, the same column every band holds its content in. On a phone the card gives up the gutter and runs the width of the screen, as the reference design's does.
|
|
30
|
-
- `card` — `<div>`, class `dds-imagebanner__card`. The dark card holding everything: color.bg.brand-strong, or color.bg.surface-card-strong on the dark band so it is still a card there, with white ink on both. It clips the photograph to its rounded corners. From 48rem the words and the photograph sit side by side, in the order `mediaPosition` names; below it they stack.
|
|
31
|
-
- `content` — `<div>`, class `dds-imagebanner__content`. The headline, the line under it and the action, inset from the card's edge. It sets no gap of its own: the step from a title to its description and the step from a description to what follows are two roles, carried by each part's own margin.
|
|
34
|
+
- `card` — `<div>`, class `dds-imagebanner__card`. The dark card holding everything: color.bg.brand-strong, or color.bg.surface-card-strong-on-brand-strong on the dark band so it is still a card there, with white ink on both. It clips the photograph to its rounded corners. From 48rem the words and the photograph sit side by side, in the order `mediaPosition` names; below it they stack.
|
|
35
|
+
- `content` — `<div>`, class `dds-imagebanner__content`. The headline, the line under it and the action, inset from the card's edge. It sets no gap of its own: the step from a title to its description and the step from a description to what follows are two roles, carried by each part's own margin. On a cover card it lays the shade under its words: color.bg.overlay across the column the words take, fading to clear from the words' end to space.section.default past the column's edge toward the photograph — across from the fold, downward on a phone — and nothing beyond that, so the photograph keeps its light everywhere the words are not.
|
|
32
36
|
- `title` — `<h2>`, class `dds-imagebanner__title`. The headline. `h2` by default because the card sits under the page's own heading; `headingLevel` moves the level and never the size. Drawn at font.h2.
|
|
33
37
|
- `description` — `<p>`, class `dds-imagebanner__description`. The line under the headline, at the body step and the description measure. Rendered only when `description` is set.
|
|
34
38
|
- `action` — `<div>`, class `dds-imagebanner__action`. The one action, under the line. On a phone it fills the width of the card; from 48rem it is its own size. Rendered only when `action` is set.
|
|
@@ -47,7 +51,7 @@ Apply these classes from the generated `imageBannerParts` constant rather than w
|
|
|
47
51
|
|
|
48
52
|
- `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
|
|
49
53
|
- `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
|
|
50
|
-
- `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
|
|
54
|
+
- `strong` — `color.bg.brand-strong`, the dark band, with the card a step lighter at color.bg.surface-card-strong-on-brand-strong so it still reads as a card. For a page whose dark band is already here and wants the card inside it
|
|
51
55
|
|
|
52
56
|
Use when: Which of the page's three grounds the band around the card paints. The card is dark whatever this says — that is what the block is — so this is about the rhythm of the page, white, grey or dark, and never about the card. The ink follows the ground and is not a second decision.
|
|
53
57
|
Never for: Making the card darker. The card is dark on every ground; painting the band dark too spends the page's one dark band on a section that was already one.
|
|
@@ -55,10 +59,10 @@ Never for: Making the card darker. The card is dark on every ground; painting th
|
|
|
55
59
|
### variant — `split` | `cover` (default `split`)
|
|
56
60
|
|
|
57
61
|
- `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
|
|
58
|
-
- `cover` — The photograph fills the whole card, with the words over it
|
|
62
|
+
- `cover` — The photograph fills the whole card, with the words over it on a shade that darkens the words' own column and fades out just past it, leaving the rest of the photograph clear. For a photograph wide enough to be the band rather than half of it
|
|
59
63
|
|
|
60
64
|
Use when: What the photograph does: beside the words, or behind them. Both carry one action — two of the reference design's layouts.
|
|
61
|
-
Never for: Choosing by how busy the page looks. Cover
|
|
65
|
+
Never for: Choosing by how busy the page looks. Cover lays the words on part of the photograph behind a shade; it is a decision about the photograph, not decoration.
|
|
62
66
|
|
|
63
67
|
### mediaPosition — `end` | `start` (default `end`)
|
|
64
68
|
|
|
@@ -100,9 +104,14 @@ Never for: Artwork with words in it. The cover photograph sits under a scrim and
|
|
|
100
104
|
|
|
101
105
|
### parallax — `boolean` (default `true`)
|
|
102
106
|
|
|
103
|
-
Use when: The photograph drifts against the scroll as the card passes through the view,
|
|
107
|
+
Use when: The photograph drifts against the scroll as the card passes through the view, the drift every block's picture shares — drawn at motion.scale.parallax and moved from motion.translate.parallax-from to motion.translate.parallax-to over the whole pass — so it reads as further away than the card — the reference design's ParallaxBanner, which this replaces. On by default, as every block's picture drifts: pass false for a card whose photograph must hold still under its button.
|
|
104
108
|
Never for: Holding still for a reader who asked for less motion — it already holds still for them, and in a browser that cannot drive it from the scroll.
|
|
105
109
|
|
|
110
|
+
### stackOnPhone — `boolean` (default `false`)
|
|
111
|
+
|
|
112
|
+
Use when: A cover photograph whose subject a phone's crop would put under the words or cut off — a person, a face, hands. On a phone the words stand on the card's own dark ground and the photograph follows them at the landscape shape, whole and clear; from the fold it is the cover card as before.
|
|
113
|
+
Never for: A split card, which stacks on a phone already, or a photograph that is setting rather than subject. Stacked, the phone loses the cover look, so keep it for the photograph that would otherwise lose its subject.
|
|
114
|
+
|
|
106
115
|
## Accessibility
|
|
107
116
|
|
|
108
117
|
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
@@ -128,6 +137,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
128
137
|
Guidance only — cannot be checked automatically.
|
|
129
138
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
130
139
|
Guidance only — cannot be checked automatically.
|
|
140
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
141
|
+
|
|
142
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
143
|
+
|
|
144
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
145
|
+
Guidance only — cannot be checked automatically.
|
|
131
146
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
132
147
|
|
|
133
148
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
@@ -205,6 +220,9 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
205
220
|
A list of features is the content there, ruled lines a reader goes down; this card is a photograph and one action
|
|
206
221
|
→ use `FeatureBullets` instead.
|
|
207
222
|
|
|
223
|
+
❌ variant=split + stackOnPhone=true
|
|
224
|
+
A split card already stacks its words and its photograph on a phone; there is nothing for this to change.
|
|
225
|
+
|
|
208
226
|
## Example
|
|
209
227
|
|
|
210
228
|
```tsx
|
|
@@ -276,3 +294,14 @@ import { AspectRatio, ImageBanner, Link } from '@deriv-com/dds-marketing'
|
|
|
276
294
|
// Inside a section that has its h2 — headingLevel h3
|
|
277
295
|
<ImageBanner variant="split" parallax title="Life at Deriv" description="We combine human values with AI precision. Collaboration, integrity and continuous learning guide every project, in every office and every time zone." action={<Link href="/careers/culture" tone="inherit">Culture at Deriv</Link>} media={<AspectRatio ratio="landscape" />} headingLevel="h3" />
|
|
278
296
|
```
|
|
297
|
+
|
|
298
|
+
### Stacked on a phone
|
|
299
|
+
|
|
300
|
+
stackOnPhone: below the fold the words stand on the card and the photograph follows them whole, so a person framed for the desktop strip keeps their head.
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
import { AspectRatio, Button, ImageBanner } from '@deriv-com/dds-marketing'
|
|
304
|
+
|
|
305
|
+
// cover, stackOnPhone
|
|
306
|
+
<ImageBanner variant="cover" title="Trade on Deriv MT5" description="Forex, stocks, commodities and derived indices on the platform professionals use, with charting and order types built in." action={<Button variant="primary" tone="inverse" href="/platforms/deriv-mt5">Open a Deriv MT5 account</Button>} media={<AspectRatio ratio="landscape" />} stackOnPhone />
|
|
307
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# LandingHero
|
|
4
4
|
|
|
5
|
+
Opens a main landing page with its headline over a dark background.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The band that opens a main landing page: the one thing the page is about, said once, at the top, over a ground dark enough that nothing above it competes.
|
|
6
10
|
|
|
7
11
|
One of three opening bands, and the widest. Which one a page takes follows from where the page sits rather than from a prop — this is the landing tier, the front page and the campaign pages under it.
|
|
@@ -133,6 +137,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
133
137
|
Guidance only — cannot be checked automatically.
|
|
134
138
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
135
139
|
Guidance only — cannot be checked automatically.
|
|
140
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
141
|
+
|
|
142
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
143
|
+
|
|
144
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
145
|
+
Guidance only — cannot be checked automatically.
|
|
136
146
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
137
147
|
|
|
138
148
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|