@deriv-com/dds-marketing 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.llm/components/accordion.md +10 -0
- package/.llm/components/accordionitem.md +10 -0
- package/.llm/components/aspectratio.md +10 -0
- package/.llm/components/awards.md +10 -0
- package/.llm/components/background.md +52 -9
- package/.llm/components/badge.md +13 -3
- package/.llm/components/bottomsheet.md +13 -3
- package/.llm/components/breadcrumb.md +10 -0
- package/.llm/components/breadcrumbitem.md +10 -0
- package/.llm/components/button.md +13 -3
- package/.llm/components/buttonicon.md +17 -7
- package/.llm/components/card.md +11 -1
- package/.llm/components/cardbody.md +12 -2
- package/.llm/components/cardbutton.md +10 -0
- package/.llm/components/checkbox.md +7 -1
- package/.llm/components/comparisoncards.md +13 -3
- package/.llm/components/comparisontable.md +10 -0
- package/.llm/components/ctabanner.md +10 -0
- package/.llm/components/ctabannerslider.md +10 -0
- package/.llm/components/datatable.md +10 -0
- package/.llm/components/divider.md +10 -0
- package/.llm/components/documentlink.md +237 -0
- package/.llm/components/documents.md +268 -0
- package/.llm/components/downloadbanner.md +11 -1
- package/.llm/components/dropdownmenu.md +15 -5
- package/.llm/components/estimator.md +342 -0
- package/.llm/components/faqaccordion.md +10 -0
- package/.llm/components/featurebullets.md +10 -0
- package/.llm/components/featurecards.md +47 -3
- package/.llm/components/featurecardscarousel.md +11 -1
- package/.llm/components/featurescroll.md +10 -0
- package/.llm/components/featuresplit.md +10 -0
- package/.llm/components/featurestack.md +10 -0
- package/.llm/components/featuretabs.md +369 -0
- package/.llm/components/filterchip.md +11 -1
- package/.llm/components/footer.md +10 -0
- package/.llm/components/footergroup.md +10 -0
- package/.llm/components/grid.md +34 -1
- package/.llm/components/icon.md +15 -5
- package/.llm/components/illustrationcard.md +56 -2
- package/.llm/components/illustrationcheck.md +193 -0
- package/.llm/components/illustrationchoice.md +187 -0
- package/.llm/components/illustrationcode.md +192 -0
- package/.llm/components/illustrationlist.md +175 -0
- package/.llm/components/illustrationscene.md +33 -3
- package/.llm/components/imagebanner.md +35 -6
- package/.llm/components/landinghero.md +10 -0
- package/.llm/components/link.md +12 -2
- package/.llm/components/logocolumns.md +11 -1
- package/.llm/components/logorows.md +46 -2
- package/.llm/components/menuitem.md +12 -2
- package/.llm/components/navbar.md +11 -1
- package/.llm/components/navbaritem.md +10 -0
- package/.llm/components/navbarmenu.md +10 -0
- package/.llm/components/navbarmenugroup.md +10 -0
- package/.llm/components/navbarpanel.md +10 -0
- package/.llm/components/navbarswitcher.md +16 -6
- package/.llm/components/navbarswitcheroption.md +10 -0
- package/.llm/components/option.md +11 -1
- package/.llm/components/pageheader.md +10 -0
- package/.llm/components/pagination.md +10 -0
- package/.llm/components/paginationdots.md +10 -0
- package/.llm/components/producthero.md +33 -4
- package/.llm/components/progressbar.md +305 -0
- package/.llm/components/removablechip.md +11 -1
- package/.llm/components/resourcebanner.md +10 -0
- package/.llm/components/row.md +10 -0
- package/.llm/components/scenescroll.md +42 -24
- package/.llm/components/scenescrollword.md +267 -0
- package/.llm/components/scroller.md +10 -0
- package/.llm/components/searchinput.md +10 -0
- package/.llm/components/segmentedcontrol.md +33 -2
- package/.llm/components/segmentedcontrolitem.md +12 -2
- package/.llm/components/select.md +10 -0
- package/.llm/components/selectchip.md +10 -0
- package/.llm/components/spinner.md +10 -0
- package/.llm/components/stack.md +10 -0
- package/.llm/components/stats.md +50 -1
- package/.llm/components/statscarousel.md +227 -0
- package/.llm/components/statusdot.md +45 -1
- package/.llm/components/steps.md +10 -0
- package/.llm/components/stickycards.md +10 -0
- package/.llm/components/subdomainnavbar.md +11 -1
- package/.llm/components/tab.md +12 -2
- package/.llm/components/table.md +10 -0
- package/.llm/components/tablebody.md +10 -0
- package/.llm/components/tablecell.md +10 -0
- package/.llm/components/tablehead.md +10 -0
- package/.llm/components/tableheadercell.md +10 -0
- package/.llm/components/tablerow.md +10 -0
- package/.llm/components/tablist.md +10 -0
- package/.llm/components/teamgrid.md +10 -0
- package/.llm/components/testimonialrow.md +47 -3
- package/.llm/components/testimonialslider.md +12 -2
- package/.llm/components/textarea.md +10 -0
- package/.llm/components/textinput.md +11 -1
- package/.llm/components/textscroll.md +10 -0
- package/.llm/components/tiers.md +17 -7
- package/.llm/components/tooltip.md +6 -0
- package/.llm/components/typography.md +67 -1
- package/.llm/digest/accordion.md +1 -1
- package/.llm/digest/accordionitem.md +1 -1
- package/.llm/digest/aspectratio.md +1 -1
- package/.llm/digest/awards.md +1 -1
- package/.llm/digest/background.md +14 -6
- package/.llm/digest/badge.md +1 -1
- package/.llm/digest/bottomsheet.md +1 -1
- package/.llm/digest/breadcrumb.md +1 -1
- package/.llm/digest/breadcrumbitem.md +1 -1
- package/.llm/digest/button.md +2 -2
- package/.llm/digest/buttonicon.md +2 -2
- package/.llm/digest/card.md +1 -1
- package/.llm/digest/cardbody.md +1 -1
- package/.llm/digest/cardbutton.md +1 -1
- package/.llm/digest/checkbox.md +1 -1
- package/.llm/digest/comparisoncards.md +1 -1
- package/.llm/digest/comparisontable.md +1 -1
- package/.llm/digest/ctabanner.md +1 -1
- package/.llm/digest/ctabannerslider.md +1 -1
- package/.llm/digest/datatable.md +1 -1
- package/.llm/digest/divider.md +1 -1
- package/.llm/digest/documentlink.md +52 -0
- package/.llm/digest/documents.md +51 -0
- package/.llm/digest/downloadbanner.md +2 -2
- package/.llm/digest/dropdownmenu.md +1 -1
- package/.llm/digest/estimator.md +66 -0
- package/.llm/digest/faqaccordion.md +1 -1
- package/.llm/digest/featurebullets.md +1 -1
- package/.llm/digest/featurecards.md +8 -1
- package/.llm/digest/featurecardscarousel.md +1 -1
- package/.llm/digest/featurescroll.md +1 -1
- package/.llm/digest/featuresplit.md +1 -1
- package/.llm/digest/featurestack.md +1 -1
- package/.llm/digest/featuretabs.md +50 -0
- package/.llm/digest/filterchip.md +1 -1
- package/.llm/digest/footer.md +1 -1
- package/.llm/digest/footergroup.md +1 -1
- package/.llm/digest/grid.md +2 -1
- package/.llm/digest/icon.md +1 -1
- package/.llm/digest/illustrationcard.md +7 -2
- package/.llm/digest/illustrationcheck.md +42 -0
- package/.llm/digest/illustrationchoice.md +43 -0
- package/.llm/digest/illustrationcode.md +41 -0
- package/.llm/digest/illustrationlist.md +38 -0
- package/.llm/digest/illustrationscene.md +5 -3
- package/.llm/digest/imagebanner.md +11 -5
- package/.llm/digest/landinghero.md +1 -1
- package/.llm/digest/link.md +1 -1
- package/.llm/digest/logocolumns.md +2 -2
- package/.llm/digest/logorows.md +9 -2
- package/.llm/digest/menuitem.md +1 -1
- package/.llm/digest/navbar.md +1 -1
- package/.llm/digest/navbaritem.md +1 -1
- package/.llm/digest/navbarmenu.md +1 -1
- package/.llm/digest/navbarmenugroup.md +1 -1
- package/.llm/digest/navbarpanel.md +1 -1
- package/.llm/digest/navbarswitcher.md +1 -1
- package/.llm/digest/navbarswitcheroption.md +1 -1
- package/.llm/digest/option.md +1 -1
- package/.llm/digest/pageheader.md +1 -1
- package/.llm/digest/pagination.md +1 -1
- package/.llm/digest/paginationdots.md +1 -1
- package/.llm/digest/producthero.md +9 -3
- package/.llm/digest/progressbar.md +56 -0
- package/.llm/digest/removablechip.md +1 -1
- package/.llm/digest/resourcebanner.md +1 -1
- package/.llm/digest/row.md +1 -1
- package/.llm/digest/scenescroll.md +7 -6
- package/.llm/digest/scenescrollword.md +56 -0
- package/.llm/digest/scroller.md +1 -1
- package/.llm/digest/searchinput.md +1 -1
- package/.llm/digest/segmentedcontrol.md +4 -1
- package/.llm/digest/segmentedcontrolitem.md +2 -2
- package/.llm/digest/select.md +1 -1
- package/.llm/digest/selectchip.md +1 -1
- package/.llm/digest/spinner.md +1 -1
- package/.llm/digest/stack.md +1 -1
- package/.llm/digest/stats.md +9 -1
- package/.llm/digest/statscarousel.md +48 -0
- package/.llm/digest/statusdot.md +8 -1
- package/.llm/digest/steps.md +1 -1
- package/.llm/digest/stickycards.md +1 -1
- package/.llm/digest/subdomainnavbar.md +1 -1
- package/.llm/digest/tab.md +1 -1
- package/.llm/digest/table.md +1 -1
- package/.llm/digest/tablebody.md +1 -1
- package/.llm/digest/tablecell.md +1 -1
- package/.llm/digest/tablehead.md +1 -1
- package/.llm/digest/tableheadercell.md +1 -1
- package/.llm/digest/tablerow.md +1 -1
- package/.llm/digest/tablist.md +1 -1
- package/.llm/digest/teamgrid.md +1 -1
- package/.llm/digest/testimonialrow.md +9 -2
- package/.llm/digest/testimonialslider.md +2 -2
- package/.llm/digest/textarea.md +1 -1
- package/.llm/digest/textinput.md +1 -1
- package/.llm/digest/textscroll.md +1 -1
- package/.llm/digest/tiers.md +1 -1
- package/.llm/digest/typography.md +19 -1
- package/.llm/index.md +15 -4
- package/.llm/rules.md +10 -0
- package/.llm/tokens.md +13 -3
- package/AGENTS.md +14 -2
- package/README.md +28 -3
- package/dist/components/arrival.d.ts +32 -0
- package/dist/components/arrival.js +140 -0
- package/dist/components/arrives.d.ts +17 -0
- package/dist/components/arrives.js +14 -0
- package/dist/components/blocks/awards/Awards.js +2 -27
- package/dist/components/blocks/block-pattern.css +23 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -12
- package/dist/components/blocks/documents/Documents.css +90 -0
- package/dist/components/blocks/documents/Documents.d.ts +22 -0
- package/dist/components/blocks/documents/Documents.js +30 -0
- package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
- package/dist/components/blocks/documents/Documents.types.js +14 -0
- package/dist/components/blocks/documents/documents-impl.css +103 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
- package/dist/components/blocks/estimator/Estimator.css +206 -0
- package/dist/components/blocks/estimator/Estimator.d.ts +27 -0
- package/dist/components/blocks/estimator/Estimator.js +61 -0
- package/dist/components/blocks/estimator/Estimator.types.d.ts +63 -0
- package/dist/components/blocks/estimator/Estimator.types.js +25 -0
- package/dist/components/blocks/estimator/estimator-impl.css +159 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
- package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +2 -1
- package/dist/components/blocks/image-banner/ImageBanner.js +3 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +10 -8
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +78 -71
- package/dist/components/blocks/laurel.d.ts +16 -0
- package/dist/components/blocks/laurel.js +28 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
- package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
- package/dist/components/blocks/pattern-tone.d.ts +11 -0
- package/dist/components/blocks/pattern-tone.js +7 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +2 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +8 -3
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -1
- package/dist/components/blocks/product-hero/product-hero-impl.css +54 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +6 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.js +8 -7
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +61 -44
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
- package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
- package/dist/components/blocks/stats/Stats.d.ts +2 -1
- package/dist/components/blocks/stats/Stats.js +17 -14
- package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
- package/dist/components/blocks/stats/stats-impl.css +4 -1
- package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
- package/dist/components/blocks/stats/use-wheel.js +8 -4
- package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
- package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
- package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
- package/dist/components/core/background/Background.css +19 -0
- package/dist/components/core/background/Background.types.d.ts +2 -1
- package/dist/components/core/background/background-impl.css +47 -15
- package/dist/components/core/background/halftone.js +1 -1
- package/dist/components/core/button/Button.css +5 -5
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.css +5 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
- package/dist/components/core/document-link/DocumentLink.css +59 -0
- package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
- package/dist/components/core/document-link/DocumentLink.js +21 -0
- package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
- package/dist/components/core/document-link/DocumentLink.types.js +11 -0
- package/dist/components/core/document-link/document-link-impl.css +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
- package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +113 -0
- package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
- package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
- package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
- package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
- package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
- package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
- package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
- package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
- package/dist/components/core/illustration-list/IllustrationList.css +19 -0
- package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
- package/dist/components/core/illustration-list/IllustrationList.js +18 -0
- package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
- package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
- package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
- package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
- package/dist/components/core/link/link-impl.css +5 -19
- package/dist/components/core/progress-bar/ProgressBar.css +101 -0
- package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
- package/dist/components/core/progress-bar/ProgressBar.js +34 -0
- package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
- package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
- package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
- package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +1 -1
- package/dist/components/core/select/Select.css +2 -0
- package/dist/components/core/select/select-impl.css +58 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
- package/dist/components/core/status-dot/StatusDot.js +7 -4
- package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
- package/dist/components/core/status-dot/status-dot-impl.css +101 -0
- package/dist/components/core/text-area/TextArea.css +2 -0
- package/dist/components/core/text-area/text-area-impl.css +54 -0
- package/dist/components/core/text-input/TextInput.css +2 -0
- package/dist/components/core/text-input/text-input-impl.css +63 -0
- package/dist/components/core/typography/Typography.d.ts +3 -283
- package/dist/components/core/typography/Typography.js +9 -1
- package/dist/components/core/typography/Typography.types.d.ts +9 -15
- package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
- package/dist/components/core/typography/TypographyMotion.js +43 -0
- package/dist/components/core/typography/typography-impl.css +106 -0
- package/dist/components/estimator-data.d.ts +29 -0
- package/dist/components/estimator-data.js +12 -0
- package/dist/components/illustration-data.d.ts +15 -0
- package/dist/components/illustration-data.js +7 -0
- package/dist/components/index.d.ts +25 -1
- package/dist/components/index.js +22 -0
- package/dist/components/layout/grid/Grid.css +5 -0
- package/dist/components/layout/grid/Grid.types.d.ts +2 -1
- package/dist/components/scene-scroll-data.d.ts +35 -0
- package/dist/components/tiers-data.d.ts +3 -2
- package/dist/icons/accounts.d.ts +1 -0
- package/dist/icons/accounts.js +1 -0
- package/dist/icons/app-stores.d.ts +1 -0
- package/dist/icons/app-stores.js +1 -0
- package/dist/icons/currency.d.ts +1 -0
- package/dist/icons/currency.js +1 -0
- package/dist/icons/flag.d.ts +1 -0
- package/dist/icons/flag.js +1 -0
- package/dist/icons/illustrative.d.ts +1 -0
- package/dist/icons/illustrative.js +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/markets.d.ts +1 -0
- package/dist/icons/markets.js +1 -0
- package/dist/icons/social.d.ts +1 -0
- package/dist/icons/social.js +1 -0
- package/dist/icons/system.d.ts +1 -0
- package/dist/icons/system.js +1 -0
- package/dist/icons/trade.d.ts +1 -0
- package/dist/icons/trade.js +1 -0
- package/dist/marketing.css +26 -6
- package/package.json +44 -2
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing specificity,
|
|
5
|
+
* so each is decided against the generated rule on its own terms.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Each scene is a screen tall, the photograph behind and the words over it.
|
|
10
|
+
*
|
|
11
|
+
* This is the whole of the layout wherever the scroll does not drive the change-over — a browser
|
|
12
|
+
* with no scroll timeline, a reader who asked for less motion, the page before any script: two
|
|
13
|
+
* scenes one after the other, each its own screen, every word at full strength and nothing pinned.
|
|
14
|
+
* The rules further down only add the track, the pin and the dissolve on top of it.
|
|
15
|
+
*
|
|
16
|
+
* `100cqh` rather than `100svh`, LandingHero's reason: with no ancestor declaring size containment
|
|
17
|
+
* a container query length falls back to the small viewport, so on a real page the two are the same
|
|
18
|
+
* number — the small viewport, measured with the browser's chrome showing, so a phone's address bar
|
|
19
|
+
* coming and going never resizes the scene mid-scroll as `vh` would. What the container unit adds
|
|
20
|
+
* is a frame standing in for a window: the preview's frame declares `container-type: size`, and the
|
|
21
|
+
* scene measures against that rather than escaping it. The section's own `container-type` is
|
|
22
|
+
* `inline-size`, which answers no question about height, so the unit passes straight through it.
|
|
23
|
+
* A screen is a length no token holds, which is why it is written here.
|
|
24
|
+
*
|
|
25
|
+
* `min-block-size`, so a scene whose words run long grows rather than clipping them.
|
|
26
|
+
*/
|
|
27
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
28
|
+
min-block-size: 100cqh;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* The photograph fills its scene, edge to edge, cropped to fill — the scene is a shape the screen
|
|
33
|
+
* decided, and a photograph letterboxed in it would show the band through the gaps.
|
|
34
|
+
*
|
|
35
|
+
* Stacking order inside the scene, which `isolation` on the scene keeps to itself: the photograph
|
|
36
|
+
* at the back, the words over it. An integer with no unit, which is why it is here.
|
|
37
|
+
*/
|
|
38
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__media {
|
|
39
|
+
inset: 0;
|
|
40
|
+
z-index: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__image {
|
|
44
|
+
block-size: 100%;
|
|
45
|
+
inline-size: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
49
|
+
z-index: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* The words sit straight on the photograph, in the ink the scene names.
|
|
54
|
+
*
|
|
55
|
+
* No scrim: the photograph is shown as it was taken, and the words are drawn in whichever ink it
|
|
56
|
+
* leaves room for — color.fg.on-media-light, near-black in both modes, over a light photograph such
|
|
57
|
+
* as a daylight sky, and the section's own color.fg.on-brand-strong, white, over a dark one. The
|
|
58
|
+
* photograph does not change with the theme, so neither ink does. The block cannot see the
|
|
59
|
+
* photograph, so the scene says which, and the author answers for the contrast.
|
|
60
|
+
*
|
|
61
|
+
* On the scene, so its title and its line take it together, and inherited through the scene even
|
|
62
|
+
* where the scroll lays the scenes out as `display: contents`.
|
|
63
|
+
*/
|
|
64
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-ink="dark"] {
|
|
65
|
+
color: var(--color-fg-on-media-light);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* A title with nothing under it carries no step under it.
|
|
70
|
+
*/
|
|
71
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__title:last-child {
|
|
72
|
+
margin-block-end: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Where the words sit, the reference design's arrangement.
|
|
77
|
+
*
|
|
78
|
+
* Below 62rem — the reference's 992px, the same bound FeatureCards takes from it — the words are at
|
|
79
|
+
* the top of the stage and start at the edge, under the room a navigation bar takes: size.bar-height
|
|
80
|
+
* and the section's own step over it, about the reference's 112. From 62rem they are centred down
|
|
81
|
+
* the stage and still start at the edge, in a column capped at the heading group's measure: the
|
|
82
|
+
* reference design's later arrangement, which leaves the far side of the photograph to its subject
|
|
83
|
+
* rather than writing over the middle of it. On either side of the bound the words start, so the
|
|
84
|
+
* eye finds the same edge on every line and a photograph composed for one width holds at the other.
|
|
85
|
+
*
|
|
86
|
+
* Longhand because `var()` is not permitted in a container query condition; `61.9375rem` is the last
|
|
87
|
+
* width below that bound. The section declares the container, and these are rules on what is inside
|
|
88
|
+
* it, which is the only thing a container query can style.
|
|
89
|
+
*/
|
|
90
|
+
@container (max-width: 61.9375rem) {
|
|
91
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
92
|
+
justify-content: flex-start;
|
|
93
|
+
padding-block-start: calc(var(--size-bar-height) + var(--space-section-default));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* The words keep to the page's content column.
|
|
99
|
+
*
|
|
100
|
+
* They start, from 62rem as below it, so on a wide window they would otherwise sit at the page's
|
|
101
|
+
* gutter while every section around them starts at the edge of size.content.max. The photograph
|
|
102
|
+
* still fills the band edge to edge; only the words and the action are inset, by the page's gutter or
|
|
103
|
+
* by however much the window is wider than the content column on each side, whichever is more —
|
|
104
|
+
* where the column starts in ImageBanner, FeatureCards and the rest.
|
|
105
|
+
*
|
|
106
|
+
* Named once on the section, because three boxes take it: each scene and the action in the plain
|
|
107
|
+
* fallback, and the stage, which carries the insets while the scroll drives the change-over.
|
|
108
|
+
*/
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword {
|
|
110
|
+
--dds-scenescrollword-column-inset: max(var(--space-inset-page), calc((100% - var(--size-content-max)) / 2));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene,
|
|
114
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__action {
|
|
115
|
+
padding-inline: var(--dds-scenescrollword-column-inset);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* The photographs are anchored at their foot, as the reference's are, so a crop takes from the sky
|
|
120
|
+
* rather than from the ground the scene stands on.
|
|
121
|
+
*/
|
|
122
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__image {
|
|
123
|
+
object-position: bottom;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/*
|
|
127
|
+
* The change-over, scrubbed by the scroll.
|
|
128
|
+
*
|
|
129
|
+
* The section becomes the track: two and a half screens tall, `250cqh` (the small viewport on a
|
|
130
|
+
* real page, for the reason above). The stage pins to the top of the window for the length of it,
|
|
131
|
+
* a screen tall, with both scenes stacked in its one cell, the second over the first. That leaves a
|
|
132
|
+
* screen and a half of scrolling while the stage holds still, which is the reference design's
|
|
133
|
+
* 250vh track and its 150vh of travel, without `vh`.
|
|
134
|
+
*
|
|
135
|
+
* The section names a view timeline, and the second photograph dissolves in down it from 20% to
|
|
136
|
+
* 80% of `contain` — the stretch in which the track covers the whole window, which
|
|
137
|
+
* is exactly the stretch the stage is pinned for. The words run down the same timeline, and how is
|
|
138
|
+
* set out with them at the end of this file.
|
|
139
|
+
*
|
|
140
|
+
* The photograph takes the whole stretch, so the place changes under the words while they do. A fifth of the stretch is held still at each end, so a reader arriving sees
|
|
141
|
+
* the first scene settled and one leaving sees the second. The reference ran the change over the
|
|
142
|
+
* middle third of the section's whole pass; this is the same middle, measured on the pin.
|
|
143
|
+
*
|
|
144
|
+
* Linear, because the scroll is the easing. Only one end of each fade is written — the other is
|
|
145
|
+
* the element's own resting opacity — so nothing here restates full strength as a number, and
|
|
146
|
+
* opacity.hidden is the role for what a reveal fades from.
|
|
147
|
+
*
|
|
148
|
+
* Only for a reader who has not asked for less motion, and only where a scroll timeline exists —
|
|
149
|
+
* asked around the rules rather than undone after them, because an undoing reset that loses to a
|
|
150
|
+
* more specific rule leaves the movement running for exactly the reader who asked it not to. Both
|
|
151
|
+
* conditions false is the layout at the top of this file: two scenes, one after the other.
|
|
152
|
+
*
|
|
153
|
+
* The timeline and the pin both measure against the nearest scroll container, which is why nothing
|
|
154
|
+
* between the section and the page may clip with `overflow: hidden`: `hidden` makes a box a scroll
|
|
155
|
+
* container even when it never scrolls, which freezes the dissolve and unpins the stage. The stage
|
|
156
|
+
* clips with `overflow: clip`, which does neither.
|
|
157
|
+
*/
|
|
158
|
+
@keyframes dds-scenescrollword-arrive {
|
|
159
|
+
from {
|
|
160
|
+
opacity: var(--opacity-hidden);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@keyframes dds-scenescrollword-leave {
|
|
165
|
+
to {
|
|
166
|
+
opacity: var(--opacity-hidden);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@supports (animation-timeline: view()) {
|
|
171
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
172
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword {
|
|
173
|
+
block-size: 250cqh;
|
|
174
|
+
view-timeline: --dds-scenescrollword-track block;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
178
|
+
inset-block-start: 0;
|
|
179
|
+
min-block-size: 100cqh;
|
|
180
|
+
overflow: clip;
|
|
181
|
+
position: sticky;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__media {
|
|
185
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
186
|
+
animation-range: contain 20% contain 80%;
|
|
187
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/*
|
|
193
|
+
* The action sits right under the words, whichever scene's words are showing.
|
|
194
|
+
*
|
|
195
|
+
* It belongs to the section rather than to a scene, so it does not fade with either. While the
|
|
196
|
+
* scenes change over, both scenes' words are laid into one grid area of the stage — the scenes
|
|
197
|
+
* themselves step out of the way (`display: contents`), so their photographs and their words become
|
|
198
|
+
* the stage's own items — and that area is as tall as the taller of the two. The action is the row
|
|
199
|
+
* under it, at space.heading.description-actions, the step from words to what a reader can do: under
|
|
200
|
+
* the text on every screen, and still while the text changes over it.
|
|
201
|
+
*
|
|
202
|
+
* Below 62rem the words and the action sit at the top of the stage, under the room a navigation bar
|
|
203
|
+
* takes; from 62rem they are centred down the stage, the empty rows above and below sharing what is
|
|
204
|
+
* left, and start at the edge with the words on both sides of the bound. The stage carries the section's insets here, since the scenes that held them are contents.
|
|
205
|
+
*
|
|
206
|
+
* In the plain fallback, where the scenes stack, the action is the stage's last row, under the second
|
|
207
|
+
* scene, on the band's own ground, with its own insets.
|
|
208
|
+
*/
|
|
209
|
+
@supports (animation-timeline: view()) {
|
|
210
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
211
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
212
|
+
grid-template-areas:
|
|
213
|
+
'words'
|
|
214
|
+
'action'
|
|
215
|
+
'.';
|
|
216
|
+
grid-template-columns: minmax(0, 1fr);
|
|
217
|
+
grid-template-rows: auto auto 1fr;
|
|
218
|
+
padding-block: calc(var(--size-bar-height) + var(--space-section-default)) var(--space-section-default);
|
|
219
|
+
padding-inline: var(--dds-scenescrollword-column-inset);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
223
|
+
display: contents;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__media {
|
|
227
|
+
inset: 0;
|
|
228
|
+
z-index: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
232
|
+
grid-area: words;
|
|
233
|
+
z-index: 1;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__action {
|
|
237
|
+
grid-area: action;
|
|
238
|
+
margin-block-start: var(--space-heading-description-actions);
|
|
239
|
+
padding: 0;
|
|
240
|
+
z-index: 1;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@container (min-width: 62rem) {
|
|
246
|
+
@supports (animation-timeline: view()) {
|
|
247
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
248
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
249
|
+
grid-template-areas:
|
|
250
|
+
'.'
|
|
251
|
+
'words'
|
|
252
|
+
'action'
|
|
253
|
+
'.';
|
|
254
|
+
grid-template-rows: 1fr auto auto 1fr;
|
|
255
|
+
padding-block: var(--space-section-default);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/*
|
|
262
|
+
* One claim, one word changed.
|
|
263
|
+
*
|
|
264
|
+
* The word's slot stacks the scene's own word and the other scene's in one cell, so the slot is as
|
|
265
|
+
* wide as the wider of the two and both titles lay out alike — the shared words before and after
|
|
266
|
+
* it in the same places, the words starting at the same point, at every width and in either
|
|
267
|
+
* direction. `start` is the reading side, so in a right-to-left page the words share their right
|
|
268
|
+
* edge. The other scene's word holds its room and is never drawn; it is kept from assistive
|
|
269
|
+
* technology in the markup, since the heading it belongs to is read in full.
|
|
270
|
+
*
|
|
271
|
+
* Wherever the scroll does not drive the change-over this is all there is: two scenes one after
|
|
272
|
+
* the other, each with its whole heading, "Trade all day" and then "Trade all night".
|
|
273
|
+
*/
|
|
274
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__word > * {
|
|
275
|
+
grid-area: 1 / 1;
|
|
276
|
+
justify-self: start;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__word > [data-word="other"] {
|
|
280
|
+
visibility: hidden;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/*
|
|
284
|
+
* Under the scroll, the scenes' words do not fade as wholes, as SceneScroll's do. Both headings lie
|
|
285
|
+
* in the one area of the stage, the second exactly over the first, and:
|
|
286
|
+
*
|
|
287
|
+
* the first scene's line fades out from 20% to 45%, as its words did;
|
|
288
|
+
* the first scene's word fades out as the second's fades in, from 45% to 55% — the stretch in
|
|
289
|
+
* which neither line is showing, so nothing but the word is moving;
|
|
290
|
+
* the second scene's line fades in from 55% to 80%.
|
|
291
|
+
*
|
|
292
|
+
* The second heading's shared words, before the word and after it, are never drawn here: the
|
|
293
|
+
* first's hold still over the whole pass, and two copies of the same words crossing would dip at
|
|
294
|
+
* the middle. They keep their opacity rather than their visibility so they stay in the
|
|
295
|
+
* accessibility tree, and the second heading is read whole.
|
|
296
|
+
*
|
|
297
|
+
* The words cross rather than one waiting for the other, because they share a place: a gap where
|
|
298
|
+
* the claim is missing its word reads as a fault, the reference's reason for crossing them in
|
|
299
|
+
* a few hundredths of the pass. A tenth here, slow enough to be seen to change.
|
|
300
|
+
*/
|
|
301
|
+
@supports (animation-timeline: view()) {
|
|
302
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
303
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__before,
|
|
304
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__after {
|
|
305
|
+
opacity: var(--opacity-hidden);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* Where the scenes name different inks the shared words cannot hold still in the first scene's:
|
|
310
|
+
* near-black words would be left on a night photograph. So they cross with the word instead,
|
|
311
|
+
* the first scene's out as the second's come in, over the same tenth of the pass — the same
|
|
312
|
+
* words in the same place, so what is seen is the claim changing colour as one piece.
|
|
313
|
+
*
|
|
314
|
+
* The second scene's are given back their resting strength first: the rule above leaves them
|
|
315
|
+
* undrawn, and an arrival comes up to whatever the element rests at.
|
|
316
|
+
*/
|
|
317
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-ink-change] .dds-scenescrollword__scene[data-scene="first"] :is(.dds-scenescrollword__before, .dds-scenescrollword__after) {
|
|
318
|
+
animation: dds-scenescrollword-leave linear both;
|
|
319
|
+
animation-range: contain 45% contain 55%;
|
|
320
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-ink-change] .dds-scenescrollword__scene[data-scene="second"] :is(.dds-scenescrollword__before, .dds-scenescrollword__after) {
|
|
324
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
325
|
+
animation-range: contain 45% contain 55%;
|
|
326
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
327
|
+
opacity: initial;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="first"] .dds-scenescrollword__description {
|
|
331
|
+
animation: dds-scenescrollword-leave linear both;
|
|
332
|
+
animation-range: contain 20% contain 45%;
|
|
333
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="first"] .dds-scenescrollword__word {
|
|
337
|
+
animation: dds-scenescrollword-leave linear both;
|
|
338
|
+
animation-range: contain 45% contain 55%;
|
|
339
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__word {
|
|
343
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
344
|
+
animation-range: contain 45% contain 55%;
|
|
345
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__description {
|
|
349
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
350
|
+
animation-range: contain 55% contain 80%;
|
|
351
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/*
|
|
357
|
+
* From 62rem the words keep to half the stage.
|
|
358
|
+
*
|
|
359
|
+
* The words start at the edge and the photograph's subject is on the far side, but the heading
|
|
360
|
+
* group's measure alone is most of a laptop's width: a title in a few words ran three quarters of
|
|
361
|
+
* the way across and over the face it was meant to sit beside. Held to half the stage, or the
|
|
362
|
+
* heading group's measure where that is narrower, the title wraps in the words' own half and the
|
|
363
|
+
* other half is the subject's — the reference design's left column. Below 62rem the words run the
|
|
364
|
+
* width, at the top of a photograph whose subject is below them.
|
|
365
|
+
*/
|
|
366
|
+
@container (min-width: 62rem) {
|
|
367
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
368
|
+
max-inline-size: min(var(--size-heading-group-max), 50%);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './Stats.css';
|
|
2
2
|
import './stats-impl.css';
|
|
3
3
|
import '../block-reveal.css';
|
|
4
|
+
import '../block-pattern.css';
|
|
4
5
|
import { type StatsProps } from './Stats.types.js';
|
|
5
6
|
export type { StatsProps };
|
|
6
7
|
/**
|
|
@@ -21,4 +22,4 @@ export type { StatsProps };
|
|
|
21
22
|
*
|
|
22
23
|
* `'use client'` for the count, the arrival, and `useId`, which names the region by its heading.
|
|
23
24
|
*/
|
|
24
|
-
export declare function Stats({ ground, title, description, stats }: StatsProps): import("react").JSX.Element | null;
|
|
25
|
+
export declare function Stats({ ground, background, title, description, stats, }: StatsProps): import("react").JSX.Element | null;
|
|
@@ -4,12 +4,15 @@ import { useCallback, useId, useLayoutEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import './Stats.css';
|
|
5
5
|
import './stats-impl.css';
|
|
6
6
|
import '../block-reveal.css';
|
|
7
|
+
import '../block-pattern.css';
|
|
7
8
|
import { given } from '../../given.js';
|
|
8
9
|
import { milliseconds } from '../../css-time.js';
|
|
9
10
|
import { arriving, useReveal } from '../use-reveal.js';
|
|
10
11
|
import { countable, easing, partway } from './stats-count.js';
|
|
11
12
|
import { slotOf, useWheel } from './use-wheel.js';
|
|
12
13
|
import { statsDefaults, statsParts } from './Stats.types.js';
|
|
14
|
+
import { Background } from '../../core/background/Background.js';
|
|
15
|
+
import { PATTERN_TONE } from '../pattern-tone.js';
|
|
13
16
|
/**
|
|
14
17
|
* Where a figure comes in the arrival, capped so a long set does not keep a reader waiting.
|
|
15
18
|
*
|
|
@@ -37,7 +40,7 @@ const stepOf = (at) => Math.min(FIRST_FIGURE + at, LAST_STEP);
|
|
|
37
40
|
*
|
|
38
41
|
* `'use client'` for the count, the arrival, and `useId`, which names the region by its heading.
|
|
39
42
|
*/
|
|
40
|
-
export function Stats({ ground = statsDefaults.ground, title, description, stats }) {
|
|
43
|
+
export function Stats({ ground = statsDefaults.ground, background, title, description, stats, }) {
|
|
41
44
|
const titleId = useId();
|
|
42
45
|
const [band, revealed] = useReveal();
|
|
43
46
|
const held = useRef(null);
|
|
@@ -104,17 +107,17 @@ export function Stats({ ground = statsDefaults.ground, title, description, stats
|
|
|
104
107
|
// Nothing to show is nothing drawn: a named region with no figure in it leads nowhere.
|
|
105
108
|
if (figures === 0)
|
|
106
109
|
return null;
|
|
107
|
-
return (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
return (_jsxs("section", { className: statsParts.root, ref: section, "data-ground": ground, "data-background": background, "aria-labelledby": titleId, children: [background ? _jsx(Background, { tone: PATTERN_TONE[ground], pattern: background, children: null }) : null, _jsxs("div", { className: statsParts.inner, ref: hold, "data-revealed": revealed, children: [_jsxs("div", { className: statsParts.header, children: [_jsx("h2", { className: statsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: statsParts.description, ...arriving(1), children: description })) : null] }), _jsx("span", { className: statsParts.dots, "aria-hidden": "true", ...(wheeling ? arriving(FIRST_FIGURE) : {}), children: stats.map((_, at) => (_jsx("span", { className: statsParts.dot, "data-current": wheeling && at === turn % figures }, at))) }), _jsx("ul", { className: statsParts.list, role: "list", "data-wheel": wheeling || undefined, tabIndex: wheeling ? 0 : undefined, "aria-labelledby": wheeling ? titleId : undefined, ...(wheeling ? { ...arriving(FIRST_FIGURE), ...holdWheel } : {}), children: stats.map((figure, at) => {
|
|
111
|
+
const step = stepOf(at);
|
|
112
|
+
const number = elapsed === null || timing === null ? null : countable(figure.value);
|
|
113
|
+
// The share of its count this figure has run, from its own arrival rather than the
|
|
114
|
+
// section's — so each number starts climbing as it starts to rise.
|
|
115
|
+
const share = number === null || timing === null || elapsed === null
|
|
116
|
+
? 1
|
|
117
|
+
: timing.curve(Math.min(Math.max((elapsed - step * timing.stagger) / timing.duration, 0), 1));
|
|
118
|
+
const counting = number !== null && share < 1;
|
|
119
|
+
return (
|
|
120
|
+
// A figure's position is its identity: the set is a list, and nothing reorders it.
|
|
121
|
+
_jsxs("li", { className: statsParts.item, "data-slot": wheeling ? slotOf(at, turn, figures) : undefined, ...(wheeling ? {} : arriving(step)), children: [_jsxs("span", { className: statsParts.value, "data-counting": counting, children: [_jsx("span", { className: statsParts.amount, children: _jsx("bdi", { children: figure.value }) }), _jsx("span", { className: statsParts.count, "aria-hidden": "true", children: counting ? _jsx("bdi", { children: partway(number, share) }) : null })] }), _jsx("span", { className: statsParts.label, children: figure.label })] }, at));
|
|
122
|
+
}) })] })] }));
|
|
120
123
|
}
|
|
@@ -6,6 +6,14 @@ export interface StatsOwnProps {
|
|
|
6
6
|
* `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
|
|
7
7
|
*/
|
|
8
8
|
ground?: 'page' | 'subtle' | 'strong';
|
|
9
|
+
/**
|
|
10
|
+
* `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.
|
|
11
|
+
* `aurora` — Curtains of the brand's light rising from the band's foot and swaying slowly.
|
|
12
|
+
* `mesh` — The band in the brand's reds folded into one another like a liquid — the loudest of the five, for a dark band.
|
|
13
|
+
* `grid` — Hairlines a pitch apart rising from a soft bloom at the band's foot — the quietest, and the one to reach for first.
|
|
14
|
+
* `rings` — Hairline circles spreading out from the middle of the band's foot.
|
|
15
|
+
*/
|
|
16
|
+
background?: 'halftone' | 'aurora' | 'mesh' | 'grid' | 'rings';
|
|
9
17
|
/** Always. What the numbers prove, in the fewest words — "Trade with confidence", "Deriv in numbers". */
|
|
10
18
|
title: string;
|
|
11
19
|
/** 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." */
|
|
@@ -91,9 +91,12 @@
|
|
|
91
91
|
|
|
92
92
|
/*
|
|
93
93
|
* The wheel is a tab stop while it turns — focus holds it still — so it shows where focus is. The
|
|
94
|
-
*
|
|
94
|
+
* fade goes while it holds focus: a mask fades everything the list paints, its ring too, so the
|
|
95
|
+
* ring's top and foot would vanish into it — and a reader on the keyboard, holding the wheel still,
|
|
96
|
+
* is the one reader who wants every figure plainly.
|
|
95
97
|
*/
|
|
96
98
|
:where([data-dds-context="marketing"]) .dds-stats .dds-stats__list[data-wheel]:focus-visible {
|
|
99
|
+
mask-image: none;
|
|
97
100
|
outline: var(--border-width-focus) solid var(--color-border-focus);
|
|
98
101
|
outline-offset: calc(-1 * var(--border-width-focus));
|
|
99
102
|
}
|
|
@@ -24,7 +24,7 @@ export declare function slotOf(at: number, turn: number, count: number): WheelSl
|
|
|
24
24
|
* - the section is on screen. A wheel nobody can see does not turn, and starts again where it was;
|
|
25
25
|
* - nothing holds or has stopped it — see `hold`.
|
|
26
26
|
*/
|
|
27
|
-
export declare function useWheel(section: RefObject<HTMLElement | null>, count: number): {
|
|
27
|
+
export declare function useWheel(section: RefObject<HTMLElement | null>, count: number, always?: boolean): {
|
|
28
28
|
wheeling: boolean;
|
|
29
29
|
turn: number;
|
|
30
30
|
hold: {
|
|
@@ -39,7 +39,7 @@ export function slotOf(at, turn, count) {
|
|
|
39
39
|
* - the section is on screen. A wheel nobody can see does not turn, and starts again where it was;
|
|
40
40
|
* - nothing holds or has stopped it — see `hold`.
|
|
41
41
|
*/
|
|
42
|
-
export function useWheel(section, count) {
|
|
42
|
+
export function useWheel(section, count, always = false) {
|
|
43
43
|
const [narrow, setNarrow] = useState(false);
|
|
44
44
|
const [seen, setSeen] = useState(false);
|
|
45
45
|
const [turn, setTurn] = useState(0);
|
|
@@ -54,7 +54,11 @@ export function useWheel(section, count) {
|
|
|
54
54
|
*/
|
|
55
55
|
const [held, setHeld] = useState(false);
|
|
56
56
|
const [stopped, setStopped] = useState(false);
|
|
57
|
-
|
|
57
|
+
// Whether there is anything to turn. The section is not in the page while there is not — the
|
|
58
|
+
// blocks draw nothing for an empty list — so the observers below attach once there is.
|
|
59
|
+
const present = count > 0;
|
|
60
|
+
// A carousel turns at every width; the row of figures turns only below the fold.
|
|
61
|
+
const wheeling = (always || narrow) && count > 1 && !still;
|
|
58
62
|
// Asked live rather than once: a reader who turns on reduced motion mid-visit stops the wheel then.
|
|
59
63
|
useEffect(() => {
|
|
60
64
|
if (typeof window.matchMedia !== 'function')
|
|
@@ -81,7 +85,7 @@ export function useWheel(section, count) {
|
|
|
81
85
|
const observer = new ResizeObserver(measure);
|
|
82
86
|
observer.observe(element);
|
|
83
87
|
return () => observer.disconnect();
|
|
84
|
-
}, [section]);
|
|
88
|
+
}, [section, present]);
|
|
85
89
|
useEffect(() => {
|
|
86
90
|
const element = section.current;
|
|
87
91
|
if (element === null || typeof IntersectionObserver === 'undefined')
|
|
@@ -89,7 +93,7 @@ export function useWheel(section, count) {
|
|
|
89
93
|
const observer = new IntersectionObserver(([entry]) => setSeen(entry?.isIntersecting ?? false));
|
|
90
94
|
observer.observe(element);
|
|
91
95
|
return () => observer.disconnect();
|
|
92
|
-
}, [section]);
|
|
96
|
+
}, [section, present]);
|
|
93
97
|
useEffect(() => {
|
|
94
98
|
const element = section.current;
|
|
95
99
|
if (!wheeling || !seen || held || stopped || element === null)
|