@box/blueprint-web 6.3.0 → 6.4.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.
@@ -3,7 +3,7 @@ import { type GuidedTooltipTextProps, type GuidedTooltipBodyProps } from './type
3
3
  /**
4
4
  * The component to show the text of Guided Tooltip.
5
5
  */
6
- export declare const GuidedTooltipText: ({ children }: GuidedTooltipTextProps) => JSX.Element;
6
+ export declare const GuidedTooltipText: ({ children, ...rest }: GuidedTooltipTextProps) => JSX.Element;
7
7
  /**
8
8
  * The component to show content in body of the Guided Tooltip.
9
9
  */
@@ -10,8 +10,10 @@ import { useGuidedTooltipContext } from './utils/guided-tooltip-context.js';
10
10
  * The component to show the text of Guided Tooltip.
11
11
  */
12
12
  const GuidedTooltipText = ({
13
- children
13
+ children,
14
+ ...rest
14
15
  }) => jsx(Text, {
16
+ ...rest,
15
17
  as: "p",
16
18
  color: "textOnLightDefault",
17
19
  variant: "bodyDefault",
@@ -9,7 +9,7 @@ export declare const GuidedTooltipFooterComponent: ({ children, className, ...re
9
9
  * Exposes primary and secondary action buttons most commonly used inside footer of the tooltip.
10
10
  */
11
11
  export declare const GuidedTooltipFooter: (({ children, className, ...rest }: GuidedTooltipFooterProps) => JSX.Element) & {
12
- ActionsContainer: ({ children, className }: GuidedTooltipActionsContainerProps) => JSX.Element;
12
+ ActionsContainer: ({ children, className, ...rest }: GuidedTooltipActionsContainerProps) => JSX.Element;
13
13
  PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
14
14
  loading?: boolean | undefined;
15
15
  loadingAriaLabel?: string | undefined;
@@ -66,6 +66,6 @@ export declare const GuidedTooltipFooter: (({ children, className, ...rest }: Gu
66
66
  children?: string | string[] | undefined;
67
67
  icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
68
68
  }, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
69
- StepsIndicator: ({ children, className }: GuidedTooltipStepsIndicatorProps) => JSX.Element;
69
+ StepsIndicator: ({ children, className, ...rest }: GuidedTooltipStepsIndicatorProps) => JSX.Element;
70
70
  };
71
71
  export default GuidedTooltipFooter;
@@ -23,8 +23,10 @@ const SecondaryAction = /*#__PURE__*/forwardRef((props, forwardedRef) => jsx(But
23
23
  */
24
24
  const ActionsContainer = ({
25
25
  children,
26
- className
26
+ className,
27
+ ...rest
27
28
  }) => jsx("div", {
29
+ ...rest,
28
30
  className: clsx(styles.actionButtons, className),
29
31
  children: children
30
32
  });
@@ -33,7 +35,8 @@ const ActionsContainer = ({
33
35
  */
34
36
  const StepsIndicator = ({
35
37
  children,
36
- className
38
+ className,
39
+ ...rest
37
40
  }) => {
38
41
  const {
39
42
  setStepsIndicatorId,
@@ -46,6 +49,7 @@ const StepsIndicator = ({
46
49
  }
47
50
  }, [setStepsIndicatorId, stepsIndicatorId]);
48
51
  return jsx("div", {
52
+ ...rest,
49
53
  className: clsx(styles.stepsIndicator, className),
50
54
  id: stepsIndicatorId,
51
55
  children: children
@@ -3,5 +3,5 @@ import { type GuidedTooltipIconProps } from './types';
3
3
  /**
4
4
  * Component that displays icon.
5
5
  */
6
- export declare const GuidedTooltipIcon: ({ className, icon }: GuidedTooltipIconProps) => JSX.Element;
6
+ export declare const GuidedTooltipIcon: ({ className, icon, ...rest }: GuidedTooltipIconProps) => JSX.Element;
7
7
  export default GuidedTooltipIcon;
@@ -8,9 +8,11 @@ import styles from './guided-tooltip.module.js';
8
8
  */
9
9
  const GuidedTooltipIcon = ({
10
10
  className,
11
- icon
11
+ icon,
12
+ ...rest
12
13
  }) => {
13
14
  return jsx("div", {
15
+ ...rest,
14
16
  className: styles.icon,
15
17
  children: /*#__PURE__*/createElement(icon, {
16
18
  color: SurfaceSurfaceBrand,
@@ -3,5 +3,5 @@ import { type GuidedTooltipIllustrationProps } from './types';
3
3
  /**
4
4
  * Component that displays illustration.
5
5
  */
6
- export declare const GuidedTooltipIllustration: ({ altText, className, imgUrl }: GuidedTooltipIllustrationProps) => JSX.Element;
6
+ export declare const GuidedTooltipIllustration: ({ altText, className, imgUrl, ...rest }: GuidedTooltipIllustrationProps) => JSX.Element;
7
7
  export default GuidedTooltipIllustration;
@@ -8,9 +8,11 @@ import styles from './guided-tooltip.module.js';
8
8
  const GuidedTooltipIllustration = ({
9
9
  altText = '',
10
10
  className,
11
- imgUrl
11
+ imgUrl,
12
+ ...rest
12
13
  }) => {
13
14
  return jsx("img", {
15
+ ...rest,
14
16
  alt: altText,
15
17
  className: clsx(styles.illustration, className),
16
18
  src: imgUrl
@@ -3,4 +3,4 @@ import { type GuidedTooltipTitleProps } from './types';
3
3
  /**
4
4
  * An accessible title to be announced when the GuidedTooltip is opened.
5
5
  */
6
- export declare const GuidedTooltipTitle: ({ children, className }: GuidedTooltipTitleProps) => JSX.Element;
6
+ export declare const GuidedTooltipTitle: ({ children, className, ...rest }: GuidedTooltipTitleProps) => JSX.Element;
@@ -11,7 +11,8 @@ import { useGuidedTooltipContext } from './utils/guided-tooltip-context.js';
11
11
  */
12
12
  const GuidedTooltipTitle = ({
13
13
  children,
14
- className
14
+ className,
15
+ ...rest
15
16
  }) => {
16
17
  const {
17
18
  setTitleId,
@@ -24,6 +25,7 @@ const GuidedTooltipTitle = ({
24
25
  }
25
26
  }, [setTitleId, titleId]);
26
27
  return jsx(Text, {
28
+ ...rest,
27
29
  as: "h2",
28
30
  className: clsx(styles.title, className),
29
31
  color: "textOnLightDefault",
@@ -3,7 +3,7 @@ import { type GuidedTooltipProps } from './types';
3
3
  export declare const GuidedTooltip: (({ children, onOpenChange, open, container, ...guidedTooltipContentProps }: GuidedTooltipProps) => JSX.Element) & {
4
4
  Body: import("react").ForwardRefExoticComponent<import("./types").GuidedTooltipBodyProps & import("react").RefAttributes<HTMLDivElement>>;
5
5
  Footer: (({ children, className, ...rest }: import("./types").GuidedTooltipFooterProps) => JSX.Element) & {
6
- ActionsContainer: ({ children, className }: import("./types").GuidedTooltipActionsContainerProps) => JSX.Element;
6
+ ActionsContainer: ({ children, className, ...rest }: import("./types").GuidedTooltipActionsContainerProps) => JSX.Element;
7
7
  PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<{
8
8
  loading?: boolean | undefined;
9
9
  loadingAriaLabel?: string | undefined;
@@ -60,10 +60,10 @@ export declare const GuidedTooltip: (({ children, onOpenChange, open, container,
60
60
  children?: string | string[] | undefined;
61
61
  icon?: import("react").FunctionComponent<import("react").PropsWithChildren<import("react").SVGProps<SVGSVGElement>>> | undefined;
62
62
  }, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
63
- StepsIndicator: ({ children, className }: import("./types").GuidedTooltipStepsIndicatorProps) => JSX.Element;
63
+ StepsIndicator: ({ children, className, ...rest }: import("./types").GuidedTooltipStepsIndicatorProps) => JSX.Element;
64
64
  };
65
- Icon: ({ className, icon }: import("./types").GuidedTooltipIconProps) => JSX.Element;
66
- Illustration: ({ altText, className, imgUrl }: import("./types").GuidedTooltipIllustrationProps) => JSX.Element;
67
- Text: ({ children }: import("./types").GuidedTooltipTextProps) => JSX.Element;
68
- Title: ({ children, className }: import("./types").GuidedTooltipTitleProps) => JSX.Element;
65
+ Icon: ({ className, icon, ...rest }: import("./types").GuidedTooltipIconProps) => JSX.Element;
66
+ Illustration: ({ altText, className, imgUrl, ...rest }: import("./types").GuidedTooltipIllustrationProps) => JSX.Element;
67
+ Text: ({ children, ...rest }: import("./types").GuidedTooltipTextProps) => JSX.Element;
68
+ Title: ({ children, className, ...rest }: import("./types").GuidedTooltipTitleProps) => JSX.Element;
69
69
  };
@@ -20,6 +20,7 @@ const GuidedTooltipContent = /*#__PURE__*/forwardRef(({
20
20
  className,
21
21
  closeLabel,
22
22
  content,
23
+ closeDataResinTarget = 'dismiss',
23
24
  side = 'bottom',
24
25
  sideOffset = OFFSET_FROM_ANCHOR_IN_PX,
25
26
  ...rest
@@ -62,6 +63,7 @@ const GuidedTooltipContent = /*#__PURE__*/forwardRef(({
62
63
  children: jsx(IconButton, {
63
64
  "aria-label": closeLabel,
64
65
  className: styles.closeButton,
66
+ "data-resin-target": closeDataResinTarget,
65
67
  icon: XMark
66
68
  })
67
69
  }), jsx(RadixPopover.Arrow, {
@@ -11,6 +11,10 @@ export interface GuidedTooltipContentProps extends Omit<React.HTMLAttributes<HTM
11
11
  closeLabel: string;
12
12
  /** React element with the content of GuildedTooltip */
13
13
  content: React.ReactElement;
14
+ /**
15
+ * "data-resin-target" to be passed to Close button.
16
+ */
17
+ closeDataResinTarget?: string;
14
18
  /** The preferred side of the anchor to render against. Will be reversed when collisions occur.
15
19
  * "top" | "right" | "bottom" | "left"
16
20
  * Default value: "bottom". */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
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.2"
59
59
  },
60
- "gitHead": "3654927d8374743593f706ada793f23a87888a68",
60
+ "gitHead": "01ae4a276d791db312a207c46a6c16017db01a8b",
61
61
  "module": "lib-esm/index.js",
62
62
  "type": "module",
63
63
  "main": "lib-esm/index.js",