@hh.ru/magritte-ui-modal 5.1.1 → 5.1.2

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
@@ -13,7 +13,7 @@ import { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';
13
13
  import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
14
14
  import { Breakpoint, useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
15
15
  import { Layer } from '@hh.ru/magritte-ui-layer';
16
- import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-BoixiHEX.js';
16
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-Bsm0DTzm.js';
17
17
  import { useModalOrder } from './useModalOrder.js';
18
18
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
19
19
  import '@hh.ru/magritte-common-func-utils';
@@ -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_5-1-1","modalOverlay":"magritte-modal-overlay___lK22l_5-1-1","modal":"magritte-modal___RAW6S_5-1-1","size-small":"magritte-size-small___2JTM2_5-1-1","sizeSmall":"magritte-size-small___2JTM2_5-1-1","size-medium":"magritte-size-medium___cWCe7_5-1-1","sizeMedium":"magritte-size-medium___cWCe7_5-1-1","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_5-1-1","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_5-1-1","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_5-1-1","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_5-1-1","modal-full-height":"magritte-modal-full-height___gIM4E_5-1-1","modalFullHeight":"magritte-modal-full-height___gIM4E_5-1-1","modal-content":"magritte-modal-content___46QFS_5-1-1","modalContent":"magritte-modal-content___46QFS_5-1-1","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_5-1-1","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_5-1-1","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_5-1-1","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_5-1-1","divider-container":"magritte-divider-container___qP3VK_5-1-1","dividerContainer":"magritte-divider-container___qP3VK_5-1-1","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_5-1-1","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_5-1-1","modal-footer":"magritte-modal-footer___8xPqQ_5-1-1","modalFooter":"magritte-modal-footer___8xPqQ_5-1-1","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_5-1-1","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_5-1-1","animation-timeout":"magritte-animation-timeout___w-j7K_5-1-1","animationTimeout":"magritte-animation-timeout___w-j7K_5-1-1","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_5-1-1","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_5-1-1","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_5-1-1","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_5-1-1","modal-animation-enter":"magritte-modal-animation-enter___kruLO_5-1-1","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_5-1-1","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_5-1-1","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_5-1-1","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_5-1-1","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_5-1-1","content-sticky-container":"magritte-content-sticky-container___nqEXj_5-1-1","contentStickyContainer":"magritte-content-sticky-container___nqEXj_5-1-1"};
9
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_5-1-2","modalOverlay":"magritte-modal-overlay___lK22l_5-1-2","modal":"magritte-modal___RAW6S_5-1-2","size-small":"magritte-size-small___2JTM2_5-1-2","sizeSmall":"magritte-size-small___2JTM2_5-1-2","size-medium":"magritte-size-medium___cWCe7_5-1-2","sizeMedium":"magritte-size-medium___cWCe7_5-1-2","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_5-1-2","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_5-1-2","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_5-1-2","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_5-1-2","modal-full-height":"magritte-modal-full-height___gIM4E_5-1-2","modalFullHeight":"magritte-modal-full-height___gIM4E_5-1-2","modal-content":"magritte-modal-content___46QFS_5-1-2","modalContent":"magritte-modal-content___46QFS_5-1-2","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_5-1-2","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_5-1-2","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_5-1-2","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_5-1-2","divider-container":"magritte-divider-container___qP3VK_5-1-2","dividerContainer":"magritte-divider-container___qP3VK_5-1-2","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_5-1-2","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_5-1-2","modal-footer":"magritte-modal-footer___8xPqQ_5-1-2","modalFooter":"magritte-modal-footer___8xPqQ_5-1-2","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_5-1-2","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_5-1-2","animation-timeout":"magritte-animation-timeout___w-j7K_5-1-2","animationTimeout":"magritte-animation-timeout___w-j7K_5-1-2","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_5-1-2","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_5-1-2","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_5-1-2","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_5-1-2","modal-animation-enter":"magritte-modal-animation-enter___kruLO_5-1-2","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_5-1-2","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_5-1-2","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_5-1-2","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_5-1-2","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_5-1-2","content-sticky-container":"magritte-content-sticky-container___nqEXj_5-1-2","contentStickyContainer":"magritte-content-sticky-container___nqEXj_5-1-2"};
10
10
 
11
11
  const checkIsScrolledToBottom = (el) => {
12
12
  return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;
@@ -129,4 +129,4 @@ const ModalContentWithHeader = ({ labelId, children, headerHeight: _headerHeight
129
129
  };
130
130
 
131
131
  export { ModalContentWithHeader as M, styles as s };
132
- //# sourceMappingURL=ModalContentWithHeader-BoixiHEX.js.map
132
+ //# sourceMappingURL=ModalContentWithHeader-Bsm0DTzm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-BoixiHEX.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 } 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<ModalHeaderProps & { labelId: string; isTreeSelectorChild: boolean }>\n> = ({ labelId, children, headerHeight: _headerHeight = 0, isTreeSelectorChild, ...modalHeaderProps }) => {\n const { title, 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 headerHeightRef = useRef(0);\n const minHeaderHeightRef = useRef(0);\n const headerImageRef = useRef(!!headerImage);\n headerHeightRef.current = headerImage ? Math.max(_headerHeight, 200) : 0;\n headerImageRef.current = !!headerImage;\n\n const bottomDividerContainerRef = useRef<HTMLDivElement>(null);\n const topDividerContainerRef = useRef<HTMLDivElement>(null);\n\n const withoutHeader = !title && !headerImage && !actions && !actionLink && !options;\n const onlyActions = !title && !headerImage && !options && (actions || actionLink);\n\n const isTopDividerVisible = () => {\n if (!contentContainerRef.current) {\n return false;\n }\n\n const topDividerVisible = headerImageRef.current\n ? contentContainerRef.current.scrollTop >\n headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA\n : contentContainerRef.current.scrollTop !== 0;\n\n return topDividerVisible && (options || !headerImage) && !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 (!headerImageRef.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 && headerImage) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [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 (headerImageRef.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 className={styles.contentStickyContainer} ref={stickyContainerRef}>\n {children}\n </div>\n <div ref={spacePreserverRef} />\n </>\n )}\n </div>\n </div>\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"],"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;AACA,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,0BAA0B,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AAEvF;AACA;AACA,MAAM,qBAAqB,GAAG,CAC1B,YAAoB,EACpB,eAAuB,EACvB,aAAqB,EACrB,mBAA2B,EAC3B,YAAoB,KACpB;;AAEA,IAAA,MAAM,kBAAkB,GACpB,mBAAmB;AACnB,QAAA,aAAa;AACb,SAAC,wBAAwB,GAAG,YAAY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,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,EAC1C,GAAG,EAAE,mBAAmB,EACxB,QAAQ,EAAE,YAAY,EACd,SAAA,EAAA,gCAAgC,YAEvC,mBAAmB,IAChB,QAAQ,KAERF,IACI,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,EAAE,GAAG,EAAE,kBAAkB,EAAA,QAAA,EACjE,QAAQ,EACP,CAAA,EACNA,GAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,iBAAiB,EAAA,CAAI,CAChC,EAAA,CAAA,CACN,GACC,CACJ,EAAA,CAAA,EACNA,GACI,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBAC3C,CAAC,MAAM,CAAC,sBAAsB,GAAG,CAAC,uBAAuB,CAAC,OAAO;iBACpE,CAAC,EACF,GAAG,EAAE,yBAAyB,EAAA,QAAA,EAE9BA,GAAC,CAAA,OAAO,EAAG,EAAA,CAAA,EAAA,CACT,CACP,EAAA,CAAA,EACL;AACN;;;;"}
1
+ {"version":3,"file":"ModalContentWithHeader-Bsm0DTzm.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 } 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<ModalHeaderProps & { labelId: string; isTreeSelectorChild: boolean }>\n> = ({ labelId, children, headerHeight: _headerHeight = 0, isTreeSelectorChild, ...modalHeaderProps }) => {\n const { title, 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 headerHeightRef = useRef(0);\n const minHeaderHeightRef = useRef(0);\n const headerImageRef = useRef(!!headerImage);\n headerHeightRef.current = headerImage ? Math.max(_headerHeight, 200) : 0;\n headerImageRef.current = !!headerImage;\n\n const bottomDividerContainerRef = useRef<HTMLDivElement>(null);\n const topDividerContainerRef = useRef<HTMLDivElement>(null);\n\n const withoutHeader = !title && !headerImage && !actions && !actionLink && !options;\n const onlyActions = !title && !headerImage && !options && (actions || actionLink);\n\n const isTopDividerVisible = () => {\n if (!contentContainerRef.current) {\n return false;\n }\n\n const topDividerVisible = headerImageRef.current\n ? contentContainerRef.current.scrollTop >\n headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA\n : contentContainerRef.current.scrollTop !== 0;\n\n return topDividerVisible && (options || !headerImage) && !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 (!headerImageRef.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 && headerImage) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [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 (headerImageRef.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 className={styles.contentStickyContainer} ref={stickyContainerRef}>\n {children}\n </div>\n <div ref={spacePreserverRef} />\n </>\n )}\n </div>\n </div>\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"],"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;AACA,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,0BAA0B,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AAEvF;AACA;AACA,MAAM,qBAAqB,GAAG,CAC1B,YAAoB,EACpB,eAAuB,EACvB,aAAqB,EACrB,mB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EAAE;AAC1D,yBAAA,CAAC,EACF,GAAG,EAAE,sBAAsB,YAE3BA,GAAC,CAAA,OAAO,EAAG,EAAA,CAAA,EAAA,CACT,EACNA,GACI,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,EAC1C,GAAG,EAAE,mBAAmB,EACxB,QAAQ,EAAE,YAAY,EACd,SAAA,EAAA,gCAAgC,YAEvC,mBAAmB,IAChB,QAAQ,KAERF,IACI,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,EAAE,GAAG,EAAE,kBAAkB,EAAA,QAAA,EACjE,QAAQ,EACP,CAAA,EACNA,GAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,iBAAiB,EAAA,CAAI,CAChC,EAAA,CAAA,CACN,GACC,CACJ,EAAA,CAAA,EACNA,GACI,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBAC3C,CAAC,MAAM,CAAC,sBAAsB,GAAG,CAAC,uBAAuB,CAAC,OAAO;iBACpE,CAAC,EACF,GAAG,EAAE,yBAAyB,EAAA,QAAA,EAE9BA,GAAC,CAAA,OAAO,EAAG,EAAA,CAAA,EAAA,CACT,CACP,EAAA,CAAA,EACL;AACN;;;;"}
@@ -5,6 +5,6 @@ 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-BoixiHEX.js';
8
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-Bsm0DTzm.js';
9
9
  import '@hh.ru/magritte-ui-title';
10
10
  //# sourceMappingURL=ModalContentWithHeader.js.map
package/ModalHeader.js CHANGED
@@ -4,7 +4,7 @@ import { forwardRef } from 'react';
4
4
  import classnames from 'classnames';
5
5
  import { Title } from '@hh.ru/magritte-ui-title';
6
6
 
7
- var styles = {"content":"magritte-content___o6ktq_5-1-1","options":"magritte-options___qfErQ_5-1-1","actions":"magritte-actions___nQILV_5-1-1","actions-with-link":"magritte-actions-with-link___hnDux_5-1-1","actionsWithLink":"magritte-actions-with-link___hnDux_5-1-1","content-with-image":"magritte-content-with-image___YarBO_5-1-1","contentWithImage":"magritte-content-with-image___YarBO_5-1-1","actions-single":"magritte-actions-single___usfKu_5-1-1","actionsSingle":"magritte-actions-single___usfKu_5-1-1","image-container":"magritte-image-container___ioL3y_5-1-1","imageContainer":"magritte-image-container___ioL3y_5-1-1","title-wrapper":"magritte-title-wrapper___O--QR_5-1-1","titleWrapper":"magritte-title-wrapper___O--QR_5-1-1","wrapper":"magritte-wrapper___zH8vB_5-1-1"};
7
+ var styles = {"content":"magritte-content___o6ktq_5-1-2","options":"magritte-options___qfErQ_5-1-2","actions":"magritte-actions___nQILV_5-1-2","actions-with-link":"magritte-actions-with-link___hnDux_5-1-2","actionsWithLink":"magritte-actions-with-link___hnDux_5-1-2","content-with-image":"magritte-content-with-image___YarBO_5-1-2","contentWithImage":"magritte-content-with-image___YarBO_5-1-2","actions-single":"magritte-actions-single___usfKu_5-1-2","actionsSingle":"magritte-actions-single___usfKu_5-1-2","image-container":"magritte-image-container___ioL3y_5-1-2","imageContainer":"magritte-image-container___ioL3y_5-1-2","title-wrapper":"magritte-title-wrapper___O--QR_5-1-2","titleWrapper":"magritte-title-wrapper___O--QR_5-1-2","wrapper":"magritte-wrapper___zH8vB_5-1-2"};
8
8
 
9
9
  const ModalHeader = forwardRef(({ title, headerImage, headerHeight, titleAlignment, titleElement, titleMaxLines, titleSize, titleDescription, titleDescriptionMaxLines, titleStyle, titleDescriptionStyle, options, actions: _actions, actionLink, labelId, wrapperRef, }, ref) => {
10
10
  const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;
package/index.css CHANGED
@@ -540,14 +540,14 @@
540
540
  --magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
541
541
  --magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
542
542
  }
543
- .magritte-content___o6ktq_5-1-1{
543
+ .magritte-content___o6ktq_5-1-2{
544
544
  display:flex;
545
545
  align-items:flex-start;
546
546
  }
547
- .magritte-content___o6ktq_5-1-1 + .magritte-options___qfErQ_5-1-1{
547
+ .magritte-content___o6ktq_5-1-2 + .magritte-options___qfErQ_5-1-2{
548
548
  margin-top:24px;
549
549
  }
550
- .magritte-actions___nQILV_5-1-1{
550
+ .magritte-actions___nQILV_5-1-2{
551
551
  position:relative;
552
552
  z-index:1;
553
553
  display:flex;
@@ -556,10 +556,10 @@
556
556
  margin-left:auto;
557
557
  --magritte-ui-link-padding-override:9px;
558
558
  }
559
- .magritte-actions-with-link___hnDux_5-1-1{
559
+ .magritte-actions-with-link___hnDux_5-1-2{
560
560
  padding:0 8px 0 28px;
561
561
  }
562
- .magritte-content-with-image___YarBO_5-1-1{
562
+ .magritte-content-with-image___YarBO_5-1-2{
563
563
  position:relative;
564
564
  flex-direction:column;
565
565
  justify-content:flex-end;
@@ -569,22 +569,22 @@
569
569
  padding:12px 24px 24px;
570
570
  box-sizing:border-box;
571
571
  }
572
- .magritte-content-with-image___YarBO_5-1-1 .magritte-actions___nQILV_5-1-1{
572
+ .magritte-content-with-image___YarBO_5-1-2 .magritte-actions___nQILV_5-1-2{
573
573
  order:-1;
574
574
  gap:0;
575
575
  margin-right:-16px;
576
576
  margin-top:-4px;
577
577
  margin-bottom:auto;
578
578
  }
579
- .magritte-content-with-image___YarBO_5-1-1 .magritte-actions___nQILV_5-1-1:not(.magritte-actions-with-link___hnDux_5-1-1){
579
+ .magritte-content-with-image___YarBO_5-1-2 .magritte-actions___nQILV_5-1-2:not(.magritte-actions-with-link___hnDux_5-1-2){
580
580
  padding:0 4px;
581
581
  background-color:var(--magritte-color-component-modal-background-action-v20-0-1);
582
582
  border-radius:var(--magritte-static-border-radius-300-v20-0-1);
583
583
  }
584
- .magritte-content-with-image___YarBO_5-1-1 .magritte-actions___nQILV_5-1-1.magritte-actions-single___usfKu_5-1-1:not(.magritte-actions-with-link___hnDux_5-1-1){
584
+ .magritte-content-with-image___YarBO_5-1-2 .magritte-actions___nQILV_5-1-2.magritte-actions-single___usfKu_5-1-2:not(.magritte-actions-with-link___hnDux_5-1-2){
585
585
  padding:0;
586
586
  }
587
- .magritte-image-container___ioL3y_5-1-1{
587
+ .magritte-image-container___ioL3y_5-1-2{
588
588
  position:absolute;
589
589
  left:0;
590
590
  bottom:0;
@@ -592,10 +592,10 @@
592
592
  background-size:cover;
593
593
  --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v20-0-1);
594
594
  }
595
- .magritte-title-wrapper___O--QR_5-1-1{
595
+ .magritte-title-wrapper___O--QR_5-1-2{
596
596
  position:relative;
597
597
  }
598
- .magritte-wrapper___zH8vB_5-1-1{
598
+ .magritte-wrapper___zH8vB_5-1-2{
599
599
  margin-bottom:24px;
600
600
  }
601
601
 
@@ -1144,7 +1144,7 @@
1144
1144
  --magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
1145
1145
  --magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
1146
1146
  }
1147
- .magritte-modal-overlay___lK22l_5-1-1{
1147
+ .magritte-modal-overlay___lK22l_5-1-2{
1148
1148
  position:fixed;
1149
1149
  top:0;
1150
1150
  right:0;
@@ -1157,7 +1157,7 @@
1157
1157
  z-index:1;
1158
1158
  user-select:text;
1159
1159
  }
1160
- .magritte-modal___RAW6S_5-1-1{
1160
+ .magritte-modal___RAW6S_5-1-2{
1161
1161
  display:flex;
1162
1162
  box-sizing:border-box;
1163
1163
  margin:0 20px;
@@ -1170,108 +1170,108 @@
1170
1170
  overflow:hidden;
1171
1171
  width:800px;
1172
1172
  }
1173
- .magritte-modal___RAW6S_5-1-1.magritte-size-small___2JTM2_5-1-1{
1173
+ .magritte-modal___RAW6S_5-1-2.magritte-size-small___2JTM2_5-1-2{
1174
1174
  width:460px;
1175
1175
  }
1176
- .magritte-modal___RAW6S_5-1-1.magritte-size-medium___cWCe7_5-1-1{
1176
+ .magritte-modal___RAW6S_5-1-2.magritte-size-medium___cWCe7_5-1-2{
1177
1177
  width:600px;
1178
1178
  }
1179
- .magritte-no-vertical-paddings___Z3-oM_5-1-1{
1179
+ .magritte-no-vertical-paddings___Z3-oM_5-1-2{
1180
1180
  padding-top:0;
1181
1181
  padding-bottom:0;
1182
1182
  }
1183
- .magritte-no-horizontal-paddings___aT95Y_5-1-1{
1183
+ .magritte-no-horizontal-paddings___aT95Y_5-1-2{
1184
1184
  padding-left:0;
1185
1185
  padding-right:0;
1186
1186
  }
1187
- .magritte-modal-full-height___gIM4E_5-1-1{
1187
+ .magritte-modal-full-height___gIM4E_5-1-2{
1188
1188
  height:100%;
1189
1189
  }
1190
- .magritte-modal-content___46QFS_5-1-1{
1190
+ .magritte-modal-content___46QFS_5-1-2{
1191
1191
  flex:1 1;
1192
1192
  overflow-y:auto;
1193
1193
  padding:0 5px;
1194
1194
  margin:0 -5px;
1195
1195
  overscroll-behavior:none;
1196
1196
  }
1197
- .magritte-modal-content-wrapper___23XFT_5-1-1{
1197
+ .magritte-modal-content-wrapper___23XFT_5-1-2{
1198
1198
  display:flex;
1199
1199
  flex-direction:column;
1200
1200
  min-height:0;
1201
1201
  flex:1 1;
1202
1202
  }
1203
- .magritte-modal-content-wrapper__one-line___tYg8d_5-1-1{
1203
+ .magritte-modal-content-wrapper__one-line___tYg8d_5-1-2{
1204
1204
  flex-direction:row-reverse;
1205
1205
  }
1206
- .magritte-divider-container___qP3VK_5-1-1{
1206
+ .magritte-divider-container___qP3VK_5-1-2{
1207
1207
  margin:0 -24px;
1208
1208
  }
1209
- .magritte-divider-container___qP3VK_5-1-1.magritte-divider-container-hidden___EIxB-_5-1-1{
1209
+ .magritte-divider-container___qP3VK_5-1-2.magritte-divider-container-hidden___EIxB-_5-1-2{
1210
1210
  display:none;
1211
1211
  }
1212
- .magritte-modal-footer___8xPqQ_5-1-1{
1212
+ .magritte-modal-footer___8xPqQ_5-1-2{
1213
1213
  margin:0 -24px -24px;
1214
1214
  background-color:var(--magritte-color-component-modal-background-content-v20-0-1);
1215
1215
  z-index:1;
1216
1216
  }
1217
- .magritte-modal-buttons-container___1O1Nr_5-1-1{
1217
+ .magritte-modal-buttons-container___1O1Nr_5-1-2{
1218
1218
  display:flex;
1219
1219
  gap:12px;
1220
1220
  }
1221
- .magritte-animation-timeout___w-j7K_5-1-1,
1222
- .magritte-modal-animation-enter-active___E8KLu_5-1-1,
1223
- .magritte-modal-animation-exit-active___ERjKa_5-1-1{
1221
+ .magritte-animation-timeout___w-j7K_5-1-2,
1222
+ .magritte-modal-animation-enter-active___E8KLu_5-1-2,
1223
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2{
1224
1224
  --enter-animation-duration:0;
1225
1225
  --exit-animation-duration:0;
1226
1226
  }
1227
1227
  @media (prefers-reduced-motion: no-preference){
1228
- .magritte-animation-timeout___w-j7K_5-1-1,
1229
- .magritte-modal-animation-enter-active___E8KLu_5-1-1,
1230
- .magritte-modal-animation-exit-active___ERjKa_5-1-1{
1228
+ .magritte-animation-timeout___w-j7K_5-1-2,
1229
+ .magritte-modal-animation-enter-active___E8KLu_5-1-2,
1230
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2{
1231
1231
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v20-0-1);
1232
1232
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v20-0-1);
1233
1233
  }
1234
1234
  }
1235
- .magritte-modal-animation-enter___kruLO_5-1-1.magritte-modal-overlay___lK22l_5-1-1{
1235
+ .magritte-modal-animation-enter___kruLO_5-1-2.magritte-modal-overlay___lK22l_5-1-2{
1236
1236
  opacity:0;
1237
1237
  }
1238
- .magritte-modal-animation-enter___kruLO_5-1-1 .magritte-modal___RAW6S_5-1-1{
1238
+ .magritte-modal-animation-enter___kruLO_5-1-2 .magritte-modal___RAW6S_5-1-2{
1239
1239
  opacity:0;
1240
1240
  transform:scale(0.96);
1241
1241
  }
1242
- .magritte-modal-animation-enter-active___E8KLu_5-1-1 .magritte-modal___RAW6S_5-1-1,
1243
- .magritte-modal-animation-enter-active___E8KLu_5-1-1.magritte-modal-overlay___lK22l_5-1-1{
1242
+ .magritte-modal-animation-enter-active___E8KLu_5-1-2 .magritte-modal___RAW6S_5-1-2,
1243
+ .magritte-modal-animation-enter-active___E8KLu_5-1-2.magritte-modal-overlay___lK22l_5-1-2{
1244
1244
  opacity:1;
1245
1245
  transform:scale(1);
1246
1246
  transition-property:opacity, transform;
1247
1247
  transition-duration:var(--enter-animation-duration);
1248
1248
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v20-0-1);
1249
1249
  }
1250
- .magritte-modal-animation-exit___0jNgl_5-1-1.magritte-modal-overlay___lK22l_5-1-1{
1250
+ .magritte-modal-animation-exit___0jNgl_5-1-2.magritte-modal-overlay___lK22l_5-1-2{
1251
1251
  opacity:1;
1252
1252
  }
1253
- .magritte-modal-animation-exit___0jNgl_5-1-1 .magritte-modal___RAW6S_5-1-1{
1253
+ .magritte-modal-animation-exit___0jNgl_5-1-2 .magritte-modal___RAW6S_5-1-2{
1254
1254
  opacity:1;
1255
1255
  transform:scale(1);
1256
1256
  }
1257
- .magritte-modal-animation-exit-active___ERjKa_5-1-1.magritte-modal-overlay___lK22l_5-1-1{
1257
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2.magritte-modal-overlay___lK22l_5-1-2{
1258
1258
  opacity:0;
1259
1259
  }
1260
- .magritte-modal-animation-exit-active___ERjKa_5-1-1 .magritte-modal___RAW6S_5-1-1{
1260
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2 .magritte-modal___RAW6S_5-1-2{
1261
1261
  opacity:0;
1262
1262
  transform:scale(0.96);
1263
1263
  }
1264
- .magritte-modal-animation-exit-active___ERjKa_5-1-1 .magritte-modal___RAW6S_5-1-1,
1265
- .magritte-modal-animation-exit-active___ERjKa_5-1-1.magritte-modal-overlay___lK22l_5-1-1{
1264
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2 .magritte-modal___RAW6S_5-1-2,
1265
+ .magritte-modal-animation-exit-active___ERjKa_5-1-2.magritte-modal-overlay___lK22l_5-1-2{
1266
1266
  transition-property:opacity, transform;
1267
1267
  transition-duration:var(--exit-animation-duration);
1268
1268
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v20-0-1);
1269
1269
  }
1270
- .magritte-content-scroll-preserver___Tw5Px_5-1-1{
1270
+ .magritte-content-scroll-preserver___Tw5Px_5-1-2{
1271
1271
  width:100%;
1272
1272
  height:0;
1273
1273
  }
1274
- .magritte-content-sticky-container___nqEXj_5-1-1{
1274
+ .magritte-content-sticky-container___nqEXj_5-1-2{
1275
1275
  position:sticky;
1276
1276
  top:0;
1277
1277
  min-height:100%;
package/index.js CHANGED
@@ -15,7 +15,7 @@ import '@hh.ru/magritte-internal-layer-name';
15
15
  import '@hh.ru/magritte-ui-action-bar';
16
16
  import '@hh.ru/magritte-ui-breakpoint';
17
17
  import '@hh.ru/magritte-ui-layer';
18
- import './ModalContentWithHeader-BoixiHEX.js';
18
+ import './ModalContentWithHeader-Bsm0DTzm.js';
19
19
  import '@hh.ru/magritte-common-func-utils';
20
20
  import '@hh.ru/magritte-ui-divider';
21
21
  import './ModalHeader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-modal",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -29,16 +29,16 @@
29
29
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.1",
30
30
  "@hh.ru/magritte-design-tokens": "20.0.1",
31
31
  "@hh.ru/magritte-internal-layer-name": "2.2.0",
32
- "@hh.ru/magritte-ui-action": "4.4.17",
33
- "@hh.ru/magritte-ui-action-bar": "2.2.10",
32
+ "@hh.ru/magritte-ui-action": "4.4.18",
33
+ "@hh.ru/magritte-ui-action-bar": "2.2.11",
34
34
  "@hh.ru/magritte-ui-breakpoint": "4.1.0",
35
35
  "@hh.ru/magritte-ui-divider": "1.1.37",
36
- "@hh.ru/magritte-ui-icon": "7.9.6",
36
+ "@hh.ru/magritte-ui-icon": "7.9.7",
37
37
  "@hh.ru/magritte-ui-layer": "2.1.0",
38
38
  "@hh.ru/magritte-ui-mock-component": "1.0.11",
39
39
  "@hh.ru/magritte-ui-theme-provider": "1.1.33",
40
40
  "@hh.ru/magritte-ui-title": "5.0.13",
41
- "@hh.ru/magritte-ui-tree-selector": "4.5.6"
41
+ "@hh.ru/magritte-ui-tree-selector": "4.5.7"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "classnames": ">=2.3.2",
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "e07e30dd365e91f71d0dd60defea49856af99bd4"
52
+ "gitHead": "0cba1a0b8d618df338719bc996e2f5535af80e79"
53
53
  }