@hh.ru/magritte-ui-alert 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Alert.js CHANGED
@@ -10,8 +10,9 @@ import { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';
10
10
  import { useSwipe } from '@hh.ru/magritte-common-use-swipe';
11
11
  import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
12
12
  import { Layer } from '@hh.ru/magritte-ui-layer';
13
+ import { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';
13
14
 
14
- var styles = {"animation-timeout":"magritte-animation-timeout___cwIwT_3-0-3","animationTimeout":"magritte-animation-timeout___cwIwT_3-0-3","enter-animation-active":"magritte-enter-animation-active___Qti02_3-0-3","enterAnimationActive":"magritte-enter-animation-active___Qti02_3-0-3","exit-animation-active":"magritte-exit-animation-active___deHqY_3-0-3","exitAnimationActive":"magritte-exit-animation-active___deHqY_3-0-3","opacity-animation":"magritte-opacity-animation___m7RYi_3-0-3","opacityAnimation":"magritte-opacity-animation___m7RYi_3-0-3","enter-animation":"magritte-enter-animation___CbUHN_3-0-3","enterAnimation":"magritte-enter-animation___CbUHN_3-0-3","exit-animation":"magritte-exit-animation___d2AJ4_3-0-3","exitAnimation":"magritte-exit-animation___d2AJ4_3-0-3","overlay":"magritte-overlay___hMlKJ_3-0-3","mobile-container":"magritte-mobile-container___dQRCl_3-0-3","mobileContainer":"magritte-mobile-container___dQRCl_3-0-3","desktop-container":"magritte-desktop-container___26vkq_3-0-3","desktopContainer":"magritte-desktop-container___26vkq_3-0-3","main":"magritte-main___iCU-E_3-0-3","icon":"magritte-icon___fLpa-_3-0-3","icon_neutral":"magritte-icon_neutral___Jyl3l_3-0-3","iconNeutral":"magritte-icon_neutral___Jyl3l_3-0-3","icon_accent":"magritte-icon_accent___Nn-T1_3-0-3","iconAccent":"magritte-icon_accent___Nn-T1_3-0-3","icon_positive":"magritte-icon_positive___OU9Zu_3-0-3","iconPositive":"magritte-icon_positive___OU9Zu_3-0-3","icon_warning":"magritte-icon_warning___7BbUi_3-0-3","iconWarning":"magritte-icon_warning___7BbUi_3-0-3","icon_negative":"magritte-icon_negative___s0OA8_3-0-3","iconNegative":"magritte-icon_negative___s0OA8_3-0-3","title":"magritte-title___yG219_3-0-3","description":"magritte-description___KeNoT_3-0-3","buttons":"magritte-buttons___lyxBC_3-0-3","buttons_vertical":"magritte-buttons_vertical___8lPCo_3-0-3","buttonsVertical":"magritte-buttons_vertical___8lPCo_3-0-3"};
15
+ var styles = {"animation-timeout":"magritte-animation-timeout___cwIwT_3-1-0","animationTimeout":"magritte-animation-timeout___cwIwT_3-1-0","enter-animation-active":"magritte-enter-animation-active___Qti02_3-1-0","enterAnimationActive":"magritte-enter-animation-active___Qti02_3-1-0","exit-animation-active":"magritte-exit-animation-active___deHqY_3-1-0","exitAnimationActive":"magritte-exit-animation-active___deHqY_3-1-0","opacity-animation":"magritte-opacity-animation___m7RYi_3-1-0","opacityAnimation":"magritte-opacity-animation___m7RYi_3-1-0","enter-animation":"magritte-enter-animation___CbUHN_3-1-0","enterAnimation":"magritte-enter-animation___CbUHN_3-1-0","exit-animation":"magritte-exit-animation___d2AJ4_3-1-0","exitAnimation":"magritte-exit-animation___d2AJ4_3-1-0","overlay":"magritte-overlay___hMlKJ_3-1-0","mobile-container":"magritte-mobile-container___dQRCl_3-1-0","mobileContainer":"magritte-mobile-container___dQRCl_3-1-0","desktop-container":"magritte-desktop-container___26vkq_3-1-0","desktopContainer":"magritte-desktop-container___26vkq_3-1-0","main":"magritte-main___iCU-E_3-1-0","icon":"magritte-icon___fLpa-_3-1-0","icon_neutral":"magritte-icon_neutral___Jyl3l_3-1-0","iconNeutral":"magritte-icon_neutral___Jyl3l_3-1-0","icon_accent":"magritte-icon_accent___Nn-T1_3-1-0","iconAccent":"magritte-icon_accent___Nn-T1_3-1-0","icon_positive":"magritte-icon_positive___OU9Zu_3-1-0","iconPositive":"magritte-icon_positive___OU9Zu_3-1-0","icon_warning":"magritte-icon_warning___7BbUi_3-1-0","iconWarning":"magritte-icon_warning___7BbUi_3-1-0","icon_negative":"magritte-icon_negative___s0OA8_3-1-0","iconNegative":"magritte-icon_negative___s0OA8_3-1-0","title":"magritte-title___yG219_3-1-0","description":"magritte-description___KeNoT_3-1-0","buttons":"magritte-buttons___lyxBC_3-1-0","buttons_vertical":"magritte-buttons_vertical___8lPCo_3-1-0","buttonsVertical":"magritte-buttons_vertical___8lPCo_3-1-0"};
15
16
 
16
17
  const OPACITY_ANIMATION_CLASSES = {
17
18
  enter: classnames(styles.opacityAnimation, styles.enterAnimation),
@@ -108,9 +109,9 @@ const Alert = ({ iconStyle = 'neutral', layout, icon, title, description, button
108
109
  }
109
110
  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 !== 'avatar' }), 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 })] }));
