@box/blueprint-web 12.29.4 → 12.30.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.
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import * as Ariakit from '@ariakit/react';
3
3
  import clsx from 'clsx';
4
4
  import { forwardRef, useRef, useLayoutEffect, useCallback } from 'react';
5
+ import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
5
6
  import { Card } from '../card/card.js';
6
7
  import { composeEventHandlers } from '../utils/composeEventHandlers.js';
7
8
  import styles from './card-tooltip-v2.module.js';
@@ -45,6 +46,9 @@ const CardTooltipV2 = /*#__PURE__*/forwardRef((props, ref) => {
45
46
  const mounted = Ariakit.useStoreState(tooltipStore, 'mounted');
46
47
  const isOpen = Ariakit.useStoreState(tooltipStore, 'open');
47
48
  const focusTimeout = useRef(0);
49
+ const {
50
+ enableModernizedComponents
51
+ } = useBlueprintModernization();
48
52
  useLayoutEffect(() => {
49
53
  if (mounted && !isOpen) {
50
54
  // Make sure that tooltip disappears instantly after it is closed.
@@ -99,6 +103,7 @@ const CardTooltipV2 = /*#__PURE__*/forwardRef((props, ref) => {
99
103
  }),
100
104
  ref: ref,
101
105
  className: clsx(styles.content, className),
106
+ "data-modern": enableModernizedComponents,
102
107
  "data-side": side,
103
108
  fitViewport: true,
104
109
  gutter: 4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "12.29.4",
3
+ "version": "12.30.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {