@box/blueprint-web 9.2.0 → 9.2.2

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.
@@ -3,6 +3,7 @@ import { CompositeItem, Button } from '@ariakit/react';
3
3
  import { Gray05, Gray100, BoxBlue100, DarkBlue100, GreenLight100, Grimace100, Size4, Size6 } from '@box/blueprint-web-assets/tokens/tokens';
4
4
  import clsx from 'clsx';
5
5
  import Color from 'color';
6
+ import omit from 'lodash/omit';
6
7
  import { forwardRef, createElement } from 'react';
7
8
  import { Text } from '../../text/text.js';
8
9
  import { Ghost } from '../../ghost/ghost.js';
@@ -42,10 +43,11 @@ const SelectMenuGridOption = /*#__PURE__*/forwardRef((props, forwardedRef) => {
42
43
  const isButtonDragged = isWithLabel && !isButtonDisabled && props.draggable && props.dragging;
43
44
  const shouldShowTooltip = !isButtonDisabled && !isWithLabel;
44
45
  const ariaLabel = !isWithLabel ? props['aria-label'] : props.label;
46
+ const buttonProps = isWithLabel ? omit(restProps, ['colorVariant', 'icon', 'dragging', 'label']) : restProps;
45
47
  // TODO: [DSYS-764] use IconButton instead of AriakitButton
46
48
  const button = jsx(CompositeItem, {
47
49
  render: jsxs(Button, {
48
- ...restProps,
50
+ ...buttonProps,
49
51
  ref: forwardedRef,
50
52
  "aria-label": loading ? loadingAriaLabel : ariaLabel,
51
53
  className: clsx(styles.optionButton, className, {
@@ -17,6 +17,10 @@ const SelectMenuGrid = /*#__PURE__*/forwardRef((props, forwardedRef) => {
17
17
  className,
18
18
  ...rest
19
19
  } = props;
20
+ if (new Set(Children.toArray(children).map(child => child?.type)).size > 1) {
21
+ // eslint-disable-next-line no-console
22
+ console.warn('SelectMenuGrid: all children should be of the same type');
23
+ }
20
24
  const childrenByColumns = chunk(Children.toArray(children), columns);
21
25
  return jsx(CompositeProvider, {
22
26
  children: jsx(Composite, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "9.2.0",
3
+ "version": "9.2.2",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -63,7 +63,7 @@
63
63
  "react-stately": "^3.31.1",
64
64
  "tsx": "^4.16.5"
65
65
  },
66
- "gitHead": "aea7aacd8bd8226934231748787d65edac379e02",
66
+ "gitHead": "5bfcdbead36b50a11388503a8c0decf508b91878",
67
67
  "module": "lib-esm/index.js",
68
68
  "main": "lib-esm/index.js",
69
69
  "exports": {