110
111
  if (isMobile) {
111
- return createPortal(jsxs(Fragment, { children: [jsx(OpacityAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef) => (jsx(Layer, { layer: "bottom-sheet", children: jsx("div", { ...eventHandlers, className: classnames(styles.overlay, styles.animationTimeout), onClick: onClose, ref: animatedElementRef }) })) }), jsx(TransformAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef, eventHandlers) => (jsx(Layer, { layer: "bottom-sheet", children: jsx("div", { ...eventHandlers, className: classnames(styles.mobileContainer, styles.animationTimeout), ref: animatedElementRef, children: content }) })), onClose: onClose })] }), document.body);
112
+ return createPortal(jsxs(Fragment, { children: [jsx(OpacityAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef) => (jsx(ThemeWrapper, { children: (themeClass) => (jsx(Layer, { layer: "bottom-sheet", children: jsx("div", { ...eventHandlers, className: classnames(styles.overlay, styles.animationTimeout, themeClass), onClick: onClose, ref: animatedElementRef }) })) })) }), jsx(TransformAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef, eventHandlers) => (jsx(ThemeWrapper, { children: (themeClass) => (jsx(Layer, { layer: "bottom-sheet", children: jsx("div", { ...eventHandlers, className: classnames(styles.mobileContainer, styles.animationTimeout, themeClass), ref: animatedElementRef, children: content }) })) })), onClose: onClose })] }), document.body);
112
113
  }
113
- return createPortal(jsx(OpacityAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef) => (jsx(Layer, { layer: "modal", children: jsx("div", { ...eventHandlers, className: classnames(styles.overlay, styles.animationTimeout), ref: animatedElementRef, children: jsx("div", { className: classnames(styles.desktopContainer), ref: desktopContainerRef, children: content }) }) })) }), document.body);
114
+ return createPortal(jsx(OpacityAnimation, { animationTimeout: animationTimeout, visible: visible, render: (animatedElementRef) => (jsx(ThemeWrapper, { children: (themeClass) => (jsx(Layer, { layer: "modal", children: jsx("div", { ...eventHandlers, className: classnames(styles.overlay, themeClass, styles.animationTimeout), ref: animatedElementRef, children: jsx("div", { className: classnames(styles.desktopContainer), ref: desktopContainerRef, children: content }) }) })) })) }), document.body);
114
115
  };
115
116
 
116
117
  export { Alert, OpacityAnimation, TransformAnimation };
