@hh.ru/magritte-ui-modal 7.0.2 → 7.0.4

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-C4ua98pb.js';
15
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-Bvejo5fN.js';
16
16
  import { useModalOrder } from './useModalOrder.js';
17
17
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
18
18
  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_7-0-2","modalOverlay":"magritte-modal-overlay___lK22l_7-0-2","modal":"magritte-modal___RAW6S_7-0-2","size-small":"magritte-size-small___2JTM2_7-0-2","sizeSmall":"magritte-size-small___2JTM2_7-0-2","size-medium":"magritte-size-medium___cWCe7_7-0-2","sizeMedium":"magritte-size-medium___cWCe7_7-0-2","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_7-0-2","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_7-0-2","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_7-0-2","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_7-0-2","modal-full-height":"magritte-modal-full-height___gIM4E_7-0-2","modalFullHeight":"magritte-modal-full-height___gIM4E_7-0-2","modal-content":"magritte-modal-content___46QFS_7-0-2","modalContent":"magritte-modal-content___46QFS_7-0-2","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_7-0-2","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_7-0-2","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_7-0-2","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_7-0-2","divider-container":"magritte-divider-container___qP3VK_7-0-2","dividerContainer":"magritte-divider-container___qP3VK_7-0-2","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_7-0-2","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_7-0-2","modal-footer":"magritte-modal-footer___8xPqQ_7-0-2","modalFooter":"magritte-modal-footer___8xPqQ_7-0-2","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_7-0-2","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_7-0-2","animation-timeout":"magritte-animation-timeout___w-j7K_7-0-2","animationTimeout":"magritte-animation-timeout___w-j7K_7-0-2","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_7-0-2","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_7-0-2","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_7-0-2","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_7-0-2","modal-animation-enter":"magritte-modal-animation-enter___kruLO_7-0-2","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_7-0-2","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_7-0-2","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_7-0-2","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_7-0-2","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_7-0-2","content-sticky-container":"magritte-content-sticky-container___nqEXj_7-0-2","contentStickyContainer":"magritte-content-sticky-container___nqEXj_7-0-2"};
