@react-stately/tooltip 3.0.6-nightly.3036 → 3.0.6-nightly.3047

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/main.js CHANGED
@@ -1,143 +1,124 @@
1
- var {
2
- useOverlayTriggerState
3
- } = require("@react-stately/overlays");
1
+ var $cIaZU$react = require("react");
2
+ var $cIaZU$reactstatelyoverlays = require("@react-stately/overlays");
4
3
 
5
- var {
6
- useEffect,
7
- useMemo,
8
- useRef
9
- } = require("react");
10
-
11
- const $dbf206483fc3f3f5862f69116107e0c$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design
12
-
13
- const $dbf206483fc3f3f5862f69116107e0c$var$TOOLTIP_COOLDOWN = 500;
14
- let $dbf206483fc3f3f5862f69116107e0c$var$tooltips = {};
15
- let $dbf206483fc3f3f5862f69116107e0c$var$tooltipId = 0;
16
- let $dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp = false;
17
- let $dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout = null;
18
- let $dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout = null;
19
- /**
20
- * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides
21
- * methods to toggle this state. Ensures only one tooltip is open at a time and controls
22
- * the delay for showing a tooltip.
23
- */
24
-
25
- function useTooltipTriggerState(props) {
26
- if (props === void 0) {
27
- props = {};
28
- }
29
-
30
- let {
31
- delay = $dbf206483fc3f3f5862f69116107e0c$var$TOOLTIP_DELAY
32
- } = props;
33
- let {
34
- isOpen,
35
- open,
36
- close
37
- } = useOverlayTriggerState(props);
38
- let id = useMemo(() => "" + ++$dbf206483fc3f3f5862f69116107e0c$var$tooltipId, []);
39
- let closeTimeout = useRef();
40
-
41
- let ensureTooltipEntry = () => {
42
- $dbf206483fc3f3f5862f69116107e0c$var$tooltips[id] = hideTooltip;
43
- };
44
-
45
- let closeOpenTooltips = () => {
46
- for (let hideTooltipId in $dbf206483fc3f3f5862f69116107e0c$var$tooltips) {
47
- if (hideTooltipId !== id) {
48
- $dbf206483fc3f3f5862f69116107e0c$var$tooltips[hideTooltipId](true);
49
- delete $dbf206483fc3f3f5862f69116107e0c$var$tooltips[hideTooltipId];
50
- }
51
- }
52
- };
53
-
54
- let showTooltip = () => {
55
- clearTimeout(closeTimeout.current);
56
- closeTimeout.current = null;
57
- closeOpenTooltips();
58
- ensureTooltipEntry();
59
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp = true;
60
- open();
61
-
62
- if ($dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout) {
63
- clearTimeout($dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout);
64
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout = null;
65
- }
66
-
67
- if ($dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout) {
68
- clearTimeout($dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout);
69
- $dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout = null;
4
+ function $parcel$exportWildcard(dest, source) {
5
+ Object.keys(source).forEach(function(key) {
6
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
7
+ return;
70
8
  }
71
- };
72
9
 
73
- let hideTooltip = immediate => {
74
- if (immediate) {
75
- clearTimeout(closeTimeout.current);
76
- closeTimeout.current = null;
77
- close();
78
- } else if (!closeTimeout.current) {
79
- closeTimeout.current = setTimeout(() => {
80
- closeTimeout.current = null;
81
- close();
82
- }, $dbf206483fc3f3f5862f69116107e0c$var$TOOLTIP_COOLDOWN);
83
- }
84
-
85
- if ($dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout) {
86
- clearTimeout($dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout);
87
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout = null;
88
- }
89
-
90
- if ($dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp) {
91
- if ($dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout) {
92
- clearTimeout($dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout);
10
+ Object.defineProperty(dest, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return source[key];
93
14
  }
15
+ });
16
+ });
94
17
 
95
- $dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout = setTimeout(() => {
96
- delete $dbf206483fc3f3f5862f69116107e0c$var$tooltips[id];
97
- $dbf206483fc3f3f5862f69116107e0c$var$globalCooldownTimeout = null;
98
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp = false;
99
- }, $dbf206483fc3f3f5862f69116107e0c$var$TOOLTIP_COOLDOWN);
100
- }
101
- };
102
-
103
- let warmupTooltip = () => {
104
- closeOpenTooltips();
105
- ensureTooltipEntry();
106
-
107
- if (!isOpen && !$dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout && !$dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp) {
108
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout = setTimeout(() => {
109
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmUpTimeout = null;
110
- $dbf206483fc3f3f5862f69116107e0c$var$globalWarmedUp = true;
111
- showTooltip();
112
- }, delay);
113
- } else if (!isOpen) {
114
- showTooltip();
115
- }
116
- }; // eslint-disable-next-line arrow-body-style
18
+ return dest;
19
+ }
20
+ function $parcel$export(e, n, v, s) {
21
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
22
+ }
23
+ var $7cedf927b69b611b$exports = {};
24
+
25
+ $parcel$export($7cedf927b69b611b$exports, "useTooltipTriggerState", () => $7cedf927b69b611b$export$4d40659c25ecb50b);
26
+
27
+
28
+ const $7cedf927b69b611b$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design
29
+ const $7cedf927b69b611b$var$TOOLTIP_COOLDOWN = 500;
30
+ let $7cedf927b69b611b$var$tooltips = {
31
+ };
32
+ let $7cedf927b69b611b$var$tooltipId = 0;
33
+ let $7cedf927b69b611b$var$globalWarmedUp = false;
34
+ let $7cedf927b69b611b$var$globalWarmUpTimeout = null;
35
+ let $7cedf927b69b611b$var$globalCooldownTimeout = null;
36
+ function $7cedf927b69b611b$export$4d40659c25ecb50b(props = {
37
+ }) {
38
+ let { delay: delay = $7cedf927b69b611b$var$TOOLTIP_DELAY } = props;
39
+ let { isOpen: isOpen , open: open , close: close } = $cIaZU$reactstatelyoverlays.useOverlayTriggerState(props);
40
+ let id = $cIaZU$react.useMemo(()=>`${++$7cedf927b69b611b$var$tooltipId}`
41
+ , []);
42
+ let closeTimeout = $cIaZU$react.useRef();
43
+ let ensureTooltipEntry = ()=>{
44
+ $7cedf927b69b611b$var$tooltips[id] = hideTooltip;
45
+ };
46
+ let closeOpenTooltips = ()=>{
47
+ for(let hideTooltipId in $7cedf927b69b611b$var$tooltips)if (hideTooltipId !== id) {
48
+ $7cedf927b69b611b$var$tooltips[hideTooltipId](true);
49
+ delete $7cedf927b69b611b$var$tooltips[hideTooltipId];
50
+ }
51
+ };
52
+ let showTooltip = ()=>{
53
+ clearTimeout(closeTimeout.current);
54
+ closeTimeout.current = null;
55
+ closeOpenTooltips();
56
+ ensureTooltipEntry();
57
+ $7cedf927b69b611b$var$globalWarmedUp = true;
58
+ open();
59
+ if ($7cedf927b69b611b$var$globalWarmUpTimeout) {
60
+ clearTimeout($7cedf927b69b611b$var$globalWarmUpTimeout);
61
+ $7cedf927b69b611b$var$globalWarmUpTimeout = null;
62
+ }
63
+ if ($7cedf927b69b611b$var$globalCooldownTimeout) {
64
+ clearTimeout($7cedf927b69b611b$var$globalCooldownTimeout);
65
+ $7cedf927b69b611b$var$globalCooldownTimeout = null;
66
+ }
67
+ };
68
+ let hideTooltip = (immediate)=>{
69
+ if (immediate) {
70
+ clearTimeout(closeTimeout.current);
71
+ closeTimeout.current = null;
72
+ close();
73
+ } else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{
74
+ closeTimeout.current = null;
75
+ close();
76
+ }, $7cedf927b69b611b$var$TOOLTIP_COOLDOWN);
77
+ if ($7cedf927b69b611b$var$globalWarmUpTimeout) {
78
+ clearTimeout($7cedf927b69b611b$var$globalWarmUpTimeout);
79
+ $7cedf927b69b611b$var$globalWarmUpTimeout = null;
80
+ }
81
+ if ($7cedf927b69b611b$var$globalWarmedUp) {
82
+ if ($7cedf927b69b611b$var$globalCooldownTimeout) clearTimeout($7cedf927b69b611b$var$globalCooldownTimeout);
83
+ $7cedf927b69b611b$var$globalCooldownTimeout = setTimeout(()=>{
84
+ delete $7cedf927b69b611b$var$tooltips[id];
85
+ $7cedf927b69b611b$var$globalCooldownTimeout = null;
86
+ $7cedf927b69b611b$var$globalWarmedUp = false;
87
+ }, $7cedf927b69b611b$var$TOOLTIP_COOLDOWN);
88
+ }
89
+ };
90
+ let warmupTooltip = ()=>{
91
+ closeOpenTooltips();
92
+ ensureTooltipEntry();
93
+ if (!isOpen && !$7cedf927b69b611b$var$globalWarmUpTimeout && !$7cedf927b69b611b$var$globalWarmedUp) $7cedf927b69b611b$var$globalWarmUpTimeout = setTimeout(()=>{
94
+ $7cedf927b69b611b$var$globalWarmUpTimeout = null;
95
+ $7cedf927b69b611b$var$globalWarmedUp = true;
96
+ showTooltip();
97
+ }, delay);
98
+ else if (!isOpen) showTooltip();
99
+ };
100
+ // eslint-disable-next-line arrow-body-style
101
+ $cIaZU$react.useEffect(()=>{
102
+ return ()=>{
103
+ clearTimeout(closeTimeout.current);
104
+ let tooltip = $7cedf927b69b611b$var$tooltips[id];
105
+ if (tooltip) delete $7cedf927b69b611b$var$tooltips[id];
106
+ };
107
+ }, [
108
+ id
109
+ ]);
110
+ return {
111
+ isOpen: isOpen,
112
+ open: (immediate)=>{
113
+ if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
114
+ else showTooltip();
115
+ },
116
+ close: hideTooltip
117
+ };
118
+ }
117
119
 
