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