@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- GENERATED from navbarmenu.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarMenu
|
|
4
|
+
|
|
5
|
+
A destination in the bar that opens rather than goes: a named trigger, and a wide panel beneath it holding the section's own destinations in columns, usually with something promotional beside them. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarMenu } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A section of the site has enough inside it that naming the section is not enough — Trading holding markets, platforms and tools, rather than one page called Trading …
|
|
12
|
+
- The destinations under a section are worth grouping, and the groups are worth heading
|
|
13
|
+
- The section has something the site wants shown alongside its links: a promotion, a feature, a piece of art
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The destination is a single place → **NavbarItem**
|
|
18
|
+
- What opens is a single column of choices rather than a section of the site → **DropdownMenu**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- A control. Nothing here submits, filters or changes what the page is showing other than by revealing its own panel
|
|
23
|
+
- A destination of its own. The trigger is a button and goes nowhere — a section that is also a page needs its own NavbarItem inside the panel, where a reader can actually reach it
|
|
24
|
+
- The narrow width. There is no room for columns on a phone, and the bar collapses into NavbarPanel rather than opening this
|
|
25
|
+
- Content a reader has to work through. A panel is scanned in a moment with a pointer hovering over it; a paragraph in one is a paragraph nobody finishes
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **presentation** `enum` · default "floating"
|
|
30
|
+
- `floating` — The menu is in the bar, which is everywhere a page puts one. The panel hangs from the trigger and floats over what is beneath it
|
|
31
|
+
- `inline` — NavbarPanel is rendering the menu, and it sets this itself — a page should not. …
|
|
32
|
+
- **tone** `enum` · default "default"
|
|
33
|
+
- `default` — The bar has a light ground under it, which is every bar on a marketing page today. The trigger's tints are ink-based and read against paper
|
|
34
|
+
- `inverse` — The bar sits on a dark ground and the ink runs light. Only the trigger mirrors — the panel is its own surface with its own ground, and is the same either way
|
|
35
|
+
- **label** `string` · required — Always — it is the name of the section, the words on the trigger, and the accessible name of the control. Name the section rather than the act: 'Trading', not 'Open trading menu'
|
|
36
|
+
- never: A description of what is inside. The panel says that by holding it, and a trigger long enough to explain itself is a trigger that breaks the row it sits in
|
|
37
|
+
- **open** `boolean` · optional — The bar is holding which section is open, because only one should be at a time. Passing it makes the menu controlled: it shows what it is told and reports presses through onOpenChange. …
|
|
38
|
+
- never: Half of a controlled menu. An open passed without an onOpenChange to move it is a panel that cannot be closed by pressing the trigger that opened it
|
|
39
|
+
- **onOpenChange** `callback` · optional — Whenever open is — together they are how a bar holds which section is showing. It is called with the state being moved to, by the trigger and by Escape
|
|
40
|
+
- never: Navigation. This says whether the panel is showing; a reader pressing a destination inside it is leaving by a different door
|
|
41
|
+
- **replacing** `boolean` · default false — Another section's panel was already on screen when this one opened. A container that holds one section open at a time knows this and a menu cannot, so the container sets it — Navbar does, and a page should not
|
|
42
|
+
- never: Turning the entrance off generally. A panel that arrives over a page with nothing else open has something to say about where it came from, and saying it is the difference between a panel appearing and a panel being noticed
|
|
43
|
+
- **feature** `node` · optional — The section has something the site wants shown alongside its destinations — a promotion, a platform, a piece of art. A Card, which already knows how to hold a picture with words over it. …
|
|
44
|
+
- never: More destinations. Anything that goes to a section of the site belongs in a group, where the reader is looking for it
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- Takes only NavbarMenuGroup, NavbarItem.
|
|
49
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
50
|
+
- Renders 6 parts: root, trigger, chevron, surface, groups, feature.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarmenu.md`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- GENERATED from navbarmenugroup.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarMenuGroup
|
|
4
|
+
|
|
5
|
+
A named handful of destinations inside a section's panel: a word over a short list, so a reader scanning a panel of twenty links is reading four sets of five rather than twenty of anything. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarMenuGroup } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A section's panel holds more destinations than a reader takes in at once, and they fall into sets — markets, tools, payments
|
|
12
|
+
- Two lists in a panel would be told apart by nothing if the words above them were taken away
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The panel holds few enough destinations that naming sets would be naming one thing each → **NavbarItem**
|
|
17
|
+
- The set is a section of the site rather than a set within one → **NavbarMenu**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- A single destination dressed as a set. The label would be doing the item's job and the item would be saying nothing the label had not
|
|
22
|
+
- Controls. Everything in a group goes somewhere — a switch or a button among a column of links is an action a reader scanning for a place will not expect to find
|
|
23
|
+
- A heading in the page's outline. Nothing here is an h-element: the panel is navigation furniture, and a level inserted for it would be a step in the document's structure that the document never shows
|
|
24
|
+
- Anywhere outside a menu's panel. There is no bar arrangement this fits — the row holds names, and a name with a list under it is what the panel is for
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **label** `string` · required — Always — it is the word over the list and the group's accessible name. Name what the set is rather than what to do with it: 'Markets', not 'Browse markets'
|
|
29
|
+
- never: A sentence. This is a signpost over five links, and a label that needs a verb is a label describing something that should have been a destination of its own
|
|
30
|
+
|
|
31
|
+
## Inside it
|
|
32
|
+
|
|
33
|
+
- Takes only Link.
|
|
34
|
+
- At least 2, no ceiling — fewer is not this component and more is a different one.
|
|
35
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
36
|
+
- Renders 3 parts: root, label, list.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarmenugroup.md`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- GENERATED from navbarpanel.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarPanel
|
|
4
|
+
|
|
5
|
+
The whole of a site's navigation at a width the bar cannot hold it: the mark and a way out across the top, the destinations down the middle, whatever the site wants across the foot. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarPanel } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Navbar is collapsing and its destinations have to go somewhere. This is where, and the bar puts them here without being asked
|
|
12
|
+
- The same navigation has to be read down a phone rather than across a page
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The surface is a sheet rising from the foot of the page rather than the site's navigation → **BottomSheet**
|
|
17
|
+
- What is wanted is a list that opens beside the control that opened it → **DropdownMenu**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- A dialog. This is navigation drawn differently, not a question the reader has to answer — it takes no decision, returns no value, and closing it cancels nothing
|
|
22
|
+
- A page of its own. The destinations here go somewhere; a surface a reader stays on and reads is a page, and this one is covering it
|
|
23
|
+
- A wide screen. Everything in it is already drawn across the bar at that width, and a reader who opens it there is being shown the navigation twice
|
|
24
|
+
- Anything a page opens itself. Navbar renders this, holds whether it is open, and is the thing that knows when the bar stopped fitting
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **label** `string` · required — Always — it names the navigation landmark inside the panel, and this is the only one on the page while the panel is open. Name the set rather than the act: 'Main', not 'Main navigation', because the role already supplies the word
|
|
29
|
+
- never: A heading for the panel. Nothing draws this. The mark at the top says whose site it is and the destinations say what it holds
|
|
30
|
+
- **closeLabel** `string` · required — Always — it names the close button, which draws a glyph and no text and is the only visible way out of a surface covering the whole page. 'Close' is enough; what it closes is the only thing open
|
|
31
|
+
- never: The bar's trigger name. They are two controls in two places, and a reader cannot reach the trigger while this is covering it
|
|
32
|
+
- **onClose** `callback` · required — Always. It is called by the close button and by Escape, so whatever holds the panel open hears both ways it can be dismissed
|
|
33
|
+
- never: Navigation. A reader pressing a destination inside the panel is leaving by a different door, and a handler that also routed would fire twice for one press
|
|
34
|
+
- **brand** `node` · optional — Whatever the bar carries as its mark, passed straight through. Absent only where the bar has none either
|
|
35
|
+
- never: A different mark from the bar's. The panel opened out of the bar and covers it; two marks is two sites
|
|
36
|
+
- **preferences** `node` · optional — The bar has switchers, which it hands over when it collapses. They are drawn under the destinations and above the foot
|
|
37
|
+
- never: The action the site wants pressed. That is the foot's, and a preference drawn beside it would compete with the last thing the panel says
|
|
38
|
+
- **footer** `node` · optional — The bar's utility end has something worth keeping at this width — the conversion, and the language or theme controls. They are drawn across the foot here rather than in a row, because there is width for one control and no room for three
|
|
39
|
+
- never: Destinations. Anything that goes to a section of the site belongs in the children, inside the landmark that announces it as one
|
|
40
|
+
|
|
41
|
+
## Inside it
|
|
42
|
+
|
|
43
|
+
- Takes only NavbarItem, NavbarMenu.
|
|
44
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
45
|
+
- Renders 8 parts: root, header, mark, close, body, destinations, preferences, footer.
|
|
46
|
+
|
|
47
|
+
## Needs mounting
|
|
48
|
+
|
|
49
|
+
Does not work from the import alone: useNavbarPanel. See `.llm/components/navbarpanel.md` for what to mount and where.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarpanel.md`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- GENERATED from navbarswitcher.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarSwitcher
|
|
4
|
+
|
|
5
|
+
Something a reader sets rather than somewhere they go: the language the page is read in, the region its prices are in, the theme it is drawn in. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarSwitcher } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A bar needs a language or region switcher, which is the case this was drawn for
|
|
12
|
+
- A set of choices changes how the page is drawn or worded rather than taking a reader anywhere
|
|
13
|
+
- The set is long enough that a phone should give it the whole panel rather than a dropdown inside one
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The control opens a set of commands rather than a set of choices → **DropdownMenu**
|
|
18
|
+
- The control flips between two states → **ButtonIcon**
|
|
19
|
+
- The items are places the site has → **NavbarMenu**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Navigation. Nothing in here has an href, and a reader who was taken somewhere by a switcher has been told the set was one thing and given another
|
|
24
|
+
- A form field. A select inside a form is a Select: it has a name, it posts a value, and it is read as part of the form rather than as part of the chrome
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **presentation** `enum` · default "floating"
|
|
29
|
+
- `floating` — The switcher is in the bar, which is everywhere a page puts one. The choices hang off the trigger and float over what is beneath
|
|
30
|
+
- `panel` — NavbarPanel is rendering it, and it sets this itself — a page should not. …
|
|
31
|
+
- **tone** `enum` · default "default"
|
|
32
|
+
- `default` — The bar has a light ground under it
|
|
33
|
+
- `inverse` — The bar sits on a dark ground and the ink runs light. Only the tints move — the words take the ink around them either way
|
|
34
|
+
- **label** `string` · required — Always — the choice in force, short enough for a bar. "EN", not "English": a bar is read at a glance and a switcher showing the longest name in the set is a switcher that changes width when somebody picks one
|
|
35
|
+
- **menuLabel** `string` · required — Always — what the set is, for a reader who meets the trigger without seeing the mark beside it. "Language", "Region". The trigger shows the answer; this says what the question was
|
|
36
|
+
- **backLabel** `string` · required — Always. It names the way out of the page the panel form opens, and a glyph pointing left is not a name. Unused in the floating form, which has no page to leave
|
|
37
|
+
- **icon** `node` · optional — A mark saying which question this answers. Nearly always on a bar, where the label is two letters and the glyph is what makes them mean a language
|
|
38
|
+
- **chevron** `boolean` · default false — The floating trigger should say it opens. Off by default because a switcher usually sits among destinations that each carry one. The panel form draws one whatever this says — a row in a list has nothing else to go on
|
|
39
|
+
- never: The panel form, which is not asking
|
|
40
|
+
- **open** `boolean` · optional — A container holds which of several things is open. Standing alone the switcher holds its own
|
|
41
|
+
- **onOpenChange** `callback` · optional — Whenever open is — together they are how a container holds it
|
|
42
|
+
|
|
43
|
+
## Inside it
|
|
44
|
+
|
|
45
|
+
- Takes only NavbarSwitcherOption.
|
|
46
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
47
|
+
- Renders 7 parts: root, trigger, icon, chevron, surface, back, list.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarswitcher.md`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- GENERATED from navbarswitcheroption.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarSwitcherOption
|
|
4
|
+
|
|
5
|
+
One choice inside a NavbarSwitcher: a language, a region, a theme. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarSwitcherOption } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A NavbarSwitcher needs its choices
|
|
12
|
+
- One of a set of options is in force and a reader should be able to see which
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The row goes somewhere → **NavbarItem**
|
|
17
|
+
- The row is a command in a dropdown → **MenuItem**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- Navigation of any kind
|
|
22
|
+
- A destructive action. A set a reader scans and picks from is the wrong place for anything that cannot be undone by picking again
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- **current** `boolean` · default false — This is the choice in force — the language the page is being read in. Exactly one of a set carries it
|
|
27
|
+
- never: Marking a recommended or default option. It says what is true now, not what a reader should pick
|
|
28
|
+
- **onSelect** `callback` · required — Always. Choosing is the whole of what this does, and a row that reported nothing would be a row that did nothing
|
|
29
|
+
|
|
30
|
+
## Inside it
|
|
31
|
+
|
|
32
|
+
- Takes only text.
|
|
33
|
+
- 6 components are refused inside it; the list and the reasons are in the long document.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarswitcheroption.md`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- GENERATED from option.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Option
|
|
4
|
+
|
|
5
|
+
One answer on offer inside a control that opens a list. …
|
|
6
|
+
|
|
7
|
+
`import { Option } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An answer inside a control that opens a list — a SelectChip today. One of these per option in the set
|
|
12
|
+
|
|
13
|
+
## Something else, when
|
|
14
|
+
|
|
15
|
+
- Pressing it should do something rather than record an answer → **MenuItem**
|
|
16
|
+
- The row is one of a few and all of them fit on the page → **FilterChip**
|
|
17
|
+
|
|
18
|
+
## Never
|
|
19
|
+
|
|
20
|
+
- Anything outside a list that a control owns. It is an <li> announced as an option, which means nothing without that list — a screen reader meeting one loose reports a bare list item
|
|
21
|
+
- A heading over a group of answers, or a line between two groups. A row announced as an option that cannot be taken is a dead end the reader has to arrow past, and they will try it first
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
- **size** `enum` · default "sm" — Set by the control so the list matches the chip it hangs from. A row is as tall as the control it opened from, which is what makes the list read as the chip opened rather than as a separate thing beneath it
|
|
26
|
+
- `sm` — The default, and the step a SelectChip at its own default opens
|
|
27
|
+
- `md` — Touch-first, where the row is also the target and a finger has to land inside it
|
|
28
|
+
- never: Varying within one list. Rows of two heights in one set read as two lists that happen to touch
|
|
29
|
+
- **selected** `boolean` · default false — Set by the control that owns the list, not by a page. …
|
|
30
|
+
- never: Marking a recommended answer. Chosen means the reader chose it, and a row that arrives already marked implies an act nobody took
|
|
31
|
+
- **active** `boolean` · default false — Whether the arrow keys are resting here. The control's to set: only the control knows where the keys are, and only one row can be right at a time. …
|
|
32
|
+
- never: Marking the answer. That is selected, and a ground saying both would have to rank one against the other
|
|
33
|
+
- **disabled** `boolean` · default false — This one answer cannot be taken. The row stays in the list and stays readable, because a set that hides what it will not accept leaves the reader hunting for something that was there last week
|
|
34
|
+
- never: Most of the set. A list where nearly nothing can be taken is the wrong list, and a row that simply refuses does not say why
|
|
35
|
+
- **value** `string` · required — What the control reports when this row is taken. A stable code rather than the words, so the words can be reworded or translated without changing what anything submits
|
|
36
|
+
- never: The words themselves, where they happen to look like a code. "EN" reads as both and is one of them — a value that doubles as a label is a value nobody can change later
|
|
37
|
+
- **leadingIcon** `node` · optional — A mark the reader knows the answer by — a flag on a language, a glyph on a market. For a set met before, where recognising is faster than reading. …
|
|
38
|
+
- never: Decoration, or a set where the names are the only thing telling the answers apart — a column of marks that all mean "an option" costs an indent down the whole list and buys nothing. And never for anything pressable: a control inside a row is a tab stop the pattern has no room for
|
|
39
|
+
- **description** `string` · optional — What the name does not say on its own — a code beside a market, where an answer applies. Give it where two answers are hard to tell apart by name, and leave it out where the name is the whole of the answer
|
|
40
|
+
- never: Guidance about the control, which belongs beside it: written here it is read once per answer instead of once. Nor a sentence — this is one line and cut at its end, so anything long arrives truncated and says less than nothing
|
|
41
|
+
|
|
42
|
+
## The type refuses
|
|
43
|
+
|
|
44
|
+
- disabled=true with state="hover" — A row that cannot be taken does not answer the pointer, so there is no ground for it to take. …
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- Takes only text.
|
|
49
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
50
|
+
- Renders 6 parts: root, leading-icon, text, label, description, tick.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/option.md`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!-- GENERATED from pageheader.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# PageHeader
|
|
4
|
+
|
|
5
|
+
The band that opens a company or a legal page: the page's name, a line saying what it is, and nothing else. The third of three opening bands and the only one that is not a hero. …
|
|
6
|
+
|
|
7
|
+
`import { PageHeader } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A company, legal or support page needs its opening band — contact, about, terms, a regulatory notice
|
|
12
|
+
- The page is read rather than acted on, so its opening should name it and then get out of the way
|
|
13
|
+
- The steps between an eyebrow, a title and a description have to be the same on every such page
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The page is the front page, or a campaign page under it → **LandingHero**
|
|
18
|
+
- The page is a product or a market page → **ProductHero**
|
|
19
|
+
- The band closes the page rather than opening it → **Footer**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- A landing or product page. Each tier has its own band, and the reason they are separate components is so that this cannot be overridden
|
|
24
|
+
- Carrying a photograph or a product shot. This tier has no visual slot, which is a decision rather than an omission — a page of terms has nothing to show
|
|
25
|
+
- The navigation above it or the trail beneath that. Both are the page's and neither is the band's
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **eyebrow** `string` · optional — A word or two placing the page before its title names it — a product family, a market, a campaign
|
|
30
|
+
- never: A second sentence. This is the line a reader takes in without reading; at the length of a clause it is a description in the wrong place and at the wrong weight
|
|
31
|
+
- **title** `string` · required — Always. The one thing the page is about, in the fewest words that still say it. It is the page's leading heading and the band's accessible name
|
|
32
|
+
- never: A sentence with a full stop. A title that reads as prose is a description that has been set at eighty pixels
|
|
33
|
+
- **headingLevel** `enum` · default "h1" — Which heading element the title renders as. The default is right for the band a page opens with, which is the only place this belongs. …
|
|
34
|
+
- `h1` — The default, and correct whenever the hero opens the page — which is what a hero is for
|
|
35
|
+
- `h2` — The rare page that already carries its `h1` elsewhere, and would otherwise have two
|
|
36
|
+
- never: Making the title look smaller. The level is what a screen reader builds its outline from, and nothing about it reaches the type
|
|
37
|
+
- **description** `string` · optional — The sentence under the title that says what the claim above it means, for the reader who is not yet convinced by the claim alone
|
|
38
|
+
- never: A paragraph. It is held to a readable measure and set at body size; past a couple of sentences a reader scrolls rather than reads, and the actions go under the fold
|
|
39
|
+
- **actions** `node` · optional — The one or two things the page wants a reader to do. Composed by the page rather than described to this component, so a call to action is the same Button here as anywhere else on the site
|
|
40
|
+
- never: A row of destinations. Three or more controls under a title is a menu, and a reader who has to choose between five things chooses none
|
|
41
|
+
|
|
42
|
+
## Inside it
|
|
43
|
+
|
|
44
|
+
- 9 components are refused inside it; the list and the reasons are in the long document.
|
|
45
|
+
- Renders 8 parts: root, inner, content, text, eyebrow, title, description, actions.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/pageheader.md`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- GENERATED from pagination.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Pagination
|
|
4
|
+
|
|
5
|
+
The control that moves a reader through a set too large to show at once. …
|
|
6
|
+
|
|
7
|
+
`import { Pagination } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An index or archive has been split across pages and the reader needs to move through it — a blog listing, a news archive, a resource library. …
|
|
12
|
+
- The reader needs to reach a particular page rather than step towards it — page fourteen of forty, in one press. …
|
|
13
|
+
- The pages have addresses a search engine should follow. …
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- A short sequence the reader moves through — a slider's slides, a carousel of cards, a walkthrough → **PaginationDots**
|
|
18
|
+
- The reader is moving between views of one page rather than through one long set → **TabList**
|
|
19
|
+
- More results are appended to the view as the reader reaches the end, rather than one page replacing another → **Button**
|
|
20
|
+
- The reader is hunting for one row among thousands rather than walking the set → **SearchInput**
|
|
21
|
+
|
|
22
|
+
## Never
|
|
23
|
+
|
|
24
|
+
- A set that fits on one page. There is nothing to move between, and a control offering to move is read as a promise that there is more — so the reader presses it, nothing happens, and they are left unsure whether the control or the results are at fault
|
|
25
|
+
- Placing above the content it governs. The reader decides whether to move on only after seeing what is here, so a control above the results asks the question before they hold the answer — and on a long page it puts the control off screen at exactly the moment they want it
|
|
26
|
+
- Standing in for a filter. Handing a reader four hundred pages is not giving them access to the set, it is giving them the shape of it — the answer is a narrower query, and pagination is what works once the set is small enough to walk
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
- **variant** `enum` · default "pages"
|
|
31
|
+
- `pages` — An index or archive whose pages have addresses of their own — a blog listing, a news archive, a resource library. …
|
|
32
|
+
- `compact` — A place with no room for a row of numbers — a card footer, a sidebar, a column at a phone's width. Position and the two steps, and nothing else. …
|
|
33
|
+
- never: Choosing by the width available rather than by the reader's question. The two answer different questions, and which one is being asked comes from the content above the control, not the room beneath it. …
|
|
34
|
+
- **page** `number` · default 1 — Always — it is which page is on screen, counting from one, and the component renders around it rather than holding it. …
|
|
35
|
+
- never: Half a controlled component. Passing this without updating it when onPageChange fires gives a row that cannot move — the reader presses, the number stays, and the control reads as broken. …
|
|
36
|
+
- **totalPages** `number` · default 1 — How many pages the set has been divided into. It decides where the row ends, when the ellipsis appears, and when next goes disabled. …
|
|
37
|
+
- never: A count of items. Pages, not results: passing the number of results gives a reader four hundred page numbers for forty pages of them. Nor for an unknown total: a number invented so the component would render is a promise about how much is left, and the reader has no way to tell it from a real one
|
|
38
|
+
- **onPageChange** `callback` · optional — What the page does when the reader asks for another one, counting from one. Required wherever the route to a page is a press rather than a destination: the numbered targets and the steps under any variant given no pageHref. …
|
|
39
|
+
- never: Navigating by hand when pageHref would do it. A press handler that sets window.location is an anchor with its advantages removed — no cmd-click, no destination in the status bar, nothing for a crawler to follow
|
|
40
|
+
- **pageHref** `callback` · optional — The address of a page, given the page number. Passing it makes every route to a page an anchor: the numbered targets, and both steps. …
|
|
41
|
+
- never: A carousel or any sequence whose positions have no address. Nor for smuggling state into a query string the page does not actually route on — a URL that renders the same page whatever it says is worse than a button, which at least does not promise otherwise
|
|
42
|
+
- **siblingCount** `number` · default 1 — How many numbered pages sit around the current one before the row breaks, under the pages variant. …
|
|
43
|
+
- never: Widening the row until nothing is hidden. Past a few siblings the row is longer than the eye scans, and a reader who needs page 200 of 400 is not served by seeing 199 either. What widening removes is also a control now rather than a mark: the break it takes away was the menu that reached those pages in one press
|
|
44
|
+
- **label** `string` · default "Pagination" — Always, and the default is almost always right. It names the landmark rather than the content — a screen reader user listing what is on a page hears this, and a nav with no name is one they cannot tell from the page's other navigation. …
|
|
45
|
+
- never: Describing where the reader is. That is the summary's job and aria-current's, both of which change as the reader moves, while this does not — a landmark renamed on every press is one that cannot be navigated to
|
|
46
|
+
- **previousLabel** `string` · default "Previous page" — The accessible name for the step-back control, which is a glyph and therefore announces nothing on its own. Override it to translate it, or where "page" is the wrong noun for what is being stepped through
|
|
47
|
+
- never: Visible text. Nothing here renders it — it is the button's name, not its content, and a row that showed the words would be a different control at a different width
|
|
48
|
+
- **nextLabel** `string` · default "Next page" — The accessible name for the step-forward control, for the reason previousLabel exists. Keep the two parallel: a pair reading "Next page" and "Go back" is two people's wording in one control
|
|
49
|
+
- never: Visible text, for the reason previousLabel is not
|
|
50
|
+
- **morePagesLabel** `string` · default "More pages" — The accessible name for the break between two runs of numbered pages — the control that opens a menu of the pages that break stands for. …
|
|
51
|
+
- never: Visible text, for the reason previousLabel is not. Nor for naming the range it covers: which pages a break stands for changes with every step the reader takes, and a name that went stale would be read out long after it stopped being true
|
|
52
|
+
|
|
53
|
+
## Inside it
|
|
54
|
+
|
|
55
|
+
- 4 components are refused inside it; the list and the reasons are in the long document.
|
|
56
|
+
- Renders 6 parts: root, list, summary, step, page, break.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/pagination.md`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!-- GENERATED from paginationdots.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# PaginationDots
|
|
4
|
+
|
|
5
|
+
A row of marks, one per position in a short sequence — the slides of a slider, the steps of a walkthrough — with the one the reader is on drawn as a longer, solid pill and the rest as small translucent dots. …
|
|
6
|
+
|
|
7
|
+
`import { PaginationDots } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Showing where the reader is in a short sequence they move through — a slider's slides, a carousel of cards, the steps of a walkthrough — and letting them jump to any of it …
|
|
12
|
+
|
|
13
|
+
## Something else, when
|
|
14
|
+
|
|
15
|
+
- A set divided into pages of results → **Pagination**
|
|
16
|
+
|
|
17
|
+
## Never
|
|
18
|
+
|
|
19
|
+
- More than about ten positions — a dot carries no number, so past a handful the reader is counting marks too small and too many to count
|
|
20
|
+
- The only way through a sequence without thinking about it: the marks are 8px-wide targets, so a row that stands alone — as CtaBannerSlider's does, beside a swipe — is the hardest control a pointer has to hit on the page. Give the holder previous and next steps where the sequence is one a reader works through
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
- **variant** `enum` · default "default" — Whether the marks belong to their ground or to the brand
|
|
25
|
+
- `default` — The marks take the ink of whatever the row stands on — white on a coral or dark band, near-black on the page — so the row belongs to its ground. The usual choice, and the only one on a band
|
|
26
|
+
- `accent` — On the bare page, where the row should carry the brand: the marks are color.fg.brand-accent, the current pill solid coral and the rest the same coral held back. …
|
|
27
|
+
- never: accent on a coral or brand band, where coral marks on the coral ground disappear, or on a tinted surface, which takes the coral below the 3:1 a mark is owed
|
|
28
|
+
- **page** `number` · default 1 — Which position the reader is on, counted from 1. The consumer holds it, because the slide or step in view is theirs too and the two are one fact
|
|
29
|
+
- **totalPages** `number` · default 1 — How many positions there are, which is how many marks the row draws
|
|
30
|
+
- **onPageChange** `callback` · optional — Whenever the marks should move anything — called with the position pressed. The row does not move itself; the consumer sets page from it
|
|
31
|
+
- **autoplay** `boolean` · default false — The sequence should move on its own — a slider of promotions, a hero that rotates. The row advances page through onPageChange every motion.duration.dwell, wrapping from the last position to the first. …
|
|
32
|
+
- never: A sequence the reader has to work through — a walkthrough, a form in steps. Moving it for them takes away the one thing they came to control
|
|
33
|
+
- **paused** `boolean` · default false — Whatever holds the row wants the rotation held for now — while the pointer is over the slide or focus is inside it, so a reader is never moved on mid-sentence. It lets go when this goes false
|
|
34
|
+
- **label** `string` · default "Slides" — The name the row is announced by, as a group. Name what the positions are: 'Slides', 'Steps'. Translate it with the page
|
|
35
|
+
- **itemLabel** `string` · default "Slide" — The word each mark is named by, before its number — 'Slide 2'. Translate it with the page; a language that puts the number first is the reason a sentence template would be better, and the reason this is not yet one
|
|
36
|
+
|
|
37
|
+
## Inside it
|
|
38
|
+
|
|
39
|
+
- Renders 3 parts: root, dot, mark.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/paginationdots.md`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- GENERATED from producthero.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# ProductHero
|
|
4
|
+
|
|
5
|
+
The band that opens a product or a market page: the one thing the page is about, centred, over a ground dark enough that nothing above it competes. The second of three opening bands. …
|
|
6
|
+
|
|
7
|
+
`import { ProductHero } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A product or a market page needs its opening band — a platform, an instrument, an asset class
|
|
12
|
+
- The thing the page is about is worth showing whole, under the claim rather than beside it
|
|
13
|
+
- The steps between an eyebrow, a title, a description and the actions under them have to be the same on every product page
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The page is the front page, or a campaign page under it → **LandingHero**
|
|
18
|
+
- The page is a company or a legal one — contact, about, terms → **PageHeader**
|
|
19
|
+
- The band closes the page rather than opening it → **Footer**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- A landing, company or legal page. Each tier has its own band, and the reason they are separate components is so that this cannot be overridden
|
|
24
|
+
- A second band further down the page. This is the page's opening and its `h1`
|
|
25
|
+
- The navigation above it or the trail beneath that. Both are the page's and neither is the band's
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **eyebrow** `string` · optional — A word or two placing the page before its title names it — a product family, a market, a campaign
|
|
30
|
+
- never: A second sentence. This is the line a reader takes in without reading; at the length of a clause it is a description in the wrong place and at the wrong weight
|
|
31
|
+
- **title** `string` · required — Always. The one thing the page is about, in the fewest words that still say it. It is the page's leading heading and the band's accessible name
|
|
32
|
+
- never: A sentence with a full stop. A title that reads as prose is a description that has been set at eighty pixels
|
|
33
|
+
- **headingLevel** `enum` · default "h1" — Which heading element the title renders as. The default is right for the band a page opens with, which is the only place this belongs. …
|
|
34
|
+
- `h1` — The default, and correct whenever the hero opens the page — which is what a hero is for
|
|
35
|
+
- `h2` — The rare page that already carries its `h1` elsewhere, and would otherwise have two
|
|
36
|
+
- never: Making the title look smaller. The level is what a screen reader builds its outline from, and nothing about it reaches the type
|
|
37
|
+
- **description** `string` · optional — The sentence under the title that says what the claim above it means, for the reader who is not yet convinced by the claim alone
|
|
38
|
+
- never: A paragraph. It is held to a readable measure and set at body size; past a couple of sentences a reader scrolls rather than reads, and the actions go under the fold
|
|
39
|
+
- **actions** `node` · optional — The one or two things the page wants a reader to do. Composed by the page rather than described to this component, so a call to action is the same Button here as anywhere else on the site
|
|
40
|
+
- never: A row of destinations. Three or more controls under a title is a menu, and a reader who has to choose between five things chooses none
|
|
41
|
+
- **media** `node` · optional — The product itself, under the claim and the actions — in the column, capped to the measure, and whole
|
|
42
|
+
- never: The background. A photograph filling the band is `backgroundImage`; this sits in front of it, in the column, and is never cropped
|
|
43
|
+
- **backgroundImage** `string` · optional — A photograph filling the whole band. It is shown as it is — nothing is painted over it, so choose one already dark enough that the title reads on it
|
|
44
|
+
- never: A flat colour, or a bright photograph. The band already paints its ground, and nothing here darkens an image on the page's behalf — a pale one leaves the claim unreadable
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- 8 components are refused inside it; the list and the reasons are in the long document.
|
|
49
|
+
- Renders 9 parts: root, inner, content, text, eyebrow, title, description, actions, media.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/producthero.md`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- GENERATED from removablechip.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# RemovableChip
|
|
4
|
+
|
|
5
|
+
A token standing for one thing that is already in play — a topic the reader has filtered by, a tag on an article, a market they have picked out — which they can take back out. …
|
|
6
|
+
|
|
7
|
+
`import { RemovableChip } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An index shows the narrowings currently applied above its results, and each has to come off on its own without clearing the rest
|
|
12
|
+
- The reader has assembled something across a page — markets on a comparison, topics on a subscription form — and needs to see and unpick what is in it
|
|
13
|
+
- What was chosen is worth showing as a token rather than as a sentence, because the reader will act on individual pieces of it
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The token is turned on and off rather than added and taken away → **FilterChip**
|
|
18
|
+
- The thing named cannot be taken away and is there to be read — a category on a card, a status on a plan → **Badge**
|
|
19
|
+
- The token is really a link to the thing it names → **Link**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Something the reader cannot get back. The cross is a small target beside the words and it is pressed by accident, so what a chip removes should be recoverable from whatever added it
|
|
24
|
+
- An action other than removal. There is one control here and its meaning is fixed; a cross that archived or edited would be the same glyph meaning something else
|
|
25
|
+
- A sentence. Chips are read as a set at a glance, and one carrying a phrase makes the row unreadable and pushes the rest out of view
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **disabled** `boolean` · default false — The token cannot be removed just now — something else is in progress, or the narrowing is the last one and the index will not show nothing. It dims and takes the cross out of the tab order
|
|
30
|
+
- never: The reader could act on it if they knew what to change. This says the act is closed and nothing about why, so a reason belongs in the prose around the set
|
|
31
|
+
- **size** `enum` · default "sm" — How dense the row is, matched to whatever it sits beside. It takes the same control ramp a FilterChip does, so the two never sit at different heights in one row
|
|
32
|
+
- `sm` — The default, and the same measure a FilterChip takes at its own default, so a row holding both sits level
|
|
33
|
+
- `md` — A touch-first layout, level with a FilterChip at its largest. The cross gains room around it rather than growing: it is already at the smallest a target may be
|
|
34
|
+
- never: Marking one token in a set as more important. They are a set of equals and a row of mismatched heights reads as a mistake before it reads as emphasis
|
|
35
|
+
- **label** `string` · required — Always, and required on that account — it names the thing the token stands for. Short enough to read at a glance in a row of them
|
|
36
|
+
- never: Describing what the cross does. That is removeLabel, which a screen reader reads and nobody sees
|
|
37
|
+
- **leadingIcon** `node` · optional — A glyph makes the kind of thing recognisable before the words are read. It sits before the name and never replaces it. …
|
|
38
|
+
- never: Decoration. A row where every token carries the same mark reads more slowly than the names alone would
|
|
39
|
+
- **onRemove** `callback` · required — Always, and required on that account: removal is the whole of what this component does, and a cross reporting to nobody is the clearest promise a chip can break — the reader presses it more than once before deciding the page is at fault
|
|
40
|
+
- never: Clearing the value while leaving the token. Removing a chip removes the thing; a cross that empties something and leaves its token behind tells the reader it is still there
|
|
41
|
+
- **removeLabel** `string` · default "Remove" — The accessible name of the cross, which announces nothing on its own. Override it to name what is going: a row of buttons all saying Remove leaves a reader who cannot see the tokens unable to tell which one they are about to lose
|
|
42
|
+
- never: Visible text. Nothing here renders it — the cross is the whole of what is drawn
|
|
43
|
+
|
|
44
|
+
## Inside it
|
|
45
|
+
|
|
46
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
47
|
+
- Renders 5 parts: root, icon, label, remove, remove-icon.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/removablechip.md`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- GENERATED from row.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Row
|
|
4
|
+
|
|
5
|
+
A line, and one measure between the things on it. It draws nothing — no ground, no edge, no padding — and owns one decision: how far apart the things beside one another sit. …
|
|
6
|
+
|
|
7
|
+
`import { Row } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Two or more things are read across rather than down, and the space between them is the same all the way along — a glyph and its label, a title and the action beside it, a set of controls …
|
|
12
|
+
- The spacing is a fact about the group rather than about any member of it. …
|
|
13
|
+
- The items are of different heights and something has to decide how they meet — centred on the line, level at the top, or sitting on one another's baseline. …
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The things are read one above the next → **Stack**
|
|
18
|
+
- The things must line up down the page as well as across it → **Grid**
|
|
19
|
+
- The set is longer than the line and has to stay on one line → **Scroller**
|
|
20
|
+
- The things across are the fields of one record, and the record repeats down the page → **Table**
|
|
21
|
+
|
|
22
|
+
## Never
|
|
23
|
+
|
|
24
|
+
- Padding. It sets space between its children and none at all around them, so a row reached for to inset a region leaves the surface that should have carried the padding with none — and the inset now lives on an element that has no ground to sit on
|
|
25
|
+
- A single child. A line of one has nothing to space: the gap is inert, and what is left is an element that renders, costs a node, and explains nothing to the next person to read it
|
|
26
|
+
- Reaching a width. It is as wide as whatever holds it and declares no size of its own. A row used to constrain a measure is a width hidden inside a spacing decision, in the one place nobody will search for it
|
|
27
|
+
- Building a grid out of wrapping. Wrap is what a line does when it has run out of room, not a way of arranging things in columns: the last line is as long as whatever is left, and no item on it sits under an item above. It looks like a grid at the width it was designed at and at no other
|
|
28
|
+
- Separating two things that a surface, a rule or a ground already separates. Two answers to one gap is how a view stops having a rhythm worth reading
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
- **gap** `enum` · default "sm" — Always. The measure between items is the component's one decision and the reason it exists, so there is no case for leaving it unstated
|
|
33
|
+
- `none` — No gap at all, for a line whose marks are meant to read as one object rather than as a list of controls. The only step here that is a decision rather than a measure
|
|
34
|
+
- `xs` — The tightest gap between related elements: a glyph and its label, a pair of words read as one, inline text pairs
|
|
35
|
+
- `sm` — The default, and what the token names for a line of sibling controls — buttons in a row, a label and the field beside it
|
|
36
|
+
- `md` — The step the token names for stacked items — form fields, feature list items, pricing features — taken across: peers that are not controls, where the control step would make them read as one object
|
|
37
|
+
- `lg` — Between content groups — feature cards, footer columns, one pricing plan beside the next
|
|
38
|
+
- `xl` — Between the parts of a card, or between a heading and the block beside it. Drops one step below 768px, a phone having a third of the width to spend
|
|
39
|
+
- `2xl` — Between one section of a page and the next, set side by side. Drops one step below 768px, a phone having a third of the width to spend
|
|
40
|
+
- `3xl` — The largest gap, for separating whole movements of a page laid out across. Drops one step below 768px, a phone having a third of the width to spend
|
|
41
|
+
- never: Reaching a distance. The gap is a relationship between two items rather than a measure from anything — a step picked because it puts something where it looks right is a position written in the wrong units, and it is wrong at the next width
|
|
42
|
+
- **align** `enum` · default "center" — How items of different heights meet across the line. The default is the common case and the one that keeps a glyph reading as part of the label beside it
|
|
43
|
+
- `start` — Items keep their own height and sit against the top of the line — a label beside a paragraph that runs to several lines, where centring would set the label against the middle of the block
|
|
44
|
+
- `center` — The default. Items are centred across the line, which is what things of different heights want — a glyph beside a label, a badge beside a title, an avatar beside a name
|
|
45
|
+
- `end` — Items keep their own height and sit against the bottom of the line
|
|
46
|
+
- `stretch` — Every item takes the full height of the line, which is what a line of cards or panels wants when they should finish level however much is in each
|
|
47
|
+
- `baseline` — The first line of text in each item sits on one line. …
|
|
48
|
+
- never: Giving the line a height. Every value here arranges items within whatever height the tallest of them establishes; none of them adds any. A line that should be taller than its contents is a control with a size, and size.control is what carries that
|
|
49
|
+
- **justify** `enum` · default "start" — Where the items sit along a line that is wider than they need. Reach for it only where something has given the line a width
|
|
50
|
+
- `start` — The default. Items sit at the leading edge, and a line with no width of its own is exactly as wide as they are
|
|
51
|
+
- `center` — Items sit together in the middle of a line wider than they are
|
|
52
|
+
- `end` — Items sit against the trailing edge — the shape the actions closing a dialog or a form take, that being where a flow ends
|
|
53
|
+
- `between` — The first item at the leading edge, the last at the trailing, and whatever room is spare shared between them — a title on one side and its action on the other
|
|
54
|
+
- never: Pushing one item away from the others. `between` shares the room out between every pair, so a line of three ends with one stranded in the middle that nobody put there. Where one item belongs apart from the rest, the line has two items and one of them is a Row of its own
|
|
55
|
+
- **wrap** `boolean` · default false — The line may break onto another when it runs out of room, rather than squashing its items or running off the edge. For a set whose length the page cannot predict — chips a reader has added, tags on a record, a group of filters
|
|
56
|
+
- never: Building a grid. A wrapped line is ragged by construction: the last line holds whatever is left, and no item on it sits under an item above. Where the items must agree in both directions that is Grid, and where they must stay on one line it is Scroller — wrapping is the answer only when neither the columns nor the line matter
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/row.md`.
|