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

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-CCJOAtwT.js';
15
+ import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-BplZxF6y.js';
16
16
  import { useModalOrder } from './useModalOrder.js';
17
17
  import { isProgressBarComponent } from '@hh.ru/magritte-ui-progress-bar';
18
18
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
@@ -6,7 +6,7 @@ import { requestAnimation } from '@hh.ru/magritte-common-func-utils';
6
6
  import { Divider } from '@hh.ru/magritte-ui-divider';
7
7
  import { ModalHeader } from './ModalHeader.js';
8
8
 
9
- var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_9-0-6","modalOverlay":"magritte-modal-overlay___lK22l_9-0-6","overlay-left":"magritte-overlay-left___JtHK4_9-0-6","overlayLeft":"magritte-overlay-left___JtHK4_9-0-6","overlay-right":"magritte-overlay-right___uKTDt_9-0-6","overlayRight":"magritte-overlay-right___uKTDt_9-0-6","modal":"magritte-modal___RAW6S_9-0-6","size-small":"magritte-size-small___2JTM2_9-0-6","sizeSmall":"magritte-size-small___2JTM2_9-0-6","size-medium":"magritte-size-medium___cWCe7_9-0-6","sizeMedium":"magritte-size-medium___cWCe7_9-0-6","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-6","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-6","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-6","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-6","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-6","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-6","modal-content":"magritte-modal-content___46QFS_9-0-6","modalContent":"magritte-modal-content___46QFS_9-0-6","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-6","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-6","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-6","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-6","divider-container":"magritte-divider-container___qP3VK_9-0-6","dividerContainer":"magritte-divider-container___qP3VK_9-0-6","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-6","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-6","modal-footer":"magritte-modal-footer___8xPqQ_9-0-6","modalFooter":"magritte-modal-footer___8xPqQ_9-0-6","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-6","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-6","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-6","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-6","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-6","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-6","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-6","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-6","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-6","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-6","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-6","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-6","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-6","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-6","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-6","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-6","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-6","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-6","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-6","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-6","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-6","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-6","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-6","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-6","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-6","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-6","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-6","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-6","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-6","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-6","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-6","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-6","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-6","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-6"};
9
+ var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_9-0-8","modalOverlay":"magritte-modal-overlay___lK22l_9-0-8","overlay-left":"magritte-overlay-left___JtHK4_9-0-8","overlayLeft":"magritte-overlay-left___JtHK4_9-0-8","overlay-right":"magritte-overlay-right___uKTDt_9-0-8","overlayRight":"magritte-overlay-right___uKTDt_9-0-8","modal":"magritte-modal___RAW6S_9-0-8","size-small":"magritte-size-small___2JTM2_9-0-8","sizeSmall":"magritte-size-small___2JTM2_9-0-8","size-medium":"magritte-size-medium___cWCe7_9-0-8","sizeMedium":"magritte-size-medium___cWCe7_9-0-8","no-vertical-paddings":"magritte-no-vertical-paddings___Z3-oM_9-0-8","noVerticalPaddings":"magritte-no-vertical-paddings___Z3-oM_9-0-8","no-horizontal-paddings":"magritte-no-horizontal-paddings___aT95Y_9-0-8","noHorizontalPaddings":"magritte-no-horizontal-paddings___aT95Y_9-0-8","modal-full-height":"magritte-modal-full-height___gIM4E_9-0-8","modalFullHeight":"magritte-modal-full-height___gIM4E_9-0-8","modal-content":"magritte-modal-content___46QFS_9-0-8","modalContent":"magritte-modal-content___46QFS_9-0-8","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_9-0-8","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_9-0-8","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-8","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_9-0-8","content-sticky-container":"magritte-content-sticky-container___nqEXj_9-0-8","contentStickyContainer":"magritte-content-sticky-container___nqEXj_9-0-8","divider-container":"magritte-divider-container___qP3VK_9-0-8","dividerContainer":"magritte-divider-container___qP3VK_9-0-8","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_9-0-8","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_9-0-8","modal-footer":"magritte-modal-footer___8xPqQ_9-0-8","modalFooter":"magritte-modal-footer___8xPqQ_9-0-8","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_9-0-8","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_9-0-8","animation-timeout":"magritte-animation-timeout___w-j7K_9-0-8","animationTimeout":"magritte-animation-timeout___w-j7K_9-0-8","animation-enter-center":"magritte-animation-enter-center___7jogC_9-0-8","animationEnterCenter":"magritte-animation-enter-center___7jogC_9-0-8","animation-enter-center-active":"magritte-animation-enter-center-active___fywwW_9-0-8","animationEnterCenterActive":"magritte-animation-enter-center-active___fywwW_9-0-8","animation-exit-center":"magritte-animation-exit-center___3Fa6x_9-0-8","animationExitCenter":"magritte-animation-exit-center___3Fa6x_9-0-8","animation-exit-center-active":"magritte-animation-exit-center-active___tY0UA_9-0-8","animationExitCenterActive":"magritte-animation-exit-center-active___tY0UA_9-0-8","animation-enter-left":"magritte-animation-enter-left___5YB8B_9-0-8","animationEnterLeft":"magritte-animation-enter-left___5YB8B_9-0-8","animation-enter-left-active":"magritte-animation-enter-left-active___5GK8s_9-0-8","animationEnterLeftActive":"magritte-animation-enter-left-active___5GK8s_9-0-8","animation-exit-left":"magritte-animation-exit-left___OnkQE_9-0-8","animationExitLeft":"magritte-animation-exit-left___OnkQE_9-0-8","animation-exit-left-active":"magritte-animation-exit-left-active___AEGxY_9-0-8","animationExitLeftActive":"magritte-animation-exit-left-active___AEGxY_9-0-8","animation-enter-right":"magritte-animation-enter-right___2aXOm_9-0-8","animationEnterRight":"magritte-animation-enter-right___2aXOm_9-0-8","animation-enter-right-active":"magritte-animation-enter-right-active___8wX4-_9-0-8","animationEnterRightActive":"magritte-animation-enter-right-active___8wX4-_9-0-8","animation-exit-right":"magritte-animation-exit-right___iczoc_9-0-8","animationExitRight":"magritte-animation-exit-right___iczoc_9-0-8","animation-exit-right-active":"magritte-animation-exit-right-active___eFS4O_9-0-8","animationExitRightActive":"magritte-animation-exit-right-active___eFS4O_9-0-8","content-scroll-preserver":"magritte-content-scroll-preserver___Tw5Px_9-0-8","contentScrollPreserver":"magritte-content-scroll-preserver___Tw5Px_9-0-8","content-container":"magritte-content-container___-ql3h_9-0-8","contentContainer":"magritte-content-container___-ql3h_9-0-8","content-sticky-container_full-height":"magritte-content-sticky-container_full-height___Gl9x8_9-0-8","contentStickyContainerFullHeight":"magritte-content-sticky-container_full-height___Gl9x8_9-0-8"};
10
10
 
