@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,25 @@
|
|
|
1
|
+
import './RemovableChip.css';
|
|
2
|
+
import { type RemovableChipProps } from './RemovableChip.types.js';
|
|
3
|
+
export type { RemovableChipProps };
|
|
4
|
+
/**
|
|
5
|
+
* A token for something already in play, which the reader can take away.
|
|
6
|
+
*
|
|
7
|
+
* The pill is not a control. The only thing to press is the cross, so making the
|
|
8
|
+
* token itself pressable would give one act two targets and nest a button inside a
|
|
9
|
+
* button — one ambiguous hit target with an inner half no keyboard can reach, which
|
|
10
|
+
* this package forbids across Button, Link and TextInput. The words are words; the
|
|
11
|
+
* cross is the control.
|
|
12
|
+
*
|
|
13
|
+
* It carries a painted brand ground where a FilterChip at rest carries an outline,
|
|
14
|
+
* which is what says the thing is already in play rather than merely on offer — at
|
|
15
|
+
* the same height and corner, so the two still stand level in one row. The ground is
|
|
16
|
+
* the dark brand surface rather than the neutral one a chosen FilterChip takes:
|
|
17
|
+
* both are painted, and the hue is what keeps a token already applied distinct from
|
|
18
|
+
* a narrowing the reader has only just switched on.
|
|
19
|
+
*
|
|
20
|
+
* The cross is regular weight, not the solid one product reaches for. Solid means
|
|
21
|
+
* selected in this package, and a dismissal is not a selection: a solid glyph used
|
|
22
|
+
* for anything else teaches a reader that the weight means nothing, and they carry
|
|
23
|
+
* that into the product.
|
|
24
|
+
*/
|
|
25
|
+
export declare function RemovableChip({ size, disabled, label, leadingIcon, onRemove, removeLabel, ...rest }: RemovableChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { XmarkRegularIcon } from '@deriv-com/quill-icons-web';
|
|
3
|
+
import './RemovableChip.css';
|
|
4
|
+
import { Icon } from '../icon/Icon.js';
|
|
5
|
+
import { removableChipDefaults, removableChipGlyphStep, removableChipParts, } from './RemovableChip.types.js';
|
|
6
|
+
/**
|
|
7
|
+
* A token for something already in play, which the reader can take away.
|
|
8
|
+
*
|
|
9
|
+
* The pill is not a control. The only thing to press is the cross, so making the
|
|
10
|
+
* token itself pressable would give one act two targets and nest a button inside a
|
|
11
|
+
* button — one ambiguous hit target with an inner half no keyboard can reach, which
|
|
12
|
+
* this package forbids across Button, Link and TextInput. The words are words; the
|
|
13
|
+
* cross is the control.
|
|
14
|
+
*
|
|
15
|
+
* It carries a painted brand ground where a FilterChip at rest carries an outline,
|
|
16
|
+
* which is what says the thing is already in play rather than merely on offer — at
|
|
17
|
+
* the same height and corner, so the two still stand level in one row. The ground is
|
|
18
|
+
* the dark brand surface rather than the neutral one a chosen FilterChip takes:
|
|
19
|
+
* both are painted, and the hue is what keeps a token already applied distinct from
|
|
20
|
+
* a narrowing the reader has only just switched on.
|
|
21
|
+
*
|
|
22
|
+
* The cross is regular weight, not the solid one product reaches for. Solid means
|
|
23
|
+
* selected in this package, and a dismissal is not a selection: a solid glyph used
|
|
24
|
+
* for anything else teaches a reader that the weight means nothing, and they carry
|
|
25
|
+
* that into the product.
|
|
26
|
+
*/
|
|
27
|
+
export function RemovableChip({ size = removableChipDefaults.size, disabled = removableChipDefaults.disabled, label, leadingIcon, onRemove, removeLabel = removableChipDefaults.removeLabel, ...rest }) {
|
|
28
|
+
return (_jsxs("span", { className: removableChipParts.root, ...rest, "data-disabled": String(disabled), "data-size": size, children: [leadingIcon !== undefined && (_jsx("span", { className: removableChipParts.icon, children: _jsx(Icon, { size: removableChipGlyphStep[size], children: leadingIcon }) })), _jsx("span", { className: removableChipParts.label, children: label }), _jsx("button", { type: "button", className: removableChipParts.remove, "aria-label": removeLabel,
|
|
29
|
+
/*
|
|
30
|
+
The native attribute rather than aria-disabled: there is nothing here to
|
|
31
|
+
explain, and this takes the cross out of the tab order instead of
|
|
32
|
+
announcing it and refusing. Dimming alone would leave a live control on a
|
|
33
|
+
token the reader was told they could not drop.
|
|
34
|
+
*/
|
|
35
|
+
disabled: disabled, onClick: onRemove, children: _jsx(XmarkRegularIcon, { className: removableChipParts['remove-icon'], "aria-hidden": "true" }) })] }));
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface RemovableChipOwnProps {
|
|
3
|
+
/** The token cannot be removed just now — something else is in progress, or the narrowing is the last one and the index will not show nothing. It dims and takes the cross out of the tab order */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* `sm` — The default, and the same measure a FilterChip takes at its own default, so a row holding both sits level
|
|
7
|
+
* `md` — A touch-first layout, level with a FilterChip at its largest. The cross gains room around it rather than growing: it is already at the smallest a target may be
|
|
8
|
+
*/
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
/** Always, and required on that account — it names the thing the token stands for. Short enough to read at a glance in a row of them */
|
|
11
|
+
label: string;
|
|
12
|
+
/** A glyph makes the kind of thing recognisable before the words are read. It sits before the name and never replaces it. Pass the glyph itself rather than one already wrapped in an Icon: the token wraps it at icon.size.xs at sm and icon.size.sm at md. */
|
|
13
|
+
leadingIcon?: ReactNode;
|
|
14
|
+
/** Always, and required on that account: removal is the whole of what this component does, and a cross reporting to nobody is the clearest promise a chip can break — the reader presses it more than once before deciding the page is at fault */
|
|
15
|
+
onRemove: () => void;
|
|
16
|
+
/** The accessible name of the cross, which announces nothing on its own. Override it to name what is going: a row of buttons all saying Remove leaves a reader who cannot see the tokens unable to tell which one they are about to lose */
|
|
17
|
+
removeLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
export type RemovableChipProps = RemovableChipOwnProps & Omit<HTMLAttributes<HTMLSpanElement>, 'className' | 'disabled' | 'size' | 'label' | 'leadingIcon' | 'onRemove' | 'removeLabel'>;
|
|
20
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
21
|
+
export declare const removableChipParts: {
|
|
22
|
+
readonly root: "dds-removablechip";
|
|
23
|
+
readonly icon: "dds-removablechip__icon";
|
|
24
|
+
readonly label: "dds-removablechip__label";
|
|
25
|
+
readonly remove: "dds-removablechip__remove";
|
|
26
|
+
readonly 'remove-icon': "dds-removablechip__remove-icon";
|
|
27
|
+
};
|
|
28
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
29
|
+
export declare const removableChipDefaults: {
|
|
30
|
+
readonly disabled: false;
|
|
31
|
+
readonly size: "sm";
|
|
32
|
+
readonly removeLabel: "Remove";
|
|
33
|
+
};
|
|
34
|
+
/** The step this component draws a glyph slot at. Generated — do not retype. */
|
|
35
|
+
export declare const removableChipGlyphStep: {
|
|
36
|
+
readonly sm: "xs";
|
|
37
|
+
readonly md: "sm";
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// GENERATED from removable-chip.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const removableChipParts = {
|
|
4
|
+
root: 'dds-removablechip',
|
|
5
|
+
icon: 'dds-removablechip__icon',
|
|
6
|
+
label: 'dds-removablechip__label',
|
|
7
|
+
remove: 'dds-removablechip__remove',
|
|
8
|
+
'remove-icon': 'dds-removablechip__remove-icon',
|
|
9
|
+
};
|
|
10
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
11
|
+
export const removableChipDefaults = { disabled: false, size: 'sm', removeLabel: 'Remove' };
|
|
12
|
+
/** The step this component draws a glyph slot at. Generated — do not retype. */
|
|
13
|
+
export const removableChipGlyphStep = { sm: 'xs', md: 'sm' };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* GENERATED from searchinput.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-searchinput {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
position: relative;
|
|
7
|
+
gap: var(--space-gap-xs);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__label {
|
|
11
|
+
transition-property: color;
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
color: var(--color-fg-default);
|
|
15
|
+
gap: var(--space-gap-xs);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__control {
|
|
19
|
+
transition-property: background-color, border-color, box-shadow, opacity, outline-color, outline-width;
|
|
20
|
+
align-items: center;
|
|
21
|
+
border-style: solid;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
inline-size: 100%;
|
|
25
|
+
outline-style: solid;
|
|
26
|
+
background-color: var(--color-bg-field);
|
|
27
|
+
border-color: var(--color-border-default);
|
|
28
|
+
border-width: var(--border-width-default);
|
|
29
|
+
gap: var(--space-gap-sm);
|
|
30
|
+
outline-width: var(--border-width-none);
|
|
31
|
+
transition-duration: var(--motion-duration-fast);
|
|
32
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__search-icon {
|
|
36
|
+
align-items: center;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex: none;
|
|
39
|
+
color: var(--color-fg-muted);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__field {
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
block-size: 100%;
|
|
45
|
+
border-style: none;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
flex: auto;
|
|
48
|
+
min-inline-size: 0;
|
|
49
|
+
outline-style: solid;
|
|
50
|
+
padding: unset;
|
|
51
|
+
color: var(--color-fg-default);
|
|
52
|
+
outline-width: var(--border-width-none);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__clear {
|
|
56
|
+
transition-property: background-color, color, outline-color, outline-width;
|
|
57
|
+
align-items: center;
|
|
58
|
+
appearance: none;
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
border-style: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex: none;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
outline-style: solid;
|
|
66
|
+
padding: unset;
|
|
67
|
+
border-radius: var(--radius-pill);
|
|
68
|
+
color: var(--color-fg-muted);
|
|
69
|
+
min-block-size: var(--size-target-min);
|
|
70
|
+
min-inline-size: var(--size-target-min);
|
|
71
|
+
outline-width: var(--border-width-none);
|
|
72
|
+
transition-duration: var(--motion-duration-fast);
|
|
73
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__field::placeholder {
|
|
77
|
+
color: var(--color-fg-tertiary);
|
|
78
|
+
font-weight: var(--font-body-md-weight);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__helper {
|
|
82
|
+
transition-property: color;
|
|
83
|
+
color: var(--color-fg-muted);
|
|
84
|
+
font-family: var(--font-body-sm-family);
|
|
85
|
+
font-size: var(--font-body-sm-size);
|
|
86
|
+
font-weight: var(--font-body-sm-weight);
|
|
87
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
88
|
+
line-height: var(--font-body-sm-line-height);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__clear:hover:where(:not(:disabled)) {
|
|
92
|
+
background-color: var(--color-bg-hover);
|
|
93
|
+
color: var(--color-fg-default);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__control:hover:where(:not(:has(.dds-searchinput__field:disabled))) {
|
|
97
|
+
box-shadow: var(--elevation-ring-hover);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__clear:active {
|
|
101
|
+
background-color: var(--color-bg-active);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__clear:focus-visible {
|
|
105
|
+
outline-color: var(--color-border-focus);
|
|
106
|
+
outline-width: var(--border-width-focus);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-searchinput:has(.dds-searchinput__field:focus-visible) .dds-searchinput__control {
|
|
110
|
+
border-color: var(--color-border-focus);
|
|
111
|
+
outline-color: var(--color-border-focus);
|
|
112
|
+
outline-width: var(--border-width-hairline);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where([data-dds-context="marketing"]) .dds-searchinput:has(.dds-searchinput__field[readonly]) .dds-searchinput__control {
|
|
116
|
+
background-color: var(--color-bg-readonly);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:where([data-dds-context="marketing"]) .dds-searchinput:has(.dds-searchinput__field:disabled:not(:where(:disabled *))) .dds-searchinput__control {
|
|
120
|
+
opacity: var(--opacity-disabled);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where([data-dds-context="marketing"]) .dds-searchinput:has(.dds-searchinput__field:disabled) .dds-searchinput__helper {
|
|
124
|
+
color: var(--color-fg-disabled);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where([data-dds-context="marketing"]) .dds-searchinput:has(.dds-searchinput__field:disabled) .dds-searchinput__label {
|
|
128
|
+
color: var(--color-fg-disabled);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="lg"] .dds-searchinput__control {
|
|
132
|
+
block-size: var(--size-control-lg);
|
|
133
|
+
border-radius: var(--radius-control-lg);
|
|
134
|
+
padding-inline: var(--space-inset-md);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="lg"] .dds-searchinput__field {
|
|
138
|
+
font-family: var(--font-body-lg-family);
|
|
139
|
+
font-size: var(--font-body-lg-size);
|
|
140
|
+
font-weight: var(--font-body-lg-weight);
|
|
141
|
+
letter-spacing: var(--font-body-lg-letter-spacing);
|
|
142
|
+
line-height: var(--font-body-lg-line-height);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="lg"] .dds-searchinput__label {
|
|
146
|
+
font-family: var(--font-field-label-lg-family);
|
|
147
|
+
font-size: var(--font-field-label-lg-size);
|
|
148
|
+
font-weight: var(--font-field-label-lg-weight);
|
|
149
|
+
letter-spacing: var(--font-field-label-lg-letter-spacing);
|
|
150
|
+
line-height: var(--font-field-label-lg-line-height);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="md"] .dds-searchinput__control {
|
|
154
|
+
block-size: var(--size-control-md);
|
|
155
|
+
border-radius: var(--radius-control-md);
|
|
156
|
+
padding-inline: var(--space-inset-sm);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="md"] .dds-searchinput__field {
|
|
160
|
+
font-family: var(--font-body-md-family);
|
|
161
|
+
font-size: var(--font-body-md-size);
|
|
162
|
+
font-weight: var(--font-body-md-weight);
|
|
163
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
164
|
+
line-height: var(--font-body-md-line-height);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="md"] .dds-searchinput__label {
|
|
168
|
+
font-family: var(--font-field-label-md-family);
|
|
169
|
+
font-size: var(--font-field-label-md-size);
|
|
170
|
+
font-weight: var(--font-field-label-md-weight);
|
|
171
|
+
letter-spacing: var(--font-field-label-md-letter-spacing);
|
|
172
|
+
line-height: var(--font-field-label-md-line-height);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="sm"] .dds-searchinput__control {
|
|
176
|
+
block-size: var(--size-control-sm);
|
|
177
|
+
border-radius: var(--radius-control-sm);
|
|
178
|
+
padding-inline: var(--space-inset-sm);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="sm"] .dds-searchinput__field {
|
|
182
|
+
font-family: var(--font-body-md-family);
|
|
183
|
+
font-size: var(--font-body-md-size);
|
|
184
|
+
font-weight: var(--font-body-md-weight);
|
|
185
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
186
|
+
line-height: var(--font-body-md-line-height);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:where([data-dds-context="marketing"]) .dds-searchinput[data-size="sm"] .dds-searchinput__label {
|
|
190
|
+
font-family: var(--font-field-label-md-family);
|
|
191
|
+
font-size: var(--font-field-label-md-size);
|
|
192
|
+
font-weight: var(--font-field-label-md-weight);
|
|
193
|
+
letter-spacing: var(--font-field-label-md-letter-spacing);
|
|
194
|
+
line-height: var(--font-field-label-md-line-height);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:where([data-dds-context="marketing"]) .dds-searchinput .dds-searchinput__field:disabled {
|
|
198
|
+
cursor: not-allowed;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (prefers-reduced-motion: reduce) {
|
|
202
|
+
:where([data-dds-context="marketing"]) .dds-searchinput,
|
|
203
|
+
:where([data-dds-context="marketing"]) .dds-searchinput * { transition: none; }
|
|
204
|
+
}
|
|
205
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useRef, useState } from 'react';
|
|
4
|
+
import { CircleXmarkSolidIcon, MagnifyingGlassRegularIcon } from '@deriv-com/quill-icons-web';
|
|
5
|
+
import './SearchInput.css';
|
|
6
|
+
import './search-input-impl.css';
|
|
7
|
+
import { Icon } from '../icon/Icon.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { visuallyHidden } from '../../visually-hidden.js';
|
|
10
|
+
import { searchInputDefaults, searchInputParts } from './SearchInput.types.js';
|
|
11
|
+
/** The step the two marks this component draws itself take, against the query beside them. */
|
|
12
|
+
const fieldGlyphStep = { sm: 'xs', md: 'xs', lg: 'sm' };
|
|
13
|
+
export function SearchInput(props) {
|
|
14
|
+
const { size = searchInputDefaults.size, label, showLabel = searchInputDefaults.showLabel, placeholder, helperText, value, defaultValue, onChange, onSearch, clearLabel, ...rest } = props;
|
|
15
|
+
/**
|
|
16
|
+
* One id for the field, and one for the helper.
|
|
17
|
+
*
|
|
18
|
+
* `useId` rather than a prop, because a marketing page renders a search in the header and
|
|
19
|
+
* again on the page it lands on, and two fields sharing a `for` means clicking the second
|
|
20
|
+
* label focuses the first.
|
|
21
|
+
*/
|
|
22
|
+
const base = useId();
|
|
23
|
+
const fieldId = `${base}-field`;
|
|
24
|
+
const field = useRef(null);
|
|
25
|
+
/**
|
|
26
|
+
* The query, held here only when nobody else is holding it.
|
|
27
|
+
*
|
|
28
|
+
* Unlike the other two fields in this package, this one owns the value: the clear button and
|
|
29
|
+
* Escape both empty it, and neither can be expressed as a change the consumer made unless the
|
|
30
|
+
* component knows what the query currently is.
|
|
31
|
+
*/
|
|
32
|
+
const controlled = 'value' in props;
|
|
33
|
+
const [held, setHeld] = useState(defaultValue ?? '');
|
|
34
|
+
const query = controlled ? (value ?? '') : held;
|
|
35
|
+
const report = (next) => {
|
|
36
|
+
if (!controlled)
|
|
37
|
+
setHeld(next);
|
|
38
|
+
onChange?.(next);
|
|
39
|
+
};
|
|
40
|
+
return (_jsxs("div", { className: searchInputParts.root, "data-size": size, children: [_jsx("label", { className: searchInputParts.label, htmlFor: fieldId, style: showLabel ? undefined : visuallyHidden, children: label }), _jsxs("div", { className: searchInputParts.control,
|
|
41
|
+
// Only when the box itself was hit: the inset belongs to the box, so there is a strip
|
|
42
|
+
// of it that is not the input, and clicking it would otherwise do nothing where a
|
|
43
|
+
// native input's own padding puts the caret in.
|
|
44
|
+
onMouseDown: (event) => {
|
|
45
|
+
if (event.target === event.currentTarget)
|
|
46
|
+
field.current?.focus();
|
|
47
|
+
}, children: [_jsx("span", { className: searchInputParts['search-icon'], "aria-hidden": "true", children: _jsx(Icon, { size: fieldGlyphStep[size], children: _jsx(MagnifyingGlassRegularIcon, {}) }) }), _jsx("input", { ref: field, className: searchInputParts.field, id: fieldId,
|
|
48
|
+
/* What makes this a searchbox rather than a textbox, and half the reason the component
|
|
49
|
+
exists apart from TextInput. The browser's own clear chrome arrives with it and is
|
|
50
|
+
suppressed in search-input-impl.css. */
|
|
51
|
+
type: "search", placeholder: placeholder, value: query, ...rest, onChange: (event) => report(event.currentTarget.value),
|
|
52
|
+
/* Escape empties, Enter commits — the two gestures TextInput cannot have.
|
|
53
|
+
Escape is the one that could not live in a form field: losing a half-typed query
|
|
54
|
+
costs a keystroke, and losing a half-typed name costs the name. */
|
|
55
|
+
onKeyDown: (event) => {
|
|
56
|
+
// Theirs first, and honoured if it stops the event. A handler that runs second and
|
|
57
|
+
// only sometimes is worse than one that does not run at all: a page listening for
|
|
58
|
+
// Escape to close its search panel would lose it on any field holding a query and
|
|
59
|
+
// keep it on every empty one.
|
|
60
|
+
rest.onKeyDown?.(event);
|
|
61
|
+
if (event.defaultPrevented)
|
|
62
|
+
return;
|
|
63
|
+
if (event.key === 'Escape' && query !== '') {
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
report('');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// Only where there is something to commit to. Preventing the default on Enter
|
|
69
|
+
// regardless would stop a search inside a form from ever submitting it — the
|
|
70
|
+
// browser's own behaviour, taken from every consumer who never asked for onSearch.
|
|
71
|
+
if (event.key === 'Enter' && onSearch !== undefined) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
onSearch(query);
|
|
74
|
+
}
|
|
75
|
+
}, "aria-describedby": [given(helperText) ? `${base}-helper` : undefined, rest['aria-describedby']]
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.join(' ') || undefined }), query !== '' && rest.disabled !== true ? (_jsx("button", { type: "button", className: searchInputParts.clear, "aria-label": clearLabel, onClick: () => {
|
|
78
|
+
report('');
|
|
79
|
+
field.current?.focus();
|
|
80
|
+
}, children: _jsx(Icon, { size: fieldGlyphStep[size], children: _jsx(CircleXmarkSolidIcon, {}) }) })) : null] }), given(helperText) ? (_jsx("span", { className: searchInputParts.helper, id: `${base}-helper`, children: helperText })) : null] }));
|
|
81
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface SearchInputOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `sm` — A search that is one control among several — a filter bar above a list, or a navigation row. Desktop layouts only: at thirty-two it is below what a finger reliably hits
|
|
5
|
+
* `md` — The default — a search in a help centre's header, or above an index the page already holds
|
|
6
|
+
* `lg` — A search that is the reason the section exists: a knowledge base landing page whose one job is to take a query
|
|
7
|
+
*/
|
|
8
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
/** Always — a field announced as a searchbox still needs a name, and "Search" alone does not say what is being searched. "Search transactions", not "Search". Hide it with showLabel where the page has no room; it stays in the accessible tree either way */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Drawing the label, for a page-level search with a line to spend on it — a help centre, a directory. The exception rather than the rule: a toolbar and a table header show a magnifier and a placeholder. Drawing it also changes what the placeholder is for, since the label then says what is searched */
|
|
12
|
+
showLabel?: boolean;
|
|
13
|
+
/** Making the field’s purpose legible while the label is clipped, which is the default and so the usual case: "Card, bank or wallet" on a payment method search. Draw the label and that job moves to it, leaving this free to show what a query looks like — "Skrill, Neteller, Maestro" */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** Saying what the query matches when it is not obvious — "Searches names and symbols" on a field that looks like it searches only names. Stays on screen, unlike the placeholder */
|
|
16
|
+
helperText?: string;
|
|
17
|
+
/** The page owns the query and passes it in — the controlled form, and the usual one here, because a query is normally held wherever the filtering happens */
|
|
18
|
+
value?: string;
|
|
19
|
+
/** A query the field starts on — a filter restored from a URL or a saved view. Absent means an empty field */
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
/** Filtering as the user types. It reports the query as a string rather than the event, which is what every caller wanted from the event anyway — and it reports the same way whether the query was typed, cleared with the button or cleared with Escape */
|
|
22
|
+
onChange?: (query: string) => void;
|
|
23
|
+
/** Committing the query — Enter, and a query worth a round trip. A search that costs a request wants asking for, where one that filters a list already on screen can follow every keystroke through onChange */
|
|
24
|
+
onSearch?: (query: string) => void;
|
|
25
|
+
/** Naming the clear button, which is always offered here rather than asked for. The glyph is a cross and says nothing on its own, so this is the button’s only name — "Clear search", in the consumer’s own words */
|
|
26
|
+
clearLabel: string;
|
|
27
|
+
}
|
|
28
|
+
export type SearchInputProps = SearchInputOwnProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'label' | 'showLabel' | 'placeholder' | 'helperText' | 'value' | 'defaultValue' | 'onChange' | 'onSearch' | 'clearLabel'>;
|
|
29
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
30
|
+
export declare const searchInputParts: {
|
|
31
|
+
readonly root: "dds-searchinput";
|
|
32
|
+
readonly label: "dds-searchinput__label";
|
|
33
|
+
readonly control: "dds-searchinput__control";
|
|
34
|
+
readonly 'search-icon': "dds-searchinput__search-icon";
|
|
35
|
+
readonly field: "dds-searchinput__field";
|
|
36
|
+
readonly clear: "dds-searchinput__clear";
|
|
37
|
+
readonly helper: "dds-searchinput__helper";
|
|
38
|
+
};
|
|
39
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
40
|
+
export declare const searchInputDefaults: {
|
|
41
|
+
readonly size: "md";
|
|
42
|
+
readonly showLabel: false;
|
|
43
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// GENERATED from search-input.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const searchInputParts = {
|
|
4
|
+
root: 'dds-searchinput',
|
|
5
|
+
label: 'dds-searchinput__label',
|
|
6
|
+
control: 'dds-searchinput__control',
|
|
7
|
+
'search-icon': 'dds-searchinput__search-icon',
|
|
8
|
+
field: 'dds-searchinput__field',
|
|
9
|
+
clear: 'dds-searchinput__clear',
|
|
10
|
+
helper: 'dds-searchinput__helper',
|
|
11
|
+
};
|
|
12
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
13
|
+
export const searchInputDefaults = { size: 'md', showLabel: false };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines the rule without contributing specificity.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* The browser's own clear control, removed.
|
|
9
|
+
*
|
|
10
|
+
* `type="search"` is what makes this a searchbox rather than a textbox, and WebKit throws in a
|
|
11
|
+
* cancel button with it — unstyleable, in the same corner as the clear button this component
|
|
12
|
+
* draws, so the field ends up offering the same action twice in two different shapes. Nothing
|
|
13
|
+
* a contract can say: these are vendor pseudo-elements, and `appearance` on them is a keyword
|
|
14
|
+
* rather than a token.
|
|
15
|
+
*/
|
|
16
|
+
:where([data-dds-context="marketing"]) .dds-searchinput__field::-webkit-search-cancel-button,
|
|
17
|
+
:where([data-dds-context="marketing"]) .dds-searchinput__field::-webkit-search-decoration {
|
|
18
|
+
appearance: none;
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* GENERATED from segmentedcontrol.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol {
|
|
4
|
+
transition-property: opacity;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
display: flex;
|
|
8
|
+
position: relative;
|
|
9
|
+
background-color: var(--color-bg-track);
|
|
10
|
+
border-radius: var(--radius-pill);
|
|
11
|
+
gap: var(--space-gap-xs);
|
|
12
|
+
padding-block: var(--space-inset-2xs);
|
|
13
|
+
padding-inline: var(--space-inset-2xs);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol .dds-segmentedcontrol__indicator {
|
|
17
|
+
inset-block-start: 0;
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
position: absolute;
|
|
21
|
+
background-color: var(--color-bg-surface-raised);
|
|
22
|
+
border-radius: var(--radius-pill);
|
|
23
|
+
box-shadow: var(--elevation-surface-raised);
|
|
24
|
+
transition-duration: var(--motion-duration-normal);
|
|
25
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-disabled="true"] {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
opacity: var(--opacity-disabled);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-layout="fill"] {
|
|
34
|
+
inline-size: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-layout="hug"] {
|
|
38
|
+
inline-size: fit-content;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-size="lg"] {
|
|
42
|
+
block-size: var(--size-control-lg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-size="md"] {
|
|
46
|
+
block-size: var(--size-control-md);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol[data-size="sm"] {
|
|
50
|
+
block-size: var(--size-control-sm);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (prefers-reduced-motion: reduce) {
|
|
54
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol,
|
|
55
|
+
:where([data-dds-context="marketing"]) .dds-segmentedcontrol * { transition: none; }
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./SegmentedControl.css";
|
|
2
|
+
import "./segmented-control-impl.css";
|
|
3
|
+
import { type SegmentedControlProps } from "./SegmentedControl.types.js";
|
|
4
|
+
export type { SegmentedControlProps };
|
|
5
|
+
/**
|
|
6
|
+
* A row of mutually exclusive values, and the three things about them that belong to the
|
|
7
|
+
* row rather than to any one segment: which is chosen, how tall they all are, and
|
|
8
|
+
* whether the choice can be made at all.
|
|
9
|
+
*
|
|
10
|
+
* It measures one thing — where the chosen segment sits — so the pill can travel to it.
|
|
11
|
+
* That is the whole reason the pill is a single element this component positions rather
|
|
12
|
+
* than a ground each segment paints: two grounds cross-fading always reads as two
|
|
13
|
+
* grounds, and no selector can answer where a sibling is. No container query reaches it
|
|
14
|
+
* either, the question being about a sibling's position rather than a box's own width.
|
|
15
|
+
*
|
|
16
|
+
* The measurement is deliberately small: one element per change, read for its offset and
|
|
17
|
+
* its size. Not the whole row, not on scroll, not per frame.
|
|
18
|
+
*
|
|
19
|
+
* It measures the segment itself rather than a wrapper around it, which is where this
|
|
20
|
+
* parts company with Product's. `offsetLeft` is read from the nearest positioned
|
|
21
|
+
* ancestor, and the segment's is this element — the groove is `position: relative` and
|
|
22
|
+
* the segment, though positioned itself, has nothing positioned between the two. Product
|
|
23
|
+
* wraps each segment in a box of its own because its own layout decisions live there;
|
|
24
|
+
* here the row divides itself, so the wrapper would be a part with nothing to bind and
|
|
25
|
+
* one more element between the pill and the thing it is measuring.
|
|
26
|
+
*
|
|
27
|
+
* What it does own is the radio pattern, which stops being optional the moment the
|
|
28
|
+
* segments carry `role="radio"`. One tab stop for the whole row, the arrow keys inside
|
|
29
|
+
* it, and selection following focus — because there is always exactly one answer, so
|
|
30
|
+
* moving focus without changing the answer would leave the reader looking at one segment
|
|
31
|
+
* while another is in force.
|
|
32
|
+
*
|
|
33
|
+
* A `value` naming no segment chooses none of them. Falling back to the first would tell
|
|
34
|
+
* the reader a value is in force that the page never set, and hide whatever caused the
|
|
35
|
+
* mismatch — a stale piece of state, a segment that has not loaded yet.
|
|
36
|
+
*/
|
|
37
|
+
export declare function SegmentedControl({ layout, size, disabled, label, value, onChange, children, ...rest }: SegmentedControlProps): import("react").JSX.Element;
|