@astral/ui 4.13.1 → 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/{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/{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,98 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { CardProps } from './Card';
|
|
3
|
+
export type SkeletonConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* Скелетон, отображающийся внутри карточки
|
|
6
|
+
*/
|
|
7
|
+
component: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Число отображаемых элементов в состоянии загрузки
|
|
10
|
+
*/
|
|
11
|
+
count: number;
|
|
12
|
+
};
|
|
13
|
+
export type CardGridInfiniteProps<TDataItem extends Record<string, unknown>> = {
|
|
14
|
+
/**
|
|
15
|
+
* Отображается skeleton
|
|
16
|
+
*/
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
errorMsg?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Функция обработки нажатия на кнопку "Повторить снова"
|
|
22
|
+
*/
|
|
23
|
+
onRetry: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Конфигурация состояния загрузки компонента
|
|
26
|
+
*/
|
|
27
|
+
skeleton: SkeletonConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Изображение отображающееся при отсутствии данных
|
|
30
|
+
*/
|
|
31
|
+
noDataImgSrc?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Список элементов для отображения
|
|
34
|
+
*/
|
|
35
|
+
list?: TDataItem[];
|
|
36
|
+
/**
|
|
37
|
+
* Конфигурация отображения элементов
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* defineCard={({ organization, content }) => {
|
|
41
|
+
return {
|
|
42
|
+
header: <CardHeader organization={organization} />
|
|
43
|
+
content: <DescriptionList leader items={content} />,
|
|
44
|
+
mainActions: () => <MainActions />,
|
|
45
|
+
secondaryActions: () => <SecondaryActions />,
|
|
46
|
+
};
|
|
47
|
+
}}
|
|
48
|
+
*/
|
|
49
|
+
defineCard: (itemData: TDataItem) => Omit<CardProps<TDataItem>, 'item'>;
|
|
50
|
+
/**
|
|
51
|
+
* Определяет минимальную и максимальную ширину карточек в адаптивной сетке.
|
|
52
|
+
* Применяется через CSS Grid.
|
|
53
|
+
* Колонки автоматически перестраиваются при изменении ширины контейнера.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* desktopCardWidth={{
|
|
57
|
+
* min: '350px',
|
|
58
|
+
* max: '1fr',
|
|
59
|
+
* }}
|
|
60
|
+
*/
|
|
61
|
+
desktopCardWidth: {
|
|
62
|
+
min: string;
|
|
63
|
+
max: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Вызывается, когда пользователь достигает конца списка и требуется загрузить дополнительные данные
|
|
67
|
+
*/
|
|
68
|
+
onLoadMore: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Флаг достижения конца списка
|
|
71
|
+
*/
|
|
72
|
+
isEndReached?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Сообщение, отображаемое при достижении конца списка
|
|
75
|
+
*
|
|
76
|
+
* @default Вы достигли конца списка
|
|
77
|
+
*/
|
|
78
|
+
endOfScrollMsg?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Изображение при ошибке
|
|
81
|
+
*
|
|
82
|
+
* @default Берется из контекста ConfigContext (defaultErrorImgSrc)
|
|
83
|
+
*/
|
|
84
|
+
errorImgSrc?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Реф на контейнер, в котором должен быть скролл
|
|
87
|
+
*
|
|
88
|
+
* Используется тот же реф, что передается в компонент PageContent
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* const scrollRef = useRef(null);
|
|
92
|
+
*
|
|
93
|
+
* <PageContent scrollRef={scrollRef}>
|
|
94
|
+
* <CardGridInfinite scrollRef={scrollRef} ... />
|
|
95
|
+
* </PageContent>
|
|
96
|
+
*/
|
|
97
|
+
scrollRef: RefObject<HTMLElement>;
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ListRange } from 'react-virtuoso';
|
|
3
|
+
import { type ContentStateProps } from '../../ContentState';
|
|
4
|
+
import type { CardGridInfiniteProps } from '../types';
|
|
5
|
+
type UseLogicParams<TDataItem extends Record<string, unknown>> = CardGridInfiniteProps<TDataItem>;
|
|
6
|
+
export declare const useLogic: <TDataItem extends Record<string, unknown>>({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef, skeleton, onRetry, endOfScrollMsg, isEndReached, onLoadMore, noDataImgSrc, defineCard, desktopCardWidth, }: UseLogicParams<TDataItem>) => {
|
|
7
|
+
contentStateProps: Omit<ContentStateProps, "children">;
|
|
8
|
+
desktopCardWidth: {
|
|
9
|
+
min: string;
|
|
10
|
+
max: string;
|
|
11
|
+
};
|
|
12
|
+
virtuosoProps: {
|
|
13
|
+
id: string;
|
|
14
|
+
style: {
|
|
15
|
+
height: string;
|
|
16
|
+
};
|
|
17
|
+
ref: import("react").RefObject<import("react-virtuoso").VirtuosoHandle>;
|
|
18
|
+
overscan: number;
|
|
19
|
+
rangeChanged: (range: ListRange) => void;
|
|
20
|
+
endReached: () => void;
|
|
21
|
+
};
|
|
22
|
+
footerProps: {
|
|
23
|
+
isError: boolean | undefined;
|
|
24
|
+
isEndReached: boolean | undefined;
|
|
25
|
+
onRetry: () => void;
|
|
26
|
+
endOfScrollMsg: string | undefined;
|
|
27
|
+
isLoading: boolean | undefined;
|
|
28
|
+
};
|
|
29
|
+
onTopButtonProps: {
|
|
30
|
+
isActive: boolean;
|
|
31
|
+
handleScrollToTop: () => void;
|
|
32
|
+
scrollRef: import("react").RefObject<HTMLElement>;
|
|
33
|
+
};
|
|
34
|
+
scrollParent: HTMLElement | null;
|
|
35
|
+
skeleton: import("../types").SkeletonConfig;
|
|
36
|
+
list: TDataItem[] | undefined;
|
|
37
|
+
noDataImgSrc: string | undefined;
|
|
38
|
+
defineCard: (itemData: TDataItem) => Omit<import("..").CardProps<TDataItem>, "item">;
|
|
39
|
+
classnames: string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useContext, useEffect, useMemo } from 'react';
|
|
2
|
+
import { ConfigContext } from '../../ConfigProvider';
|
|
3
|
+
import { useScrollManagement, useStickyButton, useViewportType, } from '../../hooks';
|
|
4
|
+
import { classNames } from '../../utils';
|
|
5
|
+
import { cardGridClassnames, OVERSCAN, VIRTUOSO_CONTAINER_ID, } from '../constants';
|
|
6
|
+
export const useLogic = ({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef, skeleton, onRetry, endOfScrollMsg, isEndReached, onLoadMore, noDataImgSrc, defineCard, desktopCardWidth, }) => {
|
|
7
|
+
const { imagesMap } = useContext(ConfigContext);
|
|
8
|
+
const { isMobile } = useViewportType();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (isMobile && scrollRef?.current) {
|
|
11
|
+
scrollRef.current.style.backgroundColor = 'unset';
|
|
12
|
+
scrollRef.current.style.padding = 'unset';
|
|
13
|
+
}
|
|
14
|
+
}, [isMobile]);
|
|
15
|
+
const contentStateProps = useMemo(() => {
|
|
16
|
+
const isNoData = !list?.length;
|
|
17
|
+
return {
|
|
18
|
+
isLoading: isNoData && isLoading,
|
|
19
|
+
isError: isNoData && isError,
|
|
20
|
+
loadingTitle: 'Загрузка данных',
|
|
21
|
+
errorState: {
|
|
22
|
+
imgAlt: 'Что-то пошло не так',
|
|
23
|
+
errorList: [errorMsg || ''],
|
|
24
|
+
imgSrc: errorImgSrc || imagesMap.defaultErrorImgSrc,
|
|
25
|
+
onRetry,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}, [list, isLoading, isError, errorMsg, errorImgSrc, imagesMap]);
|
|
29
|
+
const { scrollParent, recalculateVerticalScroll, handleEndReach, isEndReachedWithScroll, } = useScrollManagement({
|
|
30
|
+
scrollRef,
|
|
31
|
+
isEndReached,
|
|
32
|
+
onLoadMore,
|
|
33
|
+
virtuosoId: VIRTUOSO_CONTAINER_ID,
|
|
34
|
+
});
|
|
35
|
+
const { virtuoso, isStickyButtonActive, handleRangeChanged: propsHandleRangeChanged, handleScrollToTop, } = useStickyButton(scrollRef);
|
|
36
|
+
const handleRangeChanged = (range) => {
|
|
37
|
+
recalculateVerticalScroll();
|
|
38
|
+
propsHandleRangeChanged(range);
|
|
39
|
+
};
|
|
40
|
+
const classnames = useMemo(() => classNames(cardGridClassnames.root, {
|
|
41
|
+
[cardGridClassnames.loading]: isLoading,
|
|
42
|
+
}), [isLoading]);
|
|
43
|
+
return {
|
|
44
|
+
contentStateProps,
|
|
45
|
+
desktopCardWidth,
|
|
46
|
+
virtuosoProps: {
|
|
47
|
+
id: VIRTUOSO_CONTAINER_ID,
|
|
48
|
+
style: { height: '100%' },
|
|
49
|
+
ref: virtuoso,
|
|
50
|
+
overscan: OVERSCAN,
|
|
51
|
+
rangeChanged: handleRangeChanged,
|
|
52
|
+
endReached: handleEndReach,
|
|
53
|
+
},
|
|
54
|
+
footerProps: {
|
|
55
|
+
isError,
|
|
56
|
+
isEndReached: isEndReachedWithScroll,
|
|
57
|
+
onRetry,
|
|
58
|
+
endOfScrollMsg,
|
|
59
|
+
isLoading,
|
|
60
|
+
},
|
|
61
|
+
onTopButtonProps: {
|
|
62
|
+
isActive: isStickyButtonActive,
|
|
63
|
+
handleScrollToTop,
|
|
64
|
+
scrollRef,
|
|
65
|
+
},
|
|
66
|
+
scrollParent,
|
|
67
|
+
skeleton,
|
|
68
|
+
list,
|
|
69
|
+
noDataImgSrc,
|
|
70
|
+
defineCard,
|
|
71
|
+
classnames,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -6,10 +6,7 @@ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
$isPinned: boolean;
|
|
7
7
|
$alertHeight: number;
|
|
8
8
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
|
-
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("
|
|
10
|
-
elevation?: 0 | 1 | 2 | undefined;
|
|
11
|
-
shape?: "small" | "medium" | "large" | undefined;
|
|
12
|
-
} & {
|
|
9
|
+
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
13
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
14
11
|
}, {}, {}>;
|
|
15
12
|
export declare const SidebarRoot: import("@emotion/styled").StyledComponent<{
|
|
@@ -14,9 +14,6 @@ export declare const ButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
14
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
15
15
|
as?: import("react").ElementType<any> | undefined;
|
|
16
16
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
-
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("
|
|
18
|
-
elevation?: 0 | 1 | 2 | undefined;
|
|
19
|
-
shape?: "small" | "medium" | "large" | undefined;
|
|
20
|
-
} & {
|
|
17
|
+
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
21
18
|
theme?: import("@emotion/react").Theme | undefined;
|
|
22
19
|
}, {}, {}>;
|
|
@@ -5,10 +5,7 @@ export declare const StyledDatePickerInput: import("@emotion/styled").StyledComp
|
|
|
5
5
|
}, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
|
|
6
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
|
-
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("
|
|
9
|
-
elevation?: 0 | 1 | 2 | undefined;
|
|
10
|
-
shape?: "small" | "medium" | "large" | undefined;
|
|
11
|
-
} & {
|
|
8
|
+
export declare const StyledPaper: import("@emotion/styled").StyledComponent<Omit<import("../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
12
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
13
10
|
}, {}, {}>;
|
|
14
11
|
export declare const PickerSplitter: import("@emotion/styled").StyledComponent<{
|
|
@@ -13,7 +13,7 @@ export const Wrapper = styled('div', {
|
|
|
13
13
|
flex-direction: ${({ $direction }) => $direction === 'default' ? 'column' : $direction};
|
|
14
14
|
|
|
15
15
|
.MuiTypography-root {
|
|
16
|
-
font-size: ${({ theme }) => theme.typography.fontSize};
|
|
16
|
+
font-size: ${({ theme }) => theme.typography.fontSize}px;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
`;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
2
2
|
import { ConfigContext } from '../../ConfigProvider';
|
|
3
|
-
import { useSet } from '../../hooks';
|
|
3
|
+
import { useScrollManagement, useSet, useStickyButton } from '../../hooks';
|
|
4
4
|
import { useTheme } from '../../theme';
|
|
5
5
|
import { infiniteTreeListClassnames, VIRTUOSO_CONTAINER_ID, } from '../constants';
|
|
6
|
-
import { useScrollManagement, useStickyButton } from './hooks';
|
|
7
6
|
import { flattenTree, getDescendants, getInitialExpandedIds, sortCollapsed, } from './utils';
|
|
8
7
|
export const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }) => {
|
|
9
8
|
const { imagesMap } = useContext(ConfigContext);
|
|
@@ -61,6 +60,7 @@ export const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isErr
|
|
|
61
60
|
scrollRef,
|
|
62
61
|
isEndReached,
|
|
63
62
|
onLoadMore,
|
|
63
|
+
virtuosoId: VIRTUOSO_CONTAINER_ID,
|
|
64
64
|
});
|
|
65
65
|
const { virtuoso, isStickyButtonActive, handleRangeChanged, handleScrollToTop, } = useStickyButton(scrollRef);
|
|
66
66
|
return {
|
|
@@ -24,9 +24,7 @@ export const Wrapper = styled('article', {
|
|
|
24
24
|
order: 4;
|
|
25
25
|
|
|
26
26
|
height: ${({ $isFullHeight }) => ($isFullHeight ? 'auto' : '100%')};
|
|
27
|
-
margin: ${({ theme }) => theme.spacing(0, 4, 4)};
|
|
28
27
|
|
|
29
|
-
background-color: ${({ theme }) => theme.palette.background.default};
|
|
30
28
|
border-top: none;
|
|
31
29
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
32
30
|
}
|
|
@@ -63,9 +61,14 @@ export const Content = styled.div `
|
|
|
63
61
|
padding: ${({ theme, $hasAside }) => getPaddingContent(theme, $hasAside)};
|
|
64
62
|
|
|
65
63
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
64
|
+
scrollbar-gutter: unset;
|
|
65
|
+
|
|
66
66
|
overflow: hidden;
|
|
67
67
|
|
|
68
|
+
margin: ${({ theme }) => theme.spacing(0, 4, 4)};
|
|
68
69
|
padding: ${({ theme }) => theme.spacing(4, 4, 3)};
|
|
70
|
+
|
|
71
|
+
background-color: ${({ theme }) => theme.palette.background.default};
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
&:has(.${pdfViewerClassnames.document}.${pdfViewerClassnames.zoom}) {
|
|
@@ -3,9 +3,6 @@ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const StylePaper: import("@emotion/styled").StyledComponent<Omit<import("
|
|
7
|
-
elevation?: 0 | 1 | 2 | undefined;
|
|
8
|
-
shape?: "small" | "medium" | "large" | undefined;
|
|
9
|
-
} & {
|
|
6
|
+
export declare const StylePaper: import("@emotion/styled").StyledComponent<Omit<import("../../Paper").PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
10
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
8
|
}, {}, {}>;
|
|
@@ -16,4 +16,4 @@ export type PaperProps = Omit<WithoutEmotionSpecific<MuiPaperProps>, 'elevation'
|
|
|
16
16
|
*/
|
|
17
17
|
shape?: 'small' | 'medium' | 'large';
|
|
18
18
|
};
|
|
19
|
-
export declare const Paper: (
|
|
19
|
+
export declare const Paper: import("react").ForwardRefExoticComponent<Omit<PaperProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { StyledPaper } from './styles';
|
|
3
|
-
export const Paper = ({ shape = 'medium', ...restProps }) => {
|
|
4
|
-
return _jsx(StyledPaper, { "$shape": shape, ...restProps });
|
|
5
|
-
};
|
|
4
|
+
export const Paper = forwardRef(({ shape = 'medium', ...restProps }, ref) => {
|
|
5
|
+
return _jsx(StyledPaper, { ref: ref, "$shape": shape, ...restProps });
|
|
6
|
+
});
|
|
@@ -3,11 +3,12 @@ type UseScrollManagementParams = {
|
|
|
3
3
|
scrollRef: RefObject<HTMLElement>;
|
|
4
4
|
isEndReached?: boolean;
|
|
5
5
|
onLoadMore?: () => void;
|
|
6
|
+
virtuosoId: string;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
9
|
* Отслеживание скролла для динамического отображения футера
|
|
9
10
|
*/
|
|
10
|
-
export declare const useScrollManagement: ({ scrollRef, isEndReached, onLoadMore, }: UseScrollManagementParams) => {
|
|
11
|
+
export declare const useScrollManagement: ({ scrollRef, isEndReached, onLoadMore, virtuosoId, }: UseScrollManagementParams) => {
|
|
11
12
|
scrollParent: HTMLElement | null;
|
|
12
13
|
hasVerticalScroll: boolean;
|
|
13
14
|
recalculateVerticalScroll: () => void;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { pageLayoutClassnames } from '../../../PageLayout/PageLayoutContainer';
|
|
3
|
+
import { useViewportType } from '../../useViewportType';
|
|
3
4
|
/**
|
|
4
5
|
* Отслеживание скролла для динамического отображения футера
|
|
5
6
|
*/
|
|
6
|
-
export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, }) => {
|
|
7
|
+
export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, virtuosoId, }) => {
|
|
7
8
|
const [scrollParent, setScrollParent] = useState(null);
|
|
8
9
|
const [hasVerticalScroll, setHasVerticalScroll] = useState(false);
|
|
10
|
+
const { isMobile } = useViewportType();
|
|
9
11
|
useEffect(() => {
|
|
12
|
+
if (isMobile) {
|
|
13
|
+
// На мобильных устройствах scroll находится на контейнере pageLayout
|
|
14
|
+
const rootScrollElement = document.querySelector(`.${pageLayoutClassnames.root}`);
|
|
15
|
+
if (rootScrollElement instanceof HTMLElement) {
|
|
16
|
+
setScrollParent(rootScrollElement);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
10
20
|
if (scrollRef?.current) {
|
|
11
21
|
setScrollParent(scrollRef.current);
|
|
12
22
|
}
|
|
@@ -15,7 +25,7 @@ export const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, }) =>
|
|
|
15
25
|
}
|
|
16
26
|
}, [scrollRef]);
|
|
17
27
|
const recalculateVerticalScroll = () => {
|
|
18
|
-
const list = document.getElementById(
|
|
28
|
+
const list = document.getElementById(virtuosoId);
|
|
19
29
|
if (scrollRef?.current && list) {
|
|
20
30
|
setHasVerticalScroll(list?.clientHeight > scrollRef.current?.clientHeight);
|
|
21
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'react';
|
|
2
|
-
import { useToggle } from '
|
|
2
|
+
import { useToggle } from '../../useToggle';
|
|
3
3
|
/**
|
|
4
4
|
* Управление кнопкой "наверх"
|
|
5
5
|
*/
|
|
@@ -14,7 +14,7 @@ export const useStickyButton = (scrollRef) => {
|
|
|
14
14
|
}, [showStickyButton, hideStickyButton]);
|
|
15
15
|
const handleScrollToTop = () => {
|
|
16
16
|
scrollRef.current.style.scrollBehavior = 'auto';
|
|
17
|
-
virtuoso.current?.
|
|
17
|
+
virtuoso.current?.scrollToIndex(0);
|
|
18
18
|
};
|
|
19
19
|
return {
|
|
20
20
|
virtuoso,
|
|
@@ -17,3 +17,4 @@ export { useCheckControlled } from './useCheckControlled';
|
|
|
17
17
|
export * from './usePopoverAnimation';
|
|
18
18
|
export { useAsyncOptions } from './useAsyncOptions';
|
|
19
19
|
export { useLoadingState } from './useLoadingState';
|
|
20
|
+
export { useScrollManagement, useStickyButton } from './Infinite';
|
|
@@ -17,3 +17,4 @@ export { useCheckControlled } from './useCheckControlled';
|
|
|
17
17
|
export * from './usePopoverAnimation';
|
|
18
18
|
export { useAsyncOptions } from './useAsyncOptions';
|
|
19
19
|
export { useLoadingState } from './useLoadingState';
|
|
20
|
+
export { useScrollManagement, useStickyButton } from './Infinite';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Loader } from '../../Loader';
|
|
3
3
|
import { Typography } from '../../Typography';
|
|
4
|
+
import { loadingPlaceholderClassnames } from './constants';
|
|
4
5
|
import { LoadingContainer } from './styles';
|
|
5
6
|
/**
|
|
6
7
|
* Дефолтный лоадер загрузки
|
|
7
8
|
*/
|
|
8
9
|
export const LoadingPlaceholder = ({ title, content, isShowLoader = true, }) => {
|
|
9
10
|
if (!isShowLoader) {
|
|
10
|
-
return _jsx(LoadingContainer, {});
|
|
11
|
+
return _jsx(LoadingContainer, { className: loadingPlaceholderClassnames.root });
|
|
11
12
|
}
|
|
12
13
|
if (content) {
|
|
13
|
-
return _jsx(LoadingContainer, { children: content });
|
|
14
|
+
return (_jsx(LoadingContainer, { className: loadingPlaceholderClassnames.root, children: content }));
|
|
14
15
|
}
|
|
15
|
-
return (_jsxs(LoadingContainer, { children: [_jsx(Loader, {}), title && _jsx(Typography, { variant: "h4", children: title })] }));
|
|
16
|
+
return (_jsxs(LoadingContainer, { className: loadingPlaceholderClassnames.root, children: [_jsx(Loader, {}), title && _jsx(Typography, { variant: "h4", children: title })] }));
|
|
16
17
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Card = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Paper_1 = require("../../Paper");
|
|
6
|
+
const Tooltip_1 = require("../../Tooltip");
|
|
7
|
+
const CardActionContext_1 = require("./CardActionContext");
|
|
8
|
+
const SecondaryActionButton_1 = require("./SecondaryActionButton");
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const useLogic_1 = require("./useLogic");
|
|
11
|
+
const Card = (props) => {
|
|
12
|
+
const { handleActionClick } = (0, useLogic_1.useLogic)(props);
|
|
13
|
+
const { isDisabled, mainActions: MainActions, content, header, disabledReason, secondaryActions, } = props;
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(CardActionContext_1.CardActionContextProvider, { onActionClick: handleActionClick, isDisabledCard: isDisabled, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: isDisabled && disabledReason, withoutContainer: !isDisabled, placement: "top", componentsProps: { popper: { disablePortal: true } }, children: (0, jsx_runtime_1.jsx)(Paper_1.Paper, { variant: "outlined", inert: isDisabled ? '' : undefined, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [header && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.CardHeader, { children: [(0, jsx_runtime_1.jsx)(styles_1.HeaderWrapper, { children: header }), secondaryActions && ((0, jsx_runtime_1.jsx)(SecondaryActionButton_1.SecondaryActionButton, { renderActions: secondaryActions }))] }), (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] })), content, MainActions && (0, jsx_runtime_1.jsx)(MainActions, {})] }) }) }) }));
|
|
15
|
+
};
|
|
16
|
+
exports.Card = Card;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CardGridActionHandler } from '../../CardGridMainActions/types';
|
|
3
|
+
export type CardActionContextProps<TAction> = {
|
|
4
|
+
isDisabledCard?: boolean;
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
onActionClick: CardGridActionHandler<TAction>;
|
|
7
|
+
setDisabledActions: () => void;
|
|
8
|
+
removeDisabledActions: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const CardActionContext: import("react").Context<CardActionContextProps<unknown>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardActionContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.CardActionContext = (0, react_1.createContext)({
|
|
6
|
+
isDisabledCard: false,
|
|
7
|
+
isDisabled: false,
|
|
8
|
+
onActionClick: () => undefined,
|
|
9
|
+
setDisabledActions: () => undefined,
|
|
10
|
+
removeDisabledActions: () => undefined,
|
|
11
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { CardGridActionHandler } from '../../../CardGridMainActions';
|
|
3
|
+
type CardActionContextProviderProps<TAction> = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onActionClick: CardGridActionHandler<TAction>;
|
|
6
|
+
isDisabledCard?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const CardActionContextProvider: <TAction>({ children, isDisabledCard, onActionClick, }: CardActionContextProviderProps<TAction>) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardActionContextProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const CardActionContext_1 = require("../CardActionContext");
|
|
7
|
+
const CardActionContextProvider = ({ children, isDisabledCard, onActionClick, }) => {
|
|
8
|
+
const [isDisabled, setDisabled] = (0, react_1.useState)(false);
|
|
9
|
+
const setDisabledActions = (0, react_1.useCallback)(() => {
|
|
10
|
+
setDisabled(true);
|
|
11
|
+
}, []);
|
|
12
|
+
const removeDisabledActions = (0, react_1.useCallback)(() => {
|
|
13
|
+
setDisabled(false);
|
|
14
|
+
}, []);
|
|
15
|
+
const contextValue = (0, react_1.useMemo)(() => ({
|
|
16
|
+
isDisabled,
|
|
17
|
+
isDisabledCard,
|
|
18
|
+
setDisabledActions,
|
|
19
|
+
removeDisabledActions,
|
|
20
|
+
onActionClick,
|
|
21
|
+
}), [
|
|
22
|
+
isDisabled,
|
|
23
|
+
setDisabledActions,
|
|
24
|
+
removeDisabledActions,
|
|
25
|
+
onActionClick,
|
|
26
|
+
isDisabledCard,
|
|
27
|
+
]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(CardActionContext_1.CardActionContext.Provider, { value: contextValue, children: children }));
|
|
29
|
+
};
|
|
30
|
+
exports.CardActionContextProvider = CardActionContextProvider;
|
package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CardActionContextProvider';
|
package/node/components/CardGridInfinite/Card/CardActionContext/CardActionContextProvider/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("./CardActionContextProvider"), exports);
|
|
@@ -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("./CardActionContext"), exports);
|
|
18
|
+
__exportStar(require("./CardActionContextProvider"), exports);
|
package/node/components/CardGridInfinite/Card/SecondaryActionButton/SecondaryActionButton.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type CardGridSecondaryActionsProps } from '../../CardGridSecondaryAction';
|
|
3
|
+
type SecondaryActionButtonProps<TAction> = {
|
|
4
|
+
renderActions: (props: Omit<CardGridSecondaryActionsProps<TAction>, 'mobileTitle'>) => ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const SecondaryActionButton: <TAction>({ renderActions, }: SecondaryActionButtonProps<TAction>) => JSX.Element;
|
|
7
|
+
export {};
|