@limetech/lime-elements 36.1.0-next.13 → 36.1.0-next.14

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.
@@ -1 +1 @@
1
- import{p as e,b as l}from"./p-e9a95b8f.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-995bbd2a",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-3cf4aae0",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-f0e872b6",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-7c035e6e",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-f41567a1",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-95f275ab",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-3b0c9885",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-440454ed",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-e7447b76",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-5ef52589",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-aa66620a",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-9af0704c",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-2639edf9",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-c15da26d",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-63e25a0a",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-53e01330",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}]]],["p-ab8b6d81",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-d74fa89e",[[1,"limel-config",{config:[16]}]]],["p-a5af84a7",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-6eb07bc3",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-6e7809a6",[[1,"limel-grid"]]],["p-71efe2ca",[[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-c80acfb2",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-f8e5b304",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-a465084b",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-b0e54dc2",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-eec907ac",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],isFocused:[32],isModified:[32],showCompletions:[32]}]]],["p-009de50e",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-8827628d",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-b0046fcd",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-104c89e8",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-d294266e",[[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1]}]]],["p-4dc07252",[[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-ed65468d",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]],["p-93cd2268",[[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-19f72dab",[[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]],["p-f0c9dadd",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-b913df89",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"]}],[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-ae0e9730",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[1],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-6b1bc80f",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-629862f4",[[1,"limel-badge",{label:[520]}]]],["p-b4de3380",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],open:[32]}],[1,"limel-popover-surface",{contentCollection:[16]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}]]]],e)));
1
+ import{p as e,b as l}from"./p-e9a95b8f.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-995bbd2a",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-3cf4aae0",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-f0e872b6",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-7c035e6e",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-f41567a1",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-95f275ab",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-3b0c9885",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-440454ed",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-e7447b76",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-5ef52589",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-aa66620a",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-9af0704c",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-b985362c",[[1,"limel-shortcut",{icon:[513],label:[513],linkTitle:[513,"link-title"],disabled:[516],href:[513],target:[513],badge:[520]}]]],["p-b0e54dc2",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-009de50e",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-8827628d",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-b0046fcd",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-2639edf9",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-c15da26d",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-63e25a0a",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-53e01330",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}]]],["p-ab8b6d81",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-d74fa89e",[[1,"limel-config",{config:[16]}]]],["p-a5af84a7",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-6eb07bc3",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-6e7809a6",[[1,"limel-grid"]]],["p-71efe2ca",[[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-c80acfb2",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-f8e5b304",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-a465084b",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-104c89e8",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-d294266e",[[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1]}]]],["p-4dc07252",[[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-b913df89",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"]}],[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-629862f4",[[1,"limel-badge",{label:[520]}]]],["p-f0c9dadd",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-ae0e9730",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[1],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-abce6779",[[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-eec907ac",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],isFocused:[32],isModified:[32],showCompletions:[32]}]]],["p-6b1bc80f",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-ed65468d",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]],["p-19f72dab",[[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]],["p-b4de3380",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],open:[32]}],[1,"limel-popover-surface",{contentCollection:[16]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as t,h as n,g as e}from"./p-e9a95b8f.js";var r="top",i="bottom",o="right",a="left",u=[r,i,o,a],f=u.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),s=[].concat(u,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),c=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function l(t){return t?(t.nodeName||"").toLowerCase():null}function d(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function p(t){return t instanceof d(t).Element||t instanceof Element}function h(t){return t instanceof d(t).HTMLElement||t instanceof HTMLElement}function v(t){return"undefined"!=typeof ShadowRoot&&(t instanceof d(t).ShadowRoot||t instanceof ShadowRoot)}function b(t){return t.split("-")[0]}var m=Math.max,y=Math.min,g=Math.round;function w(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function x(){return!/^((?!chrome|android).)*safari/i.test(w())}function O(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),i=1,o=1;n&&h(t)&&(i=t.offsetWidth>0&&g(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&g(r.height)/t.offsetHeight||1);var a=(p(t)?d(t):window).visualViewport,u=!x()&&e,f=(r.left+(u&&a?a.offsetLeft:0))/i,s=(r.top+(u&&a?a.offsetTop:0))/o,c=r.width/i,l=r.height/o;return{width:c,height:l,top:s,right:f+c,bottom:s+l,left:f,x:f,y:s}}function j(t){var n=O(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function M(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&v(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function k(t){return d(t).getComputedStyle(t)}function P(t){return["table","td","th"].indexOf(l(t))>=0}function C(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function A(t){return"html"===l(t)?t:t.assignedSlot||t.parentNode||(v(t)?t.host:null)||C(t)}function q(t){return h(t)&&"fixed"!==k(t).position?t.offsetParent:null}function E(t){for(var n=d(t),e=q(t);e&&P(e)&&"static"===k(e).position;)e=q(e);return e&&("html"===l(e)||"body"===l(e)&&"static"===k(e).position)?n:e||function(t){var n=/firefox/i.test(w());if(/Trident/i.test(w())&&h(t)&&"fixed"===k(t).position)return null;var e=A(t);for(v(e)&&(e=e.host);h(e)&&["html","body"].indexOf(l(e))<0;){var r=k(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function R(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function W(t,n,e){return m(t,y(n,e))}function B(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function S(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function L(t){return t.split("-")[1]}var I={top:"auto",right:"auto",bottom:"auto",left:"auto"};function T(t){var n,e=t.popper,u=t.popperRect,f=t.placement,s=t.variation,c=t.offsets,l=t.position,p=t.gpuAcceleration,h=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=c.x,y=void 0===m?0:m,w=c.y,x=void 0===w?0:w,O="function"==typeof v?v({x:y,y:x}):{x:y,y:x};y=O.x,x=O.y;var j=c.hasOwnProperty("x"),M=c.hasOwnProperty("y"),P=a,A=r,q=window;if(h){var R=E(e),W="clientHeight",B="clientWidth";R===d(e)&&"static"!==k(R=C(e)).position&&"absolute"===l&&(W="scrollHeight",B="scrollWidth"),R=R,(f===r||(f===a||f===o)&&"end"===s)&&(A=i,x-=(b&&R===q&&q.visualViewport?q.visualViewport.height:R[W])-u.height,x*=p?1:-1),f!==a&&(f!==r&&f!==i||"end"!==s)||(P=o,y-=(b&&R===q&&q.visualViewport?q.visualViewport.width:R[B])-u.width,y*=p?1:-1)}var S,L=Object.assign({position:l},h&&I),T=!0===v?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:g(t.x*e)/e||0,y:g(n*e)/e||0}}({x:y,y:x}):{x:y,y:x};return y=T.x,x=T.y,Object.assign({},L,p?((S={})[A]=M?"0":"",S[P]=j?"0":"",S.transform=(q.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",S):((n={})[A]=M?x+"px":"",n[P]=j?y+"px":"",n.transform="",n))}var z={passive:!0},F={left:"right",right:"left",bottom:"top",top:"bottom"};function H(t){return t.replace(/left|right|bottom|top/g,(function(t){return F[t]}))}var V={start:"end",end:"start"};function D(t){return t.replace(/start|end/g,(function(t){return V[t]}))}function $(t){var n=d(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function _(t){return O(C(t)).left+$(t).scrollLeft}function U(t){var n=k(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function G(t){return["html","body","#document"].indexOf(l(t))>=0?t.ownerDocument.body:h(t)&&U(t)?t:G(A(t))}function J(t,n){var e;void 0===n&&(n=[]);var r=G(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=d(r),a=i?[o].concat(o.visualViewport||[],U(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(J(A(a)))}function K(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function N(t,n,e){return"viewport"===n?K(function(t,n){var e=d(t),r=C(t),i=e.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;var s=x();(s||!s&&"fixed"===n)&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:u+_(t),y:f}}(t,e)):p(n)?function(t,n){var e=O(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):K(function(t){var n,e=C(t),r=$(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=m(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=m(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+_(t),f=-r.scrollTop;return"rtl"===k(i||e).direction&&(u+=m(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(C(t)))}function Q(t){var n,e=t.reference,u=t.element,f=t.placement,s=f?b(f):null,c=f?L(f):null,l=e.x+e.width/2-u.width/2,d=e.y+e.height/2-u.height/2;switch(s){case r:n={x:l,y:e.y-u.height};break;case i:n={x:l,y:e.y+e.height};break;case o:n={x:e.x+e.width,y:d};break;case a:n={x:e.x-u.width,y:d};break;default:n={x:e.x,y:e.y}}var p=s?R(s):null;if(null!=p){var h="y"===p?"height":"width";switch(c){case"start":n[p]=n[p]-(e[h]/2-u[h]/2);break;case"end":n[p]=n[p]+(e[h]/2-u[h]/2)}}return n}function X(t,n){void 0===n&&(n={});var e=n.placement,a=void 0===e?t.placement:e,f=n.strategy,s=void 0===f?t.strategy:f,c=n.boundary,d=void 0===c?"clippingParents":c,v=n.rootBoundary,b=void 0===v?"viewport":v,g=n.elementContext,w=void 0===g?"popper":g,x=n.altBoundary,j=void 0!==x&&x,P=n.padding,q=void 0===P?0:P,R=B("number"!=typeof q?q:S(q,u)),W=t.rects.popper,L=t.elements[j?"popper"===w?"reference":"popper":w],I=function(t,n,e,r){var i="clippingParents"===n?function(t){var n=J(A(t)),e=["absolute","fixed"].indexOf(k(t).position)>=0&&h(t)?E(t):t;return p(e)?n.filter((function(t){return p(t)&&M(t,e)&&"body"!==l(t)})):[]}(t):[].concat(n),o=[].concat(i,[e]),a=o.reduce((function(n,e){var i=N(t,e,r);return n.top=m(i.top,n.top),n.right=y(i.right,n.right),n.bottom=y(i.bottom,n.bottom),n.left=m(i.left,n.left),n}),N(t,o[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(p(L)?L:L.contextElement||C(t.elements.popper),d,b,s),T=O(t.elements.reference),z=Q({reference:T,element:W,strategy:"absolute",placement:a}),F=K(Object.assign({},W,z)),H="popper"===w?F:T,V={top:I.top-H.top+R.top,bottom:H.bottom-I.bottom+R.bottom,left:I.left-H.left+R.left,right:H.right-I.right+R.right},D=t.modifiersData.offset;if("popper"===w&&D){var $=D[a];Object.keys(V).forEach((function(t){var n=[o,i].indexOf(t)>=0?1:-1,e=[r,i].indexOf(t)>=0?"y":"x";V[t]+=$[e]*n}))}return V}function Y(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,c=void 0===a?s:a,l=L(n.placement),d=l?o?f:f.filter((function(t){return L(t)===l})):u,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var h=p.reduce((function(n,o){return n[o]=X(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[b(o)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}function Z(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function tt(t){return[r,o,i,a].some((function(n){return t[n]>=0}))}function nt(t,n,e){void 0===e&&(e=!1);var r,i,o=h(n),a=h(n)&&function(t){var n=t.getBoundingClientRect(),e=g(n.width)/t.offsetWidth||1,r=g(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=C(n),f=O(t,a,e),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!e)&&(("body"!==l(n)||U(u))&&(s=(r=n)!==d(r)&&h(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:$(r)),h(n)?((c=O(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=_(u))),{x:f.left+s.scrollLeft-c.x,y:f.top+s.scrollTop-c.y,width:f.width,height:f.height}}function et(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var rt={placement:"bottom",modifiers:[],strategy:"absolute"};function it(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ot(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?rt:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},rt,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],s=!1,l={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;d(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:p(t)?J(t):t.contextElement?J(t.contextElement):[],popper:J(n)};var a,s,h=function(t){var n=et(t);return c.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),s=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(s).map((function(t){return s[t]}))));return u.orderedModifiers=h.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:l,options:void 0===n?{}:n});f.push(r||function(){})}})),l.update()},forceUpdate:function(){if(!s){var t=u.elements,n=t.reference,e=t.popper;if(it(n,e)){u.rects={reference:nt(n,E(e),"fixed"===u.options.strategy),popper:j(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:l})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){l.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),s=!0}};if(!it(t,n))return l;function d(){f.forEach((function(t){return t()})),f=[]}return l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l}}var at=ot({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=d(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&s.forEach((function(t){t.addEventListener("scroll",e.update,z)})),u&&f.addEventListener("resize",e.update,z),function(){o&&s.forEach((function(t){t.removeEventListener("scroll",e.update,z)})),u&&f.removeEventListener("resize",e.update,z)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=Q({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,s={placement:b(n.placement),variation:L(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,T(Object.assign({},s,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,T(Object.assign({},s,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];h(i)&&l(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});h(r)&&l(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,u=void 0===i?[0,0]:i,f=s.reduce((function(t,e){return t[e]=function(t,n,e){var i=b(t),u=[a,r].indexOf(i)>=0?-1:1,f="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=f[0],c=f[1];return s=s||0,c=(c||0)*u,[a,o].indexOf(i)>=0?{x:c,y:s}:{x:s,y:c}}(e,n.rects,u),t}),{}),c=f[n.placement],l=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c.x,n.modifiersData.popperOffsets.y+=l),n.modifiersData[e]=f}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name;if(!n.modifiersData[u]._skip){for(var f=e.mainAxis,s=void 0===f||f,c=e.altAxis,l=void 0===c||c,d=e.fallbackPlacements,p=e.padding,h=e.boundary,v=e.rootBoundary,m=e.altBoundary,y=e.flipVariations,g=void 0===y||y,w=e.allowedAutoPlacements,x=n.options.placement,O=b(x),j=d||(O!==x&&g?function(t){if("auto"===b(t))return[];var n=H(t);return[D(t),n,D(n)]}(x):[H(x)]),M=[x].concat(j).reduce((function(t,e){return t.concat("auto"===b(e)?Y(n,{placement:e,boundary:h,rootBoundary:v,padding:p,flipVariations:g,allowedAutoPlacements:w}):e)}),[]),k=n.rects.reference,P=n.rects.popper,C=new Map,A=!0,q=M[0],E=0;E<M.length;E++){var R=M[E],W=b(R),B="start"===L(R),S=[r,i].indexOf(W)>=0,I=S?"width":"height",T=X(n,{placement:R,boundary:h,rootBoundary:v,altBoundary:m,padding:p}),z=S?B?o:a:B?i:r;k[I]>P[I]&&(z=H(z));var F=H(z),V=[];if(s&&V.push(T[W]<=0),l&&V.push(T[z]<=0,T[F]<=0),V.every((function(t){return t}))){q=R,A=!1;break}C.set(R,V)}if(A)for(var $=function(t){var n=M.find((function(n){var e=C.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return q=n,"break"},_=g?3:1;_>0&&"break"!==$(_);_--);n.placement!==q&&(n.modifiersData[u]._skip=!0,n.placement=q,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name,f=e.mainAxis,s=void 0===f||f,c=e.altAxis,l=void 0!==c&&c,d=e.tether,p=void 0===d||d,h=e.tetherOffset,v=void 0===h?0:h,g=X(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),w=b(n.placement),x=L(n.placement),O=!x,M=R(w),k="x"===M?"y":"x",P=n.modifiersData.popperOffsets,C=n.rects.reference,A=n.rects.popper,q="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,B="number"==typeof q?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),S=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,I={x:0,y:0};if(P){if(s){var T,z="y"===M?r:a,F="y"===M?i:o,H="y"===M?"height":"width",V=P[M],D=V+g[z],$=V-g[F],_=p?-A[H]/2:0,U="start"===x?C[H]:A[H],G="start"===x?-A[H]:-C[H],J=n.elements.arrow,K=p&&J?j(J):{width:0,height:0},N=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=N[z],Y=N[F],Z=W(0,C[H],K[H]),tt=O?C[H]/2-_-Z-Q-B.mainAxis:U-Z-Q-B.mainAxis,nt=O?-C[H]/2+_+Z+Y+B.mainAxis:G+Z+Y+B.mainAxis,et=n.elements.arrow&&E(n.elements.arrow),rt=null!=(T=null==S?void 0:S[M])?T:0,it=V+nt-rt,ot=W(p?y(D,V+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):D,V,p?m($,it):$);P[M]=ot,I[M]=ot-V}if(l){var at,ut=P[k],ft="y"===k?"height":"width",st=ut+g["x"===M?r:a],ct=ut-g["x"===M?i:o],lt=-1!==[r,a].indexOf(w),dt=null!=(at=null==S?void 0:S[k])?at:0,pt=lt?st:ut-C[ft]-A[ft]-dt+B.altAxis,ht=lt?ut+C[ft]+A[ft]-dt-B.altAxis:ct,vt=p&&lt?function(t,n,e){var r=W(t,n,e);return r>e?e:r}(pt,ut,ht):W(p?pt:st,ut,p?ht:ct);P[k]=vt,I[k]=vt-ut}n.modifiersData[u]=I}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,f=t.name,s=t.options,c=e.elements.arrow,l=e.modifiersData.popperOffsets,d=b(e.placement),p=R(d),h=[a,o].indexOf(d)>=0?"height":"width";if(c&&l){var v=function(t,n){return B("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:S(t,u))}(s.padding,e),m=j(c),y="y"===p?r:a,g="y"===p?i:o,w=e.rects.reference[h]+e.rects.reference[p]-l[p]-e.rects.popper[h],x=l[p]-e.rects.reference[p],O=E(c),M=O?"y"===p?O.clientHeight||0:O.clientWidth||0:0,k=M/2-m[h]/2+(w/2-x/2),P=W(v[y],k,M-m[h]-v[g]);e.modifiersData[f]=((n={})[p]=P,n.centerOffset=P-k,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&M(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=X(n,{elementContext:"reference"}),u=X(n,{altBoundary:!0}),f=Z(a,r),s=Z(u,i,o),c=tt(f),l=tt(s);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:l},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":l})}}]});const ut=class{constructor(n){t(this,n),this.openDirection="bottom",this.position="absolute",this.containerStyle={},this.parent=document.body,this.inheritParentWidth=!1,this.visible=!1,this.loaded=!1,this.parents=new WeakMap}onVisible(){if(!this.visible)return this.hideContainer(),this.styleContainer(),void this.destroyPopper();this.styleContainer(),this.createPopper(),requestAnimationFrame((()=>{this.showContainer()}))}disconnectedCallback(){this.removeContainer(),this.destroyPopper(),this.observer&&this.observer.unobserve(this.container)}connectedCallback(){this.loaded&&(this.createContainer(),this.hideContainer(),this.attachContainer(),this.styleContainer(),this.visible&&(this.createPopper(),this.showContainer()),"ResizeObserver"in window)&&new ResizeObserver((()=>{this.popperInstance&&(this.styleContainer(),this.popperInstance.update())})).observe(this.container)}componentDidLoad(){this.loaded=!0,this.connectedCallback()}render(){return n("slot",null)}createContainer(){const t=this.host.shadowRoot.querySelector("slot"),n=t.assignedElements&&t.assignedElements()||[];this.container=document.createElement("div"),this.container.setAttribute("id",this.containerId),this.container.setAttribute("class","limel-portal--container"),Object.assign(this.container,{portalSource:this.host}),n.forEach((t=>{this.parents.set(t,t.parentElement),this.container.appendChild(t)}))}attachContainer(){this.parent.appendChild(this.container)}removeContainer(){this.container&&(Array.from(this.container.children).forEach((t=>{const n=this.parents.get(t);n&&n.appendChild(t)})),this.hideContainer(),this.container.parentElement.removeChild(this.container))}hideContainer(){this.container.style.opacity="0"}showContainer(){this.container.style.opacity="1"}styleContainer(){const t=this.host.getBoundingClientRect().width;if(this.container.style.display=this.visible?"block":"none",this.inheritParentWidth){let n=this.getContentWidth(this.container);t>0&&(n=t),this.container.style.width=`${n}px`}this.ensureContainerFitsInViewPort(),Object.keys(this.containerStyle).forEach((t=>{this.container.style[t]=this.containerStyle[t]}))}getContentWidth(t){if(!t)return null;const n=t.getBoundingClientRect().width;if(0!==n)return n;const e=t.querySelector("*");return this.getContentWidth(e)}createPopper(){const t=this.createPopperConfig();this.popperInstance=at(this.host,this.container,t)}destroyPopper(){var t;null===(t=this.popperInstance)||void 0===t||t.destroy(),this.popperInstance=null}createPopperConfig(){const t=this.getPlacement(this.openDirection),n=this.getFlipPlacement(this.openDirection);return{strategy:this.position,placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:[n]}}]}}getPlacement(t){return{"left-start":"left-start",left:"left","left-end":"left-end","right-start":"right-start",right:"right","right-end":"right-end","top-start":"top-start",top:"top","top-end":"top-end","bottom-start":"bottom-start",bottom:"bottom","bottom-end":"bottom-end"}[t]}getFlipPlacement(t){return{"left-start":"right-start",left:"right","left-end":"right-end","right-start":"left-start",right:"left","right-end":"left-end","top-start":"bottom-start",top:"bottom","top-end":"bottom-end","bottom-start":"top-start",bottom:"top","bottom-end":"top-end"}[t]}ensureContainerFitsInViewPort(){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),{top:n,bottom:e}=this.host.getBoundingClientRect(),r=Math.max(n,0),i=Math.max(t-e,0),o=Math.max(r,i)-16;this.container.style.maxHeight=`${o}px`}get host(){return e(this)}static get watchers(){return{visible:["onVisible"]}}};ut.style=":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}";export{ut as limel_portal}
@@ -0,0 +1 @@
1
+ import{r as t,h as r}from"./p-e9a95b8f.js";const o=class{constructor(o){t(this,o),this.label=null,this.linkTitle=null,this.disabled=!1,this.href=null,this.target="_self",this.renderLabel=()=>{if(this.label)return r("span",{"aria-hidden":"true"},this.label)},this.getAreaLabel=()=>this.label&&this.linkTitle?this.label+". "+this.linkTitle:this.label?this.label:this.linkTitle?this.linkTitle:void 0,this.renderNotification=()=>{if(this.badge)return r("limel-badge",{label:this.badge})}}render(){return[r("a",{"aria-disabled":this.disabled,href:this.href,target:this.target,tabindex:"0","aria-label":this.getAreaLabel(),title:this.linkTitle},r("limel-icon",{name:this.icon})),this.renderLabel(),this.renderNotification()]}};o.style=":host(limel-shortcut){--badge-text-color:var(\n --shortcut-badge-text-color,\n rgb(var(--color-white))\n );--badge-background-color:var(\n --shortcut-badge-background-color,\n rgb(var(--color-red-default))\n );position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:0.0625rem}:host(limel-shortcut) *{box-sizing:border-box}:host(limel-shortcut[disabled]) a{opacity:0.5;box-shadow:unset;cursor:not-allowed}a{all:unset;transition:background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;box-shadow:var(--button-shadow-normal);cursor:pointer;text-align:center;height:calc(100% - 1rem);width:calc(100% - 1rem);padding:0.5rem;border-radius:var(--shortcut-border-radius, 1rem);background-color:var(--shortcut-background-color, rgb(var(--contrast-100)))}a:hover{box-shadow:var(--button-shadow-hovered)}a:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}a:focus{outline:none}a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-icon{display:flex;height:100%;width:100%;justify-content:center;color:var(--shortcut-icon-color, rgb(var(--contrast-1000)));border-radius:var(--shortcut-border-radius, 1rem)}span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;color:var(--shortcut-label-color, rgb(var(--contrast-1100)));font-size:0.75rem;text-align:center}limel-badge{position:absolute;top:-0.5rem;right:0}";export{o as limel_shortcut}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * This component can be used on places such as a start page or a dashboard.
3
+ * Clicking on the component should navigate the user to a new screen,
4
+ * to which you need to provide a URL, using the `href` property.
5
+ *
6
+ * By default, this navigation will happen within the same browser tab.
7
+ * However, it is possible to override that behavior, using the `target` property.
8
+ *
9
+ * @exampleComponent limel-example-shortcut
10
+ * @exampleComponent limel-example-shortcut-notification
11
+ * @exampleComponent limel-example-shortcut-styling
12
+ * @exampleComponent limel-example-shortcut-with-click-handler
13
+ */
14
+ export declare class Shortcut {
15
+ /**
16
+ * Name of icon for the shortcut.
17
+ */
18
+ icon: string;
19
+ /**
20
+ * The text to show below the shortcut. Long label will be truncated.
21
+ */
22
+ label?: string;
23
+ /**
24
+ * The `title` tag of the hyperlink, which can be used to
25
+ * provide additional information about the link.
26
+ * It improves accessibility both for sighted users
27
+ * and users with assistive technologies.
28
+ */
29
+ linkTitle?: string;
30
+ /**
31
+ * Set to `true` if shortcut is disabled.
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * The url that the shortcut leads to.
36
+ */
37
+ href?: string;
38
+ /**
39
+ * Where to load the linked URL, as the name for a browsing context:
40
+ * - `_self`: in the current browsing context. (Default)
41
+ * - `_blank`: in a new tab.
42
+ * - `_parent`: in the parent browsing context of the current one.
43
+ * If no parent, behaves as `_self`.
44
+ * - `_top`: the topmost browsing context (the "highest" context
45
+ * that's an ancestor of the current one). If no ancestors, behaves as `_self`.
46
+ */
47
+ target: '_self' | '_blank' | '_parent' | '_top';
48
+ /**
49
+ * If specified, will display a notification badge
50
+ * on the shortcut.
51
+ */
52
+ badge?: number | string;
53
+ render(): any[];
54
+ private renderLabel;
55
+ private getAreaLabel;
56
+ private renderNotification;
57
+ }
@@ -926,6 +926,36 @@ export namespace Components {
926
926
  */
927
927
  "value": Option | Option[];
928
928
  }
929
+ interface LimelShortcut {
930
+ /**
931
+ * If specified, will display a notification badge on the shortcut.
932
+ */
933
+ "badge"?: number | string;
934
+ /**
935
+ * Set to `true` if shortcut is disabled.
936
+ */
937
+ "disabled"?: boolean;
938
+ /**
939
+ * The url that the shortcut leads to.
940
+ */
941
+ "href"?: string;
942
+ /**
943
+ * Name of icon for the shortcut.
944
+ */
945
+ "icon": string;
946
+ /**
947
+ * The text to show below the shortcut. Long label will be truncated.
948
+ */
949
+ "label"?: string;
950
+ /**
951
+ * The `title` tag of the hyperlink, which can be used to provide additional information about the link. It improves accessibility both for sighted users and users with assistive technologies.
952
+ */
953
+ "linkTitle"?: string;
954
+ /**
955
+ * Where to load the linked URL, as the name for a browsing context: - `_self`: in the current browsing context. (Default) - `_blank`: in a new tab. - `_parent`: in the parent browsing context of the current one. If no parent, behaves as `_self`. - `_top`: the topmost browsing context (the "highest" context that's an ancestor of the current one). If no ancestors, behaves as `_self`.
956
+ */
957
+ "target": '_self' | '_blank' | '_parent' | '_top';
958
+ }
929
959
  interface LimelSlider {
930
960
  /**
931
961
  * Disables the slider when `true`, and visually shows that the field is editable but disabled. This tells the users that if certain requirements are met, the slider may become interactable.
@@ -1378,6 +1408,12 @@ declare global {
1378
1408
  prototype: HTMLLimelSelectElement;
1379
1409
  new (): HTMLLimelSelectElement;
1380
1410
  };
1411
+ interface HTMLLimelShortcutElement extends Components.LimelShortcut, HTMLStencilElement {
1412
+ }
1413
+ var HTMLLimelShortcutElement: {
1414
+ prototype: HTMLLimelShortcutElement;
1415
+ new (): HTMLLimelShortcutElement;
1416
+ };
1381
1417
  interface HTMLLimelSliderElement extends Components.LimelSlider, HTMLStencilElement {
1382
1418
  }
1383
1419
  var HTMLLimelSliderElement: {
@@ -1476,6 +1512,7 @@ declare global {
1476
1512
  "limel-progress-flow": HTMLLimelProgressFlowElement;
1477
1513
  "limel-progress-flow-item": HTMLLimelProgressFlowItemElement;
1478
1514
  "limel-select": HTMLLimelSelectElement;
1515
+ "limel-shortcut": HTMLLimelShortcutElement;
1479
1516
  "limel-slider": HTMLLimelSliderElement;
1480
1517
  "limel-snackbar": HTMLLimelSnackbarElement;
1481
1518
  "limel-spinner": HTMLLimelSpinnerElement;
@@ -2542,6 +2579,36 @@ declare namespace LocalJSX {
2542
2579
  */
2543
2580
  "value"?: Option | Option[];
2544
2581
  }
2582
+ interface LimelShortcut {
2583
+ /**
2584
+ * If specified, will display a notification badge on the shortcut.
2585
+ */
2586
+ "badge"?: number | string;
2587
+ /**
2588
+ * Set to `true` if shortcut is disabled.
2589
+ */
2590
+ "disabled"?: boolean;
2591
+ /**
2592
+ * The url that the shortcut leads to.
2593
+ */
2594
+ "href"?: string;
2595
+ /**
2596
+ * Name of icon for the shortcut.
2597
+ */
2598
+ "icon"?: string;
2599
+ /**
2600
+ * The text to show below the shortcut. Long label will be truncated.
2601
+ */
2602
+ "label"?: string;
2603
+ /**
2604
+ * The `title` tag of the hyperlink, which can be used to provide additional information about the link. It improves accessibility both for sighted users and users with assistive technologies.
2605
+ */
2606
+ "linkTitle"?: string;
2607
+ /**
2608
+ * Where to load the linked URL, as the name for a browsing context: - `_self`: in the current browsing context. (Default) - `_blank`: in a new tab. - `_parent`: in the parent browsing context of the current one. If no parent, behaves as `_self`. - `_top`: the topmost browsing context (the "highest" context that's an ancestor of the current one). If no ancestors, behaves as `_self`.
2609
+ */
2610
+ "target"?: '_self' | '_blank' | '_parent' | '_top';
2611
+ }
2545
2612
  interface LimelSlider {
2546
2613
  /**
2547
2614
  * Disables the slider when `true`, and visually shows that the field is editable but disabled. This tells the users that if certain requirements are met, the slider may become interactable.
@@ -2860,6 +2927,7 @@ declare namespace LocalJSX {
2860
2927
  "limel-progress-flow": LimelProgressFlow;
2861
2928
  "limel-progress-flow-item": LimelProgressFlowItem;
2862
2929
  "limel-select": LimelSelect;
2930
+ "limel-shortcut": LimelShortcut;
2863
2931
  "limel-slider": LimelSlider;
2864
2932
  "limel-snackbar": LimelSnackbar;
2865
2933
  "limel-spinner": LimelSpinner;
@@ -2913,6 +2981,7 @@ declare module "@stencil/core" {
2913
2981
  "limel-progress-flow": LocalJSX.LimelProgressFlow & JSXBase.HTMLAttributes<HTMLLimelProgressFlowElement>;
2914
2982
  "limel-progress-flow-item": LocalJSX.LimelProgressFlowItem & JSXBase.HTMLAttributes<HTMLLimelProgressFlowItemElement>;
2915
2983
  "limel-select": LocalJSX.LimelSelect & JSXBase.HTMLAttributes<HTMLLimelSelectElement>;
2984
+ "limel-shortcut": LocalJSX.LimelShortcut & JSXBase.HTMLAttributes<HTMLLimelShortcutElement>;
2916
2985
  "limel-slider": LocalJSX.LimelSlider & JSXBase.HTMLAttributes<HTMLLimelSliderElement>;
2917
2986
  "limel-snackbar": LocalJSX.LimelSnackbar & JSXBase.HTMLAttributes<HTMLLimelSnackbarElement>;
2918
2987
  "limel-spinner": LocalJSX.LimelSpinner & JSXBase.HTMLAttributes<HTMLLimelSpinnerElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "36.1.0-next.13",
3
+ "version": "36.1.0-next.14",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@commitlint/config-conventional": "^17.1.0",
44
- "@popperjs/core": "^2.11.5",
44
+ "@popperjs/core": "^2.11.6",
45
45
  "@rjsf/core": "^2.4.2",
46
46
  "@stencil/core": "^2.15.1",
47
47
  "@stencil/sass": "^2.0.0",
@@ -1 +0,0 @@
1
- import{r as t,h as n,g as e}from"./p-e9a95b8f.js";var r="top",i="bottom",o="right",a="left",u=[r,i,o,a],f=u.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),s=[].concat(u,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),c=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function l(t){return t?(t.nodeName||"").toLowerCase():null}function p(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function d(t){return t instanceof p(t).Element||t instanceof Element}function h(t){return t instanceof p(t).HTMLElement||t instanceof HTMLElement}function v(t){return"undefined"!=typeof ShadowRoot&&(t instanceof p(t).ShadowRoot||t instanceof ShadowRoot)}function b(t){return t.split("-")[0]}var m=Math.max,y=Math.min,g=Math.round;function w(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),r=1,i=1;if(h(t)&&n){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(r=g(e.width)/a||1),o>0&&(i=g(e.height)/o||1)}return{width:e.width/r,height:e.height/i,top:e.top/i,right:e.right/r,bottom:e.bottom/i,left:e.left/r,x:e.left/r,y:e.top/i}}function x(t){var n=w(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function O(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&v(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(t){return p(t).getComputedStyle(t)}function M(t){return["table","td","th"].indexOf(l(t))>=0}function k(t){return((d(t)?t.ownerDocument:t.document)||window.document).documentElement}function P(t){return"html"===l(t)?t:t.assignedSlot||t.parentNode||(v(t)?t.host:null)||k(t)}function C(t){return h(t)&&"fixed"!==j(t).position?t.offsetParent:null}function A(t){for(var n=p(t),e=C(t);e&&M(e)&&"static"===j(e).position;)e=C(e);return e&&("html"===l(e)||"body"===l(e)&&"static"===j(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&h(t)&&"fixed"===j(t).position)return null;var e=P(t);for(v(e)&&(e=e.host);h(e)&&["html","body"].indexOf(l(e))<0;){var r=j(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function E(t,n,e){return m(t,y(n,e))}function R(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function W(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function B(t){return t.split("-")[1]}var S={top:"auto",right:"auto",bottom:"auto",left:"auto"};function L(t){var n,e=t.popper,u=t.popperRect,f=t.placement,s=t.variation,c=t.offsets,l=t.position,d=t.gpuAcceleration,h=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=c.x,y=void 0===m?0:m,w=c.y,x=void 0===w?0:w,O="function"==typeof v?v({x:y,y:x}):{x:y,y:x};y=O.x,x=O.y;var M=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),C=a,q=r,E=window;if(h){var R=A(e),W="clientHeight",B="clientWidth";R===p(e)&&"static"!==j(R=k(e)).position&&"absolute"===l&&(W="scrollHeight",B="scrollWidth"),R=R,(f===r||(f===a||f===o)&&"end"===s)&&(q=i,x-=(b&&R===E&&E.visualViewport?E.visualViewport.height:R[W])-u.height,x*=d?1:-1),f!==a&&(f!==r&&f!==i||"end"!==s)||(C=o,y-=(b&&R===E&&E.visualViewport?E.visualViewport.width:R[B])-u.width,y*=d?1:-1)}var L,I=Object.assign({position:l},h&&S),T=!0===v?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:g(t.x*e)/e||0,y:g(n*e)/e||0}}({x:y,y:x}):{x:y,y:x};return y=T.x,x=T.y,Object.assign({},I,d?((L={})[q]=P?"0":"",L[C]=M?"0":"",L.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",L):((n={})[q]=P?x+"px":"",n[C]=M?y+"px":"",n.transform="",n))}var I={passive:!0},T={left:"right",right:"left",bottom:"top",top:"bottom"};function z(t){return t.replace(/left|right|bottom|top/g,(function(t){return T[t]}))}var F={start:"end",end:"start"};function H(t){return t.replace(/start|end/g,(function(t){return F[t]}))}function V(t){var n=p(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function D(t){return w(k(t)).left+V(t).scrollLeft}function $(t){var n=j(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function _(t){return["html","body","#document"].indexOf(l(t))>=0?t.ownerDocument.body:h(t)&&$(t)?t:_(P(t))}function U(t,n){var e;void 0===n&&(n=[]);var r=_(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=p(r),a=i?[o].concat(o.visualViewport||[],$(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(U(P(a)))}function G(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function J(t,n){return"viewport"===n?G(function(t){var n=p(t),e=k(t),r=n.visualViewport,i=e.clientWidth,o=e.clientHeight,a=0,u=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,u=r.offsetTop)),{width:i,height:o,x:a+D(t),y:u}}(t)):d(n)?function(t){var n=w(t);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}(n):G(function(t){var n,e=k(t),r=V(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=m(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=m(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+D(t),f=-r.scrollTop;return"rtl"===j(i||e).direction&&(u+=m(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(k(t)))}function K(t){var n,e=t.reference,u=t.element,f=t.placement,s=f?b(f):null,c=f?B(f):null,l=e.x+e.width/2-u.width/2,p=e.y+e.height/2-u.height/2;switch(s){case r:n={x:l,y:e.y-u.height};break;case i:n={x:l,y:e.y+e.height};break;case o:n={x:e.x+e.width,y:p};break;case a:n={x:e.x-u.width,y:p};break;default:n={x:e.x,y:e.y}}var d=s?q(s):null;if(null!=d){var h="y"===d?"height":"width";switch(c){case"start":n[d]=n[d]-(e[h]/2-u[h]/2);break;case"end":n[d]=n[d]+(e[h]/2-u[h]/2)}}return n}function N(t,n){void 0===n&&(n={});var e=n.placement,a=void 0===e?t.placement:e,f=n.boundary,s=void 0===f?"clippingParents":f,c=n.rootBoundary,p=void 0===c?"viewport":c,v=n.elementContext,b=void 0===v?"popper":v,g=n.altBoundary,x=void 0!==g&&g,M=n.padding,C=void 0===M?0:M,q=R("number"!=typeof C?C:W(C,u)),E=t.rects.popper,B=t.elements[x?"popper"===b?"reference":"popper":b],S=function(t,n,e){var r="clippingParents"===n?function(t){var n=U(P(t)),e=["absolute","fixed"].indexOf(j(t).position)>=0&&h(t)?A(t):t;return d(e)?n.filter((function(t){return d(t)&&O(t,e)&&"body"!==l(t)})):[]}(t):[].concat(n),i=[].concat(r,[e]),o=i.reduce((function(n,e){var r=J(t,e);return n.top=m(r.top,n.top),n.right=y(r.right,n.right),n.bottom=y(r.bottom,n.bottom),n.left=m(r.left,n.left),n}),J(t,i[0]));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}(d(B)?B:B.contextElement||k(t.elements.popper),s,p),L=w(t.elements.reference),I=K({reference:L,element:E,strategy:"absolute",placement:a}),T=G(Object.assign({},E,I)),z="popper"===b?T:L,F={top:S.top-z.top+q.top,bottom:z.bottom-S.bottom+q.bottom,left:S.left-z.left+q.left,right:z.right-S.right+q.right},H=t.modifiersData.offset;if("popper"===b&&H){var V=H[a];Object.keys(F).forEach((function(t){var n=[o,i].indexOf(t)>=0?1:-1,e=[r,i].indexOf(t)>=0?"y":"x";F[t]+=V[e]*n}))}return F}function Q(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,c=void 0===a?s:a,l=B(n.placement),p=l?o?f:f.filter((function(t){return B(t)===l})):u,d=p.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=p);var h=d.reduce((function(n,o){return n[o]=N(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[b(o)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}function X(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Y(t){return[r,o,i,a].some((function(n){return t[n]>=0}))}function Z(t,n,e){void 0===e&&(e=!1);var r,i,o=h(n),a=h(n)&&function(t){var n=t.getBoundingClientRect(),e=g(n.width)/t.offsetWidth||1,r=g(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=k(n),f=w(t,a),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!e)&&(("body"!==l(n)||$(u))&&(s=(r=n)!==p(r)&&h(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:V(r)),h(n)?((c=w(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=D(u))),{x:f.left+s.scrollLeft-c.x,y:f.top+s.scrollTop-c.y,width:f.width,height:f.height}}function tt(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var nt={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function rt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?nt:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},nt,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],s=!1,l={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;p(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:d(t)?U(t):t.contextElement?U(t.contextElement):[],popper:U(n)};var a,s,h=function(t){var n=tt(t);return c.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),s=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(s).map((function(t){return s[t]}))));return u.orderedModifiers=h.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:l,options:void 0===n?{}:n});f.push(r||function(){})}})),l.update()},forceUpdate:function(){if(!s){var t=u.elements,n=t.reference,e=t.popper;if(et(n,e)){u.rects={reference:Z(n,A(e),"fixed"===u.options.strategy),popper:x(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:l})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){l.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){p(),s=!0}};if(!et(t,n))return l;function p(){f.forEach((function(t){return t()})),f=[]}return l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l}}var it=rt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=p(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&s.forEach((function(t){t.addEventListener("scroll",e.update,I)})),u&&f.addEventListener("resize",e.update,I),function(){o&&s.forEach((function(t){t.removeEventListener("scroll",e.update,I)})),u&&f.removeEventListener("resize",e.update,I)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=K({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,s={placement:b(n.placement),variation:B(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,L(Object.assign({},s,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,L(Object.assign({},s,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];h(i)&&l(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});h(r)&&l(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,u=void 0===i?[0,0]:i,f=s.reduce((function(t,e){return t[e]=function(t,n,e){var i=b(t),u=[a,r].indexOf(i)>=0?-1:1,f="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=f[0],c=f[1];return s=s||0,c=(c||0)*u,[a,o].indexOf(i)>=0?{x:c,y:s}:{x:s,y:c}}(e,n.rects,u),t}),{}),c=f[n.placement],l=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c.x,n.modifiersData.popperOffsets.y+=l),n.modifiersData[e]=f}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name;if(!n.modifiersData[u]._skip){for(var f=e.mainAxis,s=void 0===f||f,c=e.altAxis,l=void 0===c||c,p=e.fallbackPlacements,d=e.padding,h=e.boundary,v=e.rootBoundary,m=e.altBoundary,y=e.flipVariations,g=void 0===y||y,w=e.allowedAutoPlacements,x=n.options.placement,O=b(x),j=p||(O!==x&&g?function(t){if("auto"===b(t))return[];var n=z(t);return[H(t),n,H(n)]}(x):[z(x)]),M=[x].concat(j).reduce((function(t,e){return t.concat("auto"===b(e)?Q(n,{placement:e,boundary:h,rootBoundary:v,padding:d,flipVariations:g,allowedAutoPlacements:w}):e)}),[]),k=n.rects.reference,P=n.rects.popper,C=new Map,A=!0,q=M[0],E=0;E<M.length;E++){var R=M[E],W=b(R),S="start"===B(R),L=[r,i].indexOf(W)>=0,I=L?"width":"height",T=N(n,{placement:R,boundary:h,rootBoundary:v,altBoundary:m,padding:d}),F=L?S?o:a:S?i:r;k[I]>P[I]&&(F=z(F));var V=z(F),D=[];if(s&&D.push(T[W]<=0),l&&D.push(T[F]<=0,T[V]<=0),D.every((function(t){return t}))){q=R,A=!1;break}C.set(R,D)}if(A)for(var $=function(t){var n=M.find((function(n){var e=C.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return q=n,"break"},_=g?3:1;_>0&&"break"!==$(_);_--);n.placement!==q&&(n.modifiersData[u]._skip=!0,n.placement=q,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name,f=e.mainAxis,s=void 0===f||f,c=e.altAxis,l=void 0!==c&&c,p=e.tether,d=void 0===p||p,h=e.tetherOffset,v=void 0===h?0:h,g=N(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),w=b(n.placement),O=B(n.placement),j=!O,M=q(w),k="x"===M?"y":"x",P=n.modifiersData.popperOffsets,C=n.rects.reference,R=n.rects.popper,W="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,S="number"==typeof W?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),L=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,I={x:0,y:0};if(P){if(s){var T,z="y"===M?r:a,F="y"===M?i:o,H="y"===M?"height":"width",V=P[M],D=V+g[z],$=V-g[F],_=d?-R[H]/2:0,U="start"===O?C[H]:R[H],G="start"===O?-R[H]:-C[H],J=n.elements.arrow,K=d&&J?x(J):{width:0,height:0},Q=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Q[z],Y=Q[F],Z=E(0,C[H],K[H]),tt=j?C[H]/2-_-Z-X-S.mainAxis:U-Z-X-S.mainAxis,nt=j?-C[H]/2+_+Z+Y+S.mainAxis:G+Z+Y+S.mainAxis,et=n.elements.arrow&&A(n.elements.arrow),rt=null!=(T=null==L?void 0:L[M])?T:0,it=V+nt-rt,ot=E(d?y(D,V+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):D,V,d?m($,it):$);P[M]=ot,I[M]=ot-V}if(l){var at,ut=P[k],ft="y"===k?"height":"width",st=ut+g["x"===M?r:a],ct=ut-g["x"===M?i:o],lt=-1!==[r,a].indexOf(w),pt=null!=(at=null==L?void 0:L[k])?at:0,dt=lt?st:ut-C[ft]-R[ft]-pt+S.altAxis,ht=lt?ut+C[ft]+R[ft]-pt-S.altAxis:ct,vt=d&&lt?function(t,n,e){var r=E(t,n,e);return r>e?e:r}(dt,ut,ht):E(d?dt:st,ut,d?ht:ct);P[k]=vt,I[k]=vt-ut}n.modifiersData[u]=I}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,f=t.name,s=t.options,c=e.elements.arrow,l=e.modifiersData.popperOffsets,p=b(e.placement),d=q(p),h=[a,o].indexOf(p)>=0?"height":"width";if(c&&l){var v=function(t,n){return R("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:W(t,u))}(s.padding,e),m=x(c),y="y"===d?r:a,g="y"===d?i:o,w=e.rects.reference[h]+e.rects.reference[d]-l[d]-e.rects.popper[h],O=l[d]-e.rects.reference[d],j=A(c),M=j?"y"===d?j.clientHeight||0:j.clientWidth||0:0,k=M/2-m[h]/2+(w/2-O/2),P=E(v[y],k,M-m[h]-v[g]);e.modifiersData[f]=((n={})[d]=P,n.centerOffset=P-k,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&O(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=N(n,{elementContext:"reference"}),u=N(n,{altBoundary:!0}),f=X(a,r),s=X(u,i,o),c=Y(f),l=Y(s);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:l},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":l})}}]});const ot=class{constructor(n){t(this,n),this.openDirection="bottom",this.position="absolute",this.containerStyle={},this.parent=document.body,this.inheritParentWidth=!1,this.visible=!1,this.loaded=!1,this.parents=new WeakMap}onVisible(){if(!this.visible)return this.hideContainer(),this.styleContainer(),void this.destroyPopper();this.styleContainer(),this.createPopper(),requestAnimationFrame((()=>{this.showContainer()}))}disconnectedCallback(){this.removeContainer(),this.destroyPopper(),this.observer&&this.observer.unobserve(this.container)}connectedCallback(){this.loaded&&(this.createContainer(),this.hideContainer(),this.attachContainer(),this.styleContainer(),this.visible&&(this.createPopper(),this.showContainer()),"ResizeObserver"in window)&&new ResizeObserver((()=>{this.popperInstance&&(this.styleContainer(),this.popperInstance.update())})).observe(this.container)}componentDidLoad(){this.loaded=!0,this.connectedCallback()}render(){return n("slot",null)}createContainer(){const t=this.host.shadowRoot.querySelector("slot"),n=t.assignedElements&&t.assignedElements()||[];this.container=document.createElement("div"),this.container.setAttribute("id",this.containerId),this.container.setAttribute("class","limel-portal--container"),Object.assign(this.container,{portalSource:this.host}),n.forEach((t=>{this.parents.set(t,t.parentElement),this.container.appendChild(t)}))}attachContainer(){this.parent.appendChild(this.container)}removeContainer(){this.container&&(Array.from(this.container.children).forEach((t=>{const n=this.parents.get(t);n&&n.appendChild(t)})),this.hideContainer(),this.container.parentElement.removeChild(this.container))}hideContainer(){this.container.style.opacity="0"}showContainer(){this.container.style.opacity="1"}styleContainer(){const t=this.host.getBoundingClientRect().width;if(this.container.style.display=this.visible?"block":"none",this.inheritParentWidth){let n=this.getContentWidth(this.container);t>0&&(n=t),this.container.style.width=`${n}px`}this.ensureContainerFitsInViewPort(),Object.keys(this.containerStyle).forEach((t=>{this.container.style[t]=this.containerStyle[t]}))}getContentWidth(t){if(!t)return null;const n=t.getBoundingClientRect().width;if(0!==n)return n;const e=t.querySelector("*");return this.getContentWidth(e)}createPopper(){const t=this.createPopperConfig();this.popperInstance=it(this.host,this.container,t)}destroyPopper(){var t;null===(t=this.popperInstance)||void 0===t||t.destroy(),this.popperInstance=null}createPopperConfig(){const t=this.getPlacement(this.openDirection),n=this.getFlipPlacement(this.openDirection);return{strategy:this.position,placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:[n]}}]}}getPlacement(t){return{"left-start":"left-start",left:"left","left-end":"left-end","right-start":"right-start",right:"right","right-end":"right-end","top-start":"top-start",top:"top","top-end":"top-end","bottom-start":"bottom-start",bottom:"bottom","bottom-end":"bottom-end"}[t]}getFlipPlacement(t){return{"left-start":"right-start",left:"right","left-end":"right-end","right-start":"left-start",right:"left","right-end":"left-end","top-start":"bottom-start",top:"bottom","top-end":"bottom-end","bottom-start":"top-start",bottom:"top","bottom-end":"top-end"}[t]}ensureContainerFitsInViewPort(){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),{top:n,bottom:e}=this.host.getBoundingClientRect(),r=Math.max(n,0),i=Math.max(t-e,0),o=Math.max(r,i)-16;this.container.style.maxHeight=`${o}px`}get host(){return e(this)}static get watchers(){return{visible:["onVisible"]}}};ot.style=":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}";export{ot as limel_portal}