@astral/ui 4.104.2 → 4.106.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/components/ActionCellBase/ActionCellBase.js +10 -1
- package/components/ActionCellBase/MainAction/MainAction.js +6 -0
- package/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
- package/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
- package/components/ActionCellBase/MainAction/MainIconButton/constants.js +4 -0
- package/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
- package/components/ActionCellBase/MainAction/MainIconButton/styles.js +9 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +17 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/index.js +1 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
- package/components/ActionCellBase/MainAction/MobileMainButton/styles.js +7 -0
- package/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
- package/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
- package/components/ActionCellBase/SecondaryAction/styles.js +9 -0
- package/components/ActionCellBase/constants.d.ts +4 -0
- package/components/ActionCellBase/constants.js +5 -0
- package/components/ActionCellBase/styles.js +11 -0
- package/components/ActionCellBase/types.d.ts +25 -0
- package/components/ActionGroup/MainActions/ActionNode/ActionNode.d.ts +9 -0
- package/components/ActionGroup/MainActions/ActionNode/ActionNode.js +30 -0
- package/components/ActionGroup/MainActions/ActionNode/index.d.ts +1 -0
- package/components/ActionGroup/MainActions/ActionNode/index.js +1 -0
- package/components/ActionGroup/MainActions/MainActions.d.ts +1 -1
- package/components/ActionGroup/MainActions/MainActions.js +3 -14
- package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +352 -3
- package/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.js +33 -6
- package/components/ActionGroup/MainActions/index.d.ts +1 -0
- package/components/ActionGroup/MainActions/index.js +1 -0
- package/components/ActionGroup/MainActions/styles.d.ts +5 -6
- package/components/ActionGroup/MainActions/styles.js +6 -7
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.d.ts +12 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.js +30 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.d.ts +1 -0
- package/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.js +1 -0
- package/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -7
- package/components/ActionGroup/constants.d.ts +3 -0
- package/components/ActionGroup/constants.js +4 -0
- package/components/ActionGroup/index.d.ts +2 -1
- package/components/ActionGroup/index.js +1 -0
- package/components/ActionGroup/public.d.ts +2 -1
- package/components/ActionGroup/public.js +1 -0
- package/components/ActionGroup/styles.js +5 -0
- package/components/ActionGroup/types.d.ts +48 -6
- package/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
- package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
- package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +7 -4
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/index.js +1 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +66 -2
- package/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
- package/components/InfiniteTreeList/LevelHeader/LevelHeader.js +17 -0
- package/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
- package/components/InfiniteTreeList/LevelHeader/constants.js +3 -0
- package/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
- package/components/InfiniteTreeList/LevelHeader/index.js +2 -0
- package/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
- package/components/InfiniteTreeList/LevelHeader/styles.js +51 -0
- package/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
- package/components/InfiniteTreeList/LevelHeader/types.js +1 -0
- package/components/InfiniteTreeList/ListFooter/styles.js +8 -0
- package/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
- package/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
- package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
- package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +11 -0
- package/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
- package/components/InfiniteTreeList/TreeItem/styles.js +19 -0
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
- package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +5 -4
- package/components/InfiniteTreeList/constants.d.ts +21 -0
- package/components/InfiniteTreeList/constants.js +21 -0
- package/components/InfiniteTreeList/hooks/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +48 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +3 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +42 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +27 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
- package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +39 -0
- package/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
- package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +192 -28
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +6 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
- package/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +1 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +2 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +1 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
- package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +18 -0
- package/components/InfiniteTreeList/styles.d.ts +5 -0
- package/components/InfiniteTreeList/styles.js +41 -0
- package/components/InfiniteTreeList/types.d.ts +4 -0
- package/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
- package/components/InfiniteTreeList/useLogic/useLogic.js +165 -27
- package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +4 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +1 -0
- package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
- package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +5 -0
- package/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/checkHasNested/index.js +1 -0
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
- package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
- package/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
- package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
- package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +5 -0
- package/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
- package/components/InfiniteTreeList/utils/getLevelKey/index.js +1 -0
- package/components/InfiniteTreeList/utils/index.d.ts +3 -0
- package/components/InfiniteTreeList/utils/index.js +3 -0
- package/components/PageHeader/MobilePageActions/MobilePageActions.js +2 -2
- package/components/PageHeader/MobilePageActions/useLogic/useLogic.d.ts +1 -0
- package/components/PageHeader/MobilePageActions/useLogic/useLogic.js +3 -0
- package/components/PageHeader/PageActions/MainActions/MainActions.d.ts +1 -1
- package/components/PageHeader/PageActions/MainActions/MainActions.js +2 -2
- package/components/PageHeader/PageActions/MainActions/styles.js +5 -0
- package/components/PageHeader/PageActions/PageActions.js +2 -2
- package/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -3
- package/components/PageHeader/PageActions/SecondaryVisibleActions/styles.d.ts +7 -1
- package/components/PageHeader/PageActions/useLogic/useLogic.d.ts +1 -0
- package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -0
- package/components/index.d.ts +1 -1
- package/components/useScrollManagement/useScrollManagement.js +7 -6
- package/node/components/ActionCellBase/ActionCellBase.js +10 -1
- package/node/components/ActionCellBase/MainAction/MainAction.js +6 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
- package/node/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/constants.js +7 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
- package/node/components/ActionCellBase/MainAction/MainIconButton/styles.js +12 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +21 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/index.js +17 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
- package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.js +10 -0
- package/node/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
- package/node/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
- package/node/components/ActionCellBase/SecondaryAction/styles.js +12 -0
- package/node/components/ActionCellBase/constants.d.ts +4 -0
- package/node/components/ActionCellBase/constants.js +8 -0
- package/node/components/ActionCellBase/styles.js +11 -0
- package/node/components/ActionCellBase/types.d.ts +25 -0
- package/node/components/ActionGroup/MainActions/ActionNode/ActionNode.d.ts +9 -0
- package/node/components/ActionGroup/MainActions/ActionNode/ActionNode.js +34 -0
- package/node/components/ActionGroup/MainActions/ActionNode/index.d.ts +1 -0
- package/node/components/ActionGroup/MainActions/ActionNode/index.js +17 -0
- package/node/components/ActionGroup/MainActions/MainActions.d.ts +1 -1
- package/node/components/ActionGroup/MainActions/MainActions.js +3 -14
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.d.ts +352 -3
- package/node/components/ActionGroup/MainActions/hooks/useMainActions/useMainActions.js +33 -6
- package/node/components/ActionGroup/MainActions/index.d.ts +1 -0
- package/node/components/ActionGroup/MainActions/index.js +1 -0
- package/node/components/ActionGroup/MainActions/styles.d.ts +5 -6
- package/node/components/ActionGroup/MainActions/styles.js +7 -8
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.d.ts +12 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/ActionNode.js +34 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.d.ts +1 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/ActionNode/index.js +17 -0
- package/node/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/node/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -7
- package/node/components/ActionGroup/constants.d.ts +3 -0
- package/node/components/ActionGroup/constants.js +7 -0
- package/node/components/ActionGroup/index.d.ts +2 -1
- package/node/components/ActionGroup/index.js +3 -1
- package/node/components/ActionGroup/public.d.ts +2 -1
- package/node/components/ActionGroup/public.js +3 -1
- package/node/components/ActionGroup/styles.js +5 -0
- package/node/components/ActionGroup/types.d.ts +48 -6
- package/node/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
- package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +6 -3
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.js +3 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +67 -3
- package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
- package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.js +21 -0
- package/node/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
- package/node/components/InfiniteTreeList/LevelHeader/constants.js +6 -0
- package/node/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/LevelHeader/index.js +18 -0
- package/node/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
- package/node/components/InfiniteTreeList/LevelHeader/styles.js +54 -0
- package/node/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
- package/node/components/InfiniteTreeList/LevelHeader/types.js +2 -0
- package/node/components/InfiniteTreeList/ListFooter/styles.js +8 -0
- package/node/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
- package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
- package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +14 -0
- package/node/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
- package/node/components/InfiniteTreeList/TreeItem/styles.js +19 -0
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
- package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +4 -3
- package/node/components/InfiniteTreeList/constants.d.ts +21 -0
- package/node/components/InfiniteTreeList/constants.js +22 -1
- package/node/components/InfiniteTreeList/hooks/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/index.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +52 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +19 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +46 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +31 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +43 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
- package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +190 -26
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +10 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +17 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +17 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +18 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +2 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
- package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +22 -0
- package/node/components/InfiniteTreeList/styles.d.ts +5 -0
- package/node/components/InfiniteTreeList/styles.js +44 -0
- package/node/components/InfiniteTreeList/types.d.ts +4 -0
- package/node/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
- package/node/components/InfiniteTreeList/useLogic/useLogic.js +162 -24
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +8 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +9 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/checkHasNested/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
- package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
- package/node/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
- package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +9 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
- package/node/components/InfiniteTreeList/utils/getLevelKey/index.js +17 -0
- package/node/components/InfiniteTreeList/utils/index.d.ts +3 -0
- package/node/components/InfiniteTreeList/utils/index.js +3 -0
- package/node/components/PageHeader/MobilePageActions/MobilePageActions.js +2 -2
- package/node/components/PageHeader/MobilePageActions/useLogic/useLogic.d.ts +1 -0
- package/node/components/PageHeader/MobilePageActions/useLogic/useLogic.js +3 -0
- package/node/components/PageHeader/PageActions/MainActions/MainActions.d.ts +1 -1
- package/node/components/PageHeader/PageActions/MainActions/MainActions.js +2 -2
- package/node/components/PageHeader/PageActions/MainActions/styles.js +5 -0
- package/node/components/PageHeader/PageActions/PageActions.js +2 -2
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.d.ts +1 -1
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/SecondaryVisibleActions.js +3 -3
- package/node/components/PageHeader/PageActions/SecondaryVisibleActions/styles.d.ts +7 -1
- package/node/components/PageHeader/PageActions/useLogic/useLogic.d.ts +1 -0
- package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -0
- package/node/components/index.d.ts +1 -1
- package/node/components/useScrollManagement/useScrollManagement.js +6 -5
- package/package.json +1 -1
|
@@ -1,9 +1,51 @@
|
|
|
1
|
-
import type { ComponentProps, ElementType, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, ElementType, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { ButtonProps, ButtonSize } from '../Button';
|
|
3
3
|
import type { DropdownButtonProps } from '../DropdownButton';
|
|
4
4
|
import type { ListItemButtonProps } from '../ListItemButton';
|
|
5
5
|
import type { MenuItemProps } from '../MenuItem';
|
|
6
6
|
import type { TooltipProps } from '../Tooltip';
|
|
7
|
+
/** Свойства стандартного элемента действия, из которых продукт может собрать собственный элемент в `renderAction` */
|
|
8
|
+
export type ActionElementProps = {
|
|
9
|
+
/** Содержимое действия: название */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Признак блокировки действия */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Признак загрузки действия */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** Обработчик нажатия на действие */
|
|
16
|
+
onClick?: ButtonProps['onClick'];
|
|
17
|
+
/** Размер, совпадающий с размером группы действий */
|
|
18
|
+
size: ButtonSize;
|
|
19
|
+
/** Класс, отвечающий за поведение действия в ряду группы */
|
|
20
|
+
className: string;
|
|
21
|
+
};
|
|
22
|
+
/** Контекст renderAction */
|
|
23
|
+
export type ActionRenderContext = {
|
|
24
|
+
/** Стандартный элемент действия */
|
|
25
|
+
defaultElement: ReactElement;
|
|
26
|
+
/** Свойства действия */
|
|
27
|
+
elementProps: ActionElementProps;
|
|
28
|
+
/** DOM-узел действия */
|
|
29
|
+
anchorEl: HTMLElement | null;
|
|
30
|
+
};
|
|
31
|
+
/** Контекст renderAction у действия с выпадающим списком */
|
|
32
|
+
export type NestedActionRenderContext = Pick<ActionRenderContext, 'defaultElement'>;
|
|
33
|
+
type WithRenderAction<TContext = ActionRenderContext> = {
|
|
34
|
+
/**
|
|
35
|
+
* Подменяет отображение действия: стандартный элемент можно обернуть
|
|
36
|
+
* или собрать заново из `elementProps`
|
|
37
|
+
*/
|
|
38
|
+
renderAction?: (context: TContext) => ReactNode;
|
|
39
|
+
};
|
|
40
|
+
type WithRenderActionDisabled = {
|
|
41
|
+
/**
|
|
42
|
+
* Отключает вызов `renderAction` — для копии действий, скрытой через css:
|
|
43
|
+
* попап из подмены открывается в портале, и css его не прячет
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
isRenderActionDisabled?: boolean;
|
|
48
|
+
};
|
|
7
49
|
type NestedAction = MenuItemProps & {
|
|
8
50
|
/** Название действия */
|
|
9
51
|
text: string;
|
|
@@ -33,7 +75,7 @@ export type SingleAction<TMainActionComponent extends ElementType> = Omit<Button
|
|
|
33
75
|
* Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонент
|
|
34
76
|
*/
|
|
35
77
|
component?: TMainActionComponent;
|
|
36
|
-
} & Omit<ComponentProps<ElementType extends TMainActionComponent ? 'button' : TMainActionComponent>, ''>;
|
|
78
|
+
} & WithRenderAction & Omit<ComponentProps<ElementType extends TMainActionComponent ? 'button' : TMainActionComponent>, ''>;
|
|
37
79
|
export type MultipleAction<TMainActionComponent extends ElementType> = Omit<DropdownButtonProps, 'children' | 'name' | 'component'> & {
|
|
38
80
|
/**
|
|
39
81
|
* Флаг показа выпадающего списка при клике
|
|
@@ -63,7 +105,7 @@ export type MultipleAction<TMainActionComponent extends ElementType> = Omit<Drop
|
|
|
63
105
|
* Компонент, используемый для корневого узла. Либо строка для использования элемента HTML, либо компонент
|
|
64
106
|
*/
|
|
65
107
|
component?: TMainActionComponent;
|
|
66
|
-
} & Omit<ComponentProps<ElementType extends TMainActionComponent ? 'button' : TMainActionComponent>, ''>;
|
|
108
|
+
} & WithRenderAction<NestedActionRenderContext> & Omit<ComponentProps<ElementType extends TMainActionComponent ? 'button' : TMainActionComponent>, ''>;
|
|
67
109
|
/** Модель основного экшена */
|
|
68
110
|
export type MainAction<TMainActionComponent extends ElementType> = SingleAction<TMainActionComponent> | MultipleAction<TMainActionComponent>;
|
|
69
111
|
export type MainActionsProps<TMainActionComponent extends ElementType> = {
|
|
@@ -73,7 +115,7 @@ export type MainActionsProps<TMainActionComponent extends ElementType> = {
|
|
|
73
115
|
*/
|
|
74
116
|
isDisabled?: boolean;
|
|
75
117
|
size?: ButtonSize;
|
|
76
|
-
};
|
|
118
|
+
} & WithRenderActionDisabled;
|
|
77
119
|
/** Модель второстепенного экшена */
|
|
78
120
|
export type SecondaryAction<TSecondaryActionComponent extends ElementType> = Omit<ListItemButtonProps, 'children' | 'component'> & {
|
|
79
121
|
/**
|
|
@@ -114,7 +156,7 @@ export type SecondaryVisibleAction = Omit<ButtonProps, 'children'> & {
|
|
|
114
156
|
* Если true, блокирует взаимодействие с actions
|
|
115
157
|
*/
|
|
116
158
|
isBlockingOperation?: boolean;
|
|
117
|
-
};
|
|
159
|
+
} & WithRenderAction;
|
|
118
160
|
export type SecondaryVisibleActionProps = {
|
|
119
161
|
/**
|
|
120
162
|
* Видимые второстепенные действия
|
|
@@ -125,7 +167,7 @@ export type SecondaryVisibleActionProps = {
|
|
|
125
167
|
*/
|
|
126
168
|
className?: string;
|
|
127
169
|
size?: ButtonSize;
|
|
128
|
-
};
|
|
170
|
+
} & WithRenderActionDisabled;
|
|
129
171
|
export type ActionGroupProps<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = {
|
|
130
172
|
/**
|
|
131
173
|
* Основные действия
|
|
@@ -2,14 +2,28 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// cspell:ignore Виртуализированное
|
|
3
3
|
import { Virtuoso } from 'react-virtuoso';
|
|
4
4
|
import { ContentState } from '../ContentState';
|
|
5
|
+
import { selfContainedClassname } from '../constants';
|
|
6
|
+
import { cva } from '../utils/cva';
|
|
7
|
+
import { infiniteTreeListClassnames } from './constants';
|
|
5
8
|
import { InfiniteTreeListContextProvider, } from './InfiniteTreeListContext';
|
|
9
|
+
import { LevelHeader } from './LevelHeader';
|
|
6
10
|
import { ListFooter } from './ListFooter';
|
|
7
11
|
import { NoDataPlaceholder } from './NoDataPlaceholder';
|
|
8
12
|
import { OnTopButton } from './OnTopButton';
|
|
9
13
|
import { ParentItems } from './ParentItems';
|
|
14
|
+
import { InfiniteTreeListWrapper } from './styles';
|
|
10
15
|
import { TreeItem } from './TreeItem';
|
|
11
16
|
import { useLogic } from './useLogic';
|
|
12
17
|
const computeItemKey = (_, item) => item.id;
|
|
18
|
+
const rootCva = cva([selfContainedClassname, infiniteTreeListClassnames.root], {
|
|
19
|
+
variants: {
|
|
20
|
+
state: {
|
|
21
|
+
loading: infiniteTreeListClassnames.loading,
|
|
22
|
+
error: infiniteTreeListClassnames.error,
|
|
23
|
+
noData: infiniteTreeListClassnames.noData,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
13
27
|
/**
|
|
14
28
|
* Виртуализированное дерево с бесконечной подгрузкой
|
|
15
29
|
*
|
|
@@ -29,6 +43,6 @@ const computeItemKey = (_, item) => item.id;
|
|
|
29
43
|
* />
|
|
30
44
|
*/
|
|
31
45
|
export const InfiniteTreeList = (props) => {
|
|
32
|
-
const {
|
|
33
|
-
return (_jsxs(InfiniteTreeListContextProvider, { itemSkeleton: itemSkeleton, nodePaginationMap: nodePaginationMap, registerChildren: registerChildren, notifyExpand: notifyExpand, onListRetry: onRetry, enterAnimation: enterAnimation, tailRegistry: tailRegistry, renderItem: renderItem, renderParent: renderParent, onToggle: onToggle, acquireParentSlot: acquireParentSlot, children: [_jsx(ParentItems, { parents: parentItems }), _jsx(ContentState, { ...contentStateProps, children:
|
|
46
|
+
const { displayedList, levelKey, lastRowId, levelHeaderProps, onToggle, contentStateProps, isNoData, state, scrollParent, listRef, virtuosoProps, footerContext, onTopButtonProps, renderItem, renderParent, itemSkeleton, onRetry, noDataImgSrc, enterAnimation, tailRegistry, nodePaginationMap, registerChildren, notifyExpand, parentItems, acquireParentSlot, } = useLogic(props);
|
|
47
|
+
return (_jsx(InfiniteTreeListWrapper, { ref: listRef, className: rootCva({ state }), children: _jsxs(InfiniteTreeListContextProvider, { itemSkeleton: itemSkeleton, nodePaginationMap: nodePaginationMap, registerChildren: registerChildren, notifyExpand: notifyExpand, onListRetry: onRetry, enterAnimation: enterAnimation, tailRegistry: tailRegistry, renderItem: renderItem, renderParent: renderParent, onToggle: onToggle, acquireParentSlot: acquireParentSlot, lastRowId: lastRowId, children: [_jsx(ParentItems, { parents: parentItems }), levelHeaderProps && _jsx(LevelHeader, { ...levelHeaderProps }), _jsxs(ContentState, { ...contentStateProps, children: [isNoData && _jsx(NoDataPlaceholder, { noDataImgSrc: noDataImgSrc }), !isNoData && scrollParent && (_jsxs(_Fragment, { children: [_jsx(Virtuoso, { ...virtuosoProps, data: displayedList, customScrollParent: scrollParent, computeItemKey: computeItemKey, context: footerContext, components: { Item: TreeItem, Footer: ListFooter } }, levelKey), _jsx(OnTopButton, { ...onTopButtonProps })] }))] })] }) }));
|
|
34
48
|
};
|
|
@@ -84,5 +84,9 @@ export type InfiniteTreeListContextProps = {
|
|
|
84
84
|
* виртуализации, а её контейнер переносится в строку скролла
|
|
85
85
|
*/
|
|
86
86
|
acquireParentSlot: (itemId: string) => HTMLDivElement | null;
|
|
87
|
+
/**
|
|
88
|
+
* Id последней строки данных
|
|
89
|
+
*/
|
|
90
|
+
lastRowId?: string;
|
|
87
91
|
};
|
|
88
92
|
export declare const InfiniteTreeListContext: import("react").Context<InfiniteTreeListContextProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type InfiniteTreeListContextProps } from '../InfiniteTreeListContext';
|
|
3
|
-
type Props = Pick<InfiniteTreeListContextProps, 'itemSkeleton' | 'nodePaginationMap' | 'enterAnimation' | 'tailRegistry' | 'registerChildren' | 'notifyExpand' | 'renderItem' | 'renderParent' | 'onToggle' | 'acquireParentSlot'> & {
|
|
3
|
+
type Props = Pick<InfiniteTreeListContextProps, 'itemSkeleton' | 'nodePaginationMap' | 'enterAnimation' | 'tailRegistry' | 'registerChildren' | 'notifyExpand' | 'renderItem' | 'renderParent' | 'onToggle' | 'acquireParentSlot' | 'lastRowId'> & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
onListRetry: () => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const InfiniteTreeListContextProvider: ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const InfiniteTreeListContextProvider: ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, lastRowId, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { InfiniteTreeListContext, } from '../InfiniteTreeListContext';
|
|
4
|
-
export const InfiniteTreeListContextProvider = ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, }) => {
|
|
4
|
+
export const InfiniteTreeListContextProvider = ({ children, itemSkeleton, nodePaginationMap, onListRetry, registerChildren, notifyExpand, enterAnimation, tailRegistry, renderItem, renderParent, onToggle, acquireParentSlot, lastRowId, }) => {
|
|
5
5
|
const [disabledIdList, setDisabledIdList] = useState(new Set());
|
|
6
6
|
const childrenCallbacksRef = useRef({});
|
|
7
7
|
const setDisabled = useCallback((itemId, disabled) => {
|
|
@@ -51,6 +51,7 @@ export const InfiniteTreeListContextProvider = ({ children, itemSkeleton, nodePa
|
|
|
51
51
|
enterAnimation,
|
|
52
52
|
tailRegistry,
|
|
53
53
|
acquireParentSlot,
|
|
54
|
+
lastRowId,
|
|
54
55
|
}), [
|
|
55
56
|
renderItem,
|
|
56
57
|
renderParent,
|
|
@@ -67,6 +68,7 @@ export const InfiniteTreeListContextProvider = ({ children, itemSkeleton, nodePa
|
|
|
67
68
|
enterAnimation,
|
|
68
69
|
tailRegistry,
|
|
69
70
|
acquireParentSlot,
|
|
71
|
+
lastRowId,
|
|
70
72
|
]);
|
|
71
73
|
return (_jsx(InfiniteTreeListContext.Provider, { value: value, children: children }));
|
|
72
74
|
};
|
|
@@ -5,4 +5,12 @@ export const Wrapper = styled.div `
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
|
|
7
7
|
padding: ${({ theme }) => theme.spacing(0, 4)};
|
|
8
|
+
|
|
9
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: ${({ theme }) => theme.microSpacing(9)};
|
|
12
|
+
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding: ${({ theme }) => theme.microSpacing(11, 0, 10)};
|
|
15
|
+
}
|
|
8
16
|
`;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Chevron } from '../../Chevron';
|
|
3
2
|
import { ContentState } from '../../ContentState';
|
|
4
3
|
import { Loader } from '../../Loader';
|
|
5
4
|
import { Tooltip } from '../../Tooltip';
|
|
@@ -8,7 +7,7 @@ import { cva } from '../../utils/cva';
|
|
|
8
7
|
import { getInertProps } from '../../utils/getInertProps';
|
|
9
8
|
import { infiniteTreeListItemClassnames } from './constants';
|
|
10
9
|
import { ErrorPlaceholder } from './ErrorPlaceholder';
|
|
11
|
-
import { ActionsWrapper, LoaderWrapper, Wrapper } from './styles';
|
|
10
|
+
import { ActionsWrapper, Content, LoaderWrapper, NestedIndicator, StyledChevron, Wrapper, } from './styles';
|
|
12
11
|
import { useLogic } from './useLogic';
|
|
13
12
|
const infiniteTreeListItemCva = cva(infiniteTreeListItemClassnames.root, {
|
|
14
13
|
variants: {
|
|
@@ -21,6 +20,9 @@ const infiniteTreeListItemCva = cva(infiniteTreeListItemClassnames.root, {
|
|
|
21
20
|
hasNested: {
|
|
22
21
|
true: infiniteTreeListItemClassnames.hasNested,
|
|
23
22
|
},
|
|
23
|
+
hasActions: {
|
|
24
|
+
true: infiniteTreeListItemClassnames.hasActions,
|
|
25
|
+
},
|
|
24
26
|
},
|
|
25
27
|
});
|
|
26
28
|
export const InfiniteTreeListItem = (props) => {
|
|
@@ -29,9 +31,10 @@ export const InfiniteTreeListItem = (props) => {
|
|
|
29
31
|
if (isRowError) {
|
|
30
32
|
return _jsx(ErrorPlaceholder, { onRetry: onRetry, errorMsg: errorMsg });
|
|
31
33
|
}
|
|
32
|
-
return (_jsx(ContentState, { isLoading: isRowLoading, isSmoothLoading: false, loadingContent: _jsx(Wrapper, { className: infiniteTreeListItemCva({ isLoading: true }), children: itemSkeleton || (_jsx(LoaderWrapper, { children: _jsx(Loader, {}) })) }), children: _jsx(Tooltip, { ...tooltipProps, children: _jsxs(Wrapper, { onClick: handleClick, className: cn(infiniteTreeListItemCva({
|
|
34
|
+
return (_jsx(ContentState, { isLoading: isRowLoading, isSmoothLoading: false, loadingContent: _jsx(Wrapper, { className: infiniteTreeListItemCva({ isLoading: true }), children: _jsx(Content, { children: itemSkeleton || (_jsx(LoaderWrapper, { children: _jsx(Loader, {}) })) }) }), children: _jsx(Tooltip, { ...tooltipProps, children: _jsxs(Wrapper, { onClick: handleClick, className: cn(infiniteTreeListItemCva({
|
|
33
35
|
isDisabled: Boolean(isDisabled || isDisabledByActions),
|
|
34
36
|
isLoading: isRowLoading,
|
|
35
37
|
hasNested: item.meta.hasNested,
|
|
36
|
-
|
|
38
|
+
hasActions: Boolean(actions),
|
|
39
|
+
}), className), ...getInertProps(isDisabled || isDisabledByActions), children: [item.meta.hasNested && (_jsx(NestedIndicator, { children: _jsx(StyledChevron, { isActive: isChevronActive }) })), _jsx(Content, { className: infiniteTreeListItemClassnames.content, children: children }), actions && _jsx(ActionsWrapper, { children: actions })] }, `infinite-tree-list-item-${item.id}`) }) }));
|
|
37
40
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { createUIKitClassname } from '../../utils/createUIKitClassname';
|
|
2
2
|
export const infiniteTreeListItemClassnames = {
|
|
3
3
|
root: createUIKitClassname('infinite-tree-list__item'),
|
|
4
|
+
content: createUIKitClassname('infinite-tree-list__item-content'),
|
|
4
5
|
disabled: createUIKitClassname('infinite-tree-list__item_disabled'),
|
|
5
6
|
loading: createUIKitClassname('infinite-tree-list__item_loading'),
|
|
6
7
|
hasNested: createUIKitClassname('infinite-tree-list__item_has-nested'),
|
|
8
|
+
hasActions: createUIKitClassname('infinite-tree-list__item_has-actions'),
|
|
7
9
|
};
|
|
@@ -3,6 +3,20 @@ export declare const Wrapper: import("../../styled").StyledComponent<{
|
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const Content: import("../../styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const NestedIndicator: import("../../styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
+
export declare const StyledChevron: import("../../styled").StyledComponent<{
|
|
15
|
+
isActive?: boolean | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
} & Omit<import("../..").WithoutEmotionSpecific<import("../..").SvgIconProps>, "classes" | "children" | "ref"> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
6
20
|
export declare const ActionsWrapper: import("../../styled").StyledComponent<{
|
|
7
21
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
22
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { Chevron } from '../../Chevron';
|
|
1
2
|
import { HOVER_MEDIA } from '../../constants';
|
|
2
3
|
import { styled } from '../../styled';
|
|
3
4
|
import { infiniteTreeListItemClassnames } from './constants';
|
|
4
5
|
export const Wrapper = styled.div `
|
|
5
6
|
cursor: default;
|
|
6
7
|
|
|
7
|
-
display:
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 1fr;
|
|
8
10
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
9
11
|
align-items: center;
|
|
10
12
|
|
|
@@ -25,8 +27,18 @@ export const Wrapper = styled.div `
|
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
&.${infiniteTreeListItemClassnames.hasActions} {
|
|
31
|
+
grid-template-columns: 1fr auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
&.${infiniteTreeListItemClassnames.hasNested} {
|
|
29
35
|
cursor: pointer;
|
|
36
|
+
|
|
37
|
+
grid-template-columns: auto 1fr;
|
|
38
|
+
|
|
39
|
+
&.${infiniteTreeListItemClassnames.hasActions} {
|
|
40
|
+
grid-template-columns: auto 1fr auto;
|
|
41
|
+
}
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
&.${infiniteTreeListItemClassnames.loading} {
|
|
@@ -43,11 +55,63 @@ export const Wrapper = styled.div `
|
|
|
43
55
|
&.${infiniteTreeListItemClassnames.disabled}:hover {
|
|
44
56
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
45
57
|
}
|
|
58
|
+
|
|
59
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
60
|
+
grid-template-columns: 1fr;
|
|
61
|
+
row-gap: ${({ theme }) => theme.spacing(4)};
|
|
62
|
+
|
|
63
|
+
padding: ${({ theme }) => theme.spacing(5, 4)};
|
|
64
|
+
|
|
65
|
+
&.${infiniteTreeListItemClassnames.hasNested} {
|
|
66
|
+
grid-template-columns: 1fr auto;
|
|
67
|
+
|
|
68
|
+
&.${infiniteTreeListItemClassnames.hasActions} {
|
|
69
|
+
grid-template-columns: 1fr auto;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
export const Content = styled.div `
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
77
|
+
align-items: center;
|
|
78
|
+
|
|
79
|
+
min-width: 0;
|
|
80
|
+
|
|
81
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
82
|
+
grid-column: 1;
|
|
83
|
+
grid-row: 1;
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
export const NestedIndicator = styled.div `
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
|
|
90
|
+
min-height: ${({ theme }) => theme.typography.body1.lineHeight};
|
|
91
|
+
|
|
92
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
93
|
+
grid-column: 2;
|
|
94
|
+
grid-row: 1;
|
|
95
|
+
align-self: center;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
export const StyledChevron = styled(Chevron) `
|
|
99
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
100
|
+
transform: rotateZ(270deg);
|
|
101
|
+
|
|
102
|
+
width: 24px;
|
|
103
|
+
height: 24px;
|
|
104
|
+
|
|
105
|
+
transition: none;
|
|
106
|
+
}
|
|
46
107
|
`;
|
|
47
108
|
export const ActionsWrapper = styled.div `
|
|
48
109
|
display: flex;
|
|
49
110
|
|
|
50
|
-
|
|
111
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
112
|
+
grid-column: 1 / -1;
|
|
113
|
+
grid-row: 2;
|
|
114
|
+
}
|
|
51
115
|
`;
|
|
52
116
|
export const LoaderWrapper = styled.div `
|
|
53
117
|
display: flex;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLOutlineMd } from '../../../icons/ChevronLOutlineMd';
|
|
3
|
+
import { cva } from '../../utils/cva';
|
|
4
|
+
import { infiniteTreeListClassnames } from '../constants';
|
|
5
|
+
import { LEVEL_BACK_TITLE } from './constants';
|
|
6
|
+
import { BackButton, Title, Wrapper } from './styles';
|
|
7
|
+
const wrapperCva = cva(infiniteTreeListClassnames.levelHeader, {
|
|
8
|
+
variants: {
|
|
9
|
+
hasBackButton: {
|
|
10
|
+
true: infiniteTreeListClassnames.levelHeaderWithBackButton,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Шапка отображаемого уровня на мобильной ширине
|
|
16
|
+
*/
|
|
17
|
+
export const LevelHeader = ({ title = LEVEL_BACK_TITLE, hasBackButton, onBack, }) => (_jsxs(Wrapper, { className: wrapperCva({ hasBackButton }), children: [hasBackButton && (_jsx(BackButton, { className: infiniteTreeListClassnames.levelHeaderBackButton, variant: "text", "aria-label": LEVEL_BACK_TITLE, onClick: onBack, children: _jsx(ChevronLOutlineMd, {}) })), _jsx(Title, { rowsCount: 2, children: title })] }));
|