@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,60 @@
|
|
|
1
|
+
<!-- GENERATED from tab.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Tab
|
|
4
|
+
|
|
5
|
+
One item in a strip, naming a version of what the page is already about. It cannot stand on its own: selected means selected against something, and a tab with no siblings is a heading that highlights. …
|
|
6
|
+
|
|
7
|
+
`import { Tab } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- One of a small set of comparable versions of the same offer — a billing period, a platform, a market class
|
|
12
|
+
- The strip is the page's own comparison control and the alternatives are already written on the page
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- Pressing it should take the reader to another page → **Button**
|
|
17
|
+
- The item is one of a list of separate topics rather than a version of one → **AccordionItem**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- Navigation. Nothing here carries an href and nothing should — a tab that goes somewhere has told the reader it would come back
|
|
22
|
+
- A step in a sequence. A strip says its members are alternatives, and a reader may press the third without the first
|
|
23
|
+
- The only tab. One tab is a heading, and a selected state that nothing is selected against says nothing
|
|
24
|
+
- Hiding something the page needs read. A reader skimming a landing page does not press anything, so whatever sits behind an unselected tab is, for most visitors, not on the page at all
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- **selected** `boolean` · optional — Injected by TabList, which is the only thing that can know. A tab cannot see its siblings, so a set of tabs each deciding for itself would show every one of them selected — the same reason Accordion holds which row is open. …
|
|
29
|
+
- never: Marking the tab a page prefers. Selected means the reader is looking at this one; the badge slot is what argues for a tab that is not current
|
|
30
|
+
- **onSelect** `callback` · optional — Learning which tab was pressed, when the page wants to know as well as the strip. TabList calls it after its own handler, so a page's handler is not replaced by being inside a set
|
|
31
|
+
- never: Driving the selection. The strip owns which tab is current; a page that sets it from here is racing the component for the same piece of state
|
|
32
|
+
- **value** `string` · required — Always — it is how the page says which slice to show. …
|
|
33
|
+
- never: The label. A value is an identifier a page matches on and a label is words a reader reads; tying them means an editor cannot fix a typo without breaking the page
|
|
34
|
+
- **label** `string` · required — Always — it is what the reader presses. One or two words, and a noun rather than an instruction: 'Yearly', not 'Switch to yearly'. …
|
|
35
|
+
- never: A sentence. The strip is scanned across, and a tab as wide as a clause is a strip that wraps
|
|
36
|
+
- **icon** `node` · optional — The tabs are things a mark tells apart faster than a word does — a platform, a market class. Pass the glyph; the tab draws it at its own step. …
|
|
37
|
+
- never: Carrying the label. A tab whose meaning is a shape is a tab a screen reader reads as nothing, and the words are what the strip is scanned by
|
|
38
|
+
- **badge** `node` · optional — A count or a claim for the version this tab names, shown when content is badge. One of the set is the one the page wants chosen and the reason fits in a word — 'Save 20%' on the yearly tab. …
|
|
39
|
+
- never: Describing what the tab contains. A badge here argues for pressing this tab; one that merely labels its contents is metadata in a pill, and it competes with the selected mark for the same glance. The current tab, usually. …
|
|
40
|
+
- **content** `enum` · default "none" — What the trailing side of the tab is carrying, when it is carrying anything. …
|
|
41
|
+
- `none` — Nothing after the label. Most tabs, and the one to reach for unless something earns the space
|
|
42
|
+
- `icon` — A glyph after the label, qualifying the view rather than naming it — that this one leads off-site, or that it is the one to look at. What names the view goes in the leading slot instead
|
|
43
|
+
- `badge` — One of the set is the one the page wants chosen and the reason fits in a word — 'Save 20%' on the yearly tab. On that tab and no other: a badge on every tab marks none of them
|
|
44
|
+
- never: Two marks after one label. That is what naming the kind prevents — a trailingIcon left behind on a tab switched to badge renders nothing, instead of quietly appearing beside it
|
|
45
|
+
- **trailingIcon** `node` · optional — The glyph shown after the label when content is icon. Wrapped by the tab on the same ramp as the leading slot, so a strip carrying both draws them alike. …
|
|
46
|
+
- never: Naming the view. What the tab is goes before the words, where a reader looking for it will be — the trailing side qualifies what the label already said
|
|
47
|
+
|
|
48
|
+
## The type refuses
|
|
49
|
+
|
|
50
|
+
- content="icon" with trailingIcon=null — content is icon and there is no glyph to show, which renders a gap where one was promised
|
|
51
|
+
- content="badge" with badge=null — content is badge and there is no badge to show, which renders a gap where one was promised
|
|
52
|
+
|
|
53
|
+
## Inside it
|
|
54
|
+
|
|
55
|
+
- 6 components are refused inside it; the list and the reasons are in the long document.
|
|
56
|
+
- Renders 7 parts: root, surface, content, icon, label, sizer, trailing-icon.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/tab.md`.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- GENERATED from table.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Table
|
|
4
|
+
|
|
5
|
+
Structured data in rows and columns, where every row has the same shape. …
|
|
6
|
+
|
|
7
|
+
`import { Table } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Data with a uniform structure, where the same fields exist on every row and a reader compares one row against another down a column
|
|
12
|
+
- Values that line up — amounts, dates, counts. A column is what makes them comparable, and comparison is the only reason to pay for a table's weight
|
|
13
|
+
- Rows that carry more than words: a badge against a name, a link at the end. The cell is a slot, so what a row holds is the page's decision
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The records do not share a shape, or each is a thing in itself rather than a row to compare → **Card**
|
|
18
|
+
- There is one field per record → **nothing in this system does this**
|
|
19
|
+
|
|
20
|
+
## Never
|
|
21
|
+
|
|
22
|
+
- Layout. A table means the rows and columns carry meaning, and using one to place things puts a grid in the accessibility tree that a screen reader reads out as rows and columns of nothing
|
|
23
|
+
- A single record's fields. Two columns of label-and-value is a description list wearing a table's markup, and it announces every label as a column header it is not
|
|
24
|
+
- Data a reader cannot compare. If nobody will read down a column, the alignment, the rules and the header are all cost with no return
|
|
25
|
+
- Holding the answer to its own sorting or selection. Both outlive the render, so a table that kept them would be a second copy of what the page already has, and the two disagree the first time anything else changes either
|
|
26
|
+
- A row placed straight into the table. `forbiddenChildren` refuses it and the reason is worth more than the refusal: `<table>` cannot contain `<tr>`, so an HTML parser inserts an implied `<tbody>` around it — and React does not do the same on the client. …
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
- **layout** `enum` · default "auto"
|
|
31
|
+
- `auto` — The default. Columns take their widths from what is in them, which is right when the content is known and varied — a name column wants more room than a status one and can say so itself
|
|
32
|
+
- `fixed` — Columns take an equal share of the width whatever they hold, and the table stops re-flowing as data changes. …
|
|
33
|
+
- never: A table whose columns need unequal room. Fixed gives them a third each, and a column that needs more does not clip — the text wraps instead — so the one carrying a name becomes a column of three-line cells while the one carrying a status keeps two thirds of its width empty. …
|
|
34
|
+
- **pinFirstColumn** `boolean` · default false — The first column is what identifies the row — a market, a product, a plan — and the columns after it are the values being compared. …
|
|
35
|
+
- never: A table that fits. Nothing sticks until there is something to scroll, so the pinning itself costs nothing — but the rule marking the pinned column is drawn either way, and a line down a table that never moves is a boundary the reader cannot act on. …
|
|
36
|
+
- **caption** `string` · optional — Where nothing else names the table. A table is announced as a grid of so many rows and columns, so a reader landing inside an unnamed one has to read a cell to find out what they are in — "Open positions", "October statements". …
|
|
37
|
+
- never: Explaining the table. It is a name rather than a sentence: what the columns mean belongs in the header row, and anything longer than a few words is a paragraph the reader has to get past before reaching the data
|
|
38
|
+
- **dividers** `enum` · default "rows"
|
|
39
|
+
- `rows` — The default. …
|
|
40
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records: a rate card, a comparison where the reader traces a column as often as a row. …
|
|
41
|
+
- `none` — No lines at all. Right for two or three rows, where the rules are more structure than data, and for a table whose columns are already separated by their alignment
|
|
42
|
+
- never: Marking a group. A missing line is not a heading — a table that wants sections wants a header row inside the body, or two tables. Nor `grid` as decoration on a long table: every vertical line is another thing between a reader and the value they came for
|
|
43
|
+
- **headerCase** `enum` · default "upper"
|
|
44
|
+
- `upper` — The house setting: column names in capitals, at the role that suits them. A header is read once where the data under it is read many times, and capitals are what stop it competing
|
|
45
|
+
- `title` — Names drawn as they were written, at twelve pixels. Right where the names are long, are proper nouns whose own capitals would be flattened, or are in a script with no case at all
|
|
46
|
+
- **hoverable** `boolean` · default true — On by default. A wash follows the pointer and says which row a press would land on, which a wide table needs and a narrow one is not harmed by: the further a row runs, the easier it is to be reading one and about to click another. …
|
|
47
|
+
- never: Nothing, usually — turning it off is the decision that takes a reason. A table that is only ever read is the case: a row that lights up under the pointer says it can be acted on, and one that lights up and does nothing makes that promise on every row at once
|
|
48
|
+
- **overflow** `enum` · default "wrap"
|
|
49
|
+
- `wrap` — The default. Text too long for its column wraps and the row grows taller, so nothing is hidden — right whenever the value is the point and a reader has to read all of it
|
|
50
|
+
- `truncate` — Rows must stay one line high — a dense table a reader scans down, where a row that grew would break the rhythm they are scanning by. …
|
|
51
|
+
- never: Making a column narrow enough to be worth truncating. Clipping is what a column does when it has run out of room, not a way to give it less — a table of ellipses has hidden its data behind a hover on every cell
|
|
52
|
+
- **size** `enum` · default "md"
|
|
53
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
54
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
55
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
56
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
57
|
+
|
|
58
|
+
## Inside it
|
|
59
|
+
|
|
60
|
+
- Takes only TableHead, TableBody.
|
|
61
|
+
- At least 1, at most 2 — fewer is not this component and more is a different one.
|
|
62
|
+
- 5 components are refused inside it; the list and the reasons are in the long document.
|
|
63
|
+
- Renders 3 parts: root, grid, caption.
|
|
64
|
+
|
|
65
|
+
## Needs mounting
|
|
66
|
+
|
|
67
|
+
Does not work from the import alone: useTableSort. See `.llm/components/table.md` for what to mount and where.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/table.md`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!-- GENERATED from tablebody.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TableBody
|
|
4
|
+
|
|
5
|
+
The rows of data, under the header. …
|
|
6
|
+
|
|
7
|
+
`import { TableBody } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- The data itself — every row that a reader compares against the others
|
|
12
|
+
|
|
13
|
+
## Something else, when
|
|
14
|
+
|
|
15
|
+
- The row names the columns rather than filling them → **TableHead**
|
|
16
|
+
|
|
17
|
+
## Never
|
|
18
|
+
|
|
19
|
+
- An empty state. A table with nothing in it is not a table with an empty row — a row spanning every column to say "no results" is a sentence pretending to be data. Render the message instead of the table
|
|
20
|
+
- Rows of differing shapes. Every row here answers the same questions in the same order, which is the promise the whole component exists to make
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
- **size** `enum` · default "md"
|
|
25
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
26
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
27
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
28
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
29
|
+
- **dividers** `enum` · default "rows"
|
|
30
|
+
- `rows` — The default. …
|
|
31
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records: a rate card, a comparison where the reader traces a column as often as a row. …
|
|
32
|
+
- `none` — No lines at all. Right for two or three rows, where the rules are more structure than data, and for a table whose columns are already separated by their alignment
|
|
33
|
+
- never: Marking a group. A missing line is not a heading — a table that wants sections wants a header row inside the body, or two tables. Nor `grid` as decoration on a long table: every vertical line is another thing between a reader and the value they came for
|
|
34
|
+
- **hoverable** `boolean` · default true — Handed down by the table. It draws a wash under the pointer so a reader knows which row a press would land on — and only on a device that has a pointer, which the row's own stylesheet gates
|
|
35
|
+
- never: Saying a row is chosen. Hover is where the pointer is and nothing more; `selected` is the answer a reader gave, and a row that looked picked on approach would say they had picked everything they passed over
|
|
36
|
+
- **overflow** `enum` · default "wrap"
|
|
37
|
+
- `wrap` — The default. Text too long for its column wraps and the row grows taller, so nothing is hidden — right whenever the value is the point and a reader has to read all of it
|
|
38
|
+
- `truncate` — Rows must stay one line high — a dense table a reader scans down, where a row that grew would break the rhythm they are scanning by. …
|
|
39
|
+
- never: Making a column narrow enough to be worth truncating. Clipping is what a column does when it has run out of room, not a way to give it less — a table of ellipses has hidden its data behind a hover on every cell
|
|
40
|
+
|
|
41
|
+
## Inside it
|
|
42
|
+
|
|
43
|
+
- Takes only TableRow.
|
|
44
|
+
- At least 1, no ceiling — 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/tablebody.md`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!-- GENERATED from tablecell.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TableCell
|
|
4
|
+
|
|
5
|
+
One value in a row, under the column that names it. It is a slot: what goes in is the page's to compose, which is what lets a cell hold a badge, a link or a control rather than only text. …
|
|
6
|
+
|
|
7
|
+
`import { TableCell } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A value in a data row — a name, an amount, a date, a state
|
|
12
|
+
- A cell holding a component rather than words: a Badge against a name, a Link at the end of the row
|
|
13
|
+
- Numbers a reader compares down the column, where `numeric` ranges them to the end and sets the digits in tabular figures
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The cell names the column rather than filling it → **TableHeaderCell**
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- A cell that spans the row to hold a message. It is announced against a header that does not describe it, and it breaks the shape every other row keeps
|
|
22
|
+
- Nesting a table. A grid inside a cell is a second set of rows and columns announced inside the first, and no reader can hold both
|
|
23
|
+
- Text long enough to be a paragraph. A cell is compared against the ones above it, and a column of paragraphs is a column nobody reads down
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
- **size** `enum` · default "md"
|
|
28
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
29
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
30
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
31
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
32
|
+
- **align** `enum` · default "start"
|
|
33
|
+
- `start` — Words. Names, descriptions, statuses — anything read left to right starts where the reading does, and a column of them shares one edge the eye can run down
|
|
34
|
+
- `center` — Rare, and worth arguing for: a single glyph or a very short state where neither edge means anything. A centred column of words has two ragged edges instead of one
|
|
35
|
+
- `end` — Numbers that line up under each other — amounts, counts, percentages. The decimal point is what a reader compares down a column, and ranging to the end is what puts it in one place
|
|
36
|
+
- never: Making a table look balanced. Alignment says what kind of thing a column holds; using it to even out a layout tells the reader the numbers are words
|
|
37
|
+
- **numeric** `boolean` · default false — The cell holds digits a reader compares against the cells above and below — an amount, a count, a percentage. It sets tabular figures, so every digit takes the same width and the decimal points line up down the column. …
|
|
38
|
+
- never: Any number at all. The system's own rule is not "is this a number" but "does it line up under another one" — a reference code or a year written once beside a name is read rather than compared, and tabular figures cost it the better fit of proportional ones for nothing
|
|
39
|
+
- **dividers** `enum` · default "rows"
|
|
40
|
+
- `rows` — The default. …
|
|
41
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records: a rate card, a comparison where the reader traces a column as often as a row. …
|
|
42
|
+
- `none` — No lines at all. Right for two or three rows, where the rules are more structure than data, and for a table whose columns are already separated by their alignment
|
|
43
|
+
- never: Marking a group. A missing line is not a heading — a table that wants sections wants a header row inside the body, or two tables. Nor `grid` as decoration on a long table: every vertical line is another thing between a reader and the value they came for
|
|
44
|
+
- **overflow** `enum` · default "wrap"
|
|
45
|
+
- `wrap` — The default. Text too long for its column wraps and the row grows taller, so nothing is hidden — right whenever the value is the point and a reader has to read all of it
|
|
46
|
+
- `truncate` — Rows must stay one line high — a dense table a reader scans down, where a row that grew would break the rhythm they are scanning by. …
|
|
47
|
+
- never: Making a column narrow enough to be worth truncating. Clipping is what a column does when it has run out of room, not a way to give it less — a table of ellipses has hidden its data behind a hover on every cell
|
|
48
|
+
|
|
49
|
+
## Inside it
|
|
50
|
+
|
|
51
|
+
- 6 components are refused inside it; the list and the reasons are in the long document.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/tablecell.md`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- GENERATED from tablehead.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TableHead
|
|
4
|
+
|
|
5
|
+
The column names, above the data, and the filter row where there is one. …
|
|
6
|
+
|
|
7
|
+
`import { TableHead } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Naming the columns, which almost every table should. A column of numbers with nothing at the top is a column a reader has to infer
|
|
12
|
+
|
|
13
|
+
## Something else, when
|
|
14
|
+
|
|
15
|
+
- The row is data rather than a name for data → **TableBody**
|
|
16
|
+
|
|
17
|
+
## Never
|
|
18
|
+
|
|
19
|
+
- A second row of data dressed as a subheading. Everything here names columns, and a reader is told so on every cell beneath
|
|
20
|
+
- Skipping. A table with no header is a grid of values a reader has to work out from the data itself, which is guesswork on the first row and wrong on the rest
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
- **headerCase** `enum` · default "upper"
|
|
25
|
+
- `upper` — The house setting: column names in capitals, at the role that suits them. A header is read once where the data under it is read many times, and capitals are what stop it competing
|
|
26
|
+
- `title` — Names drawn as they were written, at twelve pixels. Right where the names are long, are proper nouns whose own capitals would be flattened, or are in a script with no case at all
|
|
27
|
+
- **dividers** `enum` · default "rows"
|
|
28
|
+
- `rows` — The default. A line between rows and none between columns. The head draws neither: the rule under it is the first data row’s top edge, and there are no columns to separate
|
|
29
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records. …
|
|
30
|
+
- `none` — No lines at all, which for the head is what it already draws
|
|
31
|
+
- never: Giving the head a rule of its own under the names. That line already exists as the first data row’s top edge, and a second drawn here would double it at exactly the weight a hairline is chosen to avoid
|
|
32
|
+
- **overflow** `enum` · default "wrap"
|
|
33
|
+
- `wrap` — The default. Text too long for its column wraps and the row grows taller, so nothing is hidden — right whenever the value is the point and a reader has to read all of it
|
|
34
|
+
- `truncate` — Rows must stay one line high — a dense table a reader scans down, where a row that grew would break the rhythm they are scanning by. …
|
|
35
|
+
- never: Making a column narrow enough to be worth truncating. Clipping is what a column does when it has run out of room, not a way to give it less — a table of ellipses has hidden its data behind a hover on every cell
|
|
36
|
+
- **size** `enum` · default "md"
|
|
37
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
38
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
39
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
40
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
41
|
+
|
|
42
|
+
## Inside it
|
|
43
|
+
|
|
44
|
+
- Takes only TableRow.
|
|
45
|
+
- At least 1, at most 2 — fewer is not this component and more is a different one.
|
|
46
|
+
- 4 components are 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/tablehead.md`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- GENERATED from tableheadercell.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TableHeaderCell
|
|
4
|
+
|
|
5
|
+
The name of a column, announced before every value under it. …
|
|
6
|
+
|
|
7
|
+
`import { TableHeaderCell } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Naming a column, which every column should have
|
|
12
|
+
- A column a reader can order, where `sortable` draws the control and `sortDirection` says which way it is ordered now
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The cell holds a value rather than the name of a column → **TableCell**
|
|
17
|
+
|
|
18
|
+
## Never
|
|
19
|
+
|
|
20
|
+
- A column that cannot actually be sorted. `sortable` draws a control, and a control that reports to nobody is the clearest promise a table can break — the reader presses it twice before deciding the page is broken
|
|
21
|
+
- Holding which column is sorted. `sortDirection` draws the answer for this one column; which column the table is ordered by outlives the render and belongs to the page, through useTableSort or its own state
|
|
22
|
+
- A row of names inside the data. Everything marked up this way is announced as naming what follows it, so a header in the middle of a table re-names every row beneath
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- **size** `enum` · default "md"
|
|
27
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
28
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
29
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
30
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
31
|
+
- **align** `enum` · default "start"
|
|
32
|
+
- `start` — Words. Names, descriptions, statuses — anything read left to right starts where the reading does, and a column of them shares one edge the eye can run down
|
|
33
|
+
- `center` — Rare, and worth arguing for: a single glyph or a very short state where neither edge means anything. A centred column of words has two ragged edges instead of one
|
|
34
|
+
- `end` — Numbers that line up under each other — amounts, counts, percentages. The decimal point is what a reader compares down a column, and ranging to the end is what puts it in one place
|
|
35
|
+
- never: Making a table look balanced. Alignment says what kind of thing a column holds; using it to even out a layout tells the reader the numbers are words
|
|
36
|
+
- **sortDirection** `enum` · default "none"
|
|
37
|
+
- `none` — The column can be sorted and the table is not currently ordered by it. The mark is drawn quietly, which is what tells a reader the column is available rather than active
|
|
38
|
+
- `ascending` — The table is ordered by this column, smallest first — A to Z, earliest date, lowest amount
|
|
39
|
+
- `descending` — The table is ordered by this column, largest first. The commoner opening state for money and dates, where the newest or the biggest is what a reader came for
|
|
40
|
+
- never: Two columns at once. A table is ordered by one column, so a second header claiming a direction tells the reader the data is sorted two ways and leaves them unable to trust either
|
|
41
|
+
- **dividers** `enum` · default "rows"
|
|
42
|
+
- `rows` — The default. …
|
|
43
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records: a rate card, a comparison where the reader traces a column as often as a row. …
|
|
44
|
+
- `none` — No lines at all. Right for two or three rows, where the rules are more structure than data, and for a table whose columns are already separated by their alignment
|
|
45
|
+
- never: Marking a group. A missing line is not a heading — a table that wants sections wants a header row inside the body, or two tables. Nor `grid` as decoration on a long table: every vertical line is another thing between a reader and the value they came for
|
|
46
|
+
- **headerCase** `enum` · default "upper"
|
|
47
|
+
- `upper` — The house setting. Column names in capitals at font.overline — eleven pixels with wide tracking — which reads as a different texture from the values rather than a louder version of them. …
|
|
48
|
+
- `title` — Names drawn as they were written, at font.label.sm — twelve pixels, medium, ordinary tracking. …
|
|
49
|
+
- **sortable** `boolean` · default false — The reader can order the table by this column. It draws the control and the mark; what pressing it does is the page's, reported through `onSort`
|
|
50
|
+
- never: A column that only looks orderable. There is no state where the control is drawn and inert — a header that could be pressed to no effect is worse than one that was never offered
|
|
51
|
+
- **onSort** `callback` · optional — Told the header was pressed. …
|
|
52
|
+
- never: Sorting the data. This reports the press; the order of the rows is decided by whatever holds them, and a table that re-ordered its own children would be holding state it cannot own
|
|
53
|
+
|
|
54
|
+
## The type refuses
|
|
55
|
+
|
|
56
|
+
- sortable=true with onSort=null — A control the reader can press that reports to nobody. …
|
|
57
|
+
|
|
58
|
+
## Inside it
|
|
59
|
+
|
|
60
|
+
- 8 components are refused inside it; the list and the reasons are in the long document.
|
|
61
|
+
- Renders 3 parts: root, trigger, indicator.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/tableheadercell.md`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- GENERATED from tablerow.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TableRow
|
|
4
|
+
|
|
5
|
+
One row of a table: the cells that answer the same questions in the same order as every other row. It owns the rule under it and whether it reads as picked, and nothing about what any cell holds. …
|
|
6
|
+
|
|
7
|
+
`import { TableRow } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A record, with one cell per column
|
|
12
|
+
- A row a reader can pick, where `selected` draws the state the page is holding
|
|
13
|
+
|
|
14
|
+
## Something else, when
|
|
15
|
+
|
|
16
|
+
- The whole row is a target that navigates → **CardButton**
|
|
17
|
+
|
|
18
|
+
## Never
|
|
19
|
+
|
|
20
|
+
- A message spanning every column. A row that says "no results" is a sentence wearing a record's markup, and it is announced cell by cell against headers that do not apply to it
|
|
21
|
+
- A visual separator. The rule between rows is `dividers` on the table; an empty row is a record with nothing in it as far as anything reading the table is concerned
|
|
22
|
+
- Holding which rows are selected. `selected` draws the answer; keeping it is the page's, in its own state
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- **selected** `boolean` · default false — The page is holding this row in a set the reader has picked — for an export, a bulk action, a comparison. It draws the state and reports nothing: the checkbox in the row is what a reader presses, and what it reports belongs to the page
|
|
27
|
+
- never: The row under the pointer, or the row a reader last looked at. Hover is the browser's and this is a persistent answer — a row that highlighted on approach would say the reader had picked everything they passed over
|
|
28
|
+
- **hoverable** `boolean` · default true — Handed down by the table. It draws a wash under the pointer so a reader knows which row a press would land on — and only on a device that has a pointer, which the row's own stylesheet gates
|
|
29
|
+
- never: Saying a row is chosen. Hover is where the pointer is and nothing more; `selected` is the answer a reader gave, and a row that looked picked on approach would say they had picked everything they passed over
|
|
30
|
+
- **dividers** `enum` · default "rows"
|
|
31
|
+
- `rows` — The default. …
|
|
32
|
+
- `grid` — Lines both ways, for a table read as a matrix rather than as a list of records: a rate card, a comparison where the reader traces a column as often as a row. …
|
|
33
|
+
- `none` — No lines at all. Right for two or three rows, where the rules are more structure than data, and for a table whose columns are already separated by their alignment
|
|
34
|
+
- never: Marking a group. A missing line is not a heading — a table that wants sections wants a header row inside the body, or two tables. Nor `grid` as decoration on a long table: every vertical line is another thing between a reader and the value they came for
|
|
35
|
+
- **headerCase** `enum` · default "upper"
|
|
36
|
+
- `upper` — The house setting: column names in capitals, at the role that suits them. A header is read once where the data under it is read many times, and capitals are what stop it competing
|
|
37
|
+
- `title` — Names drawn as they were written, at twelve pixels. Right where the names are long, are proper nouns whose own capitals would be flattened, or are in a script with no case at all
|
|
38
|
+
- **overflow** `enum` · default "wrap"
|
|
39
|
+
- `wrap` — The default. Text too long for its column wraps and the row grows taller, so nothing is hidden — right whenever the value is the point and a reader has to read all of it
|
|
40
|
+
- `truncate` — Rows must stay one line high — a dense table a reader scans down, where a row that grew would break the rhythm they are scanning by. …
|
|
41
|
+
- never: Making a column narrow enough to be worth truncating. Clipping is what a column does when it has run out of room, not a way to give it less — a table of ellipses has hidden its data behind a hover on every cell
|
|
42
|
+
- **size** `enum` · default "md"
|
|
43
|
+
- `sm` — Compact. Dense data a reader scans rather than reads — a ledger, a positions table, anything where fitting more rows on screen is worth more than air around each one
|
|
44
|
+
- `md` — Balanced, and the default: rows a reader moves through at reading pace, with enough room that the eye does not slip between them
|
|
45
|
+
- `lg` — Spacious. Few rows, each carrying something substantial — a plan comparison, a summary of three accounts. Reach for it when the table is the page rather than a part of it
|
|
46
|
+
- never: Making the text bigger or smaller. It changes how tall a row is and nothing else — the type stays one size down the whole table, because a reader comparing values across three tables at three densities is comparing the values rather than the tables. …
|
|
47
|
+
|
|
48
|
+
## Inside it
|
|
49
|
+
|
|
50
|
+
- Takes only TableCell, TableHeaderCell.
|
|
51
|
+
- At least 1, no ceiling — fewer is not this component and more is a different one.
|
|
52
|
+
- 4 components are refused inside it; the list and the reasons are in the long document.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/tablerow.md`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- GENERATED from tablist.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TabList
|
|
4
|
+
|
|
5
|
+
A strip of comparable versions of one thing, one of them showing at a time. …
|
|
6
|
+
|
|
7
|
+
`import { TabList } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- Two or three versions of one offer differ in a way a reader wants to compare — monthly against yearly, one platform against another
|
|
12
|
+
- The page has already written every version, and showing them at once would be repetition rather than information
|
|
13
|
+
- The reader's choice changes what they see and nothing else — no route, no account, nothing the page has to remember
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The sections are separate topics rather than versions of one thing → **Accordion**
|
|
18
|
+
- Every version is worth reading → **Card**
|
|
19
|
+
- The tabs would go to other pages → **nothing in this system does this**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Navigation. This is a group of buttons, not a landmark: nothing here carries an href, and a strip whose items led away would be a menu drawn as a comparison
|
|
24
|
+
- A sequence. Tabs are alternatives and are pressed in any order — steps happen in one, and a strip says otherwise to everyone who reads it
|
|
25
|
+
- One tab. A set of one is a heading with a border, and the selected state marks it against nothing
|
|
26
|
+
- More than about four. A strip is scanned across in a glance, and the point at which a reader has to read it to choose is the point it should have been a list
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
- **label** `string` · required — Always — a group with no name is a group a screen reader announces as nothing, and the reader is told there is a set without being told what it is a set of. …
|
|
31
|
+
- never: A heading. This is the group's accessible name and it is not drawn — a strip that needs a visible heading gets one on the page above it, which is a heading a sighted reader can see too
|
|
32
|
+
- **value** `string` · optional — The page is holding which tab is current, because the choice also drives what is rendered beneath the strip — the ordinary case here. Passing it makes the strip controlled: it shows what it is told and reports presses through onChange. …
|
|
33
|
+
- never: Half of a controlled strip. A value passed without an onChange to move it is a strip that cannot respond to being pressed — which reads as a broken control rather than a fixed one, and is the shape a page falls into by adding the value first
|
|
34
|
+
- **onChange** `callback` · optional — Whenever value is — together they are how a page holds the choice. It is called with the pressed tab's value after that tab's own onSelect, so a tab that reports its own presses keeps doing so inside a set
|
|
35
|
+
- never: Side effects a press should not have. This says which version the reader is looking at; a strip that also navigated, submitted or fetched on it would be doing the thing its intent says it does not
|
|
36
|
+
|
|
37
|
+
## Inside it
|
|
38
|
+
|
|
39
|
+
- Takes only Tab.
|
|
40
|
+
- At least 2, no ceiling — fewer is not this component and more is a different one.
|
|
41
|
+
- 6 components are refused inside it; the list and the reasons are in the long document.
|
|
42
|
+
- Renders 3 parts: root, list, indicator.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/tablist.md`.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!-- GENERATED from textarea.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# TextArea
|
|
4
|
+
|
|
5
|
+
A field for what a visitor wants to say in their own words — the message on a contact form, the 'tell us about your project' on an enquiry, the reason someone is applying to partner. …
|
|
6
|
+
|
|
7
|
+
`import { TextArea } from '@deriv-com/dds-marketing'`
|
|
8
|
+
|
|
9
|
+
## Reach for it when
|
|
10
|
+
|
|
11
|
+
- A contact form asks what the reader actually wants — the message, the enquiry, the question
|
|
12
|
+
- An application or partner form asks someone to describe what they do in their own words
|
|
13
|
+
- Feedback, where the value of the answer is precisely the part no set of options would have caught
|
|
14
|
+
|
|
15
|
+
## Something else, when
|
|
16
|
+
|
|
17
|
+
- The value is one line — a name, an address, a company → **nothing in this system does this**
|
|
18
|
+
- The reader is choosing from a set rather than composing → **nothing in this system does this**
|
|
19
|
+
- The page is presenting text rather than collecting it → **nothing in this system does this**
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
- Opening a form with it. The reader has not decided to spend that much on the page yet, and a large empty box is what tells them how much is being asked
|
|
24
|
+
- Sensitive data. A landing page has no account and no session, and a field big enough for a paragraph is big enough for something that belongs behind a sign-in
|
|
25
|
+
- Anything the page will parse. If the answer has a shape, ask for its shape
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- **size** `enum` · default "md" — Choosing the type and the inset, which is all size means here. It does not set a height — that comes from rows and from the text, so a size and a height are two separate things to decide
|
|
30
|
+
- `sm` — A note field in a dense form, where the box sits among other controls rather than being what the section is for. The height is unchanged — only the corner tightens
|
|
31
|
+
- `md` — The default, and nearly every form on a page — a contact form in a section, an enquiry beside the copy that prompted it
|
|
32
|
+
- `lg` — A form that is the reason the section exists, matched to the fields around it
|
|
33
|
+
- **status** `enum` · default "none" — The outcome of a check, and whether one is running. …
|
|
34
|
+
- `none` — Nothing has been checked yet, or the value passed and saying so would be noise
|
|
35
|
+
- `error` — The value cannot be accepted and the user has to change it
|
|
36
|
+
- `warning` — The value is accepted but likely wrong — an address that failed a lookup, a name that does not match the account. The user may continue
|
|
37
|
+
- `success` — The value was checked against something and passed, and confirming that is worth the space — an available username, a verified code
|
|
38
|
+
- `pending` — A check is in flight and its outcome is not known yet — a description going through moderation, an address being looked up, a note being scanned before it is filed. …
|
|
39
|
+
- never: Decoration, or a permanent state. A status is the result of checking a value, so a field that always looks like a warning is telling the user nothing
|
|
40
|
+
- **label** `string` · required — Always — an input without a label is unusable by screen readers. A noun phrase naming the value, in sentence case: "Email address", not "Enter your email address"
|
|
41
|
+
- never: The format or the rule, which belong in helperText — a label that explains has stopped naming. And it is a string rather than a node because what joins a label here is the component's own: the required and optional marks render inside it already, so markup passed in would be competing with parts that are declared
|
|
42
|
+
- **labelTooltip** `string` · optional — A short explanation the label has no room for and the field does not always need on screen — why a description is asked for, what a reviewer will do with it, what counts as enough detail. …
|
|
43
|
+
- never: Anything the user needs before they start writing, which is helperText and belongs on screen. A tooltip is for the reader who stops to ask, and a prose field is exactly where somebody will not stop — they are already typing. …
|
|
44
|
+
- **placeholder** `string` · optional — Showing an example of the value's shape, alongside helperText that states the rule
|
|
45
|
+
- never: The label, or the only place the format is stated. Placeholder text disappears the moment the user types and is not an accessible name
|
|
46
|
+
- **helperText** `string` · optional — The user needs to know something before they type — a format, a limit, or why this is being asked
|
|
47
|
+
- never: Validation results, which belong in statusMessage and appear only once validation has run. Note what happens when both are set: any status other than none hides this and shows statusMessage in its place, so guidance and a verdict are never on screen together and the layout does not shift between them
|
|
48
|
+
- **rows** `number` · default 3 — The height the field starts at, in lines, which is also the shortest it ever gets. Three says a sentence or two is expected; ten asks for an essay before anybody has read the label, so the number is a statement about the answer wanted
|
|
49
|
+
- **maxRows** `number` · default 10 — Where the growing stops and the scrolling starts. Needed rather than optional: a field that grows without limit pushes whatever follows it off the screen, and a submit button nobody can reach is worse than a paragraph nobody can see all of. …
|
|
50
|
+
- never: A number below rows. The two are a floor and a ceiling, and the contract cannot say so — illegalCombinations compares a prop to a value, never a prop to a prop — so the field takes the larger of the two as its ceiling and opens at the height rows asked for
|
|
51
|
+
- **maxLength** `number` · optional — The most the field will accept, which also brings the count that shows it. Give it where the limit is real — a message a system will truncate, a field a database will refuse — and leave it out where prose is simply prose
|
|
52
|
+
- never: A limit the page enforces later. A field that accepts 400 characters and a form that rejects them is a field that lied, and the count would have been counting toward the wrong number
|
|
53
|
+
- **statusMessage** `string` · required — Saying what the status means: what is wrong and how to fix it, what to look at, or what was confirmed. …
|
|
54
|
+
- never: Restating the status. "Error" beside a red field says nothing the colour has not already said, and the colour is the part a colour-blind user may not get
|
|
55
|
+
- **required** `boolean` · default false — The form cannot be submitted without this field, and the user should know before they reach the end
|
|
56
|
+
- never: Validation. It marks and announces the field as required and nothing more — whether the value is acceptable is still decided by the consumer and said through status and statusMessage, so the browser never raises a message of its own that this system cannot style
|
|
57
|
+
- **requiredMark** `enum` · default "text" — Choosing how a required field says so. Decide which state is the exception first — mark the required fields or the optional ones, whichever are fewer — and only then how to mark it
|
|
58
|
+
- `text` — Short forms, public ones, and anywhere the label row has room. …
|
|
59
|
+
- `asterisk` — Long or dense forms, where the word repeats down the page and one legend can say it once instead — and forms whose labels are too tight for a translated word, since "Required" becomes "Erforderlich" and an asterisk is the same width in every language. …
|
|
60
|
+
- never: Varying within one form. Whichever is chosen is a decision for the whole form: a page marking some labels with a word and others with a glyph reads as two conventions and teaches neither
|
|
61
|
+
- **optional** `boolean` · default false — Most fields on the form are required, so the few that are not are worth marking instead
|
|
62
|
+
- never: Marking every optional field on a form where most are optional — a marker on almost every label is noise, and the useful signal is whichever state is the exception
|
|
63
|
+
|
|
64
|
+
## The type refuses
|
|
65
|
+
|
|
66
|
+
- required=true with optional=true — A field is one or the other, and marking it both says nothing
|
|
67
|
+
- status="error" with statusMessage=null — An error with no explanation leaves the user stuck
|
|
68
|
+
- status="warning" with statusMessage=null — A warning with no explanation is a field the user cannot act on
|
|
69
|
+
- status="pending" with statusMessage=null — A wait with nothing said is a field that has stopped responding. TextInput allows this and puts a spinner at the trailing edge of its box instead — a one-line field has room beside the value. …
|
|
70
|
+
|
|
71
|
+
## Inside it
|
|
72
|
+
|
|
73
|
+
- 2 components are refused inside it; the list and the reasons are in the long document.
|
|
74
|
+
- Renders 13 parts: root, label-row, label, required-mark, optional-mark, label-tooltip, control, field, footer, helper, message, message-icon, counter.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
The reasoning behind each of these, the parts this renders, its states and snippets that compile: `.llm/components/textarea.md`.
|