@hh.ru/magritte-ui-floating-button 1.2.8 → 2.0.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/FloatingButton.js CHANGED
@@ -10,18 +10,15 @@ 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-wrapper___7m9lC_1-2-8","animation-timeout":"magritte-animation-timeout___NL8n0_1-2-8","animationTimeout":"magritte-animation-timeout___NL8n0_1-2-8","button":"magritte-button___nL-Hn_1-2-8","loading":"magritte-loading___C0oPZ_1-2-8","withIconAndLabel":"magritte-withIconAndLabel___Qa-lU_1-2-8","right":"magritte-right___3n0Rz_1-2-8","content":"magritte-content___JNpTZ_1-2-8","left":"magritte-left___GnzU7_1-2-8","center":"magritte-center___MdA40_1-2-8","postfix":"magritte-postfix___r0EZ6_1-2-8","icon":"magritte-icon___VpqJt_1-2-8","textless":"magritte-textless___IbYgp_1-2-8","label":"magritte-label___EPgvj_1-2-8","withPostfix":"magritte-withPostfix___PmQAz_1-2-8","hideLabel":"magritte-hideLabel___K79XM_1-2-8","withLabelOnHover":"magritte-withLabelOnHover___1oktd_1-2-8","border-radius":"magritte-border-radius___ObLLb_1-2-8","borderRadius":"magritte-border-radius___ObLLb_1-2-8","loader":"magritte-loader___EPezG_1-2-8","enter-animation":"magritte-enter-animation___2sPz3_1-2-8","enterAnimation":"magritte-enter-animation___2sPz3_1-2-8","enter-animation-active":"magritte-enter-animation-active___Lq9eq_1-2-8","enterAnimationActive":"magritte-enter-animation-active___Lq9eq_1-2-8","exit-animation":"magritte-exit-animation___h2-7a_1-2-8","exitAnimation":"magritte-exit-animation___h2-7a_1-2-8","exit-animation-active":"magritte-exit-animation-active___w0F1a_1-2-8","exitAnimationActive":"magritte-exit-animation-active___w0F1a_1-2-8","button_style-neutral":"magritte-button_style-neutral___bPUwu_1-2-8","buttonStyleNeutral":"magritte-button_style-neutral___bPUwu_1-2-8","button_style-inverse":"magritte-button_style-inverse___Xgf26_1-2-8","buttonStyleInverse":"magritte-button_style-inverse___Xgf26_1-2-8"};
13
+ var styles = {"wrapper":"magritte-wrapper___7m9lC_2-0-0","animation-timeout":"magritte-animation-timeout___NL8n0_2-0-0","animationTimeout":"magritte-animation-timeout___NL8n0_2-0-0","button":"magritte-button___nL-Hn_2-0-0","loading":"magritte-loading___C0oPZ_2-0-0","withIconAndLabel":"magritte-withIconAndLabel___Qa-lU_2-0-0","right":"magritte-right___3n0Rz_2-0-0","content":"magritte-content___JNpTZ_2-0-0","left":"magritte-left___GnzU7_2-0-0","center":"magritte-center___MdA40_2-0-0","postfix":"magritte-postfix___r0EZ6_2-0-0","icon":"magritte-icon___VpqJt_2-0-0","textless":"magritte-textless___IbYgp_2-0-0","label":"magritte-label___EPgvj_2-0-0","withPostfix":"magritte-withPostfix___PmQAz_2-0-0","hideLabel":"magritte-hideLabel___K79XM_2-0-0","withLabelOnHover":"magritte-withLabelOnHover___1oktd_2-0-0","loader":"magritte-loader___EPezG_2-0-0","enter-animation":"magritte-enter-animation___2sPz3_2-0-0","enterAnimation":"magritte-enter-animation___2sPz3_2-0-0","enter-animation-active":"magritte-enter-animation-active___Lq9eq_2-0-0","enterAnimationActive":"magritte-enter-animation-active___Lq9eq_2-0-0","exit-animation":"magritte-exit-animation___h2-7a_2-0-0","exitAnimation":"magritte-exit-animation___h2-7a_2-0-0","exit-animation-active":"magritte-exit-animation-active___w0F1a_2-0-0","exitAnimationActive":"magritte-exit-animation-active___w0F1a_2-0-0","button_style-neutral":"magritte-button_style-neutral___bPUwu_2-0-0","buttonStyleNeutral":"magritte-button_style-neutral___bPUwu_2-0-0","stackMode":"magritte-stackMode___RdOTJ_2-0-0","button_style-inverse":"magritte-button_style-inverse___Xgf26_2-0-0","buttonStyleInverse":"magritte-button_style-inverse___Xgf26_2-0-0"};
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', ...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();
20
20
  const wrapperRef = useRef(null);
21
21
  const [animationTimeout, setAnimationTimeout] = useState(0);
22
- const additionalAttributes = {
23
- 'data-qa': dataQa,
24
- };
25
22
  useLayoutEffect(() => {
26
23
  const animationTimeoutElement = document.createElement('div');
27
24
  animationTimeoutElement.classList.add(styles.animationTimeout);
@@ -33,6 +30,12 @@ const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabl
33
30
  }
34
31
  document.body.removeChild(animationTimeoutElement);
35
32
  }, []);
33
+ if (isServerEnv) {
34
+ return null;
35
+ }
36
+ const additionalAttributes = {
37
+ 'data-qa': dataQa,
38
+ };
36
39
  if (Element === 'button') {
37
40
  additionalAttributes.type = 'button';
38
41
  }
@@ -41,23 +44,20 @@ const FloatingButtonComponent = ({ Element = 'button', style = 'neutral', disabl
41
44
  additionalAttributes['aria-disabled'] = disabled;
42
45
  }
43
46
  additionalAttributes.ref = ref;
44
- if (isServerEnv) {
45
- return null;
46
- }
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,
52
51
  [styles.withPostfix]: !!postfix,
53
52
  [styles.textless]: !postfix && (!children || !!hideLabel),
54
53
  [styles.withIconAndLabel]: !!IconComponent && !!children && !hideLabel,
55
- }), 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 }) }))] }) }));
54
+ [styles.stackMode]: !!stackMode,
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 }) }))] }) }));
56
56
  if (badge && !disabled) {
57
- button = (jsx(ComponentWithBadge, { allowedSizes: ALLOWED_BADGE_SIZES, badge: badge, offset: 4, noClip: true, children: button }));
57
+ button = (jsx(ComponentWithBadge, { allowedSizes: ALLOWED_BADGE_SIZES, badge: badge, offset: stackMode ? 12 : 4, noClip: true, children: button }));
58
58
  }