9
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_7-0-4","modalOverlay":"magritte-modal-overlay___lK22l_7-0-4","modal":"magritte-modal___RAW6S_7-0-4","size-small":"magritte-size-small___2JTM2_7-0-4","sizeSmall":"magritte-size-small___2JTM2_7-0-4","size-medium":"magritte-size-medium___cWCe7_7-0-4","sizeMedium":"magritte-size-medium___cWCe7_7-0-4","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_7-0-4","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_7-0-4","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_7-0-4","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_7-0-4","modal-full-height":"magritte-modal-full-height___gIM4E_7-0-4","modalFullHeight":"magritte-modal-full-height___gIM4E_7-0-4","modal-content":"magritte-modal-content___46QFS_7-0-4","modalContent":"magritte-modal-content___46QFS_7-0-4","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_7-0-4","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_7-0-4","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_7-0-4","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_7-0-4","divider-container":"magritte-divider-container___qP3VK_7-0-4","dividerContainer":"magritte-divider-container___qP3VK_7-0-4","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_7-0-4","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_7-0-4","modal-footer":"magritte-modal-footer___8xPqQ_7-0-4","modalFooter":"magritte-modal-footer___8xPqQ_7-0-4","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_7-0-4","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_7-0-4","animation-timeout":"magritte-animation-timeout___w-j7K_7-0-4","animationTimeout":"magritte-animation-timeout___w-j7K_7-0-4","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_7-0-4","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_7-0-4","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_7-0-4","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_7-0-4","modal-animation-enter":"magritte-modal-animation-enter___kruLO_7-0-4","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_7-0-4","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_7-0-4","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_7-0-4","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_7-0-4","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_7-0-4","content-sticky-container":"magritte-content-sticky-container___nqEXj_7-0-4","contentStickyContainer":"magritte-content-sticky-container___nqEXj_7-0-4"};
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-C4ua98pb.js.map
132
+ //# sourceMappingURL=ModalContentWithHeader-Bvejo5fN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-C4ua98pb.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,YAA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I,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-Bvejo5fN.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-C4ua98pb.js';
8
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-Bvejo5fN.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_7-0-2","options":"magritte-options___qfErQ_7-0-2","actions":"magritte-actions___nQILV_7-0-2","actions-with-link":"magritte-actions-with-link___hnDux_7-0-2","actionsWithLink":"magritte-actions-with-link___hnDux_7-0-2","content-with-image":"magritte-content-with-image___YarBO_7-0-2","contentWithImage":"magritte-content-with-image___YarBO_7-0-2","actions-single":"magritte-actions-single___usfKu_7-0-2","actionsSingle":"magritte-actions-single___usfKu_7-0-2","image-container":"magritte-image-container___ioL3y_7-0-2","imageContainer":"magritte-image-container___ioL3y_7-0-2","title-wrapper":"magritte-title-wrapper___O--QR_7-0-2","titleWrapper":"magritte-title-wrapper___O--QR_7-0-2","wrapper":"magritte-wrapper___zH8vB_7-0-2"};
7
+ var styles = {"content":"magritte-content___o6ktq_7-0-4","options":"magritte-options___qfErQ_7-0-4","actions":"magritte-actions___nQILV_7-0-4","actions-with-link":"magritte-actions-with-link___hnDux_7-0-4","actionsWithLink":"magritte-actions-with-link___hnDux_7-0-4","content-with-image":"magritte-content-with-image___YarBO_7-0-4","contentWithImage":"magritte-content-with-image___YarBO_7-0-4","actions-single":"magritte-actions-single___usfKu_7-0-4","actionsSingle":"magritte-actions-single___usfKu_7-0-4","image-container":"magritte-image-container___ioL3y_7-0-4","imageContainer":"magritte-image-container___ioL3y_7-0-4","title-wrapper":"magritte-title-wrapper___O--QR_7-0-4","titleWrapper":"magritte-title-wrapper___O--QR_7-0-4","wrapper":"magritte-wrapper___zH8vB_7-0-4"};
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
@@ -1,23 +1,23 @@
1
1
  :root{
2
- --magritte-color-component-modal-background-action-v21-2-0:#20262b99;
3
- --magritte-gradient-component-modal-background-fade-v21-2-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
2
+ --magritte-color-component-modal-background-action-v21-3-0:#20262b99;
3
+ --magritte-gradient-component-modal-background-fade-v21-3-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
4
4
  }
5
5
  :root{
6
- --magritte-static-border-radius-300-v21-2-0:12px;
7
- --magritte-static-border-radius-400-v21-2-0:16px;
6
+ --magritte-static-border-radius-300-v21-3-0:12px;
7
+ --magritte-static-border-radius-400-v21-3-0:16px;
8
8
  }
9
9
  .magritte-night-theme{
10
- --magritte-color-component-modal-background-action-v21-2-0:#20262b99;
11
- --magritte-gradient-component-modal-background-fade-v21-2-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
10
+ --magritte-color-component-modal-background-action-v21-3-0:#20262b99;
11
+ --magritte-gradient-component-modal-background-fade-v21-3-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
12
12
  }
