@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,54 @@
|
|
|
1
|
+
<!-- GENERATED from navbaritem.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarItem
|
|
4
|
+
|
|
5
|
+
One place the site has, in the bar across the top of it. An anchor with a target around it, a mark for the section the reader is currently in, and nothing else. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarItem } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A section of the site, in a Navbar — the ordinary case and what this is for
|
|
12
|
+
- A destination that leaves the site, which it marks as a change of context rather than leaving the reader to find out
|
|
13
|
+
- The same destination inside the panel a narrow bar collapses into: a page writes its navigation once, and what changes with the width is how it is drawn
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The destination opens a panel of further destinations rather than going somewhere → **NavbarMenu**
|
|
18
|
+
- The destination is a phrase inside a sentence, or a call to action beneath a paragraph → **Link**
|
|
19
|
+
- The item is one of a set of alternatives rather than a place → **Tab**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- A control. This navigates and nothing else — a press that filtered, submitted or opened something would be a button the browser has been told is a link
|
|
24
|
+
- The site's mark. That goes in Navbar's brand slot, where nothing gives it a target or a current state
|
|
25
|
+
- A conversion action. Open an account is not a place the site has, and a reader tabbing the navigation landmark should not meet it there — that is Navbar's utilities slot
|
|
26
|
+
- A list of every page on the site. A bar holds the sections a reader chooses between at a glance; a sitemap is a footer
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
- **current** `boolean` · default false — The reader is in this section of the site. It fills the item's shape in and sets `aria-current="page"`, so the mark is not the only thing saying it. …
|
|
31
|
+
- never: Emphasis. This is not the important destination or the one the site would rather you took; it is the one the reader is already on, and using it for anything else makes the mark mean nothing on every bar that uses it correctly
|
|
32
|
+
- **tone** `enum` · default "default"
|
|
33
|
+
- `default` — The bar has a light ground under it, which is every bar on a marketing page today. The tints here are ink-based and read against paper
|
|
34
|
+
- `inverse` — The bar sits on a dark ground — a band, or art the page put behind it — and the ink runs light. …
|
|
35
|
+
- **href** `string` · required — Always. This is a place, and a place has an address — an item with no href is a control drawn as a link, which is the one thing its intent says it is not
|
|
36
|
+
- never: A fragment standing in for behaviour. `href="#"` is how a link that does nothing gets written, and it navigates: the reader loses their scroll position and gains a history entry for a press meant to do something else
|
|
37
|
+
- **icon** `node` · optional — The bar's sections are quicker to tell apart by a mark than by reading them, which is rare on a marketing site and usual in an application
|
|
38
|
+
- never: Decoration on every item. A glyph beside each of five destinations costs the width the destinations need and tells a reader nothing they were not already reading
|
|
39
|
+
- **external** `boolean` · default false — The destination leaves the site. It draws the mark, opens in a new context, and the implementation extends the accessible name to say so in words — a glyph alone is a warning only sighted readers get
|
|
40
|
+
- never: A different area of the same site. A subdomain the reader experiences as one place is not a change of context, and marking it as one teaches them to ignore the mark where it matters
|
|
41
|
+
|
|
42
|
+
## The type refuses
|
|
43
|
+
|
|
44
|
+
- current=true with external=true — The section the reader is in, and a destination that leaves the site. …
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- Takes only text.
|
|
49
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
50
|
+
- Renders 4 parts: root, icon, label, external.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbaritem.md`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- GENERATED from navbarmenu.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarMenu
|
|
4
|
+
|
|
5
|
+
A destination in the bar that opens rather than goes: a named trigger, and a wide panel beneath it holding the section's own destinations in columns, usually with something promotional beside them. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarMenu } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A section of the site has enough inside it that naming the section is not enough — Trading holding markets, platforms and tools, rather than one page called Trading …
|
|
12
|
+
- The destinations under a section are worth grouping, and the groups are worth heading
|
|
13
|
+
- The section has something the site wants shown alongside its links: a promotion, a feature, a piece of art
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The destination is a single place → **NavbarItem**
|
|
18
|
+
- What opens is a single column of choices rather than a section of the site → **DropdownMenu**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- A control. Nothing here submits, filters or changes what the page is showing other than by revealing its own panel
|
|
23
|
+
- A destination of its own. The trigger is a button and goes nowhere — a section that is also a page needs its own NavbarItem inside the panel, where a reader can actually reach it
|
|
24
|
+
- The narrow width. There is no room for columns on a phone, and the bar collapses into NavbarPanel rather than opening this
|
|
25
|
+
- Content a reader has to work through. A panel is scanned in a moment with a pointer hovering over it; a paragraph in one is a paragraph nobody finishes
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **presentation** `enum` · default "floating"
|
|
30
|
+
- `floating` — The menu is in the bar, which is everywhere a page puts one. The panel hangs from the trigger and floats over what is beneath it
|
|
31
|
+
- `inline` — NavbarPanel is rendering the menu, and it sets this itself — a page should not. …
|
|
32
|
+
- **tone** `enum` · default "default"
|
|
33
|
+
- `default` — The bar has a light ground under it, which is every bar on a marketing page today. The trigger's tints are ink-based and read against paper
|
|
34
|
+
- `inverse` — The bar sits on a dark ground and the ink runs light. Only the trigger mirrors — the panel is its own surface with its own ground, and is the same either way
|
|
35
|
+
- **label** `string` · required — Always — it is the name of the section, the words on the trigger, and the accessible name of the control. Name the section rather than the act: 'Trading', not 'Open trading menu'
|
|
36
|
+
- never: A description of what is inside. The panel says that by holding it, and a trigger long enough to explain itself is a trigger that breaks the row it sits in
|
|
37
|
+
- **open** `boolean` · optional — The bar is holding which section is open, because only one should be at a time. Passing it makes the menu controlled: it shows what it is told and reports presses through onOpenChange. …
|
|
38
|
+
- never: Half of a controlled menu. An open passed without an onOpenChange to move it is a panel that cannot be closed by pressing the trigger that opened it
|
|
39
|
+
- **onOpenChange** `callback` · optional — Whenever open is — together they are how a bar holds which section is showing. It is called with the state being moved to, by the trigger and by Escape
|
|
40
|
+
- never: Navigation. This says whether the panel is showing; a reader pressing a destination inside it is leaving by a different door
|
|
41
|
+
- **replacing** `boolean` · default false — Another section's panel was already on screen when this one opened. A container that holds one section open at a time knows this and a menu cannot, so the container sets it — Navbar does, and a page should not
|
|
42
|
+
- never: Turning the entrance off generally. A panel that arrives over a page with nothing else open has something to say about where it came from, and saying it is the difference between a panel appearing and a panel being noticed
|
|
43
|
+
- **feature** `node` · optional — The section has something the site wants shown alongside its destinations — a promotion, a platform, a piece of art. A Card, which already knows how to hold a picture with words over it. …
|
|
44
|
+
- never: More destinations. Anything that goes to a section of the site belongs in a group, where the reader is looking for it
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- Takes only NavbarMenuGroup, NavbarItem.
|
|
49
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
50
|
+
- Renders 6 parts: root, trigger, chevron, surface, groups, feature.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarmenu.md`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- GENERATED from navbarmenugroup.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarMenuGroup
|
|
4
|
+
|
|
5
|
+
A named handful of destinations inside a section's panel: a word over a short list, so a reader scanning a panel of twenty links is reading four sets of five rather than twenty of anything. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarMenuGroup } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A section's panel holds more destinations than a reader takes in at once, and they fall into sets — markets, tools, payments
|
|
12
|
+
- Two lists in a panel would be told apart by nothing if the words above them were taken away
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The panel holds few enough destinations that naming sets would be naming one thing each → **NavbarItem**
|
|
17
|
+
- The set is a section of the site rather than a set within one → **NavbarMenu**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- A single destination dressed as a set. The label would be doing the item's job and the item would be saying nothing the label had not
|
|
22
|
+
- Controls. Everything in a group goes somewhere — a switch or a button among a column of links is an action a reader scanning for a place will not expect to find
|
|
23
|
+
- A heading in the page's outline. Nothing here is an h-element: the panel is navigation furniture, and a level inserted for it would be a step in the document's structure that the document never shows
|
|
24
|
+
- Anywhere outside a menu's panel. There is no bar arrangement this fits — the row holds names, and a name with a list under it is what the panel is for
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **label** `string` · required — Always — it is the word over the list and the group's accessible name. Name what the set is rather than what to do with it: 'Markets', not 'Browse markets'
|
|
29
|
+
- never: A sentence. This is a signpost over five links, and a label that needs a verb is a label describing something that should have been a destination of its own
|
|
30
|
+
|
|
31
|
+
## Inside it
|
|
32
|
+
|
|
33
|
+
- Takes only Link.
|
|
34
|
+
- At least 2, no ceiling — fewer is not this component and more is a different one.
|
|
35
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
36
|
+
- Renders 3 parts: root, label, list.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarmenugroup.md`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- GENERATED from navbarpanel.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarPanel
|
|
4
|
+
|
|
5
|
+
The whole of a site's navigation at a width the bar cannot hold it: the mark and a way out across the top, the destinations down the middle, whatever the site wants across the foot. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarPanel } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Navbar is collapsing and its destinations have to go somewhere. This is where, and the bar puts them here without being asked
|
|
12
|
+
- The same navigation has to be read down a phone rather than across a page
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The surface is a sheet rising from the foot of the page rather than the site's navigation → **BottomSheet**
|
|
17
|
+
- What is wanted is a list that opens beside the control that opened it → **DropdownMenu**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- A dialog. This is navigation drawn differently, not a question the reader has to answer — it takes no decision, returns no value, and closing it cancels nothing
|
|
22
|
+
- A page of its own. The destinations here go somewhere; a surface a reader stays on and reads is a page, and this one is covering it
|
|
23
|
+
- A wide screen. Everything in it is already drawn across the bar at that width, and a reader who opens it there is being shown the navigation twice
|
|
24
|
+
- Anything a page opens itself. Navbar renders this, holds whether it is open, and is the thing that knows when the bar stopped fitting
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **label** `string` · required — Always — it names the navigation landmark inside the panel, and this is the only one on the page while the panel is open. Name the set rather than the act: 'Main', not 'Main navigation', because the role already supplies the word
|
|
29
|
+
- never: A heading for the panel. Nothing draws this. The mark at the top says whose site it is and the destinations say what it holds
|
|
30
|
+
- **closeLabel** `string` · required — Always — it names the close button, which draws a glyph and no text and is the only visible way out of a surface covering the whole page. 'Close' is enough; what it closes is the only thing open
|
|
31
|
+
- never: The bar's trigger name. They are two controls in two places, and a reader cannot reach the trigger while this is covering it
|
|
32
|
+
- **onClose** `callback` · required — Always. It is called by the close button and by Escape, so whatever holds the panel open hears both ways it can be dismissed
|
|
33
|
+
- never: Navigation. A reader pressing a destination inside the panel is leaving by a different door, and a handler that also routed would fire twice for one press
|
|
34
|
+
- **brand** `node` · optional — Whatever the bar carries as its mark, passed straight through. Absent only where the bar has none either
|
|
35
|
+
- never: A different mark from the bar's. The panel opened out of the bar and covers it; two marks is two sites
|
|
36
|
+
- **preferences** `node` · optional — The bar has switchers, which it hands over when it collapses. They are drawn under the destinations and above the foot
|
|
37
|
+
- never: The action the site wants pressed. That is the foot's, and a preference drawn beside it would compete with the last thing the panel says
|
|
38
|
+
- **footer** `node` · optional — The bar's utility end has something worth keeping at this width — the conversion, and the language or theme controls. They are drawn across the foot here rather than in a row, because there is width for one control and no room for three
|
|
39
|
+
- never: Destinations. Anything that goes to a section of the site belongs in the children, inside the landmark that announces it as one
|
|
40
|
+
|
|
41
|
+
## Inside it
|
|
42
|
+
|
|
43
|
+
- Takes only NavbarItem, NavbarMenu.
|
|
44
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
45
|
+
- Renders 8 parts: root, header, mark, close, body, destinations, preferences, footer.
|
|
46
|
+
|
|
47
|
+
## Needs mounting
|
|
48
|
+
|
|
49
|
+
Does not work from the import alone: useNavbarPanel. See `.llm/components/navbarpanel.md` for what to mount and where.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarpanel.md`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- GENERATED from navbarswitcher.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarSwitcher
|
|
4
|
+
|
|
5
|
+
Something a reader sets rather than somewhere they go: the language the page is read in, the region its prices are in, the theme it is drawn in. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarSwitcher } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A bar needs a language or region switcher, which is the case this was drawn for
|
|
12
|
+
- A set of choices changes how the page is drawn or worded rather than taking a reader anywhere
|
|
13
|
+
- The set is long enough that a phone should give it the whole panel rather than a dropdown inside one
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The control opens a set of commands rather than a set of choices → **DropdownMenu**
|
|
18
|
+
- The control flips between two states → **ButtonIcon**
|
|
19
|
+
- The items are places the site has → **NavbarMenu**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Navigation. Nothing in here has an href, and a reader who was taken somewhere by a switcher has been told the set was one thing and given another
|
|
24
|
+
- A form field. A select inside a form is a Select: it has a name, it posts a value, and it is read as part of the form rather than as part of the chrome
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **presentation** `enum` · default "floating"
|
|
29
|
+
- `floating` — The switcher is in the bar, which is everywhere a page puts one. The choices hang off the trigger and float over what is beneath
|
|
30
|
+
- `panel` — NavbarPanel is rendering it, and it sets this itself — a page should not. …
|
|
31
|
+
- **tone** `enum` · default "default"
|
|
32
|
+
- `default` — The bar has a light ground under it
|
|
33
|
+
- `inverse` — The bar sits on a dark ground and the ink runs light. Only the tints move — the words take the ink around them either way
|
|
34
|
+
- **label** `string` · required — Always — the choice in force, short enough for a bar. "EN", not "English": a bar is read at a glance and a switcher showing the longest name in the set is a switcher that changes width when somebody picks one
|
|
35
|
+
- **menuLabel** `string` · required — Always — what the set is, for a reader who meets the trigger without seeing the mark beside it. "Language", "Region". The trigger shows the answer; this says what the question was
|
|
36
|
+
- **backLabel** `string` · required — Always. It names the way out of the page the panel form opens, and a glyph pointing left is not a name. Unused in the floating form, which has no page to leave
|
|
37
|
+
- **icon** `node` · optional — A mark saying which question this answers. Nearly always on a bar, where the label is two letters and the glyph is what makes them mean a language
|
|
38
|
+
- **chevron** `boolean` · default false — The floating trigger should say it opens. Off by default because a switcher usually sits among destinations that each carry one. The panel form draws one whatever this says — a row in a list has nothing else to go on
|
|
39
|
+
- never: The panel form, which is not asking
|
|
40
|
+
- **open** `boolean` · optional — A container holds which of several things is open. Standing alone the switcher holds its own
|
|
41
|
+
- **onOpenChange** `callback` · optional — Whenever open is — together they are how a container holds it
|
|
42
|
+
|
|
43
|
+
## Inside it
|
|
44
|
+
|
|
45
|
+
- Takes only NavbarSwitcherOption.
|
|
46
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
47
|
+
- Renders 7 parts: root, trigger, icon, chevron, surface, back, list.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarswitcher.md`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- GENERATED from navbarswitcheroption.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# NavbarSwitcherOption
|
|
4
|
+
|
|
5
|
+
One choice inside a NavbarSwitcher: a language, a region, a theme. …
|
|
6
|
+
|
|
7
|
+
`import { NavbarSwitcherOption } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A NavbarSwitcher needs its choices
|
|
12
|
+
- One of a set of options is in force and a reader should be able to see which
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The row goes somewhere → **NavbarItem**
|
|
17
|
+
- The row is a command in a dropdown → **MenuItem**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- Navigation of any kind
|
|
22
|
+
- A destructive action. A set a reader scans and picks from is the wrong place for anything that cannot be undone by picking again
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- **current** `boolean` · default false — This is the choice in force — the language the page is being read in. Exactly one of a set carries it
|
|
27
|
+
- never: Marking a recommended or default option. It says what is true now, not what a reader should pick
|
|
28
|
+
- **onSelect** `callback` · required — Always. Choosing is the whole of what this does, and a row that reported nothing would be a row that did nothing
|
|
29
|
+
|
|
30
|
+
## Inside it
|
|
31
|
+
|
|
32
|
+
- Takes only text.
|
|
33
|
+
- 6 components are refused inside it; the list and the reasons are in the long document.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/navbarswitcheroption.md`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- GENERATED from option.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Option
|
|
4
|
+
|
|
5
|
+
One answer on offer inside a control that opens a list. …
|
|
6
|
+
|
|
7
|
+
`import { Option } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An answer inside a control that opens a list — a SelectChip today. One of these per option in the set
|
|
12
|
+
|
|
13
|
+
## Something else, when
|
|
14
|
+
|
|
15
|
+
- Pressing it should do something rather than record an answer → **MenuItem**
|
|
16
|
+
- The row is one of a few and all of them fit on the page → **FilterChip**
|
|
17
|
+
|
|
18
|
+
## Never
|
|
19
|
+
|
|
20
|
+
- Anything outside a list that a control owns. It is an <li> announced as an option, which means nothing without that list — a screen reader meeting one loose reports a bare list item
|
|
21
|
+
- A heading over a group of answers, or a line between two groups. A row announced as an option that cannot be taken is a dead end the reader has to arrow past, and they will try it first
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
- **size** `enum` · default "sm" — Set by the control so the list matches the chip it hangs from. A row is as tall as the control it opened from, which is what makes the list read as the chip opened rather than as a separate thing beneath it
|
|
26
|
+
- `sm` — The default, and the step a SelectChip at its own default opens
|
|
27
|
+
- `md` — Touch-first, where the row is also the target and a finger has to land inside it
|
|
28
|
+
- never: Varying within one list. Rows of two heights in one set read as two lists that happen to touch
|
|
29
|
+
- **selected** `boolean` · default false — Set by the control that owns the list, not by a page. …
|
|
30
|
+
- never: Marking a recommended answer. Chosen means the reader chose it, and a row that arrives already marked implies an act nobody took
|
|
31
|
+
- **active** `boolean` · default false — Whether the arrow keys are resting here. The control's to set: only the control knows where the keys are, and only one row can be right at a time. …
|
|
32
|
+
- never: Marking the answer. That is selected, and a ground saying both would have to rank one against the other
|
|
33
|
+
- **disabled** `boolean` · default false — This one answer cannot be taken. The row stays in the list and stays readable, because a set that hides what it will not accept leaves the reader hunting for something that was there last week
|
|
34
|
+
- never: Most of the set. A list where nearly nothing can be taken is the wrong list, and a row that simply refuses does not say why
|
|
35
|
+
- **value** `string` · required — What the control reports when this row is taken. A stable code rather than the words, so the words can be reworded or translated without changing what anything submits
|
|
36
|
+
- never: The words themselves, where they happen to look like a code. "EN" reads as both and is one of them — a value that doubles as a label is a value nobody can change later
|
|
37
|
+
- **leadingIcon** `node` · optional — A mark the reader knows the answer by — a flag on a language, a glyph on a market. For a set met before, where recognising is faster than reading. …
|
|
38
|
+
- never: Decoration, or a set where the names are the only thing telling the answers apart — a column of marks that all mean "an option" costs an indent down the whole list and buys nothing. And never for anything pressable: a control inside a row is a tab stop the pattern has no room for
|
|
39
|
+
- **description** `string` · optional — What the name does not say on its own — a code beside a market, where an answer applies. Give it where two answers are hard to tell apart by name, and leave it out where the name is the whole of the answer
|
|
40
|
+
- never: Guidance about the control, which belongs beside it: written here it is read once per answer instead of once. Nor a sentence — this is one line and cut at its end, so anything long arrives truncated and says less than nothing
|
|
41
|
+
|
|
42
|
+
## The type refuses
|
|
43
|
+
|
|
44
|
+
- disabled=true with state="hover" — A row that cannot be taken does not answer the pointer, so there is no ground for it to take. …
|
|
45
|
+
|
|
46
|
+
## Inside it
|
|
47
|
+
|
|
48
|
+
- Takes only text.
|
|
49
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
50
|
+
- Renders 6 parts: root, leading-icon, text, label, description, tick.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/option.md`.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- GENERATED from pagination.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Pagination
|
|
4
|
+
|
|
5
|
+
The control that moves a reader through a set too large to show at once. …
|
|
6
|
+
|
|
7
|
+
`import { Pagination } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An index or archive has been split across pages and the reader needs to move through it — a blog listing, a news archive, a resource library. …
|
|
12
|
+
- The reader needs to reach a particular page rather than step towards it — page fourteen of forty, in one press. …
|
|
13
|
+
- The pages have addresses a search engine should follow. …
|
|
14
|
+
- How much is left matters as much as where the reader stands. …
|
|
15
|
+
- The reader is walking a short visual sequence and what they want to know is where they are in it rather than what that position is called — a carousel of cards, a testimonial slider, a walkthrough. …
|
|
16
|
+
|
|
17
|
+
## Something else, when
|
|
18
|
+
|
|
19
|
+
- The reader is moving between views of one page rather than through one long set → **TabList**
|
|
20
|
+
- More results are appended to the view as the reader reaches the end, rather than one page replacing another → **Button**
|
|
21
|
+
- The reader is hunting for one row among thousands rather than walking the set → **SearchInput**
|
|
22
|
+
|
|
23
|
+
## Never
|
|
24
|
+
|
|
25
|
+
- A set that fits on one page. There is nothing to move between, and a control offering to move is read as a promise that there is more — so the reader presses it, nothing happens, and they are left unsure whether the control or the results are at fault
|
|
26
|
+
- Placing above the content it governs. The reader decides whether to move on only after seeing what is here, so a control above the results asks the question before they hold the answer — and on a long page it puts the control off screen at exactly the moment they want it
|
|
27
|
+
- Ten or more positions under the dots variant. A dot carries no number, so a reader working out where they are is counting marks; past a handful the marks are too small and too many to count, and the row degrades into saying only "somewhere in the middle"
|
|
28
|
+
- Standing in for a filter. Handing a reader four hundred pages is not giving them access to the set, it is giving them the shape of it — the answer is a narrower query, and pagination is what works once the set is small enough to walk
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
- **variant** `enum` · default "pages"
|
|
33
|
+
- `pages` — An index or archive whose pages have addresses of their own — a blog listing, a news archive, a resource library. …
|
|
34
|
+
- `count` — A long set where the reader's real question is how much is left rather than which page they are on — "page 3" says nothing until you know whether there are four pages or four hundred. …
|
|
35
|
+
- `compact` — A place with no room for a row of numbers — a card footer, a sidebar, a column at a phone's width. Position and the two steps, and nothing else. …
|
|
36
|
+
- `none` — The two steps and nothing between them, for a place where position is either obvious or beside the point — a lightbox moving through images, a set of two. …
|
|
37
|
+
- `dots` — A carousel of cards, a testimonial slider, a walkthrough — a short visual sequence where the reader cares where they are rather than what that position is called. …
|
|
38
|
+
- never: Choosing by the width available rather than by the reader's question. The five answer different questions, and which one is being asked comes from the content above the control, not the room beneath it. …
|
|
39
|
+
- **showSteps** `boolean` · default true — Whether the two step controls are drawn, under the dots variant. True wherever this component is the way through the set, which is nearly all of them. …
|
|
40
|
+
- never: Any variant but dots, where it is inert rather than obeyed — the same as siblingCount under count, or totalItems under pages. Dots is the only middle holding targets of its own, so it is the only row that still works once the arrows go. …
|
|
41
|
+
- **page** `number` · default 1 — Always — it is which page is on screen, counting from one, and the component renders around it rather than holding it. …
|
|
42
|
+
- never: Half a controlled component. Passing this without updating it when onPageChange fires gives a row that cannot move — the reader presses, the number stays, and the control reads as broken. …
|
|
43
|
+
- **totalPages** `number` · default 1 — How many pages the set has been divided into. It decides where the row ends, when the ellipsis appears, and when next goes disabled. …
|
|
44
|
+
- never: A count of items. That is totalItems, and passing one for the other gives a reader four hundred page numbers for forty pages of results. Nor for an unknown total: a number invented so the component would render is a promise about how much is left, and the reader has no way to tell it from a real one
|
|
45
|
+
- **onPageChange** `callback` · optional — What the page does when the reader asks for another one, counting from one. Required wherever the route to a page is a press rather than a destination: the dots variant always, and the steps under any variant given no pageHref. …
|
|
46
|
+
- never: Navigating by hand when pageHref would do it. A press handler that sets window.location is an anchor with its advantages removed — no cmd-click, no destination in the status bar, nothing for a crawler to follow
|
|
47
|
+
- **pageHref** `callback` · optional — The address of a page, given the page number. Passing it makes every route to a page an anchor: the numbered targets, and both steps. …
|
|
48
|
+
- never: A carousel or any sequence whose positions have no address. A slide is not a place, so a link to one is a link to nowhere and the dots variant ignores this entirely. …
|
|
49
|
+
- **totalItems** `number` · optional — How many results there are altogether, where that is known. …
|
|
50
|
+
- never: A count of what is on this page. It is the whole set, which is what makes the range in front of it mean anything. Nor an estimate presented as exact: a reader shown a total treats it as one, and a number that moves as they page through the set reads as the results changing underneath them
|
|
51
|
+
- **pageSize** `number` · optional — How many items each page holds, which is what lets the count variant work out the range on screen from the page number alone. Pass it alongside totalItems; on its own it has nothing to be a fraction of. …
|
|
52
|
+
- never: Changing how many items are fetched. This component displays and nothing else — the fetch is the consumer's, and a page size passed here while the query still asks for a different number produces a readout that describes a page nobody is looking at
|
|
53
|
+
- **siblingCount** `number` · default 1 — How many numbered pages sit around the current one before the row breaks, under the pages variant. …
|
|
54
|
+
- never: Widening the row until nothing is hidden. Past a few siblings the row is longer than the eye scans, and a reader who needs page 200 of 400 is not served by seeing 199 either. What widening removes is also a control now rather than a mark: the break it takes away was the menu that reached those pages in one press
|
|
55
|
+
- **label** `string` · default "Pagination" — Always, and the default is almost always right. It names the landmark rather than the content — a screen reader user listing what is on a page hears this, and a nav with no name is one they cannot tell from the page's other navigation. …
|
|
56
|
+
- never: Describing where the reader is. That is the summary's job and aria-current's, both of which change as the reader moves, while this does not — a landmark renamed on every press is one that cannot be navigated to
|
|
57
|
+
- **previousLabel** `string` · default "Previous page" — The accessible name for the step-back control, which is a glyph and therefore announces nothing on its own. Override it to translate it, or where "page" is the wrong noun for what is being stepped through
|
|
58
|
+
- never: Visible text. Nothing here renders it — it is the button's name, not its content, and a row that showed the words would be a different control at a different width
|
|
59
|
+
- **nextLabel** `string` · default "Next page" — The accessible name for the step-forward control, for the reason previousLabel exists. Keep the two parallel: a pair reading "Next page" and "Go back" is two people's wording in one control
|
|
60
|
+
- never: Visible text, for the reason previousLabel is not
|
|
61
|
+
- **morePagesLabel** `string` · default "More pages" — The accessible name for the break between two runs of numbered pages — the control that opens a menu of the pages that break stands for. …
|
|
62
|
+
- never: Visible text, for the reason previousLabel is not. Nor for naming the range it covers: which pages a break stands for changes with every step the reader takes, and a name that went stale would be read out long after it stopped being true
|
|
63
|
+
|
|
64
|
+
## Inside it
|
|
65
|
+
|
|
66
|
+
- 4 components are refused inside it; the list and the reasons are in the long document.
|
|
67
|
+
- Renders 8 parts: root, list, summary, dot, dot-mark, step, page, break.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/pagination.md`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- GENERATED from removablechip.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# RemovableChip
|
|
4
|
+
|
|
5
|
+
A token standing for one thing that is already in play — a topic the reader has filtered by, a tag on an article, a market they have picked out — which they can take back out. …
|
|
6
|
+
|
|
7
|
+
`import { RemovableChip } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- An index shows the narrowings currently applied above its results, and each has to come off on its own without clearing the rest
|
|
12
|
+
- The reader has assembled something across a page — markets on a comparison, topics on a subscription form — and needs to see and unpick what is in it
|
|
13
|
+
- What was chosen is worth showing as a token rather than as a sentence, because the reader will act on individual pieces of it
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The token is turned on and off rather than added and taken away → **FilterChip**
|
|
18
|
+
- The thing named cannot be taken away and is there to be read — a category on a card, a status on a plan → **Badge**
|
|
19
|
+
- The token is really a link to the thing it names → **Link**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Something the reader cannot get back. The cross is a small target beside the words and it is pressed by accident, so what a chip removes should be recoverable from whatever added it
|
|
24
|
+
- An action other than removal. There is one control here and its meaning is fixed; a cross that archived or edited would be the same glyph meaning something else
|
|
25
|
+
- A sentence. Chips are read as a set at a glance, and one carrying a phrase makes the row unreadable and pushes the rest out of view
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **disabled** `boolean` · default false — 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
|
|
30
|
+
- never: The reader could act on it if they knew what to change. This says the act is closed and nothing about why, so a reason belongs in the prose around the set
|
|
31
|
+
- **size** `enum` · default "sm" — How dense the row is, matched to whatever it sits beside. It takes the same control ramp a FilterChip does, so the two never sit at different heights in one row
|
|
32
|
+
- `sm` — The default, and the same measure a FilterChip takes at its own default, so a row holding both sits level
|
|
33
|
+
- `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
|
|
34
|
+
- never: Marking one token in a set as more important. They are a set of equals and a row of mismatched heights reads as a mistake before it reads as emphasis
|
|
35
|
+
- **label** `string` · required — 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
|
|
36
|
+
- never: Describing what the cross does. That is removeLabel, which a screen reader reads and nobody sees
|
|
37
|
+
- **leadingIcon** `node` · optional — A glyph makes the kind of thing recognisable before the words are read. It sits before the name and never replaces it. …
|
|
38
|
+
- never: Decoration. A row where every token carries the same mark reads more slowly than the names alone would
|
|
39
|
+
- **onRemove** `callback` · required — 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
|
|
40
|
+
- never: Clearing the value while leaving the token. Removing a chip removes the thing; a cross that empties something and leaves its token behind tells the reader it is still there
|
|
41
|
+
- **removeLabel** `string` · default "Remove" — 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
|
|
42
|
+
- never: Visible text. Nothing here renders it — the cross is the whole of what is drawn
|
|
43
|
+
|
|
44
|
+
## Inside it
|
|
45
|
+
|
|
46
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
47
|
+
- Renders 5 parts: root, icon, label, remove, remove-icon.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/removablechip.md`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- GENERATED from row.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Row
|
|
4
|
+
|
|
5
|
+
A line, and one measure between the things on it. It draws nothing — no ground, no edge, no padding — and owns one decision: how far apart the things beside one another sit. …
|
|
6
|
+
|
|
7
|
+
`import { Row } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Two or more things are read across rather than down, and the space between them is the same all the way along — a glyph and its label, a title and the action beside it, a set of controls …
|
|
12
|
+
- The spacing is a fact about the group rather than about any member of it. …
|
|
13
|
+
- The items are of different heights and something has to decide how they meet — centred on the line, level at the top, or sitting on one another's baseline. …
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The things are read one above the next → **Stack**
|
|
18
|
+
- The things must line up down the page as well as across it → **Grid**
|
|
19
|
+
- The set is longer than the line and has to stay on one line → **Scroller**
|
|
20
|
+
- The things across are the fields of one record, and the record repeats down the page → **Table**
|
|
21
|
+
|
|
22
|
+
## Never
|
|
23
|
+
|
|
24
|
+
- Padding. It sets space between its children and none at all around them, so a row reached for to inset a region leaves the surface that should have carried the padding with none — and the inset now lives on an element that has no ground to sit on
|
|
25
|
+
- A single child. A line of one has nothing to space: the gap is inert, and what is left is an element that renders, costs a node, and explains nothing to the next person to read it
|
|
26
|
+
- Reaching a width. It is as wide as whatever holds it and declares no size of its own. A row used to constrain a measure is a width hidden inside a spacing decision, in the one place nobody will search for it
|
|
27
|
+
- Building a grid out of wrapping. Wrap is what a line does when it has run out of room, not a way of arranging things in columns: the last line is as long as whatever is left, and no item on it sits under an item above. It looks like a grid at the width it was designed at and at no other
|
|
28
|
+
- Separating two things that a surface, a rule or a ground already separates. Two answers to one gap is how a view stops having a rhythm worth reading
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
- **gap** `enum` · default "sm" — Always. The measure between items is the component's one decision and the reason it exists, so there is no case for leaving it unstated
|
|
33
|
+
- `none` — No gap at all, for a line whose marks are meant to read as one object rather than as a list of controls. The only step here that is a decision rather than a measure
|
|
34
|
+
- `xs` — The tightest gap between related elements: a glyph and its label, a pair of words read as one, inline text pairs
|
|
35
|
+
- `sm` — The default, and what the token names for a line of sibling controls — buttons in a row, a label and the field beside it
|
|
36
|
+
- `md` — The step the token names for stacked items — form fields, feature list items, pricing features — taken across: peers that are not controls, where the control step would make them read as one object
|
|
37
|
+
- `lg` — Between content groups — feature cards, footer columns, one pricing plan beside the next
|
|
38
|
+
- `xl` — Between the parts of a card, or between a heading and the block beside it. Drops one step below 768px, a phone having a third of the width to spend
|
|
39
|
+
- `2xl` — Between one section of a page and the next, set side by side. Drops one step below 768px, a phone having a third of the width to spend
|
|
40
|
+
- `3xl` — The largest gap, for separating whole movements of a page laid out across. Drops one step below 768px, a phone having a third of the width to spend
|
|
41
|
+
- never: Reaching a distance. The gap is a relationship between two items rather than a measure from anything — a step picked because it puts something where it looks right is a position written in the wrong units, and it is wrong at the next width
|
|
42
|
+
- **align** `enum` · default "center" — How items of different heights meet across the line. The default is the common case and the one that keeps a glyph reading as part of the label beside it
|
|
43
|
+
- `start` — Items keep their own height and sit against the top of the line — a label beside a paragraph that runs to several lines, where centring would set the label against the middle of the block
|
|
44
|
+
- `center` — The default. Items are centred across the line, which is what things of different heights want — a glyph beside a label, a badge beside a title, an avatar beside a name
|
|
45
|
+
- `end` — Items keep their own height and sit against the bottom of the line
|
|
46
|
+
- `stretch` — Every item takes the full height of the line, which is what a line of cards or panels wants when they should finish level however much is in each
|
|
47
|
+
- `baseline` — The first line of text in each item sits on one line. …
|
|
48
|
+
- never: Giving the line a height. Every value here arranges items within whatever height the tallest of them establishes; none of them adds any. A line that should be taller than its contents is a control with a size, and size.control is what carries that
|
|
49
|
+
- **justify** `enum` · default "start" — Where the items sit along a line that is wider than they need. Reach for it only where something has given the line a width
|
|
50
|
+
- `start` — The default. Items sit at the leading edge, and a line with no width of its own is exactly as wide as they are
|
|
51
|
+
- `center` — Items sit together in the middle of a line wider than they are
|
|
52
|
+
- `end` — Items sit against the trailing edge — the shape the actions closing a dialog or a form take, that being where a flow ends
|
|
53
|
+
- `between` — The first item at the leading edge, the last at the trailing, and whatever room is spare shared between them — a title on one side and its action on the other
|
|
54
|
+
- never: Pushing one item away from the others. `between` shares the room out between every pair, so a line of three ends with one stranded in the middle that nobody put there. Where one item belongs apart from the rest, the line has two items and one of them is a Row of its own
|
|
55
|
+
- **wrap** `boolean` · default false — The line may break onto another when it runs out of room, rather than squashing its items or running off the edge. For a set whose length the page cannot predict — chips a reader has added, tags on a record, a group of filters
|
|
56
|
+
- never: Building a grid. A wrapped line is ragged by construction: the last line holds whatever is left, and no item on it sits under an item above. Where the items must agree in both directions that is Grid, and where they must stay on one line it is Scroller — wrapping is the answer only when neither the columns nor the line matter
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/row.md`.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- GENERATED from scroller.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Scroller
|
|
4
|
+
|
|
5
|
+
A rail, and one measure between the things on it. …
|
|
6
|
+
|
|
7
|
+
`import { Scroller } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A set is longer than the space and its order is worth keeping — steps in a sequence, results already ranked, a timeline, a run of chips a reader is scanning rather than comparing …
|
|
12
|
+
- The things are of a kind and of a size, so a line of them reads as a line rather than as a row of unrelated objects that happen to be beside one another
|
|
13
|
+
- Seeing part of the next item is what tells the reader there is more. …
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- Everything fits, or should be made to fit → **Row**
|
|
18
|
+
- The set may break onto a second line and nothing is lost by it → **Row**
|
|
19
|
+
- The items should line up in columns as well → **Grid**
|
|
20
|
+
- The region scrolls down rather than across → **nothing in this system does this**
|
|
21
|
+
|
|
22
|
+
## Never
|
|
23
|
+
|
|
24
|
+
- Hiding a set that should be seen. Anything past the first screenful is found only by a reader who knows to look, so a rail holding the one thing a page exists to say has hidden it behind a gesture. What is off the edge is optional by construction
|
|
25
|
+
- Navigation a reader must be able to survey. A set of destinations that does not fit is a set that needs a menu, a panel or fewer destinations — a rail makes the reader move to find out what their options are, and they cannot count what they cannot see
|
|
26
|
+
- Padding. It sets space between its items and none at all around them, and a rail reached for to inset a region leaves the surface that should have carried the padding with none
|
|
27
|
+
- One child. A rail of one never scrolls: what is left is a focusable, named, grouped region announcing itself around a single item the reader could already see
|
|
28
|
+
- A table that is too wide. Cells that must line up with the cells above them are a table's columns, and a table scrolls itself — wrapping one in a rail takes the header out of the region that scrolls, so the columns and their names come apart
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
- **gap** `enum` · default "lg" — The measure between items along the rail, and the one place it differs from the same measure elsewhere: a gap ends at the last item, where margins on the items would run on past it and turn the end of the rail into scrollable emptiness the reader is dragged into …
|
|
33
|
+
- `none` — No gap at all, for a rail whose marks are meant to read as one object rather than as a set. The only step here that is a decision rather than a measure
|
|
34
|
+
- `xs` — The tightest gap between related elements, for a rail read as one strip rather than as separate items
|
|
35
|
+
- `sm` — The step the token names for sibling controls — a rail of chips, filters or small marks
|
|
36
|
+
- `md` — The step the token names for stacked items, taken across: items that are peers but not controls, where the control step would run them together
|
|
37
|
+
- `lg` — The default, and what the token names for feature cards, footer columns and pricing plans — the rail of cards this is most often reached for
|
|
38
|
+
- `xl` — Between the parts of a card, taken along a rail — items that each hold a picture as well as words. Drops one step below 768px, a phone having a third of the width to spend
|
|
39
|
+
- `2xl` — Between one section of a page and the next, laid along a rail. Drops one step below 768px, a phone having a third of the width to spend
|
|
40
|
+
- `3xl` — The largest gap, for separating whole movements of a page laid along a rail. Drops one step below 768px, a phone having a third of the width to spend
|
|
41
|
+
- never: Reaching a distance. The gap is a relationship between two items rather than a measure from anything, and one picked to make a particular item land at the edge is a position written in the wrong units — it lands elsewhere at every other width
|
|
42
|
+
- **align** `enum` · default "stretch" — How items of different heights meet across the rail. The default is what keeps a run of cards reading as a run
|
|
43
|
+
- `start` — Items keep their own height and sit against the top of the rail, so a short item ends early rather than being drawn out to match its neighbours
|
|
44
|
+
- `center` — Items keep their own height and sit in the middle of the rail
|
|
45
|
+
- `end` — Items keep their own height and sit against the bottom of the rail
|
|
46
|
+
- `stretch` — The default. Every item takes the full height of the rail, so a run of cards finishes level however much is in each
|
|
47
|
+
- never: Giving the rail a height. Every value here arranges items within the height the tallest of them establishes; none of them adds any
|
|
48
|
+
- **snap** `boolean` · default false — Each stop lands an item against the leading edge rather than wherever the gesture ended. For a rail of items of one size that the reader steps through — cards, slides, a set of positions
|
|
49
|
+
- never: A rail being scanned rather than stepped through. Snapping takes the scroll away from the reader at every item, which is help when each item is a destination and a fight when they are looking for one of them. It is also wrong for items of different widths, where the stops are unevenly spaced and the rail feels broken rather than assisted
|
|
50
|
+
- **label** `string` · required — Always. The rail is a focusable region, so it is announced when a reader arrives at it — and without a name it announces "group" and nothing else, telling them something is there but not what. …
|
|
51
|
+
- never: Repeating a heading the reader has just met. Where a visible heading already names the set, this says the same thing twice in a row — the announcement is the heading, then the group with the same words. Name what distinguishes this rail from the others on the view
|
|
52
|
+
|
|
53
|
+
## Inside it
|
|
54
|
+
|
|
55
|
+
- 2 components are refused inside it; the list and the reasons are in the long document.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/scroller.md`.
|