@react-spectrum/tooltip 3.8.1 → 3.9.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.
- package/dist/import.mjs +2 -4
- package/dist/main.js +3 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -4
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/package.json +12 -35
- package/src/index.ts +3 -3
- package/dist/Tooltip.main.js +0 -80
- package/dist/Tooltip.main.js.map +0 -1
- package/dist/Tooltip.mjs +0 -75
- package/dist/Tooltip.module.js +0 -75
- package/dist/Tooltip.module.js.map +0 -1
- package/dist/TooltipTrigger.main.js +0 -125
- package/dist/TooltipTrigger.main.js.map +0 -1
- package/dist/TooltipTrigger.mjs +0 -116
- package/dist/TooltipTrigger.module.js +0 -116
- package/dist/TooltipTrigger.module.js.map +0 -1
- package/dist/context.main.js +0 -29
- package/dist/context.main.js.map +0 -1
- package/dist/context.mjs +0 -20
- package/dist/context.module.js +0 -20
- package/dist/context.module.js.map +0 -1
- package/dist/tooltip.3b6f471c.css +0 -321
- package/dist/tooltip.3b6f471c.css.map +0 -1
- package/dist/tooltip_vars_css.main.js +0 -107
- package/dist/tooltip_vars_css.main.js.map +0 -1
- package/dist/tooltip_vars_css.mjs +0 -109
- package/dist/tooltip_vars_css.module.js +0 -109
- package/dist/tooltip_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -16
- package/dist/types.d.ts.map +0 -1
- package/src/Tooltip.tsx +0 -83
- package/src/TooltipTrigger.tsx +0 -131
- package/src/context.ts +0 -26
package/dist/TooltipTrigger.mjs
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import {TooltipContext as $b8c00169fae46ac7$export$39ae08fa83328b12} from "./context.mjs";
|
|
2
|
-
import {FocusableProvider as $cQFGy$FocusableProvider} from "@react-aria/focus";
|
|
3
|
-
import {Overlay as $cQFGy$Overlay} from "@react-spectrum/overlays";
|
|
4
|
-
import $cQFGy$react, {useRef as $cQFGy$useRef, useState as $cQFGy$useState} from "react";
|
|
5
|
-
import {useLayoutEffect as $cQFGy$useLayoutEffect} from "@react-aria/utils";
|
|
6
|
-
import {useOverlayPosition as $cQFGy$useOverlayPosition} from "@react-aria/overlays";
|
|
7
|
-
import {useTooltipTrigger as $cQFGy$useTooltipTrigger} from "@react-aria/tooltip";
|
|
8
|
-
import {useTooltipTriggerState as $cQFGy$useTooltipTriggerState} from "@react-stately/tooltip";
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
17
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
18
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19
|
-
* governing permissions and limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const $019364e6919ef1db$var$DEFAULT_OFFSET = -1; // Offset needed to reach 4px/5px (med/large) distance between tooltip and trigger button
|
|
29
|
-
const $019364e6919ef1db$var$DEFAULT_CROSS_OFFSET = 0;
|
|
30
|
-
const $019364e6919ef1db$var$DEFAULT_SHOULD_CLOSE_ON_PRESS = true; // Whether the tooltip should close when the trigger is pressed
|
|
31
|
-
function $019364e6919ef1db$var$TooltipTrigger(props) {
|
|
32
|
-
let { children: children, crossOffset: crossOffset = $019364e6919ef1db$var$DEFAULT_CROSS_OFFSET, isDisabled: isDisabled, offset: offset = $019364e6919ef1db$var$DEFAULT_OFFSET, trigger: triggerAction, shouldCloseOnPress: shouldCloseOnPress = $019364e6919ef1db$var$DEFAULT_SHOULD_CLOSE_ON_PRESS } = props;
|
|
33
|
-
let [trigger, tooltip] = (0, $cQFGy$react).Children.toArray(children);
|
|
34
|
-
let state = (0, $cQFGy$useTooltipTriggerState)(props);
|
|
35
|
-
let tooltipTriggerRef = (0, $cQFGy$useRef)(null);
|
|
36
|
-
let overlayRef = (0, $cQFGy$useRef)(null);
|
|
37
|
-
let { triggerProps: triggerProps, tooltipProps: tooltipProps } = (0, $cQFGy$useTooltipTrigger)({
|
|
38
|
-
isDisabled: isDisabled,
|
|
39
|
-
trigger: triggerAction,
|
|
40
|
-
shouldCloseOnPress: shouldCloseOnPress
|
|
41
|
-
}, state, tooltipTriggerRef);
|
|
42
|
-
let [borderRadius, setBorderRadius] = (0, $cQFGy$useState)(0);
|
|
43
|
-
(0, $cQFGy$useLayoutEffect)(()=>{
|
|
44
|
-
if (overlayRef.current && state.isOpen) {
|
|
45
|
-
let spectrumBorderRadius = window.getComputedStyle(overlayRef.current).borderRadius;
|
|
46
|
-
if (spectrumBorderRadius !== '') setBorderRadius(parseInt(spectrumBorderRadius, 10));
|
|
47
|
-
}
|
|
48
|
-
}, [
|
|
49
|
-
state.isOpen,
|
|
50
|
-
overlayRef
|
|
51
|
-
]);
|
|
52
|
-
let arrowRef = (0, $cQFGy$useRef)(null);
|
|
53
|
-
let [arrowWidth, setArrowWidth] = (0, $cQFGy$useState)(0);
|
|
54
|
-
(0, $cQFGy$useLayoutEffect)(()=>{
|
|
55
|
-
if (arrowRef.current && state.isOpen) setArrowWidth(arrowRef.current.getBoundingClientRect().width);
|
|
56
|
-
}, [
|
|
57
|
-
state.isOpen,
|
|
58
|
-
arrowRef
|
|
59
|
-
]);
|
|
60
|
-
let { overlayProps: overlayProps, arrowProps: arrowProps, placement: placement } = (0, $cQFGy$useOverlayPosition)({
|
|
61
|
-
placement: props.placement || 'top',
|
|
62
|
-
targetRef: tooltipTriggerRef,
|
|
63
|
-
overlayRef: overlayRef,
|
|
64
|
-
offset: offset,
|
|
65
|
-
crossOffset: crossOffset,
|
|
66
|
-
isOpen: state.isOpen,
|
|
67
|
-
shouldFlip: props.shouldFlip,
|
|
68
|
-
containerPadding: props.containerPadding,
|
|
69
|
-
arrowSize: arrowWidth,
|
|
70
|
-
arrowBoundaryOffset: borderRadius,
|
|
71
|
-
onClose: ()=>state.close(true)
|
|
72
|
-
});
|
|
73
|
-
return /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $cQFGy$FocusableProvider), {
|
|
74
|
-
...triggerProps,
|
|
75
|
-
ref: tooltipTriggerRef
|
|
76
|
-
}, trigger, /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $b8c00169fae46ac7$export$39ae08fa83328b12).Provider, {
|
|
77
|
-
value: {
|
|
78
|
-
state: state,
|
|
79
|
-
placement: placement,
|
|
80
|
-
ref: overlayRef,
|
|
81
|
-
UNSAFE_style: overlayProps.style,
|
|
82
|
-
arrowProps: arrowProps,
|
|
83
|
-
arrowRef: arrowRef,
|
|
84
|
-
...tooltipProps
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $cQFGy$Overlay), {
|
|
87
|
-
isOpen: state.isOpen,
|
|
88
|
-
nodeRef: overlayRef
|
|
89
|
-
}, tooltip)));
|
|
90
|
-
}
|
|
91
|
-
// Support TooltipTrigger inside components using CollectionBuilder.
|
|
92
|
-
$019364e6919ef1db$var$TooltipTrigger.getCollectionNode = function*(props) {
|
|
93
|
-
// Replaced the use of React.Children.toArray because it mutates the key prop.
|
|
94
|
-
let childArray = [];
|
|
95
|
-
(0, $cQFGy$react).Children.forEach(props.children, (child)=>{
|
|
96
|
-
if (/*#__PURE__*/ (0, $cQFGy$react).isValidElement(child)) childArray.push(child);
|
|
97
|
-
});
|
|
98
|
-
let [trigger, tooltip] = childArray;
|
|
99
|
-
yield {
|
|
100
|
-
element: trigger,
|
|
101
|
-
wrapper: (element)=>/*#__PURE__*/ (0, $cQFGy$react).createElement($019364e6919ef1db$var$TooltipTrigger, {
|
|
102
|
-
key: element.key,
|
|
103
|
-
...props
|
|
104
|
-
}, element, tooltip)
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing
|
|
109
|
-
* the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip
|
|
110
|
-
* relative to the trigger.
|
|
111
|
-
*/ // We don't want getCollectionNode to show up in the type definition
|
|
112
|
-
let $019364e6919ef1db$export$8c610744efcf8a1d = $019364e6919ef1db$var$TooltipTrigger;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export {$019364e6919ef1db$export$8c610744efcf8a1d as TooltipTrigger};
|
|
116
|
-
//# sourceMappingURL=TooltipTrigger.module.js.map
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import {TooltipContext as $b8c00169fae46ac7$export$39ae08fa83328b12} from "./context.module.js";
|
|
2
|
-
import {FocusableProvider as $cQFGy$FocusableProvider} from "@react-aria/focus";
|
|
3
|
-
import {Overlay as $cQFGy$Overlay} from "@react-spectrum/overlays";
|
|
4
|
-
import $cQFGy$react, {useRef as $cQFGy$useRef, useState as $cQFGy$useState} from "react";
|
|
5
|
-
import {useLayoutEffect as $cQFGy$useLayoutEffect} from "@react-aria/utils";
|
|
6
|
-
import {useOverlayPosition as $cQFGy$useOverlayPosition} from "@react-aria/overlays";
|
|
7
|
-
import {useTooltipTrigger as $cQFGy$useTooltipTrigger} from "@react-aria/tooltip";
|
|
8
|
-
import {useTooltipTriggerState as $cQFGy$useTooltipTriggerState} from "@react-stately/tooltip";
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
17
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
18
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19
|
-
* governing permissions and limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const $019364e6919ef1db$var$DEFAULT_OFFSET = -1; // Offset needed to reach 4px/5px (med/large) distance between tooltip and trigger button
|
|
29
|
-
const $019364e6919ef1db$var$DEFAULT_CROSS_OFFSET = 0;
|
|
30
|
-
const $019364e6919ef1db$var$DEFAULT_SHOULD_CLOSE_ON_PRESS = true; // Whether the tooltip should close when the trigger is pressed
|
|
31
|
-
function $019364e6919ef1db$var$TooltipTrigger(props) {
|
|
32
|
-
let { children: children, crossOffset: crossOffset = $019364e6919ef1db$var$DEFAULT_CROSS_OFFSET, isDisabled: isDisabled, offset: offset = $019364e6919ef1db$var$DEFAULT_OFFSET, trigger: triggerAction, shouldCloseOnPress: shouldCloseOnPress = $019364e6919ef1db$var$DEFAULT_SHOULD_CLOSE_ON_PRESS } = props;
|
|
33
|
-
let [trigger, tooltip] = (0, $cQFGy$react).Children.toArray(children);
|
|
34
|
-
let state = (0, $cQFGy$useTooltipTriggerState)(props);
|
|
35
|
-
let tooltipTriggerRef = (0, $cQFGy$useRef)(null);
|
|
36
|
-
let overlayRef = (0, $cQFGy$useRef)(null);
|
|
37
|
-
let { triggerProps: triggerProps, tooltipProps: tooltipProps } = (0, $cQFGy$useTooltipTrigger)({
|
|
38
|
-
isDisabled: isDisabled,
|
|
39
|
-
trigger: triggerAction,
|
|
40
|
-
shouldCloseOnPress: shouldCloseOnPress
|
|
41
|
-
}, state, tooltipTriggerRef);
|
|
42
|
-
let [borderRadius, setBorderRadius] = (0, $cQFGy$useState)(0);
|
|
43
|
-
(0, $cQFGy$useLayoutEffect)(()=>{
|
|
44
|
-
if (overlayRef.current && state.isOpen) {
|
|
45
|
-
let spectrumBorderRadius = window.getComputedStyle(overlayRef.current).borderRadius;
|
|
46
|
-
if (spectrumBorderRadius !== '') setBorderRadius(parseInt(spectrumBorderRadius, 10));
|
|
47
|
-
}
|
|
48
|
-
}, [
|
|
49
|
-
state.isOpen,
|
|
50
|
-
overlayRef
|
|
51
|
-
]);
|
|
52
|
-
let arrowRef = (0, $cQFGy$useRef)(null);
|
|
53
|
-
let [arrowWidth, setArrowWidth] = (0, $cQFGy$useState)(0);
|
|
54
|
-
(0, $cQFGy$useLayoutEffect)(()=>{
|
|
55
|
-
if (arrowRef.current && state.isOpen) setArrowWidth(arrowRef.current.getBoundingClientRect().width);
|
|
56
|
-
}, [
|
|
57
|
-
state.isOpen,
|
|
58
|
-
arrowRef
|
|
59
|
-
]);
|
|
60
|
-
let { overlayProps: overlayProps, arrowProps: arrowProps, placement: placement } = (0, $cQFGy$useOverlayPosition)({
|
|
61
|
-
placement: props.placement || 'top',
|
|
62
|
-
targetRef: tooltipTriggerRef,
|
|
63
|
-
overlayRef: overlayRef,
|
|
64
|
-
offset: offset,
|
|
65
|
-
crossOffset: crossOffset,
|
|
66
|
-
isOpen: state.isOpen,
|
|
67
|
-
shouldFlip: props.shouldFlip,
|
|
68
|
-
containerPadding: props.containerPadding,
|
|
69
|
-
arrowSize: arrowWidth,
|
|
70
|
-
arrowBoundaryOffset: borderRadius,
|
|
71
|
-
onClose: ()=>state.close(true)
|
|
72
|
-
});
|
|
73
|
-
return /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $cQFGy$FocusableProvider), {
|
|
74
|
-
...triggerProps,
|
|
75
|
-
ref: tooltipTriggerRef
|
|
76
|
-
}, trigger, /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $b8c00169fae46ac7$export$39ae08fa83328b12).Provider, {
|
|
77
|
-
value: {
|
|
78
|
-
state: state,
|
|
79
|
-
placement: placement,
|
|
80
|
-
ref: overlayRef,
|
|
81
|
-
UNSAFE_style: overlayProps.style,
|
|
82
|
-
arrowProps: arrowProps,
|
|
83
|
-
arrowRef: arrowRef,
|
|
84
|
-
...tooltipProps
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/ (0, $cQFGy$react).createElement((0, $cQFGy$Overlay), {
|
|
87
|
-
isOpen: state.isOpen,
|
|
88
|
-
nodeRef: overlayRef
|
|
89
|
-
}, tooltip)));
|
|
90
|
-
}
|
|
91
|
-
// Support TooltipTrigger inside components using CollectionBuilder.
|
|
92
|
-
$019364e6919ef1db$var$TooltipTrigger.getCollectionNode = function*(props) {
|
|
93
|
-
// Replaced the use of React.Children.toArray because it mutates the key prop.
|
|
94
|
-
let childArray = [];
|
|
95
|
-
(0, $cQFGy$react).Children.forEach(props.children, (child)=>{
|
|
96
|
-
if (/*#__PURE__*/ (0, $cQFGy$react).isValidElement(child)) childArray.push(child);
|
|
97
|
-
});
|
|
98
|
-
let [trigger, tooltip] = childArray;
|
|
99
|
-
yield {
|
|
100
|
-
element: trigger,
|
|
101
|
-
wrapper: (element)=>/*#__PURE__*/ (0, $cQFGy$react).createElement($019364e6919ef1db$var$TooltipTrigger, {
|
|
102
|
-
key: element.key,
|
|
103
|
-
...props
|
|
104
|
-
}, element, tooltip)
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing
|
|
109
|
-
* the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip
|
|
110
|
-
* relative to the trigger.
|
|
111
|
-
*/ // We don't want getCollectionNode to show up in the type definition
|
|
112
|
-
let $019364e6919ef1db$export$8c610744efcf8a1d = $019364e6919ef1db$var$TooltipTrigger;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export {$019364e6919ef1db$export$8c610744efcf8a1d as TooltipTrigger};
|
|
116
|
-
//# sourceMappingURL=TooltipTrigger.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAYD,MAAM,uCAAiB,IAAI,yFAAyF;AACpH,MAAM,6CAAuB;AAC7B,MAAM,sDAAgC,MAAM,+DAA+D;AAE3G,SAAS,qCAAe,KAAkC;IACxD,IAAI,YACF,QAAQ,eACR,cAAc,wDACd,UAAU,UACV,SAAS,sCACT,SAAS,aAAa,sBACtB,qBAAqB,qDACtB,GAAG;IAEJ,IAAI,CAAC,SAAS,QAAQ,GAAG,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IAChD,IAAI,QAAQ,CAAA,GAAA,6BAAqB,EAAE;IAEnC,IAAI,oBAAoB,CAAA,GAAA,aAAK,EAAe;IAC5C,IAAI,aAAa,CAAA,GAAA,aAAK,EAAkB;IAExC,IAAI,gBAAC,YAAY,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;oBACnD;QACA,SAAS;4BACT;IACF,GAAG,OAAO;IAEV,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,eAAO,EAAE;IAC/C,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,WAAW,OAAO,IAAI,MAAM,MAAM,EAAE;YACtC,IAAI,uBAAuB,OAAO,gBAAgB,CAAC,WAAW,OAAO,EAAE,YAAY;YACnF,IAAI,yBAAyB,IAC3B,gBAAgB,SAAS,sBAAsB;QAEnD;IACF,GAAG;QAAC,MAAM,MAAM;QAAE;KAAW;IAC7B,IAAI,WAAW,CAAA,GAAA,aAAK,EAAe;IACnC,IAAI,CAAC,YAAY,cAAc,GAAG,CAAA,GAAA,eAAO,EAAE;IAC3C,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,SAAS,OAAO,IAAI,MAAM,MAAM,EAClC,cAAc,SAAS,OAAO,CAAC,qBAAqB,GAAG,KAAK;IAEhE,GAAG;QAAC,MAAM,MAAM;QAAE;KAAS;IAE3B,IAAI,gBAAC,YAAY,cAAE,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,yBAAiB,EAAE;QAC7D,WAAW,MAAM,SAAS,IAAI;QAC9B,WAAW;oBACX;gBACA;qBACA;QACA,QAAQ,MAAM,MAAM;QACpB,YAAY,MAAM,UAAU;QAC5B,kBAAkB,MAAM,gBAAgB;QACxC,WAAW;QACX,qBAAqB;QACrB,SAAS,IAAM,MAAM,KAAK,CAAC;IAC7B;IAEA,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QACd,GAAG,YAAY;QAChB,KAAK;OACJ,uBACD,gCAAC,CAAA,GAAA,yCAAa,EAAE,QAAQ;QACtB,OAAO;mBACL;uBACA;YACA,KAAK;YACL,cAAc,aAAa,KAAK;wBAChC;YACA,UAAU;YACV,GAAG,YAAY;QACjB;qBACA,gCAAC,CAAA,GAAA,cAAM;QAAE,QAAQ,MAAM,MAAM;QAAE,SAAS;OACrC;AAKX;AAEA,oEAAoE;AACpE,qCAAe,iBAAiB,GAAG,UAAW,KAAkC;IAC9E,8EAA8E;IAC9E,IAAI,aAA6B,EAAE;IACnC,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,CAAA;QACrC,kBAAI,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC,QACvB,WAAW,IAAI,CAAC;IAEpB;IACA,IAAI,CAAC,SAAS,QAAQ,GAAG;IACzB,MAAM;QACJ,SAAS;QACT,SAAS,CAAC,wBACR,gCAAC;gBAAe,KAAK,QAAQ,GAAG;gBAAG,GAAG,KAAK;eACxC,SACA;IAGP;AACF;AAEA;;;;CAIC,GACD,oEAAoE;AACpE,IAAI,4CAAkB","sources":["packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableProvider} from '@react-aria/focus';\nimport {Overlay} from '@react-spectrum/overlays';\nimport React, {JSX, ReactElement, useRef, useState} from 'react';\nimport {SpectrumTooltipTriggerProps} from '@react-types/tooltip';\nimport {TooltipContext} from './context';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useOverlayPosition} from '@react-aria/overlays';\nimport {useTooltipTrigger} from '@react-aria/tooltip';\nimport {useTooltipTriggerState} from '@react-stately/tooltip';\n\nconst DEFAULT_OFFSET = -1; // Offset needed to reach 4px/5px (med/large) distance between tooltip and trigger button\nconst DEFAULT_CROSS_OFFSET = 0;\nconst DEFAULT_SHOULD_CLOSE_ON_PRESS = true; // Whether the tooltip should close when the trigger is pressed\n\nfunction TooltipTrigger(props: SpectrumTooltipTriggerProps) {\n let {\n children,\n crossOffset = DEFAULT_CROSS_OFFSET,\n isDisabled,\n offset = DEFAULT_OFFSET,\n trigger: triggerAction,\n shouldCloseOnPress = DEFAULT_SHOULD_CLOSE_ON_PRESS\n } = props;\n\n let [trigger, tooltip] = React.Children.toArray(children) as [ReactElement, ReactElement];\n let state = useTooltipTriggerState(props);\n\n let tooltipTriggerRef = useRef<HTMLElement>(null);\n let overlayRef = useRef<HTMLDivElement>(null);\n\n let {triggerProps, tooltipProps} = useTooltipTrigger({\n isDisabled,\n trigger: triggerAction,\n shouldCloseOnPress\n }, state, tooltipTriggerRef);\n\n let [borderRadius, setBorderRadius] = useState(0);\n useLayoutEffect(() => {\n if (overlayRef.current && state.isOpen) {\n let spectrumBorderRadius = window.getComputedStyle(overlayRef.current).borderRadius;\n if (spectrumBorderRadius !== '') {\n setBorderRadius(parseInt(spectrumBorderRadius, 10));\n }\n }\n }, [state.isOpen, overlayRef]);\n let arrowRef = useRef<HTMLElement>(null);\n let [arrowWidth, setArrowWidth] = useState(0);\n useLayoutEffect(() => {\n if (arrowRef.current && state.isOpen) {\n setArrowWidth(arrowRef.current.getBoundingClientRect().width);\n }\n }, [state.isOpen, arrowRef]);\n\n let {overlayProps, arrowProps, placement} = useOverlayPosition({\n placement: props.placement || 'top',\n targetRef: tooltipTriggerRef,\n overlayRef,\n offset,\n crossOffset,\n isOpen: state.isOpen,\n shouldFlip: props.shouldFlip,\n containerPadding: props.containerPadding,\n arrowSize: arrowWidth,\n arrowBoundaryOffset: borderRadius,\n onClose: () => state.close(true)\n });\n\n return (\n <FocusableProvider\n {...triggerProps}\n ref={tooltipTriggerRef}>\n {trigger}\n <TooltipContext.Provider\n value={{\n state,\n placement,\n ref: overlayRef,\n UNSAFE_style: overlayProps.style,\n arrowProps,\n arrowRef: arrowRef,\n ...tooltipProps\n }}>\n <Overlay isOpen={state.isOpen} nodeRef={overlayRef}>\n {tooltip}\n </Overlay>\n </TooltipContext.Provider>\n </FocusableProvider>\n );\n}\n\n// Support TooltipTrigger inside components using CollectionBuilder.\nTooltipTrigger.getCollectionNode = function* (props: SpectrumTooltipTriggerProps) {\n // Replaced the use of React.Children.toArray because it mutates the key prop.\n let childArray: ReactElement[] = [];\n React.Children.forEach(props.children, child => {\n if (React.isValidElement(child)) {\n childArray.push(child);\n }\n });\n let [trigger, tooltip] = childArray;\n yield {\n element: trigger,\n wrapper: (element) => (\n <TooltipTrigger key={element.key} {...props}>\n {element}\n {tooltip}\n </TooltipTrigger>\n )\n };\n};\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing\n * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip\n * relative to the trigger.\n */\n// We don't want getCollectionNode to show up in the type definition\nlet _TooltipTrigger = TooltipTrigger as (props: SpectrumTooltipTriggerProps) => JSX.Element;\nexport {_TooltipTrigger as TooltipTrigger};\n"],"names":[],"version":3,"file":"TooltipTrigger.module.js.map"}
|
package/dist/context.main.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var $aZ3Gf$react = require("react");
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function $parcel$interopDefault(a) {
|
|
5
|
-
return a && a.__esModule ? a.default : a;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function $parcel$export(e, n, v, s) {
|
|
9
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
$parcel$export(module.exports, "TooltipContext", () => $ed2e56c8503433b4$export$39ae08fa83328b12);
|
|
13
|
-
/*
|
|
14
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
-
*
|
|
19
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
-
* governing permissions and limitations under the License.
|
|
23
|
-
*/
|
|
24
|
-
const $ed2e56c8503433b4$export$39ae08fa83328b12 = (0, ($parcel$interopDefault($aZ3Gf$react))).createContext({
|
|
25
|
-
placement: null
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=context.main.js.map
|
package/dist/context.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAeM,MAAM,4CAAiB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAsB;IAAC,WAAW;AAAI","sources":["packages/@react-spectrum/tooltip/src/context.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {PlacementAxis} from '@react-types/overlays';\nimport React, {HTMLAttributes} from 'react';\nimport {RefObject, StyleProps} from '@react-types/shared';\nimport {TooltipTriggerState} from '@react-stately/tooltip';\n\ninterface TooltipContextProps extends StyleProps {\n state?: TooltipTriggerState,\n ref?: RefObject<HTMLDivElement | null>,\n placement: PlacementAxis | null,\n arrowProps?: HTMLAttributes<HTMLElement>,\n arrowRef?: RefObject<HTMLElement | null>\n}\n\nexport const TooltipContext = React.createContext<TooltipContextProps>({placement: null});\n"],"names":[],"version":3,"file":"context.main.js.map"}
|
package/dist/context.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import $kNnxj$react from "react";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
*
|
|
9
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
-
* governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
const $b8c00169fae46ac7$export$39ae08fa83328b12 = (0, $kNnxj$react).createContext({
|
|
15
|
-
placement: null
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export {$b8c00169fae46ac7$export$39ae08fa83328b12 as TooltipContext};
|
|
20
|
-
//# sourceMappingURL=context.module.js.map
|
package/dist/context.module.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import $kNnxj$react from "react";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
*
|
|
9
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
-
* governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
const $b8c00169fae46ac7$export$39ae08fa83328b12 = (0, $kNnxj$react).createContext({
|
|
15
|
-
placement: null
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export {$b8c00169fae46ac7$export$39ae08fa83328b12 as TooltipContext};
|
|
20
|
-
//# sourceMappingURL=context.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAeM,MAAM,4CAAiB,CAAA,GAAA,YAAI,EAAE,aAAa,CAAsB;IAAC,WAAW;AAAI","sources":["packages/@react-spectrum/tooltip/src/context.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {PlacementAxis} from '@react-types/overlays';\nimport React, {HTMLAttributes} from 'react';\nimport {RefObject, StyleProps} from '@react-types/shared';\nimport {TooltipTriggerState} from '@react-stately/tooltip';\n\ninterface TooltipContextProps extends StyleProps {\n state?: TooltipTriggerState,\n ref?: RefObject<HTMLDivElement | null>,\n placement: PlacementAxis | null,\n arrowProps?: HTMLAttributes<HTMLElement>,\n arrowRef?: RefObject<HTMLElement | null>\n}\n\nexport const TooltipContext = React.createContext<TooltipContextProps>({placement: null});\n"],"names":[],"version":3,"file":"context.module.js.map"}
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
.uv8yQW_i18nFontFamily {
|
|
2
|
-
font-synthesis: weight;
|
|
3
|
-
font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.uv8yQW_i18nFontFamily:lang(ar) {
|
|
7
|
-
font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.uv8yQW_i18nFontFamily:lang(he) {
|
|
11
|
-
font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.uv8yQW_i18nFontFamily:lang(zh) {
|
|
15
|
-
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.uv8yQW_i18nFontFamily:lang(zh-Hans) {
|
|
19
|
-
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.uv8yQW_i18nFontFamily:lang(zh-Hant) {
|
|
23
|
-
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.uv8yQW_i18nFontFamily:lang(zh-SG), .uv8yQW_i18nFontFamily:lang(zh-CN) {
|
|
27
|
-
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.uv8yQW_i18nFontFamily:lang(ko) {
|
|
31
|
-
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.uv8yQW_i18nFontFamily:lang(ja) {
|
|
35
|
-
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.uv8yQW_spectrum-FocusRing-ring {
|
|
39
|
-
--spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
|
|
40
|
-
--spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
|
|
41
|
-
--spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
|
|
42
|
-
--spectrum-focus-ring-border-size: 0px;
|
|
43
|
-
--spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.uv8yQW_spectrum-FocusRing-ring:after {
|
|
47
|
-
border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
|
|
48
|
-
content: "";
|
|
49
|
-
margin: calc(-1 * var(--spectrum-focus-ring-border-size));
|
|
50
|
-
pointer-events: none;
|
|
51
|
-
transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
|
|
52
|
-
display: block;
|
|
53
|
-
position: absolute;
|
|
54
|
-
inset: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.uv8yQW_spectrum-FocusRing.uv8yQW_focus-ring:after {
|
|
58
|
-
margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
|
|
59
|
-
box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.uv8yQW_spectrum-FocusRing--quiet:after {
|
|
63
|
-
border-radius: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.uv8yQW_spectrum-FocusRing--quiet.uv8yQW_focus-ring:after {
|
|
67
|
-
margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
|
|
68
|
-
box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@media (forced-colors: active) {
|
|
72
|
-
.uv8yQW_spectrum-FocusRing, .uv8yQW_spectrum-FocusRing-ring, .uv8yQW_spectrum-FocusRing--quiet {
|
|
73
|
-
--spectrum-high-contrast-focus-ring-color: Highlight;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:is(.uv8yQW_spectrum-FocusRing, .uv8yQW_spectrum-FocusRing-ring, .uv8yQW_spectrum-FocusRing--quiet):after {
|
|
77
|
-
forced-color-adjust: none;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.uv8yQW_spectrum-overlay {
|
|
82
|
-
visibility: hidden;
|
|
83
|
-
opacity: 0;
|
|
84
|
-
transition: transform var(--spectrum-global-animation-duration-100, .13s) ease-in-out, opacity var(--spectrum-global-animation-duration-100, .13s) ease-in-out, visibility 0s linear var(--spectrum-global-animation-duration-100, .13s);
|
|
85
|
-
pointer-events: none;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.uv8yQW_spectrum-overlay--open {
|
|
89
|
-
visibility: visible;
|
|
90
|
-
opacity: .9999;
|
|
91
|
-
pointer-events: auto;
|
|
92
|
-
transition-delay: 0s;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.uv8yQW_spectrum-overlay--bottom--open {
|
|
96
|
-
transform: translateY(var(--spectrum-overlay-positive-transform-distance));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.uv8yQW_spectrum-overlay--top--open {
|
|
100
|
-
transform: translateY(var(--spectrum-overlay-negative-transform-distance));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.uv8yQW_spectrum-overlay--right--open {
|
|
104
|
-
transform: translateX(var(--spectrum-overlay-positive-transform-distance));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.uv8yQW_spectrum-overlay--left--open {
|
|
108
|
-
transform: translateX(var(--spectrum-overlay-negative-transform-distance));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.uv8yQW_spectrum-Tooltip {
|
|
112
|
-
box-sizing: border-box;
|
|
113
|
-
vertical-align: top;
|
|
114
|
-
inline-size: auto;
|
|
115
|
-
padding: var(--spectrum-tooltip-padding-top, var(--spectrum-global-dimension-size-50)) var(--spectrum-tooltip-padding-x, var(--spectrum-global-dimension-size-125));
|
|
116
|
-
border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
|
117
|
-
min-block-size: var(--spectrum-tooltip-min-height, var(--spectrum-global-dimension-size-300));
|
|
118
|
-
font-size: var(--spectrum-tooltip-text-size, var(--spectrum-global-dimension-font-size-75));
|
|
119
|
-
font-weight: var(--spectrum-tooltip-text-font-weight, var(--spectrum-global-font-weight-regular));
|
|
120
|
-
line-height: var(--spectrum-tooltip-text-line-height, var(--spectrum-global-dimension-font-size-200));
|
|
121
|
-
word-break: break-word;
|
|
122
|
-
-webkit-font-smoothing: antialiased;
|
|
123
|
-
cursor: default;
|
|
124
|
-
-webkit-user-select: none;
|
|
125
|
-
user-select: none;
|
|
126
|
-
flex-direction: row;
|
|
127
|
-
align-items: center;
|
|
128
|
-
display: inline-flex;
|
|
129
|
-
position: relative;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.uv8yQW_spectrum-Tooltip p {
|
|
133
|
-
margin: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.uv8yQW_spectrum-Tooltip-tip {
|
|
137
|
-
border-width: var(--spectrum-tooltip-tip-height, var(--spectrum-global-dimension-size-50));
|
|
138
|
-
border-style: solid;
|
|
139
|
-
border-bottom-color: #0000;
|
|
140
|
-
border-left-color: #0000;
|
|
141
|
-
border-right-color: #0000;
|
|
142
|
-
width: 0;
|
|
143
|
-
height: 0;
|
|
144
|
-
position: absolute;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:is(.uv8yQW_spectrum-Tooltip--right, .uv8yQW_spectrum-Tooltip--left) .uv8yQW_spectrum-Tooltip-tip {
|
|
148
|
-
margin-top: calc(var(--spectrum-tooltip-tip-height, var(--spectrum-global-dimension-size-50)) * -1);
|
|
149
|
-
top: 50%;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.uv8yQW_spectrum-Tooltip--right {
|
|
153
|
-
margin-left: var(--spectrum-global-dimension-size-40);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.uv8yQW_spectrum-Tooltip--right .uv8yQW_spectrum-Tooltip-tip {
|
|
157
|
-
right: 100%;
|
|
158
|
-
transform: rotate(90deg);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.uv8yQW_spectrum-Tooltip--left {
|
|
162
|
-
margin-right: var(--spectrum-global-dimension-size-40);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.uv8yQW_spectrum-Tooltip--left .uv8yQW_spectrum-Tooltip-tip {
|
|
166
|
-
left: 100%;
|
|
167
|
-
transform: rotate(-90deg);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.uv8yQW_spectrum-Tooltip--top {
|
|
171
|
-
margin-bottom: var(--spectrum-global-dimension-size-40);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.uv8yQW_spectrum-Tooltip--top .uv8yQW_spectrum-Tooltip-tip {
|
|
175
|
-
top: 100%;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.uv8yQW_spectrum-Tooltip--bottom {
|
|
179
|
-
margin-top: var(--spectrum-global-dimension-size-40);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.uv8yQW_spectrum-Tooltip--bottom .uv8yQW_spectrum-Tooltip-tip {
|
|
183
|
-
bottom: 100%;
|
|
184
|
-
transform: rotate(-180deg);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
:is(.uv8yQW_spectrum-Tooltip--bottom, .uv8yQW_spectrum-Tooltip--top) .uv8yQW_spectrum-Tooltip-tip {
|
|
188
|
-
margin-left: calc(var(--spectrum-tooltip-tip-height, var(--spectrum-global-dimension-size-50)) * -1);
|
|
189
|
-
left: 50%;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.uv8yQW_spectrum-Tooltip-typeIcon {
|
|
193
|
-
inline-size: var(--spectrum-tooltip-icon-size, var(--spectrum-global-dimension-size-175));
|
|
194
|
-
block-size: var(--spectrum-tooltip-icon-size, var(--spectrum-global-dimension-size-175));
|
|
195
|
-
margin-inline-start: calc(var(--spectrum-tooltip-icon-margin-x, var(--spectrum-global-dimension-size-100)) - var(--spectrum-tooltip-padding-x, var(--spectrum-global-dimension-size-125)));
|
|
196
|
-
margin-inline-end: var(--spectrum-tooltip-icon-margin-x, var(--spectrum-global-dimension-size-100));
|
|
197
|
-
align-self: flex-start;
|
|
198
|
-
margin-top: 1px;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.uv8yQW_spectrum-Tooltip-label {
|
|
202
|
-
max-inline-size: var(--spectrum-tooltip-content-max-width);
|
|
203
|
-
line-height: var(--spectrum-tooltip-text-line-height, var(--spectrum-global-dimension-font-size-200));
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.uv8yQW_u-tooltip-showOnHover {
|
|
207
|
-
display: inline-block;
|
|
208
|
-
position: relative;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip {
|
|
212
|
-
white-space: nowrap;
|
|
213
|
-
transition: transform var(--spectrum-global-animation-duration-100, .13s) ease-in-out;
|
|
214
|
-
position: absolute;
|
|
215
|
-
top: -100%;
|
|
216
|
-
visibility: visible !important;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip-label {
|
|
220
|
-
max-inline-size: none;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--right, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--right .uv8yQW_spectrum-Tooltip-tip, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--left, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--left .uv8yQW_spectrum-Tooltip-tip {
|
|
224
|
-
top: 50%;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--right {
|
|
228
|
-
left: 100%;
|
|
229
|
-
transform: translate(0, -50%);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--left {
|
|
233
|
-
transform: translate(-100%, -50%);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--bottom, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--bottom .uv8yQW_spectrum-Tooltip-tip, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--top, .uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--top .uv8yQW_spectrum-Tooltip-tip {
|
|
237
|
-
left: 50%;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--bottom {
|
|
241
|
-
transform: translate(-50%, calc(var(--spectrum-tooltip-tip-margin, var(--spectrum-global-dimension-size-50)) * -1));
|
|
242
|
-
top: 100%;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.uv8yQW_u-tooltip-showOnHover .uv8yQW_spectrum-Tooltip--top {
|
|
246
|
-
transform: translate(-50%, var(--spectrum-tooltip-tip-margin, var(--spectrum-global-dimension-size-50)));
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.uv8yQW_u-tooltip-showOnHover.uv8yQW_is-hovered .uv8yQW_spectrum-Tooltip, .uv8yQW_u-tooltip-showOnHover:focus .uv8yQW_spectrum-Tooltip, .uv8yQW_u-tooltip-showOnHover.uv8yQW_is-focused .uv8yQW_spectrum-Tooltip, .uv8yQW_u-tooltip-showOnHover :focus .uv8yQW_spectrum-Tooltip {
|
|
250
|
-
opacity: 1;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.uv8yQW_u-tooltip-showOnHover.uv8yQW_is-hovered .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--bottom, .uv8yQW_u-tooltip-showOnHover:focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--bottom, .uv8yQW_u-tooltip-showOnHover.uv8yQW_is-focused .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--bottom, .uv8yQW_u-tooltip-showOnHover :focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--bottom {
|
|
254
|
-
transform: translate(-50%);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.uv8yQW_u-tooltip-showOnHover.uv8yQW_is-hovered .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--top, .uv8yQW_u-tooltip-showOnHover:focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--top, .uv8yQW_u-tooltip-showOnHover.uv8yQW_is-focused .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--top, .uv8yQW_u-tooltip-showOnHover :focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--top {
|
|
258
|
-
transform: translate(-50%, calc(var(--spectrum-tooltip-tip-margin, var(--spectrum-global-dimension-size-50)) * -1));
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.uv8yQW_u-tooltip-showOnHover.uv8yQW_is-hovered .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--left, .uv8yQW_u-tooltip-showOnHover:focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--left, .uv8yQW_u-tooltip-showOnHover.uv8yQW_is-focused .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--left, .uv8yQW_u-tooltip-showOnHover :focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--left {
|
|
262
|
-
transform: translate(calc(-100% - var(--spectrum-tooltip-tip-margin, var(--spectrum-global-dimension-size-50))), -50%);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.uv8yQW_u-tooltip-showOnHover.uv8yQW_is-hovered .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--right, .uv8yQW_u-tooltip-showOnHover:focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--right, .uv8yQW_u-tooltip-showOnHover.uv8yQW_is-focused .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--right, .uv8yQW_u-tooltip-showOnHover :focus .uv8yQW_spectrum-Tooltip.uv8yQW_spectrum-Tooltip--right {
|
|
266
|
-
transform: translate(var(--spectrum-tooltip-tip-margin, var(--spectrum-global-dimension-size-50)), -50%);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.uv8yQW_spectrum-Tooltip {
|
|
270
|
-
--spectrum-tooltip-background-color: var(--spectrum-alias-neutral-background-color);
|
|
271
|
-
--spectrum-tooltip-negative-background-color: var(--spectrum-negative-background-color-default);
|
|
272
|
-
--spectrum-tooltip-positive-background-color: var(--spectrum-positive-background-color-default);
|
|
273
|
-
--spectrum-tooltip-info-background-color: var(--spectrum-informative-background-color-default);
|
|
274
|
-
background-color: var(--spectrum-tooltip-background-color, var(--spectrum-global-color-static-gray-700));
|
|
275
|
-
color: var(--spectrum-tooltip-text-color, var(--spectrum-global-color-static-white));
|
|
276
|
-
-webkit-filter: var(--spectrum-tooltip-dropshadow);
|
|
277
|
-
will-change: filter;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.uv8yQW_spectrum-Tooltip-tip {
|
|
281
|
-
border-top-color: var(--spectrum-tooltip-background-color, var(--spectrum-global-color-static-gray-700));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.uv8yQW_spectrum-Tooltip--negative, .uv8yQW_spectrum-Tooltip--error {
|
|
285
|
-
background-color: var(--spectrum-tooltip-negative-background-color, var(--spectrum-global-color-static-red-700));
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
:is(.uv8yQW_spectrum-Tooltip--negative, .uv8yQW_spectrum-Tooltip--error) .uv8yQW_spectrum-Tooltip-tip {
|
|
289
|
-
border-top-color: var(--spectrum-tooltip-negative-background-color, var(--spectrum-global-color-static-red-700));
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.uv8yQW_spectrum-Tooltip--info, .uv8yQW_spectrum-Tooltip--help {
|
|
293
|
-
background-color: var(--spectrum-tooltip-info-background-color, var(--spectrum-global-color-static-blue-700));
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
:is(.uv8yQW_spectrum-Tooltip--info, .uv8yQW_spectrum-Tooltip--help) .uv8yQW_spectrum-Tooltip-tip {
|
|
297
|
-
border-top-color: var(--spectrum-tooltip-info-background-color, var(--spectrum-global-color-static-blue-700));
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.uv8yQW_spectrum-Tooltip--positive, .uv8yQW_spectrum-Tooltip--success {
|
|
301
|
-
background-color: var(--spectrum-tooltip-positive-background-color, var(--spectrum-global-color-static-green-700));
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
:is(.uv8yQW_spectrum-Tooltip--positive, .uv8yQW_spectrum-Tooltip--success) .uv8yQW_spectrum-Tooltip-tip {
|
|
305
|
-
border-top-color: var(--spectrum-tooltip-positive-background-color, var(--spectrum-global-color-static-green-700));
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
@media (forced-colors: active) {
|
|
309
|
-
.uv8yQW_spectrum-Tooltip {
|
|
310
|
-
border: 1px solid #0000;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.uv8yQW_spectrum-Tooltip-tip {
|
|
314
|
-
forced-color-adjust: none;
|
|
315
|
-
--spectrum-tooltip-background-color: CanvasText;
|
|
316
|
-
--spectrum-tooltip-negative-background-color: Highlight;
|
|
317
|
-
--spectrum-tooltip-info-background-color: Highlight;
|
|
318
|
-
--spectrum-tooltip-positive-background-color: Highlight;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
/*# sourceMappingURL=tooltip.3b6f471c.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AA+BE;;;;AASF;;;;;;;;;;;AAeE;;;;;AAMF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;AASF;;;;AAEE;;;;;AAYA;;;;;AAMF;;;;;;;;;AAWA;;;;;AAOA;;;;;AAIE;;;;;;;;AASA;;;;AAKA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAoBF;;;;;;;;;;;AAgBA;;;;AAIA;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;EACE;;;;EAGA","sources":["packages/@adobe/spectrum-css-temp/components/tooltip/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"tooltip.3b6f471c.css.map"}
|