@scania/tegel 1.18.0-popover-menu-beta.1 → 1.18.0-popover-menu-beta.3

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.
Files changed (39) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-popover-canvas.cjs.entry.js +4 -3
  3. package/dist/cjs/tds-popover-core.cjs.entry.js +9 -9
  4. package/dist/cjs/tds-popover-menu.cjs.entry.js +4 -3
  5. package/dist/cjs/tds-tooltip.cjs.entry.js +4 -3
  6. package/dist/cjs/tegel.cjs.js +1 -1
  7. package/dist/collection/components/popover-canvas/popover-canvas.js +23 -5
  8. package/dist/collection/components/popover-core/popover-core.js +28 -11
  9. package/dist/collection/components/popover-menu/popover-menu.js +23 -5
  10. package/dist/collection/components/tooltip/tooltip.js +23 -5
  11. package/dist/components/{p-dd2e5783.js → p-8b3f8bef.js} +10 -9
  12. package/dist/components/{p-7a8af8b4.js → p-ac8ddbd6.js} +6 -4
  13. package/dist/components/tds-header-dropdown.js +2 -2
  14. package/dist/components/tds-header-launcher.js +2 -2
  15. package/dist/components/tds-popover-canvas.js +1 -1
  16. package/dist/components/tds-popover-core.js +1 -1
  17. package/dist/components/tds-popover-menu.js +6 -4
  18. package/dist/components/tds-tooltip.js +7 -5
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/tds-popover-canvas.entry.js +4 -3
  21. package/dist/esm/tds-popover-core.entry.js +9 -9
  22. package/dist/esm/tds-popover-menu.entry.js +4 -3
  23. package/dist/esm/tds-tooltip.entry.js +4 -3
  24. package/dist/esm/tegel.js +1 -1
  25. package/dist/tegel/p-1de95bce.entry.js +1 -0
  26. package/dist/tegel/p-34d7654b.entry.js +1 -0
  27. package/dist/tegel/p-5843b7a8.entry.js +1 -0
  28. package/dist/tegel/p-94e14ba0.entry.js +1 -0
  29. package/dist/tegel/tegel.esm.js +1 -1
  30. package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
  31. package/dist/types/components/popover-core/popover-core.d.ts +2 -0
  32. package/dist/types/components/popover-menu/popover-menu.d.ts +2 -0
  33. package/dist/types/components/tooltip/tooltip.d.ts +2 -0
  34. package/dist/types/components.d.ts +32 -0
  35. package/package.json +1 -1
  36. package/dist/tegel/p-05ed3468.entry.js +0 -1
  37. package/dist/tegel/p-4bab99d5.entry.js +0 -1
  38. package/dist/tegel/p-73dd2dbb.entry.js +0 -1
  39. package/dist/tegel/p-f0d46e61.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as n,H as i,g as r}from"./p-2049fab2.js";import{g as o}from"./p-11648030.js";var a="top",u="bottom",c="right",f="left",s="auto",l=[a,u,c,f],d="start",h="end",p="clippingParents",v="viewport",b="popper",m="reference",y=l.reduce((function(t,e){return t.concat([e+"-"+d,e+"-"+h])}),[]),g=[].concat(l,[s]).reduce((function(t,e){return t.concat([e,e+"-"+d,e+"-"+h])}),[]),x=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function w(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function j(t){return t instanceof O(t).Element||t instanceof Element}function k(t){return t instanceof O(t).HTMLElement||t instanceof HTMLElement}function C(t){return"undefined"!=typeof ShadowRoot&&(t instanceof O(t).ShadowRoot||t instanceof ShadowRoot)}function E(t){return t.split("-")[0]}var M=Math.max,R=Math.min,S=Math.round;function T(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function A(){return!/^((?!chrome|android).)*safari/i.test(T())}function q(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&k(t)&&(r=t.offsetWidth>0&&S(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&S(i.height)/t.offsetHeight||1);var a=(j(t)?O(t):window).visualViewport,u=!A()&&n,c=(i.left+(u&&a?a.offsetLeft:0))/r,f=(i.top+(u&&a?a.offsetTop:0))/o,s=i.width/r,l=i.height/o;return{width:s,height:l,top:f,right:c+s,bottom:f+l,left:c,x:c,y:f}}function B(t){var e=q(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function P(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&C(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function W(t){return O(t).getComputedStyle(t)}function L(t){return["table","td","th"].indexOf(w(t))>=0}function H(t){return((j(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===w(t)?t:t.assignedSlot||t.parentNode||(C(t)?t.host:null)||H(t)}function D(t){return k(t)&&"fixed"!==W(t).position?t.offsetParent:null}function I(t){for(var e=O(t),n=D(t);n&&L(n)&&"static"===W(n).position;)n=D(n);return n&&("html"===w(n)||"body"===w(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(T());if(/Trident/i.test(T())&&k(t)&&"fixed"===W(t).position)return null;var n=z(t);for(C(n)&&(n=n.host);k(n)&&["html","body"].indexOf(w(n))<0;){var i=W(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function _(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function U(t,e,n){return M(t,R(e,n))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function F(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function V(t){return t.split("-")[1]}var G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,l=t.position,d=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=s.x,y=void 0===m?0:m,g=s.y,x=void 0===g?0:g,w="function"==typeof v?v({x:y,y:x}):{x:y,y:x};y=w.x,x=w.y;var j=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),C=f,E=a,M=window;if(p){var R=I(n),T="clientHeight",A="clientWidth";R===O(n)&&"static"!==W(R=H(n)).position&&"absolute"===l&&(T="scrollHeight",A="scrollWidth"),(r===a||(r===f||r===c)&&o===h)&&(E=u,x-=(b&&R===M&&M.visualViewport?M.visualViewport.height:R[T])-i.height,x*=d?1:-1),r!==f&&(r!==a&&r!==u||o!==h)||(C=c,y-=(b&&R===M&&M.visualViewport?M.visualViewport.width:R[A])-i.width,y*=d?1:-1)}var q,B=Object.assign({position:l},p&&G),P=!0===v?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:S(t.x*i)/i||0,y:S(n*i)/i||0}}({x:y,y:x},O(n)):{x:y,y:x};return y=P.x,x=P.y,Object.assign({},B,d?((q={})[E]=k?"0":"",q[C]=j?"0":"",q.transform=(M.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",q):((e={})[E]=k?x+"px":"",e[C]=j?y+"px":"",e.transform="",e))}var K={passive:!0},N={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return N[t]}))}var X={start:"end",end:"start"};function Y(t){return t.replace(/start|end/g,(function(t){return X[t]}))}function Z(t){var e=O(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function tt(t){return q(H(t)).left+Z(t).scrollLeft}function et(t){var e=W(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function nt(t){return["html","body","#document"].indexOf(w(t))>=0?t.ownerDocument.body:k(t)&&et(t)?t:nt(z(t))}function it(t,e){var n;void 0===e&&(e=[]);var i=nt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=O(i),a=r?[o].concat(o.visualViewport||[],et(i)?i:[]):i,u=e.concat(a);return r?u:u.concat(it(z(a)))}function rt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ot(t,e,n){return e===v?rt(function(t,e){var n=O(t),i=H(t),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,u=0,c=0;if(r){o=r.width,a=r.height;var f=A();(f||!f&&"fixed"===e)&&(u=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:u+tt(t),y:c}}(t,n)):j(e)?function(t,e){var n=q(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):rt(function(t){var e,n=H(t),i=Z(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=M(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=M(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-i.scrollLeft+tt(t),c=-i.scrollTop;return"rtl"===W(r||n).direction&&(u+=M(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}(H(t)))}function at(t){var e,n=t.reference,i=t.element,r=t.placement,o=r?E(r):null,s=r?V(r):null,l=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2;switch(o){case a:e={x:l,y:n.y-i.height};break;case u:e={x:l,y:n.y+n.height};break;case c:e={x:n.x+n.width,y:p};break;case f:e={x:n.x-i.width,y:p};break;default:e={x:n.x,y:n.y}}var v=o?_(o):null;if(null!=v){var b="y"===v?"height":"width";switch(s){case d:e[v]=e[v]-(n[b]/2-i[b]/2);break;case h:e[v]=e[v]+(n[b]/2-i[b]/2)}}return e}function ut(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.strategy,o=void 0===r?t.strategy:r,f=e.boundary,s=void 0===f?p:f,d=e.rootBoundary,h=void 0===d?v:d,y=e.elementContext,g=void 0===y?b:y,x=e.altBoundary,O=void 0!==x&&x,C=e.padding,E=void 0===C?0:C,S=$("number"!=typeof E?E:F(E,l)),T=t.rects.popper,A=t.elements[O?g===b?m:b:g],B=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=it(z(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&k(t)?I(t):t;return j(n)?e.filter((function(t){return j(t)&&P(t,n)&&"body"!==w(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),a=o.reduce((function(e,n){var r=ot(t,n,i);return e.top=M(r.top,e.top),e.right=R(r.right,e.right),e.bottom=R(r.bottom,e.bottom),e.left=M(r.left,e.left),e}),ot(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(j(A)?A:A.contextElement||H(t.elements.popper),s,h,o),L=q(t.elements.reference),D=at({reference:L,element:T,strategy:"absolute",placement:i}),_=rt(Object.assign({},T,D)),U=g===b?_:L,V={top:B.top-U.top+S.top,bottom:U.bottom-B.bottom+S.bottom,left:B.left-U.left+S.left,right:U.right-B.right+S.right},G=t.modifiersData.offset;if(g===b&&G){var J=G[i];Object.keys(V).forEach((function(t){var e=[c,u].indexOf(t)>=0?1:-1,n=[a,u].indexOf(t)>=0?"y":"x";V[t]+=J[n]*e}))}return V}function ct(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,a=e.allowedAutoPlacements,u=void 0===a?g:a,c=V(e.placement),f=c?o?y:y.filter((function(t){return V(t)===c})):l,s=f.filter((function(t){return u.indexOf(t)>=0}));0===s.length&&(s=f);var d=s.reduce((function(e,o){return e[o]=ut(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[E(o)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}const ft={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,l=n.altAxis,h=void 0===l||l,p=n.fallbackPlacements,v=n.padding,b=n.boundary,m=n.rootBoundary,y=n.altBoundary,g=n.flipVariations,x=void 0===g||g,w=n.allowedAutoPlacements,O=e.options.placement,j=E(O),k=p||(j!==O&&x?function(t){if(E(t)===s)return[];var e=Q(t);return[Y(t),e,Y(e)]}(O):[Q(O)]),C=[O].concat(k).reduce((function(t,n){return t.concat(E(n)===s?ct(e,{placement:n,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),M=e.rects.reference,R=e.rects.popper,S=new Map,T=!0,A=C[0],q=0;q<C.length;q++){var B=C[q],P=E(B),W=V(B)===d,L=[a,u].indexOf(P)>=0,H=L?"width":"height",z=ut(e,{placement:B,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),D=L?W?c:f:W?u:a;M[H]>R[H]&&(D=Q(D));var I=Q(D),_=[];if(o&&_.push(z[P]<=0),h&&_.push(z[D]<=0,z[I]<=0),_.every((function(t){return t}))){A=B,T=!1;break}S.set(B,_)}if(T)for(var U=function(t){var e=C.find((function(e){var n=S.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},$=x?3:1;$>0&&"break"!==U($);$--);e.placement!==A&&(e.modifiersData[i]._skip=!0,e.placement=A,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function st(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function lt(t){return[a,c,u,f].some((function(e){return t[e]>=0}))}function dt(t,e,n){void 0===n&&(n=!1);var i,r,o=k(e),a=k(e)&&function(t){var e=t.getBoundingClientRect(),n=S(e.width)/t.offsetWidth||1,i=S(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),u=H(e),c=q(t,a,n),f={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!n)&&(("body"!==w(e)||et(u))&&(f=(i=e)!==O(i)&&k(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Z(i)),k(e)?((s=q(e,!0)).x+=e.clientLeft,s.y+=e.clientTop):u&&(s.x=tt(u))),{x:c.left+f.scrollLeft-s.x,y:c.top+f.scrollTop-s.y,width:c.width,height:c.height}}function ht(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var pt={placement:"bottom",modifiers:[],strategy:"absolute"};function vt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function bt(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?pt:i;return function(t,e,i){void 0===i&&(i=r);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},pt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],f=!1,s={state:u,setOptions:function(i){var o="function"==typeof i?i(u.options):i;l(),u.options=Object.assign({},r,u.options,o),u.scrollParents={reference:j(t)?it(t):t.contextElement?it(t.contextElement):[],popper:it(e)};var a,f,d=function(t){var e=ht(t);return x.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((a=[].concat(n,u.options.modifiers),f=a.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(f).map((function(t){return f[t]}))));return u.orderedModifiers=d.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:u,name:t.name,instance:s,options:void 0===e?{}:e});c.push(i||function(){})}})),s.update()},forceUpdate:function(){if(!f){var t=u.elements,e=t.reference,n=t.popper;if(vt(e,n)){u.rects={reference:dt(e,I(n),"fixed"===u.options.strategy),popper:B(n)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<u.orderedModifiers.length;i++)if(!0!==u.reset){var r=u.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:r.name,instance:s})||u)}else u.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){s.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),f=!0}};if(!vt(t,e))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(i).then((function(t){!f&&i.onFirstUpdate&&i.onFirstUpdate(t)})),s}}var mt=bt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,u=void 0===a||a,c=O(e.elements.popper),f=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&f.forEach((function(t){t.addEventListener("scroll",n.update,K)})),u&&c.addEventListener("resize",n.update,K),function(){o&&f.forEach((function(t){t.removeEventListener("scroll",n.update,K)})),u&&c.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=at({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,u=n.roundOffsets,c=void 0===u||u,f={placement:E(e.placement),variation:V(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,J(Object.assign({},f,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,J(Object.assign({},f,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];k(r)&&w(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});k(i)&&w(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=g.reduce((function(t,n){return t[n]=function(t,e,n){var i=E(t),r=[f,a].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,u=o[0],s=o[1];return u=u||0,s=(s||0)*r,[f,c].indexOf(i)>=0?{x:s,y:u}:{x:u,y:s}}(n,e.rects,r),t}),{}),u=o[e.placement],s=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u.x,e.modifiersData.popperOffsets.y+=s),e.modifiersData[n]=o}},ft,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,l=void 0!==s&&s,h=n.tether,p=void 0===h||h,v=n.tetherOffset,b=void 0===v?0:v,m=ut(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=E(e.placement),g=V(e.placement),x=!g,w=_(y),O="x"===w?"y":"x",j=e.modifiersData.popperOffsets,k=e.rects.reference,C=e.rects.popper,S="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,T="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),A=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(j){if(o){var P,W="y"===w?a:f,L="y"===w?u:c,H="y"===w?"height":"width",z=j[w],D=z+m[W],$=z-m[L],F=p?-C[H]/2:0,G=g===d?k[H]:C[H],J=g===d?-C[H]:-k[H],K=e.elements.arrow,N=p&&K?B(K):{width:0,height:0},Q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Q[W],Y=Q[L],Z=U(0,k[H],N[H]),tt=x?k[H]/2-F-Z-X-T.mainAxis:G-Z-X-T.mainAxis,et=x?-k[H]/2+F+Z+Y+T.mainAxis:J+Z+Y+T.mainAxis,nt=e.elements.arrow&&I(e.elements.arrow),it=null!=(P=null==A?void 0:A[w])?P:0,rt=z+et-it,ot=U(p?R(D,z+tt-it-(nt?"y"===w?nt.clientTop||0:nt.clientLeft||0:0)):D,z,p?M($,rt):$);j[w]=ot,q[w]=ot-z}if(l){var at,ct=j[O],ft="y"===O?"height":"width",st=ct+m["x"===w?a:f],lt=ct-m["x"===w?u:c],dt=-1!==[a,f].indexOf(y),ht=null!=(at=null==A?void 0:A[O])?at:0,pt=dt?st:ct-k[ft]-C[ft]-ht+T.altAxis,vt=dt?ct+k[ft]+C[ft]-ht-T.altAxis:lt,bt=p&&dt?function(t,e,n){var i=U(t,e,n);return i>n?n:i}(pt,ct,vt):U(p?pt:st,ct,p?vt:lt);j[O]=bt,q[O]=bt-ct}e.modifiersData[i]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,d=E(n.placement),h=_(d),p=[f,c].indexOf(d)>=0?"height":"width";if(o&&s){var v=function(t,e){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:F(t,l))}(r.padding,n),b=B(o),m="y"===h?a:f,y="y"===h?u:c,g=n.rects.reference[p]+n.rects.reference[h]-s[h]-n.rects.popper[p],x=s[h]-n.rects.reference[h],w=I(o),O=w?"y"===h?w.clientHeight||0:w.clientWidth||0:0,j=O/2-b[p]/2+(g/2-x/2),k=U(v[m],j,O-b[p]-v[y]);n.modifiersData[i]=((e={})[h]=k,e.centerOffset=k-j,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&P(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=ut(e,{elementContext:"reference"}),u=ut(e,{altBoundary:!0}),c=st(a,i),f=st(u,r,o),s=lt(c),l=lt(f);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:s,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":l})}}]});const yt=class{constructor(n){t(this,n),this.internalTdsShow=e(this,"internalTdsShow",4),this.internalTdsClose=e(this,"internalTdsClose",0),this.uuid=o(),this.setIsShown=function(t){this.isShown="function"==typeof t?t(this.isShown):t,this.isShown?this.internalTdsShow.emit():this.internalTdsClose.emit()}.bind(this),this.onClickTarget=function(t){t.stopPropagation(),this.setIsShown((t=>!t))}.bind(this),this.handleShow=function(t){t.stopPropagation(),this.setIsShown(!0)}.bind(this),this.handleHide=function(t){t.stopPropagation(),this.setIsShown(!1)}.bind(this),this.selector="",this.referenceEl=void 0,this.show=null,this.placement="auto",this.offsetSkidding=0,this.offsetDistance=8,this.modifiers=[],this.trigger="click",this.autoHide=!0,this.renderedShowValue=!1,this.popperInstance=void 0,this.target=void 0,this.isShown=!1}async close(){this.setIsShown(!1)}onAnyClick(t){"click"===this.trigger&&this.isShown&&null===this.show&&!t.composedPath().includes(this.host)&&this.setIsShown(!1)}onTdsShow(t){null===this.show&&t.target.id!==`tds-popover-core-${this.uuid}`&&this.setIsShown(!1)}componentWillLoad(){this.setIsShown(this.show)}onShowChange(t){this.setIsShown(t)}onReferenceElChanged(t,e){t!==e&&this.initialize({referenceEl:t,trigger:this.trigger})}onTriggerChanged(t){this.initialize({referenceEl:this.referenceEl,trigger:t})}initialize({referenceEl:t,trigger:e}){this.cleanUp(),this.target=void 0!==t?t:this.selector?document.querySelector(this.selector):null,this.popperInstance=this.target?mt(this.target,this.host,{strategy:"fixed",placement:this.placement,modifiers:[{name:"offset",options:{offset:[this.offsetSkidding,this.offsetDistance]}},...this.modifiers]}):null,this.popperInstance||console.error("Could not initialize: reference element not found."),"click"===e&&null===this.show&&this.target.addEventListener("click",this.onClickTarget),"hover"!==e&&"hover-popover"!==e||(this.target.addEventListener("focusin",this.handleShow),this.target.addEventListener("focusout",this.handleHide),this.target.addEventListener("mouseenter",this.handleShow),this.target.addEventListener("mouseleave",this.handleHide),"hover-popover"===e&&(this.host.addEventListener("mouseenter",this.handleShow),this.host.addEventListener("mouseleave",this.handleHide)))}cleanUp(){var t,e,n,i,r,o,a,u;null===(t=this.target)||void 0===t||t.removeEventListener("click",this.onClickTarget),null===(e=this.target)||void 0===e||e.removeEventListener("focusin",this.handleShow),null===(n=this.target)||void 0===n||n.removeEventListener("focusout",this.handleHide),null===(i=this.target)||void 0===i||i.removeEventListener("mouseenter",this.handleShow),null===(r=this.target)||void 0===r||r.removeEventListener("mouseleave",this.handleHide),null===(o=this.host)||void 0===o||o.removeEventListener("mouseenter",this.handleShow),null===(a=this.host)||void 0===a||a.removeEventListener("mouseleave",this.handleHide),null===(u=this.popperInstance)||void 0===u||u.destroy()}connectedCallback(){console.log("connectedCallback entry:",this.referenceEl,this.trigger),this.initialize({referenceEl:this.referenceEl,trigger:this.trigger}),console.log("connectedCallback exit:",this.referenceEl,this.trigger)}componentDidRender(){console.log("componentDidRender entry:",this.popperInstance),this.isShown&&!this.renderedShowValue&&this.popperInstance.update(),this.renderedShowValue=this.isShown,console.log("componentDidRender exit:",this.popperInstance)}disconnectedCallback(){console.log("disconnectedCallback entry:"),this.cleanUp(),console.log("disconnectedCallback exit:")}render(){let t={};return this.autoHide&&(t={display:this.isShown?"block":"none"}),n(i,{key:"b6a164ac013e300e3c4d1e7de5908e44e0758256",style:t,id:`tds-popover-core-${this.uuid}`},n("slot",{key:"622f6987b2bcaca8f6cdd8815f3fff422c1a9c5d"}))}get host(){return r(this)}static get watchers(){return{show:["onShowChange"],referenceEl:["onReferenceElChanged"],trigger:["onTriggerChanged"]}}};export{yt as tds_popover_core}
@@ -1 +0,0 @@
1
- import{r as s,h as e,H as o,g as t}from"./p-2049fab2.js";import{i as d}from"./p-3fe9cbbf.js";const i=class{constructor(e){s(this,e),this.inheritedAttributes=[],this.selector="",this.referenceEl=void 0,this.show=null,this.placement="auto",this.offsetSkidding=0,this.offsetDistance=8,this.fluidWidth=!1,this.childRef=void 0}async close(){var s;null===(s=this.childRef)||void 0===s||s.close()}componentWillLoad(){this.inheritedAttributes=d(this.host,["style","class"])}render(){var s;return e(o,{key:"36c12148ce4507dd4b157fff5be30760d2374bdd"},e("tds-popover-core",{key:"92d5abfd7e7213dcb22c92fa401a21dfeef76edd",class:{"tds-popover-menu":!0,[null!==(s=this.inheritedAttributes.class)&&void 0!==s?s:""]:!0,"fluid-width":this.fluidWidth},selector:this.selector,referenceEl:this.referenceEl,show:this.show,placement:this.placement,offsetSkidding:this.offsetSkidding,offsetDistance:this.offsetDistance,ref:s=>{this.childRef=s}},e("div",{key:"6b3a893d1d0a9c32a3846c7216a4fdac92a4222c",role:"list"},e("slot",{key:"cae075f5e187b5f59638f6f2a9ff8c38e716bcbb"}))))}get host(){return t(this)}};i.style=".tds-popover-menu.sc-tds-popover-menu{box-sizing:border-box;overflow:hidden;width:160px;background-color:var(--tds-popover-menu-background);padding:16px 6px;box-shadow:0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);border-radius:4px;z-index:900}.tds-popover-menu.sc-tds-popover-menu *.sc-tds-popover-menu{box-sizing:border-box}.tds-popover-menu.fluid-width.sc-tds-popover-menu{width:unset}tds-popover-core.sc-tds-popover-menu{padding:6px 0 !important}.sc-tds-popover-menu-s>tds-divider{display:block;padding:6px !important}";export{i as tds_popover_menu}
@@ -1 +0,0 @@
1
- import{r as t,h as o,H as s,g as i}from"./p-2049fab2.js";import{i as e}from"./p-3fe9cbbf.js";const r=class{constructor(o){t(this,o),this.popperjsExtraModifiers=[{name:"positionCalc",enabled:!0,phase:"main",fn:({state:t})=>{"bottom-start"===t.placement||"right-start"===t.placement?this.border="top-left":"bottom-end"===t.placement||"left-start"===t.placement?this.border="top-right":"top-end"===t.placement||"left-end"===t.placement?this.border="bottom-right":"top-start"===t.placement||"right-end"===t.placement?this.border="bottom-left":"bottom"!==t.placement&&"top"!==t.placement||(this.border="default")}}],this.inheritedAttributes=[],this.text="",this.selector="",this.referenceEl=void 0,this.mouseOverTooltip=!1,this.trigger="hover",this.show=null,this.placement="bottom",this.offsetSkidding=0,this.offsetDistance=8}componentWillLoad(){this.inheritedAttributes=e(this.host,["style","class"])}determineTrigger(){return"hover"===this.trigger?this.mouseOverTooltip?"hover-popover":"hover":this.trigger}render(){var t;return o(s,{key:"6ddab8bdc240b9b286226593656bbc5ab89f375d"},o("tds-popover-core",Object.assign({key:"82235fdf92c5d1fb7a63b2a756a59c8516e1e8c2"},this.inheritedAttributes,{class:{"tds-tooltip":!0,[`tds-tooltip-${this.border}`]:!0,[null!==(t=this.inheritedAttributes.class)&&void 0!==t?t:""]:!0,"tds-tooltip-show":this.show},selector:this.selector,referenceEl:this.referenceEl,trigger:this.determineTrigger(),modifiers:this.popperjsExtraModifiers,offsetSkidding:this.offsetSkidding,offsetDistance:this.offsetDistance,show:this.show,placement:this.placement,autoHide:!1,onInternalTdsShow:()=>{this.show=!0},onInternalTdsClose:()=>{this.show=!1}}),this.text,o("slot",{key:"579448ad9309452a0be5aedb906da8059f56b122"})))}get host(){return i(this)}};r.style=".tds-tooltip.sc-tds-tooltip{box-sizing:border-box;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-tooltip-color);background-color:var(--tds-tooltip-background);border-radius:4px;padding:8px;word-wrap:break-word;max-width:192px;z-index:900;opacity:0;visibility:hidden;transition:opacity 200ms ease-in, visibility 200ms ease-in}.tds-tooltip.sc-tds-tooltip *.sc-tds-tooltip{box-sizing:border-box}.tds-tooltip.tds-tooltip-top-left.sc-tds-tooltip{border-radius:0 4px 4px}.tds-tooltip.tds-tooltip-top-right.sc-tds-tooltip{border-radius:4px 0 4px 4px}.tds-tooltip.tds-tooltip-bottom-right.sc-tds-tooltip{border-radius:4px 4px 0}.tds-tooltip.tds-tooltip-bottom-left.sc-tds-tooltip{border-radius:4px 4px 4px 0}.tds-tooltip-show.sc-tds-tooltip{opacity:1;visibility:visible}";export{r as tds_tooltip}
@@ -1 +0,0 @@
1
- import{r as s,h as o,H as e,g as a}from"./p-2049fab2.js";import{i as t}from"./p-3fe9cbbf.js";const r=class{constructor(o){s(this,o),this.inheritedAttributes=[],this.selector="",this.referenceEl=void 0,this.show=null,this.placement="auto",this.offsetSkidding=0,this.offsetDistance=8,this.modifiers=[],this.childRef=void 0}async close(){var s;null===(s=this.childRef)||void 0===s||s.close()}componentWillLoad(){this.inheritedAttributes=t(this.host,["style","class"])}render(){var s;return o(e,{key:"6585164269ddef7083e5aed2bcfa4ea5ab7d32ba"},o("tds-popover-core",Object.assign({key:"9470ac2faa94611ece2c9394717a7bb9d63eb5b1"},this.inheritedAttributes,{class:{"tds-popover-canvas":!0,[null!==(s=this.inheritedAttributes.class)&&void 0!==s?s:""]:!0},selector:this.selector,referenceEl:this.referenceEl,show:this.show,placement:this.placement,offsetSkidding:this.offsetSkidding,offsetDistance:this.offsetDistance,modifiers:this.modifiers,trigger:"click",ref:s=>{this.childRef=s}}),o("div",{key:"330a63a0ef5c9f057d877dae9977b8bc25987771"},o("slot",{key:"38787385e51260e4a140f83d5eb22f03deb6e30e"}))))}get host(){return a(this)}};r.style=".tds-popover-canvas.sc-tds-popover-canvas{box-sizing:border-box;display:inline-block;color:var(--tds-popover-canvas-color);background-color:var(--tds-popover-canvas-background);box-shadow:0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);border-radius:4px;z-index:900}.tds-popover-canvas.sc-tds-popover-canvas *.sc-tds-popover-canvas{box-sizing:border-box}";export{r as tds_popover_canvas}