package/Alert.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../src/Alert.tsx"],"sourcesContent":["import { FC, Fragment, ReactElement, RefObject, 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, TimeoutCallback } from '@hh.ru/magritte-common-modal-helper';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { SwipeEvent, useSwipe } from '@hh.ru/magritte-common-use-swipe';\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: (\n animatedElementRef: RefObject<HTMLDivElement>,\n eventHandlers?: JSX.IntrinsicElements['div']\n ) => 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\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 const eventHandlers = useNoBubbling(swipeHandlers);\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, eventHandlers)}\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 animationTimeoutExitRef = useRef(animationTimeout?.exit || 0);\n animationTimeoutExitRef.current = animationTimeout?.exit || 0;\n const desktopContainerRef = 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 let enableScroll: TimeoutCallback | undefined = disableScroll();\n return () => {\n enableScroll?.(animationTimeoutExitRef.current);\n enableScroll = undefined;\n };\n }\n\n return void 0;\n }, [visible]);\n\n const eventHandlers = useNoBubbling({\n onMouseDown: (event) => {\n if (desktopContainerRef.current && !desktopContainerRef.current.contains(event.target as HTMLElement)) {\n onClose();\n }\n },\n });\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 !== 'avatar' })}>\n {icon}\n </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=\"bottom-sheet\">\n <div\n {...eventHandlers}\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, eventHandlers) => (\n <Layer layer=\"bottom-sheet\">\n <div\n {...eventHandlers}\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=\"modal\">\n <div\n {...eventHandlers}\n className={classnames(styles.overlay, styles.animationTimeout)}\n ref={animatedElementRef}\n >\n <div className={classnames(styles.desktopContainer)} ref={desktopContainerRef}>\n {content}\n </div>\n </div>\n </Layer>\n )}\n />,\n document.body\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AA0BA,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,oBAAoB;IACxC,UAAU,EAAE,MAAM,CAAC,mBAAmB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC;AACpG,MAAM,mBAAmB,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE,EAAE,CAAC;AAEpF,MAAM,SAAS,GAAG,CAAC,KAAa,KAAI;IAChC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACnC,IAAA,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAgC,CAAC,EAAE,gB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Q,CAAC,IAAI,CAChB,CAAC;KACL;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,EAAC,OAAO,EAAA,QAAA,EAChBA,gBACQ,aAAa,EACjB,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAC9D,GAAG,EAAE,kBAAkB,YAEvBA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAA,QAAA,EACxE,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, 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, TimeoutCallback } from '@hh.ru/magritte-common-modal-helper';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { SwipeEvent, useSwipe } from '@hh.ru/magritte-common-use-swipe';\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';\nimport { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';\n\nimport styles from './alert.less';\n\ntype AnimationTimeout = { enter: number; exit: number };\n\ntype AnimationComponentProps = {\n animationTimeout: AnimationTimeout;\n visible: boolean;\n render: (\n animatedElementRef: RefObject<HTMLDivElement>,\n eventHandlers?: JSX.IntrinsicElements['div']\n ) => 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\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 const eventHandlers = useNoBubbling(swipeHandlers);\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, eventHandlers)}\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 animationTimeoutExitRef = useRef(animationTimeout?.exit || 0);\n animationTimeoutExitRef.current = animationTimeout?.exit || 0;\n const desktopContainerRef = 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 let enableScroll: TimeoutCallback | undefined = disableScroll();\n return () => {\n enableScroll?.(animationTimeoutExitRef.current);\n enableScroll = undefined;\n };\n }\n\n return void 0;\n }, [visible]);\n\n const eventHandlers = useNoBubbling({\n onMouseDown: (event) => {\n if (desktopContainerRef.current && !desktopContainerRef.current.contains(event.target as HTMLElement)) {\n onClose();\n }\n },\n });\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 !== 'avatar' })}>\n {icon}\n </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 <ThemeWrapper>\n {(themeClass) => (\n <Layer layer=\"bottom-sheet\">\n <div\n {...eventHandlers}\n className={classnames(styles.overlay, styles.animationTimeout, themeClass)}\n onClick={onClose}\n ref={animatedElementRef}\n />\n </Layer>\n )}\n </ThemeWrapper>\n )}\n />\n <TransformAnimation\n animationTimeout={animationTimeout}\n visible={visible}\n render={(animatedElementRef, eventHandlers) => (\n <ThemeWrapper>\n {(themeClass) => (\n <Layer layer=\"bottom-sheet\">\n <div\n {...eventHandlers}\n className={classnames(\n styles.mobileContainer,\n styles.animationTimeout,\n themeClass\n )}\n ref={animatedElementRef}\n >\n {content}\n </div>\n </Layer>\n )}\n </ThemeWrapper>\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 <ThemeWrapper>\n {(themeClass) => (\n <Layer layer=\"modal\">\n <div\n {...eventHandlers}\n className={classnames(styles.overlay, themeClass, styles.animationTimeout)}\n ref={animatedElementRef}\n >\n <div className={classn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ClB,IACK,EACX,QAAQ,CAAC,IAAI,CAChB,CAAC;KACL;AAED,IAAA,OAAO,YAAY,CACfA,GAAA,CAAC,gBAAgB,EACb,EAAA,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,kBAAkB,MACvBA,GAAA,CAAC,YAAY,EACR,EAAA,QAAA,EAAA,CAAC,UAAU,MACRA,GAAA,CAAC,KAAK,EAAC,EAAA,KAAK,EAAC,OAAO,EAAA,QAAA,EAChBA,gBACQ,aAAa,EACjB,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAC1E,GAAG,EAAE,kBAAkB,EAAA,QAAA,EAEvBA,aAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAA,QAAA,EACxE,OAAO,EACN,CAAA,EAAA,CACJ,GACF,CACX,EAAA,CACU,CAClB,EACH,CAAA,EACF,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN;;;;"}
package/index.css CHANGED
@@ -1,139 +1,139 @@
1
1
  :root{
2
- --magritte-color-background-primary-v23-0-0:#ffffff;
3
- --magritte-color-background-secondary-v23-0-0:#F1F4F9;
4
- --magritte-color-background-accent-secondary-v23-0-0:#EDF6FF;
5
- --magritte-color-background-positive-secondary-v23-0-0:#E8F9EC;
6
- --magritte-color-background-negative-secondary-v23-0-0:#FEF2EF;
7
- --magritte-color-background-warning-secondary-v23-0-0:#FFF3E6;
8
- --magritte-color-text-primary-v23-0-0:#000000;
9
- --magritte-color-text-secondary-v23-0-0:#768694;
10
- --magritte-color-icon-tertiary-v23-0-0:#AABBCA;
11
- --magritte-color-icon-accent-v23-0-0:#0070ff;
12
- --magritte-color-icon-positive-v23-0-0:#0dc267;
13
- --magritte-color-icon-negative-v23-0-0:#ff4d3a;
14
- --magritte-color-icon-warning-secondary-v23-0-0:#fdb972;
15
- --magritte-color-component-_overlay-background-content-v23-0-0:#20262b99;
2
+ --magritte-color-background-primary-v23-2-0:#ffffff;
3
+ --magritte-color-background-secondary-v23-2-0:#F1F4F9;
4
+ --magritte-color-background-accent-secondary-v23-2-0:#EDF6FF;
5
+ --magritte-color-background-positive-secondary-v23-2-0:#E8F9EC;
6
+ --magritte-color-background-negative-secondary-v23-2-0:#FEF2EF;
7
+ --magritte-color-background-warning-secondary-v23-2-0:#FFF3E6;
8
+ --magritte-color-text-primary-v23-2-0:#000000;
9
+ --magritte-color-text-secondary-v23-2-0:#768694;
10
+ --magritte-color-icon-tertiary-v23-2-0:#AABBCA;
11
+ --magritte-color-icon-accent-v23-2-0:#0070ff;
12
+ --magritte-color-icon-positive-v23-2-0:#0dc267;
13
+ --magritte-color-icon-negative-v23-2-0:#ff4d3a;
14
+ --magritte-color-icon-warning-secondary-v23-2-0:#fdb972;
15
+ --magritte-color-component-_overlay-background-content-v23-2-0:#20262b99;
16
16
  }
