@deriv-com/dds-marketing 0.1.0 → 0.2.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 +193 -0
- package/.llm/components/accordionitem.md +236 -0
- package/.llm/components/aspectratio.md +212 -0
- package/.llm/components/badge.md +231 -0
- package/.llm/components/bottomsheet.md +404 -0
- package/.llm/components/breadcrumb.md +197 -0
- package/.llm/components/breadcrumbitem.md +178 -0
- package/.llm/components/button.md +271 -0
- package/.llm/components/buttonicon.md +313 -0
- package/.llm/components/card.md +313 -0
- package/.llm/components/cardbody.md +409 -0
- package/.llm/components/cardbutton.md +259 -0
- package/.llm/components/checkbox.md +285 -0
- package/.llm/components/divider.md +230 -0
- package/.llm/components/dropdownmenu.md +453 -0
- package/.llm/components/filterchip.md +314 -0
- package/.llm/components/footer.md +408 -0
- package/.llm/components/footergroup.md +241 -0
- package/.llm/components/grid.md +659 -0
- package/.llm/components/icon.md +194 -0
- package/.llm/components/link.md +354 -0
- package/.llm/components/menuitem.md +218 -0
- package/.llm/components/navbar.md +458 -0
- package/.llm/components/navbaritem.md +238 -0
- package/.llm/components/navbarmenu.md +319 -0
- package/.llm/components/navbarmenugroup.md +184 -0
- package/.llm/components/navbarpanel.md +255 -0
- package/.llm/components/navbarswitcher.md +343 -0
- package/.llm/components/navbarswitcheroption.md +156 -0
- package/.llm/components/option.md +268 -0
- package/.llm/components/pagination.md +361 -0
- package/.llm/components/removablechip.md +247 -0
- package/.llm/components/row.md +381 -0
- package/.llm/components/scroller.md +470 -0
- package/.llm/components/searchinput.md +279 -0
- package/.llm/components/segmentedcontrol.md +358 -0
- package/.llm/components/segmentedcontrolitem.md +272 -0
- package/.llm/components/select.md +509 -0
- package/.llm/components/selectchip.md +334 -0
- package/.llm/components/spinner.md +222 -0
- package/.llm/components/stack.md +334 -0
- package/.llm/components/statusdot.md +205 -0
- package/.llm/components/subdomainnavbar.md +327 -0
- package/.llm/components/tab.md +291 -0
- package/.llm/components/table.md +660 -0
- package/.llm/components/tablebody.md +258 -0
- package/.llm/components/tablecell.md +248 -0
- package/.llm/components/tablehead.md +248 -0
- package/.llm/components/tableheadercell.md +298 -0
- package/.llm/components/tablerow.md +285 -0
- package/.llm/components/tablist.md +210 -0
- package/.llm/components/textarea.md +362 -0
- package/.llm/components/textinput.md +467 -0
- package/.llm/components/tooltip.md +267 -0
- package/.llm/components/typography.md +245 -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 +48 -0
- package/.llm/digest/buttonicon.md +61 -0
- package/.llm/digest/card.md +50 -0
- package/.llm/digest/cardbody.md +68 -0
- package/.llm/digest/cardbutton.md +49 -0
- package/.llm/digest/checkbox.md +63 -0
- package/.llm/digest/divider.md +52 -0
- package/.llm/digest/dropdownmenu.md +67 -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/link.md +59 -0
- package/.llm/digest/menuitem.md +46 -0
- package/.llm/digest/navbar.md +60 -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/pagination.md +71 -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 +68 -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/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 +86 -0
- package/.llm/rules.md +122 -0
- package/.llm/tokens.md +341 -0
- package/AGENTS.md +164 -0
- package/LICENSE +21 -0
- package/README.md +63 -15
- 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 +98 -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 +141 -0
- package/dist/components/core/button/Button.d.ts +25 -0
- package/dist/components/core/button/Button.js +28 -0
- package/dist/components/core/button/Button.types.d.ts +40 -0
- package/dist/components/core/button/Button.types.js +9 -0
- package/dist/components/core/button/button-impl.css +46 -0
- package/dist/components/core/button-icon/ButtonIcon.css +135 -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 +65 -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 +33 -0
- package/dist/components/core/card/Card.types.js +7 -0
- package/dist/components/core/card-body/CardBody.css +139 -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 +61 -0
- package/dist/components/core/card-body/CardBody.types.js +15 -0
- package/dist/components/core/card-body/card-body-impl.css +87 -0
- package/dist/components/core/card-button/CardButton.css +73 -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 +24 -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 +149 -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 +146 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +22 -0
- package/dist/components/core/dropdown-menu/DropdownMenu.js +309 -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 +149 -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 +90 -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 +135 -0
- package/dist/components/core/navbar/Navbar.d.ts +36 -0
- package/dist/components/core/navbar/Navbar.js +371 -0
- package/dist/components/core/navbar/Navbar.types.d.ts +49 -0
- package/dist/components/core/navbar/Navbar.types.js +17 -0
- package/dist/components/core/navbar/navbar-impl.css +590 -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 +128 -0
- package/dist/components/core/navbar-menu/NavbarMenu.d.ts +5 -0
- package/dist/components/core/navbar-menu/NavbarMenu.js +186 -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 +117 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +20 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.js +90 -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 +237 -0
- package/dist/components/core/pagination/Pagination.d.ts +30 -0
- package/dist/components/core/pagination/Pagination.js +406 -0
- package/dist/components/core/pagination/Pagination.types.d.ts +59 -0
- package/dist/components/core/pagination/Pagination.types.js +14 -0
- package/dist/components/core/pagination/pagination-impl.css +17 -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 +400 -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 +155 -0
- package/dist/components/core/select-chip/SelectChip.d.ts +20 -0
- package/dist/components/core/select-chip/SelectChip.js +273 -0
- package/dist/components/core/select-chip/SelectChip.types.d.ts +56 -0
- package/dist/components/core/select-chip/SelectChip.types.js +14 -0
- package/dist/components/core/select-chip/select-chip-impl.css +38 -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 +75 -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 +114 -1
- package/dist/components/index.js +115 -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/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 +289 -241
- package/package.json +18 -4
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cloneElement, isValidElement } from "react";
|
|
4
|
+
import "./SegmentedControlItem.css";
|
|
5
|
+
import "./segmented-control-item-impl.css";
|
|
6
|
+
import { segmentedControlItemDefaults, segmentedControlItemParts, } from "./SegmentedControlItem.types.js";
|
|
7
|
+
/**
|
|
8
|
+
* One segment in a row, as a radio.
|
|
9
|
+
*
|
|
10
|
+
* A `<button>` carrying `role="radio"` rather than an `<input type="radio">`, and the
|
|
11
|
+
* reason is the label: a real radio input cannot hold a glyph beside its text, so the
|
|
12
|
+
* mark and the words would have to live in a sibling `<label>` and the box the reader
|
|
13
|
+
* presses would stop being the box that paints. The role and `aria-checked` give a
|
|
14
|
+
* screen reader everything the input would have, and `SegmentedControl` supplies the
|
|
15
|
+
* rest of the pattern — one tab stop, and the arrow keys inside it.
|
|
16
|
+
*
|
|
17
|
+
* Two of the props are the row's rather than the consumer's. `selected` is, because only
|
|
18
|
+
* one segment may be chosen and a segment cannot see its siblings; `size` is, because a
|
|
19
|
+
* row at mixed heights is not a row. Both are overwritten on every render of the group.
|
|
20
|
+
* `disabled` is the consumer's, and bars this one option while the rest still answer.
|
|
21
|
+
*
|
|
22
|
+
* It declares no height. The row fixes its own to the control ramp and stretches its
|
|
23
|
+
* segments inside it, so a segment is whatever the control is less the inset either
|
|
24
|
+
* side — which is what spares this package the second size ramp Product keeps in step
|
|
25
|
+
* with the first by hand.
|
|
26
|
+
*
|
|
27
|
+
* `disabled` is `aria-disabled` and a data attribute, never the native attribute. A
|
|
28
|
+
* native `disabled` removes the button from the accessibility tree, so a reader would
|
|
29
|
+
* not be told the option is there and unavailable — they would never learn it exists,
|
|
30
|
+
* which is the one outcome this prop is for. Being non-native it has to be enforced
|
|
31
|
+
* here, so `onClick` is swallowed while it holds. The stylesheet reads `data-disabled`
|
|
32
|
+
* for the same reason: `:disabled` would never match, and a rule written against it is
|
|
33
|
+
* one the browser discards in silence.
|
|
34
|
+
*
|
|
35
|
+
* Both data attributes are written in either direction rather than omitted when false.
|
|
36
|
+
* A styling axis is read by attribute selectors both ways — the hover tint is bound on
|
|
37
|
+
* `selected: false` and `disabled: false` — and an attribute absent when false matches
|
|
38
|
+
* neither.
|
|
39
|
+
*
|
|
40
|
+
* The spread goes before the attributes this component decides rather than after, which
|
|
41
|
+
* is the opposite of Tab in this package. Those are attributes the component owns, so a
|
|
42
|
+
* consumer overriding one meant to; these *are* the component. A `data-selected` from
|
|
43
|
+
* outside would repaint the segment into a state its own prop contradicts, and an
|
|
44
|
+
* `aria-checked` from outside would tell the reader a different value is in force.
|
|
45
|
+
* `tabIndex` is deliberately left in the spread, because that one is the row's to set —
|
|
46
|
+
* it is how the roving tab stop arrives.
|
|
47
|
+
*
|
|
48
|
+
* `value` is destructured rather than left in the rest spread even though it is read
|
|
49
|
+
* here: on a `<button>` a `value` attribute means something else entirely, and the row
|
|
50
|
+
* reads this one off the element's props without it ever needing to reach the DOM.
|
|
51
|
+
*/
|
|
52
|
+
export function SegmentedControlItem({ selected = segmentedControlItemDefaults.selected, disabled = segmentedControlItemDefaults.disabled, size = segmentedControlItemDefaults.size, value, label, icon, onSelect, onClick, ...rest }) {
|
|
53
|
+
/*
|
|
54
|
+
The glyph, cloned rather than wrapped — the same shape ButtonIcon uses here, and for
|
|
55
|
+
the same reason. Every glyph in the icon package ships `width` and `height`
|
|
56
|
+
presentation attributes defaulting to 24, and the only thing that overrides a
|
|
57
|
+
presentation attribute is a CSS length on the element carrying it. A box around the
|
|
58
|
+
mark would keep its own measure while the mark kept the package's.
|
|
59
|
+
|
|
60
|
+
Not Marketing's own Icon, which Tab and Badge wrap their glyphs in: Icon draws from
|
|
61
|
+
`icon.size.*`, and that ramp has no step an md segment could ask for — it goes 16
|
|
62
|
+
then 20 where the control ramp goes 16, 18, 20 — so the mark would land a measure
|
|
63
|
+
away from the same glyph in the Button beside it.
|
|
64
|
+
|
|
65
|
+
`aria-hidden`, because the mark names nothing the label has not already named.
|
|
66
|
+
*/
|
|
67
|
+
const mark = icon === undefined || icon === null ? null : isValidElement(icon) ? (cloneElement(icon, {
|
|
68
|
+
className: [segmentedControlItemParts.icon, icon.props.className]
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
.join(" "),
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
})) : (
|
|
73
|
+
/*
|
|
74
|
+
Anything that is not a single element cannot be cloned, and the preview hands
|
|
75
|
+
every node slot a sample string. A box keeps the class on something, so the part
|
|
76
|
+
stays findable and the generated test still sees it.
|
|
77
|
+
*/
|
|
78
|
+
_jsx("span", { className: segmentedControlItemParts.icon, "aria-hidden": "true", children: icon }));
|
|
79
|
+
return (_jsxs("button", { ...rest,
|
|
80
|
+
/*
|
|
81
|
+
Never a submit. The element's own default is `submit`, so a segment inside a
|
|
82
|
+
signup form would post it — a navigation nobody asked for, and the one default
|
|
83
|
+
worth overriding.
|
|
84
|
+
*/
|
|
85
|
+
type: "button", role: "radio", className: segmentedControlItemParts.root, "data-selected": String(selected), "data-disabled": String(disabled), "data-size": size, "aria-checked": selected, "aria-disabled": disabled ? true : undefined,
|
|
86
|
+
/*
|
|
87
|
+
Both handlers, the consumer's first — the same chaining TabList does for its tabs.
|
|
88
|
+
A page's own `onClick` replacing this one wholesale would mean a segment that
|
|
89
|
+
logged its own press stopped telling the row it had been pressed, and the
|
|
90
|
+
selection silently stopped moving.
|
|
91
|
+
|
|
92
|
+
Swallowed entirely while barred, because `aria-disabled` is a word to a screen
|
|
93
|
+
reader and nothing at all to the browser.
|
|
94
|
+
*/
|
|
95
|
+
onClick: disabled
|
|
96
|
+
? undefined
|
|
97
|
+
: (event) => {
|
|
98
|
+
onClick?.(event);
|
|
99
|
+
onSelect?.(value);
|
|
100
|
+
}, children: [mark, _jsxs("span", { className: segmentedControlItemParts.label, children: [label, _jsx("span", { className: segmentedControlItemParts.sizer, "aria-hidden": "true", children: label })] })] }));
|
|
101
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface SegmentedControlItemOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `sm` — A control seated in something already dense — a filter row, a picker in a navigation bar. Desktop only: below what a finger reliably hits
|
|
5
|
+
* `md` — The default. Sized to a medium control, so the row lines up with the fields and buttons next to it
|
|
6
|
+
* `lg` — A choice in a hero or a conversion band, where the control is the point of the section rather than an adjustment within it
|
|
7
|
+
*/
|
|
8
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
/** Always. It names this segment for a group that is told which value is in force from outside, and it is what reaches the consumer's onChange when the segment is pressed */
|
|
10
|
+
value: string;
|
|
11
|
+
/** Always — it is the segment's accessible name as well as its words, and a radio with no name is announced as a control with nothing in it. One or two words: a row is scanned across, and the segment that needs a phrase is a choice that wanted a list */
|
|
12
|
+
label: string;
|
|
13
|
+
/** The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/quill-icons-web and pass the element */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** This segment reports its own presses — logging which plan a visitor looked at, say. It is called with this segment's value, and SegmentedControl chains its own handler after it rather than replacing it */
|
|
16
|
+
onSelect?: (value: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export type SegmentedControlItemProps = SegmentedControlItemOwnProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'selected' | 'disabled' | 'size' | 'value' | 'label' | 'icon' | 'onSelect'> & ({
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
disabled?: false;
|
|
21
|
+
} | {
|
|
22
|
+
selected?: false;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
});
|
|
25
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
26
|
+
export declare const segmentedControlItemParts: {
|
|
27
|
+
readonly root: "dds-segmentedcontrolitem";
|
|
28
|
+
readonly icon: "dds-segmentedcontrolitem__icon";
|
|
29
|
+
readonly label: "dds-segmentedcontrolitem__label";
|
|
30
|
+
readonly sizer: "dds-segmentedcontrolitem__sizer";
|
|
31
|
+
};
|
|
32
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
33
|
+
export declare const segmentedControlItemDefaults: {
|
|
34
|
+
readonly selected: false;
|
|
35
|
+
readonly disabled: false;
|
|
36
|
+
readonly size: "md";
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GENERATED from segmented-control-item.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const segmentedControlItemParts = {
|
|
4
|
+
root: 'dds-segmentedcontrolitem',
|
|
5
|
+
icon: 'dds-segmentedcontrolitem__icon',
|
|
6
|
+
label: 'dds-segmentedcontrolitem__label',
|
|
7
|
+
sizer: 'dds-segmentedcontrolitem__sizer',
|
|
8
|
+
};
|
|
9
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
10
|
+
export const segmentedControlItemDefaults = { selected: false, disabled: false, size: 'md' };
|
|
@@ -0,0 +1,69 @@
|
|
|
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 pointer belongs to the segment, not to what is drawn inside it.
|
|
14
|
+
*
|
|
15
|
+
* A glyph and a label are both hit targets of their own as far as pointer events are
|
|
16
|
+
* concerned, and a click landing on the label reports the label as its target. That
|
|
17
|
+
* matters here rather than only in theory: SegmentedControl answers an arrow key by
|
|
18
|
+
* focusing a segment and clicking it, and it finds the segment by its own class — so a
|
|
19
|
+
* target that is the label instead is a lookup that quietly returns nothing.
|
|
20
|
+
*
|
|
21
|
+
* The root is deliberately absent from this list. Its ground is bound on `:hover`, and a
|
|
22
|
+
* box that refuses the pointer is never hovered; its children being inert is what keeps
|
|
23
|
+
* the pointer over the label reporting the button underneath it.
|
|
24
|
+
*/
|
|
25
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrolitem__icon,
|
|
26
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrolitem__label {
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* The dim is instant; the hover tint and the focus ring are not.
|
|
32
|
+
*
|
|
33
|
+
* The generated list is every property that varies by an axis, and `opacity` varies by
|
|
34
|
+
* `disabled` — so becoming unavailable was being animated because it could be, not
|
|
35
|
+
* because anyone chose it. Becoming unavailable is a change of state rather than a
|
|
36
|
+
* movement: there is nowhere for it to travel to, and easing it leaves the segment
|
|
37
|
+
* reading as half available for as long as it runs.
|
|
38
|
+
*
|
|
39
|
+
* One class is enough here, unlike the label's rule below: the generated selector for a
|
|
40
|
+
* root part is the bare component class, so this ties on specificity and wins on load
|
|
41
|
+
* order.
|
|
42
|
+
*/
|
|
43
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrolitem {
|
|
44
|
+
transition-property: background-color, outline-color, outline-width;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* The label fades its colour and steps its weight without easing it.
|
|
49
|
+
*
|
|
50
|
+
* The generated `transition-property` lists everything that varies, and both the ink and
|
|
51
|
+
* the weight do. The face ships as separate cuts rather than a variable one, so an
|
|
52
|
+
* interpolated weight lands between two of them and snaps anyway — and weight is the
|
|
53
|
+
* property that changes the word's width, so easing it would drag the segment's
|
|
54
|
+
* neighbours along on every press and move the box the row is measuring its pill
|
|
55
|
+
* against. Fading the ink while the shape steps is the honest version of that.
|
|
56
|
+
*
|
|
57
|
+
* Written here because the list is computed: a contract can say how long a change takes
|
|
58
|
+
* and on what curve, and cannot say which of the changes it applies to.
|
|
59
|
+
*
|
|
60
|
+
* Two classes deep to match what it overrides. The generated rule is
|
|
61
|
+
* `.dds-segmentedcontrolitem .dds-segmentedcontrolitem__label`, so a bare class here
|
|
62
|
+
* would lose on specificity however late it loaded — the quiet way an override of
|
|
63
|
+
* generated CSS fails.
|
|
64
|
+
*/
|
|
65
|
+
:where([data-dds-context="marketing"])
|
|
66
|
+
.dds-segmentedcontrolitem
|
|
67
|
+
.dds-segmentedcontrolitem__label {
|
|
68
|
+
transition-property: color;
|
|
69
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/* GENERATED from select.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-select {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--space-gap-xs);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-row {
|
|
10
|
+
align-items: center;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: var(--space-gap-xs);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label {
|
|
16
|
+
transition-property: color;
|
|
17
|
+
align-items: center;
|
|
18
|
+
display: flex;
|
|
19
|
+
color: var(--color-fg-default);
|
|
20
|
+
gap: var(--space-gap-xs);
|
|
21
|
+
min-block-size: var(--size-target-min);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-tooltip {
|
|
25
|
+
transition-property: background-color, color, outline-color, outline-width;
|
|
26
|
+
align-items: center;
|
|
27
|
+
appearance: none;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
border-style: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: none;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
outline-style: solid;
|
|
35
|
+
padding: unset;
|
|
36
|
+
border-radius: var(--radius-pill);
|
|
37
|
+
color: var(--color-fg-muted);
|
|
38
|
+
min-block-size: var(--size-target-min);
|
|
39
|
+
min-inline-size: var(--size-target-min);
|
|
40
|
+
outline-width: var(--border-width-none);
|
|
41
|
+
transition-duration: var(--motion-duration-fast);
|
|
42
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__control {
|
|
46
|
+
transition-property: background-color, border-color, box-shadow, opacity, outline-color, outline-width;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border-style: solid;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
display: flex;
|
|
51
|
+
inline-size: 100%;
|
|
52
|
+
outline-style: solid;
|
|
53
|
+
position: relative;
|
|
54
|
+
background-color: var(--color-bg-field);
|
|
55
|
+
border-color: var(--color-border-default);
|
|
56
|
+
border-width: var(--border-width-default);
|
|
57
|
+
outline-width: var(--border-width-none);
|
|
58
|
+
transition-duration: var(--motion-duration-fast);
|
|
59
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__field {
|
|
63
|
+
align-items: center;
|
|
64
|
+
appearance: none;
|
|
65
|
+
background-color: transparent;
|
|
66
|
+
block-size: 100%;
|
|
67
|
+
border-style: none;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex: auto;
|
|
72
|
+
inline-size: 100%;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
min-inline-size: 0;
|
|
75
|
+
outline-style: solid;
|
|
76
|
+
padding-block: 0;
|
|
77
|
+
text-align: start;
|
|
78
|
+
outline-width: var(--border-width-none);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__answer {
|
|
82
|
+
align-items: center;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex: auto;
|
|
85
|
+
min-inline-size: 0;
|
|
86
|
+
gap: var(--space-gap-sm);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__value {
|
|
90
|
+
flex: auto;
|
|
91
|
+
min-inline-size: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
color: var(--color-fg-default);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__trailing-icon {
|
|
99
|
+
align-items: center;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex: none;
|
|
102
|
+
color: var(--color-fg-muted);
|
|
103
|
+
transition-duration: var(--motion-duration-fast);
|
|
104
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__popup {
|
|
108
|
+
border-style: solid;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
inset-block-start: 100%;
|
|
111
|
+
inset-inline-end: 0;
|
|
112
|
+
inset-inline-start: 0;
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
position: absolute;
|
|
115
|
+
background-color: var(--color-bg-surface-raised);
|
|
116
|
+
border-color: var(--color-border-subtle);
|
|
117
|
+
border-radius: var(--radius-menu);
|
|
118
|
+
border-width: var(--border-width-default);
|
|
119
|
+
box-shadow: var(--elevation-surface-floating);
|
|
120
|
+
margin-block-start: var(--space-gap-sm);
|
|
121
|
+
max-block-size: var(--size-menu-max);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__search {
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
inset-block-start: 0;
|
|
127
|
+
position: sticky;
|
|
128
|
+
background-color: var(--color-bg-field);
|
|
129
|
+
padding-block-end: var(--space-inset-2xs);
|
|
130
|
+
padding-block-start: var(--space-inset-xs);
|
|
131
|
+
padding-inline: var(--space-inset-xs);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__listbox {
|
|
135
|
+
list-style: none;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding-block: var(--space-inset-2xs);
|
|
138
|
+
padding-inline: var(--space-inset-2xs);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__message {
|
|
142
|
+
transition-property: color;
|
|
143
|
+
align-items: flex-start;
|
|
144
|
+
display: flex;
|
|
145
|
+
overflow-wrap: anywhere;
|
|
146
|
+
color: var(--color-fg-muted);
|
|
147
|
+
font-family: var(--font-body-sm-family);
|
|
148
|
+
font-size: var(--font-body-sm-size);
|
|
149
|
+
font-weight: var(--font-body-sm-weight);
|
|
150
|
+
gap: var(--space-gap-xs);
|
|
151
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
152
|
+
line-height: var(--font-body-sm-line-height);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__message-icon {
|
|
156
|
+
align-items: center;
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
font-size: var(--font-body-sm-size);
|
|
160
|
+
line-height: var(--font-body-sm-line-height);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:where([data-dds-context="marketing"]) .dds-select[data-fixed="true"] .dds-select__trailing-icon {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__empty {
|
|
168
|
+
color: var(--color-fg-muted);
|
|
169
|
+
padding-block: var(--space-inset-sm);
|
|
170
|
+
padding-inline: var(--space-inset-sm);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__helper {
|
|
174
|
+
transition-property: color;
|
|
175
|
+
color: var(--color-fg-muted);
|
|
176
|
+
font-family: var(--font-body-sm-family);
|
|
177
|
+
font-size: var(--font-body-sm-size);
|
|
178
|
+
font-weight: var(--font-body-sm-weight);
|
|
179
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
180
|
+
line-height: var(--font-body-sm-line-height);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__optional-mark {
|
|
184
|
+
transition-property: color;
|
|
185
|
+
color: var(--color-fg-muted);
|
|
186
|
+
font-family: var(--font-body-sm-family);
|
|
187
|
+
font-size: var(--font-body-sm-size);
|
|
188
|
+
font-weight: var(--font-body-sm-weight);
|
|
189
|
+
line-height: var(--font-body-sm-line-height);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__required-mark {
|
|
193
|
+
transition-property: color;
|
|
194
|
+
color: var(--color-fg-required);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-tooltip:hover:where(:not(:disabled)) {
|
|
198
|
+
background-color: var(--color-bg-hover);
|
|
199
|
+
color: var(--color-fg-default);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-tooltip:active {
|
|
203
|
+
background-color: var(--color-bg-active);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-tooltip:focus-visible {
|
|
207
|
+
outline-color: var(--color-border-focus);
|
|
208
|
+
outline-width: var(--border-width-focus);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:focus-visible) .dds-select__control {
|
|
212
|
+
border-color: var(--color-border-focus);
|
|
213
|
+
outline-color: var(--color-border-focus);
|
|
214
|
+
outline-width: var(--border-width-hairline);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled:not(:where(:disabled *))) .dds-select__control {
|
|
218
|
+
opacity: var(--opacity-disabled);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled) .dds-select__helper {
|
|
222
|
+
color: var(--color-fg-disabled);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled) .dds-select__label {
|
|
226
|
+
color: var(--color-fg-disabled);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled) .dds-select__message {
|
|
230
|
+
color: var(--color-fg-disabled);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled) .dds-select__optional-mark {
|
|
234
|
+
color: var(--color-fg-disabled);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:where([data-dds-context="marketing"]) .dds-select:has(.dds-select__field:disabled) .dds-select__required-mark {
|
|
238
|
+
color: var(--color-fg-disabled);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:where([data-dds-context="marketing"]) .dds-select[data-fixed="true"] .dds-select__control {
|
|
242
|
+
background-color: var(--color-bg-readonly);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="lg"] .dds-select__control {
|
|
246
|
+
block-size: var(--size-control-lg);
|
|
247
|
+
border-radius: var(--radius-control-lg);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="lg"] .dds-select__empty {
|
|
251
|
+
font-family: var(--font-body-md-family);
|
|
252
|
+
font-size: var(--font-body-md-size);
|
|
253
|
+
font-weight: var(--font-body-md-weight);
|
|
254
|
+
line-height: var(--font-body-md-line-height);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="lg"] .dds-select__field {
|
|
258
|
+
padding-inline: var(--space-inset-md);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="lg"] .dds-select__label {
|
|
262
|
+
font-family: var(--font-field-label-lg-family);
|
|
263
|
+
font-size: var(--font-field-label-lg-size);
|
|
264
|
+
font-weight: var(--font-field-label-lg-weight);
|
|
265
|
+
letter-spacing: var(--font-field-label-lg-letter-spacing);
|
|
266
|
+
line-height: var(--font-field-label-lg-line-height);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="lg"] .dds-select__value {
|
|
270
|
+
font-family: var(--font-body-lg-family);
|
|
271
|
+
font-size: var(--font-body-lg-size);
|
|
272
|
+
font-weight: var(--font-body-lg-weight);
|
|
273
|
+
letter-spacing: var(--font-body-lg-letter-spacing);
|
|
274
|
+
line-height: var(--font-body-lg-line-height);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="md"] .dds-select__control {
|
|
278
|
+
block-size: var(--size-control-md);
|
|
279
|
+
border-radius: var(--radius-control-md);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="md"] .dds-select__empty {
|
|
283
|
+
font-family: var(--font-body-sm-family);
|
|
284
|
+
font-size: var(--font-body-sm-size);
|
|
285
|
+
font-weight: var(--font-body-sm-weight);
|
|
286
|
+
line-height: var(--font-body-sm-line-height);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="md"] .dds-select__field {
|
|
290
|
+
padding-inline: var(--space-inset-sm);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="md"] .dds-select__label {
|
|
294
|
+
font-family: var(--font-field-label-md-family);
|
|
295
|
+
font-size: var(--font-field-label-md-size);
|
|
296
|
+
font-weight: var(--font-field-label-md-weight);
|
|
297
|
+
letter-spacing: var(--font-field-label-md-letter-spacing);
|
|
298
|
+
line-height: var(--font-field-label-md-line-height);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="md"] .dds-select__value {
|
|
302
|
+
font-family: var(--font-body-md-family);
|
|
303
|
+
font-size: var(--font-body-md-size);
|
|
304
|
+
font-weight: var(--font-body-md-weight);
|
|
305
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
306
|
+
line-height: var(--font-body-md-line-height);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="sm"] .dds-select__control {
|
|
310
|
+
block-size: var(--size-control-sm);
|
|
311
|
+
border-radius: var(--radius-control-sm);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="sm"] .dds-select__empty {
|
|
315
|
+
font-family: var(--font-body-sm-family);
|
|
316
|
+
font-size: var(--font-body-sm-size);
|
|
317
|
+
font-weight: var(--font-body-sm-weight);
|
|
318
|
+
line-height: var(--font-body-sm-line-height);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="sm"] .dds-select__field {
|
|
322
|
+
padding-inline: var(--space-inset-sm);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="sm"] .dds-select__label {
|
|
326
|
+
font-family: var(--font-field-label-md-family);
|
|
327
|
+
font-size: var(--font-field-label-md-size);
|
|
328
|
+
font-weight: var(--font-field-label-md-weight);
|
|
329
|
+
letter-spacing: var(--font-field-label-md-letter-spacing);
|
|
330
|
+
line-height: var(--font-field-label-md-line-height);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:where([data-dds-context="marketing"]) .dds-select[data-size="sm"] .dds-select__value {
|
|
334
|
+
font-family: var(--font-body-md-family);
|
|
335
|
+
font-size: var(--font-body-md-size);
|
|
336
|
+
font-weight: var(--font-body-md-weight);
|
|
337
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
338
|
+
line-height: var(--font-body-md-line-height);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="error"] .dds-select__control {
|
|
342
|
+
border-color: var(--color-border-danger);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="error"] .dds-select__message {
|
|
346
|
+
color: var(--color-fg-danger);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="pending"] .dds-select__message {
|
|
350
|
+
color: var(--color-fg-muted);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="success"] .dds-select__control {
|
|
354
|
+
border-color: var(--color-border-success);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="success"] .dds-select__message {
|
|
358
|
+
color: var(--color-fg-success);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="warning"] .dds-select__control {
|
|
362
|
+
border-color: var(--color-border-warning);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="warning"] .dds-select__message {
|
|
366
|
+
color: var(--color-fg-warning);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
:where([data-dds-context="marketing"]) .dds-select[data-fixed="false"] .dds-select__control:hover:where(:not(:has(.dds-select__field:disabled))) {
|
|
370
|
+
box-shadow: var(--elevation-ring-hover);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="error"]:has(.dds-select__field:focus-visible) .dds-select__control {
|
|
374
|
+
border-color: var(--color-border-danger);
|
|
375
|
+
outline-color: var(--color-border-danger);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="success"]:has(.dds-select__field:focus-visible) .dds-select__control {
|
|
379
|
+
border-color: var(--color-border-success);
|
|
380
|
+
outline-color: var(--color-border-success);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="warning"]:has(.dds-select__field:focus-visible) .dds-select__control {
|
|
384
|
+
border-color: var(--color-border-warning);
|
|
385
|
+
outline-color: var(--color-border-warning);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__label-tooltip:disabled {
|
|
389
|
+
cursor: not-allowed;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__field:disabled {
|
|
393
|
+
cursor: not-allowed;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
@media (prefers-reduced-motion: reduce) {
|
|
397
|
+
:where([data-dds-context="marketing"]) .dds-select,
|
|
398
|
+
:where([data-dds-context="marketing"]) .dds-select * { transition: none; }
|
|
399
|
+
}
|
|
400
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './Select.css';
|
|
2
|
+
import './select-impl.css';
|
|
3
|
+
import { type SelectProps } from './Select.types.js';
|
|
4
|
+
export type { SelectProps };
|
|
5
|
+
/**
|
|
6
|
+
* A control for choosing one answer from a set the reader scans.
|
|
7
|
+
*
|
|
8
|
+
* Built as marketing's TextInput is built — a box that draws the border and the fill, and one
|
|
9
|
+
* element inside it holding the value — because that is what makes a form of mixed controls line
|
|
10
|
+
* up. The difference is the element inside: a text field's is an `<input>`, which can hold
|
|
11
|
+
* nothing, so its ornaments sit beside it and part of its box is not the field. Here it is a
|
|
12
|
+
* `<button>`, which can hold what it needs, so the whole box presses.
|
|
13
|
+
*
|
|
14
|
+
* Announced as a combobox, which is the name for a control that owns a list of answers whether
|
|
15
|
+
* or not anything can be typed into it. That role replaces the button's own activation on the
|
|
16
|
+
* way in, so Enter and Space are written here rather than inherited.
|
|
17
|
+
*
|
|
18
|
+
* Focus never leaves the box. Nothing here takes the caret — not even the search field, which is
|
|
19
|
+
* reachable with a pointer and otherwise fed from the box: every letter typed at the control goes
|
|
20
|
+
* into the query, so a keyboard never needs to be in the field to narrow the list. The rows are
|
|
21
|
+
* not focusable either, and the box says through `aria-activedescendant` which one the arrow keys
|
|
22
|
+
* are resting on; moving focus into the list would cost a tab stop per answer, which on a
|
|
23
|
+
* marketing page is a tab stop between the visitor and the button that submits the form.
|
|
24
|
+
*
|
|
25
|
+
* So Tab is one stop whether the list is open or shut. Open, it shuts the list on the way past
|
|
26
|
+
* rather than walking into the surface — the field and its clear button are furniture, and a
|
|
27
|
+
* reader tabbing out of a control has said they are done with it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Select(props: SelectProps): import("react").JSX.Element;
|