@atom-learning/components 2.32.3-beta.0 → 2.34.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.
Files changed (545) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +11 -5
  3. package/dist/components/accordion/Accordion.js +1 -0
  4. package/dist/components/accordion/Accordion.js.map +1 -0
  5. package/dist/components/accordion/AccordionContent.js +1 -0
  6. package/dist/components/accordion/AccordionContent.js.map +1 -0
  7. package/dist/components/accordion/AccordionItem.js +2 -1
  8. package/dist/components/accordion/AccordionItem.js.map +1 -0
  9. package/dist/components/accordion/AccordionTrigger.js +2 -1
  10. package/dist/components/accordion/AccordionTrigger.js.map +1 -0
  11. package/dist/components/action-icon/ActionIcon.constants.js +1 -0
  12. package/dist/components/action-icon/ActionIcon.constants.js.map +1 -0
  13. package/dist/components/action-icon/ActionIcon.js +1 -0
  14. package/dist/components/action-icon/ActionIcon.js.map +1 -0
  15. package/dist/components/alert-dialog/AlertDialog.js +1 -0
  16. package/dist/components/alert-dialog/AlertDialog.js.map +1 -0
  17. package/dist/components/alert-dialog/AlertDialogContent.js +1 -0
  18. package/dist/components/alert-dialog/AlertDialogContent.js.map +1 -0
  19. package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -0
  20. package/dist/components/alert-dialog/alert-context/AlertContext.js.map +1 -0
  21. package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -0
  22. package/dist/components/alert-dialog/alert-context/AlertDialog.js.map +1 -0
  23. package/dist/components/alert-dialog/alert-context/reducer.js +1 -0
  24. package/dist/components/alert-dialog/alert-context/reducer.js.map +1 -0
  25. package/dist/components/avatar/Avatar.js +2 -1
  26. package/dist/components/avatar/Avatar.js.map +1 -0
  27. package/dist/components/avatar/AvatarIcon.js +1 -0
  28. package/dist/components/avatar/AvatarIcon.js.map +1 -0
  29. package/dist/components/avatar/AvatarImage.js +1 -0
  30. package/dist/components/avatar/AvatarImage.js.map +1 -0
  31. package/dist/components/avatar/AvatarInitial.js +1 -0
  32. package/dist/components/avatar/AvatarInitial.js.map +1 -0
  33. package/dist/components/avatar/AvatarPlaceholder.js +1 -0
  34. package/dist/components/avatar/AvatarPlaceholder.js.map +1 -0
  35. package/dist/components/badge/Badge.js +1 -0
  36. package/dist/components/badge/Badge.js.map +1 -0
  37. package/dist/components/box/Box.js +1 -0
  38. package/dist/components/box/Box.js.map +1 -0
  39. package/dist/components/button/Button.js +1 -0
  40. package/dist/components/button/Button.js.map +1 -0
  41. package/dist/components/calendar/Calendar.js +2 -1
  42. package/dist/components/calendar/Calendar.js.map +1 -0
  43. package/dist/components/calendar/Day.js +1 -0
  44. package/dist/components/calendar/Day.js.map +1 -0
  45. package/dist/components/calendar/constants.js +1 -0
  46. package/dist/components/calendar/constants.js.map +1 -0
  47. package/dist/components/carousel/Carousel.js +1 -0
  48. package/dist/components/carousel/Carousel.js.map +1 -0
  49. package/dist/components/carousel/CarouselArrows.js +2 -1
  50. package/dist/components/carousel/CarouselArrows.js.map +1 -0
  51. package/dist/components/carousel/CarouselPagination.js +1 -0
  52. package/dist/components/carousel/CarouselPagination.js.map +1 -0
  53. package/dist/components/carousel/CarouselSlide.js +2 -1
  54. package/dist/components/carousel/CarouselSlide.js.map +1 -0
  55. package/dist/components/carousel/CarouselSlider.js +1 -0
  56. package/dist/components/carousel/CarouselSlider.js.map +1 -0
  57. package/dist/components/checkbox/Checkbox.js +1 -0
  58. package/dist/components/checkbox/Checkbox.js.map +1 -0
  59. package/dist/components/checkbox-field/CheckboxField.js +2 -1
  60. package/dist/components/checkbox-field/CheckboxField.js.map +1 -0
  61. package/dist/components/chip/Chip.js +2 -1
  62. package/dist/components/chip/Chip.js.map +1 -0
  63. package/dist/components/chip/ChipGroup.js +2 -1
  64. package/dist/components/chip/ChipGroup.js.map +1 -0
  65. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js +1 -0
  66. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js.map +1 -0
  67. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +2 -1
  68. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js.map +1 -0
  69. package/dist/components/chip-dismissible-group/index.js +1 -0
  70. package/dist/components/chip-dismissible-group/index.js.map +1 -0
  71. package/dist/components/chip-toggle-group/ChipToggleGroupItem.js +1 -0
  72. package/dist/components/chip-toggle-group/ChipToggleGroupItem.js.map +1 -0
  73. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js +1 -0
  74. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js.map +1 -0
  75. package/dist/components/chip-toggle-group/index.js +1 -0
  76. package/dist/components/chip-toggle-group/index.js.map +1 -0
  77. package/dist/components/combobox/Combobox.js +1 -0
  78. package/dist/components/combobox/Combobox.js.map +1 -0
  79. package/dist/components/combobox/ComboboxInput.js +1 -0
  80. package/dist/components/combobox/ComboboxInput.js.map +1 -0
  81. package/dist/components/combobox/ComboboxList.js +1 -0
  82. package/dist/components/combobox/ComboboxList.js.map +1 -0
  83. package/dist/components/combobox/ComboboxOption.js +1 -0
  84. package/dist/components/combobox/ComboboxOption.js.map +1 -0
  85. package/dist/components/combobox/ComboboxPopover.js +1 -0
  86. package/dist/components/combobox/ComboboxPopover.js.map +1 -0
  87. package/dist/components/data-table/DataTable.js +2 -1
  88. package/dist/components/data-table/DataTable.js.map +1 -0
  89. package/dist/components/data-table/DataTable.types.js +1 -0
  90. package/dist/components/data-table/DataTable.types.js.map +1 -0
  91. package/dist/components/data-table/DataTableBody.js +2 -1
  92. package/dist/components/data-table/DataTableBody.js.map +1 -0
  93. package/dist/components/data-table/DataTableContext.js +1 -0
  94. package/dist/components/data-table/DataTableContext.js.map +1 -0
  95. package/dist/components/data-table/DataTableDataCell.js +2 -1
  96. package/dist/components/data-table/DataTableDataCell.js.map +1 -0
  97. package/dist/components/data-table/DataTableError.js +1 -0
  98. package/dist/components/data-table/DataTableError.js.map +1 -0
  99. package/dist/components/data-table/DataTableGlobalFilter.js +2 -1
  100. package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -0
  101. package/dist/components/data-table/DataTableHead.js +1 -0
  102. package/dist/components/data-table/DataTableHead.js.map +1 -0
  103. package/dist/components/data-table/DataTableHeaderCell.js +1 -0
  104. package/dist/components/data-table/DataTableHeaderCell.js.map +1 -0
  105. package/dist/components/data-table/DataTableLoading.js +1 -0
  106. package/dist/components/data-table/DataTableLoading.js.map +1 -0
  107. package/dist/components/data-table/DataTableRow.js +2 -1
  108. package/dist/components/data-table/DataTableRow.js.map +1 -0
  109. package/dist/components/data-table/DataTableTable.js +2 -1
  110. package/dist/components/data-table/DataTableTable.js.map +1 -0
  111. package/dist/components/data-table/drag-and-drop/DragAndDropContainer.js +1 -0
  112. package/dist/components/data-table/drag-and-drop/DragAndDropContainer.js.map +1 -0
  113. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +1 -0
  114. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js.map +1 -0
  115. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js +1 -0
  116. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js.map +1 -0
  117. package/dist/components/data-table/drag-and-drop/DraggableRow.js +2 -1
  118. package/dist/components/data-table/drag-and-drop/DraggableRow.js.map +1 -0
  119. package/dist/components/data-table/drag-and-drop/Handle.js +2 -1
  120. package/dist/components/data-table/drag-and-drop/Handle.js.map +1 -0
  121. package/dist/components/data-table/getNewAsyncData.js +1 -0
  122. package/dist/components/data-table/getNewAsyncData.js.map +1 -0
  123. package/dist/components/data-table/pagination/Pagination.js +1 -0
  124. package/dist/components/data-table/pagination/Pagination.js.map +1 -0
  125. package/dist/components/data-table/pagination/PaginationButtons.js +1 -0
  126. package/dist/components/data-table/pagination/PaginationButtons.js.map +1 -0
  127. package/dist/components/data-table/usePagination.js +1 -0
  128. package/dist/components/data-table/usePagination.js.map +1 -0
  129. package/dist/components/data-table/useSorting.js +1 -0
  130. package/dist/components/data-table/useSorting.js.map +1 -0
  131. package/dist/components/date-field/DateField.js +1 -0
  132. package/dist/components/date-field/DateField.js.map +1 -0
  133. package/dist/components/date-input/DateInput.js +1 -0
  134. package/dist/components/date-input/DateInput.js.map +1 -0
  135. package/dist/components/date-input/constants.js +1 -0
  136. package/dist/components/date-input/constants.js.map +1 -0
  137. package/dist/components/date-input/use-date.js +1 -0
  138. package/dist/components/date-input/use-date.js.map +1 -0
  139. package/dist/components/dialog/Dialog.js +1 -0
  140. package/dist/components/dialog/Dialog.js.map +1 -0
  141. package/dist/components/dialog/DialogBackground.js +1 -0
  142. package/dist/components/dialog/DialogBackground.js.map +1 -0
  143. package/dist/components/dialog/DialogClose.js +1 -0
  144. package/dist/components/dialog/DialogClose.js.map +1 -0
  145. package/dist/components/dialog/DialogContent.js +1 -0
  146. package/dist/components/dialog/DialogContent.js.map +1 -0
  147. package/dist/components/dismissible/DismissibleRoot.js +2 -1
  148. package/dist/components/dismissible/DismissibleRoot.js.map +1 -0
  149. package/dist/components/dismissible/DismissibleTrigger.js +2 -1
  150. package/dist/components/dismissible/DismissibleTrigger.js.map +1 -0
  151. package/dist/components/dismissible/index.js +1 -0
  152. package/dist/components/dismissible/index.js.map +1 -0
  153. package/dist/components/dismissible-group/DismissibleGroupItem.js +1 -0
  154. package/dist/components/dismissible-group/DismissibleGroupItem.js.map +1 -0
  155. package/dist/components/dismissible-group/DismissibleGroupRoot.js +1 -0
  156. package/dist/components/dismissible-group/DismissibleGroupRoot.js.map +1 -0
  157. package/dist/components/dismissible-group/index.js +1 -0
  158. package/dist/components/dismissible-group/index.js.map +1 -0
  159. package/dist/components/divider/Divider.js +1 -0
  160. package/dist/components/divider/Divider.js.map +1 -0
  161. package/dist/components/dropdown-menu/DropdownMenu.js +1 -0
  162. package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -0
  163. package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -0
  164. package/dist/components/dropdown-menu/DropdownMenuContent.js.map +1 -0
  165. package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -0
  166. package/dist/components/dropdown-menu/DropdownMenuItem.js.map +1 -0
  167. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +2 -1
  168. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -0
  169. package/dist/components/dropdown-menu/DropdownMenuSeparator.js +1 -0
  170. package/dist/components/dropdown-menu/DropdownMenuSeparator.js.map +1 -0
  171. package/dist/components/dropdown-menu/DropdownMenuTrigger.js +1 -0
  172. package/dist/components/dropdown-menu/DropdownMenuTrigger.js.map +1 -0
  173. package/dist/components/empty-state/EmptyState.js +1 -0
  174. package/dist/components/empty-state/EmptyState.js.map +1 -0
  175. package/dist/components/empty-state/EmptyStateBody.js +1 -0
  176. package/dist/components/empty-state/EmptyStateBody.js.map +1 -0
  177. package/dist/components/empty-state/EmptyStateImage.js +1 -0
  178. package/dist/components/empty-state/EmptyStateImage.js.map +1 -0
  179. package/dist/components/empty-state/EmptyStateTitle.js +1 -0
  180. package/dist/components/empty-state/EmptyStateTitle.js.map +1 -0
  181. package/dist/components/field-wrapper/FieldDescription.js +2 -1
  182. package/dist/components/field-wrapper/FieldDescription.js.map +1 -0
  183. package/dist/components/field-wrapper/FieldWrapper.js +1 -0
  184. package/dist/components/field-wrapper/FieldWrapper.js.map +1 -0
  185. package/dist/components/field-wrapper/InlineFieldWrapper.js +2 -1
  186. package/dist/components/field-wrapper/InlineFieldWrapper.js.map +1 -0
  187. package/dist/components/file-input/FileInput.js +2 -1
  188. package/dist/components/file-input/FileInput.js.map +1 -0
  189. package/dist/components/flex/Flex.js +1 -0
  190. package/dist/components/flex/Flex.js.map +1 -0
  191. package/dist/components/form/Form.js +1 -0
  192. package/dist/components/form/Form.js.map +1 -0
  193. package/dist/components/form/Form.types.js +1 -0
  194. package/dist/components/form/Form.types.js.map +1 -0
  195. package/dist/components/form/useFieldError.js +1 -0
  196. package/dist/components/form/useFieldError.js.map +1 -0
  197. package/dist/components/grid/Grid.js +2 -1
  198. package/dist/components/grid/Grid.js.map +1 -0
  199. package/dist/components/heading/Heading.js +2 -1
  200. package/dist/components/heading/Heading.js.map +1 -0
  201. package/dist/components/icon/Icon.js +2 -1
  202. package/dist/components/icon/Icon.js.map +1 -0
  203. package/dist/components/image/Image.js +1 -0
  204. package/dist/components/image/Image.js.map +1 -0
  205. package/dist/components/inline-message/InlineMessage.config.js +1 -0
  206. package/dist/components/inline-message/InlineMessage.config.js.map +1 -0
  207. package/dist/components/inline-message/InlineMessage.js +2 -1
  208. package/dist/components/inline-message/InlineMessage.js.map +1 -0
  209. package/dist/components/input/Input.js +1 -0
  210. package/dist/components/input/Input.js.map +1 -0
  211. package/dist/components/input-field/InputField.js +1 -0
  212. package/dist/components/input-field/InputField.js.map +1 -0
  213. package/dist/components/label/Label.js +2 -1
  214. package/dist/components/label/Label.js.map +1 -0
  215. package/dist/components/link/Link.js +2 -1
  216. package/dist/components/link/Link.js.map +1 -0
  217. package/dist/components/list/List.js +2 -1
  218. package/dist/components/list/List.js.map +1 -0
  219. package/dist/components/loader/Loader.js +1 -0
  220. package/dist/components/loader/Loader.js.map +1 -0
  221. package/dist/components/markdown-content/MarkdownContent.js +1 -0
  222. package/dist/components/markdown-content/MarkdownContent.js.map +1 -0
  223. package/dist/components/markdown-content/components/MarkdownCode.js +1 -0
  224. package/dist/components/markdown-content/components/MarkdownCode.js.map +1 -0
  225. package/dist/components/markdown-content/components/MarkdownEmphasis.js +2 -1
  226. package/dist/components/markdown-content/components/MarkdownEmphasis.js.map +1 -0
  227. package/dist/components/markdown-content/components/MarkdownHeading.js +2 -1
  228. package/dist/components/markdown-content/components/MarkdownHeading.js.map +1 -0
  229. package/dist/components/markdown-content/components/MarkdownImage.js +2 -1
  230. package/dist/components/markdown-content/components/MarkdownImage.js.map +1 -0
  231. package/dist/components/markdown-content/components/MarkdownInlineCode.js +2 -1
  232. package/dist/components/markdown-content/components/MarkdownInlineCode.js.map +1 -0
  233. package/dist/components/markdown-content/components/MarkdownLink.js +2 -1
  234. package/dist/components/markdown-content/components/MarkdownLink.js.map +1 -0
  235. package/dist/components/markdown-content/components/MarkdownList.js +1 -0
  236. package/dist/components/markdown-content/components/MarkdownList.js.map +1 -0
  237. package/dist/components/markdown-content/components/MarkdownListItem.js +2 -1
  238. package/dist/components/markdown-content/components/MarkdownListItem.js.map +1 -0
  239. package/dist/components/markdown-content/components/MarkdownParagraph.js +2 -1
  240. package/dist/components/markdown-content/components/MarkdownParagraph.js.map +1 -0
  241. package/dist/components/markdown-content/components/MarkdownStrong.js +2 -1
  242. package/dist/components/markdown-content/components/MarkdownStrong.js.map +1 -0
  243. package/dist/components/markdown-content/components/MarkdownText.js +1 -0
  244. package/dist/components/markdown-content/components/MarkdownText.js.map +1 -0
  245. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +2 -1
  246. package/dist/components/markdown-content/components/MarkdownThematicBreak.js.map +1 -0
  247. package/dist/components/navigation/NavigationMenu.js +1 -0
  248. package/dist/components/navigation/NavigationMenu.js.map +1 -0
  249. package/dist/components/navigation/NavigationMenu.styles.js +1 -0
  250. package/dist/components/navigation/NavigationMenu.styles.js.map +1 -0
  251. package/dist/components/navigation/NavigationMenuContext.js +1 -0
  252. package/dist/components/navigation/NavigationMenuContext.js.map +1 -0
  253. package/dist/components/navigation/NavigationMenuDropdown.js +1 -0
  254. package/dist/components/navigation/NavigationMenuDropdown.js.map +1 -0
  255. package/dist/components/navigation/NavigationMenuDropdownContent.js +2 -1
  256. package/dist/components/navigation/NavigationMenuDropdownContent.js.map +1 -0
  257. package/dist/components/navigation/NavigationMenuDropdownItem.js +1 -0
  258. package/dist/components/navigation/NavigationMenuDropdownItem.js.map +1 -0
  259. package/dist/components/navigation/NavigationMenuDropdownTrigger.js +1 -0
  260. package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -0
  261. package/dist/components/navigation/NavigationMenuLink.js +2 -1
  262. package/dist/components/navigation/NavigationMenuLink.js.map +1 -0
  263. package/dist/components/navigation/preventHover.js +1 -0
  264. package/dist/components/navigation/preventHover.js.map +1 -0
  265. package/dist/components/notification-badge/NotificationBadge.js +2 -1
  266. package/dist/components/notification-badge/NotificationBadge.js.map +1 -0
  267. package/dist/components/number-input/NumberInput.js +2 -1
  268. package/dist/components/number-input/NumberInput.js.map +1 -0
  269. package/dist/components/number-input/NumberInputStepper.js +1 -0
  270. package/dist/components/number-input/NumberInputStepper.js.map +1 -0
  271. package/dist/components/number-input-field/NumberInputField.js +2 -1
  272. package/dist/components/number-input-field/NumberInputField.js.map +1 -0
  273. package/dist/components/password-field/PasswordField.js +1 -0
  274. package/dist/components/password-field/PasswordField.js.map +1 -0
  275. package/dist/components/password-input/PasswordInput.js +1 -0
  276. package/dist/components/password-input/PasswordInput.js.map +1 -0
  277. package/dist/components/popover/Popover.js +1 -0
  278. package/dist/components/popover/Popover.js.map +1 -0
  279. package/dist/components/popover/PopoverContent.js +2 -1
  280. package/dist/components/popover/PopoverContent.js.map +1 -0
  281. package/dist/components/progress-bar/ProgressBar.js +1 -0
  282. package/dist/components/progress-bar/ProgressBar.js.map +1 -0
  283. package/dist/components/radio-button/RadioButton.js +2 -1
  284. package/dist/components/radio-button/RadioButton.js.map +1 -0
  285. package/dist/components/radio-button/RadioButtonGroup.js +1 -0
  286. package/dist/components/radio-button/RadioButtonGroup.js.map +1 -0
  287. package/dist/components/radio-button-field/RadioButtonField.js +2 -1
  288. package/dist/components/radio-button-field/RadioButtonField.js.map +1 -0
  289. package/dist/components/radio-button-field/RadioField.js +2 -1
  290. package/dist/components/radio-button-field/RadioField.js.map +1 -0
  291. package/dist/components/radio-card/RadioCard.js +1 -0
  292. package/dist/components/radio-card/RadioCard.js.map +1 -0
  293. package/dist/components/radio-card/RadioCardGroup.js +2 -1
  294. package/dist/components/radio-card/RadioCardGroup.js.map +1 -0
  295. package/dist/components/search-field/SearchField.js +1 -0
  296. package/dist/components/search-field/SearchField.js.map +1 -0
  297. package/dist/components/search-input/SearchInput.d.ts +2 -0
  298. package/dist/components/search-input/SearchInput.js +2 -1
  299. package/dist/components/search-input/SearchInput.js.map +1 -0
  300. package/dist/components/select/Select.js +1 -0
  301. package/dist/components/select/Select.js.map +1 -0
  302. package/dist/components/select-field/SelectField.js +2 -1
  303. package/dist/components/select-field/SelectField.js.map +1 -0
  304. package/dist/components/sidedrawer/Sidedrawer.js +1 -0
  305. package/dist/components/sidedrawer/Sidedrawer.js.map +1 -0
  306. package/dist/components/sidedrawer/Sidedrawer.styles.js +1 -0
  307. package/dist/components/sidedrawer/Sidedrawer.styles.js.map +1 -0
  308. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +2 -1
  309. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js.map +1 -0
  310. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionItem.js +1 -0
  311. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionItem.js.map +1 -0
  312. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionRoot.js +1 -0
  313. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionRoot.js.map +1 -0
  314. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionTrigger.js +1 -0
  315. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionTrigger.js.map +1 -0
  316. package/dist/components/sidedrawer/SidedrawerBody.js +1 -0
  317. package/dist/components/sidedrawer/SidedrawerBody.js.map +1 -0
  318. package/dist/components/sidedrawer/SidedrawerClose.js +1 -0
  319. package/dist/components/sidedrawer/SidedrawerClose.js.map +1 -0
  320. package/dist/components/sidedrawer/SidedrawerContent.js +2 -1
  321. package/dist/components/sidedrawer/SidedrawerContent.js.map +1 -0
  322. package/dist/components/sidedrawer/SidedrawerFooter.js +1 -0
  323. package/dist/components/sidedrawer/SidedrawerFooter.js.map +1 -0
  324. package/dist/components/sidedrawer/SidedrawerHeader.js +1 -0
  325. package/dist/components/sidedrawer/SidedrawerHeader.js.map +1 -0
  326. package/dist/components/sidedrawer/SidedrawerItem.js +1 -0
  327. package/dist/components/sidedrawer/SidedrawerItem.js.map +1 -0
  328. package/dist/components/sidedrawer/SidedrawerOverlay.js +1 -0
  329. package/dist/components/sidedrawer/SidedrawerOverlay.js.map +1 -0
  330. package/dist/components/sidedrawer/SidedrawerTrigger.js +1 -0
  331. package/dist/components/sidedrawer/SidedrawerTrigger.js.map +1 -0
  332. package/dist/components/slider/Slider.d.ts +2 -1
  333. package/dist/components/slider/Slider.js +2 -1
  334. package/dist/components/slider/Slider.js.map +1 -0
  335. package/dist/components/slider/SliderSteps.js +1 -0
  336. package/dist/components/slider/SliderSteps.js.map +1 -0
  337. package/dist/components/slider/SliderValue.js +1 -0
  338. package/dist/components/slider/SliderValue.js.map +1 -0
  339. package/dist/components/slider-field/SliderField.js +2 -1
  340. package/dist/components/slider-field/SliderField.js.map +1 -0
  341. package/dist/components/stack/Stack.js +1 -0
  342. package/dist/components/stack/Stack.js.map +1 -0
  343. package/dist/components/stack-content/StackContent.js +2 -1
  344. package/dist/components/stack-content/StackContent.js.map +1 -0
  345. package/dist/components/stepper/Stepper.js +1 -0
  346. package/dist/components/stepper/Stepper.js.map +1 -0
  347. package/dist/components/stepper/StepperStepBack.js +2 -1
  348. package/dist/components/stepper/StepperStepBack.js.map +1 -0
  349. package/dist/components/stepper/StepperStepBullet.js +1 -0
  350. package/dist/components/stepper/StepperStepBullet.js.map +1 -0
  351. package/dist/components/stepper/StepperStepContainer.js +1 -0
  352. package/dist/components/stepper/StepperStepContainer.js.map +1 -0
  353. package/dist/components/stepper/StepperStepForward.js +1 -0
  354. package/dist/components/stepper/StepperStepForward.js.map +1 -0
  355. package/dist/components/stepper/StepperStepLabel.js +1 -0
  356. package/dist/components/stepper/StepperStepLabel.js.map +1 -0
  357. package/dist/components/stepper/StepperSteps.js +1 -0
  358. package/dist/components/stepper/StepperSteps.js.map +1 -0
  359. package/dist/components/stepper/stepper-context/StepperContext.js +1 -0
  360. package/dist/components/stepper/stepper-context/StepperContext.js.map +1 -0
  361. package/dist/components/stepper/types.js +1 -0
  362. package/dist/components/stepper/types.js.map +1 -0
  363. package/dist/components/switch/Switch.js +1 -0
  364. package/dist/components/switch/Switch.js.map +1 -0
  365. package/dist/components/table/Table.d.ts +1 -5
  366. package/dist/components/table/Table.js +2 -1
  367. package/dist/components/table/Table.js.map +1 -0
  368. package/dist/components/table/TableBody.js +2 -1
  369. package/dist/components/table/TableBody.js.map +1 -0
  370. package/dist/components/table/TableCell.js +1 -0
  371. package/dist/components/table/TableCell.js.map +1 -0
  372. package/dist/components/table/TableFooter.js +1 -0
  373. package/dist/components/table/TableFooter.js.map +1 -0
  374. package/dist/components/table/TableFooterCell.js +1 -0
  375. package/dist/components/table/TableFooterCell.js.map +1 -0
  376. package/dist/components/table/TableHeader.js +2 -1
  377. package/dist/components/table/TableHeader.js.map +1 -0
  378. package/dist/components/table/TableHeaderCell.js +1 -0
  379. package/dist/components/table/TableHeaderCell.js.map +1 -0
  380. package/dist/components/table/TableRow.js +2 -1
  381. package/dist/components/table/TableRow.js.map +1 -0
  382. package/dist/components/tabs/Tabs.js +2 -1
  383. package/dist/components/tabs/Tabs.js.map +1 -0
  384. package/dist/components/tabs/TabsContent.js +1 -0
  385. package/dist/components/tabs/TabsContent.js.map +1 -0
  386. package/dist/components/tabs/TabsTrigger.js +2 -1
  387. package/dist/components/tabs/TabsTrigger.js.map +1 -0
  388. package/dist/components/tabs/TabsTriggerList.js +2 -1
  389. package/dist/components/tabs/TabsTriggerList.js.map +1 -0
  390. package/dist/components/text/Text.js +2 -1
  391. package/dist/components/text/Text.js.map +1 -0
  392. package/dist/components/textarea/Textarea.js +1 -0
  393. package/dist/components/textarea/Textarea.js.map +1 -0
  394. package/dist/components/textarea-field/TextareaField.js +1 -0
  395. package/dist/components/textarea-field/TextareaField.js.map +1 -0
  396. package/dist/components/toast/Toast.js +2 -1
  397. package/dist/components/toast/Toast.js.map +1 -0
  398. package/dist/components/toast/ToastProvider.js +2 -1
  399. package/dist/components/toast/ToastProvider.js.map +1 -0
  400. package/dist/components/toggle-group/ToggleGroupButton.js +2 -1
  401. package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -0
  402. package/dist/components/toggle-group/ToggleGroupItem.js +1 -0
  403. package/dist/components/toggle-group/ToggleGroupItem.js.map +1 -0
  404. package/dist/components/toggle-group/ToggleGroupRoot.js +1 -0
  405. package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -0
  406. package/dist/components/toggle-group/index.js +1 -0
  407. package/dist/components/toggle-group/index.js.map +1 -0
  408. package/dist/components/tooltip/Tooltip.js +1 -0
  409. package/dist/components/tooltip/Tooltip.js.map +1 -0
  410. package/dist/components/tooltip/TooltipContent.js +2 -1
  411. package/dist/components/tooltip/TooltipContent.js.map +1 -0
  412. package/dist/components/top-bar/TopBar.js +1 -0
  413. package/dist/components/top-bar/TopBar.js.map +1 -0
  414. package/dist/components/top-bar/TopBarActionIcon.js +1 -0
  415. package/dist/components/top-bar/TopBarActionIcon.js.map +1 -0
  416. package/dist/components/top-bar/TopBarBrand.js +1 -0
  417. package/dist/components/top-bar/TopBarBrand.js.map +1 -0
  418. package/dist/components/video/Video.js +2 -1
  419. package/dist/components/video/Video.js.map +1 -0
  420. package/dist/constants/zIndices.js +1 -0
  421. package/dist/constants/zIndices.js.map +1 -0
  422. package/dist/docgen.json +1 -1
  423. package/dist/experiments/color-scheme/ColorScheme.js +2 -1
  424. package/dist/experiments/color-scheme/ColorScheme.js.map +1 -0
  425. package/dist/experiments/color-scheme/blue.json.js +1 -0
  426. package/dist/experiments/color-scheme/blue.json.js.map +1 -0
  427. package/dist/experiments/color-scheme/generateAlphaColors.js +1 -0
  428. package/dist/experiments/color-scheme/generateAlphaColors.js.map +1 -0
  429. package/dist/experiments/color-scheme/slate.json.js +1 -0
  430. package/dist/experiments/color-scheme/slate.json.js.map +1 -0
  431. package/dist/experiments/color-scheme/stitches.colorscheme.config.js +1 -0
  432. package/dist/experiments/color-scheme/stitches.colorscheme.config.js.map +1 -0
  433. package/dist/index.cjs.js +2 -1
  434. package/dist/index.cjs.js.map +1 -0
  435. package/dist/index.d.ts +1 -0
  436. package/dist/index.js +2 -1
  437. package/dist/index.js.map +1 -0
  438. package/dist/stitches.js +1 -0
  439. package/dist/stitches.js.map +1 -0
  440. package/dist/utilities/create-theme-variants/createThemeVariants.js +1 -0
  441. package/dist/utilities/create-theme-variants/createThemeVariants.js.map +1 -0
  442. package/dist/utilities/css-wrapper/CSSWrapper.js +1 -0
  443. package/dist/utilities/css-wrapper/CSSWrapper.js.map +1 -0
  444. package/dist/utilities/hooks/useCallbackRef.js +2 -1
  445. package/dist/utilities/hooks/useCallbackRef.js.map +1 -0
  446. package/dist/utilities/hooks/useIsMountedRef.js +1 -0
  447. package/dist/utilities/hooks/useIsMountedRef.js.map +1 -0
  448. package/dist/utilities/hooks/useWindowScrollPosition.js +1 -0
  449. package/dist/utilities/hooks/useWindowScrollPosition.js.map +1 -0
  450. package/dist/utilities/hooks/useWindowSize.js +1 -0
  451. package/dist/utilities/hooks/useWindowSize.js.map +1 -0
  452. package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js +1 -0
  453. package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js.map +1 -0
  454. package/dist/utilities/override-stitches-variant-value/overrideStitchesVariantValue.js +1 -0
  455. package/dist/utilities/override-stitches-variant-value/overrideStitchesVariantValue.js.map +1 -0
  456. package/dist/utilities/style/capsize.js +1 -0
  457. package/dist/utilities/style/capsize.js.map +1 -0
  458. package/dist/utilities/style/encode-background-icon.js +1 -0
  459. package/dist/utilities/style/encode-background-icon.js.map +1 -0
  460. package/dist/utilities/style/focus-visible-style-block.js +1 -0
  461. package/dist/utilities/style/focus-visible-style-block.js.map +1 -0
  462. package/dist/utilities/style/keyframe-animations.js +1 -0
  463. package/dist/utilities/style/keyframe-animations.js.map +1 -0
  464. package/package.json +6 -6
  465. package/dist/components/table/TableStickyColumnsContainer.d.ts +0 -9
  466. package/dist/components/table/TableStickyColumnsContainer.js +0 -1
  467. package/dist/docs/Accordion.mdx +0 -94
  468. package/dist/docs/ActionIcon.mdx +0 -87
  469. package/dist/docs/AlertDialog.mdx +0 -40
  470. package/dist/docs/Avatar.mdx +0 -129
  471. package/dist/docs/Badge.mdx +0 -55
  472. package/dist/docs/Box.mdx +0 -52
  473. package/dist/docs/Button.mdx +0 -68
  474. package/dist/docs/CONTRIBUTING.md +0 -224
  475. package/dist/docs/CSSWrapper.mdx +0 -10
  476. package/dist/docs/Carousel.mdx +0 -88
  477. package/dist/docs/Checkbox.mdx +0 -19
  478. package/dist/docs/CheckboxField.mdx +0 -14
  479. package/dist/docs/Chip.mdx +0 -118
  480. package/dist/docs/ChipDismissibleGroup.mdx +0 -33
  481. package/dist/docs/ChipToggleGroup.mdx +0 -27
  482. package/dist/docs/Combobox.mdx +0 -44
  483. package/dist/docs/DataTable.mdx +0 -279
  484. package/dist/docs/DateField.mdx +0 -20
  485. package/dist/docs/DateInput.mdx +0 -87
  486. package/dist/docs/Dialog.mdx +0 -68
  487. package/dist/docs/Dismissible.mdx +0 -48
  488. package/dist/docs/DismissibleGroup.mdx +0 -29
  489. package/dist/docs/Divider.mdx +0 -16
  490. package/dist/docs/DropdownMenu.mdx +0 -30
  491. package/dist/docs/EmptyState.mdx +0 -23
  492. package/dist/docs/FieldWrapper.mdx +0 -30
  493. package/dist/docs/FileInput.mdx +0 -45
  494. package/dist/docs/Flex.mdx +0 -16
  495. package/dist/docs/Form.mdx +0 -411
  496. package/dist/docs/Grid.mdx +0 -28
  497. package/dist/docs/Heading.mdx +0 -30
  498. package/dist/docs/Icon.mdx +0 -30
  499. package/dist/docs/Image.mdx +0 -14
  500. package/dist/docs/InlineMessage.mdx +0 -52
  501. package/dist/docs/Input.mdx +0 -24
  502. package/dist/docs/InputField.mdx +0 -26
  503. package/dist/docs/Label.mdx +0 -32
  504. package/dist/docs/Link.mdx +0 -53
  505. package/dist/docs/List.mdx +0 -38
  506. package/dist/docs/Loader.mdx +0 -16
  507. package/dist/docs/MarkdownContent.mdx +0 -77
  508. package/dist/docs/NavigationMenu.mdx +0 -144
  509. package/dist/docs/NotificationBadge.mdx +0 -35
  510. package/dist/docs/NumberInput.mdx +0 -37
  511. package/dist/docs/NumberInputField.mdx +0 -26
  512. package/dist/docs/PasswordField.mdx +0 -23
  513. package/dist/docs/PasswordInput.mdx +0 -15
  514. package/dist/docs/Popover.mdx +0 -29
  515. package/dist/docs/ProgressBar.mdx +0 -56
  516. package/dist/docs/README.mdx +0 -79
  517. package/dist/docs/RadioButton.mdx +0 -10
  518. package/dist/docs/RadioButtonField.mdx +0 -25
  519. package/dist/docs/RadioCard.mdx +0 -62
  520. package/dist/docs/SearchField.mdx +0 -26
  521. package/dist/docs/SearchInput.mdx +0 -13
  522. package/dist/docs/Select.mdx +0 -56
  523. package/dist/docs/SelectField.mdx +0 -17
  524. package/dist/docs/Sidedrawer.mdx +0 -155
  525. package/dist/docs/Slider.mdx +0 -117
  526. package/dist/docs/SliderField.mdx +0 -35
  527. package/dist/docs/Stack.mdx +0 -24
  528. package/dist/docs/StackContent.mdx +0 -32
  529. package/dist/docs/Stepper.mdx +0 -154
  530. package/dist/docs/Styling.mdx +0 -85
  531. package/dist/docs/Switch.mdx +0 -28
  532. package/dist/docs/Table.mdx +0 -146
  533. package/dist/docs/Tabs.mdx +0 -76
  534. package/dist/docs/Text.mdx +0 -24
  535. package/dist/docs/Textarea.mdx +0 -12
  536. package/dist/docs/TextareaField.mdx +0 -21
  537. package/dist/docs/Toast.mdx +0 -20
  538. package/dist/docs/ToggleGroup.mdx +0 -88
  539. package/dist/docs/Tooltip.mdx +0 -25
  540. package/dist/docs/TopBar.mdx +0 -95
  541. package/dist/docs/Video.mdx +0 -12
  542. package/dist/docs/accessibility.mdx +0 -67
  543. package/dist/docs/coreconcepts.mdx +0 -77
  544. package/dist/docs/introduction.mdx +0 -33
  545. package/dist/docs/versioning.mdx +0 -40