17
17
 
18
18
  :root{
19
- --magritte-typography-title-4-semibold-font-family-v23-0-0:"hh sans";
20
- --magritte-typography-title-4-semibold-font-weight-v23-0-0:500;
21
- --magritte-typography-title-4-semibold-line-height-v23-0-0:32px;
22
- --magritte-typography-title-4-semibold-font-size-v23-0-0:22px;
23
- --magritte-typography-title-4-semibold-letter-spacing-v23-0-0:-0.0075em;
24
- --magritte-typography-title-4-semibold-text-indent-v23-0-0:0px;
25
- --magritte-typography-title-4-semibold-text-transform-v23-0-0:none;
26
- --magritte-typography-title-4-semibold-text-decoration-v23-0-0:none;
27
- --magritte-typography-paragraph-2-regular-font-family-v23-0-0:"hh sans";
28
- --magritte-typography-paragraph-2-regular-font-weight-v23-0-0:400;
29
- --magritte-typography-paragraph-2-regular-line-height-v23-0-0:26px;
30
- --magritte-typography-paragraph-2-regular-font-size-v23-0-0:16px;
31
- --magritte-typography-paragraph-2-regular-letter-spacing-v23-0-0:0.005em;
32
- --magritte-typography-paragraph-2-regular-text-indent-v23-0-0:0px;
33
- --magritte-typography-paragraph-2-regular-text-transform-v23-0-0:none;
34
- --magritte-typography-paragraph-2-regular-text-decoration-v23-0-0:none;
35
- --magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0:cubic-bezier(0.25, 0.1, 0.25, 1);
36
- --magritte-semantic-animation-ease-in-out-200-duration-v23-0-0:200ms;
37
- --magritte-static-border-radius-600-v23-0-0:24px;
19
+ --magritte-typography-title-4-semibold-font-family-v23-2-0:"hh sans";
20
+ --magritte-typography-title-4-semibold-font-weight-v23-2-0:500;
21
+ --magritte-typography-title-4-semibold-line-height-v23-2-0:32px;
22
+ --magritte-typography-title-4-semibold-font-size-v23-2-0:22px;
23
+ --magritte-typography-title-4-semibold-letter-spacing-v23-2-0:-0.0075em;
24
+ --magritte-typography-title-4-semibold-text-indent-v23-2-0:0px;
25
+ --magritte-typography-title-4-semibold-text-transform-v23-2-0:none;
26
+ --magritte-typography-title-4-semibold-text-decoration-v23-2-0:none;
27
+ --magritte-typography-paragraph-2-regular-font-family-v23-2-0:"hh sans";
28
+ --magritte-typography-paragraph-2-regular-font-weight-v23-2-0:400;
29
+ --magritte-typography-paragraph-2-regular-line-height-v23-2-0:26px;
30
+ --magritte-typography-paragraph-2-regular-font-size-v23-2-0:16px;
31
+ --magritte-typography-paragraph-2-regular-letter-spacing-v23-2-0:0.005em;
32
+ --magritte-typography-paragraph-2-regular-text-indent-v23-2-0:0px;
33
+ --magritte-typography-paragraph-2-regular-text-transform-v23-2-0:none;
34
+ --magritte-typography-paragraph-2-regular-text-decoration-v23-2-0:none;
35
+ --magritte-semantic-animation-ease-in-out-200-timing-function-v23-2-0:cubic-bezier(0.25, 0.1, 0.25, 1);
36
+ --magritte-semantic-animation-ease-in-out-200-duration-v23-2-0:200ms;
37
+ --magritte-static-border-radius-600-v23-2-0:24px;
38
38
  }