118
120
 
119
- useEffect(() => {
120
- return () => {
121
- clearTimeout(closeTimeout.current);
122
- let tooltip = $dbf206483fc3f3f5862f69116107e0c$var$tooltips[id];
121
+ $parcel$exportWildcard(module.exports, $7cedf927b69b611b$exports);
123
122
 
124
- if (tooltip) {
125
- delete $dbf206483fc3f3f5862f69116107e0c$var$tooltips[id];
126
- }
127
- };
128
- }, [id]);
129
- return {
130
- isOpen,
131
- open: immediate => {
132
- if (!immediate && delay > 0 && !closeTimeout.current) {
133
- warmupTooltip();
134
- } else {
135
- showTooltip();
136
- }
137
- },
138
- close: hideTooltip
139
- };
140
- }
141
123
 
142
- exports.useTooltipTriggerState = useTooltipTriggerState;
143
124
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAgBA,MAAMA,kDAAa,GAAG,IAAtB,C,CAA4B;;AAC5B,MAAMC,qDAAgB,GAAG,GAAzB;AAeA,IAAIC,6CAAQ,GAAG,EAAf;AACA,IAAIC,8CAAS,GAAG,CAAhB;AACA,IAAIC,mDAAc,GAAG,KAArB;AACA,IAAIC,wDAAmB,GAAG,IAA1B;AACA,IAAIC,0DAAqB,GAAG,IAA5B;AAEA;;;;;;AAKO,SAASC,sBAAT,CAAgCC,KAAhC,EAAsF;AAAA,MAAtDA,KAAsD;AAAtDA,IAAAA,KAAsD,GAAzB,EAAyB;AAAA;;AAC3F,MAAI;AAACC,IAAAA,KAAK,GAAGT;AAAT,MAA0BQ,KAA9B;AACA,MAAI;AAACE,IAAAA,MAAD;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,MAAwBC,sBAAsB,CAACL,KAAD,CAAlD;AACA,MAAIM,EAAE,GAAGC,OAAO,CAAC,WAAS,EAAEZ,8CAAZ,EAAyB,EAAzB,CAAhB;AACA,MAAIa,YAAY,GAAGC,MAAM,EAAzB;;AAEA,MAAIC,kBAAkB,GAAG,MAAM;AAC7BhB,IAAAA,6CAAQ,CAACY,EAAD,CAAR,GAAeK,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AACd,OAFD,MAEO;AACLL,QAAAA,WAAW;AACZ;AACF,KARI;AASLV,IAAAA,KAAK,EAAEO;AATF,GAAP;AAWD","sources":["./packages/@react-stately/tooltip/src/useTooltipTriggerState.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 {TooltipTriggerProps} from '@react-types/tooltip';\nimport {useEffect, useMemo, useRef} from 'react';\nimport {useOverlayTriggerState} from '@react-stately/overlays';\n\nconst TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst TOOLTIP_COOLDOWN = 500;\n\nexport interface TooltipTriggerState {\n /** Whether the tooltip is currently showing. */\n isOpen: boolean,\n /**\n * Shows the tooltip. By default, the tooltip becomes visible after a delay\n * depending on a global warmup timer. The `immediate` option shows the\n * tooltip immediately instead.\n */\n open(immediate?: boolean): void,\n /** Hides the tooltip. */\n close(immediate?: boolean): void\n}\n\nlet tooltips = {};\nlet tooltipId = 0;\nlet globalWarmedUp = false;\nlet globalWarmUpTimeout = null;\nlet globalCooldownTimeout = null;\n\n/**\n * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides\n * methods to toggle this state. Ensures only one tooltip is open at a time and controls\n * the delay for showing a tooltip.\n */\nexport function useTooltipTriggerState(props: TooltipTriggerProps = {}): TooltipTriggerState {\n let {delay = TOOLTIP_DELAY} = props;\n let {isOpen, open, close} = useOverlayTriggerState(props);\n let id = useMemo(() => `${++tooltipId}`, []);\n let closeTimeout = useRef<ReturnType<typeof setTimeout>>();\n\n let ensureTooltipEntry = () => {\n tooltips[id] = hideTooltip;\n };\n\n let closeOpenTooltips = () => {\n for (let hideTooltipId in tooltips) {\n if (hideTooltipId !== id) {\n tooltips[hideTooltipId](true);\n delete tooltips[hideTooltipId];\n }\n }\n };\n\n let showTooltip = () => {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n globalWarmedUp = true;\n open();\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n globalCooldownTimeout = null;\n }\n };\n\n let hideTooltip = (immediate?: boolean) => {\n if (immediate) {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n close();\n } else if (!closeTimeout.current) {\n closeTimeout.current = setTimeout(() => {\n closeTimeout.current = null;\n close();\n }, TOOLTIP_COOLDOWN);\n }\n\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalWarmedUp) {\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n }\n globalCooldownTimeout = setTimeout(() => {\n delete tooltips[id];\n globalCooldownTimeout = null;\n globalWarmedUp = false;\n }, TOOLTIP_COOLDOWN);\n }\n };\n\n let warmupTooltip = () => {\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !globalWarmUpTimeout && !globalWarmedUp) {\n globalWarmUpTimeout = setTimeout(() => {\n globalWarmUpTimeout = null;\n globalWarmedUp = true;\n showTooltip();\n }, delay);\n } else if (!isOpen) {\n showTooltip();\n }\n };\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n clearTimeout(closeTimeout.current);\n let tooltip = tooltips[id];\n if (tooltip) {\n delete tooltips[id];\n }\n };\n }, [id]);\n\n return {\n isOpen,\n open: (immediate) => {\n if (!immediate && delay > 0 && !closeTimeout.current) {\n warmupTooltip();\n } else {\n showTooltip();\n }\n },\n close: hideTooltip\n };\n}\n"],"names":["TOOLTIP_DELAY","TOOLTIP_COOLDOWN","tooltips","tooltipId","globalWarmedUp","globalWarmUpTimeout","globalCooldownTimeout","useTooltipTriggerState","props","delay","isOpen","open","close","useOverlayTriggerState","id","useMemo","closeTimeout","useRef","ensureTooltipEntry","hideTooltip","closeOpenTooltips","hideTooltipId","showTooltip","clearTimeout","current","immediate","setTimeout","warmupTooltip","useEffect","tooltip"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ACgBA,KAAK,CAAC,mCAAa,GAAG,IAAI,CAAE,CAAyD,AAAzD,EAAyD,AAAzD,uDAAyD;AACrF,KAAK,CAAC,sCAAgB,GAAG,GAAG;AAe5B,GAAG,CAAC,8BAAQ,GAAG,CAAC;AAAA,CAAC;AACjB,GAAG,CAAC,+BAAS,GAAG,CAAC;AACjB,GAAG,CAAC,oCAAc,GAAG,KAAK;AAC1B,GAAG,CAAC,yCAAmB,GAAG,IAAI;AAC9B,GAAG,CAAC,2CAAqB,GAAG,IAAI;SAOhB,yCAAsB,CAAC,KAA0B,GAAG,CAAC;AAAA,CAAC,EAAuB,CAAC;IAC5F,GAAG,CAAC,CAAC,QAAA,KAAK,GAAG,mCAAa,EAAA,CAAC,GAAG,KAAK;IACnC,GAAG,CAAC,CAAC,SAAA,MAAM,SAAE,IAAI,UAAE,KAAK,EAAA,CAAC,GAAG,kDAAsB,CAAC,KAAK;IACxD,GAAG,CAAC,EAAE,GAAG,oBAAO,UAAY,+BAAS;MAAI,CAAC,CAAC;IAC3C,GAAG,CAAC,YAAY,GAAG,mBAAM;IAEzB,GAAG,CAAC,kBAAkB,OAAS,CAAC;QAC9B,8BAAQ,CAAC,EAAE,IAAI,WAAW;IAC5B,CAAC;IAED,GAAG,CAAC,iBAAiB,OAAS,CAAC;QAC7B,GAAG,CAAE,GAAG,CAAC,aAAa,IAAI,8BAAQ,CAChC,EAAE,EAAE,aAAa,KAAK,EAAE,EAAE,CAAC;YACzB,8BAAQ,CAAC,a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ACzB,iBAAiB;QACjB,kBAAkB;QAClB,EAAE,GAAG,MAAM,KAAK,yCAAmB,KAAK,oCAAc,EACpD,yCAAmB,GAAG,UAAU,KAAO,CAAC;YACtC,yCAAmB,GAAG,IAAI;YAC1B,oCAAc,GAAG,IAAI;YACrB,WAAW;QACb,CAAC,EAAE,KAAK;aACH,EAAE,GAAG,MAAM,EAChB,WAAW;IAEf,CAAC;IAED,EAA4C,AAA5C,0CAA4C;IAC5C,sBAAS,KAAO,CAAC;QACf,MAAM,KAAO,CAAC;YACZ,YAAY,CAAC,YAAY,CAAC,OAAO;YACjC,GAAG,CAAC,OAAO,GAAG,8BAAQ,CAAC,EAAE;YACzB,EAAE,EAAE,OAAO,EACT,MAAM,CAAC,8BAAQ,CAAC,EAAE;QAEtB,CAAC;IACH,CAAC,EAAE,CAAC;QAAA,EAAE;IAAA,CAAC;IAEP,MAAM,CAAC,CAAC;gBACN,MAAM;QACN,IAAI,GAAG,SAAS,GAAK,CAAC;YACpB,EAAE,GAAG,SAAS,IAAI,KAAK,GAAG,CAAC,KAAK,YAAY,CAAC,OAAO,EAClD,aAAa;iBAEb,WAAW;QAEf,CAAC;QACD,KAAK,EAAE,WAAW;IACpB,CAAC;AACH,CAAC","sources":["packages/@react-stately/tooltip/src/index.ts","packages/@react-stately/tooltip/src/useTooltipTriggerState.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\nexport * from './useTooltipTriggerState';\n","/*\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 {TooltipTriggerProps} from '@react-types/tooltip';\nimport {useEffect, useMemo, useRef} from 'react';\nimport {useOverlayTriggerState} from '@react-stately/overlays';\n\nconst TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst TOOLTIP_COOLDOWN = 500;\n\nexport interface TooltipTriggerState {\n /** Whether the tooltip is currently showing. */\n isOpen: boolean,\n /**\n * Shows the tooltip. By default, the tooltip becomes visible after a delay\n * depending on a global warmup timer. The `immediate` option shows the\n * tooltip immediately instead.\n */\n open(immediate?: boolean): void,\n /** Hides the tooltip. */\n close(immediate?: boolean): void\n}\n\nlet tooltips = {};\nlet tooltipId = 0;\nlet globalWarmedUp = false;\nlet globalWarmUpTimeout = null;\nlet globalCooldownTimeout = null;\n\n/**\n * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides\n * methods to toggle this state. Ensures only one tooltip is open at a time and controls\n * the delay for showing a tooltip.\n */\nexport function useTooltipTriggerState(props: TooltipTriggerProps = {}): TooltipTriggerState {\n let {delay = TOOLTIP_DELAY} = props;\n let {isOpen, open, close} = useOverlayTriggerState(props);\n let id = useMemo(() => `${++tooltipId}`, []);\n let closeTimeout = useRef<ReturnType<typeof setTimeout>>();\n\n let ensureTooltipEntry = () => {\n tooltips[id] = hideTooltip;\n };\n\n let closeOpenTooltips = () => {\n for (let hideTooltipId in tooltips) {\n if (hideTooltipId !== id) {\n tooltips[hideTooltipId](true);\n delete tooltips[hideTooltipId];\n }\n }\n };\n\n let showTooltip = () => {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n globalWarmedUp = true;\n open();\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n globalCooldownTimeout = null;\n }\n };\n\n let hideTooltip = (immediate?: boolean) => {\n if (immediate) {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n close();\n } else if (!closeTimeout.current) {\n closeTimeout.current = setTimeout(() => {\n closeTimeout.current = null;\n close();\n }, TOOLTIP_COOLDOWN);\n }\n\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalWarmedUp) {\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n }\n globalCooldownTimeout = setTimeout(() => {\n delete tooltips[id];\n globalCooldownTimeout = null;\n globalWarmedUp = false;\n }, TOOLTIP_COOLDOWN);\n }\n };\n\n let warmupTooltip = () => {\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !globalWarmUpTimeout && !globalWarmedUp) {\n globalWarmUpTimeout = setTimeout(() => {\n globalWarmUpTimeout = null;\n globalWarmedUp = true;\n showTooltip();\n }, delay);\n } else if (!isOpen) {\n showTooltip();\n }\n };\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n clearTimeout(closeTimeout.current);\n let tooltip = tooltips[id];\n if (tooltip) {\n delete tooltips[id];\n }\n };\n }, [id]);\n\n return {\n isOpen,\n open: (immediate) => {\n if (!immediate && delay > 0 && !closeTimeout.current) {\n warmupTooltip();\n } else {\n showTooltip();\n }\n },\n close: hideTooltip\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,133 +1,108 @@
1
- import { useOverlayTriggerState } from "@react-stately/overlays";
2
- import { useEffect, useMemo, useRef } from "react";
3
- const $af9cde49ea815e766aeca6386e9$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design
1
+ import {useMemo as $bZfsL$useMemo, useRef as $bZfsL$useRef, useEffect as $bZfsL$useEffect} from "react";
2
+ import {useOverlayTriggerState as $bZfsL$useOverlayTriggerState} from "@react-stately/overlays";
4
3
 
5
- const $af9cde49ea815e766aeca6386e9$var$TOOLTIP_COOLDOWN = 500;
6
- let $af9cde49ea815e766aeca6386e9$var$tooltips = {};
7
- let $af9cde49ea815e766aeca6386e9$var$tooltipId = 0;
8
- let $af9cde49ea815e766aeca6386e9$var$globalWarmedUp = false;
9
- let $af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout = null;
10
- let $af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout = null;
11
- /**
12
- * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides
13
- * methods to toggle this state. Ensures only one tooltip is open at a time and controls
14
- * the delay for showing a tooltip.
15
- */
16
-
17
- export function useTooltipTriggerState(props) {
18
- if (props === void 0) {
19
- props = {};
20
- }
21
-
22
- let {
23
- delay = $af9cde49ea815e766aeca6386e9$var$TOOLTIP_DELAY
24
- } = props;
25
- let {
26
- isOpen,
27
- open,
28
- close
29
- } = useOverlayTriggerState(props);
30
- let id = useMemo(() => "" + ++$af9cde49ea815e766aeca6386e9$var$tooltipId, []);
31
- let closeTimeout = useRef();
32
-
33
- let ensureTooltipEntry = () => {
34
- $af9cde49ea815e766aeca6386e9$var$tooltips[id] = hideTooltip;
35
- };
36
-
37
- let closeOpenTooltips = () => {
38
- for (let hideTooltipId in $af9cde49ea815e766aeca6386e9$var$tooltips) {
39
- if (hideTooltipId !== id) {
40
- $af9cde49ea815e766aeca6386e9$var$tooltips[hideTooltipId](true);
41
- delete $af9cde49ea815e766aeca6386e9$var$tooltips[hideTooltipId];
42
- }
43
- }
44
- };
45
-
46
- let showTooltip = () => {
47
- clearTimeout(closeTimeout.current);
48
- closeTimeout.current = null;
49
- closeOpenTooltips();
50
- ensureTooltipEntry();
51
- $af9cde49ea815e766aeca6386e9$var$globalWarmedUp = true;
52
- open();
53
-
54
- if ($af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout) {
55
- clearTimeout($af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout);
56
- $af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout = null;
57
- }
58
-
59
- if ($af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout) {
60
- clearTimeout($af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout);
61
- $af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout = null;
62
- }
63
- };
64
-
65
- let hideTooltip = immediate => {
66
- if (immediate) {
67
- clearTimeout(closeTimeout.current);
68
- closeTimeout.current = null;
69
- close();
70
- } else if (!closeTimeout.current) {
71
- closeTimeout.current = setTimeout(() => {
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+ var $aa3ba987dad0cb56$exports = {};
8
+
9
+ $parcel$export($aa3ba987dad0cb56$exports, "useTooltipTriggerState", () => $aa3ba987dad0cb56$export$4d40659c25ecb50b);
10
+
11
+
12
+ const $aa3ba987dad0cb56$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design
13
+ const $aa3ba987dad0cb56$var$TOOLTIP_COOLDOWN = 500;
14
+ let $aa3ba987dad0cb56$var$tooltips = {
15
+ };
16
+ let $aa3ba987dad0cb56$var$tooltipId = 0;
17
+ let $aa3ba987dad0cb56$var$globalWarmedUp = false;
18
+ let $aa3ba987dad0cb56$var$globalWarmUpTimeout = null;
19
+ let $aa3ba987dad0cb56$var$globalCooldownTimeout = null;
20
+ function $aa3ba987dad0cb56$export$4d40659c25ecb50b(props = {
21
+ }) {
22
+ let { delay: delay = $aa3ba987dad0cb56$var$TOOLTIP_DELAY } = props;
23
+ let { isOpen: isOpen , open: open , close: close } = $bZfsL$useOverlayTriggerState(props);
24
+ let id = $bZfsL$useMemo(()=>`${++$aa3ba987dad0cb56$var$tooltipId}`
25
+ , []);
26
+ let closeTimeout = $bZfsL$useRef();
27
+ let ensureTooltipEntry = ()=>{
28
+ $aa3ba987dad0cb56$var$tooltips[id] = hideTooltip;
29
+ };
30
+ let closeOpenTooltips = ()=>{
31
+ for(let hideTooltipId in $aa3ba987dad0cb56$var$tooltips)if (hideTooltipId !== id) {
32
+ $aa3ba987dad0cb56$var$tooltips[hideTooltipId](true);
33
+ delete $aa3ba987dad0cb56$var$tooltips[hideTooltipId];
34
+ }
35
+ };
36
+ let showTooltip = ()=>{
37
+ clearTimeout(closeTimeout.current);
72
38
  closeTimeout.current = null;
73
- close();
74
- }, $af9cde49ea815e766aeca6386e9$var$TOOLTIP_COOLDOWN);
75
- }
76
-
77
- if ($af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout) {
78
- clearTimeout($af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout);
79
- $af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout = null;
80
- }
81
-
82
- if ($af9cde49ea815e766aeca6386e9$var$globalWarmedUp) {
83
- if ($af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout) {
84
- clearTimeout($af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout);
85
- }
86
-
87
- $af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout = setTimeout(() => {
88
- delete $af9cde49ea815e766aeca6386e9$var$tooltips[id];
89
- $af9cde49ea815e766aeca6386e9$var$globalCooldownTimeout = null;
90
- $af9cde49ea815e766aeca6386e9$var$globalWarmedUp = false;
91
- }, $af9cde49ea815e766aeca6386e9$var$TOOLTIP_COOLDOWN);
92
- }
93
- };
94
-
95
- let warmupTooltip = () => {
96
- closeOpenTooltips();
97
- ensureTooltipEntry();
39
+ closeOpenTooltips();
40
+ ensureTooltipEntry();
41
+ $aa3ba987dad0cb56$var$globalWarmedUp = true;
42
+ open();
43
+ if ($aa3ba987dad0cb56$var$globalWarmUpTimeout) {
44
+ clearTimeout($aa3ba987dad0cb56$var$globalWarmUpTimeout);
45
+ $aa3ba987dad0cb56$var$globalWarmUpTimeout = null;
46
+ }
47
+ if ($aa3ba987dad0cb56$var$globalCooldownTimeout) {
48
+ clearTimeout($aa3ba987dad0cb56$var$globalCooldownTimeout);
49
+ $aa3ba987dad0cb56$var$globalCooldownTimeout = null;
50
+ }
51
+ };
52
+ let hideTooltip = (immediate)=>{
53
+ if (immediate) {
54
+ clearTimeout(closeTimeout.current);
55
+ closeTimeout.current = null;
56
+ close();
57
+ } else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{
58
+ closeTimeout.current = null;
59
+ close();
60
+ }, $aa3ba987dad0cb56$var$TOOLTIP_COOLDOWN);
61
+ if ($aa3ba987dad0cb56$var$globalWarmUpTimeout) {
62
+ clearTimeout($aa3ba987dad0cb56$var$globalWarmUpTimeout);
63
+ $aa3ba987dad0cb56$var$globalWarmUpTimeout = null;
64
+ }
65
+ if ($aa3ba987dad0cb56$var$globalWarmedUp) {
66
+ if ($aa3ba987dad0cb56$var$globalCooldownTimeout) clearTimeout($aa3ba987dad0cb56$var$globalCooldownTimeout);
67
+ $aa3ba987dad0cb56$var$globalCooldownTimeout = setTimeout(()=>{
68
+ delete $aa3ba987dad0cb56$var$tooltips[id];
69
+ $aa3ba987dad0cb56$var$globalCooldownTimeout = null;
70
+ $aa3ba987dad0cb56$var$globalWarmedUp = false;
71
+ }, $aa3ba987dad0cb56$var$TOOLTIP_COOLDOWN);
72
+ }
73
+ };
74
+ let warmupTooltip = ()=>{
75
+ closeOpenTooltips();
76
+ ensureTooltipEntry();
77
+ if (!isOpen && !$aa3ba987dad0cb56$var$globalWarmUpTimeout && !$aa3ba987dad0cb56$var$globalWarmedUp) $aa3ba987dad0cb56$var$globalWarmUpTimeout = setTimeout(()=>{
78
+ $aa3ba987dad0cb56$var$globalWarmUpTimeout = null;
79
+ $aa3ba987dad0cb56$var$globalWarmedUp = true;
80
+ showTooltip();
81
+ }, delay);
82
+ else if (!isOpen) showTooltip();
83
+ };
84
+ // eslint-disable-next-line arrow-body-style
85
+ $bZfsL$useEffect(()=>{
86
+ return ()=>{
87
+ clearTimeout(closeTimeout.current);
88
+ let tooltip = $aa3ba987dad0cb56$var$tooltips[id];
89
+ if (tooltip) delete $aa3ba987dad0cb56$var$tooltips[id];
90
+ };
91
+ }, [
92
+ id
93
+ ]);
94
+ return {
95
+ isOpen: isOpen,
96
+ open: (immediate)=>{
97
+ if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
98
+ else showTooltip();
99
+ },
100
+ close: hideTooltip
101
+ };
102
+ }
98
103
 
99
- if (!isOpen && !$af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout && !$af9cde49ea815e766aeca6386e9$var$globalWarmedUp) {
100
- $af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout = setTimeout(() => {
101
- $af9cde49ea815e766aeca6386e9$var$globalWarmUpTimeout = null;
102
- $af9cde49ea815e766aeca6386e9$var$globalWarmedUp = true;
103
- showTooltip();
104
- }, delay);
105
- } else if (!isOpen) {
106
- showTooltip();
107
- }
108
- }; // eslint-disable-next-line arrow-body-style
109
104
 
110
105
 
111
- useEffect(() => {
112
- return () => {
113
- clearTimeout(closeTimeout.current);
114
- let tooltip = $af9cde49ea815e766aeca6386e9$var$tooltips[id];
115
106
 
116
- if (tooltip) {
117
- delete $af9cde49ea815e766aeca6386e9$var$tooltips[id];
118
- }
119
- };
120
- }, [id]);
121
- return {
122
- isOpen,
123
- open: immediate => {
124
- if (!immediate && delay > 0 && !closeTimeout.current) {
125
- warmupTooltip();
126
- } else {
127
- showTooltip();
128
- }
129
- },
130
- close: hideTooltip
131
- };
132
- }
107
+ export {$aa3ba987dad0cb56$export$4d40659c25ecb50b as useTooltipTriggerState};
133
108
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;AAgBA,MAAMA,8CAAa,GAAG,IAAtB,C,CAA4B;;AAC5B,MAAMC,iDAAgB,GAAG,GAAzB;AAeA,IAAIC,yCAAQ,GAAG,EAAf;AACA,IAAIC,0CAAS,GAAG,CAAhB;AACA,IAAIC,+CAAc,GAAG,KA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6B,CAAhC;AAKD,KAND,MAMO,IAAI,CAACC,MAAL,EAAa;AAClBY,MAAAA,WAAW;AACZ;AACF,GAZD,CAhE2F,CA8E3F;;;AACAM,EAAAA,SAAS,CAAC,MAAM;AACd,WAAO,MAAM;AACXL,MAAAA,YAAY,CAACP,YAAY,CAACQ,OAAd,CAAZ;AACA,UAAIK,OAAO,GAAG3B,yCAAQ,CAACY,EAAD,CAAtB;;AACA,UAAIe,OAAJ,EAAa;AACX,eAAO3B,yCAAQ,CAACY,EAAD,CAAf;AACD;AACF,KAND;AAOD,GARQ,EAQN,CAACA,EAAD,CARM,CAAT;AAUA,SAAO;AACLJ,IAAAA,MADK;AAELC,IAAAA,IAAI,EAAGc,SAAD,IAAe;AACnB,UAAI,CAACA,SAAD,IAAchB,KAAK,GAAG,CAAtB,IAA2B,CAACO,YAAY,CAACQ,OAA7C,EAAsD;AACpDG,QAAAA,aAAa;AACd,OAFD,MAEO;AACLL,QAAAA,WAAW;AACZ;AACF,KARI;AASLV,IAAAA,KAAK,EAAEO;AATF,GAAP;AAWD","sources":["./packages/@react-stately/tooltip/src/useTooltipTriggerState.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 {TooltipTriggerProps} from '@react-types/tooltip';\nimport {useEffect, useMemo, useRef} from 'react';\nimport {useOverlayTriggerState} from '@react-stately/overlays';\n\nconst TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst TOOLTIP_COOLDOWN = 500;\n\nexport interface TooltipTriggerState {\n /** Whether the tooltip is currently showing. */\n isOpen: boolean,\n /**\n * Shows the tooltip. By default, the tooltip becomes visible after a delay\n * depending on a global warmup timer. The `immediate` option shows the\n * tooltip immediately instead.\n */\n open(immediate?: boolean): void,\n /** Hides the tooltip. */\n close(immediate?: boolean): void\n}\n\nlet tooltips = {};\nlet tooltipId = 0;\nlet globalWarmedUp = false;\nlet globalWarmUpTimeout = null;\nlet globalCooldownTimeout = null;\n\n/**\n * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides\n * methods to toggle this state. Ensures only one tooltip is open at a time and controls\n * the delay for showing a tooltip.\n */\nexport function useTooltipTriggerState(props: TooltipTriggerProps = {}): TooltipTriggerState {\n let {delay = TOOLTIP_DELAY} = props;\n let {isOpen, open, close} = useOverlayTriggerState(props);\n let id = useMemo(() => `${++tooltipId}`, []);\n let closeTimeout = useRef<ReturnType<typeof setTimeout>>();\n\n let ensureTooltipEntry = () => {\n tooltips[id] = hideTooltip;\n };\n\n let closeOpenTooltips = () => {\n for (let hideTooltipId in tooltips) {\n if (hideTooltipId !== id) {\n tooltips[hideTooltipId](true);\n delete tooltips[hideTooltipId];\n }\n }\n };\n\n let showTooltip = () => {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n globalWarmedUp = true;\n open();\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n globalCooldownTimeout = null;\n }\n };\n\n let hideTooltip = (immediate?: boolean) => {\n if (immediate) {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n close();\n } else if (!closeTimeout.current) {\n closeTimeout.current = setTimeout(() => {\n closeTimeout.current = null;\n close();\n }, TOOLTIP_COOLDOWN);\n }\n\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalWarmedUp) {\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n }\n globalCooldownTimeout = setTimeout(() => {\n delete tooltips[id];\n globalCooldownTimeout = null;\n globalWarmedUp = false;\n }, TOOLTIP_COOLDOWN);\n }\n };\n\n let warmupTooltip = () => {\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !globalWarmUpTimeout && !globalWarmedUp) {\n globalWarmUpTimeout = setTimeout(() => {\n globalWarmUpTimeout = null;\n globalWarmedUp = true;\n showTooltip();\n }, delay);\n } else if (!isOpen) {\n showTooltip();\n }\n };\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n clearTimeout(closeTimeout.current);\n let tooltip = tooltips[id];\n if (tooltip) {\n delete tooltips[id];\n }\n };\n }, [id]);\n\n return {\n isOpen,\n open: (immediate) => {\n if (!immediate && delay > 0 && !closeTimeout.current) {\n warmupTooltip();\n } else {\n showTooltip();\n }\n },\n close: hideTooltip\n };\n}\n"],"names":["TOOLTIP_DELAY","TOOLTIP_COOLDOWN","tooltips","tooltipId","globalWarmedUp","globalWarmUpTimeout","globalCooldownTimeout","useTooltipTriggerState","props","delay","isOpen","open","close","useOverlayTriggerState","id","useMemo","closeTimeout","useRef","ensureTooltipEntry","hideTooltip","closeOpenTooltips","hideTooltipId","showTooltip","clearTimeout","current","immediate","setTimeout","warmupTooltip","useEffect","tooltip"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;ACgBA,KAAK,CAAC,mCAAa,GAAG,IAAI,CAAE,CAAyD,AAAzD,EAAyD,AAAzD,uDAAyD;AACrF,KAAK,CAAC,sCAAgB,GAAG,GAAG;AAe5B,GAAG,CAAC,8BAAQ,GAAG,CAAC;AAAA,CAAC;AACjB,GAAG,CAAC,+BAAS,GAAG,CAAC;AACjB,GAAG,CAAC,oCAAc,GAAG,KAAK;AAC1B,GAAG,CAAC,yCAAmB,GAAG,IAAI;AAC9B,GAAG,CAAC,2CAAqB,GAAG,IAAI;SAOhB,yCAAsB,CAAC,KAA0B,GAAG,CAAC;AAAA,CAAC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AAa;iBAEb,WAAW;QAEf,CAAC;QACD,KAAK,EAAE,WAAW;IACpB,CAAC;AACH,CAAC","sources":["packages/@react-stately/tooltip/src/index.ts","packages/@react-stately/tooltip/src/useTooltipTriggerState.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\nexport * from './useTooltipTriggerState';\n","/*\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 {TooltipTriggerProps} from '@react-types/tooltip';\nimport {useEffect, useMemo, useRef} from 'react';\nimport {useOverlayTriggerState} from '@react-stately/overlays';\n\nconst TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst TOOLTIP_COOLDOWN = 500;\n\nexport interface TooltipTriggerState {\n /** Whether the tooltip is currently showing. */\n isOpen: boolean,\n /**\n * Shows the tooltip. By default, the tooltip becomes visible after a delay\n * depending on a global warmup timer. The `immediate` option shows the\n * tooltip immediately instead.\n */\n open(immediate?: boolean): void,\n /** Hides the tooltip. */\n close(immediate?: boolean): void\n}\n\nlet tooltips = {};\nlet tooltipId = 0;\nlet globalWarmedUp = false;\nlet globalWarmUpTimeout = null;\nlet globalCooldownTimeout = null;\n\n/**\n * Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides\n * methods to toggle this state. Ensures only one tooltip is open at a time and controls\n * the delay for showing a tooltip.\n */\nexport function useTooltipTriggerState(props: TooltipTriggerProps = {}): TooltipTriggerState {\n let {delay = TOOLTIP_DELAY} = props;\n let {isOpen, open, close} = useOverlayTriggerState(props);\n let id = useMemo(() => `${++tooltipId}`, []);\n let closeTimeout = useRef<ReturnType<typeof setTimeout>>();\n\n let ensureTooltipEntry = () => {\n tooltips[id] = hideTooltip;\n };\n\n let closeOpenTooltips = () => {\n for (let hideTooltipId in tooltips) {\n if (hideTooltipId !== id) {\n tooltips[hideTooltipId](true);\n delete tooltips[hideTooltipId];\n }\n }\n };\n\n let showTooltip = () => {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n globalWarmedUp = true;\n open();\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n globalCooldownTimeout = null;\n }\n };\n\n let hideTooltip = (immediate?: boolean) => {\n if (immediate) {\n clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n close();\n } else if (!closeTimeout.current) {\n closeTimeout.current = setTimeout(() => {\n closeTimeout.current = null;\n close();\n }, TOOLTIP_COOLDOWN);\n }\n\n if (globalWarmUpTimeout) {\n clearTimeout(globalWarmUpTimeout);\n globalWarmUpTimeout = null;\n }\n if (globalWarmedUp) {\n if (globalCooldownTimeout) {\n clearTimeout(globalCooldownTimeout);\n }\n globalCooldownTimeout = setTimeout(() => {\n delete tooltips[id];\n globalCooldownTimeout = null;\n globalWarmedUp = false;\n }, TOOLTIP_COOLDOWN);\n }\n };\n\n let warmupTooltip = () => {\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !globalWarmUpTimeout && !globalWarmedUp) {\n globalWarmUpTimeout = setTimeout(() => {\n globalWarmUpTimeout = null;\n globalWarmedUp = true;\n showTooltip();\n }, delay);\n } else if (!isOpen) {\n showTooltip();\n }\n };\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n clearTimeout(closeTimeout.current);\n let tooltip = tooltips[id];\n if (tooltip) {\n delete tooltips[id];\n }\n };\n }, [id]);\n\n return {\n isOpen,\n open: (immediate) => {\n if (!immediate && delay > 0 && !closeTimeout.current) {\n warmupTooltip();\n } else {\n showTooltip();\n }\n },\n close: hideTooltip\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;AAmBA;IACE,gDAAgD;IAChD,MAAM,EAAE,OAAO,CAAC;IAChB;A;A;A;OAIG;IACH,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,yBAAyB;IACzB,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAQD;A;A;A;GAIG;AACH,uCAAuC,KAAK,GAAE,mBAAwB,GAAG,mBAAmB,CAoG3F","sources":["./packages/@react-stately/tooltip/src/packages/@react-stately/tooltip/src/useTooltipTriggerState.ts","./packages/@react-stately/tooltip/src/packages/@react-stately/tooltip/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";AAmBA;IACE,gDAAgD;IAChD,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,yBAAyB;IACzB,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAQD;;;;GAIG;AACH,uCAAuC,KAAK,GAAE,mBAAwB,GAAG,mBAAmB,CAoG3F","sources":["packages/@react-stately/tooltip/src/packages/@react-stately/tooltip/src/useTooltipTriggerState.ts","packages/@react-stately/tooltip/src/packages/@react-stately/tooltip/src/index.ts","packages/@react-stately/tooltip/src/index.ts"],"sourcesContent":[null,null,"/*\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\nexport * from './useTooltipTriggerState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/tooltip",
3
- "version": "3.0.6-nightly.3036+f6ce7acdd",
3
+ "version": "3.0.6-nightly.3047+87960ad25",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-stately/overlays": "3.1.4-nightly.3036+f6ce7acdd",
22
- "@react-stately/utils": "3.0.0-nightly.1345+f6ce7acdd",
23
- "@react-types/tooltip": "3.1.3-nightly.3036+f6ce7acdd"
21
+ "@react-stately/overlays": "3.1.4-nightly.3047+87960ad25",
22
+ "@react-stately/utils": "3.0.0-nightly.1356+87960ad25",
23
+ "@react-types/tooltip": "3.1.3-nightly.3047+87960ad25"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "f6ce7acdd85c9a23a3397b0e75350e3208fdd04a"
31
+ "gitHead": "87960ad25c26bc4cd6af506bb5e7e0f06621556c"
32
32
  }