@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,321 @@
|
|
|
1
|
+
<!-- GENERATED from button-icon.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# ButtonIcon
|
|
4
|
+
|
|
5
|
+
One press carried by a glyph alone, in the space a label would need. What the press does decides the element: an `<a>` when it is given an href, a `<button>` when it is not — the fork CardButton already settled in this package, and for the same reason, that a control going to a page and a control the page handles itself are the same gesture with different destinations, and the element is what tells a browser which. The glyph is decorative to a screen reader; the name the control is announced by comes from `label`, which is never drawn, so the control is named for everyone whether or not the shape happens to be legible to them. This is the gap Button names in its own guidance: Button's words are both its accessible name and its destination, and a glyph alone has nowhere to put either.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- One press with no room for words — a promotional bar's dismiss, a hero's play control, a carousel step, a footer's social links. Whether it navigates or acts in place is decided by href alone, so the same component covers both
|
|
10
|
+
- A row of glyph-alone destinations where words would only repeat — social accounts in a footer, app stores in a download band, a region switch in a header
|
|
11
|
+
- A control the page owns rather than a destination — dismissing a promotional bar, playing a hero video, advancing a carousel, opening a mobile nav. Leave href off and it is a button, which answers Space and fires what the page says
|
|
12
|
+
- The glyph is one a visitor reads without being taught — a play triangle, a dismiss cross, a chevron, a social mark in its monochrome cut. A marketing page gets no onboarding and usually no second visit to learn in
|
|
13
|
+
- Room is genuinely short and the words would be the same words several times over. One of these on its own beside prose is usually a Button that lost its label
|
|
14
|
+
|
|
15
|
+
## Do not use
|
|
16
|
+
|
|
17
|
+
- The control has words, or needs them to be understood → `Button`
|
|
18
|
+
- The whole surface is the target — a card standing for a feature, a market or a plan → `CardButton`
|
|
19
|
+
- The mark is an ornament rather than a control → `Icon`
|
|
20
|
+
- The mark reports a state the visitor sets and reads back — sound on or off, a light and dark switch → nothing here does this
|
|
21
|
+
- A glyph whose meaning arrives only from a tooltip. Hover does not exist on a touch screen and a marketing page is read on a phone as often as not, so that explanation reaches only some of the people who need it
|
|
22
|
+
- The call to action the page exists to produce. That step is named rather than drawn, which is Button — a visitor deciding whether to convert should not have to decode a shape first
|
|
23
|
+
- A placeholder href while the destination is undecided. Given one this becomes a real anchor, so a # or an empty string is a control that looks live, offers to open in a new tab and goes nowhere
|
|
24
|
+
- Several glyphs in one control, or a glyph beside a count. One control, one action, one shape; anything else is a Button whose label happens to be short
|
|
25
|
+
|
|
26
|
+
## Anatomy
|
|
27
|
+
|
|
28
|
+
ButtonIcon renders 2 elements. A token binding names the part it applies to.
|
|
29
|
+
|
|
30
|
+
- `root` — `<button>`, class `dds-buttonicon`. The control, and the whole of what this component decides. An `<a>` when given an href and a `<button>` when not, exactly as CardButton does it: one answers Space and does what the page says, the other gives cmd-click, a destination in the status bar and a link that can be copied and crawled. Two components for that would be two names for one gesture, and this package already made that call once.
|
|
31
|
+
|
|
32
|
+
A fixed square from the control ramp rather than a box its contents size — both steps of the control ramp stand well clear of size.target.min, so nothing here needs a minimum bound on top. Fixed is what makes the glyph swappable: a circle that grew with its mark would change size between a chevron and a social mark, and a row of them would step up and down.
|
|
33
|
+
|
|
34
|
+
radius.pill rather than radius.control, so it is a circle. On a square box the pill radius and a full round are the same thing, and it is the shape Button takes — a glyph-alone control beside a pill CTA reading as a different family of control would be this package disagreeing with itself over one press.
|
|
35
|
+
|
|
36
|
+
It carries the variant and the size, so the fill, the square and the mark inside it all follow one decision. Its own structural keywords are the contract's top-level staticCss, which is where the root's belong.
|
|
37
|
+
|
|
38
|
+
There is no label part, because nothing is drawn: the accessible name is an attribute rather than a hidden span. And there is no loading state, which is the one place this leaves product's ButtonIcon behind rather than following it — an anchor has no honest pending state, the browser owning that and showing it in the chrome, so a spinner here would be correct on the button branch and a lie on the other.
|
|
39
|
+
|
|
40
|
+
It sets its own colour on every variant rather than letting one inherit, which the anchor makes necessary: a `<button>` takes the text colour around it and an `<a>` does not — it takes the browser's link blue, and the glyph goes with it through currentColor. CardButton records the same finding, arrived at the same way.
|
|
41
|
+
|
|
42
|
+
It can be told which ground it is on. `plain` is the variant that paints nothing of its own, which makes it the one that reads whatever is behind it — and a near-black mark on a bar standing on a dark hero is a control nobody can see. The tone moves the ink and the two tints and stops there. The focus ring moves at every variant, because a ring the colour of the ground is no ring at all whatever the mark inside it is doing.
|
|
43
|
+
- `icon` — `<svg>`, class `dds-buttonicon__icon`. The mark, which is a Quill glyph the caller passes rather than a shape this component draws. The part class goes on the `<svg>` itself, not on a box around it, because that is where icon.control.* has to land: every glyph in the icon package ships width and height presentation attributes defaulting to 24, and sizing a parent does nothing to them — a CSS length is what beats an attribute. Marketing Button puts its arrow's class in the same place, and product's Icon clones for this exact reason and records it.
|
|
44
|
+
|
|
45
|
+
The glyph arrives through a prop as an element already built, so the implementation clones it to add the class rather than wrapping it. A wrapper was the first shape here and was wrong twice over: it left the mark at whatever size the package shipped, and the hand-written rule that pulled it back to the box's measure was a second place the size was decided.
|
|
46
|
+
|
|
47
|
+
It carries icon.control.md and icon.control.lg — the same two steps Button gives the arrow beside its label, so a glyph moved from beside words into a circle does not change size on the way. Those steps were cut to clear a label's line box and there is no label here, which reads as a coincidence and is not one: what they fix is the mark's rank against the control around it, and that is the same question in a circle. Which is also why the step is bound here rather than handed to Icon, as Badge and Tab hand theirs: Icon draws from icon.size, whose steps are 16 and then 20, while the control ramp is 18 and then 20 — so an md control has no step to ask Icon for. Rounding it to either neighbour would put a glyph-alone control's mark a measure away from the same glyph beside a label in the same band, which is the disagreement this component's own guidance argues against.
|
|
48
|
+
|
|
49
|
+
It takes the control's colour through currentColor, which is what makes one glyph correct on a brand fill and on an inverse one alike, and it never shrinks. It is aria-hidden in the implementation: it names nothing, `label` having already named the control, and announced it would repeat that on every one of these in a row.
|
|
50
|
+
|
|
51
|
+
Apply these classes from the generated `buttonIconParts` constant rather than writing the strings by hand.
|
|
52
|
+
|
|
53
|
+
## Composition
|
|
54
|
+
|
|
55
|
+
- Takes no children. Everything it renders comes from props
|
|
56
|
+
- Never contains: `Button`, `ButtonIcon`, `Card`, `CardButton`, `CardBody`, `Breadcrumb`, `BreadcrumbItem` — in children or in any prop that takes a node
|
|
57
|
+
|
|
58
|
+
## Props
|
|
59
|
+
|
|
60
|
+
### variant — `primary` | `secondary` | `inverse` | `plain` (default `primary`)
|
|
61
|
+
|
|
62
|
+
- `primary` — The one glyph-alone press a section is built around — a play control over a hero, the single action a band exists for. Carries the brand fill, which is what makes it findable at a glance and what makes it meaningless once there are two.
|
|
63
|
+
- `secondary` — The ordinary case for these, because they usually arrive several at a time — a footer's social row, a carousel's two directions, a bar's dismiss. Button's secondary, drawn as a circle: the lightest tint the ramp offers, color.bg.subtle, with hover and press layered over the fill as a background-image rather than replacing it, so a glyph-alone control and a labelled one beside it read as one family. On the dark band, tone="inverse" keeps the fill and turns it white.
|
|
64
|
+
- `inverse` — A section that paints its own ground — a brand-coloured band, a photo, a dark takeover. There the brand fill is invisible against the fill behind it and a neutral tint is lost over a photograph, so the only thing that reads is a solid at the far end of the neutral ramp: pure black in light, pure white in dark. It outranks everything near it, which is what makes it right there and wrong anywhere else.
|
|
65
|
+
- `plain` — The control sits on a surface that has already said what it is — the exit on a sheet, a step in a set of marks — and a tint behind it would be the loudest thing there. It keeps the target and the states and gives up only the fill, so what a reader presses is unchanged and what they see is the glyph.
|
|
66
|
+
|
|
67
|
+
Use when: Deciding how much of the section one press claims. The three tiers are Button's three, deliberately — a glyph-alone control and a labelled CTA in the same band have to rank against each other, and they cannot do that in two vocabularies.
|
|
68
|
+
Never for: Ranking a row of these against each other. A footer's five social links are peers; one of them drawn heavier says the other four are lesser, which is not a thing anybody meant to say. And never inverse on the ordinary page ground: against it the fill carries roughly six times the contrast of the brand, so the primary beside it stops reading as the primary and one-primary-per-view is broken with no second primary anywhere in sight. And never for a control that has to be found rather than recognised: with no fill, a plain one is a glyph until it is hovered, so it belongs where the reader already knows something is — a corner, a row of marks, the end of a header — and not adrift on a page.
|
|
69
|
+
|
|
70
|
+
### size — `sm` | `md` | `lg` (default `md`)
|
|
71
|
+
|
|
72
|
+
- `sm` — A dense row of controls — a filter bar, a utility strip, a compact carousel. A square of size.control.sm holding a mark at icon.control.sm. Desktop only: at thirty-two it is below what a finger reliably hits.
|
|
73
|
+
- `md` — The default, and nearly everywhere — footers, navigation bars, promotional bars, carousels. A square of size.control.md holding a mark at icon.control.md, which is the measure Button's label-side glyph takes at the same step.
|
|
74
|
+
- `lg` — One prominent press, usually the only control in view — a play control over a hero, a single action in a conversion band. A square of size.control.lg holding a mark at icon.control.lg. One per page, in the same spirit as Button's own lg.
|
|
75
|
+
|
|
76
|
+
Use when: Matching the control to the density of the band it sits in, which on a marketing page is set by the section rather than by the control.
|
|
77
|
+
Never for: Making one of a set stand out. Two of these side by side at different steps read as a control and its afterthought, and a carousel whose next is larger than its previous has said the path runs one way.
|
|
78
|
+
|
|
79
|
+
### tone — `default` | `inverse` (default `default`)
|
|
80
|
+
|
|
81
|
+
- `default` — The control is on a light ground, which is every surface this package paints by default
|
|
82
|
+
- `inverse` — The control stands on the dark band, color.bg.brand-strong — a mark in a navigation bar on a hero, a social mark in a footer — which is the same near-black in light and dark. The ink and the tints move to the band's fixed roles; nothing else does
|
|
83
|
+
|
|
84
|
+
### icon — `node` **Required.**
|
|
85
|
+
|
|
86
|
+
Accepts: QuillSystemIcon
|
|
87
|
+
Use when: Always — the glyph is the whole control, so it is required rather than a slot that may be empty. Pass the glyph itself, from the icon package, rather than one already sized: the size a mark takes in this circle is this component's decision, at icon.control.md on md and icon.control.lg on lg, and the width and height the glyph shipped with are overridden by the class this component clones onto it.
|
|
88
|
+
Never for: A glyph whose meaning the visitor has to be taught, and never a second glyph — one control, one action, one shape. Nor a mark carrying a fill of its own: the icon set ships its social marks in both cuts, and only the monochrome one works here — LinkedinInIcon and InstagramIcon paint with currentColor, while LinkedinBlackIcon and the *BrandIcon family hard-code theirs, so they ignore the variant's colour and a black mark lands on the inverse tier's black fill. Nor a picture: a logo lockup or a photograph in a circle this size is an image asking to be a mark and failing at both.
|
|
89
|
+
|
|
90
|
+
### label — `string` **Required.**
|
|
91
|
+
|
|
92
|
+
Use when: Always. It is the entire accessible name, because nothing on screen carries one — the words that would have been the label if there had been room for one. Required rather than optional: an optional name on a control that draws none is a control that ships unnamed. On the anchor branch it names the destination; on the button branch it names what happens.
|
|
93
|
+
Never for: Describing the picture rather than what the press does — "cross" instead of "Close", "triangle" instead of "Play the tour". And not the gesture either: a footer of links announced as "click here" names nothing, which is the requirement Button's own guidance already sets for its words.
|
|
94
|
+
|
|
95
|
+
### href — `string`
|
|
96
|
+
|
|
97
|
+
Use when: The press goes somewhere with a URL of its own — a social account, an app store, another page. It makes this an anchor rather than a button, which is what gives a visitor cmd-click, a visible destination and a copyable link, none of which mean anything for a press the page handles itself. This is the ordinary case on a marketing page.
|
|
98
|
+
|
|
99
|
+
`target` and `rel` are not props of this component and do not need to be: it is typed against AnchorHTMLAttributes, so `target="_blank"` and `rel="noopener noreferrer"` are already in reach and land on the anchor. A destination leaving the site is common enough here that the pairing is the page's decision rather than an axis of this component, which is the ruling Button recorded first.
|
|
100
|
+
Never for: A press the page handles itself — a dismiss, a carousel step, opening a video in place. An anchor with an href nothing can navigate to is a promise the browser will try to keep.
|
|
101
|
+
|
|
102
|
+
Also accepts everything from `AnchorHTMLAttributes<HTMLAnchorElement>`.
|
|
103
|
+
|
|
104
|
+
## Choosing a variant
|
|
105
|
+
|
|
106
|
+
Placement in, props out. When one of these describes what you are building, take
|
|
107
|
+
its props — do not re-derive them from the variant descriptions above.
|
|
108
|
+
|
|
109
|
+
- **A row of social accounts in the page footer** — `variant="secondary"` `size="md"`, not `variant="primary"`
|
|
110
|
+
These are destinations a visitor looks for rather than ones the page pushes, and there are several of them at once. The brand fill repeated five times across a footer is five primaries, which is the one-primary-per-view rule broken by a row nobody would call a call to action. Secondary keeps the circle and the target and gives up the fill.
|
|
111
|
+
- **Dismissing a promotional bar or a cookie band** — `variant="secondary"` `size="md"`
|
|
112
|
+
It is a button rather than an anchor — leave href off — because the page handles the press itself and nothing about it is a place a visitor could bookmark. Secondary rather than primary: the bar's own call to action is the primary, and a dismiss that outranks it is a band arguing with itself.
|
|
113
|
+
- **Playing a video in a hero, or over a photograph** — `variant="inverse"` `size="lg"`, not `variant="primary"`
|
|
114
|
+
A brand fill is invisible against a brand ground and a neutral tint is lost over a photograph, so the only thing that reads there is a solid at the far end of the neutral ramp. lg because it is the one control in view and it is read at a distance, which is the case size.control.lg was cut for.
|
|
115
|
+
- **The previous and next controls of a carousel** — `variant="secondary"` `size="md"`, not `size="lg"`
|
|
116
|
+
A pair of peers, sized by the band they sit in rather than by themselves. lg stands a step taller than md, which puts it above the copy beside it in most bands — the one place a hero measure is wrong. Both take the same variant, because one of two directions drawn heavier says the other is unavailable.
|
|
117
|
+
|
|
118
|
+
## Accessibility
|
|
119
|
+
|
|
120
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
121
|
+
|
|
122
|
+
- Announced as: `button`
|
|
123
|
+
- `Tab` — move focus. One stop, on the control itself — there is nothing inside it to reach, the glyph being hidden from the accessibility tree
|
|
124
|
+
- `Enter` — press it. A button and an anchor both answer Enter, so this reads the same either way
|
|
125
|
+
- `Space` — press it, where it is a button. An anchor does not answer Space, and that difference belongs to the element rather than to this component — a visitor who knows the difference is told which by how it was announced
|
|
126
|
+
- accessible name
|
|
127
|
+
- focus-visible ring
|
|
128
|
+
- a label naming what the press does rather than what the glyph looks like, because a picture named after itself tells a screen reader user the one thing they cannot use
|
|
129
|
+
- the glyph hidden from the accessibility tree. It restates the control the element already announces, and a footer row of these would repeat that on every one
|
|
130
|
+
- an href that resolves, wherever one is given — an anchor without a real destination is announced as a link and goes nowhere, and one with no href at all is neither focusable nor announced as a link, so the control disappears for anyone not using a mouse
|
|
131
|
+
|
|
132
|
+
## Rules
|
|
133
|
+
|
|
134
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
135
|
+
|
|
136
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
137
|
+
|
|
138
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
139
|
+
|
|
140
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
141
|
+
|
|
142
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
143
|
+
|
|
144
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
145
|
+
Guidance only — cannot be checked automatically.
|
|
146
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, Input and Switch simultaneously.
|
|
147
|
+
Guidance only — cannot be checked automatically.
|
|
148
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
149
|
+
|
|
150
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
151
|
+
|
|
152
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
153
|
+
Guidance only — cannot be checked automatically.
|
|
154
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
155
|
+
|
|
156
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
157
|
+
|
|
158
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
159
|
+
|
|
160
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
161
|
+
|
|
162
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
163
|
+
|
|
164
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
165
|
+
|
|
166
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
167
|
+
|
|
168
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
169
|
+
|
|
170
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
171
|
+
Guidance only — cannot be checked automatically.
|
|
172
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
173
|
+
|
|
174
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
175
|
+
|
|
176
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
177
|
+
|
|
178
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
179
|
+
|
|
180
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
181
|
+
|
|
182
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
183
|
+
|
|
184
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
185
|
+
|
|
186
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
187
|
+
|
|
188
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
189
|
+
Guidance only — cannot be checked automatically.
|
|
190
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
191
|
+
|
|
192
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
193
|
+
|
|
194
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
195
|
+
|
|
196
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
197
|
+
Guidance only — cannot be checked automatically.
|
|
198
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
199
|
+
|
|
200
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
201
|
+
|
|
202
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
203
|
+
|
|
204
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
205
|
+
Guidance only — cannot be checked automatically.
|
|
206
|
+
|
|
207
|
+
## Anti-examples
|
|
208
|
+
|
|
209
|
+
❌ ButtonIcon for: The control has words, or needs them to be understood
|
|
210
|
+
A glyph a visitor has to interpret unaided is a label the page failed to write. Button also gets its accessible name from its own children, so the words do two jobs there — they name the control and they say where it goes — and a marketing page is read by someone deciding whether to stay, who will not stop to work out a picture
|
|
211
|
+
→ use `Button` instead.
|
|
212
|
+
|
|
213
|
+
❌ ButtonIcon for: The whole surface is the target — a card standing for a feature, a market or a plan
|
|
214
|
+
That press belongs to the surface rather than to a control sitting on it, and one of these inside a CardButton is a button inside a button, which no-nested-interactive refuses. The two components share this component's href fork on purpose; what differs is how much of the page is the target
|
|
215
|
+
→ use `CardButton` instead.
|
|
216
|
+
|
|
217
|
+
❌ ButtonIcon for: The mark is an ornament rather than a control
|
|
218
|
+
This takes focus, sits in the tab order and announces itself as a control, so an ornament made into one puts a stop in the keyboard order that does nothing when it is reached. A decorative mark is Icon, which draws a glyph at a token step and takes no press at all.
|
|
219
|
+
→ use `Icon` instead.
|
|
220
|
+
|
|
221
|
+
❌ ButtonIcon for: The mark reports a state the visitor sets and reads back — sound on or off, a light and dark switch
|
|
222
|
+
A button reports an event and a toggle reports a value, so the change would be announced as an action rather than as a new setting, and one glyph meaning two things cannot say which one it currently is. Nothing here covers that; it needs its own component, the way product has Switch
|
|
223
|
+
→ nothing in this system does this. Not a gap waiting to be filled — the case belongs outside it.
|
|
224
|
+
|
|
225
|
+
## Example
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
229
|
+
import { PlaySolidIcon } from '@deriv-com/quill-icons-web'
|
|
230
|
+
|
|
231
|
+
<ButtonIcon label="Play the product tour" icon={<PlaySolidIcon />} />
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## In use
|
|
235
|
+
|
|
236
|
+
### Tiers
|
|
237
|
+
|
|
238
|
+
How much of the section one press claims. Primary for the press a band is built around, secondary for a set of peers, inverse on a painted ground, plain where the surface already says what it is.
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
242
|
+
import { PlaySolidIcon, XmarkRegularIcon } from '@deriv-com/quill-icons-web'
|
|
243
|
+
|
|
244
|
+
// Primary — the press a band is built around
|
|
245
|
+
<ButtonIcon variant="primary" label="Play the product tour" icon={<PlaySolidIcon />} />
|
|
246
|
+
|
|
247
|
+
// Secondary — the ordinary case, and the one that repeats
|
|
248
|
+
<ButtonIcon variant="secondary" label="Dismiss this offer" icon={<XmarkRegularIcon />} />
|
|
249
|
+
|
|
250
|
+
// Inverse — on a brand band, a photo or a dark takeover
|
|
251
|
+
<ButtonIcon variant="inverse" label="Play the product tour" icon={<PlaySolidIcon />} />
|
|
252
|
+
|
|
253
|
+
// Plain — where the surface has already said what it is
|
|
254
|
+
<ButtonIcon variant="plain" label="Close" icon={<XmarkRegularIcon />} />
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Steps
|
|
258
|
+
|
|
259
|
+
Three squares from the control ramp, each holding the mark Button gives its own glyph at that step. md is nearly everywhere; lg is one prominent press; sm is a dense desktop row.
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
263
|
+
import { ChevronLeftRegularIcon } from '@deriv-com/quill-icons-web'
|
|
264
|
+
|
|
265
|
+
// sm — a dense row, desktop only
|
|
266
|
+
<ButtonIcon size="sm" variant="secondary" label="Previous market" icon={<ChevronLeftRegularIcon />} />
|
|
267
|
+
|
|
268
|
+
// md — the default step
|
|
269
|
+
<ButtonIcon size="md" variant="secondary" label="Previous market" icon={<ChevronLeftRegularIcon />} />
|
|
270
|
+
|
|
271
|
+
// lg — one step up
|
|
272
|
+
<ButtonIcon size="lg" variant="secondary" label="Previous market" icon={<ChevronLeftRegularIcon />} />
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### A destination, or a press
|
|
276
|
+
|
|
277
|
+
href decides the element. With one it is an anchor and the browser navigates; without one it is a button and the page handles the press itself.
|
|
278
|
+
|
|
279
|
+
```tsx
|
|
280
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
281
|
+
import { BarsRegularIcon, LinkedinInIcon } from '@deriv-com/quill-icons-web'
|
|
282
|
+
|
|
283
|
+
// With href — an anchor. Cmd-click opens a tab
|
|
284
|
+
<ButtonIcon variant="secondary" href="https://www.linkedin.com/company/deriv" label="Deriv on LinkedIn" icon={<LinkedinInIcon />} />
|
|
285
|
+
|
|
286
|
+
// Without href — a button. Answers Space, acts in place
|
|
287
|
+
<ButtonIcon variant="secondary" label="Open the menu" icon={<BarsRegularIcon />} />
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### A row of peers
|
|
291
|
+
|
|
292
|
+
Social accounts in a footer: several at once, all one tier. One drawn heavier would say the other two are lesser, which is not something anybody meant to say.
|
|
293
|
+
|
|
294
|
+
```tsx
|
|
295
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
296
|
+
import { FacebookFIcon, InstagramIcon, LinkedinInIcon } from '@deriv-com/quill-icons-web'
|
|
297
|
+
|
|
298
|
+
// LinkedIn
|
|
299
|
+
<ButtonIcon variant="secondary" href="https://www.linkedin.com/company/deriv" label="Deriv on LinkedIn" icon={<LinkedinInIcon />} />
|
|
300
|
+
|
|
301
|
+
// Instagram
|
|
302
|
+
<ButtonIcon variant="secondary" href="https://www.instagram.com/deriv_official" label="Deriv on Instagram" icon={<InstagramIcon />} />
|
|
303
|
+
|
|
304
|
+
// Facebook
|
|
305
|
+
<ButtonIcon variant="secondary" href="https://www.facebook.com/deriv" label="Deriv on Facebook" icon={<FacebookFIcon />} />
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Which ground the mark is on
|
|
309
|
+
|
|
310
|
+
Plain paints nothing of its own, so what is behind it decides whether the mark can be seen at all.
|
|
311
|
+
|
|
312
|
+
```tsx
|
|
313
|
+
import { ButtonIcon } from '@deriv-com/dds-marketing'
|
|
314
|
+
import { PlaySolidIcon } from '@deriv-com/quill-icons-web'
|
|
315
|
+
|
|
316
|
+
// default — a light surface
|
|
317
|
+
<ButtonIcon label="Play the product tour" icon={<PlaySolidIcon />} variant="plain" />
|
|
318
|
+
|
|
319
|
+
// inverse — a bar on a dark hero
|
|
320
|
+
<ButtonIcon label="Play the product tour" icon={<PlaySolidIcon />} variant="plain" tone="inverse" />
|
|
321
|
+
```
|