@@ -1,27 +0,0 @@
1
- ---
2
- title: Chip Toggle Group
3
- component: ChipToggleGroupRoot,ChipToggleGroup.Item
4
- description: Combines the Toggle Group radix component with the Chip primitive styling
5
- category: Feedback
6
- ---
7
-
8
- Used as a method for filtering a collection of data. Acts like multiple or single selection. Each chip toggles between selected and unselected. When selected, a checkmark appears as the leading icon.
9
-
10
- ```tsx preview
11
- <ChipToggleGroup
12
- type="multiple"
13
- defaultValue={['a', 'b']}
14
- onValueChange={(value) => {
15
- console.log(value)
16
- }}
17
- >
18
- <ChipToggleGroup.Item value="a">A</ChipToggleGroup.Item>
19
- <ChipToggleGroup.Item value="b" disabled>
20
- B
21
- </ChipToggleGroup.Item>
22
- <ChipToggleGroup.Item value="c">C</ChipToggleGroup.Item>
23
- <ChipToggleGroup.Item value="d" disabled>
24
- D
25
- </ChipToggleGroup.Item>
26
- </ChipToggleGroup>
27
- ```
@@ -1,44 +0,0 @@
1
- ---
2
- title: Combobox
3
- component: Combobox,Combobox.Input,Combobox.Popover,Combobox.List,Combobox.Option,Combobox.OptionText
4
- description: Combobox combines a text input with a list of suggested values
5
- category: Form primitives
6
- ---
7
-
8
- `Combobox` wraps Reach UI's `Combobox` component with default styling and accepts all the same props. See [the Reach UI docs](https://reach.tech/combobox/) for details.
9
-
10
- Arbitrary components can be nested inside the `Combobox.Popover` to allow for more advanced usecases, e.g. adding a new value to the list of suggestions
11
-
12
- Note that when combined with a `Label`, the `id` that matches the `Label`'s `htmlFor` prop should go on the `Combobox.Input`.
13
-
14
- ```jsx live
15
- <Box css={{ width: '400px' }}>
16
- <Label css={{ mb: '$3' }} htmlFor="someid">
17
- What's your favourite fruit?
18
- </Label>
19
- <Combobox onSelect={console.log} openOnFocus>
20
- <Combobox.Input id="someid" />
21
- <Combobox.Popover>
22
- <Combobox.List>
23
- <Combobox.Option value="Apple" />
24
- <Combobox.Option value="Banana" />
25
- <Combobox.Option value="Cranberry" />
26
- <Combobox.Option value="Dragon fruit" />
27
-
28
- <Flex css={{ alignItems: 'center', p: '$2' }}>
29
- <Input size="sm" placeholder="New fruit" />
30
- <Button
31
- size="sm"
32
- css={{ ml: '$2' }}
33
- onClick={() =>
34
- alert('Nest other interactive UI here for advanced usecases')
35
- }
36
- >
37
- Add a new fruit
38
- </Button>
39
- </Flex>
40
- </Combobox.List>
41
- </Combobox.Popover>
42
- </Combobox>
43
- </Box>
44
- ```
@@ -1,279 +0,0 @@
1
- ---
2
- title: DataTable
3
- component: DataTable, DataTable.Table, DataTable.Head, DataTable.HeaderCell, DataTable.Body, DataTable.Row, DataTable.DataCell, DataTable.GlobalFilter, DataTable.Loading, DataTable.Error
4
- description: Displays tabular data with features such as sorting and pagination
5
- category: Content
6
- ---
7
-
8
- `DataTable` provides complex features for tables, like sorting and pagination. It's built around the `@tanstack/react-table` library and exposes the `table` state from that library directly. All util functions from the library are also compatible with `DataTable`. It's worth a good read of [`@tanstack/react-table`'s documentation](https://tanstack.com/table/v8/docs/guide/introduction) too, since we won't be repeating much of it here.
9
-
10
- `DataTable` and its subcomponents are designed to be very simple to use. This is achieved by abstracting complex and/or boilerplate logic away from the consumer. For example, `DataTable.Pagination` can be dropped inside a `DataTable` to paginate the table's data without the need to add any configuration on `DataTable` itself. This is achieved by having `DataTable.Pagination` itself use the `applyPagination` and `setPageSize` methods exposed by `useDataTable` on its first render. This pattern should be replicated wherever practical to maintain the best developer experience possible.
11
-
12
- ## Anatomy
13
-
14
- The root `DataTable` component manages the table's state and exposes it via the React Context API. This state can be accessed by any child components by calling `useDataTable`. You can pass an `initialState` prop to `DataTable` as described in the [`@tanstack/react-table` docs](https://tanstack.com/table/v8/docs/api/core/table#initialstate).
15
-
16
- Other `DataTable` components call `useDataTable` and provide useful default implementations for common patterns. For example, `DataTable.Head` will render a header for every column defined in the parent `DataTable`. `DataTable.Body` will render a row for every data item. `DataTable.Table` combines both `DataTable.Head` and `DataTable.Body`.
17
-
18
- ### Using defaults vs rolling your own
19
-
20
- Here's a simple config for some table data and columns.
21
-
22
- ```tsx
23
- // import { createColumnHelper } from '@tanstack/react-table'
24
-
25
- const columnHelper = createColumnHelper<{
26
- name: string
27
- hobby: string
28
- }>()
29
-
30
- const columns = [
31
- columnHelper.accessor('name', {
32
- cell: (info) => info.getValue()
33
- }),
34
- columnHelper.accessor('hobby', {
35
- cell: (info) => info.getValue()
36
- }),
37
- // Columns created with columnHelper.display won't be sortable.
38
- // They need a header to be set manually since they're not just reading
39
- // a property from the row.
40
- columnHelper.display({
41
- cell: (info) => <button>do something</button>,
42
- header: 'Actions'
43
- })
44
- ]
45
-
46
- const data = [
47
- { name: 'chrissy', hobby: 'bare-knuckle boxing' },
48
- { name: 'agatha', hobby: 'crossfit' },
49
- { name: 'betty', hobby: 'acting' }
50
- ]
51
- ```
52
-
53
- There are basically two ways to use `DataTable` to build a table from this config. The first uses the highest-level components that are bundled into `DataTable` to provide useful default behaviours with minimal code. The second directly accesses the state from `DataTable` and combines it with the `Table` UI components to achieve the same thing. This demonstrates how you could create more custom table UIs without the need to extend the high-level components.
54
-
55
- #### With Defaults
56
-
57
- The following two examples are exactly equivalent in their output. The second example is included to demonstrate what `DataTable`'s subcomponents do: they bundle up UI components and logic to provide useful defaults. They exist at various levels of abstraction, e.g. `DataTable.Table` renders `DataTable.Body`, which renders `DataTable.Row`. This means that you can use whichever component provides useful functionality for your use case while still being low-level enough to let you combine it with your own custom logic.
58
-
59
- ```tsx
60
- <DataTable columns={columns} data={data}>
61
- <DataTable.Table sortable css={{mb: '$4'}}/>
62
- <DataTable.Pagination pageSize={5} />
63
- </DataTable>
64
-
65
- <DataTable columns={columns} data={data}>
66
- <Table>
67
- <DataTable.Head sortable />
68
- <DataTable.Body />
69
- </Table>
70
- <DataTable.Pagination pageSize={5} />
71
- </DataTable>
72
- ```
73
-
74
- ### Rolling your own
75
-
76
- If you need more flexibility than the default implementations provide, you can roll your own. Note that you can mix and match default implementations with your own. For example you could write your own table head implementation but use `DataTable.Body` for the body.
77
-
78
- Note also that `useDataTable` can only be called by a child component of `DataTable`. In a real example, you'll probably have a separate named component which makes the `useDataTable` call, because if you're not using the defaults as above then you probably have some complex logic involved. In this example we've got an inline child component for simplicity.
79
-
80
- Note that if you update the value of the `data` prop, it will reset the state of the table. This is useful if you are manipulating the data outside the context of the table.
81
-
82
- ```tsx
83
- <DataTable columns={columns} data={data}>
84
- {() => {
85
- const { getHeaderGroups, getRowModel, setGlobalFilter, getState } =
86
- useDataTable()
87
- const { globalFilter } = getState()
88
-
89
- return (
90
- <>
91
- <Label htmlFor="search">User search</Label>
92
- <SearchInput
93
- name="search"
94
- value={globalFilter}
95
- onChange={setGlobalFilter}
96
- />
97
- <Table>
98
- <Table.Header>
99
- {getHeaderGroups().map((headerGroup) => (
100
- <Table.Row key={headerGroup.id}>
101
- {headerGroup.headers.map((header) => {
102
- const sort = header.column.getIsSorted()
103
- return (
104
- <Table.HeaderCell
105
- onClick={header.column.getToggleSortingHandler()}
106
- {...props}
107
- >
108
- {flexRender(
109
- header.column.columnDef.header,
110
- header.getContext()
111
- )}
112
- {sort && { asc: '^', desc: 'v' }[sort as string]}
113
- </Table.HeaderCell>
114
- )
115
- })}
116
- </Table.Row>
117
- ))}
118
- </Table.Header>
119
- <Table.Body>
120
- {getRowModel().rows.map((row) => (
121
- <Table.Row>
122
- {row.getVisibleCells().map((cell) => (
123
- <Table.Cell key={cell.id}>
124
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
125
- </Table.Cell>
126
- ))}
127
- </Table.Row>
128
- ))}
129
- </Table.Body>
130
- </Table>
131
- </>
132
- // Then you could build your own pagination here too I guess? If you really wanted to?
133
- )
134
- }}
135
- </DataTable>
136
- ```
137
-
138
- ### Server-side pagination and sorting
139
-
140
- `DataTable` can be used with local pagination or server-side pagination (getting only the data needed for the current page). To use one or the other, you have to use the `data` or `getAsyncData` prop respectively.
141
-
142
- The `getAsyncData` function accepts an object with the necessary parameters to get the relevant piece of data for the current page and order. All the parameters are optional, with these defaults:
143
-
144
- ```
145
- {
146
- pageIndex: 0,
147
- pageSize: 10,
148
- sortBy: undefined,
149
- sortDirection: undefined,
150
- globalFilter: ''
151
- }
152
- ```
153
-
154
- The response from the `getAsyncData` function must match the following schema:
155
-
156
- ```ts
157
- {
158
- results: Array<Record<string, unknown>> // your current page data, sorted if specified
159
- total: number // the total number of elements in your data
160
- }
161
- ```
162
-
163
- A loading state using `<DataTable.Loading>` is automatically included in `DataTable` which is visible while the `getAsyncData` promise is pending.
164
-
165
- You can use `DataTable.Error` to display your own error component when the `getAsyncData` function promise rejects. Notice `DataTable.Error` doesn't render anything on its own, but whatever is passed as childern.
166
-
167
- ```tsx
168
- <DataTable
169
- columns={columns}
170
- defaultPageSize={10}
171
- defaultSort={{ column: 'name', direction: 'asc' }}
172
- initialState={{ pagination: { pageIndex: 0, pageSize: 10 } }}
173
- getAsyncData={async ({
174
- pageIndex,
175
- pageSize,
176
- sortBy,
177
- sortDirection,
178
- globalFilter
179
- }) => {
180
- const params = new URLSearchParams({
181
- page: pageIndex,
182
- pageSize,
183
- order: sortBy,
184
- dir: sortDirection,
185
- search: globalFilter
186
- })
187
- const response = await fetch(`https://your-api?${params.toString()}`)
188
- const { results, total } = await response.json()
189
-
190
- return { results, total }
191
- }}
192
- >
193
- <DataTable.Table sortable css={{ mb: '$4', minWidth: '500px' }} />
194
- <DataTable.Error>
195
- {(retry) => <Button onClick={retry}>Try again</Button>}
196
- </DataTable.Error>
197
- <DataTable.Pagination />
198
- </DataTable>
199
- ```
200
-
201
- `DataTable.Error` provides a `retry` function to the children which allows you to recall the `getAsyncData` function. The `retry` function can be called with all the paginated parameters as an optional object. If no parameters are provided, `retry` will be called with the last paginated options.
202
-
203
- ```tsx
204
- <DataTable.Error>
205
- {(retry) => (
206
- <Button
207
- onClick={() =>
208
- retry?.({
209
- pageIndex: 5,
210
- pageSize: 10,
211
- sortBy: 'name',
212
- sortDirection: 'asc',
213
- globalFilter: ''
214
- })
215
- }
216
- >
217
- Retry
218
- </Button>
219
- )}
220
- </DataTable.Error>
221
- ```
222
-
223
- ## Features
224
-
225
- ### Search
226
-
227
- `DataTable.Search` renders a search input that filters the whole table by matching the input against values from any table column.
228
-
229
- ### Sorting
230
-
231
- A `DataTable`'s data can be sorted by default and can also be sortable by the user. These two options are independent of each other.
232
-
233
- #### Default sorting
234
-
235
- `DataTable` takes an optional `defaultSort` prop to configure the column and direction for the table's default sorting, e.g. `{column: 'name', direction: 'asc'}`
236
-
237
- #### User sorting
238
-
239
- If `DataTable`'s `isSortable` state is `true`, then `DataTable.Header` will be clickable to toggle between ascending, descending and no sorting in any sortable columns. `DataTable.Head` and `DataTable.Table` take an optional boolean `sortable` prop to configure this option.
240
-
241
- ### Pagination
242
-
243
- `DataTable.Pagination` can be passed as a child to `DataTable` to render the pagination UI and configure the parent `DataTable` to paginate its data. Note: there is currently a bug where `DataTable` will render all rows on the initial render, even when paginated. There is no visible effect, but it can cause performance issues on large tables. The workaround for this is to pass an `initialState` prop to `DataTable`. E.g. `initialState={pagination: {pageSize: 5, pageIndex: 0}}`. This will force pagination to apply properly on the initial render. Make sure the `pagination` prop matches the config you use in `DataTable.Pagination`, as the latter will take precedence after the initial render.
244
-
245
- ### Drag and drop
246
-
247
- The `DataTable.DragAndDropTable` can be rendered in place of `DataTable.Table` to allow users to reorder table rows via drag and drop. It takes an optional `onDragAndDrop` prop which is a function that fires when rows have been re-ordered via drag-and-drop. Use this to sync those changes with external data sources.
248
-
249
- Note that column sorting conflicts with drag and drop behaviour. In any context where you allow drag and drop reordering, you probably want to disable column sorting (see User Sorting above). Similarly, you should probably disable pagination because users won't be able to drag rows across page boundaries.
250
-
251
- #### Row IDs
252
-
253
- Drag-and-drop functionality relies on each table row having a unique ID. `DataTable.DragAndDropContainer` will throw an error if your don't provide unique IDs for each row in the `data` provided to `DataTable`, so you should consider wrapping your table in an `ErrorBoundary` to reduce the impact on your user if there is a problem with your data. By default, `DataTable.DragAndDropContainer` will look for this id in an `id` property on each object in `data`. You can use the `idColumn` prop to provide the name of a different property, e.g. `userId`, that already exists on your data so that you don't have to generate new IDs just for the table. For example, you could provide data like this with no additional configuration:
254
-
255
- ```tsx
256
- const data = [
257
- { name: 'chrissy', hobby: 'bare-knuckle boxing', id: 1 },
258
- { name: 'agatha', hobby: 'crossfit', id: 2 },
259
- { name: 'betty', hobby: 'acting', id: 3 }
260
- ]`
261
-
262
- <DataTable data={data} columns={columns}>
263
- <DataTable.DragAndDropTable onDragAndDrop={(oldIndex, newIndex, newData) => console.log(oldIndex, newIndex, newData)}/>
264
- </DataTable>
265
- ```
266
-
267
- Or you could provide this data and specify the id column accordingly:
268
-
269
- ```tsx
270
- const data = [
271
- { name: 'chrissy', hobby: 'bare-knuckle boxing', userId: 1 },
272
- { name: 'agatha', hobby: 'crossfit', userId: 2 },
273
- { name: 'betty', hobby: 'acting', userId: 3 }
274
- ]`
275
-
276
- <DataTable data={data} columns={columns}>
277
- <DataTable.DragAndDropTable idColumn="userId" onDragAndDrop={(oldIndex, newIndex, newData) => console.log(oldIndex, newIndex, newData)} />
278
- </DataTable>
279
- ```
@@ -1,20 +0,0 @@
1
- ---
2
- title: Date Field
3
- component: DateField
4
- description: DateField renders a field composed of an DateInput, a Label and a InlineMessage
5
- category: Form fields
6
- ---
7
-
8
- `DateField` is the preferred way to render a form field for dates.
9
-
10
- In addition to text `Label` (required) and a validation error (optional), `DateField` accepts all the same props as `DateInput` and will pass them on to the `DateInput` it renders. However, as with all our composed components,
11
- `DateField`’s `css` prop will be applied to a containing `Box`—the styling of the individual components inside `DateField` cannot be altered.
12
-
13
- Err on the side of using consistent form fields, but if you really need something with different styling then consider composing your own field from the
14
- `DateInput`, `Label` and `InlineMessage` components.
15
-
16
- ```tsx preview
17
- <Form>
18
- <DateField name="exam-date" label="Exam date" initialDate={new Date()} />
19
- </Form>
20
- ```
@@ -1,87 +0,0 @@
1
- ---
2
- title: Date Input
3
- component: DateInput
4
- description: A form component that provides a styled date selector without a label
5
- category: Form primitives
6
- ---
7
-
8
- Date Inputs should be accompanied by labels, so rather than using `DateInput` directly in a UI,
9
- it’s normally best to the `DateField` component, which combines a `DateInput` with a `Label` and
10
- displays validation errors. Alternatively, use this `DateInput` component to compose other field components
11
- with more specific requirements.
12
-
13
- `DateInput` is composed from [Dayzed](https://github.com/deseretdigital/dayzed), so further reading on the API can be found there. Some options from Dayzed are set by default in order to provide a uniform experience. For example, the prop `showOutsideDays`, which shows days outside the current calendar month that would appear on the grid, defaults to true in order to avoid extra whitespace.
14
-
15
- ```tsx preview
16
- <DateInput />
17
- ```
18
-
19
- ## Initial Date
20
-
21
- The `DateInput` component allows passing of an initial date, which will be selected by default. If you wish this to be the current date, you can use `new Date()` as per the preview below. Strings are also accepted and default to the `DD/MM/YYYY` format. It is recommended to use standard constructors for the date object as per MDN specifications.
22
-
23
- ```tsx preview
24
- <DateInput initialDate={new Date()} />
25
- ```
26
-
27
- ## Date Format
28
-
29
- Any combination of date formats can be passed in as a string, such as `DD/MM/YY` or `YYYY/MM/DD`. The default is `DD/MM/YYYY`. A full list of possible formats can be found [here](https://day.js.org/docs/en/parse/string-format#list-of-all-available-parsing-tokens).
30
-
31
- ```tsx
32
- <DateInput dateFormat="YYYY/MM/DD" />
33
- ```
34
-
35
- ## Dayzed customisation
36
-
37
- ### First Day of Week
38
-
39
- The calendar that is rendered by this component can have its first day of the week customised for different locales. The default is 1 (Monday), but for locales such as the US, pass in `firstDayOfWeek={0}` to set it to Sunday.
40
-
41
- ```tsx
42
- <DateInput firstDayOfWeek={0} />
43
- ```
44
-
45
- ## Translations
46
-
47
- The weekday and month names can be changed to anything you wish by passing in an array of strings to `weekdayNames` and `monthNames`.
48
-
49
- > NOTE: It is very important that you keep these labels in the right order. Weekdays must be `Sun -> Sat` and months must be `Jan -> Dec`.
50
-
51
- ```tsx preview
52
- <DateInput
53
- weekdayNames={['D', 'L', 'M', 'X', 'J', 'V', 'S']}
54
- monthNames={[
55
- 'Enero',
56
- 'Febrero',
57
- 'Marzo',
58
- 'Abril',
59
- 'Mayo',
60
- 'Junio',
61
- 'Julio',
62
- 'Agosto',
63
- 'Septiembre',
64
- 'Octubre',
65
- 'Noviembre',
66
- 'Diciembre'
67
- ]}
68
- />
69
- ```
70
-
71
- You can also translate the internal labels for accessibility purposes. The `labels` prop accepts an object containing three keys, `open`, `next`, and `previous`. These should all be strings.
72
-
73
- ```tsx
74
- <DateInput
75
- labels={{
76
- open: 'Open label',
77
- next: 'Next month label',
78
- previous: 'Previous month label'
79
- }}
80
- />
81
- ```
82
-
83
- If you need even finer control over what happens with the selected date, you can pass `onChange`, which takes a `Date` type as input.
84
-
85
- ```tsx
86
- <DateInput onChange={(date) => doSomethingWith(date)} />
87
- ```
@@ -1,68 +0,0 @@
1
- ---
2
- title: Dialog
3
- component: Dialog,Dialog.Trigger,Dialog.Content,Dialog.Close
4
- description: The Dialog component renders its children inside a modal and puts a dimmer over the rest of the screen
5
- category: Surfaces
6
- ---
7
-
8
- `Dialog` exports many components that combine to create a modal. The `Dialog.Trigger` renders a `<button>` by default, but this can be overridden with the `asChild` prop, which will instead add all the functional and accessibility requirements to the child component instead (see the below example).
9
-
10
- Also, note that the component must accept a `ref`.
11
-
12
- Read more about the underlying UI component on the [Radix UI documentation site](https://radix-ui.com/primitives/docs/components/dialog).
13
-
14
- ```tsx preview
15
- <Dialog>
16
- <Dialog.Trigger asChild>
17
- <Button>Open Dialog</Button>
18
- </Dialog.Trigger>
19
- <Dialog.Content>
20
- <Heading size="sm" css={{ mb: '$3' }}>
21
- Dialog
22
- </Heading>
23
- <Text size="sm" css={{ mb: '$3' }}>
24
- The `Dialog` can display any type of element as a trigger and has the
25
- content hidden by default
26
- </Text>
27
- <Button appearance="outline" size="sm" as={Dialog.Close}>
28
- Close Dialog
29
- </Button>
30
- </Dialog.Content>
31
- </Dialog>
32
- ```
33
-
34
- `Dialog` may be rendered without a close button. It's important to note that in case the default close button is hidden, one would need to provide an action button explicitly, to close the dialog.
35
-
36
- ```tsx
37
- <Dialog>
38
- <Dialog.Trigger>Open Dialog</Dialog.Trigger>
39
- <Dialog.Content showCloseButton={false}>
40
- <Text>
41
- Dialog.Close is used below to retain the correct accessible roles and
42
- related logic
43
- </Text>
44
- <Button as={Dialog.Close}>Close</Button>
45
- </Dialog.Content>
46
- </Dialog>
47
- ```
48
-
49
- `Dialog` can also be rendered with a custom background. Important to note that `Dialog.Background` needs to be a child of `Dialog.Content`
50
-
51
- ```tsx
52
- <Dialog>
53
- <Dialog.Trigger>Open Dialog</Dialog.Trigger>
54
- <Dialog.Content>
55
- <Dialog.Background>
56
- <Text>
57
- Custom Background Content
58
- </Text>
59
- </Dialog.Background>
60
- <Text>
61
- Dialog.Background will appear above the Overlay, but below the DialogContent
62
- </Text>
63
- <Button as={Dialog.Close}>Close</Button>
64
- </Dialog.Content>
65
- </Dialog>
66
- ```
67
-
68
- For any modifications of the default `Dialog` visuals, for example bypassing the panel design entirely, we recommend utilising the Radix UI Dialog component directly. You will need to wrap each exported component within a `styled()` function to enable `css` and `as`, and compose together `Dialog.Overlay` and `Dialog.Close` within `Dialog.Content` to mimic the behaviour of this modal.
@@ -1,48 +0,0 @@
1
- ---
2
- title: Dismissible
3
- component: DismissibleRoot,Dismissible.Trigger
4
- description: An element with a dismiss button which removes it from the view
5
- category: Primitives
6
- ---
7
-
8
- `Dismissible` itself is a primitive. It has not been designed so it should not be used out-of-the-box as a user facing component.
9
- Test the component is accessible depending on each implementation use case.
10
-
11
- ```tsx preview
12
- <Dismissible
13
- value="a"
14
- onDismiss={(value) => {
15
- alert(`dismiss ${value}`)
16
- }}
17
- >
18
- Press the trigger to dismiss this ->
19
- <Dismissible.Trigger aria-label="Dismiss 'a'" />
20
- </Dismissible>
21
- ```
22
-
23
- ```tsx preview
24
- <Dismissible
25
- value="custom"
26
- onDismiss={(value) => {
27
- alert(`dismiss ${value}`)
28
- }}
29
- asChild
30
- >
31
- <Box
32
- css={{
33
- width: '100%',
34
- fontFamily: 'system-ui',
35
- border: '1px solid',
36
- borderRadius: 4,
37
- display: 'flex',
38
- justifyContent: 'space-between',
39
- padding: 8
40
- }}
41
- >
42
- Basic custom implementation example
43
- <Dismissible.Trigger asChild>
44
- <button type="button">Custom Dismiss Trigger</button>
45
- </Dismissible.Trigger>
46
- </Box>
47
- </Dismissible>
48
- ```
@@ -1,29 +0,0 @@
1
- ---
2
- title: Dismissible Group
3
- component: DismissibleGroupRoot,DismissibleGroup.Item,DismissibleGroup.Trigger
4
- description: A set of dismissible elements.
5
- category: Primitives
6
- ---
7
-
8
- `DismissibleGroup` itself is a primitive. It has not been designed so it should not be used out-of-the-box as a user facing component.
9
- Test the component is accessible depending on each implementation use case.
10
-
11
- ```tsx preview
12
- <DismissibleGroup
13
- onDismiss={(value) => {
14
- alert(`dismiss ${value}`)
15
- }}
16
- >
17
- <DismissibleGroup.Item value="a">
18
- A
19
- <DismissibleGroup.Trigger aria-label="Dismiss A" />
20
- </DismissibleGroup.Item>
21
- <DismissibleGroup.Item value="b" disabled>
22
- B
23
- <DismissibleGroup.Trigger />
24
- </DismissibleGroup.Item>
25
- <DismissibleGroup.Item value="c" disabled>
26
- C
27
- </DismissibleGroup.Item>
28
- </DismissibleGroup>
29
- ```
@@ -1,16 +0,0 @@
1
- ---
2
- title: Divider
3
- component: Divider
4
- description: Use Divider to render a horizontal or vertical line which will extend to parent node's width / height
5
- category: Content
6
- ---
7
-
8
- It adds default styling and the `css` prop. Provide `orientation` as `horizontal` or `vertical` to achieve desirable output
9
-
10
- ```tsx preview
11
- <Divider />
12
- ```
13
-
14
- ```tsx preview
15
- <Divider orientation="vertical"/>
16
- ```
@@ -1,30 +0,0 @@
1
- ---
2
- title: Dropdown Menu
3
- component: DropdownMenu,DropdownMenu.Trigger,DropdownMenu.Content,DropdownMenu.Item,DropdownMenu.Separator
4
- description: The DropdownMenu components can be composed to create flexible dropdown menus with different types of items.
5
- category: Surfaces
6
- ---
7
-
8
- `DropdownMenu` exports many components that combine to create a dropdown menu. The `DropdownMenu.Trigger` renders a `<button>` by default, but this can be overridden with the `asChild` prop, which will instead add all the functional and accessibility requirements to the child component instead (see the below example).
9
-
10
- Also, note that the component must accept a `ref`.
11
-
12
- Read more about the underlying UI component on the [Radix UI documentation site](https://radix-ui.com/primitives/docs/components/dropdown-menu).
13
-
14
- ```tsx preview
15
- <DropdownMenu>
16
- <DropdownMenu.Trigger asChild>
17
- <Button>Click me</Button>
18
- </DropdownMenu.Trigger>
19
- <DropdownMenu.Content sideOffset={16}>
20
- <DropdownMenu.Item onClick={() => alert('Great clicking!')}>
21
- Item 1
22
- </DropdownMenu.Item>
23
- <DropdownMenu.Item>Item 2</DropdownMenu.Item>
24
- <DropdownMenu.Separator />
25
- <DropdownMenu.LinkItem href="/logout">Log Out</DropdownMenu.LinkItem>
26
- </DropdownMenu.Content>
27
- </DropdownMenu>
28
- ```
29
-
30
- For any modifications of the default `DropdownMenu` visuals, we recommend utilising the Radix UI DropdownMenu component directly. You will need to wrap each exported component within a `styled()` function to enable the `css` prop.
@@ -1,23 +0,0 @@
1
- ---
2
- title: Empty State
3
- component: EmptyState
4
- description: Empty states are messages that provide an explanation of an interface in absence of content.
5
- category: Content
6
- ---
7
-
8
- `EmptyState` exports a number of components that can be composed together to create an `EmptyState` message.
9
- The message can include Title and/or Body and sometimes they appear together with an illustration and actionable buttons.
10
- There are 5 different size variants of `EmptyState` ( 'xs', 'sm', 'md', 'lg' and 'xl').
11
-
12
- ```jsx preview live
13
- <EmptyState size="lg">
14
- <EmptyState.Image
15
- src="https://app.atomlearning.com/dist/29a378dc127c669808f2.svg"
16
- alt=""
17
- />
18
- <EmptyState.Title>No users found!</EmptyState.Title>
19
- <EmptyState.Body>
20
- You need to add some users before you can use this feature
21
- </EmptyState.Body>
22
- </EmptyState>
23
- ```