@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
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Combobox } from '@ariakit/react';
|
|
3
|
-
import
|
|
3
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
4
4
|
import { Search } from '@box/blueprint-web-assets/icons/Medium';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import { useMenuComboboxContext } from './menu-combobox-context.js';
|
|
9
8
|
import styles from './menu-combobox.module.js';
|
|
10
9
|
|
|
@@ -19,10 +18,7 @@ const MenuComboboxSearch = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
19
18
|
const {
|
|
20
19
|
searchPlaceholder: rootSearchPlaceholder
|
|
21
20
|
} = useMenuComboboxContext();
|
|
22
|
-
const
|
|
23
|
-
enableModernizedComponents
|
|
24
|
-
} = useBlueprintModernization();
|
|
25
|
-
const SearchIcon = enableModernizedComponents ? Search : Search$1;
|
|
21
|
+
const SearchIcon = Search ;
|
|
26
22
|
const resolvedPlaceholder = placeholder ?? rootSearchPlaceholder;
|
|
27
23
|
return jsxs("span", {
|
|
28
24
|
className: styles.searchWrapper,
|
|
@@ -34,7 +30,7 @@ const MenuComboboxSearch = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
34
30
|
"aria-label": ariaLabel,
|
|
35
31
|
autoSelect: true,
|
|
36
32
|
...rest,
|
|
37
|
-
className: clsx(styles.search,
|
|
33
|
+
className: clsx(styles.search, styles.searchModern, className),
|
|
38
34
|
placeholder: resolvedPlaceholder
|
|
39
35
|
})]
|
|
40
36
|
});
|
|
@@ -1,43 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
+
import '@box/blueprint-web-assets/icons/Line';
|
|
4
4
|
import { XMark, AlertTriangle, InformationCircle, CheckmarkCircle, AlertCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
5
|
-
import { bpIconIconOnLight, bpSize050
|
|
5
|
+
import { bpIconIconOnLight, bpSize050 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
6
6
|
import * as Toast from '@radix-ui/react-toast';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
10
9
|
import { IconButton } from '../icon-button/icon-button.js';
|
|
11
10
|
import styles from './notification.module.js';
|
|
12
11
|
|
|
13
|
-
const createLegacyIconProps = iconLabel => ({
|
|
14
|
-
className: styles.typeIcon,
|
|
15
|
-
'aria-label': iconLabel,
|
|
16
|
-
width: Size5,
|
|
17
|
-
height: Size5
|
|
18
|
-
});
|
|
19
|
-
const getLegacyIcon = (iconLabel, variant) => {
|
|
20
|
-
const props = createLegacyIconProps(iconLabel);
|
|
21
|
-
switch (variant) {
|
|
22
|
-
case 'error':
|
|
23
|
-
return jsx(AlertBadge, {
|
|
24
|
-
...props
|
|
25
|
-
});
|
|
26
|
-
case 'success':
|
|
27
|
-
return jsx(CheckmarkBadge, {
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
case 'info':
|
|
31
|
-
return jsx(InfoBadge, {
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
34
|
-
case 'warning':
|
|
35
|
-
return jsx(AlertTriangle$1, {
|
|
36
|
-
...props
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
12
|
const createIconProps = iconLabel => ({
|
|
42
13
|
className: styles.typeIcon,
|
|
43
14
|
'aria-label': iconLabel,
|
|
@@ -87,14 +58,12 @@ function PrivateNotificationElement(props) {
|
|
|
87
58
|
children,
|
|
88
59
|
...rest
|
|
89
60
|
} = props;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
} = useBlueprintModernization();
|
|
93
|
-
const iconComponent = useMemo(() => enableModernizedComponents ? getIcon(typeIconAriaLabel, variant) : getLegacyIcon(typeIconAriaLabel, variant), [typeIconAriaLabel, variant, enableModernizedComponents]);
|
|
61
|
+
const enableModernizedComponents = true;
|
|
62
|
+
const iconComponent = useMemo(() => getIcon(typeIconAriaLabel, variant) , [typeIconAriaLabel, variant, enableModernizedComponents]);
|
|
94
63
|
return jsx(Toast.Root, {
|
|
95
64
|
...rest,
|
|
96
65
|
className: clsx(styles.root, styles[variant]),
|
|
97
|
-
"data-modern":
|
|
66
|
+
"data-modern": 'true' ,
|
|
98
67
|
onOpenChange: onClose,
|
|
99
68
|
open: open,
|
|
100
69
|
type: sensitivity,
|
|
@@ -126,7 +95,7 @@ function PrivateNotificationElement(props) {
|
|
|
126
95
|
children: jsx(IconButton, {
|
|
127
96
|
"aria-label": closeButtonAriaLabel,
|
|
128
97
|
className: styles.closeButton,
|
|
129
|
-
icon:
|
|
98
|
+
icon: XMark ,
|
|
130
99
|
onClick: onClose
|
|
131
100
|
})
|
|
132
101
|
})
|
|
@@ -135,4 +104,4 @@ function PrivateNotificationElement(props) {
|
|
|
135
104
|
});
|
|
136
105
|
}
|
|
137
106
|
|
|
138
|
-
export { PrivateNotificationElement, createIconProps,
|
|
107
|
+
export { PrivateNotificationElement, createIconProps, getIcon };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, createElement } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { usePageStoreRef } from '../../page/page-context.js';
|
|
6
5
|
import styles from './page-header.module.js';
|
|
7
6
|
|
|
@@ -14,9 +13,7 @@ const PageHeaderRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
14
13
|
sticky = true,
|
|
15
14
|
...rest
|
|
16
15
|
} = props;
|
|
17
|
-
const
|
|
18
|
-
enableModernizedComponents
|
|
19
|
-
} = useBlueprintModernization();
|
|
16
|
+
const enableModernizedComponents = true;
|
|
20
17
|
return /*#__PURE__*/createElement(as, {
|
|
21
18
|
...rest,
|
|
22
19
|
ref: forwardedRef,
|
|
@@ -4,7 +4,6 @@ import * as RadixPopover from '@radix-ui/react-popover';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useContext, useState, useMemo, useCallback } from 'react';
|
|
6
6
|
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
7
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import { Card } from '../../card/card.js';
|
|
9
8
|
import { useBreakpoint, Breakpoint } from '../../utils/useBreakpoint.js';
|
|
10
9
|
import { useContentSizeObserver } from '../../utils/useContentSizeObserver.js';
|
|
@@ -35,9 +34,6 @@ const PopoverContentContainer = /*#__PURE__*/forwardRef((props, forwardedRef) =>
|
|
|
35
34
|
const {
|
|
36
35
|
isInteractionDisabled
|
|
37
36
|
} = useContext(PopoverModalityContext);
|
|
38
|
-
const {
|
|
39
|
-
enableModernizedComponents
|
|
40
|
-
} = useBlueprintModernization();
|
|
41
37
|
const {
|
|
42
38
|
componentsWithAnimationEnabled
|
|
43
39
|
} = useBlueprintConfiguration();
|
|
@@ -68,7 +64,7 @@ const PopoverContentContainer = /*#__PURE__*/forwardRef((props, forwardedRef) =>
|
|
|
68
64
|
[styles.accessibilitySmallBreakpoint]: accessibilitySmallBreakpoint
|
|
69
65
|
}, className),
|
|
70
66
|
collisionPadding: collisionPadding,
|
|
71
|
-
"data-modern":
|
|
67
|
+
"data-modern": 'true' ,
|
|
72
68
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
73
69
|
onOpenAutoFocus: handleOpenAutoFocus,
|
|
74
70
|
children: jsx(PopoverOverflowContext.Provider, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { CompositeItem, Button } from '@ariakit/react';
|
|
3
|
-
import { Gray05, bpSize060, bpSize040,
|
|
3
|
+
import { Gray05, bpSize060, bpSize040, BrandDocgenPrimary, BrandFormsPrimary, BrandSignPrimary, BrandBoxPrimary, bpIconIconOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Color from 'color';
|
|
6
6
|
import { forwardRef, createElement } from 'react';
|
|
7
|
-
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
8
7
|
import { Ghost } from '../../ghost/ghost.js';
|
|
9
8
|
import { Text } from '../../text/text.js';
|
|
10
9
|
import { Tooltip } from '../../tooltip/tooltip.js';
|
|
@@ -38,9 +37,6 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
38
37
|
disabled,
|
|
39
38
|
...restProps
|
|
40
39
|
} = props;
|
|
41
|
-
const {
|
|
42
|
-
enableModernizedComponents
|
|
43
|
-
} = useBlueprintModernization();
|
|
44
40
|
const isWithLabel = variant === 'labeled';
|
|
45
41
|
const isButtonDisabled = disabled || loading;
|
|
46
42
|
const isButtonActive = !disabled && !loading && active;
|
|
@@ -73,7 +69,7 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
73
69
|
[styles.active]: isButtonActive,
|
|
74
70
|
[styles.dragging]: isButtonDragged
|
|
75
71
|
}),
|
|
76
|
-
"data-modern":
|
|
72
|
+
"data-modern": 'true' ,
|
|
77
73
|
disabled: isButtonDisabled,
|
|
78
74
|
children: [variant === 'colorCircle' && jsx(ColorSwatch, {
|
|
79
75
|
color: color || '',
|
|
@@ -91,7 +87,7 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
91
87
|
[styles.withLabel]: isWithLabel,
|
|
92
88
|
[styles['withLabel--default']]: isWithLabel && props.size === 'default'
|
|
93
89
|
}),
|
|
94
|
-
"data-modern":
|
|
90
|
+
"data-modern": 'true' ,
|
|
95
91
|
role: "gridcell",
|
|
96
92
|
children: [shouldShowTooltip && jsx(Tooltip, {
|
|
97
93
|
"aria-hidden": true,
|
|
@@ -140,13 +136,6 @@ const Icon = ({
|
|
|
140
136
|
})
|
|
141
137
|
});
|
|
142
138
|
};
|
|
143
|
-
const iconColor = {
|
|
144
|
-
default: Gray100,
|
|
145
|
-
box: BoxBlue100,
|
|
146
|
-
sign: DarkBlue100,
|
|
147
|
-
forms: GreenLight100,
|
|
148
|
-
docgen: Grimace100
|
|
149
|
-
};
|
|
150
139
|
const iconColorModern = {
|
|
151
140
|
default: bpIconIconOnLight,
|
|
152
141
|
box: BrandBoxPrimary,
|
|
@@ -154,10 +143,6 @@ const iconColorModern = {
|
|
|
154
143
|
forms: BrandFormsPrimary,
|
|
155
144
|
docgen: BrandDocgenPrimary
|
|
156
145
|
};
|
|
157
|
-
const iconSize = {
|
|
158
|
-
default: Size4,
|
|
159
|
-
large: Size6
|
|
160
|
-
};
|
|
161
146
|
const iconSizeModern = {
|
|
162
147
|
default: bpSize040,
|
|
163
148
|
large: bpSize060
|
|
@@ -169,13 +154,10 @@ const ItemWithLabel = ({
|
|
|
169
154
|
description,
|
|
170
155
|
icon
|
|
171
156
|
}) => {
|
|
172
|
-
const {
|
|
173
|
-
enableModernizedComponents
|
|
174
|
-
} = useBlueprintModernization();
|
|
175
157
|
const iconElement = /*#__PURE__*/createElement(icon, {
|
|
176
|
-
color:
|
|
177
|
-
width:
|
|
178
|
-
height:
|
|
158
|
+
color: iconColorModern[colorVariant] ,
|
|
159
|
+
width: iconSizeModern[size] ,
|
|
160
|
+
height: iconSizeModern[size] ,
|
|
179
161
|
role: 'presentation'
|
|
180
162
|
});
|
|
181
163
|
return jsxs(Fragment, {
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { TabList as TabList$1 } from '@ariakit/react';
|
|
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 './tabs.module.js';
|
|
7
6
|
import { useTabs } from './use-tabs.js';
|
|
8
7
|
|
|
@@ -14,20 +13,17 @@ const TabList = /*#__PURE__*/forwardRef(function TabList(props, ref) {
|
|
|
14
13
|
...rest
|
|
15
14
|
} = props;
|
|
16
15
|
const tab = useTabs();
|
|
17
|
-
const {
|
|
18
|
-
enableModernizedComponents
|
|
19
|
-
} = useBlueprintModernization();
|
|
20
16
|
if (!tab) {
|
|
21
17
|
throw new Error('TabList must be wrapped in a Tabs component');
|
|
22
18
|
}
|
|
23
19
|
return jsx("div", {
|
|
24
20
|
className: clsx(styles.tabsListContainer, containerClassname),
|
|
25
|
-
"data-modern":
|
|
21
|
+
"data-modern": 'true' ,
|
|
26
22
|
children: jsx(TabList$1, {
|
|
27
23
|
...rest,
|
|
28
24
|
ref: ref,
|
|
29
25
|
className: clsx(variant === 'contentSwitcher' ? styles.contentSwitchTabList : styles.tabList, className),
|
|
30
|
-
"data-modern":
|
|
26
|
+
"data-modern": 'true' ,
|
|
31
27
|
store: tab
|
|
32
28
|
})
|
|
33
29
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { ProgressBar as ProgressBar$1 } from 'react-aria-components';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
6
5
|
import styles from './progress-bar.module.js';
|
|
7
6
|
|
|
@@ -13,9 +12,6 @@ function ProgressBar({
|
|
|
13
12
|
...rest
|
|
14
13
|
}) {
|
|
15
14
|
const resolvedLabelId = useUniqueId('progress-bar-label-', !labelId) || labelId;
|
|
16
|
-
const {
|
|
17
|
-
enableModernizedComponents
|
|
18
|
-
} = useBlueprintModernization();
|
|
19
15
|
return jsxs(Fragment, {
|
|
20
16
|
children: [label && jsx("div", {
|
|
21
17
|
className: "label",
|
|
@@ -26,7 +22,7 @@ function ProgressBar({
|
|
|
26
22
|
"aria-label": ariaLabel,
|
|
27
23
|
"aria-labelledby": label ? resolvedLabelId : undefined,
|
|
28
24
|
className: clsx(styles.reactAriaProgressBar, className),
|
|
29
|
-
"data-modern":
|
|
25
|
+
"data-modern": 'true' ,
|
|
30
26
|
children: ({
|
|
31
27
|
percentage
|
|
32
28
|
}) => {
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as RadixRadioGroup from '@radix-ui/react-radio-group';
|
|
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 './radio-group.module.js';
|
|
7
6
|
|
|
8
7
|
const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -17,16 +16,13 @@ const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
17
16
|
orientation,
|
|
18
17
|
...rest
|
|
19
18
|
} = props;
|
|
20
|
-
const {
|
|
21
|
-
enableModernizedComponents
|
|
22
|
-
} = useBlueprintModernization();
|
|
23
19
|
return jsx(RadixRadioGroup.Root, {
|
|
24
20
|
...rest,
|
|
25
21
|
ref: ref,
|
|
26
22
|
className: clsx([styles.root], {
|
|
27
23
|
[styles.horizontal]: orientation === 'horizontal'
|
|
28
24
|
}, className),
|
|
29
|
-
"data-modern":
|
|
25
|
+
"data-modern": 'true' ,
|
|
30
26
|
defaultValue: defaultValue,
|
|
31
27
|
loop: loop,
|
|
32
28
|
name: name,
|
|
@@ -3,7 +3,6 @@ import clsx from 'clsx';
|
|
|
3
3
|
import React__default, { useRef } from 'react';
|
|
4
4
|
import { Text } from '../text/text.js';
|
|
5
5
|
import { useRadioTilesContext } from './radio-tiles.context.js';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { useFullTextTooltip } from '../utils/useFullTextTooltip.js';
|
|
8
7
|
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
9
8
|
import styles from './radio-tiles-option.module.js';
|
|
@@ -45,16 +44,13 @@ const RadioTilesOption = function RadioTilesOption({
|
|
|
45
44
|
[styles.checked]: isSelected,
|
|
46
45
|
[styles.disabled]: isDisabled
|
|
47
46
|
}, className);
|
|
48
|
-
const {
|
|
49
|
-
enableModernizedComponents
|
|
50
|
-
} = useBlueprintModernization();
|
|
51
47
|
return (
|
|
52
48
|
// @ts-expect-error Fix this type error - DSYS-1597
|
|
53
49
|
jsx(Tooltip, {
|
|
54
50
|
...wrapperProps,
|
|
55
51
|
children: jsx("div", {
|
|
56
52
|
className: radioTileClassNames,
|
|
57
|
-
"data-modern":
|
|
53
|
+
"data-modern": 'true' ,
|
|
58
54
|
"data-target-id": dataTargetId,
|
|
59
55
|
children: jsxs("label", {
|
|
60
56
|
className: clsx({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
4
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
6
5
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
7
6
|
import { RadioTilesOption } from './radio-tiles-option.js';
|
|
@@ -28,9 +27,6 @@ const RadioTilesRoot = ({
|
|
|
28
27
|
[styles.hasColumns]: Number(columns) > 0,
|
|
29
28
|
[variant === 'compact' ? styles.compact : styles.default]: true
|
|
30
29
|
}, className);
|
|
31
|
-
const {
|
|
32
|
-
enableModernizedComponents
|
|
33
|
-
} = useBlueprintModernization();
|
|
34
30
|
const hasError = !!error && !disabled;
|
|
35
31
|
const inlineErrorId = useUniqueId('inline-error-');
|
|
36
32
|
const contextValue = useMemo(() => ({
|
|
@@ -43,7 +39,7 @@ const RadioTilesRoot = ({
|
|
|
43
39
|
value: contextValue,
|
|
44
40
|
children: jsxs("div", {
|
|
45
41
|
className: styles.container,
|
|
46
|
-
"data-modern":
|
|
42
|
+
"data-modern": 'true' ,
|
|
47
43
|
children: [jsx("div", {
|
|
48
44
|
"aria-describedby": hasError ? inlineErrorId : undefined,
|
|
49
45
|
"aria-invalid": hasError || undefined,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { Search } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import { IconCtaIcon, IconIconOnLightSecondary } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef, Children, useMemo, cloneElement } 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 { Tooltip } from '../../tooltip/tooltip.js';
|
|
10
9
|
import { switchCase } from '../../utils/switchCase.js';
|
|
@@ -30,9 +29,7 @@ const SearchInputControlled = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
30
29
|
variant,
|
|
31
30
|
...rest
|
|
32
31
|
} = props;
|
|
33
|
-
const
|
|
34
|
-
enableModernizedComponents
|
|
35
|
-
} = useBlueprintModernization();
|
|
32
|
+
const enableModernizedComponents = true;
|
|
36
33
|
const handleIEMComposition = e => {
|
|
37
34
|
if (e.nativeEvent.isComposing) {
|
|
38
35
|
e.preventDefault();
|
|
@@ -81,11 +78,11 @@ const SearchInputControlled = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
81
78
|
const CustomStartIconComponent = useMemo(() => startIcon && /*#__PURE__*/cloneElement(startIcon, {
|
|
82
79
|
className: clsx(startIcon.props?.className, styles.searchIcon, isGlobal && styles.global)
|
|
83
80
|
}), [startIcon, isGlobal]);
|
|
84
|
-
const Search$
|
|
81
|
+
const Search$1 = useMemo(() => Search , [enableModernizedComponents]);
|
|
85
82
|
return jsxs("div", {
|
|
86
83
|
className: clsx(styles.search, disabled && styles.disabled, className),
|
|
87
|
-
"data-modern":
|
|
88
|
-
children: [startIcon ? CustomStartIconComponent : jsx(Search$
|
|
84
|
+
"data-modern": 'true' ,
|
|
85
|
+
children: [startIcon ? CustomStartIconComponent : jsx(Search$1, {
|
|
89
86
|
"aria-hidden": "true",
|
|
90
87
|
className: clsx(styles.searchIcon, isGlobal && styles.global),
|
|
91
88
|
color: IconIconOnLightSecondary
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { XMark as XMark$1 } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { Search, XMark } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import { IconIconOnLightSecondary, IconCtaIcon } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef, useState, useCallback, Children } 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 { switchCase } from '../utils/switchCase.js';
|
|
10
9
|
import styles from './search.module.js';
|
|
@@ -77,9 +76,7 @@ const SearchInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
77
76
|
variant,
|
|
78
77
|
...rest
|
|
79
78
|
} = props;
|
|
80
|
-
const
|
|
81
|
-
enableModernizedComponents
|
|
82
|
-
} = useBlueprintModernization();
|
|
79
|
+
const enableModernizedComponents = true;
|
|
83
80
|
const [searchInputValue, setSearchInputValue] = useState(defaultValue);
|
|
84
81
|
const updateSearchValue = useCallback(value => {
|
|
85
82
|
setSearchInputValue(value);
|
|
@@ -104,12 +101,12 @@ const SearchInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
104
101
|
};
|
|
105
102
|
const isGlobal = variant === 'global';
|
|
106
103
|
const showActionButton = Children.count(children) > 0;
|
|
107
|
-
const Search$
|
|
104
|
+
const Search$1 = Search ;
|
|
108
105
|
const ClearIcon = useCallback(() => getClearIcon(isGlobal, enableModernizedComponents)(), [isGlobal, enableModernizedComponents]);
|
|
109
106
|
return jsxs("div", {
|
|
110
107
|
className: clsx(styles.search, disabled && styles.disabled, className),
|
|
111
|
-
"data-modern":
|
|
112
|
-
children: [jsx(Search$
|
|
108
|
+
"data-modern": 'true' ,
|
|
109
|
+
children: [jsx(Search$1, {
|
|
113
110
|
"aria-hidden": "true",
|
|
114
111
|
className: clsx(styles.searchIcon, isGlobal && styles.global),
|
|
115
112
|
color: IconIconOnLightSecondary
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { Checkmark } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import { PencilCrossed, ChevronDown } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
4
|
import { bpSize030, bpIconIconOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
5
|
import * as ScrollArea from '@radix-ui/react-scroll-area';
|
|
@@ -9,7 +9,6 @@ import { forwardRef, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
|
9
9
|
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
10
10
|
import '../blueprint-configuration-context/consts.js';
|
|
11
11
|
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
12
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
13
12
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
14
13
|
import { Text } from '../text/text.js';
|
|
15
14
|
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
@@ -59,9 +58,6 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
59
58
|
onChange: onValueChangeProp
|
|
60
59
|
});
|
|
61
60
|
const selectId = useUniqueId('select-', !id) || id || 'default-select-id';
|
|
62
|
-
const {
|
|
63
|
-
enableModernizedComponents
|
|
64
|
-
} = useBlueprintModernization();
|
|
65
61
|
const {
|
|
66
62
|
componentsWithAnimationEnabled
|
|
67
63
|
} = useBlueprintConfiguration();
|
|
@@ -108,12 +104,12 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
108
104
|
});
|
|
109
105
|
const icon = (() => {
|
|
110
106
|
if (readonly) {
|
|
111
|
-
const PencilCrossedIcon =
|
|
107
|
+
const PencilCrossedIcon = PencilCrossed ;
|
|
112
108
|
return jsx(PencilCrossedIcon, {
|
|
113
109
|
className: styles.iconPencilCrossed
|
|
114
110
|
});
|
|
115
111
|
}
|
|
116
|
-
|
|
112
|
+
{
|
|
117
113
|
return jsx(ChevronDown, {
|
|
118
114
|
className: styles.iconCaret,
|
|
119
115
|
color: bpIconIconOnLight,
|
|
@@ -121,16 +117,13 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
121
117
|
width: bpSize030
|
|
122
118
|
});
|
|
123
119
|
}
|
|
124
|
-
return jsx(Caret, {
|
|
125
|
-
className: styles.iconCaret
|
|
126
|
-
});
|
|
127
120
|
})();
|
|
128
121
|
return jsxs("div", {
|
|
129
122
|
className: clsx(styles.container, {
|
|
130
123
|
[styles.disabled]: disabled
|
|
131
124
|
}, className),
|
|
132
125
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
133
|
-
"data-modern":
|
|
126
|
+
"data-modern": 'true' ,
|
|
134
127
|
children: [jsx(Label, {
|
|
135
128
|
className: styles.label,
|
|
136
129
|
hideLabel: hideLabel
|
|
@@ -227,9 +220,6 @@ const Content = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
227
220
|
onAnimationEnd: onAnimationEndProp,
|
|
228
221
|
...contentProps
|
|
229
222
|
} = props;
|
|
230
|
-
const {
|
|
231
|
-
enableModernizedComponents
|
|
232
|
-
} = useBlueprintModernization();
|
|
233
223
|
const {
|
|
234
224
|
completeExit,
|
|
235
225
|
hasExitStyles,
|
|
@@ -248,7 +238,7 @@ const Content = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
248
238
|
className: clsx(styles.content, className),
|
|
249
239
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
250
240
|
"data-bp-exiting": hasExitStyles ? 'true' : 'false',
|
|
251
|
-
"data-modern":
|
|
241
|
+
"data-modern": 'true' ,
|
|
252
242
|
onAnimationEnd: composeEventHandlers(onAnimationEndProp, handleExitAnimationEvent, {
|
|
253
243
|
checkForDefaultPrevented: false
|
|
254
244
|
}),
|
|
@@ -1,9 +1,8 @@
|
|
|
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 { forwardRef, useMemo } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
8
7
|
import { useBreakpoint, Breakpoint } from '../utils/useBreakpoint.js';
|
|
9
8
|
import styles from './side-panel.module.js';
|
|
@@ -21,12 +20,10 @@ const SidePanelClose = /*#__PURE__*/forwardRef(({
|
|
|
21
20
|
}, forwardedRef) => {
|
|
22
21
|
const breakpoint = useBreakpoint();
|
|
23
22
|
const smallBreakpointActive = breakpoint === Breakpoint.Small;
|
|
24
|
-
const
|
|
25
|
-
enableModernizedComponents
|
|
26
|
-
} = useBlueprintModernization();
|
|
23
|
+
const enableModernizedComponents = true;
|
|
27
24
|
const finalProps = smallBreakpointActive ? smallViewportProps : {};
|
|
28
25
|
const closeIcon = useMemo(() => {
|
|
29
|
-
return
|
|
26
|
+
return XMark ;
|
|
30
27
|
}, [enableModernizedComponents]);
|
|
31
28
|
return jsx(RadixDialog.Close, {
|
|
32
29
|
ref: forwardedRef,
|
|
@@ -3,7 +3,6 @@ import * as RadixDialog from '@radix-ui/react-dialog';
|
|
|
3
3
|
import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { forwardRef, useCallback } from 'react';
|
|
6
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
6
|
import styles from './side-panel.module.js';
|
|
8
7
|
import { useVariant } from './variant-context.js';
|
|
9
8
|
|
|
@@ -25,9 +24,6 @@ const SidePanelContent = /*#__PURE__*/forwardRef(({
|
|
|
25
24
|
event.preventDefault();
|
|
26
25
|
}
|
|
27
26
|
}, [isInteractiveOverlayVariant]);
|
|
28
|
-
const {
|
|
29
|
-
enableModernizedComponents
|
|
30
|
-
} = useBlueprintModernization();
|
|
31
27
|
return jsx(FocusScope, {
|
|
32
28
|
trapped: !isInteractiveOverlayVariant,
|
|
33
29
|
children: jsx(RadixDialog.Content, {
|
|
@@ -41,7 +37,7 @@ const SidePanelContent = /*#__PURE__*/forwardRef(({
|
|
|
41
37
|
[styles.dropShadowContent]: variant === 'dropShadowOverlay',
|
|
42
38
|
[styles.overlayContent]: isOverlayVariant
|
|
43
39
|
}, className),
|
|
44
|
-
"data-modern":
|
|
40
|
+
"data-modern": 'true' ,
|
|
45
41
|
onInteractOutside: handleInteractOutside,
|
|
46
42
|
children: children
|
|
47
43
|
})
|
|
@@ -55,13 +51,10 @@ const SidePanelPersistentContent = /*#__PURE__*/forwardRef(({
|
|
|
55
51
|
className,
|
|
56
52
|
...props
|
|
57
53
|
}, forwardedRef) => {
|
|
58
|
-
const {
|
|
59
|
-
enableModernizedComponents
|
|
60
|
-
} = useBlueprintModernization();
|
|
61
54
|
return jsx("div", {
|
|
62
55
|
ref: forwardedRef,
|
|
63
56
|
className: clsx(styles.content, styles.contentNormal, styles.persistentContent, className),
|
|
64
|
-
"data-modern":
|
|
57
|
+
"data-modern": 'true' ,
|
|
65
58
|
...props,
|
|
66
59
|
children: children
|
|
67
60
|
});
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
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 './side-panel.module.js';
|
|
7
6
|
import { useVariant } from './variant-context.js';
|
|
8
7
|
|
|
@@ -17,9 +16,6 @@ const SidePanelOverlay = /*#__PURE__*/forwardRef(({
|
|
|
17
16
|
...props
|
|
18
17
|
}, forwardedRef) => {
|
|
19
18
|
const variant = useVariant();
|
|
20
|
-
const {
|
|
21
|
-
enableModernizedComponents
|
|
22
|
-
} = useBlueprintModernization();
|
|
23
19
|
return jsx(RadixDialog.Portal, {
|
|
24
20
|
container: container,
|
|
25
21
|
children: variant === 'interactiveOverlay' ? children : jsx(RadixDialog.Overlay, {
|
|
@@ -27,7 +23,7 @@ const SidePanelOverlay = /*#__PURE__*/forwardRef(({
|
|
|
27
23
|
className: clsx(styles.overlay, {
|
|
28
24
|
[styles.dropShadowOverlay]: variant === 'dropShadowOverlay'
|
|
29
25
|
}, className),
|
|
30
|
-
"data-modern":
|
|
26
|
+
"data-modern": 'true' ,
|
|
31
27
|
...props,
|
|
32
28
|
children: children
|
|
33
29
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
3
|
import { BaseGridList } from '../util-components/base-grid-list-item/base-grid-list.js';
|
|
5
4
|
|
|
6
5
|
const SmallList = /*#__PURE__*/forwardRef(function SmallList(props, forwardedRef) {
|
|
@@ -8,13 +7,10 @@ const SmallList = /*#__PURE__*/forwardRef(function SmallList(props, forwardedRef
|
|
|
8
7
|
children,
|
|
9
8
|
...rest
|
|
10
9
|
} = props;
|
|
11
|
-
const {
|
|
12
|
-
enableModernizedComponents
|
|
13
|
-
} = useBlueprintModernization();
|
|
14
10
|
return jsx(BaseGridList, {
|
|
15
11
|
...rest,
|
|
16
12
|
ref: forwardedRef,
|
|
17
|
-
"data-modern":
|
|
13
|
+
"data-modern": 'true' ,
|
|
18
14
|
layoutStyle: "small-list",
|
|
19
15
|
children: children
|
|
20
16
|
});
|