@descope/web-components-ui 1.0.278 → 1.0.280
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +1124 -890
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1583 -965
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1000.js +1 -1
- package/dist/umd/1438.js +2 -2
- package/dist/umd/{9558.js → 1621.js} +117 -117
- package/dist/umd/2066.js +1 -1
- package/dist/umd/3280.js +197 -0
- package/dist/umd/3280.js.LICENSE.txt +29 -0
- package/dist/umd/{6542.js → 3951.js} +6 -6
- package/dist/umd/{6542.js.LICENSE.txt → 3951.js.LICENSE.txt} +0 -6
- package/dist/umd/422.js +1 -1
- package/dist/umd/5806.js +1 -1
- package/dist/umd/6770.js +1 -1
- package/dist/umd/6977.js +2 -0
- package/dist/umd/6977.js.LICENSE.txt +5 -0
- package/dist/umd/7056.js +1 -1
- package/dist/umd/7531.js +2 -2
- package/dist/umd/7583.js +2 -2
- package/dist/umd/8725.js +1 -1
- package/dist/umd/9092.js +2 -2
- package/dist/umd/9437.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
- package/dist/umd/descope-notification-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -0
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -0
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -0
- package/package.json +4 -1
- package/src/components/descope-combo-box/ComboBoxClass.js +4 -0
- package/src/components/descope-grid/GridClass.js +1 -0
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +159 -0
- package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +158 -0
- package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/index.js +3 -0
- package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js +232 -0
- package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js +3 -0
- package/src/components/mapping-fields/descope-mappings-field/index.js +14 -0
- package/src/index.cjs.js +1 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/mixins/inputValidationMixin.js +8 -0
- package/src/mixins/proxyInputMixin.js +48 -6
- package/src/theme/components/index.js +2 -0
- package/src/theme/components/mappingsField.js +25 -0
- /package/dist/umd/{9558.js.LICENSE.txt → 1621.js.LICENSE.txt} +0 -0
package/dist/umd/1000.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{2561:(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}))}};var o=s(2666),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)}},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()}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=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})}))}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>f.A,DM:()=>m,yk:()=>h,e4:()=>u,_A:()=>A._,mE:()=>x,wX:()=>g,QT:()=>w.Q,Iw:()=>C,dj:()=>y});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);class o{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 l=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),h=({mappings:t={},componentNameOverride:e=""})=>s=>{const h=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...l(h,{...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?.[h]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${h}`,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__${h}`;const s=(t=h,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)(h,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__${h}`,e.innerHTML=((t,e,s)=>{const i=new o;return Object.keys(s).forEach((a=>{const o=((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]),l=(0,r.Tk)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{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,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(h,this.#o),this.#u,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(h),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 c=s(2561),d=s(7878);const m=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:h=!0})=>{class u extends((0,c.s)({componentName:t,baseSelector:e})){#C=d.C.bind(this,"blur");#M=d.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:h}).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 u};s(5910);const p=["required","pattern"],g=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...p]}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")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}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||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 l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#x(){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.#x())}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),p.includes(t)&&this.#x()}init(){super.init?.(),this.addEventListener("change",this.#x),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#x),setTimeout((()=>this.#x()))}},b=["invalid","required"],E=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},v=({proxyProps:t=[],inputEvent:e="input"})=>s=>class extends(g(s)){static get observedAttributes(){return[...s.observedAttributes||[],...b]}#T;#L=d.C.bind(this,"change");constructor(){super(),this.#T=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#T&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#T)return this.#T;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#T=E(t)||E(e),this.#T}set inputElement(t){this.#T=t}getValidity(){return this.inputElement?.validity||{}}#V(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#V(),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.#V()})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#V()})),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"]})}))}},y=t=>(0,n.qC)(v(t),h({componentNameOverride:(0,r.iY)("input-wrapper")}));var f=s(357),A=s(2666);const S=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},C=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>u=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=h({mappings:s})(u);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:l((0,n.E3)(u.componentName,"_"+c),s)}}#k;constructor(){const t=S((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await S((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#$(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#$()}}},M=t=>class extends t{#L=d.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 w=s(8084);const x=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["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,d.C.call(this,"blur"),d.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(d.C.call(this,"focus"),d.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","opening","closing","has-no-options"],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],{2561:(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}))}};var o=s(2666),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)}},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()}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=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})}))}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>f.A,DM:()=>m,yk:()=>h,e4:()=>u,_A:()=>A._,mE:()=>x,wX:()=>g,QT:()=>w.Q,Iw:()=>C,dj:()=>y});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);class o{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 l=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),h=({mappings:t={},componentNameOverride:e=""})=>s=>{const h=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...l(h,{...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?.[h]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${h}`,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__${h}`;const s=(t=h,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)(h,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__${h}`,e.innerHTML=((t,e,s)=>{const i=new o;return Object.keys(s).forEach((a=>{const o=((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]),l=(0,r.Tk)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{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,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(h,this.#o),this.#u,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(h),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 c=s(2561),d=s(7878);const m=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:h=!0})=>{class u extends((0,c.s)({componentName:t,baseSelector:e})){#C=d.C.bind(this,"blur");#M=d.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:h}).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 u};s(5910);const p=["required","pattern"],g=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...p]}static get formAssociated(){return!0}#w;get internals(){return this.#w}set internals(t){this.#w=t}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")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}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||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 l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#x(){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.#x())}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),p.includes(t)&&this.#x()}init(){super.init?.(),this.addEventListener("change",this.#x),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#x),setTimeout((()=>this.#x()))}},b=["invalid","required"],E=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},v=({proxyProps:t=[],inputEvent:e="input",proxyParentValidation:s=!1})=>i=>class extends(g(i)){static get observedAttributes(){return[...i.observedAttributes||[],...b]}#T;#L=d.C.bind(this,"change");constructor(){super(),this.#T=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#T&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#T)return this.#T;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#T=E(t)||E(e),this.#T}set inputElement(t){this.#T=t}getValidity(){return this.inputElement?.validity||{}}#V(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#V(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#V()}))})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#V()})),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"]})})),s){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},y=t=>(0,n.qC)(v(t),h({componentNameOverride:(0,r.iY)("input-wrapper")}));var f=s(357),A=s(2666);const S=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},C=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>u=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=h({mappings:s})(u);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:l((0,n.E3)(u.componentName,"_"+c),s)}}#k;constructor(){const t=S((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await S((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#$(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#$()}}},M=t=>class extends t{#L=d.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 w=s(8084);const x=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["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,d.C.call(this,"blur"),d.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(d.C.call(this,"focus"),d.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","opening","closing","has-no-options"],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?`)}))),{})}}}}]);
|
package/dist/umd/1438.js
CHANGED
@@ -84,7 +84,7 @@
|
|
84
84
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
85
85
|
pointer-events: none;
|
86
86
|
}
|
87
|
-
`;(0,s.hC)("vaadin-multi-select-combo-box-chip",[i.q,l],{moduleId:"lumo-multi-select-combo-box-chip"}),o(1578);var a=o(8900),r=o(3891),n=o(7026),d=o(
|
87
|
+
`;(0,s.hC)("vaadin-multi-select-combo-box-chip",[i.q,l],{moduleId:"lumo-multi-select-combo-box-chip"}),o(1578);var a=o(8900),r=o(3891),n=o(7026),d=o(7205),c=o(8168),h=o(6754),u=o(510);const p=s.iv`
|
88
88
|
@media (any-hover: hover) {
|
89
89
|
:host(:hover[readonly]) {
|
90
90
|
background-color: transparent;
|
@@ -264,7 +264,7 @@
|
|
264
264
|
no-vertical-overlap
|
265
265
|
restore-focus-node="[[inputElement]]"
|
266
266
|
></vaadin-multi-select-combo-box-overlay>
|
267
|
-
`}static get properties(){return{filteredItems:{type:Array,notify:!0},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_setDropdownItems(e){if(this.readonly)this._dropdownItems=this.selectedItems;else if(!this.filter&&this.selectedItemsOnTop)if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter((e=>-1===this._comboBox._findIndex(e,this.topGroup,this.itemIdPath)));this._dropdownItems=this.topGroup.concat(t)}else this._dropdownItems=e;else this._dropdownItems=e}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}}else super._onEnter(e)}_onEscape(e){if(this.readonly)return e.stopPropagation(),void(this.opened&&this.close());super._onEscape(e)}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.selectedItem=null,void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof S.h||this.opened&&this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))}_shouldLoadPage(e){return!this.readonly&&super._shouldLoadPage(e)}clearCache(){this.readonly||super.clearCache()}}(0,b.M)(F);var T=o(63),z=o(2521),L=o(9680),O=o(9229),D=o(262),q=o(4463),G=o(
|
267
|
+
`}static get properties(){return{filteredItems:{type:Array,notify:!0},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_setDropdownItems(e){if(this.readonly)this._dropdownItems=this.selectedItems;else if(!this.filter&&this.selectedItemsOnTop)if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter((e=>-1===this._comboBox._findIndex(e,this.topGroup,this.itemIdPath)));this._dropdownItems=this.topGroup.concat(t)}else this._dropdownItems=e;else this._dropdownItems=e}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}}else super._onEnter(e)}_onEscape(e){if(this.readonly)return e.stopPropagation(),void(this.opened&&this.close());super._onEscape(e)}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.selectedItem=null,void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof S.h||this.opened&&this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))}_shouldLoadPage(e){return!this.readonly&&super._shouldLoadPage(e)}clearCache(){this.readonly||super.clearCache()}}(0,b.M)(F);var T=o(63),z=o(2521),L=o(9680),O=o(9229),D=o(262),q=o(4463),G=o(3406),W=o(3208),R=o(6729),H=o(2743);const M=s.iv`
|
268
268
|
:host {
|
269
269
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
270
270
|
--_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/*! For license information please see
|
2
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9558],{1370:(e,t,r)=>{r.d(t,{B:()=>n});var o=r(1014),i=r(1360),a=r(8298);const n=(0,o.o)((e=>class extends((0,i.W)((0,a.N)(e))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0)}}))},9107:(e,t,r)=>{r.d(t,{o:()=>d});var o=r(3726);const i=new Map;function a(e){return i.has(e)||i.set(e,new WeakMap),i.get(e)}function n(e,t){e&&e.removeAttribute(t)}function s(e,t){if(!e||!t)return;const r=a(t);if(r.has(e))return;const i=(0,o.hK)(e.getAttribute(t));r.set(e,new Set(i))}function l(e,t,r={newId:null,oldId:null,fromUser:!1}){if(!e||!t)return;const{newId:i,oldId:l,fromUser:d}=r,u=a(t),h=u.get(e);if(!d&&h)return l&&h.delete(l),void(i&&h.add(i));d&&(h?i||u.delete(e):s(e,t),n(e,t)),(0,o.x_)(e,t,l);const c=i||(0,o.dV)(h);c&&(0,o.$2)(e,t,c)}class d{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const r=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,r,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){var t;this.__target&&(e?(s(t=this.__target,"aria-labelledby"),n(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(function(e,t){if(!e)return;const r=a(t),i=r.get(e);i&&0!==i.size?(0,o.$2)(e,t,(0,o.dV)(i)):e.removeAttribute(t),r.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,r){l(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:r})}__setErrorIdToAriaAttribute(e,t){l(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){l(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}},6328:(e,t,r)=>{r.d(t,{A:()=>o});const o=(0,r(1014).o)((e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((e=>{this._delegateAttribute(e,this[e])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((e=>{this._delegateProperty(e,this[e])}))}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach(((t,r)=>{this._delegateAttribute(t,e[r])}))}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach(((t,r)=>{this._delegateProperty(t,e[r])}))}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}))},2604:(e,t,r)=>{r.d(t,{v:()=>i});var o=r(9229);class i extends o.n{constructor(e,t,r,o={}){super(e,t,r,{...o,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((e=>{e.forEach((e=>{const t=e.target,r=t===this.node;"attributes"===e.type?r&&this.__updateNodeId(t):(r||t.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}},9091:(e,t,r)=>{r.d(t,{t:()=>s});var o=r(1014),i=r(6328),a=r(6326),n=r(4524);const s=(0,o.o)((e=>class extends((0,i.A)((0,n.n)((0,a.J)(e)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((e=>this[e])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some((e=>this.__isValidConstraint(e)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;const r=this._hasValidConstraints(t),o=this.__previousHasConstraints&&!r;(this._hasValue||this.invalid)&&r?this.validate():o&&this._setInvalid(!1),this.__previousHasConstraints=r}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return Boolean(e)||0===e}}))},1174:(e,t,r)=>{r.d(t,{L:()=>y});var o=r(1370),i=r(2628),a=r(7913),n=r(6139),s=r(1014);const l=new WeakMap,d=(0,s.o)((e=>class extends e{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=function(e){return l.has(e)||l.set(e,new Set),l.get(e)}(e);this.slotStyles.forEach((r=>{t.has(r)||(function(e,t){const r=document.createElement("style");r.textContent=e,t===document?document.head.appendChild(r):t.insertBefore(r,t.firstChild)}(r,e),t.add(r))}))}}));var u=r(1037),h=r(6326);const c=e=>class extends((0,h.J)((0,i.L)(e))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(e=>this._onClearButtonMouseDown(e))),this.clearElement.addEventListener("click",(e=>this._onClearButtonClick(e))))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){e.preventDefault(),u.T||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};var p=r(9107),v=r(6155),m=r(2604);class g extends m.v{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:r}=this,o=Boolean(r&&t&&""!==t.trim());e&&(e.textContent=o?t:"",e.hidden=!o,o?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}class f extends m.v{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}var b=r(6821),_=r(4524);const A=e=>class extends((0,_.n)((0,b.h)((0,v.k)(e)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new p.o(this),this._helperController=new f(this),this._errorController=new g(this),this._errorController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.__labelChanged(t,r)})),this._helperController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,r)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout((()=>{if(e){const e=this._errorNode;this._fieldAriaController.setErrorId(e&&e.id)}else this._fieldAriaController.setErrorId(null)}))}};var x=r(9091);const y=e=>class extends(d((0,o.B)((0,x.t)(A(c((0,i.L)(e))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=n.dx.debounce(this._preventInputDebouncer,a.Wc.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||1!==e.key.length||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){const t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u")}catch(e){console.error(e)}}}},6326:(e,t,r)=>{r.d(t,{J:()=>o});const o=(0,r(1014).o)((e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}}))},6821:(e,t,r)=>{r.d(t,{h:()=>s});var o=r(1014),i=r(6155),a=r(2604);class n extends a.v{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&""!==e.trim()){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}const s=(0,o.o)((e=>class extends((0,i.k)(e)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new n(this),this._labelController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-label",e.detail.hasContent)}))}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}}))},6729:(e,t,r)=>{r.d(t,{v:()=>o});class o{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",(e=>{this.__initLabel(e.detail.node)})),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}},2743:(e,t,r)=>{r.d(t,{J:()=>a});var o=r(9392);const i=o.iv`
|
1
|
+
/*! For license information please see 1621.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1621],{1370:(e,t,r)=>{r.d(t,{B:()=>n});var o=r(1014),i=r(1360),a=r(8298);const n=(0,o.o)((e=>class extends((0,i.W)((0,a.N)(e))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0)}}))},9107:(e,t,r)=>{r.d(t,{o:()=>d});var o=r(3726);const i=new Map;function a(e){return i.has(e)||i.set(e,new WeakMap),i.get(e)}function n(e,t){e&&e.removeAttribute(t)}function s(e,t){if(!e||!t)return;const r=a(t);if(r.has(e))return;const i=(0,o.hK)(e.getAttribute(t));r.set(e,new Set(i))}function l(e,t,r={newId:null,oldId:null,fromUser:!1}){if(!e||!t)return;const{newId:i,oldId:l,fromUser:d}=r,u=a(t),h=u.get(e);if(!d&&h)return l&&h.delete(l),void(i&&h.add(i));d&&(h?i||u.delete(e):s(e,t),n(e,t)),(0,o.x_)(e,t,l);const c=i||(0,o.dV)(h);c&&(0,o.$2)(e,t,c)}class d{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const r=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,r,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){var t;this.__target&&(e?(s(t=this.__target,"aria-labelledby"),n(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(function(e,t){if(!e)return;const r=a(t),i=r.get(e);i&&0!==i.size?(0,o.$2)(e,t,(0,o.dV)(i)):e.removeAttribute(t),r.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,r){l(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:r})}__setErrorIdToAriaAttribute(e,t){l(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){l(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}},6328:(e,t,r)=>{r.d(t,{A:()=>o});const o=(0,r(1014).o)((e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((e=>{this._delegateAttribute(e,this[e])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((e=>{this._delegateProperty(e,this[e])}))}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach(((t,r)=>{this._delegateAttribute(t,e[r])}))}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach(((t,r)=>{this._delegateProperty(t,e[r])}))}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}))},2604:(e,t,r)=>{r.d(t,{v:()=>i});var o=r(9229);class i extends o.n{constructor(e,t,r,o={}){super(e,t,r,{...o,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((e=>{e.forEach((e=>{const t=e.target,r=t===this.node;"attributes"===e.type?r&&this.__updateNodeId(t):(r||t.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}},4946:(e,t,r)=>{r.d(t,{W:()=>a});var o=r(1014);const i=new WeakMap,a=(0,o.o)((e=>class extends e{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=function(e){return i.has(e)||i.set(e,new Set),i.get(e)}(e);this.slotStyles.forEach((r=>{t.has(r)||(function(e,t){const r=document.createElement("style");r.textContent=e,t===document?document.head.appendChild(r):t.insertBefore(r,t.firstChild)}(r,e),t.add(r))}))}}))},7412:(e,t,r)=>{r.d(t,{f:()=>u});var o=r(9107),i=r(6155),a=r(2604);class n extends a.v{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:r}=this,o=Boolean(r&&t&&""!==t.trim());e&&(e.textContent=o?t:"",e.hidden=!o,o?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}class s extends a.v{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}var l=r(6821),d=r(4524);const u=e=>class extends((0,d.n)((0,l.h)((0,i.k)(e)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new o.o(this),this._helperController=new s(this),this._errorController=new n(this),this._errorController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.__labelChanged(t,r)})),this._helperController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,r)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout((()=>{if(e){const e=this._errorNode;this._fieldAriaController.setErrorId(e&&e.id)}else this._fieldAriaController.setErrorId(null)}))}}},9091:(e,t,r)=>{r.d(t,{t:()=>s});var o=r(1014),i=r(6328),a=r(6326),n=r(4524);const s=(0,o.o)((e=>class extends((0,i.A)((0,n.n)((0,a.J)(e)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((e=>this[e])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some((e=>this.__isValidConstraint(e)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;const r=this._hasValidConstraints(t),o=this.__previousHasConstraints&&!r;(this._hasValue||this.invalid)&&r?this.validate():o&&this._setInvalid(!1),this.__previousHasConstraints=r}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return Boolean(e)||0===e}}))},3406:(e,t,r)=>{r.d(t,{L:()=>p});var o=r(1370),i=r(2628),a=r(7913),n=r(6139),s=r(4946),l=r(1037),d=r(6326);const u=e=>class extends((0,d.J)((0,i.L)(e))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(e=>this._onClearButtonMouseDown(e))),this.clearElement.addEventListener("click",(e=>this._onClearButtonClick(e))))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){e.preventDefault(),l.T||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};var h=r(7412),c=r(9091);const p=e=>class extends((0,s.W)((0,o.B)((0,c.t)((0,h.f)(u((0,i.L)(e))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=n.dx.debounce(this._preventInputDebouncer,a.Wc.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||1!==e.key.length||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){const t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u")}catch(e){console.error(e)}}}},6326:(e,t,r)=>{r.d(t,{J:()=>o});const o=(0,r(1014).o)((e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}}))},6821:(e,t,r)=>{r.d(t,{h:()=>s});var o=r(1014),i=r(6155),a=r(2604);class n extends a.v{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&""!==e.trim()){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}const s=(0,o.o)((e=>class extends((0,i.k)(e)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new n(this),this._labelController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-label",e.detail.hasContent)}))}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}}))},6729:(e,t,r)=>{r.d(t,{v:()=>o});class o{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",(e=>{this.__initLabel(e.detail.node)})),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}},2743:(e,t,r)=>{r.d(t,{J:()=>a});var o=r(9392);const i=o.iv`
|
3
3
|
[part='clear-button'] {
|
4
4
|
display: none;
|
5
5
|
cursor: default;
|
@@ -376,7 +376,7 @@
|
|
376
376
|
font-family: 'lumo-icons';
|
377
377
|
display: block;
|
378
378
|
}
|
379
|
-
`;(0,o.hC)("",i,{moduleId:"lumo-field-button"})},
|
379
|
+
`;(0,o.hC)("",i,{moduleId:"lumo-field-button"})},2982:(e,t,r)=>{r.d(t,{_:()=>o}),r(1195),r(9098),r(9849),r(4173);const o=r(6570).iv`
|
380
380
|
:host {
|
381
381
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
382
382
|
}
|
@@ -432,119 +432,7 @@
|
|
432
432
|
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
433
433
|
order: 3;
|
434
434
|
}
|
435
|
-
|
436
|
-
[part='label'] {
|
437
|
-
align-self: flex-start;
|
438
|
-
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
439
|
-
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
440
|
-
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
441
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
442
|
-
transition: color 0.2s;
|
443
|
-
line-height: 1;
|
444
|
-
padding-right: 1em;
|
445
|
-
padding-bottom: 0.5em;
|
446
|
-
/* As a workaround for diacritics being cut off, add a top padding and a
|
447
|
-
negative margin to compensate */
|
448
|
-
padding-top: 0.25em;
|
449
|
-
margin-top: -0.25em;
|
450
|
-
overflow: hidden;
|
451
|
-
white-space: nowrap;
|
452
|
-
text-overflow: ellipsis;
|
453
|
-
position: relative;
|
454
|
-
max-width: 100%;
|
455
|
-
box-sizing: border-box;
|
456
|
-
}
|
457
|
-
|
458
|
-
:host([focused]:not([readonly])) [part='label'] {
|
459
|
-
color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
|
460
|
-
}
|
461
|
-
|
462
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
463
|
-
color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
|
464
|
-
}
|
465
|
-
|
466
|
-
/* Touch device adjustment */
|
467
|
-
@media (pointer: coarse) {
|
468
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
469
|
-
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
470
|
-
}
|
471
|
-
}
|
472
|
-
|
473
|
-
:host([has-label])::before {
|
474
|
-
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
475
|
-
}
|
476
|
-
|
477
|
-
:host([has-label][theme~='small'])::before {
|
478
|
-
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
479
|
-
}
|
480
|
-
|
481
|
-
:host([has-label]) {
|
482
|
-
padding-top: var(--lumo-space-m);
|
483
|
-
}
|
484
|
-
|
485
|
-
:host([has-label]) ::slotted([slot='tooltip']) {
|
486
|
-
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
487
|
-
}
|
488
|
-
|
489
|
-
:host([required]) [part='required-indicator']::after {
|
490
|
-
content: var(--lumo-required-field-indicator, '\\2022');
|
491
|
-
transition: opacity 0.2s;
|
492
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
493
|
-
position: absolute;
|
494
|
-
right: 0;
|
495
|
-
width: 1em;
|
496
|
-
text-align: center;
|
497
|
-
}
|
498
|
-
|
499
|
-
:host([invalid]) [part='required-indicator']::after {
|
500
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
501
|
-
}
|
502
|
-
|
503
|
-
[part='error-message'] {
|
504
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
505
|
-
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
|
506
|
-
line-height: var(--lumo-line-height-xs);
|
507
|
-
font-weight: var(--vaadin-input-field-error-font-weight, 400);
|
508
|
-
color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
|
509
|
-
will-change: max-height;
|
510
|
-
transition: 0.4s max-height;
|
511
|
-
max-height: 5em;
|
512
|
-
}
|
513
|
-
|
514
|
-
:host([has-error-message]) [part='error-message']::before,
|
515
|
-
:host([has-error-message]) [part='error-message']::after {
|
516
|
-
content: '';
|
517
|
-
display: block;
|
518
|
-
height: 0.4em;
|
519
|
-
}
|
520
|
-
|
521
|
-
:host(:not([invalid])) [part='error-message'] {
|
522
|
-
max-height: 0;
|
523
|
-
overflow: hidden;
|
524
|
-
}
|
525
|
-
|
526
|
-
/* RTL specific styles */
|
527
|
-
|
528
|
-
:host([dir='rtl']) [part='label'] {
|
529
|
-
margin-left: 0;
|
530
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
531
|
-
}
|
532
|
-
|
533
|
-
:host([dir='rtl']) [part='label'] {
|
534
|
-
padding-left: 1em;
|
535
|
-
padding-right: 0;
|
536
|
-
}
|
537
|
-
|
538
|
-
:host([dir='rtl']) [part='required-indicator']::after {
|
539
|
-
right: auto;
|
540
|
-
left: 0;
|
541
|
-
}
|
542
|
-
|
543
|
-
:host([dir='rtl']) [part='error-message'] {
|
544
|
-
margin-left: 0;
|
545
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
546
|
-
}
|
547
|
-
`;(0,o.hC)("",n,{moduleId:"lumo-required-field"});const s=o.iv`
|
435
|
+
`},7205:(e,t,r)=>{r.d(t,{J:()=>l}),r(1195),r(1735),r(9098),r(9416),r(9849),r(4173);var o=r(6570),i=r(4398),a=r(2982),n=r(1251);const s=o.iv`
|
548
436
|
:host {
|
549
437
|
--lumo-text-field-size: var(--lumo-size-m);
|
550
438
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
@@ -670,4 +558,116 @@
|
|
670
558
|
[part='clear-button']::before {
|
671
559
|
content: var(--lumo-icons-cross);
|
672
560
|
}
|
673
|
-
`,l=[n,i.q,a,s];(0,o.hC)("",l,{moduleId:"lumo-input-field-shared-styles"})}}
|
561
|
+
`,l=[n.l,i.q,a._,s];(0,o.hC)("",l,{moduleId:"lumo-input-field-shared-styles"})},1251:(e,t,r)=>{r.d(t,{l:()=>i}),r(1195),r(9416),r(9849),r(4173);var o=r(6570);const i=o.iv`
|
562
|
+
[part='label'] {
|
563
|
+
align-self: flex-start;
|
564
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
565
|
+
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
566
|
+
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
567
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
568
|
+
transition: color 0.2s;
|
569
|
+
line-height: 1;
|
570
|
+
padding-right: 1em;
|
571
|
+
padding-bottom: 0.5em;
|
572
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
573
|
+
negative margin to compensate */
|
574
|
+
padding-top: 0.25em;
|
575
|
+
margin-top: -0.25em;
|
576
|
+
overflow: hidden;
|
577
|
+
white-space: nowrap;
|
578
|
+
text-overflow: ellipsis;
|
579
|
+
position: relative;
|
580
|
+
max-width: 100%;
|
581
|
+
box-sizing: border-box;
|
582
|
+
}
|
583
|
+
|
584
|
+
:host([focused]:not([readonly])) [part='label'] {
|
585
|
+
color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
|
586
|
+
}
|
587
|
+
|
588
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
589
|
+
color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
|
590
|
+
}
|
591
|
+
|
592
|
+
/* Touch device adjustment */
|
593
|
+
@media (pointer: coarse) {
|
594
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
595
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
596
|
+
}
|
597
|
+
}
|
598
|
+
|
599
|
+
:host([has-label])::before {
|
600
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
601
|
+
}
|
602
|
+
|
603
|
+
:host([has-label][theme~='small'])::before {
|
604
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
605
|
+
}
|
606
|
+
|
607
|
+
:host([has-label]) {
|
608
|
+
padding-top: var(--lumo-space-m);
|
609
|
+
}
|
610
|
+
|
611
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
612
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
613
|
+
}
|
614
|
+
|
615
|
+
:host([required]) [part='required-indicator']::after {
|
616
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
617
|
+
transition: opacity 0.2s;
|
618
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
619
|
+
position: absolute;
|
620
|
+
right: 0;
|
621
|
+
width: 1em;
|
622
|
+
text-align: center;
|
623
|
+
}
|
624
|
+
|
625
|
+
:host([invalid]) [part='required-indicator']::after {
|
626
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
627
|
+
}
|
628
|
+
|
629
|
+
[part='error-message'] {
|
630
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
631
|
+
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
|
632
|
+
line-height: var(--lumo-line-height-xs);
|
633
|
+
font-weight: var(--vaadin-input-field-error-font-weight, 400);
|
634
|
+
color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
|
635
|
+
will-change: max-height;
|
636
|
+
transition: 0.4s max-height;
|
637
|
+
max-height: 5em;
|
638
|
+
}
|
639
|
+
|
640
|
+
:host([has-error-message]) [part='error-message']::before,
|
641
|
+
:host([has-error-message]) [part='error-message']::after {
|
642
|
+
content: '';
|
643
|
+
display: block;
|
644
|
+
height: 0.4em;
|
645
|
+
}
|
646
|
+
|
647
|
+
:host(:not([invalid])) [part='error-message'] {
|
648
|
+
max-height: 0;
|
649
|
+
overflow: hidden;
|
650
|
+
}
|
651
|
+
|
652
|
+
/* RTL specific styles */
|
653
|
+
|
654
|
+
:host([dir='rtl']) [part='label'] {
|
655
|
+
margin-left: 0;
|
656
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
657
|
+
}
|
658
|
+
|
659
|
+
:host([dir='rtl']) [part='label'] {
|
660
|
+
padding-left: 1em;
|
661
|
+
padding-right: 0;
|
662
|
+
}
|
663
|
+
|
664
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
665
|
+
right: auto;
|
666
|
+
left: 0;
|
667
|
+
}
|
668
|
+
|
669
|
+
:host([dir='rtl']) [part='error-message'] {
|
670
|
+
margin-left: 0;
|
671
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
672
|
+
}
|
673
|
+
`;(0,o.hC)("",i,{moduleId:"lumo-required-field"})}}]);
|
package/dist/umd/2066.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 2066.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2066],{3726:(e,t,n)=>{function o(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function s(e,t){return t?t.closest(e)||
|
2
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2066],{3726:(e,t,n)=>{function o(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function s(e){const t=[];let n;return"slot"===e.localName?n=e.assignedElements():(t.push(e),n=[...e.children]),n.forEach((e=>t.push(...s(e)))),t}function u(e,t){return t?t.closest(e)||u(e,t.getRootNode().host):null}function r(e){return e?new Set(e.split(" ")):new Set}function i(e){return e?[...e].join(" "):""}function c(e,t,n){const o=r(e.getAttribute(t));o.add(n),e.setAttribute(t,i(o))}function d(e,t,n){const o=r(e.getAttribute(t));o.delete(n),0!==o.size?e.setAttribute(t,i(o)):e.removeAttribute(t)}function l(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}n.d(t,{$2:()=>c,AD:()=>o,Q4:()=>u,dV:()=>i,eC:()=>l,hK:()=>r,xX:()=>s,x_:()=>d})}}]);
|