59
- if (isServerEnv) {
60
- return null;
59
+ if (stackMode) {
60
+ return button;
61
61
  }
62
62
  return createPortal(jsx(CSSTransition, { appear: true, in: !!visible && !isServerEnv, nodeRef: wrapperRef, classNames: {
63
63
  appear: styles.enterAnimation,
@@ -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 ...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 const additionalAttributes: Record<string, unknown> = {\n 'data-qa': dataQa,\n };\n\n useLayoutEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n 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 (Element === 'button') {\n additionalAttributes.type = 'button';\n } else {\n additionalAttributes.role = Element !== 'a' ? 'button' : undefined;\n additionalAttributes['aria-disabled'] = disabled;\n }\n\n additionalAttributes.ref = ref;\n\n if (isServerEnv) {\n return null;\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 })}\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={4} noClip>\n {button}\n </ComponentWithBadge>\n );\n }\n\n if (isServerEnv) {\n return null;\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,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;AAE5D,IAAA,MAAM,oBAAoB,GAA4B;AAClD,QAAA,SAAS,EAAE,MAAM;KACpB,CAAC;IAEF,eAAe,CAAC,MAAK;QACjB,MAAM,uBAAuB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;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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,WAAW,GAAG,YAAY,E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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;;;;"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { FloatingButtonStackProps } from '@hh.ru/magritte-ui-floating-button/types';
3
+ export declare const FloatingButtonStack: React.ForwardRefExoticComponent<FloatingButtonStackProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,45 @@
1
+ import './index.css';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { forwardRef, Children, isValidElement, cloneElement } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import classnames from 'classnames';
6
+ import { useServerEnv } from '@hh.ru/magritte-common-is-server-env';
7
+ import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
8
+ import { ArrowUpOutlinedSize24 } from '@hh.ru/magritte-ui-icon/variants/icon';
9
+ import { Layer } from '@hh.ru/magritte-ui-layer';
10
+
11
+ var styles = {"stack":"magritte-stack___v7QhJ_2-0-0","right":"magritte-right___v4PFa_2-0-0","left":"magritte-left___JXzpq_2-0-0","center":"magritte-center___rV3kK_2-0-0","up-button":"magritte-up-button___M-Jgi_2-0-0","upButton":"magritte-up-button___M-Jgi_2-0-0","visible":"magritte-visible___lDPdq_2-0-0","has-visibled-children":"magritte-has-visibled-children___rA8xx_2-0-0","hasVisibledChildren":"magritte-has-visibled-children___rA8xx_2-0-0","floating-buttons":"magritte-floating-buttons___oi9Yx_2-0-0","floatingButtons":"magritte-floating-buttons___oi9Yx_2-0-0","floating-buttons_neutral":"magritte-floating-buttons_neutral___LCnTQ_2-0-0","floatingButtonsNeutral":"magritte-floating-buttons_neutral___LCnTQ_2-0-0","disabled":"magritte-disabled___XSSqS_2-0-0","floating-buttons_inverse":"magritte-floating-buttons_inverse___xhm17_2-0-0","floatingButtonsInverse":"magritte-floating-buttons_inverse___xhm17_2-0-0","floating-button-wrapper":"magritte-floating-button-wrapper___HlTzE_2-0-0","floatingButtonWrapper":"magritte-floating-button-wrapper___HlTzE_2-0-0"};
12
+
13
+ const FloatingButtonStack = forwardRef(({ style = 'neutral', host, children, className, inlineStyle, upButtonVisible, disabled = false, position = 'right', onUpButtonClick, 'data-qa': dataQa = 'floating-button-stack', }, ref) => {
14
+ const isServerEnv = useServerEnv();
15
+ const { isMobile } = useBreakpoint();
16
+ if (isServerEnv) {
17
+ return null;
18
+ }
19
+ const preparedChildren = Children.toArray(children)
20
+ .filter((isValidElement))
21
+ .map((child) => cloneElement(child, {
22
+ style,
23
+ disabled,
24
+ stackMode: true,
25
+ children: null,
26
+ postfix: null,
27
+ }));
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, {
30
+ [styles.visible]: upButtonVisible,
31
+ [styles.hasVisibledChildren]: hasVisibledChildren,
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}`], {
33
+ [styles.disabled]: disabled,
34
+ [styles.hasVisibledChildren]: hasVisibledChildren,
35
+ }), children: preparedChildren.map((floatingButton) => {
36
+ const visible = floatingButton.props.visible;
37
+ return (jsx("div", { className: classnames(styles.floatingButtonWrapper, {
38
+ [styles.visible]: visible,
39
+ }), children: floatingButton }, floatingButton.key));
40
+ }) })] }) }), host?.current || document.body);
41
+ });
42
+ FloatingButtonStack.displayName = 'FloatingButtonStack';
43
+
44
+ export { FloatingButtonStack };
45
+ //# sourceMappingURL=FloatingButtonStack.js.map
@@ -0,0 +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 {\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\">\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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AO,EAAE,eAAe,EACxB,eAAe,EAAC,WAAW,EAC3B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EACT,SAAA,EAAA,CAAA,EAAG,MAAM,CAAY,UAAA,CAAA,EAAA,CAChC,EACA,CAAA,EACNA,GACI,CAAA,KAAA,EAAA,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-1:#000000;
3
- --magritte-color-component-button-background-inverse-v24-0-1:#ffffff;
4
- --magritte-color-component-button-background-state-neutral-disabled-v24-0-1:#DCE3EB;
5
- --magritte-color-component-button-background-state-neutral-hovered-v24-0-1:#343c43;
6
- --magritte-color-component-button-background-state-neutral-pressed-v24-0-1:#000000;
7
- --magritte-color-component-button-background-state-neutral-focused-v24-0-1:#000000;
8
- --magritte-color-component-button-background-state-inverse-hovered-v24-0-1:#EEF1F7;
9
- --magritte-color-component-button-background-state-inverse-pressed-v24-0-1:#ffffff;
10
- --magritte-color-component-button-background-state-inverse-focused-v24-0-1:#ffffff;
11
- --magritte-color-component-button-background-state-inverse-disabled-v24-0-1:#ffffff;
12
- --magritte-color-component-button-text-neutral-v24-0-1:#ffffff;
13
- --magritte-color-component-button-text-inverse-v24-0-1:#0d1115;
14
- --magritte-color-component-button-icon-neutral-v24-0-1:#ffffff;
15
- --magritte-color-component-button-icon-inverse-v24-0-1:#0d1115;
16
- --magritte-color-component-button-loader-icon-neutral-v24-0-1:#ffffff;
17
- --magritte-color-component-button-loader-icon-inverse-v24-0-1:#000000;
18
- --magritte-color-component-button-text-state-neutral-disabled-v24-0-1:#8293a2;
19
- --magritte-color-component-button-text-state-inverse-disabled-v24-0-1:#8da0b0;
20
- --magritte-color-component-button-icon-state-neutral-disabled-v24-0-1:#8293a2;
21
- --magritte-color-component-button-icon-state-inverse-disabled-v24-0-1:#8da0b0;
22
- --magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-1:#0070ff7a;
23
- --magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-1:#a4c9fe7a;
24
- --magritte-color-component-button-postfix-text-neutral-v24-0-1:#AABBCA;
25
- --magritte-color-component-button-postfix-text-inverse-v24-0-1:#0d1115;
26
- --magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-1:#AABBCA;
27
- --magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-1:#96aabb;
28
- --magritte-shadow-level-2-color-v24-0-1:#7090b03d;
29
- --magritte-shadow-level-2-x-v24-0-1:0px;
30
- --magritte-shadow-level-2-y-v24-0-1:8px;
31
- --magritte-shadow-level-2-blur-v24-0-1:16px;
32
- --magritte-shadow-level-2-spread-v24-0-1:0px;
33
- --magritte-shadow-level-1-color-v24-0-1:#7090b029;
34
- --magritte-shadow-level-1-x-v24-0-1:0px;
35
- --magritte-shadow-level-1-y-v24-0-1:4px;
36
- --magritte-shadow-level-1-blur-v24-0-1:12px;
37
- --magritte-shadow-level-1-spread-v24-0-1:0px;
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-1:200ms;
42
- --magritte-semantic-animation-ease-base-timing-function-v24-0-1:cubic-bezier(0.4, 0.24, 0, 1);
43
- --magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-1:cubic-bezier(0.25, 0.1, 0.25, 1);
44
- --magritte-semantic-animation-ease-in-out-100-duration-v24-0-1:100ms;
45
- --magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-1:cubic-bezier(0.25, 0.1, 0.25, 1);
46
- --magritte-semantic-animation-ease-in-out-200-duration-v24-0-1:200ms;
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-1:#ffffff;
51
- --magritte-color-component-button-background-inverse-v24-0-1:#303030;
52
- --magritte-color-component-button-background-state-neutral-disabled-v24-0-1:#303030;
53
- --magritte-color-component-button-background-state-inverse-disabled-v24-0-1:#262626;
54
- --magritte-color-component-button-background-state-neutral-hovered-v24-0-1:#F1F1F1;
55
- --magritte-color-component-button-background-state-neutral-pressed-v24-0-1:#ffffff;
56
- --magritte-color-component-button-background-state-neutral-focused-v24-0-1:#ffffff;
57
- --magritte-color-component-button-background-state-inverse-hovered-v24-0-1:#3B3B3B;
58
- --magritte-color-component-button-background-state-inverse-pressed-v24-0-1:#303030;
59
- --magritte-color-component-button-background-state-inverse-focused-v24-0-1:#303030;
60
- --magritte-color-component-button-text-neutral-v24-0-1:#000000;
61
- --magritte-color-component-button-text-inverse-v24-0-1:#ffffff;
62
- --magritte-color-component-button-text-state-neutral-disabled-v24-0-1:#848484;
63
- --magritte-color-component-button-text-state-inverse-disabled-v24-0-1:#848484;
64
- --magritte-color-component-button-icon-state-neutral-disabled-v24-0-1:#848484;
65
- --magritte-color-component-button-icon-state-inverse-disabled-v24-0-1:#848484;
66
- --magritte-color-component-button-icon-neutral-v24-0-1:#000000;
67
- --magritte-color-component-button-icon-inverse-v24-0-1:#ffffff;
68
- --magritte-color-component-button-loader-icon-neutral-v24-0-1:#000000;
69
- --magritte-color-component-button-loader-icon-inverse-v24-0-1:#ffffff;
70
- --magritte-color-component-button-postfix-text-neutral-v24-0-1:#ABABAB;
71
- --magritte-color-component-button-postfix-text-inverse-v24-0-1:#ABABAB;
72
- --magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-1:#535353;
73
- --magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-1:#535353;
74
- --magritte-shadow-level-2-color-v24-0-1:#0000003d;
75
- --magritte-shadow-level-1-color-v24-0-1:#00000029;
76
- }
77
- .magritte-wrapper___7m9lC_1-2-8{
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-0{
78
78
  display:inline-block;
79
79
  position:fixed;
80
80
  }
81
- .magritte-wrapper___7m9lC_1-2-8,
82
- .magritte-animation-timeout___NL8n0_1-2-8{
81
+ .magritte-wrapper___7m9lC_2-0-0,
82
+ .magritte-animation-timeout___NL8n0_2-0-0{
83
83
  --animation-duration:0;
84
84
  }
85
85
  @media (prefers-reduced-motion: no-preference){
86
- .magritte-wrapper___7m9lC_1-2-8,
87
- .magritte-animation-timeout___NL8n0_1-2-8{
88
- --animation-duration:var(--magritte-semantic-animation-time-s-duration-v24-0-1);
86
+ .magritte-wrapper___7m9lC_2-0-0,
87
+ .magritte-animation-timeout___NL8n0_2-0-0{
88
+ --animation-duration:var(--magritte-semantic-animation-time-s-duration-v24-0-2);
89
89
  }
90
90
  }
91
- .magritte-button___nL-Hn_1-2-8{
91
+ .magritte-button___nL-Hn_2-0-0{
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-1);
97
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-0-1);
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-Hn_1-2-8:disabled,
100
- .magritte-button___nL-Hn_1-2-8[aria-disabled='true'],
101
- .magritte-button___nL-Hn_1-2-8.magritte-loading___C0oPZ_1-2-8{
99
+ .magritte-button___nL-Hn_2-0-0:disabled,
100
+ .magritte-button___nL-Hn_2-0-0[aria-disabled='true'],
101
+ .magritte-button___nL-Hn_2-0-0.magritte-loading___C0oPZ_2-0-0{
102
102
  pointer-events:none;
103
103
  cursor:not-allowed;
104
104
  }
105
- .magritte-button___nL-Hn_1-2-8:not(:disabled):active,
106
- .magritte-button___nL-Hn_1-2-8:not([aria-disabled='true']):active{
105
+ .magritte-button___nL-Hn_2-0-0:not(:disabled):active,
106
+ .magritte-button___nL-Hn_2-0-0: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-1);
109
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-0-1);
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-lU_1-2-8{
111
+ .magritte-withIconAndLabel___Qa-lU_2-0-0{
112
112
  padding:12px 16px;
113
113
  }
114
- .magritte-right___3n0Rz_1-2-8{
114
+ .magritte-right___3n0Rz_2-0-0{
115
115
  right:16px;
116
116
  bottom:20px;
117
117
  }
118
118
  @media (min-width: 1020px){
119
- body.magritte-old-layout .magritte-right___3n0Rz_1-2-8{
119
+ body.magritte-old-layout .magritte-right___3n0Rz_2-0-0{
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-right___3n0Rz_1-2-8{
125
+ body:not(.magritte-old-layout) .magritte-right___3n0Rz_2-0-0{
126
126
  right:36px;
127
127
  bottom:32px;
128
128
  }
129
129
  }
130
- .magritte-right___3n0Rz_1-2-8 .magritte-content___JNpTZ_1-2-8{
130
+ .magritte-right___3n0Rz_2-0-0 .magritte-content___JNpTZ_2-0-0{
131
131
  justify-content:end;
132
132
  }
133
- .magritte-left___GnzU7_1-2-8{
133
+ .magritte-left___GnzU7_2-0-0{
134
134
  left:16px;
135
135
  bottom:20px;
136
136
  }
137
137
  @media (min-width: 1020px){
138
- body.magritte-old-layout .magritte-left___GnzU7_1-2-8{
138
+ body.magritte-old-layout .magritte-left___GnzU7_2-0-0{
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-left___GnzU7_1-2-8{
144
+ body:not(.magritte-old-layout) .magritte-left___GnzU7_2-0-0{
145
145
  left:36px;
146
146
  bottom:32px;
147
147
  }
148
148
  }
149
- .magritte-left___GnzU7_1-2-8 .magritte-content___JNpTZ_1-2-8{
149
+ .magritte-left___GnzU7_2-0-0 .magritte-content___JNpTZ_2-0-0{
150
150
  justify-content:start;
151
151
  }
152
- .magritte-center___MdA40_1-2-8{
152
+ .magritte-center___MdA40_2-0-0{
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-center___MdA40_1-2-8{
158
+ body.magritte-old-layout .magritte-center___MdA40_2-0-0{
159
159
  bottom:32px;
160
160
  }
161
161
  }
162
162
  @media (min-width: 1024px){
163
- body:not(.magritte-old-layout) .magritte-center___MdA40_1-2-8{
163
+ body:not(.magritte-old-layout) .magritte-center___MdA40_2-0-0{
164
164
  bottom:32px;
165
165
  }
166
166
  }
167
- .magritte-center___MdA40_1-2-8 .magritte-content___JNpTZ_1-2-8{
167
+ .magritte-center___MdA40_2-0-0 .magritte-content___JNpTZ_2-0-0{
168
168
  justify-content:space-between;
169
169
  }
170
- .magritte-postfix___r0EZ6_1-2-8{
170
+ .magritte-postfix___r0EZ6_2-0-0{
171
171
  padding:0 4px;
172
172
  }
173
- .magritte-icon___VpqJt_1-2-8{
173
+ .magritte-icon___VpqJt_2-0-0{
174
174
  margin-right:4px;
175
175
  }
176
- .magritte-textless___IbYgp_1-2-8 .magritte-icon___VpqJt_1-2-8{
176
+ .magritte-textless___IbYgp_2-0-0 .magritte-icon___VpqJt_2-0-0{
177
177
  margin:0;
178
178
  }
179
- .magritte-label___EPgvj_1-2-8{
179
+ .magritte-label___EPgvj_2-0-0{
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-1);
184
+ transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
185
185
  padding:0 4px;
186
186
  }
187
- .magritte-content___JNpTZ_1-2-8{
187
+ .magritte-content___JNpTZ_2-0-0{
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-1);
194
+ transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
195
195
  }
196
- .magritte-withPostfix___PmQAz_1-2-8 .magritte-content___JNpTZ_1-2-8{
196
+ .magritte-withPostfix___PmQAz_2-0-0 .magritte-content___JNpTZ_2-0-0{
197
197
  grid-template-columns:max-content 1fr max-content;
198
198
  }
199
- .magritte-hideLabel___K79XM_1-2-8 .magritte-content___JNpTZ_1-2-8{
199
+ .magritte-hideLabel___K79XM_2-0-0 .magritte-content___JNpTZ_2-0-0{
200
200
  grid-template-columns:max-content 0fr;
201
201
  }
202
- .magritte-hideLabel___K79XM_1-2-8 .magritte-label___EPgvj_1-2-8{
202
+ .magritte-hideLabel___K79XM_2-0-0 .magritte-label___EPgvj_2-0-0{
203
203
  padding:0;
204
204
  }
205
- .magritte-hideLabel___K79XM_1-2-8.magritte-withPostfix___PmQAz_1-2-8 .magritte-content___JNpTZ_1-2-8{
205
+ .magritte-hideLabel___K79XM_2-0-0.magritte-withPostfix___PmQAz_2-0-0 .magritte-content___JNpTZ_2-0-0{
206
206
  grid-template-columns:max-content 0fr max-content;
207
207
  }
208
- .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8).magritte-withIconAndLabel___Qa-lU_1-2-8{
208
+ .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0).magritte-withIconAndLabel___Qa-lU_2-0-0{
209
209
  padding:12px;
210
210
  }
211
- .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):not(.magritte-withPostfix___PmQAz_1-2-8) .magritte-icon___VpqJt_1-2-8{
211
+ .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):not(.magritte-withPostfix___PmQAz_2-0-0) .magritte-icon___VpqJt_2-0-0{
212
212
  margin:0;
213
213
  }
214
- .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8) .magritte-content___JNpTZ_1-2-8{
214
+ .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0) .magritte-content___JNpTZ_2-0-0{
215
215
  grid-template-columns:max-content 0fr;
216
216
  }
217
- .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8).magritte-withPostfix___PmQAz_1-2-8 .magritte-content___JNpTZ_1-2-8{
217
+ .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0).magritte-withPostfix___PmQAz_2-0-0 .magritte-content___JNpTZ_2-0-0{
218
218
  grid-template-columns:max-content 0fr max-content;
219
219
  }
220
- .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8) .magritte-label___EPgvj_1-2-8{
220
+ .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0) .magritte-label___EPgvj_2-0-0{
221
221
  padding:0;
222
222
  }
223
223
  @media (min-width: 1020px){
224
- body.magritte-old-layout .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_1-2-8{
224
+ body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_2-0-0{
225
225
  padding:12px 16px;
226
226
  }
227
- body.magritte-old-layout .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_1-2-8{
227
+ body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_2-0-0{
228
228
  margin-right:4px;
229
229
  }
230
- body.magritte-old-layout .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_1-2-8{
230
+ body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_2-0-0{
231
231
  grid-template-columns:max-content 1fr;
232
232
  }
233
- body.magritte-old-layout .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_1-2-8 .magritte-content___JNpTZ_1-2-8{
233
+ body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_2-0-0 .magritte-content___JNpTZ_2-0-0{
234
234
  grid-template-columns:max-content 1fr max-content;
235
235
  }
236
- body.magritte-old-layout .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_1-2-8{
236
+ body.magritte-old-layout .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_2-0-0{
237
237
  padding:0 4px;
238
238
  }
239
239
  }
240
240
  @media (min-width: 1024px){
241
- body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_1-2-8{
241
+ body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']).magritte-withIconAndLabel___Qa-lU_2-0-0{
242
242
  padding:12px 16px;
243
243
  }
244
- body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_1-2-8{
244
+ body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-icon___VpqJt_2-0-0{
245
245
  margin-right:4px;
246
246
  }
247
- body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_1-2-8{
247
+ body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-content___JNpTZ_2-0-0{
248
248
  grid-template-columns:max-content 1fr;
249
249
  }
250
- body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_1-2-8 .magritte-content___JNpTZ_1-2-8{
250
+ body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']).magritte-withPostfix___PmQAz_2-0-0 .magritte-content___JNpTZ_2-0-0{
251
251
  grid-template-columns:max-content 1fr max-content;
252
252
  }
253
- body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_1-2-8:not(.magritte-hideLabel___K79XM_1-2-8):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_1-2-8{
253
+ body:not(.magritte-old-layout) .magritte-withLabelOnHover___1oktd_2-0-0:not(.magritte-hideLabel___K79XM_2-0-0):hover:not(:disabled):not([aria-disabled='true']) .magritte-label___EPgvj_2-0-0{
254
254
  padding:0 4px;
255
255
  }
256
256
  }
257
- .magritte-loading___C0oPZ_1-2-8 .magritte-postfix___r0EZ6_1-2-8,
258
- .magritte-loading___C0oPZ_1-2-8 .magritte-icon___VpqJt_1-2-8,
259
- .magritte-loading___C0oPZ_1-2-8 .magritte-label___EPgvj_1-2-8{
257
+ .magritte-loading___C0oPZ_2-0-0 .magritte-postfix___r0EZ6_2-0-0,
258
+ .magritte-loading___C0oPZ_2-0-0 .magritte-icon___VpqJt_2-0-0,
259
+ .magritte-loading___C0oPZ_2-0-0 .magritte-label___EPgvj_2-0-0{
260
260
  visibility:hidden;
261
261
  }
262
- .magritte-border-radius___ObLLb_1-2-8{
263
- border-radius:12px;
264
- }
265
- .magritte-loader___EPezG_1-2-8{
262
+ .magritte-loader___EPezG_2-0-0{
266
263
  position:absolute;
267
264
  left:50%;
268
265
  top:50%;
@@ -270,97 +267,268 @@
270
267
  line-height:0;
271
268
  overflow:hidden;
272
269
  }
273
- .magritte-enter-animation___2sPz3_1-2-8{
270
+ .magritte-enter-animation___2sPz3_2-0-0{
274
271
  opacity:0;
275
272
  }
276
- .magritte-enter-animation-active___Lq9eq_1-2-8{
273
+ .magritte-enter-animation-active___Lq9eq_2-0-0{
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-1);
277
+ transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
281
278
  }
282
- .magritte-exit-animation___h2-7a_1-2-8{
279
+ .magritte-exit-animation___h2-7a_2-0-0{
283
280
  opacity:1;
284
281
  }
285
- .magritte-exit-animation-active___w0F1a_1-2-8{
282
+ .magritte-exit-animation-active___w0F1a_2-0-0{
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-1);
286
+ transition-timing-function:var(--magritte-semantic-animation-ease-base-timing-function-v24-0-2);
287
+ }
288
+ .magritte-button_style-neutral___bPUwu_2-0-0{
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);
290
294
  }
291
- .magritte-button_style-neutral___bPUwu_1-2-8{
292
- background:var(--magritte-color-component-button-background-neutral-v24-0-1);
293
- --magritte-ui-text-color-override:var(--magritte-color-component-button-text-neutral-v24-0-1);
294
- --magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-neutral-v24-0-1);
295
- box-shadow:var(--magritte-shadow-level-2-x-v24-0-1) var(--magritte-shadow-level-2-y-v24-0-1) var(--magritte-shadow-level-2-blur-v24-0-1) var(--magritte-shadow-level-2-spread-v24-0-1) var(--magritte-shadow-level-2-color-v24-0-1);
296
- --magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-neutral-v24-0-1);
295
+ .magritte-button_style-neutral___bPUwu_2-0-0 .magritte-postfix___r0EZ6_2-0-0{
296
+ --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-neutral-v24-0-2);
297
297
  }
298
- .magritte-button_style-neutral___bPUwu_1-2-8 .magritte-postfix___r0EZ6_1-2-8{
299
- --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-neutral-v24-0-1);
298
+ .magritte-button_style-neutral___bPUwu_2-0-0.magritte-stackMode___RdOTJ_2-0-0{
299
+ box-shadow:none;
300
300
  }
301
- .magritte-button_style-neutral___bPUwu_1-2-8.focus-visible{
302
- outline:4px solid var(--magritte-color-component-button-stroke-state-neutral-focused-accessible-v24-0-1);
303
- background:var(--magritte-color-component-button-background-state-neutral-focused-v24-0-1);
301
+ .magritte-button_style-neutral___bPUwu_2-0-0.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);
304
304
  }
305
- .magritte-button_style-neutral___bPUwu_1-2-8:not(:disabled):active,
306
- .magritte-button_style-neutral___bPUwu_1-2-8:not([aria-disabled='true']):active{
307
- background:var(--magritte-color-component-button-background-state-neutral-pressed-v24-0-1);
305
+ .magritte-button_style-neutral___bPUwu_2-0-0:not(:disabled):active,
306
+ .magritte-button_style-neutral___bPUwu_2-0-0:not([aria-disabled='true']):active{
307
+ background:var(--magritte-color-component-button-background-state-neutral-pressed-v24-0-2);
308
308
  }
309
- .magritte-button_style-neutral___bPUwu_1-2-8:disabled,
310
- .magritte-button_style-neutral___bPUwu_1-2-8[aria-disabled='true']{
311
- background:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-1);
312
- --magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-neutral-disabled-v24-0-1);
313
- --magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-neutral-disabled-v24-0-1);
309
+ .magritte-button_style-neutral___bPUwu_2-0-0:disabled,
310
+ .magritte-button_style-neutral___bPUwu_2-0-0[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);
314
314
  }
315
- .magritte-button_style-neutral___bPUwu_1-2-8:disabled .magritte-postfix___r0EZ6_1-2-8,
316
- .magritte-button_style-neutral___bPUwu_1-2-8[aria-disabled='true'] .magritte-postfix___r0EZ6_1-2-8{
317
- --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-1);
315
+ .magritte-button_style-neutral___bPUwu_2-0-0:disabled .magritte-postfix___r0EZ6_2-0-0,
316
+ .magritte-button_style-neutral___bPUwu_2-0-0[aria-disabled='true'] .magritte-postfix___r0EZ6_2-0-0{
317
+ --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-neutral-disabled-v24-0-2);
318
318
  }
319
319
  @media (min-width: 1020px){
320
- body.magritte-old-layout .magritte-button_style-neutral___bPUwu_1-2-8:hover:not(:active):not(:disabled):not([aria-disabled='true']){
321
- background:var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-1);
320
+ body.magritte-old-layout .magritte-button_style-neutral___bPUwu_2-0-0: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));
322
322
  }
323
323
  }
324
324
  @media (min-width: 1024px){
325
- body:not(.magritte-old-layout) .magritte-button_style-neutral___bPUwu_1-2-8:hover:not(:active):not(:disabled):not([aria-disabled='true']){
326
- background:var(--magritte-color-component-button-background-state-neutral-hovered-v24-0-1);
325
+ body:not(.magritte-old-layout) .magritte-button_style-neutral___bPUwu_2-0-0: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));
327
327
  }
328
328
  }
329
- .magritte-button_style-inverse___Xgf26_1-2-8{
330
- background:var(--magritte-color-component-button-background-inverse-v24-0-1);
331
- --magritte-ui-text-color-override:var(--magritte-color-component-button-text-inverse-v24-0-1);
332
- --magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-inverse-v24-0-1);
333
- box-shadow:var(--magritte-shadow-level-1-x-v24-0-1) var(--magritte-shadow-level-1-y-v24-0-1) var(--magritte-shadow-level-1-blur-v24-0-1) var(--magritte-shadow-level-1-spread-v24-0-1) var(--magritte-shadow-level-1-color-v24-0-1);
334
- --magritte-ui-loader-color-override:var(--magritte-color-component-button-loader-icon-inverse-v24-0-1);
329
+ .magritte-button_style-inverse___Xgf26_2-0-0{
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);
335
+ }
336
+ .magritte-button_style-inverse___Xgf26_2-0-0 .magritte-postfix___r0EZ6_2-0-0{
337
+ --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-inverse-v24-0-2);
335
338
  }
336
- .magritte-button_style-inverse___Xgf26_1-2-8 .magritte-postfix___r0EZ6_1-2-8{
337
- --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-inverse-v24-0-1);
339
+ .magritte-button_style-inverse___Xgf26_2-0-0.magritte-stackMode___RdOTJ_2-0-0{
340
+ box-shadow:none;
338
341
  }
339
- .magritte-button_style-inverse___Xgf26_1-2-8.focus-visible{
340
- outline:4px solid var(--magritte-color-component-button-stroke-state-inverse-focused-accessible-v24-0-1);
341
- background:var(--magritte-color-component-button-background-state-inverse-focused-v24-0-1);
342
+ .magritte-button_style-inverse___Xgf26_2-0-0.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);
342
345
  }
343
- .magritte-button_style-inverse___Xgf26_1-2-8:not(:disabled):active,
344
- .magritte-button_style-inverse___Xgf26_1-2-8:not([aria-disabled='true']):active{
345
- background:var(--magritte-color-component-button-background-state-inverse-pressed-v24-0-1);
346
+ .magritte-button_style-inverse___Xgf26_2-0-0:not(:disabled):active,
347
+ .magritte-button_style-inverse___Xgf26_2-0-0:not([aria-disabled='true']):active{
348
+ background:var(--magritte-color-component-button-background-state-inverse-pressed-v24-0-2);
346
349
  }
347
- .magritte-button_style-inverse___Xgf26_1-2-8:disabled,
348
- .magritte-button_style-inverse___Xgf26_1-2-8[aria-disabled='true']{
349
- background:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-1);
350
- --magritte-ui-text-color-override:var(--magritte-color-component-button-text-state-inverse-disabled-v24-0-1);
351
- --magritte-ui-icon-color-override:var(--magritte-color-component-button-icon-state-inverse-disabled-v24-0-1);
350
+ .magritte-button_style-inverse___Xgf26_2-0-0:disabled,
351
+ .magritte-button_style-inverse___Xgf26_2-0-0[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);
352
355
  }
353
- .magritte-button_style-inverse___Xgf26_1-2-8:disabled .magritte-postfix___r0EZ6_1-2-8,
354
- .magritte-button_style-inverse___Xgf26_1-2-8[aria-disabled='true'] .magritte-postfix___r0EZ6_1-2-8{
355
- --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-1);
356
+ .magritte-button_style-inverse___Xgf26_2-0-0:disabled .magritte-postfix___r0EZ6_2-0-0,
357
+ .magritte-button_style-inverse___Xgf26_2-0-0[aria-disabled='true'] .magritte-postfix___r0EZ6_2-0-0{
358
+ --magritte-ui-text-color-override:var(--magritte-color-component-button-postfix-text-state-inverse-disabled-v24-0-2);
356
359
  }
357
360
  @media (min-width: 1020px){
358
- body.magritte-old-layout .magritte-button_style-inverse___Xgf26_1-2-8:hover:not(:active):not(:disabled):not([aria-disabled='true']){
359
- background:var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-1);
361
+ body.magritte-old-layout .magritte-button_style-inverse___Xgf26_2-0-0: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));
360
363
  }
361
364
  }
362
365
  @media (min-width: 1024px){
363
- body:not(.magritte-old-layout) .magritte-button_style-inverse___Xgf26_1-2-8:hover:not(:active):not(:disabled):not([aria-disabled='true']){
364
- background:var(--magritte-color-component-button-background-state-inverse-hovered-v24-0-1);
366
+ body:not(.magritte-old-layout) .magritte-button_style-inverse___Xgf26_2-0-0: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));
368
+ }
369
+ }
370
+
371
+ :root{
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;
386
+ }
387
+
388
+ :root{
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);
391
+ }
392
+
393
+ .magritte-night-theme{
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-0{
402
+ display:inline-flex;
403
+ position:fixed;
404
+ flex-direction:column;
405
+ }
406
+ .magritte-right___v4PFa_2-0-0{
407
+ right:16px;
408
+ bottom:20px;
409
+ }
410
+ @media (min-width: 1020px){
411
+ body.magritte-old-layout .magritte-right___v4PFa_2-0-0{
412
+ right:36px;
413
+ bottom:32px;
365
414
  }
366
415
  }
416
+ @media (min-width: 1024px){
417
+ body:not(.magritte-old-layout) .magritte-right___v4PFa_2-0-0{
418
+ right:36px;
419
+ bottom:32px;
420
+ }
421
+ }
422
+ .magritte-left___JXzpq_2-0-0{
423
+ left:16px;
424
+ bottom:20px;
425
+ }
426
+ @media (min-width: 1020px){
427
+ body.magritte-old-layout .magritte-left___JXzpq_2-0-0{
428
+ left:36px;
429
+ bottom:32px;
430
+ }
431
+ }
432
+ @media (min-width: 1024px){
433
+ body:not(.magritte-old-layout) .magritte-left___JXzpq_2-0-0{
434
+ left:36px;
435
+ bottom:32px;
436
+ }
437
+ }
438
+ .magritte-center___rV3kK_2-0-0{
439
+ left:50%;
440
+ bottom:20px;
441
+ transform:translateX(-50%);
442
+ }
443
+ @media (min-width: 1020px){
444
+ body.magritte-old-layout .magritte-center___rV3kK_2-0-0{
445
+ bottom:32px;
446
+ }
447
+ }
448
+ @media (min-width: 1024px){
449
+ body:not(.magritte-old-layout) .magritte-center___rV3kK_2-0-0{
450
+ bottom:32px;
451
+ }
452
+ }
453
+ .magritte-up-button___M-Jgi_2-0-0{
454
+ opacity:0;
455
+ height: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);
457
+ }
458
+ .magritte-up-button___M-Jgi_2-0-0.magritte-visible___lDPdq_2-0-0{
459
+ height:56px;
460
+ opacity:1;
461
+ }
462
+ .magritte-up-button___M-Jgi_2-0-0.magritte-visible___lDPdq_2-0-0.magritte-has-visibled-children___rA8xx_2-0-0{
463
+ margin-bottom:12px;
464
+ }
465
+ @media (min-width: 1020px){
466
+ body.magritte-old-layout .magritte-up-button___M-Jgi_2-0-0.magritte-visible___lDPdq_2-0-0{
467
+ height:72px;
468
+ }
469
+ }
470
+ @media (min-width: 1024px){
471
+ body:not(.magritte-old-layout) .magritte-up-button___M-Jgi_2-0-0.magritte-visible___lDPdq_2-0-0{
472
+ height:72px;
473
+ }
474
+ }
475
+ .magritte-floating-buttons___oi9Yx_2-0-0{
476
+ display:flex;
477
+ flex-direction:column;
478
+ padding:0 4px;
479
+ opacity:0;
480
+ border-radius:40px;
481
+ overflow:hidden;
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);
483
+ z-index:1;
484
+ }
485
+ .magritte-floating-buttons___oi9Yx_2-0-0.magritte-has-visibled-children___rA8xx_2-0-0{
486
+ padding:4px;
487
+ opacity:1;
488
+ }
489
+ @media (min-width: 1020px){
490
+ body.magritte-old-layout .magritte-floating-buttons___oi9Yx_2-0-0{
491
+ padding:0 12px;
492
+ }
493
+ body.magritte-old-layout .magritte-floating-buttons___oi9Yx_2-0-0.magritte-has-visibled-children___rA8xx_2-0-0{
494
+ padding:12px;
495
+ }
496
+ }
497
+ @media (min-width: 1024px){
498
+ body:not(.magritte-old-layout) .magritte-floating-buttons___oi9Yx_2-0-0{
499
+ padding:0 12px;
500
+ }
501
+ body:not(.magritte-old-layout) .magritte-floating-buttons___oi9Yx_2-0-0.magritte-has-visibled-children___rA8xx_2-0-0{
502
+ padding:12px;
503
+ }
504
+ }
505
+ .magritte-floating-buttons_neutral___LCnTQ_2-0-0{
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);
510
+ }
511
+ .magritte-floating-buttons_neutral___LCnTQ_2-0-0.magritte-disabled___XSSqS_2-0-0{
512
+ background-color:var(--magritte-color-component-button-background-state-neutral-disabled-v24-0-2);
513
+ }
514
+ .magritte-floating-buttons_inverse___xhm17_2-0-0{
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);
519
+ }
520
+ .magritte-floating-buttons_inverse___xhm17_2-0-0.magritte-disabled___XSSqS_2-0-0{
521
+ background-color:var(--magritte-color-component-button-background-state-inverse-disabled-v24-0-2);
522
+ }
523
+ .magritte-floating-button-wrapper___HlTzE_2-0-0{
524
+ overflow:hidden;
525
+ height:0;
526
+ opacity:0;
527
+ padding:4px;
528
+ margin:-4px;
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);
530
+ }
531
+ .magritte-floating-button-wrapper___HlTzE_2-0-0.magritte-visible___lDPdq_2-0-0{
532
+ height:48px;
533
+ opacity:1;
534
+ }
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@hh.ru/magritte-ui-floating-button/FloatingButton';
2
- export * from '@hh.ru/magritte-ui-floating-button/types';
2
+ export * from '@hh.ru/magritte-ui-floating-button/FloatingButtonStack';
3
+ export type { FloatingButtonStyle, FloatingButtonPosition, FloatingButtonRadius, FloatingButtonProps, FloatingButtonStackProps, } from '@hh.ru/magritte-ui-floating-button/types';
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import './index.css';
2
2
  export { FloatingButton } from './FloatingButton.js';
3
+ export { FloatingButtonStack } from './FloatingButtonStack.js';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react';
5
6
  import 'react-dom';
@@ -10,4 +11,6 @@ import '@hh.ru/magritte-ui-badge';
10
11
  import '@hh.ru/magritte-ui-layer';
11
12
  import '@hh.ru/magritte-ui-loader';
12
13
  import '@hh.ru/magritte-ui-typography';
14
+ import '@hh.ru/magritte-ui-breakpoint';
15
+ import '@hh.ru/magritte-ui-icon/variants/icon';
13
16
  //# 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/index.mock.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@hh.ru/magritte-ui-floating-button/types';
2
2
  export declare const FloatingButton: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
3
+ export declare const FloatingButtonStack: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
package/index.mock.js CHANGED
@@ -4,6 +4,9 @@ import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
4
4
  const FloatingButton = mockComponent('FloatingButton', undefined, {
5
5
  withChildren: true,
6
6
  });
7
+ const FloatingButtonStack = mockComponent('FloatingButtonStack', undefined, {
8
+ withChildren: true,
9
+ });
7
10
 
8
- export { FloatingButton };
11
+ export { FloatingButton, FloatingButtonStack };
9
12
  //# sourceMappingURL=index.mock.js.map
package/index.mock.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mock.js","sources":["../src/index.mock.ts"],"sourcesContent":["import { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport * from '@hh.ru/magritte-ui-floating-button/types';\n\nexport const FloatingButton = mockComponent('FloatingButton', undefined, {\n withChildren: true,\n});\n"],"names":[],"mappings":";;MAIa,cAAc,GAAG,aAAa,CAAC,gBAAgB,EAAE,SAAS,EAAE;AACrE,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
1
+ {"version":3,"file":"index.mock.js","sources":["../src/index.mock.ts"],"sourcesContent":["import { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport * from '@hh.ru/magritte-ui-floating-button/types';\n\nexport const FloatingButton = mockComponent('FloatingButton', undefined, {\n withChildren: true,\n});\n\nexport const FloatingButtonStack = mockComponent('FloatingButtonStack', undefined, {\n withChildren: true,\n});\n"],"names":[],"mappings":";;MAIa,cAAc,GAAG,aAAa,CAAC,gBAAgB,EAAE,SAAS,EAAE;AACrE,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA,EAAE;MAEU,mBAAmB,GAAG,aAAa,CAAC,qBAAqB,EAAE,SAAS,EAAE;AAC/E,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-floating-button",
3
- "version": "1.2.8",
3
+ "version": "2.0.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -20,14 +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.1",
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.2.5",
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.4.0",
27
28
  "@hh.ru/magritte-ui-layer": "3.0.5",
28
- "@hh.ru/magritte-ui-loader": "2.0.17",
29
+ "@hh.ru/magritte-ui-loader": "2.0.19",
29
30
  "@hh.ru/magritte-ui-mock-component": "1.1.5",
30
- "@hh.ru/magritte-ui-typography": "4.3.0"
31
+ "@hh.ru/magritte-ui-typography": "4.3.1"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "classnames": ">=2.3.2",
@@ -38,5 +39,5 @@
38
39
  "publishConfig": {
39
40
  "access": "public"
40
41
  },
41
- "gitHead": "8a0169936e3009404c090e950b82e6b81efc6bc9"
42
+ "gitHead": "0bee0320d8b83b5915471b94b688af7954d5f7bd"
42
43
  }
package/types.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { CSSProperties, PropsWithChildren, ReactElement, ReactNode, type RefObject } from 'react';
2
- import { IconWrapperComponentSize24 } from '@hh.ru/magritte-ui-icon';
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?: boolean;
26
+ borderRadius?: FloatingButtonRadius;
26
27
  /** Компонент Badge */
27
28
  badge?: ReactElement;
28
29
  /** css-класс для позиционирования кнопки */
@@ -33,3 +34,26 @@ export interface FloatingButtonProps extends PropsWithChildren {
33
34
  host?: RefObject<HTMLElement>;
34
35
  'data-qa'?: string;
35
36
  }
37
+ export interface FloatingButtonPropsWithStackMode extends FloatingButtonProps {
38
+ /** Флаг, включающий stack режим для кнопки (отключает тени, меняется позиция badge) */
39
+ stackMode?: boolean;
40
+ }
41
+ export interface FloatingButtonStackProps extends PropsWithChildren {
42
+ /** Стилизация компонента */
43
+ style?: FloatingButtonStyle;
44
+ /** Расположение компонента */
45
+ position?: FloatingButtonPosition;
46
+ /** Флаг видимости кнопки Наверх */
47
+ upButtonVisible?: boolean;
48
+ /** Css-класс для позиционирования кнопки */
49
+ className?: string;
50
+ /** Инлайн стили для позиционирования кнопки */
51
+ inlineStyle?: CSSProperties;
52
+ /** Хост для отрисовки */
53
+ host?: RefObject<HTMLElement>;
54
+ 'data-qa'?: string;
55
+ /** Заблокирована ли кнопка */
56
+ disabled?: boolean;
57
+ /** Обработчик события клика кнопки Наверх */
58
+ onUpButtonClick?: IconProps['onClick'];
59
+ }