From 6ff3edfd6e431e6c80dc68b5ba88c20d96403329 Mon Sep 17 00:00:00 2001 From: kevinchappell Date: Fri, 15 Nov 2024 22:41:56 +0000 Subject: [PATCH] deploy: 403ba4c0930e1444a1aec9eba51c1a4e966380f2 --- index.d.ts | 1 + tooltip.cjs.min.js | 4 ++-- tooltip.cjs.min.js.gz | Bin 1469 -> 1477 bytes tooltip.es.min.js | 4 +++- tooltip.es.min.js.gz | Bin 1941 -> 1951 bytes tooltip.iife.min.js | 4 ++-- tooltip.iife.min.js.gz | Bin 1477 -> 1486 bytes tooltip.umd.min.js | 4 ++-- tooltip.umd.min.js.gz | Bin 1549 -> 1557 bytes 9 files changed, 10 insertions(+), 7 deletions(-) diff --git a/index.d.ts b/index.d.ts index 819c2de..7b0d790 100644 --- a/index.d.ts +++ b/index.d.ts @@ -71,6 +71,7 @@ export declare class SmartTooltip { private hide; destroy(): void; } +export declare const Tooltip: typeof SmartTooltip; declare global { interface Window { SmartTooltip: typeof SmartTooltip; diff --git a/tooltip.cjs.min.js b/tooltip.cjs.min.js index 04832f2..a8d4c3c 100644 --- a/tooltip.cjs.min.js +++ b/tooltip.cjs.min.js @@ -1,10 +1,10 @@ /** @draggable/tooltip - https://github.com/Draggable/tooltip -Version: 1.2.0 +Version: 1.2.1 Author: Draggable https://draggable.io */ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -"use strict";var t=Object.defineProperty,e=(e,i,s)=>((e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s)(e,"symbol"!=typeof i?i+"":i,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="_3x4ZIcu-",s="JIt36hCJ",o={triggerName:"tooltip"};class h{constructor(t=o){e(this,"triggerName"),e(this,"tooltip"),e(this,"activeTriggerType",null),e(this,"spacing",12),e(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),e(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),e(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),e(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),e(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${i}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(s)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(i)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(s);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(s),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}void 0!==window&&(window.SmartTooltip=h),exports.SmartTooltip=h,exports.default=h; +"use strict";var t=Object.defineProperty,e=(e,i,s)=>((e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s)(e,"symbol"!=typeof i?i+"":i,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="_3x4ZIcu-",s="JIt36hCJ",o={triggerName:"tooltip"};class n{constructor(t=o){e(this,"triggerName"),e(this,"tooltip"),e(this,"activeTriggerType",null),e(this,"spacing",12),e(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),e(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),e(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),e(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),e(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${i}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(s)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(i)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(s);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(s),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}const h=n;void 0!==window&&(window.SmartTooltip=n),exports.SmartTooltip=n,exports.Tooltip=h,exports.default=n; diff --git a/tooltip.cjs.min.js.gz b/tooltip.cjs.min.js.gz index 17b8cf04763876a3640a393d1c48910dbd973471..848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FnA2Ef*5F0 z-kiRm-fT}uH=|}0uzr||(r$|9n9^UOMJOvAb?r^n7yqo%)M-#`{NAM=^5XHw&jJ8N za{>5^1gqf+zjI?83Y(nN+$_+zYKd2Jn=+I>^Ir)sDL@}y@32o<6$Fcxqr0gF__v=W z1!_iJXn@eP3Vf~)yo_OtyV5*fHDxgXyMKir|Gt_yunXv=N_3U|Hy*h9`C1g=Rh#dc zRT-2)%SNv&AjRW6P>NY3Kw=%**AVvx?SpqkY3ui-k-ce%tA+OS@fYfD?|gI!MiJ2>)ES;p=#@FcE`{lX)I)TXheEf=Sc@Z<@o^vK^U<1VMGL+0nR z4T~PwEASy=&|nK6E2M`#ypI;PL)E5!=JU2XTuet&i`7p1FreyED2@PhF&+)*1EZhFLQ5Bi%*^>eZ&KSPx diff --git a/tooltip.iife.min.js b/tooltip.iife.min.js index 7646d2f..9b3d520 100644 --- a/tooltip.iife.min.js +++ b/tooltip.iife.min.js @@ -1,10 +1,10 @@ /** @draggable/tooltip - https://github.com/Draggable/tooltip -Version: 1.2.0 +Version: 1.2.1 Author: Draggable https://draggable.io */ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -var tooltip=function(t){"use strict";var e=Object.defineProperty,i=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s);const s="_3x4ZIcu-",o="JIt36hCJ",n={triggerName:"tooltip"};class h{constructor(t=n){i(this,"triggerName"),i(this,"tooltip"),i(this,"activeTriggerType",null),i(this,"spacing",12),i(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),i(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),i(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),i(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),i(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${s}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(o)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(s)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(o);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(o),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}return void 0!==window&&(window.SmartTooltip=h),t.SmartTooltip=h,t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),t}({}); +var tooltip=function(t){"use strict";var e=Object.defineProperty,i=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s);const s="_3x4ZIcu-",o="JIt36hCJ",n={triggerName:"tooltip"};class h{constructor(t=n){i(this,"triggerName"),i(this,"tooltip"),i(this,"activeTriggerType",null),i(this,"spacing",12),i(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),i(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),i(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),i(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),i(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${s}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(o)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(s)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(o);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(o),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}const l=h;return void 0!==window&&(window.SmartTooltip=h),t.SmartTooltip=h,t.Tooltip=l,t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),t}({}); diff --git a/tooltip.iife.min.js.gz b/tooltip.iife.min.js.gz index b8b794c881f6edcecf57f2f452aa72ede29a11e6..8dbd5eff1e8ed57f18697419a4e4f14cd4a05e79 100644 GIT binary patch literal 1486 zcmV;<1u^;?ofIJCGM)YTyo`o(v|%lm)RS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I&kwdZ1rj^HdZY>c(d01O5xQ3+>~@k z;*z3z5oxVV7#86Saf<)_J zosg!Uay&n#wYGz<>FF{RU8Lf|7yuF_9vsr>TBIpYC)QzmMi3I_{B7v;U*66>*JoxhKaRA!te6v{^e2VMod1mY_g9Mwh zfE|_)AapGKGfGBOgT76ZS0En1B!f^8^jJ|yUJ*XM&@>k`5GI1_ph8hG=NTfS zwqEFfebhHIBMxXa`e;7aoGyLcitM;zxK~ED+#_vn4hg3r?3ZtWPL2m>f7Yf5Pf# zk=*xnmZl^RU)p`UJQN>~Lc5Ev!PAe}YpIauPS+SKcSD473aJpG!^LnbS+x)9K(S07zoXT;wev@D#0Ht ze+VZmC6ZrBO|@U2;NgL^uEK$1D2K>8-#Mm@J^&eC7*bG?pZ_q~mSFv0pl#VC;8*|{ zcg}@I9+~D*bX8((UYo&yF=SQDYWsO3u_~q$%CZhFP|yGgit-QByh{{W9;dScq7xWj8qK6uwGLJ*mNu~ByaVWqy=2E7LbWq zKWB6rk3k5P6!Mr&bd4TMQ%;O$OcsAgG`Cs;l4EdELxjP%q5ZTWYustok4DBR8E+`x f*IG@ofTi|xeOy`dKPHRHOMyY`&O!jBz`b%CJ?h4m diff --git a/tooltip.umd.min.js b/tooltip.umd.min.js index 37a2abb..385cc36 100644 --- a/tooltip.umd.min.js +++ b/tooltip.umd.min.js @@ -1,10 +1,10 @@ /** @draggable/tooltip - https://github.com/Draggable/tooltip -Version: 1.2.0 +Version: 1.2.1 Author: Draggable https://draggable.io */ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tooltip={})}(this,(function(t){"use strict";var e=Object.defineProperty,i=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s);const s="_3x4ZIcu-",o="JIt36hCJ",n={triggerName:"tooltip"};class h{constructor(t=n){i(this,"triggerName"),i(this,"tooltip"),i(this,"activeTriggerType",null),i(this,"spacing",12),i(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),i(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),i(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),i(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),i(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${s}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(o)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(s)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(o);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(o),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}void 0!==window&&(window.SmartTooltip=h),t.SmartTooltip=h,t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tooltip={})}(this,(function(t){"use strict";var e=Object.defineProperty,i=(t,i,s)=>((t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s)(t,"symbol"!=typeof i?i+"":i,s);const s="_3x4ZIcu-",o="JIt36hCJ",n={triggerName:"tooltip"};class h{constructor(t=n){i(this,"triggerName"),i(this,"tooltip"),i(this,"activeTriggerType",null),i(this,"spacing",12),i(this,"handleClick",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}][${e}-type="click"]`);if(i)if(this.isVisible())this.hide();else{const t=i.getAttribute(`${e}`);this.show(i,t),this.activeTriggerType="click"}else this.hide()})),i(this,"handleMouseOver",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);if("click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))){const t=null==i?void 0:i.getAttribute(`${e}`);t&&(this.show(i,t),this.activeTriggerType="hover")}})),i(this,"handleMouseOut",(t=>{const e=this.triggerName,i=t.target.closest(`[${e}]`);"click"!==this.activeTriggerType&&"click"!==(null==i?void 0:i.getAttribute(`${e}-type`))&&this.hide()})),i(this,"handleResize",(()=>{this.isVisible()&&this.hide()})),i(this,"handleScroll",(()=>{this.isVisible()&&this.hide()})),this.triggerName=`data-${t.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${s}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(o)}calculatePosition(t){const e=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),s=[{name:"top",x:e.left+(e.width-i.width)/2,y:e.top-i.height-this.spacing},{name:"bottom",x:e.left+(e.width-i.width)/2,y:e.bottom+this.spacing},{name:"left",x:e.left-i.width-this.spacing,y:e.top+(e.height-i.height)/2},{name:"right",x:e.right+this.spacing,y:e.top+(e.height-i.height)/2},{name:"top-left",x:e.left,y:e.top-i.height-this.spacing},{name:"top-right",x:e.right-i.width,y:e.top-i.height-this.spacing},{name:"bottom-left",x:e.left,y:e.bottom+this.spacing},{name:"bottom-right",x:e.right-i.width,y:e.bottom+this.spacing}];return s.find((t=>this.fitsInViewport(t,i)))||s[0]}fitsInViewport(t,e){if(!(t.x>=0&&t.y>=0&&t.x+e.width<=window.innerWidth&&t.y+e.height<=window.innerHeight))return!1;return 0===[[t.x,t.y],[t.x+e.width,t.y],[t.x,t.y+e.height],[t.x+e.width,t.y+e.height],[t.x+e.width/2,t.y+e.height/2]].flatMap((([t,e])=>Array.from(document.elementsFromPoint(t,e)))).filter((t=>{if(this.tooltip.contains(t)||t===this.tooltip||t.classList.contains(s)||"none"===getComputedStyle(t).pointerEvents)return!1})).length}show(t,e){this.tooltip.innerHTML=e??"",this.tooltip.classList.add(o);const i=this.calculatePosition(t);this.tooltip.style.left=`${i.x}px`,this.tooltip.style.top=`${i.y}px`,this.tooltip.dataset.position=i.name}hide(){this.tooltip.classList.remove(o),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}const l=h;void 0!==window&&(window.SmartTooltip=h),t.SmartTooltip=h,t.Tooltip=l,t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); diff --git a/tooltip.umd.min.js.gz b/tooltip.umd.min.js.gz index a9c52a217485c7cdb614db0aa176a13346480c48..dad205b01a55dd381166da1daefaf0378356720a 100644 GIT binary patch literal 1557 zcmV+w2I~16TooYXGM)YXc^M7oXv11AsVCpUmC`+?E1(pcL7OV%OKYEs>U@O;mi9Jz zll??Fr+t)JMhj8-6C9Yy(^xw9ivjw$gNz&DT>Qy89~G3>iMvfh((TfMJTD9YlSd@d ztOahraFjo)QbGsa_a!e=vmOFL;8GO~G*xvv-Wvi}SJKv2PMcGldpmYx7X#FT#c6bt`DWeQmhFZymanbMG4Ck z9Y&|qns>YM*n%qMu8LeyR*(!-C=HSdABu(8REi#~v?qDIF2vtd! z%8&t0yrn&DsNGJEh6@eV8T5$Q8jvKG5;8na6WLKEd$?RX7ruC53ILwcIym^zTqKF~ zCmxM=L=Ze?{I2=(Up_{jB!P^O~dDx24G2HUjUoQJ3b7 z2hyktLMgSMUV^N|dvg-kQg+5Zk|_~W64-#KAndeO!EW~hJOt~kviLNGBO-w%TlAns{9AJsT$ofpEm737;mk!hNl5^f@LDEAKRkj8m- z@7fuq{Qis<0Cqc9=S?uKH{gF)?B}t%8&aMmtnNRxcZ2wle$t-qP9q0*q++X?L0Bku z&>~d=V6eJZaQfFd5!E%TJ7jg=U`@o)?1ZQldo48`oR#;}S=luE&h(Z~vyGIpW;6}Z zu;Up`-cFbSNox-E>Eg~?>?^?=CUS&5mOM$x03_LO&#>DuQ4$U`o6RBO&UQkKs~>-+?HV`WH4@Y=z&oHXhBbeLL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