39
39
 
40
40
  .magritte-night-theme{
41
- --magritte-color-background-primary-v23-0-0:#1B1B1B;
42
- --magritte-color-background-secondary-v23-0-0:#303030;
43
- --magritte-color-background-accent-secondary-v23-0-0:#222D3D;
44
- --magritte-color-background-positive-secondary-v23-0-0:#16321F;
45
- --magritte-color-background-negative-secondary-v23-0-0:#3D2622;
46
- --magritte-color-background-warning-secondary-v23-0-0:#3D270E;
47
- --magritte-color-text-primary-v23-0-0:#ffffff;
48
- --magritte-color-text-secondary-v23-0-0:#ABABAB;
49
- --magritte-color-icon-tertiary-v23-0-0:#767676;
50
- --magritte-color-icon-accent-v23-0-0:#5e9eff;
51
- --magritte-color-icon-positive-v23-0-0:#10b55f;
52
- --magritte-color-icon-negative-v23-0-0:#ff4d3a;
53
- --magritte-color-icon-warning-secondary-v23-0-0:#9c5b03;
54
- --magritte-color-component-_overlay-background-content-v23-0-0:#26262699;
41
+ --magritte-color-background-primary-v23-2-0:#1B1B1B;
42
+ --magritte-color-background-secondary-v23-2-0:#303030;
43
+ --magritte-color-background-accent-secondary-v23-2-0:#222D3D;
44
+ --magritte-color-background-positive-secondary-v23-2-0:#16321F;
45
+ --magritte-color-background-negative-secondary-v23-2-0:#3D2622;
46
+ --magritte-color-background-warning-secondary-v23-2-0:#3D270E;
47
+ --magritte-color-text-primary-v23-2-0:#ffffff;
48
+ --magritte-color-text-secondary-v23-2-0:#ABABAB;
49
+ --magritte-color-icon-tertiary-v23-2-0:#767676;
50
+ --magritte-color-icon-accent-v23-2-0:#5e9eff;
51
+ --magritte-color-icon-positive-v23-2-0:#10b55f;
52
+ --magritte-color-icon-negative-v23-2-0:#ff4d3a;
53
+ --magritte-color-icon-warning-secondary-v23-2-0:#9c5b03;
54
+ --magritte-color-component-_overlay-background-content-v23-2-0:#26262699;
55
55
  }
56
56
 
57
57
  .magritte-zp-day-theme{
58
- --magritte-color-background-primary-v23-0-0:#ffffff;
59
- --magritte-color-background-secondary-v23-0-0:#F1F4F9;
60
- --magritte-color-background-accent-secondary-v23-0-0:#F1F4F7;
61
- --magritte-color-background-positive-secondary-v23-0-0:#E8F9EC;
62
- --magritte-color-background-negative-secondary-v23-0-0:#FEF2EF;
63
- --magritte-color-background-warning-secondary-v23-0-0:#FFF3E6;
64
- --magritte-color-text-primary-v23-0-0:#000000;
65
- --magritte-color-text-secondary-v23-0-0:#768694;
66
- --magritte-color-icon-tertiary-v23-0-0:#DCE3EB;
67
- --magritte-color-icon-accent-v23-0-0:#7195AF;
68
- --magritte-color-icon-positive-v23-0-0:#0dc267;
69
- --magritte-color-icon-negative-v23-0-0:#ff4d3a;
70
- --magritte-color-icon-warning-secondary-v23-0-0:#fdb972;
71
- --magritte-color-component-_overlay-background-content-v23-0-0:#20262b99;
72
- }
73
- .magritte-animation-timeout___cwIwT_3-0-3{
58
+ --magritte-color-background-primary-v23-2-0:#ffffff;
59
+ --magritte-color-background-secondary-v23-2-0:#F1F4F9;
60
+ --magritte-color-background-accent-secondary-v23-2-0:#F1F4F7;
61
+ --magritte-color-background-positive-secondary-v23-2-0:#E8F9EC;
62
+ --magritte-color-background-negative-secondary-v23-2-0:#FEF2EF;
63
+ --magritte-color-background-warning-secondary-v23-2-0:#FFF3E6;
64
+ --magritte-color-text-primary-v23-2-0:#000000;
65
+ --magritte-color-text-secondary-v23-2-0:#768694;
66
+ --magritte-color-icon-tertiary-v23-2-0:#DCE3EB;
67
+ --magritte-color-icon-accent-v23-2-0:#7195AF;
68
+ --magritte-color-icon-positive-v23-2-0:#0dc267;
69
+ --magritte-color-icon-negative-v23-2-0:#ff4d3a;
70
+ --magritte-color-icon-warning-secondary-v23-2-0:#fdb972;
71
+ --magritte-color-component-_overlay-background-content-v23-2-0:#20262b99;
72
+ }
73
+ .magritte-animation-timeout___cwIwT_3-1-0{
74
74
  --enter-animation-duration:0ms;
75
75
  --exit-animation-duration:0ms;
76
76
  }
