@hh.ru/magritte-ui-alert 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Alert.js +2 -2
- package/Alert.js.map +1 -1
- package/index.css +113 -113
- package/package.json +4 -4
package/Alert.js
CHANGED
|
@@ -12,7 +12,7 @@ import { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';
|
|
|
12
12
|
import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
|
|
13
13
|
import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
14
14
|
|
|
15
|
-
var styles = {"animation-timeout":"magritte-animation-timeout___cwIwT_1-3-
|
|
15
|
+
var styles = {"animation-timeout":"magritte-animation-timeout___cwIwT_1-3-9","animationTimeout":"magritte-animation-timeout___cwIwT_1-3-9","enter-animation-active":"magritte-enter-animation-active___Qti02_1-3-9","enterAnimationActive":"magritte-enter-animation-active___Qti02_1-3-9","exit-animation-active":"magritte-exit-animation-active___deHqY_1-3-9","exitAnimationActive":"magritte-exit-animation-active___deHqY_1-3-9","opacity-animation":"magritte-opacity-animation___m7RYi_1-3-9","opacityAnimation":"magritte-opacity-animation___m7RYi_1-3-9","enter-animation":"magritte-enter-animation___CbUHN_1-3-9","enterAnimation":"magritte-enter-animation___CbUHN_1-3-9","exit-animation":"magritte-exit-animation___d2AJ4_1-3-9","exitAnimation":"magritte-exit-animation___d2AJ4_1-3-9","overlay":"magritte-overlay___hMlKJ_1-3-9","mobile-container":"magritte-mobile-container___dQRCl_1-3-9","mobileContainer":"magritte-mobile-container___dQRCl_1-3-9","desktop-container":"magritte-desktop-container___26vkq_1-3-9","desktopContainer":"magritte-desktop-container___26vkq_1-3-9","main":"magritte-main___iCU-E_1-3-9","icon":"magritte-icon___fLpa-_1-3-9","icon_neutral":"magritte-icon_neutral___Jyl3l_1-3-9","iconNeutral":"magritte-icon_neutral___Jyl3l_1-3-9","icon_accent":"magritte-icon_accent___Nn-T1_1-3-9","iconAccent":"magritte-icon_accent___Nn-T1_1-3-9","icon_positive":"magritte-icon_positive___OU9Zu_1-3-9","iconPositive":"magritte-icon_positive___OU9Zu_1-3-9","icon_warning":"magritte-icon_warning___7BbUi_1-3-9","iconWarning":"magritte-icon_warning___7BbUi_1-3-9","icon_negative":"magritte-icon_negative___s0OA8_1-3-9","iconNegative":"magritte-icon_negative___s0OA8_1-3-9","title":"magritte-title___yG219_1-3-9","description":"magritte-description___KeNoT_1-3-9","buttons":"magritte-buttons___lyxBC_1-3-9","buttons_vertical":"magritte-buttons_vertical___8lPCo_1-3-9","buttonsVertical":"magritte-buttons_vertical___8lPCo_1-3-9"};
|
|
16
16
|
|
|
17
17
|
const OPACITY_ANIMATION_CLASSES = {
|
|
18
18
|
enter: classnames(styles.opacityAnimation, styles.enterAnimation),
|
|
@@ -104,7 +104,7 @@ const Alert = ({ iconStyle = 'neutral', layout, icon, title, description, button
|
|
|
104
104
|
if (!animationTimeout || isServerEnv) {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
|
-
const content = (jsxs(Fragment, { children: [jsxs("div", { className: styles.main, children: [icon && (jsx("div", { className: classnames(styles.icon, { [styles[`icon_${iconStyle}`]]: iconStyle }), children: icon })), jsx("div", { className: styles.title, children: title }), description && jsx("div", { className: styles.description, children: description })] }), jsx("div", { className: classnames(styles.buttons, { [styles[`buttons_${layout}`]]: layout }), children: buttons })] }));
|
|
107
|
+
const content = (jsxs(Fragment, { children: [jsxs("div", { className: styles.main, "data-qa": "magritte-alert", children: [icon && (jsx("div", { className: classnames(styles.icon, { [styles[`icon_${iconStyle}`]]: iconStyle }), children: icon })), jsx("div", { className: styles.title, children: title }), description && jsx("div", { className: styles.description, children: description })] }), jsx("div", { className: classnames(styles.buttons, { [styles[`buttons_${layout}`]]: layout }), children: buttons })] }));
|
|
108
108
|
if (isMobile) {
|
|
109
109
|
return createPortal(jsxs(Fragment, { children: [jsx(OpacityAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef) => (jsx(Layer, { layer: InternalLayerName.BottomSheet, children: jsx("div", { className: classnames(styles.overlay, styles.animationTimeout), onClick: onClose, ref: animatedElementRef }) })) }), jsx(TransformAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef, props) => (jsx(Layer, { layer: InternalLayerName.BottomSheet, children: jsx("div", { ...props, className: classnames(styles.mobileContainer, styles.animationTimeout), ref: animatedElementRef, children: content }) })), onClose: onClose })] }), document.body);
|
|
110
110
|
}
|
package/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../src/Alert.tsx"],"sourcesContent":["import { FC, Fragment, ReactElement, RefObject, TouchEventHandler, useEffect, useRef, useState } 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 { disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useCloseByClickOutside } from '@hh.ru/magritte-common-mouse';\nimport { SwipeEvent, useSwipe } from '@hh.ru/magritte-common-use-swipe';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { AlertProps } from '@hh.ru/magritte-ui-alert/types';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\n\nimport styles from './alert.less';\n\ntype AnimationTimeout = { enter: number; exit: number };\n\ntype AnimationComponentProps = {\n animationTimeout: AnimationTimeout;\n visible: boolean;\n render: (animatedElementRef: RefObject<HTMLDivElement>, props?: JSX.IntrinsicElements['div']) => ReactElement;\n};\n\nconst OPACITY_ANIMATION_CLASSES = {\n enter: classnames(styles.opacityAnimation, styles.enterAnimation),\n enterActive: classnames(styles.enterAnimationActive, styles.opacityAnimation),\n exit: classnames(styles.opacityAnimation, styles.exitAnimation),\n exitActive: classnames(styles.exitAnimationActive, styles.opacityAnimation),\n};\n\nconst TRANSFORM_ANIMATION_CLASSES = {\n enterActive: styles.enterAnimationActive,\n exitActive: styles.exitAnimationActive,\n};\n\nconst VIEWPORT_HEIGHT = (typeof window !== 'undefined' ? window.visualViewport?.height : null) ?? 0;\nconst SWIPE_THRESHOLD_REF = { current: { max: Math.round(VIEWPORT_HEIGHT * 0.8) } };\n\nconst toInteger = (value: string) => {\n const result = parseInt(value, 10);\n return !Number.isNaN(result) ? result : 0;\n};\n\nconst withStopPropagation = (handler?: TouchEventHandler): TouchEventHandler => {\n return (event) => {\n event.stopPropagation();\n handler?.(event);\n };\n};\n\nexport const OpacityAnimation: FC<AnimationComponentProps> = ({ animationTimeout, visible, render }) => {\n const animatedElementRef = useRef<HTMLDivElement | null>(null);\n\n return (\n <CSSTransition\n appear\n classNames={OPACITY_ANIMATION_CLASSES}\n in={visible}\n mountOnEnter\n nodeRef={animatedElementRef}\n timeout={animationTimeout}\n unmountOnExit\n >\n {render(animatedElementRef)}\n </CSSTransition>\n );\n};\n\nexport const TransformAnimation: FC<AnimationComponentProps & { onClose: VoidFunction }> = ({\n animationTimeout,\n visible,\n render,\n onClose,\n}) => {\n const animatedElementRef = useRef<HTMLDivElement | null>(null);\n const swipeOffsetRef = useRef(0);\n\n const runTranslateYAnimation = () => {\n if (animatedElementRef.current !== null && visualViewport !== null) {\n animatedElementRef.current.style.transform = `translateY(${\n visualViewport.height + swipeOffsetRef.current - animatedElementRef.current.getBoundingClientRect().top\n }px)`;\n }\n };\n\n const resetTranslateY = () => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(${swipeOffsetRef.current}px)`;\n }\n };\n\n const resetSwipeOffset = () => {\n swipeOffsetRef.current = 0;\n };\n\n const swipeHandlers = useSwipe({\n thresholdYRef: SWIPE_THRESHOLD_REF,\n onSwipeMove: (event: SwipeEvent) => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(${Math.max(event.distanceY, 0)}px)`;\n }\n },\n onSwipeEnd: (event: SwipeEvent) => {\n swipeOffsetRef.current = event.distanceY;\n onClose();\n },\n onSwipeCancel: () => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(0px)`;\n }\n },\n });\n\n return (\n <CSSTransition\n appear\n classNames={TRANSFORM_ANIMATION_CLASSES}\n in={visible}\n mountOnEnter\n nodeRef={animatedElementRef}\n onEnter={runTranslateYAnimation}\n onEntering={resetTranslateY}\n onExit={resetTranslateY}\n onExiting={runTranslateYAnimation}\n onExited={resetSwipeOffset}\n timeout={animationTimeout}\n unmountOnExit\n >\n {render(animatedElementRef, {\n ...swipeHandlers,\n onTouchStart: withStopPropagation(swipeHandlers.onTouchStart),\n onTouchMove: withStopPropagation(swipeHandlers.onTouchMove),\n })}\n </CSSTransition>\n );\n};\n\nexport const Alert: FC<AlertProps> = ({\n iconStyle = 'neutral',\n layout,\n icon,\n title,\n description,\n buttons,\n visible,\n onClose,\n}) => {\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const clickElementRef = useRef<HTMLDivElement | null>(null);\n const { isMobile } = useBreakpoint();\n const isServerEnv = useServerEnv();\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const enter = toInteger(style.getPropertyValue('--enter-animation-duration'));\n const exit = toInteger(style.getPropertyValue('--exit-animation-duration'));\n setAnimationTimeout({ enter, exit });\n document.body.removeChild(animationTimeoutElement);\n }, [setAnimationTimeout]);\n\n useEffect(() => {\n if (visible) {\n return disableScroll();\n }\n\n return void 0;\n }, [visible]);\n\n useCloseByClickOutside(clickElementRef, onClose, visible);\n\n if (!animationTimeout || isServerEnv) {\n return null;\n }\n\n const content = (\n <Fragment>\n <div className={styles.main}>\n {icon && (\n <div className={classnames(styles.icon, { [styles[`icon_${iconStyle}`]]: iconStyle })}>{icon}</div>\n )}\n <div className={styles.title}>{title}</div>\n {description && <div className={styles.description}>{description}</div>}\n </div>\n <div className={classnames(styles.buttons, { [styles[`buttons_${layout}`]]: layout })}>{buttons}</div>\n </Fragment>\n );\n\n if (isMobile) {\n return createPortal(\n <Fragment>\n <OpacityAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div\n className={classnames(styles.overlay, styles.animationTimeout)}\n onClick={onClose}\n ref={animatedElementRef}\n />\n </Layer>\n )}\n />\n <TransformAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef, props) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div\n {...props}\n className={classnames(styles.mobileContainer, styles.animationTimeout)}\n ref={animatedElementRef}\n >\n {content}\n </div>\n </Layer>\n )}\n onClose={onClose}\n />\n </Fragment>,\n document.body\n );\n }\n\n return createPortal(\n <OpacityAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef) => (\n <Layer layer={InternalLayerName.Modal}>\n <div className={classnames(styles.overlay, styles.animationTimeout)} ref={animatedElementRef}>\n <div className={classnames(styles.desktopContainer)} ref={clickElementRef}>\n {content}\n </div>\n </div>\n </Layer>\n )}\n />,\n document.body\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAM,yBAAyB,GAAG;IAC9B,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,cAAc,CAAC;IACjE,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,CAAC;IAC7E,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,aAAa,CAAC;IAC/D,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,CAAC;CAC9E,CAAC;AAEF,MAAM,2BAA2B,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC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CAAA,KAAA,EAAA,EAAA,GACQ,KAAK,EACT,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACtE,GAAG,EAAE,kBAAkB,EAEtB,QAAA,EAAA,OAAO,EACN,CAAA,EAAA,CACF,CACX,EACD,OAAO,EAAE,OAAO,EAAA,CAClB,CACK,EAAA,CAAA,EACX,QAAQ,CAAC,IAAI,CAChB,CAAC;AACL,KAAA;AAED,IAAA,OAAO,YAAY,CACfA,GAAC,CAAA,gBAAgB,IACb,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,kBAAkB,MACvBA,GAAC,CAAA,KAAK,IAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,EACjC,QAAA,EAAAA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,kBAAkB,YACxFA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,eAAe,EAAA,QAAA,EACpE,OAAO,EACN,CAAA,EAAA,CACJ,EACF,CAAA,CACX,GACH,EACF,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN;;;;"}
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/Alert.tsx"],"sourcesContent":["import { FC, Fragment, ReactElement, RefObject, TouchEventHandler, useEffect, useRef, useState } 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 { disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useCloseByClickOutside } from '@hh.ru/magritte-common-mouse';\nimport { SwipeEvent, useSwipe } from '@hh.ru/magritte-common-use-swipe';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { AlertProps } from '@hh.ru/magritte-ui-alert/types';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\n\nimport styles from './alert.less';\n\ntype AnimationTimeout = { enter: number; exit: number };\n\ntype AnimationComponentProps = {\n animationTimeout: AnimationTimeout;\n visible: boolean;\n render: (animatedElementRef: RefObject<HTMLDivElement>, props?: JSX.IntrinsicElements['div']) => ReactElement;\n};\n\nconst OPACITY_ANIMATION_CLASSES = {\n enter: classnames(styles.opacityAnimation, styles.enterAnimation),\n enterActive: classnames(styles.enterAnimationActive, styles.opacityAnimation),\n exit: classnames(styles.opacityAnimation, styles.exitAnimation),\n exitActive: classnames(styles.exitAnimationActive, styles.opacityAnimation),\n};\n\nconst TRANSFORM_ANIMATION_CLASSES = {\n enterActive: styles.enterAnimationActive,\n exitActive: styles.exitAnimationActive,\n};\n\nconst VIEWPORT_HEIGHT = (typeof window !== 'undefined' ? window.visualViewport?.height : null) ?? 0;\nconst SWIPE_THRESHOLD_REF = { current: { max: Math.round(VIEWPORT_HEIGHT * 0.8) } };\n\nconst toInteger = (value: string) => {\n const result = parseInt(value, 10);\n return !Number.isNaN(result) ? result : 0;\n};\n\nconst withStopPropagation = (handler?: TouchEventHandler): TouchEventHandler => {\n return (event) => {\n event.stopPropagation();\n handler?.(event);\n };\n};\n\nexport const OpacityAnimation: FC<AnimationComponentProps> = ({ animationTimeout, visible, render }) => {\n const animatedElementRef = useRef<HTMLDivElement | null>(null);\n\n return (\n <CSSTransition\n appear\n classNames={OPACITY_ANIMATION_CLASSES}\n in={visible}\n mountOnEnter\n nodeRef={animatedElementRef}\n timeout={animationTimeout}\n unmountOnExit\n >\n {render(animatedElementRef)}\n </CSSTransition>\n );\n};\n\nexport const TransformAnimation: FC<AnimationComponentProps & { onClose: VoidFunction }> = ({\n animationTimeout,\n visible,\n render,\n onClose,\n}) => {\n const animatedElementRef = useRef<HTMLDivElement | null>(null);\n const swipeOffsetRef = useRef(0);\n\n const runTranslateYAnimation = () => {\n if (animatedElementRef.current !== null && visualViewport !== null) {\n animatedElementRef.current.style.transform = `translateY(${\n visualViewport.height + swipeOffsetRef.current - animatedElementRef.current.getBoundingClientRect().top\n }px)`;\n }\n };\n\n const resetTranslateY = () => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(${swipeOffsetRef.current}px)`;\n }\n };\n\n const resetSwipeOffset = () => {\n swipeOffsetRef.current = 0;\n };\n\n const swipeHandlers = useSwipe({\n thresholdYRef: SWIPE_THRESHOLD_REF,\n onSwipeMove: (event: SwipeEvent) => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(${Math.max(event.distanceY, 0)}px)`;\n }\n },\n onSwipeEnd: (event: SwipeEvent) => {\n swipeOffsetRef.current = event.distanceY;\n onClose();\n },\n onSwipeCancel: () => {\n if (animatedElementRef.current !== null) {\n animatedElementRef.current.style.transform = `translateY(0px)`;\n }\n },\n });\n\n return (\n <CSSTransition\n appear\n classNames={TRANSFORM_ANIMATION_CLASSES}\n in={visible}\n mountOnEnter\n nodeRef={animatedElementRef}\n onEnter={runTranslateYAnimation}\n onEntering={resetTranslateY}\n onExit={resetTranslateY}\n onExiting={runTranslateYAnimation}\n onExited={resetSwipeOffset}\n timeout={animationTimeout}\n unmountOnExit\n >\n {render(animatedElementRef, {\n ...swipeHandlers,\n onTouchStart: withStopPropagation(swipeHandlers.onTouchStart),\n onTouchMove: withStopPropagation(swipeHandlers.onTouchMove),\n })}\n </CSSTransition>\n );\n};\n\nexport const Alert: FC<AlertProps> = ({\n iconStyle = 'neutral',\n layout,\n icon,\n title,\n description,\n buttons,\n visible,\n onClose,\n}) => {\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const clickElementRef = useRef<HTMLDivElement | null>(null);\n const { isMobile } = useBreakpoint();\n const isServerEnv = useServerEnv();\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const enter = toInteger(style.getPropertyValue('--enter-animation-duration'));\n const exit = toInteger(style.getPropertyValue('--exit-animation-duration'));\n setAnimationTimeout({ enter, exit });\n document.body.removeChild(animationTimeoutElement);\n }, [setAnimationTimeout]);\n\n useEffect(() => {\n if (visible) {\n return disableScroll();\n }\n\n return void 0;\n }, [visible]);\n\n useCloseByClickOutside(clickElementRef, onClose, visible);\n\n if (!animationTimeout || isServerEnv) {\n return null;\n }\n\n const content = (\n <Fragment>\n <div className={styles.main} data-qa=\"magritte-alert\">\n {icon && (\n <div className={classnames(styles.icon, { [styles[`icon_${iconStyle}`]]: iconStyle })}>{icon}</div>\n )}\n <div className={styles.title}>{title}</div>\n {description && <div className={styles.description}>{description}</div>}\n </div>\n <div className={classnames(styles.buttons, { [styles[`buttons_${layout}`]]: layout })}>{buttons}</div>\n </Fragment>\n );\n\n if (isMobile) {\n return createPortal(\n <Fragment>\n <OpacityAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div\n className={classnames(styles.overlay, styles.animationTimeout)}\n onClick={onClose}\n ref={animatedElementRef}\n />\n </Layer>\n )}\n />\n <TransformAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef, props) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div\n {...props}\n className={classnames(styles.mobileContainer, styles.animationTimeout)}\n ref={animatedElementRef}\n >\n {content}\n </div>\n </Layer>\n )}\n onClose={onClose}\n />\n </Fragment>,\n document.body\n );\n }\n\n return createPortal(\n <OpacityAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef) => (\n <Layer layer={InternalLayerName.Modal}>\n <div className={classnames(styles.overlay, styles.animationTimeout)} ref={animatedElementRef}>\n <div className={classnames(styles.desktopContainer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EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,kBAAkB,YACxFA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,eAAe,EAAA,QAAA,EACpE,OAAO,EACN,CAAA,EAAA,CACJ,EACF,CAAA,CACX,GACH,EACF,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN;;;;"}
|
package/index.css
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
--magritte-color-background-primary-v18-3-
|
|
3
|
-
--magritte-color-background-secondary-v18-3-
|
|
4
|
-
--magritte-color-background-accent-v18-3-
|
|
5
|
-
--magritte-color-background-positive-v18-3-
|
|
6
|
-
--magritte-color-background-negative-v18-3-
|
|
7
|
-
--magritte-color-background-warning-v18-3-
|
|
8
|
-
--magritte-color-text-primary-v18-3-
|
|
9
|
-
--magritte-color-text-secondary-v18-3-
|
|
10
|
-
--magritte-color-icon-tertiary-v18-3-
|
|
11
|
-
--magritte-color-icon-accent-v18-3-
|
|
12
|
-
--magritte-color-icon-positive-v18-3-
|
|
13
|
-
--magritte-color-icon-negative-v18-3-
|
|
14
|
-
--magritte-color-icon-warning-secondary-v18-3-
|
|
15
|
-
--magritte-color-component-_overlay-background-content-v18-3-
|
|
2
|
+
--magritte-color-background-primary-v18-3-1:#ffffff;
|
|
3
|
+
--magritte-color-background-secondary-v18-3-1:#F1F4F9;
|
|
4
|
+
--magritte-color-background-accent-v18-3-1:#EDF6FF;
|
|
5
|
+
--magritte-color-background-positive-v18-3-1:#E8F9EC;
|
|
6
|
+
--magritte-color-background-negative-v18-3-1:#FEF2EF;
|
|
7
|
+
--magritte-color-background-warning-v18-3-1:#FFF3E6;
|
|
8
|
+
--magritte-color-text-primary-v18-3-1:#000000;
|
|
9
|
+
--magritte-color-text-secondary-v18-3-1:#768694;
|
|
10
|
+
--magritte-color-icon-tertiary-v18-3-1:#AABBCA;
|
|
11
|
+
--magritte-color-icon-accent-v18-3-1:#0070ff;
|
|
12
|
+
--magritte-color-icon-positive-v18-3-1:#0dc267;
|
|
13
|
+
--magritte-color-icon-negative-v18-3-1:#ff4d3a;
|
|
14
|
+
--magritte-color-icon-warning-secondary-v18-3-1:#ff9900;
|
|
15
|
+
--magritte-color-component-_overlay-background-content-v18-3-1:#20262b99;
|
|
16
16
|
}
|
|
17
17
|
:root{
|
|
18
|
-
--magritte-typography-title-4-semibold-font-family-v18-3-
|
|
19
|
-
--magritte-typography-title-4-semibold-font-weight-v18-3-
|
|
20
|
-
--magritte-typography-title-4-semibold-line-height-v18-3-
|
|
21
|
-
--magritte-typography-title-4-semibold-font-size-v18-3-
|
|
22
|
-
--magritte-typography-title-4-semibold-letter-spacing-v18-3-
|
|
23
|
-
--magritte-typography-title-4-semibold-text-indent-v18-3-
|
|
24
|
-
--magritte-typography-title-4-semibold-text-transform-v18-3-
|
|
25
|
-
--magritte-typography-title-4-semibold-text-decoration-v18-3-
|
|
26
|
-
--magritte-typography-paragraph-2-regular-font-family-v18-3-
|
|
27
|
-
--magritte-typography-paragraph-2-regular-font-weight-v18-3-
|
|
28
|
-
--magritte-typography-paragraph-2-regular-line-height-v18-3-
|
|
29
|
-
--magritte-typography-paragraph-2-regular-font-size-v18-3-
|
|
30
|
-
--magritte-typography-paragraph-2-regular-letter-spacing-v18-3-
|
|
31
|
-
--magritte-typography-paragraph-2-regular-text-indent-v18-3-
|
|
32
|
-
--magritte-typography-paragraph-2-regular-text-transform-v18-3-
|
|
33
|
-
--magritte-typography-paragraph-2-regular-text-decoration-v18-3-
|
|
34
|
-
--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-
|
|
35
|
-
--magritte-semantic-animation-ease-in-out-200-duration-v18-3-
|
|
36
|
-
--magritte-static-border-radius-600-v18-3-
|
|
18
|
+
--magritte-typography-title-4-semibold-font-family-v18-3-1:"Inter";
|
|
19
|
+
--magritte-typography-title-4-semibold-font-weight-v18-3-1:600;
|
|
20
|
+
--magritte-typography-title-4-semibold-line-height-v18-3-1:32px;
|
|
21
|
+
--magritte-typography-title-4-semibold-font-size-v18-3-1:22px;
|
|
22
|
+
--magritte-typography-title-4-semibold-letter-spacing-v18-3-1:-0.0075em;
|
|
23
|
+
--magritte-typography-title-4-semibold-text-indent-v18-3-1:0px;
|
|
24
|
+
--magritte-typography-title-4-semibold-text-transform-v18-3-1:none;
|
|
25
|
+
--magritte-typography-title-4-semibold-text-decoration-v18-3-1:none;
|
|
26
|
+
--magritte-typography-paragraph-2-regular-font-family-v18-3-1:"Inter";
|
|
27
|
+
--magritte-typography-paragraph-2-regular-font-weight-v18-3-1:400;
|
|
28
|
+
--magritte-typography-paragraph-2-regular-line-height-v18-3-1:26px;
|
|
29
|
+
--magritte-typography-paragraph-2-regular-font-size-v18-3-1:16px;
|
|
30
|
+
--magritte-typography-paragraph-2-regular-letter-spacing-v18-3-1:0.005em;
|
|
31
|
+
--magritte-typography-paragraph-2-regular-text-indent-v18-3-1:0px;
|
|
32
|
+
--magritte-typography-paragraph-2-regular-text-transform-v18-3-1:none;
|
|
33
|
+
--magritte-typography-paragraph-2-regular-text-decoration-v18-3-1:none;
|
|
34
|
+
--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-1:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
35
|
+
--magritte-semantic-animation-ease-in-out-200-duration-v18-3-1:200ms;
|
|
36
|
+
--magritte-static-border-radius-600-v18-3-1:24px;
|
|
37
37
|
}
|
|
38
38
|
.magritte-night-theme{
|
|
39
|
-
--magritte-color-background-primary-v18-3-
|
|
40
|
-
--magritte-color-background-secondary-v18-3-
|
|
41
|
-
--magritte-color-background-accent-v18-3-
|
|
42
|
-
--magritte-color-background-positive-v18-3-
|
|
43
|
-
--magritte-color-background-negative-v18-3-
|
|
44
|
-
--magritte-color-background-warning-v18-3-
|
|
45
|
-
--magritte-color-text-primary-v18-3-
|
|
46
|
-
--magritte-color-text-secondary-v18-3-
|
|
47
|
-
--magritte-color-icon-tertiary-v18-3-
|
|
48
|
-
--magritte-color-icon-accent-v18-3-
|
|
49
|
-
--magritte-color-icon-positive-v18-3-
|
|
50
|
-
--magritte-color-icon-negative-v18-3-
|
|
51
|
-
--magritte-color-icon-warning-secondary-v18-3-
|
|
52
|
-
--magritte-color-component-_overlay-background-content-v18-3-
|
|
53
|
-
}
|
|
54
|
-
.magritte-animation-timeout___cwIwT_1-3-
|
|
39
|
+
--magritte-color-background-primary-v18-3-1:#1B1B1B;
|
|
40
|
+
--magritte-color-background-secondary-v18-3-1:#303030;
|
|
41
|
+
--magritte-color-background-accent-v18-3-1:#222D3D;
|
|
42
|
+
--magritte-color-background-positive-v18-3-1:#16321F;
|
|
43
|
+
--magritte-color-background-negative-v18-3-1:#3D2622;
|
|
44
|
+
--magritte-color-background-warning-v18-3-1:#3D270E;
|
|
45
|
+
--magritte-color-text-primary-v18-3-1:#ffffff;
|
|
46
|
+
--magritte-color-text-secondary-v18-3-1:#ABABAB;
|
|
47
|
+
--magritte-color-icon-tertiary-v18-3-1:#767676;
|
|
48
|
+
--magritte-color-icon-accent-v18-3-1:#5e9eff;
|
|
49
|
+
--magritte-color-icon-positive-v18-3-1:#10b55f;
|
|
50
|
+
--magritte-color-icon-negative-v18-3-1:#ff4d3a;
|
|
51
|
+
--magritte-color-icon-warning-secondary-v18-3-1:#9c5b03;
|
|
52
|
+
--magritte-color-component-_overlay-background-content-v18-3-1:#26262699;
|
|
53
|
+
}
|
|
54
|
+
.magritte-animation-timeout___cwIwT_1-3-9{
|
|
55
55
|
--enter-animation-duration:0ms;
|
|
56
56
|
--exit-animation-duration:0ms;
|
|
57
57
|
}
|
|
58
58
|
@media (prefers-reduced-motion: no-preference){
|
|
59
|
-
.magritte-animation-timeout___cwIwT_1-3-
|
|
60
|
-
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v18-3-
|
|
61
|
-
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v18-3-
|
|
59
|
+
.magritte-animation-timeout___cwIwT_1-3-9{
|
|
60
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v18-3-1);
|
|
61
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v18-3-1);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
.magritte-enter-animation-active___Qti02_1-3-
|
|
64
|
+
.magritte-enter-animation-active___Qti02_1-3-9{
|
|
65
65
|
transition-property:transform, opacity;
|
|
66
66
|
transition-duration:var(--enter-animation-duration);
|
|
67
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-
|
|
67
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-1);
|
|
68
68
|
}
|
|
69
|
-
.magritte-exit-animation-active___deHqY_1-3-
|
|
69
|
+
.magritte-exit-animation-active___deHqY_1-3-9{
|
|
70
70
|
transition-property:transform, opacity;
|
|
71
71
|
transition-duration:var(--exit-animation-duration);
|
|
72
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-
|
|
72
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v18-3-1);
|
|
73
73
|
}
|
|
74
|
-
.magritte-opacity-animation___m7RYi_1-3-
|
|
74
|
+
.magritte-opacity-animation___m7RYi_1-3-9{
|
|
75
75
|
pointer-events:none;
|
|
76
76
|
}
|
|
77
|
-
.magritte-opacity-animation___m7RYi_1-3-
|
|
77
|
+
.magritte-opacity-animation___m7RYi_1-3-9.magritte-enter-animation___CbUHN_1-3-9{
|
|
78
78
|
opacity:0;
|
|
79
79
|
}
|
|
80
|
-
.magritte-opacity-animation___m7RYi_1-3-
|
|
80
|
+
.magritte-opacity-animation___m7RYi_1-3-9.magritte-enter-animation-active___Qti02_1-3-9{
|
|
81
81
|
opacity:1;
|
|
82
82
|
}
|
|
83
|
-
.magritte-opacity-animation___m7RYi_1-3-
|
|
83
|
+
.magritte-opacity-animation___m7RYi_1-3-9.magritte-exit-animation___d2AJ4_1-3-9{
|
|
84
84
|
opacity:1;
|
|
85
85
|
}
|
|
86
|
-
.magritte-opacity-animation___m7RYi_1-3-
|
|
86
|
+
.magritte-opacity-animation___m7RYi_1-3-9.magritte-exit-animation-active___deHqY_1-3-9{
|
|
87
87
|
opacity:0;
|
|
88
88
|
}
|
|
89
|
-
.magritte-overlay___hMlKJ_1-3-
|
|
89
|
+
.magritte-overlay___hMlKJ_1-3-9{
|
|
90
90
|
display:flex;
|
|
91
91
|
align-items:center;
|
|
92
92
|
justify-content:center;
|
|
93
93
|
position:fixed;
|
|
94
94
|
inset:0;
|
|
95
|
-
background-color:var(--magritte-color-component-_overlay-background-content-v18-3-
|
|
95
|
+
background-color:var(--magritte-color-component-_overlay-background-content-v18-3-1);
|
|
96
96
|
}
|
|
97
|
-
.magritte-mobile-container___dQRCl_1-3-
|
|
98
|
-
.magritte-desktop-container___26vkq_1-3-
|
|
99
|
-
background-color:var(--magritte-color-background-primary-v18-3-
|
|
100
|
-
border-radius:var(--magritte-static-border-radius-600-v18-3-
|
|
97
|
+
.magritte-mobile-container___dQRCl_1-3-9,
|
|
98
|
+
.magritte-desktop-container___26vkq_1-3-9{
|
|
99
|
+
background-color:var(--magritte-color-background-primary-v18-3-1);
|
|
100
|
+
border-radius:var(--magritte-static-border-radius-600-v18-3-1);
|
|
101
101
|
}
|
|
102
|
-
.magritte-mobile-container___dQRCl_1-3-
|
|
102
|
+
.magritte-mobile-container___dQRCl_1-3-9{
|
|
103
103
|
position:fixed;
|
|
104
104
|
inset:auto 12px 40px 12px;
|
|
105
105
|
max-width:400px;
|
|
106
106
|
margin:auto;
|
|
107
107
|
}
|
|
108
|
-
.magritte-desktop-container___26vkq_1-3-
|
|
108
|
+
.magritte-desktop-container___26vkq_1-3-9{
|
|
109
109
|
width:400px;
|
|
110
110
|
}
|
|
111
|
-
.magritte-main___iCU-E_1-3-
|
|
111
|
+
.magritte-main___iCU-E_1-3-9{
|
|
112
112
|
display:flex;
|
|
113
113
|
flex-direction:column;
|
|
114
114
|
align-items:center;
|
|
115
115
|
padding:32px 32px 12px;
|
|
116
116
|
}
|
|
117
|
-
.magritte-icon___fLpa-_1-3-
|
|
117
|
+
.magritte-icon___fLpa-_1-3-9{
|
|
118
118
|
display:flex;
|
|
119
119
|
align-items:center;
|
|
120
120
|
justify-content:center;
|
|
@@ -123,56 +123,56 @@
|
|
|
123
123
|
border-radius:50%;
|
|
124
124
|
margin-bottom:24px;
|
|
125
125
|
}
|
|
126
|
-
.magritte-icon_neutral___Jyl3l_1-3-
|
|
127
|
-
background-color:var(--magritte-color-background-secondary-v18-3-
|
|
128
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v18-3-
|
|
129
|
-
}
|
|
130
|
-
.magritte-icon_accent___Nn-T1_1-3-
|
|
131
|
-
background-color:var(--magritte-color-background-accent-v18-3-
|
|
132
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v18-3-
|
|
133
|
-
}
|
|
134
|
-
.magritte-icon_positive___OU9Zu_1-3-
|
|
135
|
-
background-color:var(--magritte-color-background-positive-v18-3-
|
|
136
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-positive-v18-3-
|
|
137
|
-
}
|
|
138
|
-
.magritte-icon_warning___7BbUi_1-3-
|
|
139
|
-
background-color:var(--magritte-color-background-warning-v18-3-
|
|
140
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-warning-secondary-v18-3-
|
|
141
|
-
}
|
|
142
|
-
.magritte-icon_negative___s0OA8_1-3-
|
|
143
|
-
background-color:var(--magritte-color-background-negative-v18-3-
|
|
144
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-negative-v18-3-
|
|
145
|
-
}
|
|
146
|
-
.magritte-title___yG219_1-3-
|
|
147
|
-
font-family:var(--magritte-typography-title-4-semibold-font-family-v18-3-
|
|
148
|
-
font-weight:var(--magritte-typography-title-4-semibold-font-weight-v18-3-
|
|
149
|
-
line-height:var(--magritte-typography-title-4-semibold-line-height-v18-3-
|
|
150
|
-
font-size:var(--magritte-typography-title-4-semibold-font-size-v18-3-
|
|
151
|
-
letter-spacing:var(--magritte-typography-title-4-semibold-letter-spacing-v18-3-
|
|
152
|
-
text-indent:var(--magritte-typography-title-4-semibold-text-indent-v18-3-
|
|
153
|
-
text-transform:var(--magritte-typography-title-4-semibold-text-transform-v18-3-
|
|
154
|
-
text-decoration:var(--magritte-typography-title-4-semibold-text-decoration-v18-3-
|
|
155
|
-
color:var(--magritte-color-text-primary-v18-3-
|
|
126
|
+
.magritte-icon_neutral___Jyl3l_1-3-9{
|
|
127
|
+
background-color:var(--magritte-color-background-secondary-v18-3-1);
|
|
128
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v18-3-1);
|
|
129
|
+
}
|
|
130
|
+
.magritte-icon_accent___Nn-T1_1-3-9{
|
|
131
|
+
background-color:var(--magritte-color-background-accent-v18-3-1);
|
|
132
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v18-3-1);
|
|
133
|
+
}
|
|
134
|
+
.magritte-icon_positive___OU9Zu_1-3-9{
|
|
135
|
+
background-color:var(--magritte-color-background-positive-v18-3-1);
|
|
136
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-positive-v18-3-1);
|
|
137
|
+
}
|
|
138
|
+
.magritte-icon_warning___7BbUi_1-3-9{
|
|
139
|
+
background-color:var(--magritte-color-background-warning-v18-3-1);
|
|
140
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-warning-secondary-v18-3-1);
|
|
141
|
+
}
|
|
142
|
+
.magritte-icon_negative___s0OA8_1-3-9{
|
|
143
|
+
background-color:var(--magritte-color-background-negative-v18-3-1);
|
|
144
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-negative-v18-3-1);
|
|
145
|
+
}
|
|
146
|
+
.magritte-title___yG219_1-3-9{
|
|
147
|
+
font-family:var(--magritte-typography-title-4-semibold-font-family-v18-3-1);
|
|
148
|
+
font-weight:var(--magritte-typography-title-4-semibold-font-weight-v18-3-1);
|
|
149
|
+
line-height:var(--magritte-typography-title-4-semibold-line-height-v18-3-1);
|
|
150
|
+
font-size:var(--magritte-typography-title-4-semibold-font-size-v18-3-1);
|
|
151
|
+
letter-spacing:var(--magritte-typography-title-4-semibold-letter-spacing-v18-3-1);
|
|
152
|
+
text-indent:var(--magritte-typography-title-4-semibold-text-indent-v18-3-1);
|
|
153
|
+
text-transform:var(--magritte-typography-title-4-semibold-text-transform-v18-3-1);
|
|
154
|
+
text-decoration:var(--magritte-typography-title-4-semibold-text-decoration-v18-3-1);
|
|
155
|
+
color:var(--magritte-color-text-primary-v18-3-1);
|
|
156
156
|
text-align:center;
|
|
157
157
|
}
|
|
158
|
-
.magritte-description___KeNoT_1-3-
|
|
159
|
-
font-family:var(--magritte-typography-paragraph-2-regular-font-family-v18-3-
|
|
160
|
-
font-weight:var(--magritte-typography-paragraph-2-regular-font-weight-v18-3-
|
|
161
|
-
line-height:var(--magritte-typography-paragraph-2-regular-line-height-v18-3-
|
|
162
|
-
font-size:var(--magritte-typography-paragraph-2-regular-font-size-v18-3-
|
|
163
|
-
letter-spacing:var(--magritte-typography-paragraph-2-regular-letter-spacing-v18-3-
|
|
164
|
-
text-indent:var(--magritte-typography-paragraph-2-regular-text-indent-v18-3-
|
|
165
|
-
text-transform:var(--magritte-typography-paragraph-2-regular-text-transform-v18-3-
|
|
166
|
-
text-decoration:var(--magritte-typography-paragraph-2-regular-text-decoration-v18-3-
|
|
167
|
-
color:var(--magritte-color-text-secondary-v18-3-
|
|
158
|
+
.magritte-description___KeNoT_1-3-9{
|
|
159
|
+
font-family:var(--magritte-typography-paragraph-2-regular-font-family-v18-3-1);
|
|
160
|
+
font-weight:var(--magritte-typography-paragraph-2-regular-font-weight-v18-3-1);
|
|
161
|
+
line-height:var(--magritte-typography-paragraph-2-regular-line-height-v18-3-1);
|
|
162
|
+
font-size:var(--magritte-typography-paragraph-2-regular-font-size-v18-3-1);
|
|
163
|
+
letter-spacing:var(--magritte-typography-paragraph-2-regular-letter-spacing-v18-3-1);
|
|
164
|
+
text-indent:var(--magritte-typography-paragraph-2-regular-text-indent-v18-3-1);
|
|
165
|
+
text-transform:var(--magritte-typography-paragraph-2-regular-text-transform-v18-3-1);
|
|
166
|
+
text-decoration:var(--magritte-typography-paragraph-2-regular-text-decoration-v18-3-1);
|
|
167
|
+
color:var(--magritte-color-text-secondary-v18-3-1);
|
|
168
168
|
text-align:center;
|
|
169
169
|
margin-top:6px;
|
|
170
170
|
}
|
|
171
|
-
.magritte-buttons___lyxBC_1-3-
|
|
171
|
+
.magritte-buttons___lyxBC_1-3-9{
|
|
172
172
|
display:flex;
|
|
173
173
|
gap:12px;
|
|
174
174
|
padding:12px;
|
|
175
175
|
}
|
|
176
|
-
.magritte-buttons_vertical___8lPCo_1-3-
|
|
176
|
+
.magritte-buttons_vertical___8lPCo_1-3-9{
|
|
177
177
|
flex-direction:column;
|
|
178
178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-alert",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@hh.ru/magritte-common-modal-helper": "1.2.7",
|
|
25
25
|
"@hh.ru/magritte-common-mouse": "1.1.11",
|
|
26
26
|
"@hh.ru/magritte-common-use-swipe": "3.1.0",
|
|
27
|
-
"@hh.ru/magritte-design-tokens": "18.3.
|
|
27
|
+
"@hh.ru/magritte-design-tokens": "18.3.1",
|
|
28
28
|
"@hh.ru/magritte-internal-layer-name": "2.2.0",
|
|
29
29
|
"@hh.ru/magritte-ui-breakpoint": "4.0.3",
|
|
30
30
|
"@hh.ru/magritte-ui-layer": "2.0.6",
|
|
31
|
-
"@hh.ru/magritte-ui-theme-provider": "1.1.
|
|
31
|
+
"@hh.ru/magritte-ui-theme-provider": "1.1.27"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"classnames": ">=2.3.2",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0426064d044b8d9226151259d9a175af5c8d1dab"
|
|
43
43
|
}
|