@hh.ru/magritte-ui-floating-button 1.3.0 → 2.0.1
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/FloatingButton.js +3 -4
- package/FloatingButton.js.map +1 -1
- package/FloatingButtonStack.js +2 -2
- package/FloatingButtonStack.js.map +1 -1
- package/index.css +251 -254
- package/index.d.ts +1 -1
- package/package.json +8 -8
- package/types.d.ts +4 -1
package/FloatingButton.js
CHANGED
|
@@ -10,10 +10,10 @@ import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
|
10
10
|
import { Loader } from '@hh.ru/magritte-ui-loader';
|
|
11
11
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
12
12
|
|
|
13
|
-
var styles = {"wrapper":"magritte-
|
|
13
|
+
var styles = {"wrapper":"magritte-wrapper___7m9lC_2-0-1","animation-timeout":"magritte-animation-timeout___NL8n0_2-0-1","animationTimeout":"magritte-animation-timeout___NL8n0_2-0-1","button":"magritte-button___nL-Hn_2-0-1","loading":"magritte-loading___C0oPZ_2-0-1","withIconAndLabel":"magritte-withIconAndLabel___Qa-lU_2-0-1","right":"magritte-right___3n0Rz_2-0-1","content":"magritte-content___JNpTZ_2-0-1","left":"magritte-left___GnzU7_2-0-1","center":"magritte-center___MdA40_2-0-1","postfix":"magritte-postfix___r0EZ6_2-0-1","icon":"magritte-icon___VpqJt_2-0-1","textless":"magritte-textless___IbYgp_2-0-1","label":"magritte-label___EPgvj_2-0-1","withPostfix":"magritte-withPostfix___PmQAz_2-0-1","hideLabel":"magritte-hideLabel___K79XM_2-0-1","withLabelOnHover":"magritte-withLabelOnHover___1oktd_2-0-1","loader":"magritte-loader___EPezG_2-0-1","enter-animation":"magritte-enter-animation___2sPz3_2-0-1","enterAnimation":"magritte-enter-animation___2sPz3_2-0-1","enter-animation-active":"magritte-enter-animation-active___Lq9eq_2-0-1","enterAnimationActive":"magritte-enter-animation-active___Lq9eq_2-0-1","exit-animation":"magritte-exit-animation___h2-7a_2-0-1","exitAnimation":"magritte-exit-animation___h2-7a_2-0-1","exit-animation-active":"magritte-exit-animation-active___w0F1a_2-0-1","exitAnimationActive":"magritte-exit-animation-active___w0F1a_2-0-1","button_style-neutral":"magritte-button_style-neutral___bPUwu_2-0-1","buttonStyleNeutral":"magritte-button_style-neutral___bPUwu_2-0-1","stackMode":"magritte-stackMode___RdOTJ_2-0-1","button_style-inverse":"magritte-button_style-inverse___Xgf26_2-0-1","buttonStyleInverse":"magritte-button_style-inverse___Xgf26_2-0-1"};
|
|
14
14
|
|
|
15
15
|
const ALLOWED_BADGE_SIZES = ['small'];
|
|
16
|
-
const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabled, borderRadius, icon: IconComponent, postfix, loading, host, children, className, inlineStyle, visible, labelOnHover: _labelOnHover, hideLabel: _hideLabel, badge, position = 'right', 'data-qa': dataQa = 'floating-button', stackMode = false, ...restProps }, ref) => {
|
|
16
|
+
const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabled, borderRadius = 'halfHeight', icon: IconComponent, postfix, loading, host, children, className, inlineStyle, visible, labelOnHover: _labelOnHover, hideLabel: _hideLabel, badge, position = 'right', 'data-qa': dataQa = 'floating-button', stackMode = false, ...restProps }, ref) => {
|
|
17
17
|
const labelOnHover = _labelOnHover && !!IconComponent;
|
|
18
18
|
const hideLabel = _hideLabel && !!IconComponent;
|
|
19
19
|
const isServerEnv = useServerEnv();
|
|
@@ -45,7 +45,6 @@ const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabl
|
|
|
45
45
|
}
|
|
46
46
|
additionalAttributes.ref = ref;
|
|
47
47
|
let button = (jsx(Element, { ...additionalAttributes, ...restProps, disabled: !!disabled, tabIndex: disabled || loading ? -1 : 0, className: classnames(styles.button, styles[`button_style-${style}`], {
|
|
48
|
-
[styles.borderRadius]: !!borderRadius,
|
|
49
48
|
[styles.loading]: !!loading,
|
|
50
49
|
[styles.withLabelOnHover]: !!labelOnHover,
|
|
51
50
|
[styles.hideLabel]: !!hideLabel || !children,
|
|
@@ -53,7 +52,7 @@ const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabl
|
|
|
53
52
|
[styles.textless]: !postfix && (!children || !!hideLabel),
|
|
54
53
|
[styles.withIconAndLabel]: !!IconComponent && !!children && !hideLabel,
|
|
55
54
|
[styles.stackMode]: !!stackMode,
|
|
56
|
-
}), children: jsxs("span", { className: styles.content, children: [IconComponent && (jsx("span", { className: styles.icon, children: jsx(IconComponent, { "data-qa": `${dataQa}-icon` }) })), jsx("span", { className: styles.label, "data-qa": `${dataQa}-label`, children: jsx(Text, { typography: 'subtitle-1-semibold', children: children }) }), postfix && (jsx("span", { className: styles.postfix, "data-qa": `${dataQa}-postfix`, children: jsx(Text, { typography: 'subtitle-1-semibold', children: postfix }) })), loading && (jsx("span", { className: styles.loader, children: jsx(Loader, { size: 24 }) }))] }) }));
|
|
55
|
+
}), style: { borderRadius: borderRadius === 'halfHeight' ? '9999px' : `${borderRadius}px` }, children: jsxs("span", { className: styles.content, children: [IconComponent && (jsx("span", { className: styles.icon, children: jsx(IconComponent, { "data-qa": `${dataQa}-icon` }) })), jsx("span", { className: styles.label, "data-qa": `${dataQa}-label`, children: jsx(Text, { typography: 'subtitle-1-semibold', children: children }) }), postfix && (jsx("span", { className: styles.postfix, "data-qa": `${dataQa}-postfix`, children: jsx(Text, { typography: 'subtitle-1-semibold', children: postfix }) })), loading && (jsx("span", { className: styles.loader, children: jsx(Loader, { size: 24 }) }))] }) }));
|
|
57
56
|
if (badge && !disabled) {
|
|
58
57
|
button = (jsx(ComponentWithBadge, { allowedSizes: ALLOWED_BADGE_SIZES, badge: badge, offset: stackMode ? 12 : 4, noClip: true, children: button }));
|
|
59
58
|
}
|
package/FloatingButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingButton.js","sources":["../src/FloatingButton.tsx"],"sourcesContent":["import React, { forwardRef, useLayoutEffect, 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 type { PolymorphicComponentWithRef, PolymorphicForwardRefRenderFunc } from '@hh.ru/magritte-types';\nimport { BadgeSize, ComponentWithBadge } from '@hh.ru/magritte-ui-badge';\nimport type { FloatingButtonProps } from '@hh.ru/magritte-ui-floating-button/types';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './floating-button.less';\n\nconst ALLOWED_BADGE_SIZES: BadgeSize[] = ['small'];\n\nconst FloatingButtonComponent: PolymorphicForwardRefRenderFunc<FloatingButtonProps, 'button'> = (\n {\n Element = 'button',\n style = 'neutral',\n disabled,\n borderRadius,\n icon: IconComponent,\n postfix,\n loading,\n host,\n children,\n className,\n inlineStyle,\n visible,\n labelOnHover: _labelOnHover,\n hideLabel: _hideLabel,\n badge,\n position = 'right',\n 'data-qa': dataQa = 'floating-button',\n stackMode = false,\n ...restProps\n },\n ref\n) => {\n const labelOnHover = _labelOnHover && !!IconComponent;\n const hideLabel = _hideLabel && !!IconComponent;\n const isServerEnv = useServerEnv();\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [animationTimeout, setAnimationTimeout] = useState(0);\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 const animationTimeout = parseInt(style.getPropertyValue(`--animation-duration`), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n document.body.removeChild(animationTimeoutElement);\n }, []);\n\n if (isServerEnv) {\n return null;\n }\n\n const additionalAttributes: Record<string, unknown> = {\n 'data-qa': dataQa,\n };\n if (Element === 'button') {\n additionalAttributes.type = 'button';\n } else {\n additionalAttributes.role = Element !== 'a' ? 'button' : undefined;\n additionalAttributes['aria-disabled'] = disabled;\n }\n additionalAttributes.ref = ref;\n\n let button = (\n <Element\n {...additionalAttributes}\n {...restProps}\n disabled={!!disabled}\n tabIndex={disabled || loading ? -1 : 0}\n className={classnames(styles.button, styles[`button_style-${style}`], {\n [styles.borderRadius]: !!borderRadius,\n [styles.loading]: !!loading,\n [styles.withLabelOnHover]: !!labelOnHover,\n [styles.hideLabel]: !!hideLabel || !children,\n [styles.withPostfix]: !!postfix,\n [styles.textless]: !postfix && (!children || !!hideLabel),\n [styles.withIconAndLabel]: !!IconComponent && !!children && !hideLabel,\n [styles.stackMode]: !!stackMode,\n })}\n >\n <span className={styles.content}>\n {IconComponent && (\n <span className={styles.icon}>\n <IconComponent data-qa={`${dataQa}-icon`} />\n </span>\n )}\n <span className={styles.label} data-qa={`${dataQa}-label`}>\n <Text typography={'subtitle-1-semibold'}>{children}</Text>\n </span>\n {postfix && (\n <span className={styles.postfix} data-qa={`${dataQa}-postfix`}>\n <Text typography={'subtitle-1-semibold'}>{postfix}</Text>\n </span>\n )}\n\n {loading && (\n <span className={styles.loader}>\n <Loader size={24} />\n </span>\n )}\n </span>\n </Element>\n );\n\n if (badge && !disabled) {\n button = (\n <ComponentWithBadge allowedSizes={ALLOWED_BADGE_SIZES} badge={badge} offset={stackMode ? 12 : 4} noClip>\n {button}\n </ComponentWithBadge>\n );\n }\n\n if (stackMode) {\n return button;\n }\n\n return createPortal(\n <CSSTransition\n appear\n in={!!visible && !isServerEnv}\n nodeRef={wrapperRef}\n classNames={{\n appear: styles.enterAnimation,\n appearActive: styles.enterAnimationActive,\n enter: styles.enterAnimation,\n enterActive: styles.enterAnimationActive,\n exit: styles.exitAnimation,\n exitActive: styles.exitAnimationActive,\n }}\n timeout={animationTimeout}\n unmountOnExit\n >\n <Layer layer=\"floating-button\">\n <div\n className={classnames(styles.wrapper, styles[`${position}`], className)}\n ref={wrapperRef}\n style={inlineStyle}\n data-qa={`${dataQa}-wrapper`}\n >\n {button}\n </div>\n </Layer>\n </CSSTransition>,\n host?.current || document.body\n );\n};\n\nexport const FloatingButton = forwardRef(FloatingButtonComponent) as PolymorphicComponentWithRef<\n FloatingButtonProps,\n 'button'\n>;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,mBAAmB,GAAgB,CAAC,OAAO,CAAC,CAAC;AAEnD,MAAM,uBAAuB,GAAmE,CAC5F,EACI,OAAO,GAAG,QAAQ,EAClB,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,YAAY,EACZ,IAAI,EAAE,aAAa,EACnB,OAAO,EACP,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,YAAY,EAAE,aAAa,EAC3B,SAAS,EAAE,UAAU,EACrB,KAAK,EACL,QAAQ,GAAG,OAAO,EAClB,SAAS,EAAE,MAAM,GAAG,iBAAiB,EACrC,SAAS,GAAG,KAAK,EACjB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,YAAY,GAAG,aAAa,IAAI,CAAC,CAAC,aAAa,CAAC;AACtD,IAAA,MAAM,SAAS,GAAG,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC;AAChD,IAAA,MAAM,WAAW,GAAG,YAAY,EAAE,CAAC;AACnC,IAAA,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE5D,eAAe,CAAC,MAAK;QACjB,MAAM,uBAAuB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9D,uBAAuB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC/D,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;QACnD,MAAM,KA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E,WAAW,EACT,SAAA,EAAA,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,EAE3B,QAAA,EAAA,MAAM,EACL,CAAA,EAAA,CACF,EACI,CAAA,EAChB,IAAI,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,CACjC,CAAC;AACN,CAAC,CAAC;MAEW,cAAc,GAAG,UAAU,CAAC,uBAAuB;;;;"}
|
|
1
|
+
{"version":3,"file":"FloatingButton.js","sources":["../src/FloatingButton.tsx"],"sourcesContent":["import React, { forwardRef, useLayoutEffect, 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 type { PolymorphicComponentWithRef, PolymorphicForwardRefRenderFunc } from '@hh.ru/magritte-types';\nimport { BadgeSize, ComponentWithBadge } from '@hh.ru/magritte-ui-badge';\nimport type { FloatingButtonProps, FloatingButtonPropsWithStackMode } from '@hh.ru/magritte-ui-floating-button/types';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './floating-button.less';\n\nconst ALLOWED_BADGE_SIZES: BadgeSize[] = ['small'];\n\nconst FloatingButtonComponent: PolymorphicForwardRefRenderFunc<FloatingButtonPropsWithStackMode, 'button'> = (\n {\n Element = 'button',\n style = 'neutral',\n disabled,\n borderRadius = 'halfHeight',\n icon: IconComponent,\n postfix,\n loading,\n host,\n children,\n className,\n inlineStyle,\n visible,\n labelOnHover: _labelOnHover,\n hideLabel: _hideLabel,\n badge,\n position = 'right',\n 'data-qa': dataQa = 'floating-button',\n stackMode = false,\n ...restProps\n },\n ref\n) => {\n const labelOnHover = _labelOnHover && !!IconComponent;\n const hideLabel = _hideLabel && !!IconComponent;\n const isServerEnv = useServerEnv();\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [animationTimeout, setAnimationTimeout] = useState(0);\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 const animationTimeout = parseInt(style.getPropertyValue(`--animation-duration`), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n document.body.removeChild(animationTimeoutElement);\n }, []);\n\n if (isServerEnv) {\n return null;\n }\n\n const additionalAttributes: Record<string, unknown> = {\n 'data-qa': dataQa,\n };\n if (Element === 'button') {\n additionalAttributes.type = 'button';\n } else {\n additionalAttributes.role = Element !== 'a' ? 'button' : undefined;\n additionalAttributes['aria-disabled'] = disabled;\n }\n additionalAttributes.ref = ref;\n\n let button = (\n <Element\n {...additionalAttributes}\n {...restProps}\n disabled={!!disabled}\n tabIndex={disabled || loading ? -1 : 0}\n className={classnames(styles.button, styles[`button_style-${style}`], {\n [styles.loading]: !!loading,\n [styles.withLabelOnHover]: !!labelOnHover,\n [styles.hideLabel]: !!hideLabel || !children,\n [styles.withPostfix]: !!postfix,\n [styles.textless]: !postfix && (!children || !!hideLabel),\n [styles.withIconAndLabel]: !!IconComponent && !!children && !hideLabel,\n [styles.stackMode]: !!stackMode,\n })}\n style={{ borderRadius: borderRadius === 'halfHeight' ? '9999px' : `${borderRadius}px` }}\n >\n <span className={styles.content}>\n {IconComponent && (\n <span className={styles.icon}>\n <IconComponent data-qa={`${dataQa}-icon`} />\n </span>\n )}\n <span className={styles.label} data-qa={`${dataQa}-label`}>\n <Text typography={'subtitle-1-semibold'}>{children}</Text>\n </span>\n {postfix && (\n <span className={styles.postfix} data-qa={`${dataQa}-postfix`}>\n <Text typography={'subtitle-1-semibold'}>{postfix}</Text>\n </span>\n )}\n\n {loading && (\n <span className={styles.loader}>\n <Loader size={24} />\n </span>\n )}\n </span>\n </Element>\n );\n\n if (badge && !disabled) {\n button = (\n <ComponentWithBadge allowedSizes={ALLOWED_BADGE_SIZES} badge={badge} offset={stackMode ? 12 : 4} noClip>\n {button}\n </ComponentWithBadge>\n );\n }\n\n if (stackMode) {\n return button;\n }\n\n return createPortal(\n <CSSTransition\n appear\n in={!!visible && !isServerEnv}\n nodeRef={wrapperRef}\n classNames={{\n appear: styles.enterAnimation,\n appearActive: styles.enterAnimationActive,\n enter: styles.enterAnimation,\n enterActive: styles.enterAnimationActive,\n exit: styles.exitAnimation,\n exitActive: styles.exitAnimationActive,\n }}\n timeout={animationTimeout}\n unmountOnExit\n >\n <Layer layer=\"floating-button\">\n <div\n className={classnames(styles.wrapper, styles[`${position}`], className)}\n ref={wrapperRef}\n style={inlineStyle}\n data-qa={`${dataQa}-wrapper`}\n >\n {button}\n </div>\n </Layer>\n </CSSTransition>,\n host?.current || document.body\n );\n};\n\nexport const FloatingButton = forwardRef(FloatingButtonComponent) as PolymorphicComponentWithRef<\n FloatingButtonProps,\n 'button'\n>;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,mBAAmB,GAAgB,CAAC,OAAO,CAAC,CAAC;AAEnD,MAAM,uBAAuB,GAAgF,CACzG,EACI,OAAO,GAAG,QAAQ,EAClB,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,YAAY,GAAG,YAAY,EAC3B,IAAI,EAAE,aAAa,EACnB,OAAO,EACP,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,YAAY,EAAE,aAAa,EAC3B,SAAS,EAAE,UAAU,EACrB,KAAK,EACL,QAAQ,GAAG,OAAO,EAClB,SAAS,EAAE,MAAM,GAAG,iBAAiB,EACrC,SAAS,GAAG,KAAK,EACjB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,YAAY,GAAG,aAAa,IAAI,CAAC,CAAC,aAAa,CAAC;AACtD,IAAA,MAAM,SAAS,GAAG,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC;AAChD,IAAA,MAAM,WAA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AU,EACnB,UAAU,EAAE;YACR,MAAM,EAAE,MAAM,CAAC,cAAc;YAC7B,YAAY,EAAE,MAAM,CAAC,oBAAoB;YACzC,KAAK,EAAE,MAAM,CAAC,cAAc;YAC5B,WAAW,EAAE,MAAM,CAAC,oBAAoB;YACxC,IAAI,EAAE,MAAM,CAAC,aAAa;YAC1B,UAAU,EAAE,MAAM,CAAC,mBAAmB;SACzC,EACD,OAAO,EAAE,gBAAgB,EACzB,aAAa,EAEb,IAAA,EAAA,QAAA,EAAAA,GAAA,CAAC,KAAK,EAAA,EAAC,KAAK,EAAC,iBAAiB,EAAA,QAAA,EAC1BA,aACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAG,EAAA,QAAQ,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,EACvE,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,WAAW,EACT,SAAA,EAAA,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,EAE3B,QAAA,EAAA,MAAM,EACL,CAAA,EAAA,CACF,EACI,CAAA,EAChB,IAAI,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,CACjC,CAAC;AACN,CAAC,CAAC;MAEW,cAAc,GAAG,UAAU,CAAC,uBAAuB;;;;"}
|
package/FloatingButtonStack.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
|
|
|
8
8
|
import { ArrowUpOutlinedSize24 } from '@hh.ru/magritte-ui-icon/variants/icon';
|
|
9
9
|
import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
10
10
|
|
|
11
|
-
var styles = {"stack":"magritte-
|
|
11
|
+
var styles = {"stack":"magritte-stack___v7QhJ_2-0-1","right":"magritte-right___v4PFa_2-0-1","left":"magritte-left___JXzpq_2-0-1","center":"magritte-center___rV3kK_2-0-1","up-button":"magritte-up-button___M-Jgi_2-0-1","upButton":"magritte-up-button___M-Jgi_2-0-1","visible":"magritte-visible___lDPdq_2-0-1","has-visibled-children":"magritte-has-visibled-children___rA8xx_2-0-1","hasVisibledChildren":"magritte-has-visibled-children___rA8xx_2-0-1","floating-buttons":"magritte-floating-buttons___oi9Yx_2-0-1","floatingButtons":"magritte-floating-buttons___oi9Yx_2-0-1","floating-buttons_neutral":"magritte-floating-buttons_neutral___LCnTQ_2-0-1","floatingButtonsNeutral":"magritte-floating-buttons_neutral___LCnTQ_2-0-1","disabled":"magritte-disabled___XSSqS_2-0-1","floating-buttons_inverse":"magritte-floating-buttons_inverse___xhm17_2-0-1","floatingButtonsInverse":"magritte-floating-buttons_inverse___xhm17_2-0-1","floating-button-wrapper":"magritte-floating-button-wrapper___HlTzE_2-0-1","floatingButtonWrapper":"magritte-floating-button-wrapper___HlTzE_2-0-1"};
|
|
12
12
|
|
|
13
13
|
const FloatingButtonStack = forwardRef(({ style = 'neutral', host, children, className, inlineStyle, upButtonVisible, disabled = false, position = 'right', onUpButtonClick, 'data-qa': dataQa = 'floating-button-stack', }, ref) => {
|
|
14
14
|
const isServerEnv = useServerEnv();
|
|
@@ -26,7 +26,7 @@ const FloatingButtonStack = forwardRef(({ style = 'neutral', host, children, cla
|
|
|
26
26
|
postfix: null,
|
|
27
27
|
}));
|
|
28
28
|
const hasVisibledChildren = preparedChildren.filter((floatingButton) => floatingButton.props.visible).length > 0;
|
|
29
|
-
return createPortal(jsx(Layer, { layer: "floating-button", children: jsxs("div", { ref: ref, className: classnames(styles.stack, styles[`${position}`], className), style: inlineStyle, "data-qa": dataQa, children: [jsx("div", { className: classnames(styles.upButton, {
|
|
29
|
+
return createPortal(jsx(Layer, { layer: "floating-button-stack", children: jsxs("div", { ref: ref, className: classnames(styles.stack, styles[`${position}`], className), style: inlineStyle, "data-qa": dataQa, children: [jsx("div", { className: classnames(styles.upButton, {
|
|
30
30
|
[styles.visible]: upButtonVisible,
|
|
31
31
|
[styles.hasVisibledChildren]: hasVisibledChildren,
|
|
32
32
|
}), children: jsx(ArrowUpOutlinedSize24, { padding: isMobile ? 16 : 24, onClick: onUpButtonClick, backgroundStyle: "secondary", borderRadius: 'halfHeight', disabled: disabled, "data-qa": `${dataQa}-up-button` }) }), jsx("div", { className: classnames(styles.floatingButtons, styles[`floating-buttons_${style}`], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingButtonStack.js","sources":["../src/FloatingButtonStack.tsx"],"sourcesContent":["import React, { Children, cloneElement, isValidElement, forwardRef, type LegacyRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport classnames from 'classnames';\n\nimport { useServerEnv } from '@hh.ru/magritte-common-is-server-env';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport type {
|
|
1
|
+
{"version":3,"file":"FloatingButtonStack.js","sources":["../src/FloatingButtonStack.tsx"],"sourcesContent":["import React, { Children, cloneElement, isValidElement, forwardRef, type LegacyRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport classnames from 'classnames';\n\nimport { useServerEnv } from '@hh.ru/magritte-common-is-server-env';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport type {\n FloatingButtonStackProps,\n FloatingButtonPropsWithStackMode,\n} from '@hh.ru/magritte-ui-floating-button/types';\nimport { ArrowUpOutlinedSize24 } from '@hh.ru/magritte-ui-icon/variants/icon';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\n\nimport styles from './floating-button-stack.less';\n\nexport const FloatingButtonStack = forwardRef<HTMLDivElement, FloatingButtonStackProps>(\n (\n {\n style = 'neutral',\n host,\n children,\n className,\n inlineStyle,\n upButtonVisible,\n disabled = false,\n position = 'right',\n onUpButtonClick,\n 'data-qa': dataQa = 'floating-button-stack',\n },\n ref\n ) => {\n const isServerEnv = useServerEnv();\n const { isMobile } = useBreakpoint();\n\n if (isServerEnv) {\n return null;\n }\n\n const preparedChildren = Children.toArray(children)\n .filter(isValidElement<FloatingButtonPropsWithStackMode>)\n .map((child) =>\n cloneElement(child, {\n style,\n disabled,\n stackMode: true,\n children: null,\n postfix: null,\n })\n );\n const hasVisibledChildren =\n preparedChildren.filter((floatingButton) => floatingButton.props.visible).length > 0;\n\n return createPortal(\n <Layer layer=\"floating-button-stack\">\n <div\n ref={ref as LegacyRef<HTMLDivElement>}\n className={classnames(styles.stack, styles[`${position}`], className)}\n style={inlineStyle}\n data-qa={dataQa}\n >\n <div\n className={classnames(styles.upButton, {\n [styles.visible]: upButtonVisible,\n [styles.hasVisibledChildren]: hasVisibledChildren,\n })}\n >\n <ArrowUpOutlinedSize24\n padding={isMobile ? 16 : 24}\n onClick={onUpButtonClick}\n backgroundStyle=\"secondary\"\n borderRadius={'halfHeight'}\n disabled={disabled}\n data-qa={`${dataQa}-up-button`}\n />\n </div>\n <div\n className={classnames(styles.floatingButtons, styles[`floating-buttons_${style}`], {\n [styles.disabled]: disabled,\n [styles.hasVisibledChildren]: hasVisibledChildren,\n })}\n >\n {preparedChildren.map((floatingButton) => {\n const visible = floatingButton.props.visible;\n return (\n <div\n key={floatingButton.key as React.Key}\n className={classnames(styles.floatingButtonWrapper, {\n [styles.visible]: visible,\n })}\n >\n {floatingButton}\n </div>\n );\n })}\n </div>\n </div>\n </Layer>,\n host?.current || document.body\n );\n }\n);\n\nFloatingButtonStack.displayName = 'FloatingButtonStack';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;AAea,MAAA,mBAAmB,GAAG,UAAU,CACzC,CACI,EACI,KAAK,GAAG,SAAS,EACjB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,OAAO,EAClB,eAAe,EACf,SAAS,EAAE,MAAM,GAAG,uBAAuB,GAC9C,EACD,GAAG,KACH;AACA,IAAA,MAAM,WAAW,GAAG,YAAY,EAAE,CAAC;AACnC,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAErC,IAAI,WAAW,EAAE;AACb,QAAA,OAAO,IAAI,CAA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AAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAoB,iBAAA,EAAA,KAAK,CAAE,CAAA,CAAC,EAAE;AAC/E,wBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC3B,wBAAA,CAAC,MAAM,CAAC,mBAAmB,GAAG,mBAAmB;qBACpD,CAAC,EAAA,QAAA,EAED,gBAAgB,CAAC,GAAG,CAAC,CAAC,cAAc,KAAI;AACrC,wBAAA,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC;wBAC7C,QACIA,aAEI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,qBAAqB,EAAE;AAChD,gCAAA,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO;6BAC5B,CAAC,EAAA,QAAA,EAED,cAAc,EALV,EAAA,cAAc,CAAC,GAAgB,CAMlC,EACR;AACN,qBAAC,CAAC,EAAA,CACA,CACJ,EAAA,CAAA,EAAA,CACF,EACR,IAAI,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,CACjC,CAAC;AACN,CAAC,EACH;AAEF,mBAAmB,CAAC,WAAW,GAAG,qBAAqB;;;;"}
|
package/index.css
CHANGED
|
@@ -1,268 +1,265 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
--magritte-color-component-button-background-neutral-v24-0-
|
|
3
|
-
--magritte-color-component-button-background-inverse-v24-0-
|
|
4
|
-
--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
5
|
-
--magritte-color-component-button-background-state-neutral-hovered-v24-0-
|
|
6
|
-
--magritte-color-component-button-background-state-neutral-pressed-v24-0-
|
|
7
|
-
--magritte-color-component-button-background-state-neutral-focused-v24-0-
|
|
8
|
-
--magritte-color-component-button-background-state-inverse-hovered-v24-0-
|
|
9
|
-
--magritte-color-component-button-background-state-inverse-pressed-v24-0-
|
|
10
|
-
--magritte-color-component-button-background-state-inverse-focused-v24-0-
|
|
11
|
-
--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
12
|
-
--magritte-color-component-button-text-neutral-v24-0-
|
|
13
|
-
--magritte-color-component-button-text-inverse-v24-0-
|
|
14
|
-
--magritte-color-component-button-icon-neutral-v24-0-
|
|
15
|
-
--magritte-color-component-button-icon-inverse-v24-0-
|
|
16
|
-
--magritte-color-component-button-loader-icon-neutral-v24-0-
|
|
17
|
-
--magritte-color-component-button-loader-icon-inverse-v24-0-
|
|
18
|
-
--magritte-color-component-button-text-state-neutral-disabled-v24-0-
|
|
19
|
-
--magritte-color-component-button-text-state-inverse-disabled-v24-0-
|
|
20
|
-
--magritte-color-component-button-icon-state-neutral-disabled-v24-0-
|
|
21
|
-
--magritte-color-component-button-icon-state-inverse-disabled-v24-0-
|
|
22
|
-
--magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-
|
|
23
|
-
--magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-
|
|
24
|
-
--magritte-color-component-button-postfix-text-neutral-v24-0-
|
|
25
|
-
--magritte-color-component-button-postfix-text-inverse-v24-0-
|
|
26
|
-
--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-
|
|
27
|
-
--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-
|
|
28
|
-
--magritte-shadow-level-2-color-v24-0-
|
|
29
|
-
--magritte-shadow-level-2-x-v24-0-
|
|
30
|
-
--magritte-shadow-level-2-y-v24-0-
|
|
31
|
-
--magritte-shadow-level-2-blur-v24-0-
|
|
32
|
-
--magritte-shadow-level-2-spread-v24-0-
|
|
33
|
-
--magritte-shadow-level-1-color-v24-0-
|
|
34
|
-
--magritte-shadow-level-1-x-v24-0-
|
|
35
|
-
--magritte-shadow-level-1-y-v24-0-
|
|
36
|
-
--magritte-shadow-level-1-blur-v24-0-
|
|
37
|
-
--magritte-shadow-level-1-spread-v24-0-
|
|
2
|
+
--magritte-color-component-button-background-neutral-v24-0-2:#000000;
|
|
3
|
+
--magritte-color-component-button-background-inverse-v24-0-2:#ffffff;
|
|
4
|
+
--magritte-color-component-button-background-state-neutral-disabled-v24-0-2:#DCE3EB;
|
|
5
|
+
--magritte-color-component-button-background-state-neutral-hovered-v24-0-2:#343c43;
|
|
6
|
+
--magritte-color-component-button-background-state-neutral-pressed-v24-0-2:#000000;
|
|
7
|
+
--magritte-color-component-button-background-state-neutral-focused-v24-0-2:#000000;
|
|
8
|
+
--magritte-color-component-button-background-state-inverse-hovered-v24-0-2:#EEF1F7;
|
|
9
|
+
--magritte-color-component-button-background-state-inverse-pressed-v24-0-2:#ffffff;
|
|
10
|
+
--magritte-color-component-button-background-state-inverse-focused-v24-0-2:#ffffff;
|
|
11
|
+
--magritte-color-component-button-background-state-inverse-disabled-v24-0-2:#ffffff;
|
|
12
|
+
--magritte-color-component-button-text-neutral-v24-0-2:#ffffff;
|
|
13
|
+
--magritte-color-component-button-text-inverse-v24-0-2:#0d1115;
|
|
14
|
+
--magritte-color-component-button-icon-neutral-v24-0-2:#ffffff;
|
|
15
|
+
--magritte-color-component-button-icon-inverse-v24-0-2:#0d1115;
|
|
16
|
+
--magritte-color-component-button-loader-icon-neutral-v24-0-2:#ffffff;
|
|
17
|
+
--magritte-color-component-button-loader-icon-inverse-v24-0-2:#000000;
|
|
18
|
+
--magritte-color-component-button-text-state-neutral-disabled-v24-0-2:#8293a2;
|
|
19
|
+
--magritte-color-component-button-text-state-inverse-disabled-v24-0-2:#8da0b0;
|
|
20
|
+
--magritte-color-component-button-icon-state-neutral-disabled-v24-0-2:#8293a2;
|
|
21
|
+
--magritte-color-component-button-icon-state-inverse-disabled-v24-0-2:#8da0b0;
|
|
22
|
+
--magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-2:#0070ff7a;
|
|
23
|
+
--magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-2:#a4c9fe7a;
|
|
24
|
+
--magritte-color-component-button-postfix-text-neutral-v24-0-2:#AABBCA;
|
|
25
|
+
--magritte-color-component-button-postfix-text-inverse-v24-0-2:#0d1115;
|
|
26
|
+
--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-2:#AABBCA;
|
|
27
|
+
--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-2:#96aabb;
|
|
28
|
+
--magritte-shadow-level-2-color-v24-0-2:#7090b03d;
|
|
29
|
+
--magritte-shadow-level-2-x-v24-0-2:0px;
|
|
30
|
+
--magritte-shadow-level-2-y-v24-0-2:8px;
|
|
31
|
+
--magritte-shadow-level-2-blur-v24-0-2:16px;
|
|
32
|
+
--magritte-shadow-level-2-spread-v24-0-2:0px;
|
|
33
|
+
--magritte-shadow-level-1-color-v24-0-2:#7090b029;
|
|
34
|
+
--magritte-shadow-level-1-x-v24-0-2:0px;
|
|
35
|
+
--magritte-shadow-level-1-y-v24-0-2:4px;
|
|
36
|
+
--magritte-shadow-level-1-blur-v24-0-2:12px;
|
|
37
|
+
--magritte-shadow-level-1-spread-v24-0-2:0px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
:root{
|
|
41
|
-
--magritte-semantic-animation-time-s-duration-v24-0-
|
|
42
|
-
--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
43
|
-
--magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-
|
|
44
|
-
--magritte-semantic-animation-ease-in-out-100-duration-v24-0-
|
|
45
|
-
--magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-
|
|
46
|
-
--magritte-semantic-animation-ease-in-out-200-duration-v24-0-
|
|
41
|
+
--magritte-semantic-animation-time-s-duration-v24-0-2:200ms;
|
|
42
|
+
--magritte-semantic-animation-ease-base-timing-function-v24-0-2:cubic-bezier(0.4, 0.24, 0, 1);
|
|
43
|
+
--magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-2:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
44
|
+
--magritte-semantic-animation-ease-in-out-100-duration-v24-0-2:100ms;
|
|
45
|
+
--magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-2:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
46
|
+
--magritte-semantic-animation-ease-in-out-200-duration-v24-0-2:200ms;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.magritte-night-theme{
|
|
50
|
-
--magritte-color-component-button-background-neutral-v24-0-
|
|
51
|
-
--magritte-color-component-button-background-inverse-v24-0-
|
|
52
|
-
--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
53
|
-
--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
54
|
-
--magritte-color-component-button-background-state-neutral-hovered-v24-0-
|
|
55
|
-
--magritte-color-component-button-background-state-neutral-pressed-v24-0-
|
|
56
|
-
--magritte-color-component-button-background-state-neutral-focused-v24-0-
|
|
57
|
-
--magritte-color-component-button-background-state-inverse-hovered-v24-0-
|
|
58
|
-
--magritte-color-component-button-background-state-inverse-pressed-v24-0-
|
|
59
|
-
--magritte-color-component-button-background-state-inverse-focused-v24-0-
|
|
60
|
-
--magritte-color-component-button-text-neutral-v24-0-
|
|
61
|
-
--magritte-color-component-button-text-inverse-v24-0-
|
|
62
|
-
--magritte-color-component-button-text-state-neutral-disabled-v24-0-
|
|
63
|
-
--magritte-color-component-button-text-state-inverse-disabled-v24-0-
|
|
64
|
-
--magritte-color-component-button-icon-state-neutral-disabled-v24-0-
|
|
65
|
-
--magritte-color-component-button-icon-state-inverse-disabled-v24-0-
|
|
66
|
-
--magritte-color-component-button-icon-neutral-v24-0-
|
|
67
|
-
--magritte-color-component-button-icon-inverse-v24-0-
|
|
68
|
-
--magritte-color-component-button-loader-icon-neutral-v24-0-
|
|
69
|
-
--magritte-color-component-button-loader-icon-inverse-v24-0-
|
|
70
|
-
--magritte-color-component-button-postfix-text-neutral-v24-0-
|
|
71
|
-
--magritte-color-component-button-postfix-text-inverse-v24-0-
|
|
72
|
-
--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-
|
|
73
|
-
--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-
|
|
74
|
-
--magritte-shadow-level-2-color-v24-0-
|
|
75
|
-
--magritte-shadow-level-1-color-v24-0-
|
|
76
|
-
}
|
|
77
|
-
.magritte-
|
|
50
|
+
--magritte-color-component-button-background-neutral-v24-0-2:#ffffff;
|
|
51
|
+
--magritte-color-component-button-background-inverse-v24-0-2:#303030;
|
|
52
|
+
--magritte-color-component-button-background-state-neutral-disabled-v24-0-2:#303030;
|
|
53
|
+
--magritte-color-component-button-background-state-inverse-disabled-v24-0-2:#262626;
|
|
54
|
+
--magritte-color-component-button-background-state-neutral-hovered-v24-0-2:#F1F1F1;
|
|
55
|
+
--magritte-color-component-button-background-state-neutral-pressed-v24-0-2:#ffffff;
|
|
56
|
+
--magritte-color-component-button-background-state-neutral-focused-v24-0-2:#ffffff;
|
|
57
|
+
--magritte-color-component-button-background-state-inverse-hovered-v24-0-2:#3B3B3B;
|
|
58
|
+
--magritte-color-component-button-background-state-inverse-pressed-v24-0-2:#303030;
|
|
59
|
+
--magritte-color-component-button-background-state-inverse-focused-v24-0-2:#303030;
|
|
60
|
+
--magritte-color-component-button-text-neutral-v24-0-2:#000000;
|
|
61
|
+
--magritte-color-component-button-text-inverse-v24-0-2:#ffffff;
|
|
62
|
+
--magritte-color-component-button-text-state-neutral-disabled-v24-0-2:#848484;
|
|
63
|
+
--magritte-color-component-button-text-state-inverse-disabled-v24-0-2:#848484;
|
|
64
|
+
--magritte-color-component-button-icon-state-neutral-disabled-v24-0-2:#848484;
|
|
65
|
+
--magritte-color-component-button-icon-state-inverse-disabled-v24-0-2:#848484;
|
|
66
|
+
--magritte-color-component-button-icon-neutral-v24-0-2:#000000;
|
|
67
|
+
--magritte-color-component-button-icon-inverse-v24-0-2:#ffffff;
|
|
68
|
+
--magritte-color-component-button-loader-icon-neutral-v24-0-2:#000000;
|
|
69
|
+
--magritte-color-component-button-loader-icon-inverse-v24-0-2:#ffffff;
|
|
70
|
+
--magritte-color-component-button-postfix-text-neutral-v24-0-2:#ABABAB;
|
|
71
|
+
--magritte-color-component-button-postfix-text-inverse-v24-0-2:#ABABAB;
|
|
72
|
+
--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-2:#535353;
|
|
73
|
+
--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-2:#535353;
|
|
74
|
+
--magritte-shadow-level-2-color-v24-0-2:#0000003d;
|
|
75
|
+
--magritte-shadow-level-1-color-v24-0-2:#00000029;
|
|
76
|
+
}
|
|
77
|
+
.magritte-wrapper___7m9lC_2-0-1{
|
|
78
78
|
display:inline-block;
|
|
79
79
|
position:fixed;
|
|
80
80
|
}
|
|
81
|
-
.magritte-
|
|
82
|
-
.magritte-animation-
|
|
81
|
+
.magritte-wrapper___7m9lC_2-0-1,
|
|
82
|
+
.magritte-animation-timeout___NL8n0_2-0-1{
|
|
83
83
|
--animation-duration:0;
|
|
84
84
|
}
|
|
85
85
|
@media (prefers-reduced-motion: no-preference){
|
|
86
|
-
.magritte-
|
|
87
|
-
.magritte-animation-
|
|
88
|
-
--animation-duration:var(--magritte-semantic-animation-time-s-duration-v24-0-
|
|
86
|
+
.magritte-wrapper___7m9lC_2-0-1,
|
|
87
|
+
.magritte-animation-timeout___NL8n0_2-0-1{
|
|
88
|
+
--animation-duration:var(--magritte-semantic-animation-time-s-duration-v24-0-2);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
.magritte-button___nL-
|
|
91
|
+
.magritte-button___nL-Hn_2-0-1{
|
|
92
92
|
display:inline-block;
|
|
93
93
|
padding:12px;
|
|
94
94
|
border-radius:24px;
|
|
95
95
|
transition-property:transform;
|
|
96
|
-
transition-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-0-
|
|
97
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-
|
|
96
|
+
transition-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-0-2);
|
|
97
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-2);
|
|
98
98
|
}
|
|
99
|
-
.magritte-button___nL-
|
|
100
|
-
.magritte-button___nL-
|
|
101
|
-
.magritte-button___nL-
|
|
99
|
+
.magritte-button___nL-Hn_2-0-1:disabled,
|
|
100
|
+
.magritte-button___nL-Hn_2-0-1[aria-disabled='true'],
|
|
101
|
+
.magritte-button___nL-Hn_2-0-1.magritte-loading___C0oPZ_2-0-1{
|
|
102
102
|
pointer-events:none;
|
|
103
103
|
cursor:not-allowed;
|
|
104
104
|
}
|
|
105
|
-
.magritte-button___nL-
|
|
106
|
-
.magritte-button___nL-
|
|
105
|
+
.magritte-button___nL-Hn_2-0-1:not(:disabled):active,
|
|
106
|
+
.magritte-button___nL-Hn_2-0-1:not([aria-disabled='true']):active{
|
|
107
107
|
transform:scale(0.96);
|
|
108
|
-
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-0-
|
|
109
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-
|
|
108
|
+
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-0-2);
|
|
109
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-2);
|
|
110
110
|
}
|
|
111
|
-
.magritte-withIconAndLabel___Qa-
|
|
111
|
+
.magritte-withIconAndLabel___Qa-lU_2-0-1{
|
|
112
112
|
padding:12px 16px;
|
|
113
113
|
}
|
|
114
|
-
.magritte-
|
|
114
|
+
.magritte-right___3n0Rz_2-0-1{
|
|
115
115
|
right:16px;
|
|
116
116
|
bottom:20px;
|
|
117
117
|
}
|
|
118
118
|
@media (min-width: 1020px){
|
|
119
|
-
body.magritte-old-layout .magritte-
|
|
119
|
+
body.magritte-old-layout .magritte-right___3n0Rz_2-0-1{
|
|
120
120
|
right:36px;
|
|
121
121
|
bottom:32px;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
@media (min-width: 1024px){
|
|
125
|
-
body:not(.magritte-old-layout) .magritte-
|
|
125
|
+
body:not(.magritte-old-layout) .magritte-right___3n0Rz_2-0-1{
|
|
126
126
|
right:36px;
|
|
127
127
|
bottom:32px;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
.magritte-
|
|
130
|
+
.magritte-right___3n0Rz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
131
131
|
justify-content:end;
|
|
132
132
|
}
|
|
133
|
-
.magritte-
|
|
133
|
+
.magritte-left___GnzU7_2-0-1{
|
|
134
134
|
left:16px;
|
|
135
135
|
bottom:20px;
|
|
136
136
|
}
|
|
137
137
|
@media (min-width: 1020px){
|
|
138
|
-
body.magritte-old-layout .magritte-
|
|
138
|
+
body.magritte-old-layout .magritte-left___GnzU7_2-0-1{
|
|
139
139
|
left:36px;
|
|
140
140
|
bottom:32px;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
@media (min-width: 1024px){
|
|
144
|
-
body:not(.magritte-old-layout) .magritte-
|
|
144
|
+
body:not(.magritte-old-layout) .magritte-left___GnzU7_2-0-1{
|
|
145
145
|
left:36px;
|
|
146
146
|
bottom:32px;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
.magritte-
|
|
149
|
+
.magritte-left___GnzU7_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
150
150
|
justify-content:start;
|
|
151
151
|
}
|
|
152
|
-
.magritte-
|
|
152
|
+
.magritte-center___MdA40_2-0-1{
|
|
153
153
|
left:50%;
|
|
154
154
|
bottom:20px;
|
|
155
155
|
transform:translateX(-50%);
|
|
156
156
|
}
|
|
157
157
|
@media (min-width: 1020px){
|
|
158
|
-
body.magritte-old-layout .magritte-
|
|
158
|
+
body.magritte-old-layout .magritte-center___MdA40_2-0-1{
|
|
159
159
|
bottom:32px;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
@media (min-width: 1024px){
|
|
163
|
-
body:not(.magritte-old-layout) .magritte-
|
|
163
|
+
body:not(.magritte-old-layout) .magritte-center___MdA40_2-0-1{
|
|
164
164
|
bottom:32px;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
.magritte-
|
|
167
|
+
.magritte-center___MdA40_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
168
168
|
justify-content:space-between;
|
|
169
169
|
}
|
|
170
|
-
.magritte-
|
|
170
|
+
.magritte-postfix___r0EZ6_2-0-1{
|
|
171
171
|
padding:0 4px;
|
|
172
172
|
}
|
|
173
|
-
.magritte-
|
|
173
|
+
.magritte-icon___VpqJt_2-0-1{
|
|
174
174
|
margin-right:4px;
|
|
175
175
|
}
|
|
176
|
-
.magritte-
|
|
176
|
+
.magritte-textless___IbYgp_2-0-1 .magritte-icon___VpqJt_2-0-1{
|
|
177
177
|
margin:0;
|
|
178
178
|
}
|
|
179
|
-
.magritte-
|
|
179
|
+
.magritte-label___EPgvj_2-0-1{
|
|
180
180
|
text-align:left;
|
|
181
181
|
overflow:hidden;
|
|
182
182
|
transition-property:padding;
|
|
183
183
|
transition-duration:var(--animation-duration);
|
|
184
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
184
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
185
185
|
padding:0 4px;
|
|
186
186
|
}
|
|
187
|
-
.magritte-
|
|
187
|
+
.magritte-content___JNpTZ_2-0-1{
|
|
188
188
|
display:inline-grid;
|
|
189
189
|
justify-content:flex-end;
|
|
190
190
|
grid-template-columns:max-content 1fr;
|
|
191
191
|
transition-property:grid-template-columns;
|
|
192
192
|
min-height:24px;
|
|
193
193
|
transition-duration:var(--animation-duration);
|
|
194
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
194
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
195
195
|
}
|
|
196
|
-
.magritte-
|
|
196
|
+
.magritte-withPostfix___PmQAz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
197
197
|
grid-template-columns:max-content 1fr max-content;
|
|
198
198
|
}
|
|
199
|
-
.magritte-
|
|
199
|
+
.magritte-hideLabel___K79XM_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
200
200
|
grid-template-columns:max-content 0fr;
|
|
201
201
|
}
|
|
202
|
-
.magritte-
|
|
202
|
+
.magritte-hideLabel___K79XM_2-0-1 .magritte-label___EPgvj_2-0-1{
|
|
203
203
|
padding:0;
|
|
204
204
|
}
|
|
205
|
-
.magritte-
|
|
205
|
+
.magritte-hideLabel___K79XM_2-0-1.magritte-withPostfix___PmQAz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
206
206
|
grid-template-columns:max-content 0fr max-content;
|
|
207
207
|
}
|
|
208
|
-
.magritte-
|
|
208
|
+
.magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1).magritte-withIconAndLabel___Qa-lU_2-0-1{
|
|
209
209
|
padding:12px;
|
|
210
210
|
}
|
|
211
|
-
.magritte-
|
|
211
|
+
.magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):not(.magritte-withPostfix___PmQAz_2-0-1) .magritte-icon___VpqJt_2-0-1{
|
|
212
212
|
margin:0;
|
|
213
213
|
}
|
|
214
|
-
.magritte-
|
|
214
|
+
.magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1) .magritte-content___JNpTZ_2-0-1{
|
|
215
215
|
grid-template-columns:max-content 0fr;
|
|
216
216
|
}
|
|
217
|
-
.magritte-
|
|
217
|
+
.magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1).magritte-withPostfix___PmQAz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
218
218
|
grid-template-columns:max-content 0fr max-content;
|
|
219
219
|
}
|
|
220
|
-
.magritte-
|
|
220
|
+
.magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1) .magritte-label___EPgvj_2-0-1{
|
|
221
221
|
padding:0;
|
|
222
222
|
}
|
|
223
223
|
@media (min-width: 1020px){
|
|
224
|
-
body.magritte-old-layout .magritte-
|
|
224
|
+
body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_2-0-1{
|
|
225
225
|
padding:12px 16px;
|
|
226
226
|
}
|
|
227
|
-
body.magritte-old-layout .magritte-
|
|
227
|
+
body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_2-0-1{
|
|
228
228
|
margin-right:4px;
|
|
229
229
|
}
|
|
230
|
-
body.magritte-old-layout .magritte-
|
|
230
|
+
body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_2-0-1{
|
|
231
231
|
grid-template-columns:max-content 1fr;
|
|
232
232
|
}
|
|
233
|
-
body.magritte-old-layout .magritte-
|
|
233
|
+
body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
234
234
|
grid-template-columns:max-content 1fr max-content;
|
|
235
235
|
}
|
|
236
|
-
body.magritte-old-layout .magritte-
|
|
236
|
+
body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_2-0-1{
|
|
237
237
|
padding:0 4px;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
@media (min-width: 1024px){
|
|
241
|
-
body:not(.magritte-old-layout) .magritte-
|
|
241
|
+
body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_2-0-1{
|
|
242
242
|
padding:12px 16px;
|
|
243
243
|
}
|
|
244
|
-
body:not(.magritte-old-layout) .magritte-
|
|
244
|
+
body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_2-0-1{
|
|
245
245
|
margin-right:4px;
|
|
246
246
|
}
|
|
247
|
-
body:not(.magritte-old-layout) .magritte-
|
|
247
|
+
body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_2-0-1{
|
|
248
248
|
grid-template-columns:max-content 1fr;
|
|
249
249
|
}
|
|
250
|
-
body:not(.magritte-old-layout) .magritte-
|
|
250
|
+
body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_2-0-1 .magritte-content___JNpTZ_2-0-1{
|
|
251
251
|
grid-template-columns:max-content 1fr max-content;
|
|
252
252
|
}
|
|
253
|
-
body:not(.magritte-old-layout) .magritte-
|
|
253
|
+
body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-1:not(.magritte-hideLabel___K79XM_2-0-1):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_2-0-1{
|
|
254
254
|
padding:0 4px;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
.magritte-
|
|
258
|
-
.magritte-
|
|
259
|
-
.magritte-
|
|
257
|
+
.magritte-loading___C0oPZ_2-0-1 .magritte-postfix___r0EZ6_2-0-1,
|
|
258
|
+
.magritte-loading___C0oPZ_2-0-1 .magritte-icon___VpqJt_2-0-1,
|
|
259
|
+
.magritte-loading___C0oPZ_2-0-1 .magritte-label___EPgvj_2-0-1{
|
|
260
260
|
visibility:hidden;
|
|
261
261
|
}
|
|
262
|
-
.magritte-
|
|
263
|
-
border-radius:12px;
|
|
264
|
-
}
|
|
265
|
-
.magritte-loader___EPezG_1-3-0{
|
|
262
|
+
.magritte-loader___EPezG_2-0-1{
|
|
266
263
|
position:absolute;
|
|
267
264
|
left:50%;
|
|
268
265
|
top:50%;
|
|
@@ -270,268 +267,268 @@
|
|
|
270
267
|
line-height:0;
|
|
271
268
|
overflow:hidden;
|
|
272
269
|
}
|
|
273
|
-
.magritte-enter-
|
|
270
|
+
.magritte-enter-animation___2sPz3_2-0-1{
|
|
274
271
|
opacity:0;
|
|
275
272
|
}
|
|
276
|
-
.magritte-enter-animation-
|
|
273
|
+
.magritte-enter-animation-active___Lq9eq_2-0-1{
|
|
277
274
|
opacity:1;
|
|
278
275
|
transition-property:opacity;
|
|
279
276
|
transition-duration:var(--animation-duration);
|
|
280
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
277
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
281
278
|
}
|
|
282
|
-
.magritte-exit-animation___h2-
|
|
279
|
+
.magritte-exit-animation___h2-7a_2-0-1{
|
|
283
280
|
opacity:1;
|
|
284
281
|
}
|
|
285
|
-
.magritte-exit-animation-
|
|
282
|
+
.magritte-exit-animation-active___w0F1a_2-0-1{
|
|
286
283
|
opacity:0;
|
|
287
284
|
transition-property:opacity;
|
|
288
285
|
transition-duration:var(--animation-duration);
|
|
289
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
286
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
290
287
|
}
|
|
291
|
-
.magritte-button_style-
|
|
292
|
-
background:var(--magritte-color-component-button-background-neutral-v24-0-
|
|
293
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-neutral-v24-0-
|
|
294
|
-
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-neutral-v24-0-
|
|
295
|
-
box-shadow:var(--magritte-shadow-level-2-x-v24-0-
|
|
296
|
-
--magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-neutral-v24-0-
|
|
288
|
+
.magritte-button_style-neutral___bPUwu_2-0-1{
|
|
289
|
+
background:var(--magritte-color-component-button-background-neutral-v24-0-2);
|
|
290
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-neutral-v24-0-2);
|
|
291
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-neutral-v24-0-2);
|
|
292
|
+
box-shadow:var(--magritte-shadow-level-2-x-v24-0-2) var(--magritte-shadow-level-2-y-v24-0-2) var(--magritte-shadow-level-2-blur-v24-0-2) var(--magritte-shadow-level-2-spread-v24-0-2) var(--magritte-shadow-level-2-color-v24-0-2);
|
|
293
|
+
--magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-neutral-v24-0-2);
|
|
297
294
|
}
|
|
298
|
-
.magritte-button_style-
|
|
299
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-neutral-v24-0-
|
|
295
|
+
.magritte-button_style-neutral___bPUwu_2-0-1 .magritte-postfix___r0EZ6_2-0-1{
|
|
296
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-neutral-v24-0-2);
|
|
300
297
|
}
|
|
301
|
-
.magritte-button_style-
|
|
298
|
+
.magritte-button_style-neutral___bPUwu_2-0-1.magritte-stackMode___RdOTJ_2-0-1{
|
|
302
299
|
box-shadow:none;
|
|
303
300
|
}
|
|
304
|
-
.magritte-button_style-
|
|
305
|
-
outline:4px solid var(--magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-
|
|
306
|
-
background:var(--magritte-color-component-button-background-state-neutral-focused-v24-0-
|
|
301
|
+
.magritte-button_style-neutral___bPUwu_2-0-1.focus-visible{
|
|
302
|
+
outline:4px solid var(--magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-2);
|
|
303
|
+
background:var(--magritte-color-component-button-background-state-neutral-focused-v24-0-2);
|
|
307
304
|
}
|
|
308
|
-
.magritte-button_style-
|
|
309
|
-
.magritte-button_style-
|
|
310
|
-
background:var(--magritte-color-component-button-background-state-neutral-pressed-v24-0-
|
|
305
|
+
.magritte-button_style-neutral___bPUwu_2-0-1:not(:disabled):active,
|
|
306
|
+
.magritte-button_style-neutral___bPUwu_2-0-1:not([aria-disabled='true']):active{
|
|
307
|
+
background:var(--magritte-color-component-button-background-state-neutral-pressed-v24-0-2);
|
|
311
308
|
}
|
|
312
|
-
.magritte-button_style-
|
|
313
|
-
.magritte-button_style-
|
|
314
|
-
background:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
315
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-neutral-disabled-v24-0-
|
|
316
|
-
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-neutral-disabled-v24-0-
|
|
309
|
+
.magritte-button_style-neutral___bPUwu_2-0-1:disabled,
|
|
310
|
+
.magritte-button_style-neutral___bPUwu_2-0-1[aria-disabled='true']{
|
|
311
|
+
background:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-2);
|
|
312
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-neutral-disabled-v24-0-2);
|
|
313
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-neutral-disabled-v24-0-2);
|
|
317
314
|
}
|
|
318
|
-
.magritte-button_style-
|
|
319
|
-
.magritte-button_style-
|
|
320
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-
|
|
315
|
+
.magritte-button_style-neutral___bPUwu_2-0-1:disabled .magritte-postfix___r0EZ6_2-0-1,
|
|
316
|
+
.magritte-button_style-neutral___bPUwu_2-0-1[aria-disabled='true'] .magritte-postfix___r0EZ6_2-0-1{
|
|
317
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-2);
|
|
321
318
|
}
|
|
322
319
|
@media (min-width: 1020px){
|
|
323
|
-
body.magritte-old-layout .magritte-button_style-
|
|
324
|
-
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-
|
|
320
|
+
body.magritte-old-layout .magritte-button_style-neutral___bPUwu_2-0-1:hover:not(:active):not(:disabled):not([aria-disabled='true']){
|
|
321
|
+
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-2));
|
|
325
322
|
}
|
|
326
323
|
}
|
|
327
324
|
@media (min-width: 1024px){
|
|
328
|
-
body:not(.magritte-old-layout) .magritte-button_style-
|
|
329
|
-
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-
|
|
325
|
+
body:not(.magritte-old-layout) .magritte-button_style-neutral___bPUwu_2-0-1:hover:not(:active):not(:disabled):not([aria-disabled='true']){
|
|
326
|
+
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-2));
|
|
330
327
|
}
|
|
331
328
|
}
|
|
332
|
-
.magritte-button_style-
|
|
333
|
-
background:var(--magritte-color-component-button-background-inverse-v24-0-
|
|
334
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-inverse-v24-0-
|
|
335
|
-
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-inverse-v24-0-
|
|
336
|
-
box-shadow:var(--magritte-shadow-level-1-x-v24-0-
|
|
337
|
-
--magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-inverse-v24-0-
|
|
329
|
+
.magritte-button_style-inverse___Xgf26_2-0-1{
|
|
330
|
+
background:var(--magritte-color-component-button-background-inverse-v24-0-2);
|
|
331
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-inverse-v24-0-2);
|
|
332
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-inverse-v24-0-2);
|
|
333
|
+
box-shadow:var(--magritte-shadow-level-1-x-v24-0-2) var(--magritte-shadow-level-1-y-v24-0-2) var(--magritte-shadow-level-1-blur-v24-0-2) var(--magritte-shadow-level-1-spread-v24-0-2) var(--magritte-shadow-level-1-color-v24-0-2);
|
|
334
|
+
--magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-inverse-v24-0-2);
|
|
338
335
|
}
|
|
339
|
-
.magritte-button_style-
|
|
340
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-inverse-v24-0-
|
|
336
|
+
.magritte-button_style-inverse___Xgf26_2-0-1 .magritte-postfix___r0EZ6_2-0-1{
|
|
337
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-inverse-v24-0-2);
|
|
341
338
|
}
|
|
342
|
-
.magritte-button_style-
|
|
339
|
+
.magritte-button_style-inverse___Xgf26_2-0-1.magritte-stackMode___RdOTJ_2-0-1{
|
|
343
340
|
box-shadow:none;
|
|
344
341
|
}
|
|
345
|
-
.magritte-button_style-
|
|
346
|
-
outline:4px solid var(--magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-
|
|
347
|
-
background:var(--magritte-color-component-button-background-state-inverse-focused-v24-0-
|
|
342
|
+
.magritte-button_style-inverse___Xgf26_2-0-1.focus-visible{
|
|
343
|
+
outline:4px solid var(--magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-2);
|
|
344
|
+
background:var(--magritte-color-component-button-background-state-inverse-focused-v24-0-2);
|
|
348
345
|
}
|
|
349
|
-
.magritte-button_style-
|
|
350
|
-
.magritte-button_style-
|
|
351
|
-
background:var(--magritte-color-component-button-background-state-inverse-pressed-v24-0-
|
|
346
|
+
.magritte-button_style-inverse___Xgf26_2-0-1:not(:disabled):active,
|
|
347
|
+
.magritte-button_style-inverse___Xgf26_2-0-1:not([aria-disabled='true']):active{
|
|
348
|
+
background:var(--magritte-color-component-button-background-state-inverse-pressed-v24-0-2);
|
|
352
349
|
}
|
|
353
|
-
.magritte-button_style-
|
|
354
|
-
.magritte-button_style-
|
|
355
|
-
background:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
356
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-inverse-disabled-v24-0-
|
|
357
|
-
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-inverse-disabled-v24-0-
|
|
350
|
+
.magritte-button_style-inverse___Xgf26_2-0-1:disabled,
|
|
351
|
+
.magritte-button_style-inverse___Xgf26_2-0-1[aria-disabled='true']{
|
|
352
|
+
background:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-2);
|
|
353
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-inverse-disabled-v24-0-2);
|
|
354
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-inverse-disabled-v24-0-2);
|
|
358
355
|
}
|
|
359
|
-
.magritte-button_style-
|
|
360
|
-
.magritte-button_style-
|
|
361
|
-
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-
|
|
356
|
+
.magritte-button_style-inverse___Xgf26_2-0-1:disabled .magritte-postfix___r0EZ6_2-0-1,
|
|
357
|
+
.magritte-button_style-inverse___Xgf26_2-0-1[aria-disabled='true'] .magritte-postfix___r0EZ6_2-0-1{
|
|
358
|
+
--magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-2);
|
|
362
359
|
}
|
|
363
360
|
@media (min-width: 1020px){
|
|
364
|
-
body.magritte-old-layout .magritte-button_style-
|
|
365
|
-
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-
|
|
361
|
+
body.magritte-old-layout .magritte-button_style-inverse___Xgf26_2-0-1:hover:not(:active):not(:disabled):not([aria-disabled='true']){
|
|
362
|
+
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-2));
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
365
|
@media (min-width: 1024px){
|
|
369
|
-
body:not(.magritte-old-layout) .magritte-button_style-
|
|
370
|
-
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-
|
|
366
|
+
body:not(.magritte-old-layout) .magritte-button_style-inverse___Xgf26_2-0-1:hover:not(:active):not(:disabled):not([aria-disabled='true']){
|
|
367
|
+
background:var(--magritte-ui-flb-background-color-hovered-override, var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-2));
|
|
371
368
|
}
|
|
372
369
|
}
|
|
373
370
|
|
|
374
371
|
:root{
|
|
375
|
-
--magritte-color-component-button-background-neutral-v24-0-
|
|
376
|
-
--magritte-color-component-button-background-inverse-v24-0-
|
|
377
|
-
--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
378
|
-
--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
379
|
-
--magritte-shadow-level-2-color-v24-0-
|
|
380
|
-
--magritte-shadow-level-2-x-v24-0-
|
|
381
|
-
--magritte-shadow-level-2-y-v24-0-
|
|
382
|
-
--magritte-shadow-level-2-blur-v24-0-
|
|
383
|
-
--magritte-shadow-level-2-spread-v24-0-
|
|
384
|
-
--magritte-shadow-level-1-color-v24-0-
|
|
385
|
-
--magritte-shadow-level-1-x-v24-0-
|
|
386
|
-
--magritte-shadow-level-1-y-v24-0-
|
|
387
|
-
--magritte-shadow-level-1-blur-v24-0-
|
|
388
|
-
--magritte-shadow-level-1-spread-v24-0-
|
|
372
|
+
--magritte-color-component-button-background-neutral-v24-0-2:#000000;
|
|
373
|
+
--magritte-color-component-button-background-inverse-v24-0-2:#ffffff;
|
|
374
|
+
--magritte-color-component-button-background-state-neutral-disabled-v24-0-2:#DCE3EB;
|
|
375
|
+
--magritte-color-component-button-background-state-inverse-disabled-v24-0-2:#ffffff;
|
|
376
|
+
--magritte-shadow-level-2-color-v24-0-2:#7090b03d;
|
|
377
|
+
--magritte-shadow-level-2-x-v24-0-2:0px;
|
|
378
|
+
--magritte-shadow-level-2-y-v24-0-2:8px;
|
|
379
|
+
--magritte-shadow-level-2-blur-v24-0-2:16px;
|
|
380
|
+
--magritte-shadow-level-2-spread-v24-0-2:0px;
|
|
381
|
+
--magritte-shadow-level-1-color-v24-0-2:#7090b029;
|
|
382
|
+
--magritte-shadow-level-1-x-v24-0-2:0px;
|
|
383
|
+
--magritte-shadow-level-1-y-v24-0-2:4px;
|
|
384
|
+
--magritte-shadow-level-1-blur-v24-0-2:12px;
|
|
385
|
+
--magritte-shadow-level-1-spread-v24-0-2:0px;
|
|
389
386
|
}
|
|
390
387
|
|
|
391
388
|
:root{
|
|
392
|
-
--magritte-semantic-animation-time-s-duration-v24-0-
|
|
393
|
-
--magritte-semantic-animation-ease-base-timing-function-v24-0-
|
|
389
|
+
--magritte-semantic-animation-time-s-duration-v24-0-2:200ms;
|
|
390
|
+
--magritte-semantic-animation-ease-base-timing-function-v24-0-2:cubic-bezier(0.4, 0.24, 0, 1);
|
|
394
391
|
}
|
|
395
392
|
|
|
396
393
|
.magritte-night-theme{
|
|
397
|
-
--magritte-color-component-button-background-neutral-v24-0-
|
|
398
|
-
--magritte-color-component-button-background-inverse-v24-0-
|
|
399
|
-
--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
400
|
-
--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
401
|
-
--magritte-shadow-level-2-color-v24-0-
|
|
402
|
-
--magritte-shadow-level-1-color-v24-0-
|
|
403
|
-
}
|
|
404
|
-
.magritte-
|
|
394
|
+
--magritte-color-component-button-background-neutral-v24-0-2:#ffffff;
|
|
395
|
+
--magritte-color-component-button-background-inverse-v24-0-2:#303030;
|
|
396
|
+
--magritte-color-component-button-background-state-neutral-disabled-v24-0-2:#303030;
|
|
397
|
+
--magritte-color-component-button-background-state-inverse-disabled-v24-0-2:#262626;
|
|
398
|
+
--magritte-shadow-level-2-color-v24-0-2:#0000003d;
|
|
399
|
+
--magritte-shadow-level-1-color-v24-0-2:#00000029;
|
|
400
|
+
}
|
|
401
|
+
.magritte-stack___v7QhJ_2-0-1{
|
|
405
402
|
display:inline-flex;
|
|
406
403
|
position:fixed;
|
|
407
404
|
flex-direction:column;
|
|
408
405
|
}
|
|
409
|
-
.magritte-
|
|
406
|
+
.magritte-right___v4PFa_2-0-1{
|
|
410
407
|
right:16px;
|
|
411
408
|
bottom:20px;
|
|
412
409
|
}
|
|
413
410
|
@media (min-width: 1020px){
|
|
414
|
-
body.magritte-old-layout .magritte-
|
|
411
|
+
body.magritte-old-layout .magritte-right___v4PFa_2-0-1{
|
|
415
412
|
right:36px;
|
|
416
413
|
bottom:32px;
|
|
417
414
|
}
|
|
418
415
|
}
|
|
419
416
|
@media (min-width: 1024px){
|
|
420
|
-
body:not(.magritte-old-layout) .magritte-
|
|
417
|
+
body:not(.magritte-old-layout) .magritte-right___v4PFa_2-0-1{
|
|
421
418
|
right:36px;
|
|
422
419
|
bottom:32px;
|
|
423
420
|
}
|
|
424
421
|
}
|
|
425
|
-
.magritte-
|
|
422
|
+
.magritte-left___JXzpq_2-0-1{
|
|
426
423
|
left:16px;
|
|
427
424
|
bottom:20px;
|
|
428
425
|
}
|
|
429
426
|
@media (min-width: 1020px){
|
|
430
|
-
body.magritte-old-layout .magritte-
|
|
427
|
+
body.magritte-old-layout .magritte-left___JXzpq_2-0-1{
|
|
431
428
|
left:36px;
|
|
432
429
|
bottom:32px;
|
|
433
430
|
}
|
|
434
431
|
}
|
|
435
432
|
@media (min-width: 1024px){
|
|
436
|
-
body:not(.magritte-old-layout) .magritte-
|
|
433
|
+
body:not(.magritte-old-layout) .magritte-left___JXzpq_2-0-1{
|
|
437
434
|
left:36px;
|
|
438
435
|
bottom:32px;
|
|
439
436
|
}
|
|
440
437
|
}
|
|
441
|
-
.magritte-
|
|
438
|
+
.magritte-center___rV3kK_2-0-1{
|
|
442
439
|
left:50%;
|
|
443
440
|
bottom:20px;
|
|
444
441
|
transform:translateX(-50%);
|
|
445
442
|
}
|
|
446
443
|
@media (min-width: 1020px){
|
|
447
|
-
body.magritte-old-layout .magritte-
|
|
444
|
+
body.magritte-old-layout .magritte-center___rV3kK_2-0-1{
|
|
448
445
|
bottom:32px;
|
|
449
446
|
}
|
|
450
447
|
}
|
|
451
448
|
@media (min-width: 1024px){
|
|
452
|
-
body:not(.magritte-old-layout) .magritte-
|
|
449
|
+
body:not(.magritte-old-layout) .magritte-center___rV3kK_2-0-1{
|
|
453
450
|
bottom:32px;
|
|
454
451
|
}
|
|
455
452
|
}
|
|
456
|
-
.magritte-up-button___M-
|
|
453
|
+
.magritte-up-button___M-Jgi_2-0-1{
|
|
457
454
|
opacity:0;
|
|
458
455
|
height:0;
|
|
459
|
-
transition:height var(--magritte-semantic-animation-time-s-duration-v24-0-
|
|
456
|
+
transition:height var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2), opacity var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
460
457
|
}
|
|
461
|
-
.magritte-up-button___M-
|
|
458
|
+
.magritte-up-button___M-Jgi_2-0-1.magritte-visible___lDPdq_2-0-1{
|
|
462
459
|
height:56px;
|
|
463
460
|
opacity:1;
|
|
464
461
|
}
|
|
465
|
-
.magritte-up-button___M-
|
|
462
|
+
.magritte-up-button___M-Jgi_2-0-1.magritte-visible___lDPdq_2-0-1.magritte-has-visibled-children___rA8xx_2-0-1{
|
|
466
463
|
margin-bottom:12px;
|
|
467
464
|
}
|
|
468
465
|
@media (min-width: 1020px){
|
|
469
|
-
body.magritte-old-layout .magritte-up-button___M-
|
|
466
|
+
body.magritte-old-layout .magritte-up-button___M-Jgi_2-0-1.magritte-visible___lDPdq_2-0-1{
|
|
470
467
|
height:72px;
|
|
471
468
|
}
|
|
472
469
|
}
|
|
473
470
|
@media (min-width: 1024px){
|
|
474
|
-
body:not(.magritte-old-layout) .magritte-up-button___M-
|
|
471
|
+
body:not(.magritte-old-layout) .magritte-up-button___M-Jgi_2-0-1.magritte-visible___lDPdq_2-0-1{
|
|
475
472
|
height:72px;
|
|
476
473
|
}
|
|
477
474
|
}
|
|
478
|
-
.magritte-floating-
|
|
475
|
+
.magritte-floating-buttons___oi9Yx_2-0-1{
|
|
479
476
|
display:flex;
|
|
480
477
|
flex-direction:column;
|
|
481
478
|
padding:0 4px;
|
|
482
479
|
opacity:0;
|
|
483
480
|
border-radius:40px;
|
|
484
481
|
overflow:hidden;
|
|
485
|
-
transition:opacity var(--magritte-semantic-animation-time-s-duration-v24-0-
|
|
482
|
+
transition:opacity var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2), padding var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
486
483
|
z-index:1;
|
|
487
484
|
}
|
|
488
|
-
.magritte-floating-
|
|
485
|
+
.magritte-floating-buttons___oi9Yx_2-0-1.magritte-has-visibled-children___rA8xx_2-0-1{
|
|
489
486
|
padding:4px;
|
|
490
487
|
opacity:1;
|
|
491
488
|
}
|
|
492
489
|
@media (min-width: 1020px){
|
|
493
|
-
body.magritte-old-layout .magritte-floating-
|
|
490
|
+
body.magritte-old-layout .magritte-floating-buttons___oi9Yx_2-0-1{
|
|
494
491
|
padding:0 12px;
|
|
495
492
|
}
|
|
496
|
-
body.magritte-old-layout .magritte-floating-
|
|
493
|
+
body.magritte-old-layout .magritte-floating-buttons___oi9Yx_2-0-1.magritte-has-visibled-children___rA8xx_2-0-1{
|
|
497
494
|
padding:12px;
|
|
498
495
|
}
|
|
499
496
|
}
|
|
500
497
|
@media (min-width: 1024px){
|
|
501
|
-
body:not(.magritte-old-layout) .magritte-floating-
|
|
498
|
+
body:not(.magritte-old-layout) .magritte-floating-buttons___oi9Yx_2-0-1{
|
|
502
499
|
padding:0 12px;
|
|
503
500
|
}
|
|
504
|
-
body:not(.magritte-old-layout) .magritte-floating-
|
|
501
|
+
body:not(.magritte-old-layout) .magritte-floating-buttons___oi9Yx_2-0-1.magritte-has-visibled-children___rA8xx_2-0-1{
|
|
505
502
|
padding:12px;
|
|
506
503
|
}
|
|
507
504
|
}
|
|
508
|
-
.magritte-floating-
|
|
509
|
-
background-color:var(--magritte-color-component-button-background-neutral-v24-0-
|
|
510
|
-
box-shadow:var(--magritte-shadow-level-2-x-v24-0-
|
|
511
|
-
--magritte-ui-flb-background-color-hovered-override:var(--magritte-color-component-button-background-neutral-v24-0-
|
|
512
|
-
--magritte-ui-badge-border-color-override:var(--magritte-color-component-button-background-neutral-v24-0-
|
|
505
|
+
.magritte-floating-buttons_neutral___LCnTQ_2-0-1{
|
|
506
|
+
background-color:var(--magritte-color-component-button-background-neutral-v24-0-2);
|
|
507
|
+
box-shadow:var(--magritte-shadow-level-2-x-v24-0-2) var(--magritte-shadow-level-2-y-v24-0-2) var(--magritte-shadow-level-2-blur-v24-0-2) var(--magritte-shadow-level-2-spread-v24-0-2) var(--magritte-shadow-level-2-color-v24-0-2);
|
|
508
|
+
--magritte-ui-flb-background-color-hovered-override:var(--magritte-color-component-button-background-neutral-v24-0-2);
|
|
509
|
+
--magritte-ui-badge-border-color-override:var(--magritte-color-component-button-background-neutral-v24-0-2);
|
|
513
510
|
}
|
|
514
|
-
.magritte-floating-
|
|
515
|
-
background-color:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-
|
|
511
|
+
.magritte-floating-buttons_neutral___LCnTQ_2-0-1.magritte-disabled___XSSqS_2-0-1{
|
|
512
|
+
background-color:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-2);
|
|
516
513
|
}
|
|
517
|
-
.magritte-floating-
|
|
518
|
-
background-color:var(--magritte-color-component-button-background-inverse-v24-0-
|
|
519
|
-
box-shadow:var(--magritte-shadow-level-1-x-v24-0-
|
|
520
|
-
--magritte-ui-flb-background-color-hovered-override:var(--magritte-color-component-button-background-inverse-v24-0-
|
|
521
|
-
--magritte-ui-badge-border-color-override:var(--magritte-color-component-button-background-inverse-v24-0-
|
|
514
|
+
.magritte-floating-buttons_inverse___xhm17_2-0-1{
|
|
515
|
+
background-color:var(--magritte-color-component-button-background-inverse-v24-0-2);
|
|
516
|
+
box-shadow:var(--magritte-shadow-level-1-x-v24-0-2) var(--magritte-shadow-level-1-y-v24-0-2) var(--magritte-shadow-level-1-blur-v24-0-2) var(--magritte-shadow-level-1-spread-v24-0-2) var(--magritte-shadow-level-1-color-v24-0-2);
|
|
517
|
+
--magritte-ui-flb-background-color-hovered-override:var(--magritte-color-component-button-background-inverse-v24-0-2);
|
|
518
|
+
--magritte-ui-badge-border-color-override:var(--magritte-color-component-button-background-inverse-v24-0-2);
|
|
522
519
|
}
|
|
523
|
-
.magritte-floating-
|
|
524
|
-
background-color:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-
|
|
520
|
+
.magritte-floating-buttons_inverse___xhm17_2-0-1.magritte-disabled___XSSqS_2-0-1{
|
|
521
|
+
background-color:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-2);
|
|
525
522
|
}
|
|
526
|
-
.magritte-floating-button-
|
|
523
|
+
.magritte-floating-button-wrapper___HlTzE_2-0-1{
|
|
527
524
|
overflow:hidden;
|
|
528
525
|
height:0;
|
|
529
526
|
opacity:0;
|
|
530
527
|
padding:4px;
|
|
531
528
|
margin:-4px;
|
|
532
|
-
transition:height var(--magritte-semantic-animation-time-s-duration-v24-0-
|
|
529
|
+
transition:height var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2), opacity var(--magritte-semantic-animation-time-s-duration-v24-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
|
|
533
530
|
}
|
|
534
|
-
.magritte-floating-button-
|
|
531
|
+
.magritte-floating-button-wrapper___HlTzE_2-0-1.magritte-visible___lDPdq_2-0-1{
|
|
535
532
|
height:48px;
|
|
536
533
|
opacity:1;
|
|
537
534
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from '@hh.ru/magritte-ui-floating-button/FloatingButton';
|
|
2
2
|
export * from '@hh.ru/magritte-ui-floating-button/FloatingButtonStack';
|
|
3
|
-
export
|
|
3
|
+
export type { FloatingButtonStyle, FloatingButtonPosition, FloatingButtonRadius, FloatingButtonProps, FloatingButtonStackProps, } from '@hh.ru/magritte-ui-floating-button/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-floating-button",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@hh.ru/magritte-common-is-server-env": "1.0.7",
|
|
23
|
-
"@hh.ru/magritte-design-tokens": "24.0.
|
|
23
|
+
"@hh.ru/magritte-design-tokens": "24.0.2",
|
|
24
24
|
"@hh.ru/magritte-types": "5.0.5",
|
|
25
|
-
"@hh.ru/magritte-ui-badge": "3.3.
|
|
25
|
+
"@hh.ru/magritte-ui-badge": "3.3.1",
|
|
26
26
|
"@hh.ru/magritte-ui-breakpoint": "6.0.1",
|
|
27
|
-
"@hh.ru/magritte-ui-icon": "13.
|
|
28
|
-
"@hh.ru/magritte-ui-layer": "3.0
|
|
29
|
-
"@hh.ru/magritte-ui-loader": "2.0.
|
|
27
|
+
"@hh.ru/magritte-ui-icon": "13.4.0",
|
|
28
|
+
"@hh.ru/magritte-ui-layer": "3.1.0",
|
|
29
|
+
"@hh.ru/magritte-ui-loader": "2.0.19",
|
|
30
30
|
"@hh.ru/magritte-ui-mock-component": "1.1.5",
|
|
31
|
-
"@hh.ru/magritte-ui-typography": "4.3.
|
|
31
|
+
"@hh.ru/magritte-ui-typography": "4.3.1"
|
|
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": "e8b90b8d9d73fc1320235047462ed3e3ff2ce345"
|
|
43
43
|
}
|
package/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CSSProperties, PropsWithChildren, ReactElement, ReactNode, type RefObje
|
|
|
2
2
|
import { IconWrapperComponentSize24, IconProps } from '@hh.ru/magritte-ui-icon';
|
|
3
3
|
export type FloatingButtonStyle = 'neutral' | 'inverse';
|
|
4
4
|
export type FloatingButtonPosition = 'left' | 'right' | 'center';
|
|
5
|
+
export type FloatingButtonRadius = 12 | 'halfHeight';
|
|
5
6
|
export interface FloatingButtonProps extends PropsWithChildren {
|
|
6
7
|
/** Кастомный компонент 'a', 'button', 'span' или функция */
|
|
7
8
|
Element?: 'a' | 'button' | 'span';
|
|
@@ -22,7 +23,7 @@ export interface FloatingButtonProps extends PropsWithChildren {
|
|
|
22
23
|
/** Расположение (задает дефолтное положение и используется для анимации) */
|
|
23
24
|
position?: FloatingButtonPosition;
|
|
24
25
|
/** Скругления */
|
|
25
|
-
borderRadius?:
|
|
26
|
+
borderRadius?: FloatingButtonRadius;
|
|
26
27
|
/** Компонент Badge */
|
|
27
28
|
badge?: ReactElement;
|
|
28
29
|
/** css-класс для позиционирования кнопки */
|
|
@@ -32,6 +33,8 @@ export interface FloatingButtonProps extends PropsWithChildren {
|
|
|
32
33
|
/** Хост для отрисовки */
|
|
33
34
|
host?: RefObject<HTMLElement>;
|
|
34
35
|
'data-qa'?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface FloatingButtonPropsWithStackMode extends FloatingButtonProps {
|
|
35
38
|
/** Флаг, включающий stack режим для кнопки (отключает тени, меняется позиция badge) */
|
|
36
39
|
stackMode?: boolean;
|
|
37
40
|
}
|