@descope/web-components-ui 1.0.332 → 1.0.334

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-email-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9760],{77840:(t,e,n)=>{n.r(e),n.d(e,{EmailFieldClass:()=>b}),n(58725);var r=n(83208),i=n(46570);const l=i.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9760],{77840:(t,e,n)=>{n.r(e),n.d(e,{EmailFieldClass:()=>b}),n(58725);var r=n(83208),i=n(46570);const o=i.iv`
3
3
  :host([dir='rtl']) [part='input-field'] ::slotted(input) {
4
4
  --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
5
5
  }
@@ -7,7 +7,7 @@
7
7
  :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
8
8
  --_lumo-text-field-overflow-mask-image: none;
9
9
  }
10
- `;(0,i.hC)("vaadin-email-field",[r.J,l],{moduleId:"lumo-email-field"});var o=n(52807),a=n(18005);const s=n(9392).iv`
10
+ `;(0,i.hC)("vaadin-email-field",[r.J,o],{moduleId:"lumo-email-field"});var l=n(52807),a=n(18005);const s=n(9392).iv`
11
11
  :host([dir='rtl']) [part='input-field'] {
12
12
  direction: ltr;
13
13
  }
@@ -16,7 +16,7 @@
16
16
  direction: rtl;
17
17
  text-align: left;
18
18
  }
19
- `;(0,i.hC)("vaadin-email-field",s,{moduleId:"vaadin-email-field-styles"});class p extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,o.M)(p);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),f=n(54201),g=n(85423);const y=(0,h.iY)("email-field"),b=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.externalInput=this.handleExternalInput(),this.addEventListener("focus",(()=>{this.externalInput.focus()}))}forwardInputValue(t,e){const n=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...n,set(t){n.set.call(this,t),e.value=t},configurable:!0})}handleExternalInput(){this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input");t.setAttribute("tabindex","-1");const e=(0,g.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,g.X$)("external-input","text",this.getAutocompleteType());return setTimeout((()=>{(0,g.Gc)(t,n,this.getAttribute("label-type"))})),this.handleExternalInputEvents(n),this.forwardInputValue(t,n),(0,h.tg)(t,n,{includeAttrs:["disabled","readonly","pattern"]}),this.appendChild(n),n}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")})),t.addEventListener("blur",(()=>{this.removeAttribute("focused")}))}}))((0,d.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${b.cssVarList.inputOutlineWidth}) + var(${b.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,f.Wf)("vaadin-email-field")}\n\t\t\t${(0,f.bi)(b.cssVarList)}\n\t\t\t${(0,f.wm)("vaadin-email-field",b.cssVarList)}\n ${(0,f.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n vaadin-email-field > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:y}));customElements.define(y,b)},4447:(t,e,n)=>{n.d(e,{Z:()=>b});const{host:r,label:i,placeholder:l,requiredIndicator:o,inputField:a,input:s,helperText:p,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:f,externalPlaceholder:g,externalDisabledPlaceholder:y}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},b={fontSize:[{},r],fontFamily:[i,a,p,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...o,property:"color"},{...i,property:"-webkit-text-fill-color"},{...o,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...p,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...s,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...o,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...s,property:"padding-left"},{...s,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...s,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...l,property:"color"},{...g,property:"color"},{...u,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...g,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...s,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...s,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,n)=>{n.d(e,{Gc:()=>l,X$:()=>i,nC:()=>r});const r=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},i=(t,e,n)=>{const r=document.createElement("input");return r.setAttribute("slot",t),r.setAttribute("type",e),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",n),r},l=(t,e,n)=>{const r=getComputedStyle(t),i=r.getPropertyValue("height"),l=r.getPropertyValue("padding-left"),o=r.getPropertyValue("padding-right"),a=r.getPropertyValue("font-size"),s=r.getPropertyValue("font-family"),p=r.getPropertyValue("letter-spacing"),d=r.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,r);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",i],["left",l],["right",o],["font-size",a],["font-family",s],["letter-spacing",p],["width",`calc(100% - ${l} - ${o}`],["caret-color",d],["color",u]].forEach((([t,n])=>e.style.setProperty(t,n,"important"))),"floating"===n){const t=r.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>s,PH:()=>p,Pd:()=>o,TX:()=>i,Wf:()=>c,bi:()=>r,bz:()=>h,jI:()=>a,jl:()=>l,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,l=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,o=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(78591);class i extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>i});var r=n(73406);const i=t=>class extends((0,r.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var r=n(74241),i=n(52807),l=n(12521),o=n(34463),a=n(62743),s=n(46570),p=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,s.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,s.Tb)((0,l.S)(r.H3)))){static get is(){return"vaadin-text-field"}static get template(){return r.dy`
19
+ `;(0,i.hC)("vaadin-email-field",s,{moduleId:"vaadin-email-field-styles"});class p extends a.n{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.M)(p);var d=n(94978),u=n(4447),c=n(2061),h=n(54567),g=n(54201),y=n(85423);const f=(0,h.iY)("email-field"),b=(0,c.qC)((0,d.yk)({mappings:u.Z}),d.e4,(0,d.dj)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.Ae,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.isNoExternalInput?this.setAttribute("autocomplete",this.getAutocompleteType()):(this.externalInput=this.handleExternalInput(),this.addEventListener("focus",(()=>{this.externalInput.focus()})))}get isNoExternalInput(){return"true"===this.getAttribute("no-external-input")}forwardInputValue(t,e){const n=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...n,set(t){n.set.call(this,t),e.value=t},configurable:!0})}handleExternalInput(){this.setAttribute("external-input","true");const t=this.baseElement.querySelector("input");t.setAttribute("tabindex","-1");const e=(0,y.nC)("external-input","suffix");this.baseElement.appendChild(e);const n=(0,y.X$)("external-input","text",this.getAutocompleteType());return setTimeout((()=>{(0,y.Gc)(t,n,this.getAttribute("label-type"))})),this.handleExternalInputEvents(n),this.forwardInputValue(t,n),(0,h.tg)(t,n,{includeAttrs:["disabled","readonly","pattern"]}),this.appendChild(n),n}getAutocompleteType(){return this.getAttribute("autocomplete")||"username"}handleExternalInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("focus",(()=>{this.setAttribute("focused","true")})),t.addEventListener("blur",(()=>{this.removeAttribute("focused")}))}}))((0,d.DM)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${b.cssVarList.inputOutlineWidth}) + var(${b.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,g.Wf)("vaadin-email-field")}\n\t\t\t${(0,g.bi)(b.cssVarList)}\n\t\t\t${(0,g.wm)("vaadin-email-field",b.cssVarList)}\n ${(0,g.bz)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n } \n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n vaadin-email-field:not([no-external-input="true"]) > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:f}));customElements.define(f,b)},4447:(t,e,n)=>{n.d(e,{Z:()=>b});const{host:r,label:i,placeholder:o,requiredIndicator:l,inputField:a,input:s,helperText:p,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,externalInput:h,externalInputDisabled:g,externalPlaceholder:y,externalDisabledPlaceholder:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},b={fontSize:[{},r],fontFamily:[i,a,p,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...a,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...p,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...c,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...s,property:"color"},{...h,property:"color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...s,property:"padding-left"},{...s,property:"padding-right"},{...h,property:"padding-left"},{...h,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},inputTextAlign:[{...s,property:"text-align"},{...h,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...o,property:"color"},{...y,property:"color"},{...u,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...y,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...h,property:"align-items"}],valueInputHeight:[{...s,property:"height"},{...h,property:"height"}],valueInputMarginBottom:[{...s,property:"margin-bottom"},{...h,property:"margin-bottom"}]}},85423:(t,e,n)=>{n.d(e,{Gc:()=>o,X$:()=>i,nC:()=>r});const r=(t,e)=>{const n=document.createElement("slot");return n.setAttribute("name",t),n.setAttribute("slot",e),n},i=(t,e,n)=>{const r=document.createElement("input");return r.setAttribute("slot",t),r.setAttribute("type",e),r.setAttribute("data-hidden-input","true"),r.setAttribute("autocomplete",n),r},o=(t,e,n)=>{const r=getComputedStyle(t),i=r.getPropertyValue("height"),o=r.getPropertyValue("padding-left"),l=r.getPropertyValue("padding-right"),a=r.getPropertyValue("font-size"),s=r.getPropertyValue("font-family"),p=r.getPropertyValue("letter-spacing"),d=r.getPropertyValue("caret-color"),u=((t,e)=>{t.value="_";const n=e.getPropertyValue("color");return t.value="",n})(t,r);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",i],["left",o],["right",l],["font-size",a],["font-family",s],["letter-spacing",p],["width",`calc(100% - ${o} - ${l}`],["caret-color",d],["color",u]].forEach((([t,n])=>e.style.setProperty(t,n,"important"))),"floating"===n){const t=r.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}}},54201:(t,e,n)=>{n.d(e,{B:()=>d,DY:()=>s,PH:()=>p,Pd:()=>l,TX:()=>i,Wf:()=>c,bi:()=>r,bz:()=>h,jI:()=>a,jl:()=>o,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${l(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '},73208:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(78591);class i extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,n)=>{n.d(e,{j:()=>i});var r=n(73406);const i=t=>class extends((0,r.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},18005:(t,e,n)=>{n.d(e,{n:()=>h}),n(13553);var r=n(74241),i=n(52807),o=n(12521),l=n(34463),a=n(62743),s=n(46570),p=n(73208),d=n(20422),u=n(46729);const c=t=>class extends((0,d.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,s.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,s.Tb)((0,o.S)(r.H3)))){static get is(){return"vaadin-text-field"}static get template(){return r.dy`
20
20
  <style>
21
21
  [part='input-field'] {
22
22
  flex-grow: 0;
@@ -51,4 +51,4 @@
51
51
  </div>
52
52
  </div>
53
53
  <slot name="tooltip"></slot>
54
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new o.f(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.M)(h)},58725:(t,e,n)=>{n(21578);var r=n(83208);(0,n(46570).hC)("vaadin-text-field",r.J,{moduleId:"lumo-text-field-styles"}),n(18005)}}]);
54
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new l.f(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.M)(h)},58725:(t,e,n)=>{n(21578);var r=n(83208);(0,n(46570).hC)("vaadin-text-field",r.J,{moduleId:"lumo-text-field-styles"}),n(18005)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9461,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(2061),o=n(94978),i=n(33346);const a=(...e)=>(0,r.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(54567),o=n(51250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.Db)(this.inputElement,this,["checked"]),(0,r.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(73878),o=n(54567);const i=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends s{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:a}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},86676:(e,t,n)=>{n.r(t);var r=n(51250);customElements.define(r.f,r.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(54567),o=n(2061),i=n(94978),a=n(40818),s=n(46882),l=n(54201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:g,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,b],fontFamily:[b,g,f],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));n(43092),n(79789),n(86676),customElements.define(d,x)},19278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>a});var r=n(54567),o=n(57044);class i extends o.C{_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(r)}));if(!o)return void this.__setTextContent(e,n.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=r||"",e.innerHTML="",e.append(i)}}const a=(0,r.iY)("grid-custom-column");customElements.define(a,i)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var r=n(54567),o=n(28623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(t))}_defaultRenderer(e,t,n){const r=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?r.selectItem(n.item):r.deselectItem(n.item)},o.setAttribute("checked",n.selected)}}const l=(0,r.iY)("grid-selection-column");customElements.define(l,s)},57044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(30322);class o extends r.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.isArray(r)?r.join(", "):r;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},42356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(54567),o=n(57044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},19950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(94595),n(42356),n(19278),n(52238);var r=n(2061),o=n(54567),i=n(94978);const a=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},s=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:b,selectedRow:m,rowSeparator:g,resizeHandle:f}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,r.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...b,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...m,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,n)=>{const r=e.getAttribute(n);return r&&(t[n]=r),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);a(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:n,attrs:r})=>{const o=`descope-grid-${n}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(r).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(a(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:s}));customElements.define(s,x)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>o,Wf:()=>p,bi:()=>r,bz:()=>u,jI:()=>s,jl:()=>i,wm:()=>h});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,h=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${s(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,p=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9461,769],{73878:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(2061),o=n(94978),i=n(33346);const a=(...e)=>(0,r.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},40818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(54567),o=n(51250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.Db)(this.inputElement,this,["checked"]),(0,r.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},46882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(54201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},51250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(73878),o=n(54567);const i=(0,o.iY)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],s=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends s{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:a}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},86676:(e,t,n)=>{n.r(t);var r=n(51250);customElements.define(r.f,r.Z)},63483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(54567),o=n(2061),i=n(94978),a=n(40818),s=n(46882),l=n(54201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:b,requiredIndicator:m,helperText:g,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,b],fontFamily:[b,g,f],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,a.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${s.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));n(43092),n(79789),n(86676),customElements.define(d,x)},19278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>a});var r=n(54567),o=n(57044);class i extends o.C{_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(r)}));if(!o)return void this.__setTextContent(e,n.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=r||"",e.innerHTML="",e.append(i)}}const a=(0,r.iY)("grid-custom-column");customElements.define(a,i)},52238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(63483);var r=n(54567),o=n(28623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},a=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class s extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=a(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",a(t))}_defaultRenderer(e,t,n){const r=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?r.selectItem(n.item):r.deselectItem(n.item)},o.setAttribute("checked",n.selected)}}const l=(0,r.iY)("grid-selection-column");customElements.define(l,s)},57044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(30322);class o extends r.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.isArray(r)?r.join(", "):r;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},42356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(54567),o=n(57044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},19950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(94595),n(42356),n(19278),n(52238);var r=n(2061),o=n(54567),i=n(94978);const a=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},s=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:b,selectedRow:m,rowSeparator:g,resizeHandle:f}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,r.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...b,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...m,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"},hostDirection:{...l,property:"direction",fallback:"ltr"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,n)=>{const r=e.getAttribute(n);return r&&(t[n]=r),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);a(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:n,attrs:r})=>{const o=`descope-grid-${n}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(r).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(a(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:s}));customElements.define(s,x)},54201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>o,Wf:()=>p,bi:()=>r,bz:()=>u,jI:()=>s,jl:()=>i,wm:()=>h});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,h=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${s(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,p=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n }\n '}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.332",
3
+ "version": "1.0.334",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -29,11 +29,19 @@ const customMixin = (superclass) =>
29
29
 
30
30
  this.baseElement.setAttribute('pattern', '^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$');
31
31
 
32
- this.externalInput = this.handleExternalInput();
32
+ if (!this.isNoExternalInput) {
33
+ this.externalInput = this.handleExternalInput();
34
+
35
+ this.addEventListener('focus', () => {
36
+ this.externalInput.focus();
37
+ });
38
+ } else {
39
+ this.setAttribute('autocomplete', this.getAutocompleteType());
40
+ }
41
+ }
33
42
 
