@box/blueprint-web 11.4.1 → 11.5.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.
@@ -9,11 +9,13 @@ import { useIsEllipsized } from '../utils/useIsEllipsized.js';
9
9
  const Wrapper = ({
10
10
  children,
11
11
  withTooltip,
12
- tooltipContent
12
+ tooltipContent,
13
+ tooltipSide
13
14
  }) => {
14
15
  if (withTooltip) {
15
16
  return jsx(Tooltip, {
16
17
  content: tooltipContent,
18
+ side: tooltipSide,
17
19
  children: jsx(Focusable, {
18
20
  children: children
19
21
  })
@@ -25,12 +27,14 @@ const EllipsizableText = /*#__PURE__*/forwardRef(({
25
27
  children,
26
28
  lineClamp,
27
29
  style,
30
+ tooltipSide,
28
31
  ...rest
29
32
  }, forwardedRef) => {
30
33
  const textRef = /*#__PURE__*/createRef();
31
34
  const isEllipsized = useIsEllipsized(textRef);
32
35
  return jsx(Wrapper, {
33
36
  tooltipContent: children,
37
+ tooltipSide: tooltipSide,
34
38
  withTooltip: isEllipsized,
35
39
  children: jsx(Text, {
36
40
  ref: useForkRef(textRef, forwardedRef),
@@ -1,5 +1,7 @@
1
1
  import { type TextProps } from '../text';
2
+ import { type TooltipProps } from '../tooltip';
2
3
  export type EllipsizableTextProps = TextProps & {
3
4
  /** Number if lines to show before the text is ellipsized. Note lineClamp must be a positive integer. */
4
5
  lineClamp: number;
6
+ tooltipSide?: TooltipProps['side'];
5
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "11.4.1",
3
+ "version": "11.5.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {