@descope/web-components-ui 1.0.206 → 1.0.207

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/5767.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5767.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5767],{5767:(t,e,n)=>{n.d(e,{D:()=>c});var o=n(1598),s=n(9109),i=n(602);const c=t=>class extends((0,o.f)((0,i.L)(t))){get _activeKeys(){return[" "]}ready(){super.ready(),(0,s.NH)(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),(0,s.NH)(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}},9109:(t,e,n)=>{n.d(e,{BP:()=>Y,NH:()=>M});var o=n(7913);const s=!1,i=t=>t,c="string"==typeof document.head.style.touchAction,u="__polymerGestures",r="__polymerGesturesHandled",a="__polymerGesturesTouchAction",h=["mousedown","mousemove","mouseup","click"],d=[0,1,4,2],f=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function l(t){return h.indexOf(t)>-1}let m=!1;function v(t){if(!l(t)&&"touchend"!==t)return c&&m&&s?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){m=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const p=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),y={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function w(t){const e=t.type;if(!l(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!f&&(e=d[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const g={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function b(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function x(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const k=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],_={},E=[];function A(t){const e=k(t);return e.length>0?e[0]:t.target}function N(t){const e=t.type,n=t.currentTarget[u];if(!n)return;const o=n[e];if(!o)return;if(!t[r]&&(t[r]={},e.startsWith("touch"))){const n=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(g.touch.id=n.identifier),g.touch.id!==n.identifier)return;c||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],n=t.type;if("touchstart"===n)g.touch.x=e.clientX,g.touch.y=e.clientY,g.touch.scrollDecided=!1;else if("touchmove"===n){if(g.touch.scrollDecided)return;g.touch.scrollDecided=!0;const n=function(t){let e="auto";const n=k(t);for(let t,o=0;o<n.length;o++)if(t=n[o],t[a]){e=t[a];break}return e}(t);let o=!1;const s=Math.abs(g.touch.x-e.clientX),i=Math.abs(g.touch.y-e.clientY);t.cancelable&&("none"===n?o=!0:"pan-x"===n?o=i>s:"pan-y"===n&&(o=s>i)),o?t.preventDefault():X("track")}}(t)}const s=t[r];if(!s.skip){for(let e,n=0;n<E.length;n++)e=E[n],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let n,i=0;i<E.length;i++)n=E[i],o[n.name]&&!s[n.name]&&(s[n.name]=!0,n[e](t))}}function M(t,e,n){return!!_[e]&&(function(t,e,n){const o=_[e],s=o.deps,i=o.name;let c=t[u];c||(t[u]=c={});for(let e,n,o=0;o<s.length;o++)e=s[o],p&&l(e)&&"click"!==e||(n=c[e],n||(c[e]=n={_count:0}),0===n._count&&t.addEventListener(e,N,v(e)),n[i]=(n[i]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),o.touchAction&&Y(t,o.touchAction)}(t,e,n),!0)}function D(t){E.push(t),t.emits.forEach((e=>{_[e]=t}))}function Y(t,e){c&&t instanceof HTMLElement&&o.YA.run((()=>{t.style.touchAction=e})),t[a]=e}function T(t,e,n){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=n,i(t).dispatchEvent(o),o.defaultPrevented){const t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function X(t){const e=function(t){for(let e,n=0;n<E.length;n++){e=E[n];for(let n,o=0;o<e.emits.length;o++)if(n=e.emits[o],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function L(t,e,n,o){e&&T(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:t=>X(t)})}function P(t,e,n){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-n);return o>=5||s>=5}function O(t,e,n){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1],i=s.x-t.x,c=s.y-t.y;let u,r=0;o&&(u=s.x-o.x,r=s.y-o.y),T(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:i,dy:c,ddx:u,ddy:r,sourceEvent:n,hover:()=>function(t,e){let n=document.elementFromPoint(t,e),o=n;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(n=o)}return n}(n.clientX,n.clientY)})}function S(t,e,n){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),i=A(n||e);!i||y[i.localName]&&i.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=A(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const n=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=n.left&&o<=n.right&&s>=n.top&&s<=n.bottom)}return!1}(e))&&(t.prevent||T(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}D({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){x(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this;b(this.info,(t=>{w(t)||(L("up",e,t),x(n.info))}),(t=>{w(t)&&L("up",e,t),x(n.info)})),L("down",e,t)},touchstart(t){L("down",A(t),t.changedTouches[0],t)},touchend(t){L("up",A(t),t.changedTouches[0],t)}}),D({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,x(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this,o=t=>{const o=t.clientX,s=t.clientY;P(n.info,o,s)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&X("tap"),n.info.addMove({x:o,y:s}),w(t)||(n.info.state="end",x(n.info)),e&&O(n.info,e,t),n.info.started=!0)};b(this.info,o,(t=>{n.info.started&&o(t),x(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=A(t),n=t.changedTouches[0],o=n.clientX,s=n.clientY;P(this.info,o,s)&&("start"===this.info.state&&X("tap"),this.info.addMove({x:o,y:s}),O(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend(t){const e=A(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),O(this.info,e,n))}}),D({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){w(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){w(t)&&S(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){S(this.info,t.changedTouches[0],t)}})}}]);
package/dist/umd/7824.js DELETED
@@ -1,229 +0,0 @@
1
- /*! For license information please see 7824.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[7824],{2223:(e,t,o)=>{o.d(t,{T8:()=>l}),o(7894);let n=!1,i=[],s=[];function r(){n=!0,requestAnimationFrame((function(){n=!1,function(e){for(;e.length;)a(e.shift())}(i),setTimeout((function(){!function(e){for(let t=0,o=e.length;t<o;t++)a(e.shift())}(s)}))}))}function a(e){const t=e[0],o=e[1],n=e[2];try{o.apply(t,n)}catch(e){setTimeout((()=>{throw e}))}}function l(e,t,o){n||r(),s.push([e,t,o])}},1037:(e,t,o)=>{o.d(t,{G6:()=>l,T:()=>d,gn:()=>a,vU:()=>s});const n=e=>e.test(navigator.userAgent),i=e=>e.test(navigator.platform);n(/Android/u),n(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);const s=n(/Firefox/u),r=i(/^iPad/u)||i(/^Mac/u)&&navigator.maxTouchPoints>1,a=i(/^iPhone/u)||r,l=n(/^((?!chrome|android).)*safari/iu),d=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})()},9320:(e,t,o)=>{o.d(t,{u:()=>n});const n=e=>class extends e{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t)return;if(void 0===e)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const e=this.__previousClasses.filter((e=>!this.__initialClasses.has(e)));e.length>0&&o.remove(...e)}const n="string"==typeof e?e.split(" "):[];n.length>0&&o.add(...n),this.__previousClasses=n}}},262:(e,t,o)=>{function n(e){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}o.d(t,{k:()=>n})},9580:(e,t,o)=>{o.d(t,{B:()=>n});class n{constructor(e){this.host=e,e.addEventListener("opened-changed",(()=>{e.opened||this.__setVirtualKeyboardEnabled(!1)})),e.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),e.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(e){this.host.inputElement&&(this.host.inputElement.inputMode=e?"":"none")}}},3373:(e,t,o)=>{o.d(t,{y:()=>a});var n=o(3726);const i={start:"top",end:"bottom"},s={start:"left",end:"right"},r=new ResizeObserver((e=>{setTimeout((()=>{e.forEach((e=>{e.target.__overlay&&e.target.__overlay._updatePosition()}))}))})),a=e=>class extends e{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=(0,n.AD)(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((e=>{e.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((e=>{e.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,r.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,r.observe(t))),e){const e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((t=>{this.__margins[t]=parseInt(e[t],10)}))),this.setAttribute("dir",e.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const e=this.positionTarget.getBoundingClientRect(),t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";const o=this.__isRTL,n=this.__shouldAlignStartHorizontally(e,o),r=!o&&n||o&&!n;this.style.alignItems=r?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,i,this,t),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,s,this,n);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!t),this.toggleAttribute("top-aligned",t),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,t){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),i=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,o,n,this.__margins,i,this.noHorizontalOverlap,s)}__shouldAlignStartVertically(e){const t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),n="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,o,this.__margins,n,this.noVerticalOverlap,i)}__shouldAlignStart(e,t,o,n,i,s,r){const a=o-e[s?r.end:r.start]-n[r.end],l=e[s?r.start:r.end]-n[r.start],d=i?a:l;return i===(d>(i?l:a)||d>t)}__adjustBottomProperty(e,t,o){let n;if(e===t.end){if(t.end===i.end){const e=Math.min(window.innerHeight,document.documentElement.clientHeight);o>e&&this.__oldViewportHeight&&(n=o-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===s.end){const e=Math.min(window.innerWidth,document.documentElement.clientWidth);o>e&&this.__oldViewportWidth&&(n=o-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return n}__calculatePositionInOneDimension(e,t,o,n,i,s){const r=s?n.start:n.end,a=s?n.end:n.start,l=parseFloat(i.style[r]||getComputedStyle(i)[r]),d=this.__adjustBottomProperty(r,n,l),h=t[s?n.start:n.end]-e[o===s?n.end:n.start];return{[r]:d?`${d}px`:`${l+h*(s?-1:1)}px`,[a]:""}}}},8813:(e,t,o)=>{o.d(t,{a:()=>p});var n=o(2223),i=o(4241),s=o(1037),r=o(6155),a=o(1914),l=o(4530);const d=[];class h{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,l.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(l.Qw).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");d.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,d.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(d).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,o=e?-1:1,n=this.__focusedElementIndex,i=t[(t.length+n+o)%t.length];i.focus(),"input"===i.localName&&i.select()}}var c=o(262),u=o(5128);class p extends((0,u.Tb)((0,a.U)((0,r.k)(i.H3)))){static get template(){return i.dy`
3
- <style>
4
- :host {
5
- z-index: 200;
6
- position: fixed;
7
-
8
- /* Despite of what the names say, <vaadin-overlay> is just a container
9
- for position/sizing/alignment. The actual overlay is the overlay part. */
10
-
11
- /* Default position constraints: the entire viewport. Note: themes can
12
- override this to introduce gaps between the overlay and the viewport. */
13
- top: 0;
14
- right: 0;
15
- bottom: var(--vaadin-overlay-viewport-bottom);
16
- left: 0;
17
-
18
- /* Use flexbox alignment for the overlay part. */
19
- display: flex;
20
- flex-direction: column; /* makes dropdowns sizing easier */
21
- /* Align to center by default. */
22
- align-items: center;
23
- justify-content: center;
24
-
25
- /* Allow centering when max-width/max-height applies. */
26
- margin: auto;
27
-
28
- /* The host is not clickable, only the overlay part is. */
29
- pointer-events: none;
30
-
31
- /* Remove tap highlight on touch devices. */
32
- -webkit-tap-highlight-color: transparent;
33
-
34
- /* CSS API for host */
35
- --vaadin-overlay-viewport-bottom: 0;
36
- }
37
-
38
- :host([hidden]),
39
- :host(:not([opened]):not([closing])) {
40
- display: none !important;
41
- }
42
-
43
- [part='overlay'] {
44
- -webkit-overflow-scrolling: touch;
45
- overflow: auto;
46
- pointer-events: auto;
47
-
48
- /* Prevent overflowing the host in MSIE 11 */
49
- max-width: 100%;
50
- box-sizing: border-box;
51
-
52
- -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
53
- }
54
-
55
- [part='backdrop'] {
56
- z-index: -1;
57
- content: '';
58
- background: rgba(0, 0, 0, 0.5);
59
- position: fixed;
60
- top: 0;
61
- left: 0;
62
- bottom: 0;
63
- right: 0;
64
- pointer-events: auto;
65
- }
66
- </style>
67
-
68
- <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
69
- <div part="overlay" id="overlay" tabindex="0">
70
- <div part="content" id="content">
71
- <slot></slot>
72
- </div>
73
- </div>
74
- `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_oldOwner:Element,_oldModel:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}static get __attachedInstances(){return Array.from(document.body.children).filter((e=>e instanceof p&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0))}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),s.gn&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new h(this)}get _last(){return this===p.__attachedInstances.pop()}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addController(this.__focusTrapController),(0,c.k)(this)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",o-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}_openedChanged(e,t){e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),(0,n.T8)(this,(()=>{this.focusTrap&&this.__focusTrapController.trapFocus(this.$.overlay);const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return!("none"===e.getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(e,t){const o=`__${e}Handler`,n=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",n),delete this[o])};this[o]=n,this.addEventListener("animationend",n)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();const e=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&e){const t=this._getActiveElement();(t===document.body||this._deepContains(t))&&setTimeout((()=>e.focus())),this.__restoreFocusNode=null}this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),p.__attachedInstances.forEach((e=>{e!==this&&(e.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=p.__attachedInstances;let t;for(;(t=e.pop())&&(t===this||(t.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),t.modeless)););}_rendererOrDataChanged(e,t,o,n){const i=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const s=this._oldRenderer!==e;this._oldRenderer=e;const r=this._oldOpened!==n;this._oldOpened=n,s&&(this.innerHTML="",delete this._$litPart$),n&&e&&(s||r||i)&&this.requestContentUpdate()}_getActiveElement(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}bringToFront(){let e="";const t=p.__attachedInstances.filter((e=>e!==this)).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(p.is,p)},6687:(e,t,o)=>{var n=o(510);(0,o(5128).hC)("vaadin-overlay",n.I,{moduleId:"lumo-vaadin-overlay"}),o(8813)},6754:(e,t,o)=>{o.d(t,{L:()=>a,e:()=>s}),o(9416),o(9849);var n=o(5128),i=o(510);const s=n.iv`
75
- :host([opening]),
76
- :host([closing]) {
77
- animation: 0.14s lumo-overlay-dummy-animation;
78
- }
79
-
80
- [part='overlay'] {
81
- will-change: opacity, transform;
82
- }
83
-
84
- :host([opening]) [part='overlay'] {
85
- animation: 0.1s lumo-menu-overlay-enter ease-out both;
86
- }
87
-
88
- @keyframes lumo-menu-overlay-enter {
89
- 0% {
90
- opacity: 0;
91
- transform: translateY(-4px);
92
- }
93
- }
94
-
95
- :host([closing]) [part='overlay'] {
96
- animation: 0.1s lumo-menu-overlay-exit both;
97
- }
98
-
99
- @keyframes lumo-menu-overlay-exit {
100
- 100% {
101
- opacity: 0;
102
- }
103
- }
104
- `;(0,n.hC)("",s,{moduleId:"lumo-menu-overlay-core"});const r=n.iv`
105
- /* Small viewport (bottom sheet) styles */
106
- /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
107
- @media (max-width: 420px), (max-height: 420px) {
108
- :host {
109
- top: 0 !important;
110
- right: 0 !important;
111
- bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
112
- left: 0 !important;
113
- align-items: stretch !important;
114
- justify-content: flex-end !important;
115
- }
116
-
117
- [part='overlay'] {
118
- max-height: 50vh;
119
- width: 100vw;
120
- border-radius: 0;
121
- box-shadow: var(--lumo-box-shadow-xl);
122
- }
123
-
124
- /* The content part scrolls instead of the overlay part, because of the gradient fade-out */
125
- [part='content'] {
126
- padding: 30px var(--lumo-space-m);
127
- max-height: inherit;
128
- box-sizing: border-box;
129
- -webkit-overflow-scrolling: touch;
130
- overflow: auto;
131
- -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
132
- mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
133
- }
134
-
135
- [part='backdrop'] {
136
- display: block;
137
- }
138
-
139
- /* Animations */
140
-
141
- :host([opening]) [part='overlay'] {
142
- animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
143
- }
144
-
145
- :host([closing]),
146
- :host([closing]) [part='backdrop'] {
147
- animation-delay: 0.14s;
148
- }
149
-
150
- :host([closing]) [part='overlay'] {
151
- animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
152
- }
153
- }
154
-
155
- @keyframes lumo-mobile-menu-overlay-enter {
156
- 0% {
157
- transform: translateY(150%);
158
- }
159
- }
160
-
161
- @keyframes lumo-mobile-menu-overlay-exit {
162
- 100% {
163
- transform: translateY(150%);
164
- }
165
- }
166
- `,a=[i.I,s,r];(0,n.hC)("",a,{moduleId:"lumo-menu-overlay"})},510:(e,t,o)=>{o.d(t,{I:()=>i}),o(1195),o(9416),o(9849),o(4173);var n=o(5128);const i=n.iv`
167
- :host {
168
- top: var(--lumo-space-m);
169
- right: var(--lumo-space-m);
170
- bottom: var(--lumo-space-m);
171
- left: var(--lumo-space-m);
172
- /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
173
- /* stylelint-disable-next-line */
174
- outline: 0px solid transparent;
175
- }
176
-
177
- [part='overlay'] {
178
- background-color: var(--lumo-base-color);
179
- background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
180
- border-radius: var(--lumo-border-radius-m);
181
- box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
182
- color: var(--lumo-body-text-color);
183
- font-family: var(--lumo-font-family);
184
- font-size: var(--lumo-font-size-m);
185
- font-weight: 400;
186
- line-height: var(--lumo-line-height-m);
187
- letter-spacing: 0;
188
- text-transform: none;
189
- -webkit-text-size-adjust: 100%;
190
- -webkit-font-smoothing: antialiased;
191
- -moz-osx-font-smoothing: grayscale;
192
- }
193
-
194
- [part='content'] {
195
- padding: var(--lumo-space-xs);
196
- }
197
-
198
- [part='backdrop'] {
199
- background-color: var(--lumo-shade-20pct);
200
- animation: 0.2s lumo-overlay-backdrop-enter both;
201
- will-change: opacity;
202
- }
203
-
204
- @keyframes lumo-overlay-backdrop-enter {
205
- 0% {
206
- opacity: 0;
207
- }
208
- }
209
-
210
- :host([closing]) [part='backdrop'] {
211
- animation: 0.2s lumo-overlay-backdrop-exit both;
212
- }
213
-
214
- @keyframes lumo-overlay-backdrop-exit {
215
- 100% {
216
- opacity: 0;
217
- }
218
- }
219
-
220
- @keyframes lumo-overlay-dummy-animation {
221
- 0% {
222
- opacity: 1;
223
- }
224
-
225
- 100% {
226
- opacity: 1;
227
- }
228
- }
229
- `;(0,n.hC)("",i,{moduleId:"lumo-overlay"})}}]);