@hh.ru/magritte-ui-modal 9.0.8 → 9.0.9

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-BplZxF6y.js';
15
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-CA7qQhoI.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-8","modalOverlay":"magritte-modal-overlay___lK22l_9-0-8","overlay-left":"magritte-overlay-left___JtHK4_9-0-8","overlayLeft":"magritte-overlay-left___JtHK4_9-0-8","overlay-right":"magritte-overlay-right___uKTDt_9-0-8","overlayRight":"magritte-overlay-right___uKTDt_9-0-8","modal":"magritte-modal___RAW6S_9-0-8","size-small":"magritte-size-small___2JTM2_9-0-8","sizeSmall":"magritte-size-small___2JTM2_9-0-8","size-medium":"magritte-size-medium___cWCe7_9-0-8","sizeMedium":"magritte-size-medium___cWCe7_9-0-8","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-8","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-8","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-8","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-8","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-8","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-8","modal-content":"magritte-modal-content___46QFS_9-0-8","modalContent":"magritte-modal-content___46QFS_9-0-8","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-8","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-8","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-8","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-8","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-8","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-8","divider-container":"magritte-divider-container___qP3VK_9-0-8","dividerContainer":"magritte-divider-container___qP3VK_9-0-8","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-8","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-8","modal-footer":"magritte-modal-footer___8xPqQ_9-0-8","modalFooter":"magritte-modal-footer___8xPqQ_9-0-8","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-8","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-8","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-8","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-8","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-8","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-8","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-8","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-8","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-8","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-8","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-8","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-8","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-8","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-8","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-8","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-8","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-8","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-8","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-8","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-8","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-8","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-8","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-8","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-8","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-8","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-8","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-8","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-8","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-8","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-8","content-container":"magritte-content-container___-ql3h_9-0-8","contentContainer":"magritte-content-container___-ql3h_9-0-8","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-8","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-8"};
9
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_9-0-9","modalOverlay":"magritte-modal-overlay___lK22l_9-0-9","overlay-left":"magritte-overlay-left___JtHK4_9-0-9","overlayLeft":"magritte-overlay-left___JtHK4_9-0-9","overlay-right":"magritte-overlay-right___uKTDt_9-0-9","overlayRight":"magritte-overlay-right___uKTDt_9-0-9","modal":"magritte-modal___RAW6S_9-0-9","size-small":"magritte-size-small___2JTM2_9-0-9","sizeSmall":"magritte-size-small___2JTM2_9-0-9","size-medium":"magritte-size-medium___cWCe7_9-0-9","sizeMedium":"magritte-size-medium___cWCe7_9-0-9","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-9","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-9","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-9","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-9","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-9","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-9","modal-content":"magritte-modal-content___46QFS_9-0-9","modalContent":"magritte-modal-content___46QFS_9-0-9","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-9","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-9","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-9","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-9","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-9","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-9","divider-container":"magritte-divider-container___qP3VK_9-0-9","dividerContainer":"magritte-divider-container___qP3VK_9-0-9","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-9","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-9","modal-footer":"magritte-modal-footer___8xPqQ_9-0-9","modalFooter":"magritte-modal-footer___8xPqQ_9-0-9","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-9","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-9","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-9","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-9","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-9","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-9","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-9","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-9","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-9","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-9","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-9","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-9","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-9","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-9","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-9","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-9","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-9","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-9","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-9","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-9","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-9","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-9","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-9","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-9","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-9","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-9","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-9","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-9","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-9","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-9","content-container":"magritte-content-container___-ql3h_9-0-9","contentContainer":"magritte-content-container___-ql3h_9-0-9","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-9","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-9"};
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-BplZxF6y.js.map
134
+ //# sourceMappingURL=ModalContentWithHeader-CA7qQhoI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-BplZxF6y.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 <div className={styles.contentContainer}>{children}</div>\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;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,CAAC;AACzC,SAAC,eAAe,GAAG,YAAY,CAAC,CAAC;IAErC,MAAM,qBAAqB,GAAG,eAAe,IAAI,kBAAkB,GAAG,0BAA0B,CAAC,CAAC;IAElG,OAAO,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAClB,oBAA2C,EA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AC,YAAY,CAAC,EAC1C,GAAG,EAAE,mBAAmB,EACxB,QAAQ,EAAE,YAAY,EACd,SAAA,EAAA,gCAAgC,YAEvC,mBAAmB,IAChBA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAO,KAEzDF,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GACI,CAAA,KAAA,EAAA,EAAA,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-CA7qQhoI.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 <div className={styles.contentContainer}>{children}</div>\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,C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,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;;;;"}
@@ -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-BplZxF6y.js';
8
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-CA7qQhoI.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-8","options":"magritte-options___qfErQ_9-0-8","actions":"magritte-actions___nQILV_9-0-8","actions-with-link":"magritte-actions-with-link___hnDux_9-0-8","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-8","content-with-image":"magritte-content-with-image___YarBO_9-0-8","contentWithImage":"magritte-content-with-image___YarBO_9-0-8","actions-single":"magritte-actions-single___usfKu_9-0-8","actionsSingle":"magritte-actions-single___usfKu_9-0-8","image-container":"magritte-image-container___ioL3y_9-0-8","imageContainer":"magritte-image-container___ioL3y_9-0-8","title-wrapper":"magritte-title-wrapper___O--QR_9-0-8","titleWrapper":"magritte-title-wrapper___O--QR_9-0-8","wrapper":"magritte-wrapper___zH8vB_9-0-8","only-actions":"magritte-only-actions___ZC4jx_9-0-8","onlyActions":"magritte-only-actions___ZC4jx_9-0-8"};
8
+ var styles = {"content":"magritte-content___o6ktq_9-0-9","options":"magritte-options___qfErQ_9-0-9","actions":"magritte-actions___nQILV_9-0-9","actions-with-link":"magritte-actions-with-link___hnDux_9-0-9","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-9","content-with-image":"magritte-content-with-image___YarBO_9-0-9","contentWithImage":"magritte-content-with-image___YarBO_9-0-9","actions-single":"magritte-actions-single___usfKu_9-0-9","actionsSingle":"magritte-actions-single___usfKu_9-0-9","image-container":"magritte-image-container___ioL3y_9-0-9","imageContainer":"magritte-image-container___ioL3y_9-0-9","title-wrapper":"magritte-title-wrapper___O--QR_9-0-9","titleWrapper":"magritte-title-wrapper___O--QR_9-0-9","wrapper":"magritte-wrapper___zH8vB_9-0-9","only-actions":"magritte-only-actions___ZC4jx_9-0-9","onlyActions":"magritte-only-actions___ZC4jx_9-0-9"};
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
@@ -17,14 +17,14 @@
17
17
  --magritte-color-component-modal-background-action-v23-0-0:#20262b99;
