@hh.ru/magritte-ui-modal 9.0.4 → 9.0.6

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/Modal.js CHANGED
@@ -12,7 +12,7 @@ import { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';
12
12
  import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
13
13
  import { Breakpoint, useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
14
14
  import { Layer } from '@hh.ru/magritte-ui-layer';
15
- import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-_5qK-HL-.js';
15
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-CCJOAtwT.js';
16
16
  import { useModalOrder } from './useModalOrder.js';
17
17
  import { isProgressBarComponent } from '@hh.ru/magritte-ui-progress-bar';
18
18
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
@@ -6,7 +6,7 @@ import { requestAnimation } from '@hh.ru/magritte-common-func-utils';
6
6
  import { Divider } from '@hh.ru/magritte-ui-divider';
7
7
  import { ModalHeader } from './ModalHeader.js';
8
8
 
9
- var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_9-0-4","modalOverlay":"magritte-modal-overlay___lK22l_9-0-4","overlay-left":"magritte-overlay-left___JtHK4_9-0-4","overlayLeft":"magritte-overlay-left___JtHK4_9-0-4","overlay-right":"magritte-overlay-right___uKTDt_9-0-4","overlayRight":"magritte-overlay-right___uKTDt_9-0-4","modal":"magritte-modal___RAW6S_9-0-4","size-small":"magritte-size-small___2JTM2_9-0-4","sizeSmall":"magritte-size-small___2JTM2_9-0-4","size-medium":"magritte-size-medium___cWCe7_9-0-4","sizeMedium":"magritte-size-medium___cWCe7_9-0-4","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-4","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-4","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-4","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-4","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-4","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-4","modal-content":"magritte-modal-content___46QFS_9-0-4","modalContent":"magritte-modal-content___46QFS_9-0-4","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-4","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-4","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-4","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-4","divider-container":"magritte-divider-container___qP3VK_9-0-4","dividerContainer":"magritte-divider-container___qP3VK_9-0-4","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-4","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-4","modal-footer":"magritte-modal-footer___8xPqQ_9-0-4","modalFooter":"magritte-modal-footer___8xPqQ_9-0-4","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-4","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-4","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-4","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-4","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-4","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-4","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-4","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-4","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-4","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-4","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-4","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-4","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-4","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-4","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-4","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-4","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-4","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-4","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-4","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-4","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-4","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-4","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-4","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-4","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-4","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-4","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-4","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-4","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-4","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-4","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-4","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-4","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-4","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-4"};
9
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_9-0-6","modalOverlay":"magritte-modal-overlay___lK22l_9-0-6","overlay-left":"magritte-overlay-left___JtHK4_9-0-6","overlayLeft":"magritte-overlay-left___JtHK4_9-0-6","overlay-right":"magritte-overlay-right___uKTDt_9-0-6","overlayRight":"magritte-overlay-right___uKTDt_9-0-6","modal":"magritte-modal___RAW6S_9-0-6","size-small":"magritte-size-small___2JTM2_9-0-6","sizeSmall":"magritte-size-small___2JTM2_9-0-6","size-medium":"magritte-size-medium___cWCe7_9-0-6","sizeMedium":"magritte-size-medium___cWCe7_9-0-6","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-6","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-6","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-6","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-6","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-6","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-6","modal-content":"magritte-modal-content___46QFS_9-0-6","modalContent":"magritte-modal-content___46QFS_9-0-6","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-6","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-6","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-6","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-6","divider-container":"magritte-divider-container___qP3VK_9-0-6","dividerContainer":"magritte-divider-container___qP3VK_9-0-6","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-6","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-6","modal-footer":"magritte-modal-footer___8xPqQ_9-0-6","modalFooter":"magritte-modal-footer___8xPqQ_9-0-6","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-6","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-6","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-6","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-6","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-6","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-6","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-6","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-6","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-6","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-6","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-6","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-6","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-6","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-6","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-6","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-6","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-6","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-6","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-6","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-6","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-6","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-6","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-6","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-6","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-6","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-6","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-6","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-6","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-6","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-6","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-6","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-6","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-6","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-6"};
10
10
 
11
11
  const checkIsScrolledToBottom = (el) => {
12
12
  return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;
@@ -131,4 +131,4 @@ const ModalContentWithHeader = ({ labelId, children, headerHeight: _headerHeight
131
131
  };
132
132
 
133
133
  export { ModalContentWithHeader as M, styles as s };
134
- //# sourceMappingURL=ModalContentWithHeader-_5qK-HL-.js.map
134
+ //# sourceMappingURL=ModalContentWithHeader-CCJOAtwT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-_5qK-HL-.js","sources":["../src/ModalContentWithHeader.tsx"],"sourcesContent":["import { FC, PropsWithChildren, useCallback, useLayoutEffect, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { requestAnimation } from '@hh.ru/magritte-common-func-utils';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { ModalHeader } from '@hh.ru/magritte-ui-modal/ModalHeader';\nimport { ModalHeaderProps, ModalHeight } from '@hh.ru/magritte-ui-modal/types';\n\nimport styles from './modal.less';\n\nconst checkIsScrolledToBottom = (el: HTMLElement) => {\n return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\n// Минимальная высота до которой может сжаться хедер\nconst HEADER_SHRINK_MIN_HEIGHT = 148;\n// Минимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MIN_HEIGHT = 12;\n// Максимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MAX_HEIGHT = 24;\nconst HEADER_MARGIN_HEIGHT_DELTA = HEADER_MARGIN_MAX_HEIGHT - HEADER_MARGIN_MIN_HEIGHT;\n\n// Вычисляет минимальную высоту до которой может сжаться хедер с учетом высоты контента, чтобы не спровоцировать\n// изменение размера модалки\nconst calcHeaderShrinkLimit = (\n headerHeight: number,\n headerMaxHeight: number,\n contentHeight: number,\n contentScrollHeight: number,\n marginHeight: number\n) => {\n // Высота контента скрытого под скроллом когда хедер и марджин под ним имеет максимальную допустимую высоту\n const contentScrollDelta =\n contentScrollHeight - // Высота контента скрытого под скроллом в текущем состоянии\n contentHeight + // Высота контейнера содержащего контент\n (HEADER_MARGIN_MAX_HEIGHT - marginHeight) + // Дельта между текущей высотой марджина и максимальной допустимой\n (headerMaxHeight - headerHeight); // Дельта между текущей высотой хедера и максимальной допустимой\n\n const headerShrinkMinHeight = headerMaxHeight - (contentScrollDelta - HEADER_MARGIN_HEIGHT_DELTA);\n\n return Math.max(headerShrinkMinHeight, HEADER_SHRINK_MIN_HEIGHT);\n};\n\nconst shrinkByDelta = (\n headerImageContainer: HTMLDivElement | null,\n headerWrapper: HTMLDivElement | null,\n headerMinHeight: number,\n headerMaxHeight: number,\n scrollDeltaY: number\n) => {\n if (!headerImageContainer || !headerWrapper) {\n return;\n }\n\n const marginHeight = clamp(\n HEADER_MARGIN_MAX_HEIGHT - scrollDeltaY,\n HEADER_MARGIN_MIN_HEIGHT,\n HEADER_MARGIN_MAX_HEIGHT\n );\n headerWrapper.style.marginBottom = `${marginHeight}px`;\n\n const headerHeight = clamp(\n // Тут прибаляем дельту марджина потому что сначала должен сжаться отступ\n Math.floor(headerMaxHeight - scrollDeltaY + HEADER_MARGIN_HEIGHT_DELTA),\n headerMinHeight,\n headerMaxHeight\n );\n headerImageContainer.style.height = `${headerHeight}px`;\n};\n\nexport const ModalContentWithHeader: FC<\n PropsWithChildren<\n ModalHeaderProps & { labelId: string; isTreeSelectorChild: boolean; height?: ModalHeight; showDivider: boolean }\n >\n> = ({\n labelId,\n children,\n headerHeight: _headerHeight = 0,\n isTreeSelectorChild,\n height,\n showDivider = true,\n ...modalHeaderProps\n}) => {\n const { title, headerImageUrl, headerImage, actions, actionLink, options } = modalHeaderProps;\n\n const bottomDividerVisibleRef = useRef(false);\n const contentContainerRef = useRef<HTMLDivElement>(null);\n const headerImageContainerRef = useRef<HTMLDivElement>(null);\n const headerWrapperRef = useRef<HTMLDivElement>(null);\n const spacePreserverRef = useRef<HTMLDivElement>(null);\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const hasHeaderImageRef = useRef(!!headerImageUrl || !!headerImage);\n hasHeaderImageRef.current = !!headerImageUrl || !!headerImage;\n const headerHeightRef = useRef(0);\n headerHeightRef.current = hasHeaderImageRef.current ? Math.max(_headerHeight, 200) : 0;\n const minHeaderHeightRef = useRef(0);\n\n const bottomDividerContainerRef = useRef<HTMLDivElement>(null);\n const topDividerContainerRef = useRef<HTMLDivElement>(null);\n\n const withoutHeader = !title && !hasHeaderImageRef.current && !actions && !actionLink && !options;\n const onlyActions = !title && !hasHeaderImageRef.current && !options && (actions || actionLink);\n\n const isTopDividerVisible = () => {\n if (!contentContainerRef.current) {\n return false;\n }\n\n const topDividerVisible = hasHeaderImageRef.current\n ? contentContainerRef.current.scrollTop >\n headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA\n : contentContainerRef.current.scrollTop !== 0;\n\n return topDividerVisible && (options || !hasHeaderImageRef.current) && !onlyActions && !withoutHeader;\n };\n\n const updateHeaderDimensions = useCallback(() => {\n if (\n !headerImageContainerRef.current ||\n !headerWrapperRef.current ||\n !stickyContainerRef.current ||\n !spacePreserverRef.current ||\n !contentContainerRef.current\n ) {\n return;\n }\n\n if (!hasHeaderImageRef.current) {\n spacePreserverRef.current.style.height = '0';\n return;\n }\n\n minHeaderHeightRef.current = calcHeaderShrinkLimit(\n headerImageContainerRef.current.clientHeight,\n headerHeightRef.current,\n contentContainerRef.current.clientHeight,\n stickyContainerRef.current.scrollHeight,\n parseInt(headerWrapperRef.current.style.marginBottom || '0', 10)\n );\n\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n const preserverSize = headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA;\n spacePreserverRef.current.style.height = `${preserverSize}px`;\n }, []);\n\n useLayoutEffect(() => {\n if (contentContainerRef.current) {\n const observer = new ResizeObserver(\n requestAnimation(() => {\n if (!contentContainerRef.current) {\n return;\n }\n const isScrollable =\n contentContainerRef.current.scrollHeight > contentContainerRef.current.clientHeight;\n const hasScroll = isScrollable && !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerVisibleRef.current = hasScroll;\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n updateHeaderDimensions();\n })\n );\n observer.observe(contentContainerRef.current);\n return () => observer.disconnect();\n }\n\n return undefined;\n }, [updateHeaderDimensions]);\n\n useLayoutEffect(() => {\n updateHeaderDimensions();\n if (!options && (headerImageUrl || headerImage)) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [headerImageUrl, headerImage, updateHeaderDimensions, options]);\n\n const handleScroll = () => {\n if (!contentContainerRef.current) {\n return;\n }\n\n bottomDividerVisibleRef.current = !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, !isTopDividerVisible());\n if (hasHeaderImageRef.current) {\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n }\n };\n\n return (\n <>\n <div\n className={classnames(styles.modalContentWrapper, {\n [styles.modalContentWrapperOneLine]: onlyActions,\n })}\n >\n <ModalHeader\n {...modalHeaderProps}\n headerHeight={headerHeightRef.current}\n labelId={labelId}\n wrapperRef={headerWrapperRef}\n ref={headerImageContainerRef}\n />\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !isTopDividerVisible(),\n })}\n ref={topDividerContainerRef}\n >\n <Divider />\n </div>\n <div\n className={classnames(styles.modalContent)}\n ref={contentContainerRef}\n onScroll={handleScroll}\n data-qa=\"modal-content-scroll-container\"\n >\n {isTreeSelectorChild ? (\n children\n ) : (\n <>\n <div\n className={classnames(styles.contentStickyContainer, {\n [styles.contentStickyContainerFullHeight]: height === 'full-screen',\n })}\n ref={stickyContainerRef}\n >\n {children}\n </div>\n <div ref={spacePreserverRef} />\n </>\n )}\n </div>\n </div>\n {showDivider && (\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !bottomDividerVisibleRef.current,\n })}\n ref={bottomDividerContainer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A,EAAA,EAAA,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,sBAAsB,EAAE;AACjD,wCAAA,CAAC,MAAM,CAAC,gCAAgC,GAAG,MAAM,KAAK,aAAa;AACtE,qCAAA,CAAC,EACF,GAAG,EAAE,kBAAkB,EAEtB,QAAA,EAAA,QAAQ,EACP,CAAA,EACNA,GAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,iBAAiB,EAAI,CAAA,CAAA,EAAA,CAChC,CACN,EAAA,CACC,CACJ,EAAA,CAAA,EACL,WAAW,KACRA,GAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBAC3C,CAAC,MAAM,CAAC,sBAAsB,GAAG,CAAC,uBAAuB,CAAC,OAAO;AACpE,iBAAA,CAAC,EACF,GAAG,EAAE,yBAAyB,EAE9B,QAAA,EAAAA,GAAA,CAAC,OAAO,EAAA,EAAA,CAAG,EACT,CAAA,CACT,CACF,EAAA,CAAA,EACL;AACN;;;;"}
1
+ {"version":3,"file":"ModalContentWithHeader-CCJOAtwT.js","sources":["../src/ModalContentWithHeader.tsx"],"sourcesContent":["import { FC, PropsWithChildren, useCallback, useLayoutEffect, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { requestAnimation } from '@hh.ru/magritte-common-func-utils';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { ModalHeader } from '@hh.ru/magritte-ui-modal/ModalHeader';\nimport { ModalHeaderProps, ModalHeight } from '@hh.ru/magritte-ui-modal/types';\n\nimport styles from './modal.less';\n\nconst checkIsScrolledToBottom = (el: HTMLElement) => {\n return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\n// Минимальная высота до которой может сжаться хедер\nconst HEADER_SHRINK_MIN_HEIGHT = 148;\n// Минимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MIN_HEIGHT = 12;\n// Максимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MAX_HEIGHT = 24;\nconst HEADER_MARGIN_HEIGHT_DELTA = HEADER_MARGIN_MAX_HEIGHT - HEADER_MARGIN_MIN_HEIGHT;\n\n// Вычисляет минимальную высоту до которой может сжаться хедер с учетом высоты контента, чтобы не спровоцировать\n// изменение размера модалки\nconst calcHeaderShrinkLimit = (\n headerHeight: number,\n headerMaxHeight: number,\n contentHeight: number,\n contentScrollHeight: number,\n marginHeight: number\n) => {\n // Высота контента скрытого под скроллом когда хедер и марджин под ним имеет максимальную допустимую высоту\n const contentScrollDelta =\n contentScrollHeight - // Высота контента скрытого под скроллом в текущем состоянии\n contentHeight + // Высота контейнера содержащего контент\n (HEADER_MARGIN_MAX_HEIGHT - marginHeight) + // Дельта между текущей высотой марджина и максимальной допустимой\n (headerMaxHeight - headerHeight); // Дельта между текущей высотой хедера и максимальной допустимой\n\n const headerShrinkMinHeight = headerMaxHeight - (contentScrollDelta - HEADER_MARGIN_HEIGHT_DELTA);\n\n return Math.max(headerShrinkMinHeight, HEADER_SHRINK_MIN_HEIGHT);\n};\n\nconst shrinkByDelta = (\n headerImageContainer: HTMLDivElement | null,\n headerWrapper: HTMLDivElement | null,\n headerMinHeight: number,\n headerMaxHeight: number,\n scrollDeltaY: number\n) => {\n if (!headerImageContainer || !headerWrapper) {\n return;\n }\n\n const marginHeight = clamp(\n HEADER_MARGIN_MAX_HEIGHT - scrollDeltaY,\n HEADER_MARGIN_MIN_HEIGHT,\n HEADER_MARGIN_MAX_HEIGHT\n );\n headerWrapper.style.marginBottom = `${marginHeight}px`;\n\n const headerHeight = clamp(\n // Тут прибаляем дельту марджина потому что сначала должен сжаться отступ\n Math.floor(headerMaxHeight - scrollDeltaY + HEADER_MARGIN_HEIGHT_DELTA),\n headerMinHeight,\n headerMaxHeight\n );\n headerImageContainer.style.height = `${headerHeight}px`;\n};\n\nexport const ModalContentWithHeader: FC<\n PropsWithChildren<\n ModalHeaderProps & { labelId: string; isTreeSelectorChild: boolean; height?: ModalHeight; showDivider: boolean }\n >\n> = ({\n labelId,\n children,\n headerHeight: _headerHeight = 0,\n isTreeSelectorChild,\n height,\n showDivider = true,\n ...modalHeaderProps\n}) => {\n const { title, headerImageUrl, headerImage, actions, actionLink, options } = modalHeaderProps;\n\n const bottomDividerVisibleRef = useRef(false);\n const contentContainerRef = useRef<HTMLDivElement>(null);\n const headerImageContainerRef = useRef<HTMLDivElement>(null);\n const headerWrapperRef = useRef<HTMLDivElement>(null);\n const spacePreserverRef = useRef<HTMLDivElement>(null);\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const hasHeaderImageRef = useRef(!!headerImageUrl || !!headerImage);\n hasHeaderImageRef.current = !!headerImageUrl || !!headerImage;\n const headerHeightRef = useRef(0);\n headerHeightRef.current = hasHeaderImageRef.current ? Math.max(_headerHeight, 200) : 0;\n const minHeaderHeightRef = useRef(0);\n\n const bottomDividerContainerRef = useRef<HTMLDivElement>(null);\n const topDividerContainerRef = useRef<HTMLDivElement>(null);\n\n const withoutHeader = !title && !hasHeaderImageRef.current && !actions && !actionLink && !options;\n const onlyActions = !title && !hasHeaderImageRef.current && !options && (actions || actionLink);\n\n const isTopDividerVisible = () => {\n if (!contentContainerRef.current) {\n return false;\n }\n\n const topDividerVisible = hasHeaderImageRef.current\n ? contentContainerRef.current.scrollTop >\n headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA\n : contentContainerRef.current.scrollTop !== 0;\n\n return topDividerVisible && (options || !hasHeaderImageRef.current) && !onlyActions && !withoutHeader;\n };\n\n const updateHeaderDimensions = useCallback(() => {\n if (\n !headerImageContainerRef.current ||\n !headerWrapperRef.current ||\n !stickyContainerRef.current ||\n !spacePreserverRef.current ||\n !contentContainerRef.current\n ) {\n return;\n }\n\n if (!hasHeaderImageRef.current) {\n spacePreserverRef.current.style.height = '0';\n return;\n }\n\n minHeaderHeightRef.current = calcHeaderShrinkLimit(\n headerImageContainerRef.current.clientHeight,\n headerHeightRef.current,\n contentContainerRef.current.clientHeight,\n stickyContainerRef.current.scrollHeight,\n parseInt(headerWrapperRef.current.style.marginBottom || '0', 10)\n );\n\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n const preserverSize = headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA;\n spacePreserverRef.current.style.height = `${preserverSize}px`;\n }, []);\n\n useLayoutEffect(() => {\n if (contentContainerRef.current) {\n const observer = new ResizeObserver(\n requestAnimation(() => {\n if (!contentContainerRef.current) {\n return;\n }\n const isScrollable =\n contentContainerRef.current.scrollHeight > contentContainerRef.current.clientHeight;\n const hasScroll = isScrollable && !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerVisibleRef.current = hasScroll;\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n updateHeaderDimensions();\n })\n );\n observer.observe(contentContainerRef.current);\n return () => observer.disconnect();\n }\n\n return undefined;\n }, [updateHeaderDimensions]);\n\n useLayoutEffect(() => {\n updateHeaderDimensions();\n if (!options && (headerImageUrl || headerImage)) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [headerImageUrl, headerImage, updateHeaderDimensions, options]);\n\n const handleScroll = () => {\n if (!contentContainerRef.current) {\n return;\n }\n\n bottomDividerVisibleRef.current = !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, !isTopDividerVisible());\n if (hasHeaderImageRef.current) {\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n }\n };\n\n return (\n <>\n <div\n className={classnames(styles.modalContentWrapper, {\n [styles.modalContentWrapperOneLine]: onlyActions,\n })}\n >\n <ModalHeader\n {...modalHeaderProps}\n headerHeight={headerHeightRef.current}\n labelId={labelId}\n wrapperRef={headerWrapperRef}\n ref={headerImageContainerRef}\n />\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !isTopDividerVisible(),\n })}\n ref={topDividerContainerRef}\n >\n <Divider />\n </div>\n <div\n className={classnames(styles.modalContent)}\n ref={contentContainerRef}\n onScroll={handleScroll}\n data-qa=\"modal-content-scroll-container\"\n >\n {isTreeSelectorChild ? (\n children\n ) : (\n <>\n <div\n className={classnames(styles.contentStickyContainer, {\n [styles.contentStickyContainerFullHeight]: height === 'full-screen',\n })}\n ref={stickyContainerRef}\n >\n {children}\n </div>\n <div ref={spacePreserverRef} />\n </>\n )}\n </div>\n </div>\n {showDivider && (\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !bottomDividerVisibleRef.current,\n })}\n ref={bottomDividerContainerRef}\n >\n <Divider />\n </div>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;AAUA,MAAM,uBAAuB,GAAG,CAAC,EAAe,KAAI;AAChD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,GAAG,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAE/F;AACA,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC;AACA,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC;AAC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;AACpE,iBAAA,CAAC,EACF,GAAG,EAAE,yBAAyB,EAE9B,QAAA,EAAAA,GAAA,CAAC,OAAO,EAAA,EAAA,CAAG,EACT,CAAA,CACT,CACF,EAAA,CAAA,EACL;AACN;;;;"}
@@ -5,7 +5,7 @@ import 'classnames';
5
5
  import '@hh.ru/magritte-common-func-utils';
6
6
  import '@hh.ru/magritte-ui-divider';
7
7
  import './ModalHeader.js';
8
- export { M as ModalContentWithHeader } from './ModalContentWithHeader-_5qK-HL-.js';
8
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-CCJOAtwT.js';
9
9
  import '@hh.ru/magritte-ui-icon';
10
10
  import '@hh.ru/magritte-ui-title';
11
11
  //# sourceMappingURL=ModalContentWithHeader.js.map
package/ModalHeader.js CHANGED
@@ -5,7 +5,7 @@ import classnames from 'classnames';
5
5
  import { isIconElement } from '@hh.ru/magritte-ui-icon';
6
6
  import { Title } from '@hh.ru/magritte-ui-title';
7
7
 
8
- var styles = {"content":"magritte-content___o6ktq_9-0-4","options":"magritte-options___qfErQ_9-0-4","actions":"magritte-actions___nQILV_9-0-4","actions-with-link":"magritte-actions-with-link___hnDux_9-0-4","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-4","content-with-image":"magritte-content-with-image___YarBO_9-0-4","contentWithImage":"magritte-content-with-image___YarBO_9-0-4","actions-single":"magritte-actions-single___usfKu_9-0-4","actionsSingle":"magritte-actions-single___usfKu_9-0-4","image-container":"magritte-image-container___ioL3y_9-0-4","imageContainer":"magritte-image-container___ioL3y_9-0-4","title-wrapper":"magritte-title-wrapper___O--QR_9-0-4","titleWrapper":"magritte-title-wrapper___O--QR_9-0-4","wrapper":"magritte-wrapper___zH8vB_9-0-4"};
8
+ var styles = {"content":"magritte-content___o6ktq_9-0-6","options":"magritte-options___qfErQ_9-0-6","actions":"magritte-actions___nQILV_9-0-6","actions-with-link":"magritte-actions-with-link___hnDux_9-0-6","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-6","content-with-image":"magritte-content-with-image___YarBO_9-0-6","contentWithImage":"magritte-content-with-image___YarBO_9-0-6","actions-single":"magritte-actions-single___usfKu_9-0-6","actionsSingle":"magritte-actions-single___usfKu_9-0-6","image-container":"magritte-image-container___ioL3y_9-0-6","imageContainer":"magritte-image-container___ioL3y_9-0-6","title-wrapper":"magritte-title-wrapper___O--QR_9-0-6","titleWrapper":"magritte-title-wrapper___O--QR_9-0-6","wrapper":"magritte-wrapper___zH8vB_9-0-6"};
9
9
 
10
10
  const ModalHeader = forwardRef(({ title, headerImageUrl, headerImage, headerHeight, titleAlignment, titleElement, titleMaxLines, titleSize, titleDescription, titleDescriptionMaxLines, titleStyle, titleDescriptionStyle, options, actions: _actions, actionLink, labelId, wrapperRef, }, ref) => {
11
11
  const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;
package/index.css CHANGED
@@ -14,14 +14,14 @@
14
14
  --magritte-color-component-modal-background-action-v22-1-0:#20262b99;
15
15
  --magritte-gradient-component-modal-background-fade-v22-1-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
16
16
  }
17
- .magritte-content___o6ktq_9-0-4{
17
+ .magritte-content___o6ktq_9-0-6{
18
18
  display:flex;
19
19
  align-items:flex-start;
20
20
  }
21
- .magritte-content___o6ktq_9-0-4 + .magritte-options___qfErQ_9-0-4{
21
+ .magritte-content___o6ktq_9-0-6 + .magritte-options___qfErQ_9-0-6{
22
22
  margin-top:24px;
23
23
  }
24
- .magritte-actions___nQILV_9-0-4{
24
+ .magritte-actions___nQILV_9-0-6{
25
25
  position:relative;
26
26
  z-index:1;
27
27
  display:flex;
@@ -30,10 +30,10 @@
30
30
  margin-left:auto;
31
31
  --magritte-ui-link-padding-override:9px;
32
32
  }
33
- .magritte-actions-with-link___hnDux_9-0-4{
33
+ .magritte-actions-with-link___hnDux_9-0-6{
34
34
  padding:0 8px 0 28px;
35
35
  }
36
- .magritte-content-with-image___YarBO_9-0-4{
36
+ .magritte-content-with-image___YarBO_9-0-6{
37
37
  position:relative;
38
38
  flex-direction:column;
39
39
  justify-content:flex-end;
@@ -43,22 +43,22 @@
43
43
  padding:12px 24px 24px;
44
44
  box-sizing:border-box;
45
45
  }
46
- .magritte-content-with-image___YarBO_9-0-4 .magritte-actions___nQILV_9-0-4{
46
+ .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6{
47
47
  order:-1;
48
48
  gap:0;
49
49
  margin-right:-16px;
50
50
  margin-top:-4px;
51
51
  margin-bottom:auto;
52
52
  }
53
- .magritte-content-with-image___YarBO_9-0-4 .magritte-actions___nQILV_9-0-4:not(.magritte-actions-with-link___hnDux_9-0-4){
53
+ .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6:not(.magritte-actions-with-link___hnDux_9-0-6){
54
54
  padding:0 4px;
55
55
  background-color:var(--magritte-color-component-modal-background-action-v22-1-0);
56
56
  border-radius:var(--magritte-static-border-radius-300-v22-1-0);
57
57
  }
58
- .magritte-content-with-image___YarBO_9-0-4 .magritte-actions___nQILV_9-0-4.magritte-actions-single___usfKu_9-0-4:not(.magritte-actions-with-link___hnDux_9-0-4){
58
+ .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6.magritte-actions-single___usfKu_9-0-6:not(.magritte-actions-with-link___hnDux_9-0-6){
59
59
  padding:0;
60
60
  }
61
- .magritte-image-container___ioL3y_9-0-4{
61
+ .magritte-image-container___ioL3y_9-0-6{
62
62
  position:absolute;
63
63
  left:0;
64
64
  bottom:0;
@@ -66,11 +66,11 @@
66
66
  background-size:cover;
67
67
  --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v22-1-0);
68
68
  }
69
- .magritte-title-wrapper___O--QR_9-0-4{
69
+ .magritte-title-wrapper___O--QR_9-0-6{
70
70
  position:relative;
71
71
  width:100%;
72
72
  }
73
- .magritte-wrapper___zH8vB_9-0-4{
73
+ .magritte-wrapper___zH8vB_9-0-6{
74
74
  margin-bottom:24px;
75
75
  }
76
76
 
@@ -93,7 +93,7 @@
93
93
  --magritte-color-background-overlay-v22-1-0:#20262b99;
94
94
  --magritte-color-component-modal-background-content-v22-1-0:#ffffff;
95
95
  }
96
- .magritte-modal-overlay___lK22l_9-0-4{
96
+ .magritte-modal-overlay___lK22l_9-0-6{
97
97
  position:fixed;
98
98
  top:0;
99
99
  right:0;
@@ -107,13 +107,13 @@
107
107
  user-select:text;
108
108
  transition-property:opacity, transform;
109
109
  }
110
- .magritte-overlay-left___JtHK4_9-0-4{
110
+ .magritte-overlay-left___JtHK4_9-0-6{
111
111
  justify-content:flex-start;
112
112
  }
113
- .magritte-overlay-right___uKTDt_9-0-4{
113
+ .magritte-overlay-right___uKTDt_9-0-6{
114
114
  justify-content:flex-end;
115
115
  }
116
- .magritte-modal___RAW6S_9-0-4{
116
+ .magritte-modal___RAW6S_9-0-6{
117
117
  display:flex;
118
118
  box-sizing:border-box;
119
119
  margin:0 12px;
@@ -128,234 +128,234 @@
128
128
  width:800px;
129
129
  transition-property:opacity, transform;
130
130
  }
131
- .magritte-modal___RAW6S_9-0-4.magritte-size-small___2JTM2_9-0-4{
131
+ .magritte-modal___RAW6S_9-0-6.magritte-size-small___2JTM2_9-0-6{
132
132
  width:480px;
133
133
  }
134
- .magritte-modal___RAW6S_9-0-4.magritte-size-medium___cWCe7_9-0-4{
134
+ .magritte-modal___RAW6S_9-0-6.magritte-size-medium___cWCe7_9-0-6{
135
135
  width:620px;
136
136
  }
137
- .magritte-no-vertical-paddings___Z3-oM_9-0-4{
137
+ .magritte-no-vertical-paddings___Z3-oM_9-0-6{
138
138
  padding-top:0;
139
139
  padding-bottom:0;
140
140
  }
141
- .magritte-no-horizontal-paddings___aT95Y_9-0-4{
141
+ .magritte-no-horizontal-paddings___aT95Y_9-0-6{
142
142
  padding-left:0;
143
143
  padding-right:0;
144
144
  }
145
- .magritte-modal-full-height___gIM4E_9-0-4{
145
+ .magritte-modal-full-height___gIM4E_9-0-6{
146
146
  height:100%;
147
147
  }
148
- .magritte-modal-content___46QFS_9-0-4{
148
+ .magritte-modal-content___46QFS_9-0-6{
149
149
  flex:1 1;
150
150
  overflow-y:auto;
151
151
  padding:0 5px;
152
152
  margin:0 -5px;
153
153
  overscroll-behavior:none;
154
154
  }
155
- .magritte-modal-content-wrapper___23XFT_9-0-4{
155
+ .magritte-modal-content-wrapper___23XFT_9-0-6{
156
156
  display:flex;
157
157
  flex-direction:column;
158
158
  min-height:0;
159
159
  flex:1 1;
160
160
  }
161
- .magritte-modal-content-wrapper__one-line___tYg8d_9-0-4{
161
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-6{
162
162
  flex-direction:row-reverse;
163
163
  }
164
- .magritte-divider-container___qP3VK_9-0-4{
164
+ .magritte-divider-container___qP3VK_9-0-6{
165
165
  margin:0 -24px;
166
166
  }
167
- .magritte-divider-container___qP3VK_9-0-4.magritte-divider-container-hidden___EIxB-_9-0-4{
167
+ .magritte-divider-container___qP3VK_9-0-6.magritte-divider-container-hidden___EIxB-_9-0-6{
168
168
  display:none;
169
169
  }
170
- .magritte-modal-footer___8xPqQ_9-0-4{
170
+ .magritte-modal-footer___8xPqQ_9-0-6{
171
171
  margin:0 -24px -24px;
172
172
  background-color:var(--magritte-color-component-modal-background-content-v22-1-0);
173
173
  z-index:1;
174
174
  --magritte-ui-action-bar-background-color-override:var(--magritte-color-component-modal-background-content-v22-1-0);
175
175
  }
176
- .magritte-modal-buttons-container___1O1Nr_9-0-4{
176
+ .magritte-modal-buttons-container___1O1Nr_9-0-6{
177
177
  display:flex;
178
178
  gap:12px;
179
179
  }
180
- .magritte-animation-timeout___w-j7K_9-0-4{
180
+ .magritte-animation-timeout___w-j7K_9-0-6{
181
181
  --enter-animation-duration:0;
182
182
  --exit-animation-duration:0;
183
183
  }
184
184
  @media (prefers-reduced-motion: no-preference){
185
- .magritte-animation-timeout___w-j7K_9-0-4{
185
+ .magritte-animation-timeout___w-j7K_9-0-6{
186
186
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
187
187
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
188
188
  }
189
189
  }
190
- .magritte-animation-enter-center___7jogC_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
190
+ .magritte-animation-enter-center___7jogC_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
191
191
  opacity:0;
192
192
  }
193
- .magritte-animation-enter-center___7jogC_9-0-4 .magritte-modal___RAW6S_9-0-4{
193
+ .magritte-animation-enter-center___7jogC_9-0-6 .magritte-modal___RAW6S_9-0-6{
194
194
  opacity:0;
195
195
  transform:scale(0.96);
196
196
  }
197
- .magritte-animation-enter-center-active___fywwW_9-0-4{
197
+ .magritte-animation-enter-center-active___fywwW_9-0-6{
198
198
  --enter-animation-duration:0;
199
199
  --exit-animation-duration:0;
200
200
  }
201
201
  @media (prefers-reduced-motion: no-preference){
202
- .magritte-animation-enter-center-active___fywwW_9-0-4{
202
+ .magritte-animation-enter-center-active___fywwW_9-0-6{
203
203
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
204
204
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
205
205
  }
206
206
  }
207
- .magritte-animation-enter-center-active___fywwW_9-0-4 .magritte-modal___RAW6S_9-0-4,
208
- .magritte-animation-enter-center-active___fywwW_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
207
+ .magritte-animation-enter-center-active___fywwW_9-0-6 .magritte-modal___RAW6S_9-0-6,
208
+ .magritte-animation-enter-center-active___fywwW_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
209
209
  opacity:1;
210
210
  transition-duration:var(--enter-animation-duration);
211
211
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
212
212
  transform:scale(1);
213
213
  }
214
- .magritte-animation-exit-center___3Fa6x_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
214
+ .magritte-animation-exit-center___3Fa6x_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
215
215
  opacity:1;
216
216
  }
217
- .magritte-animation-exit-center___3Fa6x_9-0-4 .magritte-modal___RAW6S_9-0-4{
217
+ .magritte-animation-exit-center___3Fa6x_9-0-6 .magritte-modal___RAW6S_9-0-6{
218
218
  opacity:1;
219
219
  transform:scale(1);
220
220
  }
221
- .magritte-animation-exit-center-active___tY0UA_9-0-4{
221
+ .magritte-animation-exit-center-active___tY0UA_9-0-6{
222
222
  --enter-animation-duration:0;
223
223
  --exit-animation-duration:0;
224
224
  }
225
225
  @media (prefers-reduced-motion: no-preference){
226
- .magritte-animation-exit-center-active___tY0UA_9-0-4{
226
+ .magritte-animation-exit-center-active___tY0UA_9-0-6{
227
227
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
228
228
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
229
229
  }
230
230
  }
231
- .magritte-animation-exit-center-active___tY0UA_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
231
+ .magritte-animation-exit-center-active___tY0UA_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
232
232
  opacity:0;
233
233
  }
234
- .magritte-animation-exit-center-active___tY0UA_9-0-4 .magritte-modal___RAW6S_9-0-4{
234
+ .magritte-animation-exit-center-active___tY0UA_9-0-6 .magritte-modal___RAW6S_9-0-6{
235
235
  opacity:0;
236
236
  transform:scale(0.96);
237
237
  }
238
- .magritte-animation-exit-center-active___tY0UA_9-0-4 .magritte-modal___RAW6S_9-0-4,
239
- .magritte-animation-exit-center-active___tY0UA_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
238
+ .magritte-animation-exit-center-active___tY0UA_9-0-6 .magritte-modal___RAW6S_9-0-6,
239
+ .magritte-animation-exit-center-active___tY0UA_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
240
240
  transition-duration:var(--exit-animation-duration);
241
241
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
242
242
  }
243
- .magritte-animation-enter-left___5YB8B_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
243
+ .magritte-animation-enter-left___5YB8B_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
244
244
  opacity:0;
245
245
  }
246
- .magritte-animation-enter-left___5YB8B_9-0-4 .magritte-modal___RAW6S_9-0-4{
246
+ .magritte-animation-enter-left___5YB8B_9-0-6 .magritte-modal___RAW6S_9-0-6{
247
247
  opacity:0;
248
248
  transform:translateX(-100%);
249
249
  }
250
- .magritte-animation-enter-left-active___5GK8s_9-0-4{
250
+ .magritte-animation-enter-left-active___5GK8s_9-0-6{
251
251
  --enter-animation-duration:0;
252
252
  --exit-animation-duration:0;
253
253
  }
254
254
  @media (prefers-reduced-motion: no-preference){
255
- .magritte-animation-enter-left-active___5GK8s_9-0-4{
255
+ .magritte-animation-enter-left-active___5GK8s_9-0-6{
256
256
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
257
257
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
258
258
  }
259
259
  }
260
- .magritte-animation-enter-left-active___5GK8s_9-0-4 .magritte-modal___RAW6S_9-0-4,
261
- .magritte-animation-enter-left-active___5GK8s_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
260
+ .magritte-animation-enter-left-active___5GK8s_9-0-6 .magritte-modal___RAW6S_9-0-6,
261
+ .magritte-animation-enter-left-active___5GK8s_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
262
262
  opacity:1;
263
263
  transition-duration:var(--enter-animation-duration);
264
264
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
265
265
  transform:translateX(0);
266
266
  }
267
- .magritte-animation-exit-left___OnkQE_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
267
+ .magritte-animation-exit-left___OnkQE_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
268
268
  opacity:1;
269
269
  }
270
- .magritte-animation-exit-left___OnkQE_9-0-4 .magritte-modal___RAW6S_9-0-4{
270
+ .magritte-animation-exit-left___OnkQE_9-0-6 .magritte-modal___RAW6S_9-0-6{
271
271
  opacity:1;
272
272
  transform:translateX(0);
273
273
  }
274
- .magritte-animation-exit-left-active___AEGxY_9-0-4{
274
+ .magritte-animation-exit-left-active___AEGxY_9-0-6{
275
275
  --enter-animation-duration:0;
276
276
  --exit-animation-duration:0;
277
277
  }
278
278
  @media (prefers-reduced-motion: no-preference){
279
- .magritte-animation-exit-left-active___AEGxY_9-0-4{
279
+ .magritte-animation-exit-left-active___AEGxY_9-0-6{
280
280
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
281
281
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
282
282
  }
283
283
  }
284
- .magritte-animation-exit-left-active___AEGxY_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
284
+ .magritte-animation-exit-left-active___AEGxY_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
285
285
  opacity:0;
286
286
  }
287
- .magritte-animation-exit-left-active___AEGxY_9-0-4 .magritte-modal___RAW6S_9-0-4{
287
+ .magritte-animation-exit-left-active___AEGxY_9-0-6 .magritte-modal___RAW6S_9-0-6{
288
288
  opacity:0;
289
289
  transform:translateX(-100%);
290
290
  }
291
- .magritte-animation-exit-left-active___AEGxY_9-0-4 .magritte-modal___RAW6S_9-0-4,
292
- .magritte-animation-exit-left-active___AEGxY_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
291
+ .magritte-animation-exit-left-active___AEGxY_9-0-6 .magritte-modal___RAW6S_9-0-6,
292
+ .magritte-animation-exit-left-active___AEGxY_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
293
293
  transition-duration:var(--exit-animation-duration);
294
294
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
295
295
  }
296
- .magritte-animation-enter-right___2aXOm_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
296
+ .magritte-animation-enter-right___2aXOm_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
297
297
  opacity:0;
298
298
  }
299
- .magritte-animation-enter-right___2aXOm_9-0-4 .magritte-modal___RAW6S_9-0-4{
299
+ .magritte-animation-enter-right___2aXOm_9-0-6 .magritte-modal___RAW6S_9-0-6{
300
300
  opacity:0;
301
301
  transform:translateX(100%);
302
302
  }
303
- .magritte-animation-enter-right-active___8wX4-_9-0-4{
303
+ .magritte-animation-enter-right-active___8wX4-_9-0-6{
304
304
  --enter-animation-duration:0;
305
305
  --exit-animation-duration:0;
306
306
  }
307
307
  @media (prefers-reduced-motion: no-preference){
308
- .magritte-animation-enter-right-active___8wX4-_9-0-4{
308
+ .magritte-animation-enter-right-active___8wX4-_9-0-6{
309
309
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
310
310
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
311
311
  }
312
312
  }
313
- .magritte-animation-enter-right-active___8wX4-_9-0-4 .magritte-modal___RAW6S_9-0-4,
314
- .magritte-animation-enter-right-active___8wX4-_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
313
+ .magritte-animation-enter-right-active___8wX4-_9-0-6 .magritte-modal___RAW6S_9-0-6,
314
+ .magritte-animation-enter-right-active___8wX4-_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
315
315
  opacity:1;
316
316
  transition-duration:var(--enter-animation-duration);
317
317
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
318
318
  transform:translateX(0);
319
319
  }
320
- .magritte-animation-exit-right___iczoc_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
320
+ .magritte-animation-exit-right___iczoc_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
321
321
  opacity:1;
322
322
  }
323
- .magritte-animation-exit-right___iczoc_9-0-4 .magritte-modal___RAW6S_9-0-4{
323
+ .magritte-animation-exit-right___iczoc_9-0-6 .magritte-modal___RAW6S_9-0-6{
324
324
  opacity:1;
325
325
  transform:translateX(0);
326
326
  }
327
- .magritte-animation-exit-right-active___eFS4O_9-0-4{
327
+ .magritte-animation-exit-right-active___eFS4O_9-0-6{
328
328
  --enter-animation-duration:0;
329
329
  --exit-animation-duration:0;
330
330
  }
331
331
  @media (prefers-reduced-motion: no-preference){
332
- .magritte-animation-exit-right-active___eFS4O_9-0-4{
332
+ .magritte-animation-exit-right-active___eFS4O_9-0-6{
333
333
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v22-1-0);
334
334
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v22-1-0);
335
335
  }
336
336
  }
337
- .magritte-animation-exit-right-active___eFS4O_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
337
+ .magritte-animation-exit-right-active___eFS4O_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
338
338
  opacity:0;
339
339
  }
340
- .magritte-animation-exit-right-active___eFS4O_9-0-4 .magritte-modal___RAW6S_9-0-4{
340
+ .magritte-animation-exit-right-active___eFS4O_9-0-6 .magritte-modal___RAW6S_9-0-6{
341
341
  opacity:0;
342
342
  transform:translateX(100%);
343
343
  }
344
- .magritte-animation-exit-right-active___eFS4O_9-0-4 .magritte-modal___RAW6S_9-0-4,
345
- .magritte-animation-exit-right-active___eFS4O_9-0-4.magritte-modal-overlay___lK22l_9-0-4{
344
+ .magritte-animation-exit-right-active___eFS4O_9-0-6 .magritte-modal___RAW6S_9-0-6,
345
+ .magritte-animation-exit-right-active___eFS4O_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
346
346
  transition-duration:var(--exit-animation-duration);
347
347
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
348
348
  }
349
- .magritte-content-scroll-preserver___Tw5Px_9-0-4{
349
+ .magritte-content-scroll-preserver___Tw5Px_9-0-6{
350
350
  width:100%;
351
351
  height:0;
352
352
  }
353
- .magritte-content-sticky-container___nqEXj_9-0-4{
353
+ .magritte-content-sticky-container___nqEXj_9-0-6{
354
354
  position:sticky;
355
355
  top:0;
356
356
  min-height:100%;
357
357
  }
358
- .magritte-content-sticky-container_full-height___Gl9x8_9-0-4{
358
+ .magritte-content-sticky-container_full-height___Gl9x8_9-0-6{
359
359
  display:flex;
360
360
  flex-direction:column;
361
361
  }
package/index.js CHANGED
@@ -13,7 +13,7 @@ import '@hh.ru/magritte-common-use-no-bubbling';
13
13
  import '@hh.ru/magritte-ui-action-bar';
14
14
  import '@hh.ru/magritte-ui-breakpoint';
15
15
  import '@hh.ru/magritte-ui-layer';
16
- import './ModalContentWithHeader-_5qK-HL-.js';
16
+ import './ModalContentWithHeader-CCJOAtwT.js';
17
17
  import '@hh.ru/magritte-common-func-utils';
18
18
  import '@hh.ru/magritte-ui-divider';
19
19
  import './ModalHeader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-modal",
3
- "version": "9.0.4",
3
+ "version": "9.0.6",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -28,15 +28,15 @@
28
28
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.5",
29
29
  "@hh.ru/magritte-design-tokens": "22.1.0",
30
30
  "@hh.ru/magritte-internal-layer-name": "3.0.2",
31
- "@hh.ru/magritte-ui-action-bar": "4.0.10",
31
+ "@hh.ru/magritte-ui-action-bar": "4.0.11",
32
32
  "@hh.ru/magritte-ui-breakpoint": "6.0.0",
33
33
  "@hh.ru/magritte-ui-divider": "3.0.0",
34
- "@hh.ru/magritte-ui-icon": "12.1.0",
34
+ "@hh.ru/magritte-ui-icon": "12.2.0",
35
35
  "@hh.ru/magritte-ui-layer": "3.0.2",
36
36
  "@hh.ru/magritte-ui-mock-component": "1.1.4",
37
37
  "@hh.ru/magritte-ui-progress-bar": "5.0.0",
38
38
  "@hh.ru/magritte-ui-title": "7.0.2",
39
- "@hh.ru/magritte-ui-tree-selector": "5.0.3"
39
+ "@hh.ru/magritte-ui-tree-selector": "5.1.1"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "classnames": ">=2.3.2",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "84be7fb81c268510672bdaa32f856319f7022df8"
50
+ "gitHead": "47439eecca7941fc790be441ba065be7824490bf"
51
51
  }