@box/blueprint-web 17.19.1 → 17.20.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.
Files changed (29) hide show
  1. package/dist/lib-esm/checkbox/checkbox-item.js +1 -2
  2. package/dist/lib-esm/checkbox/checkbox.module.js +1 -1
  3. package/dist/lib-esm/combobox/combobox.js +5 -10
  4. package/dist/lib-esm/combobox/combobox.module.js +1 -1
  5. package/dist/lib-esm/combobox-group/combobox-group.js +0 -1
  6. package/dist/lib-esm/combobox-group/combobox-group.module.js +1 -1
  7. package/dist/lib-esm/components.css +588 -1120
  8. package/dist/lib-esm/date-picker/date-picker.js +3 -5
  9. package/dist/lib-esm/date-picker/date-picker.module.js +1 -1
  10. package/dist/lib-esm/index.css +588 -1120
  11. package/dist/lib-esm/input-chip/input-chip.js +6 -10
  12. package/dist/lib-esm/input-chip/input-chip.module.js +1 -1
  13. package/dist/lib-esm/password-input/password-input.js +2 -2
  14. package/dist/lib-esm/primitives/calendar/calendar.js +3 -8
  15. package/dist/lib-esm/primitives/calendar/calendar.module.js +1 -1
  16. package/dist/lib-esm/primitives/chips/chip-dropdown-indicator.js +5 -5
  17. package/dist/lib-esm/primitives/chips/chip.js +0 -1
  18. package/dist/lib-esm/primitives/chips/chip.module.js +1 -1
  19. package/dist/lib-esm/primitives/chips/chips-group.js +0 -1
  20. package/dist/lib-esm/radio-group/radio-group.js +0 -1
  21. package/dist/lib-esm/radio-group/radio-group.module.js +1 -1
  22. package/dist/lib-esm/radio-tiles/radio-tiles-option.js +0 -1
  23. package/dist/lib-esm/radio-tiles/radio-tiles-option.module.js +1 -1
  24. package/dist/lib-esm/radio-tiles/radio-tiles.js +0 -1
  25. package/dist/lib-esm/time-picker/time-picker.js +3 -5
  26. package/dist/lib-esm/time-picker/time-picker.module.js +1 -1
  27. package/dist/lib-esm/util-components/legend/legend.js +0 -1
  28. package/dist/lib-esm/util-components/legend/legend.module.js +1 -1
  29. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { XMark } from '@box/blueprint-web-assets/icons/Fill';
3
- import { Size4 } from '@box/blueprint-web-assets/tokens/tokens';
2
+ import { XMark } from '@box/blueprint-web-assets/icons/Medium';
3
+ import { bpSize040 } from '@box/blueprint-web-assets/tokens/tokens';
4
4
  import clsx from 'clsx';
5
5
  import React__default, { forwardRef, useMemo, useCallback } from 'react';
6
6
  import { Text } from '../text/text.js';
@@ -32,7 +32,6 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
32
32
  tabIndex: tabIndexProp,
33
33
  ...buttonProps
34
34
  } = props;
