@hh.ru/magritte-ui-tooltip 9.1.0 → 9.2.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/Tooltip.js +2 -3
- package/Tooltip.js.map +1 -1
- package/TooltipHover.js +0 -1
- package/TooltipHover.js.map +1 -1
- package/index.css +36 -36
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/package.json +5 -6
package/Tooltip.js
CHANGED
|
@@ -3,7 +3,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { forwardRef, useId, useState, useMemo, useRef, useLayoutEffect } from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { DropBase } from '@hh.ru/magritte-internal-drop-base';
|
|
6
|
-
import { Action } from '@hh.ru/magritte-ui-action';
|
|
7
6
|
import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
|
|
8
7
|
import { STRETCHED_WRAPPER_CLASS } from '@hh.ru/magritte-ui-button';
|
|
9
8
|
import { CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';
|
|
@@ -12,7 +11,7 @@ import { TooltipArrow } from './TooltipArrow.js';
|
|
|
12
11
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
13
12
|
import { BaseText } from '@hh.ru/magritte-ui-typography/BaseText';
|
|
14
13
|
|
|
15
|
-
var styles = {"tooltip":"magritte-tooltip___Hxyh2_9-
|
|
14
|
+
var styles = {"tooltip":"magritte-tooltip___Hxyh2_9-2-0","tooltip-with-buttons":"magritte-tooltip-with-buttons___pQzdt_9-2-0","tooltipWithButtons":"magritte-tooltip-with-buttons___pQzdt_9-2-0","tooltip-with-close":"magritte-tooltip-with-close___2iNPt_9-2-0","tooltipWithClose":"magritte-tooltip-with-close___2iNPt_9-2-0","tooltip-small":"magritte-tooltip-small___W1eTg_9-2-0","tooltipSmall":"magritte-tooltip-small___W1eTg_9-2-0","tooltip-title":"magritte-tooltip-title___s-ekd_9-2-0","tooltipTitle":"magritte-tooltip-title___s-ekd_9-2-0","tooltip-close":"magritte-tooltip-close___B1qWh_9-2-0","tooltipClose":"magritte-tooltip-close___B1qWh_9-2-0","tooltip-enter":"magritte-tooltip-enter___cnped_9-2-0","tooltipEnter":"magritte-tooltip-enter___cnped_9-2-0","css-variables-element":"magritte-css-variables-element___yRnOI_9-2-0","cssVariablesElement":"magritte-css-variables-element___yRnOI_9-2-0","tooltip-enter-active":"magritte-tooltip-enter-active___M8qsm_9-2-0","tooltipEnterActive":"magritte-tooltip-enter-active___M8qsm_9-2-0","tooltip-exit":"magritte-tooltip-exit___IXkNp_9-2-0","tooltipExit":"magritte-tooltip-exit___IXkNp_9-2-0","tooltip-exit-active":"magritte-tooltip-exit-active___QllYr_9-2-0","tooltipExitActive":"magritte-tooltip-exit-active___QllYr_9-2-0","tooltip-buttons":"magritte-tooltip-buttons___kNN5e_9-2-0","tooltipButtons":"magritte-tooltip-buttons___kNN5e_9-2-0","tooltip-arrow":"magritte-tooltip-arrow___7OOYT_9-2-0","tooltipArrow":"magritte-tooltip-arrow___7OOYT_9-2-0"};
|
|
16
15
|
|
|
17
16
|
const CSS_CLASSES = {
|
|
18
17
|
enter: styles.tooltipEnter,
|
|
@@ -104,7 +103,7 @@ const Tooltip = forwardRef(({ visible, activatorRef, onClose = noop, maxWidth =
|
|
|
104
103
|
[styles.tooltipSmall]: isSmall,
|
|
105
104
|
}), style: {
|
|
106
105
|
maxWidth: `${maxWidth}px`,
|
|
107
|
-
}, children: [title && !isSmall && (jsx("div", { className: styles.tooltipTitle, children: jsx(BaseText, { id: ariaLabledBy, "data-qa": "tooltip-title", Element: "div", style: "primary", typography: "title-5-semibold", children: title }) })), jsx(Text, { typography: isSmall ? 'paragraph-3-regular' : 'paragraph-2-regular', id: ariaDescribedBy, children: children }), buttons && !isSmall && (jsx("div", { className: classnames(styles.tooltipButtons, STRETCHED_WRAPPER_CLASS), children: typeof buttons === 'function' ? buttons(onClose) : buttons })), showClose && !isSmall && (jsx("div", { className: styles.tooltipClose, children: jsx(
|
|
106
|
+
}, children: [title && !isSmall && (jsx("div", { className: styles.tooltipTitle, children: jsx(BaseText, { id: ariaLabledBy, "data-qa": "tooltip-title", Element: "div", style: "primary", typography: "title-5-semibold", children: title }) })), jsx(Text, { typography: isSmall ? 'paragraph-3-regular' : 'paragraph-2-regular', id: ariaDescribedBy, children: children }), buttons && !isSmall && (jsx("div", { className: classnames(styles.tooltipButtons, STRETCHED_WRAPPER_CLASS), children: typeof buttons === 'function' ? buttons(onClose) : buttons })), showClose && !isSmall && (jsx("div", { className: styles.tooltipClose, children: jsx(CrossOutlinedSize24, { padding: 8, borderRadius: "halfHeight", "data-qa": "tooltip-close-action", "aria-label": ariaLabelClose, initialColor: "constant-secondary", onClick: () => onClose?.() }) })), jsx(TooltipArrow, { className: styles.tooltipArrow, size: size })] })) }) }));
|
|
108
107
|
});
|
|
109
108
|
Tooltip.displayName = 'Tooltip';
|
|
110
109
|
|
package/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../src/Tooltip.tsx"],"sourcesContent":["import { type ReactElement, useLayoutEffect, useId, useState, useMemo, useRef, forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { DropBase, type ArrowGuardDistance, type Placement } from '@hh.ru/magritte-internal-drop-base';\nimport { Action } from '@hh.ru/magritte-ui-action';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { STRETCHED_WRAPPER_CLASS } from '@hh.ru/magritte-ui-button';\nimport { CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { TooltipArrow } from '@hh.ru/magritte-ui-tooltip/TooltipArrow';\nimport { TooltipProps } from '@hh.ru/magritte-ui-tooltip/types';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport { BaseText } from '@hh.ru/magritte-ui-typography/BaseText';\n\nimport styles from './tooltip.less';\n\nconst CSS_CLASSES = {\n enter: styles.tooltipEnter,\n enterActive: styles.tooltipEnterActive,\n exit: styles.tooltipExit,\n exitActive: styles.tooltipExitActive,\n};\n\nconst PLACEMENTS_LIST: Placement[] = [\n 'left-center',\n 'top-center',\n 'right-center',\n 'bottom-center',\n 'left-top',\n 'left-bottom',\n 'top-left',\n 'top-right',\n 'right-bottom',\n 'right-top',\n 'bottom-left',\n 'bottom-right',\n];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n (\n {\n visible,\n activatorRef,\n onClose = noop,\n maxWidth = 400,\n title,\n children,\n showClose,\n closeByClickOutside = true,\n placement,\n buttons,\n forcePlacement,\n 'aria-label-close': ariaLabelClose,\n role,\n size = 'medium',\n ignoreIntersections = true,\n lockPlacement = true,\n guardDistanceToActivator: _guardDistanceToActivator,\n ...props\n }: TooltipProps,\n ref\n ): ReactElement | null => {\n const { isMobile } = useBreakpoint();\n const id = useId();\n const ariaLabledBy = `tooltip-aria-label-${id}`;\n const ariaDescribedBy = `tooltip-aria-description-${id}`;\n const [animationTimeout, setAnimationTimeout] = useState(200);\n const [arrowGuardDistance, setArrowGuardDistance] = useState<ArrowGuardDistance>({\n left: { top: 0, bottom: 0, center: 0 },\n right: { top: 0, bottom: 0, center: 0 },\n top: { left: 0, center: 0, right: 0 },\n bottom: { left: 0, center: 0, right: 0 },\n });\n const placementsList = useMemo(() => {\n const placementsArray: Placement[] = Array.isArray(placement) ? placement : [placement];\n return forcePlacement\n ? placementsArray\n : [...placementsArray, ...PLACEMENTS_LIST.filter((place) => !placement.includes(place))];\n }, [placement, forcePlacement]);\n const tooltipElementRef = useRef<HTMLDivElement>(null);\n\n const ariaRole = role || (buttons ? 'alertdialog' : 'tooltip');\n const isSmall = size === 'small';\n const guardDistanceToActivator = _guardDistanceToActivator ?? (isSmall ? 11 : 20);\n\n useLayoutEffect(() => {\n if (!tooltipElementRef.current) {\n return;\n }\n\n const style = window.getComputedStyle(tooltipElementRef.current);\n const animationTimeout = parseInt(style.getPropertyValue('--magritte-tooltip-animation-duration'), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n\n const borderRadius = parseInt(style.getPropertyValue('--magritte-tooltip-border-radius'), 10);\n const arrowWidth = parseInt(style.getPropertyValue('--magritte-tooltip-arrow-width'), 10);\n if (Number.isInteger(borderRadius) && Number.isInteger(arrowWidth)) {\n const arrowGap = borderRadius + arrowWidth / 2;\n setArrowGuardDistance({\n left: {\n top: arrowGap,\n bottom: arrowGap,\n center: 0,\n },\n right: {\n top: arrowGap,\n bottom: arrowGap,\n center: 0,\n },\n top: {\n left: arrowGap,\n center: 0,\n right: arrowGap,\n },\n bottom: {\n left: arrowGap,\n center: 0,\n right: arrowGap,\n },\n });\n }\n }, [buttons, setAnimationTimeout, isSmall, visible]);\n\n if (isMobile) {\n return null;\n }\n\n return (\n <Layer layer=\"tooltip\">\n <DropBase\n {...props}\n placement={placementsList}\n visible={visible}\n activatorRef={activatorRef}\n arrowGuardDistance={arrowGuardDistance}\n closeByClickOutside={closeByClickOutside}\n onClose={onClose}\n autoFocusWhenOpened={ariaRole !== 'tooltip'}\n guardDistanceToActivator={guardDistanceToActivator}\n guardDistanceToViewport={0}\n allowShrinkHeightToFitIntoViewport={false}\n animationClassNames={CSS_CLASSES}\n animationTimeout={animationTimeout}\n ignoreIntersections={ignoreIntersections}\n role={ariaRole}\n aria-labelledby={title && role !== 'tooltip' ? ariaLabledBy : undefined}\n aria-describedby={role !== 'tooltip' ? ariaDescribedBy : undefined}\n ref={ref}\n lockPlacement={lockPlacement}\n >\n {() => (\n <div\n data-qa=\"tooltip\"\n ref={tooltipElementRef}\n className={classnames(styles.tooltip, {\n [styles.tooltipWithButtons]: !isSmall && !!buttons,\n [styles.tooltipWithClose]: !isSmall && showClose,\n [styles.tooltipSmall]: isSmall,\n })}\n style={{\n maxWidth: `${maxWidth}px`,\n }}\n >\n {title && !isSmall && (\n <div className={styles.tooltipTitle}>\n <BaseText\n id={ariaLabledBy}\n data-qa=\"tooltip-title\"\n Element=\"div\"\n style=\"primary\"\n typography=\"title-5-semibold\"\n >\n {title}\n </BaseText>\n </div>\n )}\n <Text\n typography={isSmall ? 'paragraph-3-regular' : 'paragraph-2-regular'}\n id={ariaDescribedBy}\n >\n {children}\n </Text>\n {buttons && !isSmall && (\n <div className={classnames(styles.tooltipButtons, STRETCHED_WRAPPER_CLASS)}>\n {typeof buttons === 'function' ? buttons(onClose) : buttons}\n </div>\n )}\n {showClose && !isSmall && (\n <div className={styles.tooltipClose}>\n <Action\n data-qa=\"tooltip-close-action\"\n aria-label={ariaLabelClose}\n icon={CrossOutlinedSize24}\n mode=\"secondary\"\n onClick={() => onClose?.()}\n style=\"contrast\"\n />\n </div>\n )}\n <TooltipArrow className={styles.tooltipArrow} size={size} />\n </div>\n )}\n </DropBase>\n </Layer>\n );\n }\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,WAAW,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC,YAAY;IAC1B,WAAW,EAAE,MAAM,CAAC,kBAAkB;IACtC,IAAI,EAAE,MAAM,CAAC,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC,iBAAiB;CACvC,CAAC;AAEF,MAAM,eAAe,GAAgB;IACjC,aAAa;IACb,YAAY;IACZ,cAAc;IACd,eAAe;IACf,UAAU;IACV,aAAa;IACb,UAAU;IACV,WAAW;IACX,cAAc;IACd,WAAW;IACX,aAAa;IACb,cAAc;CACjB,CAAC;AAEF;AACA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEf,MAAM,OAAO,GAAG,UAAU,CAC7B,CACI,EACI,OAAO,EACP,YAAY,EACZ,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,GAAG,EACd,KAAK,EACL,QAAQ,EACR,SAAS,EACT,mBAAm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,EAAE,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC,EAAA,QAAA,EACrE,OAAO,OAAO,KAAK,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,EACzD,CAAA,CACT,EACA,SAAS,IAAI,CAAC,OAAO,KAClBA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAC/B,QAAA,EAAAA,GAAA,CAAC,MAAM,EACK,EAAA,SAAA,EAAA,sBAAsB,gBAClB,cAAc,EAC1B,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,MAAM,OAAO,IAAI,EAC1B,KAAK,EAAC,UAAU,GAClB,EACA,CAAA,CACT,EACDA,GAAA,CAAC,YAAY,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA,CAAA,EAAA,CAC1D,CACT,EACM,CAAA,EAAA,CACP,EACV;AACN,CAAC,EACH;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../src/Tooltip.tsx"],"sourcesContent":["import { type ReactElement, useLayoutEffect, useId, useState, useMemo, useRef, forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { DropBase, type ArrowGuardDistance, type Placement } from '@hh.ru/magritte-internal-drop-base';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { STRETCHED_WRAPPER_CLASS } from '@hh.ru/magritte-ui-button';\nimport { CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { TooltipArrow } from '@hh.ru/magritte-ui-tooltip/TooltipArrow';\nimport { TooltipProps } from '@hh.ru/magritte-ui-tooltip/types';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport { BaseText } from '@hh.ru/magritte-ui-typography/BaseText';\n\nimport styles from './tooltip.less';\n\nconst CSS_CLASSES = {\n enter: styles.tooltipEnter,\n enterActive: styles.tooltipEnterActive,\n exit: styles.tooltipExit,\n exitActive: styles.tooltipExitActive,\n};\n\nconst PLACEMENTS_LIST: Placement[] = [\n 'left-center',\n 'top-center',\n 'right-center',\n 'bottom-center',\n 'left-top',\n 'left-bottom',\n 'top-left',\n 'top-right',\n 'right-bottom',\n 'right-top',\n 'bottom-left',\n 'bottom-right',\n];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n (\n {\n visible,\n activatorRef,\n onClose = noop,\n maxWidth = 400,\n title,\n children,\n showClose,\n closeByClickOutside = true,\n placement,\n buttons,\n forcePlacement,\n 'aria-label-close': ariaLabelClose,\n role,\n size = 'medium',\n ignoreIntersections = true,\n lockPlacement = true,\n guardDistanceToActivator: _guardDistanceToActivator,\n ...props\n }: TooltipProps,\n ref\n ): ReactElement | null => {\n const { isMobile } = useBreakpoint();\n const id = useId();\n const ariaLabledBy = `tooltip-aria-label-${id}`;\n const ariaDescribedBy = `tooltip-aria-description-${id}`;\n const [animationTimeout, setAnimationTimeout] = useState(200);\n const [arrowGuardDistance, setArrowGuardDistance] = useState<ArrowGuardDistance>({\n left: { top: 0, bottom: 0, center: 0 },\n right: { top: 0, bottom: 0, center: 0 },\n top: { left: 0, center: 0, right: 0 },\n bottom: { left: 0, center: 0, right: 0 },\n });\n const placementsList = useMemo(() => {\n const placementsArray: Placement[] = Array.isArray(placement) ? placement : [placement];\n return forcePlacement\n ? placementsArray\n : [...placementsArray, ...PLACEMENTS_LIST.filter((place) => !placement.includes(place))];\n }, [placement, forcePlacement]);\n const tooltipElementRef = useRef<HTMLDivElement>(null);\n\n const ariaRole = role || (buttons ? 'alertdialog' : 'tooltip');\n const isSmall = size === 'small';\n const guardDistanceToActivator = _guardDistanceToActivator ?? (isSmall ? 11 : 20);\n\n useLayoutEffect(() => {\n if (!tooltipElementRef.current) {\n return;\n }\n\n const style = window.getComputedStyle(tooltipElementRef.current);\n const animationTimeout = parseInt(style.getPropertyValue('--magritte-tooltip-animation-duration'), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n\n const borderRadius = parseInt(style.getPropertyValue('--magritte-tooltip-border-radius'), 10);\n const arrowWidth = parseInt(style.getPropertyValue('--magritte-tooltip-arrow-width'), 10);\n if (Number.isInteger(borderRadius) && Number.isInteger(arrowWidth)) {\n const arrowGap = borderRadius + arrowWidth / 2;\n setArrowGuardDistance({\n left: {\n top: arrowGap,\n bottom: arrowGap,\n center: 0,\n },\n right: {\n top: arrowGap,\n bottom: arrowGap,\n center: 0,\n },\n top: {\n left: arrowGap,\n center: 0,\n right: arrowGap,\n },\n bottom: {\n left: arrowGap,\n center: 0,\n right: arrowGap,\n },\n });\n }\n }, [buttons, setAnimationTimeout, isSmall, visible]);\n\n if (isMobile) {\n return null;\n }\n\n return (\n <Layer layer=\"tooltip\">\n <DropBase\n {...props}\n placement={placementsList}\n visible={visible}\n activatorRef={activatorRef}\n arrowGuardDistance={arrowGuardDistance}\n closeByClickOutside={closeByClickOutside}\n onClose={onClose}\n autoFocusWhenOpened={ariaRole !== 'tooltip'}\n guardDistanceToActivator={guardDistanceToActivator}\n guardDistanceToViewport={0}\n allowShrinkHeightToFitIntoViewport={false}\n animationClassNames={CSS_CLASSES}\n animationTimeout={animationTimeout}\n ignoreIntersections={ignoreIntersections}\n role={ariaRole}\n aria-labelledby={title && role !== 'tooltip' ? ariaLabledBy : undefined}\n aria-describedby={role !== 'tooltip' ? ariaDescribedBy : undefined}\n ref={ref}\n lockPlacement={lockPlacement}\n >\n {() => (\n <div\n data-qa=\"tooltip\"\n ref={tooltipElementRef}\n className={classnames(styles.tooltip, {\n [styles.tooltipWithButtons]: !isSmall && !!buttons,\n [styles.tooltipWithClose]: !isSmall && showClose,\n [styles.tooltipSmall]: isSmall,\n })}\n style={{\n maxWidth: `${maxWidth}px`,\n }}\n >\n {title && !isSmall && (\n <div className={styles.tooltipTitle}>\n <BaseText\n id={ariaLabledBy}\n data-qa=\"tooltip-title\"\n Element=\"div\"\n style=\"primary\"\n typography=\"title-5-semibold\"\n >\n {title}\n </BaseText>\n </div>\n )}\n <Text\n typography={isSmall ? 'paragraph-3-regular' : 'paragraph-2-regular'}\n id={ariaDescribedBy}\n >\n {children}\n </Text>\n {buttons && !isSmall && (\n <div className={classnames(styles.tooltipButtons, STRETCHED_WRAPPER_CLASS)}>\n {typeof buttons === 'function' ? buttons(onClose) : buttons}\n </div>\n )}\n {showClose && !isSmall && (\n <div className={styles.tooltipClose}>\n <CrossOutlinedSize24\n padding={8}\n borderRadius=\"halfHeight\"\n data-qa=\"tooltip-close-action\"\n aria-label={ariaLabelClose}\n initialColor=\"constant-secondary\"\n onClick={() => onClose?.()}\n />\n </div>\n )}\n <TooltipArrow className={styles.tooltipArrow} size={size} />\n </div>\n )}\n </DropBase>\n </Layer>\n );\n }\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AAeA,MAAM,WAAW,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC,YAAY;IAC1B,WAAW,EAAE,MAAM,CAAC,kBAAkB;IACtC,IAAI,EAAE,MAAM,CAAC,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC,iBAAiB;CACvC,CAAC;AAEF,MAAM,eAAe,GAAgB;IACjC,aAAa;IACb,YAAY;IACZ,cAAc;IACd,eAAe;IACf,UAAU;IACV,aAAa;IACb,UAAU;IACV,WAAW;IACX,cAAc;IACd,WAAW;IACX,aAAa;IACb,cAAc;CACjB,CAAC;AAEF;AACA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEf,MAAM,OAAO,GAAG,UAAU,CAC7B,CACI,EACI,OAAO,EACP,YAAY,EACZ,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,GAAG,EACd,KAAK,EACL,QAAQ,EACR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,EAAA,EAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC,EAAA,QAAA,EACrE,OAAO,OAAO,KAAK,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,EACzD,CAAA,CACT,EACA,SAAS,IAAI,CAAC,OAAO,KAClBA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAC/B,QAAA,EAAAA,GAAA,CAAC,mBAAmB,EAChB,EAAA,OAAO,EAAE,CAAC,EACV,YAAY,EAAC,YAAY,EACjB,SAAA,EAAA,sBAAsB,gBAClB,cAAc,EAC1B,YAAY,EAAC,oBAAoB,EACjC,OAAO,EAAE,MAAM,OAAO,IAAI,GAC5B,EACA,CAAA,CACT,EACDA,GAAA,CAAC,YAAY,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA,CAAA,EAAA,CAC1D,CACT,EACM,CAAA,EAAA,CACP,EACV;AACN,CAAC,EACH;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
|
package/TooltipHover.js
CHANGED
|
@@ -5,7 +5,6 @@ import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
|
|
|
5
5
|
import { Tooltip } from './Tooltip.js';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '@hh.ru/magritte-internal-drop-base';
|
|
8
|
-
import '@hh.ru/magritte-ui-action';
|
|
9
8
|
import '@hh.ru/magritte-ui-breakpoint';
|
|
10
9
|
import '@hh.ru/magritte-ui-button';
|
|
11
10
|
import '@hh.ru/magritte-ui-icon/icon';
|
package/TooltipHover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipHover.js","sources":["../src/TooltipHover.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useCallback, useEffect, useRef, useState } from 'react';\n\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { Tooltip } from '@hh.ru/magritte-ui-tooltip/Tooltip';\nimport { TooltipHoverProps } from '@hh.ru/magritte-ui-tooltip/types';\n\nexport const TooltipHover = forwardRef<HTMLDivElement, TooltipHoverProps>(\n ({ activatorRef, children, ignoreIntersections = true, size = 'medium', ...props }, ref): ReactElement | null => {\n const [visible, setVisible] = useState(false);\n const isSmallRef = useRef(false);\n const hideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n isSmallRef.current = size === 'small';\n\n const toggleVisible = useCallback(\n (visible: boolean) => {\n if (visible === true) {\n if (hideTimerRef.current) {\n clearTimeout(hideTimerRef.current);\n hideTimerRef.current = null;\n }\n setVisible(true);\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n isSmallRef.current\n ? setVisible(false)\n : (hideTimerRef.current = setTimeout(() => setVisible(false), 100));\n },\n [setVisible]\n );\n\n const tooltipRefCallback = useCallback(\n (node: HTMLDivElement | null) => {\n if (node && !isSmallRef.current) {\n node.addEventListener('mouseenter', () => toggleVisible(true));\n node.addEventListener('mouseleave', () => toggleVisible(false));\n }\n },\n [toggleVisible]\n );\n\n const tooltipRefMulti = useMultipleRefs(tooltipRefCallback, ref);\n\n useEffect(() => {\n const activator = activatorRef.current;\n if (!activator) {\n return void 0;\n }\n\n let isTouchEnabled = false;\n\n const handleTouchStart = () => (isTouchEnabled = true);\n const handleMouseEnter = () => !isTouchEnabled && toggleVisible(true);\n const handleMouseLeave = () => toggleVisible(false);\n\n activator.addEventListener('touchstart', handleTouchStart);\n activator.addEventListener('mouseenter', handleMouseEnter);\n activator.addEventListener('mouseleave', handleMouseLeave);\n\n return () => {\n activator.removeEventListener('touchstart', handleTouchStart);\n activator.removeEventListener('mouseenter', handleMouseEnter);\n activator.removeEventListener('mouseleave', handleMouseLeave);\n };\n }, [activatorRef, toggleVisible]);\n\n return (\n <Tooltip\n {...props}\n size={size}\n onClose={() => setVisible(false)}\n ignoreIntersections={ignoreIntersections}\n visible={visible}\n activatorRef={activatorRef}\n ref={tooltipRefMulti}\n >\n {children}\n </Tooltip>\n );\n }\n);\n\nTooltipHover.displayName = 'TooltipHover';\n"],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TooltipHover.js","sources":["../src/TooltipHover.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useCallback, useEffect, useRef, useState } from 'react';\n\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { Tooltip } from '@hh.ru/magritte-ui-tooltip/Tooltip';\nimport { TooltipHoverProps } from '@hh.ru/magritte-ui-tooltip/types';\n\nexport const TooltipHover = forwardRef<HTMLDivElement, TooltipHoverProps>(\n ({ activatorRef, children, ignoreIntersections = true, size = 'medium', ...props }, ref): ReactElement | null => {\n const [visible, setVisible] = useState(false);\n const isSmallRef = useRef(false);\n const hideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n isSmallRef.current = size === 'small';\n\n const toggleVisible = useCallback(\n (visible: boolean) => {\n if (visible === true) {\n if (hideTimerRef.current) {\n clearTimeout(hideTimerRef.current);\n hideTimerRef.current = null;\n }\n setVisible(true);\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n isSmallRef.current\n ? setVisible(false)\n : (hideTimerRef.current = setTimeout(() => setVisible(false), 100));\n },\n [setVisible]\n );\n\n const tooltipRefCallback = useCallback(\n (node: HTMLDivElement | null) => {\n if (node && !isSmallRef.current) {\n node.addEventListener('mouseenter', () => toggleVisible(true));\n node.addEventListener('mouseleave', () => toggleVisible(false));\n }\n },\n [toggleVisible]\n );\n\n const tooltipRefMulti = useMultipleRefs(tooltipRefCallback, ref);\n\n useEffect(() => {\n const activator = activatorRef.current;\n if (!activator) {\n return void 0;\n }\n\n let isTouchEnabled = false;\n\n const handleTouchStart = () => (isTouchEnabled = true);\n const handleMouseEnter = () => !isTouchEnabled && toggleVisible(true);\n const handleMouseLeave = () => toggleVisible(false);\n\n activator.addEventListener('touchstart', handleTouchStart);\n activator.addEventListener('mouseenter', handleMouseEnter);\n activator.addEventListener('mouseleave', handleMouseLeave);\n\n return () => {\n activator.removeEventListener('touchstart', handleTouchStart);\n activator.removeEventListener('mouseenter', handleMouseEnter);\n activator.removeEventListener('mouseleave', handleMouseLeave);\n };\n }, [activatorRef, toggleVisible]);\n\n return (\n <Tooltip\n {...props}\n size={size}\n onClose={() => setVisible(false)}\n ignoreIntersections={ignoreIntersections}\n visible={visible}\n activatorRef={activatorRef}\n ref={tooltipRefMulti}\n >\n {children}\n </Tooltip>\n );\n }\n);\n\nTooltipHover.displayName = 'TooltipHover';\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AAMa,MAAA,YAAY,GAAG,UAAU,CAClC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,mBAAmB,GAAG,IAAI,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAyB;IAC5G,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9C,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACjC,IAAA,MAAM,YAAY,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAC;AAExE,IAAA,UAAU,CAAC,OAAO,GAAG,IAAI,KAAK,OAAO,CAAC;AAEtC,IAAA,MAAM,aAAa,GAAG,WAAW,CAC7B,CAAC,OAAgB,KAAI;AACjB,QAAA,IAAI,OAAO,KAAK,IAAI,EAAE;AAClB,YAAA,IAAI,YAAY,CAAC,OAAO,EAAE;AACtB,gBAAA,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACnC,gBAAA,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;aAC/B;YACD,UAAU,CAAC,IAAI,CAAC,CAAC;YACjB,OAAO;SACV;;AAGD,QAAA,UAAU,CAAC,OAAO;AACd,cAAE,UAAU,CAAC,KAAK,CAAC;A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SAAS,CAAC,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAC9D,YAAA,SAAS,CAAC,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAC9D,YAAA,SAAS,CAAC,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAClE,SAAC,CAAC;AACN,KAAC,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAElC,IAAA,QACIA,GAAC,CAAA,OAAO,EACA,EAAA,GAAA,KAAK,EACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,UAAU,CAAC,KAAK,CAAC,EAChC,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,eAAe,YAEnB,QAAQ,EAAA,CACH,EACZ;AACN,CAAC,EACH;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
|
package/index.css
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
--magritte-color-component-tooltip-text-content-v21-3-2:#ffffff;
|
|
16
16
|
--magritte-color-component-tooltip-stroke-content-v21-3-2:#3B3B3B;
|
|
17
17
|
}
|
|
18
|
-
.magritte-tooltip___Hxyh2_9-
|
|
18
|
+
.magritte-tooltip___Hxyh2_9-2-0{
|
|
19
19
|
position:relative;
|
|
20
20
|
padding:16px;
|
|
21
21
|
background:var(--magritte-color-component-tooltip-background-content-v21-3-2);
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
--magritte-tooltip-arrow-width:28px;
|
|
33
33
|
--magritte-tooltip-arrow-height:12px;
|
|
34
34
|
}
|
|
35
|
-
.magritte-tooltip-with-buttons___pQzdt_9-
|
|
35
|
+
.magritte-tooltip-with-buttons___pQzdt_9-2-0{
|
|
36
36
|
padding:24px 24px 12px;
|
|
37
37
|
--magritte-tooltip-arrow-vertical-gap:calc(var(--magritte-static-border-radius-600-v21-3-2) + 28px / 2 - 12px / 2 - 1px);
|
|
38
38
|
--magritte-tooltip-border-radius:var(--magritte-static-border-radius-600-v21-3-2);
|
|
39
39
|
--magritte-tooltip-arrow-width:28px;
|
|
40
40
|
--magritte-tooltip-arrow-height:12px;
|
|
41
41
|
}
|
|
42
|
-
.magritte-tooltip-with-close___2iNPt_9-
|
|
42
|
+
.magritte-tooltip-with-close___2iNPt_9-2-0{
|
|
43
43
|
padding-right:56px;
|
|
44
44
|
}
|
|
45
|
-
.magritte-tooltip-small___W1eTg_9-
|
|
45
|
+
.magritte-tooltip-small___W1eTg_9-2-0{
|
|
46
46
|
padding:8px 12px;
|
|
47
47
|
min-height:0;
|
|
48
48
|
--magritte-tooltip-arrow-vertical-gap:calc(var(--magritte-static-border-radius-300-v21-3-2) + 18px / 2 - 12px / 2 - 1px);
|
|
@@ -50,103 +50,103 @@
|
|
|
50
50
|
--magritte-tooltip-arrow-width:18px;
|
|
51
51
|
--magritte-tooltip-arrow-height:12px;
|
|
52
52
|
}
|
|
53
|
-
.magritte-tooltip-title___s-ekd_9-
|
|
53
|
+
.magritte-tooltip-title___s-ekd_9-2-0{
|
|
54
54
|
margin-bottom:4px;
|
|
55
55
|
}
|
|
56
|
-
.magritte-tooltip-close___B1qWh_9-
|
|
56
|
+
.magritte-tooltip-close___B1qWh_9-2-0{
|
|
57
57
|
position:absolute;
|
|
58
58
|
right:9px;
|
|
59
59
|
top:9px;
|
|
60
60
|
}
|
|
61
|
-
.magritte-tooltip-with-buttons___pQzdt_9-
|
|
61
|
+
.magritte-tooltip-with-buttons___pQzdt_9-2-0 .magritte-tooltip-close___B1qWh_9-2-0{
|
|
62
62
|
right:15px;
|
|
63
63
|
top:15px;
|
|
64
64
|
}
|
|
65
65
|
@media (prefers-reduced-motion: no-preference){
|
|
66
|
-
.magritte-tooltip-enter___cnped_9-
|
|
66
|
+
.magritte-tooltip-enter___cnped_9-2-0 .magritte-tooltip___Hxyh2_9-2-0{
|
|
67
67
|
opacity:0;
|
|
68
68
|
}
|
|
69
|
-
.magritte-css-variables-element___yRnOI_9-
|
|
70
|
-
.magritte-tooltip-enter-active___M8qsm_9-
|
|
69
|
+
.magritte-css-variables-element___yRnOI_9-2-0,
|
|
70
|
+
.magritte-tooltip-enter-active___M8qsm_9-2-0 .magritte-tooltip___Hxyh2_9-2-0{
|
|
71
71
|
opacity:1;
|
|
72
72
|
transition-property:opacity, transform;
|
|
73
73
|
transition-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
74
74
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-2);
|
|
75
75
|
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
76
76
|
}
|
|
77
|
-
.magritte-tooltip-exit___IXkNp_9-
|
|
77
|
+
.magritte-tooltip-exit___IXkNp_9-2-0 .magritte-tooltip___Hxyh2_9-2-0{
|
|
78
78
|
opacity:1;
|
|
79
79
|
}
|
|
80
|
-
.magritte-tooltip-exit-active___QllYr_9-
|
|
80
|
+
.magritte-tooltip-exit-active___QllYr_9-2-0 .magritte-tooltip___Hxyh2_9-2-0{
|
|
81
81
|
opacity:0;
|
|
82
82
|
transition-property:opacity, transform;
|
|
83
83
|
transition-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
84
84
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-2);
|
|
85
85
|
--animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
86
86
|
}
|
|
87
|
-
.magritte-tooltip-exit-active___QllYr_9-
|
|
88
|
-
.magritte-tooltip-enter___cnped_9-
|
|
87
|
+
.magritte-tooltip-exit-active___QllYr_9-2-0[data-magritte-drop-base-direction='bottom'] .magritte-tooltip___Hxyh2_9-2-0,
|
|
88
|
+
.magritte-tooltip-enter___cnped_9-2-0[data-magritte-drop-base-direction='bottom'] .magritte-tooltip___Hxyh2_9-2-0{
|
|
89
89
|
transform:translateY(4px);
|
|
90
90
|
}
|
|
91
|
-
.magritte-tooltip-exit-active___QllYr_9-
|
|
92
|
-
.magritte-tooltip-enter___cnped_9-
|
|
91
|
+
.magritte-tooltip-exit-active___QllYr_9-2-0[data-magritte-drop-base-direction='top'] .magritte-tooltip___Hxyh2_9-2-0,
|
|
92
|
+
.magritte-tooltip-enter___cnped_9-2-0[data-magritte-drop-base-direction='top'] .magritte-tooltip___Hxyh2_9-2-0{
|
|
93
93
|
transform:translateY(-4px);
|
|
94
94
|
}
|
|
95
|
-
.magritte-tooltip-exit-active___QllYr_9-
|
|
96
|
-
.magritte-tooltip-enter___cnped_9-
|
|
95
|
+
.magritte-tooltip-exit-active___QllYr_9-2-0[data-magritte-drop-base-direction='left'] .magritte-tooltip___Hxyh2_9-2-0,
|
|
96
|
+
.magritte-tooltip-enter___cnped_9-2-0[data-magritte-drop-base-direction='left'] .magritte-tooltip___Hxyh2_9-2-0{
|
|
97
97
|
transform:translateX(-4px);
|
|
98
98
|
}
|
|
99
|
-
.magritte-tooltip-exit-active___QllYr_9-
|
|
100
|
-
.magritte-tooltip-enter___cnped_9-
|
|
99
|
+
.magritte-tooltip-exit-active___QllYr_9-2-0[data-magritte-drop-base-direction='right'] .magritte-tooltip___Hxyh2_9-2-0,
|
|
100
|
+
.magritte-tooltip-enter___cnped_9-2-0[data-magritte-drop-base-direction='right'] .magritte-tooltip___Hxyh2_9-2-0{
|
|
101
101
|
transform:translateX(4px);
|
|
102
102
|
}
|
|
103
|
-
.magritte-tooltip-enter-active___M8qsm_9-
|
|
103
|
+
.magritte-tooltip-enter-active___M8qsm_9-2-0[data-magritte-drop-base-direction] .magritte-tooltip___Hxyh2_9-2-0{
|
|
104
104
|
transform:translate(0, 0);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
.magritte-tooltip-buttons___kNN5e_9-
|
|
107
|
+
.magritte-tooltip-buttons___kNN5e_9-2-0{
|
|
108
108
|
display:flex;
|
|
109
109
|
gap:12px;
|
|
110
110
|
margin:24px -12px 0;
|
|
111
111
|
}
|
|
112
|
-
.magritte-tooltip-with-close___2iNPt_9-
|
|
112
|
+
.magritte-tooltip-with-close___2iNPt_9-2-0 .magritte-tooltip-buttons___kNN5e_9-2-0{
|
|
113
113
|
margin-right:-44px;
|
|
114
114
|
}
|
|
115
|
-
.magritte-tooltip-arrow___7OOYT_9-
|
|
115
|
+
.magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
116
116
|
position:absolute;
|
|
117
117
|
}
|
|
118
|
-
[data-magritte-drop-base-direction='bottom'] .magritte-tooltip-arrow___7OOYT_9-
|
|
118
|
+
[data-magritte-drop-base-direction='bottom'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
119
119
|
top:calc(var(--magritte-tooltip-arrow-height) * -1);
|
|
120
120
|
}
|
|
121
|
-
[data-magritte-drop-base-direction='top'] .magritte-tooltip-arrow___7OOYT_9-
|
|
121
|
+
[data-magritte-drop-base-direction='top'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
122
122
|
bottom:calc(var(--magritte-tooltip-arrow-height) * -1);
|
|
123
123
|
transform:rotate(180deg);
|
|
124
124
|
}
|
|
125
|
-
[data-magritte-drop-base-alignment='left'] .magritte-tooltip-arrow___7OOYT_9-
|
|
125
|
+
[data-magritte-drop-base-alignment='left'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
126
126
|
left:var(--magritte-tooltip-border-radius);
|
|
127
127
|
}
|
|
128
|
-
[data-magritte-drop-base-direction='top'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-
|
|
129
|
-
[data-magritte-drop-base-direction='bottom'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-
|
|
128
|
+
[data-magritte-drop-base-direction='top'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-2-0,
|
|
129
|
+
[data-magritte-drop-base-direction='bottom'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
130
130
|
left:calc(50% - var(--magritte-tooltip-arrow-width) / 2);
|
|
131
131
|
}
|
|
132
|
-
[data-magritte-drop-base-alignment='right'] .magritte-tooltip-arrow___7OOYT_9-
|
|
132
|
+
[data-magritte-drop-base-alignment='right'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
133
133
|
right:var(--magritte-tooltip-border-radius);
|
|
134
134
|
}
|
|
135
|
-
[data-magritte-drop-base-direction='left'] .magritte-tooltip-arrow___7OOYT_9-
|
|
135
|
+
[data-magritte-drop-base-direction='left'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
136
136
|
right:calc(-1 * (var(--magritte-tooltip-arrow-width) / 2 + var(--magritte-tooltip-arrow-height) / 2));
|
|
137
137
|
transform:rotate(90deg);
|
|
138
138
|
}
|
|
139
|
-
[data-magritte-drop-base-direction='right'] .magritte-tooltip-arrow___7OOYT_9-
|
|
139
|
+
[data-magritte-drop-base-direction='right'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
140
140
|
left:calc(-1 * (var(--magritte-tooltip-arrow-width) / 2 + var(--magritte-tooltip-arrow-height) / 2));
|
|
141
141
|
transform:rotate(-90deg);
|
|
142
142
|
}
|
|
143
|
-
[data-magritte-drop-base-alignment='top'] .magritte-tooltip-arrow___7OOYT_9-
|
|
143
|
+
[data-magritte-drop-base-alignment='top'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
144
144
|
top:var(--magritte-tooltip-arrow-vertical-gap);
|
|
145
145
|
}
|
|
146
|
-
[data-magritte-drop-base-direction='left'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-
|
|
147
|
-
[data-magritte-drop-base-direction='right'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-
|
|
146
|
+
[data-magritte-drop-base-direction='left'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-2-0,
|
|
147
|
+
[data-magritte-drop-base-direction='right'][data-magritte-drop-base-alignment='center'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
148
148
|
top:calc(50% - var(--magritte-tooltip-arrow-height) / 2);
|
|
149
149
|
}
|
|
150
|
-
[data-magritte-drop-base-alignment='bottom'] .magritte-tooltip-arrow___7OOYT_9-
|
|
150
|
+
[data-magritte-drop-base-alignment='bottom'] .magritte-tooltip-arrow___7OOYT_9-2-0{
|
|
151
151
|
bottom:var(--magritte-tooltip-arrow-vertical-gap);
|
|
152
152
|
}
|
package/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import 'react';
|
|
|
7
7
|
import '@hh.ru/magritte-common-use-multiple-refs';
|
|
8
8
|
import 'classnames';
|
|
9
9
|
import '@hh.ru/magritte-internal-drop-base';
|
|
10
|
-
import '@hh.ru/magritte-ui-action';
|
|
11
10
|
import '@hh.ru/magritte-ui-breakpoint';
|
|
12
11
|
import '@hh.ru/magritte-ui-button';
|
|
13
12
|
import '@hh.ru/magritte-ui-icon/icon';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-tooltip",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -24,13 +24,12 @@
|
|
|
24
24
|
"@hh.ru/magritte-design-tokens": "21.3.2",
|
|
25
25
|
"@hh.ru/magritte-internal-drop-base": "7.0.13",
|
|
26
26
|
"@hh.ru/magritte-internal-layer-name": "3.0.0",
|
|
27
|
-
"@hh.ru/magritte-ui-action": "4.4.34",
|
|
28
27
|
"@hh.ru/magritte-ui-breakpoint": "5.0.0",
|
|
29
|
-
"@hh.ru/magritte-ui-button": "5.2.
|
|
30
|
-
"@hh.ru/magritte-ui-icon": "10.
|
|
28
|
+
"@hh.ru/magritte-ui-button": "5.2.29",
|
|
29
|
+
"@hh.ru/magritte-ui-icon": "10.2.0",
|
|
31
30
|
"@hh.ru/magritte-ui-layer": "3.0.0",
|
|
32
31
|
"@hh.ru/magritte-ui-theme-provider": "1.1.41",
|
|
33
|
-
"@hh.ru/magritte-ui-typography": "3.0.
|
|
32
|
+
"@hh.ru/magritte-ui-typography": "3.0.32"
|
|
34
33
|
},
|
|
35
34
|
"peerDependencies": {
|
|
36
35
|
"classnames": ">=2.3.2",
|
|
@@ -39,5 +38,5 @@
|
|
|
39
38
|
"publishConfig": {
|
|
40
39
|
"access": "public"
|
|
41
40
|
},
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "d12e0d9910ca5fb5323a5312386cb48255aa5ca6"
|
|
43
42
|
}
|