@deriv-com/dds-marketing 0.1.0 → 1.0.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 +201 -0
- package/.llm/components/accordionitem.md +244 -0
- package/.llm/components/aspectratio.md +220 -0
- package/.llm/components/badge.md +239 -0
- package/.llm/components/bottomsheet.md +412 -0
- package/.llm/components/breadcrumb.md +205 -0
- package/.llm/components/breadcrumbitem.md +186 -0
- package/.llm/components/button.md +295 -0
- package/.llm/components/buttonicon.md +321 -0
- package/.llm/components/card.md +327 -0
- package/.llm/components/cardbody.md +435 -0
- package/.llm/components/cardbutton.md +273 -0
- package/.llm/components/checkbox.md +293 -0
- package/.llm/components/ctabanner.md +186 -0
- package/.llm/components/ctabannerslider.md +204 -0
- package/.llm/components/divider.md +238 -0
- package/.llm/components/dropdownmenu.md +461 -0
- package/.llm/components/faqaccordion.md +217 -0
- package/.llm/components/featurebullets.md +254 -0
- package/.llm/components/featurecards.md +313 -0
- package/.llm/components/featurescroll.md +284 -0
- package/.llm/components/featuresplit.md +249 -0
- package/.llm/components/filterchip.md +322 -0
- package/.llm/components/footer.md +416 -0
- package/.llm/components/footergroup.md +249 -0
- package/.llm/components/grid.md +667 -0
- package/.llm/components/icon.md +202 -0
- package/.llm/components/landinghero.md +254 -0
- package/.llm/components/link.md +362 -0
- package/.llm/components/logocolumns.md +235 -0
- package/.llm/components/logorows.md +212 -0
- package/.llm/components/menuitem.md +226 -0
- package/.llm/components/navbar.md +522 -0
- package/.llm/components/navbaritem.md +246 -0
- package/.llm/components/navbarmenu.md +327 -0
- package/.llm/components/navbarmenugroup.md +192 -0
- package/.llm/components/navbarpanel.md +263 -0
- package/.llm/components/navbarswitcher.md +351 -0
- package/.llm/components/navbarswitcheroption.md +164 -0
- package/.llm/components/option.md +276 -0
- package/.llm/components/pageheader.md +231 -0
- package/.llm/components/pagination.md +298 -0
- package/.llm/components/paginationdots.md +215 -0
- package/.llm/components/producthero.md +248 -0
- package/.llm/components/removablechip.md +255 -0
- package/.llm/components/row.md +389 -0
- package/.llm/components/scroller.md +478 -0
- package/.llm/components/searchinput.md +287 -0
- package/.llm/components/segmentedcontrol.md +366 -0
- package/.llm/components/segmentedcontrolitem.md +280 -0
- package/.llm/components/select.md +517 -0
- package/.llm/components/selectchip.md +375 -0
- package/.llm/components/spinner.md +230 -0
- package/.llm/components/stack.md +342 -0
- package/.llm/components/statusdot.md +213 -0
- package/.llm/components/subdomainnavbar.md +335 -0
- package/.llm/components/tab.md +299 -0
- package/.llm/components/table.md +668 -0
- package/.llm/components/tablebody.md +266 -0
- package/.llm/components/tablecell.md +256 -0
- package/.llm/components/tablehead.md +256 -0
- package/.llm/components/tableheadercell.md +306 -0
- package/.llm/components/tablerow.md +293 -0
- package/.llm/components/tablist.md +218 -0
- package/.llm/components/testimonialrow.md +235 -0
- package/.llm/components/testimonialslider.md +254 -0
- package/.llm/components/textarea.md +370 -0
- package/.llm/components/textinput.md +475 -0
- package/.llm/components/tooltip.md +275 -0
- package/.llm/components/typography.md +253 -0
- package/.llm/digest/accordion.md +43 -0
- package/.llm/digest/accordionitem.md +47 -0
- package/.llm/digest/aspectratio.md +47 -0
- package/.llm/digest/badge.md +45 -0
- package/.llm/digest/bottomsheet.md +69 -0
- package/.llm/digest/breadcrumb.md +38 -0
- package/.llm/digest/breadcrumbitem.md +43 -0
- package/.llm/digest/button.md +53 -0
- package/.llm/digest/buttonicon.md +61 -0
- package/.llm/digest/card.md +51 -0
- package/.llm/digest/cardbody.md +70 -0
- package/.llm/digest/cardbutton.md +50 -0
- package/.llm/digest/checkbox.md +63 -0
- package/.llm/digest/ctabanner.md +44 -0
- package/.llm/digest/ctabannerslider.md +45 -0
- package/.llm/digest/divider.md +52 -0
- package/.llm/digest/dropdownmenu.md +67 -0
- package/.llm/digest/faqaccordion.md +43 -0
- package/.llm/digest/featurebullets.md +52 -0
- package/.llm/digest/featurecards.md +49 -0
- package/.llm/digest/featurescroll.md +52 -0
- package/.llm/digest/featuresplit.md +54 -0
- package/.llm/digest/filterchip.md +68 -0
- package/.llm/digest/footer.md +57 -0
- package/.llm/digest/footergroup.md +42 -0
- package/.llm/digest/grid.md +62 -0
- package/.llm/digest/icon.md +45 -0
- package/.llm/digest/landinghero.md +53 -0
- package/.llm/digest/link.md +59 -0
- package/.llm/digest/logocolumns.md +55 -0
- package/.llm/digest/logorows.md +48 -0
- package/.llm/digest/menuitem.md +46 -0
- package/.llm/digest/navbar.md +75 -0
- package/.llm/digest/navbaritem.md +54 -0
- package/.llm/digest/navbarmenu.md +54 -0
- package/.llm/digest/navbarmenugroup.md +40 -0
- package/.llm/digest/navbarpanel.md +53 -0
- package/.llm/digest/navbarswitcher.md +51 -0
- package/.llm/digest/navbarswitcheroption.md +37 -0
- package/.llm/digest/option.md +54 -0
- package/.llm/digest/pageheader.md +49 -0
- package/.llm/digest/pagination.md +60 -0
- package/.llm/digest/paginationdots.md +43 -0
- package/.llm/digest/producthero.md +53 -0
- package/.llm/digest/removablechip.md +51 -0
- package/.llm/digest/row.md +60 -0
- package/.llm/digest/scroller.md +59 -0
- package/.llm/digest/searchinput.md +56 -0
- package/.llm/digest/segmentedcontrol.md +59 -0
- package/.llm/digest/segmentedcontrolitem.md +59 -0
- package/.llm/digest/select.md +92 -0
- package/.llm/digest/selectchip.md +73 -0
- package/.llm/digest/spinner.md +52 -0
- package/.llm/digest/stack.md +56 -0
- package/.llm/digest/statusdot.md +46 -0
- package/.llm/digest/subdomainnavbar.md +54 -0
- package/.llm/digest/tab.md +60 -0
- package/.llm/digest/table.md +71 -0
- package/.llm/digest/tablebody.md +49 -0
- package/.llm/digest/tablecell.md +55 -0
- package/.llm/digest/tablehead.md +50 -0
- package/.llm/digest/tableheadercell.md +65 -0
- package/.llm/digest/tablerow.md +56 -0
- package/.llm/digest/tablist.md +46 -0
- package/.llm/digest/testimonialrow.md +51 -0
- package/.llm/digest/testimonialslider.md +51 -0
- package/.llm/digest/textarea.md +78 -0
- package/.llm/digest/textinput.md +95 -0
- package/.llm/digest/tooltip.md +58 -0
- package/.llm/digest/typography.md +59 -0
- package/.llm/index.md +107 -0
- package/.llm/rules.md +146 -0
- package/.llm/tokens.md +385 -0
- package/AGENTS.md +189 -0
- package/LICENSE +21 -0
- package/README.md +78 -10
- package/dist/components/banner-data.d.ts +38 -0
- package/dist/components/banner-data.js +15 -0
- package/dist/components/blocks/block-reveal.css +90 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +66 -0
- package/dist/components/blocks/cta-banner/CtaBanner.d.ts +22 -0
- package/dist/components/blocks/cta-banner/CtaBanner.js +31 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +29 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +13 -0
- package/dist/components/blocks/cta-banner/cta-banner-impl.css +29 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +90 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +39 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +60 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +41 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +15 -0
- package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +73 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +54 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.d.ts +20 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.js +28 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.types.d.ts +25 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.types.js +10 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +54 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +139 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.d.ts +31 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.js +55 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.types.d.ts +39 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.types.js +16 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +104 -0
- package/dist/components/blocks/feature-cards/FeatureCards.css +84 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +24 -0
- package/dist/components/blocks/feature-cards/FeatureCards.js +66 -0
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +33 -0
- package/dist/components/blocks/feature-cards/FeatureCards.types.js +14 -0
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +245 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +137 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.d.ts +39 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.js +167 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.types.d.ts +40 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.types.js +17 -0
- package/dist/components/blocks/feature-scroll/feature-scroll-impl.css +292 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +95 -0
- package/dist/components/blocks/feature-split/FeatureSplit.d.ts +30 -0
- package/dist/components/blocks/feature-split/FeatureSplit.js +38 -0
- package/dist/components/blocks/feature-split/FeatureSplit.types.d.ts +39 -0
- package/dist/components/blocks/feature-split/FeatureSplit.types.js +14 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +83 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +85 -0
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +41 -0
- package/dist/components/blocks/landing-hero/LandingHero.js +54 -0
- package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +37 -0
- package/dist/components/blocks/landing-hero/LandingHero.types.js +15 -0
- package/dist/components/blocks/landing-hero/landing-hero-impl.css +355 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +161 -0
- package/dist/components/blocks/logo-columns/LogoColumns.d.ts +23 -0
- package/dist/components/blocks/logo-columns/LogoColumns.js +46 -0
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +46 -0
- package/dist/components/blocks/logo-columns/LogoColumns.types.js +18 -0
- package/dist/components/blocks/logo-columns/logo-columns-impl.css +188 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +122 -0
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +20 -0
- package/dist/components/blocks/logo-rows/LogoRows.js +43 -0
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +36 -0
- package/dist/components/blocks/logo-rows/LogoRows.types.js +16 -0
- package/dist/components/blocks/logo-rows/logo-rows-impl.css +179 -0
- package/dist/components/blocks/page-header/PageHeader.css +79 -0
- package/dist/components/blocks/page-header/PageHeader.d.ts +34 -0
- package/dist/components/blocks/page-header/PageHeader.js +43 -0
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +32 -0
- package/dist/components/blocks/page-header/PageHeader.types.js +14 -0
- package/dist/components/blocks/page-header/page-header-impl.css +176 -0
- package/dist/components/blocks/product-hero/ProductHero.css +86 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +35 -0
- package/dist/components/blocks/product-hero/ProductHero.js +48 -0
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +37 -0
- package/dist/components/blocks/product-hero/ProductHero.types.js +15 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +354 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +245 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +20 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +128 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +54 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +26 -0
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +195 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +181 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +22 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +36 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +49 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +21 -0
- package/dist/components/blocks/testimonial-slider/testimonial-slider-impl.css +202 -0
- package/dist/components/blocks/use-reveal.d.ts +46 -0
- package/dist/components/blocks/use-reveal.js +120 -0
- package/dist/components/blocks/use-rotation.d.ts +62 -0
- package/dist/components/blocks/use-rotation.js +176 -0
- package/dist/components/core/accordion/Accordion.css +10 -0
- package/dist/components/core/accordion/Accordion.d.ts +20 -0
- package/dist/components/core/accordion/Accordion.js +69 -0
- package/dist/components/core/accordion/Accordion.types.d.ts +20 -0
- package/dist/components/core/accordion/Accordion.types.js +7 -0
- package/dist/components/core/accordion-item/AccordionItem.css +99 -0
- package/dist/components/core/accordion-item/AccordionItem.d.ts +44 -0
- package/dist/components/core/accordion-item/AccordionItem.js +63 -0
- package/dist/components/core/accordion-item/AccordionItem.types.d.ts +32 -0
- package/dist/components/core/accordion-item/AccordionItem.types.js +13 -0
- package/dist/components/core/accordion-item/accordion-item-impl.css +107 -0
- package/dist/components/core/badge/Badge.css +37 -0
- package/dist/components/core/badge/Badge.d.ts +37 -0
- package/dist/components/core/badge/Badge.js +40 -0
- package/dist/components/core/badge/Badge.types.d.ts +24 -0
- package/dist/components/core/badge/Badge.types.js +8 -0
- package/dist/components/core/badge/badge-impl.css +32 -0
- package/dist/components/core/bottom-sheet/BottomSheet.css +178 -0
- package/dist/components/core/bottom-sheet/BottomSheet.d.ts +22 -0
- package/dist/components/core/bottom-sheet/BottomSheet.js +359 -0
- package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +67 -0
- package/dist/components/core/bottom-sheet/BottomSheet.types.js +18 -0
- package/dist/components/core/bottom-sheet/bottom-sheet-impl.css +57 -0
- package/dist/components/core/breadcrumb/Breadcrumb.css +19 -0
- package/dist/components/core/breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/components/core/breadcrumb/Breadcrumb.js +22 -0
- package/dist/components/core/breadcrumb/Breadcrumb.types.d.ts +18 -0
- package/dist/components/core/breadcrumb/Breadcrumb.types.js +9 -0
- package/dist/components/core/breadcrumb-item/BreadcrumbItem.css +34 -0
- package/dist/components/core/breadcrumb-item/BreadcrumbItem.d.ts +12 -0
- package/dist/components/core/breadcrumb-item/BreadcrumbItem.js +15 -0
- package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.d.ts +22 -0
- package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.js +9 -0
- package/dist/components/core/button/Button.css +188 -0
- package/dist/components/core/button/Button.d.ts +27 -0
- package/dist/components/core/button/Button.js +57 -0
- package/dist/components/core/button/Button.types.d.ts +35 -0
- package/dist/components/core/button/Button.types.js +9 -0
- package/dist/components/core/button/button-impl.css +71 -0
- package/dist/components/core/button-icon/ButtonIcon.css +151 -0
- package/dist/components/core/button-icon/ButtonIcon.d.ts +34 -0
- package/dist/components/core/button-icon/ButtonIcon.js +117 -0
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +41 -0
- package/dist/components/core/button-icon/ButtonIcon.types.js +8 -0
- package/dist/components/core/card/Card.css +74 -0
- package/dist/components/core/card/Card.d.ts +24 -0
- package/dist/components/core/card/Card.js +26 -0
- package/dist/components/core/card/Card.types.d.ts +34 -0
- package/dist/components/core/card/Card.types.js +7 -0
- package/dist/components/core/card-body/CardBody.css +144 -0
- package/dist/components/core/card-body/CardBody.d.ts +62 -0
- package/dist/components/core/card-body/CardBody.js +97 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +64 -0
- package/dist/components/core/card-body/CardBody.types.js +16 -0
- package/dist/components/core/card-body/card-body-impl.css +87 -0
- package/dist/components/core/card-button/CardButton.css +82 -0
- package/dist/components/core/card-button/CardButton.d.ts +27 -0
- package/dist/components/core/card-button/CardButton.js +37 -0
- package/dist/components/core/card-button/CardButton.types.d.ts +25 -0
- package/dist/components/core/card-button/CardButton.types.js +7 -0
- package/dist/components/core/card-button/card-button-impl.css +39 -0
- package/dist/components/core/checkbox/Checkbox.css +156 -0
- package/dist/components/core/checkbox/Checkbox.d.ts +21 -0
- package/dist/components/core/checkbox/Checkbox.js +97 -0
- package/dist/components/core/checkbox/Checkbox.types.d.ts +46 -0
- package/dist/components/core/checkbox/Checkbox.types.js +15 -0
- package/dist/components/core/checkbox/checkbox-impl.css +90 -0
- package/dist/components/core/divider/Divider.css +41 -0
- package/dist/components/core/divider/Divider.d.ts +46 -0
- package/dist/components/core/divider/Divider.js +51 -0
- package/dist/components/core/divider/Divider.types.d.ts +25 -0
- package/dist/components/core/divider/Divider.types.js +9 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.css +147 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +24 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.js +311 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.types.d.ts +62 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.types.js +12 -0
- package/dist/components/core/dropdown-menu/dropdown-menu-impl.css +70 -0
- package/dist/components/core/filter-chip/FilterChip.css +150 -0
- package/dist/components/core/filter-chip/FilterChip.d.ts +23 -0
- package/dist/components/core/filter-chip/FilterChip.js +37 -0
- package/dist/components/core/filter-chip/FilterChip.types.d.ts +53 -0
- package/dist/components/core/filter-chip/FilterChip.types.js +12 -0
- package/dist/components/core/footer/Footer.css +104 -0
- package/dist/components/core/footer/Footer.d.ts +43 -0
- package/dist/components/core/footer/Footer.js +53 -0
- package/dist/components/core/footer/Footer.types.d.ts +47 -0
- package/dist/components/core/footer/Footer.types.js +18 -0
- package/dist/components/core/footer/footer-impl.css +218 -0
- package/dist/components/core/footer-group/FooterGroup.css +91 -0
- package/dist/components/core/footer-group/FooterGroup.d.ts +32 -0
- package/dist/components/core/footer-group/FooterGroup.js +64 -0
- package/dist/components/core/footer-group/FooterGroup.types.d.ts +25 -0
- package/dist/components/core/footer-group/FooterGroup.types.js +12 -0
- package/dist/components/core/footer-group/footer-group-impl.css +78 -0
- package/dist/components/core/icon/Icon.css +40 -0
- package/dist/components/core/icon/Icon.d.ts +23 -0
- package/dist/components/core/icon/Icon.js +79 -0
- package/dist/components/core/icon/Icon.types.d.ts +24 -0
- package/dist/components/core/icon/Icon.types.js +7 -0
- package/dist/components/core/link/Link.css +89 -0
- package/dist/components/core/link/Link.d.ts +37 -0
- package/dist/components/core/link/Link.js +141 -0
- package/dist/components/core/link/Link.types.d.ts +41 -0
- package/dist/components/core/link/Link.types.js +9 -0
- package/dist/components/core/link/link-impl.css +168 -0
- package/dist/components/core/menu-item/MenuItem.css +70 -0
- package/dist/components/core/menu-item/MenuItem.d.ts +11 -0
- package/dist/components/core/menu-item/MenuItem.js +26 -0
- package/dist/components/core/menu-item/MenuItem.types.d.ts +28 -0
- package/dist/components/core/menu-item/MenuItem.types.js +9 -0
- package/dist/components/core/navbar/Navbar.css +134 -0
- package/dist/components/core/navbar/Navbar.d.ts +52 -0
- package/dist/components/core/navbar/Navbar.js +498 -0
- package/dist/components/core/navbar/Navbar.types.d.ts +68 -0
- package/dist/components/core/navbar/Navbar.types.js +17 -0
- package/dist/components/core/navbar/navbar-impl.css +597 -0
- package/dist/components/core/navbar/navbar-material.css +96 -0
- package/dist/components/core/navbar-item/NavbarItem.css +75 -0
- package/dist/components/core/navbar-item/NavbarItem.d.ts +22 -0
- package/dist/components/core/navbar-item/NavbarItem.js +40 -0
- package/dist/components/core/navbar-item/NavbarItem.types.d.ts +34 -0
- package/dist/components/core/navbar-item/NavbarItem.types.js +10 -0
- package/dist/components/core/navbar-menu/NavbarMenu.css +130 -0
- package/dist/components/core/navbar-menu/NavbarMenu.d.ts +6 -0
- package/dist/components/core/navbar-menu/NavbarMenu.js +187 -0
- package/dist/components/core/navbar-menu/NavbarMenu.types.d.ts +45 -0
- package/dist/components/core/navbar-menu/NavbarMenu.types.js +12 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +186 -0
- package/dist/components/core/navbar-menu-group/NavbarMenuGroup.css +26 -0
- package/dist/components/core/navbar-menu-group/NavbarMenuGroup.d.ts +17 -0
- package/dist/components/core/navbar-menu-group/NavbarMenuGroup.js +22 -0
- package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.d.ts +14 -0
- package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.js +7 -0
- package/dist/components/core/navbar-panel/NavbarPanel.css +87 -0
- package/dist/components/core/navbar-panel/NavbarPanel.d.ts +34 -0
- package/dist/components/core/navbar-panel/NavbarPanel.js +46 -0
- package/dist/components/core/navbar-panel/NavbarPanel.types.d.ts +29 -0
- package/dist/components/core/navbar-panel/NavbarPanel.types.js +12 -0
- package/dist/components/core/navbar-panel/navbar-panel-impl.css +104 -0
- package/dist/components/core/navbar-panel/use-navbar-panel.d.ts +26 -0
- package/dist/components/core/navbar-panel/use-navbar-panel.js +135 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.css +118 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +21 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.js +91 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.types.d.ts +46 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.types.js +13 -0
- package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +179 -0
- package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.css +39 -0
- package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.d.ts +16 -0
- package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.js +19 -0
- package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.d.ts +18 -0
- package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.js +7 -0
- package/dist/components/core/option/Option.css +133 -0
- package/dist/components/core/option/Option.d.ts +25 -0
- package/dist/components/core/option/Option.js +31 -0
- package/dist/components/core/option/Option.types.d.ts +44 -0
- package/dist/components/core/option/Option.types.js +14 -0
- package/dist/components/core/pagination/Pagination.css +163 -0
- package/dist/components/core/pagination/Pagination.d.ts +30 -0
- package/dist/components/core/pagination/Pagination.js +366 -0
- package/dist/components/core/pagination/Pagination.types.d.ts +47 -0
- package/dist/components/core/pagination/Pagination.types.js +12 -0
- package/dist/components/core/pagination/pagination-impl.css +17 -0
- package/dist/components/core/pagination-dots/PaginationDots.css +60 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +25 -0
- package/dist/components/core/pagination-dots/PaginationDots.js +104 -0
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +38 -0
- package/dist/components/core/pagination-dots/PaginationDots.types.js +9 -0
- package/dist/components/core/removable-chip/RemovableChip.css +125 -0
- package/dist/components/core/removable-chip/RemovableChip.d.ts +25 -0
- package/dist/components/core/removable-chip/RemovableChip.js +36 -0
- package/dist/components/core/removable-chip/RemovableChip.types.d.ts +38 -0
- package/dist/components/core/removable-chip/RemovableChip.types.js +13 -0
- package/dist/components/core/search-input/SearchInput.css +205 -0
- package/dist/components/core/search-input/SearchInput.d.ts +5 -0
- package/dist/components/core/search-input/SearchInput.js +81 -0
- package/dist/components/core/search-input/SearchInput.types.d.ts +43 -0
- package/dist/components/core/search-input/SearchInput.types.js +13 -0
- package/dist/components/core/search-input/search-input-impl.css +20 -0
- package/dist/components/core/segmented-control/SegmentedControl.css +57 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +37 -0
- package/dist/components/core/segmented-control/SegmentedControl.js +269 -0
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +38 -0
- package/dist/components/core/segmented-control/SegmentedControl.types.js +8 -0
- package/dist/components/core/segmented-control/segmented-control-impl.css +57 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +151 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.d.ts +50 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.js +101 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +37 -0
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.js +10 -0
- package/dist/components/core/segmented-control-item/segmented-control-item-impl.css +69 -0
- package/dist/components/core/select/Select.css +401 -0
- package/dist/components/core/select/Select.d.ts +29 -0
- package/dist/components/core/select/Select.js +524 -0
- package/dist/components/core/select/Select.types.d.ts +96 -0
- package/dist/components/core/select/Select.types.js +26 -0
- package/dist/components/core/select/select-impl.css +114 -0
- package/dist/components/core/select-chip/SelectChip.css +162 -0
- package/dist/components/core/select-chip/SelectChip.d.ts +20 -0
- package/dist/components/core/select-chip/SelectChip.js +276 -0
- package/dist/components/core/select-chip/SelectChip.types.d.ts +62 -0
- package/dist/components/core/select-chip/SelectChip.types.js +14 -0
- package/dist/components/core/select-chip/select-chip-impl.css +49 -0
- package/dist/components/core/spinner/Spinner.css +76 -0
- package/dist/components/core/spinner/Spinner.d.ts +5 -0
- package/dist/components/core/spinner/Spinner.js +29 -0
- package/dist/components/core/spinner/Spinner.types.d.ts +37 -0
- package/dist/components/core/spinner/Spinner.types.js +10 -0
- package/dist/components/core/spinner/spinner-impl.css +27 -0
- package/dist/components/core/status-dot/StatusDot.css +43 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +35 -0
- package/dist/components/core/status-dot/StatusDot.js +46 -0
- package/dist/components/core/status-dot/StatusDot.types.d.ts +29 -0
- package/dist/components/core/status-dot/StatusDot.types.js +7 -0
- package/dist/components/core/status-dot/status-dot-impl.css +42 -0
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +89 -0
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.d.ts +21 -0
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.js +127 -0
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.d.ts +43 -0
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.js +13 -0
- package/dist/components/core/subdomain-navbar/subdomain-navbar-impl.css +147 -0
- package/dist/components/core/tab/Tab.css +113 -0
- package/dist/components/core/tab/Tab.d.ts +36 -0
- package/dist/components/core/tab/Tab.js +53 -0
- package/dist/components/core/tab/Tab.types.d.ts +42 -0
- package/dist/components/core/tab/Tab.types.js +13 -0
- package/dist/components/core/tab/tab-impl.css +49 -0
- package/dist/components/core/tab-list/TabList.css +40 -0
- package/dist/components/core/tab-list/TabList.d.ts +26 -0
- package/dist/components/core/tab-list/TabList.js +124 -0
- package/dist/components/core/tab-list/TabList.types.d.ts +20 -0
- package/dist/components/core/tab-list/TabList.types.js +7 -0
- package/dist/components/core/tab-list/tab-list-impl.css +56 -0
- package/dist/components/core/table/Table.css +40 -0
- package/dist/components/core/table/Table.d.ts +19 -0
- package/dist/components/core/table/Table.js +55 -0
- package/dist/components/core/table/Table.types.d.ts +59 -0
- package/dist/components/core/table/Table.types.js +9 -0
- package/dist/components/core/table/table-impl.css +97 -0
- package/dist/components/core/table/use-table-sort.d.ts +43 -0
- package/dist/components/core/table/use-table-sort.js +51 -0
- package/dist/components/core/table-body/TableBody.css +6 -0
- package/dist/components/core/table-body/TableBody.d.ts +12 -0
- package/dist/components/core/table-body/TableBody.js +26 -0
- package/dist/components/core/table-body/TableBody.types.d.ts +36 -0
- package/dist/components/core/table-body/TableBody.types.js +7 -0
- package/dist/components/core/table-cell/TableCell.css +76 -0
- package/dist/components/core/table-cell/TableCell.d.ts +21 -0
- package/dist/components/core/table-cell/TableCell.js +31 -0
- package/dist/components/core/table-cell/TableCell.types.d.ts +43 -0
- package/dist/components/core/table-cell/TableCell.types.js +7 -0
- package/dist/components/core/table-head/TableHead.css +6 -0
- package/dist/components/core/table-head/TableHead.d.ts +22 -0
- package/dist/components/core/table-head/TableHead.js +52 -0
- package/dist/components/core/table-head/TableHead.types.d.ts +39 -0
- package/dist/components/core/table-head/TableHead.types.js +7 -0
- package/dist/components/core/table-head/table-head-impl.css +51 -0
- package/dist/components/core/table-header-cell/TableHeaderCell.css +126 -0
- package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +21 -0
- package/dist/components/core/table-header-cell/TableHeaderCell.js +34 -0
- package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +56 -0
- package/dist/components/core/table-header-cell/TableHeaderCell.types.js +9 -0
- package/dist/components/core/table-header-cell/table-header-cell-impl.css +74 -0
- package/dist/components/core/table-row/TableRow.css +18 -0
- package/dist/components/core/table-row/TableRow.d.ts +17 -0
- package/dist/components/core/table-row/TableRow.js +32 -0
- package/dist/components/core/table-row/TableRow.types.d.ts +45 -0
- package/dist/components/core/table-row/TableRow.types.js +7 -0
- package/dist/components/core/table-row/table-row-impl.css +31 -0
- package/dist/components/core/text-area/TextArea.css +325 -0
- package/dist/components/core/text-area/TextArea.d.ts +13 -0
- package/dist/components/core/text-area/TextArea.js +133 -0
- package/dist/components/core/text-area/TextArea.types.d.ts +67 -0
- package/dist/components/core/text-area/TextArea.types.js +19 -0
- package/dist/components/core/text-area/text-area-impl.css +36 -0
- package/dist/components/core/text-input/TextInput.css +400 -0
- package/dist/components/core/text-input/TextInput.d.ts +5 -0
- package/dist/components/core/text-input/TextInput.js +130 -0
- package/dist/components/core/text-input/TextInput.types.d.ts +96 -0
- package/dist/components/core/text-input/TextInput.types.js +24 -0
- package/dist/components/core/text-input/text-input-impl.css +36 -0
- package/dist/components/core/tooltip/Tooltip.css +101 -0
- package/dist/components/core/tooltip/Tooltip.d.ts +51 -0
- package/dist/components/core/tooltip/Tooltip.js +87 -0
- package/dist/components/core/tooltip/Tooltip.types.d.ts +38 -0
- package/dist/components/core/tooltip/Tooltip.types.js +9 -0
- package/dist/components/core/tooltip/TooltipAnchor.d.ts +52 -0
- package/dist/components/core/tooltip/TooltipAnchor.js +69 -0
- package/dist/components/core/tooltip/tooltip-anchor.css +145 -0
- package/dist/components/core/tooltip/tooltip-impl.css +54 -0
- package/dist/components/core/tooltip/use-tooltip.d.ts +111 -0
- package/dist/components/core/tooltip/use-tooltip.js +189 -0
- package/dist/components/core/typography/Typography.css +96 -0
- package/dist/components/core/typography/Typography.d.ts +297 -0
- package/dist/components/core/typography/Typography.js +28 -0
- package/dist/components/core/typography/Typography.types.d.ts +40 -0
- package/dist/components/core/typography/Typography.types.js +7 -0
- package/dist/components/css-time.d.ts +20 -0
- package/dist/components/css-time.js +30 -0
- package/dist/components/given.d.ts +7 -0
- package/dist/components/given.js +9 -0
- package/dist/components/hover-open.d.ts +34 -0
- package/dist/components/hover-open.js +90 -0
- package/dist/components/index.d.ts +149 -1
- package/dist/components/index.js +145 -2
- package/dist/components/layout/aspect-ratio/AspectRatio.css +29 -0
- package/dist/components/layout/aspect-ratio/AspectRatio.d.ts +24 -0
- package/dist/components/layout/aspect-ratio/AspectRatio.js +26 -0
- package/dist/components/layout/aspect-ratio/AspectRatio.types.d.ts +22 -0
- package/dist/components/layout/aspect-ratio/AspectRatio.types.js +7 -0
- package/dist/components/layout/aspect-ratio/aspect-ratio-impl.css +44 -0
- package/dist/components/layout/grid/Grid.css +76 -0
- package/dist/components/layout/grid/Grid.d.ts +31 -0
- package/dist/components/layout/grid/Grid.js +33 -0
- package/dist/components/layout/grid/Grid.types.d.ts +48 -0
- package/dist/components/layout/grid/Grid.types.js +7 -0
- package/dist/components/layout/grid/grid-impl.css +62 -0
- package/dist/components/layout/row/Row.css +85 -0
- package/dist/components/layout/row/Row.d.ts +32 -0
- package/dist/components/layout/row/Row.js +34 -0
- package/dist/components/layout/row/Row.types.d.ts +45 -0
- package/dist/components/layout/row/Row.types.js +7 -0
- package/dist/components/layout/scroller/Scroller.css +59 -0
- package/dist/components/layout/scroller/Scroller.d.ts +34 -0
- package/dist/components/layout/scroller/Scroller.js +36 -0
- package/dist/components/layout/scroller/Scroller.types.d.ts +38 -0
- package/dist/components/layout/scroller/Scroller.types.js +7 -0
- package/dist/components/layout/scroller/scroller-impl.css +45 -0
- package/dist/components/layout/stack/Stack.css +73 -0
- package/dist/components/layout/stack/Stack.d.ts +28 -0
- package/dist/components/layout/stack/Stack.js +30 -0
- package/dist/components/layout/stack/Stack.types.d.ts +41 -0
- package/dist/components/layout/stack/Stack.types.js +7 -0
- package/dist/components/logo-data.d.ts +24 -0
- package/dist/components/logo-data.js +11 -0
- package/dist/components/scroll-data.d.ts +64 -0
- package/dist/components/scroll-data.js +17 -0
- package/dist/components/testimonial-row-data.d.ts +51 -0
- package/dist/components/testimonial-row-data.js +11 -0
- package/dist/components/testimonial-slider-data.d.ts +26 -0
- package/dist/components/testimonial-slider-data.js +10 -0
- package/dist/components/visually-hidden.d.ts +22 -0
- package/dist/components/visually-hidden.js +31 -0
- package/dist/fonts/LICENSE-inter.txt +93 -0
- package/dist/fonts/LICENSE-red-hat-mono.txt +93 -0
- package/dist/fonts/fonts.css +111 -0
- package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts/red-hat-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/red-hat-mono-latin-wght-normal.woff2 +0 -0
- package/dist/marketing.css +581 -162
- package/package.json +13 -4
package/AGENTS.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<!-- GENERATED from components/**/*.contract.json and rules/*.rule.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# @deriv-com/dds-marketing for agents
|
|
4
|
+
|
|
5
|
+
Read this first. It is the cheap read: everything below is the whole of what you need to
|
|
6
|
+
place a component correctly, and the files it points at are opened only when you need them.
|
|
7
|
+
|
|
8
|
+
## Three things, or nothing renders
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import '@deriv-com/dds-marketing/fonts.css' // the faces the tokens name, self-hosted
|
|
12
|
+
import '@deriv-com/dds-marketing/marketing.css' // once, at the root of the app
|
|
13
|
+
```
|
|
14
|
+
```html
|
|
15
|
+
<div data-dds-context="marketing"> <!-- around everything this package renders -->
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Without the second import every component renders unstyled: the stylesheet carries the
|
|
19
|
+
tokens they bind to. Component CSS travels with each component, so nothing else is imported.
|
|
20
|
+
|
|
21
|
+
Without the attribute every component renders unstyled too, and this one is easy to miss
|
|
22
|
+
because the tokens do not need it — they are published to `:root` as well. Component rules
|
|
23
|
+
are published only inside the scope, and they have to be: every class is `dds-<name>` with
|
|
24
|
+
no package in it, so Product and Marketing both emit `.dds-button`. An app installing both
|
|
25
|
+
would otherwise have one package painting the other, with bundler order picking the winner.
|
|
26
|
+
Put it on whatever wraps this package — the app root, or the section, if the two live on one
|
|
27
|
+
page. It costs nothing in specificity: the scope is a `:where()`, so your own overrides beat
|
|
28
|
+
the components exactly as they did before.
|
|
29
|
+
|
|
30
|
+
Without the first, text silently falls back to the system typeface — the tokens name Inter
|
|
31
|
+
and Red Hat Mono but cannot carry the files. An app that already self-hosts the fonts
|
|
32
|
+
(next/font, Fontsource) skips `fonts.css` and sets `--font-family-sans` /
|
|
33
|
+
`--font-family-mono` instead; the README covers that path.
|
|
34
|
+
|
|
35
|
+
Dark is `data-theme="dark"` on any ancestor, usually `<html>`. Both themes live in that one
|
|
36
|
+
stylesheet — there is no second import and no provider. The two attributes are independent:
|
|
37
|
+
the theme can sit above the scope, on the same element as it, or below it.
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<html data-theme="dark">
|
|
41
|
+
<body><div data-dds-context="marketing"> <!-- dark, from here down --></div></body>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Server Components
|
|
45
|
+
|
|
46
|
+
Every module that needs the browser carries `"use client"`, so importing from this package
|
|
47
|
+
in an App Router application works without a wrapper. Components that hold no state — `Badge`,
|
|
48
|
+
`Divider`, `Card` — have no directive and render on the server.
|
|
49
|
+
|
|
50
|
+
What that leaves you: a Server Component still cannot pass a function across the boundary, so
|
|
51
|
+
a component you give `onChange` or `onClick` to goes in a file of your own that says
|
|
52
|
+
`"use client"`. That is React's rule rather than this package's, and the error names your file.
|
|
53
|
+
|
|
54
|
+
## Rules that span components
|
|
55
|
+
|
|
56
|
+
- **A component is written along the reading axis, not along the page's left and right**
|
|
57
|
+
- **A navigation bar holds at most two buttons: one primary, and one secondary beside it**
|
|
58
|
+
- **A section that paints a ground sets the ink to go with it**
|
|
59
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone**
|
|
60
|
+
- **Anything a pointer has to hit is at least 24px in both directions**
|
|
61
|
+
- **At most one primary button per view**
|
|
62
|
+
- **Destructive actions require a confirmation step**
|
|
63
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side**
|
|
64
|
+
- **Never nest one interactive element inside another**
|
|
65
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one**
|
|
66
|
+
- **Match the glyph weight to the icon size** *(guidance)*
|
|
67
|
+
- **Solid weight means selected** *(guidance)*
|
|
68
|
+
|
|
69
|
+
Reasons and the cases each one turns on: `.llm/rules.md`.
|
|
70
|
+
|
|
71
|
+
## What is here
|
|
72
|
+
|
|
73
|
+
One line each — the case the component was written for. Where two look alike, the
|
|
74
|
+
component documents say which to reach for and why, and that is what they are for.
|
|
75
|
+
|
|
76
|
+
Grouped by where each sits in the system, because that is the first thing that rules a
|
|
77
|
+
component in or out: a view has no use for another area’s components, and the frame a
|
|
78
|
+
screen is built in is not something to reach for while building a control.
|
|
79
|
+
|
|
80
|
+
### Core — domain-neutral building blocks
|
|
81
|
+
|
|
82
|
+
- **Accordion** — Questions a reader asks near a decision
|
|
83
|
+
- **AccordionItem** — One row inside an Accordion
|
|
84
|
+
- **Badge** — One of a set is the one the page wants read first
|
|
85
|
+
- **BottomSheet** — A task needs the screen's full width and the reader's undivided attention
|
|
86
|
+
- **Breadcrumb** — The page sits inside a section hierarchy, and the levels above it are places the visitor can navigate to
|
|
87
|
+
- **BreadcrumbItem** — Rendering one level of a Breadcrumb
|
|
88
|
+
- **Button** — The call to action on a marketing page
|
|
89
|
+
- **ButtonIcon** — One press with no room for words
|
|
90
|
+
- **Card** — Content that is read as one thing
|
|
91
|
+
- **CardBody** — Words, a picture, or both inside a Card
|
|
92
|
+
- **CardButton** — The whole card is the target rather than a link buried in it
|
|
93
|
+
- **Checkbox** — A choice the user makes now and confirms later
|
|
94
|
+
- **Divider** — Two groups inside one container that nothing else is separating
|
|
95
|
+
- **DropdownMenu** — A set of destinations too long for the navigation bar and too short to be a page of its own
|
|
96
|
+
- **FilterChip** — An index is long enough to be worth cutting down and its categories are few enough to show in full
|
|
97
|
+
- **Footer** — A marketing page needs its closing band
|
|
98
|
+
- **FooterGroup** — A set of a footer's destinations belong under one word
|
|
99
|
+
- **Icon** — A glyph stands beside words to speed recognition
|
|
100
|
+
- **Link** — A term inside running copy has a page of its own
|
|
101
|
+
- **MenuItem** — A row in a menu of destinations
|
|
102
|
+
- **Navbar** — A marketing page needs its top-level navigation
|
|
103
|
+
- **NavbarItem** — A section of the site, in a Navbar
|
|
104
|
+
- **NavbarMenu** — A section of the site has enough inside it that naming the section is not enough
|
|
105
|
+
- **NavbarMenuGroup** — A section's panel holds more destinations than a reader takes in at once, and they fall into sets
|
|
106
|
+
- **NavbarPanel** — Navbar is collapsing and its destinations have to go somewhere
|
|
107
|
+
- **NavbarSwitcher** — A bar needs a language or region switcher
|
|
108
|
+
- **NavbarSwitcherOption** — A NavbarSwitcher needs its choices
|
|
109
|
+
- **Option** — An answer inside a control that opens a list
|
|
110
|
+
- **Pagination** — An index or archive has been split across pages and the reader needs to move through it
|
|
111
|
+
- **PaginationDots** — Showing where the reader is in a short sequence they move through
|
|
112
|
+
- **RemovableChip** — An index shows the narrowings currently applied above its results, and each has to come off on its own without clearing the rest
|
|
113
|
+
- **SearchInput** — A help centre, a knowledge base, or documentation
|
|
114
|
+
- **SegmentedControl** — Two to four alternatives that exclude one another, where the whole set is worth showing at once and the reader decides by weighing them side by side rather than recalling which exist
|
|
115
|
+
- **SegmentedControlItem** — One option in a SegmentedControl
|
|
116
|
+
- **Select** — A form asks for one answer out of a set the visitor recognises
|
|
117
|
+
- **SelectChip** — A row narrows an index by one value out of a set, and has to keep showing which value that is
|
|
118
|
+
- **Spinner** — The reader has just submitted something
|
|
119
|
+
- **StatusDot** — Marking something the page is pointing at
|
|
120
|
+
- **SubdomainNavbar** — A subdomain needs its top-level navigation
|
|
121
|
+
- **Tab** — One of a small set of comparable versions of the same offer
|
|
122
|
+
- **Table** — Data with a uniform structure, where the same fields exist on every row and a reader compares one row against another down a column
|
|
123
|
+
- **TableBody** — The data itself
|
|
124
|
+
- **TableCell** — A value in a data row
|
|
125
|
+
- **TableHead** — Naming the columns
|
|
126
|
+
- **TableHeaderCell** — Naming a column
|
|
127
|
+
- **TableRow** — A record, with one cell per column
|
|
128
|
+
- **TabList** — Two or three versions of one offer differ in a way a reader wants to compare
|
|
129
|
+
- **TextArea** — A contact form asks what the reader actually wants
|
|
130
|
+
- **TextInput** — A page asks for an email
|
|
131
|
+
- **Tooltip** — Naming a control whose icon or abbreviation cannot say what it does
|
|
132
|
+
- **Typography** — A heading, a paragraph, or a caption on a marketing page
|
|
133
|
+
|
|
134
|
+
### Layout — arrange other components, decide no appearance of their own
|
|
135
|
+
|
|
136
|
+
- **AspectRatio** — A picture whose proportions have to match the ones beside it
|
|
137
|
+
- **Grid** — Several things of the same kind are read across and down, and a cell has to line up with the cell above it
|
|
138
|
+
- **Row** — Two or more things are read across rather than down, and the space between them is the same all the way along
|
|
139
|
+
- **Scroller** — A set is longer than the space and its order is worth keeping
|
|
140
|
+
- **Stack** — Two or more things are read down the page in order and the space between them is the same the whole way down
|
|
141
|
+
|
|
142
|
+
### Blocks — the sections a page is built from, and the rhythm between them
|
|
143
|
+
|
|
144
|
+
- **CtaBanner** — A short, high-contrast promotion with one clear action
|
|
145
|
+
- **CtaBannerSlider** — Rotating between two or three genuinely different promotions without a hero's weight
|
|
146
|
+
- **FaqAccordion** — The questions a reader asks before acting
|
|
147
|
+
- **FeatureBullets** — A page has to list what a product or a plan includes, and the list is the argument
|
|
148
|
+
- **FeatureCards** — Three or four things a product does, each a heading and a sentence, read side by side and compared at a glance
|
|
149
|
+
- **FeatureScroll** — A page has three or more things of the same kind to explain, each with a picture worth a screen
|
|
150
|
+
- **FeatureSplit** — A page needs one more point about something it has already introduced, with a picture to carry it
|
|
151
|
+
- **LandingHero** — A main landing page needs its opening band
|
|
152
|
+
- **LogoColumns** — Showing the partners, integrations or payment methods behind a claim
|
|
153
|
+
- **LogoRows** — Showing the partners, integrations or payment methods behind a claim under it, where the words lead and the logos follow
|
|
154
|
+
- **PageHeader** — A company, legal or support page needs its opening band
|
|
155
|
+
- **ProductHero** — A product or a market page needs its opening band
|
|
156
|
+
- **TestimonialRow** — Five to ten short, rated reviews collected by a review service, where seeing several at once is the point and the overall score is worth stating
|
|
157
|
+
- **TestimonialSlider** — Two to five real quotes from partners or customers, each a few sentences, read one at a time
|
|
158
|
+
|
|
159
|
+
## Components that need mounting
|
|
160
|
+
|
|
161
|
+
These do not work from the import alone. Each has a Behaviour section in its own document
|
|
162
|
+
saying what to mount and where.
|
|
163
|
+
|
|
164
|
+
- **NavbarPanel** — useNavbarPanel
|
|
165
|
+
- **Table** — useTableSort
|
|
166
|
+
- **Tooltip** — useTooltip, useTooltipDefaults, TooltipAnchor
|
|
167
|
+
|
|
168
|
+
## Reading order
|
|
169
|
+
|
|
170
|
+
1. This file.
|
|
171
|
+
2. `.llm/rules.md` before writing anything — 1,500 tokens, and it is where the constraints
|
|
172
|
+
that no single component can state live.
|
|
173
|
+
3. `.llm/digest/<name>.md` for every component you are using — **all of it, not the part
|
|
174
|
+
you were looking for**. Around 1,400 tokens each: what it is for, what to reach for
|
|
175
|
+
instead, what it must never do, every prop with the case it is for, the combinations
|
|
176
|
+
the type refuses, and what may go inside it. Reading it whole is the point. Searching
|
|
177
|
+
finds only what you already know to name, and the facts most often got wrong here are
|
|
178
|
+
the ones nobody knew to look for.
|
|
179
|
+
4. `.llm/tokens.md` only if you are writing CSS of your own. It is the token vocabulary,
|
|
180
|
+
and it opens by saying the thing that matters: write the variable, never the value.
|
|
181
|
+
5. `.llm/components/<name>.md` once you are working on one component and want the
|
|
182
|
+
reasoning: the parts it renders, its states, the argument behind each decision, and
|
|
183
|
+
snippets that compile. Around 5,900 tokens each, so reach for it by the component
|
|
184
|
+
rather than by the screen.
|
|
185
|
+
6. `.llm/index.md` when the one-line list above is not enough to choose — the same
|
|
186
|
+
question, with every component's full guidance and what to use instead.
|
|
187
|
+
|
|
188
|
+
Props carry their own guidance in the types as well, so an editor or a language server
|
|
189
|
+
shows the case for a prop and its values without opening a file.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Deriv
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
# @deriv/dds-marketing
|
|
1
|
+
# @deriv-com/dds-marketing
|
|
2
2
|
|
|
3
3
|
Components and design tokens from the Deriv Design System, for marketing sites — landing
|
|
4
4
|
pages, pricing, sign-up.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
**Working with an AI agent?** Point it at [`AGENTS.md`](./AGENTS.md) in this package. It is
|
|
7
|
+
the short version of everything below and says which of the `.llm/` documents to open.
|
|
8
|
+
|
|
9
|
+
It has two kinds of component: **core** components — Button, Navbar, Card, Link, the form
|
|
10
|
+
controls and the rest — and **blocks**, the bands a page is built from: `LandingHero`,
|
|
11
|
+
`ProductHero` and `PageHeader` to open a page, and `FeatureSplit`, `FeatureBullets` and
|
|
12
|
+
`FeatureScroll` for the sections under it. `AGENTS.md` lists every one of them with a line
|
|
13
|
+
on when to reach for it. Product apps want
|
|
14
|
+
[`@deriv-com/dds-product`](https://www.npmjs.com/package/@deriv-com/dds-product).
|
|
10
15
|
|
|
11
16
|
## Install
|
|
12
17
|
|
|
13
18
|
```bash
|
|
14
|
-
npm install @deriv/dds-marketing
|
|
19
|
+
npm install @deriv-com/dds-marketing
|
|
15
20
|
```
|
|
16
21
|
|
|
17
22
|
React 19 and the Quill icon set are peer dependencies, so install them alongside it if
|
|
@@ -27,30 +32,93 @@ Import the stylesheet once, at the root of your app. It defines every token this
|
|
|
27
32
|
components bind to — without it they render unstyled.
|
|
28
33
|
|
|
29
34
|
```tsx
|
|
30
|
-
import '@deriv/dds-marketing/marketing.css'
|
|
35
|
+
import '@deriv-com/dds-marketing/marketing.css'
|
|
31
36
|
```
|
|
32
37
|
|
|
38
|
+
Then put `data-dds-context="marketing"` on whatever wraps the components — the app root, or
|
|
39
|
+
the section, if marketing and product live on one page. Component rules are published only
|
|
40
|
+
inside that scope, because both packages emit classes like `.dds-button` and one would
|
|
41
|
+
otherwise paint the other. Without it the components render unstyled too.
|
|
42
|
+
|
|
33
43
|
Then import components by name:
|
|
34
44
|
|
|
35
45
|
```tsx
|
|
36
|
-
import { Button } from '@deriv/dds-marketing'
|
|
46
|
+
import { Button, LandingHero } from '@deriv-com/dds-marketing'
|
|
47
|
+
|
|
48
|
+
export function Home() {
|
|
49
|
+
return (
|
|
50
|
+
<div data-dds-context="marketing">
|
|
51
|
+
<LandingHero
|
|
52
|
+
title="Trade smarter with Deriv"
|
|
53
|
+
description="Access 250+ markets with tight spreads and powerful tools."
|
|
54
|
+
actions={<Button href="/signup">Get started free</Button>}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
37
59
|
```
|
|
38
60
|
|
|
39
61
|
Each component brings its own stylesheet with it, so nothing else needs importing.
|
|
40
62
|
|
|
41
|
-
##
|
|
63
|
+
## Fonts
|
|
64
|
+
|
|
65
|
+
The system is designed for [Inter](https://rsms.me/inter/) (all text) and
|
|
66
|
+
[Red Hat Mono](https://github.com/RedHatOfficial/RedHatFont) (code).
|
|
67
|
+
`marketing.css` names them but cannot carry them — if nothing loads the fonts, every role
|
|
68
|
+
silently falls back to the system typeface, and any weight the page is missing gets faked
|
|
69
|
+
by the browser. Pick one of the two paths:
|
|
70
|
+
|
|
71
|
+
**Let the package supply them.** One import next to `marketing.css`:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import '@deriv-com/dds-marketing/fonts.css'
|
|
75
|
+
import '@deriv-com/dds-marketing/marketing.css'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This self-hosts both faces from the package (variable-weight WOFF2, subset per script,
|
|
79
|
+
~260 KB total across all scripts — a page only downloads the subsets its text uses). Both
|
|
80
|
+
fonts are under the SIL Open Font License; the licenses ship in `dist/fonts/`.
|
|
81
|
+
|
|
82
|
+
**Load them yourself.** If your app already hosts the fonts — `next/font`, Fontsource, or
|
|
83
|
+
your own `@font-face` — skip `fonts.css` and point the two family variables at what you
|
|
84
|
+
loaded:
|
|
85
|
+
|
|
86
|
+
```css
|
|
87
|
+
:root {
|
|
88
|
+
--font-family-sans: var(--your-inter-variable), system-ui, sans-serif;
|
|
89
|
+
--font-family-mono: var(--your-mono-variable), ui-monospace, monospace;
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Every type role reads its family from these two variables, so this redirects the whole
|
|
94
|
+
system at once. Load weights 400–700 for Inter (a variable font covers this in one file);
|
|
95
|
+
a missing weight does not fall back visibly — the browser synthesises a faux bold instead.
|
|
96
|
+
|
|
97
|
+
## Light and dark, and a viewport axis
|
|
42
98
|
|
|
43
99
|
`marketing.css` defines both themes. Dark is selected by `data-theme="dark"` on any
|
|
44
100
|
ancestor — usually `<html>`:
|
|
45
101
|
|
|
46
102
|
```html
|
|
47
103
|
<html data-theme="dark">
|
|
104
|
+
<body>
|
|
105
|
+
<div data-dds-context="marketing"> <!-- dark, from here down -->
|
|
48
106
|
```
|
|
49
107
|
|
|
50
|
-
|
|
108
|
+
The theme attribute and the context attribute are independent, and the theme may sit above
|
|
109
|
+
the scope, on the same element, or below it. There is no provider and no second import.
|
|
110
|
+
|
|
111
|
+
Marketing does carry a mobile viewport axis: seven roles take different values below
|
|
51
112
|
768px, applied automatically and overridable with `data-dds-viewport="mobile"` or
|
|
52
113
|
`"desktop"` when a page renders a device frame inside a wider window.
|
|
53
114
|
|
|
115
|
+
## Documentation
|
|
116
|
+
|
|
117
|
+
- [`AGENTS.md`](./AGENTS.md) — the front door: setup, the rules that span components, and
|
|
118
|
+
what this package currently has.
|
|
119
|
+
- `.llm/rules.md` — the constraints no single component can state.
|
|
120
|
+
- `.llm/tokens.md` — the token vocabulary, including the mobile viewport axis above.
|
|
121
|
+
|
|
54
122
|
## Versioning
|
|
55
123
|
|
|
56
124
|
Pre-1.0. Minor versions may contain breaking changes while the component surface settles;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The messages a CtaBannerSlider rotates between.
|
|
3
|
+
*
|
|
4
|
+
* Exported from the package for the reason `scroll-data.ts` is: a block whose content is a list is
|
|
5
|
+
* one whose consumer builds a value before passing it, and building it without the type means
|
|
6
|
+
* writing the shape out twice.
|
|
7
|
+
*
|
|
8
|
+
* A record rather than a component per slide, by decision on 2026-10-01. A slide was CtaBannerSlide,
|
|
9
|
+
* a child that took its actions as elements; it existed only so a slide could carry a Button, and it
|
|
10
|
+
* was a second component to learn for what is one block. As data, the set can come from a CMS, and
|
|
11
|
+
* the slider draws the buttons itself — the primary as Button variant="inverse", the second as the
|
|
12
|
+
* white-tinted secondary, both at tone="brand" — so no slide can put a coral button on the coral
|
|
13
|
+
* ground. What it costs is the slot: an action is a label and a href, not a Button the page composed.
|
|
14
|
+
*/
|
|
15
|
+
/** A way onward from a slide: the words on the button and where it goes. */
|
|
16
|
+
export interface CtaBannerAction {
|
|
17
|
+
/** What the button says, as a verb — 'Open account', 'Try TradersView'. */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Where it goes. A slide's action is always a link; a banner that runs code on press is not a banner. */
|
|
20
|
+
href: string;
|
|
21
|
+
}
|
|
22
|
+
/** One message in a CtaBannerSlider: the headline, the line under it, and what it asks for. */
|
|
23
|
+
export interface CtaBannerSlide {
|
|
24
|
+
/**
|
|
25
|
+
* The message, in a few words. Short enough to take in as the slide arrives; drawn as a heading
|
|
26
|
+
* at font.h1, so a reader moving by heading finds the message in view.
|
|
27
|
+
*/
|
|
28
|
+
title: string;
|
|
29
|
+
/** A line saying why the action is worth taking. A sentence, not a paragraph. */
|
|
30
|
+
description?: string;
|
|
31
|
+
/** The action the message asks for, drawn as Button variant="inverse" tone="brand" — near-black in both themes. */
|
|
32
|
+
primaryAction?: CtaBannerAction;
|
|
33
|
+
/**
|
|
34
|
+
* A second, lesser action, drawn as the white-tinted secondary, Button tone="brand". Drawn only beside a
|
|
35
|
+
* primary: a slide with one action makes it the primary, the rule Navbar holds its pair to.
|
|
36
|
+
*/
|
|
37
|
+
secondaryAction?: CtaBannerAction;
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The messages a CtaBannerSlider rotates between.
|
|
3
|
+
*
|
|
4
|
+
* Exported from the package for the reason `scroll-data.ts` is: a block whose content is a list is
|
|
5
|
+
* one whose consumer builds a value before passing it, and building it without the type means
|
|
6
|
+
* writing the shape out twice.
|
|
7
|
+
*
|
|
8
|
+
* A record rather than a component per slide, by decision on 2026-10-01. A slide was CtaBannerSlide,
|
|
9
|
+
* a child that took its actions as elements; it existed only so a slide could carry a Button, and it
|
|
10
|
+
* was a second component to learn for what is one block. As data, the set can come from a CMS, and
|
|
11
|
+
* the slider draws the buttons itself — the primary as Button variant="inverse", the second as the
|
|
12
|
+
* white-tinted secondary, both at tone="brand" — so no slide can put a coral button on the coral
|
|
13
|
+
* ground. What it costs is the slot: an action is a label and a href, not a Button the page composed.
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The arrival every block shares, defined once.
|
|
3
|
+
*
|
|
4
|
+
* A section's parts wait a short way below where they land and come up in reading order as a
|
|
5
|
+
* reader reaches the block. It is the only motion these blocks have in common, and a copy per
|
|
6
|
+
* block is how six sections come to disagree about what arriving looks like — one tuned, five not,
|
|
7
|
+
* and nothing to say which is the house answer. So the movement is stated here and each block's
|
|
8
|
+
* own stylesheet says which of its parts make it.
|
|
9
|
+
*
|
|
10
|
+
* Imported by each block's component, which is what puts it in the bundle once however many
|
|
11
|
+
* blocks a page uses.
|
|
12
|
+
*
|
|
13
|
+
* `data-revealed` goes on the box that is watched — see `use-reveal.ts`, which explains why
|
|
14
|
+
* neither trigger CSS can offer on its own is enough. `data-reveal-at` marks each part inside it
|
|
15
|
+
* that arrives, and the same number is set as `--dds-reveal-at` for the arithmetic: an attribute
|
|
16
|
+
* is what CSS can select on, and a custom property is what it can multiply. Two spellings of one
|
|
17
|
+
* index, each doing the job the other cannot.
|
|
18
|
+
*
|
|
19
|
+
* The waiting state is `[data-revealed="false"]` rather than the absence of a value, so a block
|
|
20
|
+
* rendered before any script has run — or where none ever will — is visible rather than hidden.
|
|
21
|
+
* Content behind a script is the one failure this could have that is worse than no motion.
|
|
22
|
+
*
|
|
23
|
+
* Every value is a token, and three of them are the set this system already had for the job:
|
|
24
|
+
* `motion.duration.reveal` is described as "content appearing on scroll, section reveals, feature
|
|
25
|
+
* items fading in", `motion.easing.reveal` is its curve, and `motion.translate.reveal` is the
|
|
26
|
+
* distance. `opacity.hidden` is what a part waits at and `motion.duration.stagger` is the step
|
|
27
|
+
* between one part and the next.
|
|
28
|
+
*
|
|
29
|
+
* The duration was `motion.duration.dramatic` for a while, which is the role for an editorial hero
|
|
30
|
+
* entrance — right while the opening bands were on a timer and wrong once every block arrived on a
|
|
31
|
+
* reader reaching it. Two roles were named for these two triggers and the work had drifted onto
|
|
32
|
+
* the wrong one.
|
|
33
|
+
*/
|
|
34
|
+
/*
|
|
35
|
+
* Waiting is instant; only arriving is animated.
|
|
36
|
+
*
|
|
37
|
+
* A transition is decided by the state a thing is moving *to*, so declaring it on both states
|
|
38
|
+
* animates the way in and the way out alike — and the way out is not a thing anybody should see.
|
|
39
|
+
* A block is marked as waiting once, in a layout effect, before the browser has painted; if that
|
|
40
|
+
* ever lands a frame late the block has already been drawn, and an animated hide turns one dropped
|
|
41
|
+
* frame into three-quarters of a second of the section fading away in front of a reader. That is
|
|
42
|
+
* exactly what it looked like.
|
|
43
|
+
*
|
|
44
|
+
* `transition: none` here rather than nothing, because the arrived rule below is what carries the
|
|
45
|
+
* timings and a part moving back to waiting must not inherit them.
|
|
46
|
+
*
|
|
47
|
+
* Both spellings on every rule: a part is usually inside the box that is watched, and sometimes it
|
|
48
|
+
* is that box. FeatureScroll's heading is the case — the section watches the heading itself, and
|
|
49
|
+
* wrapping it in something whose only job was to be a container would put a box in the markup to
|
|
50
|
+
* satisfy a stylesheet.
|
|
51
|
+
*/
|
|
52
|
+
:where([data-dds-context="marketing"]) [data-revealed='false'] [data-reveal-at],
|
|
53
|
+
:where([data-dds-context="marketing"]) [data-revealed='false'][data-reveal-at] {
|
|
54
|
+
opacity: var(--opacity-hidden);
|
|
55
|
+
transition: none;
|
|
56
|
+
translate: var(--motion-translate-reveal);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* Each part a step behind the one before it.
|
|
61
|
+
*
|
|
62
|
+
* On the way in only. The delay is declared on the arrived state, which is the state a part is
|
|
63
|
+
* transitioning *to* — so a block that is somehow put back to waiting drops without a queue.
|
|
64
|
+
*
|
|
65
|
+
* A block arrives as one thing that happens to be made of parts, which is what the step size is
|
|
66
|
+
* for: at a tenth of a second, five parts trail the first by less than half a second, well inside
|
|
67
|
+
* the movement's own duration. A longer step would be the section assembling itself while a reader
|
|
68
|
+
* waits for the sentence they came to read.
|
|
69
|
+
*/
|
|
70
|
+
:where([data-dds-context="marketing"]) [data-revealed='true'] [data-reveal-at],
|
|
71
|
+
:where([data-dds-context="marketing"]) [data-revealed='true'][data-reveal-at] {
|
|
72
|
+
transition-delay: calc(var(--dds-reveal-at, 0) * var(--motion-duration-stagger));
|
|
73
|
+
transition-duration: var(--motion-duration-reveal);
|
|
74
|
+
transition-property: opacity, translate;
|
|
75
|
+
transition-timing-function: var(--motion-easing-reveal);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* A reader who asked for less movement gets none of it.
|
|
80
|
+
*
|
|
81
|
+
* The hook declines to hide anything under this preference, so the parts are never in the waiting
|
|
82
|
+
* state to begin with. This is the second half of the same answer: if a part is somehow marked as
|
|
83
|
+
* waiting, it still arrives without travelling and without queueing behind its neighbours.
|
|
84
|
+
*/
|
|
85
|
+
@media (prefers-reduced-motion: reduce) {
|
|
86
|
+
:where([data-dds-context="marketing"]) [data-revealed] [data-reveal-at],
|
|
87
|
+
:where([data-dds-context="marketing"]) [data-revealed][data-reveal-at] {
|
|
88
|
+
transition: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* GENERATED from ctabanner.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
display: flex;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
position: relative;
|
|
10
|
+
background-color: var(--color-bg-brand);
|
|
11
|
+
color: var(--color-fg-on-brand);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__inner {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
inline-size: 100%;
|
|
19
|
+
min-inline-size: 0;
|
|
20
|
+
max-inline-size: var(--size-content-max);
|
|
21
|
+
padding-block: var(--space-section-default);
|
|
22
|
+
padding-inline: var(--space-inset-page);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__content {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
min-inline-size: 0;
|
|
29
|
+
row-gap: var(--space-heading-description-actions);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__text {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
min-inline-size: 0;
|
|
36
|
+
max-inline-size: var(--size-measure-heading);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__title {
|
|
40
|
+
margin-block: 0;
|
|
41
|
+
text-wrap: balance;
|
|
42
|
+
font-family: var(--font-h1-family);
|
|
43
|
+
font-size: var(--font-h1-size);
|
|
44
|
+
font-weight: var(--font-h1-weight);
|
|
45
|
+
letter-spacing: var(--font-h1-letter-spacing);
|
|
46
|
+
line-height: var(--font-h1-line-height);
|
|
47
|
+
margin-block-end: var(--space-heading-title-description);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__description {
|
|
51
|
+
margin-block: 0;
|
|
52
|
+
font-family: var(--font-body-lg-family);
|
|
53
|
+
font-size: var(--font-body-lg-size);
|
|
54
|
+
font-weight: var(--font-body-lg-weight);
|
|
55
|
+
letter-spacing: var(--font-body-lg-letter-spacing);
|
|
56
|
+
line-height: var(--font-body-lg-line-height);
|
|
57
|
+
max-inline-size: var(--size-measure-description);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where([data-dds-context="marketing"]) .dds-ctabanner .dds-ctabanner__actions {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
column-gap: var(--space-actions-gap);
|
|
64
|
+
row-gap: var(--space-actions-gap);
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './CtaBanner.css';
|
|
2
|
+
import './cta-banner-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type CtaBannerProps } from './CtaBanner.types.js';
|
|
5
|
+
export type { CtaBannerProps };
|
|
6
|
+
/**
|
|
7
|
+
* A full-bleed coral band carrying one promotion and the action it asks for.
|
|
8
|
+
*
|
|
9
|
+
* The reference site's CoralBanner in its single form, named for what it is for. The ground is
|
|
10
|
+
* color.bg.brand and the ink color.fg.on-brand, both the same in light and dark, so the banner is
|
|
11
|
+
* the same coral whatever theme the reader is in. Nothing moves: two or three promotions to rotate
|
|
12
|
+
* between are CtaBannerSlider, which is this band with a slider in it — the same column, the same
|
|
13
|
+
* headline and line, so a page can carry either and read the same.
|
|
14
|
+
*
|
|
15
|
+
* The region is named by its headline, the way PageHeader's is, so a reader can jump to the band
|
|
16
|
+
* and past it. `'use client'` only for `useId`, which ties the region to its headline — the same
|
|
17
|
+
* reason PageHeader carries it.
|
|
18
|
+
*
|
|
19
|
+
* It arrives the way every block does, and the way CtaBannerSlider's slides do: block-reveal.css
|
|
20
|
+
* brings the headline, the line and the actions up a step apart once the band is in view.
|
|
21
|
+
*/
|
|
22
|
+
export declare function CtaBanner({ title, headingLevel, description, actions, }: CtaBannerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './CtaBanner.css';
|
|
5
|
+
import './cta-banner-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { ctaBannerDefaults, ctaBannerParts } from './CtaBanner.types.js';
|
|
10
|
+
/**
|
|
11
|
+
* A full-bleed coral band carrying one promotion and the action it asks for.
|
|
12
|
+
*
|
|
13
|
+
* The reference site's CoralBanner in its single form, named for what it is for. The ground is
|
|
14
|
+
* color.bg.brand and the ink color.fg.on-brand, both the same in light and dark, so the banner is
|
|
15
|
+
* the same coral whatever theme the reader is in. Nothing moves: two or three promotions to rotate
|
|
16
|
+
* between are CtaBannerSlider, which is this band with a slider in it — the same column, the same
|
|
17
|
+
* headline and line, so a page can carry either and read the same.
|
|
18
|
+
*
|
|
19
|
+
* The region is named by its headline, the way PageHeader's is, so a reader can jump to the band
|
|
20
|
+
* and past it. `'use client'` only for `useId`, which ties the region to its headline — the same
|
|
21
|
+
* reason PageHeader carries it.
|
|
22
|
+
*
|
|
23
|
+
* It arrives the way every block does, and the way CtaBannerSlider's slides do: block-reveal.css
|
|
24
|
+
* brings the headline, the line and the actions up a step apart once the band is in view.
|
|
25
|
+
*/
|
|
26
|
+
export function CtaBanner({ title, headingLevel = ctaBannerDefaults.headingLevel, description, actions, }) {
|
|
27
|
+
const titleId = useId();
|
|
28
|
+
const [band, revealed] = useReveal();
|
|
29
|
+
const Title = headingLevel === 'h3' ? 'h3' : 'h2';
|
|
30
|
+
return (_jsx("section", { className: ctaBannerParts.root, "aria-labelledby": titleId, children: _jsx("div", { className: ctaBannerParts.inner, ref: band, "data-revealed": revealed, children: _jsxs("div", { className: ctaBannerParts.content, children: [_jsxs("div", { className: ctaBannerParts.text, children: [_jsx(Title, { className: ctaBannerParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: ctaBannerParts.description, ...arriving(1), children: description })) : null] }), actions ? (_jsx("div", { className: ctaBannerParts.actions, ...arriving(2), children: actions })) : null] }) }) }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface CtaBannerOwnProps {
|
|
3
|
+
/** Always — the message, in a few words. Short enough to take in at a glance; a line break goes where the words pause, not where the box runs out. */
|
|
4
|
+
title: string;
|
|
5
|
+
/**
|
|
6
|
+
* `h2` — The default: a banner is a section of the page, under the page's own h1
|
|
7
|
+
* `h3` — A banner nested inside a section that already carries the h2 it belongs to
|
|
8
|
+
*/
|
|
9
|
+
headingLevel?: 'h2' | 'h3';
|
|
10
|
+
/** A line saying why the action is worth taking — what the reader gets, or how little it costs them. */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** The one action the message asks for, or two at most. The coral is the banner's ground, so the primary is Button variant="inverse" tone="brand" — a primary Button is coral on coral, and the tone keeps it near-black in both themes — and a second is Button variant="secondary" tone="brand" — a white tint with a white label, fixed in both themes like the band. */
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export type CtaBannerProps = CtaBannerOwnProps;
|
|
16
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
17
|
+
export declare const ctaBannerParts: {
|
|
18
|
+
readonly root: "dds-ctabanner";
|
|
19
|
+
readonly inner: "dds-ctabanner__inner";
|
|
20
|
+
readonly content: "dds-ctabanner__content";
|
|
21
|
+
readonly text: "dds-ctabanner__text";
|
|
22
|
+
readonly title: "dds-ctabanner__title";
|
|
23
|
+
readonly description: "dds-ctabanner__description";
|
|
24
|
+
readonly actions: "dds-ctabanner__actions";
|
|
25
|
+
};
|
|
26
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
27
|
+
export declare const ctaBannerDefaults: {
|
|
28
|
+
readonly headingLevel: "h2";
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// GENERATED from cta-banner.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const ctaBannerParts = {
|
|
4
|
+
root: 'dds-ctabanner',
|
|
5
|
+
inner: 'dds-ctabanner__inner',
|
|
6
|
+
content: 'dds-ctabanner__content',
|
|
7
|
+
text: 'dds-ctabanner__text',
|
|
8
|
+
title: 'dds-ctabanner__title',
|
|
9
|
+
description: 'dds-ctabanner__description',
|
|
10
|
+
actions: 'dds-ctabanner__actions',
|
|
11
|
+
};
|
|
12
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
13
|
+
export const ctaBannerDefaults = { headingLevel: 'h2' };
|