@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,63 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { EstimatorResult } from '../../estimator-data.js';
|
|
3
|
+
export interface EstimatorOwnProps {
|
|
4
|
+
/**
|
|
5
|
+
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
6
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
7
|
+
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough
|
|
8
|
+
*/
|
|
9
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
10
|
+
/**
|
|
11
|
+
* `stacked` — The default. The heading centred above a wide card, the inputs beside the results — a calculator with several fields and several figures, where the two panels each need room
|
|
12
|
+
* `split` — The heading and a few lines beside the card, the inputs above the results inside it — a compact tool a page introduces in its own words, a converter or a single estimate
|
|
13
|
+
*/
|
|
14
|
+
layout?: 'stacked' | 'split';
|
|
15
|
+
/** Always. What the tool works out, in a few words — 'Trading calculator', 'Buy crypto in seconds', 'Estimate your earnings'. */
|
|
16
|
+
title: string;
|
|
17
|
+
/** A line or two under the title saying what the figures are for or where they come from — 'Live prices, updated every few seconds'. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** A heading over the inputs panel, where the two panels need naming — 'Calculator' over the fields and 'Results' over the figures. Leave both out for a tool whose fields name themselves. */
|
|
20
|
+
inputsLabel?: string;
|
|
21
|
+
/** Always. The fields the reader fills in — Select, TextInput, SearchInput, SegmentedControl, a slider — in the order they are filled. The page owns their values and works the results out from them. */
|
|
22
|
+
inputs: ReactNode;
|
|
23
|
+
/** A tool that works its figures out when asked rather than as the reader types — a calculation too slow or too costly to run on every keystroke, or one where half-filled fields would show figures that mislead. 'Calculate', whose press calls the page's own handler, and 'Reset' beside it to clear the fields. They share the row; on a phone they stack and each fills the width. */
|
|
24
|
+
inputActions?: ReactNode;
|
|
25
|
+
/** Whenever inputActions holds a Calculate button: Enter in any of the fields calls it, as the button's own press does — wire the button's onClick to the same function. The page works the figures out and passes them as `results`; the results panel announces them. */
|
|
26
|
+
onCalculate?: () => void;
|
|
27
|
+
/** A heading over the results panel, with inputsLabel — 'Results', 'You receive'. */
|
|
28
|
+
resultsLabel?: string;
|
|
29
|
+
/** The figures the inputs produce, in reading order — a `label`, a `value` written exactly as it is to be read, and an optional `note`. Pass an empty list until the inputs are complete, and the panel shows `emptyMessage` instead. Each change is announced politely, so a reader using a screen reader hears the new figures without being interrupted. */
|
|
30
|
+
results: EstimatorResult[];
|
|
31
|
+
/** What the results panel says before there are figures to show — 'Choose an instrument to see the results'. Translate it with the page. */
|
|
32
|
+
emptyMessage?: string;
|
|
33
|
+
/** The one thing a reader does once they have their figures — 'Open an account', 'Trade now', 'Become a partner'. Under the results, where the reader's eye already is. */
|
|
34
|
+
action?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export type EstimatorProps = EstimatorOwnProps;
|
|
37
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
38
|
+
export declare const estimatorParts: {
|
|
39
|
+
readonly root: "dds-estimator";
|
|
40
|
+
readonly inner: "dds-estimator__inner";
|
|
41
|
+
readonly header: "dds-estimator__header";
|
|
42
|
+
readonly title: "dds-estimator__title";
|
|
43
|
+
readonly description: "dds-estimator__description";
|
|
44
|
+
readonly tool: "dds-estimator__tool";
|
|
45
|
+
readonly panels: "dds-estimator__panels";
|
|
46
|
+
readonly inputs: "dds-estimator__inputs";
|
|
47
|
+
readonly 'inputs-label': "dds-estimator__inputs-label";
|
|
48
|
+
readonly results: "dds-estimator__results";
|
|
49
|
+
readonly 'results-label': "dds-estimator__results-label";
|
|
50
|
+
readonly list: "dds-estimator__list";
|
|
51
|
+
readonly result: "dds-estimator__result";
|
|
52
|
+
readonly 'result-label': "dds-estimator__result-label";
|
|
53
|
+
readonly 'result-value': "dds-estimator__result-value";
|
|
54
|
+
readonly 'result-note': "dds-estimator__result-note";
|
|
55
|
+
readonly empty: "dds-estimator__empty";
|
|
56
|
+
readonly action: "dds-estimator__action";
|
|
57
|
+
readonly 'input-actions': "dds-estimator__input-actions";
|
|
58
|
+
};
|
|
59
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
60
|
+
export declare const estimatorDefaults: {
|
|
61
|
+
readonly ground: "page";
|
|
62
|
+
readonly layout: "stacked";
|
|
63
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// GENERATED from estimator.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const estimatorParts = {
|
|
4
|
+
root: 'dds-estimator',
|
|
5
|
+
inner: 'dds-estimator__inner',
|
|
6
|
+
header: 'dds-estimator__header',
|
|
7
|
+
title: 'dds-estimator__title',
|
|
8
|
+
description: 'dds-estimator__description',
|
|
9
|
+
tool: 'dds-estimator__tool',
|
|
10
|
+
panels: 'dds-estimator__panels',
|
|
11
|
+
inputs: 'dds-estimator__inputs',
|
|
12
|
+
'inputs-label': 'dds-estimator__inputs-label',
|
|
13
|
+
results: 'dds-estimator__results',
|
|
14
|
+
'results-label': 'dds-estimator__results-label',
|
|
15
|
+
list: 'dds-estimator__list',
|
|
16
|
+
result: 'dds-estimator__result',
|
|
17
|
+
'result-label': 'dds-estimator__result-label',
|
|
18
|
+
'result-value': 'dds-estimator__result-value',
|
|
19
|
+
'result-note': 'dds-estimator__result-note',
|
|
20
|
+
empty: 'dds-estimator__empty',
|
|
21
|
+
action: 'dds-estimator__action',
|
|
22
|
+
'input-actions': 'dds-estimator__input-actions',
|
|
23
|
+
};
|
|
24
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
25
|
+
export const estimatorDefaults = { ground: 'page', layout: 'stacked' };
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
* The Card fills the tool. The tool part is the box in the section's layout; the Card inside it is
|
|
10
|
+
* the surface, and it takes the whole of the tool's width rather than its content's.
|
|
11
|
+
*/
|
|
12
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__tool > .dds-card {
|
|
13
|
+
flex: auto;
|
|
14
|
+
/*
|
|
15
|
+
* Card clips so a picture meets its corner; this card holds no picture, and the clip cut the
|
|
16
|
+
* results panel's shadow off where the panel sits close to the card's edge, which left it flat.
|
|
17
|
+
*/
|
|
18
|
+
overflow: visible;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* The page's fields wrap their words only when a word does not fit. The section breaks anywhere so a
|
|
23
|
+
* long title cannot push the page wide, and that is inherited — but in a field it let the suffix
|
|
24
|
+
* and the panel heading give up their width a letter at a time whenever the panel was tight, "lots"
|
|
25
|
+
* stood on its end beside the box. `break-word` still wraps a word too long for the line, and keeps
|
|
26
|
+
* every word whole while there is room for it.
|
|
27
|
+
*/
|
|
28
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__inputs {
|
|
29
|
+
overflow-wrap: break-word;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* A centred heading centres its measure too, so the line under it sits under the title. */
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="stacked"] .dds-estimator__description {
|
|
34
|
+
margin-inline: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* The figures read along a row of digits that change as a reader types, so the digits keep one
|
|
39
|
+
* width: a value going from 1,111 to 8,888 does not shuffle the currency beside it.
|
|
40
|
+
*/
|
|
41
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result-value {
|
|
42
|
+
font-variant-numeric: tabular-nums;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* The figures in two columns from the fold, each ruled off beneath — four read as a block of answers
|
|
47
|
+
* beside the fields that made them, and the figures at h4 keep a column each rather than a line
|
|
48
|
+
* each. One column on a phone, where half the panel is too narrow for a figure at that size.
|
|
49
|
+
*/
|
|
50
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__list {
|
|
51
|
+
display: grid;
|
|
52
|
+
grid-template-columns: minmax(0, 1fr);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@container (min-width: 48rem) {
|
|
56
|
+
/*
|
|
57
|
+
* Calculate and Reset share the row under the fields, a half each: neither is the smaller one, and
|
|
58
|
+
* two buttons of different widths under a column of full-width fields read as unfinished. Only
|
|
59
|
+
* from the fold, where they sit side by side — in the phone's column a zero basis is a zero
|
|
60
|
+
* height, and the buttons collapsed to a sliver.
|
|
61
|
+
*/
|
|
62
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__input-actions > * {
|
|
63
|
+
flex: 1 1 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__list {
|
|
67
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* A figure left on its own — the one figure of a converter, the last of an odd set — takes the
|
|
71
|
+
whole row rather than half of it beside an empty cell. */
|
|
72
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result:last-child:nth-child(odd) {
|
|
73
|
+
grid-column: 1 / -1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
* The white panel sits close to the card's edge — space.inset.xs from it, where the fields keep the
|
|
79
|
+
* card's full inset. The panel is a surface of its own, and a wide grey margin round it read as a
|
|
80
|
+
* card inside a card; close to the edge it reads as the card's other half.
|
|
81
|
+
*
|
|
82
|
+
* Pulled out by the difference between the two insets. In a column — a phone, and `split` — that is
|
|
83
|
+
* both sides and the foot; beside the fields it is the top, the foot and the far side.
|
|
84
|
+
*/
|
|
85
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__results {
|
|
86
|
+
margin-block-end: calc(var(--space-inset-xs) - var(--space-inset-card));
|
|
87
|
+
margin-inline: calc(var(--space-inset-xs) - var(--space-inset-card));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@container (min-width: 48rem) {
|
|
91
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="stacked"] .dds-estimator__results {
|
|
92
|
+
margin-block: calc(var(--space-inset-xs) - var(--space-inset-card));
|
|
93
|
+
margin-inline-start: 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* From the fold, under `stacked`: the inputs beside the results, two equal panels. A calculator's
|
|
99
|
+
* fields and its figures are read side by side — change one, watch the other.
|
|
100
|
+
*
|
|
101
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
|
|
102
|
+
* width the rest of this package folds at.
|
|
103
|
+
*/
|
|
104
|
+
@container (min-width: 48rem) {
|
|
105
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="stacked"] .dds-estimator__panels {
|
|
106
|
+
flex-direction: row;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="stacked"] :is(.dds-estimator__inputs, .dds-estimator__results) {
|
|
110
|
+
flex: 1 1 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/*
|
|
115
|
+
* At full width, under `split`: the heading beside the card, two equal halves — the reference
|
|
116
|
+
* converter's columns, so the tool reads as wide as the words that introduce it. The panels stay one
|
|
117
|
+
* column inside the card, the inputs above the figures.
|
|
118
|
+
*
|
|
119
|
+
* `64rem`, the width a split of words and a tool can both breathe in; below it the heading goes back
|
|
120
|
+
* above the card, at the start.
|
|
121
|
+
*/
|
|
122
|
+
@container (min-width: 64rem) {
|
|
123
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="split"] .dds-estimator__inner {
|
|
124
|
+
align-items: center;
|
|
125
|
+
flex-direction: row;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="split"] :is(.dds-estimator__header, .dds-estimator__tool) {
|
|
129
|
+
flex: 1 1 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/*
|
|
134
|
+
* On a phone the way onward fills the panel, as every section's actions do — the package's rule:
|
|
135
|
+
* a thumb reaches a full-width button, and a short one stranded at the start reads as an aside.
|
|
136
|
+
*/
|
|
137
|
+
@container (max-width: 47.9375rem) {
|
|
138
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__action > * {
|
|
139
|
+
inline-size: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* And the inputs' own buttons stack, each the full width. */
|
|
143
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__input-actions {
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* The card on the grey band — ComparisonCards' rule for the same card. Card's recessed fill is the
|
|
150
|
+
* band's grey and vanishes, so it takes the raised fill. The block knows its ground and the card does
|
|
151
|
+
* not, so the answer is here rather than in Card.
|
|
152
|
+
*
|
|
153
|
+
* Nothing for the dark band: there the tool is drawn in the dark theme (see Estimator.tsx), which
|
|
154
|
+
* turns the card, the rules between figures, the muted ink and the page's own fields round together.
|
|
155
|
+
*/
|
|
156
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-ground="subtle"] .dds-estimator__tool > .dds-card {
|
|
157
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
158
|
+
}
|
|
159
|
+
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './FeatureCards.css';
|
|
2
2
|
import './feature-cards-impl.css';
|
|
3
3
|
import '../block-reveal.css';
|
|
4
|
+
import '../block-pattern.css';
|
|
4
5
|
import '../block-parallax.css';
|
|
5
6
|
import { type FeatureCardsProps } from './FeatureCards.types.js';
|
|
6
7
|
export type { FeatureCardsProps };
|
|
@@ -23,4 +24,4 @@ export type { FeatureCardsProps };
|
|
|
23
24
|
* a step behind the one before, in reading order. `'use client'` for that and for `useId`, which
|
|
24
25
|
* names the region by its heading.
|
|
25
26
|
*/
|
|
26
|
-
export declare function FeatureCards({ ground, title, description, link, children, }: FeatureCardsProps): import("react").JSX.Element;
|
|
27
|
+
export declare function FeatureCards({ ground, background, title, description, link, children, }: FeatureCardsProps): import("react").JSX.Element;
|
|
@@ -4,11 +4,14 @@ import { useId } from 'react';
|
|
|
4
4
|
import './FeatureCards.css';
|
|
5
5
|
import './feature-cards-impl.css';
|
|
6
6
|
import '../block-reveal.css';
|
|
7
|
+
import '../block-pattern.css';
|
|
7
8
|
import '../block-parallax.css';
|
|
8
9
|
import { given } from '../../given.js';
|
|
9
10
|
import { cardsOf } from '../cards-of.js';
|
|
10
11
|
import { arriving, useReveal } from '../use-reveal.js';
|
|
11
12
|
import { featureCardsDefaults, featureCardsParts } from './FeatureCards.types.js';
|
|
13
|
+
import { Background } from '../../core/background/Background.js';
|
|
14
|
+
import { PATTERN_TONE } from '../pattern-tone.js';
|
|
12
15
|
/**
|
|
13
16
|
* Where a card comes in the arrival, capped so a long set does not keep a reader waiting.
|
|
14
17
|
*
|
|
@@ -38,13 +41,13 @@ const LAST_STEP = FIRST_CARD + 3;
|
|
|
38
41
|
* a step behind the one before, in reading order. `'use client'` for that and for `useId`, which
|
|
39
42
|
* names the region by its heading.
|
|
40
43
|
*/
|
|
41
|
-
export function FeatureCards({ ground = featureCardsDefaults.ground, title, description, link, children, }) {
|
|
44
|
+
export function FeatureCards({ ground = featureCardsDefaults.ground, background, title, description, link, children, }) {
|
|
42
45
|
const titleId = useId();
|
|
43
46
|
const [band, revealed] = useReveal();
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
return (_jsxs("section", { className: featureCardsParts.root, "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: featureCardsParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: featureCardsParts.header, children: [_jsx("h2", { className: featureCardsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: featureCardsParts.description, ...arriving(1), children: description })) : null, link ? (_jsx("div", { className: featureCardsParts.link, ...arriving(2), children: link })) : null] }), _jsx("div", { className: featureCardsParts.grid, children: cardsOf(children).map(({ key, card }, at) => (
|
|
48
|
+
/* Each card in a cell of its own, and the cell is what arrives: the card is the page's
|
|
49
|
+
element and keeps its own transitions, which an arrival set on it would overwrite.
|
|
50
|
+
Keyed by the card's own key, made unique across fragments by cardsOf, so a set the
|
|
51
|
+
page reorders moves its cards rather than remounting them. */
|
|
52
|
+
_jsx("div", { className: featureCardsParts.item, ...arriving(Math.min(FIRST_CARD + at, LAST_STEP)), children: card }, key))) })] })] }));
|
|
50
53
|
}
|
|
@@ -2,10 +2,18 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export interface FeatureCardsOwnProps {
|
|
3
3
|
/**
|
|
4
4
|
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
5
|
-
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
5
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
6
6
|
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
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 cards are, in the fewest words that name them — "Why trade with Deriv", "Markets you can trade". */
|
|
10
18
|
title: string;
|
|
11
19
|
/** A line saying what the set has in common, when the title alone does not. */
|
|
@@ -217,10 +217,10 @@
|
|
|
217
217
|
/*
|
|
218
218
|
* And a dark card is lifted a step in dark mode.
|
|
219
219
|
*
|
|
220
|
-
* accent-strong is
|
|
220
|
+
* accent-strong is slate.900, and in dark mode the subtle band is a white tint over near-black that
|
|
221
221
|
* lands within a shade of it — the card blended into the band the way the light card did in light
|
|
222
|
-
* mode. color.bg.surface-card-strong-raised is the same
|
|
223
|
-
* already stands off the band, and
|
|
222
|
+
* mode. color.bg.surface-card-strong-raised is the same slate.900 in light, where the dark card
|
|
223
|
+
* already stands off the band, and slate.800 in dark, a step up so it lifts off it. The ink is
|
|
224
224
|
* unchanged: white on either.
|
|
225
225
|
*/
|
|
226
226
|
:where([data-dds-context="marketing"])
|
|
@@ -230,6 +230,18 @@
|
|
|
230
230
|
background-color: var(--color-bg-surface-card-strong-raised);
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
/*
|
|
234
|
+
* On the strong band the dark card is lifted a step too. accent-strong paints the band's own
|
|
235
|
+
* slate.900, so on color.bg.brand-strong it was the band with a corner; it takes
|
|
236
|
+
* color.bg.surface-card-strong-on-brand-strong, a step lighter, in both modes.
|
|
237
|
+
*/
|
|
238
|
+
:where([data-dds-context="marketing"])
|
|
239
|
+
.dds-featurecards[data-ground="strong"]
|
|
240
|
+
.dds-featurecards__item
|
|
241
|
+
> :is(.dds-card, .dds-cardbutton)[data-variant="accent-strong"] {
|
|
242
|
+
background-color: var(--color-bg-surface-card-strong-on-brand-strong);
|
|
243
|
+
}
|
|
244
|
+
|
|
233
245
|
/*
|
|
234
246
|
* And a plain card is raised off it.
|
|
235
247
|
*
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export interface FeatureCardsCarouselOwnProps {
|
|
3
3
|
/**
|
|
4
4
|
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
5
|
-
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
5
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
6
6
|
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
7
7
|
*/
|
|
8
8
|
ground?: 'page' | 'subtle' | 'strong';
|
|
@@ -160,6 +160,18 @@
|
|
|
160
160
|
background-color: var(--color-bg-surface-card-strong-raised);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/*
|
|
164
|
+
* On the strong band the dark card is lifted a step too. accent-strong paints the band's own
|
|
165
|
+
* slate.900, so on color.bg.brand-strong it was the band with a corner; it takes
|
|
166
|
+
* color.bg.surface-card-strong-on-brand-strong, a step lighter, in both modes.
|
|
167
|
+
*/
|
|
168
|
+
:where([data-dds-context="marketing"])
|
|
169
|
+
.dds-featurecardscarousel[data-ground="strong"]
|
|
170
|
+
.dds-featurecardscarousel__item
|
|
171
|
+
> :is(.dds-card, .dds-cardbutton)[data-variant="accent-strong"] {
|
|
172
|
+
background-color: var(--color-bg-surface-card-strong-on-brand-strong);
|
|
173
|
+
}
|
|
174
|
+
|
|
163
175
|
:where([data-dds-context="marketing"])
|
|
164
176
|
.dds-featurecardscarousel[data-ground="subtle"]
|
|
165
177
|
.dds-featurecardscarousel__item
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* GENERATED from featuretabs.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
display: flex;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
overflow-wrap: anywhere;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__inner {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
inline-size: 100%;
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
max-inline-size: var(--size-content-max);
|
|
19
|
+
padding-block: var(--space-section-default);
|
|
20
|
+
padding-inline: var(--space-inset-page);
|
|
21
|
+
row-gap: var(--space-heading-content);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__header {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
row-gap: var(--space-heading-title-description);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__title {
|
|
32
|
+
margin-block: 0;
|
|
33
|
+
text-wrap: balance;
|
|
34
|
+
font-family: var(--font-h2-family);
|
|
35
|
+
font-size: var(--font-h2-size);
|
|
36
|
+
font-weight: var(--font-h2-weight);
|
|
37
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
38
|
+
line-height: var(--font-h2-line-height);
|
|
39
|
+
max-inline-size: var(--size-measure-heading);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__description {
|
|
43
|
+
margin-block: 0;
|
|
44
|
+
font-family: var(--font-body-md-family);
|
|
45
|
+
font-size: var(--font-body-md-size);
|
|
46
|
+
font-weight: var(--font-body-md-weight);
|
|
47
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
48
|
+
line-height: var(--font-body-md-line-height);
|
|
49
|
+
max-inline-size: var(--size-measure-description);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__tabs {
|
|
53
|
+
display: flex;
|
|
54
|
+
max-inline-size: 100%;
|
|
55
|
+
min-inline-size: 0;
|
|
56
|
+
margin-block-start: var(--space-heading-description-actions);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__panel {
|
|
60
|
+
min-inline-size: 0;
|
|
61
|
+
row-gap: var(--space-gap-none);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs .dds-featuretabs__footnote {
|
|
65
|
+
margin-block: 0;
|
|
66
|
+
font-family: var(--font-body-sm-family);
|
|
67
|
+
font-size: var(--font-body-sm-size);
|
|
68
|
+
font-weight: var(--font-body-sm-weight);
|
|
69
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
70
|
+
line-height: var(--font-body-sm-line-height);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="page"] {
|
|
74
|
+
background-color: var(--color-bg-page);
|
|
75
|
+
color: var(--color-fg-default);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="page"] .dds-featuretabs__footnote {
|
|
79
|
+
color: var(--color-fg-muted);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="strong"] {
|
|
83
|
+
background-color: var(--color-bg-brand-strong);
|
|
84
|
+
color: var(--color-fg-on-brand-strong);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="strong"] .dds-featuretabs__footnote {
|
|
88
|
+
color: var(--color-fg-muted-inverse);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="subtle"] {
|
|
92
|
+
background-color: var(--color-bg-page);
|
|
93
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
94
|
+
color: var(--color-fg-default);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where([data-dds-context="marketing"]) .dds-featuretabs[data-ground="subtle"] .dds-featuretabs__footnote {
|
|
98
|
+
color: var(--color-fg-muted);
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './FeatureTabs.css';
|
|
3
|
+
import './feature-tabs-impl.css';
|
|
4
|
+
import '../block-reveal.css';
|
|
5
|
+
import { type FeatureTabsProps } from './FeatureTabs.types.js';
|
|
6
|
+
export type { FeatureTabsProps };
|
|
7
|
+
/**
|
|
8
|
+
* Versions of one thing, one at a time — the reference design's OptionsTypes, made general.
|
|
9
|
+
*
|
|
10
|
+
* The section owns what the versions share — the heading, the tab strip and which tab is showing —
|
|
11
|
+
* and the page composes what each tab shows, one child per name in `labels`. A name without a child
|
|
12
|
+
* is not drawn, and neither is a child without a name. Two or more tabs get the strip; one is drawn
|
|
13
|
+
* with nothing to choose.
|
|
14
|
+
*
|
|
15
|
+
* Only the tab showing is in the page, so a picture playing in one stops when the reader turns to
|
|
16
|
+
* another — the reference stops its animations by hand, and an unmounted one has nothing to stop.
|
|
17
|
+
*
|
|
18
|
+
* It arrives the way every block does: the heading, its line, the tabs, then the content.
|
|
19
|
+
* `'use client'` for that, the selected tab, and `useId`, which names the region by its heading.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FeatureTabs({ ground, title, description, labels, footnote, children, }: FeatureTabsProps & {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children, useId, useState } from 'react';
|
|
4
|
+
import './FeatureTabs.css';
|
|
5
|
+
import './feature-tabs-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { Tab } from '../../core/tab/Tab.js';
|
|
8
|
+
import { TabList } from '../../core/tab-list/TabList.js';
|
|
9
|
+
import { given } from '../../given.js';
|
|
10
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
11
|
+
import { featureTabsDefaults, featureTabsParts } from './FeatureTabs.types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Versions of one thing, one at a time — the reference design's OptionsTypes, made general.
|
|
14
|
+
*
|
|
15
|
+
* The section owns what the versions share — the heading, the tab strip and which tab is showing —
|
|
16
|
+
* and the page composes what each tab shows, one child per name in `labels`. A name without a child
|
|
17
|
+
* is not drawn, and neither is a child without a name. Two or more tabs get the strip; one is drawn
|
|
18
|
+
* with nothing to choose.
|
|
19
|
+
*
|
|
20
|
+
* Only the tab showing is in the page, so a picture playing in one stops when the reader turns to
|
|
21
|
+
* another — the reference stops its animations by hand, and an unmounted one has nothing to stop.
|
|
22
|
+
*
|
|
23
|
+
* It arrives the way every block does: the heading, its line, the tabs, then the content.
|
|
24
|
+
* `'use client'` for that, the selected tab, and `useId`, which names the region by its heading.
|
|
25
|
+
*/
|
|
26
|
+
export function FeatureTabs({ ground = featureTabsDefaults.ground, title, description, labels, footnote, children, }) {
|
|
27
|
+
const titleId = useId();
|
|
28
|
+
const [band, revealed] = useReveal();
|
|
29
|
+
// The selected tab by its name rather than its place, so a list of names that changes under it
|
|
30
|
+
// keeps the reader on the same tab where it is still there, and goes to the first where it is not.
|
|
31
|
+
const [selected, setSelected] = useState(null);
|
|
32
|
+
// A record from a feed or an editor is not typed, so the names are checked rather than trusted.
|
|
33
|
+
const names = Array.isArray(labels) ? labels : [];
|
|
34
|
+
const panels = Children.toArray(children);
|
|
35
|
+
const count = Math.min(names.length, panels.length);
|
|
36
|
+
const at = Math.max(0, selected === null ? 0 : names.slice(0, count).indexOf(selected));
|
|
37
|
+
return (_jsx("section", { className: featureTabsParts.root, "data-ground": ground, "aria-labelledby": titleId, children: _jsxs("div", { className: featureTabsParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: featureTabsParts.header, children: [_jsx("h2", { className: featureTabsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: featureTabsParts.description, ...arriving(1), children: description })) : null, _jsx("div", { className: featureTabsParts.tabs, ...arriving(2), children: count > 1 ? (_jsx(TabList, { label: title, value: String(at), onChange: (value) => setSelected(names[Number(value)] ?? null), children: names.slice(0, count).map((name, index) => (_jsx(Tab, { value: String(index), label: name }, index))) })) : null })] }), _jsx("div", { className: featureTabsParts.panel, ...arriving(3), children: count > 0 ? panels[at] : null }), given(footnote) ? (_jsx("p", { className: featureTabsParts.footnote, ...arriving(4), children: footnote })) : null] }) }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface FeatureTabsOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
5
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice — the reference design's slate FAQ. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section.
|
|
6
|
+
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The tab strip turns round with it: white names, a rule in the band's own veil and a focus ring drawn for the dark, fixed like the band
|
|
7
|
+
*/
|
|
8
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
9
|
+
/** Always. What the versions are of, in a few words — "Types of digital options". It names the section and the tabs */
|
|
10
|
+
title: string;
|
|
11
|
+
/** A line under the heading saying what the tabs have in common */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Always. The tabs' names, in a word or two each, in the order of the children they choose between — the first names the first child. A name without a child is not drawn */
|
|
14
|
+
labels: string[];
|
|
15
|
+
/** Small print every tab shares — that what is offered varies by platform or device */
|
|
16
|
+
footnote?: string;
|
|
17
|
+
/** Allowed: any content */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export type FeatureTabsProps = FeatureTabsOwnProps;
|
|
21
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
22
|
+
export declare const featureTabsParts: {
|
|
23
|
+
readonly root: "dds-featuretabs";
|
|
24
|
+
readonly inner: "dds-featuretabs__inner";
|
|
25
|
+
readonly header: "dds-featuretabs__header";
|
|
26
|
+
readonly title: "dds-featuretabs__title";
|
|
27
|
+
readonly description: "dds-featuretabs__description";
|
|
28
|
+
readonly tabs: "dds-featuretabs__tabs";
|
|
29
|
+
readonly panel: "dds-featuretabs__panel";
|
|
30
|
+
readonly footnote: "dds-featuretabs__footnote";
|
|
31
|
+
};
|
|
32
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
33
|
+
export declare const featureTabsDefaults: {
|
|
34
|
+
readonly ground: "page";
|
|
35
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED from feature-tabs.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const featureTabsParts = {
|
|
4
|
+
root: 'dds-featuretabs',
|
|
5
|
+
inner: 'dds-featuretabs__inner',
|
|
6
|
+
header: 'dds-featuretabs__header',
|
|
7
|
+
title: 'dds-featuretabs__title',
|
|
8
|
+
description: 'dds-featuretabs__description',
|
|
9
|
+
tabs: 'dds-featuretabs__tabs',
|
|
10
|
+
panel: 'dds-featuretabs__panel',
|
|
11
|
+
footnote: 'dds-featuretabs__footnote',
|
|
12
|
+
};
|
|
13
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
14
|
+
export const featureTabsDefaults = { ground: 'page' };
|