@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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import './IllustrationCard.css';
|
|
5
5
|
import './illustration-card-impl.css';
|
|
6
|
+
import { useArrival } from '../../arrival.js';
|
|
6
7
|
import { illustrationCardDefaults, illustrationCardParts, } from './IllustrationCard.types.js';
|
|
7
8
|
/**
|
|
8
9
|
* A pane of glass holding a picture of the product, in one of three shapes.
|
|
@@ -16,13 +17,19 @@ import { illustrationCardDefaults, illustrationCardParts, } from './Illustration
|
|
|
16
17
|
* `label`, and its contents are `inert`: real components draw it, so it looks exactly like the
|
|
17
18
|
* product, and none of them can be focused, pressed or typed into.
|
|
18
19
|
*
|
|
20
|
+
* It can move once, as it arrives — frosting over its photograph, or playing two states of the
|
|
21
|
+
* product, the second after the first — and whatever moves inside it waits for it to land: it is
|
|
22
|
+
* the host its parts' arrivals follow (see arrival.ts).
|
|
23
|
+
*
|
|
19
24
|
* And it scales like a picture. The UI is laid out at its own size and, where the pane is too small
|
|
20
25
|
* to hold it, scaled down as a whole to fit — never up — so a pane on a phone shows the same picture
|
|
21
26
|
* smaller rather than text overlapping or cut off. The scale is worked out when the pane changes
|
|
22
27
|
* size and at no other time.
|
|
23
28
|
*/
|
|
24
|
-
export function IllustrationCard({ ratio = illustrationCardDefaults.ratio, label, children, ...rest }) {
|
|
25
|
-
|
|
29
|
+
export function IllustrationCard({ ratio = illustrationCardDefaults.ratio, label, motion, then, children, ...rest }) {
|
|
30
|
+
// The pane arrives as one thing and is the host the motions inside it follow, so it runs its
|
|
31
|
+
// arrival whether or not it moves itself: a figure that rolls inside it waits for it to land.
|
|
32
|
+
const [pane, arrival] = useArrival();
|
|
26
33
|
const content = useRef(null);
|
|
27
34
|
useLayoutEffect(() => {
|
|
28
35
|
const root = pane.current;
|
|
@@ -30,6 +37,11 @@ export function IllustrationCard({ ratio = illustrationCardDefaults.ratio, label
|
|
|
30
37
|
if (root === null || inner === null || typeof ResizeObserver === 'undefined')
|
|
31
38
|
return undefined;
|
|
32
39
|
const fit = () => {
|
|
40
|
+
// Back to the UI's own size before the pane is measured. A pane whose height follows what it
|
|
41
|
+
// holds — a strip at the foot of a scene, capped at a share of it — is only as tall as its
|
|
42
|
+
// last fit left the UI; measured first, each fit would find less room than the last.
|
|
43
|
+
inner.style.transform = '';
|
|
44
|
+
inner.style.inlineSize = '';
|
|
33
45
|
const style = getComputedStyle(root);
|
|
34
46
|
const across = root.clientWidth - Number.parseFloat(style.paddingInlineStart) - Number.parseFloat(style.paddingInlineEnd);
|
|
35
47
|
const down = root.clientHeight - Number.parseFloat(style.paddingBlockStart) - Number.parseFloat(style.paddingBlockEnd);
|
|
@@ -37,18 +49,32 @@ export function IllustrationCard({ ratio = illustrationCardDefaults.ratio, label
|
|
|
37
49
|
return;
|
|
38
50
|
// Laid out unscaled at the pane's own width, to see how much room the UI wants there — down,
|
|
39
51
|
// and across, since a line that cannot wrap (a large figure) overflows sideways.
|
|
40
|
-
inner.style.transform = '';
|
|
41
52
|
inner.style.inlineSize = `${across}px`;
|
|
42
53
|
const tall = inner.scrollHeight;
|
|
43
54
|
const wide = inner.scrollWidth;
|
|
44
|
-
|
|
55
|
+
let scale = Math.min(1, down / tall, across / wide);
|
|
45
56
|
if (scale >= 1) {
|
|
46
57
|
inner.style.inlineSize = '';
|
|
47
58
|
return;
|
|
48
59
|
}
|
|
49
60
|
// Scaled, the UI is narrower than the pane too; laying it out wider by the same factor gives
|
|
50
|
-
// the width back, so the picture fills the pane across as well as down. Wider, it
|
|
51
|
-
//
|
|
61
|
+
// the width back, so the picture fills the pane across as well as down. Wider, it wraps less
|
|
62
|
+
// and is shorter — so the scale found at the pane's own width is a floor, not the answer, and
|
|
63
|
+
// in a wide, short pane (a strip at the foot of a scene) a far smaller one than the UI needs.
|
|
64
|
+
// The largest scale whose widened layout still fits is found by halving the gap a few times;
|
|
65
|
+
// each try is one layout, and this runs only when the pane changes size.
|
|
66
|
+
const fits = (candidate) => {
|
|
67
|
+
inner.style.inlineSize = `${across / candidate}px`;
|
|
68
|
+
return inner.scrollHeight * candidate <= down && inner.scrollWidth * candidate <= across + 0.5;
|
|
69
|
+
};
|
|
70
|
+
let ceiling = 1;
|
|
71
|
+
for (let step = 0; step < 6; step += 1) {
|
|
72
|
+
const middle = (scale + ceiling) / 2;
|
|
73
|
+
if (fits(middle))
|
|
74
|
+
scale = middle;
|
|
75
|
+
else
|
|
76
|
+
ceiling = middle;
|
|
77
|
+
}
|
|
52
78
|
inner.style.inlineSize = `${across / scale}px`;
|
|
53
79
|
inner.style.transformOrigin = style.direction === 'rtl' ? 'top right' : 'top left';
|
|
54
80
|
inner.style.transform = `scale(${scale})`;
|
|
@@ -78,5 +104,5 @@ export function IllustrationCard({ ratio = illustrationCardDefaults.ratio, label
|
|
|
78
104
|
cancelAnimationFrame(queued);
|
|
79
105
|
};
|
|
80
106
|
}, []);
|
|
81
|
-
return (_jsx("div", { ...rest, ref: pane, className: illustrationCardParts.root, "data-ratio": ratio, "data-theme": "dark", role: "img", "aria-label": label, children: _jsx("div", { ref: content, className: illustrationCardParts.content, inert: true, children: children }) }));
|
|
107
|
+
return (_jsx("div", { ...rest, ref: pane, className: illustrationCardParts.root, "data-ratio": ratio, "data-theme": "dark", "data-arrival-host": "", "data-arrival": arrival === 'still' ? undefined : arrival, "data-motion": then ? undefined : motion, role: "img", "aria-label": label, children: _jsx("div", { ref: content, className: illustrationCardParts.content, "data-story": then ? '' : undefined, inert: true, children: then ? (_jsxs(_Fragment, { children: [_jsx("div", { className: illustrationCardParts.stage, "data-stage": "first", children: children }), _jsx("div", { className: illustrationCardParts.stage, "data-stage": "then", children: then })] })) : (children) }) }));
|
|
82
108
|
}
|
|
@@ -8,14 +8,21 @@ export interface IllustrationCardOwnProps {
|
|
|
8
8
|
ratio?: 'landscape' | 'square' | 'upright';
|
|
9
9
|
/** Always. What the picture shows, in a sentence — "Trade ticket: buy Gold to rise over 5 minutes, staking 10 USD". The pane is one image to assistive technology and this is its whole description; nothing inside it is read out on its own */
|
|
10
10
|
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* `frost` — The pane frosts over its photograph as it arrives: the glass blurs in over motion.duration.dramatic, and what it holds fades in a step of motion.duration.stagger apart once the glass is mostly there. For a pane in an IllustrationScene, where there is a photograph to soften
|
|
13
|
+
*/
|
|
14
|
+
motion?: 'frost';
|
|
15
|
+
/** A second state of the same product, played once after the first: the order goes in, then the position is open. The pane shows what it holds for motion.duration.hold, then that gives way to this — out over motion.duration.slow, in over motion.duration.reveal. Still, and for a reader who asked for less movement, the pane is this second state, so `label` describes it */
|
|
16
|
+
then?: ReactNode;
|
|
11
17
|
/** Allowed: any content */
|
|
12
18
|
children: ReactNode;
|
|
13
19
|
}
|
|
14
|
-
export type IllustrationCardProps = IllustrationCardOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'ratio' | 'label'>;
|
|
20
|
+
export type IllustrationCardProps = IllustrationCardOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'ratio' | 'label' | 'motion' | 'then'>;
|
|
15
21
|
/** The class each part carries. Apply these — do not retype them. */
|
|
16
22
|
export declare const illustrationCardParts: {
|
|
17
23
|
readonly root: "dds-illustrationcard";
|
|
18
24
|
readonly content: "dds-illustrationcard__content";
|
|
25
|
+
readonly stage: "dds-illustrationcard__stage";
|
|
19
26
|
};
|
|
20
27
|
/** Generated so defaults cannot drift from the contract. */
|
|
21
28
|
export declare const illustrationCardDefaults: {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const illustrationCardParts = {
|
|
4
4
|
root: 'dds-illustrationcard',
|
|
5
5
|
content: 'dds-illustrationcard__content',
|
|
6
|
+
stage: 'dds-illustrationcard__stage',
|
|
6
7
|
};
|
|
7
8
|
/** Generated so defaults cannot drift from the contract. */
|
|
8
9
|
export const illustrationCardDefaults = { ratio: 'landscape' };
|
|
@@ -45,3 +45,116 @@
|
|
|
45
45
|
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > * {
|
|
46
46
|
flex-shrink: 0;
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* The motions the pane plays once, as it arrives.
|
|
51
|
+
*
|
|
52
|
+
* `data-arrival` is the pane's own answer from useArrival (arrival.ts): `waiting` holds each motion
|
|
53
|
+
* at its first frame, `playing` runs it, and no attribute at all — a server's render, a reader who
|
|
54
|
+
* asked for less movement — is the pane at rest in its final state. Every motion is declared on
|
|
55
|
+
* both answers, with `both` fill and the waiting one paused, so the first frame is on screen before
|
|
56
|
+
* anything moves and the last one stays when it is done. The package's motion tokens throughout.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/* Two states of one pane in one cell, so the second takes the first one's place. */
|
|
60
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content[data-story] {
|
|
61
|
+
display: grid;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Both states in the one cell. */
|
|
65
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__stage {
|
|
66
|
+
grid-area: 1 / 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* At rest the pane is its second state, the one `label` describes. */
|
|
70
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__stage[data-stage='first'] {
|
|
71
|
+
visibility: hidden;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes dds-illustrationcard-frost {
|
|
75
|
+
from {
|
|
76
|
+
-webkit-backdrop-filter: blur(0);
|
|
77
|
+
backdrop-filter: blur(0);
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
background-image: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes dds-illustrationcard-fade-in {
|
|
84
|
+
from {
|
|
85
|
+
opacity: var(--opacity-hidden);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes dds-illustrationcard-story-leave {
|
|
90
|
+
from {
|
|
91
|
+
visibility: visible;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
to {
|
|
95
|
+
opacity: var(--opacity-hidden);
|
|
96
|
+
translate: 0 calc(-1 * var(--space-gap-sm));
|
|
97
|
+
visibility: hidden;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@keyframes dds-illustrationcard-story-arrive {
|
|
102
|
+
from {
|
|
103
|
+
opacity: var(--opacity-hidden);
|
|
104
|
+
translate: var(--motion-translate-hover);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
* `motion="frost"`: the glass blurs in over the photograph, then what it holds fades in, a step of
|
|
110
|
+
* motion.duration.stagger apart, once the glass is most of the way there — motion.duration.slow in.
|
|
111
|
+
* The steps are counted down the pane's own column; a ninth thing and after share the eighth's step.
|
|
112
|
+
*/
|
|
113
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-motion='frost'][data-arrival] {
|
|
114
|
+
animation: dds-illustrationcard-frost var(--motion-duration-dramatic) var(--motion-easing-reveal) both;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-motion='frost'][data-arrival] .dds-illustrationcard__content > * {
|
|
118
|
+
animation: dds-illustrationcard-fade-in var(--motion-duration-reveal) var(--motion-easing-reveal) both;
|
|
119
|
+
animation-delay: calc(var(--motion-duration-slow) + var(--dds-illustrationcard-step, 0) * var(--motion-duration-stagger));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(2) { --dds-illustrationcard-step: 1; }
|
|
123
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(3) { --dds-illustrationcard-step: 2; }
|
|
124
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(4) { --dds-illustrationcard-step: 3; }
|
|
125
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(5) { --dds-illustrationcard-step: 4; }
|
|
126
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(6) { --dds-illustrationcard-step: 5; }
|
|
127
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(7) { --dds-illustrationcard-step: 6; }
|
|
128
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard .dds-illustrationcard__content > :nth-child(n + 8) { --dds-illustrationcard-step: 7; }
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
* `then`: the first state holds for motion.duration.hold, then gives way — out over
|
|
132
|
+
* motion.duration.slow, rising a little — and the second comes up into its place a step of
|
|
133
|
+
* motion.duration.fast behind, over motion.duration.reveal.
|
|
134
|
+
*/
|
|
135
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival] .dds-illustrationcard__stage[data-stage='first'] {
|
|
136
|
+
animation: dds-illustrationcard-story-leave var(--motion-duration-slow) var(--motion-easing-reveal) var(--motion-duration-hold) both;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival] .dds-illustrationcard__stage[data-stage='then'] {
|
|
140
|
+
animation: dds-illustrationcard-story-arrive var(--motion-duration-reveal) var(--motion-easing-reveal)
|
|
141
|
+
calc(var(--motion-duration-hold) + var(--motion-duration-fast)) both;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/*
|
|
145
|
+
* Waiting: every motion above held at its first frame. `!important` because each motion is an
|
|
146
|
+
* `animation` shorthand, which resets the play state, and several are more specific than this.
|
|
147
|
+
*/
|
|
148
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival='waiting'],
|
|
149
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival='waiting'] .dds-illustrationcard__content > *,
|
|
150
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival='waiting'] .dds-illustrationcard__stage {
|
|
151
|
+
animation-play-state: paused !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (prefers-reduced-motion: reduce) {
|
|
155
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival],
|
|
156
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival] .dds-illustrationcard__content > *,
|
|
157
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcard[data-arrival] .dds-illustrationcard__stage {
|
|
158
|
+
animation: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* GENERATED from illustrationcheck.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck .dds-illustrationcheck__ring {
|
|
9
|
+
stroke-width: var(--border-width-strong);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck .dds-illustrationcheck__tick {
|
|
13
|
+
stroke-width: var(--border-width-strong);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-size="lg"] {
|
|
17
|
+
height: var(--icon-size-lg);
|
|
18
|
+
width: var(--icon-size-lg);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-size="xl"] {
|
|
22
|
+
height: var(--icon-size-xl);
|
|
23
|
+
width: var(--icon-size-xl);
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './IllustrationCheck.css';
|
|
2
|
+
import './illustration-check-impl.css';
|
|
3
|
+
import { type IllustrationCheckProps } from './IllustrationCheck.types.js';
|
|
4
|
+
export type { IllustrationCheckProps };
|
|
5
|
+
/**
|
|
6
|
+
* A ring with a tick in it: the mark a picture of the product shows when something has gone
|
|
7
|
+
* through.
|
|
8
|
+
*
|
|
9
|
+
* Drawn rather than taken from the glyph set, because it moves in parts — the ring spins and closes,
|
|
10
|
+
* then the tick draws in — and a glyph is one shape. Both strokes measure their own length as one
|
|
11
|
+
* (`pathLength`), so the stylesheet draws them in by that fraction whatever the drawing's size.
|
|
12
|
+
* In the colour of the text around it, like an Icon.
|
|
13
|
+
*
|
|
14
|
+
* No script of its own: a mark that resolves on arrival is wrapped to take one (arrives.tsx).
|
|
15
|
+
*/
|
|
16
|
+
export declare function IllustrationCheck({ size, motion, label, ...rest }: IllustrationCheckProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './IllustrationCheck.css';
|
|
3
|
+
import './illustration-check-impl.css';
|
|
4
|
+
import { Arrives } from '../../arrives.js';
|
|
5
|
+
import { given } from '../../given.js';
|
|
6
|
+
import { illustrationCheckDefaults, illustrationCheckParts, } from './IllustrationCheck.types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A ring with a tick in it: the mark a picture of the product shows when something has gone
|
|
9
|
+
* through.
|
|
10
|
+
*
|
|
11
|
+
* Drawn rather than taken from the glyph set, because it moves in parts — the ring spins and closes,
|
|
12
|
+
* then the tick draws in — and a glyph is one shape. Both strokes measure their own length as one
|
|
13
|
+
* (`pathLength`), so the stylesheet draws them in by that fraction whatever the drawing's size.
|
|
14
|
+
* In the colour of the text around it, like an Icon.
|
|
15
|
+
*
|
|
16
|
+
* No script of its own: a mark that resolves on arrival is wrapped to take one (arrives.tsx).
|
|
17
|
+
*/
|
|
18
|
+
export function IllustrationCheck({ size = illustrationCheckDefaults.size, motion, label, ...rest }) {
|
|
19
|
+
const named = given(label);
|
|
20
|
+
const mark = (_jsx("span", { ...rest, className: illustrationCheckParts.root, "data-size": size, "data-motion": motion, role: named ? 'img' : undefined, "aria-label": named ? label : undefined, "aria-hidden": named ? undefined : true, children: _jsxs("svg", { viewBox: "0 0 56 56", width: "100%", height: "100%", fill: "none", stroke: "currentColor", "aria-hidden": "true", children: [_jsx("circle", { className: illustrationCheckParts.ring, cx: "28", cy: "28", r: "25", pathLength: 1 }), _jsx("path", { className: illustrationCheckParts.tick, d: "M17 29.5l7.5 7.5L40 21", pathLength: 1, strokeLinecap: "round", strokeLinejoin: "round" })] }) }));
|
|
21
|
+
return motion === undefined ? mark : _jsx(Arrives, { children: mark });
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface IllustrationCheckOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `lg` — Thirty-two pixels, icon.size.lg. Beside a line of words in a pane
|
|
5
|
+
* `xl` — Forty-eight pixels, icon.size.xl, and the default. The mark as the subject of a pane
|
|
6
|
+
*/
|
|
7
|
+
size?: 'lg' | 'xl';
|
|
8
|
+
/**
|
|
9
|
+
* `resolve` — The ring spins open like a Spinner for two turns, closes, and the tick draws in — the moment something goes through
|
|
10
|
+
*/
|
|
11
|
+
motion?: 'resolve';
|
|
12
|
+
/** Only where the mark says something nothing beside it does — rarely. It names the mark as an image */
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
export type IllustrationCheckProps = IllustrationCheckOwnProps & Omit<HTMLAttributes<HTMLSpanElement>, 'className' | 'size' | 'motion' | 'label'>;
|
|
16
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
17
|
+
export declare const illustrationCheckParts: {
|
|
18
|
+
readonly root: "dds-illustrationcheck";
|
|
19
|
+
readonly ring: "dds-illustrationcheck__ring";
|
|
20
|
+
readonly tick: "dds-illustrationcheck__tick";
|
|
21
|
+
};
|
|
22
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
23
|
+
export declare const illustrationCheckDefaults: {
|
|
24
|
+
readonly size: "xl";
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// GENERATED from illustration-check.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const illustrationCheckParts = {
|
|
4
|
+
root: 'dds-illustrationcheck',
|
|
5
|
+
ring: 'dds-illustrationcheck__ring',
|
|
6
|
+
tick: 'dds-illustrationcheck__tick',
|
|
7
|
+
};
|
|
8
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
9
|
+
export const illustrationCheckDefaults = { size: 'xl' };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `motion="resolve"`: the ring spins open, closes, and the tick draws in, once. `data-arrival` is
|
|
5
|
+
* the mark's own answer from useArrival (arrival.ts): `waiting` holds the first frame — an open arc,
|
|
6
|
+
* no tick — `playing` runs it, and no attribute — a server, a reader who asked for less movement —
|
|
7
|
+
* is the finished mark. Both strokes measure one (`pathLength`), so these fractions hold at any size.
|
|
8
|
+
*
|
|
9
|
+
* two turns of motion.duration.spinner on its linear easing — the Spinner's own turn — as a short
|
|
10
|
+
* arc, the way a Spinner reads;
|
|
11
|
+
* the arc closes round over motion.duration.shift;
|
|
12
|
+
* the tick draws in over motion.duration.slow.
|
|
13
|
+
*
|
|
14
|
+
* The svg turns rather than the ring, so the arc and its closing are one stroke that stops turning
|
|
15
|
+
* at the top. A vector stroke scales with the drawing; this one keeps border.width.strong.
|
|
16
|
+
*/
|
|
17
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck svg {
|
|
18
|
+
display: block;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck :is(.dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
23
|
+
vector-effect: non-scaling-stroke;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes dds-illustrationcheck-spin {
|
|
27
|
+
to {
|
|
28
|
+
rotate: 1turn;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes dds-illustrationcheck-close {
|
|
33
|
+
from {
|
|
34
|
+
stroke-dasharray: 0.28 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
to {
|
|
38
|
+
stroke-dasharray: 1 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes dds-illustrationcheck-draw {
|
|
43
|
+
from {
|
|
44
|
+
stroke-dasharray: 1;
|
|
45
|
+
stroke-dashoffset: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
to {
|
|
49
|
+
stroke-dasharray: 1;
|
|
50
|
+
stroke-dashoffset: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] svg {
|
|
55
|
+
animation: dds-illustrationcheck-spin var(--motion-duration-spinner) var(--motion-easing-spinner) 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] .dds-illustrationcheck__ring {
|
|
59
|
+
animation: dds-illustrationcheck-close var(--motion-duration-shift) var(--motion-easing-reveal)
|
|
60
|
+
calc(2 * var(--motion-duration-spinner)) both;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] .dds-illustrationcheck__tick {
|
|
64
|
+
animation: dds-illustrationcheck-draw var(--motion-duration-slow) var(--motion-easing-reveal)
|
|
65
|
+
calc(2 * var(--motion-duration-spinner) + var(--motion-duration-shift)) both;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival='waiting'] :is(svg, .dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
69
|
+
animation-play-state: paused !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (prefers-reduced-motion: reduce) {
|
|
73
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] :is(svg, .dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
74
|
+
animation: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* GENERATED from illustrationchoice.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: grid;
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
row-gap: var(--space-gap-sm);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__option {
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: grid;
|
|
14
|
+
background-color: var(--color-bg-subtle);
|
|
15
|
+
border-radius: var(--radius-control-md);
|
|
16
|
+
color: var(--color-fg-default);
|
|
17
|
+
column-gap: var(--space-gap-sm);
|
|
18
|
+
padding-block: var(--space-inset-sm);
|
|
19
|
+
padding-inline: var(--space-inset-md);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__radio {
|
|
23
|
+
border-style: solid;
|
|
24
|
+
display: grid;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
place-items: center;
|
|
27
|
+
border-radius: var(--radius-pill);
|
|
28
|
+
border-width: var(--border-width-emphasis);
|
|
29
|
+
height: var(--icon-size-sm);
|
|
30
|
+
width: var(--icon-size-sm);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__dot {
|
|
34
|
+
display: block;
|
|
35
|
+
border-radius: var(--radius-pill);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__outline {
|
|
39
|
+
border-style: solid;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
border-color: var(--color-border-info);
|
|
42
|
+
border-radius: var(--radius-control-md);
|
|
43
|
+
border-width: var(--border-width-emphasis);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__description {
|
|
47
|
+
color: var(--color-fg-muted);
|
|
48
|
+
font-family: var(--font-body-sm-family);
|
|
49
|
+
font-size: var(--font-body-sm-size);
|
|
50
|
+
font-weight: var(--font-body-sm-weight);
|
|
51
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
52
|
+
line-height: var(--font-body-sm-line-height);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__label {
|
|
56
|
+
font-family: var(--font-label-md-family);
|
|
57
|
+
font-size: var(--font-label-md-size);
|
|
58
|
+
font-weight: var(--font-label-md-weight);
|
|
59
|
+
letter-spacing: var(--font-label-md-letter-spacing);
|
|
60
|
+
line-height: var(--font-label-md-line-height);
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './IllustrationChoice.css';
|
|
2
|
+
import './illustration-choice-impl.css';
|
|
3
|
+
import { type IllustrationChoiceProps } from './IllustrationChoice.types.js';
|
|
4
|
+
export type { IllustrationChoiceProps };
|
|
5
|
+
/**
|
|
6
|
+
* A drawn set of options with one picked — a picture of the product making a choice, never a
|
|
7
|
+
* control.
|
|
8
|
+
*
|
|
9
|
+
* The outline is a grid item laid in the picked option's row, so the stylesheet places it without
|
|
10
|
+
* measuring anything. Picking on arrival, it starts a row away — the option after the picked one,
|
|
11
|
+
* or the one before where the picked one is last — and slides; which way is handed to the
|
|
12
|
+
* stylesheet as a sign, with the row it starts on marked so its circle can empty as it leaves.
|
|
13
|
+
*
|
|
14
|
+
* No script of its own: a choice that picks on arrival is wrapped to take one (arrives.tsx).
|
|
15
|
+
*/
|
|
16
|
+
export declare function IllustrationChoice({ options, value, motion, label, ...rest }: IllustrationChoiceProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './IllustrationChoice.css';
|
|
3
|
+
import './illustration-choice-impl.css';
|
|
4
|
+
import { Arrives } from '../../arrives.js';
|
|
5
|
+
import { given } from '../../given.js';
|
|
6
|
+
import { illustrationChoiceParts, } from './IllustrationChoice.types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A drawn set of options with one picked — a picture of the product making a choice, never a
|
|
9
|
+
* control.
|
|
10
|
+
*
|
|
11
|
+
* The outline is a grid item laid in the picked option's row, so the stylesheet places it without
|
|
12
|
+
* measuring anything. Picking on arrival, it starts a row away — the option after the picked one,
|
|
13
|
+
* or the one before where the picked one is last — and slides; which way is handed to the
|
|
14
|
+
* stylesheet as a sign, with the row it starts on marked so its circle can empty as it leaves.
|
|
15
|
+
*
|
|
16
|
+
* No script of its own: a choice that picks on arrival is wrapped to take one (arrives.tsx).
|
|
17
|
+
*/
|
|
18
|
+
export function IllustrationChoice({ options, value, motion, label, ...rest }) {
|
|
19
|
+
// A record from a feed or an editor is not typed: a missing list draws nothing rather than
|
|
20
|
+
// taking the page down.
|
|
21
|
+
if (!Array.isArray(options) || options.length === 0)
|
|
22
|
+
return null;
|
|
23
|
+
const picked = Math.max(0, options.findIndex((option) => option.value === value));
|
|
24
|
+
// Where the outline starts when it picks: the next option, or the one before if the pick is last.
|
|
25
|
+
const start = picked < options.length - 1 ? picked + 1 : picked - 1;
|
|
26
|
+
// A lone option has no other to start from, so it is drawn picked and still.
|
|
27
|
+
const moves = motion !== undefined && options.length > 1;
|
|
28
|
+
const named = given(label);
|
|
29
|
+
const choice = (_jsxs("div", { ...rest, className: illustrationChoiceParts.root, "data-motion": moves ? motion : undefined, role: named ? 'img' : undefined, "aria-label": named ? label : undefined, style: { '--dds-illustrationchoice-from': start - picked }, children: [options.map((option, at) => (_jsxs("div", { className: illustrationChoiceParts.option, "data-picked": at === picked ? '' : undefined, "data-start": moves && at === start ? '' : undefined, style: { gridRow: at + 1 }, children: [_jsx("span", { className: illustrationChoiceParts.radio, style: { gridRow: given(option.description) ? 'span 2' : undefined }, children: _jsx("span", { className: illustrationChoiceParts.dot }) }), _jsx("span", { className: illustrationChoiceParts.label, children: option.label }), given(option.description) ? (_jsx("span", { className: illustrationChoiceParts.description, children: option.description })) : null] }, option.value))), _jsx("span", { className: illustrationChoiceParts.outline, "aria-hidden": "true", style: { gridRow: picked + 1 } })] }));
|
|
30
|
+
return moves ? _jsx(Arrives, { children: choice }) : choice;
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { IllustrationChoiceOption } from '../../illustration-data.js';
|
|
3
|
+
export interface IllustrationChoiceOwnProps {
|
|
4
|
+
/** Always. Two to four options, each a name in a few words and a line under it where it needs one */
|
|
5
|
+
options: IllustrationChoiceOption[];
|
|
6
|
+
/** Always. The `value` of the option shown picked */
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* `pick` — The outline starts on a neighbouring option and slides to the picked one, whose circle then fills — the product making the choice
|
|
10
|
+
*/
|
|
11
|
+
motion?: 'pick';
|
|
12
|
+
/** Where the picture stands on its own and its options say less than a sentence would — "Choosing an account: the demo account". It names the whole as one image */
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
export type IllustrationChoiceProps = IllustrationChoiceOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'options' | 'value' | 'motion' | 'label'>;
|
|
16
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
17
|
+
export declare const illustrationChoiceParts: {
|
|
18
|
+
readonly root: "dds-illustrationchoice";
|
|
19
|
+
readonly option: "dds-illustrationchoice__option";
|
|
20
|
+
readonly radio: "dds-illustrationchoice__radio";
|
|
21
|
+
readonly dot: "dds-illustrationchoice__dot";
|
|
22
|
+
readonly label: "dds-illustrationchoice__label";
|
|
23
|
+
readonly description: "dds-illustrationchoice__description";
|
|
24
|
+
readonly outline: "dds-illustrationchoice__outline";
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// GENERATED from illustration-choice.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const illustrationChoiceParts = {
|
|
4
|
+
root: 'dds-illustrationchoice',
|
|
5
|
+
option: 'dds-illustrationchoice__option',
|
|
6
|
+
radio: 'dds-illustrationchoice__radio',
|
|
7
|
+
dot: 'dds-illustrationchoice__dot',
|
|
8
|
+
label: 'dds-illustrationchoice__label',
|
|
9
|
+
description: 'dds-illustrationchoice__description',
|
|
10
|
+
outline: 'dds-illustrationchoice__outline',
|
|
11
|
+
};
|