@box/blueprint-web 12.23.0 → 12.24.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.
@@ -1056,16 +1056,40 @@
1056
1056
  [data-button-wrapper][data-focus-visible] .bp_avatar_module_avatar--d2a1c{
1057
1057
  box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--outline-focus-on-light);
1058
1058
  }
1059
- .bp_tooltip_module_content--db0b5{
1060
- border-radius:var(--radius-1);
1059
+ .bp_tooltip_module_content--5b8ee[data-modern=false]{
1060
+ --tooltip-max-width:200px;
1061
+ --tooltip-padding:var(--space-2) var(--space-3);
1062
+ --tooltip-radius:var(--radius-1);
1063
+ --tooltip-background:var(--surface-tooltip-surface);
1064
+ --tooltip-background-error:var(--surface-tooltip-surface-error);
1065
+ --tooltip-border:var(--border-1);
1066
+ --tooltip-text-color:var(--text-text-on-dark);
1067
+ --tooltip-text-color-error:var(--text-text-on-light);
1068
+ --tooltip-border-error:var(--border-tooltip-border-error);
1069
+ }
1070
+
1071
+ .bp_tooltip_module_content--5b8ee[data-modern=true]{
1072
+ --tooltip-max-width:200px;
1073
+ --tooltip-padding:var(--bp-space-020) var(--bp-space-030);
1074
+ --tooltip-radius:var(--bp-radius-04);
1075
+ --tooltip-background:var(--bp-surface-tooltip-surface);
1076
+ --tooltip-background-error:var(--bp-surface-tooltip-surface-error);
1077
+ --tooltip-border:var(--bp-border-01);
1078
+ --tooltip-text-color:var(--bp-text-text-on-dark);
1079
+ --tooltip-text-color-error:var(--bp-text-text-on-light);
1080
+ --tooltip-border-error:var(--bp-border-tooltip-border-error);
1081
+ }
1082
+
1083
+ .bp_tooltip_module_content--5b8ee{
1084
+ border-radius:var(--tooltip-radius);
1061
1085
  box-sizing:border-box;
1062
1086
  font-family:var(--body-default-font-family);
1063
1087
  font-size:var(--body-default-font-size);
1064
1088
  font-weight:var(--body-default-font-weight);
1065
1089
  letter-spacing:var(--body-default-letter-spacing);
1066
1090
  line-height:var(--body-default-line-height);
1067
- max-width:200px;
1068
- padding:var(--space-2) var(--space-3);
1091
+ max-width:var(--tooltip-max-width);
1092
+ padding:var(--tooltip-padding);
1069
1093
  position:relative;
1070
1094
  -webkit-text-decoration:var(--body-default-text-decoration);
1071
1095
  text-decoration:var(--body-default-text-decoration);
@@ -1073,18 +1097,18 @@
1073
1097
  word-break:break-word;
1074
1098
  z-index:2147483647;
1075
1099
  }
1076
- .bp_tooltip_module_content--db0b5.bp_tooltip_module_standard--db0b5{
1077
- background-color:var(--surface-tooltip-surface);
1078
- border:var(--border-1) solid var(--surface-tooltip-surface);
1079
- color:var(--text-text-on-dark);
1100
+ .bp_tooltip_module_content--5b8ee.bp_tooltip_module_standard--5b8ee{
1101
+ background-color:var(--tooltip-background);
1102
+ border:var(--tooltip-border) solid var(--tooltip-background);
1103
+ color:var(--tooltip-text-color);
1080
1104
  }
1081
- .bp_tooltip_module_content--db0b5.bp_tooltip_module_error--db0b5{
1082
- background-color:var(--surface-tooltip-surface-error);
1083
- border:var(--border-1) solid var(--border-tooltip-border-error);
1084
- color:var(--text-text-on-light);
1105
+ .bp_tooltip_module_content--5b8ee.bp_tooltip_module_error--5b8ee{
1106
+ background-color:var(--tooltip-background-error);
1107
+ border:var(--tooltip-border) solid var(--tooltip-border-error);
1108
+ color:var(--tooltip-text-color-error);
1085
1109
  }
1086
1110
 
1087
- .bp_tooltip_module_arrow--db0b5{
1111
+ .bp_tooltip_module_arrow--5b8ee{
1088
1112
  border-left:8.7px solid #0000;
1089
1113
  border-right:8.7px solid #0000;
1090
1114
  border-top:8.7px solid var(--surface-tooltip-surface);
@@ -1092,10 +1116,10 @@
1092
1116
  height:0;
1093
1117
  width:0;
1094
1118
  }
1095
- .bp_tooltip_module_arrow--db0b5.bp_tooltip_module_error--db0b5{
1119
+ .bp_tooltip_module_arrow--5b8ee.bp_tooltip_module_error--5b8ee{
1096
1120
  border-top-color:var(--border-tooltip-border-error);
1097
1121
  }
1098
- .bp_tooltip_module_arrow--db0b5.bp_tooltip_module_error--db0b5::after{
1122
+ .bp_tooltip_module_arrow--5b8ee.bp_tooltip_module_error--5b8ee::after{
1099
1123
  border-left:7.7px solid #0000;
1100
1124
  border-right:7.7px solid #0000;
1101
1125
  border-top:7.7px solid var(--surface-tooltip-surface-error);
@@ -3,6 +3,7 @@ import { Space4 } from '@box/blueprint-web-assets/tokens/px-tokens';
3
3
  import * as RadixTooltip from '@radix-ui/react-tooltip';
4
4
  import clsx from 'clsx';
5
5
  import React__default, { useContext } from 'react';
6
+ import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
6
7
  import { useForkRef } from '../utils/useForkRef.js';
7
8
  import { useIsTriggerInteractive } from '../utils/useIsTriggerInteractive.js';
8
9
  import styles from './tooltip.module.js';
@@ -117,13 +118,17 @@ const Content = /*#__PURE__*/React__default.forwardRef(function Content(props, r
117
118
  className,
118
119
  ...rest
119
120
  } = props;
121
+ const {
122
+ enableModernizedComponents
123
+ } = useBlueprintModernization();
120
124
  return jsxs(RadixTooltip.Content, {
121
125
  ...rest,
122
126
  ref: ref,
123
127
  className: clsx(styles.content, styles[variant], className),
124
128
  collisionPadding: collisionPadding,
129
+ "data-modern": enableModernizedComponents,
125
130
  sideOffset: 3,
126
- children: [children, jsx(RadixTooltip.Arrow, {
131
+ children: [children, !enableModernizedComponents && jsx(RadixTooltip.Arrow, {
127
132
  asChild: true,
128
133
  children: jsx(Arrow, {
129
134
  variant: variant
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"content":"bp_tooltip_module_content--db0b5","standard":"bp_tooltip_module_standard--db0b5","error":"bp_tooltip_module_error--db0b5","arrow":"bp_tooltip_module_arrow--db0b5"};
2
+ var styles = {"content":"bp_tooltip_module_content--5b8ee","standard":"bp_tooltip_module_standard--5b8ee","error":"bp_tooltip_module_error--5b8ee","arrow":"bp_tooltip_module_arrow--5b8ee"};
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": "12.23.0",
3
+ "version": "12.24.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@ariakit/react": "0.4.15",
49
49
  "@ariakit/react-core": "0.4.15",
50
- "@box/blueprint-web-assets": "^4.56.0",
50
+ "@box/blueprint-web-assets": "^4.56.6",
51
51
  "@internationalized/date": "^3.7.0",
52
52
  "@radix-ui/react-accordion": "1.1.2",
53
53
  "@radix-ui/react-checkbox": "1.0.4",
@@ -77,7 +77,7 @@
77
77
  "type-fest": "^3.2.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@box/storybook-utils": "^0.13.9",
80
+ "@box/storybook-utils": "^0.13.10",
81
81
  "@types/react": "^18.0.0",
82
82
  "@types/react-dom": "^18.0.0",
83
83
  "react": "^18.3.0",