@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,64 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CardBodyOwnProps {
|
|
3
|
+
/** The picture is the card's ground and the copy is read on top of it. Set explicitly rather than inferred from src, which BannerBody can afford to do and this cannot: there, art is always behind the words, so having art and being over it are the same fact. Here a picture is a region in the column by default, and the same src means two different cards */
|
|
4
|
+
overMedia?: boolean;
|
|
5
|
+
/** The card has no fill for the copy to be held off — Card's `plain` variant, where the picture is the card's edge rather than the ground being it. The inline inset goes and the copy lines up with the picture above it; the block padding stays, because the space between a picture and the line under it is still doing its job */
|
|
6
|
+
flush?: boolean;
|
|
7
|
+
/** The card is pressable and its picture is what answers the pointer — an editorial card inside a CardButton, on any ground. The picture grows by motion.scale.media-hover and media-frame clips it, so what the reader sees is the frame holding still while the art moves inside it. Setting this is also what stops the card lifting: CardButton suppresses its own lift when the body it holds zooms, so the two motions never compete */
|
|
8
|
+
zoomOnHover?: boolean;
|
|
9
|
+
/** The card is small enough that the standard inset and the standard type are most of it. `space.inset.card` is thirty-two, which is a fifth of the width of a rail beside a footer's columns; `font.h5` is twenty-four, which is a heading over a group of cards rather than the name of one two hundred pixels wide.
|
|
10
|
+
|
|
11
|
+
This takes the inset to `space.inset.md`, the title to `font.label.md` and the description to `font.body.sm` — sixteen and fourteen, where the standard card runs twenty-four and sixteen. The pair moves together: dropping the title alone would put a heading two pixels above its own body copy.
|
|
12
|
+
|
|
13
|
+
It is about the card's size rather than its importance. A compact card is not a lesser one. */
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* `default` — The card is on the page, which is nearly every card
|
|
17
|
+
* `inverse` — The card sits on a band that paints its own dark ground, and carries `tone="inverse"` itself. The eyebrow takes the inverse muted ink so it stays quieter than the copy without falling below what a reader can make out
|
|
18
|
+
*/
|
|
19
|
+
tone?: 'default' | 'inverse';
|
|
20
|
+
/** The card is filed under something a reader scans before the headline — the date an article ran, how long it takes to read, the category it sits in. Write it in the case it should be read in: the part draws the capitals itself, so 'August' is what belongs here and AUGUST is what appears */
|
|
21
|
+
eyebrow?: string;
|
|
22
|
+
/** The card names what it is about. A noun phrase rather than a sentence — 'Balance protection', not 'We protect your balance' — because it is read as a label on the block beneath it. A string rather than a node: a node could carry a mark or a link, and would cost the component its examples — the checker requires a named element there, so no row could ever show a card with real copy in it. */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** What the title means, usually a sentence or two. It takes the default body step, because a card's copy is copy rather than a caption. A string rather than a node, for the reason the title is one — a node prop cannot be given text in an examples row, and a card nobody can show is worse than a sentence that cannot hold a link. */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** The card's own way on — "Learn more" — under the line, for a card in a Card rather than a CardButton: the card is read and the link is what is pressed. A standalone Link. On a card that paints its own ground, accent or accent-strong, give it tone="inherit" so it takes the card's white; on a light card it keeps its coral. */
|
|
27
|
+
link?: ReactNode;
|
|
28
|
+
/** The card leads with a glyph — a badge, a shield, a small piece of art that makes the feature recognisable before the title is read. Set it on every card in a set or on none of them: one card in a row carrying a mark reads as the important one, which is a claim the mark was not meant to make. Pass the glyph; the body draws it at its own step, and an Icon passed already sized is unwrapped rather than obeyed */
|
|
29
|
+
mark?: ReactNode;
|
|
30
|
+
/** The card shows a picture — a photograph, a product render, a screenshot of the thing being described. Absent is the ordinary case: most cards are words */
|
|
31
|
+
src?: string;
|
|
32
|
+
/** Whenever src is, and empty when the picture says nothing the copy has not already said. A decorative render beside a title naming it — a shield next to 'Integrity' — takes alt="", which tells a screen reader to skip it rather than read a filename aloud. A photograph carrying meaning of its own takes a sentence describing what it shows */
|
|
33
|
+
alt?: string;
|
|
34
|
+
/** The picture must hold a known shape rather than absorb the card's spare height — a logo that distorts the moment it is cropped, or a chart whose proportions are the point. Written as the division rather than the result, so the shape is legible: aspect={16 / 9}, not aspect={1.7778} */
|
|
35
|
+
aspect?: number;
|
|
36
|
+
/**
|
|
37
|
+
* `below` — The copy introduces the picture — a feature named and explained, then shown. The ordinary case, and what a reader scanning a column of cards is reading for
|
|
38
|
+
* `above` — The picture is what the reader recognises the card by and the words caption it — a photograph leading an article, a screenshot the copy then describes. Changes the order of the elements themselves rather than only their appearance, so what a screen reader hears follows what the page shows
|
|
39
|
+
*/
|
|
40
|
+
mediaPosition?: 'below' | 'above';
|
|
41
|
+
}
|
|
42
|
+
export type CardBodyProps = CardBodyOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'overMedia' | 'flush' | 'zoomOnHover' | 'compact' | 'tone' | 'eyebrow' | 'title' | 'description' | 'link' | 'mark' | 'src' | 'alt' | 'aspect' | 'mediaPosition'>;
|
|
43
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
44
|
+
export declare const cardBodyParts: {
|
|
45
|
+
readonly root: "dds-cardbody";
|
|
46
|
+
readonly scrim: "dds-cardbody__scrim";
|
|
47
|
+
readonly content: "dds-cardbody__content";
|
|
48
|
+
readonly mark: "dds-cardbody__mark";
|
|
49
|
+
readonly eyebrow: "dds-cardbody__eyebrow";
|
|
50
|
+
readonly title: "dds-cardbody__title";
|
|
51
|
+
readonly description: "dds-cardbody__description";
|
|
52
|
+
readonly link: "dds-cardbody__link";
|
|
53
|
+
readonly 'media-frame': "dds-cardbody__media-frame";
|
|
54
|
+
readonly media: "dds-cardbody__media";
|
|
55
|
+
};
|
|
56
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
57
|
+
export declare const cardBodyDefaults: {
|
|
58
|
+
readonly overMedia: false;
|
|
59
|
+
readonly flush: false;
|
|
60
|
+
readonly zoomOnHover: false;
|
|
61
|
+
readonly compact: false;
|
|
62
|
+
readonly tone: "default";
|
|
63
|
+
readonly mediaPosition: "below";
|
|
64
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// GENERATED from card-body.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const cardBodyParts = {
|
|
4
|
+
root: 'dds-cardbody',
|
|
5
|
+
scrim: 'dds-cardbody__scrim',
|
|
6
|
+
content: 'dds-cardbody__content',
|
|
7
|
+
mark: 'dds-cardbody__mark',
|
|
8
|
+
eyebrow: 'dds-cardbody__eyebrow',
|
|
9
|
+
title: 'dds-cardbody__title',
|
|
10
|
+
description: 'dds-cardbody__description',
|
|
11
|
+
link: 'dds-cardbody__link',
|
|
12
|
+
'media-frame': 'dds-cardbody__media-frame',
|
|
13
|
+
media: 'dds-cardbody__media',
|
|
14
|
+
};
|
|
15
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
16
|
+
export const cardBodyDefaults = { overMedia: false, flush: false, zoomOnHover: false, compact: false, tone: 'default', mediaPosition: 'below' };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing
|
|
5
|
+
* specificity, so every rule below ties or beats exactly what it would have without it.
|
|
6
|
+
* Imported after the generated sheet, which is what lets the ties fall this way.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* Implementation CSS that the contract's staticCss cannot express. */
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* The picture answers a pointer that is anywhere on the card.
|
|
13
|
+
*
|
|
14
|
+
* Here because of the shape of the selector rather than the value in it. A state bound on a
|
|
15
|
+
* part emits hover on that part — `.dds-cardbody__media:hover` — so the picture would grow
|
|
16
|
+
* while the pointer was on the picture and sit still while it was on the headline of the
|
|
17
|
+
* very same card. What an editorial card wants is the root's hover reaching one of its own
|
|
18
|
+
* children, and the generator has no vocabulary for that.
|
|
19
|
+
*
|
|
20
|
+
* The body is the card's only child and takes its full height, so hovering the card is
|
|
21
|
+
* hovering the body. That is what keeps this inside one component: both halves of the
|
|
22
|
+
* selector are CardBody's own, and nothing here reaches into a part someone else owns.
|
|
23
|
+
*
|
|
24
|
+
* What stops this from growing the card is `media-frame`, not anything in this rule. A
|
|
25
|
+
* transform never reflows, so the layout was never going to move — but an <img> cannot clip
|
|
26
|
+
* itself, and before the frame existed the nearest clip was the Card's, one level up and
|
|
27
|
+
* around the copy as well. The picture grew past its own box and painted over the eyebrow
|
|
28
|
+
* and the headline, and in a body with no card around it, over whatever came next. The
|
|
29
|
+
* frame holds the box; this moves the art inside it.
|
|
30
|
+
*
|
|
31
|
+
* The step is `motion.scale.media-hover` rather than `motion.scale.hover`. The latter is held to two
|
|
32
|
+
* per cent because a control that grows past the pointer fires its own mouse-out; a picture in a frame
|
|
33
|
+
* that never moves cannot do that, so it takes twice the step.
|
|
34
|
+
*
|
|
35
|
+
* `scale` rather than `transform: scale()`, matching the `translate` CardButton binds for
|
|
36
|
+
* its lift. They are independent properties, so neither needs the other's matrix — which is
|
|
37
|
+
* what would let one card do both. None does: the lift is bound to the four variants with a
|
|
38
|
+
* fill, and this is for the one without.
|
|
39
|
+
*
|
|
40
|
+
* Two classes deep to match the generated rule it sits against, which is
|
|
41
|
+
* `.dds-cardbody .dds-cardbody__media`. A bare `.dds-cardbody__media` would lose on
|
|
42
|
+
* specificity however late it loaded, which is the quiet way an override fails.
|
|
43
|
+
*/
|
|
44
|
+
:where([data-dds-context="marketing"]) .dds-cardbody[data-zoom-on-hover="true"]:hover .dds-cardbody__media {
|
|
45
|
+
scale: var(--motion-scale-media-hover);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* Only the property list. The duration and the curve are bound in the contract, on this
|
|
50
|
+
* same part and under this same axis, so the generated sheet already carries them — and
|
|
51
|
+
* binding them is also what tells the generator this component has motion at all, which is
|
|
52
|
+
* what makes it emit the reduced-motion block below this one.
|
|
53
|
+
*
|
|
54
|
+
* The list itself cannot be bound, because the generator computes it from the properties a
|
|
55
|
+
* contract binds on a state, and the only thing that moves here is bound in no state.
|
|
56
|
+
*
|
|
57
|
+
* Those two are `motion.duration.media-hover` and `motion.easing.media-hover`, which together
|
|
58
|
+
* with `motion.scale.media-hover` are the three roles this one effect owns. `duration.normal`
|
|
59
|
+
* is the role whose description names card hover, and 200ms is right for a card that lifts:
|
|
60
|
+
* the movement is small and over. A picture that zooms is still on screen when it stops and
|
|
61
|
+
* the eye follows it the whole way, so the same 200ms reads as a snap. 400ms is the step that
|
|
62
|
+
* follows without lagging the pointer.
|
|
63
|
+
*
|
|
64
|
+
* The curve matters more than the duration. `easing.standard` is `emphasized`, which is
|
|
65
|
+
* 87 per cent travelled by its halfway point — a one-way shape, for something arriving
|
|
66
|
+
* somewhere. A hover is the one transition that runs backwards as often as forwards, and an
|
|
67
|
+
* asymmetric curve played in reverse is a different animation: a snap going in, a drift coming
|
|
68
|
+
* out. `media-hover` is `in-out-soft`, which is the same shape both ways.
|
|
69
|
+
*/
|
|
70
|
+
:where([data-dds-context="marketing"]) .dds-cardbody[data-zoom-on-hover="true"] .dds-cardbody__media {
|
|
71
|
+
transition-property: scale;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* The generated reduced-motion block turns the transition off and stops there, which is
|
|
76
|
+
* right for every other component in the package: with nothing to interpolate, a colour
|
|
77
|
+
* simply arrives. Here it would leave the picture jumping between two sizes on hover — more
|
|
78
|
+
* motion in less time, which is the opposite of what the reader asked for.
|
|
79
|
+
*
|
|
80
|
+
* So the scale goes too. Written here because the generated block is generated: it knows a
|
|
81
|
+
* component has transitions, not that one of them was a size.
|
|
82
|
+
*/
|
|
83
|
+
@media (prefers-reduced-motion: reduce) {
|
|
84
|
+
:where([data-dds-context="marketing"]) .dds-cardbody[data-zoom-on-hover="true"]:hover .dds-cardbody__media {
|
|
85
|
+
scale: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* GENERATED from cardbutton.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton {
|
|
4
|
+
transition-property: outline-color, outline-width, translate;
|
|
5
|
+
border-style: none;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
font-family: inherit;
|
|
11
|
+
outline-style: solid;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
padding: 0;
|
|
14
|
+
text-align: start;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
border-radius: var(--radius-surface);
|
|
17
|
+
min-block-size: var(--size-target-min);
|
|
18
|
+
min-inline-size: var(--size-target-min);
|
|
19
|
+
outline-width: var(--border-width-none);
|
|
20
|
+
transition-duration: var(--motion-duration-normal);
|
|
21
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton:focus-visible {
|
|
25
|
+
outline-color: var(--color-border-focus);
|
|
26
|
+
outline-width: var(--border-width-focus);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent-strong"] {
|
|
30
|
+
background-color: var(--color-bg-surface-card-strong);
|
|
31
|
+
color: var(--color-fg-on-brand-strong);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent"] {
|
|
35
|
+
background-color: var(--color-bg-brand);
|
|
36
|
+
color: var(--color-fg-on-brand);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="plain"] {
|
|
40
|
+
border-radius: var(--radius-none);
|
|
41
|
+
color: var(--color-fg-default);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-light"] {
|
|
45
|
+
background-color: var(--color-bg-surface-card-light);
|
|
46
|
+
color: var(--color-fg-on-surface-card-light);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-raised"] {
|
|
50
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
51
|
+
color: var(--color-fg-default);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface"] {
|
|
55
|
+
background-color: var(--color-bg-surface);
|
|
56
|
+
color: var(--color-fg-default);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent-strong"]:hover:where(:not(:disabled)) {
|
|
60
|
+
translate: var(--motion-translate-hover);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent"]:hover:where(:not(:disabled)) {
|
|
64
|
+
translate: var(--motion-translate-hover);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-light"]:hover:where(:not(:disabled)) {
|
|
68
|
+
translate: var(--motion-translate-hover);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-raised"]:hover:where(:not(:disabled)) {
|
|
72
|
+
translate: var(--motion-translate-hover);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface"]:hover:where(:not(:disabled)) {
|
|
76
|
+
translate: var(--motion-translate-hover);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (prefers-reduced-motion: reduce) {
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton { transition: none !important; }
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './CardButton.css';
|
|
2
|
+
import './card-button-impl.css';
|
|
3
|
+
import { type CardButtonProps } from './CardButton.types.js';
|
|
4
|
+
export type { CardButtonProps };
|
|
5
|
+
/**
|
|
6
|
+
* A card that responds to a press.
|
|
7
|
+
*
|
|
8
|
+
* Which element it renders is decided by `href` and nothing else. A card that goes to a
|
|
9
|
+
* page and a card that opens a dialog are the same gesture with different destinations,
|
|
10
|
+
* and the element is what tells a browser which: a `<button>` answers Space and does what
|
|
11
|
+
* the page says, an `<a>` gives cmd-click, a visible destination and a copyable link. Two
|
|
12
|
+
* components for that would be two names for one gesture.
|
|
13
|
+
*
|
|
14
|
+
* Everything Card's surface does, this does — the four grounds, the corner, the clip, no
|
|
15
|
+
* inset of its own. What it adds is that the whole surface is one target, and what it gives
|
|
16
|
+
* up is holding a control: a button inside a button is unreachable, which is why
|
|
17
|
+
* `forbiddenChildren` names every one of them.
|
|
18
|
+
*
|
|
19
|
+
* `color` is bound per ground rather than inherited, which the anchor makes necessary — a
|
|
20
|
+
* `<button>` takes the text colour around it and an `<a>` does not, so without it every
|
|
21
|
+
* word in the card would come out the browser's link blue.
|
|
22
|
+
*
|
|
23
|
+
* `type="button"` on the button branch, because a card inside a form would otherwise submit
|
|
24
|
+
* it: the default for a `<button>` is `submit`, and a promotional card that reloaded the
|
|
25
|
+
* page is the kind of fault nobody looks for in a card.
|
|
26
|
+
*/
|
|
27
|
+
export declare function CardButton({ variant, href, children, ...rest }: CardButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './CardButton.css';
|
|
3
|
+
import './card-button-impl.css';
|
|
4
|
+
import { cardButtonDefaults, cardButtonParts } from './CardButton.types.js';
|
|
5
|
+
/**
|
|
6
|
+
* A card that responds to a press.
|
|
7
|
+
*
|
|
8
|
+
* Which element it renders is decided by `href` and nothing else. A card that goes to a
|
|
9
|
+
* page and a card that opens a dialog are the same gesture with different destinations,
|
|
10
|
+
* and the element is what tells a browser which: a `<button>` answers Space and does what
|
|
11
|
+
* the page says, an `<a>` gives cmd-click, a visible destination and a copyable link. Two
|
|
12
|
+
* components for that would be two names for one gesture.
|
|
13
|
+
*
|
|
14
|
+
* Everything Card's surface does, this does — the four grounds, the corner, the clip, no
|
|
15
|
+
* inset of its own. What it adds is that the whole surface is one target, and what it gives
|
|
16
|
+
* up is holding a control: a button inside a button is unreachable, which is why
|
|
17
|
+
* `forbiddenChildren` names every one of them.
|
|
18
|
+
*
|
|
19
|
+
* `color` is bound per ground rather than inherited, which the anchor makes necessary — a
|
|
20
|
+
* `<button>` takes the text colour around it and an `<a>` does not, so without it every
|
|
21
|
+
* word in the card would come out the browser's link blue.
|
|
22
|
+
*
|
|
23
|
+
* `type="button"` on the button branch, because a card inside a form would otherwise submit
|
|
24
|
+
* it: the default for a `<button>` is `submit`, and a promotional card that reloaded the
|
|
25
|
+
* page is the kind of fault nobody looks for in a card.
|
|
26
|
+
*/
|
|
27
|
+
export function CardButton({ variant = cardButtonDefaults.variant, href, children, ...rest }) {
|
|
28
|
+
const shared = {
|
|
29
|
+
className: cardButtonParts.root,
|
|
30
|
+
// Read from `data-variant` rather than folded into the class, the same way Card reads it.
|
|
31
|
+
'data-variant': variant,
|
|
32
|
+
};
|
|
33
|
+
if (href !== undefined) {
|
|
34
|
+
return (_jsx("a", { ...rest, ...shared, href: href, children: children }));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx("button", { ...rest, ...shared, type: "button", children: children }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CardButtonOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `surface` — The default, and right for a pressable card on the page. The same recessed step off the white page that Card takes, so a row mixing pressable and plain cards reads as one row
|
|
5
|
+
* `surface-light` — A light card among dark ones that has to stay light in both themes — a row mixing a dark, a coral and a grey card, where the grey one flipping to dark in dark mode would make two dark cards. gray.50 with gray.950 text, fixed. For an ordinary card that follows the theme, surface.
|
|
6
|
+
* `surface-raised` — The card sits on a color.bg.subtle band rather than on the page, where the recessed fill all but disappears and this one lifts off the band instead
|
|
7
|
+
* `accent` — One card in a set is the promotional one and the page has already earned the colour
|
|
8
|
+
* `accent-strong` — A card carrying more weight than its neighbours. The darkest of the four, and the one that takes white at 20.55:1 — the most legible ground a marketing card has
|
|
9
|
+
* `plain` — An editorial card that goes somewhere — an article, a post, a release note. No fill, no corner and no lift: what marks it out is its picture and the gap to the next one, the way a column of articles is told apart on a page rather than the way a row of tiles is. The same ground Card's own plain variant takes, so a pressable article card and a static one sit in one column without a seam
|
|
10
|
+
*/
|
|
11
|
+
variant?: 'surface' | 'surface-light' | 'surface-raised' | 'accent' | 'accent-strong' | 'plain';
|
|
12
|
+
/** The press goes somewhere with a URL of its own. It makes this an anchor rather than a button, which is what gives a reader cmd-click, a visible destination and a copyable link — none of which mean anything for a press that opens a dialog. This is the ordinary case on a marketing page, where most cards point at a page */
|
|
13
|
+
href?: string;
|
|
14
|
+
/** Allowed: any content */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export type CardButtonProps = CardButtonOwnProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'variant' | 'href'>;
|
|
18
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
19
|
+
export declare const cardButtonParts: {
|
|
20
|
+
readonly root: "dds-cardbutton";
|
|
21
|
+
};
|
|
22
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
23
|
+
export declare const cardButtonDefaults: {
|
|
24
|
+
readonly variant: "surface";
|
|
25
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// GENERATED from card-button.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const cardButtonParts = {
|
|
4
|
+
root: 'dds-cardbutton',
|
|
5
|
+
};
|
|
6
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
7
|
+
export const cardButtonDefaults = { variant: 'surface' };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing
|
|
5
|
+
* specificity, so the rule below beats exactly what it needs to and nothing else.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* Implementation CSS that the contract's staticCss cannot express. */
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* One motion per gesture: a card whose picture zooms does not also lift.
|
|
12
|
+
*
|
|
13
|
+
* Two motions answering one hover reads as a glitch rather than as emphasis — the frame
|
|
14
|
+
* slides up while the art inside it grows, and neither movement is legible because the
|
|
15
|
+
* other is happening. Which one to keep is decided by what the card is: an editorial card
|
|
16
|
+
* is recognised by its picture, so the picture is what should answer the pointer.
|
|
17
|
+
*
|
|
18
|
+
* This is a separate rule from `plain` having no lift, and the two are independent. That one
|
|
19
|
+
* is about the ground: with no fill, what would rise is a picture and some loose text, which
|
|
20
|
+
* reads as the words sliding. This one is about the motion already present, and it holds on
|
|
21
|
+
* every variant — an editorial card on a surface fill has a ground to lift and still should
|
|
22
|
+
* not, because its picture is already moving.
|
|
23
|
+
*
|
|
24
|
+
* Written here because the condition is a fact about this component's child. A contract binds
|
|
25
|
+
* a property under a styling axis of its own, and "the body inside me zooms" is neither — it
|
|
26
|
+
* is CardBody's prop, one level down. `:has()` is what lets this stay a rule about the
|
|
27
|
+
* CardButton: the selector is on this component's own root, and the child is only read.
|
|
28
|
+
*
|
|
29
|
+
* `>` rather than a descendant, because a CardButton holds exactly one child. A loose
|
|
30
|
+
* descendant would also match a zooming body nested somewhere deeper, which is a shape
|
|
31
|
+
* childCount already forbids and this need not restate.
|
|
32
|
+
*
|
|
33
|
+
* Specificity: the generated lift is `.dds-cardbutton[data-variant="…"]:hover:where(…)`, at
|
|
34
|
+
* three classes. This reads four — the class, the two inside `:has()`, and `:hover` — so it
|
|
35
|
+
* wins on weight rather than on load order, and would still win if the sheets were reordered.
|
|
36
|
+
*/
|
|
37
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton:has(> .dds-cardbody[data-zoom-on-hover="true"]):hover {
|
|
38
|
+
translate: none;
|
|
39
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* GENERATED from checkbox.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-checkbox {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--space-gap-xs);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__control {
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: var(--space-gap-sm);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__box {
|
|
16
|
+
align-items: center;
|
|
17
|
+
border-style: solid;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex: none;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
outline-style: solid;
|
|
23
|
+
position: relative;
|
|
24
|
+
background-color: var(--color-bg-surface-raised);
|
|
25
|
+
block-size: var(--size-checkbox-box);
|
|
26
|
+
border-color: var(--color-border-default);
|
|
27
|
+
border-radius: var(--radius-control-sm);
|
|
28
|
+
border-width: var(--border-width-default);
|
|
29
|
+
inline-size: var(--size-checkbox-box);
|
|
30
|
+
outline-width: var(--border-width-none);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__field {
|
|
34
|
+
appearance: none;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
inset-block-start: 0;
|
|
37
|
+
inset-inline-start: 0;
|
|
38
|
+
margin: 0;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
position: absolute;
|
|
41
|
+
block-size: var(--size-checkbox-box);
|
|
42
|
+
inline-size: var(--size-checkbox-box);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__indicator {
|
|
46
|
+
align-items: center;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
block-size: var(--icon-size-2xs);
|
|
51
|
+
inline-size: var(--icon-size-2xs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__text {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
min-inline-size: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__label {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
color: var(--color-fg-default);
|
|
63
|
+
font-family: var(--font-body-md-family);
|
|
64
|
+
font-size: var(--font-body-md-size);
|
|
65
|
+
font-weight: var(--font-body-md-weight);
|
|
66
|
+
line-height: var(--font-body-md-line-height);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__message {
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
display: flex;
|
|
72
|
+
overflow-wrap: anywhere;
|
|
73
|
+
font-family: var(--font-body-sm-family);
|
|
74
|
+
font-size: var(--font-body-sm-size);
|
|
75
|
+
font-weight: var(--font-body-sm-weight);
|
|
76
|
+
gap: var(--space-gap-xs);
|
|
77
|
+
line-height: var(--font-body-sm-line-height);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__description-text {
|
|
81
|
+
color: var(--color-fg-muted);
|
|
82
|
+
font-family: var(--font-body-sm-family);
|
|
83
|
+
font-size: var(--font-body-sm-size);
|
|
84
|
+
font-weight: var(--font-body-sm-weight);
|
|
85
|
+
line-height: var(--font-body-sm-line-height);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__box:hover:where(:not(:has(.dds-checkbox__field:disabled))) {
|
|
89
|
+
box-shadow: var(--elevation-ring-hover);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where([data-dds-context="marketing"]) .dds-checkbox:has(.dds-checkbox__field:focus-visible) .dds-checkbox__box {
|
|
93
|
+
outline-color: var(--color-border-focus);
|
|
94
|
+
outline-width: var(--border-width-focus);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where([data-dds-context="marketing"]) .dds-checkbox:has(.dds-checkbox__field:disabled:not(:where(:disabled *))) {
|
|
98
|
+
opacity: var(--opacity-disabled);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-status="error"] .dds-checkbox__message {
|
|
102
|
+
color: var(--color-fg-danger);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-status="success"] .dds-checkbox__message {
|
|
106
|
+
color: var(--color-fg-success);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-status="warning"] .dds-checkbox__message {
|
|
110
|
+
color: var(--color-fg-warning);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="accent"] .dds-checkbox__indicator {
|
|
114
|
+
color: var(--color-fg-on-brand);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="standard"] .dds-checkbox__indicator {
|
|
118
|
+
color: var(--color-fg-on-strong);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-checked="unchecked"][data-status="error"] .dds-checkbox__box {
|
|
122
|
+
border-color: var(--color-border-danger);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-checked="unchecked"][data-status="success"] .dds-checkbox__box {
|
|
126
|
+
border-color: var(--color-border-success);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-checked="unchecked"][data-status="warning"] .dds-checkbox__box {
|
|
130
|
+
border-color: var(--color-border-warning);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="accent"][data-checked="checked"] .dds-checkbox__box {
|
|
134
|
+
background-color: var(--color-bg-brand);
|
|
135
|
+
border-color: var(--color-bg-brand);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="accent"][data-checked="indeterminate"] .dds-checkbox__box {
|
|
139
|
+
background-color: var(--color-bg-brand);
|
|
140
|
+
border-color: var(--color-bg-brand);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="standard"][data-checked="checked"] .dds-checkbox__box {
|
|
144
|
+
background-color: var(--color-bg-strong);
|
|
145
|
+
border-color: var(--color-bg-strong);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="standard"][data-checked="indeterminate"] .dds-checkbox__box {
|
|
149
|
+
background-color: var(--color-bg-strong);
|
|
150
|
+
border-color: var(--color-bg-strong);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where([data-dds-context="marketing"]) .dds-checkbox .dds-checkbox__field:disabled {
|
|
154
|
+
cursor: not-allowed;
|
|
155
|
+
}
|
|
156
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './Checkbox.css';
|
|
2
|
+
import './checkbox-impl.css';
|
|
3
|
+
import { type CheckboxProps } from './Checkbox.types.js';
|
|
4
|
+
export type { CheckboxProps };
|
|
5
|
+
/**
|
|
6
|
+
* A real `<input type="checkbox">`, invisible, with the box the user sees drawn as
|
|
7
|
+
* its sibling.
|
|
8
|
+
*
|
|
9
|
+
* The tick lives inside `box`, which is a `<span>`, and the input covers the box rather
|
|
10
|
+
* than containing anything. So every part here is a real element the generator can name,
|
|
11
|
+
* *and* the control is native: it submits with a form, it takes the keyboard for free,
|
|
12
|
+
* and it carries the mixed state properly.
|
|
13
|
+
*
|
|
14
|
+
* That is why nothing below writes `role` or `aria-checked` by hand. The element is
|
|
15
|
+
* already a checkbox and already announces its state.
|
|
16
|
+
*
|
|
17
|
+
* It carries its own status and its own description. A lone consent is the case with
|
|
18
|
+
* nothing above it to hold either, and one that cannot show its own error is a form the
|
|
19
|
+
* reader cannot be told they failed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Checkbox({ tone, checked, status, label, showLabel, description, statusMessage, id, onChange, ...rest }: CheckboxProps): import("react").JSX.Element;
|