@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
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SegmentedControl
|
|
4
4
|
|
|
5
|
+
Picks exactly one option from a short set of joined segments.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A row of joined segments from which exactly one is chosen, drawn from a short set of alternatives that exclude each other. What the reader picks sets a value the page beside it consumes — a billing period, a currency, a platform — rather than moving them anywhere.
|
|
6
10
|
|
|
7
11
|
It holds which segment is chosen, how tall they all are, and whether the choice can be made at all. Those three belong to the row because no segment can answer them: only one may be current and a segment cannot see its siblings, a row at mixed heights is not a row, and closing one option is a different statement from closing the question.
|
|
@@ -50,7 +54,7 @@ SegmentedControl renders 2 elements. A token binding names the part it applies t
|
|
|
50
54
|
|
|
51
55
|
It is also what dims when the row is closed, with one `opacity.disabled` over the whole groove rather than a mark on each segment. That is what keeps the chosen segment legal: a row that barred every segment would put disabled on the one holding the value, and the item refuses that pair. A segment barred on its own still dims itself; the two never coincide, because a row that is closed has nothing left to bar.
|
|
52
56
|
|
|
53
|
-
It stops answering the pointer while it is closed, so no segment takes a hover tint inside a control that refuses the press. That is a structural rule rather than a token — nothing about it varies by brand or mode — and it belongs to the row rather than to any segment, because a segment barred on its own is still a segment the pointer may rest on.
|
|
57
|
+
It stops answering the pointer while it is closed, so no segment takes a hover tint inside a control that refuses the press. That is a structural rule rather than a token — nothing about it varies by brand or mode — and it belongs to the row rather than to any segment, because a segment barred on its own is still a segment the pointer may rest on. Under `motion="slide"` it moves once on arrival (`data-arrival`), the pill sliding from the first segment to the chosen one.
|
|
54
58
|
- `indicator` — `<span>`, class `dds-segmentedcontrol__indicator`. A single pill serving the whole row, moved to whichever segment is chosen rather than one pill per segment switched on and off.
|
|
55
59
|
|
|
56
60
|
Only that arrangement lets it travel, and travelling is the point: two pills cross-fading always reads as two pills, while one pill has to be positioned — which means something has to know where the chosen segment sits. No selector can supply that answer and no container query reaches it either, the question being about a sibling's position rather than a box's own width. This is therefore the only measured thing in the component.
|
|
@@ -112,6 +116,13 @@ Never for: Half of a controlled row. A value passed with no onChange to move it
|
|
|
112
116
|
Use when: Whenever value is — together they are how a page holds the choice. It is called with the chosen segment's value after that segment's own onSelect, so a segment that reports its own presses keeps doing so inside a row
|
|
113
117
|
Never for: Side effects a choice should not have. This says which value is in force; a row that also navigated, submitted or fetched on it would be doing the thing its intent says it does not
|
|
114
118
|
|
|
119
|
+
### motion — `slide`
|
|
120
|
+
|
|
121
|
+
- `slide` — The pill starts on the first segment and slides to the chosen one once, on arrival — a trade ticket set to Sell showing it was Buy first. It holds for motion.duration.hold, then slides over motion.duration.shift
|
|
122
|
+
|
|
123
|
+
Use when: The row moves once, on arrival — in an IllustrationCard when the pane has landed, otherwise when it is well into view. For a row shown as a picture of the product making a choice. Pair it with Typography's `from` on the words the choice changes, so the content follows the pill. At rest, and for a reader who asked for less movement, the pill is on the chosen segment
|
|
124
|
+
Never for: A row the reader is about to use. A live control that moves on its own before anyone touches it looks like it has been chosen for them
|
|
125
|
+
|
|
115
126
|
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
116
127
|
|
|
117
128
|
## Accessibility
|
|
@@ -149,6 +160,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
149
160
|
Guidance only — cannot be checked automatically.
|
|
150
161
|
- **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.
|
|
151
162
|
Guidance only — cannot be checked automatically.
|
|
163
|
+
- **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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
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.
|
|
168
|
+
Guidance only — cannot be checked automatically.
|
|
152
169
|
- **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.
|
|
153
170
|
|
|
154
171
|
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.
|
|
@@ -356,7 +373,7 @@ Two payment methods a reader tells apart faster by the mark than by the noun. A
|
|
|
356
373
|
|
|
357
374
|
```tsx
|
|
358
375
|
import { SegmentedControl, SegmentedControlItem } from '@deriv-com/dds-marketing'
|
|
359
|
-
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/
|
|
376
|
+
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
360
377
|
|
|
361
378
|
// Marks beside the words
|
|
362
379
|
<SegmentedControl label="Payment method">
|
|
@@ -364,3 +381,17 @@ import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/quill-
|
|
|
364
381
|
<SegmentedControlItem value="transfer" label="Transfer" icon={<ChartCandlestickRegularIcon />} onSelect={(value) => { /* your handler */ }} />
|
|
365
382
|
</SegmentedControl>
|
|
366
383
|
```
|
|
384
|
+
|
|
385
|
+
### Sliding once on arrival
|
|
386
|
+
|
|
387
|
+
The pill starts on the first segment and slides to the chosen one, once, as a picture of the product making a choice.
|
|
388
|
+
|
|
389
|
+
```tsx
|
|
390
|
+
import { SegmentedControl, SegmentedControlItem } from '@deriv-com/dds-marketing'
|
|
391
|
+
|
|
392
|
+
// motion="slide" — Buy to Sell
|
|
393
|
+
<SegmentedControl label="Trade direction" motion="slide">
|
|
394
|
+
<SegmentedControlItem value="buy" label="Buy" onSelect={(value) => { /* your handler */ }} />
|
|
395
|
+
<SegmentedControlItem value="sell" label="Sell" selected onSelect={(value) => { /* your handler */ }} />
|
|
396
|
+
</SegmentedControl>
|
|
397
|
+
```
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SegmentedControlItem
|
|
4
4
|
|
|
5
|
+
One option in a SegmentedControl.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One option in a segmented control, and nothing on its own — a segment says it is the chosen one of a set, and a set of one has nothing to be chosen from. It draws as a pill with a word in it and is announced as a radio, which is what tells a reader these exclude each other before they press anything.
|
|
6
10
|
|
|
7
11
|
Which segment is current belongs to the group rather than to the segment: exactly one may be, and a segment cannot see its siblings. So `selected` arrives from SegmentedControl, as `size` does — a row at mixed heights is not a row. `disabled` is the consumer's, and it bars this one option while the rest still answer.
|
|
@@ -91,7 +95,7 @@ Never for: A sentence, or a value with its unit spelled out. 'Yearly' rather tha
|
|
|
91
95
|
|
|
92
96
|
### icon — `node`
|
|
93
97
|
|
|
94
|
-
Use when: The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/
|
|
98
|
+
Use when: The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/dds-marketing/icons and pass the element
|
|
95
99
|
Never for: Decoration. A row of segments is scanned, and a mark that says nothing the label does not is one more thing to look past on every one of them
|
|
96
100
|
|
|
97
101
|
### onSelect — `callback`
|
|
@@ -130,6 +134,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
130
134
|
Guidance only — cannot be checked automatically.
|
|
131
135
|
- **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.
|
|
132
136
|
Guidance only — cannot be checked automatically.
|
|
137
|
+
- **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.
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
Guidance only — cannot be checked automatically.
|
|
133
143
|
- **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.
|
|
134
144
|
|
|
135
145
|
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.
|
|
@@ -270,7 +280,7 @@ Its colour steps with the selection exactly as the label's does — a mark left
|
|
|
270
280
|
|
|
271
281
|
```tsx
|
|
272
282
|
import { SegmentedControlItem } from '@deriv-com/dds-marketing'
|
|
273
|
-
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/
|
|
283
|
+
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
274
284
|
|
|
275
285
|
// Chosen, with a mark
|
|
276
286
|
<SegmentedControlItem value="card" label="Card" selected icon={<GlobeRegularIcon />} />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Select
|
|
4
4
|
|
|
5
|
+
Chooses one option from a list.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A control for choosing one answer from a set the reader scans. It is shut until they open it, and what it shows when shut is the answer they gave — so a form of these reads as a list of decisions rather than a list of empty fields.
|
|
6
10
|
|
|
7
11
|
On a marketing page it does two jobs, and the contract says both rather than pretending it is only one. It collects an answer a form submits — a country, a language, the kind of enquiry somebody is making. And it narrows what is already on the page — the sort on an index of articles, the market a pricing table is showing. The two differ in what happens after the answer: one is carried to a server when the visitor presses send, the other reshapes the page the moment it is taken. Nothing in the control changes between them, which is why they are one component and not two.
|
|
@@ -287,6 +291,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
287
291
|
Guidance only — cannot be checked automatically.
|
|
288
292
|
- **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.
|
|
289
293
|
Guidance only — cannot be checked automatically.
|
|
294
|
+
- **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.
|
|
295
|
+
|
|
296
|
+
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.
|
|
297
|
+
|
|
298
|
+
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.
|
|
299
|
+
Guidance only — cannot be checked automatically.
|
|
290
300
|
- **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.
|
|
291
301
|
|
|
292
302
|
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
|
# SelectChip
|
|
4
4
|
|
|
5
|
+
A chip that opens a list and shows the option chosen.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A chip that opens a list of answers and keeps the one chosen, so a filter row shows the current narrowing rather than the name of a filter. On a marketing site that is the control above an index whose set is too long to spell out as a row of toggles — a language, a region, a sort order, a market.
|
|
6
10
|
|
|
7
11
|
## Use when
|
|
@@ -155,6 +159,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
155
159
|
Guidance only — cannot be checked automatically.
|
|
156
160
|
- **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.
|
|
157
161
|
Guidance only — cannot be checked automatically.
|
|
162
|
+
- **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.
|
|
163
|
+
|
|
164
|
+
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.
|
|
165
|
+
|
|
166
|
+
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.
|
|
167
|
+
Guidance only — cannot be checked automatically.
|
|
158
168
|
- **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.
|
|
159
169
|
|
|
160
170
|
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
|
# Spinner
|
|
4
4
|
|
|
5
|
+
Shows that something is loading.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A turning ring that says a wait is real and the page has not stalled. A marketing page has very little to wait for — it is copy and pictures, and they arrive with the page — so a spinner here is the exception rather than the furniture: a form that has just been submitted, an embed or a demo still loading, a band of live figures being fetched.
|
|
6
10
|
|
|
7
11
|
That rarity is the brief. In an app a spinner is ordinary and a reader waits because they have an account and a reason to; on a landing page it is shown to someone with no stake in the outcome and nothing keeping them there. So it appears where a wait has already started — after the reader did something, or where a section has visibly held space for something that has not come — and nowhere else.
|
|
@@ -96,6 +100,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
96
100
|
Guidance only — cannot be checked automatically.
|
|
97
101
|
- **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.
|
|
98
102
|
Guidance only — cannot be checked automatically.
|
|
103
|
+
- **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.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
Guidance only — cannot be checked automatically.
|
|
99
109
|
- **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.
|
|
100
110
|
|
|
101
111
|
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.
|
package/.llm/components/stack.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Stack
|
|
4
4
|
|
|
5
|
+
Lays items out in a column with consistent spacing.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A column, and one measure between its rows. It draws nothing — no ground, no edge, no padding — and owns one decision: how far apart the things stacked in it sit. Everything else about them stays theirs.
|
|
6
10
|
|
|
7
11
|
It exists because the measure is what pages get wrong, and get wrong quietly. A gap typed as a number agreed with the system on the day it was written and never again. A gap written as a margin on the row belongs to the row, and travels with it into the next layout, where it is wrong and where nobody thinks to look — the last row of every group carrying a measure into whatever follows it. The column is the one thing that can see both sides of the space, so the column is what should own it.
|
|
@@ -119,6 +123,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
119
123
|
Guidance only — cannot be checked automatically.
|
|
120
124
|
- **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.
|
|
121
125
|
Guidance only — cannot be checked automatically.
|
|
126
|
+
- **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.
|
|
127
|
+
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
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.
|
|
131
|
+
Guidance only — cannot be checked automatically.
|
|
122
132
|
- **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.
|
|
123
133
|
|
|
124
134
|
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.
|
package/.llm/components/stats.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Stats
|
|
4
4
|
|
|
5
|
+
A heading over a few key figures, each with a short label.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A trust and credibility section of key numbers: a heading, a line under it where the heading needs one, and the figures — each a number and the few words that say what it counts. From the fold they are a row read all at once; on a phone they turn one at a time in a wheel, the one in place large with its neighbours smaller above and below, a dot for each down the start edge — the reference site's mobile stats. The wheel holds while the reader hovers on it or focuses it, and stops for good once they press it; a reader who asked for less motion gets the figures two to a row instead. Each figure counts up from nought, once, as the section arrives on screen, and lands on the value exactly as the page wrote it — on a phone that is the figure in place when the section arrives; the ones that turn in later are already final.
|
|
6
10
|
|
|
7
11
|
The reference design's StatsSimple. The figure is written in the page's first HTML and is what assistive technology reads, so the count is decoration over a fact that is already there: a reader with no script, a search engine and a reader who asked for less movement all get the final number and nothing else.
|
|
@@ -13,6 +17,7 @@ The reference design's StatsSimple. The figure is written in the page's first HT
|
|
|
13
17
|
|
|
14
18
|
## Do not use
|
|
15
19
|
|
|
20
|
+
- Each figure is a moment rather than a column to compare, beside the awards behind it → `StatsCarousel`
|
|
16
21
|
- Each item needs a sentence of its own, or a picture → `FeatureCards`
|
|
17
22
|
- The number is part of a claim the page is making in words → `FeatureSplit`
|
|
18
23
|
- Numbers that change while the page is open — a price, a live count. The figures are written once and counted once. The phone's wheel turns between them, but no figure changes once written — a value that does is a ticker this does not draw
|
|
@@ -23,7 +28,7 @@ The reference design's StatsSimple. The figure is written in the page's first HT
|
|
|
23
28
|
|
|
24
29
|
Stats renders 13 elements. A token binding names the part it applies to.
|
|
25
30
|
|
|
26
|
-
- `root` — `<section>`, class `dds-stats`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the row folds on the section's measure rather than the window's. A region named by its heading.
|
|
31
|
+
- `root` — `<section>`, class `dds-stats`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the row folds on the section's measure rather than the window's. A region named by its heading. 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.
|
|
27
32
|
- `inner` — `<div>`, class `dds-stats__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the figures: space.heading.content.
|
|
28
33
|
- `header` — `<div>`, class `dds-stats__header`. The heading and the line under it, FeatureCards' header and its arrangement: ranged to the start on a phone and centred from the fold. It sets no gap: each part's own margin is the step, so a heading with no line under it closes up.
|
|
29
34
|
- `title` — `<h2>`, class `dds-stats__title`. What the numbers prove. `h2` because a section sits under the page's own heading.
|
|
@@ -55,6 +60,17 @@ Apply these classes from the generated `statsParts` constant rather than writing
|
|
|
55
60
|
Use when: Which of the page's three grounds this section paints, FeatureCards' axis and its reason: a band that wants to be seen as a band takes one of the other two, and the page decides the rhythm. The ink follows the ground — the heading and the figures in the band's own ink, the labels in its quieter one.
|
|
56
61
|
Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left. And never the brand's own coral, which is not offered: that ground belongs to the band that asks a reader to do something.
|
|
57
62
|
|
|
63
|
+
### background — `halftone` | `aurora` | `mesh` | `grid` | `rings`
|
|
64
|
+
|
|
65
|
+
- `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.
|
|
66
|
+
- `aurora` — Curtains of the brand's light rising from the band's foot and swaying slowly.
|
|
67
|
+
- `mesh` — The band in the brand's reds folded into one another like a liquid — the loudest of the five, for a dark band.
|
|
68
|
+
- `grid` — Hairlines a pitch apart rising from a soft bloom at the band's foot — the quietest, and the one to reach for first.
|
|
69
|
+
- `rings` — Hairline circles spreading out from the middle of the band's foot.
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
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.
|
|
73
|
+
|
|
58
74
|
### title — `string` **Required.**
|
|
59
75
|
|
|
60
76
|
Use when: Always. What the numbers prove, in the fewest words — "Trade with confidence", "Deriv in numbers".
|
|
@@ -97,6 +113,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
97
113
|
Guidance only — cannot be checked automatically.
|
|
98
114
|
- **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.
|
|
99
115
|
Guidance only — cannot be checked automatically.
|
|
116
|
+
- **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.
|
|
117
|
+
|
|
118
|
+
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.
|
|
119
|
+
|
|
120
|
+
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.
|
|
121
|
+
Guidance only — cannot be checked automatically.
|
|
100
122
|
- **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.
|
|
101
123
|
|
|
102
124
|
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.
|
|
@@ -158,6 +180,10 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
158
180
|
|
|
159
181
|
## Anti-examples
|
|
160
182
|
|
|
183
|
+
❌ Stats for: Each figure is a moment rather than a column to compare, beside the awards behind it
|
|
184
|
+
StatsCarousel turns through the figures one at a time in a card, with awards beside it — the reference design's Stats; this is a row read all at once
|
|
185
|
+
→ use `StatsCarousel` instead.
|
|
186
|
+
|
|
161
187
|
❌ Stats for: Each item needs a sentence of its own, or a picture
|
|
162
188
|
A figure is read at a glance; something that needs explaining is a card
|
|
163
189
|
→ use `FeatureCards` instead.
|
|
@@ -217,3 +243,26 @@ import { Stats } from '@deriv-com/dds-marketing'
|
|
|
217
243
|
// Prefixes, suffixes and decimals
|
|
218
244
|
<Stats title="Deriv at a glance" stats={[{"value":"$1.2B","label":"Paid out to traders"},{"value":"99.9%","label":"Platform uptime"},{"value":"24/7","label":"Synthetic markets open"}]} />
|
|
219
245
|
```
|
|
246
|
+
|
|
247
|
+
### The page's one patterned band
|
|
248
|
+
|
|
249
|
+
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.
|
|
250
|
+
|
|
251
|
+
```tsx
|
|
252
|
+
import { Stats } from '@deriv-com/dds-marketing'
|
|
253
|
+
|
|
254
|
+
// grid on page
|
|
255
|
+
<Stats title="Trade with confidence" description="For over 25 years, a trusted partner of traders worldwide." stats={[{"value":"3M+","label":"Traders worldwide"},{"value":"250+","label":"Markets to trade"},{"value":"24/7","label":"Support in your language"},{"value":"$5","label":"Minimum deposit"}]} background="grid" ground="page" />
|
|
256
|
+
|
|
257
|
+
// rings on subtle
|
|
258
|
+
<Stats title="Trade with confidence" description="For over 25 years, a trusted partner of traders worldwide." stats={[{"value":"3M+","label":"Traders worldwide"},{"value":"250+","label":"Markets to trade"},{"value":"24/7","label":"Support in your language"},{"value":"$5","label":"Minimum deposit"}]} background="rings" ground="subtle" />
|
|
259
|
+
|
|
260
|
+
// halftone on strong
|
|
261
|
+
<Stats title="Trade with confidence" description="For over 25 years, a trusted partner of traders worldwide." stats={[{"value":"3M+","label":"Traders worldwide"},{"value":"250+","label":"Markets to trade"},{"value":"24/7","label":"Support in your language"},{"value":"$5","label":"Minimum deposit"}]} background="halftone" ground="strong" />
|
|
262
|
+
|
|
263
|
+
// aurora on strong
|
|
264
|
+
<Stats title="Trade with confidence" description="For over 25 years, a trusted partner of traders worldwide." stats={[{"value":"3M+","label":"Traders worldwide"},{"value":"250+","label":"Markets to trade"},{"value":"24/7","label":"Support in your language"},{"value":"$5","label":"Minimum deposit"}]} background="aurora" ground="strong" />
|
|
265
|
+
|
|
266
|
+
// mesh on strong
|
|
267
|
+
<Stats title="Trade with confidence" description="For over 25 years, a trusted partner of traders worldwide." stats={[{"value":"3M+","label":"Traders worldwide"},{"value":"250+","label":"Markets to trade"},{"value":"24/7","label":"Support in your language"},{"value":"$5","label":"Minimum deposit"}]} background="mesh" ground="strong" />
|
|
268
|
+
```
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<!-- GENERATED from stats-carousel.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# StatsCarousel
|
|
4
|
+
|
|
5
|
+
A heading over a card that turns through a few key figures, one at a time, with awards beside it.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
A trust band of key numbers told one at a time: a heading, a line under it where it needs one, and a square card in which the figures turn — the one in place large, the one before it smaller above, the next smaller below, a new one every motion.duration.hold. Beside the card, the awards behind the numbers, each between two laurels as the Awards block draws them: half at the card's start and half at its end from 62rem, two side by side under it below that.
|
|
10
|
+
|
|
11
|
+
The reference design's Stats. It holds while a reader rests a pointer on the card or focuses it, and stops for good once they press it; a reader who asked for less movement gets the figures two to a row in the card instead. Every figure is in the list the whole time, so a screen reader hears them all in order.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A trust band where each figure is a moment rather than a column to compare — monthly deals, customers, volume, years in business
|
|
16
|
+
- The figures stand beside the awards behind them
|
|
17
|
+
- A band between lighter sections that wants one moving thing in it
|
|
18
|
+
|
|
19
|
+
## Do not use
|
|
20
|
+
|
|
21
|
+
- Three to five figures a reader compares at a glance → `Stats`
|
|
22
|
+
- A page's full list of awards → `Awards`
|
|
23
|
+
- More than five figures. One turns in every second and a little; a sixth is waited for
|
|
24
|
+
- A figure a reader must not miss — a price, a fee. It is on screen for a moment at a time
|
|
25
|
+
- Two on one page, or beside another band that moves on its own
|
|
26
|
+
|
|
27
|
+
## Anatomy
|
|
28
|
+
|
|
29
|
+
StatsCarousel renders 17 elements. A token binding names the part it applies to.
|
|
30
|
+
|
|
31
|
+
- `root` — `<section>`, class `dds-statscarousel`. The band: a region named by its heading, on the ground `ground` paints, with the ink that goes with it.
|
|
32
|
+
- `inner` — `<div>`, class `dds-statscarousel__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the figures: space.heading.content.
|
|
33
|
+
- `header` — `<div>`, class `dds-statscarousel__header`. The heading and the line under it, FeatureCards' header and its arrangement: ranged to the start on a phone and centred from the fold. It sets no gap: each part's own margin is the step, so a heading with no line under it closes up.
|
|
34
|
+
- `title` — `<h2>`, class `dds-statscarousel__title`. What the numbers prove. `h2` because a section sits under the page's own heading.
|
|
35
|
+
- `description` — `<p>`, class `dds-statscarousel__description`. The line under the heading, at the description measure. Rendered only when `description` is set.
|
|
36
|
+
- `stage` — `<div>`, class `dds-statscarousel__stage`. The card and the awards beside it: the awards' two columns either side of the card from 62rem, and under it, side by side, below that.
|
|
37
|
+
- `card` — `<div>`, class `dds-statscarousel__card`. The square card the figures turn in, at radius.expressive, filled with the surface that stands off its ground — color.bg.surface on the page, the raised card's white on the subtle band, the inverse surface on the strong one — the figures above and below the one in place fading into it.
|
|
38
|
+
- `list` — `<ul>`, class `dds-statscarousel__list`. The figures. Turning, every figure stands in one cell and is moved off it — the one in place at its own size, the one before smaller above, the next smaller below, the rest out of sight — and the list is a tab stop named by the heading, so a keyboard can reach it and hold it still. Still, they are two to a row. Every figure is in the list, in order, the whole time.
|
|
39
|
+
- `item` — `<li>`, class `dds-statscarousel__item`. One figure: its value over its label, centred. `data-slot` says where it is on the turn.
|
|
40
|
+
- `value` — `<span>`, class `dds-statscarousel__value`. The figure, at font.figure-lg — one figure has the card to itself. Isolated, so a figure keeps its own order in a right-to-left line.
|
|
41
|
+
- `label` — `<span>`, class `dds-statscarousel__label`. What the figure counts, at font.body.lg in the band's quieter ink.
|
|
42
|
+
- `awards` — `<ul>`, class `dds-statscarousel__awards`. One column of award badges beside the card: the first half of `awards` at its start, the rest at its end. Rendered only when `awards` is set.
|
|
43
|
+
- `award` — `<li>`, class `dds-statscarousel__award`. As the Awards block draws it: One badge: a laurel, the award's words and the laurel mirrored, in a line and centred on each other. Never wider than size.grid.track-md: from the fold the badges grow to share a row and stop there, so a short row does not stretch a badge across the band; on a phone each is that wide and does not shrink.
|
|
44
|
+
- `award-laurel` — `<svg>`, class `dds-statscarousel__award-laurel`. As the Awards block draws it: A laurel branch, decorative and hidden from assistive technology, drawn in the band's quieter ink — color.fg.muted, or color.fg.muted-inverse on the dark band — at icon.size.md wide. One drawing, the second mirrored, so the two branches turn their leaves in toward the words; in a right-to-left page the mirroring swaps sides with them.
|
|
45
|
+
- `award-copy` — `<div>`, class `dds-statscarousel__award-copy`. As the Awards block draws it: The award's words between the laurels, centred, its name over its issuer at space.heading.title-description-compact.
|
|
46
|
+
- `award-name` — `<p>`, class `dds-statscarousel__award-name`. As the Awards block draws it: What the award was for, at font.label.sm — the weight that makes it the line read first.
|
|
47
|
+
- `award-issuer` — `<p>`, class `dds-statscarousel__award-issuer`. As the Awards block draws it: Who gave it, and the year, at font.body.sm under the name, in the same ink: the reference design sets the two apart by weight alone.
|
|
48
|
+
|
|
49
|
+
Apply these classes from the generated `statsCarouselParts` constant rather than writing the strings by hand.
|
|
50
|
+
|
|
51
|
+
## Composition
|
|
52
|
+
|
|
53
|
+
- Takes no children. Everything it renders comes from props
|
|
54
|
+
|
|
55
|
+
## Props
|
|
56
|
+
|
|
57
|
+
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
58
|
+
|
|
59
|
+
- `page` — The default, and the page's own white. A row of figures between two sections that need nothing to separate them
|
|
60
|
+
- `subtle` — The grey band, for a row of figures that should read as a section of its own without changing the page's voice. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
|
|
61
|
+
- `strong` — `color.bg.brand-strong`, the dark band, for a set of figures a reader should arrive at — a home page's "Trade with confidence". The heading and the figures turn white and the labels take color.fg.muted-inverse
|
|
62
|
+
|
|
63
|
+
Use when: Which of the page's three grounds this section paints, FeatureCards' axis and its reason: a band that wants to be seen as a band takes one of the other two, and the page decides the rhythm. The ink follows the ground — the heading and the figures in the band's own ink, the labels in its quieter one.
|
|
64
|
+
Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left. And never the brand's own coral, which is not offered: that ground belongs to the band that asks a reader to do something.
|
|
65
|
+
|
|
66
|
+
### title — `string` **Required.**
|
|
67
|
+
|
|
68
|
+
Use when: Always. What the numbers prove, in the fewest words — "Trade with confidence", "Deriv in numbers".
|
|
69
|
+
Never for: A figure. The figures are the content; the heading says what they add up to.
|
|
70
|
+
|
|
71
|
+
### description — `string`
|
|
72
|
+
|
|
73
|
+
Use when: A line under the heading, when the heading alone does not say whose numbers these are or since when — "For over 25 years, a trusted partner of traders worldwide."
|
|
74
|
+
Never for: A paragraph, or the figures again in words.
|
|
75
|
+
|
|
76
|
+
### stats — `data` `StatsFigure[]` **Required.**
|
|
77
|
+
|
|
78
|
+
Use when: Always. The figures, in the order they turn — three to five, each a short `value` exactly as it is to be read and a `label` of a few words. Two or more turn; one simply stands in the card. An empty list draws nothing.
|
|
79
|
+
Never for: A long value, or a label longer than one line: the card turns by one figure's height, and a figure that runs to two lines runs into the next.
|
|
80
|
+
|
|
81
|
+
### awards — `data` `Award[]`
|
|
82
|
+
|
|
83
|
+
Use when: Two to four awards the figures stand beside: the first half in a column at the card's start, the rest at its end; on a phone, the two columns side by side under the card. Each between two laurels, as the Awards block draws its badges, from the same records
|
|
84
|
+
Never for: A page's full list of awards — that is the Awards block — or more than four: a column of three beside a card reads as a list, not as the card's credentials
|
|
85
|
+
|
|
86
|
+
## Accessibility
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
- Announced as: `region`
|
|
91
|
+
- `Tab` — Moves past the section, from the fold. On a phone, while the wheel turns, Tab lands on the wheel — focus holds it still — and moves on from there; nothing in it is operable.
|
|
92
|
+
- accessible name from title, so the section is a named region a reader can jump to and skip
|
|
93
|
+
- Each figure is read as written, once — the final value is in the markup from the first render and the running number is hidden from assistive technology, so a screen reader never announces the numbers on the way.
|
|
94
|
+
- A reader who asked for less movement sees the final figures from the start, with no count.
|
|
95
|
+
- On a phone the wheel moves on its own, so it can be held and stopped (WCAG 2.2.2): it holds while a pointer rests on it or it has focus — it is a tab stop named by the heading while it turns — and stops for good once it is pressed. It turns only while on screen, and never for a reader who asked for less motion. Every figure stays in the list a screen reader counts, wherever it stands on the wheel; the dots are hidden from assistive technology.
|
|
96
|
+
|
|
97
|
+
## Rules
|
|
98
|
+
|
|
99
|
+
- **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.
|
|
100
|
+
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
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.
|
|
110
|
+
Guidance only — cannot be checked automatically.
|
|
111
|
+
- **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.
|
|
112
|
+
Guidance only — cannot be checked automatically.
|
|
113
|
+
- **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.
|
|
114
|
+
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
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.
|
|
118
|
+
Guidance only — cannot be checked automatically.
|
|
119
|
+
- **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.
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
Guidance only — cannot be checked automatically.
|
|
125
|
+
- **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.
|
|
126
|
+
|
|
127
|
+
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.
|
|
128
|
+
|
|
129
|
+
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.
|
|
130
|
+
|
|
131
|
+
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.
|
|
132
|
+
|
|
133
|
+
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.
|
|
134
|
+
|
|
135
|
+
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.
|
|
136
|
+
|
|
137
|
+
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.
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
Guidance only — cannot be checked automatically.
|
|
143
|
+
- **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.
|
|
144
|
+
|
|
145
|
+
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.
|
|
146
|
+
|
|
147
|
+
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.
|
|
148
|
+
|
|
149
|
+
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.
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
|
|
155
|
+
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.
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
Guidance only — cannot be checked automatically.
|
|
161
|
+
- **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.
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
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.
|
|
168
|
+
Guidance only — cannot be checked automatically.
|
|
169
|
+
- **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.
|
|
170
|
+
|
|
171
|
+
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.
|
|
172
|
+
|
|
173
|
+
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.
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
Guidance only — cannot be checked automatically.
|
|
177
|
+
|
|
178
|
+
## Anti-examples
|
|
179
|
+
|
|
180
|
+
❌ StatsCarousel for: Three to five figures a reader compares at a glance
|
|
181
|
+
Stats sets the figures in a row read all at once; this shows one at a time, so a reader waits for the one they want
|
|
182
|
+
→ use `Stats` instead.
|
|
183
|
+
|
|
184
|
+
❌ StatsCarousel for: A page's full list of awards
|
|
185
|
+
Awards is the awards as the section; here they stand beside the figures, two to four of them
|
|
186
|
+
→ use `Awards` instead.
|
|
187
|
+
|
|
188
|
+
## Example
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
import { StatsCarousel } from '@deriv-com/dds-marketing'
|
|
192
|
+
|
|
193
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} awards={[{"title":"Best Trading Experience - Global","issuer":"Ultimate Fintech 2025"},{"title":"Most Transparent Broker - Global","issuer":"Global Forex Awards 2025"},{"title":"Best Broker - Africa","issuer":"Global Forex Awards 2025"},{"title":"Best Trading Conditions - Global","issuer":"Finance Magnates 2025"}]} />
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## In use
|
|
197
|
+
|
|
198
|
+
### With and without awards
|
|
199
|
+
|
|
200
|
+
The awards stand beside the card, half at each side; without them the card stands alone.
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import { StatsCarousel } from '@deriv-com/dds-marketing'
|
|
204
|
+
|
|
205
|
+
// With awards
|
|
206
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} awards={[{"title":"Best Trading Experience - Global","issuer":"Ultimate Fintech 2025"},{"title":"Most Transparent Broker - Global","issuer":"Global Forex Awards 2025"},{"title":"Best Broker - Africa","issuer":"Global Forex Awards 2025"},{"title":"Best Trading Conditions - Global","issuer":"Finance Magnates 2025"}]} />
|
|
207
|
+
|
|
208
|
+
// Alone
|
|
209
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Grounds
|
|
213
|
+
|
|
214
|
+
The card takes the surface that stands off the ground it is on.
|
|
215
|
+
|
|
216
|
+
```tsx
|
|
217
|
+
import { StatsCarousel } from '@deriv-com/dds-marketing'
|
|
218
|
+
|
|
219
|
+
// page
|
|
220
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} ground="page" />
|
|
221
|
+
|
|
222
|
+
// subtle
|
|
223
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} ground="subtle" />
|
|
224
|
+
|
|
225
|
+
// strong
|
|
226
|
+
<StatsCarousel title="Trade with confidence" description="For over 25 years, Deriv Group has been a trusted partner of traders worldwide." stats={[{"value":"168M+","label":"Monthly deals"},{"value":"3M+","label":"Customers worldwide"},{"value":"$700B+","label":"Monthly volume"},{"value":"1999","label":"Established since"}]} ground="strong" />
|
|
227
|
+
```
|