@descope/web-components-ui 1.0.347 → 1.0.348

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5158],{20409:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>d});var n=r(84569),o=r(94978),s=r(2061),i=r(54567);const l=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"];var h=r(33346);const a=(0,i.iY)("enriched-text");class c extends((0,h.s)({componentName:a,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n text-decoration: none;\n cursor: pointer;\n }\n a:hover {\n text-decoration: underline;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <slot part="text-wrapper" style="display:none"></slot>\n <div class="content"></div>\n ',this.textSlot=this.shadowRoot.querySelector("slot"),this.#r(),(0,i.P$)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(l)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.Z("commonmark",{html:!0}),this.#l(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(this.innerHTML);try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const d=(0,s.qC)((0,o.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},minHeight:{},minWidth:{}}}),(0,o.yk)({componentNameOverride:(0,i.iY)("link")}),o.e4,o.Ae)(c);customElements.define(a,d)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5158],{20409:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>d});var n=r(84569),o=r(94978),s=r(2061),i=r(54567);const l=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"];var a=r(33346);const c=(0,i.iY)("enriched-text");class h extends((0,a.s)({componentName:c,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <slot part="text-wrapper" style="display:none"></slot>\n <div class="content"></div>\n ',this.textSlot=this.shadowRoot.querySelector("slot"),this.#r(),(0,i.P$)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(l)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.Z("commonmark",{html:!0}),this.#l(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(this.innerHTML);try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const d=(0,s.qC)((0,o.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,o.yk)({componentNameOverride:(0,i.iY)("link")}),o.e4,o.Ae)(h);customElements.define(c,d)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[58,2528],{65846:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>u});var n=o(94978),s=o(33346),r=o(32138),i=o(2061),h=o(54567);const l=(0,h.iY)("link");class p extends((0,s.s)({componentName:l,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t:host a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,h.oP)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,h.oP)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>r.k.componentName}},{anchor:a,text:d,host:y,wrapper:m}=c,u=(0,i.qC)((0,n.yk)({mappings:{hostWidth:{...y,property:"width"},hostDirection:{...d,property:"direction"},textAlign:m,textColor:[{...a,property:"color"},{...d,property:r.k.cssVarList.textColor}],cursor:a}}),n.e4,n.Ae)(p);o(31876),customElements.define(l,u)},32138:(t,e,o)=>{o.d(e,{f:()=>h,k:()=>p});var n=o(94978),s=o(2061),r=o(54567),i=o(33346);const h=(0,r.iY)("text");class l extends((0,i.s)({componentName:h,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,r.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const p=(0,s.qC)((0,n.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.e4,n.Ae)(l)},31876:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>n.k});var n=o(32138);customElements.define(n.f,n.k)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[58,2528],{65846:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>x});var n=o(94978),s=o(33346),r=o(32138),i=o(2061),l=o(54567);const h=(0,l.iY)("link");class p extends((0,s.s)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,l.oP)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,l.oP)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>r.k.componentName}},{anchor:a,text:d,host:y,wrapper:m,link:u}=c,x=(0,i.qC)((0,n.yk)({mappings:{hostWidth:{...y,property:"width"},hostDirection:{...d,property:"direction"},textAlign:m,textDecoration:{...u,property:"text-decoration",fallback:"none"},textColor:[{...a,property:"color"},{...d,property:r.k.cssVarList.textColor}],cursor:a}}),n.e4,n.Ae)(p);o(31876),customElements.define(h,x)},32138:(t,e,o)=>{o.d(e,{f:()=>l,k:()=>p});var n=o(94978),s=o(2061),r=o(54567),i=o(33346);const l=(0,r.iY)("text");class h extends((0,i.s)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n '}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,r.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const p=(0,s.qC)((0,n.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.e4,n.Ae)(h)},31876:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>n.k});var n=o(32138);customElements.define(n.f,n.k)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9034],{92031:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>u});var o=r(2061),i=r(54567),n=r(54201),a=r(94978),l=r(4447);const p=(0,i.iY)("radio-button"),s=(0,o.qC)((0,a.yk)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"}}}),(0,a.dj)({proxyProps:["setSelectionRange"]}),a.Ae,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.P$)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,a.DM)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.iY)("radio-group"),u=(0,o.qC)((0,a.yk)({mappings:{...l.Z,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),a.e4,(0,a.dj)({proxyProps:["setSelectionRange"]}),a.Ae,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.oP)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.P$)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.FX)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.Wf)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(37284),customElements.define(d,u),customElements.define(p,s)},4447:(e,t,r)=>{r.d(t,{Z:()=>b});const{host:o,label:i,placeholder:n,requiredIndicator:a,inputField:l,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,inputIcon:h}={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)"},inputIcon:{selector:"vaadin-icon"}},b={fontSize:[{},o],fontFamily:[i,l,s,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputBackgroundColor:{...l,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...n,property:"color"},{...u,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"}],inputVerticalAlignment:[{...l,property:"align-items"}],valueInputHeight:[{...p,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"}],inputIconOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputIconSize:{...h,property:"font-size"},inputIconColor:{...h,property:"color"}}},54201:(e,t,r)=>{r.d(t,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>a,TX:()=>i,Wf:()=>c,bi:()=>o,bz:()=>h,jI:()=>l,jl:()=>n,wm:()=>u});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=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`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,u=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(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 ${d(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`,c=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`,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 width: auto;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9034],{92031:(e,t,r)=>{r.r(t),r.d(t,{RadioGroupClass:()=>u});var o=r(2061),i=r(54567),n=r(54201),a=r(94978),l=r(4447);const p=(0,i.iY)("radio-button"),s=(0,o.qC)((0,a.yk)({mappings:{cursor:[{},{selector:"label"}],fontSize:[{selector:"label"},{}],labelTextColor:{selector:"label",property:"color"},fontFamily:{selector:"label"},radioSize:[{selector:"::part(radio)",property:"height"},{selector:"::part(radio)",property:"width"}],radioBackgroundColor:{selector:"::part(radio)",property:"background-color"},radioMargin:{selector:"::part(radio)",property:"margin"},radioCheckedSize:{selector:"::part(radio)::after",property:"border-width"},radioCheckedColor:{selector:"::part(radio)::after",property:"border-color"},radioBorderColor:{selector:"::part(radio)",property:"border-color",fallback:"none"},radioBorderWidth:{selector:"::part(radio)",property:"border-width",fallback:0},radioBorderStyle:{selector:"::part(radio)",property:"border-style",fallback:"solid"}}}),(0,a.dj)({proxyProps:["setSelectionRange"]}),a.Ae,(e=>class extends e{constructor(){super(),this.baseElement.checkValidity=()=>{}}init(){this.baseElement.addEventListener("checked-changed",(e=>{this.dispatchEvent(new CustomEvent("checked-changed",{detail:e.detail},{bubbles:!0,composed:!0}))})),super.init?.(),(0,i.P$)(this,this.renderLabel.bind(this))}renderLabel(){this.baseElement.setAttribute("label",this.textContent)}get value(){return this.getAttribute("value")}}))((0,a.DM)({slots:[""],wrappedEleName:"vaadin-radio-button",excludeAttrsSync:["tabindex","data"],includeForwardProps:["checked","name","disabled"],componentName:p})),d=(0,i.iY)("radio-group"),u=(0,o.qC)((0,a.yk)({mappings:{...l.Z,buttonsSpacing:{selector:"::part(group-field)",property:"justify-content"},buttonsRowGap:{selector:"::part(group-field)",property:"row-gap"},buttonsColumnGap:{selector:"::part(group-field)",property:"column-gap"},itemsLabelColor:{selector:()=>`::slotted(${s.componentName})`,property:s.cssVarList.labelTextColor}}}),a.e4,(0,a.dj)({proxyProps:["setSelectionRange"]}),a.Ae,(e=>class extends e{#e=({value:e,label:t})=>`<descope-radio-button value="${e}">${t}</descope-radio-button>`;#t;constructor(){super(),Object.defineProperty(this.baseElement,"children",{get:()=>this.querySelectorAll(p)}),this.baseElement.__filterRadioButtons=e=>e.filter((e=>e.localName===p)),this.baseElement.setCustomValidity=()=>{}}get items(){return this.shadowRoot.querySelector("slot").assignedElements()}get size(){return this.getAttribute("size")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" - ',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get defaultValue(){return this.getAttribute("default-value")}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.#e?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}init(){super.init?.(),this.inputElement=this.baseElement,this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),Object.defineProperty(this.baseElement,"validity",{get:()=>({valueMissing:!this.baseElement.checkValidity()})}),(0,i.oP)(this,this.baseElement,{includeAttrs:["layout"],mapAttrs:{layout:"theme"}}),setTimeout((()=>{this.defaultValue&&(this.value=this.defaultValue)})),(0,i.P$)(this,(({addedNodes:e})=>{e.forEach((e=>{e.setAttribute("size",this.size)}))})),(0,i.FX)(this,(()=>{this.items.forEach((e=>{e.setAttribute("size",this.size)}))}),{includeAttrs:["size"]})}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-radio-group",style:()=>`\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${(0,n.Wf)("vaadin-radio-group")}\n `,excludeAttrsSync:["tabindex","size","data","direction"],componentName:d,includeForwardProps:["value"]}));r(37284),customElements.define(d,u),customElements.define(p,s)},4447:(e,t,r)=>{r.d(t,{Z:()=>b});const{host:o,label:i,placeholder:n,requiredIndicator:a,inputField:l,input:p,helperText:s,errorMessage:d,disabledPlaceholder:u,inputDisabled:c,inputIcon:h}={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)"},inputIcon:{selector:"vaadin-icon"}},b={fontSize:[{},o],fontFamily:[i,l,s,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputBackgroundColor:{...l,property:"background-color"},errorMessageTextColor:{...d,property:"color"},helperTextColor:{...s,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},inputTextAlign:[{...p,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...n,property:"color"},{...u,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"}],inputVerticalAlignment:[{...l,property:"align-items"}],valueInputHeight:[{...p,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"}],inputIconOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputIconSize:{...h,property:"font-size"},inputIconColor:{...h,property:"color"}}},54201:(e,t,r)=>{r.d(t,{B:()=>d,DY:()=>p,PH:()=>s,Pd:()=>a,TX:()=>i,Wf:()=>c,bi:()=>o,bz:()=>h,jI:()=>l,jl:()=>n,wm:()=>u});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=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`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,u=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(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 ${d(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`,c=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`,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 width: auto;\n }\n '}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.347",
3
+ "version": "1.0.348",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -42,12 +42,8 @@ class EnrichedText extends createBaseClass({ componentName, baseSelector: ':host
42
42
  margin-bottom: 1em;
43
43
  }
44
44
  a {
45
- text-decoration: none;
46
45
  cursor: pointer;
47
46
  }
48
- a:hover {
49
- text-decoration: underline;
50
- }
51
47
  blockquote {
52
48
  padding: 0 2em;
53
49
  }
@@ -192,6 +188,8 @@ export const EnrichedTextClass = compose(
192
188
  textLineHeight: { property: 'line-height' },
193
189
  textAlign: {},
194
190
  linkColor: { selector: 'a', property: 'color' },
191
+ linkTextDecoration: { selector: 'a', property: 'text-decoration' },
192
+ linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },
195
193
  minHeight: {},
196
194
  minWidth: {},
197
195
  },
@@ -18,10 +18,6 @@ class RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }
18
18
  }
