@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,47 @@
|
|
|
1
|
+
<!-- GENERATED from aspectratio.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# AspectRatio
|
|
4
|
+
|
|
5
|
+
A box that holds one shape whatever is put in it, so a page reserves the room a picture will take before the picture arrives. …
|
|
6
|
+
|
|
7
|
+
`import { AspectRatio } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A picture whose proportions have to match the ones beside it — a row of cards, a grid of markets, a set of logos. …
|
|
12
|
+
- Room that must be reserved before the thing filling it arrives — art loaded late, an embed, anything fetched. …
|
|
13
|
+
- An embed that brings its own proportion and no height — a video, a map, a third-party frame. …
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The picture is the media region of a card → **CardBody**
|
|
18
|
+
- The thing inside has a size of its own and should keep it → **nothing in this system does this**
|
|
19
|
+
- The shape changes with the viewport → **nothing in this system does this**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Spacing. It reserves a shape, not room around one: a box used to push things apart is a margin written somewhere nobody will look for it
|
|
24
|
+
- Text. Prose has no proportion of its own — it is as tall as it needs to be at the width it is given, and a box that crops it is a box that hides a sentence
|
|
25
|
+
- Anything that must be read in full. It crops, and crops the same way every time regardless of what matters in the picture: a chart with a legend at its foot loses the legend, and nothing reports it
|
|
26
|
+
- Making an image smaller. The box decides a shape and not a size — how much room it takes is the layout's, and a ratio set to make something fit is a width written in the wrong units
|
|
27
|
+
- A box whose height is set and whose width is not. The ratio turns a width into a height, and this one takes all of the width it is given — so a height set on top of that is a second answer to the same question, and the box is drawn off ratio with nothing reporting it. …
|
|
28
|
+
- A parent that sizes to its contents — an inline-flex row, a fit-content box, a float. The width comes from the container, and a container measuring itself by what is inside it has none to give: the box contributes no intrinsic width, resolves to nothing, and collapses. …
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
- **ratio** `enum` · default "widescreen" — The shape the box holds, at every width. It is the component's one decision and the reason it exists, so there is no case for leaving it unstated
|
|
33
|
+
- `portrait` — Taller than wide, for a picture read on a phone where the width is the constraint — a card whose image carries the card, a person, a product standing up. …
|
|
34
|
+
- `square` — Equal sides, for a set that repeats — a grid of logos, a row of market tiles, an avatar’s frame. …
|
|
35
|
+
- `landscape` — Wider than tall and barely so — the shape a photograph or a screenshot arrives in before anything crops it. …
|
|
36
|
+
- `widescreen` — The default, and the shape most moving media already is: an embedded video, a screen recording, a still from one. …
|
|
37
|
+
- `ultrawide` — Far wider than it is tall, for a hero or a section break where the picture is scenery rather than subject. …
|
|
38
|
+
- never: Fitting a particular image. The ratio is a decision about the layout — what shape this slot is — and the picture is what has to answer it. Choosing the value that crops one photograph least is how a row ends up with four slots at four shapes, which is the thing the box was put there to stop
|
|
39
|
+
|
|
40
|
+
## Inside it
|
|
41
|
+
|
|
42
|
+
- At least 1, at most 1 — fewer is not this component and more is a different one.
|
|
43
|
+
- 2 components are refused inside it; the list and the reasons are in the long document.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/aspectratio.md`.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!-- GENERATED from badge.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Badge
|
|
4
|
+
|
|
5
|
+
A short word marking something as new, chosen or reduced. …
|
|
6
|
+
|
|
7
|
+
`import { Badge } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- One of a set is the one the page wants read first — the plan most people choose, the market most people start with
|
|
12
|
+
- Something is new or has changed, and saying so is worth a word rather than a sentence
|
|
13
|
+
- A number the page is promoting is worth marking as a saving rather than left in the copy — a percentage off, a period free
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- What it says is a state the reader's account is in → **nothing in this system does this**
|
|
18
|
+
- The words are the point rather than the mark → **CardBody**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- A status. There is no success, warning or danger ground here on purpose: those roles report what happened to a reader who did something, and a landing page's reader has not done anything yet
|
|
23
|
+
- Metadata that should be plain text. A date, a category, a count — a pill around each one turns a card into a row of labels and the badge into decoration
|
|
24
|
+
- More than one per thing. Two badges on one card are two claims about which is the important one, and a reader believes neither
|
|
25
|
+
- A control. It does nothing when pressed and takes no focus — something a reader acts on is CardButton, which is a target rather than a mark on one
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **variant** `enum` · default "accent"
|
|
30
|
+
- `accent` — The default, and the one a marketing page nearly always wants. …
|
|
31
|
+
- `neutral` — The badge is naming a kind rather than making a claim — a category on an article, a market type on a card. It marks without asking, which is what lets a page use several without the set becoming loud
|
|
32
|
+
- never: Ranking two badges against each other. The variants are two different jobs rather than two volumes of one: neutral names a kind and accent makes a claim, so a set mixing them is not a set with a most-important member
|
|
33
|
+
- **label** `string` · required — Always — it is the whole component. One or two words: 'New', 'Most popular', 'Save 20%'. …
|
|
34
|
+
- never: A sentence. What does not fit on one line is not a badge, and `white-space: nowrap` will let it run out of its own card rather than wrap — which is the component saying so
|
|
35
|
+
- **icon** `node` · optional — A glyph that says what the badge is about faster than its word does — a globe on a badge reading 'For platforms', a spark on one reading 'New'. Pass the glyph; the badge draws it at its own step. Alongside the label and never instead of it. …
|
|
36
|
+
- never: Carrying the meaning. A badge is one or two words and a mark beside them; a badge that is only a mark says nothing to a screen reader and nothing to a reader who does not already know the shape. A solid or light glyph. …
|
|
37
|
+
|
|
38
|
+
## Inside it
|
|
39
|
+
|
|
40
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
41
|
+
- Renders 2 parts: root, icon.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/badge.md`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!-- GENERATED from bottomsheet.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# BottomSheet
|
|
4
|
+
|
|
5
|
+
A panel that rises from the bottom edge to hold a single focused task on small screens. …
|
|
6
|
+
|
|
7
|
+
`import { BottomSheet } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A task needs the screen's full width and the reader's undivided attention — a set of filters, a confirmation, an option picker
|
|
12
|
+
- The choice is the whole of what the reader is doing, and the page behind it is context rather than something to work in
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The message is a passing notification the reader does not have to answer → **nothing in this system does this**
|
|
17
|
+
- The viewport is wide enough for a centred modal → **nothing in this system does this**
|
|
18
|
+
- The reader is choosing one answer from a set, inside a form → **nothing in this system does this**
|
|
19
|
+
- A short description of the control the pointer is on → **Tooltip**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Desktop viewports. The sheet stops growing at size.sheet.max and centres, which keeps it readable on a tablet — but nothing in this component refuses a wide screen, there being no breakpoint in a contract and no media query in the generated stylesheet. …
|
|
24
|
+
- Anything the reader must be able to see the page behind while doing. The scrim dims the page and swallows every press on it, which is the point: a sheet is a task, not a panel
|
|
25
|
+
- A second sheet on top of the first. Composition forbids the nesting, and the reason is the way out: two scrims stack, the second sheet's Escape shuts only itself, and a reader who has lost track of how deep they are has no way to read it off the screen
|
|
26
|
+
- Content the sheet is expected to hide from a screen reader when shut. The sheet stays mounted so it has something to animate from, and what removes it from the reading order while closed is `visibility: hidden` in the generated stylesheet — which means it is removed by CSS and not by the markup. …
|
|
27
|
+
- Holding the open state itself. `open` is the consumer's, always: the sheet reports that it wants to close through onOpenChange and changes nothing on its own, so a page that never answers that callback has built a sheet with no way out
|
|
28
|
+
- Deciding what the task looks like. The sheet draws a handle, a header and a scrim, and hands the rest over as one slot — there is no footer prop and no description of what belongs at the bottom, because a component that fixed the shape of a confirmation would be wrong for a filter and wrong again for a picker. …
|
|
29
|
+
- Holding a reader in. A press outside the sheet and Escape always close it, and neither flag can turn that off — a surface that answers neither is a trap, and a keyboard reader has no third way. A task that genuinely must be finished asks for that in its content, and takes the answer it is given
|
|
30
|
+
|
|
31
|
+
## Props
|
|
32
|
+
|
|
33
|
+
- **open** `boolean` · default false — The sheet is showing. The consumer owns this outright — the sheet never sets it, and asks to be closed through onOpenChange instead. Flipping it is the whole animation. …
|
|
34
|
+
- never: Keeping a sheet on screen the reader has asked to leave. Refusing to answer onOpenChange does not make the sheet modal, it makes it stuck: Escape, the scrim and the close button all report and none of them acts
|
|
35
|
+
- **height** `enum` · default "hug"
|
|
36
|
+
- `hug` — The sheet is as tall as what is in it, up to the screen. The default, and right for anything bounded — a handful of choices, a confirmation, a summary. …
|
|
37
|
+
- `tall` — The sheet takes the screen, less a strip of page at the top. …
|
|
38
|
+
- `full` — The sheet is the screen: no strip of page and square corners, with the header's row of controls meeting the top of it. …
|
|
39
|
+
- never: A middle height — half the screen for a list, say. …
|
|
40
|
+
- **title** `string` · required — Always. It is the sheet's accessible name as well as its heading, so a sheet without one is announced as a dialog and nothing else. …
|
|
41
|
+
- never: A sentence of explanation. That is the description, which sits under this and is announced after it — a title that runs to a sentence is read out in full every time the sheet opens, and is cut with an ellipsis here rather than wrapping. …
|
|
42
|
+
- **showTitle** `boolean` · default true — The default, and almost always right. Turn it off where the content immediately under the header already names the task and a second visible name would say it twice — a picker whose first row is the heading, a sheet that is one photograph. …
|
|
43
|
+
- never: A sheet whose purpose is merely obvious to whoever built the screen. What is obvious beside the thing it opens from is not obvious to a reader hearing the page one control at a time, and turning this off hides the name from everyone who can see and nobody who cannot. …
|
|
44
|
+
- **description** `string` · optional — The title needs qualifying — what the task applies to, or what it still needs before it can be done. "Date and both airports required", or the account a transfer is coming from. It sits directly under the title and is announced with it
|
|
45
|
+
- never: A sentence, and anything longer than one. It has the sheet's full width, the controls being above the panel rather than either side of it — but it is cut rather than wrapped, so a sentence does not arrive shorter, it arrives with its end missing. …
|
|
46
|
+
- **showClose** `boolean` · default false — The way out has to be visible — a sheet over a task the reader may not realise they can leave, or one whose content reaches the top of the screen so there is little scrim left to press. …
|
|
47
|
+
- never: Deciding whether the sheet can be left. It cannot stop that and does not try, which is what the name is for — it used to be `dismissible`, which read as the permission rather than the button: a press outside the sheet and Escape always close it, whatever this says. …
|
|
48
|
+
- **back** `node` · optional — The sheet is a step rather than the whole task — one of a sequence, or a panel reached from another panel — and the reader needs the step before it. One control, icon-only, at the leading edge above the sheet, opposite the way out. …
|
|
49
|
+
- never: The way out. That is showClose, at the other end, and the two must not be confused by putting a dismiss glyph here — a reader who takes one for the other loses the task. Back undoes a step; close abandons the sheet. …
|
|
50
|
+
- **action** `node` · optional — The screen needs one more control above the sheet — a confirm for a form the sheet is collecting, help for a task that needs explaining. …
|
|
51
|
+
- never: A size other than md. It no longer takes the title off the centre line — out of the row, nothing it does moves the words below it — but it shares a line with the close button, and a larger control beside a size.control.md one is two controls that were meant to match and do not. …
|
|
52
|
+
- **showHandle** `boolean` · default true — On by default. It draws the handle at the top of the sheet — the bar that says the surface can be moved, which is the cheapest way to say so. It does not decide whether the pull works. …
|
|
53
|
+
- never: Turning the gesture off. It draws the handle and nothing more — a pull is answered on a sheet with a close button and on one with neither, the same way a press outside it is. The name says that now; it used to be `dragToDismiss`, which claimed a power over the gesture it never had. …
|
|
54
|
+
- **onOpenChange** `callback` · required — Always. The sheet does not close itself, so this is the only way out — write the first argument straight back to `open`. …
|
|
55
|
+
- never: Doing the task. This fires when the sheet is being left, including when it is being left unanswered — commit from the actions in the footer, where the reader pressed something that says what it does
|
|
56
|
+
|
|
57
|
+
## The type refuses
|
|
58
|
+
|
|
59
|
+
- showHandle=true with showClose=true — A sheet says how to leave it once. …
|
|
60
|
+
- height="full" with showClose=false — A full sheet has taken away every other visible way out: the scrim is entirely covered, and there is no strip of page above the surface to say a page is still there. …
|
|
61
|
+
|
|
62
|
+
## Inside it
|
|
63
|
+
|
|
64
|
+
- 1 component is refused inside it; the list and the reasons are in the long document.
|
|
65
|
+
- Renders 12 parts: root, scrim, frame, surface, handle, header, leading, heading, title, trailing, description, body.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/bottomsheet.md`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!-- GENERATED from breadcrumb.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Breadcrumb
|
|
4
|
+
|
|
5
|
+
The trail of ancestors above the current page on a marketing site, showing the visitor where they are in the site hierarchy. …
|
|
6
|
+
|
|
7
|
+
`import { Breadcrumb } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- The page sits inside a section hierarchy, and the levels above it are places the visitor can navigate to — a product page inside a markets section, a blog post inside a category …
|
|
12
|
+
- A visitor who arrived by search, social link or campaign URL needs to learn where they landed and how the site is organised around them
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The visitor is moving through the stages of a sign-up or onboarding flow rather than standing in a hierarchy → **nothing in this system does this**
|
|
17
|
+
- There is exactly one place to go back to, and it is the previous page rather than a parent section → **nothing in this system does this**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- The only route to a destination. A trail is a secondary affordance — it may be below the fold, it is the first thing a narrow viewport wraps, and a visitor who arrived by deep link may never read it. Anything reachable only from here is unreachable
|
|
22
|
+
- Levels the hierarchy does not have. Padding a trail to look substantial describes a structure the visitor will not find when they climb it
|
|
23
|
+
- Progress through a sign-up, checkout or onboarding flow, which is a task and not a place
|
|
24
|
+
- Holding anything but its own items. The trail is a list of levels; a control sitting inside it is a control the visitor must tab through to reach the page
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **label** `string` · default "Breadcrumb" — Always, and the default is almost always right. It names the landmark rather than the page — a screen reader user listing the landmarks on a page hears this, and "Breadcrumb" is the word they are listening for
|
|
29
|
+
- never: The current page's own name, which the last item already carries. A landmark named after the page it sits on is announced twice and identifies nothing
|
|
30
|
+
|
|
31
|
+
## Inside it
|
|
32
|
+
|
|
33
|
+
- Takes only BreadcrumbItem.
|
|
34
|
+
- Renders 3 parts: root, list, separator.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/breadcrumb.md`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!-- GENERATED from breadcrumbitem.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# BreadcrumbItem
|
|
4
|
+
|
|
5
|
+
One level in a Breadcrumb on a marketing site. It renders either a link back to that level or, for the level the visitor is already on, plain text marked as the current page. …
|
|
6
|
+
|
|
7
|
+
`import { BreadcrumbItem } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Rendering one level of a Breadcrumb — every level in a trail is one of these
|
|
12
|
+
- The level needs a short name the visitor recognises as a place: the section name, not a sentence about it
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The destination is somewhere the visitor goes to act rather than a level they climb back to → **nothing in this system does this**
|
|
17
|
+
|
|
18
|
+
## Never
|
|
19
|
+
|
|
20
|
+
- A level on its own, outside a Breadcrumb. The separators, the ordering and the landmark all belong to the trail, so a lone item is a link with none of the meaning that made it a level
|
|
21
|
+
- The page title. The current item names the page in the trail, in the words the parent level would use for it — a heading is free to be longer, and copying one into the trail makes the row wrap for nothing
|
|
22
|
+
- A level the visitor cannot actually reach. An item with no href is text, and text the visitor tries to click is a promise the trail did not keep
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- **label** `string` · required — Always — it is the level's name, and the item renders nothing without it. The word the parent level would use for this place: "Forex", not "Forex markets and instruments"
|
|
27
|
+
- never: A description of the level, or the page's full title. The trail is a row of names, and a name that explains itself is the thing that makes it wrap
|
|
28
|
+
- **href** `string` · optional — The level is one the visitor can return to — which is every level above the current page
|
|
29
|
+
- never: The current page. Linking the page to itself gives the visitor a link that does nothing and adds a tab stop that leads nowhere
|
|
30
|
+
- **current** `boolean` · default false — This is the level the visitor is on, which is the last item in the trail. It renders as text rather than a link and is announced as the current page
|
|
31
|
+
- never: Emphasis on a level that is not the current page. It is a statement about where the visitor is, not a way to make one level louder — and setting it alongside href asks for a link the item will not render
|
|
32
|
+
|
|
33
|
+
## The type refuses
|
|
34
|
+
|
|
35
|
+
- current=true with href="*" — The two together ask for a link from the page to itself — a tab stop that goes nowhere. …
|
|
36
|
+
|
|
37
|
+
## Inside it
|
|
38
|
+
|
|
39
|
+
- Renders 3 parts: root, link, current.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/breadcrumbitem.md`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!-- GENERATED from button.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Button
|
|
4
|
+
|
|
5
|
+
Drives a visitor toward a conversion goal by navigating them to the next step in a funnel — a signup page, a pricing page, a demo booking. …
|
|
6
|
+
|
|
7
|
+
`import { Button } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- The call to action on a marketing page — the one step you want a visitor to take next
|
|
12
|
+
- Moving a visitor along a funnel: hero to signup, pricing to checkout, feature page to demo booking
|
|
13
|
+
- A destination prominent enough that it has to read as a control rather than as words in a sentence
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The action happens on the current page — submitting a form, toggling a setting, opening a dialog, removing something → **nothing in this system does this**
|
|
18
|
+
- The words belong inside a sentence or a paragraph of body copy → **nothing in this system does this**
|
|
19
|
+
- The control is a glyph alone, with no words → **ButtonIcon**
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
- **variant** `enum` · default "primary" — Deciding how much of the section a destination claims. Primary is the default and the one to spend deliberately
|
|
24
|
+
- `primary` — The step the page was built to produce. …
|
|
25
|
+
- `secondary` — A real destination that is not the one being pushed — compare plans, read the docs, talk to sales. …
|
|
26
|
+
- `inverse` — A section that paints its own ground — a brand-coloured hero, a photo band, a dark takeover. …
|
|
27
|
+
- never: Ranking every link on a page against every other. Three tiers is the whole vocabulary here on purpose — a set of unjustified tiers is what the previous Button was deleted for. …
|
|
28
|
+
- **size** `enum` · default "lg" — Matching the control to the density of the band it sits in, which on a marketing page is set by the section rather than by the button
|
|
29
|
+
- `sm` — A dense band where the button is one control among several — a filter row, a utility bar, an action beside body copy. …
|
|
30
|
+
- `md` — The default, and everything that is not a hero — navigation bars, pricing rows, feature sections, footer bands. …
|
|
31
|
+
- `lg` — A hero, or a full-width conversion band that is the only control in view. …
|
|
32
|
+
- **tone** `enum` · default "default"
|
|
33
|
+
- `default` — The page's own ground, which sets the ink this component was drawn against — every button on a white page
|
|
34
|
+
- `inherit` — A section that painted its own ground and set its own ink: a dark hero, a brand band, a photo. …
|
|
35
|
+
- **href** `string` · required — Always. The destination is the component — an anchor without an href is not a link, is not reachable by keyboard, and is announced as plain text, so there is no default that could stand in for one. …
|
|
36
|
+
- never: A placeholder while the destination is undecided — a # or an empty string is a control that looks live, takes focus and goes nowhere. Nor javascript: or a handler dressed as a URL: an action that runs in place is product's Button, and this component's own guidance says so
|
|
37
|
+
- **showIcon** `boolean` · default false — Where the destination continues a sequence rather than being simply somewhere else to go — the hero CTA that starts a signup, the button at the foot of a step. …
|
|
38
|
+
- never: Every button in a section. The mark says "this continues" and is worth something only while it points at the one control that does; on four at once it is decoration and the reader stops reading it
|
|
39
|
+
|
|
40
|
+
## Inside it
|
|
41
|
+
|
|
42
|
+
- Takes only text.
|
|
43
|
+
- 1 component is refused inside it; the list and the reasons are in the long document.
|
|
44
|
+
- Renders 3 parts: root, label, icon.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/button.md`.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- GENERATED from buttonicon.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# ButtonIcon
|
|
4
|
+
|
|
5
|
+
One press carried by a glyph alone, in the space a label would need. …
|
|
6
|
+
|
|
7
|
+
`import { ButtonIcon } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- One press with no room for words — a promotional bar's dismiss, a hero's play control, a carousel step, a footer's social links. …
|
|
12
|
+
- A row of glyph-alone destinations where words would only repeat — social accounts in a footer, app stores in a download band, a region switch in a header
|
|
13
|
+
- A control the page owns rather than a destination — dismissing a promotional bar, playing a hero video, advancing a carousel, opening a mobile nav. …
|
|
14
|
+
- The glyph is one a visitor reads without being taught — a play triangle, a dismiss cross, a chevron, a social mark in its monochrome cut. …
|
|
15
|
+
- Room is genuinely short and the words would be the same words several times over. One of these on its own beside prose is usually a Button that lost its label
|
|
16
|
+
|
|
17
|
+
## Something else, when
|
|
18
|
+
|
|
19
|
+
- The control has words, or needs them to be understood → **Button**
|
|
20
|
+
- The whole surface is the target — a card standing for a feature, a market or a plan → **CardButton**
|
|
21
|
+
- The mark is an ornament rather than a control → **Icon**
|
|
22
|
+
- The mark reports a state the visitor sets and reads back — sound on or off, a light and dark switch → **nothing in this system does this**
|
|
23
|
+
|
|
24
|
+
## Never
|
|
25
|
+
|
|
26
|
+
- A glyph whose meaning arrives only from a tooltip. Hover does not exist on a touch screen and a marketing page is read on a phone as often as not, so that explanation reaches only some of the people who need it
|
|
27
|
+
- The call to action the page exists to produce. That step is named rather than drawn, which is Button — a visitor deciding whether to convert should not have to decode a shape first
|
|
28
|
+
- A placeholder href while the destination is undecided. Given one this becomes a real anchor, so a # or an empty string is a control that looks live, offers to open in a new tab and goes nowhere
|
|
29
|
+
- Several glyphs in one control, or a glyph beside a count. One control, one action, one shape; anything else is a Button whose label happens to be short
|
|
30
|
+
|
|
31
|
+
## Props
|
|
32
|
+
|
|
33
|
+
- **variant** `enum` · default "primary" — Deciding how much of the section one press claims. The three tiers are Button's three, deliberately — a glyph-alone control and a labelled CTA in the same band have to rank against each other, and they cannot do that in two vocabularies
|
|
34
|
+
- `primary` — The one glyph-alone press a section is built around — a play control over a hero, the single action a band exists for. …
|
|
35
|
+
- `secondary` — The ordinary case for these, because they usually arrive several at a time — a footer's social row, a carousel's two directions, a bar's dismiss. …
|
|
36
|
+
- `inverse` — A section that paints its own ground — a brand-coloured band, a photo, a dark takeover. …
|
|
37
|
+
- `plain` — The control sits on a surface that has already said what it is — the exit on a sheet, a step in a set of marks — and a ring around it would be the loudest thing there. …
|
|
38
|
+
- never: Ranking a row of these against each other. A footer's five social links are peers; one of them drawn heavier says the other four are lesser, which is not a thing anybody meant to say. …
|
|
39
|
+
- **size** `enum` · default "md" — Matching the control to the density of the band it sits in, which on a marketing page is set by the section rather than by the control
|
|
40
|
+
- `sm` — A dense row of controls — a filter bar, a utility strip, a compact carousel. A square of size.control.sm holding a mark at icon.control.sm. …
|
|
41
|
+
- `md` — The default, and nearly everywhere — footers, navigation bars, promotional bars, carousels. …
|
|
42
|
+
- `lg` — One prominent press, usually the only control in view — a play control over a hero, a single action in a conversion band. A square of size.control.lg holding a mark at icon.control.lg. …
|
|
43
|
+
- never: Making one of a set stand out. Two of these side by side at different steps read as a control and its afterthought, and a carousel whose next is larger than its previous has said the path runs one way
|
|
44
|
+
- **tone** `enum` · default "default"
|
|
45
|
+
- `default` — The control is on a light ground, which is every surface this package paints by default
|
|
46
|
+
- `inverse` — The control is on a ground that runs against the mode — a mark in a navigation bar standing on a dark hero. The ink and the tints move together; nothing else does
|
|
47
|
+
- **icon** `node` · required — Always — the glyph is the whole control, so it is required rather than a slot that may be empty. …
|
|
48
|
+
- never: A glyph whose meaning the visitor has to be taught, and never a second glyph — one control, one action, one shape. …
|
|
49
|
+
- **label** `string` · required — Always. It is the entire accessible name, because nothing on screen carries one — the words that would have been the label if there had been room for one. …
|
|
50
|
+
- never: Describing the picture rather than what the press does — "cross" instead of "Close", "triangle" instead of "Play the tour". And not the gesture either: a footer of links announced as "click here" names nothing, which is the requirement Button's own guidance already sets for its words
|
|
51
|
+
- **href** `string` · optional — The press goes somewhere with a URL of its own — a social account, an app store, another page. …
|
|
52
|
+
- never: A press the page handles itself — a dismiss, a carousel step, opening a video in place. An anchor with an href nothing can navigate to is a promise the browser will try to keep
|
|
53
|
+
|
|
54
|
+
## Inside it
|
|
55
|
+
|
|
56
|
+
- 7 components are refused inside it; the list and the reasons are in the long document.
|
|
57
|
+
- Renders 2 parts: root, icon.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/buttonicon.md`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- GENERATED from card.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Card
|
|
4
|
+
|
|
5
|
+
A surface that holds content belonging together. …
|
|
6
|
+
|
|
7
|
+
`import { Card } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Content that is read as one thing — a feature and the sentence explaining it, a plan and what it costs, a step and what it asks for
|
|
12
|
+
- A picture that reaches the card's edges, with or without copy inset beneath it — a screenshot, a photograph, a band of art. …
|
|
13
|
+
- A row or a column of such groups, where the fill is what separates one from the next
|
|
14
|
+
- A measure a landing page should not be choosing for itself: the corner a card takes and the ground it sits on
|
|
15
|
+
- An editorial card — an article, a post, a story — where the picture and the headline do the separating and a fill would be a second, weaker edge. …
|
|
16
|
+
|
|
17
|
+
## Something else, when
|
|
18
|
+
|
|
19
|
+
- The whole surface is the thing the reader presses → **CardButton**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- A promotional tile as a component of its own. A tile is this surface holding a heading, some words, a mark and a Button — each of which already exists and already knows what it looks like. There is nothing left for a second component to decide
|
|
24
|
+
- A band running the width of the page. That is the page changing ground under a whole section, which is a section's own fill — color.bg.subtle or color.bg.brand-strong — rather than a container sitting on it. A card that stretched edge to edge would be a page with rounded corners
|
|
25
|
+
- Padding. A card that padded its own contents could not hold a picture reaching its edges, which is the shape a marketing card most often takes. …
|
|
26
|
+
- Nesting inside a control or a mark. A card is a thing you put components into, never one you put inside something
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
- **variant** `enum` · default "surface"
|
|
31
|
+
- `surface` — The default, and right for a card on the page. …
|
|
32
|
+
- `surface-raised` — The card sits on a color.bg.subtle band rather than on the page. …
|
|
33
|
+
- `plain` — An editorial card — an article, a post, a story — where the picture and the headline are what separate one card from the next. …
|
|
34
|
+
- `accent` — One card in a set is the promotional one and the page has already earned the colour. The coral is the loudest ground here, so a row of them is a row of nothing louder than the rest
|
|
35
|
+
- `accent-strong` — A card carrying more weight than its neighbours, where the coral would be too loud and the page ground too quiet. …
|
|
36
|
+
- **tone** `enum` · default "default" — Which way round the ground is. A card sits on the page by default; `inverse` is for one sitting on a band that paints its own dark ground — a footer, a dark hero, a brand takeover. …
|
|
37
|
+
- `default` — The page is light, which is nearly every page. The fills are opaque and the ink is dark
|
|
38
|
+
- `inverse` — The card sits on a band that paints its own dark ground. …
|
|
39
|
+
- never: Making a card darker on a light page. This does not mean "dark" — it means "the thing behind me is dark". On a white page an inverse card is a barely-there wash nobody can see the edge of
|
|
40
|
+
- **compact** `boolean` · default false — The card is small enough that a generous corner is a fifth of its width. `radius.surface` is twenty-four, which is the corner of a feature card in a grid; on a rail beside a footer's columns it reads as bulbous. …
|
|
41
|
+
- never: A card that is merely less important. The corner follows the card's size, not its rank — a full-width card with a tight corner reads as a panel that has lost its edges rather than as a quiet one
|
|
42
|
+
|
|
43
|
+
## Inside it
|
|
44
|
+
|
|
45
|
+
- At least 1, at most 1 — fewer is not this component and more is a different one.
|
|
46
|
+
- 1 component is refused inside it; the list and the reasons are in the long document.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/card.md`.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!-- GENERATED from cardbody.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# CardBody
|
|
4
|
+
|
|
5
|
+
Everything a card holds: the words inset from its edges and the picture that reaches them, in one region. The surface around it keeps a fill and a corner and nothing else. …
|
|
6
|
+
|
|
7
|
+
`import { CardBody } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Words, a picture, or both inside a Card — a feature and the sentence explaining it, a screenshot under the copy that describes it
|
|
12
|
+
- A photograph, render or screenshot that should reach the card's edges while the copy above it stays inset
|
|
13
|
+
- A picture that should absorb whatever height the copy leaves, so a row of cards ends flush no matter how much each one says
|
|
14
|
+
- A mark above the words — the glyph a feature card leads with, sized and inset with the copy rather than reaching the card's edges
|
|
15
|
+
- Copy that sits over the picture rather than beside it — a photograph as the card's ground, with a title and a sentence washed over it
|
|
16
|
+
- A line above the title filing the card under something — the date an article ran, how long it takes to read, the category it belongs to. …
|
|
17
|
+
|
|
18
|
+
## Something else, when
|
|
19
|
+
|
|
20
|
+
- The whole card is one picture, with no words at all → **Card**
|
|
21
|
+
|
|
22
|
+
## Never
|
|
23
|
+
|
|
24
|
+
- A surface of its own. It has no fill and no corner: outside a Card it is a stack with padding on part of it, which is a layout rather than a component
|
|
25
|
+
- Copy over a picture with nothing to darken it. `overMedia` paints a ground and a wash under the words and is the only supported way to lay them over art — setting `src` alone puts the picture in the column, under the copy rather than behind it, which is a different card
|
|
26
|
+
- Text baked into the picture. It cannot be selected, translated, or reflowed at the width a phone gives the card — words go in title and description, which are text at a size the type ramp chose
|
|
27
|
+
- Controlling the gap between unrelated blocks. It stacks its copy at one measure, and a page needing two different gaps is composing the stack itself
|
|
28
|
+
|
|
29
|
+
## Props
|
|
30
|
+
|
|
31
|
+
- **overMedia** `boolean` · default false — The picture is the card's ground and the copy is read on top of it. …
|
|
32
|
+
- never: Making a card look richer. It forces the dark ground and the light ink on every word in the body, so a title that was near-black on the page turns white — and over a pale photograph with no wash strong enough to hold it, that is the least legible card on the page rather than the most striking
|
|
33
|
+
- **flush** `boolean` · default false — The card has no fill for the copy to be held off — Card's `plain` variant, where the picture is the card's edge rather than the ground being it. …
|
|
34
|
+
- never: A filled card. The inset is what keeps the words off the ground's edge, and on surface, accent or accent-strong removing it puts a headline hard against the colour — which is the one way a card looks broken rather than merely tight. …
|
|
35
|
+
- **zoomOnHover** `boolean` · default false — The card is pressable and its picture is what answers the pointer — an editorial card inside a CardButton, on any ground. …
|
|
36
|
+
- never: A card that is not pressable. Motion under the cursor is how a surface says it responds to a press, and on a plain Card — a div with no role — it says that to a mouse user about something that does nothing, while telling a keyboard user nothing at all, since there is no hover without a pointer and no focus without a control. …
|
|
37
|
+
- **compact** `boolean` · default false — The card is small enough that the standard inset and the standard type are most of it. …
|
|
38
|
+
- never: Fitting more words into a card that is too small for them. The inset is not what is wrong with a card whose copy will not fit — taking sixteen pixels off each side buys one word a line and leaves the same card overfull It does not undo `flush`. …
|
|
39
|
+
- **tone** `enum` · default "default" — Which way round the ground under it is, and it pairs with Card's prop of the same name for the reason `compact` does: the box and its contents are separate components, and only the page knows it has put one inside the other. …
|
|
40
|
+
- `default` — The card is on the page, which is nearly every card
|
|
41
|
+
- `inverse` — The card sits on a band that paints its own dark ground, and carries `tone="inverse"` itself. …
|
|
42
|
+
- never: Setting it on one of the pair and not the other. A card whose ground is inverse and whose body is not has one line in an ink chosen for a page it is not on
|
|
43
|
+
- **eyebrow** `string` · optional — The card is filed under something a reader scans before the headline — the date an article ran, how long it takes to read, the category it sits in. …
|
|
44
|
+
- never: A sentence, or a second headline. It is set at twelve pixels with wide tracking, a measure chosen for three or four words and a wall at the length of a clause — what the card is about is the title's job. Nor a status or a count. …
|
|
45
|
+
- **title** `string` · optional — The card names what it is about. A noun phrase rather than a sentence — 'Balance protection', not 'We protect your balance' — because it is read as a label on the block beneath it. …
|
|
46
|
+
- never: The sentence explaining the card. That is description, which sits under this at a gap close enough that the two read as one block. A title that runs to a sentence leaves the copy with nothing to add
|
|
47
|
+
- **description** `string` · optional — What the title means, usually a sentence or two. It takes the default body step, because a card's copy is copy rather than a caption. …
|
|
48
|
+
- never: A control. This body holds two regions and neither is a place to act from — a card with a call to action puts it in the Card beneath this, where it is not wearing the body's copy styling
|
|
49
|
+
- **mark** `node` · optional — The card leads with a glyph — a badge, a shield, a small piece of art that makes the feature recognisable before the title is read. …
|
|
50
|
+
- never: A picture that should reach the card's edges. This is inset with the copy and sized to sit above a heading; a photograph put through it is a stamp in the corner of a wide margin. That is src, which renders the media region below or above this whole block rather than inside it
|
|
51
|
+
- **src** `string` · optional — The card shows a picture — a photograph, a product render, a screenshot of the thing being described. Absent is the ordinary case: most cards are words
|
|
52
|
+
- never: A data URI holding a photograph. A card's picture is the heaviest thing on a marketing page and inlining it costs the page its cache; a path belongs here, and the formats and sizes behind it are the page's build to decide
|
|
53
|
+
- **alt** `string` · optional — Whenever src is, and empty when the picture says nothing the copy has not already said. …
|
|
54
|
+
- never: Repeating the card's title. The reader heard it from the heading a moment earlier, and hearing it twice is how a decorative image makes a card worse than one with no image at all. If the sentence you would write is the title, the right value is the empty string. …
|
|
55
|
+
- **aspect** `number` · optional — The picture must hold a known shape rather than absorb the card's spare height — a logo that distorts the moment it is cropped, or a chart whose proportions are the point. …
|
|
56
|
+
- never: A row of cards that should end flush. Setting this stops the picture absorbing the height the copy leaves, so a card whose title runs to two lines grows taller than its neighbours and the row goes ragged. Absent is right for almost every card in a set
|
|
57
|
+
- **mediaPosition** `enum` · default "below"
|
|
58
|
+
- `below` — The copy introduces the picture — a feature named and explained, then shown. The ordinary case, and what a reader scanning a column of cards is reading for
|
|
59
|
+
- `above` — The picture is what the reader recognises the card by and the words caption it — a photograph leading an article, a screenshot the copy then describes. …
|
|
60
|
+
|
|
61
|
+
## Inside it
|
|
62
|
+
|
|
63
|
+
- 2 components are refused inside it; the list and the reasons are in the long document.
|
|
64
|
+
- Renders 9 parts: root, scrim, content, mark, eyebrow, title, description, media-frame, media.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/cardbody.md`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!-- GENERATED from cardbutton.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# CardButton
|
|
4
|
+
|
|
5
|
+
A card that responds to a press. …
|
|
6
|
+
|
|
7
|
+
`import { CardButton } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- The whole card is the target rather than a link buried in it — a grid of features each leading to its own page, a set of markets, a row of plans
|
|
12
|
+
- Pressing it goes somewhere with a URL of its own. …
|
|
13
|
+
- Pressing it opens something the page owns rather than leaving the page — a dialog, a video, a step in a sign-up
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The card holds a control of its own as well → **Card**
|
|
18
|
+
- Nothing happens when it is pressed → **Card**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- A card containing a button, a link or a field. Every one of them is unreachable inside a button or an anchor, and the rule about it is the one rule in this system that cannot live on any single component
|
|
23
|
+
- An href to somewhere that does not exist. Given one this becomes a real anchor, so the destination has to be a place a reader could bookmark — an action dressed as a destination sends them nowhere and offers to open it in a tab
|
|
24
|
+
- A whole section of the page. A card stands for something else and points at it; a surface wrapping an entire band with an href on it is a page linking to itself
|
|
25
|
+
- Making a card feel lively. The lift under the pointer is what a control looks like, and putting it on something that does nothing teaches a reader that movement means nothing
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **variant** `enum` · default "surface"
|
|
30
|
+
- `surface` — The default, and right for a pressable card on the page. The same recessed step off the white page that Card takes, so a row mixing pressable and plain cards reads as one row
|
|
31
|
+
- `surface-raised` — The card sits on a color.bg.subtle band rather than on the page, where the recessed fill all but disappears and this one lifts off the band instead
|
|
32
|
+
- `accent` — One card in a set is the promotional one and the page has already earned the colour
|
|
33
|
+
- `accent-strong` — A card carrying more weight than its neighbours. The darkest of the four, and the one that takes white at 20.55:1 — the most legible ground a marketing card has
|
|
34
|
+
- `plain` — An editorial card that goes somewhere — an article, a post, a release note. …
|
|
35
|
+
- **href** `string` · optional — The press goes somewhere with a URL of its own. It makes this an anchor rather than a button, which is what gives a reader cmd-click, a visible destination and a copyable link — none of which mean anything for a press that opens a dialog. …
|
|
36
|
+
- never: A press the page handles itself. An anchor with an href nothing can navigate to is a promise the browser will try to keep
|
|
37
|
+
|
|
38
|
+
## The type refuses
|
|
39
|
+
|
|
40
|
+
- variant="plain" with state="hover" — The editorial card does not move under the cursor, and this is the declaration of that rather than an omission. …
|
|
41
|
+
|
|
42
|
+
## Inside it
|
|
43
|
+
|
|
44
|
+
- At least 1, at most 1 — fewer is not this component and more is a different one.
|
|
45
|
+
- 4 components are refused inside it; the list and the reasons are in the long document.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/cardbutton.md`.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- GENERATED from checkbox.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Checkbox
|
|
4
|
+
|
|
5
|
+
Records a single on-or-off choice that is submitted with the form around it rather than applied the moment it is ticked
|
|
6
|
+
|
|
7
|
+
`import { Checkbox } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A choice the user makes now and confirms later — the form's Save or Continue is what applies it
|
|
12
|
+
- Agreeing to something before proceeding — terms, a risk disclosure, a confirmation the user must actively give
|
|
13
|
+
- One of several independent choices, each of which can be on or off without affecting the others
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- Choosing exactly one option from a short set, where picking one unpicks the others → **SegmentedControl**
|
|
18
|
+
- Performing an action rather than recording a choice → **Button**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- A setting that takes effect the moment it is ticked. A checkbox is a value the form around it submits, and one that applied immediately would misreport itself — the reader looks for Save, finds nothing waiting, and cannot tell whether the change took. Marketing has no immediate-apply toggle to send them to
|
|
23
|
+
- Destructive or irreversible changes — a checkbox is a value in a form, and a tick is not a confirmation step
|
|
24
|
+
- A choice the user cannot see the label of. The label is required and always rendered: a bare box states nothing about what ticking it agrees to
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **tone** `enum` · default "standard"
|
|
29
|
+
- `standard` — The default, and almost always right — the ticked box fills with the neutral that outranks everything around it, so the choice is legible before any colour is read and it is the fill every other chosen control in this package takes, which is what lets a form of them read as one set of answers …
|
|
30
|
+
- `accent` — The checkbox is the brand moment of the view — a single consent the design is deliberately drawing the eye to — and the surrounding design already carries brand red
|
|
31
|
+
- **checked** `enum` · default "unchecked"
|
|
32
|
+
- `unchecked` — The default — the choice has not been made, or has been made against
|
|
33
|
+
- `checked` — The user has made this choice, or it arrives pre-made and they may change it
|
|
34
|
+
- `indeterminate` — A box that summarises others, where some but not all of them are ticked — a Select all above a partly selected list
|
|
35
|
+
- never: A pending or loading state. Indeterminate means partly chosen, not not-yet-known, and a user who ticks it expects the group to follow
|
|
36
|
+
- **status** `enum` · default "none"
|
|
37
|
+
- `none` — The default — the choice has not been judged, or it passed and there is nothing to say
|
|
38
|
+
- `error` — The box had to be ticked and was not, or what ticking it asks for is not accepted
|
|
39
|
+
- `warning` — The choice is accepted but has a consequence the user should see before submitting
|
|
40
|
+
- `success` — The choice was checked against something and passed, and confirming that is worth the room
|
|
41
|
+
- never: A box in a set where something above it already asks the question and reports the error. The message answers for the whole set, and a box repeating it states the same failure twice. This prop is for the box that stands alone, which is the case a group cannot cover: a single consent has nothing above it to carry the error. …
|
|
42
|
+
- **label** `string` · required — Always — it states what ticking the box agrees to, and the box shows nothing on its own. A phrase the user can read as a claim they are agreeing with: "Send me trade confirmations", not "Confirmations". …
|
|
43
|
+
- never: The consequence or the rule, which belongs beside the form rather than inside the choice — a label that explains has stopped naming the thing being agreed to, and there is a description for what it was trying to say. …
|
|
44
|
+
- **showLabel** `boolean` · default true — Drawing the words, which is nearly always. A checkbox on its own is a question, and a question with no words is not one
|
|
45
|
+
- never: Deciding whether the box has a label. It always has one and it is always announced — this only says whether the label is drawn. Off is clipped, not removed, so a screen reader still reads it
|
|
46
|
+
- **description** `string` · optional — Ticking the box commits the user to something the label cannot carry without becoming a sentence — what it costs, how often it happens, what it applies to. …
|
|
47
|
+
- never: Guidance about the form as a whole, or the rule behind the choice, which belongs beside the form rather than under one of its controls. A note repeated under every box is describing the set, and putting it on one of them says it is true of that one only
|
|
48
|
+
- **statusMessage** `string` · optional — Whenever the status is an error or a warning — the words are what the user acts on, and the colour alone is not available to everyone
|
|
49
|
+
- never: Restating the label. The message says what happened and what to do, not what the choice was
|
|
50
|
+
|
|
51
|
+
## The type refuses
|
|
52
|
+
|
|
53
|
+
- status="error" with statusMessage=null — An error with no explanation leaves the user stuck
|
|
54
|
+
- status="warning" with statusMessage=null — A warning with no explanation is a choice the user cannot act on
|
|
55
|
+
|
|
56
|
+
## Inside it
|
|
57
|
+
|
|
58
|
+
- 2 components are refused inside it; the list and the reasons are in the long document.
|
|
59
|
+
- Renders 9 parts: root, control, box, field, indicator, text, label, description-text, message.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/checkbox.md`.
|