18
18
  --magritte-gradient-component-modal-background-fade-v23-0-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
19
19
  }
20
- .magritte-content___o6ktq_9-0-8{
20
+ .magritte-content___o6ktq_9-0-9{
21
21
  display:flex;
22
22
  align-items:flex-start;
23
23
  }
24
- .magritte-content___o6ktq_9-0-8 + .magritte-options___qfErQ_9-0-8{
24
+ .magritte-content___o6ktq_9-0-9 + .magritte-options___qfErQ_9-0-9{
25
25
  margin-top:24px;
26
26
  }
27
- .magritte-actions___nQILV_9-0-8{
27
+ .magritte-actions___nQILV_9-0-9{
28
28
  position:relative;
29
29
  z-index:1;
30
30
  display:flex;
@@ -33,10 +33,10 @@
33
33
  margin-left:auto;
34
34
  --magritte-ui-link-padding-override:9px;
35
35
  }
36
- .magritte-actions-with-link___hnDux_9-0-8{
36
+ .magritte-actions-with-link___hnDux_9-0-9{
37
37
  padding:0 8px 0 28px;
38
38
  }
39
- .magritte-content-with-image___YarBO_9-0-8{
39
+ .magritte-content-with-image___YarBO_9-0-9{
40
40
  position:relative;
41
41
  flex-direction:column;
42
42
  justify-content:flex-end;
@@ -46,22 +46,22 @@
46
46
  padding:12px 24px 24px;
47
47
  box-sizing:border-box;
48
48
  }
49
- .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8{
49
+ .magritte-content-with-image___YarBO_9-0-9 .magritte-actions___nQILV_9-0-9{
50
50
  order:-1;
51
51
  gap:0;
52
52
  margin-right:-16px;
53
53
  margin-top:-4px;
54
54
  margin-bottom:auto;
55
55
  }
56
- .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8:not(.magritte-actions-with-link___hnDux_9-0-8){
56
+ .magritte-content-with-image___YarBO_9-0-9 .magritte-actions___nQILV_9-0-9:not(.magritte-actions-with-link___hnDux_9-0-9){
57
57
  padding:0 4px;
58
58
  background-color:var(--magritte-color-component-modal-background-action-v23-0-0);
59
59
  border-radius:var(--magritte-static-border-radius-300-v23-0-0);
60
60
  }
61
- .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8.magritte-actions-single___usfKu_9-0-8:not(.magritte-actions-with-link___hnDux_9-0-8){
61
+ .magritte-content-with-image___YarBO_9-0-9 .magritte-actions___nQILV_9-0-9.magritte-actions-single___usfKu_9-0-9:not(.magritte-actions-with-link___hnDux_9-0-9){
62
62
  padding:0;
63
63
  }
64
- .magritte-image-container___ioL3y_9-0-8{
64
+ .magritte-image-container___ioL3y_9-0-9{
65
65
  position:absolute;
66
66
  left:0;
67
67
  bottom:0;
@@ -69,17 +69,17 @@
69
69
  background-size:cover;
70
70
  --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v23-0-0);
71
71
  }
72
- .magritte-title-wrapper___O--QR_9-0-8{
72
+ .magritte-title-wrapper___O--QR_9-0-9{
73
73
  position:relative;
74
74
  width:100%;
75
75
  }
76
- .magritte-wrapper___zH8vB_9-0-8{
76
+ .magritte-wrapper___zH8vB_9-0-9{
77
77
  margin-bottom:24px;
78
78
  }
79
- .magritte-only-actions___ZC4jx_9-0-8 .magritte-actions___nQILV_9-0-8{
79
+ .magritte-only-actions___ZC4jx_9-0-9 .magritte-actions___nQILV_9-0-9{
80
80
  padding-left:0;
81
81
  }
82
- .magritte-only-actions___ZC4jx_9-0-8 .magritte-actions-with-link___hnDux_9-0-8{
82
+ .magritte-only-actions___ZC4jx_9-0-9 .magritte-actions-with-link___hnDux_9-0-9{
83
83
  padding-left:12px;
84
84
  }
85
85
 
@@ -105,7 +105,7 @@
105
105
  --magritte-color-background-overlay-v23-0-0:#20262b99;
106
106
  --magritte-color-component-modal-background-content-v23-0-0:#ffffff;
107
107
  }
108
- .magritte-modal-overlay___lK22l_9-0-8{
108
+ .magritte-modal-overlay___lK22l_9-0-9{
109
109
  position:fixed;
110
110
  top:0;
111
111
  right:0;
@@ -119,13 +119,13 @@
119
119
  user-select:text;
120
120
  transition-property:opacity, transform;
121
121
  }
122
- .magritte-overlay-left___JtHK4_9-0-8{
122
+ .magritte-overlay-left___JtHK4_9-0-9{
123
123
  justify-content:flex-start;
124
124
  }
125
- .magritte-overlay-right___uKTDt_9-0-8{
125
+ .magritte-overlay-right___uKTDt_9-0-9{
126
126
  justify-content:flex-end;
127
127
  }
128
- .magritte-modal___RAW6S_9-0-8{
128
+ .magritte-modal___RAW6S_9-0-9{
129
129
  display:flex;
130
130
  box-sizing:border-box;
131
131
  margin:0 12px;
@@ -141,24 +141,24 @@
141
141
  transition-property:opacity, transform;
142
142
  container-type:inline-size;
143
143
  }
144
- .magritte-modal___RAW6S_9-0-8.magritte-size-small___2JTM2_9-0-8{
144
+ .magritte-modal___RAW6S_9-0-9.magritte-size-small___2JTM2_9-0-9{
145
145
  width:480px;
146
146
  }
147
- .magritte-modal___RAW6S_9-0-8.magritte-size-medium___cWCe7_9-0-8{
147
+ .magritte-modal___RAW6S_9-0-9.magritte-size-medium___cWCe7_9-0-9{
148
148
  width:620px;
149
149
  }
150
- .magritte-no-vertical-paddings___Z3-oM_9-0-8{
150
+ .magritte-no-vertical-paddings___Z3-oM_9-0-9{
151
151
  padding-top:0;
152
152
  padding-bottom:0;
153
153
  }
154
- .magritte-no-horizontal-paddings___aT95Y_9-0-8{
154
+ .magritte-no-horizontal-paddings___aT95Y_9-0-9{
155
155
  padding-left:0;
156
156
  padding-right:0;
157
157
  }
158
- .magritte-modal-full-height___gIM4E_9-0-8{
158
+ .magritte-modal-full-height___gIM4E_9-0-9{
159
159
  height:100%;
160
160
  }
161
- .magritte-modal-content___46QFS_9-0-8{
161
+ .magritte-modal-content___46QFS_9-0-9{
162
162
  flex:1 1;
163
163
  overflow-y:auto;
164
164
  padding:0 0 0 24px;
@@ -167,226 +167,226 @@
167
167
  width:calc(100% + 24px);
168
168
  width:calc(100cqw + 24px);
169
169
  }
170
- .magritte-modal-content-wrapper___23XFT_9-0-8{
170
+ .magritte-modal-content-wrapper___23XFT_9-0-9{
171
171
  display:flex;
172
172
  flex-direction:column;
173
173
  min-height:0;
174
174
  flex:1 1;
175
175
  }
176
- .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8{
176
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-9{
177
177
  flex-direction:row-reverse;
178
178
  }
179
- .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8 .magritte-modal-content___46QFS_9-0-8{
179
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-9 .magritte-modal-content___46QFS_9-0-9{
180
180
  width:auto;
181
181
  container-type:inline-size;
182
182
  margin-right:0;
183
183
  }
184
- .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8 .magritte-content-sticky-container___nqEXj_9-0-8{
184
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-9 .magritte-content-sticky-container___nqEXj_9-0-9{
185
185
  max-width:calc(100% - 16px);
186
186
  max-width:calc(100cqw - 16px);
187
187
  }
188
- .magritte-divider-container___qP3VK_9-0-8{
188
+ .magritte-divider-container___qP3VK_9-0-9{
189
189
  margin:0 -24px;
190
190
  }
191
- .magritte-divider-container___qP3VK_9-0-8.magritte-divider-container-hidden___EIxB-_9-0-8{
191
+ .magritte-divider-container___qP3VK_9-0-9.magritte-divider-container-hidden___EIxB-_9-0-9{
192
192
  display:none;
193
193
  }
194
- .magritte-modal-footer___8xPqQ_9-0-8{
194
+ .magritte-modal-footer___8xPqQ_9-0-9{
195
195
  margin:0 -24px -24px;
196
196
  background-color:var(--magritte-color-component-modal-background-content-v23-0-0);
197
197
  z-index:1;
198
198
  --magritte-ui-action-bar-background-color-override:var(--magritte-color-component-modal-background-content-v23-0-0);
199
199
  }
200
- .magritte-modal-buttons-container___1O1Nr_9-0-8{
200
+ .magritte-modal-buttons-container___1O1Nr_9-0-9{
201
201
  display:flex;
202
202
  gap:12px;
203
203
  }
204
- .magritte-animation-timeout___w-j7K_9-0-8{
204
+ .magritte-animation-timeout___w-j7K_9-0-9{
205
205
  --enter-animation-duration:0;
206
206
  --exit-animation-duration:0;
207
207
  }
208
208
  @media (prefers-reduced-motion: no-preference){
209
- .magritte-animation-timeout___w-j7K_9-0-8{
209
+ .magritte-animation-timeout___w-j7K_9-0-9{
210
210
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
211
211
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
212
212
  }
213
213
  }
214
- .magritte-animation-enter-center___7jogC_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
214
+ .magritte-animation-enter-center___7jogC_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
215
215
  opacity:0;
216
216
  }
217
- .magritte-animation-enter-center___7jogC_9-0-8 .magritte-modal___RAW6S_9-0-8{
217
+ .magritte-animation-enter-center___7jogC_9-0-9 .magritte-modal___RAW6S_9-0-9{
218
218
  opacity:0;
219
219
  transform:scale(0.96);
220
220
  }
221
- .magritte-animation-enter-center-active___fywwW_9-0-8{
221
+ .magritte-animation-enter-center-active___fywwW_9-0-9{
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-enter-center-active___fywwW_9-0-8{
226
+ .magritte-animation-enter-center-active___fywwW_9-0-9{
227
227
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
228
228
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
229
229
  }
230
230
  }
231
- .magritte-animation-enter-center-active___fywwW_9-0-8 .magritte-modal___RAW6S_9-0-8,
232
- .magritte-animation-enter-center-active___fywwW_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
231
+ .magritte-animation-enter-center-active___fywwW_9-0-9 .magritte-modal___RAW6S_9-0-9,
232
+ .magritte-animation-enter-center-active___fywwW_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
233
233
  opacity:1;
234
234
  transition-duration:var(--enter-animation-duration);
235
235
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
236
236
  transform:scale(1);
237
237
  }
238
- .magritte-animation-exit-center___3Fa6x_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
238
+ .magritte-animation-exit-center___3Fa6x_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
239
239
  opacity:1;
240
240
  }
241
- .magritte-animation-exit-center___3Fa6x_9-0-8 .magritte-modal___RAW6S_9-0-8{
241
+ .magritte-animation-exit-center___3Fa6x_9-0-9 .magritte-modal___RAW6S_9-0-9{
242
242
  opacity:1;
243
243
  transform:scale(1);
244
244
  }
245
- .magritte-animation-exit-center-active___tY0UA_9-0-8{
245
+ .magritte-animation-exit-center-active___tY0UA_9-0-9{
246
246
  --enter-animation-duration:0;
247
247
  --exit-animation-duration:0;
248
248
  }
249
249
  @media (prefers-reduced-motion: no-preference){
250
- .magritte-animation-exit-center-active___tY0UA_9-0-8{
250
+ .magritte-animation-exit-center-active___tY0UA_9-0-9{
251
251
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
252
252
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
253
253
  }
254
254
  }
255
- .magritte-animation-exit-center-active___tY0UA_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
255
+ .magritte-animation-exit-center-active___tY0UA_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
256
256
  opacity:0;
257
257
  }
258
- .magritte-animation-exit-center-active___tY0UA_9-0-8 .magritte-modal___RAW6S_9-0-8{
258
+ .magritte-animation-exit-center-active___tY0UA_9-0-9 .magritte-modal___RAW6S_9-0-9{
259
259
  opacity:0;
260
260
  transform:scale(0.96);
261
261
  }
262
- .magritte-animation-exit-center-active___tY0UA_9-0-8 .magritte-modal___RAW6S_9-0-8,
263
- .magritte-animation-exit-center-active___tY0UA_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
262
+ .magritte-animation-exit-center-active___tY0UA_9-0-9 .magritte-modal___RAW6S_9-0-9,
263
+ .magritte-animation-exit-center-active___tY0UA_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
264
264
  transition-duration:var(--exit-animation-duration);
265
265
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
266
266
  }
267
- .magritte-animation-enter-left___5YB8B_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
267
+ .magritte-animation-enter-left___5YB8B_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
268
268
  opacity:0;
269
269
  }
270
- .magritte-animation-enter-left___5YB8B_9-0-8 .magritte-modal___RAW6S_9-0-8{
270
+ .magritte-animation-enter-left___5YB8B_9-0-9 .magritte-modal___RAW6S_9-0-9{
271
271
  opacity:0;
272
272
  transform:translateX(-100%);
273
273
  }
274
- .magritte-animation-enter-left-active___5GK8s_9-0-8{
274
+ .magritte-animation-enter-left-active___5GK8s_9-0-9{
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-enter-left-active___5GK8s_9-0-8{
279
+ .magritte-animation-enter-left-active___5GK8s_9-0-9{
280
280
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
281
281
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
282
282
  }
283
283
  }
284
- .magritte-animation-enter-left-active___5GK8s_9-0-8 .magritte-modal___RAW6S_9-0-8,
285
- .magritte-animation-enter-left-active___5GK8s_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
284
+ .magritte-animation-enter-left-active___5GK8s_9-0-9 .magritte-modal___RAW6S_9-0-9,
285
+ .magritte-animation-enter-left-active___5GK8s_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
286
286
  opacity:1;
287
287
  transition-duration:var(--enter-animation-duration);
288
288
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
289
289
  transform:translateX(0);
290
290
  }
291
- .magritte-animation-exit-left___OnkQE_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
291
+ .magritte-animation-exit-left___OnkQE_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
292
292
  opacity:1;
293
293
  }
294
- .magritte-animation-exit-left___OnkQE_9-0-8 .magritte-modal___RAW6S_9-0-8{
294
+ .magritte-animation-exit-left___OnkQE_9-0-9 .magritte-modal___RAW6S_9-0-9{
295
295
  opacity:1;
296
296
  transform:translateX(0);
297
297
  }
298
- .magritte-animation-exit-left-active___AEGxY_9-0-8{
298
+ .magritte-animation-exit-left-active___AEGxY_9-0-9{
299
299
  --enter-animation-duration:0;
300
300
  --exit-animation-duration:0;
301
301
  }
302
302
  @media (prefers-reduced-motion: no-preference){
303
- .magritte-animation-exit-left-active___AEGxY_9-0-8{
303
+ .magritte-animation-exit-left-active___AEGxY_9-0-9{
304
304
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
305
305
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
306
306
  }
307
307
  }
308
- .magritte-animation-exit-left-active___AEGxY_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
308
+ .magritte-animation-exit-left-active___AEGxY_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
309
309
  opacity:0;
310
310
  }
311
- .magritte-animation-exit-left-active___AEGxY_9-0-8 .magritte-modal___RAW6S_9-0-8{
311
+ .magritte-animation-exit-left-active___AEGxY_9-0-9 .magritte-modal___RAW6S_9-0-9{
312
312
  opacity:0;
313
313
  transform:translateX(-100%);
314
314
  }
315
- .magritte-animation-exit-left-active___AEGxY_9-0-8 .magritte-modal___RAW6S_9-0-8,
316
- .magritte-animation-exit-left-active___AEGxY_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
315
+ .magritte-animation-exit-left-active___AEGxY_9-0-9 .magritte-modal___RAW6S_9-0-9,
316
+ .magritte-animation-exit-left-active___AEGxY_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
317
317
  transition-duration:var(--exit-animation-duration);
318
318
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
319
319
  }
320
- .magritte-animation-enter-right___2aXOm_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
320
+ .magritte-animation-enter-right___2aXOm_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
321
321
  opacity:0;
322
322
  }
323
- .magritte-animation-enter-right___2aXOm_9-0-8 .magritte-modal___RAW6S_9-0-8{
323
+ .magritte-animation-enter-right___2aXOm_9-0-9 .magritte-modal___RAW6S_9-0-9{
324
324
  opacity:0;
325
325
  transform:translateX(100%);
326
326
  }
327
- .magritte-animation-enter-right-active___8wX4-_9-0-8{
327
+ .magritte-animation-enter-right-active___8wX4-_9-0-9{
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-enter-right-active___8wX4-_9-0-8{
332
+ .magritte-animation-enter-right-active___8wX4-_9-0-9{
333
333
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
334
334
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
335
335
  }
336
336
  }
337
- .magritte-animation-enter-right-active___8wX4-_9-0-8 .magritte-modal___RAW6S_9-0-8,
338
- .magritte-animation-enter-right-active___8wX4-_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
337
+ .magritte-animation-enter-right-active___8wX4-_9-0-9 .magritte-modal___RAW6S_9-0-9,
338
+ .magritte-animation-enter-right-active___8wX4-_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
339
339
  opacity:1;
340
340
  transition-duration:var(--enter-animation-duration);
341
341
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
342
342
  transform:translateX(0);
343
343
  }
344
- .magritte-animation-exit-right___iczoc_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
344
+ .magritte-animation-exit-right___iczoc_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
345
345
  opacity:1;
346
346
  }
347
- .magritte-animation-exit-right___iczoc_9-0-8 .magritte-modal___RAW6S_9-0-8{
347
+ .magritte-animation-exit-right___iczoc_9-0-9 .magritte-modal___RAW6S_9-0-9{
348
348
  opacity:1;
349
349
  transform:translateX(0);
350
350
  }
351
- .magritte-animation-exit-right-active___eFS4O_9-0-8{
351
+ .magritte-animation-exit-right-active___eFS4O_9-0-9{
352
352
  --enter-animation-duration:0;
353
353
  --exit-animation-duration:0;
354
354
  }
355
355
  @media (prefers-reduced-motion: no-preference){
356
- .magritte-animation-exit-right-active___eFS4O_9-0-8{
356
+ .magritte-animation-exit-right-active___eFS4O_9-0-9{
357
357
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
358
358
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
359
359
  }
360
360
  }
361
- .magritte-animation-exit-right-active___eFS4O_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
361
+ .magritte-animation-exit-right-active___eFS4O_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
362
362
  opacity:0;
363
363
  }
364
- .magritte-animation-exit-right-active___eFS4O_9-0-8 .magritte-modal___RAW6S_9-0-8{
364
+ .magritte-animation-exit-right-active___eFS4O_9-0-9 .magritte-modal___RAW6S_9-0-9{
365
365
  opacity:0;
366
366
  transform:translateX(100%);
367
367
  }
368
- .magritte-animation-exit-right-active___eFS4O_9-0-8 .magritte-modal___RAW6S_9-0-8,
369
- .magritte-animation-exit-right-active___eFS4O_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
368
+ .magritte-animation-exit-right-active___eFS4O_9-0-9 .magritte-modal___RAW6S_9-0-9,
369
+ .magritte-animation-exit-right-active___eFS4O_9-0-9.magritte-modal-overlay___lK22l_9-0-9{
370
370
  transition-duration:var(--exit-animation-duration);
371
371
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
372
372
  }
373
- .magritte-content-scroll-preserver___Tw5Px_9-0-8{
373
+ .magritte-content-scroll-preserver___Tw5Px_9-0-9{
374
374
  width:100%;
375
375
  height:0;
376
376
  }
377
- .magritte-content-container___-ql3h_9-0-8{
377
+ .magritte-content-container___-ql3h_9-0-9{
378
378
  height:100%;
379
379
  max-width:calc(100% - 24px);
380
380
  max-width:100cqw;
381
381
  }
382
- .magritte-content-sticky-container___nqEXj_9-0-8{
382
+ .magritte-content-sticky-container___nqEXj_9-0-9{
383
383
  position:sticky;
384
384
  top:0;
385
385
  min-height:100%;
386
386
  max-width:calc(100% - 24px);
387
387
  max-width:100cqw;
388
388
  }
389
- .magritte-content-sticky-container_full-height___Gl9x8_9-0-8{
389
+ .magritte-content-sticky-container_full-height___Gl9x8_9-0-9{
390
390
  display:flex;
391
391
  flex-direction:column;
392
392
  }
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-BplZxF6y.js';
16
+ import './ModalContentWithHeader-CA7qQhoI.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.8",
3
+ "version": "9.0.9",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -28,7 +28,7 @@
28
28
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.5",
29
29
  "@hh.ru/magritte-design-tokens": "23.0.0",
30
30
  "@hh.ru/magritte-internal-layer-name": "3.0.2",
31
- "@hh.ru/magritte-ui-action-bar": "4.0.12",
31
+ "@hh.ru/magritte-ui-action-bar": "5.0.0",
32
32
  "@hh.ru/magritte-ui-breakpoint": "6.0.0",
33
33
  "@hh.ru/magritte-ui-divider": "3.0.1",
34
34
  "@hh.ru/magritte-ui-icon": "12.2.1",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "c3a9c9e1f9576575964829ed929e8039b5d37fbe"
50
+ "gitHead": "169279c6b3ef0523f88f2daf07c35c908437f275"
51
51
  }