@box/blueprint-web 13.18.0 → 14.0.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/THIRD_PARTY_LICENSES +206 -27
- package/dist/lib-esm/button/button.d.ts +0 -2
- package/dist/lib-esm/button/button.js +2 -4
- package/dist/lib-esm/button/types.d.ts +0 -4
- package/dist/lib-esm/card-tooltip/card-tooltip.d.ts +3 -6
- package/dist/lib-esm/card-tooltip/card-tooltip.js +96 -42
- package/dist/lib-esm/card-tooltip/card-tooltip.module.js +1 -1
- package/dist/lib-esm/card-tooltip/types.d.ts +21 -36
- package/dist/lib-esm/combobox/chips-group.js +1 -5
- package/dist/lib-esm/combobox/types.d.ts +2 -2
- package/dist/lib-esm/combobox-group/combobox-group-combobox.js +0 -1
- package/dist/lib-esm/data-table/data-table-wrapper.js +2 -0
- package/dist/lib-esm/data-table/use-table-scroll-correction.d.ts +15 -0
- package/dist/lib-esm/data-table/use-table-scroll-correction.js +211 -0
- package/dist/lib-esm/empty-state/empty-state.d.ts +0 -2
- package/dist/lib-esm/guided-tooltip/guided-tooltip-footer.d.ts +0 -4
- package/dist/lib-esm/guided-tooltip/guided-tooltip.d.ts +0 -4
- package/dist/lib-esm/index.css +232 -360
- package/dist/lib-esm/index.d.ts +0 -3
- package/dist/lib-esm/index.js +0 -3
- package/dist/lib-esm/list-item/table-header-dropdown.js +1 -1
- package/dist/lib-esm/modal/alert-modal.d.ts +0 -4
- package/dist/lib-esm/modal/modal-footer.d.ts +0 -4
- package/dist/lib-esm/modal/modal.d.ts +0 -4
- package/dist/lib-esm/primitives/context-menu/context-menu.module.js +1 -1
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-checkbox-item.js +6 -6
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-item.js +4 -4
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-select-item.js +6 -6
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu.module.js +1 -1
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.js +0 -1
- package/dist/lib-esm/select/select.js +2 -6
- package/dist/lib-esm/select/select.module.js +1 -1
- package/dist/lib-esm/side-panel/side-panel-footer.d.ts +0 -4
- package/dist/lib-esm/side-panel/side-panel.d.ts +0 -4
- package/dist/lib-esm/tooltip/tooltip.d.ts +3 -2
- package/dist/lib-esm/tooltip/tooltip.js +2 -36
- package/dist/lib-esm/tooltip/types.d.ts +0 -9
- package/dist/lib-esm/util-components/base-grid-list-item/types.d.ts +2 -2
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +1 -1
- package/dist/lib-esm/utils/useMedia.js +13 -1
- package/package.json +14 -14
- package/dist/lib-esm/card-tooltip-v2/card-tooltip-v2.d.ts +0 -10
- package/dist/lib-esm/card-tooltip-v2/card-tooltip-v2.js +0 -119
- package/dist/lib-esm/card-tooltip-v2/card-tooltip-v2.module.js +0 -4
- package/dist/lib-esm/card-tooltip-v2/index.d.ts +0 -2
- package/dist/lib-esm/card-tooltip-v2/types.d.ts +0 -30
- package/dist/lib-esm/content-field/content-field.d.ts +0 -4
- package/dist/lib-esm/content-field/content-field.js +0 -126
- package/dist/lib-esm/content-field/content-field.module.js +0 -4
- package/dist/lib-esm/content-field/index.d.ts +0 -2
- package/dist/lib-esm/content-field/messages.d.ts +0 -7
- package/dist/lib-esm/content-field/messages.js +0 -8
- package/dist/lib-esm/content-field/types.d.ts +0 -35
- package/dist/lib-esm/util-components/focus-trap/focus-trap.d.ts +0 -2
- package/dist/lib-esm/util-components/focus-trap/focus-trap.js +0 -52
- package/dist/lib-esm/util-components/focus-trap/index.d.ts +0 -1
- package/dist/lib-esm/util-components/focus-trap/types.d.ts +0 -8
- package/dist/lib-esm/utils/useIsTriggerInteractive.d.ts +0 -4
- package/dist/lib-esm/utils/useIsTriggerInteractive.js +0 -21
package/dist/lib-esm/index.d.ts
CHANGED
|
@@ -10,14 +10,12 @@ export * from './button';
|
|
|
10
10
|
export * from './button-wrapper';
|
|
11
11
|
export * from './card';
|
|
12
12
|
export * from './card-tooltip';
|
|
13
|
-
export * from './card-tooltip-v2';
|
|
14
13
|
export * from './checkbox';
|
|
15
14
|
export * from './circular-progress';
|
|
16
15
|
export * from './collapsible';
|
|
17
16
|
export * from './combobox';
|
|
18
17
|
export * from './combobox-group';
|
|
19
18
|
export * from './content-card';
|
|
20
|
-
export * from './content-field';
|
|
21
19
|
export * from './data-table/data-table';
|
|
22
20
|
export * from './date-picker';
|
|
23
21
|
export * from './divider';
|
|
@@ -78,7 +76,6 @@ export * from './time-picker';
|
|
|
78
76
|
export * from './toolbar';
|
|
79
77
|
export * from './tooltip';
|
|
80
78
|
export * from './trigger-button';
|
|
81
|
-
export * from './util-components/focus-trap';
|
|
82
79
|
export * from './util-components/interactive-icon';
|
|
83
80
|
export * from './util-components/labelable';
|
|
84
81
|
export * from './util-components/list-checkbox';
|
package/dist/lib-esm/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export { Button } from './button/button.js';
|
|
|
16
16
|
export { ButtonWrapper } from './button-wrapper/button-wrapper.js';
|
|
17
17
|
export { Card } from './card/card.js';
|
|
18
18
|
export { CardTooltip } from './card-tooltip/card-tooltip.js';
|
|
19
|
-
export { CardTooltipV2 } from './card-tooltip-v2/card-tooltip-v2.js';
|
|
20
19
|
export { Checkbox } from './checkbox/index.js';
|
|
21
20
|
export { CircularProgress } from './circular-progress/circular-progress.js';
|
|
22
21
|
export { CollapsibleSection } from './collapsible/collapsible-section.js';
|
|
@@ -24,7 +23,6 @@ export { ChipsGroup } from './combobox/chips-group.js';
|
|
|
24
23
|
export { Combobox, Root } from './combobox/combobox.js';
|
|
25
24
|
export { ComboboxGroup } from './combobox-group/combobox-group.js';
|
|
26
25
|
export { ContentCard } from './content-card/content-card.js';
|
|
27
|
-
export { ContentField } from './content-field/content-field.js';
|
|
28
26
|
export { DataTableWrapper, StickyCell } from './data-table/data-table.js';
|
|
29
27
|
export { DatePicker } from './date-picker/date-picker.js';
|
|
30
28
|
export { Divider } from './divider/divider.js';
|
|
@@ -100,7 +98,6 @@ export { TimePicker } from './time-picker/time-picker.js';
|
|
|
100
98
|
export { Toolbar } from './toolbar/index.js';
|
|
101
99
|
export { Tooltip, TooltipProvider } from './tooltip/tooltip.js';
|
|
102
100
|
export { TriggerButton } from './trigger-button/trigger-button.js';
|
|
103
|
-
export { FocusTrap } from './util-components/focus-trap/focus-trap.js';
|
|
104
101
|
export { InteractiveIcon } from './util-components/interactive-icon/interactive-icon.js';
|
|
105
102
|
export { useLabelable } from './util-components/labelable/useLabelable.js';
|
|
106
103
|
export { ListCheckbox } from './util-components/list-checkbox/list-checkbox.js';
|
|
@@ -42,7 +42,7 @@ const TableHeaderInner = ({
|
|
|
42
42
|
children: jsx(Button, {
|
|
43
43
|
"aria-label": "sort-by",
|
|
44
44
|
"aria-sort": sortDescriptor.direction === 'ascending' ? 'ascending' : 'descending',
|
|
45
|
-
|
|
45
|
+
endIcon: SortIcon,
|
|
46
46
|
size: "small",
|
|
47
47
|
variant: "secondary",
|
|
48
48
|
children: columnLabel
|
|
@@ -5,23 +5,19 @@ export declare const AlertModal: {
|
|
|
5
5
|
} & {
|
|
6
6
|
PrimaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
7
7
|
children?: string | string[];
|
|
8
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
9
8
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
10
9
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
11
10
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
12
11
|
children?: string | string[];
|
|
13
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
14
12
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
15
13
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
16
14
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
15
|
SecondaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
18
16
|
children?: string | string[];
|
|
19
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
20
17
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
21
18
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
22
19
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
23
20
|
children?: string | string[];
|
|
24
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
25
21
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
26
22
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
27
23
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -6,23 +6,19 @@ import { type ModalFooterProps } from './types';
|
|
|
6
6
|
export declare const ModalFooter: import("react").ForwardRefExoticComponent<ModalFooterProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
7
7
|
PrimaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
8
8
|
children?: string | string[];
|
|
9
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
10
9
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
11
10
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
12
11
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
13
12
|
children?: string | string[];
|
|
14
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
15
13
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
16
14
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
17
15
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
16
|
SecondaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
19
17
|
children?: string | string[];
|
|
20
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
21
18
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
22
19
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
23
20
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
24
21
|
children?: string | string[];
|
|
25
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
26
22
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
27
23
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
28
24
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -33,23 +33,19 @@ export declare const Modal: (({ children, modal, ...props }: ModalProps) => impo
|
|
|
33
33
|
Footer: import("react").ForwardRefExoticComponent<import("./types").ModalFooterProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
34
34
|
PrimaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
35
35
|
children?: string | string[];
|
|
36
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
37
36
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
38
37
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
39
38
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
40
39
|
children?: string | string[];
|
|
41
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
42
40
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
43
41
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
44
42
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
45
43
|
SecondaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
46
44
|
children?: string | string[];
|
|
47
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
48
45
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
49
46
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
50
47
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
51
48
|
children?: string | string[];
|
|
52
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
53
49
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
54
50
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
55
51
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--
|
|
2
|
+
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--2df31","menuHeader":"bp_context_menu_module_menuHeader--2df31","fullScreenContent":"bp_context_menu_module_fullScreenContent--2df31","menuItemsSeparator":"bp_context_menu_module_menuItemsSeparator--2df31","menuItem":"bp_context_menu_module_menuItem--2df31","startElement":"bp_context_menu_module_startElement--2df31","endElement":"bp_context_menu_module_endElement--2df31","headerTextContent":"bp_context_menu_module_headerTextContent--2df31","submenuCloseButton":"bp_context_menu_module_submenuCloseButton--2df31","menuCloseButton":"bp_context_menu_module_menuCloseButton--2df31","ellipsis":"bp_context_menu_module_ellipsis--2df31"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -38,7 +38,12 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
|
|
|
38
38
|
// If click starts at trigger button, and ends on the item, it should not trigger the item.
|
|
39
39
|
// Note: this also has a side effect of not allowing to start click and end on a different time.
|
|
40
40
|
onPointerUp: composeEventHandlers(props.onPointerUp, preventDefault),
|
|
41
|
-
children: [jsx(
|
|
41
|
+
children: [jsx("span", {
|
|
42
|
+
className: clsx(styles.itemBody, {
|
|
43
|
+
[styles.checkboxItemMediumSpacing]: !isSizeSmall
|
|
44
|
+
}),
|
|
45
|
+
children: children
|
|
46
|
+
}), jsx(DropdownMenuPrimitive.ItemIndicator, {
|
|
42
47
|
className: clsx(styles.checkmark, {
|
|
43
48
|
[styles.mediumSpacing]: !isSizeSmall
|
|
44
49
|
}),
|
|
@@ -48,11 +53,6 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
|
|
|
48
53
|
role: "presentation",
|
|
49
54
|
width: checkmarkSize
|
|
50
55
|
})
|
|
51
|
-
}), jsx("span", {
|
|
52
|
-
className: clsx(styles.ellipsis, {
|
|
53
|
-
[styles.checkboxItemMediumSpacing]: !isSizeSmall
|
|
54
|
-
}),
|
|
55
|
-
children: children
|
|
56
56
|
})]
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -23,7 +23,7 @@ const DropdownMenuItemBase = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
23
23
|
const {
|
|
24
24
|
internalSize
|
|
25
25
|
} = useMenuItemVariant();
|
|
26
|
-
const sizeStyles = internalSize === 'small' ? styles.
|
|
26
|
+
const sizeStyles = internalSize === 'small' ? styles.itemOverflow : styles.mediumItemLayout;
|
|
27
27
|
const preventDefault = useCallback(event => event.preventDefault(), []);
|
|
28
28
|
return jsx(ItemVariantContext.Provider, {
|
|
29
29
|
value: variant,
|
|
@@ -58,15 +58,15 @@ const MenuItemMainContent = /*#__PURE__*/forwardRef(({
|
|
|
58
58
|
return jsx("div", {
|
|
59
59
|
...rest,
|
|
60
60
|
ref: ref,
|
|
61
|
-
className: clsx(styles.menuItemMainContent, styles.
|
|
62
|
-
children: children
|
|
61
|
+
className: clsx(styles.menuItemMainContent, children !== undefined && styles.menuItemMainContent_directChild, className),
|
|
62
|
+
children: children !== undefined ? children : jsxs(Fragment, {
|
|
63
63
|
children: [jsx(Text, {
|
|
64
64
|
as: "span",
|
|
65
65
|
className: styles.ellipsis,
|
|
66
66
|
variant: labelVariant,
|
|
67
67
|
children: label
|
|
68
68
|
}), caption ? jsx("div", {
|
|
69
|
-
className: styles.
|
|
69
|
+
className: styles.menuItemCaption,
|
|
70
70
|
children: jsx(Text, {
|
|
71
71
|
as: "span",
|
|
72
72
|
color: "textOnLightSecondary",
|
|
@@ -39,7 +39,12 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
|
|
|
39
39
|
// If click starts at trigger button, and ends on the item, it should not trigger the item.
|
|
40
40
|
// Note: this also has a side effect of not allowing to start click and end on a different time.
|
|
41
41
|
onPointerUp: composeEventHandlers(props.onPointerUp, preventDefault),
|
|
42
|
-
children: [jsx(
|
|
42
|
+
children: [jsx("span", {
|
|
43
|
+
className: clsx(styles.itemBody, {
|
|
44
|
+
[styles.radioItemMediumSpacing]: !isSizeSmall
|
|
45
|
+
}),
|
|
46
|
+
children: children ?? value
|
|
47
|
+
}), jsx(DropdownMenuPrimitive.ItemIndicator, {
|
|
43
48
|
className: clsx(styles.checkmark, {
|
|
44
49
|
[styles.mediumSpacing]: !isSizeSmall
|
|
45
50
|
}),
|
|
@@ -49,11 +54,6 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
|
|
|
49
54
|
role: "presentation",
|
|
50
55
|
width: checkmarkSize
|
|
51
56
|
})
|
|
52
|
-
}), jsx("span", {
|
|
53
|
-
className: clsx(styles.ellipsis, {
|
|
54
|
-
[styles.radioItemMediumSpacing]: !isSizeSmall
|
|
55
|
-
}),
|
|
56
|
-
children: children ?? value
|
|
57
57
|
})]
|
|
58
58
|
});
|
|
59
59
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"content":"bp_dropdown_menu_module_content--
|
|
2
|
+
var styles = {"content":"bp_dropdown_menu_module_content--83ff8","fullScreenContent":"bp_dropdown_menu_module_fullScreenContent--83ff8","subheader":"bp_dropdown_menu_module_subheader--83ff8","uppercased":"bp_dropdown_menu_module_uppercased--83ff8","dropdownMenuItemSeparator":"bp_dropdown_menu_module_dropdownMenuItemSeparator--83ff8","ellipsis":"bp_dropdown_menu_module_ellipsis--83ff8","itemBody":"bp_dropdown_menu_module_itemBody--83ff8","itemOverflow":"bp_dropdown_menu_module_itemOverflow--83ff8","menuItemCaption":"bp_dropdown_menu_module_menuItemCaption--83ff8","checkmark":"bp_dropdown_menu_module_checkmark--83ff8","mediumSpacing":"bp_dropdown_menu_module_mediumSpacing--83ff8","item":"bp_dropdown_menu_module_item--83ff8","radioItem":"bp_dropdown_menu_module_radioItem--83ff8","radioItemMediumSpacing":"bp_dropdown_menu_module_radioItemMediumSpacing--83ff8","menuItemMainContent":"bp_dropdown_menu_module_menuItemMainContent--83ff8","checkboxItem":"bp_dropdown_menu_module_checkboxItem--83ff8","checkboxItemMediumSpacing":"bp_dropdown_menu_module_checkboxItemMediumSpacing--83ff8","mediumItemLayout":"bp_dropdown_menu_module_mediumItemLayout--83ff8","startElement":"bp_dropdown_menu_module_startElement--83ff8","menuItemMainContent_directChild":"bp_dropdown_menu_module_menuItemMainContent_directChild--83ff8","endElement":"bp_dropdown_menu_module_endElement--83ff8","destructive":"bp_dropdown_menu_module_destructive--83ff8","menuHeader":"bp_dropdown_menu_module_menuHeader--83ff8","headerTextContent":"bp_dropdown_menu_module_headerTextContent--83ff8","submenuCloseButton":"bp_dropdown_menu_module_submenuCloseButton--83ff8","menuCloseButton":"bp_dropdown_menu_module_menuCloseButton--83ff8"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -81,7 +81,6 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
81
81
|
"data-modern": enableModernizedComponents ? 'true' : 'false',
|
|
82
82
|
role: "gridcell",
|
|
83
83
|
children: [shouldShowTooltip && jsx(Tooltip, {
|
|
84
|
-
__checkInteractivity: false,
|
|
85
84
|
"aria-hidden": true,
|
|
86
85
|
content: ariaLabel,
|
|
87
86
|
side: props.tooltipSide,
|
|
@@ -268,15 +268,11 @@ const Option = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
268
268
|
children: [jsx(SelectPrimitive.ItemText, {
|
|
269
269
|
children: text
|
|
270
270
|
}), !!secondaryText && jsx("span", {
|
|
271
|
-
className:
|
|
272
|
-
[styles.ellipsis]: truncateText
|
|
273
|
-
}),
|
|
271
|
+
className: styles.secondaryText,
|
|
274
272
|
children: secondaryText
|
|
275
273
|
})]
|
|
276
274
|
}), !itemProps.disabled && jsx(SelectPrimitive.ItemIndicator, {
|
|
277
|
-
className:
|
|
278
|
-
[styles.indicatorRight]: hasLeftElement
|
|
279
|
-
}),
|
|
275
|
+
className: styles.indicator,
|
|
280
276
|
children: jsx(Checkmark, {})
|
|
281
277
|
})]
|
|
282
278
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_select_module_container--
|
|
2
|
+
var styles = {"container":"bp_select_module_container--aba58","label":"bp_select_module_label--aba58","triggerBtn":"bp_select_module_triggerBtn--aba58","ellipsis":"bp_select_module_ellipsis--aba58","disabled":"bp_select_module_disabled--aba58","triggerValue":"bp_select_module_triggerValue--aba58","triggerLeftElement":"bp_select_module_triggerLeftElement--aba58","readonly":"bp_select_module_readonly--aba58","error":"bp_select_module_error--aba58","iconWrapper":"bp_select_module_iconWrapper--aba58","iconCaret":"bp_select_module_iconCaret--aba58","iconPencilCrossed":"bp_select_module_iconPencilCrossed--aba58","content":"bp_select_module_content--aba58","viewport":"bp_select_module_viewport--aba58","option":"bp_select_module_option--aba58","secondaryText":"bp_select_module_secondaryText--aba58","textWrapper":"bp_select_module_textWrapper--aba58","leftElement":"bp_select_module_leftElement--aba58","hasLeftElement":"bp_select_module_hasLeftElement--aba58","indicator":"bp_select_module_indicator--aba58","separator":"bp_select_module_separator--aba58","withTruncatedText":"bp_select_module_withTruncatedText--aba58"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -6,23 +6,19 @@ import { type SidePanelFooterProps } from './types';
|
|
|
6
6
|
export declare const SidePanelFooter: import("react").ForwardRefExoticComponent<Omit<SidePanelFooterProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
7
7
|
PrimaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
8
8
|
children?: string | string[];
|
|
9
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
10
9
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
11
10
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
12
11
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
13
12
|
children?: string | string[];
|
|
14
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
15
13
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
16
14
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
17
15
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
16
|
SecondaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
19
17
|
children?: string | string[];
|
|
20
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
21
18
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
22
19
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
23
20
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
24
21
|
children?: string | string[];
|
|
25
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
26
22
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
27
23
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
28
24
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -7,23 +7,19 @@ export declare const SidePanel: ((props: SidePanelProps) => import("react/jsx-ru
|
|
|
7
7
|
Footer: import("react").ForwardRefExoticComponent<Omit<import("./types").SidePanelFooterProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
8
8
|
PrimaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
9
9
|
children?: string | string[];
|
|
10
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
11
10
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
12
11
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
13
12
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
14
13
|
children?: string | string[];
|
|
15
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
16
14
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
17
15
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
18
16
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
17
|
SecondaryButton: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
20
18
|
children?: string | string[];
|
|
21
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
22
19
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
23
20
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
24
21
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
25
22
|
children?: string | string[];
|
|
26
|
-
icon?: import("../button/types").SvgIconComponent;
|
|
27
23
|
endIcon?: import("../button/types").SvgIconComponent;
|
|
28
24
|
startIcon?: import("../button/types").SvgIconComponent;
|
|
29
25
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { type TooltipProps, type TooltipProviderProps
|
|
3
|
+
import { type TooltipProps, type TooltipProviderProps } from './types';
|
|
3
4
|
export declare const Tooltip: (props: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
export declare const ContainerContext: React.Context<HTMLElement | null | undefined>;
|
|
5
6
|
export declare const TooltipProvider: (props: TooltipProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const TooltipTrigger:
|
|
7
|
+
export declare const TooltipTrigger: typeof RadixTooltip.Trigger;
|
|
@@ -4,8 +4,6 @@ import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import React__default, { useContext } from 'react';
|
|
6
6
|
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
|
-
import { useForkRef } from '../utils/useForkRef.js';
|
|
8
|
-
import { useIsTriggerInteractive } from '../utils/useIsTriggerInteractive.js';
|
|
9
7
|
import styles from './tooltip.module.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
@@ -27,7 +25,6 @@ const Tooltip = props => {
|
|
|
27
25
|
open,
|
|
28
26
|
defaultOpen,
|
|
29
27
|
forceMount,
|
|
30
|
-
__checkInteractivity,
|
|
31
28
|
...contentProps
|
|
32
29
|
} = props;
|
|
33
30
|
const container = useContext(ContainerContext);
|
|
@@ -36,8 +33,6 @@ const Tooltip = props => {
|
|
|
36
33
|
onOpenChange: onOpenChange,
|
|
37
34
|
open: open,
|
|
38
35
|
children: [jsx(TooltipTrigger, {
|
|
39
|
-
__checkInteractivity: __checkInteractivity,
|
|
40
|
-
open: open,
|
|
41
36
|
children: children
|
|
42
37
|
}), jsx(RadixTooltip.Portal, {
|
|
43
38
|
container: container,
|
|
@@ -65,43 +60,14 @@ const TooltipProvider = props => {
|
|
|
65
60
|
})
|
|
66
61
|
});
|
|
67
62
|
};
|
|
68
|
-
const
|
|
63
|
+
const TooltipTrigger = /*#__PURE__*/React__default.forwardRef(function TooltipTrigger(props, ref) {
|
|
69
64
|
return jsx(RadixTooltip.Trigger, {
|
|
70
65
|
ref: ref,
|
|
71
66
|
asChild: true,
|
|
67
|
+
"data-blueprint-tooltip-trigger": "",
|
|
72
68
|
children: props.children
|
|
73
69
|
});
|
|
74
70
|
});
|
|
75
|
-
/**
|
|
76
|
-
* Trigger component with interactivity check.
|
|
77
|
-
* Encapsulation in separate component is a workaround which allows to render hooks
|
|
78
|
-
* responsible for check only when it's specifically needed, without breaking rule of hooks
|
|
79
|
-
* by calling them conditionally.
|
|
80
|
-
*/
|
|
81
|
-
const TriggerWithInteractivityCheck = /*#__PURE__*/React__default.forwardRef(function TriggerWithInteractivityCheck(props, ref) {
|
|
82
|
-
const triggerRef = useIsTriggerInteractive();
|
|
83
|
-
return jsx(Trigger, {
|
|
84
|
-
ref: useForkRef(triggerRef, ref),
|
|
85
|
-
children: props.children
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
const TooltipTrigger = /*#__PURE__*/React__default.forwardRef(({
|
|
89
|
-
children,
|
|
90
|
-
open,
|
|
91
|
-
__checkInteractivity = true
|
|
92
|
-
}, ref) => {
|
|
93
|
-
// in dev environment, if Tooltip open state is not explicitly controlled by user, check if it's used with interactive element
|
|
94
|
-
if (process.env.NODE_ENV !== 'production' && open === undefined && __checkInteractivity) {
|
|
95
|
-
return jsx(TriggerWithInteractivityCheck, {
|
|
96
|
-
ref: ref,
|
|
97
|
-
children: children
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
return jsx(Trigger, {
|
|
101
|
-
ref: ref,
|
|
102
|
-
children: children
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
71
|
const Arrow = /*#__PURE__*/React__default.forwardRef(function Arrow({
|
|
106
72
|
variant
|
|
107
73
|
}, ref) {
|
|
@@ -23,8 +23,6 @@ export interface TooltipProps extends Omit<React.ComponentProps<typeof RadixTool
|
|
|
23
23
|
defaultOpen?: RadixTooltip.TooltipProps['defaultOpen'];
|
|
24
24
|
/** Used to force mounting when more control is needed. */
|
|
25
25
|
forceMount?: RadixTooltip.TooltipPortalProps['forceMount'];
|
|
26
|
-
/** Blueprint internal prop. Checks whether the trigger element is interactive to provide a warning if it's not interactive. Defaults to `true`. */
|
|
27
|
-
__checkInteractivity?: boolean;
|
|
28
26
|
}
|
|
29
27
|
export interface TooltipProviderProps {
|
|
30
28
|
/** The rest of the application */
|
|
@@ -37,10 +35,3 @@ export interface TooltipProviderProps {
|
|
|
37
35
|
export interface ArrowProps {
|
|
38
36
|
variant: TooltipVariant;
|
|
39
37
|
}
|
|
40
|
-
export interface TooltipTriggerProps {
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
-
/** The controlled open state of the tooltip. */
|
|
43
|
-
open?: TooltipProps['open'];
|
|
44
|
-
/** Blueprint internal prop. Checks whether the trigger element is interactive to provide a warning if it's not interactive. Defaults to `true`. */
|
|
45
|
-
__checkInteractivity?: boolean;
|
|
46
|
-
}
|
|
@@ -99,9 +99,9 @@ export type BaseGridListThumbnailProps = ComponentPropsWithRef<'div'> & {
|
|
|
99
99
|
* fileExtension="xlsx"
|
|
100
100
|
* fileCategory="excel-spreadsheet"
|
|
101
101
|
* statusBadge={
|
|
102
|
-
* <
|
|
102
|
+
* <CardTooltip content="Classification: Confidential">
|
|
103
103
|
* <Status colorIndex={2} hideText icon={Shield} text="Confidential" />
|
|
104
|
-
* </
|
|
104
|
+
* </CardTooltip>
|
|
105
105
|
* }
|
|
106
106
|
* >
|
|
107
107
|
* <img src={thumbnailUrl} alt={fileName} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"menuItemMainContent":"bp_menu_item_sections_module_menuItemMainContent--
|
|
2
|
+
var styles = {"menuItemMainContent":"bp_menu_item_sections_module_menuItemMainContent--dd1ef","label":"bp_menu_item_sections_module_label--dd1ef","bold":"bp_menu_item_sections_module_bold--dd1ef","description":"bp_menu_item_sections_module_description--dd1ef","menuItemSideContent":"bp_menu_item_sections_module_menuItemSideContent--dd1ef","textOnLightSecondary":"bp_menu_item_sections_module_textOnLightSecondary--dd1ef"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
|
|
3
|
+
const canUseMatchMedia = () => typeof window !== 'undefined' && typeof window.matchMedia === 'function';
|
|
3
4
|
const useMedia = query => {
|
|
4
|
-
|
|
5
|
+
// SSR-safe: use lazy initializer to defer window access
|
|
6
|
+
const [matches, setMatches] = useState(() => {
|
|
7
|
+
if (!canUseMatchMedia()) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return window.matchMedia(query).matches;
|
|
11
|
+
});
|
|
5
12
|
useEffect(() => {
|
|
13
|
+
if (!canUseMatchMedia()) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
6
16
|
const mediaQueryList = window.matchMedia(query);
|
|
17
|
+
// Sync state on mount (handles SSR hydration mismatch)
|
|
18
|
+
setMatches(mediaQueryList.matches);
|
|
7
19
|
const onChange = e => setMatches(e.matches);
|
|
8
20
|
mediaQueryList.addEventListener('change', onChange);
|
|
9
21
|
return () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"THIRD_PARTY_LICENSES"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"react": "^
|
|
15
|
-
"react-dom": "^
|
|
14
|
+
"react": "^18.0.0",
|
|
15
|
+
"react-dom": "^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build-storybook": "nx run blueprint-web:build-storybook",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ariakit/react": "0.4.
|
|
49
|
-
"@ariakit/react-core": "0.4.
|
|
50
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
51
|
-
"@internationalized/date": "^3.
|
|
48
|
+
"@ariakit/react": "0.4.21",
|
|
49
|
+
"@ariakit/react-core": "0.4.21",
|
|
50
|
+
"@box/blueprint-web-assets": "^4.111.15",
|
|
51
|
+
"@internationalized/date": "^3.12.0",
|
|
52
52
|
"@radix-ui/react-accordion": "1.1.2",
|
|
53
53
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
54
54
|
"@radix-ui/react-collapsible": "1.0.3",
|
|
@@ -66,24 +66,24 @@
|
|
|
66
66
|
"@radix-ui/react-toggle-group": "1.0.4",
|
|
67
67
|
"@radix-ui/react-toolbar": "1.0.4",
|
|
68
68
|
"@radix-ui/react-tooltip": "1.0.7",
|
|
69
|
-
"@react-aria/i18n": "3.12.
|
|
70
|
-
"@react-aria/
|
|
69
|
+
"@react-aria/i18n": "3.12.16",
|
|
70
|
+
"@react-aria/interactions": "3.27.1",
|
|
71
|
+
"@react-aria/utils": "3.33.1",
|
|
71
72
|
"clsx": "^1.2.1",
|
|
72
73
|
"color": "2.0.1",
|
|
73
74
|
"lodash": "^4.17.15",
|
|
74
|
-
"react-aria": "3.
|
|
75
|
-
"react-aria-components": "1.
|
|
76
|
-
"tabbable": "^4.0.0",
|
|
75
|
+
"react-aria": "3.47.0",
|
|
76
|
+
"react-aria-components": "1.16.0",
|
|
77
77
|
"type-fest": "^3.2.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@box/storybook-utils": "^0.17.
|
|
80
|
+
"@box/storybook-utils": "^0.17.15",
|
|
81
81
|
"@figma/code-connect": "1.3.12",
|
|
82
82
|
"@types/react": "^18.0.0",
|
|
83
83
|
"@types/react-dom": "^18.0.0",
|
|
84
84
|
"react": "^18.3.0",
|
|
85
85
|
"react-dom": "^18.3.0",
|
|
86
|
-
"react-stately": "^3.
|
|
86
|
+
"react-stately": "^3.45.0",
|
|
87
87
|
"tsx": "^4.16.5"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type CardTooltipV2Props } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* CardTooltipV2 is a component that wraps a Card component inside a Tooltip component. The main difference between CardTooltipV2 and CardTooltip is that CardTooltipV2 uses Ariakit Tooltip component instead of Radix Tooltip component.
|
|
4
|
-
*
|
|
5
|
-
* You must only pass non-interactive content inside `content` prop.
|
|
6
|
-
*
|
|
7
|
-
* **IMPORTANT**: Must wrap interactive component/element (such as: HTMLInputElement, HTMLAnchorElement, HTMLTextAreaElement, etc. [list of focusable elements](https://allyjs.io/data-tables/focusable.html))
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare const CardTooltipV2: import("react").ForwardRefExoticComponent<CardTooltipV2Props & import("react").RefAttributes<HTMLDivElement>>;
|