@dialpad/dialtone 9.91.1 → 9.92.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/tokens/doc.json +23151 -23151
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/components/hovercard/hovercard.vue.cjs +32 -12
- package/dist/vue2/components/hovercard/hovercard.vue.cjs.map +1 -1
- package/dist/vue2/components/hovercard/hovercard.vue.js +33 -13
- package/dist/vue2/components/hovercard/hovercard.vue.js.map +1 -1
- package/dist/vue2/components/popover/popover.vue.cjs +21 -43
- package/dist/vue2/components/popover/popover.vue.cjs.map +1 -1
- package/dist/vue2/components/popover/popover.vue.js +21 -43
- package/dist/vue2/components/popover/popover.vue.js.map +1 -1
- package/dist/vue2/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/hovercard/hovercard.vue.cjs +30 -4
- package/dist/vue3/components/hovercard/hovercard.vue.cjs.map +1 -1
- package/dist/vue3/components/hovercard/hovercard.vue.js +32 -6
- package/dist/vue3/components/hovercard/hovercard.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover.vue.cjs +23 -45
- package/dist/vue3/components/popover/popover.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover.vue.js +23 -45
- package/dist/vue3/components/popover/popover.vue.js.map +1 -1
- package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/vue2/components/hovercard/timer.cjs +0 -59
- package/dist/vue2/components/hovercard/timer.cjs.map +0 -1
- package/dist/vue2/components/hovercard/timer.js +0 -59
- package/dist/vue2/components/hovercard/timer.js.map +0 -1
- package/dist/vue2/types/components/hovercard/timer.d.ts +0 -3
- package/dist/vue2/types/components/hovercard/timer.d.ts.map +0 -1
- package/dist/vue3/components/hovercard/timer.cjs +0 -60
- package/dist/vue3/components/hovercard/timer.cjs.map +0 -1
- package/dist/vue3/components/hovercard/timer.js +0 -60
- package/dist/vue3/components/hovercard/timer.js.map +0 -1
- package/dist/vue3/types/components/hovercard/timer.d.ts +0 -3
- package/dist/vue3/types/components/hovercard/timer.d.ts.map +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
2
|
-
import { TOOLTIP_DELAY_MS } from "../tooltip/tooltip_constants.js";
|
|
3
|
-
const useTimer = function() {
|
|
4
|
-
const current = ref(null);
|
|
5
|
-
let timerLeave, timerEnter;
|
|
6
|
-
let start = null;
|
|
7
|
-
let prevCard = null;
|
|
8
|
-
function enter(id) {
|
|
9
|
-
if (prevCard) {
|
|
10
|
-
const time = Date.now() - start + 100;
|
|
11
|
-
if (timerLeave) clearTimeout(timerLeave);
|
|
12
|
-
if (prevCard !== id) {
|
|
13
|
-
timerLeave = setTimeout(
|
|
14
|
-
() => {
|
|
15
|
-
if (current.value !== null) {
|
|
16
|
-
start = Date.now();
|
|
17
|
-
}
|
|
18
|
-
current.value = null;
|
|
19
|
-
},
|
|
20
|
-
time
|
|
21
|
-
);
|
|
22
|
-
if (timerEnter) clearTimeout(timerEnter);
|
|
23
|
-
timerEnter = setTimeout(
|
|
24
|
-
() => {
|
|
25
|
-
current.value = id;
|
|
26
|
-
prevCard = id;
|
|
27
|
-
},
|
|
28
|
-
time
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
timerEnter = setTimeout(() => {
|
|
33
|
-
current.value = id;
|
|
34
|
-
prevCard = id;
|
|
35
|
-
}, TOOLTIP_DELAY_MS);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function leave() {
|
|
39
|
-
if (timerEnter) {
|
|
40
|
-
clearTimeout(timerEnter);
|
|
41
|
-
timerEnter = null;
|
|
42
|
-
}
|
|
43
|
-
start = Date.now();
|
|
44
|
-
timerLeave = setTimeout(() => {
|
|
45
|
-
current.value = null;
|
|
46
|
-
prevCard = null;
|
|
47
|
-
}, TOOLTIP_DELAY_MS);
|
|
48
|
-
}
|
|
49
|
-
let instance = null;
|
|
50
|
-
return () => {
|
|
51
|
-
if (instance === null) {
|
|
52
|
-
instance = { current, enter, leave };
|
|
53
|
-
}
|
|
54
|
-
return instance;
|
|
55
|
-
};
|
|
56
|
-
}();
|
|
57
|
-
export {
|
|
58
|
-
useTimer as default
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=timer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timer.js","sources":["../../../components/hovercard/timer.js"],"sourcesContent":["import { ref } from 'vue';\nimport { TOOLTIP_DELAY_MS } from '@/components/tooltip/index.js';\n\nexport default (function () {\n const current = ref(null);\n let timerLeave, timerEnter;\n let start = null;\n let prevCard = null;\n\n // Handles the timer for when the event that opens the hovercard\n // is triggered.\n // If no hovercard is active, it sets a delay of TOOLTIP_DELAY_MS.\n // If there was an active hovercard, the delay depends on the time it takes\n // to move from one anchor to the other.\n function enter (id) {\n if (prevCard) {\n const time = Date.now() - start + 100;\n if (timerLeave) clearTimeout(timerLeave);\n if (prevCard !== id) {\n timerLeave = setTimeout(\n () => {\n if (current.value !== null) {\n start = Date.now();\n }\n current.value = null;\n },\n time,\n );\n if (timerEnter) clearTimeout(timerEnter);\n timerEnter = setTimeout(\n () => {\n current.value = id;\n prevCard = id;\n },\n time,\n );\n }\n } else {\n timerEnter = setTimeout(() => {\n current.value = id;\n prevCard = id;\n }, TOOLTIP_DELAY_MS);\n }\n }\n\n // Handles the timer for when the event that closes the hovercard\n // is triggered.\n function leave () {\n if (timerEnter) {\n clearTimeout(timerEnter);\n timerEnter = null;\n }\n start = Date.now();\n timerLeave = setTimeout(() => {\n current.value = null;\n prevCard = null;\n }, TOOLTIP_DELAY_MS);\n }\n\n let instance = null;\n\n return () => {\n if (instance === null) {\n instance = { current, enter, leave };\n }\n return instance;\n };\n})();\n"],"names":[],"mappings":";;AAGA,MAAA,WAAgB,WAAY;AAC1B,QAAM,UAAU,IAAI,IAAI;AACxB,MAAI,YAAY;AAChB,MAAI,QAAQ;AACZ,MAAI,WAAW;AAOf,WAAS,MAAO,IAAI;AAClB,QAAI,UAAU;AACZ,YAAM,OAAO,KAAK,IAAG,IAAK,QAAQ;AAClC,UAAI,WAAY,cAAa,UAAU;AACvC,UAAI,aAAa,IAAI;AACnB,qBAAa;AAAA,UACX,MAAM;AACJ,gBAAI,QAAQ,UAAU,MAAM;AAC1B,sBAAQ,KAAK;YACd;AACD,oBAAQ,QAAQ;AAAA,UACjB;AAAA,UACD;AAAA,QACV;AACQ,YAAI,WAAY,cAAa,UAAU;AACvC,qBAAa;AAAA,UACX,MAAM;AACJ,oBAAQ,QAAQ;AAChB,uBAAW;AAAA,UACZ;AAAA,UACD;AAAA,QACV;AAAA,MACO;AAAA,IACP,OAAW;AACL,mBAAa,WAAW,MAAM;AAC5B,gBAAQ,QAAQ;AAChB,mBAAW;AAAA,MACZ,GAAE,gBAAgB;AAAA,IACpB;AAAA,EACF;AAID,WAAS,QAAS;AAChB,QAAI,YAAY;AACd,mBAAa,UAAU;AACvB,mBAAa;AAAA,IACd;AACD,YAAQ,KAAK;AACb,iBAAa,WAAW,MAAM;AAC5B,cAAQ,QAAQ;AAChB,iBAAW;AAAA,IACZ,GAAE,gBAAgB;AAAA,EACpB;AAED,MAAI,WAAW;AAEf,SAAO,MAAM;AACX,QAAI,aAAa,MAAM;AACrB,iBAAW,EAAE,SAAS,OAAO,MAAK;AAAA,IACnC;AACD,WAAO;AAAA,EACX;AACA,EAAI;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../../components/hovercard/timer.js"],"names":[],"mappings":"AA6DS,iCAKN"}
|