@box/blueprint-web 12.10.0 → 12.11.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/dist/lib-esm/index.css
CHANGED
|
@@ -2386,9 +2386,6 @@
|
|
|
2386
2386
|
.bp_content_card_module_pillGhost--14a6a{
|
|
2387
2387
|
margin-inline-end:var(--size-2);
|
|
2388
2388
|
}
|
|
2389
|
-
.bp_useFullTextTooltip_module_tooltipContent--0a9fb > *{
|
|
2390
|
-
color:var(--text-text-on-dark) !important;
|
|
2391
|
-
}
|
|
2392
2389
|
.bp_content_field_module_contentFieldWrapper--dabac{
|
|
2393
2390
|
width:100%;
|
|
2394
2391
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import { Fragment } from 'react';
|
|
4
3
|
import { Tooltip } from '../tooltip/tooltip.js';
|
|
5
|
-
import styles from './useFullTextTooltip.module.js';
|
|
6
4
|
import { useIsEllipsized } from './useIsEllipsized.js';
|
|
7
5
|
|
|
8
6
|
const useFullTextTooltip = ({
|
|
@@ -13,12 +11,20 @@ const useFullTextTooltip = ({
|
|
|
13
11
|
}) => {
|
|
14
12
|
const isEllipsized = useIsEllipsized(ref);
|
|
15
13
|
const shouldWrapInTooltip = isEllipsized && !skipOverflowCheck;
|
|
16
|
-
const Wrapper = shouldWrapInTooltip ? props =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const Wrapper = shouldWrapInTooltip ? props => {
|
|
15
|
+
const finalContent = props.content ?? textValue ?? children;
|
|
16
|
+
if (!finalContent) {
|
|
17
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
18
|
+
return jsx(Fragment, {
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return jsx(Tooltip, {
|
|
23
|
+
...props,
|
|
24
|
+
content: finalContent,
|
|
25
|
+
variant: "standard"
|
|
26
|
+
});
|
|
27
|
+
} : Fragment;
|
|
22
28
|
return {
|
|
23
29
|
Wrapper,
|
|
24
30
|
wrapperProps: {}
|
package/package.json
CHANGED