@box/blueprint-web 6.2.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.
@@ -19,12 +19,12 @@ const StickyCell = /*#__PURE__*/forwardRef((props, ref) => {
19
19
  className: clsx(styles.stickyCell, className),
20
20
  ...rest,
21
21
  children: [jsx("div", {
22
- className: styles.stickyCellLeft
22
+ className: styles.stickyCellBelow
23
23
  }), jsx("div", {
24
24
  className: styles.childrenWrapper,
25
25
  children: children
26
26
  }), jsx("div", {
27
- className: styles.stickyCellRight
27
+ className: styles.stickyCellOuterLeft
28
28
  }), jsx("div", {
29
29
  className: clsx(styles.verticalBar, {
30
30
  [styles.isScrolledX]: isScrolledX
@@ -1,4 +1,4 @@
1
1
  import '../../index.css';
2
- var styles = {"stickyCell":"sticky-cell-module_stickyCell__-Rl0x","childrenWrapper":"sticky-cell-module_childrenWrapper__qjguw","verticalBar":"sticky-cell-module_verticalBar__AgXfU","isScrolledX":"sticky-cell-module_isScrolledX__xcMJ6","stickyCellLeft":"sticky-cell-module_stickyCellLeft__F3YAG","stickyCellRight":"sticky-cell-module_stickyCellRight__yQjUM"};
2
+ var styles = {"stickyCell":"sticky-cell-module_stickyCell__-Rl0x","childrenWrapper":"sticky-cell-module_childrenWrapper__qjguw","verticalBar":"sticky-cell-module_verticalBar__AgXfU","isScrolledX":"sticky-cell-module_isScrolledX__xcMJ6","stickyCellBelow":"sticky-cell-module_stickyCellBelow__BKRdm","stickyCellOuterLeft":"sticky-cell-module_stickyCellOuterLeft__tai5-"};
3
3
 
4
4
  export { styles as default };
@@ -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/lib-esm/index.css CHANGED
@@ -2898,7 +2898,7 @@
2898
2898
 
2899
2899
  .data-table-module_dataTableWrapper__VYLJf{
2900
2900
  --border-radius-datatable:0;
2901
- --outline-offset-focus-and-selected-row-datatable:-6px;
2901
+ --outline-offset-focus-and-selected-row-datatable:-0.25rem;
2902
2902
  --outline-select-color-datatable:#0000;
2903
2903
  --sticky-element-z-index:2;
2904
2904
  height:100%;
@@ -3208,7 +3208,6 @@
3208
3208
  background:inherit;
3209
3209
  background-clip:content-box;
3210
3210
  left:0;
3211
- outline:calc(var(--is-row-focused)*var(--border-2)) solid var(--outline-focus-color);
3212
3211
  outline-offset:var(--outline-offset-focus-cell);
3213
3212
  overflow:visible;
3214
3213
  position:sticky;
@@ -3239,29 +3238,26 @@
3239
3238
  .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_verticalBar__AgXfU.sticky-cell-module_isScrolledX__xcMJ6{
3240
3239
  display:block;
3241
3240
  }
3242
- .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellLeft__F3YAG{
3243
- background:inherit;
3244
- border-radius:unset;
3245
- box-sizing:border-box;
3246
- height:100%;
3247
- left:0;
3248
- pointer-events:none;
3249
- position:absolute;
3250
- top:0;
3241
+ .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellBelow__BKRdm{
3242
+ border-left:calc(var(--is-row-focused)*var(--border-2)) solid var(--outline-focus-color);
3243
+ height:calc(100% + var(--is-row-focused)*2*var(--outline-offset-focus-cell));
3244
+ left:var(--border-2);
3251
3245
  width:calc(100% + var(--outline-offset-focus-row));
3252
- z-index:-1;
3253
3246
  }
3254
- .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellRight__yQjUM{
3247
+ .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellBelow__BKRdm,.sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellOuterLeft__tai5-{
3255
3248
  background:inherit;
3256
3249
  border-radius:unset;
3257
3250
  box-sizing:border-box;
3258
- height:calc(var(--is-row-focused)*(100% + var(--outline-offset-focus-cell)*2));
3259
- left:100%;
3260
3251
  pointer-events:none;
3261
3252
  position:absolute;
3262
3253
  top:50%;
3263
- transform:translate(-100%, -50%);
3264
- width:var(--space-3);
3254
+ transform:translateY(-50%);
3255
+ z-index:-1;
3256
+ }
3257
+ .sticky-cell-module_stickyCell__-Rl0x .sticky-cell-module_stickyCellOuterLeft__tai5-{
3258
+ height:100%;
3259
+ left:0;
3260
+ width:var(--border-2);
3265
3261
  }
3266
3262
 
3267
3263
  .empty-state-module_emptyState__Qs2b2{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "6.2.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": "000a8ea7add0eb83c8ae32a73df867c700f31afd",
60
+ "gitHead": "01ae4a276d791db312a207c46a6c16017db01a8b",
61
61
  "module": "lib-esm/index.js",
62
62
  "type": "module",
63
63
  "main": "lib-esm/index.js",