@alfalab/core-components-universal-modal 3.0.5 → 3.0.6-alfasans
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/Context.d.ts +0 -1
- package/components/content/base-content/index.css +1 -1
- package/components/content/base-content/index.module.css.js +1 -1
- package/components/content/desktop/desktop.css +2 -2
- package/components/content/desktop/desktop.module.css.js +1 -1
- package/components/content/mobile/Component.mobile.d.ts +1 -1
- package/components/content/mobile/mobile.css +3 -3
- package/components/content/mobile/mobile.module.css.js +1 -1
- package/components/content/responsive/Component.responsive.js.map +1 -1
- package/components/footer/base-footer/index.css +3 -3
- package/components/footer/base-footer/index.module.css.js +1 -1
- package/components/footer/base-footer/index.module.css.js.map +1 -1
- package/components/footer/desktop/desktop.css +1 -1
- package/components/footer/desktop/desktop.module.css.js +1 -1
- package/components/footer/desktop/layout.css +9 -9
- package/components/footer/desktop/layout.module.css.js +1 -1
- package/components/footer/mobile/Component.mobile.d.ts +1 -1
- package/components/footer/mobile/layout.mobile.css +8 -8
- package/components/footer/mobile/layout.mobile.module.css.js +1 -1
- package/components/footer/mobile/mobile.css +2 -2
- package/components/footer/mobile/mobile.module.css.js +1 -1
- package/components/footer/responsive/Component.responsive.js.map +1 -1
- package/components/header/base-header/index.css +4 -4
- package/components/header/base-header/index.module.css.js +1 -1
- package/components/header/base-header/index.module.css.js.map +1 -1
- package/components/header/base-header/useBaseHeader.d.ts +2 -2
- package/components/header/base-header/useBaseHeader.js.map +1 -1
- package/components/header/desktop/desktop.css +16 -11
- package/components/header/desktop/desktop.module.css.js +1 -1
- package/components/header/mobile/Component.mobile.d.ts +1 -1
- package/components/header/mobile/mobile.css +12 -9
- package/components/header/mobile/mobile.module.css.js +1 -1
- package/components/header/mobile/mobile.module.css.js.map +1 -1
- package/components/header/responsive/Component.responsive.js.map +1 -1
- package/cssm/Context.d.ts +0 -1
- package/cssm/components/content/mobile/Component.mobile.d.ts +1 -1
- package/cssm/components/content/responsive/Component.responsive.js.map +1 -1
- package/cssm/components/footer/mobile/Component.mobile.d.ts +1 -1
- package/cssm/components/footer/responsive/Component.responsive.js.map +1 -1
- package/cssm/components/header/base-header/useBaseHeader.d.ts +2 -3
- package/cssm/components/header/base-header/useBaseHeader.js.map +1 -1
- package/cssm/components/header/desktop/desktop.module.css +11 -6
- package/cssm/components/header/mobile/Component.mobile.d.ts +1 -1
- package/cssm/components/header/mobile/mobile.module.css +9 -6
- package/cssm/components/header/responsive/Component.responsive.js.map +1 -1
- package/cssm/desktop/Component.desktop.js.map +1 -1
- package/cssm/desktop/context/index.d.ts +0 -1
- package/cssm/desktop/hooks/use-modal-highlighted.js.map +1 -1
- package/cssm/desktop/hooks/use-outside-scroll.js.map +1 -1
- package/cssm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
- package/cssm/desktop/hooks/useModalWheel.js.map +1 -1
- package/cssm/desktop/types/context.d.ts +1 -1
- package/cssm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
- package/cssm/desktop/utils/get-height-style.d.ts +1 -1
- package/cssm/desktop/utils/get-height-style.js +1 -1
- package/cssm/desktop/utils/get-height-style.js.map +1 -1
- package/cssm/desktop/utils/get-margin-styles.js.map +1 -1
- package/cssm/desktop/utils/get-max-height-style.d.ts +1 -1
- package/cssm/desktop/utils/get-width-style.d.ts +1 -1
- package/cssm/desktop/utils/get-width-style.js +1 -1
- package/cssm/desktop/utils/get-width-style.js.map +1 -1
- package/cssm/desktop/utils/set-footer-and-header-refs.js +11 -2
- package/cssm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
- package/cssm/typings/margin-type.d.ts +1 -1
- package/desktop/Component.desktop.js.map +1 -1
- package/desktop/components/center-modal/index.css +521 -521
- package/desktop/components/center-modal/index.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/components/modal-content/modal-content.css +4 -4
- package/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
- package/desktop/components/side-modal/index.css +523 -523
- package/desktop/components/side-modal/index.module.css.js +1 -1
- package/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/context/index.d.ts +0 -1
- package/desktop/hooks/use-modal-highlighted.js.map +1 -1
- package/desktop/hooks/use-outside-scroll.js.map +1 -1
- package/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
- package/desktop/hooks/useModalWheel.js.map +1 -1
- package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/desktop/types/context.d.ts +1 -1
- package/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
- package/desktop/utils/get-height-style.d.ts +1 -1
- package/desktop/utils/get-height-style.js +1 -1
- package/desktop/utils/get-height-style.js.map +1 -1
- package/desktop/utils/get-margin-styles.js.map +1 -1
- package/desktop/utils/get-max-height-style.d.ts +1 -1
- package/desktop/utils/get-width-style.d.ts +1 -1
- package/desktop/utils/get-width-style.js +1 -1
- package/desktop/utils/get-width-style.js.map +1 -1
- package/desktop/utils/set-footer-and-header-refs.js +11 -2
- package/desktop/utils/set-footer-and-header-refs.js.map +1 -1
- package/esm/Context.d.ts +0 -1
- package/esm/components/content/base-content/index.css +1 -1
- package/esm/components/content/base-content/index.module.css.js +1 -1
- package/esm/components/content/desktop/desktop.css +2 -2
- package/esm/components/content/desktop/desktop.module.css.js +1 -1
- package/esm/components/content/mobile/Component.mobile.d.ts +1 -1
- package/esm/components/content/mobile/mobile.css +3 -3
- package/esm/components/content/mobile/mobile.module.css.js +1 -1
- package/esm/components/content/responsive/Component.responsive.js.map +1 -1
- package/esm/components/footer/base-footer/index.css +3 -3
- package/esm/components/footer/base-footer/index.module.css.js +1 -1
- package/esm/components/footer/base-footer/index.module.css.js.map +1 -1
- package/esm/components/footer/desktop/desktop.css +1 -1
- package/esm/components/footer/desktop/desktop.module.css.js +1 -1
- package/esm/components/footer/desktop/layout.css +9 -9
- package/esm/components/footer/desktop/layout.module.css.js +1 -1
- package/esm/components/footer/mobile/Component.mobile.d.ts +1 -1
- package/esm/components/footer/mobile/layout.mobile.css +8 -8
- package/esm/components/footer/mobile/layout.mobile.module.css.js +1 -1
- package/esm/components/footer/mobile/mobile.css +2 -2
- package/esm/components/footer/mobile/mobile.module.css.js +1 -1
- package/esm/components/footer/responsive/Component.responsive.js.map +1 -1
- package/esm/components/header/base-header/index.css +4 -4
- package/esm/components/header/base-header/index.module.css.js +1 -1
- package/esm/components/header/base-header/index.module.css.js.map +1 -1
- package/esm/components/header/base-header/useBaseHeader.d.ts +2 -3
- package/esm/components/header/base-header/useBaseHeader.js.map +1 -1
- package/esm/components/header/desktop/desktop.css +16 -11
- package/esm/components/header/desktop/desktop.module.css.js +1 -1
- package/esm/components/header/mobile/Component.mobile.d.ts +1 -1
- package/esm/components/header/mobile/mobile.css +12 -9
- package/esm/components/header/mobile/mobile.module.css.js +1 -1
- package/esm/components/header/mobile/mobile.module.css.js.map +1 -1
- package/esm/components/header/responsive/Component.responsive.js.map +1 -1
- package/esm/desktop/Component.desktop.js.map +1 -1
- package/esm/desktop/components/center-modal/index.css +521 -521
- package/esm/desktop/components/center-modal/index.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/components/modal-content/modal-content.css +4 -4
- package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/esm/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
- package/esm/desktop/components/side-modal/index.css +523 -523
- package/esm/desktop/components/side-modal/index.module.css.js +1 -1
- package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/context/index.d.ts +0 -1
- package/esm/desktop/hooks/use-modal-highlighted.js.map +1 -1
- package/esm/desktop/hooks/use-outside-scroll.js.map +1 -1
- package/esm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
- package/esm/desktop/hooks/useModalWheel.js.map +1 -1
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/esm/desktop/types/context.d.ts +1 -1
- package/esm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
- package/esm/desktop/utils/get-height-style.d.ts +1 -1
- package/esm/desktop/utils/get-height-style.js +1 -1
- package/esm/desktop/utils/get-height-style.js.map +1 -1
- package/esm/desktop/utils/get-margin-styles.js.map +1 -1
- package/esm/desktop/utils/get-max-height-style.d.ts +1 -1
- package/esm/desktop/utils/get-width-style.d.ts +1 -1
- package/esm/desktop/utils/get-width-style.js +1 -1
- package/esm/desktop/utils/get-width-style.js.map +1 -1
- package/esm/desktop/utils/set-footer-and-header-refs.js +11 -2
- package/esm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
- package/esm/mobile/mobile.css +3 -3
- package/esm/mobile/mobile.module.css.js +1 -1
- package/esm/mobile/mobile.module.css.js.map +1 -1
- package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
- package/esm/mobile/transitions/transitions.mobile.css +7 -7
- package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/esm/typings/margin-type.d.ts +1 -1
- package/mobile/mobile.css +3 -3
- package/mobile/mobile.module.css.js +1 -1
- package/mobile/mobile.module.css.js.map +1 -1
- package/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
- package/mobile/transitions/transitions.mobile.css +7 -7
- package/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/modern/Context.d.ts +0 -1
- package/modern/components/content/base-content/index.css +1 -1
- package/modern/components/content/base-content/index.module.css.js +1 -1
- package/modern/components/content/desktop/desktop.css +2 -2
- package/modern/components/content/desktop/desktop.module.css.js +1 -1
- package/modern/components/content/mobile/Component.mobile.d.ts +1 -1
- package/modern/components/content/mobile/mobile.css +3 -3
- package/modern/components/content/mobile/mobile.module.css.js +1 -1
- package/modern/components/content/responsive/Component.responsive.js.map +1 -1
- package/modern/components/footer/base-footer/index.css +3 -3
- package/modern/components/footer/base-footer/index.module.css.js +1 -1
- package/modern/components/footer/base-footer/index.module.css.js.map +1 -1
- package/modern/components/footer/desktop/desktop.css +1 -1
- package/modern/components/footer/desktop/desktop.module.css.js +1 -1
- package/modern/components/footer/desktop/layout.css +9 -9
- package/modern/components/footer/desktop/layout.module.css.js +1 -1
- package/modern/components/footer/mobile/Component.mobile.d.ts +1 -1
- package/modern/components/footer/mobile/layout.mobile.css +8 -8
- package/modern/components/footer/mobile/layout.mobile.module.css.js +1 -1
- package/modern/components/footer/mobile/mobile.css +2 -2
- package/modern/components/footer/mobile/mobile.module.css.js +1 -1
- package/modern/components/footer/responsive/Component.responsive.js.map +1 -1
- package/modern/components/header/base-header/index.css +4 -4
- package/modern/components/header/base-header/index.module.css.js +1 -1
- package/modern/components/header/base-header/index.module.css.js.map +1 -1
- package/modern/components/header/base-header/useBaseHeader.d.ts +2 -3
- package/modern/components/header/base-header/useBaseHeader.js.map +1 -1
- package/modern/components/header/desktop/desktop.css +16 -11
- package/modern/components/header/desktop/desktop.module.css.js +1 -1
- package/modern/components/header/mobile/Component.mobile.d.ts +1 -1
- package/modern/components/header/mobile/mobile.css +12 -9
- package/modern/components/header/mobile/mobile.module.css.js +1 -1
- package/modern/components/header/mobile/mobile.module.css.js.map +1 -1
- package/modern/components/header/responsive/Component.responsive.js.map +1 -1
- package/modern/desktop/Component.desktop.js.map +1 -1
- package/modern/desktop/components/center-modal/index.css +521 -521
- package/modern/desktop/components/center-modal/index.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/components/modal-content/modal-content.css +4 -4
- package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/modern/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
- package/modern/desktop/components/side-modal/index.css +523 -523
- package/modern/desktop/components/side-modal/index.module.css.js +1 -1
- package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/context/index.d.ts +0 -1
- package/modern/desktop/hooks/use-modal-highlighted.js.map +1 -1
- package/modern/desktop/hooks/use-outside-scroll.js.map +1 -1
- package/modern/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
- package/modern/desktop/hooks/useModalWheel.js.map +1 -1
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/modern/desktop/types/context.d.ts +1 -1
- package/modern/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
- package/modern/desktop/utils/get-height-style.d.ts +1 -1
- package/modern/desktop/utils/get-height-style.js +1 -1
- package/modern/desktop/utils/get-height-style.js.map +1 -1
- package/modern/desktop/utils/get-margin-styles.js.map +1 -1
- package/modern/desktop/utils/get-max-height-style.d.ts +1 -1
- package/modern/desktop/utils/get-width-style.d.ts +1 -1
- package/modern/desktop/utils/get-width-style.js +1 -1
- package/modern/desktop/utils/get-width-style.js.map +1 -1
- package/modern/desktop/utils/set-footer-and-header-refs.js +10 -2
- package/modern/desktop/utils/set-footer-and-header-refs.js.map +1 -1
- package/modern/mobile/mobile.css +3 -3
- package/modern/mobile/mobile.module.css.js +1 -1
- package/modern/mobile/mobile.module.css.js.map +1 -1
- package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
- package/modern/mobile/transitions/transitions.mobile.css +7 -7
- package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/modern/typings/margin-type.d.ts +1 -1
- package/moderncssm/Context.d.ts +0 -1
- package/moderncssm/components/content/mobile/Component.mobile.d.ts +1 -1
- package/moderncssm/components/content/responsive/Component.responsive.js.map +1 -1
- package/moderncssm/components/footer/mobile/Component.mobile.d.ts +1 -1
- package/moderncssm/components/footer/responsive/Component.responsive.js.map +1 -1
- package/moderncssm/components/header/base-header/useBaseHeader.d.ts +2 -3
- package/moderncssm/components/header/base-header/useBaseHeader.js.map +1 -1
- package/moderncssm/components/header/desktop/desktop.module.css +8 -4
- package/moderncssm/components/header/mobile/Component.mobile.d.ts +1 -1
- package/moderncssm/components/header/mobile/mobile.module.css +6 -4
- package/moderncssm/components/header/responsive/Component.responsive.js.map +1 -1
- package/moderncssm/desktop/Component.desktop.js.map +1 -1
- package/moderncssm/desktop/context/index.d.ts +0 -1
- package/moderncssm/desktop/hooks/use-modal-highlighted.js.map +1 -1
- package/moderncssm/desktop/hooks/use-outside-scroll.js.map +1 -1
- package/moderncssm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
- package/moderncssm/desktop/hooks/useModalWheel.js.map +1 -1
- package/moderncssm/desktop/types/context.d.ts +1 -1
- package/moderncssm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
- package/moderncssm/desktop/utils/get-height-style.d.ts +1 -1
- package/moderncssm/desktop/utils/get-height-style.js +1 -1
- package/moderncssm/desktop/utils/get-height-style.js.map +1 -1
- package/moderncssm/desktop/utils/get-margin-styles.js.map +1 -1
- package/moderncssm/desktop/utils/get-max-height-style.d.ts +1 -1
- package/moderncssm/desktop/utils/get-width-style.d.ts +1 -1
- package/moderncssm/desktop/utils/get-width-style.js +1 -1
- package/moderncssm/desktop/utils/get-width-style.js.map +1 -1
- package/moderncssm/desktop/utils/set-footer-and-header-refs.js +10 -2
- package/moderncssm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
- package/moderncssm/typings/margin-type.d.ts +1 -1
- package/package.json +9 -9
- package/src/components/footer/base-footer/index.module.css +1 -1
- package/src/components/header/base-header/index.module.css +1 -1
- package/src/components/header/mobile/mobile.module.css +1 -1
- package/src/desktop/components/modal-content/modal-content.module.css +1 -1
- package/src/desktop/components/side-modal/side-modal.module.css +1 -1
- package/src/desktop/styles/transitions/full-size-backdrop-transitions.module.css +1 -1
- package/src/desktop/utils/get-height-style.ts +1 -1
- package/src/desktop/utils/get-width-style.ts +1 -1
- package/src/desktop/utils/set-footer-and-header-refs.ts +13 -5
- package/src/mobile/mobile.module.css +1 -1
- package/src/mobile/transitions/right-side-transitions.mobile.module.css +1 -1
- package/src/vars.css +1 -1
- package/typings/margin-type.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-modal-highlighted.js","sources":["../../../src/desktop/hooks/use-modal-highlighted.ts"],"sourcesContent":["import { type RefObject, useContext, useEffect } from 'react';\n\nimport { type ScrollbarProps } from '@alfalab/core-components-scrollbar';\n\nimport { ModalContext } from '../../Context';\n\ninterface Params {\n scrollbarContentNodeRef: RefObject<HTMLDivElement>;\n scrollableNodeRef: RefObject<HTMLDivElement>;\n}\n\n/**\n * Расчет overlap состояния\n * Этот функционал есть в base-modal, но так как в desktop версии используется кастомный scroll необходимо обрабатывать это в ручную\n */\nexport const useModalHighlighted = (params: Params) => {\n const { scrollbarContentNodeRef, scrollableNodeRef } = params;\n\n const {\n setHeaderHighlighted: setModalHeaderHighlighted,\n setFooterHighlighted: setModalFooterHighlighted,\n } = useContext(ModalContext);\n\n const handleScroll: ScrollbarProps['onContentScroll'] = (e) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n\n const isElementFullScrolled = scrollHeight - scrollTop === clientHeight;\n\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(scrollTop > 0);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(!isElementFullScrolled);\n }\n };\n\n // Очищаем overlap значения в контексте\n useEffect(\n () => () => {\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(false);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(false);\n }\n },\n [setModalHeaderHighlighted, setModalFooterHighlighted],\n );\n\n // Расчет overlap футера при resize событии\n useEffect(() => {\n const resizeObserver = new ResizeObserver(() => {\n const contentHeight = scrollbarContentNodeRef.current?.clientHeight || 0;\n const wrapperHeight = scrollableNodeRef.current?.clientHeight || 0;\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(contentHeight > wrapperHeight);\n }\n });\n\n if (scrollbarContentNodeRef.current) {\n resizeObserver.observe(scrollbarContentNodeRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setModalFooterHighlighted]);\n\n return { handleScroll };\n};\n"],"names":[],"mappings":";;;AAWA;;;AAGG;AACU,MAAA,mBAAmB,GAAG,CAAC,MAAc,KAAI;AAClD,IAAA,MAAM,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,GAAG,MAAM;AAE7D,IAAA,MAAM,EACF,oBAAoB,EAAE,yBAAyB,EAC/C,oBAAoB,EAAE,yBAAyB,GAClD,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,YAAY,GAAsC,CAAC,CAAC,KAAI;AAC1D,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QACzC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM;AAExD,QAAA,MAAM,qBAAqB,GAAG,YAAY,GAAG,SAAS,KAAK,YAAY;
|
|
1
|
+
{"version":3,"file":"use-modal-highlighted.js","sources":["../../../src/desktop/hooks/use-modal-highlighted.ts"],"sourcesContent":["import { type RefObject, useContext, useEffect } from 'react';\n\nimport { type ScrollbarProps } from '@alfalab/core-components-scrollbar';\n\nimport { ModalContext } from '../../Context';\n\ninterface Params {\n scrollbarContentNodeRef: RefObject<HTMLDivElement>;\n scrollableNodeRef: RefObject<HTMLDivElement>;\n}\n\n/**\n * Расчет overlap состояния\n * Этот функционал есть в base-modal, но так как в desktop версии используется кастомный scroll необходимо обрабатывать это в ручную\n */\nexport const useModalHighlighted = (params: Params) => {\n const { scrollbarContentNodeRef, scrollableNodeRef } = params;\n\n const {\n setHeaderHighlighted: setModalHeaderHighlighted,\n setFooterHighlighted: setModalFooterHighlighted,\n } = useContext(ModalContext);\n\n const handleScroll: ScrollbarProps['onContentScroll'] = (e) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n\n const isElementFullScrolled = scrollHeight - scrollTop === clientHeight;\n\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(scrollTop > 0);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(!isElementFullScrolled);\n }\n };\n\n // Очищаем overlap значения в контексте\n useEffect(\n () => () => {\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(false);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(false);\n }\n },\n [setModalHeaderHighlighted, setModalFooterHighlighted],\n );\n\n // Расчет overlap футера при resize событии\n useEffect(() => {\n const resizeObserver = new ResizeObserver(() => {\n const contentHeight = scrollbarContentNodeRef.current?.clientHeight || 0;\n const wrapperHeight = scrollableNodeRef.current?.clientHeight || 0;\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(contentHeight > wrapperHeight);\n }\n });\n\n if (scrollbarContentNodeRef.current) {\n resizeObserver.observe(scrollbarContentNodeRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setModalFooterHighlighted]);\n\n return { handleScroll };\n};\n"],"names":[],"mappings":";;;AAWA;;;AAGG;AACU,MAAA,mBAAmB,GAAG,CAAC,MAAc,KAAI;AAClD,IAAA,MAAM,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,GAAG,MAAM;AAE7D,IAAA,MAAM,EACF,oBAAoB,EAAE,yBAAyB,EAC/C,oBAAoB,EAAE,yBAAyB,GAClD,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,YAAY,GAAsC,CAAC,CAAC,KAAI;AAC1D,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QACzC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM;AAExD,QAAA,MAAM,qBAAqB,GAAG,YAAY,GAAG,SAAS,KAAK,YAAY;QAEvE,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,SAAS,GAAG,CAAC,CAAC;;QAG5C,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,CAAC,qBAAqB,CAAC;;AAEzD,KAAC;;AAGD,IAAA,SAAS,CACL,MAAM,MAAK;QACP,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;;QAGpC,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;;AAExC,KAAC,EACD,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CACzD;;IAGD,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,MAAK;YAC3C,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;YACxE,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;YAElE,IAAI,yBAAyB,EAAE;AAC3B,gBAAA,yBAAyB,CAAC,aAAa,GAAG,aAAa,CAAC;;AAEhE,SAAC,CAAC;AAEF,QAAA,IAAI,uBAAuB,CAAC,OAAO,EAAE;AACjC,YAAA,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC;;AAG3D,QAAA,OAAO,MAAK;YACR,cAAc,CAAC,UAAU,EAAE;AAC/B,SAAC;;AAEL,KAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC;IAE/B,OAAO,EAAE,YAAY,EAAE;AAC3B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-outside-scroll.js","sources":["../../../src/desktop/hooks/use-outside-scroll.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\ninterface Params {\n scrollableNodeRef: RefObject<HTMLDivElement>;\n wheelDeltaY: number;\n}\n\n/** Изменение позиции скролла */\nexport const useOutsideScroll = (params: Params) => {\n const { scrollableNodeRef, wheelDeltaY } = params;\n\n useEffect(() => {\n if (scrollableNodeRef.current) {\n scrollableNodeRef.current.scrollBy({\n top: wheelDeltaY,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wheelDeltaY]);\n};\n"],"names":[],"mappings":";;AAOA;AACa,MAAA,gBAAgB,GAAG,CAAC,MAAc,KAAI;AAC/C,IAAA,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,MAAM;IAEjD,SAAS,CAAC,MAAK;
|
|
1
|
+
{"version":3,"file":"use-outside-scroll.js","sources":["../../../src/desktop/hooks/use-outside-scroll.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\ninterface Params {\n scrollableNodeRef: RefObject<HTMLDivElement>;\n wheelDeltaY: number;\n}\n\n/** Изменение позиции скролла */\nexport const useOutsideScroll = (params: Params) => {\n const { scrollableNodeRef, wheelDeltaY } = params;\n\n useEffect(() => {\n if (scrollableNodeRef.current) {\n scrollableNodeRef.current.scrollBy({\n top: wheelDeltaY,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wheelDeltaY]);\n};\n"],"names":[],"mappings":";;AAOA;AACa,MAAA,gBAAgB,GAAG,CAAC,MAAc,KAAI;AAC/C,IAAA,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,MAAM;IAEjD,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,iBAAiB,CAAC,OAAO,EAAE;AAC3B,YAAA,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC/B,gBAAA,GAAG,EAAE,WAAW;AACnB,aAAA,CAAC;;;AAGV,KAAC,EAAE,CAAC,WAAW,CAAC,CAAC;AACrB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-set-scrollbar-height.js","sources":["../../../src/desktop/hooks/use-set-scrollbar-height.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\nimport { SCROLLBAR_DEFAULT_GAP } from '../constants';\n\ninterface Params {\n scrollbarRef: RefObject<HTMLDivElement>;\n verticalBarRef: RefObject<HTMLDivElement>;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает размер полосы прокрутки в зависимости от наличия хедера и футера */\nexport const useSetScrollbarHeight = (params: Params) => {\n const { scrollbarRef, verticalBarRef, headerElementRef, footerElementRef } = params;\n\n useEffect(() => {\n if (scrollbarRef.current) {\n const verticalBar = verticalBarRef.current;\n\n if (verticalBar) {\n const headerHeight = headerElementRef?.current?.offsetHeight || 0;\n const footerHeight = footerElementRef?.current?.offsetHeight || 0;\n\n let topGap;\n let topOffset;\n let bottomGap;\n\n if (headerHeight) {\n // если есть header уменьшаем размер скролла на величину хедера и добавляем отступ сверху\n topGap = headerHeight;\n topOffset = headerHeight;\n } else {\n // иначе уменьшаем размер скролла и увеличиваем отступ на величину скругления\n topGap = SCROLLBAR_DEFAULT_GAP;\n topOffset = SCROLLBAR_DEFAULT_GAP;\n }\n\n if (footerHeight) {\n // если есть footer уменьшаем размер скролла на величину футера\n bottomGap = footerHeight;\n } else {\n // иначе уменьшаем размер на величину скругления\n bottomGap = SCROLLBAR_DEFAULT_GAP;\n }\n\n verticalBar.style.height = `calc(100% - ${topGap}px - ${bottomGap}px)`;\n verticalBar.style.top = `${topOffset}px`;\n }\n }\n });\n};\n"],"names":[],"mappings":";;;AAWA;AACa,MAAA,qBAAqB,GAAG,CAAC,MAAc,KAAI;IACpD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAEnF,SAAS,CAAC,MAAK;
|
|
1
|
+
{"version":3,"file":"use-set-scrollbar-height.js","sources":["../../../src/desktop/hooks/use-set-scrollbar-height.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\nimport { SCROLLBAR_DEFAULT_GAP } from '../constants';\n\ninterface Params {\n scrollbarRef: RefObject<HTMLDivElement>;\n verticalBarRef: RefObject<HTMLDivElement>;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает размер полосы прокрутки в зависимости от наличия хедера и футера */\nexport const useSetScrollbarHeight = (params: Params) => {\n const { scrollbarRef, verticalBarRef, headerElementRef, footerElementRef } = params;\n\n useEffect(() => {\n if (scrollbarRef.current) {\n const verticalBar = verticalBarRef.current;\n\n if (verticalBar) {\n const headerHeight = headerElementRef?.current?.offsetHeight || 0;\n const footerHeight = footerElementRef?.current?.offsetHeight || 0;\n\n let topGap;\n let topOffset;\n let bottomGap;\n\n if (headerHeight) {\n // если есть header уменьшаем размер скролла на величину хедера и добавляем отступ сверху\n topGap = headerHeight;\n topOffset = headerHeight;\n } else {\n // иначе уменьшаем размер скролла и увеличиваем отступ на величину скругления\n topGap = SCROLLBAR_DEFAULT_GAP;\n topOffset = SCROLLBAR_DEFAULT_GAP;\n }\n\n if (footerHeight) {\n // если есть footer уменьшаем размер скролла на величину футера\n bottomGap = footerHeight;\n } else {\n // иначе уменьшаем размер на величину скругления\n bottomGap = SCROLLBAR_DEFAULT_GAP;\n }\n\n verticalBar.style.height = `calc(100% - ${topGap}px - ${bottomGap}px)`;\n verticalBar.style.top = `${topOffset}px`;\n }\n }\n });\n};\n"],"names":[],"mappings":";;;AAWA;AACa,MAAA,qBAAqB,GAAG,CAAC,MAAc,KAAI;IACpD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAEnF,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE;AACtB,YAAA,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;YAE1C,IAAI,WAAW,EAAE;gBACb,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;gBACjE,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;AAEjE,gBAAA,IAAI,MAAM;AACV,gBAAA,IAAI,SAAS;AACb,gBAAA,IAAI,SAAS;gBAEb,IAAI,YAAY,EAAE;;oBAEd,MAAM,GAAG,YAAY;oBACrB,SAAS,GAAG,YAAY;;qBACrB;;oBAEH,MAAM,GAAG,qBAAqB;oBAC9B,SAAS,GAAG,qBAAqB;;gBAGrC,IAAI,YAAY,EAAE;;oBAEd,SAAS,GAAG,YAAY;;qBACrB;;oBAEH,SAAS,GAAG,qBAAqB;;gBAGrC,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe,MAAM,CAAA,KAAA,EAAQ,SAAS,CAAA,GAAA,CAAK;gBACtE,WAAW,CAAC,KAAK,CAAC,GAAG,GAAG,CAAG,EAAA,SAAS,IAAI;;;AAGpD,KAAC,CAAC;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModalWheel.js","sources":["../../../src/desktop/hooks/useModalWheel.ts"],"sourcesContent":["import { useState, type WheelEvent } from 'react';\n\nexport const useModalWheel = (overlay: boolean) => {\n const [wheelDeltaY, setWheelDeltaY] = useState<number>(0);\n\n // передаем e.deltaY от события на элементе dialog компонента base-modal\n const handleWheel = (e: WheelEvent<HTMLElement>) => {\n const target = e.target as HTMLDivElement;\n\n if (target.getAttribute('role') === 'dialog' && overlay) {\n setWheelDeltaY(e.deltaY);\n }\n };\n\n return { wheelDeltaY, handleWheel };\n};\n"],"names":[],"mappings":";;AAEa,MAAA,aAAa,GAAG,CAAC,OAAgB,KAAI;IAC9C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;;AAGzD,IAAA,MAAM,WAAW,GAAG,CAAC,CAA0B,KAAI;AAC/C,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QAEzC,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,EAAE;AACrD,YAAA,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"useModalWheel.js","sources":["../../../src/desktop/hooks/useModalWheel.ts"],"sourcesContent":["import { useState, type WheelEvent } from 'react';\n\nexport const useModalWheel = (overlay: boolean) => {\n const [wheelDeltaY, setWheelDeltaY] = useState<number>(0);\n\n // передаем e.deltaY от события на элементе dialog компонента base-modal\n const handleWheel = (e: WheelEvent<HTMLElement>) => {\n const target = e.target as HTMLDivElement;\n\n if (target.getAttribute('role') === 'dialog' && overlay) {\n setWheelDeltaY(e.deltaY);\n }\n };\n\n return { wheelDeltaY, handleWheel };\n};\n"],"names":[],"mappings":";;AAEa,MAAA,aAAa,GAAG,CAAC,OAAgB,KAAI;IAC9C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;;AAGzD,IAAA,MAAM,WAAW,GAAG,CAAC,CAA0B,KAAI;AAC/C,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QAEzC,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,EAAE;AACrD,YAAA,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;;AAEhC,KAAC;AAED,IAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE;AACvC;;;;"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--universal-modal-backdrop-visible-background: var(--color-light-overlay-default);
|
|
6
6
|
--universal-modal-backdrop-hidden-background: transparent;
|
|
7
7
|
}
|
|
8
|
-
@keyframes universal-
|
|
8
|
+
@keyframes universal-modal__step_1_snxei {
|
|
9
9
|
0% {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
opacity: 0.5;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
@keyframes universal-
|
|
16
|
+
@keyframes universal-modal__step_2_snxei {
|
|
17
17
|
0% {
|
|
18
18
|
opacity: 0.5;
|
|
19
19
|
}
|
|
@@ -22,26 +22,26 @@
|
|
|
22
22
|
background-color: var(--universal-modal-backdrop-hidden-background);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
.universal-
|
|
26
|
-
.universal-
|
|
25
|
+
.universal-modal__appear_snxei,
|
|
26
|
+
.universal-modal__enter_snxei {
|
|
27
27
|
background-color: var(--universal-modal-backdrop-hidden-background);
|
|
28
28
|
}
|
|
29
|
-
.universal-
|
|
30
|
-
.universal-
|
|
31
|
-
.universal-
|
|
32
|
-
.universal-
|
|
29
|
+
.universal-modal__appearActive_snxei,
|
|
30
|
+
.universal-modal__enterActive_snxei,
|
|
31
|
+
.universal-modal__appearDone_snxei,
|
|
32
|
+
.universal-modal__enterDone_snxei {
|
|
33
33
|
background-color: var(--universal-modal-backdrop-visible-background);
|
|
34
34
|
}
|
|
35
|
-
.universal-
|
|
35
|
+
.universal-modal__exit_snxei {
|
|
36
36
|
background-color: var(--universal-modal-backdrop-visible-background);
|
|
37
37
|
}
|
|
38
|
-
.universal-
|
|
38
|
+
.universal-modal__exitActive_snxei {
|
|
39
39
|
opacity: 1;
|
|
40
40
|
animation:
|
|
41
|
-
universal-
|
|
42
|
-
universal-
|
|
41
|
+
universal-modal__step_1_snxei 200ms cubic-bezier(0, 0, 1, 0),
|
|
42
|
+
universal-modal__step_2_snxei 200ms cubic-bezier(0, 0, 0, 1) 200ms forwards;
|
|
43
43
|
}
|
|
44
|
-
.universal-
|
|
44
|
+
.universal-modal__exitDone_snxei {
|
|
45
45
|
opacity: 0;
|
|
46
46
|
background-color: var(--universal-modal-backdrop-hidden-background);
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './full-size-backdrop-transitions.css';
|
|
2
2
|
|
|
3
|
-
const fullSizeBackdropTransitions = {"appear":"universal-
|
|
3
|
+
const fullSizeBackdropTransitions = {"appear":"universal-modal__appear_snxei","enter":"universal-modal__enter_snxei","appearActive":"universal-modal__appearActive_snxei","enterActive":"universal-modal__enterActive_snxei","appearDone":"universal-modal__appearDone_snxei","enterDone":"universal-modal__enterDone_snxei","exit":"universal-modal__exit_snxei","exitActive":"universal-modal__exitActive_snxei","step_1":"universal-modal__step_1_snxei","step_2":"universal-modal__step_2_snxei","exitDone":"universal-modal__exitDone_snxei"};
|
|
4
4
|
|
|
5
5
|
export { fullSizeBackdropTransitions as default };
|
|
6
6
|
//# sourceMappingURL=full-size-backdrop-transitions.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full-size-backdrop-transitions.module.css.js","sources":["../../../src/desktop/styles/transitions/full-size-backdrop-transitions.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"full-size-backdrop-transitions.module.css.js","sources":["../../../src/desktop/styles/transitions/full-size-backdrop-transitions.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n --universal-modal-backdrop-visible-background: var(--color-light-overlay-default);\n --universal-modal-backdrop-hidden-background: transparent;\n}\n\n@keyframes step_1 {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n\n@keyframes step_2 {\n 0% {\n opacity: 0.5;\n }\n 100% {\n opacity: 0;\n background-color: var(--universal-modal-backdrop-hidden-background);\n }\n}\n\n.appear,\n.enter {\n background-color: var(--universal-modal-backdrop-hidden-background);\n}\n\n.appearActive,\n.enterActive,\n.appearDone,\n.enterDone {\n background-color: var(--universal-modal-backdrop-visible-background);\n}\n\n.exit {\n background-color: var(--universal-modal-backdrop-visible-background);\n}\n\n.exitActive {\n opacity: 1;\n animation:\n step_1 200ms cubic-bezier(0, 0, 1, 0),\n step_2 200ms cubic-bezier(0, 0, 0, 1) 200ms forwards;\n}\n\n.exitDone {\n opacity: 0;\n background-color: var(--universal-modal-backdrop-hidden-background);\n}\n"],"names":[],"mappings":";;AAEgB,oCAAe,CAAC,QAAQ,CAAC,+BAA+B,CAAC,OAAO,CAAC,8BAA8B,CAAC,cAAc,CAAC,qCAAqC,CAAC,aAAa,CAAC,oCAAoC,CAAC,YAAY,CAAC,mCAAmC,CAAC,WAAW,CAAC,kCAAkC,CAAC,MAAM,CAAC,6BAA6B,CAAC,YAAY,CAAC,mCAAmC,CAAC,QAAQ,CAAC,+BAA+B,CAAC,QAAQ,CAAC,+BAA+B,CAAC,UAAU,CAAC,iCAAiC,CAAC;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.universal-
|
|
2
|
-
.universal-
|
|
1
|
+
.universal-modal__appear_1yg03,
|
|
2
|
+
.universal-modal__enter_1yg03 {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateY(40px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.universal-
|
|
8
|
-
.universal-
|
|
7
|
+
.universal-modal__appearActive_1yg03,
|
|
8
|
+
.universal-modal__enterActive_1yg03 {
|
|
9
9
|
opacity: 1;
|
|
10
10
|
transform: translateY(0);
|
|
11
11
|
transition:
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
transform 200ms cubic-bezier(0, 0, 0, 1);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.universal-
|
|
16
|
+
.universal-modal__exit_1yg03 {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateY(0);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.universal-
|
|
22
|
-
.universal-
|
|
21
|
+
.universal-modal__exitActive_1yg03,
|
|
22
|
+
.universal-modal__exitDone_1yg03 {
|
|
23
23
|
opacity: 0;
|
|
24
24
|
transform: translateY(40px);
|
|
25
25
|
transition:
|
package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './full-size-vertical-bottom-transitions.css';
|
|
2
2
|
|
|
3
|
-
const fullSizeVerticalBottomTransitions = {"appear":"universal-
|
|
3
|
+
const fullSizeVerticalBottomTransitions = {"appear":"universal-modal__appear_1yg03","enter":"universal-modal__enter_1yg03","appearActive":"universal-modal__appearActive_1yg03","enterActive":"universal-modal__enterActive_1yg03","exit":"universal-modal__exit_1yg03","exitActive":"universal-modal__exitActive_1yg03","exitDone":"universal-modal__exitDone_1yg03"};
|
|
4
4
|
|
|
5
5
|
export { fullSizeVerticalBottomTransitions as default };
|
|
6
6
|
//# sourceMappingURL=full-size-vertical-bottom-transitions.module.css.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.universal-
|
|
2
|
-
.universal-
|
|
1
|
+
.universal-modal__appear_b1il8,
|
|
2
|
+
.universal-modal__enter_b1il8 {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.universal-
|
|
7
|
-
.universal-
|
|
6
|
+
.universal-modal__appearActive_b1il8,
|
|
7
|
+
.universal-modal__enterActive_b1il8 {
|
|
8
8
|
opacity: 1;
|
|
9
9
|
transition: opacity 200ms cubic-bezier(0, 0, 0, 1);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.universal-
|
|
12
|
+
.universal-modal__exit_b1il8 {
|
|
13
13
|
opacity: 1;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.universal-
|
|
17
|
-
.universal-
|
|
16
|
+
.universal-modal__exitActive_b1il8,
|
|
17
|
+
.universal-modal__exitDone_b1il8 {
|
|
18
18
|
opacity: 0;
|
|
19
19
|
transition: opacity 200ms cubic-bezier(0, 0, 1, 0);
|
|
20
20
|
}
|
package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './full-size-vertical-center-transitions.css';
|
|
2
2
|
|
|
3
|
-
const fullSizeVerticalCenterTransitions = {"appear":"universal-
|
|
3
|
+
const fullSizeVerticalCenterTransitions = {"appear":"universal-modal__appear_b1il8","enter":"universal-modal__enter_b1il8","appearActive":"universal-modal__appearActive_b1il8","enterActive":"universal-modal__enterActive_b1il8","exit":"universal-modal__exit_b1il8","exitActive":"universal-modal__exitActive_b1il8","exitDone":"universal-modal__exitDone_b1il8"};
|
|
4
4
|
|
|
5
5
|
export { fullSizeVerticalCenterTransitions as default };
|
|
6
6
|
//# sourceMappingURL=full-size-vertical-center-transitions.module.css.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.universal-
|
|
2
|
-
.universal-
|
|
1
|
+
.universal-modal__appear_1m6jk,
|
|
2
|
+
.universal-modal__enter_1m6jk {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateY(-40px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.universal-
|
|
8
|
-
.universal-
|
|
7
|
+
.universal-modal__appearActive_1m6jk,
|
|
8
|
+
.universal-modal__enterActive_1m6jk {
|
|
9
9
|
opacity: 1;
|
|
10
10
|
transform: translateY(0);
|
|
11
11
|
transition:
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
transform 200ms cubic-bezier(0, 0, 0, 1);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.universal-
|
|
16
|
+
.universal-modal__exit_1m6jk {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateY(0);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.universal-
|
|
22
|
-
.universal-
|
|
21
|
+
.universal-modal__exitActive_1m6jk,
|
|
22
|
+
.universal-modal__exitDone_1m6jk {
|
|
23
23
|
opacity: 0;
|
|
24
24
|
transform: translateY(-40px);
|
|
25
25
|
transition:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './full-size-vertical-top-transitions.css';
|
|
2
2
|
|
|
3
|
-
const fullSizeVerticalTopTransitions = {"appear":"universal-
|
|
3
|
+
const fullSizeVerticalTopTransitions = {"appear":"universal-modal__appear_1m6jk","enter":"universal-modal__enter_1m6jk","appearActive":"universal-modal__appearActive_1m6jk","enterActive":"universal-modal__enterActive_1m6jk","exit":"universal-modal__exit_1m6jk","exitActive":"universal-modal__exitActive_1m6jk","exitDone":"universal-modal__exitDone_1m6jk"};
|
|
4
4
|
|
|
5
5
|
export { fullSizeVerticalTopTransitions as default };
|
|
6
6
|
//# sourceMappingURL=full-size-vertical-top-transitions.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type UniversalModalDesktopProps } from './props';
|
|
2
|
-
export
|
|
2
|
+
export type UniversalModalContextType = Required<Pick<UniversalModalDesktopProps, 'width'>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-full-size-modal-transitions.js","sources":["../../../src/desktop/utils/get-full-size-modal-transitions.ts"],"sourcesContent":["import { type TransitionProps } from 'react-transition-group/Transition';\n\nimport { type BackdropProps } from '@alfalab/core-components-backdrop';\nimport { exhaustiveCheck } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport fullSizeBackdropTransitions from '../styles/transitions/full-size-backdrop-transitions.module.css';\nimport fullSizeVerticalBottomTransitions from '../styles/transitions/full-size-vertical-bottom-transitions.module.css';\nimport fullSizeVerticalCenterTransitions from '../styles/transitions/full-size-vertical-center-transitions.module.css';\nimport fullSizeVerticalTopTransitions from '../styles/transitions/full-size-vertical-top-transitions.module.css';\n\ninterface Params {\n verticalAlign: Exclude<UniversalModalDesktopProps['verticalAlign'], undefined>;\n width: UniversalModalDesktopProps['width'];\n height: UniversalModalDesktopProps['height'];\n}\n\ninterface ReturnType {\n isFullSizeModal: boolean;\n backdropTransitions: Partial<BackdropProps>;\n componentTransitions: Partial<TransitionProps>;\n}\n\nexport const getFullSizeModalTransitions = (params: Params): ReturnType => {\n const { verticalAlign, width, height } = params;\n\n const isFullSizeModal = width === 'fullWidth' && height === 'fullHeight';\n\n const backdropTransitions = {\n timeout: {\n enter: 0,\n exit: 400,\n },\n transitionClassNames: fullSizeBackdropTransitions,\n };\n\n const getContentTransitionsClassNames = () => {\n switch (verticalAlign) {\n case 'top':\n return fullSizeVerticalTopTransitions;\n case 'bottom':\n return fullSizeVerticalBottomTransitions;\n case 'center':\n return fullSizeVerticalCenterTransitions;\n default:\n return exhaustiveCheck(verticalAlign);\n }\n };\n\n const componentTransitions = {\n timeout: {\n enter: 200,\n exit: 400,\n },\n classNames: getContentTransitionsClassNames(),\n };\n\n return {\n isFullSizeModal,\n backdropTransitions,\n componentTransitions,\n };\n};\n"],"names":[],"mappings":";;;;;;AAwBa,MAAA,2BAA2B,GAAG,CAAC,MAAc,KAAgB;IACtE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAE/C,MAAM,eAAe,GAAG,KAAK,KAAK,WAAW,IAAI,MAAM,KAAK,YAAY;AAExE,IAAA,MAAM,mBAAmB,GAAG;AACxB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;AACD,QAAA,oBAAoB,EAAE,2BAA2B;KACpD;IAED,MAAM,+BAA+B,GAAG,MAAK;
|
|
1
|
+
{"version":3,"file":"get-full-size-modal-transitions.js","sources":["../../../src/desktop/utils/get-full-size-modal-transitions.ts"],"sourcesContent":["import { type TransitionProps } from 'react-transition-group/Transition';\n\nimport { type BackdropProps } from '@alfalab/core-components-backdrop';\nimport { exhaustiveCheck } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport fullSizeBackdropTransitions from '../styles/transitions/full-size-backdrop-transitions.module.css';\nimport fullSizeVerticalBottomTransitions from '../styles/transitions/full-size-vertical-bottom-transitions.module.css';\nimport fullSizeVerticalCenterTransitions from '../styles/transitions/full-size-vertical-center-transitions.module.css';\nimport fullSizeVerticalTopTransitions from '../styles/transitions/full-size-vertical-top-transitions.module.css';\n\ninterface Params {\n verticalAlign: Exclude<UniversalModalDesktopProps['verticalAlign'], undefined>;\n width: UniversalModalDesktopProps['width'];\n height: UniversalModalDesktopProps['height'];\n}\n\ninterface ReturnType {\n isFullSizeModal: boolean;\n backdropTransitions: Partial<BackdropProps>;\n componentTransitions: Partial<TransitionProps>;\n}\n\nexport const getFullSizeModalTransitions = (params: Params): ReturnType => {\n const { verticalAlign, width, height } = params;\n\n const isFullSizeModal = width === 'fullWidth' && height === 'fullHeight';\n\n const backdropTransitions = {\n timeout: {\n enter: 0,\n exit: 400,\n },\n transitionClassNames: fullSizeBackdropTransitions,\n };\n\n const getContentTransitionsClassNames = () => {\n switch (verticalAlign) {\n case 'top':\n return fullSizeVerticalTopTransitions;\n case 'bottom':\n return fullSizeVerticalBottomTransitions;\n case 'center':\n return fullSizeVerticalCenterTransitions;\n default:\n return exhaustiveCheck(verticalAlign);\n }\n };\n\n const componentTransitions = {\n timeout: {\n enter: 200,\n exit: 400,\n },\n classNames: getContentTransitionsClassNames(),\n };\n\n return {\n isFullSizeModal,\n backdropTransitions,\n componentTransitions,\n };\n};\n"],"names":[],"mappings":";;;;;;AAwBa,MAAA,2BAA2B,GAAG,CAAC,MAAc,KAAgB;IACtE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAE/C,MAAM,eAAe,GAAG,KAAK,KAAK,WAAW,IAAI,MAAM,KAAK,YAAY;AAExE,IAAA,MAAM,mBAAmB,GAAG;AACxB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;AACD,QAAA,oBAAoB,EAAE,2BAA2B;KACpD;IAED,MAAM,+BAA+B,GAAG,MAAK;QACzC,QAAQ,aAAa;AACjB,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,8BAA8B;AACzC,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA;AACI,gBAAA,OAAO,eAAe,CAAC,aAAa,CAAC;;AAEjD,KAAC;AAED,IAAA,MAAM,oBAAoB,GAAG;AACzB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;QACD,UAAU,EAAE,+BAA+B,EAAE;KAChD;IAED,OAAO;QACH,eAAe;QACf,mBAAmB;QACnB,oBAAoB;KACvB;AACL;;;;"}
|
|
@@ -6,4 +6,4 @@ import { type UniversalModalDesktopProps } from '../types/props';
|
|
|
6
6
|
* 2. Высота строится по размеру viewport;
|
|
7
7
|
* 3. Высота строится по переданному параметру.
|
|
8
8
|
*/
|
|
9
|
-
export declare const getHeightStyle: (height: Exclude<UniversalModalDesktopProps[
|
|
9
|
+
export declare const getHeightStyle: (height: Exclude<UniversalModalDesktopProps["height"], undefined>, margin: UniversalModalDesktopProps["margin"]) => Pick<CSSProperties, "height" | "maxHeight">;
|
|
@@ -15,7 +15,7 @@ const getHeightStyle = (height, margin) => {
|
|
|
15
15
|
if (isClient()) {
|
|
16
16
|
viewportHeight = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
|
|
17
17
|
}
|
|
18
|
-
if (height
|
|
18
|
+
if (height === 'fullHeight' || height > viewportHeight) {
|
|
19
19
|
const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;
|
|
20
20
|
const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;
|
|
21
21
|
return { height: `calc(100% - ${marginTop}px - ${marginBottom}px)` };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-height-style.js","sources":["../../../src/desktop/utils/get-height-style.ts"],"sourcesContent":["import { type CSSProperties } from 'react';\n\nimport { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport { getMaxHeightStyle } from './get-max-height-style';\n\n/**\n * Передает высоту компонента для нескольких кейсов\n * 1. Высота строится по контенту;\n * 2. Высота строится по размеру viewport;\n * 3. Высота строится по переданному параметру.\n */\nexport const getHeightStyle = (\n height: Exclude<UniversalModalDesktopProps['height'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n): Pick<CSSProperties, 'height' | 'maxHeight'> => {\n if (height === 'hugContent') {\n return { maxHeight: getMaxHeightStyle(margin) };\n }\n\n let viewportHeight = 0;\n\n if (isClient()) {\n viewportHeight = Math.max(\n document.documentElement.clientHeight || 0,\n window.innerHeight || 0,\n );\n }\n\n if (height
|
|
1
|
+
{"version":3,"file":"get-height-style.js","sources":["../../../src/desktop/utils/get-height-style.ts"],"sourcesContent":["import { type CSSProperties } from 'react';\n\nimport { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport { getMaxHeightStyle } from './get-max-height-style';\n\n/**\n * Передает высоту компонента для нескольких кейсов\n * 1. Высота строится по контенту;\n * 2. Высота строится по размеру viewport;\n * 3. Высота строится по переданному параметру.\n */\nexport const getHeightStyle = (\n height: Exclude<UniversalModalDesktopProps['height'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n): Pick<CSSProperties, 'height' | 'maxHeight'> => {\n if (height === 'hugContent') {\n return { maxHeight: getMaxHeightStyle(margin) };\n }\n\n let viewportHeight = 0;\n\n if (isClient()) {\n viewportHeight = Math.max(\n document.documentElement.clientHeight || 0,\n window.innerHeight || 0,\n );\n }\n\n if (height === 'fullHeight' || height > viewportHeight) {\n const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;\n const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;\n\n return { height: `calc(100% - ${marginTop}px - ${marginBottom}px)` };\n }\n\n return { height };\n};\n"],"names":[],"mappings":";;;AAQA;;;;;AAKG;MACU,cAAc,GAAG,CAC1B,MAAgE,EAChE,MAA4C,KACC;AAC7C,IAAA,IAAI,MAAM,KAAK,YAAY,EAAE;QACzB,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE;;IAGnD,IAAI,cAAc,GAAG,CAAC;IAEtB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,cAAc,GAAG,IAAI,CAAC,GAAG,CACrB,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAC1C,MAAM,CAAC,WAAW,IAAI,CAAC,CAC1B;;IAGL,IAAI,MAAM,KAAK,YAAY,IAAI,MAAM,GAAG,cAAc,EAAE;AACpD,QAAA,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC;AAC9E,QAAA,MAAM,YAAY,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAEvF,OAAO,EAAE,MAAM,EAAE,CAAA,YAAA,EAAe,SAAS,CAAQ,KAAA,EAAA,YAAY,CAAK,GAAA,CAAA,EAAE;;IAGxE,OAAO,EAAE,MAAM,EAAE;AACrB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-margin-styles.js","sources":["../../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles } = params;\n\n if (margin) {\n return {\n [styles[`marginTop-${margin.top}`]]: hasOwnProperty(margin, 'top'),\n [styles[`marginRight-${margin.right}`]]: hasOwnProperty(margin, 'right'),\n [styles[`marginBottom-${margin.bottom}`]]: hasOwnProperty(margin, 'bottom'),\n [styles[`marginLeft-${margin.left}`]]: hasOwnProperty(margin, 'left'),\n };\n }\n\n return {};\n};\n"],"names":[],"mappings":";;AASa,MAAA,eAAe,GAAG,CAAC,MAAc,KAA6B;AACvE,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"get-margin-styles.js","sources":["../../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles } = params;\n\n if (margin) {\n return {\n [styles[`marginTop-${margin.top}`]]: hasOwnProperty(margin, 'top'),\n [styles[`marginRight-${margin.right}`]]: hasOwnProperty(margin, 'right'),\n [styles[`marginBottom-${margin.bottom}`]]: hasOwnProperty(margin, 'bottom'),\n [styles[`marginLeft-${margin.left}`]]: hasOwnProperty(margin, 'left'),\n };\n }\n\n return {};\n};\n"],"names":[],"mappings":";;AASa,MAAA,eAAe,GAAG,CAAC,MAAc,KAA6B;AACvE,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;IAEjC,IAAI,MAAM,EAAE;QACR,OAAO;AACH,YAAA,CAAC,MAAM,CAAC,CAAa,UAAA,EAAA,MAAM,CAAC,GAAG,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC;AAClE,YAAA,CAAC,MAAM,CAAC,CAAe,YAAA,EAAA,MAAM,CAAC,KAAK,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;AACxE,YAAA,CAAC,MAAM,CAAC,CAAgB,aAAA,EAAA,MAAM,CAAC,MAAM,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3E,YAAA,CAAC,MAAM,CAAC,CAAc,WAAA,EAAA,MAAM,CAAC,IAAI,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC;SACxE;;AAGL,IAAA,OAAO,EAAE;AACb;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type UniversalModalDesktopProps } from '../types/props';
|
|
2
|
-
export declare const getMaxHeightStyle: (margin: UniversalModalDesktopProps[
|
|
2
|
+
export declare const getMaxHeightStyle: (margin: UniversalModalDesktopProps["margin"]) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type UniversalModalDesktopProps } from '../types/props';
|
|
2
|
-
export declare const getWidthStyle: (width: Exclude<UniversalModalDesktopProps[
|
|
2
|
+
export declare const getWidthStyle: (width: Exclude<UniversalModalDesktopProps["width"], undefined>, margin: UniversalModalDesktopProps["margin"]) => string;
|
|
@@ -5,7 +5,7 @@ const getWidthStyle = (width, margin) => {
|
|
|
5
5
|
if (isClient()) {
|
|
6
6
|
viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
|
|
7
7
|
}
|
|
8
|
-
if (width
|
|
8
|
+
if (width === 'fullWidth' || width > viewportWidth) {
|
|
9
9
|
const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;
|
|
10
10
|
const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;
|
|
11
11
|
return `calc(100% - ${marginLeft}px - ${marginRight}px)`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-width-style.js","sources":["../../../src/desktop/utils/get-width-style.ts"],"sourcesContent":["import { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nexport const getWidthStyle = (\n width: Exclude<UniversalModalDesktopProps['width'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n) => {\n let viewportWidth = 0;\n\n if (isClient()) {\n viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n }\n\n if (width
|
|
1
|
+
{"version":3,"file":"get-width-style.js","sources":["../../../src/desktop/utils/get-width-style.ts"],"sourcesContent":["import { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nexport const getWidthStyle = (\n width: Exclude<UniversalModalDesktopProps['width'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n) => {\n let viewportWidth = 0;\n\n if (isClient()) {\n viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n }\n\n if (width === 'fullWidth' || width > viewportWidth) {\n const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;\n const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;\n\n return `calc(100% - ${marginLeft}px - ${marginRight}px)`;\n }\n\n return `${width}px`;\n};\n"],"names":[],"mappings":";;MAIa,aAAa,GAAG,CACzB,KAA8D,EAC9D,MAA4C,KAC5C;IACA,IAAI,aAAa,GAAG,CAAC;IAErB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;;IAG/F,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,GAAG,aAAa,EAAE;AAChD,QAAA,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;AACjF,QAAA,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC;AAEpF,QAAA,OAAO,CAAe,YAAA,EAAA,UAAU,CAAQ,KAAA,EAAA,WAAW,KAAK;;IAG5D,OAAO,CAAA,EAAG,KAAK,CAAA,EAAA,CAAI;AACvB;;;;"}
|
|
@@ -13,11 +13,19 @@ const setFooterAndHeaderRefs = (params) => {
|
|
|
13
13
|
const { displayName } = child.type;
|
|
14
14
|
if (displayName && isHeaderNode(displayName)) {
|
|
15
15
|
const existingRef = child;
|
|
16
|
-
return cloneElement(child, {
|
|
16
|
+
return cloneElement(child, {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
ref: mergeRefs([existingRef.ref ?? null, headerElementRef]),
|
|
20
|
+
});
|
|
17
21
|
}
|
|
18
22
|
if (displayName && isFooterNode(displayName)) {
|
|
19
23
|
const existingRef = child;
|
|
20
|
-
return cloneElement(child, {
|
|
24
|
+
return cloneElement(child, {
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26
|
+
// @ts-expect-error
|
|
27
|
+
ref: mergeRefs([existingRef.ref, footerElementRef]),
|
|
28
|
+
});
|
|
21
29
|
}
|
|
22
30
|
return child;
|
|
23
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-footer-and-header-refs.js","sources":["../../../src/desktop/utils/set-footer-and-header-refs.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type
|
|
1
|
+
{"version":3,"file":"set-footer-and-header-refs.js","sources":["../../../src/desktop/utils/set-footer-and-header-refs.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n type RefObject,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\n\nimport { type FooterDesktop } from '../../components/footer';\nimport { type HeaderDesktop } from '../../components/header';\n\nimport { isFooterNode } from './isFooterNode';\nimport { isHeaderNode } from './isHeaderNode';\n\ninterface Params {\n children: ReactNode;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает рефы в хедер и футер если они переданы в модалку (необходимы для дальнейшего расчета высоты кастомного скроллбара) */\nexport const setFooterAndHeaderRefs = (params: Params) => {\n const { children, headerElementRef, footerElementRef } = params;\n\n const enhancedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const { displayName } = child.type as typeof HeaderDesktop | typeof FooterDesktop;\n\n if (displayName && isHeaderNode(displayName)) {\n const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;\n\n return cloneElement(child, {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n ref: mergeRefs([existingRef.ref ?? null, headerElementRef]),\n });\n }\n\n if (displayName && isFooterNode(displayName)) {\n const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;\n\n return cloneElement(child, {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n ref: mergeRefs([existingRef.ref, footerElementRef]),\n });\n }\n\n return child;\n });\n\n return { enhancedChildren };\n};\n"],"names":[],"mappings":";;;;;AAuBA;AACa,MAAA,sBAAsB,GAAG,CAAC,MAAc,KAAI;IACrD,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAE/D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;AACtD,QAAA,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;AACxB,YAAA,OAAO,KAAK;;AAGhB,QAAA,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,IAAmD;AAEjF,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAqD;YAEzE,OAAO,YAAY,CAAC,KAAK,EAAE;;;AAGvB,gBAAA,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,IAAI,IAAI,EAAE,gBAAgB,CAAC,CAAC;AAC9D,aAAA,CAAC;;AAGN,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAqD;YAEzE,OAAO,YAAY,CAAC,KAAK,EAAE;;;gBAGvB,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;AACtD,aAAA,CAAC;;AAGN,QAAA,OAAO,KAAK;AAChB,KAAC,CAAC;IAEF,OAAO,EAAE,gBAAgB,EAAE;AAC/B;;;;"}
|
package/modern/mobile/mobile.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-0: 0px;
|
|
3
3
|
}
|
|
4
|
-
.universal-
|
|
4
|
+
.universal-modal__component_g52ha {
|
|
5
5
|
top: var(--gap-0);
|
|
6
6
|
height: 100%;
|
|
7
7
|
width: 100%;
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
}
|
|
14
|
-
.universal-
|
|
14
|
+
.universal-modal__component_g52ha .universal-modal__content_g52ha {
|
|
15
15
|
height: auto;
|
|
16
16
|
}
|
|
17
|
-
.universal-
|
|
17
|
+
.universal-modal__component_g52ha.universal-modal__component_g52ha {
|
|
18
18
|
position: fixed;
|
|
19
19
|
flex: 1;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './mobile.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"universal-
|
|
3
|
+
const styles = {"component":"universal-modal__component_g52ha","content":"universal-modal__content_g52ha"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=mobile.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile.module.css.js","sources":["../src/mobile/mobile.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"mobile.module.css.js","sources":["../src/mobile/mobile.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n top: var(--gap-0);\n height: 100%;\n width: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n\n & .content {\n height: auto;\n }\n}\n\n.component.component {\n position: fixed;\n flex: 1;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,kCAAkC,CAAC,SAAS,CAAC,gCAAgC,CAAC;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.universal-
|
|
2
|
-
.universal-
|
|
1
|
+
.universal-modal__appear_mjesr,
|
|
2
|
+
.universal-modal__enter_mjesr {
|
|
3
3
|
transform: translateX(100%);
|
|
4
4
|
}
|
|
5
|
-
.universal-
|
|
6
|
-
.universal-
|
|
5
|
+
.universal-modal__appearActive_mjesr,
|
|
6
|
+
.universal-modal__enterActive_mjesr {
|
|
7
7
|
transform: translateX(0);
|
|
8
8
|
transition: transform 280ms ease-in-out;
|
|
9
9
|
transition-delay: 80ms;
|
|
10
10
|
}
|
|
11
|
-
.universal-
|
|
11
|
+
.universal-modal__exit_mjesr {
|
|
12
12
|
transform: translateX(0);
|
|
13
13
|
}
|
|
14
|
-
.universal-
|
|
15
|
-
.universal-
|
|
14
|
+
.universal-modal__exitActive_mjesr,
|
|
15
|
+
.universal-modal__exitDone_mjesr {
|
|
16
16
|
transform: translateX(100%);
|
|
17
17
|
transition: transform 280ms ease-in-out;
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './right-side-transitions.mobile.css';
|
|
2
2
|
|
|
3
|
-
const rightSideTransitions = {"appear":"universal-
|
|
3
|
+
const rightSideTransitions = {"appear":"universal-modal__appear_mjesr","enter":"universal-modal__enter_mjesr","appearActive":"universal-modal__appearActive_mjesr","enterActive":"universal-modal__enterActive_mjesr","exit":"universal-modal__exit_mjesr","exitActive":"universal-modal__exitActive_mjesr","exitDone":"universal-modal__exitDone_mjesr"};
|
|
4
4
|
|
|
5
5
|
export { rightSideTransitions as default };
|
|
6
6
|
//# sourceMappingURL=right-side-transitions.mobile.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"right-side-transitions.mobile.module.css.js","sources":["../../src/mobile/transitions/right-side-transitions.mobile.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"right-side-transitions.mobile.module.css.js","sources":["../../src/mobile/transitions/right-side-transitions.mobile.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.appear,\n.enter {\n transform: translateX(100%);\n}\n\n.appearActive,\n.enterActive {\n transform: translateX(0);\n transition: transform 280ms ease-in-out;\n transition-delay: 80ms;\n}\n\n.exit {\n transform: translateX(0);\n}\n\n.exitActive,\n.exitDone {\n transform: translateX(100%);\n transition: transform 280ms ease-in-out;\n}\n"],"names":[],"mappings":";;AAEgB,6BAAe,CAAC,QAAQ,CAAC,+BAA+B,CAAC,OAAO,CAAC,8BAA8B,CAAC,cAAc,CAAC,qCAAqC,CAAC,aAAa,CAAC,oCAAoC,CAAC,MAAM,CAAC,6BAA6B,CAAC,YAAY,CAAC,mCAAmC,CAAC,UAAU,CAAC,iCAAiC,CAAC;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.universal-
|
|
2
|
-
.universal-
|
|
1
|
+
.universal-modal__appear_ua5qi,
|
|
2
|
+
.universal-modal__enter_ua5qi {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateY(15px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.universal-
|
|
8
|
-
.universal-
|
|
7
|
+
.universal-modal__appearActive_ua5qi,
|
|
8
|
+
.universal-modal__enterActive_ua5qi {
|
|
9
9
|
opacity: 1;
|
|
10
10
|
transform: translateY(0);
|
|
11
11
|
transition:
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
transform 200ms ease-in;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.universal-
|
|
16
|
+
.universal-modal__exit_ua5qi {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateY(0);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.universal-
|
|
22
|
-
.universal-
|
|
21
|
+
.universal-modal__exitActive_ua5qi,
|
|
22
|
+
.universal-modal__exitDone_ua5qi {
|
|
23
23
|
opacity: 0;
|
|
24
24
|
transform: translateY(15px);
|
|
25
25
|
transition:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './transitions.mobile.css';
|
|
2
2
|
|
|
3
|
-
const transitions = {"appear":"universal-
|
|
3
|
+
const transitions = {"appear":"universal-modal__appear_ua5qi","enter":"universal-modal__enter_ua5qi","appearActive":"universal-modal__appearActive_ua5qi","enterActive":"universal-modal__enterActive_ua5qi","exit":"universal-modal__exit_ua5qi","exitActive":"universal-modal__exitActive_ua5qi","exitDone":"universal-modal__exitDone_ua5qi"};
|
|
4
4
|
|
|
5
5
|
export { transitions as default };
|
|
6
6
|
//# sourceMappingURL=transitions.mobile.module.css.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type MarginSize = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96 | 128;
|
|
2
2
|
export interface Margin {
|
|
3
3
|
top?: MarginSize;
|
|
4
4
|
right?: MarginSize;
|
package/moderncssm/Context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/content/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { type FC } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { ContentDesktop, type ContentDesktopProps } from '../desktop/Component.desktop';\nimport { ContentMobile, type ContentMobileProps } from '../mobile/Component.mobile';\n\nexport interface ContentResponsiveProps extends ContentDesktopProps, ContentMobileProps {}\n\nexport const ContentResponsive: FC<ContentResponsiveProps> = ({ ...restProps }) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <ContentDesktop {...restProps} />;\n }\n\n return <ContentMobile {...restProps} />;\n};\n"],"names":[],"mappings":";;;;;AASa,MAAA,iBAAiB,GAA+B,CAAC,EAAE,GAAG,SAAS,EAAE,KAAI;AAC9E,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/content/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { type FC } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { ContentDesktop, type ContentDesktopProps } from '../desktop/Component.desktop';\nimport { ContentMobile, type ContentMobileProps } from '../mobile/Component.mobile';\n\nexport interface ContentResponsiveProps extends ContentDesktopProps, ContentMobileProps {}\n\nexport const ContentResponsive: FC<ContentResponsiveProps> = ({ ...restProps }) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <ContentDesktop {...restProps} />;\n }\n\n return <ContentMobile {...restProps} />;\n};\n"],"names":[],"mappings":";;;;;AASa,MAAA,iBAAiB,GAA+B,CAAC,EAAE,GAAG,SAAS,EAAE,KAAI;AAC9E,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;IAEhC,IAAI,SAAS,EAAE;AACX,QAAA,OAAO,KAAC,CAAA,aAAA,CAAA,cAAc,EAAK,EAAA,GAAA,SAAS,GAAI;;AAG5C,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,aAAa,EAAK,EAAA,GAAA,SAAS,GAAI;AAC3C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/footer/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { FooterDesktop, type FooterDesktopProps } from '../desktop/Component.desktop';\nimport { FooterMobile, type FooterMobileProps } from '../mobile/Component.mobile';\n\nexport interface FooterResponsiveProps extends FooterDesktopProps, FooterMobileProps {}\n\nexport const FooterResponsive = forwardRef<HTMLDivElement, FooterResponsiveProps>((props, ref) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <FooterDesktop ref={ref} {...props} />;\n }\n\n return <FooterMobile {...props} />;\n});\n\nFooterResponsive.displayName = 'FooterResponsive';\n"],"names":[],"mappings":";;;;;AASa,MAAA,gBAAgB,GAAG,UAAU,CAAwC,CAAC,KAAK,EAAE,GAAG,KAAI;AAC7F,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/footer/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { FooterDesktop, type FooterDesktopProps } from '../desktop/Component.desktop';\nimport { FooterMobile, type FooterMobileProps } from '../mobile/Component.mobile';\n\nexport interface FooterResponsiveProps extends FooterDesktopProps, FooterMobileProps {}\n\nexport const FooterResponsive = forwardRef<HTMLDivElement, FooterResponsiveProps>((props, ref) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <FooterDesktop ref={ref} {...props} />;\n }\n\n return <FooterMobile {...props} />;\n});\n\nFooterResponsive.displayName = 'FooterResponsive';\n"],"names":[],"mappings":";;;;;AASa,MAAA,gBAAgB,GAAG,UAAU,CAAwC,CAAC,KAAK,EAAE,GAAG,KAAI;AAC7F,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;IAEhC,IAAI,SAAS,EAAE;QACX,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,CAAI;;AAGjD,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,EAAK,EAAA,GAAA,KAAK,GAAI;AACtC,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type NavigationBarPrivateProps } from '@alfalab/core-components-navigation-bar-private/moderncssm';
|
|
3
|
-
|
|
2
|
+
type Params = Pick<NavigationBarPrivateProps, 'title' | 'children' | 'bottomAddons' | 'onClose'>;
|
|
4
3
|
export declare const useBaseHeader: (params: Params) => {
|
|
5
4
|
headerHighlighted: boolean | undefined;
|
|
6
5
|
hasContent: boolean;
|
|
7
6
|
componentRef: import("react").RefObject<HTMLDivElement>;
|
|
8
7
|
titleRef: import("react").RefObject<HTMLDivElement>;
|
|
9
|
-
handleClose: (event: import("react").MouseEvent<HTMLElement
|
|
8
|
+
handleClose: (event: import("react").MouseEvent<HTMLElement> | import("react").KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
10
9
|
};
|
|
11
10
|
export {};
|