@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,90 @@
|
|
|
1
|
+
/* GENERATED from documents.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-documents {
|
|
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-documents .dds-documents__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-documents .dds-documents__title {
|
|
25
|
+
margin-block: 0;
|
|
26
|
+
text-wrap: balance;
|
|
27
|
+
font-family: var(--font-h2-family);
|
|
28
|
+
font-size: var(--font-h2-size);
|
|
29
|
+
font-weight: var(--font-h2-weight);
|
|
30
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
31
|
+
line-height: var(--font-h2-line-height);
|
|
32
|
+
max-inline-size: var(--size-measure-heading);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-documents__header {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
min-inline-size: 0;
|
|
39
|
+
row-gap: var(--space-heading-title-description);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-documents__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-documents .dds-documents__body {
|
|
53
|
+
inline-size: 100%;
|
|
54
|
+
min-inline-size: 0;
|
|
55
|
+
row-gap: var(--space-gap-none);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-documents__list {
|
|
59
|
+
display: grid;
|
|
60
|
+
list-style: none;
|
|
61
|
+
margin-block: 0;
|
|
62
|
+
padding-inline: 0;
|
|
63
|
+
column-gap: var(--space-gap-lg);
|
|
64
|
+
row-gap: var(--space-gap-lg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-documents__item {
|
|
68
|
+
min-inline-size: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__inner {
|
|
72
|
+
display: grid;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="page"] {
|
|
76
|
+
background-color: var(--color-bg-page);
|
|
77
|
+
color: var(--color-fg-default);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] {
|
|
81
|
+
background-color: var(--color-bg-brand-strong);
|
|
82
|
+
color: var(--color-fg-on-brand-strong);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="subtle"] {
|
|
86
|
+
background-color: var(--color-bg-page);
|
|
87
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
88
|
+
color: var(--color-fg-default);
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './Documents.css';
|
|
3
|
+
import './documents-impl.css';
|
|
4
|
+
import '../block-reveal.css';
|
|
5
|
+
import { type DocumentsProps } from './Documents.types.js';
|
|
6
|
+
export type { DocumentsProps };
|
|
7
|
+
/**
|
|
8
|
+
* A section of documents — the reference design's DocumentChips and CountryLinkGrid, one block
|
|
9
|
+
* because they are one job.
|
|
10
|
+
*
|
|
11
|
+
* Under `groups` the children are AccordionItems, each holding DocumentLink chips, drawn as one
|
|
12
|
+
* Accordion: one group open at a time, the documents two to a row from the fold. Under `grid` the
|
|
13
|
+
* children are DocumentLinks, laid as a list beside the heading. Built from children rather than
|
|
14
|
+
* records so a page writes the documents it has — and a country's flag is the package's own icon,
|
|
15
|
+
* not an image fetched from elsewhere.
|
|
16
|
+
*
|
|
17
|
+
* It arrives the way every block does: the heading and its line, then the documents. `'use client'`
|
|
18
|
+
* for that and for `useId`, which names the region by its heading.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Documents({ ground, layout, title, description, children, }: DocumentsProps & {
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children, useId } from 'react';
|
|
4
|
+
import './Documents.css';
|
|
5
|
+
import './documents-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { Accordion } from '../../core/accordion/Accordion.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
10
|
+
import { documentsDefaults, documentsParts } from './Documents.types.js';
|
|
11
|
+
/**
|
|
12
|
+
* A section of documents — the reference design's DocumentChips and CountryLinkGrid, one block
|
|
13
|
+
* because they are one job.
|
|
14
|
+
*
|
|
15
|
+
* Under `groups` the children are AccordionItems, each holding DocumentLink chips, drawn as one
|
|
16
|
+
* Accordion: one group open at a time, the documents two to a row from the fold. Under `grid` the
|
|
17
|
+
* children are DocumentLinks, laid as a list beside the heading. Built from children rather than
|
|
18
|
+
* records so a page writes the documents it has — and a country's flag is the package's own icon,
|
|
19
|
+
* not an image fetched from elsewhere.
|
|
20
|
+
*
|
|
21
|
+
* It arrives the way every block does: the heading and its line, then the documents. `'use client'`
|
|
22
|
+
* for that and for `useId`, which names the region by its heading.
|
|
23
|
+
*/
|
|
24
|
+
export function Documents({ ground = documentsDefaults.ground, layout = documentsDefaults.layout, title, description, children, }) {
|
|
25
|
+
const titleId = useId();
|
|
26
|
+
const [band, revealed] = useReveal();
|
|
27
|
+
return (_jsx("section", { className: documentsParts.root, "data-ground": ground, "data-layout": layout, "aria-labelledby": titleId, children: _jsxs("div", { className: documentsParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: documentsParts.header, children: [_jsx("h2", { className: documentsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: documentsParts.description, ...arriving(1), children: description })) : null] }), _jsx("div", { className: documentsParts.body, ...arriving(2), children: layout === 'grid' ? (
|
|
28
|
+
// `role="list"` spelled out: Safari drops a list's role once its markers are styled away.
|
|
29
|
+
_jsx("ul", { className: documentsParts.list, role: "list", children: Children.toArray(children).map((child, at) => (_jsx("li", { className: documentsParts.item, children: child }, at))) })) : (_jsx(Accordion, { children: children })) })] }) }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface DocumentsOwnProps {
|
|
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 documents turn round with it: white group headings, a muted chevron, rules 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
|
+
/**
|
|
10
|
+
* `groups` — The default: the documents under headings that expand, one group open at a time — AccordionItem children, each holding DocumentLink chips, two to a row from the fold. The reference design's DocumentChips
|
|
11
|
+
* `grid` — Many short entries of one kind — a document per country, each behind its flag — DocumentLink children with `variant="plain"`, in a grid beside the heading from 62rem and under it below. The reference design's CountryLinkGrid
|
|
12
|
+
*/
|
|
13
|
+
layout?: 'groups' | 'grid';
|
|
14
|
+
/** Always. What the documents are, in a few words — "Regulatory documents", "Licences by country". It names the section */
|
|
15
|
+
title: string;
|
|
16
|
+
/** A line under the heading saying what the documents are for or who they apply to */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Allowed: AccordionItem, DocumentLink */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export type DocumentsProps = DocumentsOwnProps;
|
|
22
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
23
|
+
export declare const documentsParts: {
|
|
24
|
+
readonly root: "dds-documents";
|
|
25
|
+
readonly inner: "dds-documents__inner";
|
|
26
|
+
readonly title: "dds-documents__title";
|
|
27
|
+
readonly header: "dds-documents__header";
|
|
28
|
+
readonly description: "dds-documents__description";
|
|
29
|
+
readonly body: "dds-documents__body";
|
|
30
|
+
readonly list: "dds-documents__list";
|
|
31
|
+
readonly item: "dds-documents__item";
|
|
32
|
+
};
|
|
33
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
34
|
+
export declare const documentsDefaults: {
|
|
35
|
+
readonly ground: "page";
|
|
36
|
+
readonly layout: "groups";
|
|
37
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED from documents.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const documentsParts = {
|
|
4
|
+
root: 'dds-documents',
|
|
5
|
+
inner: 'dds-documents__inner',
|
|
6
|
+
title: 'dds-documents__title',
|
|
7
|
+
header: 'dds-documents__header',
|
|
8
|
+
description: 'dds-documents__description',
|
|
9
|
+
body: 'dds-documents__body',
|
|
10
|
+
list: 'dds-documents__list',
|
|
11
|
+
item: 'dds-documents__item',
|
|
12
|
+
};
|
|
13
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
14
|
+
export const documentsDefaults = { ground: 'page', layout: 'groups' };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `groups`: the heading is centred from the fold over the groups it names, FaqAccordion's rule; and
|
|
5
|
+
* inside an open group the documents stand two to a row from 62rem, a lone one across the whole row
|
|
6
|
+
* rather than half of it with a hole beside it. `62rem` longhand because `var()` is not permitted in
|
|
7
|
+
* a container query condition; it is the reference's 992px.
|
|
8
|
+
*/
|
|
9
|
+
@container (min-width: 48rem) {
|
|
10
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="groups"] .dds-documents__header {
|
|
11
|
+
align-items: center;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
text-align: center;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content:has(> .dds-documentlink) {
|
|
18
|
+
display: grid;
|
|
19
|
+
gap: var(--space-gap-sm);
|
|
20
|
+
grid-template-columns: minmax(0, 1fr);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@container (min-width: 62rem) {
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content:has(> .dds-documentlink) {
|
|
25
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content > .dds-documentlink:only-child {
|
|
29
|
+
grid-column: 1 / -1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* On the strong band, the accordion takes the band's inks, as FaqAccordion's does. */
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem {
|
|
35
|
+
border-color: var(--color-border-subtle-inverse);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem .dds-accordionitem__trigger {
|
|
39
|
+
color: var(--color-fg-on-brand-strong);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem .dds-accordionitem__marker {
|
|
43
|
+
color: var(--color-fg-muted-inverse);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/*
|
|
47
|
+
* `grid`: the heading over the entries below 62rem and beside them from there, the two columns
|
|
48
|
+
* sharing the width; the entries two across on a phone, three from 35rem and four from 48rem, then
|
|
49
|
+
* two again from 62rem, where they share the width with the heading, and three from 75rem — the
|
|
50
|
+
* reference's own measured steps, each the narrowest at which a country's name keeps to one line.
|
|
51
|
+
*/
|
|
52
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
|
|
53
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@container (min-width: 35rem) {
|
|
57
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
|
|
58
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@container (min-width: 48rem) {
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
|
|
64
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@container (min-width: 62rem) {
|
|
69
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__inner {
|
|
70
|
+
align-items: start;
|
|
71
|
+
column-gap: var(--space-grid-gutter);
|
|
72
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
|
|
76
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@container (min-width: 75rem) {
|
|
81
|
+
:where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
|
|
82
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* And the focus ring with them, as FaqAccordion's does: color.border.focus is near-black in light
|
|
88
|
+
* mode, a ring nobody can see on the dark band. A chip keeps its own light fill, so only the group
|
|
89
|
+
* headings and a plain entry change.
|
|
90
|
+
*/
|
|
91
|
+
:where([data-dds-context="marketing"])
|
|
92
|
+
.dds-documents[data-ground="strong"]
|
|
93
|
+
.dds-accordionitem
|
|
94
|
+
.dds-accordionitem__trigger:focus-visible {
|
|
95
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where([data-dds-context="marketing"])
|
|
99
|
+
.dds-documents[data-ground="strong"]
|
|
100
|
+
.dds-documentlink[data-variant="plain"]
|
|
101
|
+
.dds-documentlink__link:focus-visible {
|
|
102
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
103
|
+
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
:where([data-dds-context="marketing"]) .dds-downloadbanner[data-ground="strong"] .dds-downloadbanner__card {
|
|
198
|
-
background-color: var(--color-bg-surface-card-strong);
|
|
198
|
+
background-color: var(--color-bg-surface-card-strong-on-brand-strong);
|
|
199
199
|
color: var(--color-fg-on-brand-strong);
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -4,7 +4,7 @@ export interface DownloadBannerOwnProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* `page` — The default, and the page's own white. The card is the recessed gray that sets it off — the reference design's light-2
|
|
6
6
|
* `subtle` — The grey band, with the card white on it — the reference design's light. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
|
|
7
|
-
* `strong` — `color.bg.brand-strong`, the dark band, with the card at color.bg.surface-card-strong and white words on it — the reference design's dark. For a download section a reader should arrive at; the badges are black and keep their own edge on it
|
|
7
|
+
* `strong` — `color.bg.brand-strong`, the dark band, with the card at color.bg.surface-card-strong-on-brand-strong and white words on it — the reference design's dark. For a download section a reader should arrive at; the badges are black and keep their own edge on it
|
|
8
8
|
*/
|
|
9
9
|
ground?: 'page' | 'subtle' | 'strong';
|
|
10
10
|
/** The featured card only: the app itself — a screenshot of it in a phone, the page's own image. It stands at the card's end, rising out of the card's top edge and resting on its bottom one, so the card reads as the app being held out to the reader. On a phone it sits under the badges. */
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/* GENERATED from estimator.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-estimator {
|
|
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-estimator .dds-estimator__inner {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
inline-size: 100%;
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
column-gap: var(--space-gap-3xl);
|
|
19
|
+
max-inline-size: var(--size-content-max);
|
|
20
|
+
padding-block: var(--space-section-default);
|
|
21
|
+
padding-inline: var(--space-inset-page);
|
|
22
|
+
row-gap: var(--space-heading-content);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__header {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
row-gap: var(--space-gap-none);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__title {
|
|
33
|
+
margin-block: 0;
|
|
34
|
+
text-wrap: balance;
|
|
35
|
+
font-family: var(--font-h2-family);
|
|
36
|
+
font-size: var(--font-h2-size);
|
|
37
|
+
font-weight: var(--font-h2-weight);
|
|
38
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
39
|
+
line-height: var(--font-h2-line-height);
|
|
40
|
+
margin-block-end: var(--space-heading-title-description);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__description {
|
|
44
|
+
margin-block: 0;
|
|
45
|
+
font-family: var(--font-body-md-family);
|
|
46
|
+
font-size: var(--font-body-md-size);
|
|
47
|
+
font-weight: var(--font-body-md-weight);
|
|
48
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
49
|
+
line-height: var(--font-body-md-line-height);
|
|
50
|
+
max-inline-size: var(--size-measure-description);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__tool {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
min-inline-size: 0;
|
|
57
|
+
row-gap: var(--space-gap-none);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__panels {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
min-inline-size: 0;
|
|
65
|
+
column-gap: var(--space-gap-xl);
|
|
66
|
+
padding-block: var(--space-inset-card);
|
|
67
|
+
padding-inline: var(--space-inset-card);
|
|
68
|
+
row-gap: var(--space-gap-2xl);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__inputs {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
min-inline-size: 0;
|
|
75
|
+
row-gap: var(--space-gap-lg);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__inputs-label {
|
|
79
|
+
margin-block: 0;
|
|
80
|
+
font-family: var(--font-h5-family);
|
|
81
|
+
font-size: var(--font-h5-size);
|
|
82
|
+
font-weight: var(--font-h5-weight);
|
|
83
|
+
letter-spacing: var(--font-h5-letter-spacing);
|
|
84
|
+
line-height: var(--font-h5-line-height);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__results {
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
min-inline-size: 0;
|
|
91
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
92
|
+
border-radius: var(--radius-surface-compact);
|
|
93
|
+
box-shadow: var(--elevation-surface-floating);
|
|
94
|
+
padding-block: var(--space-inset-card);
|
|
95
|
+
padding-inline: var(--space-inset-card);
|
|
96
|
+
row-gap: var(--space-gap-lg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__results-label {
|
|
100
|
+
margin-block: 0;
|
|
101
|
+
font-family: var(--font-h5-family);
|
|
102
|
+
font-size: var(--font-h5-size);
|
|
103
|
+
font-weight: var(--font-h5-weight);
|
|
104
|
+
letter-spacing: var(--font-h5-letter-spacing);
|
|
105
|
+
line-height: var(--font-h5-line-height);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__list {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
margin-block: 0;
|
|
112
|
+
margin-inline: 0;
|
|
113
|
+
padding-block: 0;
|
|
114
|
+
padding-inline: 0;
|
|
115
|
+
column-gap: var(--space-gap-2xl);
|
|
116
|
+
row-gap: var(--space-gap-none);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result {
|
|
120
|
+
border-block-end-style: solid;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
min-inline-size: 0;
|
|
124
|
+
border-block-end-width: var(--border-width-default);
|
|
125
|
+
border-color: var(--color-border-subtle);
|
|
126
|
+
padding-block: var(--space-inset-md);
|
|
127
|
+
row-gap: var(--space-gap-xs);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result-value {
|
|
131
|
+
margin-inline: 0;
|
|
132
|
+
font-family: var(--font-h4-family);
|
|
133
|
+
font-size: var(--font-h4-size);
|
|
134
|
+
font-weight: var(--font-h4-weight);
|
|
135
|
+
letter-spacing: var(--font-h4-letter-spacing);
|
|
136
|
+
line-height: var(--font-h4-line-height);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result-note {
|
|
140
|
+
margin-inline: 0;
|
|
141
|
+
color: var(--color-fg-muted);
|
|
142
|
+
font-family: var(--font-body-sm-family);
|
|
143
|
+
font-size: var(--font-body-sm-size);
|
|
144
|
+
font-weight: var(--font-body-sm-weight);
|
|
145
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
146
|
+
line-height: var(--font-body-sm-line-height);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__empty {
|
|
150
|
+
margin-block: 0;
|
|
151
|
+
color: var(--color-fg-muted);
|
|
152
|
+
font-family: var(--font-body-md-family);
|
|
153
|
+
font-size: var(--font-body-md-size);
|
|
154
|
+
font-weight: var(--font-body-md-weight);
|
|
155
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
156
|
+
line-height: var(--font-body-md-line-height);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__action {
|
|
160
|
+
display: flex;
|
|
161
|
+
margin-block-start: var(--space-gap-sm);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__input-actions {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-wrap: wrap;
|
|
167
|
+
column-gap: var(--space-actions-gap);
|
|
168
|
+
margin-block-start: var(--space-gap-sm);
|
|
169
|
+
row-gap: var(--space-actions-gap);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="split"] .dds-estimator__header {
|
|
173
|
+
align-items: flex-start;
|
|
174
|
+
text-align: start;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-layout="stacked"] .dds-estimator__header {
|
|
178
|
+
align-items: center;
|
|
179
|
+
text-align: center;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:where([data-dds-context="marketing"]) .dds-estimator .dds-estimator__result-label {
|
|
183
|
+
color: var(--color-fg-muted);
|
|
184
|
+
font-family: var(--font-body-sm-family);
|
|
185
|
+
font-size: var(--font-body-sm-size);
|
|
186
|
+
font-weight: var(--font-body-sm-weight);
|
|
187
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
188
|
+
line-height: var(--font-body-sm-line-height);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-ground="page"] {
|
|
192
|
+
background-color: var(--color-bg-page);
|
|
193
|
+
color: var(--color-fg-default);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-ground="strong"] {
|
|
197
|
+
background-color: var(--color-bg-brand-strong);
|
|
198
|
+
color: var(--color-fg-on-brand-strong);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:where([data-dds-context="marketing"]) .dds-estimator[data-ground="subtle"] {
|
|
202
|
+
background-color: var(--color-bg-page);
|
|
203
|
+
background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
|
|
204
|
+
color: var(--color-fg-default);
|
|
205
|
+
}
|
|
206
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './Estimator.css';
|
|
2
|
+
import './estimator-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type EstimatorProps } from './Estimator.types.js';
|
|
5
|
+
export type { EstimatorProps };
|
|
6
|
+
/**
|
|
7
|
+
* A section that turns a reader's inputs into figures — the trading calculators, the crypto
|
|
8
|
+
* converter and the affiliate income estimate of the reference design, as one block.
|
|
9
|
+
*
|
|
10
|
+
* It lays the tool out and works nothing out. The page passes its own fields as `inputs` and the
|
|
11
|
+
* figures it has computed from them as `results`; a live feed, a formula, a currency conversion are
|
|
12
|
+
* all the page's, so the block is the same on every page that uses it and in every test, and none
|
|
13
|
+
* of it reaches the network. What the block owns is the part every such tool gets wrong once:
|
|
14
|
+
*
|
|
15
|
+
* - The figures are a description list, so a value is announced with the label it answers.
|
|
16
|
+
* - The results panel is a polite live region from the first paint, so a reader using a screen
|
|
17
|
+
* reader hears each new set of figures once, after they stop typing, without being interrupted —
|
|
18
|
+
* and it is there before the first change, which is the only way a live region is listened to.
|
|
19
|
+
* - Each value is isolated (`<bdi>`), so '-12.40 USD' or '0.0214 BTC' keeps its order in a
|
|
20
|
+
* right-to-left line, where a sign or a currency is neutral and moves to the far end.
|
|
21
|
+
* - Before there are figures the panel says what it is waiting for, rather than showing a row of
|
|
22
|
+
* dashes or a zero that reads as an answer.
|
|
23
|
+
*
|
|
24
|
+
* The tool is a Card at its `surface` variant, the same object as every other card on the page; the
|
|
25
|
+
* ground it stands on decides its fill, in the stylesheet, as ComparisonCards' cards do.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Estimator({ ground, layout, title, description, inputsLabel, inputs, inputActions, onCalculate, resultsLabel, results, emptyMessage, action, }: EstimatorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './Estimator.css';
|
|
5
|
+
import './estimator-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { Card } from '../../core/card/Card.js';
|
|
10
|
+
import { estimatorDefaults, estimatorParts } from './Estimator.types.js';
|
|
11
|
+
/**
|
|
12
|
+
* A section that turns a reader's inputs into figures — the trading calculators, the crypto
|
|
13
|
+
* converter and the affiliate income estimate of the reference design, as one block.
|
|
14
|
+
*
|
|
15
|
+
* It lays the tool out and works nothing out. The page passes its own fields as `inputs` and the
|
|
16
|
+
* figures it has computed from them as `results`; a live feed, a formula, a currency conversion are
|
|
17
|
+
* all the page's, so the block is the same on every page that uses it and in every test, and none
|
|
18
|
+
* of it reaches the network. What the block owns is the part every such tool gets wrong once:
|
|
19
|
+
*
|
|
20
|
+
* - The figures are a description list, so a value is announced with the label it answers.
|
|
21
|
+
* - The results panel is a polite live region from the first paint, so a reader using a screen
|
|
22
|
+
* reader hears each new set of figures once, after they stop typing, without being interrupted —
|
|
23
|
+
* and it is there before the first change, which is the only way a live region is listened to.
|
|
24
|
+
* - Each value is isolated (`<bdi>`), so '-12.40 USD' or '0.0214 BTC' keeps its order in a
|
|
25
|
+
* right-to-left line, where a sign or a currency is neutral and moves to the far end.
|
|
26
|
+
* - Before there are figures the panel says what it is waiting for, rather than showing a row of
|
|
27
|
+
* dashes or a zero that reads as an answer.
|
|
28
|
+
*
|
|
29
|
+
* The tool is a Card at its `surface` variant, the same object as every other card on the page; the
|
|
30
|
+
* ground it stands on decides its fill, in the stylesheet, as ComparisonCards' cards do.
|
|
31
|
+
*/
|
|
32
|
+
export function Estimator({ ground = estimatorDefaults.ground, layout = estimatorDefaults.layout, title, description, inputsLabel, inputs, inputActions, onCalculate, resultsLabel, results, emptyMessage, action, }) {
|
|
33
|
+
const titleId = useId();
|
|
34
|
+
const [band, revealed] = useReveal();
|
|
35
|
+
const figures = Array.isArray(results) ? results : [];
|
|
36
|
+
/*
|
|
37
|
+
Enter in a field asks for the figures, which is what a reader expects of a calculator — the
|
|
38
|
+
page's Calculate button calls the same `onCalculate` from its own press. Only a plain field:
|
|
39
|
+
Enter in a picker's search chooses an answer, and in a text area it starts a line, and both
|
|
40
|
+
are theirs to keep.
|
|
41
|
+
*/
|
|
42
|
+
const calculateOnEnter = (event) => {
|
|
43
|
+
if (event.key !== 'Enter' || onCalculate === undefined)
|
|
44
|
+
return;
|
|
45
|
+
const field = event.target;
|
|
46
|
+
if (!(field instanceof HTMLInputElement))
|
|
47
|
+
return;
|
|
48
|
+
if (/^(checkbox|radio|button|submit|reset|file)$/.test(field.type))
|
|
49
|
+
return;
|
|
50
|
+
if (field.closest('[role="listbox"], [role="dialog"], [aria-haspopup], [aria-autocomplete]') !== null)
|
|
51
|
+
return;
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
onCalculate();
|
|
54
|
+
};
|
|
55
|
+
// The fields are a form, and its submit never leaves the page. A form with one field submits on
|
|
56
|
+
// Enter by itself, and without this a reader pressing it would reload the page from under the tool.
|
|
57
|
+
const stay = (event) => event.preventDefault();
|
|
58
|
+
return (_jsx("section", { className: estimatorParts.root, "data-ground": ground, "data-layout": layout, "aria-labelledby": titleId, children: _jsxs("div", { className: estimatorParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: estimatorParts.header, children: [_jsx("h2", { className: estimatorParts.title, ...arriving(0), id: titleId, children: title }), given(description) ? (_jsx("p", { className: estimatorParts.description, ...arriving(1), children: description })) : null] }), _jsx("div", { className: estimatorParts.tool, "data-theme": ground === 'strong' ? 'dark' : undefined, ...arriving(2), children: _jsx(Card, { variant: "surface", children: _jsxs("div", { className: estimatorParts.panels, children: [_jsxs("form", { className: estimatorParts.inputs, onSubmit: stay, onKeyDown: calculateOnEnter, children: [given(inputsLabel) ? _jsx("h3", { className: estimatorParts['inputs-label'], children: inputsLabel }) : null, inputs, inputActions ? _jsx("div", { className: estimatorParts['input-actions'], children: inputActions }) : null] }), _jsxs("div", { className: estimatorParts.results, "aria-live": "polite", children: [given(resultsLabel) ? _jsx("h3", { className: estimatorParts['results-label'], children: resultsLabel }) : null, figures.length > 0 ? (_jsx("dl", { className: estimatorParts.list, children: figures.map((figure) => (
|
|
59
|
+
// A figure's label is its identity: a tool never shows the same figure twice.
|
|
60
|
+
_jsxs("div", { className: estimatorParts.result, children: [_jsx("dt", { className: estimatorParts['result-label'], children: figure.label }), _jsx("dd", { className: estimatorParts['result-value'], children: _jsx("bdi", { children: figure.value }) }), given(figure.note) ? (_jsx("dd", { className: estimatorParts['result-note'], children: figure.note })) : null] }, figure.label))) })) : given(emptyMessage) ? (_jsx("p", { className: estimatorParts.empty, children: emptyMessage })) : null, action ? _jsx("div", { className: estimatorParts.action, children: action }) : null] })] }) }) })] }) }));
|
|
61
|
+
}
|