13
- .magritte-content___o6ktq_7-0-2{
13
+ .magritte-content___o6ktq_7-0-4{
14
14
  display:flex;
15
15
  align-items:flex-start;
16
16
  }
17
- .magritte-content___o6ktq_7-0-2 + .magritte-options___qfErQ_7-0-2{
17
+ .magritte-content___o6ktq_7-0-4 + .magritte-options___qfErQ_7-0-4{
18
18
  margin-top:24px;
19
19
  }
20
- .magritte-actions___nQILV_7-0-2{
20
+ .magritte-actions___nQILV_7-0-4{
21
21
  position:relative;
22
22
  z-index:1;
23
23
  display:flex;
@@ -26,65 +26,65 @@
26
26
  margin-left:auto;
27
27
  --magritte-ui-link-padding-override:9px;
28
28
  }
29
- .magritte-actions-with-link___hnDux_7-0-2{
29
+ .magritte-actions-with-link___hnDux_7-0-4{
30
30
  padding:0 8px 0 28px;
31
31
  }
32
- .magritte-content-with-image___YarBO_7-0-2{
32
+ .magritte-content-with-image___YarBO_7-0-4{
33
33
  position:relative;
34
34
  flex-direction:column;
35
35
  justify-content:flex-end;
36
36
  margin:-12px -12px 0;
37
- border-radius:var(--magritte-static-border-radius-400-v21-2-0);
37
+ border-radius:var(--magritte-static-border-radius-400-v21-3-0);
38
38
  overflow:hidden;
39
39
  padding:12px 24px 24px;
40
40
  box-sizing:border-box;
41
41
  }
42
- .magritte-content-with-image___YarBO_7-0-2 .magritte-actions___nQILV_7-0-2{
42
+ .magritte-content-with-image___YarBO_7-0-4 .magritte-actions___nQILV_7-0-4{
43
43
  order:-1;
44
44
  gap:0;
45
45
  margin-right:-16px;
46
46
  margin-top:-4px;
47
47
  margin-bottom:auto;
48
48
  }
49
- .magritte-content-with-image___YarBO_7-0-2 .magritte-actions___nQILV_7-0-2:not(.magritte-actions-with-link___hnDux_7-0-2){
49
+ .magritte-content-with-image___YarBO_7-0-4 .magritte-actions___nQILV_7-0-4:not(.magritte-actions-with-link___hnDux_7-0-4){
50
50
  padding:0 4px;
51
- background-color:var(--magritte-color-component-modal-background-action-v21-2-0);
52
- border-radius:var(--magritte-static-border-radius-300-v21-2-0);
51
+ background-color:var(--magritte-color-component-modal-background-action-v21-3-0);
52
+ border-radius:var(--magritte-static-border-radius-300-v21-3-0);
53
53
  }
54
- .magritte-content-with-image___YarBO_7-0-2 .magritte-actions___nQILV_7-0-2.magritte-actions-single___usfKu_7-0-2:not(.magritte-actions-with-link___hnDux_7-0-2){
54
+ .magritte-content-with-image___YarBO_7-0-4 .magritte-actions___nQILV_7-0-4.magritte-actions-single___usfKu_7-0-4:not(.magritte-actions-with-link___hnDux_7-0-4){
55
55
  padding:0;
56
56
  }
57
- .magritte-image-container___ioL3y_7-0-2{
57
+ .magritte-image-container___ioL3y_7-0-4{
58
58
  position:absolute;
59
59
  left:0;
60
60
  bottom:0;
61
61
  right:0;
62
62
  background-size:cover;
63
- --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v21-2-0);
63
+ --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v21-3-0);
64
64
  }
65
- .magritte-title-wrapper___O--QR_7-0-2{
65
+ .magritte-title-wrapper___O--QR_7-0-4{
66
66
  position:relative;
67
67
  }
68
- .magritte-wrapper___zH8vB_7-0-2{
68
+ .magritte-wrapper___zH8vB_7-0-4{
69
69
  margin-bottom:24px;
70
70
  }
71
71
 
72
72
  :root{
73
- --magritte-color-background-overlay-v21-2-0:#20262b99;
74
- --magritte-color-component-modal-background-content-v21-2-0:#ffffff;
73
+ --magritte-color-background-overlay-v21-3-0:#20262b99;
74
+ --magritte-color-component-modal-background-content-v21-3-0:#ffffff;
75
75
  }
76
76
  :root{
77
- --magritte-semantic-animation-ease-in-out-200-timing-function-v21-2-0:cubic-bezier(0.25, 0.1, 0.25, 1);
78
- --magritte-semantic-animation-ease-in-out-200-duration-v21-2-0:200ms;
79
- --magritte-semantic-animation-ease-in-out-300-timing-function-v21-2-0:cubic-bezier(0.25, 0.1, 0.25, 1);
80
- --magritte-semantic-animation-ease-in-out-300-duration-v21-2-0:300ms;
81
- --magritte-static-border-radius-600-v21-2-0:24px;
77
+ --magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-0:cubic-bezier(0.25, 0.1, 0.25, 1);
78
+ --magritte-semantic-animation-ease-in-out-200-duration-v21-3-0:200ms;
79
+ --magritte-semantic-animation-ease-in-out-300-timing-function-v21-3-0:cubic-bezier(0.25, 0.1, 0.25, 1);
80
+ --magritte-semantic-animation-ease-in-out-300-duration-v21-3-0:300ms;
81
+ --magritte-static-border-radius-600-v21-3-0:24px;
82
82
  }
83
83
  .magritte-night-theme{
84
- --magritte-color-background-overlay-v21-2-0:#20262b99;
85
- --magritte-color-component-modal-background-content-v21-2-0:#1B1B1B;
84
+ --magritte-color-background-overlay-v21-3-0:#20262b99;
85
+ --magritte-color-component-modal-background-content-v21-3-0:#1B1B1B;
86
86
  }
87
- .magritte-modal-overlay___lK22l_7-0-2{
87
+ .magritte-modal-overlay___lK22l_7-0-4{
88
88
  position:fixed;
89
89
  top:0;
90
90
  right:0;
@@ -93,12 +93,12 @@
93
93
  display:flex;
94
94
  align-items:center;
95
95
  justify-content:center;
96
- background-color:var(--magritte-color-background-overlay-v21-2-0);
96
+ background-color:var(--magritte-color-background-overlay-v21-3-0);
97
97
  z-index:1;
98
98
  user-select:text;
99
99
  transition-property:opacity, transform;
100
100
  }
101
- .magritte-modal___RAW6S_7-0-2{
101
+ .magritte-modal___RAW6S_7-0-4{
102
102
  display:flex;
103
103
  box-sizing:border-box;
104
104
  margin:0 20px;
@@ -106,112 +106,112 @@
106
106
  flex-direction:column;
107
107
  max-height:calc(100vh - 24px * 2);
108
108
  position:relative;
109
- background-color:var(--magritte-color-component-modal-background-content-v21-2-0);
110
- border-radius:var(--magritte-static-border-radius-600-v21-2-0);
109
+ background-color:var(--magritte-color-component-modal-background-content-v21-3-0);
110
+ border-radius:var(--magritte-static-border-radius-600-v21-3-0);
111
111
  overflow:hidden;
112
112
  width:800px;
113
113
  transition-property:opacity, transform;
114
114
  }
115
- .magritte-modal___RAW6S_7-0-2.magritte-size-small___2JTM2_7-0-2{
115
+ .magritte-modal___RAW6S_7-0-4.magritte-size-small___2JTM2_7-0-4{
116
116
  width:460px;
117
117
  }
118
- .magritte-modal___RAW6S_7-0-2.magritte-size-medium___cWCe7_7-0-2{
118
+ .magritte-modal___RAW6S_7-0-4.magritte-size-medium___cWCe7_7-0-4{
119
119
  width:600px;
120
120
  }
121
- .magritte-no-vertical-paddings___Z3-oM_7-0-2{
121
+ .magritte-no-vertical-paddings___Z3-oM_7-0-4{
122
122
  padding-top:0;
123
123
  padding-bottom:0;
124
124
  }
125
- .magritte-no-horizontal-paddings___aT95Y_7-0-2{
125
+ .magritte-no-horizontal-paddings___aT95Y_7-0-4{
126
126
  padding-left:0;
127
127
  padding-right:0;
128
128
  }
129
- .magritte-modal-full-height___gIM4E_7-0-2{
129
+ .magritte-modal-full-height___gIM4E_7-0-4{
130
130
  height:100%;
131
131
  }
132
- .magritte-modal-content___46QFS_7-0-2{
132
+ .magritte-modal-content___46QFS_7-0-4{
133
133
  flex:1 1;
134
134
  overflow-y:auto;
135
135
  padding:0 5px;
136
136
  margin:0 -5px;
137
137
  overscroll-behavior:none;
138
138
  }
139
- .magritte-modal-content-wrapper___23XFT_7-0-2{
139
+ .magritte-modal-content-wrapper___23XFT_7-0-4{
140
140
  display:flex;
141
141
  flex-direction:column;
142
142
  min-height:0;
143
143
  flex:1 1;
144
144
  }
145
- .magritte-modal-content-wrapper__one-line___tYg8d_7-0-2{
145
+ .magritte-modal-content-wrapper__one-line___tYg8d_7-0-4{
146
146
  flex-direction:row-reverse;
147
147
  }
148
- .magritte-divider-container___qP3VK_7-0-2{
148
+ .magritte-divider-container___qP3VK_7-0-4{
149
149
  margin:0 -24px;
150
150
  }
151
- .magritte-divider-container___qP3VK_7-0-2.magritte-divider-container-hidden___EIxB-_7-0-2{
151
+ .magritte-divider-container___qP3VK_7-0-4.magritte-divider-container-hidden___EIxB-_7-0-4{
152
152
  display:none;
153
153
  }
154
- .magritte-modal-footer___8xPqQ_7-0-2{
154
+ .magritte-modal-footer___8xPqQ_7-0-4{
155
155
  margin:0 -24px -24px;
156
- background-color:var(--magritte-color-component-modal-background-content-v21-2-0);
156
+ background-color:var(--magritte-color-component-modal-background-content-v21-3-0);
157
157
  z-index:1;
158
158
  }
159
- .magritte-modal-buttons-container___1O1Nr_7-0-2{
159
+ .magritte-modal-buttons-container___1O1Nr_7-0-4{
160
160
  display:flex;
161
161
  gap:12px;
162
162
  }
163
- .magritte-animation-timeout___w-j7K_7-0-2,
164
- .magritte-modal-animation-enter-active___E8KLu_7-0-2,
165
- .magritte-modal-animation-exit-active___ERjKa_7-0-2{
163
+ .magritte-animation-timeout___w-j7K_7-0-4,
164
+ .magritte-modal-animation-enter-active___E8KLu_7-0-4,
165
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4{
166
166
  --enter-animation-duration:0;
167
167
  --exit-animation-duration:0;
168
168
  }
169
169
  @media (prefers-reduced-motion: no-preference){
170
- .magritte-animation-timeout___w-j7K_7-0-2,
171
- .magritte-modal-animation-enter-active___E8KLu_7-0-2,
172
- .magritte-modal-animation-exit-active___ERjKa_7-0-2{
173
- --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v21-2-0);
174
- --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-2-0);
170
+ .magritte-animation-timeout___w-j7K_7-0-4,
171
+ .magritte-modal-animation-enter-active___E8KLu_7-0-4,
172
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4{
173
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v21-3-0);
174
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-0);
175
175
  }
176
176
  }
177
- .magritte-modal-animation-enter___kruLO_7-0-2.magritte-modal-overlay___lK22l_7-0-2{
177
+ .magritte-modal-animation-enter___kruLO_7-0-4.magritte-modal-overlay___lK22l_7-0-4{
178
178
  opacity:0;
179
179
  }
180
- .magritte-modal-animation-enter___kruLO_7-0-2 .magritte-modal___RAW6S_7-0-2{
180
+ .magritte-modal-animation-enter___kruLO_7-0-4 .magritte-modal___RAW6S_7-0-4{
181
181
  opacity:0;
182
182
  transform:scale(0.96);
183
183
  }
184
- .magritte-modal-animation-enter-active___E8KLu_7-0-2 .magritte-modal___RAW6S_7-0-2,
185
- .magritte-modal-animation-enter-active___E8KLu_7-0-2.magritte-modal-overlay___lK22l_7-0-2{
184
+ .magritte-modal-animation-enter-active___E8KLu_7-0-4 .magritte-modal___RAW6S_7-0-4,
185
+ .magritte-modal-animation-enter-active___E8KLu_7-0-4.magritte-modal-overlay___lK22l_7-0-4{
186
186
  opacity:1;
187
187
  transform:scale(1);
188
188
  transition-duration:var(--enter-animation-duration);
189
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v21-2-0);
189
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v21-3-0);
190
190
  }
191
- .magritte-modal-animation-exit___0jNgl_7-0-2.magritte-modal-overlay___lK22l_7-0-2{
191
+ .magritte-modal-animation-exit___0jNgl_7-0-4.magritte-modal-overlay___lK22l_7-0-4{
192
192
  opacity:1;
193
193
  }
194
- .magritte-modal-animation-exit___0jNgl_7-0-2 .magritte-modal___RAW6S_7-0-2{
194
+ .magritte-modal-animation-exit___0jNgl_7-0-4 .magritte-modal___RAW6S_7-0-4{
195
195
  opacity:1;
196
196
  transform:scale(1);
197
197
  }
198
- .magritte-modal-animation-exit-active___ERjKa_7-0-2.magritte-modal-overlay___lK22l_7-0-2{
198
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4.magritte-modal-overlay___lK22l_7-0-4{
199
199
  opacity:0;
200
200
  }
201
- .magritte-modal-animation-exit-active___ERjKa_7-0-2 .magritte-modal___RAW6S_7-0-2{
201
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4 .magritte-modal___RAW6S_7-0-4{
202
202
  opacity:0;
203
203
  transform:scale(0.96);
204
204
  }
205
- .magritte-modal-animation-exit-active___ERjKa_7-0-2 .magritte-modal___RAW6S_7-0-2,
206
- .magritte-modal-animation-exit-active___ERjKa_7-0-2.magritte-modal-overlay___lK22l_7-0-2{
205
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4 .magritte-modal___RAW6S_7-0-4,
206
+ .magritte-modal-animation-exit-active___ERjKa_7-0-4.magritte-modal-overlay___lK22l_7-0-4{
207
207
  transition-duration:var(--exit-animation-duration);
208
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-2-0);
208
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-0);
209
209
  }
210
- .magritte-content-scroll-preserver___Tw5Px_7-0-2{
210
+ .magritte-content-scroll-preserver___Tw5Px_7-0-4{
211
211
  width:100%;
212
212
  height:0;
213
213
  }
214
- .magritte-content-sticky-container___nqEXj_7-0-2{
214
+ .magritte-content-sticky-container___nqEXj_7-0-4{
215
215
  position:sticky;
216
216
  top:0;
217
217
  min-height:100%;
package/index.js CHANGED
@@ -14,7 +14,7 @@ import '@hh.ru/magritte-common-use-no-bubbling';
14
14
  import '@hh.ru/magritte-ui-action-bar';
15
15
  import '@hh.ru/magritte-ui-breakpoint';
16
16
  import '@hh.ru/magritte-ui-layer';
17
- import './ModalContentWithHeader-C4ua98pb.js';
17
+ import './ModalContentWithHeader-Bvejo5fN.js';
18
18
  import '@hh.ru/magritte-common-func-utils';
19
19
  import '@hh.ru/magritte-ui-divider';
20
20
  import './ModalHeader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-modal",
3
- "version": "7.0.2",
3
+ "version": "7.0.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -27,18 +27,18 @@
27
27
  "@hh.ru/magritte-common-modal-helper": "1.2.7",
28
28
  "@hh.ru/magritte-common-use-multiple-refs": "1.1.5",
29
29
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.2",
30
- "@hh.ru/magritte-design-tokens": "21.2.0",
30
+ "@hh.ru/magritte-design-tokens": "21.3.0",
31
31
  "@hh.ru/magritte-internal-layer-name": "3.0.0",
32
- "@hh.ru/magritte-ui-action": "4.4.28",
33
- "@hh.ru/magritte-ui-action-bar": "3.0.2",
32
+ "@hh.ru/magritte-ui-action": "4.4.30",
33
+ "@hh.ru/magritte-ui-action-bar": "3.0.4",
34
34
  "@hh.ru/magritte-ui-breakpoint": "5.0.0",
35
- "@hh.ru/magritte-ui-divider": "1.1.42",
36
- "@hh.ru/magritte-ui-icon": "8.0.1",
35
+ "@hh.ru/magritte-ui-divider": "1.1.43",
36
+ "@hh.ru/magritte-ui-icon": "8.0.3",
37
37
  "@hh.ru/magritte-ui-layer": "3.0.0",
38
38
  "@hh.ru/magritte-ui-mock-component": "1.0.12",
39
- "@hh.ru/magritte-ui-theme-provider": "1.1.38",
40
- "@hh.ru/magritte-ui-title": "6.1.1",
41
- "@hh.ru/magritte-ui-tree-selector": "4.6.19"
39
+ "@hh.ru/magritte-ui-theme-provider": "1.1.39",
40
+ "@hh.ru/magritte-ui-title": "6.1.2",
41
+ "@hh.ru/magritte-ui-tree-selector": "4.6.21"
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": "4cea99b0c3be38206bb6f5e6945fa298c8b3dcd1"
52
+ "gitHead": "f34863ead2fa1b6fd393104b762f2ba9f3d5d907"
53
53
  }