@box/blueprint-web 6.11.5 → 6.11.7
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.
|
@@ -65,8 +65,12 @@ const ChipsGroup = props => {
|
|
|
65
65
|
children: jsx("div", {
|
|
66
66
|
role: "gridcell",
|
|
67
67
|
children: jsx(Tooltip
|
|
68
|
-
//
|
|
68
|
+
// Disable interactivity check for this specific tooltip. While the Tooltip always requires the trigger element to be interactive,
|
|
69
|
+
// it is not the case for the Chips Group as per the a11y pattern. In this case, the error is false positive.
|
|
69
70
|
, {
|
|
71
|
+
// Disable interactivity check for this specific tooltip. While the Tooltip always requires the trigger element to be interactive,
|
|
72
|
+
// it is not the case for the Chips Group as per the a11y pattern. In this case, the error is false positive.
|
|
73
|
+
__checkInteractivity: false,
|
|
70
74
|
"aria-hidden": true,
|
|
71
75
|
content: childElement.props.label,
|
|
72
76
|
children: /*#__PURE__*/React__default.cloneElement(childElement, {
|
|
@@ -24,6 +24,7 @@ const Tooltip = props => {
|
|
|
24
24
|
open,
|
|
25
25
|
defaultOpen,
|
|
26
26
|
forceMount,
|
|
27
|
+
__checkInteractivity,
|
|
27
28
|
...contentProps
|
|
28
29
|
} = props;
|
|
29
30
|
const container = useContext(ContainerContext);
|
|
@@ -32,6 +33,7 @@ const Tooltip = props => {
|
|
|
32
33
|
onOpenChange: onOpenChange,
|
|
33
34
|
open: open,
|
|
34
35
|
children: [jsx(TooltipTrigger, {
|
|
36
|
+
__checkInteractivity: __checkInteractivity,
|
|
35
37
|
open: open,
|
|
36
38
|
children: children
|
|
37
39
|
}), jsx(RadixTooltip.Portal, {
|
|
@@ -82,10 +84,11 @@ const TriggerWithInteractivityCheck = /*#__PURE__*/React__default.forwardRef(fun
|
|
|
82
84
|
});
|
|
83
85
|
const TooltipTrigger = /*#__PURE__*/React__default.forwardRef(({
|
|
84
86
|
children,
|
|
85
|
-
open
|
|
87
|
+
open,
|
|
88
|
+
__checkInteractivity = true
|
|
86
89
|
}, ref) => {
|
|
87
90
|
// in dev environment, if Tooltip open state is not explicitly controlled by user, check if it's used with interactive element
|
|
88
|
-
if (process.env.NODE_ENV !== 'production' && open === undefined) {
|
|
91
|
+
if (process.env.NODE_ENV !== 'production' && open === undefined && __checkInteractivity) {
|
|
89
92
|
return jsx(TriggerWithInteractivityCheck, {
|
|
90
93
|
ref: ref,
|
|
91
94
|
children: children
|
|
@@ -22,6 +22,8 @@ export interface TooltipProps extends Omit<React.ComponentProps<typeof RadixTool
|
|
|
22
22
|
defaultOpen?: RadixTooltip.TooltipProps['defaultOpen'];
|
|
23
23
|
/** Used to force mounting when more control is needed. */
|
|
24
24
|
forceMount?: RadixTooltip.TooltipPortalProps['forceMount'];
|
|
25
|
+
/** Blueprint internal prop. Checks whether the trigger element is interactive to provide a warning if it's not interactive. Defaults to `true`. */
|
|
26
|
+
__checkInteractivity?: boolean;
|
|
25
27
|
}
|
|
26
28
|
export interface TooltipProviderProps {
|
|
27
29
|
/** The rest of the application */
|
|
@@ -38,4 +40,6 @@ export interface TooltipTriggerProps {
|
|
|
38
40
|
children?: React.ReactNode;
|
|
39
41
|
/** The controlled open state of the tooltip. */
|
|
40
42
|
open?: TooltipProps['open'];
|
|
43
|
+
/** Blueprint internal prop. Checks whether the trigger element is interactive to provide a warning if it's not interactive. Defaults to `true`. */
|
|
44
|
+
__checkInteractivity?: boolean;
|
|
41
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.7",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@box/storybook-utils": "^0.0.3"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "eebfef6522480fa52789d26686aa9ce17e2e454c",
|
|
61
61
|
"module": "lib-esm/index.js",
|
|
62
62
|
"main": "lib-esm/index.js",
|
|
63
63
|
"exports": {
|