@box/blueprint-web 16.20.7 → 17.0.1
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/accordion/accordion.js +7 -18
- package/dist/lib-esm/avatar/avatar.js +1 -5
- package/dist/lib-esm/blueprint-modernization-context/blueprint-modernization-context.d.ts +20 -1
- package/dist/lib-esm/blueprint-modernization-context/blueprint-modernization-context.js +10 -2
- package/dist/lib-esm/blueprint-modernization-context/index.d.ts +4 -0
- package/dist/lib-esm/blueprint-modernization-context/useBlueprintModernization.d.ts +4 -0
- package/dist/lib-esm/blueprint-modernization-context/useBlueprintModernization.js +4 -0
- package/dist/lib-esm/card/card.js +1 -5
- package/dist/lib-esm/card-tooltip/card-tooltip.js +1 -5
- package/dist/lib-esm/checkbox/checkbox-item.js +1 -5
- package/dist/lib-esm/collapsible/collapsible-section.js +6 -9
- package/dist/lib-esm/combobox/combobox.js +8 -15
- package/dist/lib-esm/combobox-group/combobox-group.js +1 -5
- package/dist/lib-esm/components.css +16 -15
- package/dist/lib-esm/content-card/content-card-body.js +2 -6
- package/dist/lib-esm/content-card/content-card.js +2 -9
- package/dist/lib-esm/data-table/data-table.module.js +1 -1
- package/dist/lib-esm/date-picker/date-picker.js +1 -5
- package/dist/lib-esm/ghost/ghost.js +1 -4
- package/dist/lib-esm/icon-dual-state-button/icon-dual-state-button.js +1 -5
- package/dist/lib-esm/icon-toggle-button/icon-toggle-button.js +5 -14
- package/dist/lib-esm/index.css +16 -15
- package/dist/lib-esm/inline-table/inline-table.js +1 -5
- package/dist/lib-esm/input-chip/input-chip.js +2 -5
- package/dist/lib-esm/list-item/table-column.js +6 -15
- package/dist/lib-esm/list-item/table-header-default.js +1 -5
- package/dist/lib-esm/list-item/table.js +1 -4
- package/dist/lib-esm/loading-indicator/loading-indicator.js +1 -6
- package/dist/lib-esm/modal/modal-close.js +2 -6
- package/dist/lib-esm/modal/modal-content.js +1 -5
- package/dist/lib-esm/navigation-menu/navigation-menu-content.js +1 -5
- package/dist/lib-esm/navigation-menu/navigation-menu-link.js +1 -5
- package/dist/lib-esm/page/page-root.js +1 -5
- package/dist/lib-esm/primitives/base-button/base-button-icon.js +1 -4
- package/dist/lib-esm/primitives/base-button/base-button.js +1 -5
- package/dist/lib-esm/primitives/base-inline-notice/base-inline-notice-icon.js +4 -12
- package/dist/lib-esm/primitives/base-inline-notice/base-inline-notice.js +1 -5
- package/dist/lib-esm/primitives/base-text-input/base-text-input.js +4 -10
- package/dist/lib-esm/primitives/calendar/calendar.js +5 -8
- package/dist/lib-esm/primitives/chips/chip.js +1 -5
- package/dist/lib-esm/primitives/chips/chips-group.js +1 -5
- package/dist/lib-esm/primitives/context-menu/context-menu-item.js +2 -6
- package/dist/lib-esm/primitives/context-menu/context-menu-menu-content.js +2 -6
- package/dist/lib-esm/primitives/context-menu/context-menu-menu-header.js +1 -5
- package/dist/lib-esm/primitives/context-menu/context-menu-sub-menu-content.js +2 -6
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-checkbox-item.js +6 -10
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-content.js +2 -6
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-header.js +4 -11
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-item.js +3 -7
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-select-item.js +6 -10
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-content.js +2 -6
- package/dist/lib-esm/primitives/icon-button/icon-button.js +1 -5
- package/dist/lib-esm/primitives/inline-error/inline-error.js +3 -6
- package/dist/lib-esm/primitives/link/link.js +1 -5
- package/dist/lib-esm/primitives/menu-combobox/menu-combobox-content.js +1 -5
- package/dist/lib-esm/primitives/menu-combobox/menu-combobox-empty.js +1 -5
- package/dist/lib-esm/primitives/menu-combobox/menu-combobox-header.js +2 -6
- package/dist/lib-esm/primitives/menu-combobox/menu-combobox-search.js +3 -7
- package/dist/lib-esm/primitives/notification/private-notification-element.js +8 -39
- package/dist/lib-esm/primitives/page-header/page-header.js +1 -4
- package/dist/lib-esm/primitives/popover/popover-content-container.js +1 -5
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.js +6 -24
- package/dist/lib-esm/primitives/tabs/tab-list.js +2 -6
- package/dist/lib-esm/progress-bar/progress-bar.js +1 -5
- package/dist/lib-esm/radio-group/radio-group.js +1 -5
- package/dist/lib-esm/radio-tiles/radio-tiles-option.js +1 -5
- package/dist/lib-esm/radio-tiles/radio-tiles.js +1 -5
- package/dist/lib-esm/search-input/search-input-controlled/search-input-controlled.js +5 -8
- package/dist/lib-esm/search-input/search-input.js +5 -8
- package/dist/lib-esm/select/select.js +5 -15
- package/dist/lib-esm/side-panel/side-panel-close.js +3 -6
- package/dist/lib-esm/side-panel/side-panel-content.js +2 -9
- package/dist/lib-esm/side-panel/side-panel-overlay.js +1 -5
- package/dist/lib-esm/small-list-item/small-list.js +1 -5
- package/dist/lib-esm/split-button/split-button.js +2 -6
- package/dist/lib-esm/status/status.js +1 -5
- package/dist/lib-esm/switch/switch-item.js +1 -5
- package/dist/lib-esm/text/text.js +1 -5
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.js +5 -19
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +1 -1
- package/dist/lib-esm/text-area/text-area.js +1 -5
- package/dist/lib-esm/text-button/text-button.js +1 -5
- package/dist/lib-esm/text-input/text-input.js +3 -6
- package/dist/lib-esm/text-toggle-button/text-toggle-button.js +1 -5
- package/dist/lib-esm/time-picker/time-picker.js +6 -22
- package/dist/lib-esm/toolbar/toolbar-button.js +1 -5
- package/dist/lib-esm/toolbar/toolbar-dropdown-indicator.js +3 -6
- package/dist/lib-esm/toolbar/toolbar-input.js +1 -5
- package/dist/lib-esm/toolbar/toolbar-link.js +1 -5
- package/dist/lib-esm/toolbar/toolbar-root.js +3 -6
- package/dist/lib-esm/toolbar/toolbar-text-toggle-item.js +1 -5
- package/dist/lib-esm/toolbar/toolbar-toggle-group.js +1 -5
- package/dist/lib-esm/toolbar/toolbar-toggle-item.js +1 -5
- package/dist/lib-esm/tooltip/tooltip.js +2 -19
- package/dist/lib-esm/trigger-button/trigger-button.js +4 -11
- package/dist/lib-esm/util-components/base-grid-list-item/base-grid-list.js +1 -5
- package/dist/lib-esm/util-components/base-grid-list-item/utils/rac-tooltip.js +3 -6
- package/dist/lib-esm/util-components/legend/legend.js +1 -6
- package/dist/lib-esm/util-components/list-checkbox/list-checkbox.js +1 -5
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.js +2 -9
- package/dist/lib-esm/util-components/text-with-info-badge/text-with-info-badge.js +1 -6
- package/dist/lib-esm/utils/TooltipWrapper.d.ts +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,6 @@ import { Button } from '@ariakit/react';
|
|
|
3
3
|
import { IconIconBlue, Size6, Size5, Size4, IconIconOnLightSecondary } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, createElement } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { composeEventHandlers } from '../utils/composeEventHandlers.js';
|
|
8
7
|
import { useControllableState } from '../utils/useControllableState.js';
|
|
9
8
|
import styles from './icon-dual-state-button.module.js';
|
|
@@ -37,9 +36,6 @@ const IconDualStateButton = /*#__PURE__*/forwardRef(({
|
|
|
37
36
|
onChange: onPressedChange,
|
|
38
37
|
defaultProp: defaultPressed
|
|
39
38
|
});
|
|
40
|
-
const {
|
|
41
|
-
enableModernizedComponents
|
|
42
|
-
} = useBlueprintModernization();
|
|
43
39
|
const iconSize = buttonSizeToIconSize[size];
|
|
44
40
|
return jsx(Button, {
|
|
45
41
|
...rest,
|
|
@@ -49,7 +45,7 @@ const IconDualStateButton = /*#__PURE__*/forwardRef(({
|
|
|
49
45
|
[styles.pressed]: pressed
|
|
50
46
|
}),
|
|
51
47
|
"data-disabled": disabled ? '' : undefined,
|
|
52
|
-
"data-modern":
|
|
48
|
+
"data-modern": 'true' ,
|
|
53
49
|
"data-state": pressed ? 'on' : 'off',
|
|
54
50
|
disabled: disabled,
|
|
55
51
|
onClick: composeEventHandlers(onClick, () => {
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { bpSize060, bpSize050, bpSize040
|
|
2
|
+
import { bpSize060, bpSize050, bpSize040 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef, createElement } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import { BaseToggleButton } from '../util-components/base-toggle-button/base-toggle-button.js';
|
|
7
6
|
import styles from './icon-toggle-button.module.js';
|
|
8
7
|
|
|
9
|
-
const iconSizeMap = {
|
|
10
|
-
'x-small': Size4,
|
|
11
|
-
small: Size5,
|
|
12
|
-
medium: Size6
|
|
13
|
-
};
|
|
14
8
|
const iconSizeMapModern = {
|
|
15
9
|
'x-small': bpSize040,
|
|
16
10
|
small: bpSize050,
|
|
@@ -23,22 +17,19 @@ const IconToggleButton = /*#__PURE__*/forwardRef(({
|
|
|
23
17
|
size = 'medium',
|
|
24
18
|
...rest
|
|
25
19
|
}, ref) => {
|
|
26
|
-
const {
|
|
27
|
-
enableModernizedComponents
|
|
28
|
-
} = useBlueprintModernization();
|
|
29
20
|
return jsx(BaseToggleButton, {
|
|
30
21
|
...rest,
|
|
31
22
|
ref: ref,
|
|
32
23
|
className: clsx(styles.iconToggleButton, styles[variant], styles[size], className),
|
|
33
|
-
"data-modern":
|
|
24
|
+
"data-modern": 'true' ,
|
|
34
25
|
children: /*#__PURE__*/createElement(icon, {
|
|
35
26
|
className: styles.icon,
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
27
|
+
height: iconSizeMapModern[size] ,
|
|
28
|
+
width: iconSizeMapModern[size] ,
|
|
38
29
|
role: 'presentation'
|
|
39
30
|
})
|
|
40
31
|
});
|
|
41
32
|
});
|
|
42
33
|
IconToggleButton.displayName = 'IconToggleButton';
|
|
43
34
|
|
|
44
|
-
export { IconToggleButton,
|
|
35
|
+
export { IconToggleButton, iconSizeMapModern };
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -6950,55 +6950,56 @@
|
|
|
6950
6950
|
overflow:auto;
|
|
6951
6951
|
}
|
|
6952
6952
|
|
|
6953
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6953
|
+
.bp_data_table_module_dataTableWrapper--c7392{
|
|
6954
6954
|
--border-radius-datatable:0;
|
|
6955
6955
|
--outline-offset-focus-and-selected-row-datatable:-0.25rem;
|
|
6956
6956
|
--outline-select-color-datatable:#0000;
|
|
6957
6957
|
--sticky-element-z-index:2;
|
|
6958
6958
|
height:100%;
|
|
6959
6959
|
overflow:auto;
|
|
6960
|
+
padding-block-end:var(--bp-space-020, .5rem);
|
|
6960
6961
|
scroll-padding:60px 100px;
|
|
6961
6962
|
width:100%;
|
|
6962
6963
|
}
|
|
6963
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6964
|
+
.bp_data_table_module_dataTableWrapper--c7392 [data-modern=false]{
|
|
6964
6965
|
--border-radius-hover-datatable:var(--radius-4);
|
|
6965
6966
|
}
|
|
6966
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6967
|
+
.bp_data_table_module_dataTableWrapper--c7392 [data-modern=true]{
|
|
6967
6968
|
--border-radius-hover-datatable:var(--bp-radius-08, 1rem);
|
|
6968
6969
|
}
|
|
6969
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6970
|
+
.bp_data_table_module_dataTableWrapper--c7392 table tbody > tr[data-hovered]{
|
|
6970
6971
|
--list-item-border-radius:var(--border-radius-hover-datatable);
|
|
6971
6972
|
--list-item-row-border-radius:var(--list-item-border-radius);
|
|
6972
6973
|
--list-item-first-column-item-radius:var(--list-item-border-radius) 0 0 var(--list-item-border-radius);
|
|
6973
6974
|
--list-item-last-column-item-radius:0 var(--list-item-border-radius) var(--list-item-border-radius) 0;
|
|
6974
6975
|
}
|
|
6975
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6976
|
+
.bp_data_table_module_dataTableWrapper--c7392.bp_data_table_module_isScrolledX--c7392 table tbody > tr[data-hovered][data-focus-visible]{
|
|
6976
6977
|
--list-item-border-radius:0;
|
|
6977
6978
|
--list-item-row-border-radius:0;
|
|
6978
6979
|
--list-item-first-column-item-radius:0;
|
|
6979
6980
|
--list-item-last-column-item-radius:0;
|
|
6980
6981
|
}
|
|
6981
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6982
|
+
.bp_data_table_module_dataTableWrapper--c7392 table > thead > tr{
|
|
6982
6983
|
background:var(--gray-white);
|
|
6983
6984
|
position:sticky;
|
|
6984
6985
|
top:0;
|
|
6985
6986
|
z-index:var(--sticky-element-z-index);
|
|
6986
6987
|
}
|
|
6987
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6988
|
+
.bp_data_table_module_dataTableWrapper--c7392 table > thead > tr th:first-child{
|
|
6988
6989
|
background:inherit;
|
|
6989
6990
|
height:100%;
|
|
6990
6991
|
left:0;
|
|
6991
6992
|
position:sticky;
|
|
6992
6993
|
z-index:var(--sticky-element-z-index);
|
|
6993
6994
|
}
|
|
6994
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6995
|
+
.bp_data_table_module_dataTableWrapper--c7392 table > thead > tr th:first-child[data-focus-visible]{
|
|
6995
6996
|
position:sticky;
|
|
6996
6997
|
z-index:var(--sticky-element-z-index);
|
|
6997
6998
|
}
|
|
6998
|
-
.bp_data_table_module_dataTableWrapper--
|
|
6999
|
+
.bp_data_table_module_dataTableWrapper--c7392 table tbody > tr{
|
|
6999
7000
|
--is-row-focused:0;
|
|
7000
7001
|
}
|
|
7001
|
-
.bp_data_table_module_dataTableWrapper--
|
|
7002
|
+
.bp_data_table_module_dataTableWrapper--c7392 table tbody > tr > td [data-actionswrapper]::after{
|
|
7002
7003
|
background:inherit;
|
|
7003
7004
|
content:"";
|
|
7004
7005
|
display:block;
|
|
@@ -7008,18 +7009,18 @@
|
|
|
7008
7009
|
width:100%;
|
|
7009
7010
|
z-index:-1;
|
|
7010
7011
|
}
|
|
7011
|
-
.bp_data_table_module_dataTableWrapper--
|
|
7012
|
+
.bp_data_table_module_dataTableWrapper--c7392 table tbody > tr[data-focus-visible]{
|
|
7012
7013
|
--outline-offset-focus-cell:var(--outline-offset-focus-row);
|
|
7013
7014
|
--is-row-focused:1;
|
|
7014
7015
|
}
|
|
7015
|
-
.bp_data_table_module_dataTableWrapper--
|
|
7016
|
+
.bp_data_table_module_dataTableWrapper--c7392 table tbody > tr[data-focus-visible][aria-selected=true]{
|
|
7016
7017
|
--outline-offset-focus-cell:var(--outline-offset-focus-and-selected-row);
|
|
7017
7018
|
}
|
|
7018
7019
|
|
|
7019
|
-
.bp_data_table_module_isScrolledX--
|
|
7020
|
+
.bp_data_table_module_isScrolledX--c7392 table > thead > tr > th:first-child{
|
|
7020
7021
|
overflow:visible;
|
|
7021
7022
|
}
|
|
7022
|
-
.bp_data_table_module_isScrolledX--
|
|
7023
|
+
.bp_data_table_module_isScrolledX--c7392 table > thead > tr > th:first-child::after{
|
|
7023
7024
|
background:inherit;
|
|
7024
7025
|
border-right:1px solid var(--border-divider-border);
|
|
7025
7026
|
box-shadow:10px 0 7px -4px var(--item-background);
|
|
@@ -7033,7 +7034,7 @@
|
|
|
7033
7034
|
z-index:-1;
|
|
7034
7035
|
}
|
|
7035
7036
|
|
|
7036
|
-
.bp_data_table_module_hideActionWrapperRight--
|
|
7037
|
+
.bp_data_table_module_hideActionWrapperRight--c7392 table tbody > tr > td [data-actionswrapper]::after{
|
|
7037
7038
|
display:none;
|
|
7038
7039
|
}
|
|
7039
7040
|
.bp_list_checkbox_module_selection--711bf[data-modern=false]{
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import styles from './inline-table.module.js';
|
|
6
5
|
|
|
7
6
|
const Table = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
@@ -11,12 +10,9 @@ const Table = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
11
10
|
className,
|
|
12
11
|
...rest
|
|
13
12
|
} = props;
|
|
14
|
-
const {
|
|
15
|
-
enableModernizedComponents
|
|
16
|
-
} = useBlueprintModernization();
|
|
17
13
|
return jsx("table", {
|
|
18
14
|
className: clsx(hideBorder && styles.borderHidden, fullSpan && styles.fullSpan, styles.inlineTable, className),
|
|
19
|
-
"data-modern":
|
|
15
|
+
"data-modern": 'true' ,
|
|
20
16
|
...rest,
|
|
21
17
|
ref: ref
|
|
22
18
|
});
|
|
@@ -3,7 +3,6 @@ import { XMark } from '@box/blueprint-web-assets/icons/Fill';
|
|
|
3
3
|
import { Size4 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import React__default, { forwardRef } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { Text } from '../text/text.js';
|
|
8
7
|
import styles from './input-chip.module.js';
|
|
9
8
|
|
|
@@ -26,9 +25,7 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
26
25
|
onDelete,
|
|
27
26
|
...buttonProps
|
|
28
27
|
} = props;
|
|
29
|
-
const
|
|
30
|
-
enableModernizedComponents
|
|
31
|
-
} = useBlueprintModernization();
|
|
28
|
+
const enableModernizedComponents = true;
|
|
32
29
|
// Clone avatar element to override its props
|
|
33
30
|
const withSmallAvatarSize = element => {
|
|
34
31
|
const cloneAvatarWithSmallSize = el => /*#__PURE__*/React__default.cloneElement(el, {
|
|
@@ -66,7 +63,7 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
66
63
|
ref: ref,
|
|
67
64
|
"aria-invalid": hasError,
|
|
68
65
|
className: containerClassName,
|
|
69
|
-
"data-modern":
|
|
66
|
+
"data-modern": 'true' ,
|
|
70
67
|
onKeyDown: handleKeyDown,
|
|
71
68
|
type: "button",
|
|
72
69
|
children: [avatar, jsx(Text, {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { ArrowUp, ArrowDown } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
|
-
import { bpSize040,
|
|
4
|
+
import { bpSize040, bpTextTextOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import { useFocusRing } from 'react-aria';
|
|
8
8
|
import { Column as Column$1, ColumnResizer } from 'react-aria-components';
|
|
9
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import { Focusable } from '../focusable/focusable.js';
|
|
11
10
|
import { useBreakpoint, Breakpoint } from '../utils/useBreakpoint.js';
|
|
12
11
|
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
@@ -17,28 +16,20 @@ function SortingArrowIcon({
|
|
|
17
16
|
visibility = 'visible',
|
|
18
17
|
direction
|
|
19
18
|
}) {
|
|
20
|
-
const {
|
|
21
|
-
enableModernizedComponents
|
|
22
|
-
} = useBlueprintModernization();
|
|
23
19
|
const props = {
|
|
24
|
-
color:
|
|
25
|
-
height:
|
|
20
|
+
color: bpTextTextOnLight ,
|
|
21
|
+
height: bpSize040 ,
|
|
26
22
|
role: 'presentation',
|
|
27
23
|
visibility,
|
|
28
|
-
width:
|
|
24
|
+
width: bpSize040
|
|
29
25
|
};
|
|
30
|
-
|
|
26
|
+
{
|
|
31
27
|
return direction === 'up' ? jsx(ArrowUp, {
|
|
32
28
|
...props
|
|
33
29
|
}) : jsx(ArrowDown, {
|
|
34
30
|
...props
|
|
35
31
|
});
|
|
36
32
|
}
|
|
37
|
-
return direction === 'up' ? jsx(ArrowUp$1, {
|
|
38
|
-
...props
|
|
39
|
-
}) : jsx(ArrowDown$1, {
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
33
|
}
|
|
43
34
|
function SortIndicator({
|
|
44
35
|
direction
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { TableHeader } from 'react-aria-components';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './main.module.js';
|
|
7
6
|
|
|
8
7
|
const TableHeaderInner = (props, ref) => {
|
|
@@ -12,14 +11,11 @@ const TableHeaderInner = (props, ref) => {
|
|
|
12
11
|
className,
|
|
13
12
|
...rest
|
|
14
13
|
} = props;
|
|
15
|
-
const {
|
|
16
|
-
enableModernizedComponents
|
|
17
|
-
} = useBlueprintModernization();
|
|
18
14
|
return jsx(TableHeader, {
|
|
19
15
|
...rest,
|
|
20
16
|
ref: ref,
|
|
21
17
|
className: clsx(styles.tableHeader, className),
|
|
22
|
-
"data-modern":
|
|
18
|
+
"data-modern": 'true' ,
|
|
23
19
|
children: children
|
|
24
20
|
});
|
|
25
21
|
};
|
|
@@ -3,7 +3,6 @@ import { forwardRef, useRef } from 'react';
|
|
|
3
3
|
import { ResizableTableContainer, Table as Table$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { noop } from '../utils/noop.js';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import styles from './main.module.js';
|
|
8
7
|
import { ColumnVisibilityProvider, useColumnVisibilityContext } from './utils/column-visibility-context/columnVisibilityContext.js';
|
|
9
8
|
import { TableSortingProvider, useTableSortingContext } from './utils/table-sorting-context/tableSortingContext.js';
|
|
@@ -28,9 +27,7 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
28
27
|
} = props;
|
|
29
28
|
const resizableContainerRef = useRef(null);
|
|
30
29
|
const dropdownHeaderContainerRef = useRef(null);
|
|
31
|
-
const
|
|
32
|
-
enableModernizedComponents
|
|
33
|
-
} = useBlueprintModernization();
|
|
30
|
+
const enableModernizedComponents = true;
|
|
34
31
|
return jsx(TableSortingProvider, {
|
|
35
32
|
defaultSortDescriptor: defaultSortDescriptor,
|
|
36
33
|
dropdownHeaderContainerRef: dropdownHeaderContainerRef,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
3
|
import styles from './loading-indicator.module.js';
|
|
6
4
|
|
|
7
5
|
function LoadingIndicator(props) {
|
|
@@ -13,15 +11,12 @@ function LoadingIndicator(props) {
|
|
|
13
11
|
className = '',
|
|
14
12
|
...rest
|
|
15
13
|
} = props;
|
|
16
|
-
const {
|
|
17
|
-
enableModernizedComponents
|
|
18
|
-
} = useBlueprintModernization();
|
|
19
14
|
return jsxs("div", {
|
|
20
15
|
...rest,
|
|
21
16
|
"aria-label": ariaLabel,
|
|
22
17
|
"aria-live": ariaLive,
|
|
23
18
|
className: clsx(styles.crawler, styles[variant], styles[size], className),
|
|
24
|
-
"data-modern":
|
|
19
|
+
"data-modern": 'true' ,
|
|
25
20
|
role: "status",
|
|
26
21
|
children: [jsx("div", {
|
|
27
22
|
className: styles.segment
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { XMark } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
9
8
|
import { useMedia } from '../utils/useMedia.js';
|
|
10
9
|
import styles from './modal.module.js';
|
|
@@ -23,10 +22,7 @@ const ModalClose = /*#__PURE__*/forwardRef(({
|
|
|
23
22
|
variant = 'default',
|
|
24
23
|
...rest
|
|
25
24
|
}, forwardedRef) => {
|
|
26
|
-
const
|
|
27
|
-
enableModernizedComponents
|
|
28
|
-
} = useBlueprintModernization();
|
|
29
|
-
const defaultIcon = enableModernizedComponents ? XMark : XMark$1;
|
|
25
|
+
const defaultIcon = XMark ;
|
|
30
26
|
// Change IconButton size for Mobile (only when IconButton size is large)
|
|
31
27
|
// TODO: change to media query tokens
|
|
32
28
|
const breakpoint = 459;
|
|
@@ -5,7 +5,6 @@ import { forwardRef } from 'react';
|
|
|
5
5
|
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
6
6
|
import '../blueprint-configuration-context/consts.js';
|
|
7
7
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
8
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
9
8
|
import styles from './modal.module.js';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -20,9 +19,6 @@ const ModalContent = /*#__PURE__*/forwardRef(({
|
|
|
20
19
|
size,
|
|
21
20
|
...props
|
|
22
21
|
}, forwardedRef) => {
|
|
23
|
-
const {
|
|
24
|
-
enableModernizedComponents
|
|
25
|
-
} = useBlueprintModernization();
|
|
26
22
|
const {
|
|
27
23
|
componentsWithAnimationEnabled
|
|
28
24
|
} = useBlueprintConfiguration();
|
|
@@ -32,7 +28,7 @@ const ModalContent = /*#__PURE__*/forwardRef(({
|
|
|
32
28
|
children: jsx(RadixDialog.Overlay, {
|
|
33
29
|
className: styles.overlay,
|
|
34
30
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
35
|
-
"data-modern":
|
|
31
|
+
"data-modern": 'true' ,
|
|
36
32
|
children: jsx(RadixDialog.Content, {
|
|
37
33
|
...props,
|
|
38
34
|
ref: forwardedRef,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -12,9 +11,6 @@ const NavigationMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
12
11
|
children,
|
|
13
12
|
...rest
|
|
14
13
|
} = props;
|
|
15
|
-
const {
|
|
16
|
-
enableModernizedComponents
|
|
17
|
-
} = useBlueprintModernization();
|
|
18
14
|
const {
|
|
19
15
|
componentsWithAnimationEnabled
|
|
20
16
|
} = useBlueprintConfiguration();
|
|
@@ -23,7 +19,7 @@ const NavigationMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
23
19
|
...rest,
|
|
24
20
|
ref: forwardedRef,
|
|
25
21
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
26
|
-
"data-modern":
|
|
22
|
+
"data-modern": 'true' ,
|
|
27
23
|
children: children
|
|
28
24
|
});
|
|
29
25
|
});
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Link } from '../primitives/link/link.js';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './navigation-menu.module.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -13,14 +12,11 @@ const NavigationMenuLink = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
13
12
|
children,
|
|
14
13
|
...rest
|
|
15
14
|
} = props;
|
|
16
|
-
const {
|
|
17
|
-
enableModernizedComponents
|
|
18
|
-
} = useBlueprintModernization();
|
|
19
15
|
return jsx(Link, {
|
|
20
16
|
...rest,
|
|
21
17
|
ref: forwardedRef,
|
|
22
18
|
className: clsx([styles.link, styles.ellipsis]),
|
|
23
|
-
"data-modern":
|
|
19
|
+
"data-modern": 'true' ,
|
|
24
20
|
inheritFont: true,
|
|
25
21
|
variant: "standalone",
|
|
26
22
|
children: children
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, useEffect, Children, isValidElement } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { useBreakpoint, Breakpoint } from '../utils/useBreakpoint.js';
|
|
6
5
|
import { useRefWithEffect as useRefWithEffectMemoized } from '../utils/useRefWithEffect.js';
|
|
7
6
|
import { PageProvider, usePageStore } from './page-context.js';
|
|
@@ -57,9 +56,6 @@ const PageLayout = /*#__PURE__*/forwardRef(({
|
|
|
57
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
57
|
}, []);
|
|
59
58
|
const Slots = getChildrenForLandmarks(children);
|
|
60
|
-
const {
|
|
61
|
-
enableModernizedComponents
|
|
62
|
-
} = useBlueprintModernization();
|
|
63
59
|
return jsxs("div", {
|
|
64
60
|
...rest,
|
|
65
61
|
ref: setRefs,
|
|
@@ -68,7 +64,7 @@ const PageLayout = /*#__PURE__*/forwardRef(({
|
|
|
68
64
|
[styles.pageNavigationXXLargeCollapsed]: xxLargeBreakpointActive && !navigationExpanded,
|
|
69
65
|
[styles.pageMediumOrLessViewport]: breakpoint <= Breakpoint.Medium
|
|
70
66
|
}, className),
|
|
71
|
-
"data-modern":
|
|
67
|
+
"data-modern": 'true' ,
|
|
72
68
|
children: [Slots.Navigation, jsxs("div", {
|
|
73
69
|
className: styles.pageBody,
|
|
74
70
|
children: [Slots.SidePanel, jsxs("div", {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, useCallback, createElement } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { useBaseButtonContext } from './base-button-context.js';
|
|
6
5
|
import styles from './base-button.module.js';
|
|
7
6
|
import { buttonVariantToIconColorMap, getIconSize } from './utils.js';
|
|
@@ -19,9 +18,7 @@ const BaseButtonIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
19
18
|
buttonType,
|
|
20
19
|
ariaLabel
|
|
21
20
|
} = useBaseButtonContext();
|
|
22
|
-
const
|
|
23
|
-
enableModernizedComponents
|
|
24
|
-
} = useBlueprintModernization();
|
|
21
|
+
const enableModernizedComponents = true;
|
|
25
22
|
const isIconOnly = buttonType === 'icon-only';
|
|
26
23
|
const renderIcon = useCallback(() => {
|
|
27
24
|
if (!icon) {
|
|
@@ -5,7 +5,6 @@ import { forwardRef, useRef, useMemo } from 'react';
|
|
|
5
5
|
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
6
6
|
import '../../blueprint-configuration-context/consts.js';
|
|
7
7
|
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
8
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
9
8
|
import { LoadingIndicator } from '../../loading-indicator/loading-indicator.js';
|
|
10
9
|
import { getButtonOptions } from '../../utils/getButtonOptions.js';
|
|
11
10
|
import { useForkRef } from '../../utils/useForkRef.js';
|
|
@@ -37,9 +36,6 @@ const BaseButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
37
36
|
...rest
|
|
38
37
|
} = getButtonOptions(props);
|
|
39
38
|
const effectiveSize = size === 'x-small' && !VALID_X_SMALL_VARIANTS.includes(variant) ? 'small' : size;
|
|
40
|
-
const {
|
|
41
|
-
enableModernizedComponents
|
|
42
|
-
} = useBlueprintModernization();
|
|
43
39
|
const {
|
|
44
40
|
componentsWithAnimationEnabled
|
|
45
41
|
} = useBlueprintConfiguration();
|
|
@@ -58,7 +54,7 @@ const BaseButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
58
54
|
ref: useForkRef(ref, forwardedRef),
|
|
59
55
|
"aria-label": loading ? undefined : ariaLabel,
|
|
60
56
|
className: getButtonClassName(variant, effectiveSize, buttonType, loading, className),
|
|
61
|
-
"data-modern":
|
|
57
|
+
"data-modern": 'true' ,
|
|
62
58
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
63
59
|
children: jsxs(BaseButtonContext.Provider, {
|
|
64
60
|
value: context,
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { bpSize050,
|
|
2
|
+
import { bpSize050, bpIconIconOnLightSecondary, bpIconIconOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
3
|
import { forwardRef, createElement } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import styles from './base-inline-notice.module.js';
|
|
6
5
|
|
|
7
|
-
const IconColorMap = {
|
|
8
|
-
IconIconOnLight,
|
|
9
|
-
IconIconOnLightSecondary
|
|
10
|
-
};
|
|
11
6
|
const IconColorModernizedMap = {
|
|
12
7
|
IconIconOnLight: bpIconIconOnLight,
|
|
13
8
|
IconIconOnLightSecondary: bpIconIconOnLightSecondary
|
|
@@ -19,17 +14,14 @@ const BaseInlineNoticeIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
19
14
|
iconColor = 'IconIconOnLight',
|
|
20
15
|
...rest
|
|
21
16
|
} = props;
|
|
22
|
-
const {
|
|
23
|
-
enableModernizedComponents
|
|
24
|
-
} = useBlueprintModernization();
|
|
25
17
|
if (!icon) {
|
|
26
18
|
return null;
|
|
27
19
|
}
|
|
28
|
-
const color =
|
|
20
|
+
const color = IconColorModernizedMap[iconColor] ;
|
|
29
21
|
const iconElement = /*#__PURE__*/createElement(icon, {
|
|
30
22
|
color,
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
23
|
+
width: bpSize050 ,
|
|
24
|
+
height: bpSize050 ,
|
|
33
25
|
'aria-label': iconAriaLabel
|
|
34
26
|
});
|
|
35
27
|
return jsx("span", {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import styles from './base-inline-notice.module.js';
|
|
6
5
|
|
|
7
6
|
const BaseInlineNotice = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -12,15 +11,12 @@ const BaseInlineNotice = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
12
11
|
enableContainerQueryLayout = false,
|
|
13
12
|
...rest
|
|
14
13
|
} = props;
|
|
15
|
-
const {
|
|
16
|
-
enableModernizedComponents
|
|
17
|
-
} = useBlueprintModernization();
|
|
18
14
|
return jsx("div", {
|
|
19
15
|
...rest,
|
|
20
16
|
ref: forwardedRef,
|
|
21
17
|
className: clsx(styles.noticeWrapper, styles[backgroundColor], className),
|
|
22
18
|
"data-container-query-layout": enableContainerQueryLayout ? 'true' : 'false',
|
|
23
|
-
"data-modern":
|
|
19
|
+
"data-modern": 'true' ,
|
|
24
20
|
children: children
|
|
25
21
|
});
|
|
26
22
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { AlertCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import { IconIconErrorOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef, useState, useMemo, cloneElement } from 'react';
|
|
7
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import { Focusable } from '../../focusable/focusable.js';
|
|
9
8
|
import { Text } from '../../text/text.js';
|
|
10
9
|
import { Tooltip } from '../../tooltip/tooltip.js';
|
|
@@ -72,16 +71,13 @@ const BaseTextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
72
71
|
className: clsx(endIcon.props?.className, styles.endIcon)
|
|
73
72
|
}), [endIcon]);
|
|
74
73
|
const Label = useLabelable(label, inputId, required);
|
|
75
|
-
const {
|
|
76
|
-
enableModernizedComponents
|
|
77
|
-
} = useBlueprintModernization();
|
|
78
74
|
return jsxs("div", {
|
|
79
75
|
className: clsx(styles.textInputContainerOuter, {
|
|
80
76
|
[styles.disabled]: disabled,
|
|
81
77
|
[styles.error]: shouldMarkError
|
|
82
78
|
}, className),
|
|
83
79
|
"data-bp-animated": animatedDataAttribute ?? 'false',
|
|
84
|
-
"data-modern":
|
|
80
|
+
"data-modern": 'true' ,
|
|
85
81
|
children: [jsx(Label, {
|
|
86
82
|
className: clsx([styles.label], {
|
|
87
83
|
[styles.hidden]: hideLabel
|
|
@@ -117,11 +113,9 @@ const BaseTextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
117
113
|
ref: setValueUsing(setEndIconWidth),
|
|
118
114
|
"aria-labelledby": inlineErrorId,
|
|
119
115
|
className: clsx(styles.endIcon, styles.inlineErrorIcon),
|
|
120
|
-
children:
|
|
121
|
-
color: IconIconErrorOnLight
|
|
122
|
-
}) : jsx(AlertBadge, {
|
|
116
|
+
children: jsx(AlertCircle, {
|
|
123
117
|
color: IconIconErrorOnLight
|
|
124
|
-
})
|
|
118
|
+
})
|
|
125
119
|
})
|
|
126
120
|
}), jsx(VisuallyHidden, {
|
|
127
121
|
id: inlineErrorId,
|