34
- this.addEventListener('focus', () => {
35
- this.externalInput.focus();
36
- });
43
+ get isNoExternalInput() {
44
+ return this.getAttribute('no-external-input') === 'true';
37
45
  }
38
46
 
39
47
  forwardInputValue(source, target) {
@@ -153,7 +161,7 @@ export const EmailFieldClass = compose(
153
161
  opacity: 0;
154
162
  }
155
163
 
156
- vaadin-email-field > input:not(:placeholder-shown) {
164
+ vaadin-email-field:not([no-external-input="true"]) > input:not(:placeholder-shown) {
157
165
  opacity: 0;
158
166
  }
159
167
 
@@ -220,6 +220,7 @@ export const GridClass = compose(
220
220
  { ...rowSeparator, property: 'border-top-color' },
221
221
  ],
222
222
  resizeHandleColor: { ...resizeHandle, property: 'background-color' },
223
+ hostDirection: { ...host, property: 'direction', fallback: 'ltr' },
223
224
  },
224
225
  }),
225
226
  draggableMixin,
@@ -30,6 +30,7 @@ export const grid = {
30
30
 
31
31
  [vars.valueTextColor]: globalRefs.colors.surface.contrast,
32
32
  [vars.selectedBackgroundColor]: globalRefs.colors.surface.highlight,
33
+ [vars.hostDirection]: globalRefs.direction,
33
34
 
34
35
  _bordered: {
35
36
  [vars.borderColor]: refs.borderColor,