@flipdish/ui-library 0.69.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/components/__internal__/controlFill/controlFill.context.cjs +13 -0
- package/dist/components/__internal__/controlFill/controlFill.context.cjs.map +1 -0
- package/dist/components/__internal__/controlFill/controlFill.context.d.ts +7 -0
- package/dist/components/__internal__/controlFill/controlFill.context.d.ts.map +1 -0
- package/dist/components/__internal__/controlFill/controlFill.context.js +11 -0
- package/dist/components/__internal__/controlFill/controlFill.context.js.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs +13 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts +8 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts.map +1 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.js +11 -0
- package/dist/components/__internal__/focusHandOff/focusHandOff.context.js.map +1 -0
- package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.js +1 -1
- package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -1
- package/dist/components/atoms/LiveStatus/index.cjs +18 -0
- package/dist/components/atoms/LiveStatus/index.cjs.map +1 -0
- package/dist/components/atoms/LiveStatus/index.d.ts +17 -0
- package/dist/components/atoms/LiveStatus/index.d.ts.map +1 -0
- package/dist/components/atoms/LiveStatus/index.js +16 -0
- package/dist/components/atoms/LiveStatus/index.js.map +1 -0
- package/dist/components/forms/Form/index.cjs +1 -1
- package/dist/components/forms/Form/index.js +1 -1
- package/dist/components/molecules/Dropdown/index.d.ts +2 -2
- package/dist/components/molecules/EmptyState/index.cjs +9 -1
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +11 -3
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs +13 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts +8 -0
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js +13 -1
- package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.cjs +6 -5
- package/dist/components/molecules/Modals/Modal/Modal.cjs.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/molecules/Modals/Modal/Modal.js +6 -5
- package/dist/components/molecules/Modals/Modal/Modal.js.map +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.cjs +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts.map +1 -1
- package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.js +1 -1
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts +1 -1
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +4 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +5 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs +11 -6
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts +4 -2
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js +12 -7
- package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js.map +1 -1
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs +53 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs.map +1 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts +41 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts.map +1 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js +51 -0
- package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js.map +1 -0
- package/dist/components/organisms/FilterBar/index.cjs +19 -7
- package/dist/components/organisms/FilterBar/index.cjs.map +1 -1
- package/dist/components/organisms/FilterBar/index.d.ts +1 -0
- package/dist/components/organisms/FilterBar/index.d.ts.map +1 -1
- package/dist/components/organisms/FilterBar/index.js +18 -7
- package/dist/components/organisms/FilterBar/index.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.cjs +2 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.d.ts +10 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.js +2 -0
- package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.js.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs +3 -1
- package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/SlideoutMenu/index.js +3 -1
- package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
- package/dist/components/organisms/Table/index.cjs +14 -244
- package/dist/components/organisms/Table/index.cjs.map +1 -1
- package/dist/components/organisms/Table/index.d.ts +29 -124
- package/dist/components/organisms/Table/index.d.ts.map +1 -1
- package/dist/components/organisms/Table/index.js +13 -243
- package/dist/components/organisms/Table/index.js.map +1 -1
- package/dist/components/organisms/Tables/Table/Table.cjs +305 -0
- package/dist/components/organisms/Tables/Table/Table.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.d.ts +146 -0
- package/dist/components/organisms/Tables/Table/Table.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.js +301 -0
- package/dist/components/organisms/Tables/Table/Table.js.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.styles.cjs +29 -0
- package/dist/components/organisms/Tables/Table/Table.styles.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.styles.d.ts +16 -0
- package/dist/components/organisms/Tables/Table/Table.styles.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/Table.styles.js +27 -0
- package/dist/components/organisms/Tables/Table/Table.styles.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.cjs +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardList.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableCardList.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.js +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardList.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.cjs +10 -5
- package/dist/components/organisms/Tables/Table/components/TableCardRow.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableCardRow.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.js +11 -6
- package/dist/components/organisms/Tables/Table/components/TableCardRow.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.cjs +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.d.ts +3 -1
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.js +2 -2
- package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs +17 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts +5 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.js +15 -0
- package/dist/components/organisms/Tables/Table/components/TableEmptyState.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableFallbackCard.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.cjs +6 -5
- package/dist/components/organisms/Tables/Table/components/TableRowCard.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/components/TableRowCard.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.js +6 -5
- package/dist/components/organisms/Tables/Table/components/TableRowCard.js.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/components/TableSortIcon.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.cjs +22 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.d.ts +12 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.js +20 -0
- package/dist/components/organisms/Tables/Table/hooks/useBusyCount.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.cjs +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.js +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.cjs +42 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.d.ts +14 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.js +40 -0
- package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.cjs +8 -11
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.d.ts +10 -3
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.js +9 -12
- package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.d.ts +1 -1
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.js.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs +83 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts +23 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js +81 -0
- package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.cjs +12 -4
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.d.ts +5 -3
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.js +12 -4
- package/dist/components/organisms/Tables/Table/hooks/useTableSelection.js.map +1 -0
- package/dist/components/organisms/Tables/Table/providers/Table.context.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.d.ts +14 -2
- package/dist/components/organisms/Tables/Table/providers/Table.context.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/providers/Table.context.js.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs +55 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts +25 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js +51 -0
- package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.cjs +57 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.d.ts +66 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.js +52 -0
- package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.js.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.cjs +21 -21
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.d.ts +29 -19
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.js +20 -21
- package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.js.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs +34 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts +37 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js +32 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs +32 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts +21 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts.map +1 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js +30 -0
- package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js.map +1 -0
- package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.cjs +12 -5
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.cjs.map +1 -0
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.d.ts +47 -0
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.d.ts.map +1 -0
- package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.js +12 -5
- package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.js.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.cjs.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.d.ts.map +1 -0
- package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.js.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs +84 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts +20 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts.map +1 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js +81 -0
- package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js.map +1 -0
- package/dist/components/organisms/Tables/index.cjs +14 -0
- package/dist/components/organisms/Tables/index.cjs.map +1 -0
- package/dist/components/organisms/Tables/index.d.ts +19 -0
- package/dist/components/organisms/Tables/index.d.ts.map +1 -0
- package/dist/components/organisms/Tables/index.js +4 -0
- package/dist/components/organisms/Tables/index.js.map +1 -0
- package/dist/components/organisms/{Table/table.types.d.ts → Tables/tables.types.d.ts} +12 -2
- package/dist/components/organisms/Tables/tables.types.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableCard.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.d.ts +2 -2
- package/dist/components/organisms/Tables/utilities/tableCard.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableCard.utils.js.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.cjs +7 -4
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.d.ts +5 -3
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.js +7 -4
- package/dist/components/organisms/Tables/utilities/tableChildren.utils.js.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.cjs +23 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.cjs.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.d.ts +8 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.d.ts.map +1 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.js +21 -0
- package/dist/components/organisms/Tables/utilities/tableIterable.utils.js.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.cjs +1 -1
- package/dist/components/organisms/Tables/utilities/tableSort.utils.cjs.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.d.ts +1 -1
- package/dist/components/organisms/Tables/utilities/tableSort.utils.d.ts.map +1 -0
- package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.js +1 -1
- package/dist/components/organisms/Tables/utilities/tableSort.utils.js.map +1 -0
- package/dist/hooks/useFocusAfterRetry/index.cjs +21 -19
- package/dist/hooks/useFocusAfterRetry/index.cjs.map +1 -1
- package/dist/hooks/useFocusAfterRetry/index.d.ts +15 -5
- package/dist/hooks/useFocusAfterRetry/index.d.ts.map +1 -1
- package/dist/hooks/useFocusAfterRetry/index.js +21 -19
- package/dist/hooks/useFocusAfterRetry/index.js.map +1 -1
- package/dist/hooks/useFocusHandOff/index.cjs +67 -0
- package/dist/hooks/useFocusHandOff/index.cjs.map +1 -0
- package/dist/hooks/useFocusHandOff/index.d.ts +17 -0
- package/dist/hooks/useFocusHandOff/index.d.ts.map +1 -0
- package/dist/hooks/useFocusHandOff/index.js +65 -0
- package/dist/hooks/useFocusHandOff/index.js.map +1 -0
- package/dist/hooks/useListQueryParams/index.cjs +238 -0
- package/dist/hooks/useListQueryParams/index.cjs.map +1 -0
- package/dist/hooks/useListQueryParams/index.d.ts +77 -0
- package/dist/hooks/useListQueryParams/index.d.ts.map +1 -0
- package/dist/hooks/useListQueryParams/index.js +236 -0
- package/dist/hooks/useListQueryParams/index.js.map +1 -0
- package/dist/hooks/useLoadState/index.cjs +69 -0
- package/dist/hooks/useLoadState/index.cjs.map +1 -0
- package/dist/hooks/useLoadState/index.d.ts +44 -0
- package/dist/hooks/useLoadState/index.d.ts.map +1 -0
- package/dist/hooks/useLoadState/index.js +67 -0
- package/dist/hooks/useLoadState/index.js.map +1 -0
- package/dist/hooks/usePagedList/index.cjs +61 -0
- package/dist/hooks/usePagedList/index.cjs.map +1 -0
- package/dist/hooks/usePagedList/index.d.ts +56 -0
- package/dist/hooks/usePagedList/index.d.ts.map +1 -0
- package/dist/hooks/usePagedList/index.js +59 -0
- package/dist/hooks/usePagedList/index.js.map +1 -0
- package/dist/native/components/atoms/LiveStatus/index.d.ts +12 -0
- package/dist/native/components/organisms/Tables/index.d.ts +12 -0
- package/dist/native/hooks/useFocusHandOff/index.d.ts +12 -0
- package/dist/native/hooks/useListQueryParams/index.d.ts +12 -0
- package/dist/native/hooks/useLoadState/index.d.ts +12 -0
- package/dist/native/hooks/usePagedList/index.d.ts +12 -0
- package/dist/native/utilities/listQueryUtils/index.d.ts +12 -0
- package/dist/styles.css +12 -0
- package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.cjs +9 -0
- package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.cjs.map +1 -0
- package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.d.ts +8 -0
- package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.d.ts.map +1 -0
- package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.js +9 -1
- package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.js.map +1 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs +47 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts +51 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.js +43 -0
- package/dist/utilities/__internal__/listStateUtils/listState.utils.js.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs +67 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts +27 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js +64 -0
- package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js.map +1 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs +28 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts +10 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js +28 -1
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js.map +1 -1
- package/dist/utilities/listQueryUtils/index.cjs +59 -0
- package/dist/utilities/listQueryUtils/index.cjs.map +1 -0
- package/dist/utilities/listQueryUtils/index.d.ts +46 -0
- package/dist/utilities/listQueryUtils/index.d.ts.map +1 -0
- package/dist/utilities/listQueryUtils/index.js +55 -0
- package/dist/utilities/listQueryUtils/index.js.map +1 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs.map +1 -1
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts.map +1 -1
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.js +2 -0
- package/dist/utilities/localStorageUtils/localStorageUtils.constants.js.map +1 -1
- package/package.json +9 -9
- package/dist/components/forms/Form/utilities/focusFromCode.utils.cjs.map +0 -1
- package/dist/components/forms/Form/utilities/focusFromCode.utils.d.ts.map +0 -1
- package/dist/components/forms/Form/utilities/focusFromCode.utils.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardList.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardRow.js.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableCardsSelectAll.js.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableFallbackCard.js.map +0 -1
- package/dist/components/organisms/Table/components/TableFocusGuard.cjs +0 -23
- package/dist/components/organisms/Table/components/TableFocusGuard.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableFocusGuard.d.ts +0 -2
- package/dist/components/organisms/Table/components/TableFocusGuard.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableFocusGuard.js +0 -21
- package/dist/components/organisms/Table/components/TableFocusGuard.js.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.cjs +0 -27
- package/dist/components/organisms/Table/components/TableLayoutToggle.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts +0 -17
- package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableLayoutToggle.js +0 -25
- package/dist/components/organisms/Table/components/TableLayoutToggle.js.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableRowCard.js.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableSortIcon.js.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.cjs.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.d.ts +0 -35
- package/dist/components/organisms/Table/components/TableSortMenu.d.ts.map +0 -1
- package/dist/components/organisms/Table/components/TableSortMenu.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useFirstSortDirection.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useIsAtLeastMd.js.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/usePlaceholderRows.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.js.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.cjs.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.d.ts.map +0 -1
- package/dist/components/organisms/Table/hooks/useTableSelection.js.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.cjs.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.d.ts.map +0 -1
- package/dist/components/organisms/Table/providers/Table.context.js.map +0 -1
- package/dist/components/organisms/Table/table.types.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableCard.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableChildren.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSelection.utils.js.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.cjs.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.d.ts.map +0 -1
- package/dist/components/organisms/Table/utilities/tableSort.utils.js.map +0 -1
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.js +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.d.ts +0 -0
- /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.js +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.cjs +0 -0
- /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.js +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { HelpCircle, Edit01, Copy01, Trash01 } from '@flipdish/ui-icons';
|
|
3
|
+
import { Badge } from '@flipdish/ui-library/components/atoms/Badges';
|
|
4
|
+
import { Checkbox } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
5
|
+
import { Skeleton } from '@flipdish/ui-library/components/atoms/Skeleton';
|
|
6
|
+
import { Tooltip, TooltipTrigger } from '@flipdish/ui-library/components/atoms/Tooltip';
|
|
7
|
+
import { Dropdown } from '@flipdish/ui-library/components/molecules/Dropdown';
|
|
8
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
9
|
+
import { isProductionBuild } from '@flipdish/ui-library/utilities/renderUtils';
|
|
10
|
+
import { useResolvedTestId, joinTestId, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
11
|
+
import { mergeRefs } from '@react-aria/utils';
|
|
12
|
+
import { forwardRef, useContext, useLayoutEffect, useEffect, useMemo, useState, isValidElement } from 'react';
|
|
13
|
+
import { CollectionRendererContext, Table as Table$1, useTableOptions, Cell, TableHeader as TableHeader$1, Column, Collection, Row, TableBody as TableBody$1, Group } from 'react-aria-components';
|
|
14
|
+
import { warnOnce } from '../../../../utilities/__internal__/logUtils/log.utils.js';
|
|
15
|
+
import { useIsAtLeastMd } from '../hooks/useIsAtLeastMd.js';
|
|
16
|
+
import { useStoredTableLayout } from '../hooks/useStoredTableLayout.js';
|
|
17
|
+
import { cardListPropsOf, tableLayoutOf, rowTestIdOf, cardCellPropsOf } from '../utilities/tableCard.utils.js';
|
|
18
|
+
import { findElement, columnsOfHeader, splitRowChildren } from '../utilities/tableChildren.utils.js';
|
|
19
|
+
import { reusableIterableOf } from '../utilities/tableIterable.utils.js';
|
|
20
|
+
import { sortStepOf } from '../utilities/tableSort.utils.js';
|
|
21
|
+
import { TableCardList } from './components/TableCardList.js';
|
|
22
|
+
import { TableCardRow } from './components/TableCardRow.js';
|
|
23
|
+
import { TableCardsSelectAll } from './components/TableCardsSelectAll.js';
|
|
24
|
+
import { TableEmptyState } from './components/TableEmptyState.js';
|
|
25
|
+
import { TableRowCardSkeleton, TableRowCardHeader, TableRowCard, TableRowCardContent, TableRowCardFooter, isRowCardElement } from './components/TableRowCard.js';
|
|
26
|
+
import { TableSortIcon } from './components/TableSortIcon.js';
|
|
27
|
+
import { useBusyCount } from './hooks/useBusyCount.js';
|
|
28
|
+
import { useFirstSortDirection } from './hooks/useFirstSortDirection.js';
|
|
29
|
+
import { useIsPlaceholderPage } from './hooks/useIsPlaceholderPage.js';
|
|
30
|
+
import { usePlaceholderRows, useRegisterPlaceholderRow } from './hooks/usePlaceholderRows.js';
|
|
31
|
+
import { useSelectableRowRegistry, useRegisterSelectableRow } from './hooks/useSelectableRowRegistry.js';
|
|
32
|
+
import { useTableFocusHandOff } from './hooks/useTableFocusHandOff.js';
|
|
33
|
+
import { useTableSelection } from './hooks/useTableSelection.js';
|
|
34
|
+
import { TableContext, TableCardLayoutContext, TableRowCardContext, TableRowCardSurfaceContext, TableRowCardHeaderCheckboxContext } from './providers/Table.context.js';
|
|
35
|
+
import { styles } from './Table.styles.js';
|
|
36
|
+
import { loadingRowPartsOf, canDrawLoadingRows, loadingRowIdsOf, loadingBodyPropsOf } from './utilities/tableLoading.utils.js';
|
|
37
|
+
|
|
38
|
+
/** Row actions menu behind a dots button with fixed Edit, Copy link and Delete items, for use in a table's last column. */
|
|
39
|
+
const TableRowActionsDropdown = () => (jsxs(Dropdown.Root, { children: [jsx(Dropdown.DotsButton, { color: "tertiary" }), jsx(Dropdown.Popover, { className: "w-min", children: jsxs(Dropdown.Menu, { children: [jsx(Dropdown.Item, { icon: Edit01, children: jsx("span", { className: "pr-4", children: "Edit" }) }), jsx(Dropdown.Item, { icon: Copy01, children: jsx("span", { className: "pr-4", children: "Copy link" }) }), jsx(Dropdown.Item, { icon: Trash01, children: jsx("span", { className: "pr-4", children: "Delete" }) })] }) })] }));
|
|
40
|
+
/** Bordered card around a `Table` and its optional `Pagination`; sets the `size` every child inherits, has no surface while its table shows cards, and is `aria-busy` while it loads. */
|
|
41
|
+
const TableCardRoot = ({ children, className, size = 'md', 'aria-busy': ariaBusy, ...props }) => {
|
|
42
|
+
const [layout, setLayout] = useState('table');
|
|
43
|
+
const busy = useBusyCount();
|
|
44
|
+
return (jsx(TableCardLayoutContext.Provider, { value: { layout, setLayout, registerBusy: busy.registerBusy }, children: jsx(TableContext.Provider, { value: { size }, children: jsx("div", { ...props, "aria-busy": busy.isBusy || ariaBusy, "data-pagination-scroll-target": "", "data-table-layout": layout, className: cx(layout === 'cards' ? 'flex flex-col gap-4' : 'overflow-hidden rounded-xl bg-primary shadow-xs ring-1 ring-secondary', className), children: children }) }) }));
|
|
45
|
+
};
|
|
46
|
+
/** Titled header for a table embedded in a dashboard or panel; page-level tables use `PageHeader` instead. */
|
|
47
|
+
const TableCardHeader = ({ title, badge, description, contentTrailing, className }) => {
|
|
48
|
+
const { size } = useContext(TableContext);
|
|
49
|
+
const { layout } = useContext(TableCardLayoutContext);
|
|
50
|
+
const renderBadge = () => {
|
|
51
|
+
if (!badge)
|
|
52
|
+
return null;
|
|
53
|
+
if (isValidElement(badge))
|
|
54
|
+
return badge;
|
|
55
|
+
return (jsx(Badge, { color: "gray", size: "sm", type: "modern", children: badge }));
|
|
56
|
+
};
|
|
57
|
+
return (jsxs("div", { className: cx('relative flex flex-col items-start gap-4 md:flex-row',
|
|
58
|
+
// Above cards the header is a plain heading row: the card it would divide from has no surface.
|
|
59
|
+
layout !== 'cards' && 'border-b border-secondary bg-primary px-4', layout !== 'cards' && (size === 'sm' ? 'py-4 md:px-5' : 'py-5 md:px-6'), className), children: [jsxs("div", { className: "flex flex-1 flex-col gap-0.5", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("h2", { className: "text-md font-semibold text-primary", children: title }), renderBadge()] }), description && jsx("p", { className: "text-sm text-tertiary", children: description })] }), contentTrailing] }));
|
|
60
|
+
};
|
|
61
|
+
// What a table's descendants see in place of its `TableCard.Root`: one nested in a row card or a cell has no card of its own to report to.
|
|
62
|
+
const DETACHED_CARD_LAYOUT = { layout: 'table' };
|
|
63
|
+
// The element types match react-aria's: inside a `Virtualizer` the table, its header, rows and cells render as `div`s.
|
|
64
|
+
const TableRoot = forwardRef(({ className, style, children, mobileLayout = 'cards', desktopLayout: desktopLayoutProp, layoutKey, size: sizeProp, selectedKey, selectedKeys, defaultSelectedKeys, onSelectionChange, onSelectedKeyChange, onSelectedKeysChange, onSortChange, defaultSortDescriptor, isLoading = false, loadingRowCount = 5, loadingRow, 'data-testid': dataTestId, ...props }, ref) => {
|
|
65
|
+
// Re-providing the context would otherwise reset a card-level `size` back to `md`.
|
|
66
|
+
const inherited = useContext(TableContext);
|
|
67
|
+
const { setLayout, registerBusy } = useContext(TableCardLayoutContext);
|
|
68
|
+
const size = sizeProp ?? inherited.size;
|
|
69
|
+
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'table', rootName: 'table' });
|
|
70
|
+
const registry = useSelectableRowRegistry();
|
|
71
|
+
const placeholders = usePlaceholderRows(props.onRowAction);
|
|
72
|
+
// Read by the table and by react-aria alike, so a one-shot iterator is read once and every reader gets the same keys.
|
|
73
|
+
const disabledKeys = reusableIterableOf(props.disabledKeys);
|
|
74
|
+
const isPlaceholderPage = useIsPlaceholderPage(isLoading, registry, placeholders.registry, disabledKeys);
|
|
75
|
+
// One per table, so a press in its empty state hands focus to its own rows and titles, never another table's.
|
|
76
|
+
const focusHandOff = useTableFocusHandOff();
|
|
77
|
+
// Held here, above the layout switch: the table and the card list are different trees, and crossing `md` remounts the rows.
|
|
78
|
+
const selection = useTableSelection({
|
|
79
|
+
selectedKey,
|
|
80
|
+
selectedKeys,
|
|
81
|
+
defaultSelectedKeys,
|
|
82
|
+
disabledKeys,
|
|
83
|
+
rowIds: registry.rowIds,
|
|
84
|
+
isPlaceholderPage,
|
|
85
|
+
onSelectionChange,
|
|
86
|
+
onSelectedKeyChange,
|
|
87
|
+
onSelectedKeysChange,
|
|
88
|
+
});
|
|
89
|
+
const isAtLeastMd = useIsAtLeastMd();
|
|
90
|
+
const desktopLayout = useStoredTableLayout(layoutKey, desktopLayoutProp);
|
|
91
|
+
// A `Virtualizer` hands its table layout to any collection inside it, and that layout cannot place cards.
|
|
92
|
+
const { isVirtualized } = useContext(CollectionRendererContext);
|
|
93
|
+
const layout = tableLayoutOf(isAtLeastMd, mobileLayout, desktopLayout, isVirtualized);
|
|
94
|
+
// Before paint, so a `TableCard.Root` around cards never shows a frame of its surface.
|
|
95
|
+
useLayoutEffect(() => {
|
|
96
|
+
setLayout?.(layout);
|
|
97
|
+
return () => setLayout?.('table');
|
|
98
|
+
}, [layout, setLayout]);
|
|
99
|
+
useLayoutEffect(() => (isLoading ? registerBusy?.() : undefined), [isLoading, registerBusy]);
|
|
100
|
+
// With no card to report to, as alone or nested in a row card, the table marks itself busy.
|
|
101
|
+
const isOwnBusy = isLoading && registerBusy === undefined;
|
|
102
|
+
// Only the cards and the loading rows need the columns, and a column render function runs on every read.
|
|
103
|
+
const header = isLoading || layout === 'cards' ? findElement(children, TableHeader) : undefined;
|
|
104
|
+
const columns = header ? columnsOfHeader(header.props.children, header.props.columns) : [];
|
|
105
|
+
const loadingParts = isLoading ? loadingRowPartsOf(loadingRow, columns, LOADING_ROW_DEFAULTS) : undefined;
|
|
106
|
+
const isMissingLoadingCells = loadingParts !== undefined && !canDrawLoadingRows(layout, loadingParts.cells.length);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (!isMissingLoadingCells || isProductionBuild())
|
|
109
|
+
return;
|
|
110
|
+
warnOnce('Table:loading-no-columns', 'Table: `isLoading` found no columns to give its loading rows cells, so the table shows none: `Table` reads columns only from a `Table.Header` among its direct children. Render `Table.Header` directly inside `Table`, or pass `loadingRow` with a `Table.Cell` per column.');
|
|
111
|
+
}, [isMissingLoadingCells]);
|
|
112
|
+
// react-aria only toggles a sorted column; the press that would toggle it back to its first direction clears it instead.
|
|
113
|
+
const firstSortDirection = useFirstSortDirection(props.sortDescriptor, defaultSortDescriptor);
|
|
114
|
+
const handleSortChange = onSortChange &&
|
|
115
|
+
((next) => onSortChange(sortStepOf(props.sortDescriptor, next, firstSortDirection) === 'clear' ? defaultSortDescriptor : next));
|
|
116
|
+
// A row cannot see the table-level `onRowAction`, so the context carries whether one exists.
|
|
117
|
+
const context = {
|
|
118
|
+
size,
|
|
119
|
+
layout,
|
|
120
|
+
testIdPrefix: rootTestId,
|
|
121
|
+
hasRowAction: props.onRowAction !== undefined,
|
|
122
|
+
registerRow: registry.register,
|
|
123
|
+
isPlaceholderPage,
|
|
124
|
+
registerPlaceholder: placeholders.register,
|
|
125
|
+
// React-aria throws on a table row with no cells, so with none to give the table draws no loading rows; see the warning.
|
|
126
|
+
loadingRows: loadingParts && renderLoadingRows(isMissingLoadingCells ? 0 : loadingRowCount, loadingParts),
|
|
127
|
+
focusHandOff,
|
|
128
|
+
};
|
|
129
|
+
if (layout === 'cards') {
|
|
130
|
+
const { selectionMode = 'none', selectionBehavior = 'toggle' } = props;
|
|
131
|
+
// Cards have no column headers to sort from, and dragging is untested on them; react-aria filters the rest as it does for the table.
|
|
132
|
+
const { dragAndDropHooks, sortDescriptor, onRowAction, render: _tableRender, ...sharedProps } = props;
|
|
133
|
+
const listProps = {
|
|
134
|
+
...cardListPropsOf(sharedProps),
|
|
135
|
+
disabledKeys,
|
|
136
|
+
selectedKeys: selection.selectedKeys,
|
|
137
|
+
onSelectionChange: selection.onSelectionChange,
|
|
138
|
+
onAction: placeholders.onAction,
|
|
139
|
+
// From `md` the cards sit in columns, so the arrow keys move across them as well as down.
|
|
140
|
+
layout: isAtLeastMd ? 'grid' : 'stack',
|
|
141
|
+
'data-testid': joinTestId(rootTestId, 'list'),
|
|
142
|
+
};
|
|
143
|
+
const cardContext = { ...context, columns, listProps };
|
|
144
|
+
return (jsx(TableCardLayoutContext.Provider, { value: DETACHED_CARD_LAYOUT, children: jsx(TableRowCardContext.Provider, { value: null, children: jsx(TableRowCardSurfaceContext.Provider, { value: false, children: jsx(TableRowCardHeaderCheckboxContext.Provider, { value: false, children: jsx(TableContext.Provider, { value: cardContext, children: jsxs("div", { ref: ref, "data-testid": rootTestId, "aria-busy": isOwnBusy || undefined, className: "@container flex flex-col gap-4", children: [selectionMode === 'multiple' && selectionBehavior === 'toggle' && (jsx(TableCardsSelectAll, { registry: registry, selectedKeys: selection.selectedKeys, onSelectionChange: selection.onSelectionChange, disabledKeys: disabledKeys, isPlaceholderPage: isPlaceholderPage, disallowEmptySelection: props.disallowEmptySelection, "data-testid": joinTestId(rootTestId, 'select-all') })), children] }) }) }) }) }) }));
|
|
145
|
+
}
|
|
146
|
+
return (jsx(TableCardLayoutContext.Provider, { value: DETACHED_CARD_LAYOUT, children: jsx(TableContext.Provider, { value: context, children: jsx("div", { className: "overflow-x-auto", "aria-busy": isOwnBusy || undefined, children: jsx(Table$1, { "data-testid": rootTestId, className: (state) => cx('w-full overflow-x-hidden', typeof className === 'function' ? className(state) : className), style: style, ...props, ref: ref, disabledKeys: disabledKeys, selectedKeys: selection.selectedKeys, onSelectionChange: selection.onSelectionChange, onSortChange: handleSortChange, onRowAction: placeholders.onAction, children: children }) }) }) }));
|
|
147
|
+
});
|
|
148
|
+
TableRoot.displayName = 'Table';
|
|
149
|
+
// On a page of placeholders, as while loading, react-aria's own select all stays on and would store `'all'` for the rows that load next.
|
|
150
|
+
const NO_ROW_TO_SELECT = { isDisabled: true, isSelected: false, isIndeterminate: false };
|
|
151
|
+
const TableGridHeaderBase = ({ columns, children, bordered = true, className, size: sizeProp, ...props }, ref) => {
|
|
152
|
+
const context = useContext(TableContext);
|
|
153
|
+
const { selectionBehavior, selectionMode } = useTableOptions();
|
|
154
|
+
const size = sizeProp ?? context.size;
|
|
155
|
+
return (jsxs(TableHeader$1, { ...props, ref: ref, className: (state) => cx('relative bg-secondary', size === 'sm' ? 'h-9' : 'h-11',
|
|
156
|
+
// Row border—using an "after" pseudo-element to avoid the border taking up space.
|
|
157
|
+
bordered &&
|
|
158
|
+
'[&>tr>th]:after:pointer-events-none [&>tr>th]:after:absolute [&>tr>th]:after:inset-x-0 [&>tr>th]:after:bottom-0 [&>tr>th]:after:h-px [&>tr>th]:after:bg-border-secondary [&>tr>th]:focus-visible:after:bg-transparent', typeof className === 'function' ? className(state) : className), children: [selectionBehavior === 'toggle' && (jsx(Column, { className: cx('relative py-2 pr-0 pl-4', size === 'sm' ? 'w-9 md:pl-5' : 'w-11 md:pl-6'), children: selectionMode === 'multiple' && (jsx("div", { className: "flex items-start", children: jsx(Checkbox, { slot: "selection", size: "md", ...(context.isPlaceholderPage ? NO_ROW_TO_SELECT : {}) }) })) })), jsx(Collection, { items: reusableIterableOf(columns), children: children })] }));
|
|
159
|
+
};
|
|
160
|
+
// `forwardRef` drops the type parameter that ties `columns` to the item a render function gets; the cast restores it.
|
|
161
|
+
const TableGridHeader = forwardRef(TableGridHeaderBase);
|
|
162
|
+
// Cards have no header row: the fallback card reads the columns from this element's props, and no sort control renders.
|
|
163
|
+
const TableHeaderBase = (props, ref) => {
|
|
164
|
+
const { layout } = useContext(TableContext);
|
|
165
|
+
return layout === 'cards' ? null : jsx(TableGridHeader, { ...props, ref: ref });
|
|
166
|
+
};
|
|
167
|
+
/** The row of column headers: one `Table.Head` per column, and select all with multiple selection; nothing in the cards layout. */
|
|
168
|
+
const TableHeader = forwardRef(TableHeaderBase);
|
|
169
|
+
TableHeader.displayName = 'TableHeader';
|
|
170
|
+
/** One column header, with an optional `label`, help `tooltip` and sort arrow; its `id` keys the column. */
|
|
171
|
+
const TableHead = ({ className, tooltip, label, children, 'data-testid': dataTestId, ...props }) => {
|
|
172
|
+
const { selectionBehavior } = useTableOptions();
|
|
173
|
+
const { testIdPrefix } = useContext(TableContext);
|
|
174
|
+
const colTestId = dataTestId ?? (testIdPrefix && props.id !== undefined ? joinTestId(testIdPrefix, `col-${slugifyTestId(String(props.id))}`) : undefined);
|
|
175
|
+
return (jsx(Column, { ...props, "data-testid": colTestId, className: (state) => cx('relative p-0 px-6 py-2 outline-hidden focus-visible:z-1 focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-bg-primary focus-visible:ring-inset', selectionBehavior === 'toggle' && 'nth-2:pl-3', state.allowsSorting && 'cursor-pointer', typeof className === 'function' ? className(state) : className), children: (state) => (jsxs(Group, { className: "flex items-center gap-1", children: [jsxs("div", { className: "flex items-center gap-1", children: [label && jsx("span", { className: "text-xs font-semibold whitespace-nowrap text-quaternary", children: label }), typeof children === 'function' ? children(state) : children] }), tooltip && (jsx(Tooltip, { title: tooltip, placement: "top", children: jsx(TooltipTrigger, { "aria-label": tooltip, className: "cursor-pointer text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover", children: jsx(HelpCircle, { className: "size-4" }) }) })), state.allowsSorting && jsx(TableSortIcon, { sortDirection: state.sortDirection })] })) }));
|
|
176
|
+
};
|
|
177
|
+
TableHead.displayName = 'TableHead';
|
|
178
|
+
// The selected row: a brand tint (`_alt`, as `bg-brand-primary` is solid brand-500 in dark) and a 4px brand bar on its first cell.
|
|
179
|
+
const HIGHLIGHTED_ROW_CLASSNAME = "bg-brand-primary_alt hover:bg-brand-primary_alt [&>td:first-child]:before:absolute [&>td:first-child]:before:inset-y-0 [&>td:first-child]:before:left-0 [&>td:first-child]:before:w-1 [&>td:first-child]:before:bg-brand-solid [&>td:first-child]:before:content-['']";
|
|
180
|
+
const TableGridRowBase = ({ columns, children, className, highlightSelectedRow = true, isHighlighted = false, color, size: sizeProp, 'data-testid': dataTestId, ...props }, ref) => {
|
|
181
|
+
const context = useContext(TableContext);
|
|
182
|
+
const { selectionBehavior, selectionMode } = useTableOptions();
|
|
183
|
+
const size = sizeProp ?? context.size;
|
|
184
|
+
const rowTestId = rowTestIdOf(context.testIdPrefix, props.id, dataTestId);
|
|
185
|
+
// Function children render their own cells, and a skeleton only counts as a direct child, so only nodes are split.
|
|
186
|
+
const rowChildren = typeof children === 'function' ? undefined : splitRowChildren(children, columns, isRowCardElement);
|
|
187
|
+
// A row carrying `Table.RowCard.Skeleton` is a placeholder here too: nothing to press, select or count in select all.
|
|
188
|
+
const isPlaceholder = rowChildren?.card?.type === TableRowCardSkeleton;
|
|
189
|
+
// A click does something on the row itself: its own action or link, the table's row action, or selection by row.
|
|
190
|
+
const isInteractive = !isPlaceholder && (props.onAction !== undefined || props.href !== undefined || context.hasRowAction === true || selectionMode !== 'none');
|
|
191
|
+
const { id, isDisabled } = props;
|
|
192
|
+
useRegisterSelectableRow(context.registerRow, id, isDisabled || isPlaceholder);
|
|
193
|
+
useRegisterPlaceholderRow(context.registerPlaceholder, id, isPlaceholder);
|
|
194
|
+
// A placeholder is no place to land focus; the merge is kept from render to render, so a row on screen never spends a hand-off.
|
|
195
|
+
const focusTargetRef = isPlaceholder ? undefined : context.focusHandOff?.rowRef;
|
|
196
|
+
const rowRef = useMemo(() => (focusTargetRef ? mergeRefs(ref, focusTargetRef) : ref), [ref, focusTargetRef]);
|
|
197
|
+
return (jsxs(Row, { ...props, ref: rowRef, isDisabled: isDisabled || isPlaceholder, onAction: isPlaceholder ? undefined : props.onAction, href: isPlaceholder ? undefined : props.href, "data-testid": rowTestId, "data-highlighted": isHighlighted || undefined, className: (state) => cx('relative outline-focus-ring transition-colors after:pointer-events-none hover:bg-secondary focus-visible:outline-2 focus-visible:-outline-offset-2', size === 'sm' ? 'h-14' : 'h-18',
|
|
198
|
+
// Before the highlight, which replaces it; hover keeps its neutral surface over it.
|
|
199
|
+
color && !isPlaceholder && styles.rowColors[color], ((highlightSelectedRow && state.isSelected) || isHighlighted) && HIGHLIGHTED_ROW_CLASSNAME, isInteractive && (state.isDisabled ? 'cursor-default' : 'cursor-pointer'),
|
|
200
|
+
// Row border—using an "after" pseudo-element to avoid the border taking up space.
|
|
201
|
+
'[&>td]:after:absolute [&>td]:after:inset-x-0 [&>td]:after:bottom-0 [&>td]:after:h-px [&>td]:after:w-full [&>td]:after:bg-border-secondary last:[&>td]:after:hidden [&>td]:focus-visible:after:opacity-0 focus-visible:[&>td]:after:opacity-0', typeof className === 'function' ? className(state) : className), children: [selectionBehavior === 'toggle' && (jsx(Cell, { className: cx('relative py-2 pr-0 pl-4', size === 'sm' ? 'md:pl-5' : 'md:pl-6'), children: jsx("div", { className: "flex items-end", children: jsx(Checkbox, { slot: "selection", size: "md", "data-testid": rowTestId ? joinTestId(rowTestId, 'selection') : undefined }) }) })), jsx(Collection, { items: reusableIterableOf(columns), children: rowChildren ? rowChildren.cells : children })] }));
|
|
202
|
+
};
|
|
203
|
+
// As for `TableHeader`: the cast restores the type parameter `forwardRef` drops.
|
|
204
|
+
const TableGridRow = forwardRef(TableGridRowBase);
|
|
205
|
+
// The row reads its layout from the table, which asks the viewport once for every row.
|
|
206
|
+
const TableRowBase = (props, ref) => {
|
|
207
|
+
const { layout } = useContext(TableContext);
|
|
208
|
+
return layout === 'cards' ? jsx(TableCardRow, { ...props, ref: ref }) : jsx(TableGridRow, { ...props, ref: ref });
|
|
209
|
+
};
|
|
210
|
+
/** One row of cells, or its `Table.RowCard` in the cards layout; give it an `id` for selection and its test id. */
|
|
211
|
+
const TableRow = forwardRef(TableRowBase);
|
|
212
|
+
TableRow.displayName = 'TableRow';
|
|
213
|
+
const TableGridCell = forwardRef(({ className, children, size: sizeProp, ...props }, ref) => {
|
|
214
|
+
const context = useContext(TableContext);
|
|
215
|
+
const { selectionBehavior } = useTableOptions();
|
|
216
|
+
const size = sizeProp ?? context.size;
|
|
217
|
+
return (jsx(Cell, { ...props, ref: ref, className: (state) => cx('relative text-sm text-tertiary outline-focus-ring focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2', size === 'sm' && 'px-5 py-3', size === 'md' && 'px-6 py-4', selectionBehavior === 'toggle' && 'nth-2:pl-3', typeof className === 'function' ? className(state) : className), children: children }));
|
|
218
|
+
});
|
|
219
|
+
// Every state off: a card is not a grid of cells, so nothing in it is a focused, hovered or selected cell.
|
|
220
|
+
const CARD_CELL_STATE = {
|
|
221
|
+
isPressed: false,
|
|
222
|
+
isFocused: false,
|
|
223
|
+
isFocusVisible: false,
|
|
224
|
+
isHovered: false,
|
|
225
|
+
isSelected: false,
|
|
226
|
+
isDisabled: false,
|
|
227
|
+
isFocusVisibleWithinRow: false,
|
|
228
|
+
isTreeColumn: false,
|
|
229
|
+
isExpanded: false,
|
|
230
|
+
hasChildItems: false,
|
|
231
|
+
level: 1,
|
|
232
|
+
defaultChildren: undefined,
|
|
233
|
+
};
|
|
234
|
+
// In a card a cell is its content: its padding, `className` and span are written for the table.
|
|
235
|
+
const TableCardCell = ({ children, className, style, colSpan, size, textValue, id, render: _tableCellRender, ...props }) => {
|
|
236
|
+
const content = typeof children === 'function' ? children(CARD_CELL_STATE) : children;
|
|
237
|
+
// What react-aria puts on the table's cell, such as `onClick` and `data-testid`; a click bubbles on to the card's row as to the table's.
|
|
238
|
+
const cellProps = cardCellPropsOf(props);
|
|
239
|
+
if (Object.keys(cellProps).length === 0)
|
|
240
|
+
return content;
|
|
241
|
+
return (jsx("div", { className: "contents", ...cellProps, children: content }));
|
|
242
|
+
};
|
|
243
|
+
/** One cell of a row; in the cards layout only the fallback card shows it: its content, with its `data-*` and handlers. */
|
|
244
|
+
const TableCell = forwardRef((props, ref) => {
|
|
245
|
+
const { layout } = useContext(TableContext);
|
|
246
|
+
return layout === 'cards' ? jsx(TableCardCell, { ...props }) : jsx(TableGridCell, { ...props, ref: ref });
|
|
247
|
+
});
|
|
248
|
+
TableCell.displayName = 'TableCell';
|
|
249
|
+
// What a loading row draws for a part its `loadingRow` leaves out: a bar of about a line of text, which fits both sizes.
|
|
250
|
+
const LOADING_ROW_DEFAULTS = {
|
|
251
|
+
isCard: isRowCardElement,
|
|
252
|
+
isSkeletonCard: (element) => element.type === TableRowCardSkeleton,
|
|
253
|
+
// As wide as its column up to 96px, so a narrow column such as a row's actions stays narrow. The row-header cell names
|
|
254
|
+
// the row "Loading", as a loading card is named, so it is no empty `rowheader`.
|
|
255
|
+
cellOf: (column, isRowHeader) => (jsxs(TableCell, { children: [jsx(Skeleton, { width: "100%", height: 14, radius: "sm", className: "max-w-24" }), isRowHeader && jsx("span", { className: "sr-only", children: "Loading" })] }, column)),
|
|
256
|
+
card: jsx(TableRowCardSkeleton, {}),
|
|
257
|
+
};
|
|
258
|
+
// Placeholders in both layouts, as a row carrying `Table.RowCard.Skeleton` is: nothing to press, select or count in select all.
|
|
259
|
+
const renderLoadingRows = (count, { cells, card }) => loadingRowIdsOf(count).map((id) => (jsxs(TableRow, { id: id, children: [cells, card] }, id)));
|
|
260
|
+
const TableBodyBase = (props, ref) => {
|
|
261
|
+
const { layout, loadingRows } = useContext(TableContext);
|
|
262
|
+
// A one-shot `items` is read once, so the card list still gets the rows after the table had them, as crossing `md` does.
|
|
263
|
+
const bodyProps = loadingBodyPropsOf({ ...props, items: reusableIterableOf(props.items) }, loadingRows);
|
|
264
|
+
const { renderEmptyState } = bodyProps;
|
|
265
|
+
// A press on a control in the empty state hands focus to what replaces it: the first row to mount, or the next title.
|
|
266
|
+
const emptyStateProps = renderEmptyState && {
|
|
267
|
+
renderEmptyState: (state) => jsx(TableEmptyState, { children: renderEmptyState(state) }),
|
|
268
|
+
};
|
|
269
|
+
return layout === 'cards' ? (jsx(TableCardList, { ...bodyProps, ...emptyStateProps, ref: ref })) : (jsx(TableBody$1, { ...bodyProps, ...emptyStateProps, ref: ref }));
|
|
270
|
+
};
|
|
271
|
+
// As for `TableHeader`: the cast restores the type parameter `forwardRef` drops.
|
|
272
|
+
/** The table's rows, with `renderEmptyState` for when there are none; while the table `isLoading`, its loading rows instead; in the cards layout, the one `grid` that holds every card. */
|
|
273
|
+
const TableBody = forwardRef(TableBodyBase);
|
|
274
|
+
TableBody.displayName = 'TableBody';
|
|
275
|
+
const TableCard = {
|
|
276
|
+
Root: TableCardRoot,
|
|
277
|
+
Header: TableCardHeader,
|
|
278
|
+
};
|
|
279
|
+
/** The card a `Table.Row` shows in the cards layout, built from its `Header`, `Content` and `Footer`, or its `Skeleton` while loading. */
|
|
280
|
+
const TableRowCardCompound = TableRowCard;
|
|
281
|
+
TableRowCardCompound.Header = TableRowCardHeader;
|
|
282
|
+
TableRowCardCompound.Content = TableRowCardContent;
|
|
283
|
+
TableRowCardCompound.Footer = TableRowCardFooter;
|
|
284
|
+
TableRowCardCompound.Skeleton = TableRowCardSkeleton;
|
|
285
|
+
/**
|
|
286
|
+
* Displays structured data in rows and columns with selection, sorting and keyboard navigation, or as one card per row:
|
|
287
|
+
* below `md` unless `mobileLayout` opts out, and from `md` when `desktopLayout` asks. Wrap it in `TableCard.Root`; on a page the title comes from
|
|
288
|
+
* `PageHeader` and search or filters from a `FilterBar` above the card.
|
|
289
|
+
*
|
|
290
|
+
* @summary data table with selection, sorting and cards on mobile
|
|
291
|
+
*/
|
|
292
|
+
const Table = TableRoot;
|
|
293
|
+
Table.Body = TableBody;
|
|
294
|
+
Table.RowCard = TableRowCardCompound;
|
|
295
|
+
Table.Cell = TableCell;
|
|
296
|
+
Table.Head = TableHead;
|
|
297
|
+
Table.Header = TableHeader;
|
|
298
|
+
Table.Row = TableRow;
|
|
299
|
+
|
|
300
|
+
export { Table, TableCard, TableRowActionsDropdown };
|
|
301
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../../../src/components/organisms/Tables/Table/Table.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","AriaCollectionRendererContext","AriaTable","AriaTableHeader","AriaColumn","AriaCollection","AriaGroup","AriaRow","AriaCell","AriaTableBody"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA;AACO,MAAM,uBAAuB,GAAG,OACrCA,IAAA,CAAC,QAAQ,CAAC,IAAI,eACZC,GAAA,CAAC,QAAQ,CAAC,UAAU,EAAA,EAAC,KAAK,EAAC,UAAU,EAAA,CAAG,EAExCA,IAAC,QAAQ,CAAC,OAAO,EAAA,EAAC,SAAS,EAAC,OAAO,EAAA,QAAA,EACjCD,KAAC,QAAQ,CAAC,IAAI,EAAA,EAAA,QAAA,EAAA,CACZC,GAAA,CAAC,QAAQ,CAAC,IAAI,IAAC,IAAI,EAAE,MAAM,EAAA,QAAA,EACzBA,cAAM,SAAS,EAAC,MAAM,EAAA,QAAA,EAAA,MAAA,EAAA,CAAY,EAAA,CACpB,EAChBA,GAAA,CAAC,QAAQ,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,MAAM,YACzBA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,MAAM,EAAA,QAAA,EAAA,WAAA,EAAA,CAAiB,EAAA,CACzB,EAChBA,IAAC,QAAQ,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,OAAO,EAAA,QAAA,EAC1BA,cAAM,SAAS,EAAC,MAAM,EAA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|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared `Table` style config, read by the table's row in `index.tsx` and by the card a row shows in the cards layout.
|
|
5
|
+
*
|
|
6
|
+
* `rowColors` tints a `Table.Row` with `color`, the same in both layouts: the 50 step of the `utility` hue that `Badge`
|
|
7
|
+
* fills the same colour name with, so a row and the badge on it cannot drift apart. Hover and press keep their neutral
|
|
8
|
+
* surfaces over a tint. `orange` is the list designs' tint for a row awaiting action.
|
|
9
|
+
*
|
|
10
|
+
* `cardBorders` is the 300 step of the same colour, for the card alone: a card has a border of its own to tint, where a
|
|
11
|
+
* table row has only the neutral divider under it.
|
|
12
|
+
*/
|
|
13
|
+
const styles = {
|
|
14
|
+
rowColors: {
|
|
15
|
+
warning: 'bg-utility-yellow-50',
|
|
16
|
+
error: 'bg-utility-red-50',
|
|
17
|
+
success: 'bg-utility-green-50',
|
|
18
|
+
orange: 'bg-utility-orange-50',
|
|
19
|
+
},
|
|
20
|
+
cardBorders: {
|
|
21
|
+
warning: 'border-utility-yellow-300',
|
|
22
|
+
error: 'border-utility-red-300',
|
|
23
|
+
success: 'border-utility-green-300',
|
|
24
|
+
orange: 'border-utility-orange-300',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.styles = styles;
|
|
29
|
+
//# sourceMappingURL=Table.styles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.styles.cjs","sources":["../../../../../src/components/organisms/Tables/Table/Table.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;AASG;AACI,MAAM,MAAM,GAA6F;AAC9G,IAAA,SAAS,EAAE;AACT,QAAA,OAAO,EAAE,sBAAsB;AAC/B,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,OAAO,EAAE,qBAAqB;AAC9B,QAAA,MAAM,EAAE,sBAAsB;AAC/B,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,OAAO,EAAE,2BAA2B;AACpC,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,MAAM,EAAE,2BAA2B;AACpC,KAAA;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TableRowColor } from '../tables.types';
|
|
2
|
+
/**
|
|
3
|
+
* Shared `Table` style config, read by the table's row in `index.tsx` and by the card a row shows in the cards layout.
|
|
4
|
+
*
|
|
5
|
+
* `rowColors` tints a `Table.Row` with `color`, the same in both layouts: the 50 step of the `utility` hue that `Badge`
|
|
6
|
+
* fills the same colour name with, so a row and the badge on it cannot drift apart. Hover and press keep their neutral
|
|
7
|
+
* surfaces over a tint. `orange` is the list designs' tint for a row awaiting action.
|
|
8
|
+
*
|
|
9
|
+
* `cardBorders` is the 300 step of the same colour, for the card alone: a card has a border of its own to tint, where a
|
|
10
|
+
* table row has only the neutral divider under it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const styles: {
|
|
13
|
+
rowColors: Record<TableRowColor, string>;
|
|
14
|
+
cardBorders: Record<TableRowColor, string>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Table.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/Tables/Table/Table.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;CAa1G,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `Table` style config, read by the table's row in `index.tsx` and by the card a row shows in the cards layout.
|
|
3
|
+
*
|
|
4
|
+
* `rowColors` tints a `Table.Row` with `color`, the same in both layouts: the 50 step of the `utility` hue that `Badge`
|
|
5
|
+
* fills the same colour name with, so a row and the badge on it cannot drift apart. Hover and press keep their neutral
|
|
6
|
+
* surfaces over a tint. `orange` is the list designs' tint for a row awaiting action.
|
|
7
|
+
*
|
|
8
|
+
* `cardBorders` is the 300 step of the same colour, for the card alone: a card has a border of its own to tint, where a
|
|
9
|
+
* table row has only the neutral divider under it.
|
|
10
|
+
*/
|
|
11
|
+
const styles = {
|
|
12
|
+
rowColors: {
|
|
13
|
+
warning: 'bg-utility-yellow-50',
|
|
14
|
+
error: 'bg-utility-red-50',
|
|
15
|
+
success: 'bg-utility-green-50',
|
|
16
|
+
orange: 'bg-utility-orange-50',
|
|
17
|
+
},
|
|
18
|
+
cardBorders: {
|
|
19
|
+
warning: 'border-utility-yellow-300',
|
|
20
|
+
error: 'border-utility-red-300',
|
|
21
|
+
success: 'border-utility-green-300',
|
|
22
|
+
orange: 'border-utility-orange-300',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { styles };
|
|
27
|
+
//# sourceMappingURL=Table.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.styles.js","sources":["../../../../../src/components/organisms/Tables/Table/Table.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;AASG;AACI,MAAM,MAAM,GAA6F;AAC9G,IAAA,SAAS,EAAE;AACT,QAAA,OAAO,EAAE,sBAAsB;AAC/B,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,OAAO,EAAE,qBAAqB;AAC9B,QAAA,MAAM,EAAE,sBAAsB;AAC/B,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,OAAO,EAAE,2BAA2B;AACpC,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,MAAM,EAAE,2BAA2B;AACpC,KAAA;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var children_utils = require('
|
|
6
|
+
var children_utils = require('../../../../../utilities/__internal__/childrenUtils/children.utils.cjs');
|
|
7
|
+
var tableCard_utils = require('../../utilities/tableCard.utils.cjs');
|
|
7
8
|
var Table_context = require('../providers/Table.context.cjs');
|
|
8
|
-
var tableCard_utils = require('../utilities/tableCard.utils.cjs');
|
|
9
9
|
|
|
10
10
|
const isTableLoader = (child) => React.isValidElement(child) && child.type === reactAriaComponents.TableLoadMoreItem;
|
|
11
11
|
// react-aria's table loader reads the table's state, which a card list has none of; the list's own loader takes the same props.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCardList.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardList.tsx"],"sourcesContent":[null],"names":["isValidElement","TableLoadMoreItem","_jsx","GridListLoadMoreItem","cardLoadMorePropsOf","useContext","TableContext","flattenChildren","GridList","cardBodyPropsOf","forwardRef"],"mappings":";;;;;;;;;AASA,MAAM,aAAa,GAAG,CAAC,KAAgB,KAAoDA,oBAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAKC,qCAAiB;AAEpJ;AACA,MAAM,YAAY,GAAG,CAAC,KAAgB,KACpC,aAAa,CAAC,KAAK,CAAC,GAAGC,cAAA,CAACC,wCAAoB,EAAA,EAAA,GAAqBC,mCAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA,EAA/C,KAAK,CAAC,GAAG,CAA0C,GAAG,KAAK;AAE/G;AACA,MAAM,iBAAiB,GAAG,CACxB,EACE,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EAAE,gBAAgB,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,SAAS,EACM,EACpB,GAAiC,KAC/B;IACF,MAAM,EAAE,SAAS,EAAE,GAAGC,gBAAU,CAACC,0BAAY,CAAC;;;IAG9C,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,GAAGC,8BAAe,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;AAE5G,IAAA,QACEL,cAAA,CAACM,4BAAQ,EAAA,EAAA,GACHC,+BAAe,CAAC,SAAS,CAAC,EAAA,GAC1B,SAAS,EAAA,aAAA,EAEA,UAAU,IAAI,SAAS,GAAG,aAAa,CAAC,EACrD,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB;;AAElC,QAAA,SAAS,EAAC,0JAA0J,EAAA,QAAA,EAEnK,YAAY,EAAA,CACJ;AAEf,CAAC;AAED;MACa,aAAa,GAAGC,gBAAU,CAAC,iBAAiB;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReactElement, type RefAttributes } from 'react';
|
|
2
|
-
import type { TableBodyProps } from '
|
|
2
|
+
import type { TableBodyProps } from '../../tables.types';
|
|
3
3
|
export declare const TableCardList: <T>(props: TableBodyProps<T> & RefAttributes<HTMLDivElement>) => ReactElement;
|
|
4
4
|
//# sourceMappingURL=TableCardList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCardList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiD,KAAK,YAAY,EAAkB,KAAK,aAAa,EAAc,MAAM,OAAO,CAAC;AAGzI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAiDzD,eAAO,MAAM,aAAa,EAAoC,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,KAAK,YAAY,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef, useContext, isValidElement } from 'react';
|
|
3
3
|
import { GridList, GridListLoadMoreItem, TableLoadMoreItem } from 'react-aria-components';
|
|
4
|
-
import { flattenChildren } from '
|
|
4
|
+
import { flattenChildren } from '../../../../../utilities/__internal__/childrenUtils/children.utils.js';
|
|
5
|
+
import { cardBodyPropsOf, cardLoadMorePropsOf } from '../../utilities/tableCard.utils.js';
|
|
5
6
|
import { TableContext } from '../providers/Table.context.js';
|
|
6
|
-
import { cardBodyPropsOf, cardLoadMorePropsOf } from '../utilities/tableCard.utils.js';
|
|
7
7
|
|
|
8
8
|
const isTableLoader = (child) => isValidElement(child) && child.type === TableLoadMoreItem;
|
|
9
9
|
// react-aria's table loader reads the table's state, which a card list has none of; the list's own loader takes the same props.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCardList.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardList.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;AASA,MAAM,aAAa,GAAG,CAAC,KAAgB,KAAoD,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB;AAEpJ;AACA,MAAM,YAAY,GAAG,CAAC,KAAgB,KACpC,aAAa,CAAC,KAAK,CAAC,GAAGA,GAAA,CAAC,oBAAoB,EAAA,EAAA,GAAqB,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA,EAA/C,KAAK,CAAC,GAAG,CAA0C,GAAG,KAAK;AAE/G;AACA,MAAM,iBAAiB,GAAG,CACxB,EACE,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EAAE,gBAAgB,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,SAAS,EACM,EACpB,GAAiC,KAC/B;IACF,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC;;;IAG9C,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;AAE5G,IAAA,QACEA,GAAA,CAAC,QAAQ,EAAA,EAAA,GACH,eAAe,CAAC,SAAS,CAAC,EAAA,GAC1B,SAAS,EAAA,aAAA,EAEA,UAAU,IAAI,SAAS,GAAG,aAAa,CAAC,EACrD,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB;;AAElC,QAAA,SAAS,EAAC,0JAA0J,EAAA,QAAA,EAEnK,YAAY,EAAA,CACJ;AAEf,CAAC;AAED;MACa,aAAa,GAAG,UAAU,CAAC,iBAAiB;;"}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var renderUtils = require('@flipdish/ui-library/utilities/renderUtils');
|
|
5
|
+
var utils = require('@react-aria/utils');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var log_utils = require('
|
|
8
|
+
var log_utils = require('../../../../../utilities/__internal__/logUtils/log.utils.cjs');
|
|
9
|
+
var tableCard_utils = require('../../utilities/tableCard.utils.cjs');
|
|
10
|
+
var tableChildren_utils = require('../../utilities/tableChildren.utils.cjs');
|
|
8
11
|
var usePlaceholderRows = require('../hooks/usePlaceholderRows.cjs');
|
|
9
12
|
var useSelectableRowRegistry = require('../hooks/useSelectableRowRegistry.cjs');
|
|
10
13
|
var Table_context = require('../providers/Table.context.cjs');
|
|
11
|
-
var tableCard_utils = require('../utilities/tableCard.utils.cjs');
|
|
12
|
-
var tableChildren_utils = require('../utilities/tableChildren.utils.cjs');
|
|
13
14
|
var TableFallbackCard = require('./TableFallbackCard.cjs');
|
|
14
15
|
var TableRowCard = require('./TableRowCard.cjs');
|
|
15
16
|
|
|
16
17
|
const TableCardRowBase = (
|
|
17
18
|
// `className`, `style`, `render` and `size` are written for the table and never reach a card.
|
|
18
|
-
{ children, columns, className, style, render: _tableRowRender, size, highlightSelectedRow = true, isHighlighted = false, textValue, 'data-testid': dataTestId, ...props }, ref) => {
|
|
19
|
+
{ children, columns, className, style, render: _tableRowRender, size, highlightSelectedRow = true, isHighlighted = false, color, textValue, 'data-testid': dataTestId, ...props }, ref) => {
|
|
19
20
|
const context = React.useContext(Table_context.TableContext);
|
|
20
21
|
const tableColumns = context.columns ?? [];
|
|
21
22
|
const { card, cardCount, cells } = tableChildren_utils.splitRowChildren(children, columns, TableRowCard.isRowCardElement);
|
|
@@ -25,6 +26,9 @@ const TableCardRowBase = (
|
|
|
25
26
|
const isRowDisabled = isDisabled || isPlaceholder;
|
|
26
27
|
useSelectableRowRegistry.useRegisterSelectableRow(context.registerRow, id, isRowDisabled);
|
|
27
28
|
usePlaceholderRows.useRegisterPlaceholderRow(context.registerPlaceholder, id, isPlaceholder);
|
|
29
|
+
// As the table's row: a loading card is no place to land focus, and the merge is kept so a card on screen never spends a hand-off.
|
|
30
|
+
const focusTargetRef = isPlaceholder ? undefined : context.focusHandOff?.rowRef;
|
|
31
|
+
const cardRowRef = React.useMemo(() => (focusTargetRef ? utils.mergeRefs(ref, focusTargetRef) : ref), [ref, focusTargetRef]);
|
|
28
32
|
// Only the fallback card pairs cells with columns, by the column each starts in, so only it can put a value under the wrong label.
|
|
29
33
|
const fallback = card ? undefined : tableCard_utils.fallbackCardSlots(tableColumns, cells, tableCard_utils.cellSpanOf);
|
|
30
34
|
const spannedColumns = tableCard_utils.spannedColumnCountOf(cells);
|
|
@@ -63,11 +67,12 @@ const TableCardRowBase = (
|
|
|
63
67
|
isFocusVisible: state.isFocusVisible,
|
|
64
68
|
showsSelection: state.selectionMode !== 'none' && state.selectionBehavior === 'toggle',
|
|
65
69
|
isPlaceholder,
|
|
70
|
+
color: isPlaceholder ? undefined : color,
|
|
66
71
|
testId: rowTestId,
|
|
67
72
|
};
|
|
68
73
|
return jsxRuntime.jsx(Table_context.TableRowCardContext.Provider, { value: rowCard, children: cardNode });
|
|
69
74
|
};
|
|
70
|
-
return (jsxRuntime.jsx(reactAriaComponents.GridListItem, { ...tableCard_utils.cardRowPropsOf(props), ref:
|
|
75
|
+
return (jsxRuntime.jsx(reactAriaComponents.GridListItem, { ...tableCard_utils.cardRowPropsOf(props), ref: cardRowRef,
|
|
71
76
|
// The row's name is its title, as the table names a row by its row-header cell; react-aria sets it as `aria-label`.
|
|
72
77
|
textValue: name || undefined, isDisabled: isRowDisabled, onAction: isPlaceholder ? undefined : onAction, href: isPlaceholder ? undefined : href, "data-testid": rowTestId, "data-highlighted": isHighlighted || undefined,
|
|
73
78
|
// Equal columns from `md`, so a column's cards line up and react-aria's grid finds the card below; see Breakpoints.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCardRow.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardRow.tsx"],"sourcesContent":[null],"names":["useContext","TableContext","splitRowChildren","isRowCardElement","TableRowCardSkeleton","useRegisterSelectableRow","useRegisterPlaceholderRow","useMemo","mergeRefs","fallbackCardSlots","cellSpanOf","spannedColumnCountOf","fallbackCardWarningOf","cardRowNameOf","cardTitleOf","TableRowCardHeader","useEffect","isProductionBuild","warnOnce","rowTestIdOf","_jsx","TableFallbackCard","isCardRowInteractive","TableRowCardContext","GridListItem","cardRowPropsOf","forwardRef"],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAM,gBAAgB,GAAG;AACvB;AACA,EACE,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EAAE,eAAe,EACvB,IAAI,EACJ,oBAAoB,GAAG,IAAI,EAC3B,aAAa,GAAG,KAAK,EACrB,KAAK,EACL,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,E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
2
|
-
import type { TableRowProps } from '
|
|
2
|
+
import type { TableRowProps } from '../../tables.types';
|
|
3
3
|
export declare const TableCardRow: <T extends object>(props: TableRowProps<T> & RefAttributes<HTMLDivElement>) => ReactElement;
|
|
4
4
|
//# sourceMappingURL=TableCardRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCardRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardRow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiC,KAAK,YAAY,EAAE,KAAK,aAAa,EAAkC,MAAM,OAAO,CAAC;AAG7H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA6HxD,eAAO,MAAM,YAAY,EAAmC,CAAC,CAAC,SAAS,MAAM,EAC3E,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,KACpD,YAAY,CAAC"}
|