19
19
  :host a {
20
20
  display: inline;
21
- text-decoration: none;
22
- }
23
- :host a:hover {
24
- text-decoration: underline;
25
21
  }
26
22
  </style>
27
23
  <div>
@@ -48,12 +44,13 @@ class RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }
48
44
 
49
45
  const selectors = {
50
46
  host: { selector: () => ':host' },
47
+ link: { selector: () => ':host a' },
51
48
  anchor: {},
52
49
  wrapper: { selector: () => ':host > div' },
53
50
  text: { selector: () => TextClass.componentName },
54
51
  };
55
52
 
56
- const { anchor, text, host, wrapper } = selectors;
53
+ const { anchor, text, host, wrapper, link } = selectors;
57
54
 
58
55
  export const LinkClass = compose(
59
56
  createStyleMixin({
@@ -61,6 +58,7 @@ export const LinkClass = compose(
61
58
  hostWidth: { ...host, property: 'width' },
62
59
  hostDirection: { ...text, property: 'direction' },
63
60
  textAlign: wrapper,
61
+ textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },
64
62
  textColor: [
65
63
  { ...anchor, property: 'color' },
66
64
  { ...text, property: TextClass.cssVarList.textColor },
@@ -58,6 +58,9 @@ export const RadioButtonClass = compose(
58
58
  radioMargin: { selector: '::part(radio)', property: 'margin' },
59
59
  radioCheckedSize: { selector: '::part(radio)::after', property: 'border-width' },
60
60
  radioCheckedColor: { selector: '::part(radio)::after', property: 'border-color' },
61
+ radioBorderColor: { selector: '::part(radio)', property: 'border-color', fallback: 'none' },
62
+ radioBorderWidth: { selector: '::part(radio)', property: 'border-width', fallback: 0 },
63
+ radioBorderStyle: { selector: '::part(radio)', property: 'border-style', fallback: 'solid' },
61
64
  },
62
65
  }),
63
66
  proxyInputMixin({ proxyProps: ['setSelectionRange'] }),
@@ -20,7 +20,7 @@ export const createProxy = ({
20
20
 
21
21
  constructor() {
22
22
  super().attachShadow({ mode: 'open', delegatesFocus }).innerHTML = `
23
- <style id="create-proxy">${isFunction(style) ? style() : style}</style>
23
+ <style id="create-proxy">${(isFunction(style) ? style() : style) || ''}</style>
24
24
  <${wrappedEleName}>
25
25
  ${slots
26
26
  .map(
@@ -19,6 +19,8 @@ const EnrichedText = {
19
19
  [vars.textColor]: globalRefs.colors.surface.dark,
20
20
 
21
21
  [vars.linkColor]: `var(${LinkClass.cssVarList.textColor})`,
22
+ [vars.linkTextDecoration]: 'none',
23
+ [vars.linkHoverTextDecoration]: 'underline',
22
24
 
23
25
  [vars.minWidth]: '0.25em',
24
26
  [vars.minHeight]: '1.35em',
@@ -21,6 +21,10 @@ const link = {
21
21
  [vars.hostWidth]: '100%',
22
22
  },
23
23
 
24
+ _hover: {
25
+ [vars.textDecoration]: 'underline',
26
+ },
27
+
24
28
  mode: {
25
29
  secondary: {
26
30
  [vars.textColor]: globalRefs.colors.secondary.main,
@@ -13,6 +13,8 @@ export const radioButton = {
13
13
  [vars.radioCheckedSize]: `calc(var(${vars.radioSize})/5)`,
14
14
  [vars.radioCheckedColor]: globalRefs.colors.surface.light,
15
15
  [vars.radioBackgroundColor]: globalRefs.colors.surface.light,
16
+ [vars.radioBorderColor]: 'none',
17
+ [vars.radioBorderWidth]: 0,
16
18
 
17
19
  _checked: {
18
20
  [vars.radioBackgroundColor]: globalRefs.colors.surface.contrast,