@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,63 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from 'react';
|
|
4
|
+
import { ChevronDownRegularIcon } from '@deriv-com/quill-icons-web';
|
|
5
|
+
import { Icon } from '../icon/Icon.js';
|
|
6
|
+
import './AccordionItem.css';
|
|
7
|
+
import './accordion-item-impl.css';
|
|
8
|
+
import { accordionItemDefaults, accordionItemParts, } from './AccordionItem.types.js';
|
|
9
|
+
/**
|
|
10
|
+
* One row: a heading that stays, and the detail under it that does not.
|
|
11
|
+
*
|
|
12
|
+
* It works alone and it works in a set, and the difference is only who holds the
|
|
13
|
+
* answer. Alone, the row keeps its own — `expanded` is read once as the state it
|
|
14
|
+
* opens in, and every press after that is its own business. Inside an Accordion
|
|
15
|
+
* the set injects `expanded` on every render, so the row stops deciding and
|
|
16
|
+
* starts reporting: a row cannot see its siblings, which is exactly the fact that
|
|
17
|
+
* makes one-at-a-time impossible to arrange from here.
|
|
18
|
+
*
|
|
19
|
+
* `useState` seeded from the prop rather than derived from it. A row that read
|
|
20
|
+
* the prop every render would be uncontrolled and unable to move; one that
|
|
21
|
+
* ignored it could not be opened by the set. Holding both and preferring the
|
|
22
|
+
* injected value is what lets the same component be either — and it is why
|
|
23
|
+
* `expanded` declares no default: absent has to stay distinguishable from false,
|
|
24
|
+
* because absent is the only way a row knows nobody is controlling it.
|
|
25
|
+
*
|
|
26
|
+
* The heading is a `<div role="heading">` with the level as a number, not an
|
|
27
|
+
* `<h3>`. The level is a prop, and an element cannot be picked at runtime without
|
|
28
|
+
* six branches saying the same thing — the role and `aria-level` say it once.
|
|
29
|
+
*
|
|
30
|
+
* `aria-expanded` sits on the button rather than the panel, because that is what
|
|
31
|
+
* the reader is about to press: the state belongs to the thing they act on, not
|
|
32
|
+
* to a region they cannot see until it opens.
|
|
33
|
+
*
|
|
34
|
+
* The panel is a named region, and the name is the heading that opened it. A
|
|
35
|
+
* `region` is a landmark, and an unnamed one is worse than none — it fills a
|
|
36
|
+
* screen reader's landmark list with anonymous entries nobody can choose between.
|
|
37
|
+
* Naming it is what makes it worth having: a reader who has found the question
|
|
38
|
+
* can jump straight to the answer. Product declines the role instead, which is
|
|
39
|
+
* also correct and is the other way to avoid the same fault; it can afford to
|
|
40
|
+
* because its rows open independently and a set of them would proliferate
|
|
41
|
+
* landmarks, where only one of these is ever open.
|
|
42
|
+
*
|
|
43
|
+
* The panel stays mounted when shut. Unmounting it would take its height with it,
|
|
44
|
+
* so there would be nothing to move between — and it would take the words out of
|
|
45
|
+
* the browser's own find-on-page, which is how a reader looks for an answer they
|
|
46
|
+
* half remember.
|
|
47
|
+
*/
|
|
48
|
+
export function AccordionItem({ expanded, onExpandedChange, title, headingLevel = accordionItemDefaults.headingLevel, children, ...rest }) {
|
|
49
|
+
// Seeded from the prop rather than derived from it, and `false` rather than a default the
|
|
50
|
+
// contract no longer declares: `expanded` is genuinely absent when nobody is controlling
|
|
51
|
+
// the row, and a default would have said it always holds a value.
|
|
52
|
+
const [held, setHeld] = useState(expanded ?? false);
|
|
53
|
+
// The set's answer wins while there is one. `undefined` is the row standing alone,
|
|
54
|
+
// which is a different thing from a set saying the row is shut.
|
|
55
|
+
const open = expanded ?? held;
|
|
56
|
+
const id = useId();
|
|
57
|
+
const panelId = `${id}-panel`;
|
|
58
|
+
const triggerId = `${id}-trigger`;
|
|
59
|
+
return (_jsxs("div", { className: accordionItemParts.root, "data-expanded": String(open), ...rest, children: [_jsx("div", { className: accordionItemParts.heading, role: "heading", "aria-level": Number(headingLevel), children: _jsxs("button", { type: "button", className: accordionItemParts.trigger, id: triggerId, "aria-expanded": open, "aria-controls": panelId, onClick: () => {
|
|
60
|
+
setHeld(!open);
|
|
61
|
+
onExpandedChange?.(!open);
|
|
62
|
+
}, children: [_jsx("span", { className: accordionItemParts.title, children: title }), _jsx(Icon, { size: "sm", children: _jsx(ChevronDownRegularIcon, { className: accordionItemParts.marker }) })] }) }), _jsx("div", { className: accordionItemParts.panel, id: panelId, role: "region", "aria-labelledby": triggerId, hidden: !open, children: _jsx("div", { className: accordionItemParts.content, children: children }) })] }));
|
|
63
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AccordionItemOwnProps {
|
|
3
|
+
/** Whether the panel is showing. Inside an Accordion this is injected on every render and the set owns it — a row cannot see its siblings, so it cannot know it is the one that should close. Left off, the row owns itself: absent is not the same as false here, and that difference is the whole of how one component is both. `false` is a set saying the row is shut; absent is nobody saying anything, and the row answers its own presses from there */
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
/** The page needs to know the row was pressed — to record which question was asked, or to hold the answer itself. Inside an Accordion the set chains its own handler after this one, so a page keeps its report whether or not it is also controlling the row */
|
|
6
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
7
|
+
/** Always — it is the half of the row that is always on screen. A question in the reader's own words, or the name of the thing the panel details. A string rather than a node, for the reason CardBody's title is one: a node prop cannot be given text in an examples row, and a row nobody can show is worse than a heading that cannot hold a link */
|
|
8
|
+
title: string;
|
|
9
|
+
/**
|
|
10
|
+
* `2` — The rows are the page's own sections. Set on the Accordion rather than here, which pushes it down
|
|
11
|
+
* `3` — The default, and where an accordion usually sits — under a section heading of its own
|
|
12
|
+
* `4` — The set is inside a subsection that already carries a heading
|
|
13
|
+
*/
|
|
14
|
+
headingLevel?: '2' | '3' | '4';
|
|
15
|
+
/** Allowed: any content */
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export type AccordionItemProps = AccordionItemOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'expanded' | 'onExpandedChange' | 'title' | 'headingLevel'>;
|
|
19
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
20
|
+
export declare const accordionItemParts: {
|
|
21
|
+
readonly root: "dds-accordionitem";
|
|
22
|
+
readonly heading: "dds-accordionitem__heading";
|
|
23
|
+
readonly trigger: "dds-accordionitem__trigger";
|
|
24
|
+
readonly title: "dds-accordionitem__title";
|
|
25
|
+
readonly marker: "dds-accordionitem__marker";
|
|
26
|
+
readonly panel: "dds-accordionitem__panel";
|
|
27
|
+
readonly content: "dds-accordionitem__content";
|
|
28
|
+
};
|
|
29
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
30
|
+
export declare const accordionItemDefaults: {
|
|
31
|
+
readonly headingLevel: "3";
|
|
32
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// GENERATED from accordion-item.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const accordionItemParts = {
|
|
4
|
+
root: 'dds-accordionitem',
|
|
5
|
+
heading: 'dds-accordionitem__heading',
|
|
6
|
+
trigger: 'dds-accordionitem__trigger',
|
|
7
|
+
title: 'dds-accordionitem__title',
|
|
8
|
+
marker: 'dds-accordionitem__marker',
|
|
9
|
+
panel: 'dds-accordionitem__panel',
|
|
10
|
+
content: 'dds-accordionitem__content',
|
|
11
|
+
};
|
|
12
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
13
|
+
export const accordionItemDefaults = { headingLevel: '3' };
|
|
@@ -0,0 +1,107 @@
|
|
|
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 override below still ties or beats exactly what it did
|
|
6
|
+
* before — several here are written a class deeper than they look in order to
|
|
7
|
+
* match generated CSS, and a scope that carried weight would break all of them.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* Implementation CSS that the contract's staticCss cannot express. */
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* The separator is between rows, so the first row has none.
|
|
14
|
+
*
|
|
15
|
+
* The rule is declared on every row — a border width binds all four sides at once and only the
|
|
16
|
+
* block-start edge is styled to draw — which makes the first row the exception rather than every
|
|
17
|
+
* other row the rule. Left in, it would draw a line across the top of a set that is a list rather
|
|
18
|
+
* than a box, and the set draws none under the last row for the same reason.
|
|
19
|
+
*/
|
|
20
|
+
:where([data-dds-context="marketing"]) .dds-accordionitem:first-child {
|
|
21
|
+
border-block-start-style: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* The words take the room the mark does not.
|
|
26
|
+
*
|
|
27
|
+
* The trigger is a flex row of two things and only the title may wrap. Without a basis of its
|
|
28
|
+
* own a flex item will not shrink below its content, so a long question pushed the chevron off
|
|
29
|
+
* the end of the row instead of wrapping under itself.
|
|
30
|
+
*/
|
|
31
|
+
:where([data-dds-context="marketing"]) .dds-accordionitem__title {
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-inline-size: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* The row opens and shuts on its own height.
|
|
38
|
+
*
|
|
39
|
+
* A height is the only thing here worth animating. A fade tells a reader the panel arrived; the
|
|
40
|
+
* rows below it still jump to their new place in one frame, which is the movement they would
|
|
41
|
+
* actually notice — a set is a column, and opening one row moves every row under it.
|
|
42
|
+
*
|
|
43
|
+
* The panel is a grid of a single track and the track is what moves. `0fr` is a track with no
|
|
44
|
+
* space in it and `1fr` is a track with all of it, which on a grid of automatic height resolves
|
|
45
|
+
* to exactly the height of what is inside. That is the point: a number here would be a guess at
|
|
46
|
+
* how long an answer is, and the one thing a panel's height cannot be is known.
|
|
47
|
+
*
|
|
48
|
+
* Both boxes clip, and they are doing different jobs. The one on the content is what makes the
|
|
49
|
+
* collapse possible at all: a grid item's automatic minimum size down the block axis is its
|
|
50
|
+
* min-content height, so `0fr` alone is a track told to take no space and stopping at however
|
|
51
|
+
* tall the words are. An item that is a scroll container has an automatic minimum of zero, and
|
|
52
|
+
* `overflow: hidden` is what makes it one. The one on the panel clips the stub the collapse
|
|
53
|
+
* leaves behind, because the content's own inset renders outside a box of no height.
|
|
54
|
+
*
|
|
55
|
+
* `display` transitions too, and that is what makes the shut state real rather than merely
|
|
56
|
+
* short. This is the part the first version got wrong: it forced `display: grid` back on to keep
|
|
57
|
+
* the panel animatable and hid it with `visibility` instead, and `visibility: hidden` does not
|
|
58
|
+
* take a box out of the layout. A grid of no height is still a box — and the track is not even
|
|
59
|
+
* no height, because a flex factor under one is treated as one when the container's own height
|
|
60
|
+
* is indefinite, so the track keeps the item's base size and the content's bottom inset showed
|
|
61
|
+
* as a band of empty space under every shut row.
|
|
62
|
+
*
|
|
63
|
+
* So `hidden` stays on the panel and keeps its `display: none`, which is also what takes the
|
|
64
|
+
* contents out of the tab order and out of a screen reader. `allow-discrete` defers the flip to
|
|
65
|
+
* the end of the collapse rather than applying it in the first frame and cutting the animation
|
|
66
|
+
* off before it starts. Opening runs the other way — display flips first and the track then has
|
|
67
|
+
* somewhere to travel from, which is what `@starting-style` supplies: an element arriving from
|
|
68
|
+
* `display: none` has no previous style to interpolate out of, so without it the first frame is
|
|
69
|
+
* already the last one.
|
|
70
|
+
*
|
|
71
|
+
* A transition rather than a keyframe, because this is reversible and has to be interruptible: a
|
|
72
|
+
* reader who shuts a row halfway through opening it should have it travel back from where it is.
|
|
73
|
+
* The duration and the curve are tokens the contract binds per side of the axis.
|
|
74
|
+
*/
|
|
75
|
+
:where([data-dds-context="marketing"]) .dds-accordionitem__panel {
|
|
76
|
+
grid-template-rows: 0fr;
|
|
77
|
+
transition-property: grid-template-rows, display;
|
|
78
|
+
transition-behavior: allow-discrete;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where([data-dds-context="marketing"]) .dds-accordionitem[data-expanded='true'] .dds-accordionitem__panel {
|
|
82
|
+
grid-template-rows: 1fr;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@starting-style {
|
|
86
|
+
.dds-accordionitem[data-expanded='true'] .dds-accordionitem__panel {
|
|
87
|
+
grid-template-rows: 0fr;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/*
|
|
92
|
+
* The chevron points where the row is going.
|
|
93
|
+
*
|
|
94
|
+
* Turned rather than swapped: a swap replaces the mark between frames and there is nothing to
|
|
95
|
+
* watch, where the turn is itself the movement that says which way the fold went. A rotation is
|
|
96
|
+
* not a property the contract can bind, which is the whole reason it is written here — the
|
|
97
|
+
* duration and the curve above it are tokens.
|
|
98
|
+
*/
|
|
99
|
+
:where([data-dds-context="marketing"]) .dds-accordionitem[data-expanded='true'] .dds-accordionitem__marker {
|
|
100
|
+
rotate: 180deg;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
* Reduced motion is answered by the generated sheet, which sets `transition: none` on this row
|
|
105
|
+
* and everything in it. Nothing is needed here, and a second rule saying the same thing weaker
|
|
106
|
+
* would be one more place to keep in step.
|
|
107
|
+
*/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* GENERATED from badge.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-badge {
|
|
4
|
+
align-items: center;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
inline-size: fit-content;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
border-radius: var(--radius-pill);
|
|
10
|
+
font-family: var(--font-label-medium-sm-family);
|
|
11
|
+
font-size: var(--font-label-medium-sm-size);
|
|
12
|
+
font-weight: var(--font-label-medium-sm-weight);
|
|
13
|
+
gap: var(--space-gap-xs);
|
|
14
|
+
letter-spacing: var(--font-label-medium-sm-letter-spacing);
|
|
15
|
+
line-height: var(--font-label-medium-sm-line-height);
|
|
16
|
+
padding-block: var(--space-inset-2xs);
|
|
17
|
+
padding-inline: var(--space-inset-sm);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([data-dds-context="marketing"]) .dds-badge .dds-badge__icon {
|
|
21
|
+
align-items: center;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex: none;
|
|
24
|
+
block-size: var(--icon-size-xs);
|
|
25
|
+
inline-size: var(--icon-size-xs);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-dds-context="marketing"]) .dds-badge[data-variant="accent"] {
|
|
29
|
+
background-color: var(--color-bg-brand-subtle);
|
|
30
|
+
color: var(--color-fg-brand);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-badge[data-variant="neutral"] {
|
|
34
|
+
background-color: var(--color-bg-subtle);
|
|
35
|
+
color: var(--color-fg-default);
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import './Badge.css';
|
|
2
|
+
import './badge-impl.css';
|
|
3
|
+
import { type BadgeProps } from './Badge.types.js';
|
|
4
|
+
export type { BadgeProps };
|
|
5
|
+
/**
|
|
6
|
+
* A pill with a fill, one or two words, and a glyph if the page has one.
|
|
7
|
+
*
|
|
8
|
+
* The label is a prop rather than children, for the reason CardBody's title is
|
|
9
|
+
* one: a node prop cannot be given text in an examples row, and a badge nobody
|
|
10
|
+
* can show is worse than one that cannot hold a link.
|
|
11
|
+
*
|
|
12
|
+
* The glyph is drawn at the badge's own step rather than the page's. Icon
|
|
13
|
+
* unwraps one that arrives already sized, so a row of badges cannot quietly
|
|
14
|
+
* disagree about how big their marks are — which is the whole reason a slot
|
|
15
|
+
* hands its glyph to the component rather than the other way round.
|
|
16
|
+
*
|
|
17
|
+
* The words are not wrapped. A flex row treats bare text as an item, so the gap
|
|
18
|
+
* falls between the glyph and the label without an element in between to hang it
|
|
19
|
+
* on — and a span that carried nothing would be a part the stylesheet never names.
|
|
20
|
+
*
|
|
21
|
+
* The glyph slot is tested against `null` as well as `undefined`. CardBody's rule
|
|
22
|
+
* is that a node is not blank-able the way a string is, so `undefined` is enough —
|
|
23
|
+
* and that is right about blankness and wrong about absence. `null` is how React
|
|
24
|
+
* writes "no node here", and `icon={hasGlyph ? <GlobeRegularIcon /> : null}` is the
|
|
25
|
+
* ordinary shape of a conditional glyph. Read as present it renders an empty
|
|
26
|
+
* sixteen-pixel box and a four-pixel gap in a pill twenty-four tall, which is a
|
|
27
|
+
* visible dent with nothing in it — cheap in a card body, obvious in a mark.
|
|
28
|
+
*
|
|
29
|
+
* The leading inset closes to eight around the glyph, which the stylesheet beside the generated
|
|
30
|
+
* one does rather than the contract: what decides it is whether a glyph was passed, and a
|
|
31
|
+
* slot is not a styling axis, so there is no value for a binding to switch on.
|
|
32
|
+
*
|
|
33
|
+
* No role and no name. Its words are read in the order they sit on the page,
|
|
34
|
+
* and the glyph is decorative: what it says is already in the label beside it,
|
|
35
|
+
* so Icon marks it presentational and a screen reader passes over it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function Badge({ variant, label, icon, ...rest }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './Badge.css';
|
|
3
|
+
import './badge-impl.css';
|
|
4
|
+
import { Icon } from '../icon/Icon.js';
|
|
5
|
+
import { badgeDefaults, badgeParts } from './Badge.types.js';
|
|
6
|
+
/**
|
|
7
|
+
* A pill with a fill, one or two words, and a glyph if the page has one.
|
|
8
|
+
*
|
|
9
|
+
* The label is a prop rather than children, for the reason CardBody's title is
|
|
10
|
+
* one: a node prop cannot be given text in an examples row, and a badge nobody
|
|
11
|
+
* can show is worse than one that cannot hold a link.
|
|
12
|
+
*
|
|
13
|
+
* The glyph is drawn at the badge's own step rather than the page's. Icon
|
|
14
|
+
* unwraps one that arrives already sized, so a row of badges cannot quietly
|
|
15
|
+
* disagree about how big their marks are — which is the whole reason a slot
|
|
16
|
+
* hands its glyph to the component rather than the other way round.
|
|
17
|
+
*
|
|
18
|
+
* The words are not wrapped. A flex row treats bare text as an item, so the gap
|
|
19
|
+
* falls between the glyph and the label without an element in between to hang it
|
|
20
|
+
* on — and a span that carried nothing would be a part the stylesheet never names.
|
|
21
|
+
*
|
|
22
|
+
* The glyph slot is tested against `null` as well as `undefined`. CardBody's rule
|
|
23
|
+
* is that a node is not blank-able the way a string is, so `undefined` is enough —
|
|
24
|
+
* and that is right about blankness and wrong about absence. `null` is how React
|
|
25
|
+
* writes "no node here", and `icon={hasGlyph ? <GlobeRegularIcon /> : null}` is the
|
|
26
|
+
* ordinary shape of a conditional glyph. Read as present it renders an empty
|
|
27
|
+
* sixteen-pixel box and a four-pixel gap in a pill twenty-four tall, which is a
|
|
28
|
+
* visible dent with nothing in it — cheap in a card body, obvious in a mark.
|
|
29
|
+
*
|
|
30
|
+
* The leading inset closes to eight around the glyph, which the stylesheet beside the generated
|
|
31
|
+
* one does rather than the contract: what decides it is whether a glyph was passed, and a
|
|
32
|
+
* slot is not a styling axis, so there is no value for a binding to switch on.
|
|
33
|
+
*
|
|
34
|
+
* No role and no name. Its words are read in the order they sit on the page,
|
|
35
|
+
* and the glyph is decorative: what it says is already in the label beside it,
|
|
36
|
+
* so Icon marks it presentational and a screen reader passes over it.
|
|
37
|
+
*/
|
|
38
|
+
export function Badge({ variant = badgeDefaults.variant, label, icon, ...rest }) {
|
|
39
|
+
return (_jsxs("span", { className: badgeParts.root, "data-variant": variant, ...rest, children: [icon === undefined || icon === null ? null : (_jsx("span", { className: badgeParts.icon, children: _jsx(Icon, { size: "xs", children: icon }) })), label] }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface BadgeOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `accent` — The default, and the one a marketing page nearly always wants. A brand-coloured mark rather than a coral block: the tint carries the colour and the ink carries the words, which is what lets a badge sit on a card without competing with the card
|
|
5
|
+
* `neutral` — The badge is naming a kind rather than making a claim — a category on an article, a market type on a card. It marks without asking, which is what lets a page use several without the set becoming loud
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'accent' | 'neutral';
|
|
8
|
+
/** Always — it is the whole component. One or two words: 'New', 'Most popular', 'Save 20%'. A string rather than a node, for the reason CardBody's title is one: a node prop cannot be given text in an examples row, and a badge nobody can show is worse than one that cannot hold a link */
|
|
9
|
+
label: string;
|
|
10
|
+
/** A glyph that says what the badge is about faster than its word does — a globe on a badge reading 'For platforms', a spark on one reading 'New'. Pass the glyph; the badge draws it at its own step. Alongside the label and never instead of it.
|
|
11
|
+
|
|
12
|
+
The regular weight, always: `GlobeRegularIcon` rather than `GlobeSolidIcon` or `GlobeLightIcon`. Icon has no weight prop and cannot have one — a Quill glyph's weight is chosen when it is imported — so this is the call site's to get right and there is nothing that will catch it */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export type BadgeProps = BadgeOwnProps & Omit<HTMLAttributes<HTMLSpanElement>, 'className' | 'variant' | 'label' | 'icon'>;
|
|
16
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
17
|
+
export declare const badgeParts: {
|
|
18
|
+
readonly root: "dds-badge";
|
|
19
|
+
readonly icon: "dds-badge__icon";
|
|
20
|
+
};
|
|
21
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
22
|
+
export declare const badgeDefaults: {
|
|
23
|
+
readonly variant: "accent";
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED from badge.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const badgeParts = {
|
|
4
|
+
root: 'dds-badge',
|
|
5
|
+
icon: 'dds-badge__icon',
|
|
6
|
+
};
|
|
7
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
8
|
+
export const badgeDefaults = { variant: 'accent' };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines the rule without contributing
|
|
5
|
+
* specificity, so what it overrides it overrides on its own terms: one class for
|
|
6
|
+
* `.dds-badge` and one for the `:has()` argument, against the generated rule's one.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* The leading inset closes up around a glyph.
|
|
11
|
+
*
|
|
12
|
+
* The root is inset twelve either side, which is the measure for words: at `radius.pill`
|
|
13
|
+
* the corner is half a twenty-four-pixel height, so the ends curve through twelve and a
|
|
14
|
+
* shorter inset would start the first letter inside the arc.
|
|
15
|
+
*
|
|
16
|
+
* A glyph is not a letter, and it does not need the same room. It arrives as a sixteen-pixel
|
|
17
|
+
* box with its mark drawn inside it, so it carries a margin a letter does not and twelve in
|
|
18
|
+
* front of it reads as more air than the label's own end has. Eight is the step below, and it
|
|
19
|
+
* is the one the badge was inset by before words and glyph were told apart — tighter than the
|
|
20
|
+
* label without collapsing onto the curve, which four does: four is the block inset, and an
|
|
21
|
+
* inline inset that matches it puts the mark hard against the arc at the one place the pill is
|
|
22
|
+
* narrowest.
|
|
23
|
+
*
|
|
24
|
+
* Here rather than in the contract because what decides it is whether the page passed an
|
|
25
|
+
* icon, and an icon is a slot rather than a styling axis: there is no value for a binding's
|
|
26
|
+
* `when` to name. `:has()` asks the question the DOM can answer — this badge, containing the
|
|
27
|
+
* part that is only rendered when there is a glyph — which is the same move BottomSheet's
|
|
28
|
+
* header makes about its leading end.
|
|
29
|
+
*/
|
|
30
|
+
:where([data-dds-context="marketing"]) .dds-badge:has(.dds-badge__icon) {
|
|
31
|
+
padding-inline-start: var(--space-inset-xs);
|
|
32
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* GENERATED from bottomsheet.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet {
|
|
4
|
+
transition-property: opacity, visibility;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
display: flex;
|
|
7
|
+
inset: 0;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
position: fixed;
|
|
10
|
+
transition-duration: var(--motion-duration-slow);
|
|
11
|
+
transition-timing-function: var(--motion-easing-enter);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__scrim {
|
|
15
|
+
inset: 0;
|
|
16
|
+
position: absolute;
|
|
17
|
+
background-color: var(--color-bg-overlay);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__frame {
|
|
21
|
+
transition-property: translate;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
inline-size: 100%;
|
|
26
|
+
max-block-size: 100%;
|
|
27
|
+
min-block-size: 0;
|
|
28
|
+
position: relative;
|
|
29
|
+
max-inline-size: var(--size-sheet-max);
|
|
30
|
+
transition-duration: var(--motion-duration-slow);
|
|
31
|
+
transition-timing-function: var(--motion-easing-enter);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__surface {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
inline-size: 100%;
|
|
39
|
+
max-block-size: 100%;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
position: relative;
|
|
42
|
+
background-color: var(--color-bg-surface-modal);
|
|
43
|
+
border-start-end-radius: var(--radius-surface);
|
|
44
|
+
border-start-start-radius: var(--radius-surface);
|
|
45
|
+
box-shadow: var(--elevation-surface-modal);
|
|
46
|
+
color: var(--color-fg-default);
|
|
47
|
+
font-family: var(--font-body-md-family);
|
|
48
|
+
font-size: var(--font-body-md-size);
|
|
49
|
+
font-weight: var(--font-body-md-weight);
|
|
50
|
+
line-height: var(--font-body-md-line-height);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__handle {
|
|
54
|
+
align-self: center;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
touch-action: none;
|
|
57
|
+
background-color: var(--color-bg-track);
|
|
58
|
+
block-size: var(--size-sheet-handle-height);
|
|
59
|
+
border-radius: var(--radius-pill);
|
|
60
|
+
inline-size: var(--size-sheet-handle-width);
|
|
61
|
+
margin-block-start: var(--space-inset-sm);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__header {
|
|
65
|
+
align-items: center;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
touch-action: none;
|
|
70
|
+
padding-block-start: var(--space-inset-md);
|
|
71
|
+
padding-inline: var(--space-inset-md);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__leading {
|
|
75
|
+
align-items: center;
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__heading {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex: auto;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
min-inline-size: 0;
|
|
84
|
+
gap: var(--space-gap-xs);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__title {
|
|
88
|
+
inline-size: 100%;
|
|
89
|
+
margin: 0;
|
|
90
|
+
min-inline-size: 0;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-align: start;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
color: var(--color-fg-default);
|
|
96
|
+
font-family: var(--font-title-family);
|
|
97
|
+
font-size: var(--font-title-size);
|
|
98
|
+
font-weight: var(--font-title-weight);
|
|
99
|
+
letter-spacing: var(--font-title-letter-spacing);
|
|
100
|
+
line-height: var(--font-title-line-height);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__trailing {
|
|
104
|
+
align-items: center;
|
|
105
|
+
display: flex;
|
|
106
|
+
gap: var(--space-gap-xs);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__description {
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
margin: 0;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-align: start;
|
|
114
|
+
text-overflow: ellipsis;
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
font-family: var(--font-body-sm-family);
|
|
117
|
+
font-size: var(--font-body-sm-size);
|
|
118
|
+
font-weight: var(--font-body-sm-weight);
|
|
119
|
+
line-height: var(--font-body-sm-line-height);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet .dds-bottomsheet__body {
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
min-block-size: 0;
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
overscroll-behavior: contain;
|
|
127
|
+
padding-block-end: var(--space-inset-md);
|
|
128
|
+
padding-block-start: var(--space-inset-xs);
|
|
129
|
+
padding-inline: var(--space-inset-md);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-open="false"] {
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
visibility: hidden;
|
|
135
|
+
opacity: var(--opacity-hidden);
|
|
136
|
+
transition-duration: var(--motion-duration-normal);
|
|
137
|
+
transition-timing-function: var(--motion-easing-exit);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-open="true"] {
|
|
141
|
+
pointer-events: auto;
|
|
142
|
+
visibility: visible;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-height="full"] .dds-bottomsheet__frame {
|
|
146
|
+
block-size: 100%;
|
|
147
|
+
max-inline-size: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-height="tall"] .dds-bottomsheet__frame {
|
|
151
|
+
block-size: 100%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-height="full"] .dds-bottomsheet__surface {
|
|
155
|
+
block-size: 100%;
|
|
156
|
+
border-start-end-radius: var(--radius-none);
|
|
157
|
+
border-start-start-radius: var(--radius-none);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-height="tall"] .dds-bottomsheet__surface {
|
|
161
|
+
block-size: 100%;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-height="tall"] {
|
|
165
|
+
padding-block-start: var(--size-sheet-peek);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet[data-open="false"] .dds-bottomsheet__frame {
|
|
169
|
+
transition-duration: var(--motion-duration-normal);
|
|
170
|
+
transition-timing-function: var(--motion-easing-exit);
|
|
171
|
+
translate: var(--motion-translate-enter);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@media (prefers-reduced-motion: reduce) {
|
|
175
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet,
|
|
176
|
+
:where([data-dds-context="marketing"]) .dds-bottomsheet * { transition: none !important; }
|
|
177
|
+
}
|
|
178
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './BottomSheet.css';
|
|
2
|
+
import './bottom-sheet-impl.css';
|
|
3
|
+
import { type BottomSheetProps } from './BottomSheet.types.js';
|
|
4
|
+
export type { BottomSheetProps };
|
|
5
|
+
/**
|
|
6
|
+
* A panel that rises from the bottom edge to hold one focused task.
|
|
7
|
+
*
|
|
8
|
+
* Mounted whether it is open or not, which is the decision everything else here follows from.
|
|
9
|
+
* A sheet that mounts on opening has no previous state to animate out of, so the reveal would
|
|
10
|
+
* be a jump — and the contract's `open` axis is what the stylesheet varies, which it cannot do
|
|
11
|
+
* to an element that is not there. What keeps a shut sheet out of the reading order and out of
|
|
12
|
+
* the tab order is `visibility: hidden` in the generated CSS rather than anything written here:
|
|
13
|
+
* an `aria-hidden` or an `inert` set from this file would say the same thing twice, and the two
|
|
14
|
+
* would disagree the first time one of them changed.
|
|
15
|
+
*
|
|
16
|
+
* It owns none of its own openness. Every way out — the close button, the scrim, Escape, the
|
|
17
|
+
* drag — reports through `onOpenChange` and changes nothing, so a page that does not answer that
|
|
18
|
+
* callback has a sheet that cannot be closed. That is the same shape every other controlled
|
|
19
|
+
* component in this package takes, and the reason is the same: two things holding one fact
|
|
20
|
+
* disagree eventually, and the consumer is the one that has to win.
|
|
21
|
+
*/
|
|
22
|
+
export declare function BottomSheet(props: BottomSheetProps): import("react").JSX.Element;
|