@hh.ru/magritte-ui-modal 10.0.10 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Modal.js CHANGED
@@ -13,7 +13,7 @@ import { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';
13
13
  import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
14
14
  import { Breakpoint, useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
15
15
  import { Layer } from '@hh.ru/magritte-ui-layer';
16
- import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-DXF1H5mm.js';
16
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-Bu7JEMNX.js';
17
17
  import { useModalOrder } from './useModalOrder.js';
18
18
  import { isProgressBarComponent } from '@hh.ru/magritte-ui-progress-bar';
19
19
  import { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';
@@ -10,7 +10,7 @@ import { ModalHeader } from './ModalHeader.js';
10
10
  import { useScrollbar, Scrollbar } from '@hh.ru/magritte-ui-scrollbar';
11
11
  import { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';
12
12
 
13
- var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_10-0-10","modalOverlay":"magritte-modal-overlay___lK22l_10-0-10","modal-overlay-with-background":"magritte-modal-overlay-with-background___ZYsA-_10-0-10","modalOverlayWithBackground":"magritte-modal-overlay-with-background___ZYsA-_10-0-10","modal":"magritte-modal___RAW6S_10-0-10","modal-overlay-left":"magritte-modal-overlay-left___4Qsdn_10-0-10","modalOverlayLeft":"magritte-modal-overlay-left___4Qsdn_10-0-10","modal-overlay-right":"magritte-modal-overlay-right___xAjO7_10-0-10","modalOverlayRight":"magritte-modal-overlay-right___xAjO7_10-0-10","size-small":"magritte-size-small___2JTM2_10-0-10","sizeSmall":"magritte-size-small___2JTM2_10-0-10","size-medium":"magritte-size-medium___cWCe7_10-0-10","sizeMedium":"magritte-size-medium___cWCe7_10-0-10","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_10-0-10","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_10-0-10","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_10-0-10","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_10-0-10","modal-full-height":"magritte-modal-full-height___gIM4E_10-0-10","modalFullHeight":"magritte-modal-full-height___gIM4E_10-0-10","modal-with-border":"magritte-modal-with-border___wYWgv_10-0-10","modalWithBorder":"magritte-modal-with-border___wYWgv_10-0-10","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_10-0-10","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_10-0-10","modal-content":"magritte-modal-content___46QFS_10-0-10","modalContent":"magritte-modal-content___46QFS_10-0-10","modal-scroll-container":"magritte-modal-scroll-container___Tf8Ns_10-0-10","modalScrollContainer":"magritte-modal-scroll-container___Tf8Ns_10-0-10","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_10-0-10","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_10-0-10","content-sticky-container":"magritte-content-sticky-container___nqEXj_10-0-10","contentStickyContainer":"magritte-content-sticky-container___nqEXj_10-0-10","divider-container":"magritte-divider-container___qP3VK_10-0-10","dividerContainer":"magritte-divider-container___qP3VK_10-0-10","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_10-0-10","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_10-0-10","modal-footer":"magritte-modal-footer___8xPqQ_10-0-10","modalFooter":"magritte-modal-footer___8xPqQ_10-0-10","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_10-0-10","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_10-0-10","animation-timeout":"magritte-animation-timeout___w-j7K_10-0-10","animationTimeout":"magritte-animation-timeout___w-j7K_10-0-10","animation-enter-center":"magritte-animation-enter-center___7jogC_10-0-10","animationEnterCenter":"magritte-animation-enter-center___7jogC_10-0-10","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_10-0-10","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_10-0-10","animation-exit-center":"magritte-animation-exit-center___3Fa6x_10-0-10","animationExitCenter":"magritte-animation-exit-center___3Fa6x_10-0-10","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_10-0-10","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_10-0-10","animation-enter-left":"magritte-animation-enter-left___5YB8B_10-0-10","animationEnterLeft":"magritte-animation-enter-left___5YB8B_10-0-10","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_10-0-10","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_10-0-10","animation-exit-left":"magritte-animation-exit-left___OnkQE_10-0-10","animationExitLeft":"magritte-animation-exit-left___OnkQE_10-0-10","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_10-0-10","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_10-0-10","animation-enter-right":"magritte-animation-enter-right___2aXOm_10-0-10","animationEnterRight":"magritte-animation-enter-right___2aXOm_10-0-10","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_10-0-10","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_10-0-10","animation-exit-right":"magritte-animation-exit-right___iczoc_10-0-10","animationExitRight":"magritte-animation-exit-right___iczoc_10-0-10","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_10-0-10","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_10-0-10","space-preserver":"magritte-space-preserver___P5PKZ_10-0-10","spacePreserver":"magritte-space-preserver___P5PKZ_10-0-10","tree-selector-container":"magritte-tree-selector-container___fdhI-_10-0-10","treeSelectorContainer":"magritte-tree-selector-container___fdhI-_10-0-10","grow-limiter":"magritte-grow-limiter___zeIwy_10-0-10","growLimiter":"magritte-grow-limiter___zeIwy_10-0-10"};
13
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_10-1-0","modalOverlay":"magritte-modal-overlay___lK22l_10-1-0","modal-overlay-with-background":"magritte-modal-overlay-with-background___ZYsA-_10-1-0","modalOverlayWithBackground":"magritte-modal-overlay-with-background___ZYsA-_10-1-0","modal":"magritte-modal___RAW6S_10-1-0","modal-overlay-left":"magritte-modal-overlay-left___4Qsdn_10-1-0","modalOverlayLeft":"magritte-modal-overlay-left___4Qsdn_10-1-0","modal-overlay-right":"magritte-modal-overlay-right___xAjO7_10-1-0","modalOverlayRight":"magritte-modal-overlay-right___xAjO7_10-1-0","size-small":"magritte-size-small___2JTM2_10-1-0","sizeSmall":"magritte-size-small___2JTM2_10-1-0","size-medium":"magritte-size-medium___cWCe7_10-1-0","sizeMedium":"magritte-size-medium___cWCe7_10-1-0","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_10-1-0","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_10-1-0","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_10-1-0","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_10-1-0","modal-full-height":"magritte-modal-full-height___gIM4E_10-1-0","modalFullHeight":"magritte-modal-full-height___gIM4E_10-1-0","modal-with-border":"magritte-modal-with-border___wYWgv_10-1-0","modalWithBorder":"magritte-modal-with-border___wYWgv_10-1-0","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_10-1-0","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_10-1-0","modal-content":"magritte-modal-content___46QFS_10-1-0","modalContent":"magritte-modal-content___46QFS_10-1-0","modal-scroll-container":"magritte-modal-scroll-container___Tf8Ns_10-1-0","modalScrollContainer":"magritte-modal-scroll-container___Tf8Ns_10-1-0","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_10-1-0","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_10-1-0","content-sticky-container":"magritte-content-sticky-container___nqEXj_10-1-0","contentStickyContainer":"magritte-content-sticky-container___nqEXj_10-1-0","divider-container":"magritte-divider-container___qP3VK_10-1-0","dividerContainer":"magritte-divider-container___qP3VK_10-1-0","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_10-1-0","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_10-1-0","modal-footer":"magritte-modal-footer___8xPqQ_10-1-0","modalFooter":"magritte-modal-footer___8xPqQ_10-1-0","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_10-1-0","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_10-1-0","animation-timeout":"magritte-animation-timeout___w-j7K_10-1-0","animationTimeout":"magritte-animation-timeout___w-j7K_10-1-0","animation-enter-center":"magritte-animation-enter-center___7jogC_10-1-0","animationEnterCenter":"magritte-animation-enter-center___7jogC_10-1-0","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_10-1-0","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_10-1-0","animation-exit-center":"magritte-animation-exit-center___3Fa6x_10-1-0","animationExitCenter":"magritte-animation-exit-center___3Fa6x_10-1-0","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_10-1-0","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_10-1-0","animation-enter-left":"magritte-animation-enter-left___5YB8B_10-1-0","animationEnterLeft":"magritte-animation-enter-left___5YB8B_10-1-0","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_10-1-0","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_10-1-0","animation-exit-left":"magritte-animation-exit-left___OnkQE_10-1-0","animationExitLeft":"magritte-animation-exit-left___OnkQE_10-1-0","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_10-1-0","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_10-1-0","animation-enter-right":"magritte-animation-enter-right___2aXOm_10-1-0","animationEnterRight":"magritte-animation-enter-right___2aXOm_10-1-0","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_10-1-0","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_10-1-0","animation-exit-right":"magritte-animation-exit-right___iczoc_10-1-0","animationExitRight":"magritte-animation-exit-right___iczoc_10-1-0","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_10-1-0","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_10-1-0","space-preserver":"magritte-space-preserver___P5PKZ_10-1-0","spacePreserver":"magritte-space-preserver___P5PKZ_10-1-0","tree-selector-container":"magritte-tree-selector-container___fdhI-_10-1-0","treeSelectorContainer":"magritte-tree-selector-container___fdhI-_10-1-0","grow-limiter":"magritte-grow-limiter___zeIwy_10-1-0","growLimiter":"magritte-grow-limiter___zeIwy_10-1-0"};
14
14
 
15
15
  const checkIsScrolledToBottom = (el) => {
16
16
  return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;
@@ -147,4 +147,4 @@ const ModalContentWithHeader = ({ labelId, children, headerHeight: _headerHeight
147
147
  };
148
148
 
149
149
  export { ModalContentWithHeader as M, styles as s };
150
- //# sourceMappingURL=ModalContentWithHeader-DXF1H5mm.js.map
150
+ //# sourceMappingURL=ModalContentWithHeader-Bu7JEMNX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-DXF1H5mm.js","sources":["src/ModalContentWithHeader.tsx"],"sourcesContent":["import { FC, PropsWithChildren, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport classnames from 'classnames';\n\nimport { requestAnimation } from '@hh.ru/magritte-common-func-utils';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { ContentOverlayRoot } from '@hh.ru/magritte-ui-content-overlay';\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';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';\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 const contentOverlayRef = useRef<HTMLDivElement>(null);\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 [growLimiterContextValue, _] = useState(() => ({\n containerRef: contentContainerRef,\n }));\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 recalcContentOverlayPosition = useCallback(() => {\n if (contentOverlayRef.current !== null && contentContainerRef.current !== null) {\n contentOverlayRef.current.style.height = `${contentContainerRef.current.clientHeight}px`;\n }\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 recalcContentOverlayPosition();\n })\n );\n observer.observe(contentContainerRef.current);\n return () => observer.disconnect();\n }\n\n return undefined;\n }, [updateHeaderDimensions, recalcContentOverlayPosition]);\n\n useLayoutEffect(() => {\n updateHeaderDimensions();\n recalcContentOverlayPosition();\n if (!options && (headerImageUrl || headerImage)) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [headerImageUrl, headerImage, updateHeaderDimensions, recalcContentOverlayPosition, 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 const { hasVerticalScroll, verticalScrollbarProps, ...scrollbar } = useScrollbar({ axis: 'vertical' });\n const contentContainerRefCallback = useMultipleRefs(contentContainerRef, scrollbar.scrollContainerRef);\n const stickyContainerRefCallback = useMultipleRefs(stickyContainerRef, scrollbar.contentWrapperRef);\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\n <div className={classnames(styles.modalContent, scrollbar.hoverContainerCssClass)}>\n <ContentOverlayRoot ref={contentOverlayRef}>\n {isTreeSelectorChild ? (\n <div className={styles.treeSelectorContainer}>{children}</div>\n ) : (\n <>\n <div\n className={classnames(styles.modalScrollContainer)}\n ref={contentContainerRefCallback}\n onScroll={handleScroll}\n data-qa=\"modal-content-scroll-container\"\n >\n <div\n className={classnames(styles.contentStickyContainer)}\n ref={stickyContainerRefCallback}\n >\n <TextAreaGrowLimiter\n {...growLimiterContextValue}\n className={styles.growLimiter}\n >\n {children}\n </TextAreaGrowLimiter>\n </div>\n <div className={styles.spacePreserver} ref={spacePreserverRef} />\n </div>\n {hasVerticalScroll && <Scrollbar {...verticalScrollbarProps} />}\n </>\n )}\n </ContentOverlayRoot>\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":";;;;;;;;;;;;;AAcA,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,G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ent":["import { FC, PropsWithChildren, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport classnames from 'classnames';\n\nimport { requestAnimation } from '@hh.ru/magritte-common-func-utils';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { ContentOverlayRoot } from '@hh.ru/magritte-ui-content-overlay';\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';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';\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 const contentOverlayRef = useRef<HTMLDivElement>(null);\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 [growLimiterContextValue, _] = useState(() => ({\n containerRef: contentContainerRef,\n }));\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 recalcContentOverlayPosition = useCallback(() => {\n if (contentOverlayRef.current !== null && contentContainerRef.current !== null) {\n contentOverlayRef.current.style.height = `${contentContainerRef.current.clientHeight}px`;\n }\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 recalcContentOverlayPosition();\n })\n );\n observer.observe(contentContainerRef.current);\n return () => observer.disconnect();\n }\n\n return undefined;\n }, [updateHeaderDimensions, recalcContentOverlayPosition]);\n\n useLayoutEffect(() => {\n updateHeaderDimensions();\n recalcContentOverlayPosition();\n if (!options && (headerImageUrl || headerImage)) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [headerImageUrl, headerImage, updateHeaderDimensions, recalcContentOverlayPosition, 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 const { hasVerticalScroll, verticalScrollbarProps, ...scrollbar } = useScrollbar({ axis: 'vertical' });\n const contentContainerRefCallback = useMultipleRefs(contentContainerRef, scrollbar.scrollContainerRef);\n const stickyContainerRefCallback = useMultipleRefs(stickyContainerRef, scrollbar.contentWrapperRef);\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\n <div className={classnames(styles.modalContent, scrollbar.hoverContainerCssClass)}>\n <ContentOverlayRoot ref={contentOverlayRef}>\n {isTreeSelectorChild ? (\n <div className={styles.treeSelectorContainer}>{children}</div>\n ) : (\n <>\n <div\n className={classnames(styles.modalScrollContainer)}\n ref={contentContainerRefCallback}\n onScroll={handleScroll}\n data-qa=\"modal-content-scroll-container\"\n >\n <div\n className={classnames(styles.contentStickyContainer)}\n ref={stickyContainerRefCallback}\n >\n <TextAreaGrowLimiter\n {...growLimiterContextValue}\n className={styles.growLimiter}\n >\n {children}\n </TextAreaGrowLimiter>\n </div>\n <div className={styles.spacePreserver} ref={spacePreserverRef} />\n </div>\n {hasVerticalScroll && <Scrollbar {...verticalScrollbarProps} />}\n </>\n )}\n </ContentOverlayRoot>\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":";;;;;;;;;;;;;AAcA,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,G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sBAAsB,EAAI,CAAA,CAAA,EAAA,CAChE,CACN,EAAA,CACgB,EACnB,CAAA,CAAA,EAAA,CACJ,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;;;;"}
@@ -9,7 +9,7 @@ import '@hh.ru/magritte-ui-divider';
9
9
  import './ModalHeader.js';
10
10
  import '@hh.ru/magritte-ui-scrollbar';
11
11
  import '@hh.ru/magritte-ui-textarea';
12
- export { M as ModalContentWithHeader } from './ModalContentWithHeader-DXF1H5mm.js';
12
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-Bu7JEMNX.js';
13
13
  import '@hh.ru/magritte-ui-icon';
14
14
  import '@hh.ru/magritte-ui-title';
15
15
  //# 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_10-0-10","options":"magritte-options___qfErQ_10-0-10","actions":"magritte-actions___nQILV_10-0-10","actions-with-link":"magritte-actions-with-link___hnDux_10-0-10","actionsWithLink":"magritte-actions-with-link___hnDux_10-0-10","content-with-image":"magritte-content-with-image___YarBO_10-0-10","contentWithImage":"magritte-content-with-image___YarBO_10-0-10","actions-single":"magritte-actions-single___usfKu_10-0-10","actionsSingle":"magritte-actions-single___usfKu_10-0-10","image-container":"magritte-image-container___ioL3y_10-0-10","imageContainer":"magritte-image-container___ioL3y_10-0-10","title-wrapper":"magritte-title-wrapper___O--QR_10-0-10","titleWrapper":"magritte-title-wrapper___O--QR_10-0-10","wrapper":"magritte-wrapper___zH8vB_10-0-10","only-actions":"magritte-only-actions___ZC4jx_10-0-10","onlyActions":"magritte-only-actions___ZC4jx_10-0-10"};
8
+ var styles = {"content":"magritte-content___o6ktq_10-1-0","options":"magritte-options___qfErQ_10-1-0","actions":"magritte-actions___nQILV_10-1-0","actions-with-link":"magritte-actions-with-link___hnDux_10-1-0","actionsWithLink":"magritte-actions-with-link___hnDux_10-1-0","content-with-image":"magritte-content-with-image___YarBO_10-1-0","contentWithImage":"magritte-content-with-image___YarBO_10-1-0","actions-single":"magritte-actions-single___usfKu_10-1-0","actionsSingle":"magritte-actions-single___usfKu_10-1-0","image-container":"magritte-image-container___ioL3y_10-1-0","imageContainer":"magritte-image-container___ioL3y_10-1-0","title-wrapper":"magritte-title-wrapper___O--QR_10-1-0","titleWrapper":"magritte-title-wrapper___O--QR_10-1-0","wrapper":"magritte-wrapper___zH8vB_10-1-0","only-actions":"magritte-only-actions___ZC4jx_10-1-0","onlyActions":"magritte-only-actions___ZC4jx_10-1-0"};
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
@@ -2,14 +2,14 @@
2
2
  --magritte-color-component-modal-background-action-v24-5-0:#20262b99;
3
3
  --magritte-gradient-component-modal-background-fade-v24-5-0:#00000000 0%, #0000007a 100%;
4
4
  }
5
- .magritte-content___o6ktq_10-0-10{
5
+ .magritte-content___o6ktq_10-1-0{
6
6
  display:flex;
7
7
  align-items:flex-start;
8
8
  }
9
- .magritte-content___o6ktq_10-0-10 + .magritte-options___qfErQ_10-0-10{
9
+ .magritte-content___o6ktq_10-1-0 + .magritte-options___qfErQ_10-1-0{
10
10
  margin-top:24px;
11
11
  }
12
- .magritte-actions___nQILV_10-0-10{
12
+ .magritte-actions___nQILV_10-1-0{
13
13
  position:relative;
14
14
  z-index:1;
15
15
  display:flex;
@@ -18,10 +18,10 @@
18
18
  margin-left:auto;
19
19
  --magritte-ui-link-padding-override:9px;
20
20
  }
21
- .magritte-actions-with-link___hnDux_10-0-10{
21
+ .magritte-actions-with-link___hnDux_10-1-0{
22
22
  padding:0 8px 0 28px;
23
23
  }
24
- .magritte-content-with-image___YarBO_10-0-10{
24
+ .magritte-content-with-image___YarBO_10-1-0{
25
25
  position:relative;
26
26
  flex-direction:column;
27
27
  justify-content:flex-end;
@@ -31,22 +31,22 @@
31
31
  padding:12px 24px 24px;
32
32
  box-sizing:border-box;
33
33
  }
34
- .magritte-content-with-image___YarBO_10-0-10 .magritte-actions___nQILV_10-0-10{
34
+ .magritte-content-with-image___YarBO_10-1-0 .magritte-actions___nQILV_10-1-0{
35
35
  order:-1;
36
36
  gap:0;
37
37
  margin-right:-16px;
38
38
  margin-top:-4px;
39
39
  margin-bottom:auto;
40
40
  }
41
- .magritte-content-with-image___YarBO_10-0-10 .magritte-actions___nQILV_10-0-10:not(.magritte-actions-with-link___hnDux_10-0-10){
41
+ .magritte-content-with-image___YarBO_10-1-0 .magritte-actions___nQILV_10-1-0:not(.magritte-actions-with-link___hnDux_10-1-0){
42
42
  padding:0 4px;
43
43
  background-color:var(--magritte-color-component-modal-background-action-v24-5-0);
44
44
  border-radius:12px;
45
45
  }
46
- .magritte-content-with-image___YarBO_10-0-10 .magritte-actions___nQILV_10-0-10.magritte-actions-single___usfKu_10-0-10:not(.magritte-actions-with-link___hnDux_10-0-10){
46
+ .magritte-content-with-image___YarBO_10-1-0 .magritte-actions___nQILV_10-1-0.magritte-actions-single___usfKu_10-1-0:not(.magritte-actions-with-link___hnDux_10-1-0){
47
47
  padding:0;
48
48
  }
49
- .magritte-image-container___ioL3y_10-0-10{
49
+ .magritte-image-container___ioL3y_10-1-0{
50
50
  position:absolute;
51
51
  left:0;
52
52
  bottom:0;
@@ -54,17 +54,17 @@
54
54
  background-size:cover;
55
55
  --modal-header-gradient:linear-gradient(180deg, var(--magritte-gradient-component-modal-background-fade-v24-5-0));
56
56
  }
57
- .magritte-title-wrapper___O--QR_10-0-10{
57
+ .magritte-title-wrapper___O--QR_10-1-0{
58
58
  position:relative;
59
59
  width:100%;
60
60
  }
61
- .magritte-wrapper___zH8vB_10-0-10{
61
+ .magritte-wrapper___zH8vB_10-1-0{
62
62
  margin-bottom:24px;
63
63
  }
64
- .magritte-only-actions___ZC4jx_10-0-10 .magritte-actions___nQILV_10-0-10{
64
+ .magritte-only-actions___ZC4jx_10-1-0 .magritte-actions___nQILV_10-1-0{
65
65
  padding-left:0;
66
66
  }
67
- .magritte-only-actions___ZC4jx_10-0-10 .magritte-actions-with-link___hnDux_10-0-10{
67
+ .magritte-only-actions___ZC4jx_10-1-0 .magritte-actions-with-link___hnDux_10-1-0{
68
68
  padding-left:12px;
69
69
  }
70
70
 
@@ -85,7 +85,7 @@
85
85
  --magritte-color-stroke-neutral-v24-5-0:#303030;
86
86
  --magritte-color-component-modal-background-content-v24-5-0:#1B1B1B;
87
87
  }
88
- .magritte-modal-overlay___lK22l_10-0-10{
88
+ .magritte-modal-overlay___lK22l_10-1-0{
89
89
  position:fixed;
90
90
  top:0;
91
91
  right:0;
@@ -95,25 +95,25 @@
95
95
  align-items:center;
96
96
  justify-content:center;
97
97
  }
98
- .magritte-modal-overlay-with-background___ZYsA-_10-0-10{
98
+ .magritte-modal-overlay-with-background___ZYsA-_10-1-0{
99
99
  background-color:var(--magritte-color-background-overlay-v24-5-0);
100
100
  transition-property:opacity, transform;
101
101
  user-select:text;
102
102
  z-index:1;
103
103
  }
104
- .magritte-modal-overlay___lK22l_10-0-10:not(.magritte-modal-overlay-with-background___ZYsA-_10-0-10){
104
+ .magritte-modal-overlay___lK22l_10-1-0:not(.magritte-modal-overlay-with-background___ZYsA-_10-1-0){
105
105
  pointer-events:none;
106
106
  }
107
- .magritte-modal-overlay___lK22l_10-0-10:not(.magritte-modal-overlay-with-background___ZYsA-_10-0-10) .magritte-modal___RAW6S_10-0-10{
107
+ .magritte-modal-overlay___lK22l_10-1-0:not(.magritte-modal-overlay-with-background___ZYsA-_10-1-0) .magritte-modal___RAW6S_10-1-0{
108
108
  pointer-events:auto;
109
109
  }
110
- .magritte-modal-overlay-left___4Qsdn_10-0-10{
110
+ .magritte-modal-overlay-left___4Qsdn_10-1-0{
111
111
  justify-content:flex-start;
112
112
  }
113
- .magritte-modal-overlay-right___xAjO7_10-0-10{
113
+ .magritte-modal-overlay-right___xAjO7_10-1-0{
114
114
  justify-content:flex-end;
115
115
  }
116
- .magritte-modal___RAW6S_10-0-10{
116
+ .magritte-modal___RAW6S_10-1-0{
117
117
  display:flex;
118
118
  box-sizing:border-box;
119
119
  margin:0 12px;
@@ -129,33 +129,33 @@
129
129
  transition-property:opacity, transform;
130
130
  container-type:inline-size;
131
131
  }
132
- .magritte-modal___RAW6S_10-0-10.magritte-size-small___2JTM2_10-0-10{
132
+ .magritte-modal___RAW6S_10-1-0.magritte-size-small___2JTM2_10-1-0{
133
133
  width:480px;
134
134
  }
135
- .magritte-modal___RAW6S_10-0-10.magritte-size-medium___cWCe7_10-0-10{
135
+ .magritte-modal___RAW6S_10-1-0.magritte-size-medium___cWCe7_10-1-0{
136
136
  width:620px;
137
137
  }
138
- .magritte-no-vertical-paddings___Z3-oM_10-0-10{
138
+ .magritte-no-vertical-paddings___Z3-oM_10-1-0{
139
139
  padding-top:0;
140
140
  padding-bottom:0;
141
141
  }
142
- .magritte-no-horizontal-paddings___aT95Y_10-0-10{
142
+ .magritte-no-horizontal-paddings___aT95Y_10-1-0{
143
143
  padding-left:0;
144
144
  padding-right:0;
145
145
  }
146
- .magritte-modal-full-height___gIM4E_10-0-10{
146
+ .magritte-modal-full-height___gIM4E_10-1-0{
147
147
  height:100%;
148
148
  }
149
- .magritte-modal-with-border___wYWgv_10-0-10{
149
+ .magritte-modal-with-border___wYWgv_10-1-0{
150
150
  outline:1px solid var(--magritte-color-stroke-neutral-v24-5-0);
151
151
  }
152
- .magritte-modal-content-wrapper___23XFT_10-0-10{
152
+ .magritte-modal-content-wrapper___23XFT_10-1-0{
153
153
  display:flex;
154
154
  flex-direction:column;
155
155
  min-height:0;
156
156
  flex:1 1;
157
157
  }
158
- .magritte-modal-content___46QFS_10-0-10{
158
+ .magritte-modal-content___46QFS_10-1-0{
159
159
  position:relative;
160
160
  display:flex;
161
161
  flex-direction:column;
@@ -166,7 +166,7 @@
166
166
  width:calc(100% + 24px);
167
167
  width:calc(100cqw + 24px);
168
168
  }
169
- .magritte-modal-scroll-container___Tf8Ns_10-0-10{
169
+ .magritte-modal-scroll-container___Tf8Ns_10-1-0{
170
170
  display:flex;
171
171
  flex-direction:column;
172
172
  flex:1 1;
@@ -174,213 +174,215 @@
174
174
  overflow-y:auto;
175
175
  overscroll-behavior:none;
176
176
  scrollbar-width:none;
177
+ padding:0 4px;
178
+ margin:0 -4px;
177
179
  }
178
- .magritte-modal-scroll-container___Tf8Ns_10-0-10::-webkit-scrollbar{
180
+ .magritte-modal-scroll-container___Tf8Ns_10-1-0::-webkit-scrollbar{
179
181
  display:none;
180
182
  }
181
- .magritte-modal-content-wrapper__one-line___tYg8d_10-0-10{
183
+ .magritte-modal-content-wrapper__one-line___tYg8d_10-1-0{
182
184
  flex-direction:row-reverse;
183
185
  }
184
- .magritte-modal-content-wrapper__one-line___tYg8d_10-0-10 .magritte-modal-content___46QFS_10-0-10{
186
+ .magritte-modal-content-wrapper__one-line___tYg8d_10-1-0 .magritte-modal-content___46QFS_10-1-0{
185
187
  width:auto;
186
188
  container-type:inline-size;
187
189
  margin-right:0;
188
190
  }
189
- .magritte-modal-content-wrapper__one-line___tYg8d_10-0-10 .magritte-content-sticky-container___nqEXj_10-0-10{
191
+ .magritte-modal-content-wrapper__one-line___tYg8d_10-1-0 .magritte-content-sticky-container___nqEXj_10-1-0{
190
192
  max-width:calc(100% - 16px);
191
193
  max-width:calc(100cqw - 16px);
192
194
  }
193
- .magritte-divider-container___qP3VK_10-0-10{
195
+ .magritte-divider-container___qP3VK_10-1-0{
194
196
  margin:0 -24px;
195
197
  }
196
- .magritte-divider-container___qP3VK_10-0-10.magritte-divider-container-hidden___EIxB-_10-0-10{
198
+ .magritte-divider-container___qP3VK_10-1-0.magritte-divider-container-hidden___EIxB-_10-1-0{
197
199
  display:none;
198
200
  }
199
- .magritte-modal-footer___8xPqQ_10-0-10{
201
+ .magritte-modal-footer___8xPqQ_10-1-0{
200
202
  margin:0 -24px -24px;
201
203
  background-color:var(--magritte-color-component-modal-background-content-v24-5-0);
202
204
  z-index:1;
203
205
  --magritte-ui-container-background-color-override:var(--magritte-color-component-modal-background-content-v24-5-0);
204
206
  }
205
- .magritte-modal-buttons-container___1O1Nr_10-0-10{
207
+ .magritte-modal-buttons-container___1O1Nr_10-1-0{
206
208
  display:flex;
207
209
  gap:12px;
208
210
  }
209
- .magritte-animation-timeout___w-j7K_10-0-10{
211
+ .magritte-animation-timeout___w-j7K_10-1-0{
210
212
  --enter-animation-duration:0;
211
213
  --exit-animation-duration:0;
212
214
  }
213
215
  @media (prefers-reduced-motion: no-preference){
214
- .magritte-animation-timeout___w-j7K_10-0-10{
216
+ .magritte-animation-timeout___w-j7K_10-1-0{
215
217
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
216
218
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
217
219
  }
218
220
  }
219
- .magritte-animation-enter-center___7jogC_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
221
+ .magritte-animation-enter-center___7jogC_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
220
222
  opacity:0;
221
223
  }
222
- .magritte-animation-enter-center___7jogC_10-0-10 .magritte-modal___RAW6S_10-0-10{
224
+ .magritte-animation-enter-center___7jogC_10-1-0 .magritte-modal___RAW6S_10-1-0{
223
225
  opacity:0;
224
226
  }
225
- .magritte-animation-enter-center-active___fywwW_10-0-10{
227
+ .magritte-animation-enter-center-active___fywwW_10-1-0{
226
228
  --enter-animation-duration:0;
227
229
  --exit-animation-duration:0;
228
230
  }
229
231
  @media (prefers-reduced-motion: no-preference){
230
- .magritte-animation-enter-center-active___fywwW_10-0-10{
232
+ .magritte-animation-enter-center-active___fywwW_10-1-0{
231
233
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
232
234
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
233
235
  }
234
236
  }
235
- .magritte-animation-enter-center-active___fywwW_10-0-10 .magritte-modal___RAW6S_10-0-10,
236
- .magritte-animation-enter-center-active___fywwW_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
237
+ .magritte-animation-enter-center-active___fywwW_10-1-0 .magritte-modal___RAW6S_10-1-0,
238
+ .magritte-animation-enter-center-active___fywwW_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
237
239
  opacity:1;
238
240
  transition-duration:var(--enter-animation-duration);
239
241
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-5-0);
240
242
  }
241
- .magritte-animation-exit-center___3Fa6x_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
243
+ .magritte-animation-exit-center___3Fa6x_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
242
244
  opacity:1;
243
245
  }
244
- .magritte-animation-exit-center___3Fa6x_10-0-10 .magritte-modal___RAW6S_10-0-10{
246
+ .magritte-animation-exit-center___3Fa6x_10-1-0 .magritte-modal___RAW6S_10-1-0{
245
247
  opacity:1;
246
248
  }
247
- .magritte-animation-exit-center-active___tY0UA_10-0-10{
249
+ .magritte-animation-exit-center-active___tY0UA_10-1-0{
248
250
  --enter-animation-duration:0;
249
251
  --exit-animation-duration:0;
250
252
  }
251
253
  @media (prefers-reduced-motion: no-preference){
252
- .magritte-animation-exit-center-active___tY0UA_10-0-10{
254
+ .magritte-animation-exit-center-active___tY0UA_10-1-0{
253
255
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
254
256
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
255
257
  }
256
258
  }
257
- .magritte-animation-exit-center-active___tY0UA_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
259
+ .magritte-animation-exit-center-active___tY0UA_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
258
260
  opacity:0;
259
261
  }
260
- .magritte-animation-exit-center-active___tY0UA_10-0-10 .magritte-modal___RAW6S_10-0-10{
262
+ .magritte-animation-exit-center-active___tY0UA_10-1-0 .magritte-modal___RAW6S_10-1-0{
261
263
  opacity:0;
262
264
  }
263
- .magritte-animation-exit-center-active___tY0UA_10-0-10 .magritte-modal___RAW6S_10-0-10,
264
- .magritte-animation-exit-center-active___tY0UA_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
265
+ .magritte-animation-exit-center-active___tY0UA_10-1-0 .magritte-modal___RAW6S_10-1-0,
266
+ .magritte-animation-exit-center-active___tY0UA_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
265
267
  transition-duration:var(--exit-animation-duration);
266
268
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-5-0);
267
269
  }
268
- .magritte-animation-enter-left___5YB8B_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
270
+ .magritte-animation-enter-left___5YB8B_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
269
271
  opacity:0;
270
272
  }
271
- .magritte-animation-enter-left___5YB8B_10-0-10 .magritte-modal___RAW6S_10-0-10{
273
+ .magritte-animation-enter-left___5YB8B_10-1-0 .magritte-modal___RAW6S_10-1-0{
272
274
  opacity:0;
273
275
  transform:translateX(-100%);
274
276
  }
275
- .magritte-animation-enter-left-active___5GK8s_10-0-10{
277
+ .magritte-animation-enter-left-active___5GK8s_10-1-0{
276
278
  --enter-animation-duration:0;
277
279
  --exit-animation-duration:0;
278
280
  }
279
281
  @media (prefers-reduced-motion: no-preference){
280
- .magritte-animation-enter-left-active___5GK8s_10-0-10{
282
+ .magritte-animation-enter-left-active___5GK8s_10-1-0{
281
283
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
282
284
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
283
285
  }
284
286
  }
285
- .magritte-animation-enter-left-active___5GK8s_10-0-10 .magritte-modal___RAW6S_10-0-10,
286
- .magritte-animation-enter-left-active___5GK8s_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
287
+ .magritte-animation-enter-left-active___5GK8s_10-1-0 .magritte-modal___RAW6S_10-1-0,
288
+ .magritte-animation-enter-left-active___5GK8s_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
287
289
  opacity:1;
288
290
  transition-duration:var(--enter-animation-duration);
289
291
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-5-0);
290
292
  transform:translateX(0);
291
293
  }
292
- .magritte-animation-exit-left___OnkQE_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
294
+ .magritte-animation-exit-left___OnkQE_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
293
295
  opacity:1;
294
296
  }
295
- .magritte-animation-exit-left___OnkQE_10-0-10 .magritte-modal___RAW6S_10-0-10{
297
+ .magritte-animation-exit-left___OnkQE_10-1-0 .magritte-modal___RAW6S_10-1-0{
296
298
  opacity:1;
297
299
  transform:translateX(0);
298
300
  }
299
- .magritte-animation-exit-left-active___AEGxY_10-0-10{
301
+ .magritte-animation-exit-left-active___AEGxY_10-1-0{
300
302
  --enter-animation-duration:0;
301
303
  --exit-animation-duration:0;
302
304
  }
303
305
  @media (prefers-reduced-motion: no-preference){
304
- .magritte-animation-exit-left-active___AEGxY_10-0-10{
306
+ .magritte-animation-exit-left-active___AEGxY_10-1-0{
305
307
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
306
308
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
307
309
  }
308
310
  }
309
- .magritte-animation-exit-left-active___AEGxY_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
311
+ .magritte-animation-exit-left-active___AEGxY_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
310
312
  opacity:0;
311
313
  }
312
- .magritte-animation-exit-left-active___AEGxY_10-0-10 .magritte-modal___RAW6S_10-0-10{
314
+ .magritte-animation-exit-left-active___AEGxY_10-1-0 .magritte-modal___RAW6S_10-1-0{
313
315
  opacity:0;
314
316
  transform:translateX(-100%);
315
317
  }
316
- .magritte-animation-exit-left-active___AEGxY_10-0-10 .magritte-modal___RAW6S_10-0-10,
317
- .magritte-animation-exit-left-active___AEGxY_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
318
+ .magritte-animation-exit-left-active___AEGxY_10-1-0 .magritte-modal___RAW6S_10-1-0,
319
+ .magritte-animation-exit-left-active___AEGxY_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
318
320
  transition-duration:var(--exit-animation-duration);
319
321
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-5-0);
320
322
  }
321
- .magritte-animation-enter-right___2aXOm_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
323
+ .magritte-animation-enter-right___2aXOm_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
322
324
  opacity:0;
323
325
  }
324
- .magritte-animation-enter-right___2aXOm_10-0-10 .magritte-modal___RAW6S_10-0-10{
326
+ .magritte-animation-enter-right___2aXOm_10-1-0 .magritte-modal___RAW6S_10-1-0{
325
327
  opacity:0;
326
328
  transform:translateX(100%);
327
329
  }
328
- .magritte-animation-enter-right-active___8wX4-_10-0-10{
330
+ .magritte-animation-enter-right-active___8wX4-_10-1-0{
329
331
  --enter-animation-duration:0;
330
332
  --exit-animation-duration:0;
331
333
  }
332
334
  @media (prefers-reduced-motion: no-preference){
333
- .magritte-animation-enter-right-active___8wX4-_10-0-10{
335
+ .magritte-animation-enter-right-active___8wX4-_10-1-0{
334
336
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
335
337
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
336
338
  }
337
339
  }
338
- .magritte-animation-enter-right-active___8wX4-_10-0-10 .magritte-modal___RAW6S_10-0-10,
339
- .magritte-animation-enter-right-active___8wX4-_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
340
+ .magritte-animation-enter-right-active___8wX4-_10-1-0 .magritte-modal___RAW6S_10-1-0,
341
+ .magritte-animation-enter-right-active___8wX4-_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
340
342
  opacity:1;
341
343
  transition-duration:var(--enter-animation-duration);
342
344
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-5-0);
343
345
  transform:translateX(0);
344
346
  }
345
- .magritte-animation-exit-right___iczoc_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
347
+ .magritte-animation-exit-right___iczoc_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
346
348
  opacity:1;
347
349
  }
348
- .magritte-animation-exit-right___iczoc_10-0-10 .magritte-modal___RAW6S_10-0-10{
350
+ .magritte-animation-exit-right___iczoc_10-1-0 .magritte-modal___RAW6S_10-1-0{
349
351
  opacity:1;
350
352
  transform:translateX(0);
351
353
  }
352
- .magritte-animation-exit-right-active___eFS4O_10-0-10{
354
+ .magritte-animation-exit-right-active___eFS4O_10-1-0{
353
355
  --enter-animation-duration:0;
354
356
  --exit-animation-duration:0;
355
357
  }
356
358
  @media (prefers-reduced-motion: no-preference){
357
- .magritte-animation-exit-right-active___eFS4O_10-0-10{
359
+ .magritte-animation-exit-right-active___eFS4O_10-1-0{
358
360
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-5-0);
359
361
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-5-0);
360
362
  }
361
363
  }
362
- .magritte-animation-exit-right-active___eFS4O_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
364
+ .magritte-animation-exit-right-active___eFS4O_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
363
365
  opacity:0;
364
366
  }
365
- .magritte-animation-exit-right-active___eFS4O_10-0-10 .magritte-modal___RAW6S_10-0-10{
367
+ .magritte-animation-exit-right-active___eFS4O_10-1-0 .magritte-modal___RAW6S_10-1-0{
366
368
  opacity:0;
367
369
  transform:translateX(100%);
368
370
  }
369
- .magritte-animation-exit-right-active___eFS4O_10-0-10 .magritte-modal___RAW6S_10-0-10,
370
- .magritte-animation-exit-right-active___eFS4O_10-0-10.magritte-modal-overlay-with-background___ZYsA-_10-0-10{
371
+ .magritte-animation-exit-right-active___eFS4O_10-1-0 .magritte-modal___RAW6S_10-1-0,
372
+ .magritte-animation-exit-right-active___eFS4O_10-1-0.magritte-modal-overlay-with-background___ZYsA-_10-1-0{
371
373
  transition-duration:var(--exit-animation-duration);
372
374
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-5-0);
373
375
  }
374
- .magritte-space-preserver___P5PKZ_10-0-10{
376
+ .magritte-space-preserver___P5PKZ_10-1-0{
375
377
  flex:0 0 auto;
376
378
  }
377
- .magritte-tree-selector-container___fdhI-_10-0-10{
379
+ .magritte-tree-selector-container___fdhI-_10-1-0{
378
380
  height:100%;
379
381
  max-width:calc(100% - 24px);
380
382
  max-width:100cqw;
381
383
  --magritte-ui-scrollbar-offset-right:-24px;
382
384
  }
383
- .magritte-content-sticky-container___nqEXj_10-0-10{
385
+ .magritte-content-sticky-container___nqEXj_10-1-0{
384
386
  display:flex;
385
387
  flex-direction:column;
386
388
  position:sticky;
@@ -390,6 +392,6 @@
390
392
  max-width:calc(100% - 24px);
391
393
  max-width:100cqw;
392
394
  }
393
- .magritte-grow-limiter___zeIwy_10-0-10{
395
+ .magritte-grow-limiter___zeIwy_10-1-0{
394
396
  flex:1 0;
395
397
  }
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-DXF1H5mm.js';
17
+ import './ModalContentWithHeader-Bu7JEMNX.js';
18
18
  import '@hh.ru/magritte-common-func-utils';
19
19
  import '@hh.ru/magritte-ui-content-overlay';
20
20
  import '@hh.ru/magritte-ui-divider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-modal",
3
- "version": "10.0.10",
3
+ "version": "10.1.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -22,26 +22,26 @@
22
22
  "@hh.ru/magritte-common-dom-storage": "1.0.9",
23
23
  "@hh.ru/magritte-common-func-utils": "1.3.15",
24
24
  "@hh.ru/magritte-common-is-server-env": "1.0.8",
25
- "@hh.ru/magritte-common-keyboard": "4.3.1",
25
+ "@hh.ru/magritte-common-keyboard": "4.3.2",
26
26
  "@hh.ru/magritte-common-modal-helper": "1.3.1",
27
27
  "@hh.ru/magritte-common-mouse": "1.2.0",
28
28
  "@hh.ru/magritte-common-use-multiple-refs": "1.1.11",
29
29
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.8",
30
30
  "@hh.ru/magritte-design-tokens": "24.5.0",
31
31
  "@hh.ru/magritte-internal-layer-name": "3.4.1",
32
- "@hh.ru/magritte-ui-action-bar": "5.3.13",
32
+ "@hh.ru/magritte-ui-action-bar": "5.3.14",
33
33
  "@hh.ru/magritte-ui-breakpoint": "6.0.8",
34
34
  "@hh.ru/magritte-ui-content-overlay": "1.1.2",
35
35
  "@hh.ru/magritte-ui-divider": "3.1.0",
36
- "@hh.ru/magritte-ui-icon": "14.1.0",
36
+ "@hh.ru/magritte-ui-icon": "14.2.0",
37
37
  "@hh.ru/magritte-ui-layer": "3.2.3",
38
38
  "@hh.ru/magritte-ui-mock-component": "1.1.7",
39
39
  "@hh.ru/magritte-ui-progress-bar": "5.0.20",
40
40
  "@hh.ru/magritte-ui-scrollbar": "1.0.21",
41
- "@hh.ru/magritte-ui-textarea": "3.3.13",
41
+ "@hh.ru/magritte-ui-textarea": "3.3.14",
42
42
  "@hh.ru/magritte-ui-theme-wrapper": "1.1.14",
43
43
  "@hh.ru/magritte-ui-title": "8.0.1",
44
- "@hh.ru/magritte-ui-tree-selector": "5.5.17"
44
+ "@hh.ru/magritte-ui-tree-selector": "5.5.19"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "classnames": ">=2.3.2",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "5d6c1cb9f946c7e457bfb1da96190fbec749d70a"
55
+ "gitHead": "1b8351a8130a9a461f99f4fbd966885f9d71197f"
56
56
  }