@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,342 @@
|
|
|
1
|
+
<!-- GENERATED from estimator.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Estimator
|
|
4
|
+
|
|
5
|
+
Sets the page's own fields beside the figures worked out from them: a trading calculator, a converter, an income estimate.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
A section that turns a reader's inputs into figures: the page's own fields on one side of a card, and the results they produce on the other — a trading calculator's margin and pip value, a converter's amount received, a partner's estimated income.
|
|
10
|
+
|
|
11
|
+
It owns the layout and none of the arithmetic. The page passes the fields it needs and the figures it has worked out, from a live feed, a formula or both, and the block sets them the same way wherever it is used: a heading, a card, an inputs panel, a results panel that announces each change, and one way onward. That is what lets one block serve tools that would otherwise each be built once, by hand, for one page.
|
|
12
|
+
|
|
13
|
+
Two layouts: `stacked`, the heading centred above the card and the inputs beside the results, for a tool with several fields and several figures; and `split`, the heading beside the card and the inputs above the results inside it, for a compact tool a page introduces with a few lines of its own.
|
|
14
|
+
|
|
15
|
+
## Use when
|
|
16
|
+
|
|
17
|
+
- A page lets a reader work something out before they act — a margin, a pip value, a swap charge, a conversion, an income estimate
|
|
18
|
+
- The figures change as the reader types or picks, and should be announced as they do
|
|
19
|
+
- The same tool appears on several pages in several forms — the margin, pip and swap calculators are one layout with different fields and figures
|
|
20
|
+
|
|
21
|
+
## Do not use
|
|
22
|
+
|
|
23
|
+
- The figures are fixed facts rather than the result of anything the reader enters → `Stats`
|
|
24
|
+
- Options are compared side by side rather than worked out from an input → `ComparisonCards`
|
|
25
|
+
- The tool is a form that sends something — a sign-up, a contact request → `FeatureSplit`
|
|
26
|
+
- Fetching or calculating anything. The block has no data source and no formula: a page that wants live prices or a margin computes them and passes the figures in, so the block stays the same on every page and in every test
|
|
27
|
+
- A form that submits. Nothing here is sent anywhere; the way onward is a link or a button to the page that does the real thing
|
|
28
|
+
- A table of many figures. Past six or so results the panel stops being an answer and becomes a listing, which is what DataTable is for
|
|
29
|
+
|
|
30
|
+
## Anatomy
|
|
31
|
+
|
|
32
|
+
Estimator renders 19 elements. A token binding names the part it applies to.
|
|
33
|
+
|
|
34
|
+
- `root` — `<section>`, class `dds-estimator`. 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 layout folds on the section's measure rather than the window's.
|
|
35
|
+
- `inner` — `<div>`, class `dds-estimator__inner`. The measure and the gutter, holding the heading and the tool in the same column as every other section on the page. A column on a phone and under `stacked`; a row of two equal halves at full width under `split`.
|
|
36
|
+
- `header` — `<div>`, class `dds-estimator__header`. The title and the line under it. Centred over the card under `stacked`, and at the start beside it under `split` — the package's rule for a section's heading over stacked content and beside content in columns.
|
|
37
|
+
- `title` — `<h2>`, class `dds-estimator__title`. What the tool works out. `h2`, because a section in the middle of a page sits under the page's own heading.
|
|
38
|
+
- `description` — `<p>`, class `dds-estimator__description`. The line under the title, held to a readable measure. Rendered only when `description` is set.
|
|
39
|
+
- `tool` — `<div>`, class `dds-estimator__tool`. The card the tool sits in — a Card at its `surface` variant, so the tool is the same object as every other card on the page, turned to the raised fill on the grey band and the inverse one on the dark band, as ComparisonCards' cards are.
|
|
40
|
+
- `panels` — `<div>`, class `dds-estimator__panels`. The two panels inside the card, held off its edges by the card inset. A column on a phone and under `split`; the inputs beside the results from the fold under `stacked`.
|
|
41
|
+
- `inputs` — `<form>`, class `dds-estimator__inputs`. The page's own fields, in the order they are filled, a step apart — held in a form, so Enter in a field asks for the figures through `onCalculate`, which is what a reader expects of a calculator. Its submit is caught, so the form never leaves the page.
|
|
42
|
+
- `inputs-label` — `<h3>`, class `dds-estimator__inputs-label`. The inputs panel's heading, an `h3` under the section's `h2`. Rendered only when `inputsLabel` is set.
|
|
43
|
+
- `results` — `<div>`, class `dds-estimator__results`. The answer: a white panel inside the grey card — the reference calculator's — so the change of fill is the line between the question and what it comes to, with no rule drawn. The figures, and the way onward under them. A polite live region, rendered from the first paint so a screen reader is already listening when the figures change: a reader is told the new values without being interrupted mid-word.
|
|
44
|
+
- `results-label` — `<h3>`, class `dds-estimator__results-label`. The results panel's heading, an `h3` under the section's `h2`. Rendered only when `resultsLabel` is set.
|
|
45
|
+
- `list` — `<dl>`, class `dds-estimator__list`. The figures as a description list, so each value is announced with the label it answers. One column on a phone; two from the fold, so a set of four reads as a block of figures rather than a long column.
|
|
46
|
+
- `result` — `<div>`, class `dds-estimator__result`. One figure: its label, its value and, where it has one, its note — ruled off from the next.
|
|
47
|
+
- `result-label` — `<dt>`, class `dds-estimator__result-label`. What the figure is, in the muted ink at the small body step.
|
|
48
|
+
- `result-value` — `<dd>`, class `dds-estimator__result-value`. The figure, at the h4 step — the largest thing in the card, because it is the answer the reader came for — isolated so a sign or a currency keeps its place in a right-to-left line.
|
|
49
|
+
- `result-note` — `<dd>`, class `dds-estimator__result-note`. The line that qualifies a figure, where it has one, in the muted ink at the small body step.
|
|
50
|
+
- `empty` — `<p>`, class `dds-estimator__empty`. What the panel says before there are figures: shown in place of the list while `results` is empty. Rendered only when `emptyMessage` is set.
|
|
51
|
+
- `action` — `<div>`, class `dds-estimator__action`. The way onward under the figures. It fills the panel's width on a phone, as every section's actions do. Rendered only when `action` is set.
|
|
52
|
+
- `input-actions` — `<div>`, class `dds-estimator__input-actions`. The row of the page's Calculate and Reset under the fields, sharing its width. On a phone the buttons stack and each fills the width, as every section's actions do. Rendered only when `inputActions` is set.
|
|
53
|
+
|
|
54
|
+
Apply these classes from the generated `estimatorParts` constant rather than writing the strings by hand.
|
|
55
|
+
|
|
56
|
+
## Composition
|
|
57
|
+
|
|
58
|
+
- Takes no children. Everything it renders comes from props
|
|
59
|
+
- Never contains: `FeatureSplit`, `FeatureBullets`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar`, `Table`, `Accordion` — in children or in any prop that takes a node
|
|
60
|
+
|
|
61
|
+
## Props
|
|
62
|
+
|
|
63
|
+
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
64
|
+
|
|
65
|
+
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
66
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
67
|
+
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough
|
|
68
|
+
|
|
69
|
+
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
70
|
+
|
|
71
|
+
The ink follows the ground and is not a second decision: a dark band carries white type because this sets both halves in one value, which is what the painted-ground-carries-its-ink rule exists to stop a page getting wrong.
|
|
72
|
+
Never for: Marking importance. Every section on a page painted dark is a page with no emphasis left, and a reader stops reading the grounds as meaning anything. Alternating for its own sake is the same mistake more slowly.
|
|
73
|
+
|
|
74
|
+
And never the brand's own coral, `color.bg.brand`, which is not offered here. That ground belongs to the band that asks a reader to do something — the one place on a page where the brand colour is the point rather than decoration — and a feature section wearing it is a page with two calls to action, one of which does nothing. It is `color.bg.brand-strong` that this offers: the dark brand ground, which is a band breaking a page rather than a band asking for something.
|
|
75
|
+
|
|
76
|
+
### layout — `stacked` | `split` (default `stacked`)
|
|
77
|
+
|
|
78
|
+
- `stacked` — The default. The heading centred above a wide card, the inputs beside the results — a calculator with several fields and several figures, where the two panels each need room
|
|
79
|
+
- `split` — The heading and a few lines beside the card, the inputs above the results inside it — a compact tool a page introduces in its own words, a converter or a single estimate
|
|
80
|
+
|
|
81
|
+
Use when: How the heading and the tool share the section at full width. On a phone both are one column whichever is chosen: the heading, then the card, the inputs above the results.
|
|
82
|
+
Never for: Varying between two tools on one page. Pick the layout the tool's size calls for, and the page reads as one system
|
|
83
|
+
|
|
84
|
+
### title — `string` **Required.**
|
|
85
|
+
|
|
86
|
+
Use when: Always. What the tool works out, in a few words — 'Trading calculator', 'Buy crypto in seconds', 'Estimate your earnings'.
|
|
87
|
+
Never for: Instructions. How to use the tool is the fields' own labels, not the heading
|
|
88
|
+
|
|
89
|
+
### description — `string`
|
|
90
|
+
|
|
91
|
+
Use when: A line or two under the title saying what the figures are for or where they come from — 'Live prices, updated every few seconds'.
|
|
92
|
+
Never for: A disclaimer the results depend on. That is a result's `note`, read beside the figure it qualifies
|
|
93
|
+
|
|
94
|
+
### inputsLabel — `string`
|
|
95
|
+
|
|
96
|
+
Use when: A heading over the inputs panel, where the two panels need naming — 'Calculator' over the fields and 'Results' over the figures. Leave both out for a tool whose fields name themselves.
|
|
97
|
+
Never for: One panel only. Name both or neither
|
|
98
|
+
|
|
99
|
+
### inputs — `node` **Required.**
|
|
100
|
+
|
|
101
|
+
Accepts: *
|
|
102
|
+
Use when: Always. The fields the reader fills in — Select, TextInput, SearchInput, SegmentedControl, a slider — in the order they are filled. The page owns their values and works the results out from them.
|
|
103
|
+
Never for: A submit button. The results update as the fields change; the way onward is `action`
|
|
104
|
+
|
|
105
|
+
### inputActions — `node`
|
|
106
|
+
|
|
107
|
+
Accepts: Button
|
|
108
|
+
Use when: A tool that works its figures out when asked rather than as the reader types — a calculation too slow or too costly to run on every keystroke, or one where half-filled fields would show figures that mislead. 'Calculate', whose press calls the page's own handler, and 'Reset' beside it to clear the fields. They share the row; on a phone they stack and each fills the width.
|
|
109
|
+
Never for: A tool whose figures already follow the fields. A button that does what typing already did is a step the reader has to find and press for nothing
|
|
110
|
+
|
|
111
|
+
### onCalculate — `callback`
|
|
112
|
+
|
|
113
|
+
Use when: Whenever inputActions holds a Calculate button: Enter in any of the fields calls it, as the button's own press does — wire the button's onClick to the same function. The page works the figures out and passes them as `results`; the results panel announces them.
|
|
114
|
+
Never for: Sending anything. The form never leaves the page; a tool that submits to a server is a form section, not this
|
|
115
|
+
|
|
116
|
+
### resultsLabel — `string`
|
|
117
|
+
|
|
118
|
+
Use when: A heading over the results panel, with inputsLabel — 'Results', 'You receive'.
|
|
119
|
+
Never for: One panel only. Name both or neither
|
|
120
|
+
|
|
121
|
+
### results — `data` `EstimatorResult[]` **Required.**
|
|
122
|
+
|
|
123
|
+
Use when: The figures the inputs produce, in reading order — a `label`, a `value` written exactly as it is to be read, and an optional `note`. Pass an empty list until the inputs are complete, and the panel shows `emptyMessage` instead. Each change is announced politely, so a reader using a screen reader hears the new figures without being interrupted.
|
|
124
|
+
Never for: A value the page has not worked out. Pass nothing rather than a placeholder figure: a wrong number on a trading page is worse than none
|
|
125
|
+
|
|
126
|
+
### emptyMessage — `string`
|
|
127
|
+
|
|
128
|
+
Use when: What the results panel says before there are figures to show — 'Choose an instrument to see the results'. Translate it with the page.
|
|
129
|
+
Never for: An error. A failed feed is the page's to say, in a result's note or its own message
|
|
130
|
+
|
|
131
|
+
### action — `node`
|
|
132
|
+
|
|
133
|
+
Accepts: Button, Link
|
|
134
|
+
Use when: The one thing a reader does once they have their figures — 'Open an account', 'Trade now', 'Become a partner'. Under the results, where the reader's eye already is.
|
|
135
|
+
Never for: More than one action. One tool, one next step
|
|
136
|
+
|
|
137
|
+
## Accessibility
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
- Announced as: `region`
|
|
142
|
+
- `Tab` — Moves through the page's own fields in the inputs panel, then any Calculate and Reset, then to the way onward. The figures hold nothing to press.
|
|
143
|
+
- `Enter` — In a plain field, calls onCalculate — the same as pressing Calculate. Enter in a picker's search or a text area keeps its own meaning. Without onCalculate it does nothing, and never leaves the page.
|
|
144
|
+
- accessible name from title, so the section is a named region a screen reader can jump to and skip
|
|
145
|
+
- The results panel is a polite live region from the first paint, so each new set of figures is announced once, after the reader stops typing, without interrupting them
|
|
146
|
+
- Each figure is a description list entry, so its value is announced with the label it answers, and its note with it
|
|
147
|
+
|
|
148
|
+
## Rules
|
|
149
|
+
|
|
150
|
+
- **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.
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
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.
|
|
157
|
+
|
|
158
|
+
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.
|
|
159
|
+
|
|
160
|
+
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.
|
|
161
|
+
Guidance only — cannot be checked automatically.
|
|
162
|
+
- **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.
|
|
163
|
+
Guidance only — cannot be checked automatically.
|
|
164
|
+
- **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.
|
|
165
|
+
|
|
166
|
+
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.
|
|
167
|
+
|
|
168
|
+
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.
|
|
169
|
+
Guidance only — cannot be checked automatically.
|
|
170
|
+
- **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.
|
|
171
|
+
|
|
172
|
+
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.
|
|
173
|
+
|
|
174
|
+
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.
|
|
175
|
+
Guidance only — cannot be checked automatically.
|
|
176
|
+
- **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.
|
|
177
|
+
|
|
178
|
+
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.
|
|
179
|
+
|
|
180
|
+
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.
|
|
181
|
+
|
|
182
|
+
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.
|
|
183
|
+
|
|
184
|
+
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.
|
|
185
|
+
|
|
186
|
+
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.
|
|
187
|
+
|
|
188
|
+
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.
|
|
189
|
+
|
|
190
|
+
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.
|
|
191
|
+
|
|
192
|
+
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.
|
|
193
|
+
Guidance only — cannot be checked automatically.
|
|
194
|
+
- **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.
|
|
195
|
+
|
|
196
|
+
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.
|
|
197
|
+
|
|
198
|
+
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.
|
|
199
|
+
|
|
200
|
+
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.
|
|
201
|
+
|
|
202
|
+
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.
|
|
203
|
+
|
|
204
|
+
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.
|
|
205
|
+
|
|
206
|
+
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.
|
|
207
|
+
|
|
208
|
+
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.
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
Guidance only — cannot be checked automatically.
|
|
212
|
+
- **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.
|
|
213
|
+
|
|
214
|
+
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.
|
|
215
|
+
|
|
216
|
+
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.
|
|
217
|
+
|
|
218
|
+
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.
|
|
219
|
+
Guidance only — cannot be checked automatically.
|
|
220
|
+
- **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.
|
|
221
|
+
|
|
222
|
+
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.
|
|
223
|
+
|
|
224
|
+
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.
|
|
225
|
+
|
|
226
|
+
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.
|
|
227
|
+
Guidance only — cannot be checked automatically.
|
|
228
|
+
|
|
229
|
+
## Anti-examples
|
|
230
|
+
|
|
231
|
+
❌ Estimator for: The figures are fixed facts rather than the result of anything the reader enters
|
|
232
|
+
Headline numbers a page states, with no inputs to produce them
|
|
233
|
+
→ use `Stats` instead.
|
|
234
|
+
|
|
235
|
+
❌ Estimator for: Options are compared side by side rather than worked out from an input
|
|
236
|
+
A card per option with its own rows, which a reader compares across rather than computes
|
|
237
|
+
→ use `ComparisonCards` instead.
|
|
238
|
+
|
|
239
|
+
❌ Estimator for: The tool is a form that sends something — a sign-up, a contact request
|
|
240
|
+
A form submits; this block shows what inputs produce, and sends nothing
|
|
241
|
+
→ use `FeatureSplit` instead.
|
|
242
|
+
|
|
243
|
+
## Example
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
import { Estimator, Button, Stack } from '@deriv-com/dds-marketing'
|
|
247
|
+
|
|
248
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} inputActions={<><Button variant="primary">Calculate</Button><Button variant="secondary">Reset</Button></>} results={[{"label":"Margin required","value":"216.84 USD","note":"At 1:500 leverage"},{"label":"Pip value","value":"10.00 USD"},{"label":"Swap long","value":"-7.42 USD","note":"Per lot, per night"},{"label":"Swap short","value":"1.96 USD","note":"Per lot, per night"}]} />
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## In use
|
|
252
|
+
|
|
253
|
+
### A trading calculator
|
|
254
|
+
|
|
255
|
+
Several fields beside several figures: the heading centred above a wide card, the inputs beside the results.
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
259
|
+
|
|
260
|
+
// Margin, pip value and swap
|
|
261
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} results={[{"label":"Margin required","value":"216.84 USD","note":"At 1:500 leverage"},{"label":"Pip value","value":"10.00 USD"},{"label":"Swap long","value":"-7.42 USD","note":"Per lot, per night"},{"label":"Swap short","value":"1.96 USD","note":"Per lot, per night"}]} action={<Button variant="primary">Open an account</Button>} />
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Calculate on demand
|
|
265
|
+
|
|
266
|
+
For figures worked out when asked: Calculate submits the fields — as Enter in any of them does — and Reset clears them. With no way onward under the results, Calculate is the card's one primary.
|
|
267
|
+
|
|
268
|
+
```tsx
|
|
269
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
270
|
+
|
|
271
|
+
// Calculate and Reset
|
|
272
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} results={[{"label":"Margin required","value":"216.84 USD","note":"At 1:500 leverage"},{"label":"Pip value","value":"10.00 USD"},{"label":"Swap long","value":"-7.42 USD","note":"Per lot, per night"},{"label":"Swap short","value":"1.96 USD","note":"Per lot, per night"}]} inputActions={<><Button variant="primary">Calculate</Button><Button variant="secondary">Reset</Button></>} />
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Before the inputs are complete
|
|
276
|
+
|
|
277
|
+
An empty list shows the waiting message instead of figures, never a zero that reads as an answer.
|
|
278
|
+
|
|
279
|
+
```tsx
|
|
280
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
281
|
+
|
|
282
|
+
// No figures yet
|
|
283
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} results={[]} action={<Button variant="primary">Open an account</Button>} emptyMessage="Choose an instrument and a volume to see the results." />
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### The ground it sits on
|
|
287
|
+
|
|
288
|
+
The card takes the raised fill on the grey band, and the dark theme — fields and all — on the dark band.
|
|
289
|
+
|
|
290
|
+
```tsx
|
|
291
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
292
|
+
|
|
293
|
+
// On the quiet ground
|
|
294
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} results={[{"label":"Margin required","value":"216.84 USD","note":"At 1:500 leverage"},{"label":"Pip value","value":"10.00 USD"},{"label":"Swap long","value":"-7.42 USD","note":"Per lot, per night"},{"label":"Swap short","value":"1.96 USD","note":"Per lot, per night"}]} action={<Button variant="primary">Open an account</Button>} ground="subtle" />
|
|
295
|
+
|
|
296
|
+
// On the dark band
|
|
297
|
+
<Estimator title="Trading calculator" description="Work out the margin, pip value and swap on a trade before you place it." inputsLabel="Calculator" resultsLabel="Results" inputs={<Stack gap="md" align="stretch" />} results={[{"label":"Margin required","value":"216.84 USD","note":"At 1:500 leverage"},{"label":"Pip value","value":"10.00 USD"},{"label":"Swap long","value":"-7.42 USD","note":"Per lot, per night"},{"label":"Swap short","value":"1.96 USD","note":"Per lot, per night"}]} action={<Button variant="primary">Open an account</Button>} ground="strong" />
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### A crypto converter
|
|
301
|
+
|
|
302
|
+
A compact tool beside the words that introduce it: the inputs above the figure inside the card.
|
|
303
|
+
|
|
304
|
+
```tsx
|
|
305
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
306
|
+
|
|
307
|
+
// Pay and receive
|
|
308
|
+
<Estimator layout="split" title="Buy crypto in seconds" description="Live prices from Deriv Crypto Exchange, updated as you type." inputs={<Stack gap="md" align="stretch" />} results={[{"label":"You receive","value":"0.0214 BTC","note":"At 1 BTC = 46,720.00 USDT"}]} action={<Button variant="primary">Trade on Deriv</Button>} />
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### An estimate from one field
|
|
312
|
+
|
|
313
|
+
The same layout as an affiliate's income estimate: one input, one figure, one way onward.
|
|
314
|
+
|
|
315
|
+
```tsx
|
|
316
|
+
import { Button, Estimator, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
317
|
+
|
|
318
|
+
// Monthly income
|
|
319
|
+
<Estimator layout="split" title="Estimate your earnings" description="See what you could earn each month by referring clients to Deriv." inputs={<Stack gap="md" align="stretch" />} results={[{"label":"Monthly income","value":"$2,400","note":"An estimate at $120 a client"}]} action={<Button variant="primary">Become a partner</Button>} />
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Split, before the inputs are complete
|
|
323
|
+
|
|
324
|
+
The waiting message in the compact card.
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
328
|
+
|
|
329
|
+
// No figure yet
|
|
330
|
+
<Estimator layout="split" title="Buy crypto in seconds" description="Live prices from Deriv Crypto Exchange, updated as you type." inputs={<Stack gap="md" align="stretch" />} results={[]} action={<Button variant="primary">Trade on Deriv</Button>} emptyMessage="Enter an amount to see what you receive." />
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Split on the dark band
|
|
334
|
+
|
|
335
|
+
The card in the dark theme beside a heading in the band's own ink.
|
|
336
|
+
|
|
337
|
+
```tsx
|
|
338
|
+
import { Button, Estimator, Option, Select, Stack, TextInput } from '@deriv-com/dds-marketing'
|
|
339
|
+
|
|
340
|
+
// On the dark band
|
|
341
|
+
<Estimator layout="split" title="Buy crypto in seconds" description="Live prices from Deriv Crypto Exchange, updated as you type." inputs={<Stack gap="md" align="stretch" />} results={[{"label":"You receive","value":"0.0214 BTC","note":"At 1 BTC = 46,720.00 USDT"}]} action={<Button variant="primary">Trade on Deriv</Button>} ground="strong" />
|
|
342
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# FaqAccordion
|
|
4
4
|
|
|
5
|
+
A section of questions and answers, one open at a time.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section of questions and answers: a heading over an Accordion, one question open at a time. The answers are put away until a reader asks for one, so a page can carry the ten things people ask before they sign up without being ten paragraphs long.
|
|
6
10
|
|
|
7
11
|
The rows are AccordionItems, handed in as children; this draws the heading and the column and wraps them in the Accordion that keeps one open. Everything about a row — the rule between rows, the chevron, the keyboard — is Accordion's.
|
|
@@ -78,6 +82,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
78
82
|
Guidance only — cannot be checked automatically.
|
|
79
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.
|
|
80
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.
|
|
81
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.
|
|
82
92
|
|
|
83
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.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# FeatureBullets
|
|
4
4
|
|
|
5
|
+
Pairs a claim and a list of what is included with one picture.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section pairing a claim with a ruled list of what something includes, beside one picture.
|
|
6
10
|
|
|
7
11
|
The list is the argument: each line is one thing a reader gets, and the column is meant to be counted rather than read. The check against each line is the component's own and the one thing the page does not supply — the same six strings with a bullet are a summary, with a check they are a promise.
|
|
@@ -125,6 +129,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
125
129
|
Guidance only — cannot be checked automatically.
|
|
126
130
|
- **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.
|
|
127
131
|
Guidance only — cannot be checked automatically.
|
|
132
|
+
- **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.
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
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.
|
|
137
|
+
Guidance only — cannot be checked automatically.
|
|
128
138
|
- **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.
|
|
129
139
|
|
|
130
140
|
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.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# FeatureCards
|
|
4
4
|
|
|
5
|
+
A heading over a grid of feature cards.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section that opens with a heading and sets a grid of cards under it — the shape a marketing page uses for “why choose us” and “what you get”. Each card is the page's own Card or CardButton with a CardBody inside; this decides the heading, the column and how many cards sit on a row, and nothing about a card.
|
|
6
10
|
|
|
7
11
|
One column on a phone, two from the fold, and three at full width — four when there are exactly four and two when there are two, so a set is one full row rather than a row and an orphan, or a row with a gap in it.
|
|
@@ -26,7 +30,7 @@ One card is the reference design's single panel: it takes the whole row, and fro
|
|
|
26
30
|
|
|
27
31
|
FeatureCards renders 8 elements. A token binding names the part it applies to.
|
|
28
32
|
|
|
29
|
-
- `root` — `<section>`, class `dds-featurecards`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the grid folds on the section's measure rather than the window's.
|
|
33
|
+
- `root` — `<section>`, class `dds-featurecards`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the grid folds on the section's measure rather than the window's. Given `background`, it draws the page's one patterned band: a Background as its first layer, under everything it holds, in the tone of its ground.
|
|
30
34
|
- `inner` — `<div>`, class `dds-featurecards__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the grid: space.heading.content.
|
|
31
35
|
- `header` — `<div>`, class `dds-featurecards__header`. The heading, the line under it and the way on. Ranged to the start on a phone and centred from the fold, PageHeader's rule and its reason. It sets no gap: each part's own margin is the step, so a header without a line closes up rather than leaving its gap behind.
|
|
32
36
|
- `title` — `<h2>`, class `dds-featurecards__title`. What the cards are. `h2` because a section sits under the page's own heading; the cards' titles come below it in the outline.
|
|
@@ -48,7 +52,7 @@ Apply these classes from the generated `featureCardsParts` constant rather than
|
|
|
48
52
|
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
49
53
|
|
|
50
54
|
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
51
|
-
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
55
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
52
56
|
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
53
57
|
|
|
54
58
|
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
@@ -58,6 +62,17 @@ Never for: Marking importance. Every section on a page painted dark is a page wi
|
|
|
58
62
|
|
|
59
63
|
And never the brand's own coral, `color.bg.brand`, which is not offered here. That ground belongs to the band that asks a reader to do something — the one place on a page where the brand colour is the point rather than decoration — and a feature section wearing it is a page with two calls to action, one of which does nothing. It is `color.bg.brand-strong` that this offers: the dark brand ground, which is a band breaking a page rather than a band asking for something.
|
|
60
64
|
|
|
65
|
+
### background — `halftone` | `aurora` | `mesh` | `grid` | `rings`
|
|
66
|
+
|
|
67
|
+
- `halftone` — A field of coral dots that grow towards a soft glow at the band's foot and settle to a fine screen away from it.
|
|
68
|
+
- `aurora` — Curtains of the brand's light rising from the band's foot and swaying slowly.
|
|
69
|
+
- `mesh` — The band in the brand's reds folded into one another like a liquid — the loudest of the five, for a dark band.
|
|
70
|
+
- `grid` — Hairlines a pitch apart rising from a soft bloom at the band's foot — the quietest, and the one to reach for first.
|
|
71
|
+
- `rings` — Hairline circles spreading out from the middle of the band's foot.
|
|
72
|
+
|
|
73
|
+
Use when: The page's one patterned band, between its hero and its closing call to action — a band a reader should stop at. The pattern is drawn by Background as the section's first layer, under its content and over nothing, in the tone of the ground: the light pattern on `page`, the same on the grey of `subtle`, the dark one on `strong`. Every pattern rises from the band's foot, which this block leaves open under its content. Leave it out and the band is its flat ground, as most bands on a page are.
|
|
74
|
+
Never for: More than one band on a page, or a band that is already the hero or the call to action — those carry their own patterns. One pattern is what makes a band the one a reader remembers; two make neither, and a page of them is noise. Never wrap this block in a Background instead: it paints its own ground over whatever is behind it, so the pattern would be hidden, and the pattern belongs under the content, not around it.
|
|
75
|
+
|
|
61
76
|
### title — `string` **Required.**
|
|
62
77
|
|
|
63
78
|
Use when: Always. What the cards are, in the fewest words that name them — "Why trade with Deriv", "Markets you can trade".
|
|
@@ -99,6 +114,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
99
114
|
Guidance only — cannot be checked automatically.
|
|
100
115
|
- **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.
|
|
101
116
|
Guidance only — cannot be checked automatically.
|
|
117
|
+
- **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.
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
Guidance only — cannot be checked automatically.
|
|
102
123
|
- **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.
|
|
103
124
|
|
|
104
125
|
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.
|
|
@@ -318,7 +339,7 @@ The reference's FeatureCardsIcon: every card a light Card whose CardBody leads w
|
|
|
318
339
|
|
|
319
340
|
```tsx
|
|
320
341
|
import { Card, CardBody, FeatureCards, Link } from '@deriv-com/dds-marketing'
|
|
321
|
-
import { ClockThreeRegularIcon, FileShieldRegularIcon, GlobeRegularIcon, LockRegularIcon } from '@deriv-com/
|
|
342
|
+
import { ClockThreeRegularIcon, FileShieldRegularIcon, GlobeRegularIcon, LockRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
322
343
|
|
|
323
344
|
// Three cards, a mark on each
|
|
324
345
|
<FeatureCards ground="subtle" title="Why choose Deriv" description="Trusted by traders since 1999, with the safeguards to show for it.">
|
|
@@ -349,3 +370,26 @@ import { ClockThreeRegularIcon, FileShieldRegularIcon, GlobeRegularIcon, LockReg
|
|
|
349
370
|
</Card>
|
|
350
371
|
</FeatureCards>
|
|
351
372
|
```
|
|
373
|
+
|
|
374
|
+
### The page's one patterned band
|
|
375
|
+
|
|
376
|
+
One band per page, between the hero and the closing call to action, its pattern drawn under the content in the tone of its ground.
|
|
377
|
+
|
|
378
|
+
```tsx
|
|
379
|
+
import { FeatureCards, Link } from '@deriv-com/dds-marketing'
|
|
380
|
+
|
|
381
|
+
// grid on page
|
|
382
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="grid" ground="page">{cards}</FeatureCards>
|
|
383
|
+
|
|
384
|
+
// rings on subtle
|
|
385
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="rings" ground="subtle">{cards}</FeatureCards>
|
|
386
|
+
|
|
387
|
+
// halftone on strong
|
|
388
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="halftone" ground="strong">{cards}</FeatureCards>
|
|
389
|
+
|
|
390
|
+
// aurora on strong
|
|
391
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="aurora" ground="strong">{cards}</FeatureCards>
|
|
392
|
+
|
|
393
|
+
// mesh on strong
|
|
394
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="mesh" ground="strong">{cards}</FeatureCards>
|
|
395
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# FeatureCardsCarousel
|
|
4
4
|
|
|
5
|
+
A heading over a row of feature cards the reader scrolls through.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A feature band that sets its cards in a row a reader moves along rather than a grid: a heading and a line over a row of the page's own cards, the next one's edge showing past the last in view, with dots saying where the reader is and two arrows stepping it a card at a time. One card is the focus at a time and the rest wait at the edge, so each gets a screen's attention without the page paying a screen of scrolling for it.
|
|
6
10
|
|
|
7
11
|
The reference design's FeatureCardsCarousel. Each card is the page's own Card or CardButton with a CardBody inside, as in FeatureCards — its fill, its picture, its words and where it leads are the card's; this decides the heading, the row and the way along it, and nothing about a card.
|
|
@@ -49,7 +53,7 @@ Apply these classes from the generated `featureCardsCarouselParts` constant rath
|
|
|
49
53
|
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
50
54
|
|
|
51
55
|
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
52
|
-
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
56
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
53
57
|
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
54
58
|
|
|
55
59
|
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
@@ -125,6 +129,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
125
129
|
Guidance only — cannot be checked automatically.
|
|
126
130
|
- **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.
|
|
127
131
|
Guidance only — cannot be checked automatically.
|
|
132
|
+
- **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.
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
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.
|
|
137
|
+
Guidance only — cannot be checked automatically.
|
|
128
138
|
- **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.
|
|
129
139
|
|
|
130
140
|
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.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# FeatureScroll
|
|
4
4
|
|
|
5
|
+
Gives each feature a screen of its own, with its picture pinned beside the text.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section that gives a set of things one screen each, with the picture pinned beside the words while a reader is on them.
|
|
6
10
|
|
|
7
11
|
For a set too long to compare and too important to list — six markets, five platforms. A grid of cards asks a reader which to read first and most read none; this arrives at one at a time, at the cost of a screen of scrolling each.
|
|
@@ -154,6 +158,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
154
158
|
Guidance only — cannot be checked automatically.
|
|
155
159
|
- **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.
|
|
156
160
|
Guidance only — cannot be checked automatically.
|
|
161
|
+
- **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.
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
Guidance only — cannot be checked automatically.
|
|
157
167
|
- **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.
|
|
158
168
|
|
|
159
169
|
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.
|