@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,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { pageLayoutClassnames } from '../PageLayoutContainer';
|
|
3
3
|
import { useViewportType } from '../useViewportType';
|
|
4
4
|
/**
|
|
@@ -23,13 +23,14 @@ export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, virtu
|
|
|
23
23
|
if (scrollRef?.current?.parentElement) {
|
|
24
24
|
scrollRef.current.parentElement.style.position = 'relative';
|
|
25
25
|
}
|
|
26
|
-
}, [scrollRef]);
|
|
27
|
-
const recalculateVerticalScroll = () => {
|
|
26
|
+
}, [scrollRef, isMobile]);
|
|
27
|
+
const recalculateVerticalScroll = useCallback(() => {
|
|
28
28
|
const list = document.getElementById(virtuosoId);
|
|
29
|
-
if (
|
|
30
|
-
|
|
29
|
+
if (!scrollParent || !list) {
|
|
30
|
+
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
setHasVerticalScroll(list.clientHeight > scrollParent.clientHeight);
|
|
33
|
+
}, [scrollParent, virtuosoId]);
|
|
33
34
|
const handleEndReach = () => {
|
|
34
35
|
if (!isEndReached && onLoadMore) {
|
|
35
36
|
onLoadMore();
|
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActionCellBase = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cva_1 = require("../utils/cva");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
5
7
|
const MainAction_1 = require("./MainAction");
|
|
6
8
|
const SecondaryAction_1 = require("./SecondaryAction");
|
|
7
9
|
const styles_1 = require("./styles");
|
|
10
|
+
const actionCellCva = (0, cva_1.cva)(constants_1.actionCellBaseClassnames.root, {
|
|
11
|
+
variants: {
|
|
12
|
+
hasMainActions: {
|
|
13
|
+
true: constants_1.actionCellBaseClassnames.hasMainActions,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
8
17
|
const ActionCellBase = ({ actions, isDisabledAction, handleWrapperClick, handleActionClick, }) => {
|
|
9
18
|
const { main, secondary } = actions;
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { onClick: handleWrapperClick, children: [main.map((action) => {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { onClick: handleWrapperClick, className: actionCellCva({ hasMainActions: Boolean(main.length) }), children: [main.map((action) => {
|
|
11
20
|
return ((0, jsx_runtime_1.jsx)(MainAction_1.MainAction, { action: action, onActionClick: handleActionClick, isDisabled: isDisabledAction }, action.name));
|
|
12
21
|
}), secondary && ((0, jsx_runtime_1.jsx)(SecondaryAction_1.SecondaryActions, { actions: secondary, onActionClick: handleActionClick, isDisabled: isDisabledAction }))] }));
|
|
13
22
|
};
|
|
@@ -6,12 +6,18 @@ const react_1 = require("react");
|
|
|
6
6
|
const IconDropdownButton_1 = require("../../IconDropdownButton");
|
|
7
7
|
const MenuItem_1 = require("../../MenuItem");
|
|
8
8
|
const Tooltip_1 = require("../../Tooltip");
|
|
9
|
+
const useViewportType_1 = require("../../useViewportType");
|
|
9
10
|
const MainIconButton_1 = require("./MainIconButton");
|
|
11
|
+
const MobileMainButton_1 = require("./MobileMainButton");
|
|
10
12
|
const MainAction = ({ action, onActionClick, isDisabled, }) => {
|
|
13
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
11
14
|
if ('actions' in action) {
|
|
12
15
|
const { disabled, icon, name, disabledReason, actions } = action;
|
|
13
16
|
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: disabledReason || name, withoutContainer: !disabled, placement: "top", children: (0, jsx_runtime_1.jsx)(IconDropdownButton_1.IconDropdownButton, { icon: icon, variant: "text", disabled: isDisabled || disabled, children: actions.map(({ name: nestedActionName, onClick: onClickNested, ...props }) => ((0, react_1.createElement)(MenuItem_1.MenuItem, { ...props, key: nestedActionName, onClick: onActionClick(onClickNested) }, nestedActionName))) }) }, name));
|
|
14
17
|
}
|
|
18
|
+
if (isMobile && action.isMobilePrimary) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(MobileMainButton_1.MobileMainButton, { action: action, onActionClick: onActionClick, isDisabled: isDisabled }));
|
|
20
|
+
}
|
|
15
21
|
return ((0, jsx_runtime_1.jsx)(MainIconButton_1.MainIconButton, { action: action, onActionClick: onActionClick, isDisabled: isDisabled }));
|
|
16
22
|
};
|
|
17
23
|
exports.MainAction = MainAction;
|
|
@@ -3,15 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MainIconButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ConfirmAction_1 = require("../../../ConfirmAction");
|
|
6
|
-
const IconButton_1 = require("../../../IconButton");
|
|
7
6
|
const Tooltip_1 = require("../../../Tooltip");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const styles_1 = require("./styles");
|
|
8
9
|
const useLogic_1 = require("./useLogic");
|
|
9
10
|
const MainIconButton = (props) => {
|
|
10
11
|
const { tooltipProps } = (0, useLogic_1.useLogic)(props);
|
|
11
12
|
const { action, onActionClick, isDisabled } = props;
|
|
12
|
-
const { name, icon, needConfirm, confirmText, confirmButtonProps, disabledReason, disabled, loading, isBlockingOperation, loadingNote, onClick, ...actions } = action;
|
|
13
|
-
const renderButton = (renderProps) => ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { withoutContainer: !disabled, placement: "top", ...tooltipProps, children: (0, jsx_runtime_1.jsx)(
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: needConfirm ? ((0, jsx_runtime_1.jsx)(ConfirmAction_1.ConfirmAction, { text: confirmText, confirmButtonProps: confirmButtonProps,
|
|
13
|
+
const { name, icon, needConfirm, confirmText, confirmMobileTitle, confirmButtonProps, disabledReason, disabled, loading, isBlockingOperation, loadingNote, onClick, isMobilePrimary, mobileProps, ...actions } = action;
|
|
14
|
+
const renderButton = (renderProps) => ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { withoutContainer: !disabled, placement: "top", ...tooltipProps, children: (0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { disabled: isDisabled || disabled, loading: loading, ...actions, variant: "text", ...renderProps, className: constants_1.mainIconButtonClassnames.root, children: icon }) }, name));
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: needConfirm ? ((0, jsx_runtime_1.jsx)(ConfirmAction_1.ConfirmAction, { text: confirmText, confirmButtonProps: confirmButtonProps, popoverProps: {
|
|
16
|
+
title: confirmMobileTitle,
|
|
17
|
+
}, actionComponent: (renderProps) => renderButton(renderProps), onConfirm: onActionClick(onClick) })) : (renderButton({
|
|
15
18
|
onClick: onActionClick(onClick),
|
|
16
19
|
})) }));
|
|
17
20
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mainIconButtonClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../../utils/createUIKitClassname");
|
|
5
|
+
exports.mainIconButtonClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('action-cell-base__main-icon-button'),
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledIconButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
3
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
6
|
+
component?: import("react").ElementType | undefined;
|
|
7
|
+
selected?: boolean | undefined;
|
|
8
|
+
size?: "large" | "medium" | undefined;
|
|
9
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledIconButton = void 0;
|
|
4
|
+
const IconButton_1 = require("../../../IconButton");
|
|
5
|
+
const styled_1 = require("../../../styled");
|
|
6
|
+
exports.StyledIconButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
7
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
8
|
+
order: 2;
|
|
9
|
+
|
|
10
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type IconButtonProps } from '../../../IconButton';
|
|
2
|
+
import { type ActionHandler, type SingleAction } from '../../types';
|
|
3
|
+
export type MobileMainButtonProps<TAction> = {
|
|
4
|
+
action: IconButtonProps & SingleAction<TAction>;
|
|
5
|
+
/**
|
|
6
|
+
* Обработчик клика на действие
|
|
7
|
+
*/
|
|
8
|
+
onActionClick: ActionHandler<TAction>;
|
|
9
|
+
/**
|
|
10
|
+
* Если true, action не доступен
|
|
11
|
+
*/
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const MobileMainButton: <TAction>({ action, isDisabled, onActionClick, }: MobileMainButtonProps<TAction>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MobileMainButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ConfirmAction_1 = require("../../../ConfirmAction");
|
|
6
|
+
const styles_1 = require("./styles");
|
|
7
|
+
const MobileMainButton = ({ action, isDisabled, onActionClick, }) => {
|
|
8
|
+
const { mobileProps, name, icon, needConfirm, confirmText, confirmMobileTitle, confirmButtonProps, disabledReason, disabled, loading, isBlockingOperation, loadingNote, onClick, isMobilePrimary, ...actions } = action;
|
|
9
|
+
const text = mobileProps?.text ?? name;
|
|
10
|
+
const color = mobileProps?.color ?? 'primary';
|
|
11
|
+
const renderButton = (renderProps) => ((0, jsx_runtime_1.jsx)(styles_1.StyledButton, { disabled: isDisabled || disabled, loading: loading, color: color, ...actions, variant: "contained", ...renderProps, children: text }));
|
|
12
|
+
if (needConfirm) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(ConfirmAction_1.ConfirmAction, { text: confirmText, confirmButtonProps: confirmButtonProps, popoverProps: {
|
|
14
|
+
title: confirmMobileTitle,
|
|
15
|
+
}, actionComponent: (renderProps) => renderButton(renderProps), onConfirm: onActionClick(onClick) }));
|
|
16
|
+
}
|
|
17
|
+
return renderButton({
|
|
18
|
+
onClick: onActionClick(onClick),
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.MobileMainButton = MobileMainButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileMainButton';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MobileMainButton"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
3
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
6
|
+
component?: import("react").ElementType | undefined;
|
|
7
|
+
selected?: boolean | undefined;
|
|
8
|
+
size?: "large" | "medium" | undefined;
|
|
9
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledButton = void 0;
|
|
4
|
+
const Button_1 = require("../../../Button");
|
|
5
|
+
const styled_1 = require("../../../styled");
|
|
6
|
+
exports.StyledButton = (0, styled_1.styled)(Button_1.Button) `
|
|
7
|
+
order: 1;
|
|
8
|
+
|
|
9
|
+
width: 100%;
|
|
10
|
+
`;
|
|
@@ -4,10 +4,10 @@ exports.SecondaryActions = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const DotsVOutlineMd_1 = require("../../../icons/DotsVOutlineMd");
|
|
7
|
-
const IconDropdownButton_1 = require("../../IconDropdownButton");
|
|
8
7
|
const MenuItem_1 = require("../../MenuItem");
|
|
8
|
+
const styles_1 = require("./styles");
|
|
9
9
|
const SecondaryActions = ({ actions, onActionClick, isDisabled, }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledIconDropdownButton, { "aria-label": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F", title: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F", icon: (0, jsx_runtime_1.jsx)(DotsVOutlineMd_1.DotsVOutlineMd, {}), variant: "text", disabled: isDisabled, children: actions.map((action) => {
|
|
11
11
|
const { onClick, name } = action;
|
|
12
12
|
return ((0, react_1.createElement)(MenuItem_1.MenuItem, { ...action, key: name, tooltipPlacement: "left", onClick: onActionClick(onClick) }, name));
|
|
13
13
|
}) }));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledIconDropdownButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../IconDropdownButton").IconDropdownButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledIconDropdownButton = void 0;
|
|
4
|
+
const IconDropdownButton_1 = require("../../IconDropdownButton");
|
|
5
|
+
const styled_1 = require("../../styled");
|
|
6
|
+
exports.StyledIconDropdownButton = (0, styled_1.styled)(IconDropdownButton_1.IconDropdownButton) `
|
|
7
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
8
|
+
order: 3;
|
|
9
|
+
|
|
10
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.actionCellBaseClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
+
exports.actionCellBaseClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('action-cell-base'),
|
|
7
|
+
hasMainActions: (0, createUIKitClassname_1.createUIKitClassname)('action-cell-base_has-main-actions'),
|
|
8
|
+
};
|
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Wrapper = void 0;
|
|
4
4
|
const styled_1 = require("../styled");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
5
6
|
exports.Wrapper = styled_1.styled.div `
|
|
6
7
|
display: inline-flex;
|
|
7
8
|
align-items: center;
|
|
9
|
+
|
|
10
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
11
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
12
|
+
|
|
13
|
+
width: auto;
|
|
14
|
+
|
|
15
|
+
&.${constants_1.actionCellBaseClassnames.hasMainActions} {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
8
19
|
`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { type ButtonColor } from '../Button';
|
|
2
3
|
import { type ConfirmActionProps } from '../ConfirmAction';
|
|
3
4
|
import { type IconButtonProps } from '../IconButton';
|
|
4
5
|
import { type MenuItemProps } from '../MenuItem';
|
|
@@ -33,6 +34,10 @@ export type SingleAction<TAction> = {
|
|
|
33
34
|
* Поясняющий текст для подтверждения действия
|
|
34
35
|
*/
|
|
35
36
|
confirmText?: ConfirmActionProps['text'];
|
|
37
|
+
/**
|
|
38
|
+
* Заголовок подтверждения действия на мобильной ширине
|
|
39
|
+
*/
|
|
40
|
+
confirmMobileTitle?: string;
|
|
36
41
|
/**
|
|
37
42
|
* Параметры кнопки подтверждения действия
|
|
38
43
|
*/
|
|
@@ -49,6 +54,26 @@ export type SingleAction<TAction> = {
|
|
|
49
54
|
* Причина блокировки строки во время загрузки
|
|
50
55
|
*/
|
|
51
56
|
loadingNote?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Если `true`, на мобильной ширине действие отображается кнопкой с текстом,
|
|
59
|
+
* а не иконкой
|
|
60
|
+
*/
|
|
61
|
+
isMobilePrimary?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Параметры кнопки действия на мобильной ширине
|
|
64
|
+
*/
|
|
65
|
+
mobileProps?: {
|
|
66
|
+
/**
|
|
67
|
+
* Текст кнопки
|
|
68
|
+
* @default name
|
|
69
|
+
*/
|
|
70
|
+
text?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Цвет кнопки
|
|
73
|
+
* @default 'primary'
|
|
74
|
+
*/
|
|
75
|
+
color?: ButtonColor;
|
|
76
|
+
};
|
|
52
77
|
/**
|
|
53
78
|
* Обработчик действия
|
|
54
79
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import type { ProcessedMainAction } from '../hooks';
|
|
3
|
+
export type ActionNodeProps<TMainActionComponent extends ElementType> = ProcessedMainAction<TMainActionComponent> & {
|
|
4
|
+
isRenderActionDisabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Отображает одно основное действие: стандартный узел кита либо то, что вернул `renderAction`
|
|
8
|
+
*/
|
|
9
|
+
export declare const ActionNode: <TMainActionComponent extends ElementType>(props: ActionNodeProps<TMainActionComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionNode = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const DropdownButton_1 = require("../../../DropdownButton");
|
|
7
|
+
const MenuItem_1 = require("../../../MenuItem");
|
|
8
|
+
const Tooltip_1 = require("../../../Tooltip");
|
|
9
|
+
const styles_1 = require("../styles");
|
|
10
|
+
/**
|
|
11
|
+
* Отображает одно основное действие: стандартный узел кита либо то, что вернул `renderAction`
|
|
12
|
+
*/
|
|
13
|
+
const ActionNode = (props) => {
|
|
14
|
+
const { tooltipProps, renderAction, isRenderActionDisabled = false } = props;
|
|
15
|
+
const { key, ...restTooltipProps } = tooltipProps;
|
|
16
|
+
const isRenderActionCalled = !isRenderActionDisabled && Boolean(renderAction);
|
|
17
|
+
// Якорь в состоянии, а не в ref: мутация ref.current не вызывает обновление, и popover на первом кадре остался бы без якоря
|
|
18
|
+
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
19
|
+
// Лишний render при монтировании достаётся только действиям с renderAction.
|
|
20
|
+
const anchorRef = isRenderActionCalled && !props.isNested ? setAnchorEl : undefined;
|
|
21
|
+
const defaultElement = ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { ...restTooltipProps, ref: anchorRef, children: props.isNested ? ((0, jsx_runtime_1.jsx)(DropdownButton_1.DropdownButton, { ...props.buttonProps, children: props.nestedActions.map(({ key: nestedKey, text, ...nestedProps }) => ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, { ...nestedProps, children: text }, nestedKey))) })) : ((0, jsx_runtime_1.jsx)(styles_1.StyledButton, { ...props.buttonProps })) }));
|
|
22
|
+
if (isRenderActionDisabled || !props.renderAction) {
|
|
23
|
+
return defaultElement;
|
|
24
|
+
}
|
|
25
|
+
if (props.isNested) {
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.renderAction({ defaultElement }) });
|
|
27
|
+
}
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.renderAction({
|
|
29
|
+
defaultElement,
|
|
30
|
+
elementProps: props.elementProps,
|
|
31
|
+
anchorEl,
|
|
32
|
+
}) }));
|
|
33
|
+
};
|
|
34
|
+
exports.ActionNode = ActionNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionNode';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ActionNode"), exports);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
2
|
import type { MainActionsProps } from '../types';
|
|
3
|
-
export declare const MainActions: <TMainActionComponent extends ElementType = ElementType>({ actions, isDisabled, size, }: MainActionsProps<TMainActionComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const MainActions: <TMainActionComponent extends ElementType = ElementType>({ actions, isDisabled, size, isRenderActionDisabled, }: MainActionsProps<TMainActionComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,21 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MainActions = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
6
|
-
const MenuItem_1 = require("../../MenuItem");
|
|
7
|
-
const Tooltip_1 = require("../../Tooltip");
|
|
5
|
+
const ActionNode_1 = require("./ActionNode");
|
|
8
6
|
const hooks_1 = require("./hooks");
|
|
9
|
-
const
|
|
10
|
-
const MainActions = ({ actions, isDisabled, size, }) => {
|
|
7
|
+
const MainActions = ({ actions, isDisabled, size, isRenderActionDisabled = false, }) => {
|
|
11
8
|
const processedActions = (0, hooks_1.useMainActions)({ actions, size, isDisabled });
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: processedActions.map((
|
|
13
|
-
const { key: tooltipKey, ...restTooltipProps } = tooltipProps;
|
|
14
|
-
if (isNested) {
|
|
15
|
-
return ((0, react_1.createElement)(Tooltip_1.Tooltip, { ...restTooltipProps, key: tooltipKey },
|
|
16
|
-
(0, jsx_runtime_1.jsx)(styles_1.StyledDropdownButton, { ...buttonProps, children: nestedActions.map(({ key, text, ...nestedProps }) => ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, { ...nestedProps, children: text }, key))) })));
|
|
17
|
-
}
|
|
18
|
-
return ((0, react_1.createElement)(Tooltip_1.Tooltip, { ...restTooltipProps, key: tooltipKey },
|
|
19
|
-
(0, jsx_runtime_1.jsx)(styles_1.StyledButton, { ...buttonProps })));
|
|
20
|
-
}) }));
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: processedActions.map((action) => ((0, jsx_runtime_1.jsx)(ActionNode_1.ActionNode, { isRenderActionDisabled: isRenderActionDisabled, ...action }, action.tooltipProps.key))) }));
|
|
21
10
|
};
|
|
22
11
|
exports.MainActions = MainActions;
|