11
11
  const checkIsScrolledToBottom = (el) => {
12
12
  return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;
@@ -123,7 +123,7 @@ const ModalContentWithHeader = ({ labelId, children, headerHeight: _headerHeight
123
123
  [styles.modalContentWrapperOneLine]: onlyActions,
124
124
  }), children: [jsx(ModalHeader, { ...modalHeaderProps, headerHeight: headerHeightRef.current, labelId: labelId, wrapperRef: headerWrapperRef, ref: headerImageContainerRef }), jsx("div", { className: classnames(styles.dividerContainer, {
125
125
  [styles.dividerContainerHidden]: !isTopDividerVisible(),
126
- }), ref: topDividerContainerRef, children: jsx(Divider, {}) }), jsx("div", { className: classnames(styles.modalContent), ref: contentContainerRef, onScroll: handleScroll, "data-qa": "modal-content-scroll-container", children: isTreeSelectorChild ? (children) : (jsxs(Fragment, { children: [jsx("div", { className: classnames(styles.contentStickyContainer, {
126
+ }), ref: topDividerContainerRef, children: jsx(Divider, {}) }), jsx("div", { className: classnames(styles.modalContent), ref: contentContainerRef, onScroll: handleScroll, "data-qa": "modal-content-scroll-container", children: isTreeSelectorChild ? (jsx("div", { className: styles.contentContainer, children: children })) : (jsxs(Fragment, { children: [jsx("div", { className: classnames(styles.contentStickyContainer, {
127
127
  [styles.contentStickyContainerFullHeight]: height === 'full-screen',
128
128
  }), ref: stickyContainerRef, children: children }), jsx("div", { ref: spacePreserverRef })] })) })] }), showDivider && (jsx("div", { className: classnames(styles.dividerContainer, {
129
129
  [styles.dividerContainerHidden]: !bottomDividerVisibleRef.current,
@@ -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-CCJOAtwT.js.map
134
+ //# sourceMappingURL=ModalContentWithHeader-BplZxF6y.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContentWithHeader-CCJOAtwT.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,EA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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-BplZxF6y.js","sources":["../src/ModalContentWithHeader.tsx"],"sourcesContent":["import { FC, PropsWithChildren, useCallback, useLayoutEffect, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { requestAnimation } from '@hh.ru/magritte-common-func-utils';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { ModalHeader } from '@hh.ru/magritte-ui-modal/ModalHeader';\nimport { ModalHeaderProps, ModalHeight } from '@hh.ru/magritte-ui-modal/types';\n\nimport styles from './modal.less';\n\nconst checkIsScrolledToBottom = (el: HTMLElement) => {\n return Math.abs(el.scrollHeight - el.scrollTop - el.clientHeight) < 1;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\n// Минимальная высота до которой может сжаться хедер\nconst HEADER_SHRINK_MIN_HEIGHT = 148;\n// Минимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MIN_HEIGHT = 12;\n// Максимальная высота отступа между хедером и контентом\nconst HEADER_MARGIN_MAX_HEIGHT = 24;\nconst HEADER_MARGIN_HEIGHT_DELTA = HEADER_MARGIN_MAX_HEIGHT - HEADER_MARGIN_MIN_HEIGHT;\n\n// Вычисляет минимальную высоту до которой может сжаться хедер с учетом высоты контента, чтобы не спровоцировать\n// изменение размера модалки\nconst calcHeaderShrinkLimit = (\n headerHeight: number,\n headerMaxHeight: number,\n contentHeight: number,\n contentScrollHeight: number,\n marginHeight: number\n) => {\n // Высота контента скрытого под скроллом когда хедер и марджин под ним имеет максимальную допустимую высоту\n const contentScrollDelta =\n contentScrollHeight - // Высота контента скрытого под скроллом в текущем состоянии\n contentHeight + // Высота контейнера содержащего контент\n (HEADER_MARGIN_MAX_HEIGHT - marginHeight) + // Дельта между текущей высотой марджина и максимальной допустимой\n (headerMaxHeight - headerHeight); // Дельта между текущей высотой хедера и максимальной допустимой\n\n const headerShrinkMinHeight = headerMaxHeight - (contentScrollDelta - HEADER_MARGIN_HEIGHT_DELTA);\n\n return Math.max(headerShrinkMinHeight, HEADER_SHRINK_MIN_HEIGHT);\n};\n\nconst shrinkByDelta = (\n headerImageContainer: HTMLDivElement | null,\n headerWrapper: HTMLDivElement | null,\n headerMinHeight: number,\n headerMaxHeight: number,\n scrollDeltaY: number\n) => {\n if (!headerImageContainer || !headerWrapper) {\n return;\n }\n\n const marginHeight = clamp(\n HEADER_MARGIN_MAX_HEIGHT - scrollDeltaY,\n HEADER_MARGIN_MIN_HEIGHT,\n HEADER_MARGIN_MAX_HEIGHT\n );\n headerWrapper.style.marginBottom = `${marginHeight}px`;\n\n const headerHeight = clamp(\n // Тут прибаляем дельту марджина потому что сначала должен сжаться отступ\n Math.floor(headerMaxHeight - scrollDeltaY + HEADER_MARGIN_HEIGHT_DELTA),\n headerMinHeight,\n headerMaxHeight\n );\n headerImageContainer.style.height = `${headerHeight}px`;\n};\n\nexport const ModalContentWithHeader: FC<\n PropsWithChildren<\n ModalHeaderProps & { labelId: string; isTreeSelectorChild: boolean; height?: ModalHeight; showDivider: boolean }\n >\n> = ({\n labelId,\n children,\n headerHeight: _headerHeight = 0,\n isTreeSelectorChild,\n height,\n showDivider = true,\n ...modalHeaderProps\n}) => {\n const { title, headerImageUrl, headerImage, actions, actionLink, options } = modalHeaderProps;\n\n const bottomDividerVisibleRef = useRef(false);\n const contentContainerRef = useRef<HTMLDivElement>(null);\n const headerImageContainerRef = useRef<HTMLDivElement>(null);\n const headerWrapperRef = useRef<HTMLDivElement>(null);\n const spacePreserverRef = useRef<HTMLDivElement>(null);\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const hasHeaderImageRef = useRef(!!headerImageUrl || !!headerImage);\n hasHeaderImageRef.current = !!headerImageUrl || !!headerImage;\n const headerHeightRef = useRef(0);\n headerHeightRef.current = hasHeaderImageRef.current ? Math.max(_headerHeight, 200) : 0;\n const minHeaderHeightRef = useRef(0);\n\n const bottomDividerContainerRef = useRef<HTMLDivElement>(null);\n const topDividerContainerRef = useRef<HTMLDivElement>(null);\n\n const withoutHeader = !title && !hasHeaderImageRef.current && !actions && !actionLink && !options;\n const onlyActions = !title && !hasHeaderImageRef.current && !options && (actions || actionLink);\n\n const isTopDividerVisible = () => {\n if (!contentContainerRef.current) {\n return false;\n }\n\n const topDividerVisible = hasHeaderImageRef.current\n ? contentContainerRef.current.scrollTop >\n headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA\n : contentContainerRef.current.scrollTop !== 0;\n\n return topDividerVisible && (options || !hasHeaderImageRef.current) && !onlyActions && !withoutHeader;\n };\n\n const updateHeaderDimensions = useCallback(() => {\n if (\n !headerImageContainerRef.current ||\n !headerWrapperRef.current ||\n !stickyContainerRef.current ||\n !spacePreserverRef.current ||\n !contentContainerRef.current\n ) {\n return;\n }\n\n if (!hasHeaderImageRef.current) {\n spacePreserverRef.current.style.height = '0';\n return;\n }\n\n minHeaderHeightRef.current = calcHeaderShrinkLimit(\n headerImageContainerRef.current.clientHeight,\n headerHeightRef.current,\n contentContainerRef.current.clientHeight,\n stickyContainerRef.current.scrollHeight,\n parseInt(headerWrapperRef.current.style.marginBottom || '0', 10)\n );\n\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n const preserverSize = headerHeightRef.current - minHeaderHeightRef.current + HEADER_MARGIN_HEIGHT_DELTA;\n spacePreserverRef.current.style.height = `${preserverSize}px`;\n }, []);\n\n useLayoutEffect(() => {\n if (contentContainerRef.current) {\n const observer = new ResizeObserver(\n requestAnimation(() => {\n if (!contentContainerRef.current) {\n return;\n }\n const isScrollable =\n contentContainerRef.current.scrollHeight > contentContainerRef.current.clientHeight;\n const hasScroll = isScrollable && !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerVisibleRef.current = hasScroll;\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n updateHeaderDimensions();\n })\n );\n observer.observe(contentContainerRef.current);\n return () => observer.disconnect();\n }\n\n return undefined;\n }, [updateHeaderDimensions]);\n\n useLayoutEffect(() => {\n updateHeaderDimensions();\n if (!options && (headerImageUrl || headerImage)) {\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, true);\n }\n }, [headerImageUrl, headerImage, updateHeaderDimensions, options]);\n\n const handleScroll = () => {\n if (!contentContainerRef.current) {\n return;\n }\n\n bottomDividerVisibleRef.current = !checkIsScrolledToBottom(contentContainerRef.current);\n bottomDividerContainerRef.current?.classList.toggle(\n styles.dividerContainerHidden,\n !bottomDividerVisibleRef.current\n );\n topDividerContainerRef.current?.classList.toggle(styles.dividerContainerHidden, !isTopDividerVisible());\n if (hasHeaderImageRef.current) {\n shrinkByDelta(\n headerImageContainerRef.current,\n headerWrapperRef.current,\n minHeaderHeightRef.current,\n headerHeightRef.current,\n contentContainerRef.current.scrollTop\n );\n }\n };\n\n return (\n <>\n <div\n className={classnames(styles.modalContentWrapper, {\n [styles.modalContentWrapperOneLine]: onlyActions,\n })}\n >\n <ModalHeader\n {...modalHeaderProps}\n headerHeight={headerHeightRef.current}\n labelId={labelId}\n wrapperRef={headerWrapperRef}\n ref={headerImageContainerRef}\n />\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !isTopDividerVisible(),\n })}\n ref={topDividerContainerRef}\n >\n <Divider />\n </div>\n <div\n className={classnames(styles.modalContent)}\n ref={contentContainerRef}\n onScroll={handleScroll}\n data-qa=\"modal-content-scroll-container\"\n >\n {isTreeSelectorChild ? (\n <div className={styles.contentContainer}>{children}</div>\n ) : (\n <>\n <div\n className={classnames(styles.contentStickyContainer, {\n [styles.contentStickyContainerFullHeight]: height === 'full-screen',\n })}\n ref={stickyContainerRef}\n >\n {children}\n </div>\n <div ref={spacePreserverRef} />\n </>\n )}\n </div>\n </div>\n {showDivider && (\n <div\n className={classnames(styles.dividerContainer, {\n [styles.dividerContainerHidden]: !bottomDividerVisibleRef.current,\n })}\n ref={bottomDividerContainerRef}\n >\n <Divider />\n </div>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;AAUA,MAAM,uBAAuB,GAAG,CAAC,EAAe,KAAI;AAChD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,GAAG,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAE/F;AACA,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC;AACA,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC;AACA,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,0BAA0B,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AAEvF;AACA;AACA,MAAM,qBAAqB,GAAG,CAC1B,YAAoB,EACpB,eAAuB,EACvB,aAAqB,EACrB,mBAA2B,EAC3B,YAAoB,KACpB;;AAEA,IAAA,MAAM,kBAAkB,GACpB,mBAAmB;AACnB,QAAA,aAAa;AACb,SAAC,wBAAwB,GAAG,YAAY,CAAC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-func-utils';
6
6
  import '@hh.ru/magritte-ui-divider';
7
7
  import './ModalHeader.js';
8
- export { M as ModalContentWithHeader } from './ModalContentWithHeader-CCJOAtwT.js';
8
+ export { M as ModalContentWithHeader } from './ModalContentWithHeader-BplZxF6y.js';
9
9
  import '@hh.ru/magritte-ui-icon';
10
10
  import '@hh.ru/magritte-ui-title';
11
11
  //# sourceMappingURL=ModalContentWithHeader.js.map
package/ModalHeader.js CHANGED
@@ -5,7 +5,7 @@ import classnames from 'classnames';
5
5
  import { isIconElement } from '@hh.ru/magritte-ui-icon';
6
6
  import { Title } from '@hh.ru/magritte-ui-title';
7
7
 
8
- var styles = {"content":"magritte-content___o6ktq_9-0-6","options":"magritte-options___qfErQ_9-0-6","actions":"magritte-actions___nQILV_9-0-6","actions-with-link":"magritte-actions-with-link___hnDux_9-0-6","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-6","content-with-image":"magritte-content-with-image___YarBO_9-0-6","contentWithImage":"magritte-content-with-image___YarBO_9-0-6","actions-single":"magritte-actions-single___usfKu_9-0-6","actionsSingle":"magritte-actions-single___usfKu_9-0-6","image-container":"magritte-image-container___ioL3y_9-0-6","imageContainer":"magritte-image-container___ioL3y_9-0-6","title-wrapper":"magritte-title-wrapper___O--QR_9-0-6","titleWrapper":"magritte-title-wrapper___O--QR_9-0-6","wrapper":"magritte-wrapper___zH8vB_9-0-6"};
8
+ var styles = {"content":"magritte-content___o6ktq_9-0-8","options":"magritte-options___qfErQ_9-0-8","actions":"magritte-actions___nQILV_9-0-8","actions-with-link":"magritte-actions-with-link___hnDux_9-0-8","actionsWithLink":"magritte-actions-with-link___hnDux_9-0-8","content-with-image":"magritte-content-with-image___YarBO_9-0-8","contentWithImage":"magritte-content-with-image___YarBO_9-0-8","actions-single":"magritte-actions-single___usfKu_9-0-8","actionsSingle":"magritte-actions-single___usfKu_9-0-8","image-container":"magritte-image-container___ioL3y_9-0-8","imageContainer":"magritte-image-container___ioL3y_9-0-8","title-wrapper":"magritte-title-wrapper___O--QR_9-0-8","titleWrapper":"magritte-title-wrapper___O--QR_9-0-8","wrapper":"magritte-wrapper___zH8vB_9-0-8","only-actions":"magritte-only-actions___ZC4jx_9-0-8","onlyActions":"magritte-only-actions___ZC4jx_9-0-8"};
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;
@@ -18,7 +18,10 @@ const ModalHeader = forwardRef(({ title, headerImageUrl, headerImage, headerHeig
18
18
  const currentTitleStyle = titleStyle || (hasHeaderImage ? 'contrast' : 'primary');
19
19
  const currentTitleDescriptionStyle = titleDescriptionStyle || (hasHeaderImage ? 'contrast' : 'primary');
20
20
  const withContent = title || hasHeaderImage || actionLink || actions;
21
- return (jsxs("div", { "data-qa": "modal-header", ref: wrapperRef, className: styles.wrapper, style: hasHeaderImage ? { marginBottom: 24 } : {}, children: [withContent && (jsxs("div", { className: classnames(styles.content, {
21
+ const onlyActions = !title && !hasHeaderImage && !options && (actions || actionLink);
22
+ return (jsxs("div", { "data-qa": "modal-header", ref: wrapperRef, className: classnames(styles.wrapper, {
23
+ [styles.onlyActions]: onlyActions,
24
+ }), style: hasHeaderImage ? { marginBottom: 24 } : {}, children: [withContent && (jsxs("div", { className: classnames(styles.content, {
22
25
  [styles.contentWithImage]: !!hasHeaderImage,
23
26
  }), style: hasHeaderImage ? { height: headerHeight } : {}, ref: ref, "data-qa": "modal-header-image", children: [headerImage ? (jsx("div", { className: styles.imageContainer, style: {
24
27
  backgroundImage: title ? 'var(--modal-header-gradient)' : '',
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHeader.js","sources":["../src/ModalHeader.tsx"],"sourcesContent":["import { forwardRef, RefObject, cloneElement, Children } from 'react';\nimport classnames from 'classnames';\n\nimport { isIconElement } from '@hh.ru/magritte-ui-icon';\nimport { ModalHeaderProps } from '@hh.ru/magritte-ui-modal/types';\nimport { Title } from '@hh.ru/magritte-ui-title';\n\nimport styles from './modal-header.less';\n\nexport const ModalHeader = forwardRef<\n HTMLDivElement,\n ModalHeaderProps & { labelId: string; wrapperRef: RefObject<HTMLDivElement> }\n>(\n (\n {\n title,\n headerImageUrl,\n headerImage,\n headerHeight,\n titleAlignment,\n titleElement,\n titleMaxLines,\n titleSize,\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n options,\n actions: _actions,\n actionLink,\n labelId,\n wrapperRef,\n },\n ref\n ) => {\n const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;\n const hasHeaderImage = !!headerImageUrl || !!headerImage;\n if (!title && !hasHeaderImage && !actions && !actionLink && !options) {\n return null;\n }\n const withTitle = title && titleElement;\n const withActions = !!actions || !!actionLink;\n const currentTitleStyle = titleStyle || (hasHeaderImage ? 'contrast' : 'primary');\n const currentTitleDescriptionStyle = titleDescriptionStyle || (hasHeaderImage ? 'contrast' : 'primary');\n const withContent = title || hasHeaderImage || actionLink || actions;\n\n return (\n <div\n data-qa=\"modal-header\"\n ref={wrapperRef}\n className={styles.wrapper}\n style={hasHeaderImage ? { marginBottom: 24 } : {}}\n >\n {withContent && (\n <div\n className={classnames(styles.content, {\n [styles.contentWithImage]: !!hasHeaderImage,\n })}\n style={hasHeaderImage ? { height: headerHeight } : {}}\n ref={ref}\n data-qa=\"modal-header-image\"\n >\n {headerImage ? (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: title ? 'var(--modal-header-gradient)' : '',\n height: headerHeight,\n }}\n >\n {headerImage}\n </div>\n ) : (\n headerImageUrl && (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: `${\n title ? 'var(--modal-header-gradient), ' : ''\n }url(${headerImageUrl})`,\n height: headerHeight,\n }}\n />\n )\n )}\n {withTitle && (\n <div className={styles.titleWrapper}>\n <Title\n id={labelId}\n Element={titleElement}\n alignment={titleAlignment}\n maxLines={titleMaxLines}\n size={titleSize}\n style={currentTitleStyle}\n description={titleDescription}\n descriptionMaxLines={titleDescriptionMaxLines}\n descriptionStyle={currentTitleDescriptionStyle}\n >\n {title}\n </Title>\n </div>\n )}\n {withActions && (\n <div\n className={classnames(styles.actions, {\n [styles.actionsWithLink]: !actions && !!actionLink,\n [styles.actionsSingle]: Array.isArray(actions) ? actions.length === 1 : !!actions,\n })}\n >\n {actions\n ? Children.toArray(actions).map((item) =>\n isIconElement(item)\n ? cloneElement(item, {\n padding: 8,\n borderRadius: 'halfHeight',\n backgroundStyle: undefined,\n })\n : item\n )\n : actionLink}\n </div>\n )}\n </div>\n )}\n {options && <div className={styles.options}>{options}</div>}\n </div>\n );\n }\n);\n\nModalHeader.displayName = 'ModalHeader';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;MASa,WAAW,GAAG,UAAU,CAIjC,CACI,EACI,KAAK,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,OAAO,EACP,OAAO,EAAE,QAAQ,EACjB,UAAU,EACV,OAAO,EACP,UAAU,GACb,EACD,GAAG,KACH;IACA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC;IAC1E,MAAM,cAAc,GAAG,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,WAAW,CAAC;AACzD,IAAA,IAAI,CAAC,KAAK,IAAI,CAAC,cAAc,IAAI,CAAC,OAAO,IAAI,CAAC,UAAU,IAAI,CAAC,OAAO,EAAE;AAClE,QAAA,OAAO,IAAI,CAAC;KACf;AACD,IAAA,MAAM,SAAS,GAAG,KAAK,IAAI,YAAY,CA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AA,QAAA,EAAG,OAAO,EAAO,CAAA,CAAA,EAAA,CACzD,EACR;AACN,CAAC,EACH;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"ModalHeader.js","sources":["../src/ModalHeader.tsx"],"sourcesContent":["import { forwardRef, RefObject, cloneElement, Children } from 'react';\nimport classnames from 'classnames';\n\nimport { isIconElement } from '@hh.ru/magritte-ui-icon';\nimport { ModalHeaderProps } from '@hh.ru/magritte-ui-modal/types';\nimport { Title } from '@hh.ru/magritte-ui-title';\n\nimport styles from './modal-header.less';\n\nexport const ModalHeader = forwardRef<\n HTMLDivElement,\n ModalHeaderProps & { labelId: string; wrapperRef: RefObject<HTMLDivElement> }\n>(\n (\n {\n title,\n headerImageUrl,\n headerImage,\n headerHeight,\n titleAlignment,\n titleElement,\n titleMaxLines,\n titleSize,\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n options,\n actions: _actions,\n actionLink,\n labelId,\n wrapperRef,\n },\n ref\n ) => {\n const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;\n const hasHeaderImage = !!headerImageUrl || !!headerImage;\n if (!title && !hasHeaderImage && !actions && !actionLink && !options) {\n return null;\n }\n const withTitle = title && titleElement;\n const withActions = !!actions || !!actionLink;\n const currentTitleStyle = titleStyle || (hasHeaderImage ? 'contrast' : 'primary');\n const currentTitleDescriptionStyle = titleDescriptionStyle || (hasHeaderImage ? 'contrast' : 'primary');\n const withContent = title || hasHeaderImage || actionLink || actions;\n const onlyActions = !title && !hasHeaderImage && !options && (actions || actionLink);\n\n return (\n <div\n data-qa=\"modal-header\"\n ref={wrapperRef}\n className={classnames(styles.wrapper, {\n [styles.onlyActions]: onlyActions,\n })}\n style={hasHeaderImage ? { marginBottom: 24 } : {}}\n >\n {withContent && (\n <div\n className={classnames(styles.content, {\n [styles.contentWithImage]: !!hasHeaderImage,\n })}\n style={hasHeaderImage ? { height: headerHeight } : {}}\n ref={ref}\n data-qa=\"modal-header-image\"\n >\n {headerImage ? (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: title ? 'var(--modal-header-gradient)' : '',\n height: headerHeight,\n }}\n >\n {headerImage}\n </div>\n ) : (\n headerImageUrl && (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: `${\n title ? 'var(--modal-header-gradient), ' : ''\n }url(${headerImageUrl})`,\n height: headerHeight,\n }}\n />\n )\n )}\n {withTitle && (\n <div className={styles.titleWrapper}>\n <Title\n id={labelId}\n Element={titleElement}\n alignment={titleAlignment}\n maxLines={titleMaxLines}\n size={titleSize}\n style={currentTitleStyle}\n description={titleDescription}\n descriptionMaxLines={titleDescriptionMaxLines}\n descriptionStyle={currentTitleDescriptionStyle}\n >\n {title}\n </Title>\n </div>\n )}\n {withActions && (\n <div\n className={classnames(styles.actions, {\n [styles.actionsWithLink]: !actions && !!actionLink,\n [styles.actionsSingle]: Array.isArray(actions) ? actions.length === 1 : !!actions,\n })}\n >\n {actions\n ? Children.toArray(actions).map((item) =>\n isIconElement(item)\n ? cloneElement(item, {\n padding: 8,\n borderRadius: 'halfHeight',\n backgroundStyle: undefined,\n })\n : item\n )\n : actionLink}\n </div>\n )}\n </div>\n )}\n {options && <div className={styles.options}>{options}</div>}\n </div>\n );\n }\n);\n\nModalHeader.displayName = 'ModalHeader';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;MASa,WAAW,GAAG,UAAU,CAIjC,CACI,EACI,KAAK,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,OAAO,EACP,OAAO,EAAE,QAAQ,EACjB,UAAU,EACV,OAAO,EACP,UAAU,GACb,EACD,GAAG,KACH;IACA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,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O,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO;AACpF,yBAAA,CAAC,YAED,OAAO;AACJ,8BAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAC/B,aAAa,CAAC,IAAI,CAAC;AACf,kCAAE,YAAY,CAAC,IAAI,EAAE;AACf,oCAAA,OAAO,EAAE,CAAC;AACV,oCAAA,YAAY,EAAE,YAAY;AAC1B,oCAAA,eAAe,EAAE,SAAS;iCAC7B,CAAC;kCACF,IAAI,CACb;8BACD,UAAU,EACd,CAAA,CACT,IACC,CACT,EACA,OAAO,IAAIA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,OAAO,EAAA,QAAA,EAAG,OAAO,EAAO,CAAA,CAAA,EAAA,CACzD,EACR;AACN,CAAC,EACH;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
package/index.css CHANGED
@@ -1,27 +1,30 @@
1
1
  :root{
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%);
2
+ --magritte-color-component-modal-background-action-v23-0-0:#20262b99;
3
+ --magritte-gradient-component-modal-background-fade-v23-0-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
4
4
  }
5
+
5
6
  :root{
6
- --magritte-static-border-radius-300-v22-1-0:12px;
7
- --magritte-static-border-radius-400-v22-1-0:16px;
7
+ --magritte-static-border-radius-300-v23-0-0:12px;
8
+ --magritte-static-border-radius-400-v23-0-0:16px;
8
9
  }
10
+
9
11
  .magritte-night-theme{
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
+ --magritte-color-component-modal-background-action-v23-0-0:#20262b99;
13
+ --magritte-gradient-component-modal-background-fade-v23-0-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
12
14
  }
15
+
13
16
  .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%);
17
+ --magritte-color-component-modal-background-action-v23-0-0:#20262b99;
18
+ --magritte-gradient-component-modal-background-fade-v23-0-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
16
19
  }
17
- .magritte-content___o6ktq_9-0-6{
20
+ .magritte-content___o6ktq_9-0-8{
18
21
  display:flex;
19
22
  align-items:flex-start;
20
23
  }
21
- .magritte-content___o6ktq_9-0-6 + .magritte-options___qfErQ_9-0-6{
24
+ .magritte-content___o6ktq_9-0-8 + .magritte-options___qfErQ_9-0-8{
22
25
  margin-top:24px;
23
26
  }
24
- .magritte-actions___nQILV_9-0-6{
27
+ .magritte-actions___nQILV_9-0-8{
25
28
  position:relative;
26
29
  z-index:1;
27
30
  display:flex;
@@ -30,70 +33,79 @@
30
33
  margin-left:auto;
31
34
  --magritte-ui-link-padding-override:9px;
32
35
  }
33
- .magritte-actions-with-link___hnDux_9-0-6{
36
+ .magritte-actions-with-link___hnDux_9-0-8{
34
37
  padding:0 8px 0 28px;
35
38
  }
36
- .magritte-content-with-image___YarBO_9-0-6{
39
+ .magritte-content-with-image___YarBO_9-0-8{
37
40
  position:relative;
38
41
  flex-direction:column;
39
42
  justify-content:flex-end;
40
43
  margin:-12px -12px 0;
41
- border-radius:var(--magritte-static-border-radius-400-v22-1-0);
44
+ border-radius:var(--magritte-static-border-radius-400-v23-0-0);
42
45
  overflow:hidden;
43
46
  padding:12px 24px 24px;
44
47
  box-sizing:border-box;
45
48
  }
46
- .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6{
49
+ .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8{
47
50
  order:-1;
48
51
  gap:0;
49
52
  margin-right:-16px;
50
53
  margin-top:-4px;
51
54
  margin-bottom:auto;
52
55
  }
53
- .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6:not(.magritte-actions-with-link___hnDux_9-0-6){
56
+ .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8:not(.magritte-actions-with-link___hnDux_9-0-8){
54
57
  padding:0 4px;
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);
58
+ background-color:var(--magritte-color-component-modal-background-action-v23-0-0);
59
+ border-radius:var(--magritte-static-border-radius-300-v23-0-0);
57
60
  }
58
- .magritte-content-with-image___YarBO_9-0-6 .magritte-actions___nQILV_9-0-6.magritte-actions-single___usfKu_9-0-6:not(.magritte-actions-with-link___hnDux_9-0-6){
61
+ .magritte-content-with-image___YarBO_9-0-8 .magritte-actions___nQILV_9-0-8.magritte-actions-single___usfKu_9-0-8:not(.magritte-actions-with-link___hnDux_9-0-8){
59
62
  padding:0;
60
63
  }
61
- .magritte-image-container___ioL3y_9-0-6{
64
+ .magritte-image-container___ioL3y_9-0-8{
62
65
  position:absolute;
63
66
  left:0;
64
67
  bottom:0;
65
68
  right:0;
66
69
  background-size:cover;
67
- --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v22-1-0);
70
+ --modal-header-gradient:var(--magritte-gradient-component-modal-background-fade-v23-0-0);
68
71
  }
69
- .magritte-title-wrapper___O--QR_9-0-6{
72
+ .magritte-title-wrapper___O--QR_9-0-8{
70
73
  position:relative;
71
74
  width:100%;
72
75
  }
73
- .magritte-wrapper___zH8vB_9-0-6{
76
+ .magritte-wrapper___zH8vB_9-0-8{
74
77
  margin-bottom:24px;
75
78
  }
79
+ .magritte-only-actions___ZC4jx_9-0-8 .magritte-actions___nQILV_9-0-8{
80
+ padding-left:0;
81
+ }
82
+ .magritte-only-actions___ZC4jx_9-0-8 .magritte-actions-with-link___hnDux_9-0-8{
83
+ padding-left:12px;
84
+ }
76
85
 
77
86
  :root{
78
- --magritte-color-background-overlay-v22-1-0:#20262b99;
79
- --magritte-color-component-modal-background-content-v22-1-0:#ffffff;
87
+ --magritte-color-background-overlay-v23-0-0:#20262b99;
88
+ --magritte-color-component-modal-background-content-v23-0-0:#ffffff;
80
89
  }
90
+
81
91
  :root{
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;
92
+ --magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0:cubic-bezier(0.25, 0.1, 0.25, 1);
93
+ --magritte-semantic-animation-ease-in-out-200-duration-v23-0-0:200ms;
94
+ --magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0:cubic-bezier(0.25, 0.1, 0.25, 1);
95
+ --magritte-semantic-animation-ease-in-out-300-duration-v23-0-0:300ms;
96
+ --magritte-static-border-radius-600-v23-0-0:24px;
87
97
  }
98
+
88
99
  .magritte-night-theme{
89
- --magritte-color-background-overlay-v22-1-0:#20262b99;
90
- --magritte-color-component-modal-background-content-v22-1-0:#1B1B1B;
100
+ --magritte-color-background-overlay-v23-0-0:#20262b99;
101
+ --magritte-color-component-modal-background-content-v23-0-0:#1B1B1B;
91
102
  }
103
+
92
104
  .magritte-zp-day-theme{
93
- --magritte-color-background-overlay-v22-1-0:#20262b99;
94
- --magritte-color-component-modal-background-content-v22-1-0:#ffffff;
105
+ --magritte-color-background-overlay-v23-0-0:#20262b99;
106
+ --magritte-color-component-modal-background-content-v23-0-0:#ffffff;
95
107
  }
96
- .magritte-modal-overlay___lK22l_9-0-6{
108
+ .magritte-modal-overlay___lK22l_9-0-8{
97
109
  position:fixed;
98
110
  top:0;
99
111
  right:0;
@@ -102,18 +114,18 @@
102
114
  display:flex;
103
115
  align-items:center;
104
116
  justify-content:center;
105
- background-color:var(--magritte-color-background-overlay-v22-1-0);
117
+ background-color:var(--magritte-color-background-overlay-v23-0-0);
106
118
  z-index:1;
107
119
  user-select:text;
108
120
  transition-property:opacity, transform;
109
121
  }
110
- .magritte-overlay-left___JtHK4_9-0-6{
122
+ .magritte-overlay-left___JtHK4_9-0-8{
111
123
  justify-content:flex-start;
112
124
  }
113
- .magritte-overlay-right___uKTDt_9-0-6{
125
+ .magritte-overlay-right___uKTDt_9-0-8{
114
126
  justify-content:flex-end;
115
127
  }
116
- .magritte-modal___RAW6S_9-0-6{
128
+ .magritte-modal___RAW6S_9-0-8{
117
129
  display:flex;
118
130
  box-sizing:border-box;
119
131
  margin:0 12px;
@@ -122,240 +134,259 @@
122
134
  max-height:calc(100vh - 12px * 2);
123
135
  max-width:calc(100vw - 12px * 2);
124
136
  position:relative;
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);
137
+ background-color:var(--magritte-color-component-modal-background-content-v23-0-0);
138
+ border-radius:var(--magritte-static-border-radius-600-v23-0-0);
127
139
  overflow:hidden;
128
140
  width:800px;
129
141
  transition-property:opacity, transform;
142
+ container-type:inline-size;
130
143
  }
131
- .magritte-modal___RAW6S_9-0-6.magritte-size-small___2JTM2_9-0-6{
144
+ .magritte-modal___RAW6S_9-0-8.magritte-size-small___2JTM2_9-0-8{
132
145
  width:480px;
133
146
  }
134
- .magritte-modal___RAW6S_9-0-6.magritte-size-medium___cWCe7_9-0-6{
147
+ .magritte-modal___RAW6S_9-0-8.magritte-size-medium___cWCe7_9-0-8{
135
148
  width:620px;
136
149
  }
137
- .magritte-no-vertical-paddings___Z3-oM_9-0-6{
150
+ .magritte-no-vertical-paddings___Z3-oM_9-0-8{
138
151
  padding-top:0;
139
152
  padding-bottom:0;
140
153
  }
141
- .magritte-no-horizontal-paddings___aT95Y_9-0-6{
154
+ .magritte-no-horizontal-paddings___aT95Y_9-0-8{
142
155
  padding-left:0;
143
156
  padding-right:0;
144
157
  }
145
- .magritte-modal-full-height___gIM4E_9-0-6{
158
+ .magritte-modal-full-height___gIM4E_9-0-8{
146
159
  height:100%;
147
160
  }
148
- .magritte-modal-content___46QFS_9-0-6{
161
+ .magritte-modal-content___46QFS_9-0-8{
149
162
  flex:1 1;
150
163
  overflow-y:auto;
151
- padding:0 5px;
152
- margin:0 -5px;
164
+ padding:0 0 0 24px;
165
+ margin:0 -24px;
153
166
  overscroll-behavior:none;
167
+ width:calc(100% + 24px);
168
+ width:calc(100cqw + 24px);
154
169
  }
155
- .magritte-modal-content-wrapper___23XFT_9-0-6{
170
+ .magritte-modal-content-wrapper___23XFT_9-0-8{
156
171
  display:flex;
157
172
  flex-direction:column;
158
173
  min-height:0;
159
174
  flex:1 1;
160
175
  }
161
- .magritte-modal-content-wrapper__one-line___tYg8d_9-0-6{
176
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8{
162
177
  flex-direction:row-reverse;
163
178
  }
164
- .magritte-divider-container___qP3VK_9-0-6{
179
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8 .magritte-modal-content___46QFS_9-0-8{
180
+ width:auto;
181
+ container-type:inline-size;
182
+ margin-right:0;
183
+ }
184
+ .magritte-modal-content-wrapper__one-line___tYg8d_9-0-8 .magritte-content-sticky-container___nqEXj_9-0-8{
185
+ max-width:calc(100% - 16px);
186
+ max-width:calc(100cqw - 16px);
187
+ }
188
+ .magritte-divider-container___qP3VK_9-0-8{
165
189
  margin:0 -24px;
166
190
  }
167
- .magritte-divider-container___qP3VK_9-0-6.magritte-divider-container-hidden___EIxB-_9-0-6{
191
+ .magritte-divider-container___qP3VK_9-0-8.magritte-divider-container-hidden___EIxB-_9-0-8{
168
192
  display:none;
169
193
  }
170
- .magritte-modal-footer___8xPqQ_9-0-6{
194
+ .magritte-modal-footer___8xPqQ_9-0-8{
171
195
  margin:0 -24px -24px;
172
- background-color:var(--magritte-color-component-modal-background-content-v22-1-0);
196
+ background-color:var(--magritte-color-component-modal-background-content-v23-0-0);
173
197
  z-index:1;
174
- --magritte-ui-action-bar-background-color-override:var(--magritte-color-component-modal-background-content-v22-1-0);
198
+ --magritte-ui-action-bar-background-color-override:var(--magritte-color-component-modal-background-content-v23-0-0);
175
199
  }
176
- .magritte-modal-buttons-container___1O1Nr_9-0-6{
200
+ .magritte-modal-buttons-container___1O1Nr_9-0-8{
177
201
  display:flex;
178
202
  gap:12px;
179
203
  }
180
- .magritte-animation-timeout___w-j7K_9-0-6{
204
+ .magritte-animation-timeout___w-j7K_9-0-8{
181
205
  --enter-animation-duration:0;
182
206
  --exit-animation-duration:0;
183
207
  }
184
208
  @media (prefers-reduced-motion: no-preference){
185
- .magritte-animation-timeout___w-j7K_9-0-6{
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);
209
+ .magritte-animation-timeout___w-j7K_9-0-8{
210
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
211
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
188
212
  }
189
213
  }
190
- .magritte-animation-enter-center___7jogC_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
214
+ .magritte-animation-enter-center___7jogC_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
191
215
  opacity:0;
192
216
  }
193
- .magritte-animation-enter-center___7jogC_9-0-6 .magritte-modal___RAW6S_9-0-6{
217
+ .magritte-animation-enter-center___7jogC_9-0-8 .magritte-modal___RAW6S_9-0-8{
194
218
  opacity:0;
195
219
  transform:scale(0.96);
196
220
  }
197
- .magritte-animation-enter-center-active___fywwW_9-0-6{
221
+ .magritte-animation-enter-center-active___fywwW_9-0-8{
198
222
  --enter-animation-duration:0;
199
223
  --exit-animation-duration:0;
200
224
  }
201
225
  @media (prefers-reduced-motion: no-preference){
202
- .magritte-animation-enter-center-active___fywwW_9-0-6{
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);
226
+ .magritte-animation-enter-center-active___fywwW_9-0-8{
227
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
228
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
205
229
  }
206
230
  }
207
- .magritte-animation-enter-center-active___fywwW_9-0-6 .magritte-modal___RAW6S_9-0-6,
208
- .magritte-animation-enter-center-active___fywwW_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
231
+ .magritte-animation-enter-center-active___fywwW_9-0-8 .magritte-modal___RAW6S_9-0-8,
232
+ .magritte-animation-enter-center-active___fywwW_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
209
233
  opacity:1;
210
234
  transition-duration:var(--enter-animation-duration);
211
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
235
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
212
236
  transform:scale(1);
213
237
  }
214
- .magritte-animation-exit-center___3Fa6x_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
238
+ .magritte-animation-exit-center___3Fa6x_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
215
239
  opacity:1;
216
240
  }
217
- .magritte-animation-exit-center___3Fa6x_9-0-6 .magritte-modal___RAW6S_9-0-6{
241
+ .magritte-animation-exit-center___3Fa6x_9-0-8 .magritte-modal___RAW6S_9-0-8{
218
242
  opacity:1;
219
243
  transform:scale(1);
220
244
  }
221
- .magritte-animation-exit-center-active___tY0UA_9-0-6{
245
+ .magritte-animation-exit-center-active___tY0UA_9-0-8{
222
246
  --enter-animation-duration:0;
223
247
  --exit-animation-duration:0;
224
248
  }
225
249
  @media (prefers-reduced-motion: no-preference){
226
- .magritte-animation-exit-center-active___tY0UA_9-0-6{
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);
250
+ .magritte-animation-exit-center-active___tY0UA_9-0-8{
251
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
252
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
229
253
  }
230
254
  }
231
- .magritte-animation-exit-center-active___tY0UA_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
255
+ .magritte-animation-exit-center-active___tY0UA_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
232
256
  opacity:0;
233
257
  }
234
- .magritte-animation-exit-center-active___tY0UA_9-0-6 .magritte-modal___RAW6S_9-0-6{
258
+ .magritte-animation-exit-center-active___tY0UA_9-0-8 .magritte-modal___RAW6S_9-0-8{
235
259
  opacity:0;
236
260
  transform:scale(0.96);
237
261
  }
238
- .magritte-animation-exit-center-active___tY0UA_9-0-6 .magritte-modal___RAW6S_9-0-6,
239
- .magritte-animation-exit-center-active___tY0UA_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
262
+ .magritte-animation-exit-center-active___tY0UA_9-0-8 .magritte-modal___RAW6S_9-0-8,
263
+ .magritte-animation-exit-center-active___tY0UA_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
240
264
  transition-duration:var(--exit-animation-duration);
241
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
265
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
242
266
  }
243
- .magritte-animation-enter-left___5YB8B_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
267
+ .magritte-animation-enter-left___5YB8B_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
244
268
  opacity:0;
245
269
  }
246
- .magritte-animation-enter-left___5YB8B_9-0-6 .magritte-modal___RAW6S_9-0-6{
270
+ .magritte-animation-enter-left___5YB8B_9-0-8 .magritte-modal___RAW6S_9-0-8{
247
271
  opacity:0;
248
272
  transform:translateX(-100%);
249
273
  }
250
- .magritte-animation-enter-left-active___5GK8s_9-0-6{
274
+ .magritte-animation-enter-left-active___5GK8s_9-0-8{
251
275
  --enter-animation-duration:0;
252
276
  --exit-animation-duration:0;
253
277
  }
254
278
  @media (prefers-reduced-motion: no-preference){
255
- .magritte-animation-enter-left-active___5GK8s_9-0-6{
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);
279
+ .magritte-animation-enter-left-active___5GK8s_9-0-8{
280
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
281
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
258
282
  }
259
283
  }
260
- .magritte-animation-enter-left-active___5GK8s_9-0-6 .magritte-modal___RAW6S_9-0-6,
261
- .magritte-animation-enter-left-active___5GK8s_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
284
+ .magritte-animation-enter-left-active___5GK8s_9-0-8 .magritte-modal___RAW6S_9-0-8,
285
+ .magritte-animation-enter-left-active___5GK8s_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
262
286
  opacity:1;
263
287
  transition-duration:var(--enter-animation-duration);
264
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
288
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
265
289
  transform:translateX(0);
266
290
  }
267
- .magritte-animation-exit-left___OnkQE_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
291
+ .magritte-animation-exit-left___OnkQE_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
268
292
  opacity:1;
269
293
  }
270
- .magritte-animation-exit-left___OnkQE_9-0-6 .magritte-modal___RAW6S_9-0-6{
294
+ .magritte-animation-exit-left___OnkQE_9-0-8 .magritte-modal___RAW6S_9-0-8{
271
295
  opacity:1;
272
296
  transform:translateX(0);
273
297
  }
274
- .magritte-animation-exit-left-active___AEGxY_9-0-6{
298
+ .magritte-animation-exit-left-active___AEGxY_9-0-8{
275
299
  --enter-animation-duration:0;
276
300
  --exit-animation-duration:0;
277
301
  }
278
302
  @media (prefers-reduced-motion: no-preference){
279
- .magritte-animation-exit-left-active___AEGxY_9-0-6{
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);
303
+ .magritte-animation-exit-left-active___AEGxY_9-0-8{
304
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
305
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
282
306
  }
283
307
  }
284
- .magritte-animation-exit-left-active___AEGxY_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
308
+ .magritte-animation-exit-left-active___AEGxY_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
285
309
  opacity:0;
286
310
  }
287
- .magritte-animation-exit-left-active___AEGxY_9-0-6 .magritte-modal___RAW6S_9-0-6{
311
+ .magritte-animation-exit-left-active___AEGxY_9-0-8 .magritte-modal___RAW6S_9-0-8{
288
312
  opacity:0;
289
313
  transform:translateX(-100%);
290
314
  }
291
- .magritte-animation-exit-left-active___AEGxY_9-0-6 .magritte-modal___RAW6S_9-0-6,
292
- .magritte-animation-exit-left-active___AEGxY_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
315
+ .magritte-animation-exit-left-active___AEGxY_9-0-8 .magritte-modal___RAW6S_9-0-8,
316
+ .magritte-animation-exit-left-active___AEGxY_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
293
317
  transition-duration:var(--exit-animation-duration);
294
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
318
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
295
319
  }
296
- .magritte-animation-enter-right___2aXOm_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
320
+ .magritte-animation-enter-right___2aXOm_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
297
321
  opacity:0;
298
322
  }
299
- .magritte-animation-enter-right___2aXOm_9-0-6 .magritte-modal___RAW6S_9-0-6{
323
+ .magritte-animation-enter-right___2aXOm_9-0-8 .magritte-modal___RAW6S_9-0-8{
300
324
  opacity:0;
301
325
  transform:translateX(100%);
302
326
  }
303
- .magritte-animation-enter-right-active___8wX4-_9-0-6{
327
+ .magritte-animation-enter-right-active___8wX4-_9-0-8{
304
328
  --enter-animation-duration:0;
305
329
  --exit-animation-duration:0;
306
330
  }
307
331
  @media (prefers-reduced-motion: no-preference){
308
- .magritte-animation-enter-right-active___8wX4-_9-0-6{
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);
332
+ .magritte-animation-enter-right-active___8wX4-_9-0-8{
333
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
334
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
311
335
  }
312
336
  }
313
- .magritte-animation-enter-right-active___8wX4-_9-0-6 .magritte-modal___RAW6S_9-0-6,
314
- .magritte-animation-enter-right-active___8wX4-_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
337
+ .magritte-animation-enter-right-active___8wX4-_9-0-8 .magritte-modal___RAW6S_9-0-8,
338
+ .magritte-animation-enter-right-active___8wX4-_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
315
339
  opacity:1;
316
340
  transition-duration:var(--enter-animation-duration);
317
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v22-1-0);
341
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v23-0-0);
318
342
  transform:translateX(0);
319
343
  }
320
- .magritte-animation-exit-right___iczoc_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
344
+ .magritte-animation-exit-right___iczoc_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
321
345
  opacity:1;
322
346
  }
323
- .magritte-animation-exit-right___iczoc_9-0-6 .magritte-modal___RAW6S_9-0-6{
347
+ .magritte-animation-exit-right___iczoc_9-0-8 .magritte-modal___RAW6S_9-0-8{
324
348
  opacity:1;
325
349
  transform:translateX(0);
326
350
  }
327
- .magritte-animation-exit-right-active___eFS4O_9-0-6{
351
+ .magritte-animation-exit-right-active___eFS4O_9-0-8{
328
352
  --enter-animation-duration:0;
329
353
  --exit-animation-duration:0;
330
354
  }
331
355
  @media (prefers-reduced-motion: no-preference){
332
- .magritte-animation-exit-right-active___eFS4O_9-0-6{
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);
356
+ .magritte-animation-exit-right-active___eFS4O_9-0-8{
357
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v23-0-0);
358
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
335
359
  }
336
360
  }
337
- .magritte-animation-exit-right-active___eFS4O_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
361
+ .magritte-animation-exit-right-active___eFS4O_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
338
362
  opacity:0;
339
363
  }
340
- .magritte-animation-exit-right-active___eFS4O_9-0-6 .magritte-modal___RAW6S_9-0-6{
364
+ .magritte-animation-exit-right-active___eFS4O_9-0-8 .magritte-modal___RAW6S_9-0-8{
341
365
  opacity:0;
342
366
  transform:translateX(100%);
343
367
  }
344
- .magritte-animation-exit-right-active___eFS4O_9-0-6 .magritte-modal___RAW6S_9-0-6,
345
- .magritte-animation-exit-right-active___eFS4O_9-0-6.magritte-modal-overlay___lK22l_9-0-6{
368
+ .magritte-animation-exit-right-active___eFS4O_9-0-8 .magritte-modal___RAW6S_9-0-8,
369
+ .magritte-animation-exit-right-active___eFS4O_9-0-8.magritte-modal-overlay___lK22l_9-0-8{
346
370
  transition-duration:var(--exit-animation-duration);
347
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v22-1-0);
371
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
348
372
  }
349
- .magritte-content-scroll-preserver___Tw5Px_9-0-6{
373
+ .magritte-content-scroll-preserver___Tw5Px_9-0-8{
350
374
  width:100%;
351
375
  height:0;
352
376
  }
353
- .magritte-content-sticky-container___nqEXj_9-0-6{
377
+ .magritte-content-container___-ql3h_9-0-8{
378
+ height:100%;
379
+ max-width:calc(100% - 24px);
380
+ max-width:100cqw;
381
+ }
382
+ .magritte-content-sticky-container___nqEXj_9-0-8{
354
383
  position:sticky;
355
384
  top:0;
356
385
  min-height:100%;
386
+ max-width:calc(100% - 24px);
387
+ max-width:100cqw;
357
388
  }
358
- .magritte-content-sticky-container_full-height___Gl9x8_9-0-6{
389
+ .magritte-content-sticky-container_full-height___Gl9x8_9-0-8{
359
390
  display:flex;
360
391
  flex-direction:column;
361
392
  }
package/index.js CHANGED
@@ -13,7 +13,7 @@ import '@hh.ru/magritte-common-use-no-bubbling';
13
13
  import '@hh.ru/magritte-ui-action-bar';
14
14
  import '@hh.ru/magritte-ui-breakpoint';
15
15
  import '@hh.ru/magritte-ui-layer';
16
- import './ModalContentWithHeader-CCJOAtwT.js';
16
+ import './ModalContentWithHeader-BplZxF6y.js';
17
17
  import '@hh.ru/magritte-common-func-utils';
18
18
  import '@hh.ru/magritte-ui-divider';
19
19
  import './ModalHeader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-modal",
3
- "version": "9.0.6",
3
+ "version": "9.0.8",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -26,17 +26,17 @@
26
26
  "@hh.ru/magritte-common-modal-helper": "1.2.10",
27
27
  "@hh.ru/magritte-common-use-multiple-refs": "1.1.8",
28
28
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.5",
29
- "@hh.ru/magritte-design-tokens": "22.1.0",
29
+ "@hh.ru/magritte-design-tokens": "23.0.0",
30
30
  "@hh.ru/magritte-internal-layer-name": "3.0.2",
31
- "@hh.ru/magritte-ui-action-bar": "4.0.11",
31
+ "@hh.ru/magritte-ui-action-bar": "4.0.12",
32
32
  "@hh.ru/magritte-ui-breakpoint": "6.0.0",
33
- "@hh.ru/magritte-ui-divider": "3.0.0",
34
- "@hh.ru/magritte-ui-icon": "12.2.0",
33
+ "@hh.ru/magritte-ui-divider": "3.0.1",
34
+ "@hh.ru/magritte-ui-icon": "12.2.1",
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": "5.0.0",
38
- "@hh.ru/magritte-ui-title": "7.0.2",
39
- "@hh.ru/magritte-ui-tree-selector": "5.1.1"
37
+ "@hh.ru/magritte-ui-progress-bar": "5.0.1",
38
+ "@hh.ru/magritte-ui-title": "7.0.3",
39
+ "@hh.ru/magritte-ui-tree-selector": "5.1.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "classnames": ">=2.3.2",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "47439eecca7941fc790be441ba065be7824490bf"
50
+ "gitHead": "c3a9c9e1f9576575964829ed929e8039b5d37fbe"
51
51
  }