@atom-learning/components 6.0.0-beta.0 → 6.0.0-beta.10
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/dist/components/accordion/Accordion.d.ts +17 -0
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/accordion/AccordionContent.d.ts +6 -0
- package/dist/components/accordion/AccordionItem.d.ts +4 -0
- package/dist/components/accordion/AccordionTrigger.d.ts +11 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/action-icon/ActionIcon.constants.d.ts +6 -0
- package/dist/components/action-icon/ActionIcon.d.ts +21 -0
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/action-icon/index.d.ts +1 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts +13 -0
- package/dist/components/alert-dialog/AlertDialogContent.d.ts +8 -0
- package/dist/components/alert-dialog/alert-context/AlertContext.d.ts +8 -0
- package/dist/components/alert-dialog/alert-context/AlertDialog.d.ts +9 -0
- package/dist/components/alert-dialog/alert-context/AlertDialogIcon.d.ts +5 -0
- package/dist/components/alert-dialog/alert-context/reducer.d.ts +12 -0
- package/dist/components/alert-dialog/alert-context/types.d.ts +26 -0
- package/dist/components/alert-dialog/index.d.ts +2 -0
- package/dist/components/avatar/Avatar.d.ts +49 -0
- package/dist/components/avatar/AvatarIcon.d.ts +5 -0
- package/dist/components/avatar/AvatarImage.d.ts +5 -0
- package/dist/components/avatar/AvatarInitial.d.ts +2 -0
- package/dist/components/avatar/AvatarPlaceholder.d.ts +2 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/badge/Badge.colorscheme.config.d.ts +198 -0
- package/dist/components/badge/Badge.context.d.ts +13 -0
- package/dist/components/badge/Badge.d.ts +46 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/badge/BadgeIcon.d.ts +3 -0
- package/dist/components/badge/BadgeText.d.ts +20 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/banner/Banner.d.ts +6 -0
- package/dist/components/banner/BannerContainer.d.ts +24 -0
- package/dist/components/banner/BannerContext.d.ts +14 -0
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +321 -0
- package/dist/components/banner/banner-regular/BannerRegularActions.d.ts +6 -0
- package/dist/components/banner/banner-regular/BannerRegularButton.d.ts +6 -0
- package/dist/components/banner/banner-regular/BannerRegularContainer.d.ts +5 -0
- package/dist/components/banner/banner-regular/BannerRegularContent.d.ts +13 -0
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +23 -0
- package/dist/components/banner/banner-regular/BannerRegularHeading.d.ts +6 -0
- package/dist/components/banner/banner-regular/BannerRegularImage.d.ts +6 -0
- package/dist/components/banner/banner-regular/BannerRegularText.d.ts +6 -0
- package/dist/components/banner/banner-regular/index.d.ts +1 -0
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +326 -0
- package/dist/components/banner/banner-slim/BannerSlimActions.d.ts +6 -0
- package/dist/components/banner/banner-slim/BannerSlimButton.d.ts +6 -0
- package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +31 -0
- package/dist/components/banner/banner-slim/BannerSlimContent.d.ts +19 -0
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +26 -0
- package/dist/components/banner/banner-slim/BannerSlimImage.d.ts +6 -0
- package/dist/components/banner/banner-slim/BannerSlimText.d.ts +6 -0
- package/dist/components/banner/banner-slim/index.d.ts +1 -0
- package/dist/components/banner/index.d.ts +2 -0
- package/dist/components/box/Box.d.ts +5 -0
- package/dist/components/box/index.d.ts +1 -0
- package/dist/components/button/Button.d.ts +22 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/calendar/Calendar.d.ts +24 -0
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Day.d.ts +9 -0
- package/dist/components/calendar/constants.d.ts +9 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/carousel/Carousel.d.ts +42 -0
- package/dist/components/carousel/CarouselArrows.d.ts +10 -0
- package/dist/components/carousel/CarouselPagination.d.ts +3 -0
- package/dist/components/carousel/CarouselSlide.d.ts +5 -0
- package/dist/components/carousel/CarouselSlider.d.ts +7 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +8 -0
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox-field/CheckboxField.d.ts +7 -0
- package/dist/components/checkbox-field/index.d.ts +1 -0
- package/dist/components/checkbox-group/CheckboxGroup.context.d.ts +2 -0
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +302 -0
- package/dist/components/checkbox-group/CheckboxGroup.types.d.ts +3 -0
- package/dist/components/checkbox-group/CheckboxGroupAllItem.d.ts +5 -0
- package/dist/components/checkbox-group/CheckboxGroupItem.d.ts +7 -0
- package/dist/components/checkbox-group/CheckboxGroupSub.d.ts +6 -0
- package/dist/components/checkbox-group/context/CheckboxGroupChecked.context.d.ts +14 -0
- package/dist/components/checkbox-group/context/CheckboxGroupMounted.context.d.ts +9 -0
- package/dist/components/checkbox-group/index.d.ts +1 -0
- package/dist/components/checkbox-tree/CheckboxTree.d.ts +1118 -0
- package/dist/components/checkbox-tree/CheckboxTreeCollapsible.d.ts +6 -0
- package/dist/components/checkbox-tree/CheckboxTreeCollapsibleContent.d.ts +5 -0
- package/dist/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.d.ts +6 -0
- package/dist/components/checkbox-tree/CheckboxTreeItem.d.ts +6 -0
- package/dist/components/checkbox-tree/CheckboxTreeItemContent.d.ts +5 -0
- package/dist/components/checkbox-tree/index.d.ts +1 -0
- package/dist/components/chip/Chip.d.ts +39 -0
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip/ChipGroup.d.ts +18 -0
- package/dist/components/chip/ChipGroup.js.map +1 -1
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +16 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.d.ts +6 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js.map +1 -1
- package/dist/components/chip-dismissible-group/index.d.ts +7 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +14 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupRoot.d.ts +34 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js.map +1 -1
- package/dist/components/chip-toggle-group/index.d.ts +7 -0
- package/dist/components/combobox/Combobox.d.ts +36 -0
- package/dist/components/combobox/ComboboxInput.d.ts +22 -0
- package/dist/components/combobox/ComboboxInput.js.map +1 -1
- package/dist/components/combobox/ComboboxList.d.ts +7 -0
- package/dist/components/combobox/ComboboxOption.d.ts +7 -0
- package/dist/components/combobox/ComboboxPopover.d.ts +7 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/create-password-field/CreatePasswordField.d.ts +17 -0
- package/dist/components/create-password-field/CreatePasswordField.js +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
- package/dist/components/create-password-field/index.d.ts +1 -0
- package/dist/components/data-table/DataTable.d.ts +294 -0
- package/dist/components/data-table/DataTable.types.d.ts +56 -0
- package/dist/components/data-table/DataTableBody.d.ts +7 -0
- package/dist/components/data-table/DataTableBulkActions.d.ts +20 -0
- package/dist/components/data-table/DataTableBulkActionsFloating.d.ts +10 -0
- package/dist/components/data-table/DataTableBulkActionsSelectedRowActions.d.ts +6 -0
- package/dist/components/data-table/DataTableContext.d.ts +21 -0
- package/dist/components/data-table/DataTableDataCell.d.ts +7 -0
- package/dist/components/data-table/DataTableEmptyState.d.ts +5 -0
- package/dist/components/data-table/DataTableError.d.ts +5 -0
- package/dist/components/data-table/DataTableGlobalFilter.d.ts +8 -0
- package/dist/components/data-table/DataTableHead.d.ts +11 -0
- package/dist/components/data-table/DataTableHead.js +1 -1
- package/dist/components/data-table/DataTableHead.js.map +1 -1
- package/dist/components/data-table/DataTableHeaderCell.d.ts +10 -0
- package/dist/components/data-table/DataTableHeaderCell.js +1 -1
- package/dist/components/data-table/DataTableLoading.d.ts +19 -0
- package/dist/components/data-table/DataTableMetaData.d.ts +10 -0
- package/dist/components/data-table/DataTableRow.d.ts +8 -0
- package/dist/components/data-table/DataTableRowSelectionCheckbox.d.ts +8 -0
- package/dist/components/data-table/DataTableSelectAllRowsCheckbox.d.ts +4 -0
- package/dist/components/data-table/DataTableTable.d.ts +18 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.d.ts +14 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +1 -1
- package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.d.ts +7 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTableRow.d.ts +8 -0
- package/dist/components/data-table/drag-and-drop/index.d.ts +1 -0
- package/dist/components/data-table/getNewAsyncData.d.ts +3 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/pagination/Pagination.d.ts +16 -0
- package/dist/components/data-table/pagination/index.d.ts +1 -0
- package/dist/components/data-table/usePagination.d.ts +8 -0
- package/dist/components/data-table/useSorting.d.ts +9 -0
- package/dist/components/date-field/DateField.d.ts +9 -0
- package/dist/components/date-field/index.d.ts +1 -0
- package/dist/components/date-input/DateInput.d.ts +19 -0
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/date-input/DateInput.js.map +1 -1
- package/dist/components/date-input/constants.d.ts +1 -0
- package/dist/components/date-input/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.d.ts +21 -0
- package/dist/components/dialog/DialogBackground.d.ts +5 -0
- package/dist/components/dialog/DialogClose.d.ts +1 -0
- package/dist/components/dialog/DialogContent.d.ts +12 -0
- package/dist/components/dialog/DialogFooter.d.ts +3 -0
- package/dist/components/dialog/DialogFooter.js +1 -1
- package/dist/components/dialog/DialogHeading.d.ts +3 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dismissible/DismissibleRoot.d.ts +21 -0
- package/dist/components/dismissible/DismissibleTrigger.d.ts +5 -0
- package/dist/components/dismissible/index.d.ts +6 -0
- package/dist/components/dismissible-group/DismissibleGroupItem.d.ts +7 -0
- package/dist/components/dismissible-group/DismissibleGroupRoot.d.ts +18 -0
- package/dist/components/dismissible-group/index.d.ts +7 -0
- package/dist/components/divider/Divider.d.ts +15 -0
- package/dist/components/divider/Divider.js.map +1 -1
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/drawer/Drawer.context.d.ts +8 -0
- package/dist/components/drawer/Drawer.d.ts +26 -0
- package/dist/components/drawer/DrawerClose.d.ts +3 -0
- package/dist/components/drawer/DrawerContent.d.ts +8 -0
- package/dist/components/drawer/DrawerFooter.d.ts +5 -0
- package/dist/components/drawer/DrawerHeader.d.ts +5 -0
- package/dist/components/drawer/DrawerMain.d.ts +5 -0
- package/dist/components/drawer/DrawerOverlay.d.ts +3 -0
- package/dist/components/drawer/DrawerTrigger.d.ts +1 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +20 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +3 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +3 -0
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +5 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +3 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +3 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/empty-state/EmptyState.context.d.ts +8 -0
- package/dist/components/empty-state/EmptyState.d.ts +61 -0
- package/dist/components/empty-state/EmptyStateBody.d.ts +20 -0
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
- package/dist/components/empty-state/EmptyStateImage.d.ts +17 -0
- package/dist/components/empty-state/EmptyStateTitle.d.ts +13 -0
- package/dist/components/empty-state/index.d.ts +1 -0
- package/dist/components/field-wrapper/FieldDescription.d.ts +4 -0
- package/dist/components/field-wrapper/FieldWrapper.d.ts +26 -0
- package/dist/components/field-wrapper/InlineFieldWrapper.d.ts +15 -0
- package/dist/components/field-wrapper/index.d.ts +3 -0
- package/dist/components/file-drop/FileDrop.d.ts +15 -0
- package/dist/components/file-drop/FileDropContext.d.ts +3 -0
- package/dist/components/file-drop/index.d.ts +2 -0
- package/dist/components/file-drop/types.d.ts +4 -0
- package/dist/components/file-drop/useFileDrop.d.ts +2 -0
- package/dist/components/file-input/FileInput.d.ts +11 -0
- package/dist/components/file-input/index.d.ts +1 -0
- package/dist/components/flex/Flex.d.ts +11 -0
- package/dist/components/flex/Flex.js.map +1 -1
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/form/Form.d.ts +16 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/form/useFieldError.d.ts +3 -0
- package/dist/components/form/useFormCustomContext.d.ts +7 -0
- package/dist/components/form/validation.d.ts +25 -0
- package/dist/components/grid/Grid.d.ts +19 -0
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/heading/Heading.d.ts +15 -0
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/icon/Icon.d.ts +15 -0
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/image/Image.d.ts +17 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +87 -0
- package/dist/components/inline-message/InlineMessage.config.d.ts +3 -0
- package/dist/components/inline-message/InlineMessage.d.ts +22 -0
- package/dist/components/inline-message/InlineMessage.types.d.ts +1 -0
- package/dist/components/inline-message/index.d.ts +1 -0
- package/dist/components/input/Input.d.ts +52 -0
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input-field/InputField.d.ts +9 -0
- package/dist/components/input-field/index.d.ts +1 -0
- package/dist/components/keyboard-shortcut/KeyboardShortcut.d.ts +35 -0
- package/dist/components/keyboard-shortcut/KeyboardShortcut.js.map +1 -1
- package/dist/components/keyboard-shortcut/index.d.ts +30 -0
- package/dist/components/label/Label.d.ts +22 -0
- package/dist/components/label/Label.js +1 -1
- package/dist/components/label/Label.js.map +1 -1
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/link/Link.d.ts +18 -0
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/list/List.d.ts +24 -0
- package/dist/components/list/List.js.map +1 -1
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/loader/Loader.d.ts +8 -0
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/index.d.ts +1 -0
- package/dist/components/markdown-content/MarkdownContent.d.ts +29 -0
- package/dist/components/markdown-content/__mockdata__/mockMarkdown.d.ts +1 -0
- package/dist/components/markdown-content/components/MarkdownCode.d.ts +7 -0
- package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +13 -0
- package/dist/components/markdown-content/components/MarkdownHeading.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownImage.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownInlineCode.d.ts +7 -0
- package/dist/components/markdown-content/components/MarkdownLink.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownList.d.ts +9 -0
- package/dist/components/markdown-content/components/MarkdownListItem.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownParagraph.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownStrong.d.ts +8 -0
- package/dist/components/markdown-content/components/MarkdownText.d.ts +7 -0
- package/dist/components/markdown-content/components/MarkdownThematicBreak.d.ts +6 -0
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/markdown-content/components/index.d.ts +12 -0
- package/dist/components/markdown-content/index.d.ts +1 -0
- package/dist/components/navigation/NavigationMenu.colorscheme.config.d.ts +21 -0
- package/dist/components/navigation/NavigationMenu.d.ts +68 -0
- package/dist/components/navigation/NavigationMenu.styles.d.ts +2 -0
- package/dist/components/navigation/NavigationMenu.styles.js +1 -1
- package/dist/components/navigation/NavigationMenu.styles.js.map +1 -1
- package/dist/components/navigation/NavigationMenuContext.d.ts +7 -0
- package/dist/components/navigation/NavigationMenuDropdown.d.ts +11 -0
- package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +11 -0
- package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +27 -0
- package/dist/components/navigation/NavigationMenuDropdownItem.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.d.ts +7 -0
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
- package/dist/components/navigation/NavigationMenuLink.d.ts +16 -0
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.d.ts +10 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +594 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.d.ts +1 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.d.ts +11 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.d.ts +6 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.d.ts +9 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.d.ts +15 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.d.ts +5 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.d.ts +5 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +11 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalList.d.ts +3 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.d.ts +20 -0
- package/dist/components/navigation-menu-vertical/index.d.ts +1 -0
- package/dist/components/notification-badge/NotificationBadge.d.ts +11 -0
- package/dist/components/notification-badge/index.d.ts +1 -0
- package/dist/components/number-input/NumberInput.d.ts +24 -0
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input/NumberInput.js.map +1 -1
- package/dist/components/number-input/NumberInputStepper.d.ts +27 -0
- package/dist/components/number-input/NumberInputStepper.js.map +1 -1
- package/dist/components/number-input/index.d.ts +1 -0
- package/dist/components/number-input-field/NumberInputField.d.ts +19 -0
- package/dist/components/number-input-field/index.d.ts +1 -0
- package/dist/components/pagination/Pagination.d.ts +8 -0
- package/dist/components/pagination/PaginationItems.d.ts +1 -0
- package/dist/components/pagination/PaginationNextButton.d.ts +19 -0
- package/dist/components/pagination/PaginationPage.d.ts +3 -0
- package/dist/components/pagination/PaginationPopover.d.ts +2 -0
- package/dist/components/pagination/PaginationPreviousButton.d.ts +19 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination-context/PaginationContext.d.ts +4 -0
- package/dist/components/pagination/pagination.constants.d.ts +7 -0
- package/dist/components/pagination/pagination.helper.d.ts +4 -0
- package/dist/components/pagination/types.d.ts +41 -0
- package/dist/components/pagination/usePagination.d.ts +2 -0
- package/dist/components/password-field/PasswordField.d.ts +11 -0
- package/dist/components/password-field/PasswordField.js +1 -1
- package/dist/components/password-field/index.d.ts +1 -0
- package/dist/components/password-input/PasswordInput.d.ts +8 -0
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/password-input/PasswordInput.js.map +1 -1
- package/dist/components/password-input/index.d.ts +1 -0
- package/dist/components/popover/Popover.d.ts +12 -0
- package/dist/components/popover/PopoverContent.d.ts +13 -0
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/popover/PopoverContent.js.map +1 -1
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +20 -0
- package/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/radio-button/RadioButton.d.ts +18 -0
- package/dist/components/radio-button/RadioButtonGroup.d.ts +6 -0
- package/dist/components/radio-button/index.d.ts +2 -0
- package/dist/components/radio-button-field/RadioButtonField.d.ts +28 -0
- package/dist/components/radio-button-field/RadioField.d.ts +15 -0
- package/dist/components/radio-button-field/index.d.ts +1 -0
- package/dist/components/radio-card/RadioCard.d.ts +12 -0
- package/dist/components/radio-card/RadioCardGroup.d.ts +8 -0
- package/dist/components/radio-card/index.d.ts +2 -0
- package/dist/components/search-field/SearchField.d.ts +9 -0
- package/dist/components/search-field/index.d.ts +1 -0
- package/dist/components/search-input/SearchInput.d.ts +12 -0
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/search-input/index.d.ts +2 -0
- package/dist/components/section-message/SectionMessage.d.ts +39 -0
- package/dist/components/section-message/SectionMessage.js.map +1 -1
- package/dist/components/section-message/SectionMessageContext.d.ts +16 -0
- package/dist/components/section-message/SectionMessageDescription.d.ts +3 -0
- package/dist/components/section-message/SectionMessageDescription.js +1 -1
- package/dist/components/section-message/SectionMessageDismiss.d.ts +3 -0
- package/dist/components/section-message/SectionMessageDismiss.js +1 -1
- package/dist/components/section-message/SectionMessageIcon.d.ts +5 -0
- package/dist/components/section-message/SectionMessageIcon.js +1 -1
- package/dist/components/section-message/SectionMessageLayout.d.ts +8 -0
- package/dist/components/section-message/SectionMessageLayout.js +1 -1
- package/dist/components/section-message/SectionMessageTitle.d.ts +3 -0
- package/dist/components/section-message/index.d.ts +1 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +58 -0
- package/dist/components/segmented-control/SegmentedControl.types.d.ts +1 -0
- package/dist/components/segmented-control/SegmentedControlBadge.d.ts +3 -0
- package/dist/components/segmented-control/SegmentedControlContent.d.ts +4 -0
- package/dist/components/segmented-control/SegmentedControlContext.d.ts +9 -0
- package/dist/components/segmented-control/SegmentedControlDescription.d.ts +19 -0
- package/dist/components/segmented-control/SegmentedControlHeading.d.ts +19 -0
- package/dist/components/segmented-control/SegmentedControlIcon.d.ts +3 -0
- package/dist/components/segmented-control/SegmentedControlItem.d.ts +11 -0
- package/dist/components/segmented-control/SegmentedControlItemList.d.ts +3 -0
- package/dist/components/segmented-control/SegmentedControlItemList.js +1 -1
- package/dist/components/segmented-control/SegmentedControlItemList.js.map +1 -1
- package/dist/components/segmented-control/SegmentedControlRoot.d.ts +14 -0
- package/dist/components/segmented-control/index.d.ts +1 -0
- package/dist/components/select/Select.d.ts +17 -0
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select-field/SelectField.d.ts +9 -0
- package/dist/components/select-field/index.d.ts +1 -0
- package/dist/components/side-bar/SideBar.d.ts +64 -0
- package/dist/components/side-bar/SideBar.js +1 -1
- package/dist/components/side-bar/SideBar.js.map +1 -1
- package/dist/components/side-bar/SideBarComponents.d.ts +46 -0
- package/dist/components/side-bar/SideBarContext.d.ts +7 -0
- package/dist/components/side-bar/index.d.ts +2 -0
- package/dist/components/slider/Slider.d.ts +18 -0
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/slider/SliderSteps.d.ts +13 -0
- package/dist/components/slider/SliderValue.d.ts +9 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider-field/SliderField.d.ts +11 -0
- package/dist/components/slider-field/index.d.ts +1 -0
- package/dist/components/sortable/Handle.d.ts +22 -0
- package/dist/components/sortable/Handle.js.map +1 -1
- package/dist/components/sortable/SortableHandle.d.ts +11 -0
- package/dist/components/sortable/SortableItem.d.ts +14 -0
- package/dist/components/sortable/SortableItem.js +1 -1
- package/dist/components/sortable/SortableItem.js.map +1 -1
- package/dist/components/sortable/SortableRoot.d.ts +15 -0
- package/dist/components/sortable/index.d.ts +21 -0
- package/dist/components/spacer/Spacer.d.ts +9 -0
- package/dist/components/spacer/index.d.ts +1 -0
- package/dist/components/stepper/Stepper.d.ts +10 -0
- package/dist/components/stepper/StepperStepBack.d.ts +4 -0
- package/dist/components/stepper/StepperStepBullet.d.ts +15 -0
- package/dist/components/stepper/StepperStepContainer.d.ts +18 -0
- package/dist/components/stepper/StepperStepForward.d.ts +4 -0
- package/dist/components/stepper/StepperStepLabel.d.ts +17 -0
- package/dist/components/stepper/StepperSteps.d.ts +3 -0
- package/dist/components/stepper/index.d.ts +1 -0
- package/dist/components/stepper/stepper-context/StepperContext.d.ts +4 -0
- package/dist/components/stepper/types.d.ts +54 -0
- package/dist/components/switch/Switch.d.ts +13 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/table/Table.d.ts +68 -0
- package/dist/components/table/TableBody.d.ts +14 -0
- package/dist/components/table/TableCell.d.ts +5 -0
- package/dist/components/table/TableFooter.d.ts +5 -0
- package/dist/components/table/TableFooterCell.d.ts +5 -0
- package/dist/components/table/TableHeader.d.ts +22 -0
- package/dist/components/table/TableHeaderCell.d.ts +5 -0
- package/dist/components/table/TableRow.d.ts +6 -0
- package/dist/components/table/TableRow.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.d.ts +5 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/useStickyColumnsCss.d.ts +15 -0
- package/dist/components/table/useStickyColumnsCss.js +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +21 -0
- package/dist/components/tabs/TabsContent.d.ts +3 -0
- package/dist/components/tabs/TabsTrigger.d.ts +6 -0
- package/dist/components/tabs/TabsTriggerList.d.ts +12 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/text/Text.d.ts +32 -0
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/textarea/Textarea.d.ts +19 -0
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea-field/TextareaField.d.ts +9 -0
- package/dist/components/textarea-field/index.d.ts +1 -0
- package/dist/components/tile/Tile.d.ts +16 -0
- package/dist/components/tile/Tile.js +1 -1
- package/dist/components/tile/Tile.js.map +1 -1
- package/dist/components/tile/TileGroup.d.ts +11 -0
- package/dist/components/tile/index.d.ts +2 -0
- package/dist/components/tile-interactive/TileInteractive.d.ts +20 -0
- package/dist/components/tile-interactive/TileInteractive.js +1 -1
- package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
- package/dist/components/tile-interactive/index.d.ts +1 -0
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +22 -0
- package/dist/components/tile-toggle-group/TileToggleGroupItem.js +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupItem.js.map +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupRoot.d.ts +26 -0
- package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
- package/dist/components/tile-toggle-group/index.d.ts +7 -0
- package/dist/components/toast/Toast.d.ts +21 -0
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/ToastCloseButton.d.ts +7 -0
- package/dist/components/toast/ToastIcon.d.ts +3 -0
- package/dist/components/toast/ToastProvider.d.ts +10 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +23 -0
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +6 -0
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +40 -0
- package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
- package/dist/components/toggle-group/index.d.ts +43 -0
- package/dist/components/tooltip/Tooltip.d.ts +17 -0
- package/dist/components/tooltip/TooltipContent.d.ts +10 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/top-bar/TopBar.colorscheme.config.d.ts +7 -0
- package/dist/components/top-bar/TopBar.d.ts +62 -0
- package/dist/components/top-bar/TopBar.js +1 -1
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/components/top-bar/TopBarActionIcon.d.ts +8 -0
- package/dist/components/top-bar/TopBarActionIcon.js.map +1 -1
- package/dist/components/top-bar/TopBarBrand.d.ts +24 -0
- package/dist/components/top-bar/index.d.ts +1 -0
- package/dist/components/tree/Tree.d.ts +865 -0
- package/dist/components/tree/Tree.js.map +1 -1
- package/dist/components/tree/TreeCollapsible.d.ts +10 -0
- package/dist/components/tree/TreeCollapsibleContent.d.ts +8 -0
- package/dist/components/tree/TreeCollapsibleContent.js +1 -1
- package/dist/components/tree/TreeCollapsibleContent.js.map +1 -1
- package/dist/components/tree/TreeCollapsibleTrigger.d.ts +7 -0
- package/dist/components/tree/TreeIcon.d.ts +15 -0
- package/dist/components/tree/TreeItem.d.ts +5 -0
- package/dist/components/tree/TreeItemContent.d.ts +12 -0
- package/dist/components/tree/TreeList.d.ts +5 -0
- package/dist/components/tree/TreeList.js.map +1 -1
- package/dist/components/tree/TreeListItem.d.ts +12 -0
- package/dist/components/tree/TreeText.d.ts +5 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/video/Video.d.ts +10 -0
- package/dist/components/video/Video.js.map +1 -1
- package/dist/components/video/index.d.ts +1 -0
- package/dist/docgen.json +1 -0
- package/dist/experiments/color-scheme/ColorScheme.config.d.ts +190 -0
- package/dist/experiments/color-scheme/ColorScheme.config.js +1 -1
- package/dist/experiments/color-scheme/ColorScheme.config.js.map +1 -1
- package/dist/experiments/color-scheme/ColorScheme.d.ts +13 -0
- package/dist/experiments/color-scheme/ColorScheme.js +1 -1
- package/dist/experiments/color-scheme/ColorScheme.js.map +1 -1
- package/dist/experiments/color-scheme/index.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/styled.d.ts +35 -0
- package/dist/styled.js +1 -1
- package/dist/styled.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/navigatorActions.types.d.ts +4 -0
- package/dist/types/polymorphicComponentProp.types.d.ts +59 -0
- package/dist/utilities/css-wrapper/CSSWrapper.d.ts +10 -0
- package/dist/utilities/css-wrapper/index.d.ts +1 -0
- package/dist/utilities/event/index.d.ts +1 -0
- package/dist/utilities/event/preventEvent.d.ts +1 -0
- package/dist/utilities/hooks/useCallbackRef.d.ts +9 -0
- package/dist/utilities/hooks/useIsMountedRef.d.ts +1 -0
- package/dist/utilities/hooks/useResizeObserver.d.ts +8 -0
- package/dist/utilities/hooks/useScrollPosition.d.ts +11 -0
- package/dist/utilities/hooks/useSize.d.ts +9 -0
- package/dist/utilities/hooks/useWindowScrollPosition.d.ts +10 -0
- package/dist/utilities/hooks/useWindowSize.d.ts +8 -0
- package/dist/utilities/index.d.ts +4 -0
- package/dist/utilities/no-overflow-wrapper/NoOverflowWrapper.d.ts +5 -0
- package/dist/utilities/no-overflow-wrapper/index.d.ts +1 -0
- package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.d.ts +11 -0
- package/dist/utilities/optional-tooltip-wrapper/index.d.ts +2 -0
- package/dist/utilities/optional-visually-hidden-wrapper/OptionalVisuallyHiddenWrapper.d.ts +7 -0
- package/dist/utilities/optional-visually-hidden-wrapper/index.d.ts +1 -0
- package/dist/utilities/override-styled-variant-value/overrideStyledVariantValue.d.ts +1 -0
- package/dist/utilities/radix-overrides/index.d.ts +1 -0
- package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.d.ts +7 -0
- package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.js +1 -1
- package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.js.map +1 -1
- package/dist/utilities/radix-overrides/toggle-group/index.d.ts +7 -0
- package/dist/utilities/style/backdrop-overlay.d.ts +1 -0
- package/dist/utilities/style/get-icon-size.d.ts +1 -0
- package/dist/utilities/style/index.d.ts +1 -0
- package/dist/utilities/types.d.ts +24 -0
- package/dist/utilities/uri/index.d.ts +8 -0
- package/package.json +15 -5
- package/src/index.css +167 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/** Context provider for DataTable state and logic.
|
|
2
|
+
*
|
|
3
|
+
* Children can call `useDataTable` to access everything provided by `@tanstack/react-table` plus
|
|
4
|
+
* the functionality we've built on top.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defaultSort, initialState, disabledRows, enableRowSelection, onRowSelectionChange, children }: {
|
|
7
|
+
columns: any;
|
|
8
|
+
defaultSort?: import("./DataTable.types").TDefaultSort;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
initialState?: import("./DataTable.types").InitialState;
|
|
11
|
+
disabledRows?: Record<string, boolean>;
|
|
12
|
+
enableRowSelection?: boolean | ((row: import("@tanstack/table-core").Row<unknown>) => boolean);
|
|
13
|
+
onRowSelectionChange?: import("@tanstack/table-core").OnChangeFn<import("@tanstack/table-core").RowSelectionState>;
|
|
14
|
+
} & ({
|
|
15
|
+
data: import("./DataTable.types").TableData;
|
|
16
|
+
getAsyncData?: never;
|
|
17
|
+
} | {
|
|
18
|
+
data?: never;
|
|
19
|
+
getAsyncData: import("./DataTable.types").TGetAsyncData;
|
|
20
|
+
})) => JSX.Element) & {
|
|
21
|
+
/** Default table body implementation for `DataTable`.
|
|
22
|
+
*
|
|
23
|
+
* Can be configured with alternating colours of rows. If you need more customisation options,
|
|
24
|
+
* you can build your own implementation with `useDataTable()` and the UI-only `Table` components.
|
|
25
|
+
*/
|
|
26
|
+
Body: ({ striped, rowAction, ...props }: Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
|
|
27
|
+
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
28
|
+
}, "striped"> & {
|
|
29
|
+
striped?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
as?: import("react").ElementType;
|
|
32
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>, "children"> & {
|
|
33
|
+
rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void;
|
|
34
|
+
}) => import("react").JSX.Element;
|
|
35
|
+
/** Default table data cell implementation for `DataTable`
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
DataCell: ({ cell }: {
|
|
40
|
+
cell: import("@tanstack/table-core").Cell<Record<string, unknown>, unknown>;
|
|
41
|
+
}) => import("react").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop
|
|
44
|
+
*/
|
|
45
|
+
DragAndDropTable: ({ idColumn, onDragAndDrop, sortable, striped, theme, className, ...props }: Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & {
|
|
46
|
+
ref?: ((instance: HTMLTableElement | null) => void) | import("react").RefObject<HTMLTableElement> | null | undefined;
|
|
47
|
+
}, "size" | "corners"> & {
|
|
48
|
+
size?: ("md" | "lg" | "xl" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "md" | "lg" | "xl">>) | undefined;
|
|
49
|
+
corners?: ("round" | "square" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "round" | "square">>) | undefined;
|
|
50
|
+
} & {
|
|
51
|
+
as?: import("react").ElementType;
|
|
52
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableElement> & {
|
|
53
|
+
numberOfStickyColumns?: number;
|
|
54
|
+
scrollContainerCss?: string;
|
|
55
|
+
scrollContainerkey?: string;
|
|
56
|
+
maxRowDepth?: number;
|
|
57
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableElement>, "children" | "numberOfStickyColumns"> & Partial<Pick<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
|
|
58
|
+
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
59
|
+
}, "theme" | "isSticky"> & {
|
|
60
|
+
theme?: ("primary" | "white" | "primaryDark" | "primaryLight" | "light" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "primary" | "white" | "primaryDark" | "primaryLight" | "light">>) | undefined;
|
|
61
|
+
isSticky?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
|
|
62
|
+
} & {
|
|
63
|
+
as?: import("react").ElementType;
|
|
64
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>, "children"> & {
|
|
65
|
+
sortable?: boolean;
|
|
66
|
+
isSticky?: boolean;
|
|
67
|
+
stickyOffset?: number;
|
|
68
|
+
showTotalInFirstColumn?: boolean;
|
|
69
|
+
totalSuffix?: string;
|
|
70
|
+
}, "theme" | "sortable">> & Partial<Pick<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
|
|
71
|
+
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
72
|
+
}, "striped"> & {
|
|
73
|
+
striped?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
|
|
74
|
+
} & {
|
|
75
|
+
as?: import("react").ElementType;
|
|
76
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>, "striped">> & {
|
|
77
|
+
scrollOptions?: {
|
|
78
|
+
hasStickyHeader?: boolean;
|
|
79
|
+
stickyHeaderOffset?: number;
|
|
80
|
+
headerCss?: string;
|
|
81
|
+
numberOfStickyColumns?: number;
|
|
82
|
+
scrollContainerCss?: string;
|
|
83
|
+
showTotalInFirstColumn?: boolean;
|
|
84
|
+
totalSuffix?: string;
|
|
85
|
+
};
|
|
86
|
+
rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void;
|
|
87
|
+
withContainer?: boolean;
|
|
88
|
+
} & {
|
|
89
|
+
className?: string;
|
|
90
|
+
idColumn?: string;
|
|
91
|
+
onDragAndDrop?: (onDragAndDropData: {
|
|
92
|
+
oldIndex: number;
|
|
93
|
+
newIndex: number;
|
|
94
|
+
newData: import("./DataTable.types").TAsyncDataResult;
|
|
95
|
+
}) => void;
|
|
96
|
+
}) => import("react").JSX.Element;
|
|
97
|
+
/** Default global search implementation for `DataTable`
|
|
98
|
+
*
|
|
99
|
+
* If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.
|
|
100
|
+
*/
|
|
101
|
+
GlobalFilter: ({ onChange, label, hideLabel, ...props }: Omit<import("../search-input").SearchInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
|
|
102
|
+
label: string;
|
|
103
|
+
hideLabel?: boolean;
|
|
104
|
+
}) => import("react").JSX.Element | null;
|
|
105
|
+
/** Default table head implementation
|
|
106
|
+
*
|
|
107
|
+
* Can be configured to be sortable and with different visual themes.
|
|
108
|
+
* If you need more customisation options, you can build your own implementation
|
|
109
|
+
* with `useDataTable` and the UI-only `Table` components.
|
|
110
|
+
*/
|
|
111
|
+
Head: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
|
|
112
|
+
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
113
|
+
}, "theme" | "isSticky"> & {
|
|
114
|
+
theme?: ("primary" | "white" | "primaryDark" | "primaryLight" | "light" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "primary" | "white" | "primaryDark" | "primaryLight" | "light">>) | undefined;
|
|
115
|
+
isSticky?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
|
|
116
|
+
} & {
|
|
117
|
+
as?: import("react").ElementType;
|
|
118
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>, "children"> & {
|
|
119
|
+
sortable?: boolean;
|
|
120
|
+
isSticky?: boolean;
|
|
121
|
+
stickyOffset?: number;
|
|
122
|
+
showTotalInFirstColumn?: boolean;
|
|
123
|
+
totalSuffix?: string;
|
|
124
|
+
}) => React.ReactElement;
|
|
125
|
+
/** Default header implementation for `DataTable`
|
|
126
|
+
*
|
|
127
|
+
* Can be configured to make the column sortable. If you need more customisation options,
|
|
128
|
+
* you can build your own implementation with the UI-only `Table` components.
|
|
129
|
+
*/
|
|
130
|
+
HeaderCell: ({ header, includeTotal, totalSuffix, children, className, ...props }: Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & {
|
|
131
|
+
ref?: ((instance: HTMLTableHeaderCellElement | null) => void) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
|
|
132
|
+
}, never> & {
|
|
133
|
+
as?: import("react").ElementType;
|
|
134
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableHeaderCellElement> & {
|
|
135
|
+
header: import("@tanstack/table-core").Header<Record<string, unknown>, unknown>;
|
|
136
|
+
includeTotal?: boolean;
|
|
137
|
+
totalSuffix?: string;
|
|
138
|
+
}) => import("react").JSX.Element;
|
|
139
|
+
/** Default pagination implementation for `DataTable`
|
|
140
|
+
*
|
|
141
|
+
* Can navigate forward, backward, or to any specific page. If you need more customisation options,
|
|
142
|
+
* you can build your own implementation with `useDataTable` and other UI components.
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
MetaData: ({ copy, ...rest }: {
|
|
146
|
+
copy?: {
|
|
147
|
+
sorted_by?: string;
|
|
148
|
+
ascending?: string;
|
|
149
|
+
descending?: string;
|
|
150
|
+
separator?: string;
|
|
151
|
+
};
|
|
152
|
+
sortLabel?: string;
|
|
153
|
+
}) => import("react").JSX.Element;
|
|
154
|
+
/** Default display of amount of items and current sorting status for 'DataTable'
|
|
155
|
+
*
|
|
156
|
+
*/
|
|
157
|
+
Pagination: {
|
|
158
|
+
({ colorScheme, ...props }: Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
159
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
160
|
+
}, never> & {
|
|
161
|
+
as?: import("react").ElementType;
|
|
162
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement> & {
|
|
163
|
+
colorScheme?: import("../..").TcolorScheme;
|
|
164
|
+
}): import("react").JSX.Element | null;
|
|
165
|
+
displayName: string;
|
|
166
|
+
};
|
|
167
|
+
/** Default row implementation for `DataTable`
|
|
168
|
+
*
|
|
169
|
+
* Renders all visible cells as `Table.Cell`. If you need more customisation options,
|
|
170
|
+
* you can build your own implementation with the UI-only `Table` components.
|
|
171
|
+
*/
|
|
172
|
+
Row: ({ row, rowAction }: import("./DataTableRow").DataTableRowProps) => import("react").JSX.Element;
|
|
173
|
+
/** Default table implementation for `DataTable`.
|
|
174
|
+
*
|
|
175
|
+
* Can be configured with sortable columns and different visual themes.
|
|
176
|
+
*
|
|
177
|
+
* If you need more customisation options, you can compose your own implementation with
|
|
178
|
+
* lower-level `DataTable` components or build the whole thing from
|
|
179
|
+
* scratch with `useDataTable` and the UI-only `Table` components.
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
Table: ({ sortable, striped, theme, className, scrollOptions, rowAction, withContainer, ...props }: import("./DataTableTable").DataTableTableProps) => JSX.Element | null;
|
|
183
|
+
/** Default loading implementation for remote data
|
|
184
|
+
*
|
|
185
|
+
* Renders a loading component while fetching the paginated data using `getAsyncData`.
|
|
186
|
+
*
|
|
187
|
+
* If you need more customisation, you can compose your own implentation, `asyncDataState`
|
|
188
|
+
* can be retrieved from `useDataTable`
|
|
189
|
+
*/
|
|
190
|
+
Loading: (props: React.ComponentProps<import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
191
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
192
|
+
}, "direction" | "align" | "wrap" | "justify" | "gap"> & {
|
|
193
|
+
direction?: ("row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset">>) | undefined;
|
|
194
|
+
wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
|
|
195
|
+
justify?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
|
|
196
|
+
align?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline">>) | undefined;
|
|
197
|
+
gap?: (0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24>>) | undefined;
|
|
198
|
+
} & {
|
|
199
|
+
as?: import("react").ElementType;
|
|
200
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
201
|
+
message?: string;
|
|
202
|
+
size?: "sm" | "md" | "lg";
|
|
203
|
+
}, never> & {
|
|
204
|
+
as?: import("react").ElementType;
|
|
205
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>>) => import("react").JSX.Element | null;
|
|
206
|
+
/** Default error implementation for remote data
|
|
207
|
+
*
|
|
208
|
+
* Renders an error component when `getAsyncData` promise rejects.
|
|
209
|
+
* Children are rendered as a function, it exposes a `runAsyncData` function to the children component.
|
|
210
|
+
* `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize
|
|
211
|
+
* and sorting parameters or your own custom paginated options.
|
|
212
|
+
*
|
|
213
|
+
* If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`
|
|
214
|
+
* can be retrieved from `useDataTable`
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
Error: ({ children }: {
|
|
218
|
+
children: (retry?: import("./DataTable.types").DataTableContextType["runAsyncData"]) => React.ReactElement;
|
|
219
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
220
|
+
/** Empty state implementation for `DataTable`.
|
|
221
|
+
*
|
|
222
|
+
* Extends the EmptyState component
|
|
223
|
+
*/
|
|
224
|
+
EmptyState: ({ children, ...rest }: Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
225
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
226
|
+
}, "direction" | "align" | "wrap" | "justify" | "gap"> & {
|
|
227
|
+
direction?: ("row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset">>) | undefined;
|
|
228
|
+
wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
|
|
229
|
+
justify?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
|
|
230
|
+
align?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline">>) | undefined;
|
|
231
|
+
gap?: (0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24>>) | undefined;
|
|
232
|
+
} & {
|
|
233
|
+
as?: import("react").ElementType;
|
|
234
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>, "size"> & {
|
|
235
|
+
size?: ("sm" | "md" | "lg" | "xs" | "xl" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg" | "xs" | "xl">>) | undefined;
|
|
236
|
+
} & {
|
|
237
|
+
as?: import("react").ElementType;
|
|
238
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>) => import("react").JSX.Element | null;
|
|
239
|
+
/** Select all rows checkbox.
|
|
240
|
+
*
|
|
241
|
+
* Renders a checkbox on the header, allowing for bulk selection/deselection of all selectable rows
|
|
242
|
+
*/
|
|
243
|
+
SelectAllRowsCheckbox: ({ label }: {
|
|
244
|
+
label?: string;
|
|
245
|
+
}) => import("react").JSX.Element;
|
|
246
|
+
/** Individual row selection checkbox.
|
|
247
|
+
*
|
|
248
|
+
* Renders a checkbox on each row, allowing for individual selection/deselection of any selectable row
|
|
249
|
+
*/
|
|
250
|
+
RowSelectionCheckbox: ({ row, checked, onCheckedChange, label }: {
|
|
251
|
+
row: import("@tanstack/table-core").Row<Record<string, unknown>>;
|
|
252
|
+
checked: boolean | "indeterminate";
|
|
253
|
+
onCheckedChange: (value: boolean) => void;
|
|
254
|
+
label?: string;
|
|
255
|
+
}) => React.ReactElement;
|
|
256
|
+
/** Bulk actions for selected rows.
|
|
257
|
+
*
|
|
258
|
+
* Renders a toolbar with actions that can be applied to all selected rows
|
|
259
|
+
*/
|
|
260
|
+
BulkActions: (({ children, ...rest }: {
|
|
261
|
+
children: React.ReactElement<React.ComponentProps<({ children }: {
|
|
262
|
+
children: React.ReactElement;
|
|
263
|
+
}) => React.ReactElement | null>> | React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
264
|
+
cancelLabel?: string;
|
|
265
|
+
children: React.ReactNode;
|
|
266
|
+
}) => import("react").JSX.Element | null>> | [React.ReactElement<React.ComponentProps<({ children }: {
|
|
267
|
+
children: React.ReactElement;
|
|
268
|
+
}) => React.ReactElement | null>>, React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
269
|
+
cancelLabel?: string;
|
|
270
|
+
children: React.ReactNode;
|
|
271
|
+
}) => import("react").JSX.Element | null>>];
|
|
272
|
+
}) => import("react").JSX.Element) & {
|
|
273
|
+
DefaultActions: ({ children }: {
|
|
274
|
+
children: React.ReactElement;
|
|
275
|
+
}) => React.ReactElement | null;
|
|
276
|
+
SelectedRowActions: ({ cancelLabel, children }: {
|
|
277
|
+
cancelLabel?: string;
|
|
278
|
+
children: React.ReactNode;
|
|
279
|
+
}) => import("react").JSX.Element | null;
|
|
280
|
+
};
|
|
281
|
+
/** Bulk actions for selected rows.
|
|
282
|
+
*
|
|
283
|
+
* Renders a toolbar with actions that can be applied to all selected rows
|
|
284
|
+
*/
|
|
285
|
+
BulkActionsFloating: (({ children, ...rest }: {
|
|
286
|
+
children: React.ReactNode;
|
|
287
|
+
}) => import("react").JSX.Element | null) & {
|
|
288
|
+
SelectedRowActions: ({ cancelLabel, showDividers, children }: {
|
|
289
|
+
cancelLabel?: string;
|
|
290
|
+
showDividers?: boolean;
|
|
291
|
+
children: React.ReactNode;
|
|
292
|
+
}) => import("react").JSX.Element | null;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ColumnOrderTableState, ColumnPinningTableState, ColumnSizingTableState, ExpandedTableState, FiltersTableState, GroupingTableState, PaginationTableState, Row, RowSelectionState, RowSelectionTableState, SortDirection, SortingTableState, Table, VisibilityTableState } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare enum AsyncDataState {
|
|
4
|
+
NONE = "none",
|
|
5
|
+
PENDING = "pending",
|
|
6
|
+
FULFILLED = "fulfilled",
|
|
7
|
+
REJECTED = "rejected"
|
|
8
|
+
}
|
|
9
|
+
export type TAsyncDataResult = {
|
|
10
|
+
total: number;
|
|
11
|
+
results: TableData;
|
|
12
|
+
};
|
|
13
|
+
export type TAsyncDataOptions = {
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
sortBy?: string;
|
|
17
|
+
sortDirection?: SortDirection;
|
|
18
|
+
globalFilter?: string;
|
|
19
|
+
};
|
|
20
|
+
export type TGetAsyncData = (options: TAsyncDataOptions) => Promise<TAsyncDataResult | undefined>;
|
|
21
|
+
export type TablePosition = {
|
|
22
|
+
top: number | null;
|
|
23
|
+
bottom: number | null;
|
|
24
|
+
offsetTop: number;
|
|
25
|
+
isVisible: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type DataTableContextType<T = unknown> = Table<T> & {
|
|
28
|
+
setIsSortable: React.Dispatch<React.SetStateAction<boolean>>;
|
|
29
|
+
applyPagination: () => void;
|
|
30
|
+
getTotalRows: () => number;
|
|
31
|
+
isSortable: boolean;
|
|
32
|
+
asyncDataState?: AsyncDataState;
|
|
33
|
+
runAsyncData?: (options: Partial<TAsyncDataOptions>) => Promise<void>;
|
|
34
|
+
disabledRows?: Record<string, boolean>;
|
|
35
|
+
enableRowSelection?: boolean | ((row: Row<unknown>) => boolean);
|
|
36
|
+
rowSelection: RowSelectionState;
|
|
37
|
+
tablePosition?: TablePosition;
|
|
38
|
+
setTablePosition: React.Dispatch<React.SetStateAction<TablePosition>>;
|
|
39
|
+
data: TAsyncDataResult;
|
|
40
|
+
columns: any;
|
|
41
|
+
tableId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Directly update the data array that the table rows are built from.
|
|
44
|
+
* This is useful when re-ordering rows, but is high-risk if you're not sure what you're doing!
|
|
45
|
+
*
|
|
46
|
+
* Note in particular that this value is also updated if you update the value of the `DataTable`'s `data` prop
|
|
47
|
+
* — it's probably best to only use one of those two methods for any given table.
|
|
48
|
+
*/
|
|
49
|
+
setData: React.Dispatch<React.SetStateAction<TAsyncDataResult>>;
|
|
50
|
+
};
|
|
51
|
+
export type TableData = Array<Record<string, unknown>>;
|
|
52
|
+
export type InitialState = Partial<VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState>;
|
|
53
|
+
export type TDefaultSort = {
|
|
54
|
+
column: string;
|
|
55
|
+
direction: SortDirection;
|
|
56
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Table } from '../table';
|
|
3
|
+
type DataTableBodyProps = Omit<React.ComponentProps<typeof Table.Body>, 'children'> & {
|
|
4
|
+
rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const DataTableBody: ({ striped, rowAction, ...props }: DataTableBodyProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const BulkActionsDefaultActions: ({ children }: {
|
|
3
|
+
children: React.ReactElement;
|
|
4
|
+
}) => React.ReactElement | null;
|
|
5
|
+
declare const BulkActionsSelectedRowActions: ({ cancelLabel, children }: {
|
|
6
|
+
cancelLabel?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}) => React.JSX.Element | null;
|
|
9
|
+
export declare const DataTableBulkActions: (({ children, ...rest }: {
|
|
10
|
+
children: React.ReactElement<React.ComponentProps<typeof BulkActionsDefaultActions>> | React.ReactElement<React.ComponentProps<typeof BulkActionsSelectedRowActions>> | [React.ReactElement<React.ComponentProps<typeof BulkActionsDefaultActions>>, React.ReactElement<React.ComponentProps<typeof BulkActionsSelectedRowActions>>];
|
|
11
|
+
}) => React.JSX.Element) & {
|
|
12
|
+
DefaultActions: ({ children }: {
|
|
13
|
+
children: React.ReactElement;
|
|
14
|
+
}) => React.ReactElement | null;
|
|
15
|
+
SelectedRowActions: ({ cancelLabel, children }: {
|
|
16
|
+
cancelLabel?: string;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}) => React.JSX.Element | null;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const DataTableBulkActionsFloating: (({ children, ...rest }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}) => React.JSX.Element | null) & {
|
|
5
|
+
SelectedRowActions: ({ cancelLabel, showDividers, children }: {
|
|
6
|
+
cancelLabel?: string;
|
|
7
|
+
showDividers?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => React.JSX.Element | null;
|
|
10
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OnChangeFn, Row, RowSelectionState } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { DataTableContextType, InitialState, TableData, TDefaultSort, TGetAsyncData } from './DataTable.types';
|
|
4
|
+
type DataTableProviderProps = {
|
|
5
|
+
columns: any;
|
|
6
|
+
defaultSort?: TDefaultSort;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
initialState?: InitialState;
|
|
9
|
+
disabledRows?: Record<string, boolean>;
|
|
10
|
+
enableRowSelection?: boolean | ((row: Row<unknown>) => boolean);
|
|
11
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
12
|
+
} & ({
|
|
13
|
+
data: TableData;
|
|
14
|
+
getAsyncData?: never;
|
|
15
|
+
} | {
|
|
16
|
+
data?: never;
|
|
17
|
+
getAsyncData: TGetAsyncData;
|
|
18
|
+
});
|
|
19
|
+
export declare const DataTableProvider: ({ columns, data: dataProp, getAsyncData, defaultSort, initialState, disabledRows, enableRowSelection, onRowSelectionChange, children }: DataTableProviderProps) => JSX.Element;
|
|
20
|
+
export declare const useDataTable: <T extends Record<string, unknown>>() => DataTableContextType<T>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Cell } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
type DataTableDataCellProps = {
|
|
4
|
+
cell: Cell<Record<string, unknown>, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const DataTableDataCell: ({ cell }: DataTableDataCellProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { EmptyState } from '../empty-state';
|
|
3
|
+
type DataTableEmptyStateProps = React.ComponentProps<typeof EmptyState>;
|
|
4
|
+
export declare const DataTableEmptyState: ({ children, ...rest }: DataTableEmptyStateProps) => React.JSX.Element | null;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DataTableContextType } from './DataTable.types';
|
|
3
|
+
export declare const DataTableError: ({ children }: {
|
|
4
|
+
children: (retry?: DataTableContextType["runAsyncData"]) => React.ReactElement;
|
|
5
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SearchInput } from '../search-input';
|
|
3
|
+
type DataTableSearchProps = React.ComponentProps<typeof SearchInput> & {
|
|
4
|
+
label: string;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const DataTableGlobalFilter: ({ onChange, label, hideLabel, ...props }: DataTableSearchProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Table } from '../table';
|
|
3
|
+
type DataTableHeadProps = Omit<React.ComponentProps<typeof Table.Header>, 'children'> & {
|
|
4
|
+
sortable?: boolean;
|
|
5
|
+
isSticky?: boolean;
|
|
6
|
+
stickyOffset?: number;
|
|
7
|
+
showTotalInFirstColumn?: boolean;
|
|
8
|
+
totalSuffix?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const DataTableHead: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: DataTableHeadProps) => React.ReactElement;
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import h from"clsx";import*as t from"react";import{Table as n}from"../table/Table.js";import{DataTableSelectAllRowsCheckbox as D}from"./DataTableSelectAllRowsCheckbox.js";import{useDataTable as N}from"./DataTableContext.js";import{DataTable as A}from"./DataTable.js";const F=({sortable:c=!0,theme:p="light",isSticky:s=!1,stickyOffset:a=0,showTotalInFirstColumn:y,totalSuffix:v,style:E,className:S,...T})=>{var u;const{getHeaderGroups:_,setIsSortable:f,enableRowSelection:w,getCanSomeRowsExpand:R,tablePosition:e,setTablePosition:g}=N();t.useEffect(()=>{f(c)},[c,f]);const o=t.useRef(null),i=t.useRef(null),x=t.useRef(0),[m,C]=t.useState(0),[H,d]=t.useState(!1),b=(u=o==null?void 0:o.current)==null?void 0:u.closest("thead");if(b&&(e==null?void 0:e.offsetTop)===null){const l=b.getBoundingClientRect().height,r=a+l;e&&g({...e,offsetTop:r||0})}return t.useEffect(()=>{if(s&&(!i.current&&o.current&&(i.current=o.current.closest("table")),i.current&&(e==null?void 0:e.top)!==null&&(e==null?void 0:e.bottom)!==null)){const l=(e==null?void 0:e.top)!=null&&(e==null?void 0:e.bottom)!=null&&e.top<a&&e.bottom>100?-e.top+a:0;l!==0&&d(!0),x.current=l,C(l),requestAnimationFrame(()=>{d(!1)})}},[s,a,e]),t.createElement(n.Header,{theme:p,style:{...E,"--header-offset":"".concat(m,"px")},...T,className:h("relative","z-3","[&_tr:not(:last-child)>th]:border-b-none","[&_tr:not(:first-child)>th]:rounded-none!",S)},_().map(l=>t.createElement(n.Row,{key:l.id,ref:o,className:s&&m!==0?h("translate-y-(--header-offset)",H?"delay-0ms opacity-0 transition-none":"delay-150ms opacity-100 transition-opacity duration-100","[&_th]:last:before:absolute","[&_th]:last:before:bottom-0","[&_th]:last:before:pointer-events-none","[&_th]:last:before:right-0","[&_th]:last:before:shadow-sm","[&_th]:last:before:top-0","[&_th]:last:before:w-full"):void 0},R()&&t.createElement(n.HeaderCell,{className:"w-10"}),w&&t.createElement(n.HeaderCell,{className:"w-10"},t.createElement(D,null)),l.headers.map((r,k)=>t.createElement(A.HeaderCell,{header:r,key:r.id,includeTotal:k===0&&y,totalSuffix:v})))))};export{F as DataTableHead};
|
|
2
2
|
//# sourceMappingURL=DataTableHead.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHead.js","sources":["../../../src/components/data-table/DataTableHead.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Table } from '../table'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTable, useDataTable } from './index'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...props\n}: DataTableHeadProps): React.ReactElement => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...props}\n className={clsx(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky
|
|
1
|
+
{"version":3,"file":"DataTableHead.js","sources":["../../../src/components/data-table/DataTableHead.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Table } from '../table'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTable, useDataTable } from './index'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...props\n}: DataTableHeadProps): React.ReactElement => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...props}\n className={clsx(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky && headerOffset !== 0\n ? clsx(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTable.HeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n"],"names":["DataTableHead","sortable","theme","isSticky","stickyOffset","showTotalInFirstColumn","totalSuffix","style","className","props","_a","getHeaderGroups","setIsSortable","enableRowSelection","getCanSomeRowsExpand","tablePosition","setTablePosition","useDataTable","React","tableHeaderRowRef","tableRef","headerOffsetRef","headerOffset","setHeaderOffset","headerHide","setHeaderHide","tableHeadElement","tableHeadHeight","intersectionOffset","newOffset","Table","clsx","headerGroup","DataTableSelectAllRowsCheckbox","header","index","DataTable"],"mappings":"2QAkBa,MAAAA,EAAgB,CAAC,CAC5B,SAAAC,EAAW,GACX,MAAAC,EAAQ,QACR,SAAAC,EAAW,GACX,aAAAC,EAAe,EACf,uBAAAC,EACA,YAAAC,EACA,MAAAC,EACA,UAAAC,EACA,GAAGC,CACL,IAA8C,CA5B9C,IAAAC,EA6BE,KAAM,CACJ,gBAAAC,EACA,cAAAC,EACA,mBAAAC,EACA,qBAAAC,EACA,cAAAC,EACA,iBAAAC,CACF,EAAIC,EAEJC,EAAAA,EAAM,UAAU,IAAM,CACpBN,EAAcX,CAAQ,CACxB,EAAG,CAACA,EAAUW,CAAa,CAAC,EAE5B,MAAMO,EAAoBD,EAAM,OAA4B,IAAI,EAC1DE,EAAWF,EAAM,OAAgC,IAAI,EACrDG,EAAkBH,EAAM,OAAO,CAAC,EAEhC,CAACI,EAAcC,CAAe,EAAIL,EAAM,SAAiB,CAAC,EAC1D,CAACM,EAAYC,CAAa,EAAIP,EAAM,SAAkB,EAAK,EAE3DQ,GAAmBhB,EAAAS,GAAA,KAAAA,OAAAA,EAAmB,UAAnB,KAAA,OAAAT,EAA4B,QAAQ,OAAA,EAE7D,GAAIgB,IAAoBX,GAAA,YAAAA,EAAe,aAAc,KAAM,CACzD,MAAMY,EAAkBD,EAAiB,sBAAsB,EAAE,OAC3DE,EAAqBxB,EAAeuB,EACtCZ,GACFC,EAAiB,CAAE,GAAGD,EAAe,UAAWa,GAAsB,CAAE,CAAC,CAE7E,CAEA,OAAAV,EAAM,UAAU,IAAM,CACpB,GAAKf,IAED,CAACiB,EAAS,SAAWD,EAAkB,UACzCC,EAAS,QAAUD,EAAkB,QAAQ,QAC3C,OACF,GAGEC,EAAS,UACPL,GAAA,KAAA,OAAAA,EAAe,OAAQ,OAAQA,GAAA,KAAA,OAAAA,EAAe,UAAW,MAAM,CACjE,MAAMc,GACJd,GAAA,KAAA,OAAAA,EAAe,MAAO,OACtBA,GAAA,KAAAA,OAAAA,EAAe,SAAU,MACzBA,EAAc,IAAMX,GACpBW,EAAc,OAAS,IACnB,CAACA,EAAc,IAAMX,EACrB,EAEFyB,IAAc,GAAGJ,EAAc,EAAI,EAEvCJ,EAAgB,QAAUQ,EAC1BN,EAAgBM,CAAS,EAEzB,sBAAsB,IAAM,CAC1BJ,EAAc,EAAK,CACrB,CAAC,CACH,CAEJ,EAAG,CAACtB,EAAUC,EAAcW,CAAa,CAAC,EAGxCG,EAAA,cAACY,EAAM,OAAN,CACC,MAAO5B,EACP,MAAO,CACL,GAAGK,EACH,kBAAmB,GAAG,OAAAe,EAAY,IAAA,CACpC,EACC,GAAGb,EACJ,UAAWsB,EACT,WACA,MACA,2CACA,4CACAvB,CACF,CAAA,EAECG,EAAkB,EAAA,IAAKqB,GAEpBd,EAAA,cAACY,EAAM,IAAN,CACC,IAAKE,EAAY,GACjB,IAAKb,EACL,UACEhB,GAAYmB,IAAiB,EACzBS,EACE,gCACAP,EACI,sCACA,0DACJ,8BACA,8BACA,yCACA,6BACA,+BACA,2BACA,2BACF,EACA,MAAA,EAGLV,EAA0BI,GAAAA,EAAA,cAACY,EAAM,WAAN,CAAiB,UAAU,MAAA,CAAO,EAC7DjB,GACCK,EAAA,cAACY,EAAM,WAAN,CAAiB,UAAU,MAC1BZ,EAAAA,EAAA,cAACe,EAAA,IAA+B,CAClC,EAEDD,EAAY,QAAQ,IAAI,CAACE,EAAQC,IAChCjB,EAAA,cAACkB,EAAU,WAAV,CACC,OAAQF,EACR,IAAKA,EAAO,GACZ,aAAcC,IAAU,GAAK9B,EAC7B,YAAaC,CAAAA,CACf,CACD,CACH,CAEH,CACH,CAEJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Header } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Table } from '../table';
|
|
4
|
+
type DataTableHeaderProps = React.ComponentProps<typeof Table.HeaderCell> & {
|
|
5
|
+
header: Header<Record<string, unknown>, unknown>;
|
|
6
|
+
includeTotal?: boolean;
|
|
7
|
+
totalSuffix?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const DataTableHeaderCell: ({ header, includeTotal, totalSuffix, children, className, ...props }: DataTableHeaderProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ArrowUp as x,ArrowDown as h}from"@atom-learning/icons";import{flexRender as E}from"@tanstack/react-table";import D from"clsx";import*as
|
|
1
|
+
import{ArrowUp as x,ArrowDown as h}from"@atom-learning/icons";import{flexRender as E}from"@tanstack/react-table";import D from"clsx";import*as t from"react";import{useHover as T}from"react-aria";import{styled as s}from"../../styled.js";import{Flex as c}from"../flex/Flex.js";import{Icon as k}from"../icon/Icon.js";import{Table as C}from"../table/Table.js";import{Text as H}from"../text/Text.js";import{useDataTable as N}from"./DataTableContext.js";const z=s(H,{base:["text-grey-600","whitespace-nowrap","hidden","min-[800px]:block"]}),I=s(C.HeaderCell,{base:[],variants:{isSortable:{true:["*:relative","before:absolute","before:bg-primary-100","before:content-['']","before:duration-200","before:ease-in","before:inset-0","before:opacity-0","before:transition-opacity","cursor-pointer","hover:before:opacity-50","relative"]}}}),A={asc:x,desc:h},F=({direction:e})=>t.createElement(k,{is:A[e],size:"sm",className:"stroke-primary-900 absolute left-1"}),K=({header:e,includeTotal:p=!1,totalSuffix:f="items",children:R,className:b,...d})=>{var n,i;const m=e.column.getIsSorted(),{isSortable:o,getRowModel:u}=N(),a=e.column.getCanSort(),g=(i=(n=u())==null?void 0:n.rows)==null?void 0:i.length,{hoverProps:y,isHovered:v}=T({}),S=(r,w)=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),w(r))},l=e.column.getToggleSortingHandler();return t.createElement(I,{isSortable:o&&a,colSpan:e.colSpan,onClick:o&&a&&l?l:void 0,onKeyDown:r=>o&&a&&l&&S(r,l),tabIndex:o&&a?0:-1,...y,className:b,...d},t.createElement(c,{align:"center",gap:1,justify:e.colSpan>1?"center":"flex-start"},E(e.column.columnDef.header,e.getContext()),m&&o&&t.createElement(c,{align:"center",className:D("relative","size-6","ml-2",v?"bg-primary-200":"bg-primary-100","rounded-sm")},t.createElement(F,{direction:m})),p&&t.createElement(z,{size:"sm",weight:"normal"},"(",g," ",f,")")))};export{K as DataTableHeaderCell};
|
|
2
2
|
//# sourceMappingURL=DataTableHeaderCell.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const PendingState: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, "direction" | "align" | "wrap" | "justify" | "gap"> & {
|
|
5
|
+
direction?: ("row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "row-reverse" | "column" | "column-reverse" | "inherit" | "initial" | "revert" | "revert-layer" | "unset">>) | undefined;
|
|
6
|
+
wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
|
|
7
|
+
justify?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "left" | "right" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
|
|
8
|
+
align?: ("end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "center" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "baseline" | "first baseline" | "last baseline">>) | undefined;
|
|
9
|
+
gap?: (0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | 2 | "0" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "1" | "2" | "3" | "4" | "24" | "5" | "6" | "7" | "8" | "9" | 24>>) | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement> & {
|
|
13
|
+
message?: string;
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
}, never> & {
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export declare const DataTableLoading: (props: React.ComponentProps<typeof PendingState>) => React.JSX.Element | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Row } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Table } from '../table';
|
|
4
|
+
export type DataTableRowProps = React.ComponentProps<typeof Table.Row> & {
|
|
5
|
+
row: Row<Record<string, unknown>>;
|
|
6
|
+
rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const DataTableRow: ({ row, rowAction }: DataTableRowProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Row } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const DataTableRowSelectionCheckbox: ({ row, checked, onCheckedChange, label }: {
|
|
4
|
+
row: Row<Record<string, unknown>>;
|
|
5
|
+
checked: boolean | "indeterminate";
|
|
6
|
+
onCheckedChange: (value: boolean) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
}) => React.ReactElement;
|