@hh.ru/magritte-ui-modal 4.2.2 → 4.3.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 +3 -1
- package/Modal.js.map +1 -1
- package/ModalContentWithHeader.js +1 -1
- package/ModalFooter.js +1 -1
- package/ModalHeader.js +1 -1
- package/index.css +38 -38
- package/index.js +1 -1
- package/modal-CMfWt49u.js +5 -0
- package/modal-CMfWt49u.js.map +1 -0
- package/package.json +3 -3
- package/modal-DW27gUbp.js +0 -5
- package/modal-DW27gUbp.js.map +0 -1
package/Modal.js
CHANGED
|
@@ -16,7 +16,7 @@ import { ModalContentWithHeader } from './ModalContentWithHeader.js';
|
|
|
16
16
|
import { ModalFooter } from './ModalFooter.js';
|
|
17
17
|
import { useModalOrder } from './useModalOrder.js';
|
|
18
18
|
import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
|
|
19
|
-
import { s as styles } from './modal-
|
|
19
|
+
import { s as styles } from './modal-CMfWt49u.js';
|
|
20
20
|
import '@hh.ru/magritte-common-func-utils';
|
|
21
21
|
import '@hh.ru/magritte-ui-divider';
|
|
22
22
|
import './ModalHeader.js';
|
|
@@ -116,6 +116,8 @@ const Modal = forwardRef(({ visible, size = 'medium', title, titleAlignment = 'l
|
|
|
116
116
|
};
|
|
117
117
|
const isModalFullHeight = isValidTreeSelectorWrapper(children);
|
|
118
118
|
return createPortal(jsx(CSSTransition, { appear: true, in: visible && !isServerEnv, nodeRef: overlayRef, onEntering: onEntering, onExited: onExited, classNames: {
|
|
119
|
+
appear: styles.modalAnimationEnter,
|
|
120
|
+
appearActive: styles.modalAnimationEnterActive,
|
|
119
121
|
enter: styles.modalAnimationEnter,
|
|
120
122
|
enterActive: styles.modalAnimationEnterActive,
|
|
121
123
|
exit: styles.modalAnimationExit,
|
package/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../src/Modal.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, useLayoutEffect, useRef, useState, useCallback, useId, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { CSSTransition } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useServerEnv } from '@hh.ru/magritte-common-is-server-env';\nimport { keyboardMatch, keyboardKeys } from '@hh.ru/magritte-common-keyboard';\nimport { disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { useBreakpoint, Breakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { ModalContentWithHeader } from '@hh.ru/magritte-ui-modal/ModalContentWithHeader';\nimport { ModalFooter } from '@hh.ru/magritte-ui-modal/ModalFooter';\nimport { ModalHeaderProps, ModalProps } from '@hh.ru/magritte-ui-modal/types';\nimport { useModalOrder } from '@hh.ru/magritte-ui-modal/useModalOrder';\nimport { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';\n\nimport styles from './modal.less';\n\nconst noop = () => undefined;\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst INVISIBLE_FOR_BREAKPOINTS = [Breakpoint.XS, Breakpoint.S];\n\nexport const Modal = forwardRef<\n HTMLDivElement,\n ModalProps &\n Omit<HTMLAttributes<HTMLDivElement>, keyof ModalProps | 'role' | 'tabindex' | 'className' | 'aria-labeledby'>\n>(\n (\n {\n visible,\n size = 'medium',\n title,\n titleAlignment = 'left',\n titleSize = 'large',\n titleMaxLines,\n titleElement = 'h2',\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n children,\n onClose = noop,\n leftButtons,\n rightButtons,\n headerImage,\n headerHeight,\n host,\n options,\n actions,\n actionLink,\n ...rest\n },\n ref\n ) => {\n const isServerEnv = useServerEnv();\n const enableScrollRef = useRef<() => void>();\n const [animationTimeout, setAnimationTimeout] = useState<{ enter: number; exit: number }>({\n enter: 0,\n exit: 0,\n });\n const labelId = useId();\n const additionalProps: { 'aria-labelledby'?: string } = {};\n if (title) {\n additionalProps['aria-labelledby'] = labelId;\n }\n const modalRef = useRef<HTMLDivElement>(null);\n const overlayRef = useRef<HTMLDivElement>(null);\n const modalRefCallback = useMultipleRefs(ref, modalRef);\n\n const onEntering = useCallback(() => {\n if (!enableScrollRef.current) {\n enableScrollRef.current = disableScroll();\n }\n if (modalRef.current && !modalRef.current.contains(document.activeElement)) {\n modalRef.current.focus();\n }\n }, []);\n const onExited = useCallback(() => {\n enableScrollRef.current?.();\n enableScrollRef.current = undefined;\n }, []);\n\n const [position, count] = useModalOrder(!!visible && !isServerEnv, modalRef);\n const isOverlayHidden = (position === 0 && count > 0) || (count > 1 && position > 1);\n\n const { breakpoint } = useBreakpoint();\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const currentBreakpointVisible = !INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint);\n if (!currentBreakpointVisible) {\n onExited();\n return;\n }\n\n onEntering();\n // visible не должно быть в зависимостях, т.к. этот эффект обрабатывает только изменение брейкпоинта\n // visible обрабатывается CSSTransition\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [breakpoint, onEntering, onExited]);\n\n useEffect(\n () => () => {\n enableScrollRef.current?.();\n enableScrollRef.current = undefined;\n },\n [visible]\n );\n\n useLayoutEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n setAnimationTimeout({\n enter: toNumber(style.getPropertyValue('--enter-animation-duration')),\n exit: toNumber(style.getPropertyValue('--exit-animation-duration')),\n });\n document.body.removeChild(animationTimeoutElement);\n }, [setAnimationTimeout]);\n\n const eventHandlers = useNoBubbling({\n onKeyDown: (event) => {\n if (keyboardMatch(event.nativeEvent as KeyboardEvent, keyboardKeys.Escape)) {\n onClose(event);\n }\n },\n });\n\n if (INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint) || isServerEnv) {\n return null;\n }\n\n const modalHeaderProps = {\n title,\n titleElement,\n titleAlignment,\n titleSize,\n titleMaxLines,\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n headerImage,\n headerHeight,\n options,\n actions,\n actionLink,\n } as ModalHeaderProps;\n\n const isModalFullHeight = isValidTreeSelectorWrapper(children);\n\n return createPortal(\n <CSSTransition\n appear\n in={visible && !isServerEnv}\n nodeRef={overlayRef}\n onEntering={onEntering}\n onExited={onExited}\n classNames={{\n enter: styles.modalAnimationEnter,\n enterActive: styles.modalAnimationEnterActive,\n exit: styles.modalAnimationExit,\n exitActive: styles.modalAnimationExitActive,\n }}\n timeout={animationTimeout}\n unmountOnExit\n >\n <Layer layer={InternalLayerName.Modal}>\n <div\n {...eventHandlers}\n ref={overlayRef}\n className={styles.modalOverlay}\n style={isOverlayHidden ? { backgroundColor: 'transparent' } : {}}\n data-qa=\"modal-overlay\"\n >\n <div\n {...rest}\n {...additionalProps}\n role=\"dialog\"\n className={classnames(styles.modal, {\n [styles.modalSmall]: size === 'small',\n [styles.modalFullHeight]: isModalFullHeight,\n })}\n ref={modalRefCallback}\n tabIndex={0}\n >\n <ModalContentWithHeader {...modalHeaderProps} labelId={labelId}>\n {children}\n </ModalContentWithHeader>\n <ModalFooter leftButtons={leftButtons} rightButtons={rightButtons} />\n </div>\n </div>\n </Layer>\n </CSSTransition>,\n host || document.body\n );\n }\n);\n\nModal.displayName = 'Modal';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC;AAE7B,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;IAC/B,MAAM,MAAM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,EACF,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,CAAC,EAAA,QAAA,EAAA,CAEXD,IAAC,sBAAsB,EAAA,EAAA,GAAK,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAA,QAAA,EACzD,QAAQ,EACY,CAAA,EACzBA,IAAC,WAAW,EAAA,EAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAI,CAAA,CAAA,EAAA,CACnE,GACJ,EACF,CAAA,EAAA,CACI,EAChB,IAAI,IAAI,QAAQ,CAAC,IAAI,CACxB,CAAC;AACN,CAAC,EACH;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../src/Modal.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, useLayoutEffect, useRef, useState, useCallback, useId, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { CSSTransition } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useServerEnv } from '@hh.ru/magritte-common-is-server-env';\nimport { keyboardMatch, keyboardKeys } from '@hh.ru/magritte-common-keyboard';\nimport { disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { useBreakpoint, Breakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { ModalContentWithHeader } from '@hh.ru/magritte-ui-modal/ModalContentWithHeader';\nimport { ModalFooter } from '@hh.ru/magritte-ui-modal/ModalFooter';\nimport { ModalHeaderProps, ModalProps } from '@hh.ru/magritte-ui-modal/types';\nimport { useModalOrder } from '@hh.ru/magritte-ui-modal/useModalOrder';\nimport { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';\n\nimport styles from './modal.less';\n\nconst noop = () => undefined;\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst INVISIBLE_FOR_BREAKPOINTS = [Breakpoint.XS, Breakpoint.S];\n\nexport const Modal = forwardRef<\n HTMLDivElement,\n ModalProps &\n Omit<HTMLAttributes<HTMLDivElement>, keyof ModalProps | 'role' | 'tabindex' | 'className' | 'aria-labeledby'>\n>(\n (\n {\n visible,\n size = 'medium',\n title,\n titleAlignment = 'left',\n titleSize = 'large',\n titleMaxLines,\n titleElement = 'h2',\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n children,\n onClose = noop,\n leftButtons,\n rightButtons,\n headerImage,\n headerHeight,\n host,\n options,\n actions,\n actionLink,\n ...rest\n },\n ref\n ) => {\n const isServerEnv = useServerEnv();\n const enableScrollRef = useRef<() => void>();\n const [animationTimeout, setAnimationTimeout] = useState<{ enter: number; exit: number }>({\n enter: 0,\n exit: 0,\n });\n const labelId = useId();\n const additionalProps: { 'aria-labelledby'?: string } = {};\n if (title) {\n additionalProps['aria-labelledby'] = labelId;\n }\n const modalRef = useRef<HTMLDivElement>(null);\n const overlayRef = useRef<HTMLDivElement>(null);\n const modalRefCallback = useMultipleRefs(ref, modalRef);\n\n const onEntering = useCallback(() => {\n if (!enableScrollRef.current) {\n enableScrollRef.current = disableScroll();\n }\n if (modalRef.current && !modalRef.current.contains(document.activeElement)) {\n modalRef.current.focus();\n }\n }, []);\n const onExited = useCallback(() => {\n enableScrollRef.current?.();\n enableScrollRef.current = undefined;\n }, []);\n\n const [position, count] = useModalOrder(!!visible && !isServerEnv, modalRef);\n const isOverlayHidden = (position === 0 && count > 0) || (count > 1 && position > 1);\n\n const { breakpoint } = useBreakpoint();\n useEffect(() => {\n if (!visible) {\n return;\n }\n\n const currentBreakpointVisible = !INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint);\n if (!currentBreakpointVisible) {\n onExited();\n return;\n }\n\n onEntering();\n // visible не должно быть в зависимостях, т.к. этот эффект обрабатывает только изменение брейкпоинта\n // visible обрабатывается CSSTransition\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [breakpoint, onEntering, onExited]);\n\n useEffect(\n () => () => {\n enableScrollRef.current?.();\n enableScrollRef.current = undefined;\n },\n [visible]\n );\n\n useLayoutEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n setAnimationTimeout({\n enter: toNumber(style.getPropertyValue('--enter-animation-duration')),\n exit: toNumber(style.getPropertyValue('--exit-animation-duration')),\n });\n document.body.removeChild(animationTimeoutElement);\n }, [setAnimationTimeout]);\n\n const eventHandlers = useNoBubbling({\n onKeyDown: (event) => {\n if (keyboardMatch(event.nativeEvent as KeyboardEvent, keyboardKeys.Escape)) {\n onClose(event);\n }\n },\n });\n\n if (INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint) || isServerEnv) {\n return null;\n }\n\n const modalHeaderProps = {\n title,\n titleElement,\n titleAlignment,\n titleSize,\n titleMaxLines,\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n headerImage,\n headerHeight,\n options,\n actions,\n actionLink,\n } as ModalHeaderProps;\n\n const isModalFullHeight = isValidTreeSelectorWrapper(children);\n\n return createPortal(\n <CSSTransition\n appear\n in={visible && !isServerEnv}\n nodeRef={overlayRef}\n onEntering={onEntering}\n onExited={onExited}\n classNames={{\n appear: styles.modalAnimationEnter,\n appearActive: styles.modalAnimationEnterActive,\n enter: styles.modalAnimationEnter,\n enterActive: styles.modalAnimationEnterActive,\n exit: styles.modalAnimationExit,\n exitActive: styles.modalAnimationExitActive,\n }}\n timeout={animationTimeout}\n unmountOnExit\n >\n <Layer layer={InternalLayerName.Modal}>\n <div\n {...eventHandlers}\n ref={overlayRef}\n className={styles.modalOverlay}\n style={isOverlayHidden ? { backgroundColor: 'transparent' } : {}}\n data-qa=\"modal-overlay\"\n >\n <div\n {...rest}\n {...additionalProps}\n role=\"dialog\"\n className={classnames(styles.modal, {\n [styles.modalSmall]: size === 'small',\n [styles.modalFullHeight]: isModalFullHeight,\n })}\n ref={modalRefCallback}\n tabIndex={0}\n >\n <ModalContentWithHeader {...modalHeaderProps} labelId={labelId}>\n {children}\n </ModalContentWithHeader>\n <ModalFooter leftButtons={leftButtons} rightButtons={rightButtons} />\n </div>\n </div>\n </Layer>\n </CSSTransition>,\n host || document.body\n );\n }\n);\n\nModal.displayName = 'Modal';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC;AAE7B,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;IAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACnC,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,UAAU,CAK3B,CACI,EACI,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,KAAK,EACL,cAAc,GAAG,MAAM,EACvB,SAAS,GAAG,OAAO,EACnB,aAAa,EACb,YAAY,GAAG,IAAI,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,qBAAqB,EACrB,QAAQ,EACR,OAAO,GAAG,IAAI,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,GAAG,IAAI,EACV,EACD,GAAG,KACH;AACA,IAAA,MAAM,WAAW,GAAG,YAAY,EAAE,CAAC;AACnC,IAAA,MAAM,eAAe,GAAG,MAAM,EAAc,CAAC;A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,QAAA,EAEbA,GAAC,CAAA,KAAK,EAAC,EAAA,KAAK,EAAE,iBAAiB,CAAC,KAAK,EACjC,QAAA,EAAAA,GAAA,CAAA,KAAA,EAAA,EAAA,GACQ,aAAa,EACjB,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,KAAK,EAAE,eAAe,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,EACxD,SAAA,EAAA,eAAe,EAEvB,QAAA,EAAAC,IAAA,CAAA,KAAA,EAAA,EAAA,GACQ,IAAI,EAAA,GACJ,eAAe,EACnB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE;AAChC,wBAAA,CAAC,MAAM,CAAC,UAAU,GAAG,IAAI,KAAK,OAAO;AACrC,wBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,iBAAiB;AAC9C,qBAAA,CAAC,EACF,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,CAAC,EAAA,QAAA,EAAA,CAEXD,IAAC,sBAAsB,EAAA,EAAA,GAAK,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAA,QAAA,EACzD,QAAQ,EACY,CAAA,EACzBA,IAAC,WAAW,EAAA,EAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAI,CAAA,CAAA,EAAA,CACnE,GACJ,EACF,CAAA,EAAA,CACI,EAChB,IAAI,IAAI,QAAQ,CAAC,IAAI,CACxB,CAAC;AACN,CAAC,EACH;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
@@ -5,7 +5,7 @@ import classnames from 'classnames';
|
|
|
5
5
|
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
|
-
import { s as styles } from './modal-
|
|
8
|
+
import { s as styles } from './modal-CMfWt49u.js';
|
|
9
9
|
import '@hh.ru/magritte-ui-title';
|
|
10
10
|
|
|
11
11
|
const checkIsScrolledToBottom = (el) => {
|
package/ModalFooter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { s as styles } from './modal-
|
|
3
|
+
import { s as styles } from './modal-CMfWt49u.js';
|
|
4
4
|
|
|
5
5
|
const ModalFooter = ({ leftButtons, rightButtons }) => {
|
|
6
6
|
if (!leftButtons && !rightButtons) {
|
package/ModalHeader.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Title } from '@hh.ru/magritte-ui-title';
|
|
5
5
|
|
|
6
|
-
var styles = {"wrapper":"magritte-wrapper___zH8vB_4-
|
|
6
|
+
var styles = {"wrapper":"magritte-wrapper___zH8vB_4-3-0","content":"magritte-content___o6ktq_4-3-0","options":"magritte-options___qfErQ_4-3-0","content-with-image":"magritte-content-with-image___YarBO_4-3-0","contentWithImage":"magritte-content-with-image___YarBO_4-3-0","actions":"magritte-actions___nQILV_4-3-0","actions-with-link":"magritte-actions-with-link___hnDux_4-3-0","actionsWithLink":"magritte-actions-with-link___hnDux_4-3-0","actions-single":"magritte-actions-single___usfKu_4-3-0","actionsSingle":"magritte-actions-single___usfKu_4-3-0"};
|
|
7
7
|
|
|
8
8
|
const ModalHeader = ({ title, headerImage, headerHeight = 0, titleAlignment, titleElement, titleMaxLines, titleSize, titleDescription, titleDescriptionMaxLines, titleStyle, titleDescriptionStyle, options, actions: _actions, actionLink, labelId, }) => {
|
|
9
9
|
const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;
|
package/index.css
CHANGED
|
@@ -10,30 +10,30 @@
|
|
|
10
10
|
--magritte-color-component-modal-background-action-v18-3-0:#20262b99;
|
|
11
11
|
--magritte-gradient-component-modal-background-fade-v18-3-0:linear-gradient(180deg, #00000000 0%, #0000007a 100%);
|
|
12
12
|
}
|
|
13
|
-
.magritte-wrapper___zH8vB_4-
|
|
13
|
+
.magritte-wrapper___zH8vB_4-3-0{
|
|
14
14
|
margin-bottom:32px;
|
|
15
15
|
}
|
|
16
|
-
.magritte-content___o6ktq_4-
|
|
16
|
+
.magritte-content___o6ktq_4-3-0{
|
|
17
17
|
display:flex;
|
|
18
18
|
align-items:flex-start;
|
|
19
19
|
}
|
|
20
|
-
.magritte-content___o6ktq_4-
|
|
20
|
+
.magritte-content___o6ktq_4-3-0 + .magritte-options___qfErQ_4-3-0{
|
|
21
21
|
margin-top:24px;
|
|
22
22
|
}
|
|
23
|
-
.magritte-content___o6ktq_4-
|
|
23
|
+
.magritte-content___o6ktq_4-3-0.magritte-content-with-image___YarBO_4-3-0 + .magritte-options___qfErQ_4-3-0{
|
|
24
24
|
margin-top:32px;
|
|
25
25
|
}
|
|
26
|
-
.magritte-actions___nQILV_4-
|
|
26
|
+
.magritte-actions___nQILV_4-3-0{
|
|
27
27
|
display:flex;
|
|
28
28
|
padding-left:16px;
|
|
29
29
|
gap:4px;
|
|
30
30
|
margin-left:auto;
|
|
31
31
|
--magritte-ui-link-padding-override:9px;
|
|
32
32
|
}
|
|
33
|
-
.magritte-actions-with-link___hnDux_4-
|
|
33
|
+
.magritte-actions-with-link___hnDux_4-3-0{
|
|
34
34
|
padding:0 8px 0 28px;
|
|
35
35
|
}
|
|
36
|
-
.magritte-content-with-image___YarBO_4-
|
|
36
|
+
.magritte-content-with-image___YarBO_4-3-0{
|
|
37
37
|
flex-direction:column;
|
|
38
38
|
justify-content:flex-end;
|
|
39
39
|
margin:-20px -20px 0;
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
padding:12px 24px 24px;
|
|
44
44
|
box-sizing:border-box;
|
|
45
45
|
}
|
|
46
|
-
.magritte-content-with-image___YarBO_4-
|
|
46
|
+
.magritte-content-with-image___YarBO_4-3-0 .magritte-actions___nQILV_4-3-0{
|
|
47
47
|
order:-1;
|
|
48
48
|
gap:0;
|
|
49
49
|
margin-right:-12px;
|
|
50
50
|
margin-bottom:auto;
|
|
51
51
|
}
|
|
52
|
-
.magritte-content-with-image___YarBO_4-
|
|
52
|
+
.magritte-content-with-image___YarBO_4-3-0 .magritte-actions___nQILV_4-3-0:not(.magritte-actions-with-link___hnDux_4-3-0){
|
|
53
53
|
padding:0 4px;
|
|
54
54
|
background-color:var(--magritte-color-component-modal-background-action-v18-3-0);
|
|
55
55
|
border-radius:var(--magritte-static-border-radius-300-v18-3-0);
|
|
56
56
|
}
|
|
57
|
-
.magritte-content-with-image___YarBO_4-
|
|
57
|
+
.magritte-content-with-image___YarBO_4-3-0 .magritte-actions___nQILV_4-3-0.magritte-actions-single___usfKu_4-3-0:not(.magritte-actions-with-link___hnDux_4-3-0){
|
|
58
58
|
padding:0;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
--magritte-color-background-overlay-v18-3-0:#20262b99;
|
|
74
74
|
--magritte-color-component-modal-background-content-v18-3-0:#1B1B1B;
|
|
75
75
|
}
|
|
76
|
-
.magritte-modal-overlay___lK22l_4-
|
|
76
|
+
.magritte-modal-overlay___lK22l_4-3-0{
|
|
77
77
|
position:fixed;
|
|
78
78
|
top:0;
|
|
79
79
|
right:0;
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
z-index:1;
|
|
87
87
|
user-select:text;
|
|
88
88
|
}
|
|
89
|
-
.magritte-modal___RAW6S_4-
|
|
89
|
+
.magritte-modal___RAW6S_4-3-0{
|
|
90
90
|
display:flex;
|
|
91
91
|
box-sizing:border-box;
|
|
92
92
|
width:720px;
|
|
@@ -99,92 +99,92 @@
|
|
|
99
99
|
border-radius:var(--magritte-static-border-radius-800-v18-3-0);
|
|
100
100
|
overflow:hidden;
|
|
101
101
|
}
|
|
102
|
-
.magritte-modal-small___MMQT4_4-
|
|
102
|
+
.magritte-modal-small___MMQT4_4-3-0{
|
|
103
103
|
width:460px;
|
|
104
104
|
}
|
|
105
|
-
.magritte-modal-full-height___gIM4E_4-
|
|
105
|
+
.magritte-modal-full-height___gIM4E_4-3-0{
|
|
106
106
|
height:100%;
|
|
107
107
|
}
|
|
108
|
-
.magritte-modal-content___46QFS_4-
|
|
108
|
+
.magritte-modal-content___46QFS_4-3-0{
|
|
109
109
|
flex:1 1;
|
|
110
110
|
overflow-y:auto;
|
|
111
111
|
padding:0 5px;
|
|
112
112
|
margin:0 -5px;
|
|
113
113
|
overscroll-behavior:none;
|
|
114
114
|
}
|
|
115
|
-
.magritte-modal-content__with-divider___an3I5_4-
|
|
115
|
+
.magritte-modal-content__with-divider___an3I5_4-3-0{
|
|
116
116
|
margin-top:-16px;
|
|
117
117
|
}
|
|
118
|
-
.magritte-modal-content-wrapper___23XFT_4-
|
|
118
|
+
.magritte-modal-content-wrapper___23XFT_4-3-0{
|
|
119
119
|
display:flex;
|
|
120
120
|
flex-direction:column;
|
|
121
121
|
min-height:0;
|
|
122
122
|
flex:1 1;
|
|
123
123
|
}
|
|
124
|
-
.magritte-modal-content-wrapper__one-line___tYg8d_4-
|
|
124
|
+
.magritte-modal-content-wrapper__one-line___tYg8d_4-3-0{
|
|
125
125
|
flex-direction:row-reverse;
|
|
126
126
|
}
|
|
127
|
-
.magritte-divider-container___qP3VK_4-
|
|
127
|
+
.magritte-divider-container___qP3VK_4-3-0{
|
|
128
128
|
margin:0 -32px;
|
|
129
129
|
}
|
|
130
|
-
.magritte-divider-container___qP3VK_4-
|
|
130
|
+
.magritte-divider-container___qP3VK_4-3-0.magritte-divider-container-hidden___EIxB-_4-3-0{
|
|
131
131
|
display:none;
|
|
132
132
|
}
|
|
133
|
-
.magritte-modal-footer___8xPqQ_4-
|
|
133
|
+
.magritte-modal-footer___8xPqQ_4-3-0{
|
|
134
134
|
flex:0 0;
|
|
135
135
|
padding-top:32px;
|
|
136
136
|
display:flex;
|
|
137
137
|
justify-content:space-between;
|
|
138
138
|
}
|
|
139
|
-
.magritte-modal-buttons-container___1O1Nr_4-
|
|
139
|
+
.magritte-modal-buttons-container___1O1Nr_4-3-0{
|
|
140
140
|
display:flex;
|
|
141
141
|
gap:12px;
|
|
142
142
|
}
|
|
143
|
-
.magritte-animation-timeout___w-j7K_4-
|
|
144
|
-
.magritte-modal-animation-enter-active___E8KLu_4-
|
|
145
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
143
|
+
.magritte-animation-timeout___w-j7K_4-3-0,
|
|
144
|
+
.magritte-modal-animation-enter-active___E8KLu_4-3-0,
|
|
145
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0{
|
|
146
146
|
--enter-animation-duration:0;
|
|
147
147
|
--exit-animation-duration:0;
|
|
148
148
|
}
|
|
149
149
|
@media (prefers-reduced-motion: no-preference){
|
|
150
|
-
.magritte-animation-timeout___w-j7K_4-
|
|
151
|
-
.magritte-modal-animation-enter-active___E8KLu_4-
|
|
152
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
150
|
+
.magritte-animation-timeout___w-j7K_4-3-0,
|
|
151
|
+
.magritte-modal-animation-enter-active___E8KLu_4-3-0,
|
|
152
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0{
|
|
153
153
|
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v18-3-0);
|
|
154
154
|
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v18-3-0);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
.magritte-modal-animation-enter___kruLO_4-
|
|
157
|
+
.magritte-modal-animation-enter___kruLO_4-3-0.magritte-modal-overlay___lK22l_4-3-0{
|
|
158
158
|
opacity:0;
|
|
159
159
|
}
|
|
160
|
-
.magritte-modal-animation-enter___kruLO_4-
|
|
160
|
+
.magritte-modal-animation-enter___kruLO_4-3-0 .magritte-modal___RAW6S_4-3-0{
|
|
161
161
|
opacity:0;
|
|
162
162
|
transform:scale(0.96);
|
|
163
163
|
}
|
|
164
|
-
.magritte-modal-animation-enter-active___E8KLu_4-
|
|
165
|
-
.magritte-modal-animation-enter-active___E8KLu_4-
|
|
164
|
+
.magritte-modal-animation-enter-active___E8KLu_4-3-0 .magritte-modal___RAW6S_4-3-0,
|
|
165
|
+
.magritte-modal-animation-enter-active___E8KLu_4-3-0.magritte-modal-overlay___lK22l_4-3-0{
|
|
166
166
|
opacity:1;
|
|
167
167
|
transform:scale(1);
|
|
168
168
|
transition-property:opacity, transform;
|
|
169
169
|
transition-duration:var(--enter-animation-duration);
|
|
170
170
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v18-3-0);
|
|
171
171
|
}
|
|
172
|
-
.magritte-modal-animation-exit___0jNgl_4-
|
|
172
|
+
.magritte-modal-animation-exit___0jNgl_4-3-0.magritte-modal-overlay___lK22l_4-3-0{
|
|
173
173
|
opacity:1;
|
|
174
174
|
}
|
|
175
|
-
.magritte-modal-animation-exit___0jNgl_4-
|
|
175
|
+
.magritte-modal-animation-exit___0jNgl_4-3-0 .magritte-modal___RAW6S_4-3-0{
|
|
176
176
|
opacity:1;
|
|
177
177
|
transform:scale(1);
|
|
178
178
|
}
|
|
179
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
179
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0.magritte-modal-overlay___lK22l_4-3-0{
|
|
180
180
|
opacity:0;
|
|
181
181
|
}
|
|
182
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
182
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0 .magritte-modal___RAW6S_4-3-0{
|
|
183
183
|
opacity:0;
|
|
184
184
|
transform:scale(0.96);
|
|
185
185
|
}
|
|
186
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
187
|
-
.magritte-modal-animation-exit-active___ERjKa_4-
|
|
186
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0 .magritte-modal___RAW6S_4-3-0,
|
|
187
|
+
.magritte-modal-animation-exit-active___ERjKa_4-3-0.magritte-modal-overlay___lK22l_4-3-0{
|
|
188
188
|
transition-property:opacity, transform;
|
|
189
189
|
transition-duration:var(--exit-animation-duration);
|
|
190
190
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-0);
|
package/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import '@hh.ru/magritte-common-func-utils';
|
|
|
19
19
|
import '@hh.ru/magritte-ui-divider';
|
|
20
20
|
import './ModalHeader.js';
|
|
21
21
|
import '@hh.ru/magritte-ui-title';
|
|
22
|
-
import './modal-
|
|
22
|
+
import './modal-CMfWt49u.js';
|
|
23
23
|
import './ModalFooter.js';
|
|
24
24
|
import './useModalOrder.js';
|
|
25
25
|
import '@hh.ru/magritte-common-dom-storage';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_4-3-0","modalOverlay":"magritte-modal-overlay___lK22l_4-3-0","modal":"magritte-modal___RAW6S_4-3-0","modal-small":"magritte-modal-small___MMQT4_4-3-0","modalSmall":"magritte-modal-small___MMQT4_4-3-0","modal-full-height":"magritte-modal-full-height___gIM4E_4-3-0","modalFullHeight":"magritte-modal-full-height___gIM4E_4-3-0","modal-content":"magritte-modal-content___46QFS_4-3-0","modalContent":"magritte-modal-content___46QFS_4-3-0","modal-content__with-divider":"magritte-modal-content__with-divider___an3I5_4-3-0","modalContentWithDivider":"magritte-modal-content__with-divider___an3I5_4-3-0","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_4-3-0","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_4-3-0","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_4-3-0","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_4-3-0","divider-container":"magritte-divider-container___qP3VK_4-3-0","dividerContainer":"magritte-divider-container___qP3VK_4-3-0","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_4-3-0","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_4-3-0","modal-footer":"magritte-modal-footer___8xPqQ_4-3-0","modalFooter":"magritte-modal-footer___8xPqQ_4-3-0","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_4-3-0","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_4-3-0","animation-timeout":"magritte-animation-timeout___w-j7K_4-3-0","animationTimeout":"magritte-animation-timeout___w-j7K_4-3-0","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_4-3-0","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_4-3-0","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_4-3-0","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_4-3-0","modal-animation-enter":"magritte-modal-animation-enter___kruLO_4-3-0","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_4-3-0","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_4-3-0","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_4-3-0"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=modal-CMfWt49u.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-CMfWt49u.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-modal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@hh.ru/magritte-ui-mock-component": "1.0.11",
|
|
38
38
|
"@hh.ru/magritte-ui-theme-provider": "1.1.26",
|
|
39
39
|
"@hh.ru/magritte-ui-title": "5.0.4",
|
|
40
|
-
"@hh.ru/magritte-ui-tree-selector": "4.
|
|
40
|
+
"@hh.ru/magritte-ui-tree-selector": "4.3.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"classnames": ">=2.3.2",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "accb349c42ac7386f74f74fe7bcfa377724572ed"
|
|
52
52
|
}
|
package/modal-DW27gUbp.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"modal-overlay":"magritte-modal-overlay___lK22l_4-2-2","modalOverlay":"magritte-modal-overlay___lK22l_4-2-2","modal":"magritte-modal___RAW6S_4-2-2","modal-small":"magritte-modal-small___MMQT4_4-2-2","modalSmall":"magritte-modal-small___MMQT4_4-2-2","modal-full-height":"magritte-modal-full-height___gIM4E_4-2-2","modalFullHeight":"magritte-modal-full-height___gIM4E_4-2-2","modal-content":"magritte-modal-content___46QFS_4-2-2","modalContent":"magritte-modal-content___46QFS_4-2-2","modal-content__with-divider":"magritte-modal-content__with-divider___an3I5_4-2-2","modalContentWithDivider":"magritte-modal-content__with-divider___an3I5_4-2-2","modal-content-wrapper":"magritte-modal-content-wrapper___23XFT_4-2-2","modalContentWrapper":"magritte-modal-content-wrapper___23XFT_4-2-2","modal-content-wrapper__one-line":"magritte-modal-content-wrapper__one-line___tYg8d_4-2-2","modalContentWrapperOneLine":"magritte-modal-content-wrapper__one-line___tYg8d_4-2-2","divider-container":"magritte-divider-container___qP3VK_4-2-2","dividerContainer":"magritte-divider-container___qP3VK_4-2-2","divider-container-hidden":"magritte-divider-container-hidden___EIxB-_4-2-2","dividerContainerHidden":"magritte-divider-container-hidden___EIxB-_4-2-2","modal-footer":"magritte-modal-footer___8xPqQ_4-2-2","modalFooter":"magritte-modal-footer___8xPqQ_4-2-2","modal-buttons-container":"magritte-modal-buttons-container___1O1Nr_4-2-2","modalButtonsContainer":"magritte-modal-buttons-container___1O1Nr_4-2-2","animation-timeout":"magritte-animation-timeout___w-j7K_4-2-2","animationTimeout":"magritte-animation-timeout___w-j7K_4-2-2","modal-animation-enter-active":"magritte-modal-animation-enter-active___E8KLu_4-2-2","modalAnimationEnterActive":"magritte-modal-animation-enter-active___E8KLu_4-2-2","modal-animation-exit-active":"magritte-modal-animation-exit-active___ERjKa_4-2-2","modalAnimationExitActive":"magritte-modal-animation-exit-active___ERjKa_4-2-2","modal-animation-enter":"magritte-modal-animation-enter___kruLO_4-2-2","modalAnimationEnter":"magritte-modal-animation-enter___kruLO_4-2-2","modal-animation-exit":"magritte-modal-animation-exit___0jNgl_4-2-2","modalAnimationExit":"magritte-modal-animation-exit___0jNgl_4-2-2"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=modal-DW27gUbp.js.map
|
package/modal-DW27gUbp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal-DW27gUbp.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|