@box/blueprint-web 14.1.0 → 14.3.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.
|
@@ -3,6 +3,7 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { forwardRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import '@box/blueprint-web-assets/tokens/px-tokens';
|
|
5
5
|
import '@radix-ui/react-tooltip';
|
|
6
|
+
import '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
6
7
|
import { Combobox } from '../combobox/combobox.js';
|
|
7
8
|
import { useComboboxGroupContext } from './combobox-group-context.js';
|
|
8
9
|
import styles from './combobox-group.module.js';
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -2128,7 +2128,7 @@
|
|
|
2128
2128
|
[data-button-wrapper][data-focus-visible] .bp_avatar_module_avatar--a6b5d[data-modern=true]{
|
|
2129
2129
|
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--bp-outline-focus-on-light);
|
|
2130
2130
|
}
|
|
2131
|
-
.bp_tooltip_module_content--
|
|
2131
|
+
.bp_tooltip_module_content--b08a6[data-modern=false]{
|
|
2132
2132
|
--tooltip-max-width:200px;
|
|
2133
2133
|
--tooltip-padding:var(--space-2) var(--space-3);
|
|
2134
2134
|
--tooltip-radius:var(--radius-1);
|
|
@@ -2149,7 +2149,7 @@
|
|
|
2149
2149
|
text-transform:var(--body-default-text-case);
|
|
2150
2150
|
}
|
|
2151
2151
|
|
|
2152
|
-
.bp_tooltip_module_content--
|
|
2152
|
+
.bp_tooltip_module_content--b08a6[data-modern=true]{
|
|
2153
2153
|
--tooltip-max-width:200px;
|
|
2154
2154
|
--tooltip-padding:var(--bp-space-020) var(--bp-space-030);
|
|
2155
2155
|
--tooltip-radius:var(--bp-radius-04);
|
|
@@ -2169,7 +2169,40 @@
|
|
|
2169
2169
|
line-height:var(--bp-font-line-height-04);
|
|
2170
2170
|
}
|
|
2171
2171
|
|
|
2172
|
-
.bp_tooltip_module_content--
|
|
2172
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=delayed-open]{
|
|
2173
|
+
animation-duration:var(--bp-duration-short);
|
|
2174
|
+
animation-timing-function:var(--bp-curve-large-on);
|
|
2175
|
+
}
|
|
2176
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=delayed-open][data-side=top]{
|
|
2177
|
+
animation-name:bp_tooltip_module_bpTooltipTopSlideEnter--b08a6, bp_tooltip_module_bpTooltipFadeIn--b08a6;
|
|
2178
|
+
}
|
|
2179
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=delayed-open][data-side=right]{
|
|
2180
|
+
animation-name:bp_tooltip_module_bpTooltipRightSlideEnter--b08a6, bp_tooltip_module_bpTooltipFadeIn--b08a6;
|
|
2181
|
+
}
|
|
2182
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=delayed-open][data-side=bottom]{
|
|
2183
|
+
animation-name:bp_tooltip_module_bpTooltipBottomSlideEnter--b08a6, bp_tooltip_module_bpTooltipFadeIn--b08a6;
|
|
2184
|
+
}
|
|
2185
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=delayed-open][data-side=left]{
|
|
2186
|
+
animation-name:bp_tooltip_module_bpTooltipLeftSlideEnter--b08a6, bp_tooltip_module_bpTooltipFadeIn--b08a6;
|
|
2187
|
+
}
|
|
2188
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=closed]{
|
|
2189
|
+
animation-duration:var(--bp-duration-short);
|
|
2190
|
+
animation-timing-function:var(--bp-curve-large-off);
|
|
2191
|
+
}
|
|
2192
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=closed][data-side=top]{
|
|
2193
|
+
animation-name:bp_tooltip_module_bpTooltipTopSlideExit--b08a6, bp_tooltip_module_bpTooltipFadeOut--b08a6;
|
|
2194
|
+
}
|
|
2195
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=closed][data-side=right]{
|
|
2196
|
+
animation-name:bp_tooltip_module_bpTooltipRightSlideExit--b08a6, bp_tooltip_module_bpTooltipFadeOut--b08a6;
|
|
2197
|
+
}
|
|
2198
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=closed][data-side=bottom]{
|
|
2199
|
+
animation-name:bp_tooltip_module_bpTooltipBottomSlideExit--b08a6, bp_tooltip_module_bpTooltipFadeOut--b08a6;
|
|
2200
|
+
}
|
|
2201
|
+
.bp_tooltip_module_content--b08a6[data-bp-animated=true][data-state=closed][data-side=left]{
|
|
2202
|
+
animation-name:bp_tooltip_module_bpTooltipLeftSlideExit--b08a6, bp_tooltip_module_bpTooltipFadeOut--b08a6;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
.bp_tooltip_module_content--b08a6{
|
|
2173
2206
|
backdrop-filter:var(--tooltip-backdrop-filter);
|
|
2174
2207
|
border-radius:var(--tooltip-radius);
|
|
2175
2208
|
box-shadow:var(--tooltip-drop-shadow);
|
|
@@ -2180,18 +2213,18 @@
|
|
|
2180
2213
|
position:relative;
|
|
2181
2214
|
z-index:2147483647;
|
|
2182
2215
|
}
|
|
2183
|
-
.bp_tooltip_module_content--
|
|
2216
|
+
.bp_tooltip_module_content--b08a6.bp_tooltip_module_standard--b08a6{
|
|
2184
2217
|
background-color:var(--tooltip-background);
|
|
2185
2218
|
border:var(--tooltip-border);
|
|
2186
2219
|
color:var(--tooltip-text-color);
|
|
2187
2220
|
}
|
|
2188
|
-
.bp_tooltip_module_content--
|
|
2221
|
+
.bp_tooltip_module_content--b08a6.bp_tooltip_module_error--b08a6{
|
|
2189
2222
|
background-color:var(--tooltip-background-error);
|
|
2190
2223
|
border:var(--tooltip-border-error);
|
|
2191
2224
|
color:var(--tooltip-text-color-error);
|
|
2192
2225
|
}
|
|
2193
2226
|
|
|
2194
|
-
.bp_tooltip_module_arrow--
|
|
2227
|
+
.bp_tooltip_module_arrow--b08a6{
|
|
2195
2228
|
border-left:8.7px solid #0000;
|
|
2196
2229
|
border-right:8.7px solid #0000;
|
|
2197
2230
|
border-top:8.7px solid var(--surface-tooltip-surface);
|
|
@@ -2199,10 +2232,10 @@
|
|
|
2199
2232
|
height:0;
|
|
2200
2233
|
width:0;
|
|
2201
2234
|
}
|
|
2202
|
-
.bp_tooltip_module_arrow--
|
|
2235
|
+
.bp_tooltip_module_arrow--b08a6.bp_tooltip_module_error--b08a6{
|
|
2203
2236
|
border-top-color:var(--border-tooltip-border-error);
|
|
2204
2237
|
}
|
|
2205
|
-
.bp_tooltip_module_arrow--
|
|
2238
|
+
.bp_tooltip_module_arrow--b08a6.bp_tooltip_module_error--b08a6::after{
|
|
2206
2239
|
border-left:7.7px solid #0000;
|
|
2207
2240
|
border-right:7.7px solid #0000;
|
|
2208
2241
|
border-top:7.7px solid var(--surface-tooltip-surface-error);
|
|
@@ -2213,6 +2246,87 @@
|
|
|
2213
2246
|
top:-.7px;
|
|
2214
2247
|
width:0;
|
|
2215
2248
|
}
|
|
2249
|
+
|
|
2250
|
+
@keyframes bp_tooltip_module_bpTooltipFadeIn--b08a6{
|
|
2251
|
+
from{
|
|
2252
|
+
opacity:var(--bp-opacity-hidden);
|
|
2253
|
+
}
|
|
2254
|
+
to{
|
|
2255
|
+
opacity:var(--bp-opacity-visible);
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
@keyframes bp_tooltip_module_bpTooltipFadeOut--b08a6{
|
|
2259
|
+
from{
|
|
2260
|
+
opacity:var(--bp-opacity-visible);
|
|
2261
|
+
}
|
|
2262
|
+
to{
|
|
2263
|
+
opacity:var(--bp-opacity-hidden);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
@keyframes bp_tooltip_module_bpTooltipTopSlideEnter--b08a6{
|
|
2267
|
+
from{
|
|
2268
|
+
transform:translateY(var(--bp-space-010));
|
|
2269
|
+
}
|
|
2270
|
+
to{
|
|
2271
|
+
transform:translateY(0);
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
@keyframes bp_tooltip_module_bpTooltipTopSlideExit--b08a6{
|
|
2275
|
+
from{
|
|
2276
|
+
transform:translateY(0);
|
|
2277
|
+
}
|
|
2278
|
+
to{
|
|
2279
|
+
transform:translateY(var(--bp-space-010));
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
@keyframes bp_tooltip_module_bpTooltipBottomSlideEnter--b08a6{
|
|
2283
|
+
from{
|
|
2284
|
+
transform:translateY(calc(var(--bp-space-010)*-1));
|
|
2285
|
+
}
|
|
2286
|
+
to{
|
|
2287
|
+
transform:translateY(0);
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
@keyframes bp_tooltip_module_bpTooltipBottomSlideExit--b08a6{
|
|
2291
|
+
from{
|
|
2292
|
+
transform:translateY(0);
|
|
2293
|
+
}
|
|
2294
|
+
to{
|
|
2295
|
+
transform:translateY(calc(var(--bp-space-010)*-1));
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
@keyframes bp_tooltip_module_bpTooltipRightSlideEnter--b08a6{
|
|
2299
|
+
from{
|
|
2300
|
+
transform:translateX(calc(var(--bp-space-010)*-1));
|
|
2301
|
+
}
|
|
2302
|
+
to{
|
|
2303
|
+
transform:translateX(0);
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
@keyframes bp_tooltip_module_bpTooltipRightSlideExit--b08a6{
|
|
2307
|
+
from{
|
|
2308
|
+
transform:translateX(0);
|
|
2309
|
+
}
|
|
2310
|
+
to{
|
|
2311
|
+
transform:translateX(calc(var(--bp-space-010)*-1));
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
@keyframes bp_tooltip_module_bpTooltipLeftSlideEnter--b08a6{
|
|
2315
|
+
from{
|
|
2316
|
+
transform:translateX(var(--bp-space-010));
|
|
2317
|
+
}
|
|
2318
|
+
to{
|
|
2319
|
+
transform:translateX(0);
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
@keyframes bp_tooltip_module_bpTooltipLeftSlideExit--b08a6{
|
|
2323
|
+
from{
|
|
2324
|
+
transform:translateX(0);
|
|
2325
|
+
}
|
|
2326
|
+
to{
|
|
2327
|
+
transform:translateX(var(--bp-space-010));
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2216
2330
|
.bp_base_badge_module_badgeContainer--15c80{
|
|
2217
2331
|
display:inline-flex;
|
|
2218
2332
|
position:relative;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,8 @@ 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 '../blueprint-configuration-context/blueprint-configuration-context.js';
|
|
7
|
+
import { useBlueprintConfiguration } from '../blueprint-configuration-context/useBlueprintConfiguration.js';
|
|
6
8
|
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
9
|
import styles from './tooltip.module.js';
|
|
8
10
|
|
|
@@ -28,6 +30,10 @@ const Tooltip = props => {
|
|
|
28
30
|
...contentProps
|
|
29
31
|
} = props;
|
|
30
32
|
const container = useContext(ContainerContext);
|
|
33
|
+
const {
|
|
34
|
+
componentsWithAnimationEnabled
|
|
35
|
+
} = useBlueprintConfiguration();
|
|
36
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('Tooltip');
|
|
31
37
|
return jsxs(RadixTooltip.Root, {
|
|
32
38
|
defaultOpen: defaultOpen,
|
|
33
39
|
onOpenChange: onOpenChange,
|
|
@@ -39,6 +45,7 @@ const Tooltip = props => {
|
|
|
39
45
|
forceMount: forceMount,
|
|
40
46
|
children: jsx(Content, {
|
|
41
47
|
...contentProps,
|
|
48
|
+
"data-bp-animated": isAnimationEnabled ? 'true' : 'false',
|
|
42
49
|
children: content
|
|
43
50
|
})
|
|
44
51
|
})]
|
|
@@ -51,11 +58,18 @@ const TooltipProvider = props => {
|
|
|
51
58
|
container,
|
|
52
59
|
disableHoverableContent
|
|
53
60
|
} = props;
|
|
61
|
+
const {
|
|
62
|
+
componentsWithAnimationEnabled
|
|
63
|
+
} = useBlueprintConfiguration();
|
|
64
|
+
const isAnimationEnabled = componentsWithAnimationEnabled.includes('Tooltip');
|
|
54
65
|
return jsx(ContainerContext.Provider, {
|
|
55
66
|
value: container,
|
|
56
67
|
children: jsx(RadixTooltip.Provider, {
|
|
57
|
-
delayDuration: 300,
|
|
68
|
+
delayDuration: isAnimationEnabled ? 400 : 300,
|
|
58
69
|
disableHoverableContent: disableHoverableContent,
|
|
70
|
+
...(isAnimationEnabled ? {
|
|
71
|
+
skipDelayDuration: 0
|
|
72
|
+
} : {}),
|
|
59
73
|
children: children
|
|
60
74
|
})
|
|
61
75
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"content":"bp_tooltip_module_content--
|
|
2
|
+
var styles = {"content":"bp_tooltip_module_content--b08a6","bpTooltipTopSlideEnter":"bp_tooltip_module_bpTooltipTopSlideEnter--b08a6","bpTooltipFadeIn":"bp_tooltip_module_bpTooltipFadeIn--b08a6","bpTooltipRightSlideEnter":"bp_tooltip_module_bpTooltipRightSlideEnter--b08a6","bpTooltipBottomSlideEnter":"bp_tooltip_module_bpTooltipBottomSlideEnter--b08a6","bpTooltipLeftSlideEnter":"bp_tooltip_module_bpTooltipLeftSlideEnter--b08a6","bpTooltipTopSlideExit":"bp_tooltip_module_bpTooltipTopSlideExit--b08a6","bpTooltipFadeOut":"bp_tooltip_module_bpTooltipFadeOut--b08a6","bpTooltipRightSlideExit":"bp_tooltip_module_bpTooltipRightSlideExit--b08a6","bpTooltipBottomSlideExit":"bp_tooltip_module_bpTooltipBottomSlideExit--b08a6","bpTooltipLeftSlideExit":"bp_tooltip_module_bpTooltipLeftSlideExit--b08a6","standard":"bp_tooltip_module_standard--b08a6","error":"bp_tooltip_module_error--b08a6","arrow":"bp_tooltip_module_arrow--b08a6"};
|
|
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": "14.
|
|
3
|
+
"version": "14.3.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.21",
|
|
49
49
|
"@ariakit/react-core": "0.4.21",
|
|
50
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
50
|
+
"@box/blueprint-web-assets": "^4.111.20",
|
|
51
51
|
"@internationalized/date": "^3.12.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.17.
|
|
80
|
+
"@box/storybook-utils": "^0.17.20",
|
|
81
81
|
"@figma/code-connect": "1.3.12",
|
|
82
82
|
"@types/react": "^18.0.0",
|
|
83
83
|
"@types/react-dom": "^18.0.0",
|