@box/blueprint-web 16.20.7 → 17.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/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/content-card/content-card-body.js +2 -6
- package/dist/lib-esm/content-card/content-card.js +2 -9
- 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/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
|
@@ -6,7 +6,6 @@ import { LoadingIndicator } from '../loading-indicator/loading-indicator.js';
|
|
|
6
6
|
import { Text } from '../text/text.js';
|
|
7
7
|
import { TooltipWrapper } from '../utils/TooltipWrapper.js';
|
|
8
8
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
9
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import { getButtonOptions } from '../utils/getButtonOptions.js';
|
|
11
10
|
import { useIsEllipsized } from '../utils/useIsEllipsized.js';
|
|
12
11
|
import styles from './text-button.module.js';
|
|
@@ -25,9 +24,6 @@ const TextButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
25
24
|
variant,
|
|
26
25
|
...rest
|
|
27
26
|
} = getButtonOptions(props);
|
|
28
|
-
const {
|
|
29
|
-
enableModernizedComponents
|
|
30
|
-
} = useBlueprintModernization();
|
|
31
27
|
const {
|
|
32
28
|
componentsWithAnimationEnabled
|
|
33
29
|
} = useBlueprintConfiguration();
|
|
@@ -37,7 +33,7 @@ const TextButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
37
33
|
current: null
|
|
38
34
|
});
|
|
39
35
|
const iconsSize = `0.875${inheritFont ? 'em' : 'rem'}`;
|
|
40
|
-
const dataModernValue =
|
|
36
|
+
const dataModernValue = 'true' ;
|
|
41
37
|
return jsx(TooltipWrapper, {
|
|
42
38
|
tooltipContent: children,
|
|
43
39
|
tooltipSide: tooltipSide,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { PencilCrossed } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useRef, useCallback, useMemo, cloneElement } from 'react';
|
|
6
6
|
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
7
|
import '../blueprint-configuration-context/consts.js';
|
|
8
8
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
9
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import { LoadingIndicator } from '../loading-indicator/loading-indicator.js';
|
|
11
10
|
import { BaseTextInput } from '../primitives/base-text-input/base-text-input.js';
|
|
12
11
|
import { useForkRef } from '../utils/useForkRef.js';
|
|
@@ -21,9 +20,7 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
21
20
|
loadingAriaLabel,
|
|
22
21
|
...rest
|
|
23
22
|
} = props;
|
|
24
|
-
const
|
|
25
|
-
enableModernizedComponents
|
|
26
|
-
} = useBlueprintModernization();
|
|
23
|
+
const enableModernizedComponents = true;
|
|
27
24
|
const {
|
|
28
25
|
componentsWithAnimationEnabled
|
|
29
26
|
} = useBlueprintConfiguration();
|
|
@@ -49,7 +46,7 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
49
46
|
});
|
|
50
47
|
}
|
|
51
48
|
if (readOnly) {
|
|
52
|
-
const PencilCrossedIcon =
|
|
49
|
+
const PencilCrossedIcon = PencilCrossed ;
|
|
53
50
|
return jsx(PencilCrossedIcon, {
|
|
54
51
|
onClick: focusInput,
|
|
55
52
|
role: "presentation"
|
|
@@ -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 { BaseToggleButton } from '../util-components/base-toggle-button/base-toggle-button.js';
|
|
6
5
|
import styles from './text-toggle-button.module.js';
|
|
7
6
|
|
|
@@ -9,14 +8,11 @@ const TextToggleButton = /*#__PURE__*/forwardRef(({
|
|
|
9
8
|
className,
|
|
10
9
|
...rest
|
|
11
10
|
}, ref) => {
|
|
12
|
-
const {
|
|
13
|
-
enableModernizedComponents
|
|
14
|
-
} = useBlueprintModernization();
|
|
15
11
|
return jsx(BaseToggleButton, {
|
|
16
12
|
...rest,
|
|
17
13
|
ref: ref,
|
|
18
14
|
className: clsx(styles.textToggleButton, className),
|
|
19
|
-
"data-modern":
|
|
15
|
+
"data-modern": 'true'
|
|
20
16
|
});
|
|
21
17
|
});
|
|
22
18
|
TextToggleButton.displayName = 'TextToggleButton';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { Clock, XMark } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
|
-
import { bpSize040, bpGray65
|
|
4
|
+
import { bpSize040, bpGray65 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef, useRef, useCallback } from 'react';
|
|
7
7
|
import { TimeField, DateInput, DateSegment } from 'react-aria-components';
|
|
8
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
9
8
|
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
10
9
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
11
10
|
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
@@ -13,12 +12,6 @@ import { useControllableState } from '../utils/useControllableState.js';
|
|
|
13
12
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
14
13
|
import styles from './time-picker.module.js';
|
|
15
14
|
|
|
16
|
-
const ClearIcon = label => () => jsx(XMark$1, {
|
|
17
|
-
"aria-label": label,
|
|
18
|
-
color: Gray65,
|
|
19
|
-
height: Size4,
|
|
20
|
-
width: Size4
|
|
21
|
-
});
|
|
22
15
|
const ClearIconModern = label => () => jsx(XMark, {
|
|
23
16
|
"aria-label": label,
|
|
24
17
|
color: bpGray65,
|
|
@@ -40,9 +33,6 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
40
33
|
shouldForceLeadingZeros = true,
|
|
41
34
|
...rest
|
|
42
35
|
} = props;
|
|
43
|
-
const {
|
|
44
|
-
enableModernizedComponents
|
|
45
|
-
} = useBlueprintModernization();
|
|
46
36
|
// Component may be uncontrolled or controlled
|
|
47
37
|
const [time, setTimeValue] = useControllableState({
|
|
48
38
|
prop: value,
|
|
@@ -74,7 +64,7 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
74
64
|
className: clsx(styles.timePicker, {
|
|
75
65
|
[styles.disabled]: isDisabled
|
|
76
66
|
}, className),
|
|
77
|
-
"data-modern":
|
|
67
|
+
"data-modern": 'true' ,
|
|
78
68
|
isDisabled: isDisabled,
|
|
79
69
|
isInvalid: hasError,
|
|
80
70
|
onChange: setTimeValue,
|
|
@@ -105,23 +95,17 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
105
95
|
"aria-label": clearTimePickerAriaLabel,
|
|
106
96
|
className: styles.clearButton,
|
|
107
97
|
disabled: isDisabled,
|
|
108
|
-
icon:
|
|
98
|
+
icon: ClearIconModern(clearTimePickerAriaLabel) ,
|
|
109
99
|
onClick: handleClearInputButtonClicked,
|
|
110
100
|
onKeyDownCapture: handleClearButtonKeypress,
|
|
111
101
|
size: "x-small"
|
|
112
|
-
}),
|
|
102
|
+
}), jsx(Clock, {
|
|
113
103
|
"aria-label": clockIconAriaLabel,
|
|
114
104
|
className: styles.clockIcon,
|
|
115
105
|
color: bpGray65,
|
|
116
106
|
height: bpSize040,
|
|
117
107
|
width: bpSize040
|
|
118
|
-
})
|
|
119
|
-
"aria-label": clockIconAriaLabel,
|
|
120
|
-
className: styles.clockIcon,
|
|
121
|
-
color: Gray65,
|
|
122
|
-
height: Size4,
|
|
123
|
-
width: Size4
|
|
124
|
-
})]
|
|
108
|
+
}) ]
|
|
125
109
|
}), jsx(InlineError, {
|
|
126
110
|
className: styles.inlineError,
|
|
127
111
|
id: inlineErrorId,
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './toolbar.module.js';
|
|
7
6
|
|
|
8
7
|
const ToolbarButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -14,9 +13,6 @@ const ToolbarButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
14
13
|
disabled,
|
|
15
14
|
...rest
|
|
16
15
|
} = props;
|
|
17
|
-
const {
|
|
18
|
-
enableModernizedComponents
|
|
19
|
-
} = useBlueprintModernization();
|
|
20
16
|
return jsx(ToolbarPrimitive.Button, {
|
|
21
17
|
...rest,
|
|
22
18
|
ref: forwardedRef,
|
|
@@ -24,7 +20,7 @@ const ToolbarButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
24
20
|
...(disabled ? {
|
|
25
21
|
'data-disabled': ''
|
|
26
22
|
} : {}),
|
|
27
|
-
"data-modern":
|
|
23
|
+
"data-modern": 'true' ,
|
|
28
24
|
disabled: disabled,
|
|
29
25
|
style: {
|
|
30
26
|
'--toolbar-button-color': backgroundColor,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ChevronDown
|
|
2
|
+
import { ChevronDown } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { Size2 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useMemo } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import styles from './toolbar.module.js';
|
|
8
7
|
|
|
9
8
|
const ToolbarDropdownIndicator = /*#__PURE__*/forwardRef(({
|
|
@@ -11,10 +10,8 @@ const ToolbarDropdownIndicator = /*#__PURE__*/forwardRef(({
|
|
|
11
10
|
className,
|
|
12
11
|
color
|
|
13
12
|
}, forwardedRef) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
} = useBlueprintModernization();
|
|
17
|
-
const Icon = useMemo(() => enableModernizedComponents ? ChevronDown : Caret, [enableModernizedComponents]);
|
|
13
|
+
const enableModernizedComponents = true;
|
|
14
|
+
const Icon = useMemo(() => ChevronDown , [enableModernizedComponents]);
|
|
18
15
|
return jsx(Icon, {
|
|
19
16
|
ref: forwardedRef,
|
|
20
17
|
className: clsx({
|
|
@@ -3,7 +3,6 @@ import { AlertCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
|
3
3
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { composeToolbarInputKeyDownCapture } from './toolbar-input-keydown.js';
|
|
8
7
|
import styles from './toolbar.module.js';
|
|
9
8
|
|
|
@@ -22,9 +21,6 @@ const ToolbarInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
22
21
|
type = 'text',
|
|
23
22
|
...rest
|
|
24
23
|
} = props;
|
|
25
|
-
const {
|
|
26
|
-
enableModernizedComponents
|
|
27
|
-
} = useBlueprintModernization();
|
|
28
24
|
const showError = error && !disabled;
|
|
29
25
|
return jsxs("div", {
|
|
30
26
|
className: styles.toolbarInputContainer,
|
|
@@ -36,7 +32,7 @@ const ToolbarInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
36
32
|
ref: forwardedRef,
|
|
37
33
|
type: type,
|
|
38
34
|
className: clsx(styles.toolbarInput, showError && styles.toolbarInputError, className),
|
|
39
|
-
"data-modern":
|
|
35
|
+
"data-modern": 'true' ,
|
|
40
36
|
disabled: disabled,
|
|
41
37
|
"aria-invalid": showError || undefined,
|
|
42
38
|
onKeyDown: onKeyDown,
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './toolbar.module.js';
|
|
7
6
|
|
|
8
7
|
const ToolbarLink = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -11,14 +10,11 @@ const ToolbarLink = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
11
10
|
className,
|
|
12
11
|
...rest
|
|
13
12
|
} = props;
|
|
14
|
-
const {
|
|
15
|
-
enableModernizedComponents
|
|
16
|
-
} = useBlueprintModernization();
|
|
17
13
|
return jsx(ToolbarPrimitive.Link, {
|
|
18
14
|
...rest,
|
|
19
15
|
ref: forwardedRef,
|
|
20
16
|
className: clsx(styles.toolbarItem, styles.toolbarLink, className),
|
|
21
|
-
"data-modern":
|
|
17
|
+
"data-modern": 'true' ,
|
|
22
18
|
children: jsx("span", {
|
|
23
19
|
className: styles.toolbarLinkText,
|
|
24
20
|
children: children
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import { ToolbarScrollableContainer } from './toolbar-scrollable-container.js';
|
|
7
6
|
import styles from './toolbar.module.js';
|
|
8
7
|
import { HorizontalScrollProvider } from './utils/horizontal-scroll-context.js';
|
|
@@ -14,9 +13,7 @@ const ToolbarRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
14
13
|
scrollable,
|
|
15
14
|
...rest
|
|
16
15
|
} = props;
|
|
17
|
-
const
|
|
18
|
-
enableModernizedComponents
|
|
19
|
-
} = useBlueprintModernization();
|
|
16
|
+
const enableModernizedComponents = true;
|
|
20
17
|
if (scrollable) {
|
|
21
18
|
const {
|
|
22
19
|
ariaLabelNextButton,
|
|
@@ -30,7 +27,7 @@ const ToolbarRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
30
27
|
className: clsx(styles.toolbarRoot, {
|
|
31
28
|
[styles.ScrollableToolbarWithReducedPadding]: enableModernizedComponents
|
|
32
29
|
}, className),
|
|
33
|
-
"data-modern":
|
|
30
|
+
"data-modern": 'true' ,
|
|
34
31
|
style: {
|
|
35
32
|
maxWidth
|
|
36
33
|
},
|
|
@@ -48,7 +45,7 @@ const ToolbarRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
48
45
|
...rest,
|
|
49
46
|
ref: forwardedRef,
|
|
50
47
|
className: clsx(styles.toolbarRoot, className),
|
|
51
|
-
"data-modern":
|
|
48
|
+
"data-modern": 'true' ,
|
|
52
49
|
children: children
|
|
53
50
|
});
|
|
54
51
|
});
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './toolbar.module.js';
|
|
7
6
|
|
|
8
7
|
const ToolbarTextToggleItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -10,14 +9,11 @@ const ToolbarTextToggleItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
10
9
|
children,
|
|
11
10
|
...rest
|
|
12
11
|
} = props;
|
|
13
|
-
const {
|
|
14
|
-
enableModernizedComponents
|
|
15
|
-
} = useBlueprintModernization();
|
|
16
12
|
return jsx(ToolbarPrimitive.ToggleItem, {
|
|
17
13
|
...rest,
|
|
18
14
|
ref: forwardedRef,
|
|
19
15
|
className: clsx(styles.toolbarItem, styles.toolbarTextToggleItem),
|
|
20
|
-
"data-modern":
|
|
16
|
+
"data-modern": 'true' ,
|
|
21
17
|
children: children
|
|
22
18
|
});
|
|
23
19
|
});
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from './toolbar.module.js';
|
|
7
6
|
|
|
8
7
|
const ToolbarToggleGroup = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -11,14 +10,11 @@ const ToolbarToggleGroup = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
11
10
|
className,
|
|
12
11
|
...rest
|
|
13
12
|
} = props;
|
|
14
|
-
const {
|
|
15
|
-
enableModernizedComponents
|
|
16
|
-
} = useBlueprintModernization();
|
|
17
13
|
return jsx(ToolbarPrimitive.ToggleGroup, {
|
|
18
14
|
...rest,
|
|
19
15
|
ref: forwardedRef,
|
|
20
16
|
className: clsx(styles.toggleGroup, className),
|
|
21
|
-
"data-modern":
|
|
17
|
+
"data-modern": 'true' ,
|
|
22
18
|
children: children
|
|
23
19
|
});
|
|
24
20
|
});
|
|
@@ -3,7 +3,6 @@ import { IconIconOnLight, Size5 } from '@box/blueprint-web-assets/tokens/tokens'
|
|
|
3
3
|
import * as ToolbarPrimitive from '@radix-ui/react-toolbar';
|
|
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 styles from './toolbar.module.js';
|
|
8
7
|
|
|
9
8
|
const ToolbarToggleItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -13,14 +12,11 @@ const ToolbarToggleItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
13
12
|
color = IconIconOnLight,
|
|
14
13
|
...rest
|
|
15
14
|
} = props;
|
|
16
|
-
const {
|
|
17
|
-
enableModernizedComponents
|
|
18
|
-
} = useBlueprintModernization();
|
|
19
15
|
return jsxs(ToolbarPrimitive.ToggleItem, {
|
|
20
16
|
...rest,
|
|
21
17
|
ref: forwardedRef,
|
|
22
18
|
className: clsx(styles.toolbarItem, styles.toolbarToggle),
|
|
23
|
-
"data-modern":
|
|
19
|
+
"data-modern": 'true' ,
|
|
24
20
|
children: [children, /*#__PURE__*/createElement(icon, {
|
|
25
21
|
height: Size5,
|
|
26
22
|
width: Size5,
|
|
@@ -6,7 +6,6 @@ import React__default, { useContext } from 'react';
|
|
|
6
6
|
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
7
|
import '../blueprint-configuration-context/consts.js';
|
|
8
8
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
9
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import styles from './tooltip.module.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -83,14 +82,6 @@ const TooltipTrigger = /*#__PURE__*/React__default.forwardRef(function TooltipTr
|
|
|
83
82
|
children: props.children
|
|
84
83
|
});
|
|
85
84
|
});
|
|
86
|
-
const Arrow = /*#__PURE__*/React__default.forwardRef(function Arrow({
|
|
87
|
-
variant
|
|
88
|
-
}, ref) {
|
|
89
|
-
return jsx("div", {
|
|
90
|
-
ref: ref,
|
|
91
|
-
className: clsx(styles.arrow, styles[variant])
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
85
|
const Content = /*#__PURE__*/React__default.forwardRef(function Content(props, ref) {
|
|
95
86
|
const {
|
|
96
87
|
children,
|
|
@@ -99,22 +90,14 @@ const Content = /*#__PURE__*/React__default.forwardRef(function Content(props, r
|
|
|
99
90
|
className,
|
|
100
91
|
...rest
|
|
101
92
|
} = props;
|
|
102
|
-
const {
|
|
103
|
-
enableModernizedComponents
|
|
104
|
-
} = useBlueprintModernization();
|
|
105
93
|
return jsxs(RadixTooltip.Content, {
|
|
106
94
|
...rest,
|
|
107
95
|
ref: ref,
|
|
108
96
|
className: clsx(styles.content, styles[variant], className),
|
|
109
97
|
collisionPadding: collisionPadding,
|
|
110
|
-
"data-modern":
|
|
98
|
+
"data-modern": 'true' ,
|
|
111
99
|
sideOffset: 3,
|
|
112
|
-
children: [children,
|
|
113
|
-
asChild: true,
|
|
114
|
-
children: jsx(Arrow, {
|
|
115
|
-
variant: variant
|
|
116
|
-
})
|
|
117
|
-
})]
|
|
100
|
+
children: [children, false]
|
|
118
101
|
});
|
|
119
102
|
});
|
|
120
103
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { ChevronUp, ChevronDown } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useRef } from 'react';
|
|
6
6
|
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
7
|
import '../blueprint-configuration-context/consts.js';
|
|
8
8
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
9
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import { BaseButton } from '../primitives/base-button/index.js';
|
|
11
10
|
import { TooltipWrapper } from '../utils/TooltipWrapper.js';
|
|
12
11
|
import { useIsEllipsized } from '../utils/useIsEllipsized.js';
|
|
@@ -37,9 +36,6 @@ const TriggerButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
37
36
|
loading
|
|
38
37
|
} = rest;
|
|
39
38
|
const startIconSize = buttonSizeToStartIconSizeMap[size];
|
|
40
|
-
const {
|
|
41
|
-
enableModernizedComponents
|
|
42
|
-
} = useBlueprintModernization();
|
|
43
39
|
const {
|
|
44
40
|
componentsWithAnimationEnabled
|
|
45
41
|
} = useBlueprintConfiguration();
|
|
@@ -53,7 +49,7 @@ const TriggerButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
53
49
|
className: clsx(styles.triggerButton, styles[size], styles[variant], {
|
|
54
50
|
[styles.startIcon]: !!startIcon
|
|
55
51
|
}, className),
|
|
56
|
-
"data-modern":
|
|
52
|
+
"data-modern": 'true' ,
|
|
57
53
|
size: baseButtonSize,
|
|
58
54
|
variant: variant,
|
|
59
55
|
...rest,
|
|
@@ -74,13 +70,10 @@ const TriggerButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
74
70
|
[styles.labelWrap]: overflow === 'wrap'
|
|
75
71
|
}),
|
|
76
72
|
children: label
|
|
77
|
-
}),
|
|
73
|
+
}), jsx(BaseButton.Icon, {
|
|
78
74
|
className: styles.iconCaret,
|
|
79
75
|
icon: caretDirection === 'up' ? ChevronUp : ChevronDown
|
|
80
|
-
})
|
|
81
|
-
className: styles.iconCaret,
|
|
82
|
-
icon: caretDirection === 'up' ? CaretUp : CaretDown
|
|
83
|
-
})]
|
|
76
|
+
}) ]
|
|
84
77
|
});
|
|
85
78
|
return overflow === 'ellipsis' && !disabled && !loading ? jsx(TooltipWrapper, {
|
|
86
79
|
tooltipContent: label,
|
|
@@ -3,7 +3,6 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { forwardRef, useMemo, createContext, useContext } from 'react';
|
|
4
4
|
import { GridList } from 'react-aria-components';
|
|
5
5
|
import { noop } from '../../utils/noop.js';
|
|
6
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { isCtrlKeyPressed } from '../../utils/keyboardUtils.js';
|
|
8
7
|
import styles from './base-grid-list-item.module.js';
|
|
9
8
|
import { isGridV2SingleSelect, isGridListContentTarget, getGridListItemKeyFromTarget } from './grid-list-interaction-utils.js';
|
|
@@ -34,9 +33,6 @@ const BaseGridList = /*#__PURE__*/forwardRef(function BaseGridList(props, forwar
|
|
|
34
33
|
variant = 'large',
|
|
35
34
|
...rest
|
|
36
35
|
} = props;
|
|
37
|
-
const {
|
|
38
|
-
enableModernizedComponents
|
|
39
|
-
} = useBlueprintModernization();
|
|
40
36
|
const handleOnAction = onAction || noop;
|
|
41
37
|
// In grid-v2 single-select, React Aria must only ever select on press: passing it onAction would
|
|
42
38
|
// make it treat rows as actionable and swallow the selection. Blueprint fires onAction itself,
|
|
@@ -110,7 +106,7 @@ const BaseGridList = /*#__PURE__*/forwardRef(function BaseGridList(props, forwar
|
|
|
110
106
|
...rest,
|
|
111
107
|
ref: forwardedRef,
|
|
112
108
|
className: clsx(layoutStyleClass, variantClass, className),
|
|
113
|
-
"data-modern":
|
|
109
|
+
"data-modern": 'true' ,
|
|
114
110
|
layout: layoutFinal,
|
|
115
111
|
...(ownsAction ? {} : {
|
|
116
112
|
onAction: handleOnAction
|
|
@@ -2,20 +2,17 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { Tooltip, OverlayArrow } from 'react-aria-components';
|
|
5
|
-
import { useBlueprintModernization } from '../../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
5
|
import styles from '../base-grid-list-item.module.js';
|
|
7
6
|
|
|
8
7
|
const RACTooltip = ({
|
|
9
8
|
children,
|
|
10
9
|
...props
|
|
11
10
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
} = useBlueprintModernization();
|
|
15
|
-
const fill = useMemo(() => enableModernizedComponents ? 'var(--bp-gray-100)' : 'var(--gray-80)', [enableModernizedComponents]);
|
|
11
|
+
const enableModernizedComponents = true;
|
|
12
|
+
const fill = useMemo(() => 'var(--bp-gray-100)' , [enableModernizedComponents]);
|
|
16
13
|
return jsxs(Tooltip, {
|
|
17
14
|
className: clsx(styles.tooltipContent),
|
|
18
|
-
"data-modern":
|
|
15
|
+
"data-modern": 'true' ,
|
|
19
16
|
offset: 3,
|
|
20
17
|
placement: "bottom",
|
|
21
18
|
...props,
|
|
@@ -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 { TextWithInfoBadge } from '../text-with-info-badge/text-with-info-badge.js';
|
|
6
4
|
import styles from './legend.module.js';
|
|
7
5
|
|
|
@@ -16,13 +14,10 @@ function Legend(props) {
|
|
|
16
14
|
...rest
|
|
17
15
|
} = props;
|
|
18
16
|
const shouldRenderHeader = header || infoText && infoBadgeAriaLabel;
|
|
19
|
-
const {
|
|
20
|
-
enableModernizedComponents
|
|
21
|
-
} = useBlueprintModernization();
|
|
22
17
|
return jsxs("fieldset", {
|
|
23
18
|
...rest,
|
|
24
19
|
className: clsx(styles.fieldset, styles[gap], className),
|
|
25
|
-
"data-modern":
|
|
20
|
+
"data-modern": 'true' ,
|
|
26
21
|
children: [shouldRenderHeader ? jsx("legend", {
|
|
27
22
|
className: styles.legendContainer,
|
|
28
23
|
children: jsx(TextWithInfoBadge, {
|
|
@@ -4,7 +4,6 @@ import { Size3, IconIconOnDark } from '@box/blueprint-web-assets/tokens/tokens';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { Checkbox } from 'react-aria-components';
|
|
7
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import styles from './list-checkbox.module.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -15,12 +14,9 @@ import styles from './list-checkbox.module.js';
|
|
|
15
14
|
* @see https://react-spectrum.adobe.com/react-aria/Checkbox.html
|
|
16
15
|
*/
|
|
17
16
|
const ListCheckbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
|
-
const {
|
|
19
|
-
enableModernizedComponents
|
|
20
|
-
} = useBlueprintModernization();
|
|
21
17
|
return jsx("div", {
|
|
22
18
|
className: clsx(styles.selection, props.className),
|
|
23
|
-
"data-modern":
|
|
19
|
+
"data-modern": 'true' ,
|
|
24
20
|
children: jsx(Checkbox, {
|
|
25
21
|
...props,
|
|
26
22
|
ref: ref,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
3
|
import styles from './menu-item-sections.module.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -11,15 +10,12 @@ const MenuItemSideContent = ({
|
|
|
11
10
|
className,
|
|
12
11
|
...rest
|
|
13
12
|
}) => {
|
|
14
|
-
const {
|
|
15
|
-
enableModernizedComponents
|
|
16
|
-
} = useBlueprintModernization();
|
|
17
13
|
return jsx("div", {
|
|
18
14
|
...rest,
|
|
19
15
|
className: clsx(styles.menuItemSideContent, {
|
|
20
16
|
[styles.textOnLightSecondary]: typeof children === 'string'
|
|
21
17
|
}, className),
|
|
22
|
-
"data-modern":
|
|
18
|
+
"data-modern": 'true' ,
|
|
23
19
|
children: children
|
|
24
20
|
});
|
|
25
21
|
};
|
|
@@ -32,13 +28,10 @@ const MenuItemMainContent = ({
|
|
|
32
28
|
description,
|
|
33
29
|
...rest
|
|
34
30
|
}) => {
|
|
35
|
-
const {
|
|
36
|
-
enableModernizedComponents
|
|
37
|
-
} = useBlueprintModernization();
|
|
38
31
|
return jsxs("div", {
|
|
39
32
|
...rest,
|
|
40
33
|
className: clsx(styles.menuItemMainContent, className),
|
|
41
|
-
"data-modern":
|
|
34
|
+
"data-modern": 'true' ,
|
|
42
35
|
children: [jsx("span", {
|
|
43
36
|
className: clsx(styles.label, {
|
|
44
37
|
[styles.bold]: Boolean(description)
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { InfoBadge } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
|
-
import 'react';
|
|
5
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
4
|
import { Tooltip } from '../../tooltip/tooltip.js';
|
|
7
5
|
import { InteractiveIcon } from '../interactive-icon/interactive-icon.js';
|
|
8
6
|
import styles from './text-with-info-badge.module.js';
|
|
@@ -17,12 +15,9 @@ const TextWithInfoBadge = props => {
|
|
|
17
15
|
variant = 'default',
|
|
18
16
|
tooltipPosition = 'top'
|
|
19
17
|
} = props;
|
|
20
|
-
const {
|
|
21
|
-
enableModernizedComponents
|
|
22
|
-
} = useBlueprintModernization();
|
|
23
18
|
return jsxs("div", {
|
|
24
19
|
className: clsx(styles.text, styles[variant], className),
|
|
25
|
-
"data-modern":
|
|
20
|
+
"data-modern": 'true' ,
|
|
26
21
|
id: id,
|
|
27
22
|
children: [children, infoText && infoBadgeAriaLabel && jsx("span", {
|
|
28
23
|
className: styles.badgeContainer,
|
|
@@ -4,4 +4,4 @@ export declare const TooltipWrapper: ({ children, withTooltip, tooltipContent, t
|
|
|
4
4
|
withTooltip: boolean;
|
|
5
5
|
tooltipContent: TooltipProps["content"];
|
|
6
6
|
tooltipSide?: TooltipProps["side"];
|
|
7
|
-
}) => string | number | boolean |
|
|
7
|
+
}) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|