@box/blueprint-web 16.18.3 → 16.19.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/blueprint-configuration-context/consts.d.ts +1 -1
- package/dist/lib-esm/blueprint-configuration-context/consts.js +1 -1
- package/dist/lib-esm/components.css +234 -204
- package/dist/lib-esm/index.css +234 -204
- package/dist/lib-esm/navigation-menu/navigation-menu-item.js +6 -0
- package/dist/lib-esm/primitives/context-menu/context-menu-item.js +8 -0
- package/dist/lib-esm/primitives/context-menu/context-menu-sub-menu-trigger.js +8 -0
- package/dist/lib-esm/primitives/context-menu/context-menu.module.js +1 -1
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-checkbox-item.js +8 -0
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-item.js +10 -0
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-radio-select-item.js +8 -0
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-trigger.js +8 -0
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu.module.js +1 -1
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.js +2 -0
- 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 +8 -0
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { forwardRef, useRef, useCallback } from 'react';
|
|
3
|
+
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
3
4
|
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
4
5
|
import { NavigationMenuLink } from './navigation-menu-link.js';
|
|
5
6
|
|
|
@@ -17,6 +18,10 @@ const NavigationMenuItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
17
18
|
children,
|
|
18
19
|
...rest
|
|
19
20
|
} = props;
|
|
21
|
+
const {
|
|
22
|
+
componentsWithAnimationEnabled
|
|
23
|
+
} = useBlueprintConfiguration();
|
|
24
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('NavigationMenuItem');
|
|
20
25
|
const linkRef = useRef();
|
|
21
26
|
const openLinkOnSelect = useCallback(event => {
|
|
22
27
|
event.preventDefault();
|
|
@@ -25,6 +30,7 @@ const NavigationMenuItem = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
25
30
|
return jsx(DropdownMenu.Item, {
|
|
26
31
|
...rest,
|
|
27
32
|
ref: forwardedRef,
|
|
33
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
28
34
|
onSelect: openLinkOnSelect,
|
|
29
35
|
children: React__default.Children.map(children, (child, index) => {
|
|
30
36
|
if (index > 0) {
|
|
@@ -3,6 +3,9 @@ import { Size4, bpIconIconOnLightSecondary, IconIconOnLightSecondary } from '@bo
|
|
|
3
3
|
import * as ContextMenuPrimitve from '@radix-ui/react-context-menu';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useCallback, createElement } from 'react';
|
|
6
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
8
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
6
9
|
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
10
|
import { MenuItemSideContent, MenuItemMainContent } from '../../util-components/menu-item-sections/menu-item-sections.js';
|
|
8
11
|
import styles from './context-menu.module.js';
|
|
@@ -13,10 +16,15 @@ const MenuItemRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
13
16
|
className,
|
|
14
17
|
...rest
|
|
15
18
|
} = props;
|
|
19
|
+
const {
|
|
20
|
+
componentsWithAnimationEnabled
|
|
21
|
+
} = useBlueprintConfiguration();
|
|
22
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('ContextMenuItem');
|
|
16
23
|
const preventDefault = useCallback(event => event.preventDefault(), []);
|
|
17
24
|
return jsx(ContextMenuPrimitve.Item, {
|
|
18
25
|
...rest,
|
|
19
26
|
ref: forwardedRef,
|
|
27
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
20
28
|
className: clsx(styles.menuItem, className),
|
|
21
29
|
// If click starts at trigger button, and ends on the item, it should not trigger the item.
|
|
22
30
|
// Note: this also has a side effect of not allowing to start click and end on a different time.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { SubTrigger } from '@radix-ui/react-context-menu';
|
|
3
3
|
import { forwardRef, useCallback } from 'react';
|
|
4
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
5
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
6
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
4
7
|
import { MenuItemMainContent, MenuItemSideContent } from '../../util-components/menu-item-sections/menu-item-sections.js';
|
|
5
8
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
6
9
|
import { useFullScreenContextMenu } from '../menu-utils/responsiveness/FullScreenContextMenuContext.js';
|
|
@@ -11,6 +14,10 @@ const ContextMenuSubTriggerRoot = /*#__PURE__*/forwardRef((props, forwardedRef)
|
|
|
11
14
|
children,
|
|
12
15
|
...rest
|
|
13
16
|
} = props;
|
|
17
|
+
const {
|
|
18
|
+
componentsWithAnimationEnabled
|
|
19
|
+
} = useBlueprintConfiguration();
|
|
20
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('ContextMenuItem');
|
|
14
21
|
const {
|
|
15
22
|
isMenuFullScreenEnabled
|
|
16
23
|
} = useFullScreenContextMenu();
|
|
@@ -22,6 +29,7 @@ const ContextMenuSubTriggerRoot = /*#__PURE__*/forwardRef((props, forwardedRef)
|
|
|
22
29
|
return jsx(SubTrigger, {
|
|
23
30
|
...rest,
|
|
24
31
|
ref: forwardedRef,
|
|
32
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
25
33
|
className: styles.menuItem,
|
|
26
34
|
onPointerMove: composeEventHandlers(props.onPointerMove, handleOnPointerMove),
|
|
27
35
|
children: children
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--
|
|
2
|
+
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--76640","menuHeader":"bp_context_menu_module_menuHeader--76640","fullScreenContent":"bp_context_menu_module_fullScreenContent--76640","menuItemsSeparator":"bp_context_menu_module_menuItemsSeparator--76640","menuItem":"bp_context_menu_module_menuItem--76640","startElement":"bp_context_menu_module_startElement--76640","endElement":"bp_context_menu_module_endElement--76640","headerTextContent":"bp_context_menu_module_headerTextContent--76640","submenuCloseButton":"bp_context_menu_module_submenuCloseButton--76640","menuCloseButton":"bp_context_menu_module_menuCloseButton--76640","ellipsis":"bp_context_menu_module_ellipsis--76640"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -5,6 +5,9 @@ import { Size5, Size4, bpIconIconOnLight, Gray100 } from '@box/blueprint-web-ass
|
|
|
5
5
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef, useCallback } from 'react';
|
|
8
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
9
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
10
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
8
11
|
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
9
12
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
10
13
|
import styles from './dropdown-menu.module.js';
|
|
@@ -27,6 +30,10 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
|
|
|
27
30
|
enableModernizedComponents
|
|
28
31
|
} = useBlueprintModernization();
|
|
29
32
|
const preventDefault = useCallback(event => event.preventDefault(), []);
|
|
33
|
+
const {
|
|
34
|
+
componentsWithAnimationEnabled
|
|
35
|
+
} = useBlueprintConfiguration();
|
|
36
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('DropdownMenuItem');
|
|
30
37
|
const isSizeSmall = internalSize === 'small';
|
|
31
38
|
const checkmarkSize = enableModernizedComponents ? Size5 : Size4;
|
|
32
39
|
const Checkmark$2 = enableModernizedComponents ? Checkmark : Checkmark$1;
|
|
@@ -34,6 +41,7 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
|
|
|
34
41
|
return jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
35
42
|
...rest,
|
|
36
43
|
ref: forwardedRef,
|
|
44
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
37
45
|
className: clsx(styles.item, styles.checkboxItem, className),
|
|
38
46
|
// If click starts at trigger button, and ends on the item, it should not trigger the item.
|
|
39
47
|
// Note: this also has a side effect of not allowing to start click and end on a different time.
|
|
@@ -3,6 +3,9 @@ import { Size8, Size4, bpTextTextDestructiveOnLight, TextTextDestructiveOnLight,
|
|
|
3
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { forwardRef, useCallback, useContext, createElement, createContext } from 'react';
|
|
6
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
8
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
6
9
|
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
10
|
import { Text } from '../../text/text.js';
|
|
8
11
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
@@ -18,11 +21,17 @@ const DropdownMenuItemBase = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
18
21
|
children,
|
|
19
22
|
className,
|
|
20
23
|
variant,
|
|
24
|
+
// We need to access the data-bp-animated attribute from the props to handle animation of navigation menu item, but this is an internal API and should not be public.
|
|
25
|
+
'data-bp-animated': animatedDataAttribute,
|
|
21
26
|
...rest
|
|
22
27
|
} = props;
|
|
23
28
|
const {
|
|
24
29
|
internalSize
|
|
25
30
|
} = useMenuItemVariant();
|
|
31
|
+
const {
|
|
32
|
+
componentsWithAnimationEnabled
|
|
33
|
+
} = useBlueprintConfiguration();
|
|
34
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('DropdownMenuItem');
|
|
26
35
|
const sizeStyles = internalSize === 'small' ? styles.itemOverflow : styles.mediumItemLayout;
|
|
27
36
|
const preventDefault = useCallback(event => event.preventDefault(), []);
|
|
28
37
|
return jsx(ItemVariantContext.Provider, {
|
|
@@ -30,6 +39,7 @@ const DropdownMenuItemBase = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
30
39
|
children: jsx(DropdownMenuPrimitive.Item, {
|
|
31
40
|
...rest,
|
|
32
41
|
ref: forwardedRef,
|
|
42
|
+
"data-bp-animated": animatedDataAttribute ?? (isAnimationEnabled ? 'true' : 'false'),
|
|
33
43
|
className: clsx(styles.item, sizeStyles, {
|
|
34
44
|
[styles.destructive]: variant === 'destructive'
|
|
35
45
|
}, className),
|
|
@@ -5,6 +5,9 @@ import { Size5, Size4, bpIconIconOnLight, Gray100 } from '@box/blueprint-web-ass
|
|
|
5
5
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef, useCallback } from 'react';
|
|
8
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
9
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
10
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
8
11
|
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
9
12
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
10
13
|
import styles from './dropdown-menu.module.js';
|
|
@@ -27,6 +30,10 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
|
|
|
27
30
|
enableModernizedComponents
|
|
28
31
|
} = useBlueprintModernization();
|
|
29
32
|
const preventDefault = useCallback(event => event.preventDefault(), []);
|
|
33
|
+
const {
|
|
34
|
+
componentsWithAnimationEnabled
|
|
35
|
+
} = useBlueprintConfiguration();
|
|
36
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('DropdownMenuItem');
|
|
30
37
|
const isSizeSmall = internalSize === 'small';
|
|
31
38
|
const checkmarkSize = enableModernizedComponents ? Size5 : Size4;
|
|
32
39
|
const Checkmark$2 = enableModernizedComponents ? Checkmark : Checkmark$1;
|
|
@@ -34,6 +41,7 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
|
|
|
34
41
|
return jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
35
42
|
...rest,
|
|
36
43
|
ref: forwardedRef,
|
|
44
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
37
45
|
className: clsx(styles.item, styles.radioItem),
|
|
38
46
|
value: value,
|
|
39
47
|
// If click starts at trigger button, and ends on the item, it should not trigger the item.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import { forwardRef, useCallback } from 'react';
|
|
4
|
+
import '../../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
5
|
+
import '../../blueprint-configuration-context/consts.js';
|
|
6
|
+
import { useBlueprintConfiguration } from '../../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
4
7
|
import { MenuItemMainContent, MenuItemSideContent } from '../../util-components/menu-item-sections/menu-item-sections.js';
|
|
5
8
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
6
9
|
import { useFullScreenDropdownMenu } from '../menu-utils/responsiveness/FullScreenDropdownMenuContext.js';
|
|
@@ -11,6 +14,10 @@ const DropdownMenuSubMenuTriggerRoot = /*#__PURE__*/forwardRef((props, forwarded
|
|
|
11
14
|
children,
|
|
12
15
|
...rest
|
|
13
16
|
} = props;
|
|
17
|
+
const {
|
|
18
|
+
componentsWithAnimationEnabled
|
|
19
|
+
} = useBlueprintConfiguration();
|
|
20
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('DropdownMenuItem');
|
|
14
21
|
const {
|
|
15
22
|
isMenuFullScreenEnabled
|
|
16
23
|
} = useFullScreenDropdownMenu();
|
|
@@ -22,6 +29,7 @@ const DropdownMenuSubMenuTriggerRoot = /*#__PURE__*/forwardRef((props, forwarded
|
|
|
22
29
|
return jsx(DropdownMenuPrimitive.SubTrigger, {
|
|
23
30
|
...rest,
|
|
24
31
|
ref: forwardedRef,
|
|
32
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
25
33
|
className: styles.item,
|
|
26
34
|
onPointerMove: composeEventHandlers(props.onPointerMove, handleOnPointerMove),
|
|
27
35
|
children: children
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"content":"bp_dropdown_menu_module_content--
|
|
2
|
+
var styles = {"content":"bp_dropdown_menu_module_content--7a922","fullScreenContent":"bp_dropdown_menu_module_fullScreenContent--7a922","subheader":"bp_dropdown_menu_module_subheader--7a922","uppercased":"bp_dropdown_menu_module_uppercased--7a922","dropdownMenuItemSeparator":"bp_dropdown_menu_module_dropdownMenuItemSeparator--7a922","ellipsis":"bp_dropdown_menu_module_ellipsis--7a922","itemBody":"bp_dropdown_menu_module_itemBody--7a922","itemOverflow":"bp_dropdown_menu_module_itemOverflow--7a922","menuItemCaption":"bp_dropdown_menu_module_menuItemCaption--7a922","captionClamped":"bp_dropdown_menu_module_captionClamped--7a922","checkmark":"bp_dropdown_menu_module_checkmark--7a922","mediumSpacing":"bp_dropdown_menu_module_mediumSpacing--7a922","item":"bp_dropdown_menu_module_item--7a922","radioItem":"bp_dropdown_menu_module_radioItem--7a922","radioItemMediumSpacing":"bp_dropdown_menu_module_radioItemMediumSpacing--7a922","menuItemMainContent":"bp_dropdown_menu_module_menuItemMainContent--7a922","checkboxItem":"bp_dropdown_menu_module_checkboxItem--7a922","checkboxItemMediumSpacing":"bp_dropdown_menu_module_checkboxItemMediumSpacing--7a922","mediumItemLayout":"bp_dropdown_menu_module_mediumItemLayout--7a922","startElement":"bp_dropdown_menu_module_startElement--7a922","menuItemMainContent_directChild":"bp_dropdown_menu_module_menuItemMainContent_directChild--7a922","endElement":"bp_dropdown_menu_module_endElement--7a922","destructive":"bp_dropdown_menu_module_destructive--7a922","menuHeader":"bp_dropdown_menu_module_menuHeader--7a922","headerTextContent":"bp_dropdown_menu_module_headerTextContent--7a922","submenuCloseButton":"bp_dropdown_menu_module_submenuCloseButton--7a922","menuCloseButton":"bp_dropdown_menu_module_menuCloseButton--7a922"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -59,6 +59,7 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
59
59
|
readOnly,
|
|
60
60
|
onFocus,
|
|
61
61
|
onBlur,
|
|
62
|
+
'data-bp-animated': animatedDataAttribute,
|
|
62
63
|
...rest
|
|
63
64
|
} = props;
|
|
64
65
|
const {
|
|
@@ -270,6 +271,7 @@ const TextAreaAutosize = /*#__PURE__*/forwardRef(function TextAreaAutosize(props
|
|
|
270
271
|
}), [endIcon]);
|
|
271
272
|
return jsxs("div", {
|
|
272
273
|
className: clsx(styles.border, hasError && styles.hasError, readOnly && styles.readOnly, rest.disabled && styles.disabled),
|
|
274
|
+
"data-bp-animated": animatedDataAttribute,
|
|
273
275
|
"data-modern": enableModernizedComponents ? 'true' : 'false',
|
|
274
276
|
style: {
|
|
275
277
|
'--end-icon-width': endIconWidth ? `${endIconWidth}px` : '0px'
|
|
@@ -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--70f2b","loading":"bp_text_area_autosize_module_loading--70f2b","readOnly":"bp_text_area_autosize_module_readOnly--70f2b","withEndIcon":"bp_text_area_autosize_module_withEndIcon--70f2b","error":"bp_text_area_autosize_module_error--70f2b","loadingIndicator":"bp_text_area_autosize_module_loadingIndicator--70f2b","loadingIndicatorReset":"bp_text_area_autosize_module_loadingIndicatorReset--70f2b","border":"bp_text_area_autosize_module_border--70f2b","hasError":"bp_text_area_autosize_module_hasError--70f2b","disabled":"bp_text_area_autosize_module_disabled--70f2b","endIconWrap":"bp_text_area_autosize_module_endIconWrap--70f2b","endIcon":"bp_text_area_autosize_module_endIcon--70f2b"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
+
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
5
|
+
import '../blueprint-configuration-context/consts.js';
|
|
6
|
+
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
4
7
|
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
8
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
6
9
|
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
@@ -24,6 +27,10 @@ const TextArea = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
24
27
|
const {
|
|
25
28
|
enableModernizedComponents
|
|
26
29
|
} = useBlueprintModernization();
|
|
30
|
+
const {
|
|
31
|
+
componentsWithAnimationEnabled
|
|
32
|
+
} = useBlueprintConfiguration();
|
|
33
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('TextArea');
|
|
27
34
|
const textAreaId = useUniqueId('text-area-');
|
|
28
35
|
const inlineErrorId = useUniqueId('inline-error-');
|
|
29
36
|
const hasError = !!error && !disabled;
|
|
@@ -46,6 +53,7 @@ const TextArea = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
46
53
|
...rest,
|
|
47
54
|
ref: forwardedRef,
|
|
48
55
|
"aria-describedby": ariaDescribedBy,
|
|
56
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
49
57
|
"aria-invalid": hasError,
|
|
50
58
|
"aria-required": required,
|
|
51
59
|
disabled: disabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.19.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@ariakit/react": "0.4.21",
|
|
52
52
|
"@ariakit/react-core": "0.4.21",
|
|
53
|
-
"@box/blueprint-web-assets": "^5.7.
|
|
53
|
+
"@box/blueprint-web-assets": "^5.7.4",
|
|
54
54
|
"@internationalized/date": "^3.12.0",
|
|
55
55
|
"@radix-ui/react-accordion": "1.1.2",
|
|
56
56
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"type-fest": "^3.2.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@box/storybook-utils": "^1.2.
|
|
82
|
+
"@box/storybook-utils": "^1.2.13",
|
|
83
83
|
"@figma/code-connect": "1.4.4",
|
|
84
84
|
"@types/react": "^18.0.0",
|
|
85
85
|
"@types/react-dom": "^18.0.0",
|