@box/blueprint-web 12.80.0 → 12.81.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.
@@ -1,9 +1,10 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Checkmark } from '@box/blueprint-web-assets/icons/Fill';
3
- import { Gray100 } from '@box/blueprint-web-assets/tokens/tokens';
3
+ import { bpIconIconOnLight, Gray100 } from '@box/blueprint-web-assets/tokens/tokens';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
5
  import clsx from 'clsx';
6
6
  import { forwardRef, useCallback } from 'react';
7
+ import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
7
8
  import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
8
9
  import styles from './dropdown-menu.module.js';
9
10
  import { useMenuItemVariant } from './menu-item-variant-context.js';
@@ -21,8 +22,12 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
21
22
  const {
22
23
  internalSize
23
24
  } = useMenuItemVariant();
25
+ const {
26
+ enableModernizedComponents
27
+ } = useBlueprintModernization();
24
28
  const isSizeSmall = internalSize === 'small';
25
29
  const checkmarkSize = isSizeSmall ? '1rem' : '2rem';
30
+ const checkmarkColor = enableModernizedComponents ? bpIconIconOnLight : Gray100;
26
31
  const preventDefault = useCallback(event => event.preventDefault(), []);
27
32
  return jsxs(DropdownMenuPrimitive.CheckboxItem, {
28
33
  ...rest,
@@ -33,7 +38,7 @@ const DropdownMenuCheckboxItem = /*#__PURE__*/forwardRef((props, forwardedRef) =
33
38
  children: [jsx(DropdownMenuPrimitive.ItemIndicator, {
34
39
  className: styles.checkmark,
35
40
  children: jsx(Checkmark, {
36
- color: Gray100,
41
+ color: checkmarkColor,
37
42
  height: checkmarkSize,
38
43
  role: "presentation",
39
44
  width: checkmarkSize
@@ -1,8 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { Size8, Size4 } from '@box/blueprint-web-assets/tokens/tokens';
2
+ import { Size8, Size4, bpIconIconOnLightSecondary } from '@box/blueprint-web-assets/tokens/tokens';
3
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  import clsx from 'clsx';
5
5
  import { forwardRef, useCallback, createElement } from 'react';
6
+ import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
6
7
  import { Text } from '../../text/text.js';
7
8
  import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
8
9
  import styles from './dropdown-menu.module.js';
@@ -86,13 +87,18 @@ const MenuItemStartElement = /*#__PURE__*/forwardRef(({
86
87
  const {
87
88
  internalSize
88
89
  } = useMenuItemVariant();
90
+ const {
91
+ enableModernizedComponents
92
+ } = useBlueprintModernization();
89
93
  const iconSize = internalSize === 'medium' ? Size8 : Size4;
94
+ const iconColor = enableModernizedComponents ? bpIconIconOnLightSecondary : undefined;
90
95
  return jsxs("div", {
91
96
  ...rest,
92
97
  ref: ref,
93
98
  className: clsx(styles.startElement, className),
94
99
  children: [icon && /*#__PURE__*/createElement(icon, {
95
100
  className: styles.icon,
101
+ color: iconColor,
96
102
  height: iconSize,
97
103
  width: iconSize,
98
104
  role: 'presentation'
@@ -1,9 +1,10 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Checkmark } from '@box/blueprint-web-assets/icons/Fill';
3
- import { Gray100 } from '@box/blueprint-web-assets/tokens/tokens';
3
+ import { bpIconIconOnLight, Gray100 } from '@box/blueprint-web-assets/tokens/tokens';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
5
  import clsx from 'clsx';
6
6
  import { forwardRef, useCallback } from 'react';
7
+ import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
7
8
  import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
8
9
  import styles from './dropdown-menu.module.js';
9
10
  import { useMenuItemVariant } from './menu-item-variant-context.js';
@@ -21,8 +22,12 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
21
22
  const {
22
23
  internalSize
23
24
  } = useMenuItemVariant();
25
+ const {
26
+ enableModernizedComponents
27
+ } = useBlueprintModernization();
24
28
  const isSizeSmall = internalSize === 'small';
25
29
  const checkmarkSize = isSizeSmall ? '1rem' : '2rem';
30
+ const checkmarkColor = enableModernizedComponents ? bpIconIconOnLight : Gray100;
26
31
  const preventDefault = useCallback(event => event.preventDefault(), []);
27
32
  return jsxs(DropdownMenuPrimitive.RadioItem, {
28
33
  ...rest,
@@ -34,7 +39,7 @@ const DropdownMenuRadioSelectItem = /*#__PURE__*/forwardRef((props, forwardedRef
34
39
  children: [jsx(DropdownMenuPrimitive.ItemIndicator, {
35
40
  className: styles.checkmark,
36
41
  children: jsx(Checkmark, {
37
- color: Gray100,
42
+ color: checkmarkColor,
38
43
  height: checkmarkSize,
39
44
  role: "presentation",
40
45
  width: checkmarkSize
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "12.80.0",
3
+ "version": "12.81.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {