@astral/ui 4.13.0 → 4.14.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/CardGridInfinite/Card/Card.d.ts +3 -0
- package/components/CardGridInfinite/Card/Card.js +12 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContext.d.ts +10 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContext.js +8 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.d.ts +9 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.js +26 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts +1 -0
- package/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.js +1 -0
- package/components/CardGridInfinite/Card/CardActionContext/index.d.ts +2 -0
- package/components/CardGridInfinite/Card/CardActionContext/index.js +2 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts +7 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.js +21 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/index.d.ts +1 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/index.js +1 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/styles.d.ts +12 -0
- package/components/CardGridInfinite/Card/SecondaryActionButton/styles.js +5 -0
- package/components/CardGridInfinite/Card/index.d.ts +3 -0
- package/components/CardGridInfinite/Card/index.js +2 -0
- package/components/CardGridInfinite/Card/styles.d.ts +16 -0
- package/components/CardGridInfinite/Card/styles.js +22 -0
- package/components/CardGridInfinite/Card/types.d.ts +32 -0
- package/components/CardGridInfinite/Card/types.js +1 -0
- package/components/CardGridInfinite/Card/useLogic/index.d.ts +1 -0
- package/components/CardGridInfinite/Card/useLogic/index.js +1 -0
- package/components/CardGridInfinite/Card/useLogic/useLogic.d.ts +7 -0
- package/components/CardGridInfinite/Card/useLogic/useLogic.js +7 -0
- package/components/CardGridInfinite/CardGridInfinite.d.ts +3 -0
- package/components/CardGridInfinite/CardGridInfinite.js +21 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/Action.d.ts +3 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/Action.js +16 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/index.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/types.d.ts +13 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/types.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.d.ts +11 -0
- package/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.js +16 -0
- package/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.d.ts +30 -0
- package/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.js +29 -0
- package/components/CardGridInfinite/CardGridMainActions/index.d.ts +4 -0
- package/components/CardGridInfinite/CardGridMainActions/index.js +4 -0
- package/components/CardGridInfinite/CardGridMainActions/styles.d.ts +5 -0
- package/components/CardGridInfinite/CardGridMainActions/styles.js +9 -0
- package/components/CardGridInfinite/CardGridMainActions/types.d.ts +44 -0
- package/components/CardGridInfinite/CardGridMainActions/types.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/index.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js +1 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.d.ts +8 -0
- package/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.js +11 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.d.ts +18 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.js +34 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.d.ts +2 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.js +4 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.js +1 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.d.ts +9 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.js +31 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.d.ts +12 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.js +5 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.d.ts +8 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.js +5 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.d.ts +1 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.js +1 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.d.ts +2 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.js +2 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/index.d.ts +4 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/index.js +3 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/types.d.ts +59 -0
- package/components/CardGridInfinite/CardGridSecondaryAction/types.js +1 -0
- package/components/CardGridInfinite/EndData/EndData.d.ts +6 -0
- package/components/CardGridInfinite/EndData/EndData.js +4 -0
- package/components/CardGridInfinite/EndData/constants.d.ts +1 -0
- package/components/CardGridInfinite/EndData/constants.js +1 -0
- package/components/CardGridInfinite/EndData/index.d.ts +1 -0
- package/components/CardGridInfinite/EndData/index.js +1 -0
- package/components/CardGridInfinite/ErrorMessage/ErrorMessage.d.ts +6 -0
- package/components/CardGridInfinite/ErrorMessage/ErrorMessage.js +6 -0
- package/components/CardGridInfinite/ErrorMessage/constants.d.ts +1 -0
- package/components/CardGridInfinite/ErrorMessage/constants.js +1 -0
- package/components/CardGridInfinite/ErrorMessage/index.d.ts +1 -0
- package/components/CardGridInfinite/ErrorMessage/index.js +1 -0
- package/components/CardGridInfinite/ErrorMessage/styles.d.ts +5 -0
- package/components/CardGridInfinite/ErrorMessage/styles.js +17 -0
- package/components/CardGridInfinite/Footer/Footer.d.ts +10 -0
- package/components/CardGridInfinite/Footer/Footer.js +12 -0
- package/components/CardGridInfinite/Footer/index.d.ts +1 -0
- package/components/CardGridInfinite/Footer/index.js +1 -0
- package/components/CardGridInfinite/Footer/styles.d.ts +9 -0
- package/components/CardGridInfinite/Footer/styles.js +16 -0
- package/components/CardGridInfinite/List/List.d.ts +8 -0
- package/components/CardGridInfinite/List/List.js +4 -0
- package/components/CardGridInfinite/List/index.d.ts +1 -0
- package/components/CardGridInfinite/List/index.js +1 -0
- package/components/CardGridInfinite/List/styles.d.ts +10 -0
- package/components/CardGridInfinite/List/styles.js +10 -0
- package/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.d.ts +6 -0
- package/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.js +10 -0
- package/components/CardGridInfinite/NoDataPlaceholder/constants.d.ts +1 -0
- package/components/CardGridInfinite/NoDataPlaceholder/constants.js +1 -0
- package/components/CardGridInfinite/NoDataPlaceholder/index.d.ts +1 -0
- package/components/CardGridInfinite/NoDataPlaceholder/index.js +1 -0
- package/components/CardGridInfinite/OnTopButton/OnTopButton.d.ts +8 -0
- package/components/CardGridInfinite/OnTopButton/OnTopButton.js +10 -0
- package/components/CardGridInfinite/OnTopButton/index.d.ts +1 -0
- package/components/CardGridInfinite/OnTopButton/index.js +1 -0
- package/components/CardGridInfinite/OnTopButton/styles.d.ts +3 -0
- package/components/CardGridInfinite/OnTopButton/styles.js +9 -0
- package/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.d.ts +11 -0
- package/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.js +5 -0
- package/components/CardGridInfinite/SkeletonGrid/index.d.ts +1 -0
- package/components/CardGridInfinite/SkeletonGrid/index.js +1 -0
- package/components/CardGridInfinite/SkeletonGrid/styles.d.ts +12 -0
- package/components/CardGridInfinite/SkeletonGrid/styles.js +5 -0
- package/components/CardGridInfinite/constants.d.ts +7 -0
- package/components/CardGridInfinite/constants.js +8 -0
- package/components/CardGridInfinite/hooks/index.d.ts +1 -0
- package/components/CardGridInfinite/hooks/index.js +1 -0
- package/components/CardGridInfinite/hooks/useBlockingActions/index.d.ts +1 -0
- package/components/CardGridInfinite/hooks/useBlockingActions/index.js +1 -0
- package/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.d.ts +9 -0
- package/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.js +23 -0
- package/components/CardGridInfinite/index.d.ts +8 -0
- package/components/CardGridInfinite/index.js +4 -0
- package/components/CardGridInfinite/styles.d.ts +13 -0
- package/components/CardGridInfinite/styles.js +26 -0
- package/components/CardGridInfinite/types.d.ts +98 -0
- package/components/CardGridInfinite/types.js +1 -0
- package/components/CardGridInfinite/useLogic/index.d.ts +1 -0
- package/components/CardGridInfinite/useLogic/index.js +1 -0
- package/components/CardGridInfinite/useLogic/useLogic.d.ts +41 -0
- package/components/CardGridInfinite/useLogic/useLogic.js +73 -0
- package/components/DashboardLayout/Sidebar/styles.d.ts +1 -4
- package/components/DatePicker/styles.d.ts +1 -4
- package/components/DateRangePicker/styles.d.ts +1 -4
- package/components/Description/styles.js +1 -1
- package/components/InfiniteTreeList/useLogic/useLogic.js +2 -2
- package/components/PageLayout/PageContent/styles.js +5 -2
- package/components/PageLayout/PageLayoutContainer/index.d.ts +1 -0
- package/components/PageLayout/PageLayoutContainer/index.js +1 -0
- package/components/PageLayout/PageLayoutContainer/styles.d.ts +1 -4
- package/components/Paper/Paper.d.ts +1 -1
- package/components/Paper/Paper.js +4 -3
- package/components/Tag/styles.js +2 -0
- package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
- package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
- package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +2 -2
- package/components/hooks/index.d.ts +1 -0
- package/components/hooks/index.js +1 -0
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
- package/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
- package/components/placeholders/LoadingPlaceholder/constants.js +4 -0
- package/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
- package/components/placeholders/LoadingPlaceholder/index.js +1 -0
- package/node/components/CardGridInfinite/Card/Card.d.ts +3 -0
- package/node/components/CardGridInfinite/Card/Card.js +16 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.d.ts +10 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContext.js +11 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.d.ts +9 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/CardActionContextProvider.js +30 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts +1 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.js +17 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/index.d.ts +2 -0
- package/node/components/CardGridInfinite/Card/CardActionContext/index.js +18 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts +7 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.js +25 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.d.ts +1 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/index.js +17 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.d.ts +12 -0
- package/node/components/CardGridInfinite/Card/SecondaryActionButton/styles.js +8 -0
- package/node/components/CardGridInfinite/Card/index.d.ts +3 -0
- package/node/components/CardGridInfinite/Card/index.js +18 -0
- package/node/components/CardGridInfinite/Card/styles.d.ts +16 -0
- package/node/components/CardGridInfinite/Card/styles.js +25 -0
- package/node/components/CardGridInfinite/Card/types.d.ts +32 -0
- package/node/components/CardGridInfinite/Card/types.js +2 -0
- package/node/components/CardGridInfinite/Card/useLogic/index.d.ts +1 -0
- package/node/components/CardGridInfinite/Card/useLogic/index.js +17 -0
- package/node/components/CardGridInfinite/Card/useLogic/useLogic.d.ts +7 -0
- package/node/components/CardGridInfinite/Card/useLogic/useLogic.js +11 -0
- package/node/components/CardGridInfinite/CardGridInfinite.d.ts +3 -0
- package/node/components/CardGridInfinite/CardGridInfinite.js +25 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.d.ts +3 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/Action.js +20 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/index.js +17 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/types.d.ts +13 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/types.js +2 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/index.js +17 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.d.ts +11 -0
- package/node/components/CardGridInfinite/CardGridMainActions/Action/useLogic/useLogic.js +20 -0
- package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.d.ts +30 -0
- package/node/components/CardGridInfinite/CardGridMainActions/CardGridMainActions.js +33 -0
- package/node/components/CardGridInfinite/CardGridMainActions/index.d.ts +4 -0
- package/node/components/CardGridInfinite/CardGridMainActions/index.js +22 -0
- package/node/components/CardGridInfinite/CardGridMainActions/styles.d.ts +5 -0
- package/node/components/CardGridInfinite/CardGridMainActions/styles.js +12 -0
- package/node/components/CardGridInfinite/CardGridMainActions/types.d.ts +44 -0
- package/node/components/CardGridInfinite/CardGridMainActions/types.js +2 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/index.js +17 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js +17 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.d.ts +8 -0
- package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/replaceActionComponent.js +15 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.d.ts +18 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActions.js +38 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.d.ts +2 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/CardGridSecondaryActionsSkeleton.js +8 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/index.js +17 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.d.ts +9 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/CardGridSecondaryActionsSkeleton/styles.js +34 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.d.ts +12 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuContext.js +8 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.d.ts +8 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/SecondaryActionsMenuProvider.js +9 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.d.ts +1 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/SecondaryActionsMenuProvider/index.js +5 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.d.ts +2 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/SecondaryActionsMenuContext/index.js +18 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/index.d.ts +4 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/index.js +22 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/types.d.ts +59 -0
- package/node/components/CardGridInfinite/CardGridSecondaryAction/types.js +2 -0
- package/node/components/CardGridInfinite/EndData/EndData.d.ts +6 -0
- package/node/components/CardGridInfinite/EndData/EndData.js +8 -0
- package/node/components/CardGridInfinite/EndData/constants.d.ts +1 -0
- package/node/components/CardGridInfinite/EndData/constants.js +4 -0
- package/node/components/CardGridInfinite/EndData/index.d.ts +1 -0
- package/node/components/CardGridInfinite/EndData/index.js +17 -0
- package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.d.ts +6 -0
- package/node/components/CardGridInfinite/ErrorMessage/ErrorMessage.js +10 -0
- package/node/components/CardGridInfinite/ErrorMessage/constants.d.ts +1 -0
- package/node/components/CardGridInfinite/ErrorMessage/constants.js +4 -0
- package/node/components/CardGridInfinite/ErrorMessage/index.d.ts +1 -0
- package/node/components/CardGridInfinite/ErrorMessage/index.js +17 -0
- package/node/components/CardGridInfinite/ErrorMessage/styles.d.ts +5 -0
- package/node/components/CardGridInfinite/ErrorMessage/styles.js +20 -0
- package/node/components/CardGridInfinite/Footer/Footer.d.ts +10 -0
- package/node/components/CardGridInfinite/Footer/Footer.js +16 -0
- package/node/components/CardGridInfinite/Footer/index.d.ts +1 -0
- package/node/components/CardGridInfinite/Footer/index.js +17 -0
- package/node/components/CardGridInfinite/Footer/styles.d.ts +9 -0
- package/node/components/CardGridInfinite/Footer/styles.js +19 -0
- package/node/components/CardGridInfinite/List/List.d.ts +8 -0
- package/node/components/CardGridInfinite/List/List.js +7 -0
- package/node/components/CardGridInfinite/List/index.d.ts +1 -0
- package/node/components/CardGridInfinite/List/index.js +17 -0
- package/node/components/CardGridInfinite/List/styles.d.ts +10 -0
- package/node/components/CardGridInfinite/List/styles.js +13 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.d.ts +6 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/NoDataPlaceholder.js +14 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/constants.d.ts +1 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/constants.js +4 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/index.d.ts +1 -0
- package/node/components/CardGridInfinite/NoDataPlaceholder/index.js +17 -0
- package/node/components/CardGridInfinite/OnTopButton/OnTopButton.d.ts +8 -0
- package/node/components/CardGridInfinite/OnTopButton/OnTopButton.js +14 -0
- package/node/components/CardGridInfinite/OnTopButton/index.d.ts +1 -0
- package/node/components/CardGridInfinite/OnTopButton/index.js +17 -0
- package/node/components/CardGridInfinite/OnTopButton/styles.d.ts +3 -0
- package/node/components/CardGridInfinite/OnTopButton/styles.js +12 -0
- package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.d.ts +11 -0
- package/node/components/CardGridInfinite/SkeletonGrid/SkeletonGrid.js +9 -0
- package/node/components/CardGridInfinite/SkeletonGrid/index.d.ts +1 -0
- package/node/components/CardGridInfinite/SkeletonGrid/index.js +5 -0
- package/node/components/CardGridInfinite/SkeletonGrid/styles.d.ts +12 -0
- package/node/components/CardGridInfinite/SkeletonGrid/styles.js +8 -0
- package/node/components/CardGridInfinite/constants.d.ts +7 -0
- package/node/components/CardGridInfinite/constants.js +11 -0
- package/node/components/CardGridInfinite/hooks/index.d.ts +1 -0
- package/node/components/CardGridInfinite/hooks/index.js +17 -0
- package/node/components/CardGridInfinite/hooks/useBlockingActions/index.d.ts +1 -0
- package/node/components/CardGridInfinite/hooks/useBlockingActions/index.js +17 -0
- package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.d.ts +9 -0
- package/node/components/CardGridInfinite/hooks/useBlockingActions/useBlockingActions.js +27 -0
- package/node/components/CardGridInfinite/index.d.ts +8 -0
- package/node/components/CardGridInfinite/index.js +13 -0
- package/node/components/CardGridInfinite/styles.d.ts +13 -0
- package/node/components/CardGridInfinite/styles.js +29 -0
- package/node/components/CardGridInfinite/types.d.ts +98 -0
- package/node/components/CardGridInfinite/types.js +2 -0
- package/node/components/CardGridInfinite/useLogic/index.d.ts +1 -0
- package/node/components/CardGridInfinite/useLogic/index.js +17 -0
- package/node/components/CardGridInfinite/useLogic/useLogic.d.ts +41 -0
- package/node/components/CardGridInfinite/useLogic/useLogic.js +77 -0
- package/node/components/DashboardLayout/Sidebar/styles.d.ts +1 -4
- package/node/components/DatePicker/styles.d.ts +1 -4
- package/node/components/DateRangePicker/styles.d.ts +1 -4
- package/node/components/Description/styles.js +1 -1
- package/node/components/InfiniteTreeList/useLogic/useLogic.js +3 -3
- package/node/components/PageLayout/PageContent/styles.js +5 -2
- package/node/components/PageLayout/PageLayoutContainer/index.d.ts +1 -0
- package/node/components/PageLayout/PageLayoutContainer/index.js +3 -0
- package/node/components/PageLayout/PageLayoutContainer/styles.d.ts +1 -4
- package/node/components/Paper/Paper.d.ts +1 -1
- package/node/components/Paper/Paper.js +4 -4
- package/node/components/Tag/styles.js +2 -0
- package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.d.ts +2 -1
- package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/useScrollManagement.js +13 -3
- package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.js +3 -3
- package/node/components/hooks/index.d.ts +1 -0
- package/node/components/hooks/index.js +4 -1
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -3
- package/node/components/placeholders/LoadingPlaceholder/constants.d.ts +3 -0
- package/node/components/placeholders/LoadingPlaceholder/constants.js +7 -0
- package/node/components/placeholders/LoadingPlaceholder/index.d.ts +1 -0
- package/node/components/placeholders/LoadingPlaceholder/index.js +3 -0
- package/package.json +8 -1
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
- /package/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.d.ts +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/index.js +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.d.ts +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useScrollManagement/index.js +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.d.ts +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/index.js +0 -0
- /package/node/components/{InfiniteTreeList/useLogic/hooks → hooks/Infinite}/useStickyButton/useStickyButton.d.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecondaryActionButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const icons_1 = require("../../../../icons");
|
|
8
|
+
const hooks_1 = require("../../../hooks");
|
|
9
|
+
const CardGridSecondaryAction_1 = require("../../CardGridSecondaryAction");
|
|
10
|
+
const CardActionContext_1 = require("../CardActionContext");
|
|
11
|
+
const styles_1 = require("./styles");
|
|
12
|
+
const SecondaryActionButton = ({ renderActions, }) => {
|
|
13
|
+
const buttonRef = (0, react_1.useRef)(null);
|
|
14
|
+
const { open, anchorRef, handleOpenMenu, handleCloseMenu } = (0, hooks_1.useMenu)(buttonRef);
|
|
15
|
+
const { isDisabled, isDisabledCard } = (0, react_1.useContext)(CardActionContext_1.CardActionContext);
|
|
16
|
+
// Если контент единожды отрендерился, то будем рендерить его дальше,
|
|
17
|
+
// чтобы были актуальные статусы loading для блокировки действий
|
|
18
|
+
const [isOnceOpen, setIsOnceOpen] = (0, react_1.useState)(false);
|
|
19
|
+
const handleOpen = () => {
|
|
20
|
+
setIsOnceOpen(true);
|
|
21
|
+
handleOpenMenu();
|
|
22
|
+
};
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(CardGridSecondaryAction_1.SecondaryActionsMenuProvider, { value: { open, anchorEl: anchorRef.current }, children: [(0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: handleCloseMenu, mouseEvent: "onMouseUp", children: (0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { ref: anchorRef, onClick: handleOpen, selected: open, variant: "outlined", color: "grey", disabled: isDisabled || isDisabledCard, children: (0, jsx_runtime_1.jsx)(icons_1.DotsVOutlineMd, {}) }) }), isOnceOpen && renderActions({ isLoading: false })] }));
|
|
24
|
+
};
|
|
25
|
+
exports.SecondaryActionButton = SecondaryActionButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SecondaryActionButton';
|
|
@@ -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("./SecondaryActionButton"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledIconButton: import("@emotion/styled").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant"> & {
|
|
3
|
+
variant?: "link" | "light" | "outlined" | "contained" | "text" | undefined;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
color?: "grey" | "error" | "success" | "warning" | "primary" | undefined;
|
|
6
|
+
component?: import("react").ElementType | undefined;
|
|
7
|
+
selected?: boolean | undefined;
|
|
8
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
10
|
+
}, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledIconButton = void 0;
|
|
4
|
+
const IconButton_1 = require("../../../IconButton");
|
|
5
|
+
const styles_1 = require("../../../styles");
|
|
6
|
+
exports.StyledIconButton = (0, styles_1.styled)(IconButton_1.IconButton) `
|
|
7
|
+
align-self: flex-start;
|
|
8
|
+
`;
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./Card"), exports);
|
|
18
|
+
__exportStar(require("./CardActionContext"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const StyledDivider: import("@emotion/styled").StyledComponent<import("../../Divider").DividerProps & {
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
}, {}, {}>;
|
|
9
|
+
export declare const CardHeader: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
as?: import("react").ElementType<any> | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const HeaderWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
as?: import("react").ElementType<any> | undefined;
|
|
16
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeaderWrapper = exports.CardHeader = exports.StyledDivider = exports.Wrapper = void 0;
|
|
4
|
+
const Divider_1 = require("../../Divider");
|
|
5
|
+
const styles_1 = require("../../styles");
|
|
6
|
+
exports.Wrapper = styles_1.styled.div `
|
|
7
|
+
padding: ${({ theme }) => theme.spacing(4, 5)};
|
|
8
|
+
|
|
9
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
10
|
+
padding: ${({ theme }) => theme.spacing(5, 4)};
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
exports.StyledDivider = (0, styles_1.styled)(Divider_1.Divider) `
|
|
14
|
+
margin: ${({ theme }) => theme.spacing(4, 0)}
|
|
15
|
+
`;
|
|
16
|
+
exports.CardHeader = styles_1.styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
`;
|
|
22
|
+
exports.HeaderWrapper = styles_1.styled.div `
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
flex: 1;
|
|
25
|
+
`;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type FunctionComponent, type ReactNode } from 'react';
|
|
2
|
+
export type CardProps<TItem> = {
|
|
3
|
+
/**
|
|
4
|
+
* Header элемента
|
|
5
|
+
*/
|
|
6
|
+
header?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Основные действия элемента отображающиеся в footer
|
|
9
|
+
* Может быть как функцией без параметров, так и React компонентом
|
|
10
|
+
*/
|
|
11
|
+
mainActions?: FunctionComponent;
|
|
12
|
+
/**
|
|
13
|
+
* Дополнительные действия элемента отображающиеся в header в виде кнопки с троеточием
|
|
14
|
+
*/
|
|
15
|
+
secondaryActions?: () => ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Основной контент отображающийся в центральной части элемента
|
|
18
|
+
*/
|
|
19
|
+
content: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Если `true`, элемент будет заблокирован для взаимодействия
|
|
22
|
+
*/
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Причина блокировки элемента
|
|
26
|
+
*/
|
|
27
|
+
disabledReason?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Данные элемента
|
|
30
|
+
*/
|
|
31
|
+
item: TItem;
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -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("./useLogic"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CardGridActionHandler } from '../../CardGridMainActions';
|
|
2
|
+
import type { CardProps } from '../types';
|
|
3
|
+
type UseLogicParams<TItem> = CardProps<TItem>;
|
|
4
|
+
export declare const useLogic: <TItem>({ item }: UseLogicParams<TItem>) => {
|
|
5
|
+
handleActionClick: CardGridActionHandler<TItem>;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useLogic = ({ item }) => {
|
|
6
|
+
const handleActionClick = (0, react_1.useCallback)((onClick) => () => {
|
|
7
|
+
onClick?.(item);
|
|
8
|
+
}, [item]);
|
|
9
|
+
return { handleActionClick };
|
|
10
|
+
};
|
|
11
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardGridInfinite = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_virtuoso_1 = require("react-virtuoso");
|
|
7
|
+
const ContentState_1 = require("../ContentState");
|
|
8
|
+
const Card_1 = require("./Card");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
10
|
+
const Footer_1 = require("./Footer");
|
|
11
|
+
const List_1 = require("./List");
|
|
12
|
+
const NoDataPlaceholder_1 = require("./NoDataPlaceholder");
|
|
13
|
+
const OnTopButton_1 = require("./OnTopButton");
|
|
14
|
+
const SkeletonGrid_1 = require("./SkeletonGrid");
|
|
15
|
+
const styles_1 = require("./styles");
|
|
16
|
+
const useLogic_1 = require("./useLogic");
|
|
17
|
+
const CardGridInfinite = (props) => {
|
|
18
|
+
const { contentStateProps, desktopCardWidth, virtuosoProps, scrollParent, skeleton, footerProps, onTopButtonProps, list, noDataImgSrc, defineCard, classnames, } = (0, useLogic_1.useLogic)(props);
|
|
19
|
+
const VirtuosoList = (0, react_1.useMemo)(() => (0, react_1.forwardRef)((listProps, ref) => ((0, jsx_runtime_1.jsx)(List_1.List, { ...listProps, ref: ref, desktopCardWidth: desktopCardWidth }))), [desktopCardWidth]);
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ContentStateWrapper, { className: classnames, children: (0, jsx_runtime_1.jsx)(ContentState_1.ContentState, { ...contentStateProps, loadingContent: (0, jsx_runtime_1.jsx)(SkeletonGrid_1.SkeletonGrid, { skeleton: skeleton, desktopCardWidth: desktopCardWidth }), children: list?.length && scrollParent ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_virtuoso_1.VirtuosoGrid, { ...virtuosoProps, data: list, customScrollParent: scrollParent, listClassName: constants_1.cardGridClassnames.list, components: {
|
|
21
|
+
List: VirtuosoList,
|
|
22
|
+
Footer: () => (0, jsx_runtime_1.jsx)(Footer_1.Footer, { ...footerProps }),
|
|
23
|
+
}, itemContent: (_, item) => ((0, jsx_runtime_1.jsx)(Card_1.Card, { item: item, ...defineCard(item) })) }), (0, jsx_runtime_1.jsx)(OnTopButton_1.OnTopButton, { ...onTopButtonProps })] })) : ((0, jsx_runtime_1.jsx)(NoDataPlaceholder_1.NoDataPlaceholder, { noDataImgSrc: noDataImgSrc })) }) }));
|
|
24
|
+
};
|
|
25
|
+
exports.CardGridInfinite = CardGridInfinite;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Action = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../../../Button");
|
|
6
|
+
const ConfirmAction_1 = require("../../../ConfirmAction");
|
|
7
|
+
const Tooltip_1 = require("../../../Tooltip");
|
|
8
|
+
const useLogic_1 = require("./useLogic");
|
|
9
|
+
const Action = (props) => {
|
|
10
|
+
const { tooltipProps } = (0, useLogic_1.useLogic)(props);
|
|
11
|
+
const { action, onActionClick, isDisabled } = props;
|
|
12
|
+
const { name, needConfirm, confirmText, confirmButtonProps, disabledReason, disabled, loading, isBlockingOperation, loadingNote, note, onClick, component, variant, color, ...restProps } = action;
|
|
13
|
+
const renderButton = (renderProps) => {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { withoutContainer: !disabled, placement: "bottom", ...tooltipProps, children: (0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: isDisabled || disabled, loading: loading, component: component, variant: variant, color: color, ...restProps, ...renderProps, children: name }) }, name));
|
|
15
|
+
};
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: needConfirm ? ((0, jsx_runtime_1.jsx)(ConfirmAction_1.ConfirmAction, { text: confirmText, confirmButtonProps: confirmButtonProps, actionComponent: (renderProps) => renderButton(renderProps), onConfirm: onActionClick(onClick) })) : (renderButton({
|
|
17
|
+
onClick: onActionClick(onClick),
|
|
18
|
+
})) }));
|
|
19
|
+
};
|
|
20
|
+
exports.Action = Action;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Action';
|
|
@@ -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("./Action"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
|
+
import type { CardGridActionHandler, CardGridMainActionComponent } from '../types';
|
|
3
|
+
export type ActionProps<TAction> = {
|
|
4
|
+
action: CardGridMainActionComponent<TAction, ElementType>;
|
|
5
|
+
/**
|
|
6
|
+
* Обработчик клика на действие
|
|
7
|
+
*/
|
|
8
|
+
onActionClick: CardGridActionHandler<TAction>;
|
|
9
|
+
/**
|
|
10
|
+
* Если true, action не доступен
|
|
11
|
+
*/
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -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("./useLogic"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ActionProps } from '../types';
|
|
2
|
+
type UseLogicParam<TAction> = ActionProps<TAction>;
|
|
3
|
+
export declare const useLogic: <TAction>({ action }: UseLogicParam<TAction>) => {
|
|
4
|
+
tooltipProps: {
|
|
5
|
+
title: string | undefined;
|
|
6
|
+
open: boolean;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useLogic = ({ action }) => {
|
|
6
|
+
const { loading, disabledReason, note } = action;
|
|
7
|
+
const [isVisibleTooltip, setVisibleTooltip] = (0, react_1.useState)(false);
|
|
8
|
+
const handleOpenTooltip = () => setVisibleTooltip(true);
|
|
9
|
+
const handleCloseTooltip = () => setVisibleTooltip(false);
|
|
10
|
+
const title = note || disabledReason;
|
|
11
|
+
return {
|
|
12
|
+
tooltipProps: {
|
|
13
|
+
title,
|
|
14
|
+
open: isVisibleTooltip && !loading,
|
|
15
|
+
onOpen: handleOpenTooltip,
|
|
16
|
+
onClose: handleCloseTooltip,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CardGridMainAction } from './types';
|
|
3
|
+
export type CardGridMainActionsProps<TAction> = {
|
|
4
|
+
/**
|
|
5
|
+
* Действия отображаются слева направо в порядке, указанном в массиве
|
|
6
|
+
* Каждый элемент может иметь свой component (например, 'button', 'a', и т.д.)
|
|
7
|
+
* с соответствующими пропсами для этого компонента
|
|
8
|
+
*/
|
|
9
|
+
actions?: CardGridMainAction<TAction>[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Компонент для отображения основных действий в карточке CardGrid.
|
|
13
|
+
*
|
|
14
|
+
* Основные действия отображаются в виде отдельных кнопок в футере карточки
|
|
15
|
+
* и предназначены для наиболее часто используемых операций над ней
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* - Компонент автоматически обрабатывает блокирующие операции, что предотвращает одновременное выполнение нескольких действий
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <CardGridMainActions
|
|
23
|
+
* actions={[
|
|
24
|
+
* { name: 'Редактировать', onClick: handleEdit },
|
|
25
|
+
* { name: 'Удалить', onClick: handleDelete, isBlockingOperation: true }
|
|
26
|
+
* ]}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const CardGridMainActions: <TAction>({ actions, }: CardGridMainActionsProps<TAction>) => JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardGridMainActions = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const hooks_1 = require("../hooks");
|
|
6
|
+
const Action_1 = require("./Action");
|
|
7
|
+
const styles_1 = require("./styles");
|
|
8
|
+
/**
|
|
9
|
+
* Компонент для отображения основных действий в карточке CardGrid.
|
|
10
|
+
*
|
|
11
|
+
* Основные действия отображаются в виде отдельных кнопок в футере карточки
|
|
12
|
+
* и предназначены для наиболее часто используемых операций над ней
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* - Компонент автоматически обрабатывает блокирующие операции, что предотвращает одновременное выполнение нескольких действий
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <CardGridMainActions
|
|
20
|
+
* actions={[
|
|
21
|
+
* { name: 'Редактировать', onClick: handleEdit },
|
|
22
|
+
* { name: 'Удалить', onClick: handleDelete, isBlockingOperation: true }
|
|
23
|
+
* ]}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
const CardGridMainActions = ({ actions, }) => {
|
|
28
|
+
const { isDisabled, onActionClick } = (0, hooks_1.useBlockingActions)(actions);
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: actions?.map((action) => {
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(Action_1.Action, { action: action, onActionClick: onActionClick, isDisabled: isDisabled }, action.name));
|
|
31
|
+
}) }));
|
|
32
|
+
};
|
|
33
|
+
exports.CardGridMainActions = CardGridMainActions;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
exports.replaceActionComponent = void 0;
|
|
18
|
+
__exportStar(require("./CardGridMainActions"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
__exportStar(require("./Action"), exports);
|
|
21
|
+
var utils_1 = require("./utils");
|
|
22
|
+
Object.defineProperty(exports, "replaceActionComponent", { enumerable: true, get: function () { return utils_1.replaceActionComponent; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wrapper = void 0;
|
|
4
|
+
const styles_1 = require("../../styles");
|
|
5
|
+
exports.Wrapper = styles_1.styled.div `
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-auto-columns: 1fr;
|
|
8
|
+
grid-auto-flow: column;
|
|
9
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
10
|
+
|
|
11
|
+
padding-top: ${({ theme }) => theme.spacing(6)};
|
|
12
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ElementType, MouseEventHandler } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../../Button';
|
|
3
|
+
import type { ConfirmActionProps } from '../../ConfirmAction';
|
|
4
|
+
export type CardGridMainActionBase<TItem> = {
|
|
5
|
+
/**
|
|
6
|
+
* Название действия (также используется как текст внутри кнопки)
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Если `true`, при клике на кнопку будет вызываться подтверждение действия
|
|
11
|
+
*/
|
|
12
|
+
needConfirm?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Поясняющий текст для подтверждения действия
|
|
15
|
+
*/
|
|
16
|
+
confirmText?: ConfirmActionProps['text'];
|
|
17
|
+
/**
|
|
18
|
+
* Параметры кнопки подтверждения действия
|
|
19
|
+
*/
|
|
20
|
+
confirmButtonProps?: ConfirmActionProps['confirmButtonProps'];
|
|
21
|
+
/**
|
|
22
|
+
* Если true, блокирует взаимодействие с actions
|
|
23
|
+
*/
|
|
24
|
+
isBlockingOperation?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Причина блокировки действия
|
|
27
|
+
*/
|
|
28
|
+
disabledReason?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Текст тултипа при наведении на кнопку
|
|
31
|
+
*/
|
|
32
|
+
note?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Причина блокировки строки во время загрузки
|
|
35
|
+
*/
|
|
36
|
+
loadingNote?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Обработчик действия
|
|
39
|
+
*/
|
|
40
|
+
onClick?: (data: TItem) => void;
|
|
41
|
+
};
|
|
42
|
+
export type CardGridMainActionComponent<TItem, TComponent extends ElementType = ElementType> = CardGridMainActionBase<TItem> & Omit<ButtonProps<TComponent>, 'children' | 'onClick'>;
|
|
43
|
+
export type CardGridActionHandler<TItem> = (onClick: CardGridMainActionComponent<TItem>['onClick']) => MouseEventHandler<HTMLElement> | undefined;
|
|
44
|
+
export type CardGridMainAction<TItem> = CardGridMainActionComponent<TItem, ElementType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './replaceActionComponent';
|
|
@@ -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("./replaceActionComponent"), exports);
|
package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './replaceActionComponent';
|
package/node/components/CardGridInfinite/CardGridMainActions/utils/replaceActionComponent/index.js
ADDED
|
@@ -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("./replaceActionComponent"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import type { CardGridMainActionComponent } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Заменяет дефолтный параметр component на кастомный
|
|
5
|
+
* @param component - Кастомный компонент для замены Button
|
|
6
|
+
* @param props - Параметры компонента
|
|
7
|
+
*/
|
|
8
|
+
export declare const replaceActionComponent: <TItem, TComponent extends ElementType>(component: TComponent, props: Omit<CardGridMainActionComponent<TItem, TComponent>, "component">) => CardGridMainActionComponent<TItem, ElementType>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaceActionComponent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Заменяет дефолтный параметр component на кастомный
|
|
6
|
+
* @param component - Кастомный компонент для замены Button
|
|
7
|
+
* @param props - Параметры компонента
|
|
8
|
+
*/
|
|
9
|
+
const replaceActionComponent = (component, props) => {
|
|
10
|
+
return {
|
|
11
|
+
...props,
|
|
12
|
+
component,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.replaceActionComponent = replaceActionComponent;
|