35
- const enableModernizedComponents = true;
36
35
  const content = useMemo(() => ({
37
36
  avatar: avatarProp,
38
37
  label,
@@ -51,9 +50,7 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
51
50
  const withSmallAvatarSize = element => {
52
51
  const cloneAvatarWithSmallSize = el => /*#__PURE__*/React__default.cloneElement(el, {
53
52
  ...el.props,
54
- className: clsx(el.props.className, styles.avatar, {
55
- [styles.modern]: enableModernizedComponents
56
- }),
53
+ className: clsx(el.props.className, styles.avatar),
57
54
  size: 'small',
58
55
  'aria-hidden': 'true'
59
56
  });
@@ -88,7 +85,7 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
88
85
  };
89
86
  const hasError = chipVariant === 'error';
90
87
  const variantClass = getVariantClass(chipVariant);
91
- const containerClassName = clsx(styles.container, variantClass, avatar && styles.avatarContainer, canDelete && styles.deleteButton, !canDelete && enableModernizedComponents && styles.noDeleteButton, className);
88
+ const containerClassName = clsx(styles.container, variantClass, avatar && styles.avatarContainer, canDelete && styles.deleteButton, !canDelete && styles.noDeleteButton, className);
92
89
  return /* eslint-disable-next-line jsx-a11y/role-supports-aria-props */jsxs("button", {
93
90
  ...buttonProps,
94
91
  ref: ref,
@@ -96,7 +93,6 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
96
93
  "aria-invalid": hasError,
97
94
  className: containerClassName,
98
95
  "data-bp-animated": isAnimationEnabled ? 'true' : 'false',
99
- "data-modern": 'true' ,
100
96
  "data-state": presence.presenceState,
101
97
  onAnimationEnd: handleAnimationEnd,
102
98
  onKeyDown: handleKeyDown,
@@ -114,8 +110,8 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
114
110
  children: jsx(XMark, {
115
111
  "aria-hidden": true,
116
112
  "data-testid": "delete-icon",
117
- height: Size4,
118
- width: Size4
113
+ height: bpSize040,
114
+ width: bpSize040
119
115
  })
120
116
  }))]
121
117
  });
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"container":"bp_input_chip_module_container--cd126","avatarContainer":"bp_input_chip_module_avatarContainer--cd126","deleteButton":"bp_input_chip_module_deleteButton--cd126","noDeleteButton":"bp_input_chip_module_noDeleteButton--cd126","error":"bp_input_chip_module_error--cd126","deleteIcon":"bp_input_chip_module_deleteIcon--cd126","label":"bp_input_chip_module_label--cd126","variable":"bp_input_chip_module_variable--cd126","avatar":"bp_input_chip_module_avatar--cd126","modern":"bp_input_chip_module_modern--cd126"};
2
+ var styles = {"container":"bp_input_chip_module_container--caf48","avatarContainer":"bp_input_chip_module_avatarContainer--caf48","deleteButton":"bp_input_chip_module_deleteButton--caf48","noDeleteButton":"bp_input_chip_module_noDeleteButton--caf48","error":"bp_input_chip_module_error--caf48","deleteIcon":"bp_input_chip_module_deleteIcon--caf48","label":"bp_input_chip_module_label--caf48","variable":"bp_input_chip_module_variable--caf48","avatar":"bp_input_chip_module_avatar--caf48"};
3
3
 
4
4
  export { styles as default };
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { Hidden, Visible } from '@box/blueprint-web-assets/icons/Line';
2
+ import { EyeCrossed, Eye } from '@box/blueprint-web-assets/icons/Medium';
3
3
  import clsx from 'clsx';
4
4
  import { forwardRef, useRef, useState, useCallback } from 'react';
5
5
  import '../blueprint-configuration-context/blueprint-configuration-context.js';
@@ -49,7 +49,7 @@ const PasswordInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
49
49
  "aria-label": iconButtonAriaLabel,
50
50
  className: styles.iconButton,
51
51
  disabled: props.disabled,
52
- icon: passwordVisibleFinal ? Hidden : Visible,
52
+ icon: passwordVisibleFinal ? EyeCrossed : Eye,
53
53
  onClick: toggleVisibility,
54
54
  size: "small"
55
55
  }),
@@ -1,10 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import '@box/blueprint-web-assets/icons/Fill';
3
2
  import { ChevronLeft, ChevronRight } from '@box/blueprint-web-assets/icons/Medium';
4
3
  import { Gray65 } from '@box/blueprint-web-assets/tokens/tokens';
5
4
  import { isSameDay, today, getLocalTimeZone } from '@internationalized/date';
6
5
  import { clsx } from 'clsx';
7
- import { forwardRef, useMemo, useRef, useEffect } from 'react';
6
+ import { forwardRef, useRef, useEffect } from 'react';
8
7
  import { Calendar as Calendar$1, Button, Heading, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell } from 'react-aria-components';
9
8
  import styles from './calendar.module.js';
10
9
 
@@ -62,15 +61,11 @@ const Calendar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
62
61
  nextMonthAriaLabel,
63
62
  ...rest
64
63
  } = props;
