@descope/web-components-ui 1.0.221 → 1.0.223

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/dist/cjs/index.cjs.js +790 -642
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +778 -631
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1000.js +1 -1
  6. package/dist/umd/1037.js +2 -0
  7. package/dist/umd/1037.js.LICENSE.txt +5 -0
  8. package/dist/umd/1932.js +310 -0
  9. package/dist/umd/1932.js.LICENSE.txt +5 -0
  10. package/dist/umd/1990.js +1 -1
  11. package/dist/umd/262.js +2 -0
  12. package/dist/umd/262.js.LICENSE.txt +5 -0
  13. package/dist/umd/3660.js +17 -0
  14. package/dist/umd/3660.js.LICENSE.txt +23 -0
  15. package/dist/umd/3952.js +123 -0
  16. package/dist/umd/{1883.js → 4273.js} +5 -5
  17. package/dist/umd/5345.js +94 -0
  18. package/dist/umd/5345.js.LICENSE.txt +11 -0
  19. package/dist/umd/5806.js +1 -1
  20. package/dist/umd/6116.js +8 -8
  21. package/dist/umd/7056.js +1 -1
  22. package/dist/umd/7101.js +1 -1
  23. package/dist/umd/7196.js +360 -0
  24. package/dist/umd/{1852.js.LICENSE.txt → 7196.js.LICENSE.txt} +0 -12
  25. package/dist/umd/8725.js +2 -2
  26. package/dist/umd/9211.js +2 -2
  27. package/dist/umd/9437.js +1 -1
  28. package/dist/umd/9515.js +1 -1
  29. package/dist/umd/descope-combo-box-index-js.js +1 -1
  30. package/dist/umd/descope-modal-index-js.js +1 -0
  31. package/dist/umd/index.js +1 -1
  32. package/package.json +3 -2
  33. package/src/components/descope-modal/ModalClass.js +109 -0
  34. package/src/components/descope-modal/index.js +6 -0
  35. package/src/index.cjs.js +1 -0
  36. package/src/mixins/createStyleMixin/helpers.js +2 -2
  37. package/src/mixins/createStyleMixin/index.js +2 -2
  38. package/src/mixins/portalMixin.js +24 -4
  39. package/src/theme/components/button.js +7 -0
  40. package/src/theme/components/index.js +2 -0
  41. package/src/theme/components/modal.js +16 -0
  42. package/dist/umd/1852.js +0 -375
  43. package/dist/umd/4767.js +0 -215
  44. /package/dist/umd/{4767.js.LICENSE.txt → 3952.js.LICENSE.txt} +0 -0
  45. /package/dist/umd/{1883.js.LICENSE.txt → 4273.js.LICENSE.txt} +0 -0