77
77
  @media (prefers-reduced-motion: no-preference){
78
- .magritte-animation-timeout___cwIwT_3-0-3{
79
- --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
80
- --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-0-0);
78
+ .magritte-animation-timeout___cwIwT_3-1-0{
79
+ --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-2-0);
80
+ --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v23-2-0);
81
81
  }
82
82
  }
83
- .magritte-enter-animation-active___Qti02_3-0-3{
83
+ .magritte-enter-animation-active___Qti02_3-1-0{
84
84
  transition-property:transform, opacity;
85
85
  transition-duration:var(--enter-animation-duration);
86
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
86
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-2-0);
87
87
  }
88
- .magritte-exit-animation-active___deHqY_3-0-3{
88
+ .magritte-exit-animation-active___deHqY_3-1-0{
89
89
  transition-property:transform, opacity;
90
90
  transition-duration:var(--exit-animation-duration);
91
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-0-0);
91
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v23-2-0);
92
92
  }
93
- .magritte-opacity-animation___m7RYi_3-0-3{
93
+ .magritte-opacity-animation___m7RYi_3-1-0{
94
94
  pointer-events:none;
95
95
  }
96
- .magritte-opacity-animation___m7RYi_3-0-3.magritte-enter-animation___CbUHN_3-0-3{
96
+ .magritte-opacity-animation___m7RYi_3-1-0.magritte-enter-animation___CbUHN_3-1-0{
97
97
  opacity:0;
98
98
  }
99
- .magritte-opacity-animation___m7RYi_3-0-3.magritte-enter-animation-active___Qti02_3-0-3{
99
+ .magritte-opacity-animation___m7RYi_3-1-0.magritte-enter-animation-active___Qti02_3-1-0{
100
100
  opacity:1;
101
101
  }
102
- .magritte-opacity-animation___m7RYi_3-0-3.magritte-exit-animation___d2AJ4_3-0-3{
102
+ .magritte-opacity-animation___m7RYi_3-1-0.magritte-exit-animation___d2AJ4_3-1-0{
103
103
  opacity:1;
104
104
  }
105
- .magritte-opacity-animation___m7RYi_3-0-3.magritte-exit-animation-active___deHqY_3-0-3{
105
+ .magritte-opacity-animation___m7RYi_3-1-0.magritte-exit-animation-active___deHqY_3-1-0{
106
106
  opacity:0;
107
107
  }
108
- .magritte-overlay___hMlKJ_3-0-3{
108
+ .magritte-overlay___hMlKJ_3-1-0{
109
109
  display:flex;
110
110
  align-items:center;
111
111
  justify-content:center;
112
112
  position:fixed;
113
113
  inset:0;
114
- background-color:var(--magritte-color-component-_overlay-background-content-v23-0-0);
114
+ background-color:var(--magritte-color-component-_overlay-background-content-v23-2-0);
115
115
  }
116
- .magritte-mobile-container___dQRCl_3-0-3,
117
- .magritte-desktop-container___26vkq_3-0-3{
118
- background-color:var(--magritte-color-background-primary-v23-0-0);
119
- border-radius:var(--magritte-static-border-radius-600-v23-0-0);
116
+ .magritte-mobile-container___dQRCl_3-1-0,
117
+ .magritte-desktop-container___26vkq_3-1-0{
118
+ background-color:var(--magritte-color-background-primary-v23-2-0);
119
+ border-radius:var(--magritte-static-border-radius-600-v23-2-0);
120
120
  }
121
- .magritte-mobile-container___dQRCl_3-0-3{
121
+ .magritte-mobile-container___dQRCl_3-1-0{
122
122
  position:fixed;
123
123
  inset:auto 12px 16px;
124
124
  max-width:400px;
125
125
  margin:auto;
126
126
  }
127
- .magritte-desktop-container___26vkq_3-0-3{
127
+ .magritte-desktop-container___26vkq_3-1-0{
128
128
  width:400px;
129
129
  }
130
- .magritte-main___iCU-E_3-0-3{
130
+ .magritte-main___iCU-E_3-1-0{
131
131
  display:flex;
132
132
  flex-direction:column;
133
133
  align-items:center;
134
134
  padding:32px 32px 12px;
135
135
  }
136
- .magritte-icon___fLpa-_3-0-3{
136
+ .magritte-icon___fLpa-_3-1-0{
137
137
  display:flex;
138
138
  align-items:center;
139
139
  justify-content:center;
@@ -142,56 +142,56 @@
142
142
  border-radius:50%;
143
143
  margin-bottom:24px;
144
144
  }
145
- .magritte-icon_neutral___Jyl3l_3-0-3{
146
- background-color:var(--magritte-color-background-secondary-v23-0-0);
147
- --magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v23-0-0);
148
- }
149
- .magritte-icon_accent___Nn-T1_3-0-3{
150
- background-color:var(--magritte-color-background-accent-secondary-v23-0-0);
151
- --magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v23-0-0);
152
- }
153
- .magritte-icon_positive___OU9Zu_3-0-3{
154
- background-color:var(--magritte-color-background-positive-secondary-v23-0-0);
155
- --magritte-ui-icon-color-override:var(--magritte-color-icon-positive-v23-0-0);
156
- }
157
- .magritte-icon_warning___7BbUi_3-0-3{
158
- background-color:var(--magritte-color-background-warning-secondary-v23-0-0);
159
- --magritte-ui-icon-color-override:var(--magritte-color-icon-warning-secondary-v23-0-0);
160
- }
161
- .magritte-icon_negative___s0OA8_3-0-3{
162
- background-color:var(--magritte-color-background-negative-secondary-v23-0-0);
163
- --magritte-ui-icon-color-override:var(--magritte-color-icon-negative-v23-0-0);
164
- }
165
- .magritte-title___yG219_3-0-3{
166
- font-family:var(--magritte-typography-title-4-semibold-font-family-v23-0-0);
167
- font-weight:var(--magritte-typography-title-4-semibold-font-weight-v23-0-0);
168
- line-height:var(--magritte-typography-title-4-semibold-line-height-v23-0-0);
169
- font-size:var(--magritte-typography-title-4-semibold-font-size-v23-0-0);
170
- letter-spacing:var(--magritte-typography-title-4-semibold-letter-spacing-v23-0-0);
171
- text-indent:var(--magritte-typography-title-4-semibold-text-indent-v23-0-0);
172
- text-transform:var(--magritte-typography-title-4-semibold-text-transform-v23-0-0);
173
- text-decoration:var(--magritte-typography-title-4-semibold-text-decoration-v23-0-0);
174
- color:var(--magritte-color-text-primary-v23-0-0);
145
+ .magritte-icon_neutral___Jyl3l_3-1-0{
146
+ background-color:var(--magritte-color-background-secondary-v23-2-0);
147
+ --magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v23-2-0);
148
+ }
149
+ .magritte-icon_accent___Nn-T1_3-1-0{
150
+ background-color:var(--magritte-color-background-accent-secondary-v23-2-0);
151
+ --magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v23-2-0);
152
+ }
153
+ .magritte-icon_positive___OU9Zu_3-1-0{
154
+ background-color:var(--magritte-color-background-positive-secondary-v23-2-0);
155
+ --magritte-ui-icon-color-override:var(--magritte-color-icon-positive-v23-2-0);
156
+ }
157
+ .magritte-icon_warning___7BbUi_3-1-0{
158
+ background-color:var(--magritte-color-background-warning-secondary-v23-2-0);
159
+ --magritte-ui-icon-color-override:var(--magritte-color-icon-warning-secondary-v23-2-0);
160
+ }
161
+ .magritte-icon_negative___s0OA8_3-1-0{
162
+ background-color:var(--magritte-color-background-negative-secondary-v23-2-0);
163
+ --magritte-ui-icon-color-override:var(--magritte-color-icon-negative-v23-2-0);
164
+ }
165
+ .magritte-title___yG219_3-1-0{
166
+ font-family:var(--magritte-typography-title-4-semibold-font-family-v23-2-0);
167
+ font-weight:var(--magritte-typography-title-4-semibold-font-weight-v23-2-0);
168
+ line-height:var(--magritte-typography-title-4-semibold-line-height-v23-2-0);
169
+ font-size:var(--magritte-typography-title-4-semibold-font-size-v23-2-0);
170
+ letter-spacing:var(--magritte-typography-title-4-semibold-letter-spacing-v23-2-0);
171
+ text-indent:var(--magritte-typography-title-4-semibold-text-indent-v23-2-0);
172
+ text-transform:var(--magritte-typography-title-4-semibold-text-transform-v23-2-0);
173
+ text-decoration:var(--magritte-typography-title-4-semibold-text-decoration-v23-2-0);
174
+ color:var(--magritte-color-text-primary-v23-2-0);
175
175
  text-align:center;
176
176
  }
177
- .magritte-description___KeNoT_3-0-3{
178
- font-family:var(--magritte-typography-paragraph-2-regular-font-family-v23-0-0);
179
- font-weight:var(--magritte-typography-paragraph-2-regular-font-weight-v23-0-0);
180
- line-height:var(--magritte-typography-paragraph-2-regular-line-height-v23-0-0);
181
- font-size:var(--magritte-typography-paragraph-2-regular-font-size-v23-0-0);
182
- letter-spacing:var(--magritte-typography-paragraph-2-regular-letter-spacing-v23-0-0);
183
- text-indent:var(--magritte-typography-paragraph-2-regular-text-indent-v23-0-0);
184
- text-transform:var(--magritte-typography-paragraph-2-regular-text-transform-v23-0-0);
185
- text-decoration:var(--magritte-typography-paragraph-2-regular-text-decoration-v23-0-0);
186
- color:var(--magritte-color-text-secondary-v23-0-0);
177
+ .magritte-description___KeNoT_3-1-0{
178
+ font-family:var(--magritte-typography-paragraph-2-regular-font-family-v23-2-0);
179
+ font-weight:var(--magritte-typography-paragraph-2-regular-font-weight-v23-2-0);
180
+ line-height:var(--magritte-typography-paragraph-2-regular-line-height-v23-2-0);
181
+ font-size:var(--magritte-typography-paragraph-2-regular-font-size-v23-2-0);
182
+ letter-spacing:var(--magritte-typography-paragraph-2-regular-letter-spacing-v23-2-0);
183
+ text-indent:var(--magritte-typography-paragraph-2-regular-text-indent-v23-2-0);
184
+ text-transform:var(--magritte-typography-paragraph-2-regular-text-transform-v23-2-0);
185
+ text-decoration:var(--magritte-typography-paragraph-2-regular-text-decoration-v23-2-0);
186
+ color:var(--magritte-color-text-secondary-v23-2-0);
187
187
  text-align:center;
188
188
  margin-top:6px;
189
189
  }
190
- .magritte-buttons___lyxBC_3-0-3{
190
+ .magritte-buttons___lyxBC_3-1-0{
191
191
  display:flex;
192
192
  gap:12px;
193
193
  padding:12px;
194
194
  }
195
- .magritte-buttons_vertical___8lPCo_3-0-3{
195
+ .magritte-buttons_vertical___8lPCo_3-1-0{
196
196
  flex-direction:column;
197
197
  }
package/index.js CHANGED
@@ -11,4 +11,5 @@ import '@hh.ru/magritte-common-use-no-bubbling';
11
11
  import '@hh.ru/magritte-common-use-swipe';
12
12
  import '@hh.ru/magritte-ui-breakpoint';
13
13
  import '@hh.ru/magritte-ui-layer';
14
+ import '@hh.ru/magritte-ui-theme-wrapper';
14
15
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-alert",
3
- "version": "3.0.3",
3
+ "version": "3.1.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -23,10 +23,11 @@
23
23
  "@hh.ru/magritte-common-modal-helper": "1.2.10",
24
24
  "@hh.ru/magritte-common-use-no-bubbling": "1.0.5",
25
25
  "@hh.ru/magritte-common-use-swipe": "3.1.6",
26
- "@hh.ru/magritte-design-tokens": "23.0.0",
26
+ "@hh.ru/magritte-design-tokens": "23.2.0",
27
27
  "@hh.ru/magritte-internal-layer-name": "3.0.2",
28
28
  "@hh.ru/magritte-ui-breakpoint": "6.0.0",
29
- "@hh.ru/magritte-ui-layer": "3.0.2"
29
+ "@hh.ru/magritte-ui-layer": "3.0.2",
30
+ "@hh.ru/magritte-ui-theme-wrapper": "1.1.0"
30
31
  },
31
32
  "peerDependencies": {
32
33
  "classnames": ">=2.3.2",
@@ -37,5 +38,5 @@
37
38
  "publishConfig": {
38
39
  "access": "public"
39
40
  },
40
- "gitHead": "169279c6b3ef0523f88f2daf07c35c908437f275"
41
+ "gitHead": "fb6e7a383f8c329c0b5bc46df4d4bb11e44d9d24"
41
42
  }