65
- const enableModernizedComponents = true;
66
- const ChevronLeftIcon = useMemo(() => ChevronLeft , [enableModernizedComponents]);
67
- const ChevronRightIcon = useMemo(() => ChevronRight , [enableModernizedComponents]);
68
64
  return jsxs(Calendar$1, {
69
65
  ...rest,
70
66
  ref: forwardedRef,
71
67
  "aria-label": calendarAriaLabel,
72
68
  className: clsx(styles.calendar, className),
73
- "data-modern": 'true' ,
74
69
  children: [jsxs("header", {
75
70
  className: styles.calendarHeader,
76
71
  children: [jsx(Button, {
@@ -78,7 +73,7 @@ const Calendar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
78
73
  className: styles.calendarHeaderButton,
79
74
  onPressStart: continuePropagation,
80
75
  slot: "previous",
81
- children: jsx(ChevronLeftIcon, {
76
+ children: jsx(ChevronLeft, {
82
77
  "aria-label": previousMonthAriaLabel,
83
78
  color: Gray65
84
79
  })
@@ -89,7 +84,7 @@ const Calendar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
89
84
  className: styles.calendarHeaderButton,
90
85
  onPressStart: continuePropagation,
91
86
  slot: "next",
92
- children: jsx(ChevronRightIcon, {
87
+ children: jsx(ChevronRight, {
93
88
  "aria-label": nextMonthAriaLabel,
94
89
  color: Gray65
95
90
  })
@@ -1,4 +1,4 @@
1
1
  import '../../index.css';
2
- var styles = {"calendar":"bp_calendar_module_calendar--74524","calendarHeaderCell":"bp_calendar_module_calendarHeaderCell--74524","calendarHeaderHeading":"bp_calendar_module_calendarHeaderHeading--74524","calendarCell":"bp_calendar_module_calendarCell--74524","today":"bp_calendar_module_today--74524","calendarHeader":"bp_calendar_module_calendarHeader--74524","calendarHeaderButton":"bp_calendar_module_calendarHeaderButton--74524","calendarGrid":"bp_calendar_module_calendarGrid--74524"};
2
+ var styles = {"calendar":"bp_calendar_module_calendar--1b820","calendarGrid":"bp_calendar_module_calendarGrid--1b820","calendarHeaderCell":"bp_calendar_module_calendarHeaderCell--1b820","calendarHeader":"bp_calendar_module_calendarHeader--1b820","calendarHeaderHeading":"bp_calendar_module_calendarHeaderHeading--1b820","calendarHeaderButton":"bp_calendar_module_calendarHeaderButton--1b820","calendarCell":"bp_calendar_module_calendarCell--1b820","today":"bp_calendar_module_today--1b820"};
3
3
 
4
4
  export { styles as default };
@@ -1,14 +1,14 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { Caret } from '@box/blueprint-web-assets/icons/Fill';
3
- import { Size3 } from '@box/blueprint-web-assets/tokens/tokens';
2
+ import { ChevronDown } from '@box/blueprint-web-assets/icons/Medium';
3
+ import { bpSize030 } from '@box/blueprint-web-assets/tokens/tokens';
4
4
  import { forwardRef } from 'react';
5
5
 
6
6
  const ChipDropdownIndicator = /*#__PURE__*/forwardRef((_, forwardedRef) => {
7
- return jsx(Caret, {
7
+ return jsx(ChevronDown, {
8
8
  ref: forwardedRef,
9
- height: Size3,
9
+ height: bpSize030,
10
10
  role: "presentation",
11
- width: Size3
11
+ width: bpSize030
12
12
  });
13
13
  });
14
14
 
@@ -14,7 +14,6 @@ const Chip = /*#__PURE__*/forwardRef((props, forwardedRef) => {
14
14
  ...rest,
15
15
  ref: forwardedRef,
16
16
  className: clsx(styles.chip, className),
17
- "data-modern": 'true' ,
18
17
  children: children
19
18
  });
20
19
  });
@@ -1,4 +1,4 @@
1
1
  import '../../index.css';
2
- var styles = {"chip":"bp_chip_module_chip--e6fd2","chipButton":"bp_chip_module_chipButton--e6fd2","multiSelectChip":"bp_chip_module_multiSelectChip--e6fd2","chipStatus":"bp_chip_module_chipStatus--e6fd2","labelText":"bp_chip_module_labelText--e6fd2","singleSelectChip":"bp_chip_module_singleSelectChip--e6fd2","chipsGroup":"bp_chip_module_chipsGroup--e6fd2"};
2
+ var styles = {"chip":"bp_chip_module_chip--ad68d","labelText":"bp_chip_module_labelText--ad68d","chipStatus":"bp_chip_module_chipStatus--ad68d","chipButton":"bp_chip_module_chipButton--ad68d","singleSelectChip":"bp_chip_module_singleSelectChip--ad68d","multiSelectChip":"bp_chip_module_multiSelectChip--ad68d","chipsGroup":"bp_chip_module_chipsGroup--ad68d"};
3
3
 
4
4
  export { styles as default };
@@ -15,7 +15,6 @@ const ChipsGroup = /*#__PURE__*/forwardRef((props, forwardedRef) => {
15
15
  ...rest,
16
16
  ref: forwardedRef,
17
17
  className: clsx([styles.chipsGroup, className]),
18
- "data-modern": 'true' ,
19
18
  children: children
20
19
  });
21
20
  });
@@ -22,7 +22,6 @@ const RadioGroup = /*#__PURE__*/forwardRef((props, ref) => {
22
22
  className: clsx([styles.root], {
23
23
  [styles.horizontal]: orientation === 'horizontal'
24
24
  }, className),
25
- "data-modern": 'true' ,
26
25
  defaultValue: defaultValue,
27
26
  loop: loop,
28
27
  name: name,
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"root":"bp_radio_group_module_root--c45d0","horizontal":"bp_radio_group_module_horizontal--c45d0","radioOption":"bp_radio_group_module_radioOption--c45d0","label":"bp_radio_group_module_label--c45d0","description":"bp_radio_group_module_description--c45d0","disabled":"bp_radio_group_module_disabled--c45d0","radioButton":"bp_radio_group_module_radioButton--c45d0","indicator":"bp_radio_group_module_indicator--c45d0"};
2
+ var styles = {"root":"bp_radio_group_module_root--8c22a","horizontal":"bp_radio_group_module_horizontal--8c22a","radioOption":"bp_radio_group_module_radioOption--8c22a","label":"bp_radio_group_module_label--8c22a","description":"bp_radio_group_module_description--8c22a","disabled":"bp_radio_group_module_disabled--8c22a","radioButton":"bp_radio_group_module_radioButton--8c22a","indicator":"bp_radio_group_module_indicator--8c22a"};
3
3
 
4
4
  export { styles as default };
@@ -50,7 +50,6 @@ const RadioTilesOption = function RadioTilesOption({
50
50
  ...wrapperProps,
51
51
  children: jsx("div", {
52
52
  className: radioTileClassNames,
53
- "data-modern": 'true' ,
54
53
  "data-target-id": dataTargetId,
55
54
  children: jsxs("label", {
56
55
  className: clsx({
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"radioTileOption":"bp_radio_tiles_option_module_radioTileOption--8a512","icon":"bp_radio_tiles_option_module_icon--8a512","disabled":"bp_radio_tiles_option_module_disabled--8a512","checked":"bp_radio_tiles_option_module_checked--8a512","iconOnly":"bp_radio_tiles_option_module_iconOnly--8a512","labelOnly":"bp_radio_tiles_option_module_labelOnly--8a512","radioTileLabel":"bp_radio_tiles_option_module_radioTileLabel--8a512"};
2
+ var styles = {"radioTileOption":"bp_radio_tiles_option_module_radioTileOption--d5939","icon":"bp_radio_tiles_option_module_icon--d5939","disabled":"bp_radio_tiles_option_module_disabled--d5939","checked":"bp_radio_tiles_option_module_checked--d5939","iconOnly":"bp_radio_tiles_option_module_iconOnly--d5939","labelOnly":"bp_radio_tiles_option_module_labelOnly--d5939","radioTileLabel":"bp_radio_tiles_option_module_radioTileLabel--d5939"};
3
3
 
4
4
  export { styles as default };
@@ -39,7 +39,6 @@ const RadioTilesRoot = ({
39
39
  value: contextValue,
40
40
  children: jsxs("div", {
41
41
  className: styles.container,
42
- "data-modern": 'true' ,
43
42
  children: [jsx("div", {
44
43
  "aria-describedby": hasError ? inlineErrorId : undefined,
45
44
  "aria-invalid": hasError || undefined,
@@ -1,5 +1,4 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import '@box/blueprint-web-assets/icons/Fill';
3
2
  import { Clock, XMark } from '@box/blueprint-web-assets/icons/Medium';
4
3
  import { bpSize040, bpGray65 } from '@box/blueprint-web-assets/tokens/tokens';
5
4
  import clsx from 'clsx';
@@ -12,7 +11,7 @@ import { useControllableState } from '../utils/useControllableState.js';
12
11
  import { useUniqueId } from '../utils/useUniqueId.js';
13
12
  import styles from './time-picker.module.js';
14
13
 
15
- const ClearIconModern = label => () => jsx(XMark, {
14
+ const ClearIcon = label => () => jsx(XMark, {
16
15
  "aria-label": label,
17
16
  color: bpGray65,
18
17
  height: bpSize040,
@@ -64,7 +63,6 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
64
63
  className: clsx(styles.timePicker, {
65
64
  [styles.disabled]: isDisabled
66
65
  }, className),
67
- "data-modern": 'true' ,
68
66
  isDisabled: isDisabled,
69
67
  isInvalid: hasError,
70
68
  onChange: setTimeValue,
@@ -95,7 +93,7 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
95
93
  "aria-label": clearTimePickerAriaLabel,
96
94
  className: styles.clearButton,
97
95
  disabled: isDisabled,
98
- icon: ClearIconModern(clearTimePickerAriaLabel) ,
96
+ icon: ClearIcon(clearTimePickerAriaLabel),
99
97
  onClick: handleClearInputButtonClicked,
100
98
  onKeyDownCapture: handleClearButtonKeypress,
101
99
  size: "x-small"
@@ -105,7 +103,7 @@ const TimePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
105
103
  color: bpGray65,
106
104
  height: bpSize040,
107
105
  width: bpSize040
108
- }) ]
106
+ })]
109
107
  }), jsx(InlineError, {
110
108
  className: styles.inlineError,
111
109
  id: inlineErrorId,
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"timePicker":"bp_time_picker_module_timePicker--3d8a3","label":"bp_time_picker_module_label--3d8a3","group":"bp_time_picker_module_group--3d8a3","disabled":"bp_time_picker_module_disabled--3d8a3","error":"bp_time_picker_module_error--3d8a3","timeInput":"bp_time_picker_module_timeInput--3d8a3","timeInputSegment":"bp_time_picker_module_timeInputSegment--3d8a3","clearButton":"bp_time_picker_module_clearButton--3d8a3","clockIcon":"bp_time_picker_module_clockIcon--3d8a3","inlineError":"bp_time_picker_module_inlineError--3d8a3"};
2
+ var styles = {"timePicker":"bp_time_picker_module_timePicker--96cfe","disabled":"bp_time_picker_module_disabled--96cfe","label":"bp_time_picker_module_label--96cfe","group":"bp_time_picker_module_group--96cfe","error":"bp_time_picker_module_error--96cfe","timeInput":"bp_time_picker_module_timeInput--96cfe","timeInputSegment":"bp_time_picker_module_timeInputSegment--96cfe","clearButton":"bp_time_picker_module_clearButton--96cfe","clockIcon":"bp_time_picker_module_clockIcon--96cfe","inlineError":"bp_time_picker_module_inlineError--96cfe"};
3
3
 
4
4
  export { styles as default };
@@ -17,7 +17,6 @@ function Legend(props) {
17
17
  return jsxs("fieldset", {
18
18
  ...rest,
19
19
  className: clsx(styles.fieldset, styles[gap], className),
20
- "data-modern": 'true' ,
21
20
  children: [shouldRenderHeader ? jsx("legend", {
22
21
  className: styles.legendContainer,
23
22
  children: jsx(TextWithInfoBadge, {
@@ -1,4 +1,4 @@
1
1
  import '../../index.css';
2
- var styles = {"legendContainer":"bp_legend_module_legendContainer--8a810","fieldset":"bp_legend_module_fieldset--8a810","legend":"bp_legend_module_legend--8a810","wide":"bp_legend_module_wide--8a810"};
2
+ var styles = {"legendContainer":"bp_legend_module_legendContainer--c8a96","fieldset":"bp_legend_module_fieldset--c8a96","legend":"bp_legend_module_legend--c8a96","wide":"bp_legend_module_wide--c8a96"};
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.19.1",
3
+ "version": "17.20.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.4",
58
+ "@box/blueprint-web-assets": "^5.11.6",
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.3.4",
89
+ "@box/storybook-utils": "^1.4.1",
90
90
  "@figma/code-connect": "1.4.4",
91
91
  "@playwright/test": "1.46.1",
92
92
  "@types/js-yaml": "^4.0.9",