@box/blueprint-web 17.20.0 → 17.21.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/components.css +469 -950
- package/dist/lib-esm/icon-dual-state-button/icon-dual-state-button.js +5 -6
- package/dist/lib-esm/icon-dual-state-button/icon-dual-state-button.module.js +1 -1
- package/dist/lib-esm/icon-toggle-button/icon-toggle-button.d.ts +0 -1
- package/dist/lib-esm/icon-toggle-button/icon-toggle-button.js +4 -5
- package/dist/lib-esm/icon-toggle-button/icon-toggle-button.module.js +1 -1
- package/dist/lib-esm/index.css +469 -950
- package/dist/lib-esm/primitives/base-text-input/base-text-input.js +1 -3
- package/dist/lib-esm/primitives/base-text-input/base-text-input.module.js +1 -1
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.js +5 -7
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.module.js +1 -1
- package/dist/lib-esm/search-input/search-input-controlled/search-input-controlled.js +4 -12
- package/dist/lib-esm/search-input/search-input.d.ts +2 -6
- package/dist/lib-esm/search-input/search-input.js +9 -23
- package/dist/lib-esm/search-input/search.module.js +1 -1
- package/dist/lib-esm/select/select.js +9 -20
- package/dist/lib-esm/select/select.module.js +1 -1
- package/dist/lib-esm/switch/switch-item.js +0 -1
- package/dist/lib-esm/switch/switch.module.js +1 -1
- package/dist/lib-esm/text/text.module.js +1 -1
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.js +4 -9
- 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 +0 -1
- package/dist/lib-esm/text-area/text-area.module.js +1 -1
- package/dist/lib-esm/text-input/text-input.js +2 -5
- package/dist/lib-esm/text-toggle-button/text-toggle-button.js +1 -2
- package/dist/lib-esm/text-toggle-button/text-toggle-button.module.js +1 -1
- package/dist/lib-esm/util-components/text-with-info-badge/text-with-info-badge.js +2 -3
- package/dist/lib-esm/util-components/text-with-info-badge/text-with-info-badge.module.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
2
|
import { AlertCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
3
|
import { IconIconErrorOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
4
|
import clsx from 'clsx';
|
|
@@ -77,7 +76,6 @@ const BaseTextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
77
76
|
[styles.error]: shouldMarkError
|
|
78
77
|
}, className),
|
|
79
78
|
"data-bp-animated": animatedDataAttribute ?? 'false',
|
|
80
|
-
"data-modern": 'true' ,
|
|
81
79
|
children: [jsx(Label, {
|
|
82
80
|
className: clsx([styles.label], {
|
|
83
81
|
[styles.hidden]: hideLabel
|
|
@@ -115,7 +113,7 @@ const BaseTextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
115
113
|
className: clsx(styles.endIcon, styles.inlineErrorIcon),
|
|
116
114
|
children: jsx(AlertCircle, {
|
|
117
115
|
color: IconIconErrorOnLight
|
|
118
|
-
})
|
|
116
|
+
})
|
|
119
117
|
})
|
|
120
118
|
}), jsx(VisuallyHidden, {
|
|
121
119
|
id: inlineErrorId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"textInputContainerOuter":"bp_base_text_input_module_textInputContainerOuter--
|
|
2
|
+
var styles = {"textInputContainerOuter":"bp_base_text_input_module_textInputContainerOuter--eee42","label":"bp_base_text_input_module_label--eee42","hidden":"bp_base_text_input_module_hidden--eee42","textInputContainer":"bp_base_text_input_module_textInputContainer--eee42","textInput":"bp_base_text_input_module_textInput--eee42","error":"bp_base_text_input_module_error--eee42","readOnly":"bp_base_text_input_module_readOnly--eee42","endIcon":"bp_base_text_input_module_endIcon--eee42","startIcon":"bp_base_text_input_module_startIcon--eee42","inlineErrorIcon":"bp_base_text_input_module_inlineErrorIcon--eee42","disabled":"bp_base_text_input_module_disabled--eee42","inlineError":"bp_base_text_input_module_inlineError--eee42","subtext":"bp_base_text_input_module_subtext--eee42"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -71,7 +71,6 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
71
71
|
[styles.active]: isButtonActive,
|
|
72
72
|
[styles.dragging]: isButtonDragged
|
|
73
73
|
}),
|
|
74
|
-
"data-modern": 'true' ,
|
|
75
74
|
disabled: isButtonDisabled,
|
|
76
75
|
children: [variant === 'colorCircle' && jsx(ColorSwatch, {
|
|
77
76
|
color: color || '',
|
|
@@ -89,7 +88,6 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
89
88
|
[styles.withLabel]: isWithLabel,
|
|
90
89
|
[styles['withLabel--default']]: isWithLabel && props.size === 'default'
|
|
91
90
|
}),
|
|
92
|
-
"data-modern": 'true' ,
|
|
93
91
|
role: "gridcell",
|
|
94
92
|
children: [shouldShowTooltip && jsx(Tooltip, {
|
|
95
93
|
"aria-hidden": true,
|
|
@@ -138,14 +136,14 @@ const Icon = ({
|
|
|
138
136
|
})
|
|
139
137
|
});
|
|
140
138
|
};
|
|
141
|
-
const
|
|
139
|
+
const iconColor = {
|
|
142
140
|
default: bpIconIconOnLight,
|
|
143
141
|
box: BrandBoxPrimary,
|
|
144
142
|
sign: BrandSignPrimary,
|
|
145
143
|
forms: BrandFormsPrimary,
|
|
146
144
|
docgen: BrandDocgenPrimary
|
|
147
145
|
};
|
|
148
|
-
const
|
|
146
|
+
const iconSize = {
|
|
149
147
|
default: bpSize040,
|
|
150
148
|
large: bpSize050
|
|
151
149
|
};
|
|
@@ -157,9 +155,9 @@ const ItemWithLabel = ({
|
|
|
157
155
|
icon
|
|
158
156
|
}) => {
|
|
159
157
|
const iconElement = /*#__PURE__*/createElement(icon, {
|
|
160
|
-
color:
|
|
161
|
-
width:
|
|
162
|
-
height:
|
|
158
|
+
color: iconColor[colorVariant],
|
|
159
|
+
width: iconSize[size],
|
|
160
|
+
height: iconSize[size],
|
|
163
161
|
role: 'presentation'
|
|
164
162
|
});
|
|
165
163
|
return jsxs(Fragment, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"buttonWrapper":"bp_select_menu_grid_option_module_buttonWrapper--
|
|
2
|
+
var styles = {"buttonWrapper":"bp_select_menu_grid_option_module_buttonWrapper--84a39","withLabel":"bp_select_menu_grid_option_module_withLabel--84a39","withLabel--default":"bp_select_menu_grid_option_module_withLabel--default--84a39","optionButton":"bp_select_menu_grid_option_module_optionButton--84a39","labeled":"bp_select_menu_grid_option_module_labeled--84a39","labelContent":"bp_select_menu_grid_option_module_labelContent--84a39","labelContent--withDescription":"bp_select_menu_grid_option_module_labelContent--withDescription--84a39","text":"bp_select_menu_grid_option_module_text--84a39","text--large":"bp_select_menu_grid_option_module_text--large--84a39","text--default":"bp_select_menu_grid_option_module_text--default--84a39","description":"bp_select_menu_grid_option_module_description--84a39","iconContainer":"bp_select_menu_grid_option_module_iconContainer--84a39","iconContainer--size-default":"bp_select_menu_grid_option_module_iconContainer--size-default--84a39","iconContainer--size-large":"bp_select_menu_grid_option_module_iconContainer--size-large--84a39","iconContainer--default":"bp_select_menu_grid_option_module_iconContainer--default--84a39","iconContainer--box":"bp_select_menu_grid_option_module_iconContainer--box--84a39","iconContainer--docgen":"bp_select_menu_grid_option_module_iconContainer--docgen--84a39","iconContainer--forms":"bp_select_menu_grid_option_module_iconContainer--forms--84a39","iconContainer--sign":"bp_select_menu_grid_option_module_iconContainer--sign--84a39","active":"bp_select_menu_grid_option_module_active--84a39","dragging":"bp_select_menu_grid_option_module_dragging--84a39","labeled--large":"bp_select_menu_grid_option_module_labeled--large--84a39","disabled":"bp_select_menu_grid_option_module_disabled--84a39","square":"bp_select_menu_grid_option_module_square--84a39","outlineHost":"bp_select_menu_grid_option_module_outlineHost--84a39","circle":"bp_select_menu_grid_option_module_circle--84a39","loading":"bp_select_menu_grid_option_module_loading--84a39","color":"bp_select_menu_grid_option_module_color--84a39","strikeThrough":"bp_select_menu_grid_option_module_strikeThrough--84a39"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '@box/blueprint-web-assets/icons/Fill';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { Search } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
3
|
import { IconCtaIcon, IconIconOnLightSecondary } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
4
|
import clsx from 'clsx';
|
|
@@ -29,7 +28,6 @@ const SearchInputControlled = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
29
28
|
variant,
|
|
30
29
|
...rest
|
|
31
30
|
} = props;
|
|
32
|
-
const enableModernizedComponents = true;
|
|
33
31
|
const handleIEMComposition = e => {
|
|
34
32
|
if (e.nativeEvent.isComposing) {
|
|
35
33
|
e.preventDefault();
|
|
@@ -67,22 +65,16 @@ const SearchInputControlled = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
67
65
|
'aria-label': searchInputClearAriaLabel,
|
|
68
66
|
className: clsx(styles.clearSearchIcon, isGlobal && styles.global, isGlobal && !showActionButton && styles.withoutActionButton),
|
|
69
67
|
color: IconCtaIcon,
|
|
70
|
-
icon: isGlobal ?
|
|
71
|
-
enableModernizedComponents: enableModernizedComponents
|
|
72
|
-
}) : () => jsx(AccessibleXMark, {
|
|
73
|
-
enableModernizedComponents: enableModernizedComponents
|
|
74
|
-
}),
|
|
68
|
+
icon: isGlobal ? AccessibleXMarkGlobal : AccessibleXMark,
|
|
75
69
|
onClick: onClearInput,
|
|
76
70
|
size: 'x-small'
|
|
77
|
-
}), [isGlobal, onClearInput, searchInputClearAriaLabel, showActionButton
|
|
71
|
+
}), [isGlobal, onClearInput, searchInputClearAriaLabel, showActionButton]);
|
|
78
72
|
const CustomStartIconComponent = useMemo(() => startIcon && /*#__PURE__*/cloneElement(startIcon, {
|
|
79
73
|
className: clsx(startIcon.props?.className, styles.searchIcon, isGlobal && styles.global)
|
|
80
74
|
}), [startIcon, isGlobal]);
|
|
81
|
-
const Search$1 = useMemo(() => Search , [enableModernizedComponents]);
|
|
82
75
|
return jsxs("div", {
|
|
83
76
|
className: clsx(styles.search, disabled && styles.disabled, className),
|
|
84
|
-
|
|
85
|
-
children: [startIcon ? CustomStartIconComponent : jsx(Search$1, {
|
|
77
|
+
children: [startIcon ? CustomStartIconComponent : jsx(Search, {
|
|
86
78
|
"aria-hidden": "true",
|
|
87
79
|
className: clsx(styles.searchIcon, isGlobal && styles.global),
|
|
88
80
|
color: IconIconOnLightSecondary
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { type SearchInputProps } from './types';
|
|
2
|
-
export declare const AccessibleXMark: (
|
|
3
|
-
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const AccessibleXMarkGlobal: ({ enableModernizedComponents }: {
|
|
6
|
-
enableModernizedComponents: boolean;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccessibleXMark: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const AccessibleXMarkGlobal: () => import("react/jsx-runtime").JSX.Element;
|
|
8
4
|
/**
|
|
9
5
|
* @deprecated This uncontrolled version of SearchInput is deprecated.
|
|
10
6
|
* Currently, we have two SearchInput components: SearchInput and SearchInput.Controlled. In the future, both will be deprecated and replaced
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { XMark as XMark$1 } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
2
|
import { Search, XMark } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
3
|
import { IconIconOnLightSecondary, IconCtaIcon } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
4
|
import clsx from 'clsx';
|
|
@@ -8,33 +7,23 @@ import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
|
8
7
|
import { switchCase } from '../utils/switchCase.js';
|
|
9
8
|
import styles from './search.module.js';
|
|
10
9
|
|
|
11
|
-
const AccessibleXMark = ({
|
|
12
|
-
|
|
13
|
-
}) => {
|
|
14
|
-
const XMark$2 = enableModernizedComponents ? XMark : XMark$1;
|
|
15
|
-
return jsx(XMark$2, {
|
|
10
|
+
const AccessibleXMark = () => {
|
|
11
|
+
return jsx(XMark, {
|
|
16
12
|
role: "presentation"
|
|
17
13
|
});
|
|
18
14
|
};
|
|
19
|
-
const AccessibleXMarkGlobal = ({
|
|
20
|
-
|
|
21
|
-
}) => {
|
|
22
|
-
const XMark$2 = enableModernizedComponents ? XMark : XMark$1;
|
|
23
|
-
return jsx(XMark$2, {
|
|
15
|
+
const AccessibleXMarkGlobal = () => {
|
|
16
|
+
return jsx(XMark, {
|
|
24
17
|
height: "1.25rem",
|
|
25
18
|
role: "presentation",
|
|
26
19
|
width: "1.25rem"
|
|
27
20
|
});
|
|
28
21
|
};
|
|
29
|
-
const getClearIcon =
|
|
22
|
+
const getClearIcon = isGlobal => {
|
|
30
23
|
if (isGlobal) {
|
|
31
|
-
return
|
|
32
|
-
enableModernizedComponents: enableModernizedComponents
|
|
33
|
-
});
|
|
24
|
+
return AccessibleXMarkGlobal;
|
|
34
25
|
}
|
|
35
|
-
return
|
|
36
|
-
enableModernizedComponents: enableModernizedComponents
|
|
37
|
-
});
|
|
26
|
+
return AccessibleXMark;
|
|
38
27
|
};
|
|
39
28
|
const handleEnterKey = (event, searchValue, onSubmit) => {
|
|
40
29
|
event.preventDefault();
|
|
@@ -76,7 +65,6 @@ const SearchInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
76
65
|
variant,
|
|
77
66
|
...rest
|
|
78
67
|
} = props;
|
|
79
|
-
const enableModernizedComponents = true;
|
|
80
68
|
const [searchInputValue, setSearchInputValue] = useState(defaultValue);
|
|
81
69
|
const updateSearchValue = useCallback(value => {
|
|
82
70
|
setSearchInputValue(value);
|
|
@@ -101,12 +89,10 @@ const SearchInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
101
89
|
};
|
|
102
90
|
const isGlobal = variant === 'global';
|
|
103
91
|
const showActionButton = Children.count(children) > 0;
|
|
104
|
-
const
|
|
105
|
-
const ClearIcon = useCallback(() => getClearIcon(isGlobal, enableModernizedComponents)(), [isGlobal, enableModernizedComponents]);
|
|
92
|
+
const ClearIcon = useCallback(() => getClearIcon(isGlobal)(), [isGlobal]);
|
|
106
93
|
return jsxs("div", {
|
|
107
94
|
className: clsx(styles.search, disabled && styles.disabled, className),
|
|
108
|
-
|
|
109
|
-
children: [jsx(Search$1, {
|
|
95
|
+
children: [jsx(Search, {
|
|
110
96
|
"aria-hidden": "true",
|
|
111
97
|
className: clsx(styles.searchIcon, isGlobal && styles.global),
|
|
112
98
|
color: IconIconOnLightSecondary
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"search":"bp_search_module_search--
|
|
2
|
+
var styles = {"search":"bp_search_module_search--371c1","disabled":"bp_search_module_disabled--371c1","searchIcon":"bp_search_module_searchIcon--371c1","global":"bp_search_module_global--371c1","searchInput":"bp_search_module_searchInput--371c1","withoutActionButton":"bp_search_module_withoutActionButton--371c1","withActionButton":"bp_search_module_withActionButton--371c1","clearSearchIcon":"bp_search_module_clearSearchIcon--371c1","actionButton":"bp_search_module_actionButton--371c1"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { Checkmark } from '@box/blueprint-web-assets/icons/
|
|
3
|
-
import { PencilCrossed, ChevronDown } from '@box/blueprint-web-assets/icons/Medium';
|
|
2
|
+
import { PencilCrossed, ChevronDown, Checkmark } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
3
|
import { bpSize030, bpIconIconOnLight } from '@box/blueprint-web-assets/tokens/tokens';
|
|
5
4
|
import * as ScrollArea from '@radix-ui/react-scroll-area';
|
|
6
5
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -106,28 +105,19 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
106
105
|
const ariaDescribedBy = clsx(triggerProps['aria-describedby'], {
|
|
107
106
|
[inlineErrorId]: hasError
|
|
108
107
|
});
|
|
109
|
-
const icon = (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return jsx(ChevronDown, {
|
|
118
|
-
className: styles.iconCaret,
|
|
119
|
-
color: bpIconIconOnLight,
|
|
120
|
-
height: bpSize030,
|
|
121
|
-
width: bpSize030
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
})();
|
|
108
|
+
const icon = readonly ? jsx(PencilCrossed, {
|
|
109
|
+
className: styles.iconPencilCrossed
|
|
110
|
+
}) : jsx(ChevronDown, {
|
|
111
|
+
className: styles.iconCaret,
|
|
112
|
+
color: bpIconIconOnLight,
|
|
113
|
+
height: bpSize030,
|
|
114
|
+
width: bpSize030
|
|
115
|
+
});
|
|
125
116
|
return jsxs("div", {
|
|
126
117
|
className: clsx(styles.container, {
|
|
127
118
|
[styles.disabled]: disabled
|
|
128
119
|
}, className),
|
|
129
120
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
130
|
-
"data-modern": 'true' ,
|
|
131
121
|
children: [shouldShowInfoBadge ? jsx(TextWithInfoBadge, {
|
|
132
122
|
infoBadgeAriaLabel: labelInfoBadgeAriaLabel,
|
|
133
123
|
infoText: labelInfoText,
|
|
@@ -249,7 +239,6 @@ const Content = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
249
239
|
className: clsx(styles.content, className),
|
|
250
240
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
251
241
|
"data-bp-exiting": hasExitStyles ? 'true' : 'false',
|
|
252
|
-
"data-modern": 'true' ,
|
|
253
242
|
onAnimationEnd: composeEventHandlers(onAnimationEndProp, handleExitAnimationEvent, {
|
|
254
243
|
checkForDefaultPrevented: false
|
|
255
244
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"
|
|
2
|
+
var styles = {"ellipsis":"bp_select_module_ellipsis--b5f00","container":"bp_select_module_container--b5f00","disabled":"bp_select_module_disabled--b5f00","label":"bp_select_module_label--b5f00","triggerBtn":"bp_select_module_triggerBtn--b5f00","triggerValue":"bp_select_module_triggerValue--b5f00","triggerLeftElement":"bp_select_module_triggerLeftElement--b5f00","readonly":"bp_select_module_readonly--b5f00","error":"bp_select_module_error--b5f00","iconWrapper":"bp_select_module_iconWrapper--b5f00","iconCaret":"bp_select_module_iconCaret--b5f00","iconPencilCrossed":"bp_select_module_iconPencilCrossed--b5f00","content":"bp_select_module_content--b5f00","viewport":"bp_select_module_viewport--b5f00","option":"bp_select_module_option--b5f00","secondaryText":"bp_select_module_secondaryText--b5f00","textWrapper":"bp_select_module_textWrapper--b5f00","leftElement":"bp_select_module_leftElement--b5f00","hasLeftElement":"bp_select_module_hasLeftElement--b5f00","indicator":"bp_select_module_indicator--b5f00","separator":"bp_select_module_separator--b5f00","withTruncatedText":"bp_select_module_withTruncatedText--b5f00"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -37,7 +37,6 @@ const Switch = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
37
37
|
className: clsx([styles.option], {
|
|
38
38
|
[styles.disabled]: disabled
|
|
39
39
|
}, className),
|
|
40
|
-
"data-modern": 'true' ,
|
|
41
40
|
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
42
41
|
children: [jsxs("label", {
|
|
43
42
|
className: clsx(styles.label, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"option":"bp_switch_module_option--
|
|
2
|
+
var styles = {"option":"bp_switch_module_option--8afb1","label":"bp_switch_module_label--8afb1","rightAlign":"bp_switch_module_rightAlign--8afb1","switch":"bp_switch_module_switch--8afb1","description":"bp_switch_module_description--8afb1","thumb":"bp_switch_module_thumb--8afb1"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"textReset":"bp_text_module_textReset--
|
|
2
|
+
var styles = {"textReset":"bp_text_module_textReset--82800","breakWord":"bp_text_module_breakWord--82800","textOnLightDefault":"bp_text_module_textOnLightDefault--82800","textOnLightSecondary":"bp_text_module_textOnLightSecondary--82800","textOnLightLink":"bp_text_module_textOnLightLink--82800","textOnLightError":"bp_text_module_textOnLightError--82800","textOnDarkDefault":"bp_text_module_textOnDarkDefault--82800","titleMondo":"bp_text_module_titleMondo--82800","titleXLarge":"bp_text_module_titleXLarge--82800","titleLarge":"bp_text_module_titleLarge--82800","titleMedium":"bp_text_module_titleMedium--82800","titleSmall":"bp_text_module_titleSmall--82800","subtitle":"bp_text_module_subtitle--82800","bodyLargeBold":"bp_text_module_bodyLargeBold--82800","bodyLarge":"bp_text_module_bodyLarge--82800","bodyDefaultBold":"bp_text_module_bodyDefaultBold--82800","bodyDefaultSemibold":"bp_text_module_bodyDefaultSemibold--82800","bodyDefault":"bp_text_module_bodyDefault--82800","bodySmallSemibold":"bp_text_module_bodySmallSemibold--82800","bodySmall":"bp_text_module_bodySmall--82800","captionBold":"bp_text_module_captionBold--82800","caption":"bp_text_module_caption--82800","labelBold":"bp_text_module_labelBold--82800","label":"bp_text_module_label--82800","linkDefault":"bp_text_module_linkDefault--82800","notificationDefault":"bp_text_module_notificationDefault--82800","metricLarge":"bp_text_module_metricLarge--82800","metricMedium":"bp_text_module_metricMedium--82800","metricSmall":"bp_text_module_metricSmall--82800"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -61,7 +61,6 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
61
61
|
'data-bp-animated': animatedDataAttribute,
|
|
62
62
|
...rest
|
|
63
63
|
} = props;
|
|
64
|
-
const enableModernizedComponents = true;
|
|
65
64
|
const {
|
|
66
65
|
current: isControlled
|
|
67
66
|
} = useRef(value != null);
|
|
@@ -233,10 +232,9 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
233
232
|
setIsScrollbarVisible(getScrollbarWidth() > 0);
|
|
234
233
|
}, []);
|
|
235
234
|
const classNames = clsx([styles.textArea], {
|
|
236
|
-
[styles.error]: hasError
|
|
237
|
-
[styles.loading]: isLoading && !enableModernizedComponents
|
|
235
|
+
[styles.error]: hasError
|
|
238
236
|
});
|
|
239
|
-
const shouldCompensateScrollbar = !state.overflow && !isScrollbarVisible &&
|
|
237
|
+
const shouldCompensateScrollbar = !state.overflow && !isScrollbarVisible && hasError;
|
|
240
238
|
const endIcon = useMemo(() => {
|
|
241
239
|
if (isLoading) {
|
|
242
240
|
return jsx("div", {
|
|
@@ -254,7 +252,7 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
254
252
|
});
|
|
255
253
|
}
|
|
256
254
|
return null;
|
|
257
|
-
}, [
|
|
255
|
+
}, [isLoading, loadingAriaLabel, readOnly, focusTextArea]);
|
|
258
256
|
const endIconComponent = useMemo(() => endIcon && /*#__PURE__*/cloneElement(endIcon, {
|
|
259
257
|
ref: node => {
|
|
260
258
|
if (node) {
|
|
@@ -266,7 +264,6 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
266
264
|
return jsxs("div", {
|
|
267
265
|
className: clsx(styles.border, hasError && styles.hasError, readOnly && styles.readOnly, rest.disabled && styles.disabled),
|
|
268
266
|
"data-bp-animated": animatedDataAttribute,
|
|
269
|
-
"data-modern": 'true' ,
|
|
270
267
|
style: {
|
|
271
268
|
'--end-icon-width': endIconWidth ? `${endIconWidth}px` : '0px'
|
|
272
269
|
},
|
|
@@ -276,7 +273,6 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
276
273
|
className: clsx(classNames, {
|
|
277
274
|
[styles.withEndIcon]: !!endIconComponent
|
|
278
275
|
}, readOnly && styles.readOnly),
|
|
279
|
-
"data-modern": 'true' ,
|
|
280
276
|
onBlur: onBlur,
|
|
281
277
|
onChange: handleChange,
|
|
282
278
|
onFocus: onFocus,
|
|
@@ -298,7 +294,6 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
298
294
|
ref: shadowRef,
|
|
299
295
|
"aria-hidden": true,
|
|
300
296
|
className: classNames,
|
|
301
|
-
"data-modern": 'true' ,
|
|
302
297
|
readOnly: true,
|
|
303
298
|
style: {
|
|
304
299
|
...hiddenTextAreaStyle.shadow,
|
|
@@ -306,7 +301,7 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
306
301
|
padding: 0
|
|
307
302
|
},
|
|
308
303
|
tabIndex: -1
|
|
309
|
-
}),
|
|
304
|
+
}), endIconComponent && jsx("div", {
|
|
310
305
|
className: styles.endIconWrap,
|
|
311
306
|
children: endIconComponent
|
|
312
307
|
})]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"textArea":"bp_text_area_autosize_module_textArea--
|
|
2
|
+
var styles = {"textArea":"bp_text_area_autosize_module_textArea--341d4","withEndIcon":"bp_text_area_autosize_module_withEndIcon--341d4","error":"bp_text_area_autosize_module_error--341d4","readOnly":"bp_text_area_autosize_module_readOnly--341d4","loadingIndicatorReset":"bp_text_area_autosize_module_loadingIndicatorReset--341d4","border":"bp_text_area_autosize_module_border--341d4","hasError":"bp_text_area_autosize_module_hasError--341d4","disabled":"bp_text_area_autosize_module_disabled--341d4","endIconWrap":"bp_text_area_autosize_module_endIconWrap--341d4","endIcon":"bp_text_area_autosize_module_endIcon--341d4"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -39,7 +39,6 @@ const TextArea = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
39
39
|
[styles.disabled]: disabled,
|
|
40
40
|
[styles.error]: hasError
|
|
41
41
|
}, className),
|
|
42
|
-
"data-modern": 'true' ,
|
|
43
42
|
children: [jsx(Label, {
|
|
44
43
|
className: clsx([styles.label], {
|
|
45
44
|
[styles.hidden]: hideLabel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"textAreaContainer":"bp_text_area_module_textAreaContainer--
|
|
2
|
+
var styles = {"textAreaContainer":"bp_text_area_module_textAreaContainer--a6410","label":"bp_text_area_module_label--a6410","hidden":"bp_text_area_module_hidden--a6410","disabled":"bp_text_area_module_disabled--a6410","inlineError":"bp_text_area_module_inlineError--a6410"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import '@box/blueprint-web-assets/icons/Fill';
|
|
3
2
|
import { PencilCrossed } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { forwardRef, useRef, useCallback, useMemo, cloneElement } from 'react';
|
|
@@ -20,7 +19,6 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
20
19
|
loadingAriaLabel,
|
|
21
20
|
...rest
|
|
22
21
|
} = props;
|
|
23
|
-
const enableModernizedComponents = true;
|
|
24
22
|
const {
|
|
25
23
|
componentsWithAnimationEnabled
|
|
26
24
|
} = useBlueprintConfiguration();
|
|
@@ -46,14 +44,13 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
46
44
|
});
|
|
47
45
|
}
|
|
48
46
|
if (readOnly) {
|
|
49
|
-
|
|
50
|
-
return jsx(PencilCrossedIcon, {
|
|
47
|
+
return jsx(PencilCrossed, {
|
|
51
48
|
onClick: focusInput,
|
|
52
49
|
role: "presentation"
|
|
53
50
|
});
|
|
54
51
|
}
|
|
55
52
|
return null;
|
|
56
|
-
}, [isLoading, endIcon, readOnly, loadingAriaLabel, focusInput
|
|
53
|
+
}, [isLoading, endIcon, readOnly, loadingAriaLabel, focusInput]);
|
|
57
54
|
const startIconLocal = useMemo(() => {
|
|
58
55
|
if (startIcon) {
|
|
59
56
|
return /*#__PURE__*/cloneElement(startIcon, {
|
|
@@ -11,8 +11,7 @@ const TextToggleButton = /*#__PURE__*/forwardRef(({
|
|
|
11
11
|
return jsx(BaseToggleButton, {
|
|
12
12
|
...rest,
|
|
13
13
|
ref: ref,
|
|
14
|
-
className: clsx(styles.textToggleButton, className)
|
|
15
|
-
"data-modern": 'true'
|
|
14
|
+
className: clsx(styles.textToggleButton, className)
|
|
16
15
|
});
|
|
17
16
|
});
|
|
18
17
|
TextToggleButton.displayName = 'TextToggleButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { InformationCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { Tooltip } from '../../tooltip/tooltip.js';
|
|
5
5
|
import { InteractiveIcon } from '../interactive-icon/interactive-icon.js';
|
|
@@ -17,7 +17,6 @@ const TextWithInfoBadge = props => {
|
|
|
17
17
|
} = props;
|
|
18
18
|
return jsxs("div", {
|
|
19
19
|
className: clsx(styles.text, styles[variant], className),
|
|
20
|
-
"data-modern": 'true' ,
|
|
21
20
|
id: id,
|
|
22
21
|
children: [children, infoText && infoBadgeAriaLabel && jsx("span", {
|
|
23
22
|
className: styles.badgeContainer,
|
|
@@ -27,7 +26,7 @@ const TextWithInfoBadge = props => {
|
|
|
27
26
|
children: jsx(InteractiveIcon, {
|
|
28
27
|
"aria-label": infoBadgeAriaLabel,
|
|
29
28
|
className: styles.badge,
|
|
30
|
-
icon:
|
|
29
|
+
icon: InformationCircle
|
|
31
30
|
})
|
|
32
31
|
})
|
|
33
32
|
})]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"text":"bp_text_with_info_badge_module_text--
|
|
2
|
+
var styles = {"text":"bp_text_with_info_badge_module_text--40bc4","muted":"bp_text_with_info_badge_module_muted--40bc4","badgeContainer":"bp_text_with_info_badge_module_badgeContainer--40bc4","badge":"bp_text_with_info_badge_module_badge--40bc4"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@ariakit/react": "0.4.21",
|
|
57
57
|
"@ariakit/react-core": "0.4.21",
|
|
58
|
-
"@box/blueprint-web-assets": "^5.11.
|
|
58
|
+
"@box/blueprint-web-assets": "^5.11.8",
|
|
59
59
|
"@internationalized/date": "^3.12.0",
|
|
60
60
|
"@radix-ui/react-accordion": "1.1.2",
|
|
61
61
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@box/box-test-client": "^3.2.7",
|
|
88
88
|
"@box/playwright-utils": "^2.8.5",
|
|
89
|
-
"@box/storybook-utils": "^1.4.
|
|
89
|
+
"@box/storybook-utils": "^1.4.3",
|
|
90
90
|
"@figma/code-connect": "1.4.4",
|
|
91
91
|
"@playwright/test": "1.46.1",
|
|
92
92
|
"@types/js-yaml": "^4.0.9",
|