package/dist/umd/1000.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{3874:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}},o=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}};var l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o,l.Q,a)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},1e3:(t,e,s)=>{s.d(e,{li:()=>C,Ae:()=>A.A,DM:()=>p,yk:()=>u,e4:()=>c,mE:()=>x,wX:()=>b,QT:()=>M.Q,Iw:()=>S,dj:()=>f});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class l{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const h=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),u=({mappings:t={},componentNameOverride:e=""})=>s=>{const u=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...h(u,{...t})}}#n;#r;#a;#o;#l;#h;#u;#c;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#u=a??this.baseSelector,this.#d=e,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[u]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${u}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${u}`;const s=(t=u,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(u,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${u}`,e.innerHTML=((t,e,s)=>{const i=new l;return Object.keys(s).forEach((a=>{const l=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),h=(0,r.Tk)(t,a);l.forEach((({selector:t,property:s})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,o(h))}))})),i.toString()})((0,n.E3)(u,this.#o),this.#u,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=this.#d?.(this)||this.shadowRoot,this.#f(u),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},c=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#S(t){t?this.shadowRoot.appendChild(this.#A):this.#A.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#S("true"===s)}};var d=s(3874),m=s(7878);const p=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[]})=>{class h extends((0,d.s)({componentName:t,baseSelector:e})){#C=m.C.bind(this,"blur");#M=m.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:!0}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#C()})),this.baseElement.addEventListener("focus",(t=>{this.#M()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return h};s(5910);const g=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...g]}static get formAssociated(){return!0}#x;constructor(){super(),this.#x=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||o||l||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.validationMessage;default:return""}}#T(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}},E=["invalid","required"],v=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},y=({proxyProps:t=[],inputEvent:e="input"})=>s=>class extends(b(s)){static get observedAttributes(){return[...s.observedAttributes||[],...E]}#w;#L=m.C.bind(this,"change");constructor(){super(),this.#w=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#w&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#w)return this.#w;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#w=v(t)||v(e),this.#w}set inputElement(t){this.#w=t}getValidity(){return this.inputElement?.validity||{}}#k(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#k(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},setTimeout((()=>{this.baseElement?.addEventListener(e,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#k()})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#k()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}))}},f=t=>(0,n.qC)(y(t),u({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const S=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>l=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=u({mappings:s})(l);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:h((0,n.E3)(l.componentName,"_"+c),s)}}#V;constructor(){const t=t=>{const s=t.shadowRoot.querySelector(t.baseSelector),i=e?s.shadowRoot.querySelector(e):s;return i.shadowRoot||i};var s;super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#V=(s=t(this)).host||s}#N(){this.#V.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#V.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#V,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#N()}}},C=t=>class extends t{#L=m.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var M=s(8084);const x=t=>class extends t{init(){this.#$(),super.init?.()}#$(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,m.C.call(this,"blur"),m.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.C.call(this,"focus"),m.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{3874:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}},o=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}};var l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o,l.Q,a)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>c,iY:()=>h,oP:()=>u,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t)}))})).observe(t,{childList:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),c=(...t)=>`--${(0,i.E3)(...t)}`,u=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},1e3:(t,e,s)=>{s.d(e,{li:()=>C,Ae:()=>A.A,DM:()=>p,yk:()=>c,e4:()=>u,mE:()=>w,wX:()=>b,QT:()=>M.Q,Iw:()=>S,dj:()=>f});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);const o=(t,...e)=>`var(${t}${e.length?` , ${o(...e)}`:""})`;class l{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const h=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),c=({mappings:t={},componentNameOverride:e=""})=>s=>{const c=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...h(c,{...t})}}#n;#r;#a;#o;#l;#h;#c;#u;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#c=a??this.baseSelector,this.#d=e,this.#u=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[c]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${c}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#u.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${c}`;const s=(t=c,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(c,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#v(t=[]){let e=!1;t.forEach((t=>{this.#u.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${c}`,e.innerHTML=((t,e,s)=>{const i=new l;return Object.keys(s).forEach((a=>{const l=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),h=(0,r.Tk)(t,a);l.forEach((({selector:t,property:s,important:r})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,o(h)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(c,this.#o),this.#c,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=await(this.#d?.(this))||this.shadowRoot,this.#f(c),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},u=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#S(t){t?this.shadowRoot.appendChild(this.#A):this.#A.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#S("true"===s)}};var d=s(3874),m=s(7878);const p=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[]})=>{class h extends((0,d.s)({componentName:t,baseSelector:e})){#C=m.C.bind(this,"blur");#M=m.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:!0}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#C()})),this.baseElement.addEventListener("focus",(t=>{this.#M()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return h};s(5910);const g=["required","pattern"],b=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...g]}static get formAssociated(){return!0}#w;constructor(){super(),this.#w=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||o||l||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case c:return this.validationMessage;default:return""}}#T(){const t=this.isReadOnly?{}:this.getValidity();this.#w.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#w.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#w.validity.valid}reportValidity(){return this.#w.reportValidity()}get validity(){return this.#w.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#w.setValidity({customError:!0},t,this.validationTarget):(this.#w.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#w.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),g.includes(t)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}},E=["invalid","required"],v=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},y=({proxyProps:t=[],inputEvent:e="input"})=>s=>class extends(b(s)){static get observedAttributes(){return[...s.observedAttributes||[],...E]}#x;#L=m.C.bind(this,"change");constructor(){super(),this.#x=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#x&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#x)return this.#x;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#x=v(t)||v(e),this.#x}set inputElement(t){this.#x=t}getValidity(){return this.inputElement?.validity||{}}#k(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#k(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},setTimeout((()=>{this.baseElement?.addEventListener(e,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#k()})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#k()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})}))}},f=t=>(0,n.qC)(y(t),c({componentNameOverride:(0,r.iY)("input-wrapper")}));var A=s(357);const S=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>l=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=c({mappings:s})(l);return class extends d{static get cssVarList(){return{...d.cssVarList,[u]:h((0,n.E3)(l.componentName,"_"+u),s)}}#V;constructor(){const t=t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?s.shadowRoot.querySelector(e):s};var s;super({getRootElement:(s=t,t=>new Promise((e=>{const i=s(t);let n=0;const r=()=>{if(n>20)return console.error("could not get shadow root for element",i),void e(i);n++,i.shadowRoot?e(i.shadowRoot):setTimeout(r)};r()}))),componentNameSuffix:"_"+u,themeSection:i.qM+u,baseSelector:":host"}),this.#V=t(this)}#N(){this.#V.onmouseenter=t=>{t.target.setAttribute("hover","true")},this.#V.onmouseleave=t=>{t.target.removeAttribute("hover")}}init(){super.init?.(),(0,r.oP)(this,this.#V,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#N()}}},C=t=>class extends t{#L=m.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var M=s(8084);const w=t=>class extends t{init(){this.#$(),super.init?.()}#$(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,m.C.call(this,"blur"),m.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(m.C.call(this,"focus"),m.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 1037.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1037],{1037:(e,t,o)=>{o.d(t,{G6:()=>s,T:()=>i,gn:()=>c,vU:()=>a});const n=e=>e.test(navigator.userAgent),r=e=>e.test(navigator.platform);n(/Android/u),n(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);const a=n(/Firefox/u),u=r(/^iPad/u)||r(/^Mac/u)&&navigator.maxTouchPoints>1,c=r(/^iPhone/u)||u,s=n(/^((?!chrome|android).)*safari/iu),i=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})()}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
@@ -0,0 +1,310 @@
1
+ /*! For license information please see 1932.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1932],{1932:(e,t,r)=>{var o=r(510),s=r(6570);(0,s.hC)("vaadin-overlay",o.I,{moduleId:"lumo-vaadin-overlay"});var i=r(4241),a=r(2807),n=r(1914),d=r(262),l=r(7673),h=r(6196);(0,s.hC)("vaadin-overlay",h.r,{moduleId:"vaadin-overlay-styles"});class p extends((0,l.F)((0,s.Tb)((0,n.U)(i.H3)))){static get template(){return i.dy`
3
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
4
+ <div part="overlay" id="overlay" tabindex="0">
5
+ <div part="content" id="content">
6
+ <slot></slot>
7
+ </div>
8
+ </div>
9
+ `}static get is(){return"vaadin-overlay"}ready(){super.ready(),(0,d.k)(this)}}(0,a.M)(p),r(9416);const c=s.iv`
10
+ /* Optical centering */
11
+ :host::before,
12
+ :host::after {
13
+ content: '';
14
+ flex-basis: 0;
15
+ flex-grow: 1;
16
+ }
17
+
18
+ :host::after {
19
+ flex-grow: 1.1;
20
+ }
21
+
22
+ [part='overlay'] {
23
+ border-radius: var(--lumo-border-radius-l);
24
+ box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-xl);
25
+ background-image: none;
26
+ outline: none;
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+
30
+ [part='content'] {
31
+ padding: var(--lumo-space-l);
32
+ }
33
+
34
+ :host(:is([has-header], [has-title])) [part='header'] + [part='content'] {
35
+ padding-top: 0;
36
+ }
37
+
38
+ [part='header'],
39
+ [part='header-content'],
40
+ [part='footer'] {
41
+ gap: var(--lumo-space-xs) var(--lumo-space-s);
42
+ line-height: var(--lumo-line-height-s);
43
+ }
44
+
45
+ [part='header'] {
46
+ padding: var(--lumo-space-m);
47
+ background-color: var(--lumo-base-color);
48
+ border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
49
+ }
50
+
51
+ [part='footer'] {
52
+ padding: var(--lumo-space-s) var(--lumo-space-m);
53
+ background-color: var(--lumo-contrast-5pct);
54
+ border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */
55
+ }
56
+
57
+ [part='title'] {
58
+ font-size: var(--lumo-font-size-xl);
59
+ font-weight: 600;
60
+ color: var(--lumo-header-text-color);
61
+ margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
62
+ }
63
+
64
+ /* No padding */
65
+ :host([theme~='no-padding']) [part='content'] {
66
+ padding: 0 !important;
67
+ }
68
+
69
+ @media (min-height: 320px) {
70
+ :host([overflow~='top']) [part='header'] {
71
+ box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct);
72
+ }
73
+ }
74
+
75
+ /* Animations */
76
+
77
+ :host([opening]),
78
+ :host([closing]) {
79
+ animation: 0.25s lumo-overlay-dummy-animation;
80
+ }
81
+
82
+ :host([opening]) [part='overlay'] {
83
+ animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
84
+ }
85
+
86
+ @keyframes vaadin-dialog-enter {
87
+ 0% {
88
+ opacity: 0;
89
+ transform: scale(0.95);
90
+ }
91
+ }
92
+
93
+ :host([closing]) [part='overlay'] {
94
+ animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
95
+ }
96
+
97
+ :host([closing]) [part='backdrop'] {
98
+ animation-delay: 0.05s;
99
+ }
100
+
101
+ @keyframes vaadin-dialog-exit {
102
+ 100% {
103
+ opacity: 0;
104
+ transform: scale(1.02);
105
+ }
106
+ }
107
+ `;(0,s.hC)("vaadin-dialog-overlay",[o.I,c],{moduleId:"lumo-dialog"});const u=e=>class extends((0,l.F)(e)){static get properties(){return{headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object}}}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}ready(){super.ready(),this.__resizeObserver=new ResizeObserver((()=>{this.__updateOverflow()})),this.__resizeObserver.observe(this.$.resizerContainer),this.$.content.addEventListener("scroll",(()=>{this.__updateOverflow()}))}__createContainer(e){const t=document.createElement("div");return t.setAttribute("slot",e),t}__clearContainer(e){e.innerHTML="",delete e._$litPart$}__initContainer(e,t){return e?this.__clearContainer(e):e=this.__createContainer(t),e}_headerFooterRendererChange(e,t,r){const o=this.__oldHeaderRenderer!==e;this.__oldHeaderRenderer=e;const s=this.__oldFooterRenderer!==t;this.__oldFooterRenderer=t;const i=this._oldOpenedFooterHeader!==r;this._oldOpenedFooterHeader=r,this.toggleAttribute("has-header",!!e),this.toggleAttribute("has-footer",!!t),o&&(e?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null,this.__updateOverflow())),s&&(t?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null,this.__updateOverflow())),(e&&(o||i)||t&&(s||i))&&r&&this.requestContentUpdate()}_headerTitleChanged(e,t){this.toggleAttribute("has-title",!!e),t&&(e||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=e}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("h2"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&(this.headerContainer.parentElement||this.appendChild(this.headerContainer),this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner)),this.footerContainer&&(this.footerContainer.parentElement||this.appendChild(this.footerContainer),this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner)),this._headerTitleRenderer(),this.__updateOverflow()}setBounds(e){const t=this.$.overlay,r={...e};"absolute"!==t.style.position&&(t.style.position="absolute",this.setAttribute("has-bounds-set","")),Object.keys(r).forEach((e=>{"number"==typeof r[e]&&(r[e]=`${r[e]}px`)})),Object.assign(t.style,r)}getBounds(){const e=this.$.overlay.getBoundingClientRect(),t=this.getBoundingClientRect();return{top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height}}__updateOverflow(){let e="";if(this.hasAttribute("has-header")||this.hasAttribute("has-footer")||this.headerTitle){const t=this.$.content;t.scrollTop>0&&(e+=" top"),t.scrollTop<t.scrollHeight-t.clientHeight&&(e+=" bottom")}const t=e.trim();t.length>0&&this.getAttribute("overflow")!==t?this.setAttribute("overflow",t):0===t.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}};var v=r(9897);const g=v.iv`
108
+ [part='header'],
109
+ [part='header-content'],
110
+ [part='footer'] {
111
+ display: flex;
112
+ align-items: center;
113
+ flex-wrap: wrap;
114
+ flex: none;
115
+ pointer-events: none;
116
+ z-index: 1;
117
+ }
118
+
119
+ [part='header'] {
120
+ flex-wrap: nowrap;
121
+ }
122
+
123
+ ::slotted([slot='header-content']),
124
+ ::slotted([slot='title']),
125
+ ::slotted([slot='footer']) {
126
+ display: contents;
127
+ pointer-events: auto;
128
+ }
129
+
130
+ ::slotted([slot='title']) {
131
+ font: inherit !important;
132
+ overflow-wrap: anywhere;
133
+ }
134
+
135
+ [part='header-content'] {
136
+ flex: 1;
137
+ }
138
+
139
+ :host([has-title]) [part='header-content'],
140
+ [part='footer'] {
141
+ justify-content: flex-end;
142
+ }
143
+
144
+ :host(:not([has-title]):not([has-header])) [part='header'],
145
+ :host(:not([has-header])) [part='header-content'],
146
+ :host(:not([has-title])) [part='title'],
147
+ :host(:not([has-footer])) [part='footer'] {
148
+ display: none !important;
149
+ }
150
+
151
+ :host(:is([has-title], [has-header], [has-footer])) [part='content'] {
152
+ height: auto;
153
+ }
154
+
155
+ @media (min-height: 320px) {
156
+ :host(:is([has-title], [has-header], [has-footer])) .resizer-container {
157
+ overflow: hidden;
158
+ display: flex;
159
+ flex-direction: column;
160
+ }
161
+
162
+ :host(:is([has-title], [has-header], [has-footer])) [part='content'] {
163
+ flex: 1;
164
+ overflow: auto;
165
+ }
166
+ }
167
+
168
+ /*
169
+ NOTE(platosha): Make some min-width to prevent collapsing of the content
170
+ taking the parent width, e. g., <vaadin-grid> and such.
171
+ */
172
+ [part='content'] {
173
+ min-width: 12em; /* matches the default <vaadin-text-field> width */
174
+ }
175
+
176
+ :host([has-bounds-set]) [part='overlay'] {
177
+ max-width: none;
178
+ }
179
+
180
+ @media (forced-colors: active) {
181
+ [part='overlay'] {
182
+ outline: 3px solid !important;
183
+ }
184
+ }
185
+ `,m=v.iv`
186
+ [part='overlay'] {
187
+ position: relative;
188
+ overflow: visible;
189
+ max-height: 100%;
190
+ display: flex;
191
+ }
192
+
193
+ [part='content'] {
194
+ box-sizing: border-box;
195
+ height: 100%;
196
+ }
197
+
198
+ .resizer-container {
199
+ overflow: auto;
200
+ flex-grow: 1;
201
+ border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
202
+ }
203
+
204
+ [part='overlay'][style] .resizer-container {
205
+ min-height: 100%;
206
+ width: 100%;
207
+ }
208
+
209
+ :host(:not([resizable])) .resizer {
210
+ display: none;
211
+ }
212
+
213
+ :host([resizable]) [part='title'] {
214
+ cursor: move;
215
+ -webkit-user-select: none;
216
+ user-select: none;
217
+ }
218
+
219
+ .resizer {
220
+ position: absolute;
221
+ height: 16px;
222
+ width: 16px;
223
+ }
224
+
225
+ .resizer.edge {
226
+ height: 8px;
227
+ width: 8px;
228
+ inset: -4px;
229
+ }
230
+
231
+ .resizer.edge.n {
232
+ width: auto;
233
+ bottom: auto;
234
+ cursor: ns-resize;
235
+ }
236
+
237
+ .resizer.ne {
238
+ top: -4px;
239
+ right: -4px;
240
+ cursor: nesw-resize;
241
+ }
242
+
243
+ .resizer.edge.e {
244
+ height: auto;
245
+ left: auto;
246
+ cursor: ew-resize;
247
+ }
248
+
249
+ .resizer.se {
250
+ bottom: -4px;
251
+ right: -4px;
252
+ cursor: nwse-resize;
253
+ }
254
+
255
+ .resizer.edge.s {
256
+ width: auto;
257
+ top: auto;
258
+ cursor: ns-resize;
259
+ }
260
+
261
+ .resizer.sw {
262
+ bottom: -4px;
263
+ left: -4px;
264
+ cursor: nesw-resize;
265
+ }
266
+
267
+ .resizer.edge.w {
268
+ height: auto;
269
+ right: auto;
270
+ cursor: ew-resize;
271
+ }
272
+
273
+ .resizer.nw {
274
+ top: -4px;
275
+ left: -4px;
276
+ cursor: nwse-resize;
277
+ }
278
+ `;(0,s.hC)("vaadin-dialog-overlay",[h.r,g,m],{moduleId:"vaadin-dialog-overlay-styles"});class _ extends(u((0,n.U)((0,s.Tb)(i.H3)))){static get is(){return"vaadin-dialog-overlay"}static get template(){return i.dy`
279
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
280
+ <div part="overlay" id="overlay" tabindex="0">
281
+ <section id="resizerContainer" class="resizer-container">
282
+ <header part="header">
283
+ <div part="title"><slot name="title"></slot></div>
284
+ <div part="header-content"><slot name="header-content"></slot></div>
285
+ </header>
286
+ <div part="content" id="content"><slot></slot></div>
287
+ <footer part="footer"><slot name="footer"></slot></footer>
288
+ </section>
289
+ </div>
290
+ `}}(0,a.M)(_);var y=r(2521),f=r(9320),b=r(1462);const w=e=>class extends e{static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),this._overlayElement=e}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout((()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)}))}_onOverlayOpened(e){!1===e.detail.value&&(this.opened=!1)}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault()}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}};var C=r(1037);function z(e){return e.touches?e.touches[0]:e}function x(e){return e.clientX>=0&&e.clientX<=window.innerWidth&&e.clientY>=0&&e.clientY<=window.innerHeight}const E=e=>class extends e{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:C.T},__dragHandleClassName:{type:String}}}async ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),await new Promise(requestAnimationFrame),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(e){if(!("touchstart"===e.type&&e.touches.length>1)&&this.draggable&&(0===e.button||e.touches)){const t=this.$.overlay.$.resizerContainer,r=e.target===t,o=e.offsetX>t.clientWidth||e.offsetY>t.clientHeight,s=e.target===this.$.overlay.$.content,i=e.composedPath().some(((e,t)=>{if(!e.classList)return!1;const r=e.classList.contains(this.__dragHandleClassName||"draggable"),o=e.classList.contains("draggable-leaf-only"),s=0===t;return o&&s||r&&(!o||s)}));if(r&&!o||s||i){i||e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const t=z(e);this._originalMouseCoords={top:t.pageY,left:t.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}}_drag(e){const t=z(e);if(x(t)){const e=this._originalBounds.top+(t.pageY-this._originalMouseCoords.top),r=this._originalBounds.left+(t.pageX-this._originalMouseCoords.left);this.$.overlay.setBounds({top:e,left:r})}}_stopDrag(){window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}},L=e=>class extends e{static get properties(){return{renderer:{type:Object},headerTitle:String,headerRenderer:{type:Object},footerRenderer:{type:Object}}}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}},$=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}async ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},await new Promise(requestAnimationFrame),this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach((e=>{const t=document.createElement("div");this._resizeListeners.start[e]=t=>this._startResize(t,e),this._resizeListeners.resize[e]=t=>this._resize(t,e),this._resizeListeners.stop[e]=()=>this._stopResize(e),1===e.length&&t.classList.add("edge"),t.classList.add("resizer"),t.classList.add(e),t.addEventListener("mousedown",this._resizeListeners.start[e]),t.addEventListener("touchstart",this._resizeListeners.start[e]),this.$.overlay.$.resizerContainer.appendChild(t)}))}_startResize(e,t){if(!("touchstart"===e.type&&e.touches.length>1)&&(0===e.button||e.touches)){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const r=z(e);this._originalMouseCoords={top:r.pageY,left:r.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[t]),window.addEventListener("touchmove",this._resizeListeners.resize[t]),window.addEventListener("mouseup",this._resizeListeners.stop[t]),window.addEventListener("touchend",this._resizeListeners.stop[t]),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}_resize(e,t){const r=z(e);if(x(r)){const e=40;t.split("").forEach((t=>{switch(t){case"n":{const t=this._originalBounds.height-(r.pageY-this._originalMouseCoords.top),o=this._originalBounds.top+(r.pageY-this._originalMouseCoords.top);t>e&&this.$.overlay.setBounds({top:o,height:t});break}case"e":{const t=this._originalBounds.width+(r.pageX-this._originalMouseCoords.left);t>e&&this.$.overlay.setBounds({width:t});break}case"s":{const t=this._originalBounds.height+(r.pageY-this._originalMouseCoords.top);t>e&&this.$.overlay.setBounds({height:t});break}case"w":{const t=this._originalBounds.width-(r.pageX-this._originalMouseCoords.left),o=this._originalBounds.left+(r.pageX-this._originalMouseCoords.left);t>e&&this.$.overlay.setBounds({left:o,width:t});break}}}))}}_stopResize(e){window.removeEventListener("mousemove",this._resizeListeners.resize[e]),window.removeEventListener("touchmove",this._resizeListeners.resize[e]),window.removeEventListener("mouseup",this._resizeListeners.stop[e]),window.removeEventListener("touchend",this._resizeListeners.stop[e]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){const e=this.$.overlay.$.resizerContainer.scrollTop,{width:t,height:r}=getComputedStyle(this.$.overlay.$.overlay),o=this.$.overlay.$.content;o.setAttribute("style","position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-sizing: content-box; height: auto;");const{width:s,height:i}=getComputedStyle(o);return o.removeAttribute("style"),this.$.overlay.$.resizerContainer.scrollTop=e,{width:t,height:r,contentWidth:s,contentHeight:i}}};class T extends(E($(L(w((0,f.u)((0,b.I)((0,y.S)(i.H3)))))))){static get template(){return i.dy`
291
+ <style>
292
+ :host {
293
+ display: none !important;
294
+ }
295
+ </style>
296
+
297
+ <vaadin-dialog-overlay
298
+ id="overlay"
299
+ header-title="[[headerTitle]]"
300
+ on-opened-changed="_onOverlayOpened"
301
+ on-mousedown="_bringOverlayToFront"
302
+ on-touchstart="_bringOverlayToFront"
303
+ theme$="[[_theme]]"
304
+ modeless="[[modeless]]"
305
+ with-backdrop="[[!modeless]]"
306
+ resizable$="[[resizable]]"
307
+ restore-focus-on-close
308
+ focus-trap
309
+ ></vaadin-dialog-overlay>
310
+ `}static get is(){return"vaadin-dialog"}static get properties(){return{ariaLabel:{type:String,value:""}}}static get observers(){return["_openedChanged(opened)","_ariaLabelChanged(ariaLabel, headerTitle)","_rendererChanged(renderer, headerRenderer, footerRenderer)"]}ready(){super.ready(),this._overlayElement.setAttribute("role","dialog"),(0,d.k)(this)}_rendererChanged(e,t,r){this.$.overlay.setProperties({owner:this,renderer:e,headerRenderer:t,footerRenderer:r})}_openedChanged(e){this.$.overlay.opened=e}_ariaLabelChanged(e,t){e||t?this.$.overlay.setAttribute("aria-label",e||t):this.$.overlay.removeAttribute("aria-label")}}(0,a.M)(T)}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
package/dist/umd/1990.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 1990.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1990],{1990:(e,t,s)=>{s(3787),s(9098),s(9416);var i=s(6754),a=s(5128);const n=a.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1990],{1990:(e,t,s)=>{s(3787),s(9098),s(9416);var i=s(6754),a=s(6570);const n=a.iv`
3
3
  [part='overlay'] {
4
4
  /*
5
5
  Width:
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 262.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[262],{262:(e,a,l)=>{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.`)}l.d(a,{k:()=>n})}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
@@ -0,0 +1,17 @@
1
+ /*! For license information please see 3660.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3660],{5229:(t,e,s)=>{s.d(e,{f:()=>i});const i=(0,s(1014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},1360:(t,e,s)=>{s.d(e,{W:()=>n});var i=s(1014),o=s(3550);const n=(0,i.o)((t=>class extends t{get _keyboardActive(){return(0,o.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},2628:(t,e,s)=>{s.d(e,{L:()=>i});const i=(0,s(1014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},8298:(t,e,s)=>{s.d(e,{N:()=>o});var i=s(5229);const o=t=>class extends((0,i.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},3726:(t,e,s)=>{function i(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function o(t){return t?new Set(t.split(" ")):new Set}function n(t){return t?[...t].join(" "):""}function d(t,e,s){const i=o(t.getAttribute(e));i.add(s),t.setAttribute(e,n(i))}function h(t,e,s){const i=o(t.getAttribute(e));i.delete(s),0!==i.size?t.setAttribute(e,n(i)):t.removeAttribute(e)}function a(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}s.d(e,{$2:()=>d,AD:()=>i,dV:()=>n,eC:()=>a,hK:()=>o,x_:()=>h})},9229:(t,e,s)=>{s.d(e,{n:()=>d});var i=s(3726);class o{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const s=[],i=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const n=t.indexOf(e);-1===n?s.push(e):n!==o&&i.push(e)})),(e.length||s.length||i.length)&&this.callback({addedNodes:e,movedNodes:i,removedNodes:s}),this._storedNodes=t}}var n=s(3971);class d extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.l)()}`}constructor(t,e,s,i={}){super();const{initializer:o,multiple:n,observe:d,useUniqueId:h}=i;this.host=t,this.slotName=e,this.tagName=s,this.observe="boolean"!=typeof d||d,this.multiple="boolean"==typeof n&&n,this.slotInitializer=o,n&&(this.nodes=[]),h&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:s}=this;let i=this.defaultNode;return!i&&s&&(i=document.createElement(s),i instanceof Element&&(""!==e&&i.setAttribute("slot",e),this.node=i,this.defaultNode=i)),i&&t.appendChild(i),i}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,s=this.host.shadowRoot.querySelector(e);this.__slotObserver=new o(s,(({addedNodes:t,removedNodes:e})=>{const s=this.multiple?this.nodes:[this.node],o=t.filter((t=>!(0,i.eC)(t)&&!s.includes(t)));e.length&&(this.nodes=s.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),o&&o.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...s,...o].filter((t=>t!==this.defaultNode)),o.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=o[0],this.initAddedNode(this.node)))}))}}},4463:(t,e,s)=>{s.d(e,{f:()=>o});var i=s(9229);class o extends i.n{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}},3971:(t,e,s)=>{s.d(e,{l:()=>o});let i=0;function o(){return i++}},9098:(t,e,s)=>{s(4407);var i=s(6570),o=s(2463);const n=i.iv`
3
+ :host {
4
+ --lumo-size-xs: 1.625rem;
5
+ --lumo-size-s: 1.875rem;
6
+ --lumo-size-m: 2.25rem;
7
+ --lumo-size-l: 2.75rem;
8
+ --lumo-size-xl: 3.5rem;
9
+
10
+ /* Icons */
11
+ --lumo-icon-size-s: 1.25em;
12
+ --lumo-icon-size-m: 1.5em;
13
+ --lumo-icon-size-l: 2.25em;
14
+ /* For backwards compatibility */
15
+ --lumo-icon-size: var(--lumo-icon-size-m);
16
+ }
17
+ `;(0,o.K)("sizing-props",n)}}]);
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
10
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
+ */
12
+
13
+ /**
14
+ * @license
15
+ * Copyright (c) 2022 - 2023 Vaadin Ltd.
16
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
17
+ */
18
+
19
+ /**
20
+ * @license
21
+ * Copyright (c) 2023 Vaadin Ltd.
22
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
23
+ */
@@ -0,0 +1,123 @@
1
+ /*! For license information please see 3952.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3952],{2223:(e,t,o)=>{o.d(t,{T8:()=>l}),o(7894);let s=!1,n=[],i=[];function r(){s=!0,requestAnimationFrame((function(){s=!1,function(e){for(;e.length;)a(e.shift())}(n),setTimeout((function(){!function(e){for(let t=0,o=e.length;t<o;t++)a(e.shift())}(i)}))}))}function a(e){const t=e[0],o=e[1],s=e[2];try{o.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function l(e,t,o){s||r(),i.push([e,t,o])}},962:(e,t,o)=>{o.d(t,{Ry:()=>d});let s=new WeakMap,n=new WeakMap,i={},r=0;const a=e=>e&&e.nodeType===Node.ELEMENT_NODE,l=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)},d=(e,t=document.body,o="data-aria-hidden")=>{const d=Array.from(Array.isArray(e)?e:[e]);return t&&d.push(...Array.from(t.querySelectorAll("[aria-live]"))),((e,t,o,d)=>{const h=((e,t)=>a(e)?t.map((t=>{if(!a(t))return l(t,"is not a valid element"),null;let o=t;for(;o&&o!==e;){if(e.contains(o))return t;o=o.getRootNode().host}return l(t,"is not contained inside",e),null})).filter((e=>Boolean(e))):(l(e,"is not a valid element"),[]))(t,Array.isArray(e)?e:[e]);i[o]||(i[o]=new WeakMap);const c=i[o],u=[],p=new Set,_=new Set(h),m=e=>{if(!e||p.has(e))return;p.add(e);const t=e.assignedSlot;t&&m(t),m(e.parentNode||e.host)};h.forEach(m);const v=e=>{if(!e||_.has(e))return;const t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach((e=>{if(!["template","script","style"].includes(e.localName))if(p.has(e))v(e);else{const t=e.getAttribute(d),i=null!==t&&"false"!==t,r=(s.get(e)||0)+1,a=(c.get(e)||0)+1;s.set(e,r),c.set(e,a),u.push(e),1===r&&i&&n.set(e,!0),1===a&&e.setAttribute(o,"true"),i||e.setAttribute(d,"true")}}))};return v(t),p.clear(),r+=1,()=>{u.forEach((e=>{const t=s.get(e)-1,i=c.get(e)-1;s.set(e,t),c.set(e,i),t||(n.has(e)?n.delete(e):e.removeAttribute(d)),i||e.removeAttribute(o)})),r-=1,r||(s=new WeakMap,s=new WeakMap,n=new WeakMap,i={})}})(d,t,o,"aria-hidden")};HTMLElement.prototype},9320:(e,t,o)=>{o.d(t,{u:()=>s});const s=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 s="string"==typeof e?e.split(" "):[];s.length>0&&o.add(...s),this.__previousClasses=s}}},7673:(e,t,o)=>{o.d(t,{F:()=>m});var s=o(2223),n=o(1037),i=o(962);class r{constructor(e,t){this.host=e,this.callback="function"==typeof t?t:()=>e}showModal(){const e=this.callback();this.__showOthers=(0,i.Ry)(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}var a=o(3550);class l{saveFocus(e){this.focusNode=e||(0,a.Gf)()}restoreFocus(){const e=this.focusNode;e&&((0,a.Gf)()===document.body?setTimeout((()=>e.focus())):e.focus(),this.focusNode=null)}}const d=[];class h{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,a.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(a.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,s=this.__focusedElementIndex,n=t[(t.length+s+o)%t.length];n.focus(),"input"===n.localName&&n.select()}}var c=o(6155);const u=e=>class extends((0,c.k)(e)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new r(this),this.__focusTrapController=new h(this),this.__focusRestorationController=new l}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=(0,a.Gf)();return e===document.body||this._deepContains(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}},p=()=>Array.from(document.body.children).filter((e=>e instanceof HTMLElement&&e._hasOverlayStackMixin&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0)),_=e=>class extends e{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return this===p().pop()}bringToFront(){let e="";const t=p().filter((e=>e!==this)).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),p().forEach((e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=p();let t;for(;(t=e.pop())&&(t===this||(t.$.overlay.style.removeProperty("pointer-events"),t.modeless)););}},m=e=>class extends(u(_(e))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}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),n.gn&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}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)}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_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")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(e,t,o,s){const n=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const i=this._oldRenderer!==e;this._oldRenderer=e;const r=this._oldOpened!==s;this._oldOpened=s,i&&(this.innerHTML="",delete this._$litPart$),s&&e&&(i||r||n)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),(0,s.T8)(this,(()=>{this._trapFocus();const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),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`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_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(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),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)}_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)}}}},6196:(e,t,o)=>{o.d(t,{r:()=>s});const s=o(9897).iv`
3
+ :host {
4
+ z-index: 200;
5
+ position: fixed;
6
+
7
+ /* Despite of what the names say, <vaadin-overlay> is just a container
8
+ for position/sizing/alignment. The actual overlay is the overlay part. */
9
+
10
+ /* Default position constraints: the entire viewport. Note: themes can
11
+ override this to introduce gaps between the overlay and the viewport. */
12
+ inset: 0;
13
+ bottom: var(--vaadin-overlay-viewport-bottom);
14
+
15
+ /* Use flexbox alignment for the overlay part. */
16
+ display: flex;
17
+ flex-direction: column; /* makes dropdowns sizing easier */
18
+ /* Align to center by default. */
19
+ align-items: center;
20
+ justify-content: center;
21
+
22
+ /* Allow centering when max-width/max-height applies. */
23
+ margin: auto;
24
+
25
+ /* The host is not clickable, only the overlay part is. */
26
+ pointer-events: none;
27
+
28
+ /* Remove tap highlight on touch devices. */
29
+ -webkit-tap-highlight-color: transparent;
30
+
31
+ /* CSS API for host */
32
+ --vaadin-overlay-viewport-bottom: 0;
33
+ }
34
+
35
+ :host([hidden]),
36
+ :host(:not([opened]):not([closing])) {
37
+ display: none !important;
38
+ }
39
+
40
+ [part='overlay'] {
41
+ -webkit-overflow-scrolling: touch;
42
+ overflow: auto;
43
+ pointer-events: auto;
44
+
45
+ /* Prevent overflowing the host */
46
+ max-width: 100%;
47
+ box-sizing: border-box;
48
+
49
+ -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
50
+ }
51
+
52
+ [part='backdrop'] {
53
+ z-index: -1;
54
+ content: '';
55
+ background: rgba(0, 0, 0, 0.5);
56
+ position: fixed;
57
+ inset: 0;
58
+ pointer-events: auto;
59
+ }
60
+ `},510:(e,t,o)=>{o.d(t,{I:()=>n}),o(1195),o(9416),o(9849),o(4173);var s=o(6570);const n=s.iv`
61
+ :host {
62
+ top: var(--lumo-space-m);
63
+ right: var(--lumo-space-m);
64
+ bottom: var(--lumo-space-m);
65
+ left: var(--lumo-space-m);
66
+ /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
67
+ /* stylelint-disable-next-line */
68
+ outline: 0px solid transparent;
69
+ }
70
+
71
+ [part='overlay'] {
72
+ background-color: var(--lumo-base-color);
73
+ background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
74
+ border-radius: var(--lumo-border-radius-m);
75
+ box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
76
+ color: var(--lumo-body-text-color);
77
+ font-family: var(--lumo-font-family);
78
+ font-size: var(--lumo-font-size-m);
79
+ font-weight: 400;
80
+ line-height: var(--lumo-line-height-m);
81
+ letter-spacing: 0;
82
+ text-transform: none;
83
+ -webkit-text-size-adjust: 100%;
84
+ -webkit-font-smoothing: antialiased;
85
+ -moz-osx-font-smoothing: grayscale;
86
+ }
87
+
88
+ [part='content'] {
89
+ padding: var(--lumo-space-xs);
90
+ }
91
+
92
+ [part='backdrop'] {
93
+ background-color: var(--lumo-shade-20pct);
94
+ animation: 0.2s lumo-overlay-backdrop-enter both;
95
+ will-change: opacity;
96
+ }
97
+
98
+ @keyframes lumo-overlay-backdrop-enter {
99
+ 0% {
100
+ opacity: 0;
101
+ }
102
+ }
103
+
104
+ :host([closing]) [part='backdrop'] {
105
+ animation: 0.2s lumo-overlay-backdrop-exit both;
106
+ }
107
+
108
+ @keyframes lumo-overlay-backdrop-exit {
109
+ 100% {
110
+ opacity: 0;
111
+ }
112
+ }
113
+
114
+ @keyframes lumo-overlay-dummy-animation {
115
+ 0% {
116
+ opacity: 1;
117
+ }
118
+
119
+ 100% {
120
+ opacity: 1;
121
+ }
122
+ }
123
+ `;(0,s.hC)("",n,{moduleId:"lumo-overlay"})}}]);