@cas-smartdesign/radio-button-group 6.0.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/4_validation.js +1 -1
- package/dist/docs/5_segmented_button.js +1 -1
- package/dist/docs/doc.mjs +31 -102
- package/dist/docs/index.html +1 -0
- package/dist/docs/radio-button-group.mjs +73 -0
- package/dist/radio-button-group.mjs +1 -1
- package/dist/radio-button-group.mjs.map +1 -1
- package/package.json +2 -3
package/dist/docs/index.html
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
function e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function r(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,i){return t(e)||n(e,i)||a(e,i)||r()}function a(t,n){if(t){if(typeof t==`string`)return e(t,n);var r={}.toString.call(t).slice(8,-1);return r===`Object`&&t.constructor&&(r=t.constructor.name),r===`Map`||r===`Set`?Array.from(t):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var o=Object.entries,s=Object.setPrototypeOf,c=Object.isFrozen,l=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,f=Object.seal,ee=Object.create,p=typeof Reflect<`u`&&Reflect,te=p.apply,ne=p.construct;d||=function(e){return e},f||=function(e){return e},te||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ne||=function(e){return new e(...[...arguments].slice(1))};var re=_(Array.prototype.forEach),ie=_(Array.prototype.lastIndexOf),ae=_(Array.prototype.pop),oe=_(Array.prototype.push),se=_(Array.prototype.splice),m=Array.isArray,ce=_(String.prototype.toLowerCase),le=_(String.prototype.toString),ue=_(String.prototype.match),de=_(String.prototype.replace),fe=_(String.prototype.indexOf),pe=_(String.prototype.trim),me=_(Number.prototype.toString),he=_(Boolean.prototype.toString),ge=typeof BigInt>`u`?null:_(BigInt.prototype.toString),_e=typeof Symbol>`u`?null:_(Symbol.prototype.toString),h=_(Object.prototype.hasOwnProperty),ve=_(Object.prototype.toString),g=_(RegExp.prototype.test),ye=be(TypeError);function _(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return te(e,t,n)}}function be(e){return function(){return ne(e,[...arguments])}}function v(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;if(s&&s(e,null),!m(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(c(t)||(t[r]=e),i=e)}e[i]=!0}return e}function y(e){for(let t=0;t<e.length;t++)h(e,t)||(e[t]=null);return e}function b(e){let t=ee(null);for(let r of o(e)){var n=i(r,2);let a=n[0],o=n[1];h(e,a)&&(m(o)?t[a]=y(o):o&&typeof o==`object`&&o.constructor===Object?t[a]=b(o):t[a]=o)}return t}function xe(e){switch(typeof e){case`string`:return e;case`number`:return me(e);case`boolean`:return he(e);case`bigint`:return ge?ge(e):`0`;case`symbol`:return _e?_e(e):`Symbol()`;case`undefined`:return ve(e);case`function`:case`object`:{if(e===null)return ve(e);let t=e,n=x(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:ve(e)}return ve(e)}default:return ve(e)}}function x(e,t){for(;e!==null;){let n=u(e,t);if(n){if(n.get)return _(n.get);if(typeof n.value==`function`)return _(n.value)}e=l(e)}function n(){return null}return n}function Se(e){try{return g(e,``),!0}catch{return!1}}var Ce=d(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),we=d(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Te=d([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ee=d([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),De=d(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Oe=d([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ke=d([`#text`]),Ae=d(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),je=d(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Me=d(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ne=d([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Pe=f(/{{[\w\W]*|^[\w\W]*}}/g),Fe=f(/<%[\w\W]*|^[\w\W]*%>/g),Ie=f(/\${[\w\W]*/g),Le=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),Re=f(/^aria-[\-\w]+$/),ze=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Be=f(/^(?:\w+script|data):/i),Ve=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=f(/^html$/i),Ue=f(/^[a-z][.\w]*(-[.\w]+)+$/i),S={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},We=function(){return typeof window>`u`?null:window},Ge=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ke=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We(),t=e=>qe(e);if(t.version=`3.4.7`,t.removed=[],!e||!e.document||e.document.nodeType!==S.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,f=e.trustedTypes,p=c.prototype,te=x(p,`cloneNode`),ne=x(p,`remove`),me=x(p,`nextSibling`),he=x(p,`childNodes`),ge=x(p,`parentNode`),_e=x(p,`shadowRoot`),ve=x(p,`attributes`),_=s&&s.prototype?x(s.prototype,`nodeType`):null,be=s&&s.prototype?x(s.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,C=``,Je=n,Ye=Je.implementation,Xe=Je.createNodeIterator,Ze=Je.createDocumentFragment,Qe=Je.getElementsByTagName,$e=r.importNode,w=Ke();t.isSupported=typeof o==`function`&&typeof ge==`function`&&Ye&&Ye.createHTMLDocument!==void 0;let et=Pe,tt=Fe,nt=Ie,rt=Le,it=Re,at=Be,ot=Ve,st=Ue,ct=ze,T=null,lt=v({},[...Ce,...we,...Te,...De,...ke]),E=null,ut=v({},[...Ae,...je,...Me,...Ne]),D=Object.seal(ee(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),dt=null,ft=null,O=Object.seal(ee(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),pt=!0,mt=!0,ht=!1,gt=!0,k=!1,A=!0,j=!1,_t=!1,vt=!1,M=!1,N=!1,yt=!1,bt=!0,P=!1,xt=`user-content-`,F=!0,I=!1,St={},L=null,R=v({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ct=null,wt=v({},[`audio`,`video`,`img`,`source`,`image`,`track`]),z=null,Tt=v({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Et=`http://www.w3.org/1998/Math/MathML`,Dt=`http://www.w3.org/2000/svg`,B=`http://www.w3.org/1999/xhtml`,V=B,H=!1,Ot=null,U=v({},[Et,Dt,B],le),kt=v({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),At=v({},[`annotation-xml`]),jt=v({},[`title`,`style`,`font`,`a`,`script`]),W=null,Mt=[`application/xhtml+xml`,`text/html`],G=null,K=null,Nt=n.createElement(`form`),Pt=function(e){return e instanceof RegExp||e instanceof Function},Ft=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(K&&K===e)return;(!e||typeof e!=`object`)&&(e={}),e=b(e),W=Mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,G=W===`application/xhtml+xml`?le:ce,T=h(e,`ALLOWED_TAGS`)&&m(e.ALLOWED_TAGS)?v({},e.ALLOWED_TAGS,G):lt,E=h(e,`ALLOWED_ATTR`)&&m(e.ALLOWED_ATTR)?v({},e.ALLOWED_ATTR,G):ut,Ot=h(e,`ALLOWED_NAMESPACES`)&&m(e.ALLOWED_NAMESPACES)?v({},e.ALLOWED_NAMESPACES,le):U,z=h(e,`ADD_URI_SAFE_ATTR`)&&m(e.ADD_URI_SAFE_ATTR)?v(b(Tt),e.ADD_URI_SAFE_ATTR,G):Tt,Ct=h(e,`ADD_DATA_URI_TAGS`)&&m(e.ADD_DATA_URI_TAGS)?v(b(wt),e.ADD_DATA_URI_TAGS,G):wt,L=h(e,`FORBID_CONTENTS`)&&m(e.FORBID_CONTENTS)?v({},e.FORBID_CONTENTS,G):R,dt=h(e,`FORBID_TAGS`)&&m(e.FORBID_TAGS)?v({},e.FORBID_TAGS,G):b({}),ft=h(e,`FORBID_ATTR`)&&m(e.FORBID_ATTR)?v({},e.FORBID_ATTR,G):b({}),St=h(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?b(e.USE_PROFILES):e.USE_PROFILES:!1,pt=e.ALLOW_ARIA_ATTR!==!1,mt=e.ALLOW_DATA_ATTR!==!1,ht=e.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,A=e.SAFE_FOR_XML!==!1,j=e.WHOLE_DOCUMENT||!1,M=e.RETURN_DOM||!1,N=e.RETURN_DOM_FRAGMENT||!1,yt=e.RETURN_TRUSTED_TYPE||!1,vt=e.FORCE_BODY||!1,bt=e.SANITIZE_DOM!==!1,P=e.SANITIZE_NAMED_PROPS||!1,F=e.KEEP_CONTENT!==!1,I=e.IN_PLACE||!1,ct=Se(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ze,V=typeof e.NAMESPACE==`string`?e.NAMESPACE:B,kt=h(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?b(e.MATHML_TEXT_INTEGRATION_POINTS):v({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),At=h(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?b(e.HTML_INTEGRATION_POINTS):v({},[`annotation-xml`]);let t=h(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?b(e.CUSTOM_ELEMENT_HANDLING):ee(null);if(D=ee(null),h(t,`tagNameCheck`)&&Pt(t.tagNameCheck)&&(D.tagNameCheck=t.tagNameCheck),h(t,`attributeNameCheck`)&&Pt(t.attributeNameCheck)&&(D.attributeNameCheck=t.attributeNameCheck),h(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(D.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),k&&(mt=!1),N&&(M=!0),St&&(T=v({},ke),E=ee(null),St.html===!0&&(v(T,Ce),v(E,Ae)),St.svg===!0&&(v(T,we),v(E,je),v(E,Ne)),St.svgFilters===!0&&(v(T,Te),v(E,je),v(E,Ne)),St.mathMl===!0&&(v(T,De),v(E,Me),v(E,Ne))),O.tagCheck=null,O.attributeCheck=null,h(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?O.tagCheck=e.ADD_TAGS:m(e.ADD_TAGS)&&(T===lt&&(T=b(T)),v(T,e.ADD_TAGS,G))),h(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?O.attributeCheck=e.ADD_ATTR:m(e.ADD_ATTR)&&(E===ut&&(E=b(E)),v(E,e.ADD_ATTR,G))),h(e,`ADD_URI_SAFE_ATTR`)&&m(e.ADD_URI_SAFE_ATTR)&&v(z,e.ADD_URI_SAFE_ATTR,G),h(e,`FORBID_CONTENTS`)&&m(e.FORBID_CONTENTS)&&(L===R&&(L=b(L)),v(L,e.FORBID_CONTENTS,G)),h(e,`ADD_FORBID_CONTENTS`)&&m(e.ADD_FORBID_CONTENTS)&&(L===R&&(L=b(L)),v(L,e.ADD_FORBID_CONTENTS,G)),F&&(T[`#text`]=!0),j&&v(T,[`html`,`head`,`body`]),T.table&&(v(T,[`tbody`]),delete dt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ye(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ye(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);y=e.TRUSTED_TYPES_POLICY,C=y.createHTML(``)}else y===void 0&&(y=Ge(f,i)),y!==null&&typeof C==`string`&&(C=y.createHTML(``));(w.uponSanitizeElement.length>0||w.uponSanitizeAttribute.length>0)&&T===lt&&(T=b(T)),w.uponSanitizeAttribute.length>0&&E===ut&&(E=b(E)),d&&d(e),K=e},It=v({},[...we,...Te,...Ee]),Lt=v({},[...De,...Oe]),Rt=function(e){let t=ge(e);(!t||!t.tagName)&&(t={namespaceURI:V,tagName:`template`});let n=ce(e.tagName),r=ce(t.tagName);return Ot[e.namespaceURI]?e.namespaceURI===Dt?t.namespaceURI===B?n===`svg`:t.namespaceURI===Et?n===`svg`&&(r===`annotation-xml`||kt[r]):!!It[n]:e.namespaceURI===Et?t.namespaceURI===B?n===`math`:t.namespaceURI===Dt?n===`math`&&At[r]:!!Lt[n]:e.namespaceURI===B?t.namespaceURI===Dt&&!At[r]||t.namespaceURI===Et&&!kt[r]?!1:!Lt[n]&&(jt[n]||!It[n]):!!(W===`application/xhtml+xml`&&Ot[e.namespaceURI]):!1},q=function(e){oe(t.removed,{element:e});try{ge(e).removeChild(e)}catch{ne(e)}},J=function(e,n){try{oe(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{oe(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(M||N)try{q(n)}catch{}else try{n.setAttribute(e,``)}catch{}},zt=function(e){let t=null,r=null;if(vt)e=`<remove></remove>`+e;else{let t=ue(e,/^[\r\n\t ]+/);r=t&&t[0]}W===`application/xhtml+xml`&&V===B&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?y.createHTML(e):e;if(V===B)try{t=new u().parseFromString(i,W)}catch{}if(!t||!t.documentElement){t=Ye.createDocument(V,`template`,null);try{t.documentElement.innerHTML=H?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),V===B?Qe.call(t,j?`html`:`body`)[0]:j?t.documentElement:a},Bt=function(e){return Xe.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Vt=function(e){e.normalize();let t=Xe.call(e.ownerDocument||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;re([et,tt,nt],t=>{e=de(e,t,` `)}),n.data=e,n=t.nextNode()}},Y=function(e){let t=be?be(e):null;return typeof t!=`string`||G(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ve(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==_(e)||e.childNodes!==he(e)},Ht=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return _(e)===S.documentFragment}catch{return!1}},Ut=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return typeof _(e)==`number`}catch{return!1}};function X(e,n,r){re(e,e=>{e.call(t,n,r,K)})}let Wt=function(e){let n=null;if(X(w.beforeSanitizeElements,e,null),Y(e))return q(e),!0;let r=G(e.nodeName);if(X(w.uponSanitizeElement,e,{tagName:r,allowedTags:T}),A&&e.hasChildNodes()&&!Ut(e.firstElementChild)&&g(/<[/\w!]/g,e.innerHTML)&&g(/<[/\w!]/g,e.textContent)||A&&e.namespaceURI===B&&r===`style`&&Ut(e.firstElementChild)||e.nodeType===S.progressingInstruction||A&&e.nodeType===S.comment&&g(/<[/\w]/g,e.data))return q(e),!0;if(dt[r]||!(O.tagCheck instanceof Function&&O.tagCheck(r))&&!T[r]){if(!dt[r]&&qt(r)&&(D.tagNameCheck instanceof RegExp&&g(D.tagNameCheck,r)||D.tagNameCheck instanceof Function&&D.tagNameCheck(r)))return!1;if(F&&!L[r]){let t=ge(e),n=he(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=te(n[i],!0);t.insertBefore(r,me(e))}}}return q(e),!0}return(_?_(e):e.nodeType)===S.element&&!Rt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&g(/<\/no(script|embed|frames)/i,e.innerHTML)?(q(e),!0):(k&&e.nodeType===S.text&&(n=e.textContent,re([et,tt,nt],e=>{n=de(n,e,` `)}),e.textContent!==n&&(oe(t.removed,{element:e.cloneNode()}),e.textContent=n)),X(w.afterSanitizeElements,e,null),!1)},Gt=function(e,t,r){if(ft[t]||bt&&(t===`id`||t===`name`)&&(r in n||r in Nt))return!1;let i=E[t]||O.attributeCheck instanceof Function&&O.attributeCheck(t,e);if(!(mt&&!ft[t]&&g(rt,t))&&!(pt&&g(it,t))){if(!i||ft[t]){if(!(qt(e)&&(D.tagNameCheck instanceof RegExp&&g(D.tagNameCheck,e)||D.tagNameCheck instanceof Function&&D.tagNameCheck(e))&&(D.attributeNameCheck instanceof RegExp&&g(D.attributeNameCheck,t)||D.attributeNameCheck instanceof Function&&D.attributeNameCheck(t,e))||t===`is`&&D.allowCustomizedBuiltInElements&&(D.tagNameCheck instanceof RegExp&&g(D.tagNameCheck,r)||D.tagNameCheck instanceof Function&&D.tagNameCheck(r))))return!1}else if(!z[t]&&!g(ct,de(r,ot,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&fe(r,`data:`)===0&&Ct[e])&&!(ht&&!g(at,de(r,ot,``)))&&r)return!1}return!0},Kt=v({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),qt=function(e){return!Kt[ce(e)]&&g(st,e)},Jt=function(e){X(w.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Y(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=G(o),u=c,d=o===`value`?u:pe(u);if(r.attrName=l,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,X(w.uponSanitizeAttribute,e,r),d=r.attrValue,P&&(l===`id`||l===`name`)&&fe(d,xt)!==0&&(J(o,e),d=xt+d),A&&g(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){J(o,e);continue}if(l===`attributename`&&ue(d,`href`)){J(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){J(o,e);continue}if(!gt&&g(/\/>/i,d)){J(o,e);continue}k&&re([et,tt,nt],e=>{d=de(d,e,` `)});let ee=G(e.nodeName);if(!Gt(ee,l,d)){J(o,e);continue}if(y&&typeof f==`object`&&typeof f.getAttributeType==`function`&&!s)switch(f.getAttributeType(ee,l)){case`TrustedHTML`:d=y.createHTML(d);break;case`TrustedScriptURL`:d=y.createScriptURL(d);break}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),Y(e)?q(e):ae(t.removed)}catch{J(o,e)}}X(w.afterSanitizeAttributes,e,null)},Yt=function(e){let t=null,n=Bt(e);for(X(w.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(X(w.uponSanitizeShadowNode,t,null),Wt(t),Jt(t),Ht(t.content)&&Yt(t.content),(_?_(t):t.nodeType)===S.element){let e=_e?_e(t):t.shadowRoot;Ht(e)&&(Xt(e),Yt(e))}X(w.afterSanitizeShadowDOM,e,null)},Xt=function(e){let t=_?_(e):e.nodeType;if(t===S.element){let t=_e?_e(e):e.shadowRoot;Ht(t)&&(Xt(t),Yt(t))}let n=he?he(e):e.childNodes;if(!n)return;let r=[];re(n,e=>{oe(r,e)});for(let e of r)Xt(e);if(t===S.element){let t=be?be(e):null;if(typeof t==`string`&&G(t)===`template`){let t=e.content;Ht(t)&&Xt(t)}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(H=!e,H&&(e=`<!-->`),typeof e!=`string`&&!Ut(e)&&(e=xe(e),typeof e!=`string`))throw ye(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(_t||Ft(n),t.removed=[],typeof e==`string`&&(I=!1),I){let t=be?be(e):e.nodeName;if(typeof t==`string`){let e=G(t);if(!T[e]||dt[e])throw ye(`root node is forbidden and cannot be sanitized in-place`)}if(Y(e))throw ye(`root node is clobbered and cannot be sanitized in-place`);Xt(e)}else if(Ut(e))i=zt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===S.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Xt(a);else{if(!M&&!k&&!j&&e.indexOf(`<`)===-1)return y&&yt?y.createHTML(e):e;if(i=zt(e),!i)return M?null:yt?C:``}i&&vt&&q(i.firstChild);let c=Bt(I?e:i);for(;o=c.nextNode();)Wt(o),Jt(o),Ht(o.content)&&Yt(o.content);if(I)return k&&Vt(e),e;if(M){if(k&&Vt(i),N)for(s=Ze.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(E.shadowroot||E.shadowrootmode)&&(s=$e.call(r,s,!0)),s}let l=j?i.outerHTML:i.innerHTML;return j&&T[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&g(He,i.ownerDocument.doctype.name)&&(l=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
+
`+l),k&&re([et,tt,nt],e=>{l=de(l,e,` `)}),y&&yt?y.createHTML(l):l},t.setConfig=function(){Ft(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),_t=!0},t.clearConfig=function(){K=null,_t=!1},t.isValidAttribute=function(e,t,n){return K||Ft({}),Gt(G(e),G(t),n)},t.addHook=function(e,t){typeof t==`function`&&oe(w[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=ie(w[e],t);return n===-1?void 0:se(w[e],n,1)[0]}return ae(w[e])},t.removeHooks=function(e){w[e]=[]},t.removeAllHooks=function(){w=Ke()},t}var C=qe(),Je={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`,`use`],ADD_ATTR:[`from`,`to`,`calcmode`],RETURN_TRUSTED_TYPE:!0},Ye=/url\s*\(\s*['"]?\s*(javascript|data|vbscript)\s*:/gi,Xe=[`fill`,`stroke`,`filter`,`clip-path`,`mask`,`marker-start`,`marker-mid`,`marker-end`];C.addHook(`afterSanitizeAttributes`,e=>{let t=e.getAttribute(`style`);t&&(Ye.lastIndex=0,Ye.test(t)&&e.removeAttribute(`style`));for(let t of Xe){let n=e.getAttribute(t);n&&(Ye.lastIndex=0,Ye.test(n)&&e.removeAttribute(t))}});var Ze=class{constructor(){this._internalPolicy=null}get trustedTypePolicy(){return this._internalPolicy===null?window.trustedTypes?.createPolicy?(this._internalPolicy=window.trustedTypes.createPolicy(Qe.ID,{createHTML(e){return C.sanitize(e,Je)}}),this._internalPolicy):null:this._internalPolicy}sanitize(e,t){if(e!=null)return e.createHTML(t);let n=this.trustedTypePolicy;return n==null?C.sanitize(t,Je):n.createHTML(t)}},Qe=class e extends HTMLElement{static{this.ID=`sd-image-embed`}static{this.ensureDefined=()=>{customElements.get(e.ID)||customElements.define(e.ID,e)}}static{this.styleSheet=new CSSStyleSheet}static{this.styleSheet.replaceSync(`
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
aspect-ratio: var(--image-aspect-ratio, auto);
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(.no-image) {
|
|
16
|
+
display: none !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
img, svg {
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
min-width: min(100%, var(--natural-width));
|
|
24
|
+
object-fit: scale-down;
|
|
25
|
+
}`)}static get observedAttributes(){return[`src`,`placeholder-src`]}constructor(){super(),this._loadPending=null,this._renderedPlaceholder=null,this._renderedSrc=null,this.trustedTypePolicy=null;let t=this.attachShadow({mode:`open`});this._privateStyleSheet=new CSSStyleSheet,t.adoptedStyleSheets=[e.styleSheet,this._privateStyleSheet],this._sanitizer=new Ze}connectedCallback(){this.svgContent&&this.inlineSVG(this.svgContent),this.role||=`img`,this.updateContentDependentStyle()}attributeChangedCallback(e,t,n){(e===`src`||e===`placeholder-src`)&&t!==n&&this._loadPending==null&&(this._loadPending=window.requestAnimationFrame(()=>{this._loadPending=null,this.loadSvg()}))}updateContentDependentStyle(){let e=!!this.src||!!this.placeholderSrc||this.shadowRoot?.querySelector(`svg`)!=null;this.classList.toggle(`no-image`,!e)}async loadSvg(){this.shadowRoot&&(this._renderedSrc===this.src&&this.shadowRoot.querySelector(`img:not(.placeholder),svg:not(.placeholder)`)!=null||(this.placeholderSrc!=this._renderedPlaceholder&&(this._renderedPlaceholder=this.placeholderSrc,this.placeholderSrc&&this.renderUrl(this.placeholderSrc,!0)),this.src!=this._renderedSrc&&(this._renderedSrc=this.src,this.src&&this.renderUrl(this.src,!1))))}async renderUrl(e,t){let n=new URL(e,document.baseURI);if(n.protocol===`data:`){this.renderDataUrl(e,t);return}n.protocol.startsWith(`http`)&&n.origin===new URL(document.baseURI).origin&&n.searchParams.set(`skip-token-processing`,``);try{let r=await fetch(n);if(!r.ok)if(r.status==404){this.updateContentDependentStyle();return}else throw Error();if(r.headers.get(`content-type`)?.includes(`image/svg+xml`)){let n=await r.text();this.isRelevantRendering(e,t)&&this.inlineSVG(n,t);return}r.status==204?this.updateContentDependentStyle():this.handleImageFallback(e,t,await r.blob())}catch{this.handleImageFallback(e,t)}}renderDataUrl(e,t){let n=/^data:([^,]*),(.*)$/s.exec(e);if(n&&/^image\/svg\+xml/i.test(n[1])){let r=/;base64/i.test(n[1])?atob(n[2]):decodeURIComponent(n[2]);this.isRelevantRendering(e,t)&&this.inlineSVG(r,t)}else this.handleImageFallback(e,t)}get src(){return this.getAttribute(`src`)}set src(e){e?this.setAttribute(`src`,e):this.removeAttribute(`src`)}get placeholderSrc(){return this.getAttribute(`placeholder-src`)}set placeholderSrc(e){e?this.setAttribute(`placeholder-src`,e):this.removeAttribute(`placeholder-src`)}get svgContent(){return this._svgContent}set svgContent(e){this.inlineSVG(e)}inlineSVG(e,t){if(this._svgContent=this.svgContent,!this.shadowRoot)return;this.initShadowRoot();let n=new DOMParser,r=(e?n.parseFromString(this._sanitizer.sanitize(this.trustedTypePolicy,e),`image/svg+xml`):void 0)?.querySelector(`svg`);if(r){let e=parseFloat(r.getAttribute(`width`)||`0`),n=parseFloat(r.getAttribute(`height`)||`0`),i=r.getAttribute(`viewBox`);if((!e||!n)&&i){let t=i.split(/\s+/);t.length===4&&(e||=parseFloat(t[2]),n||=parseFloat(t[3]))}e&&n&&(this.style.setProperty(`--image-aspect-ratio`,`${e} / ${n}`),this.style.setProperty(`--natural-width`,`${e}px`),this.style.maxWidth=`${e}px`),r.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),r.removeAttribute(`width`),r.removeAttribute(`height`),(i==null||i.trim()==``&&e&&n)&&r.setAttribute(`viewBox`,`0 0 ${e} ${n}`);let a=r.getAttribute(`color`);r.removeAttribute(`color`),a?this._privateStyleSheet.replaceSync(`:host {color: var(--sd-image-embed-color, ${a})}`):this._privateStyleSheet.replaceSync(`:host {color: var(--sd-image-embed-color)}`),this.shadowRoot.appendChild(r),r.classList.toggle(`placeholder`,t),r.part=`svg`,this.dispatchEvent(new CustomEvent(`load`))}else this.dispatchEvent(new CustomEvent(`error`));this.updateContentDependentStyle()}handleImageFallback(e,t,n){if(this.shadowRoot&&(this.initShadowRoot(),this.isRelevantRendering(e,t))){if(!t){let e=this.shadowRoot.querySelector(`.placeholder`);e&&e.remove()}let r=document.createElement(`img`);r.classList.toggle(`placeholder`,t),r.src=n==null?e:URL.createObjectURL(n),r.part=`img`;let i=()=>{n!=null&&URL.revokeObjectURL(r.src)};r.onload=()=>{this.style.setProperty(`--image-aspect-ratio`,`${r.naturalWidth} / ${r.naturalHeight}`),this.style.maxWidth=`${r.naturalWidth}px`,this.style.setProperty(`--natural-width`,`${r.naturalWidth}px`),this.dispatchEvent(new CustomEvent(`load`)),i()},r.onerror=()=>{this.dispatchEvent(new CustomEvent(`error`)),i()},this.shadowRoot.appendChild(r),this.updateContentDependentStyle()}}isRelevantRendering(e,t){return this.shadowRoot?t?this.placeholderSrc==e&&this.shadowRoot.querySelector(`svg,img`)==null:this.src==e:!1}initShadowRoot(){this.shadowRoot&&(this.shadowRoot.innerHTML=``)}};Qe.ensureDefined();var $e=globalThis,w=$e.ShadowRoot&&($e.ShadyCSS===void 0||$e.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,et=Symbol(),tt=new WeakMap,nt=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(w&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=tt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&tt.set(t,e))}return e}toString(){return this.cssText}},rt=e=>new nt(typeof e==`string`?e:e+``,void 0,et),it=(e,...t)=>new nt(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,et),at=(e,t)=>{if(w)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=$e.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},ot=w?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return rt(t)})(e):e,{is:st,defineProperty:ct,getOwnPropertyDescriptor:T,getOwnPropertyNames:lt,getOwnPropertySymbols:E,getPrototypeOf:ut}=Object,D=globalThis,dt=D.trustedTypes,ft=dt?dt.emptyScript:``,O=D.reactiveElementPolyfillSupport,pt=(e,t)=>e,mt={toAttribute(e,t){switch(t){case Boolean:e=e?ft:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},ht=(e,t)=>!st(e,t),gt={attribute:!0,type:String,converter:mt,reflect:!1,useDefault:!1,hasChanged:ht};Symbol.metadata??=Symbol(`metadata`),D.litPropertyMetadata??=new WeakMap;var k=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=gt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&ct(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=T(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??gt}static _$Ei(){if(this.hasOwnProperty(pt(`elementProperties`)))return;let e=ut(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(pt(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(pt(`properties`))){let e=this.properties,t=[...lt(e),...E(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(ot(e))}else e!==void 0&&t.push(ot(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?mt:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?mt:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??ht)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};k.elementStyles=[],k.shadowRootOptions={mode:`open`},k[pt(`elementProperties`)]=new Map,k[pt(`finalized`)]=new Map,O?.({ReactiveElement:k}),(D.reactiveElementVersions??=[]).push(`2.1.2`);var A=globalThis,j=e=>e,_t=A.trustedTypes,vt=_t?_t.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,M=`$lit$`,N=`lit$${Math.random().toFixed(9).slice(2)}$`,yt=`?`+N,bt=`<${yt}>`,P=document,xt=()=>P.createComment(``),F=e=>e===null||typeof e!=`object`&&typeof e!=`function`,I=Array.isArray,St=e=>I(e)||typeof e?.[Symbol.iterator]==`function`,L=`[
|
|
26
|
+
\f\r]`,R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,wt=/>/g,z=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),Tt=/'/g,Et=/"/g,Dt=/^(?:script|style|textarea|title)$/i,B=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),V=Symbol.for(`lit-noChange`),H=Symbol.for(`lit-nothing`),Ot=new WeakMap,U=P.createTreeWalker(P,129);function kt(e,t){if(!I(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return vt===void 0?t:vt.createHTML(t)}var At=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=R;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===R?c[1]===`!--`?o=Ct:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=z):(Dt.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=z):o=wt:o===z?c[0]===`>`?(o=i??R,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?z:c[3]===`"`?Et:Tt):o===Et||o===Tt?o=z:o===Ct||o===wt?o=R:(o=z,i=void 0);let d=o===z&&e[t+1].startsWith(`/>`)?` `:``;a+=o===R?n+bt:l>=0?(r.push(s),n.slice(0,l)+M+n.slice(l)+N+d):n+N+(l===-2?t:d)}return[kt(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},jt=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=At(t,n);if(this.el=e.createElement(l,r),U.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=U.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(M)){let t=u[o++],n=i.getAttribute(e).split(N),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Nt:r[1]===`?`?Pt:r[1]===`@`?Ft:K}),i.removeAttribute(e)}else e.startsWith(N)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Dt.test(i.tagName)){let e=i.textContent.split(N),t=e.length-1;if(t>0){i.textContent=_t?_t.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],xt()),U.nextNode(),c.push({type:2,index:++a});i.append(e[t],xt())}}}else if(i.nodeType===8)if(i.data===yt)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(N,e+1))!==-1;)c.push({type:7,index:a}),e+=N.length-1}a++}}static createElement(e,t){let n=P.createElement(`template`);return n.innerHTML=e,n}};function W(e,t,n=e,r){if(t===V)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=F(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=W(e,i._$AS(e,t.values),i,r)),t}var Mt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??P).importNode(t,!0);U.currentNode=r;let i=U.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new G(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new It(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=U.nextNode(),a++)}return U.currentNode=P,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},G=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),F(e)?e===H||e==null||e===``?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==V&&this._(e):e._$litType$===void 0?e.nodeType===void 0?St(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==H&&F(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=jt.createElement(kt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Mt(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Ot.get(e.strings);return t===void 0&&Ot.set(e.strings,t=new jt(e)),t}k(t){I(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(xt()),this.O(xt()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=j(e).nextSibling;j(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},K=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=W(this,e,t,0),a=!F(e)||e!==this._$AH&&e!==V,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=W(this,r[n+o],t,o),s===V&&(s=this._$AH[o]),a||=!F(s)||s!==this._$AH[o],s===H?e=H:e!==H&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Nt=class extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===H?void 0:e}},Pt=class extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==H)}},Ft=class extends K{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=W(this,e,t,0)??H)===V)return;let n=this._$AH,r=e===H&&n!==H||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==H&&(n===H||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},It=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e)}},Lt=A.litHtmlPolyfillSupport;Lt?.(jt,G),(A.litHtmlVersions??=[]).push(`3.3.2`);var Rt=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new G(t.insertBefore(xt(),e),e,void 0,n??{})}return i._$AI(e),i},q=globalThis,J=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Rt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return V}};J._$litElement$=!0,J.finalized=!0,q.litElementHydrateSupport?.({LitElement:J});var zt=q.litElementPolyfillSupport;zt?.({LitElement:J}),(q.litElementVersions??=[]).push(`4.2.2`);var Bt={attribute:!0,type:String,converter:mt,reflect:!1,hasChanged:ht},Vt=(e=Bt,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function Y(e){return(t,n)=>typeof n==`object`?Vt(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var Ht=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20color='var(--color-fg-danger,%20%23a90014)'%3e%3cpath%20d='M10.625%206C10.625%205.39269%2010.5048%204.79156%2010.2725%204.23047C10.04%203.66934%209.69998%203.15896%209.27051%202.72949C8.84104%202.30002%208.33066%201.95997%207.76953%201.72754C7.20844%201.49515%206.60731%201.375%206%201.375C4.77337%201.375%203.59685%201.86214%202.72949%202.72949C1.86214%203.59685%201.375%204.77337%201.375%206C1.375%207.22663%201.86214%208.40315%202.72949%209.27051C3.59685%2010.1379%204.77337%2010.625%206%2010.625C6.60731%2010.625%207.20844%2010.5048%207.76953%2010.2725C8.33066%2010.04%208.84104%209.69998%209.27051%209.27051C9.69998%208.84104%2010.04%208.33066%2010.2725%207.76953C10.5048%207.20844%2010.625%206.60731%2010.625%206ZM11.375%206C11.375%206.70577%2011.2359%207.40458%2010.9658%208.05664C10.6957%208.70877%2010.2999%209.30167%209.80078%209.80078C9.30167%2010.2999%208.70877%2010.6957%208.05664%2010.9658C7.40458%2011.2359%206.70577%2011.375%206%2011.375C4.57446%2011.375%203.20723%2010.8088%202.19922%209.80078C1.19121%208.79277%200.625%207.42554%200.625%206C0.625%204.57446%201.19121%203.20723%202.19922%202.19922C3.20723%201.19121%204.57446%200.625%206%200.625C6.70577%200.625%207.40458%200.764123%208.05664%201.03418C8.70877%201.3043%209.30167%201.7001%209.80078%202.19922C10.2999%202.69833%2010.6957%203.29123%2010.9658%203.94336C11.2359%204.59542%2011.375%205.29423%2011.375%206Z'%20fill='currentColor'/%3e%3cpath%20d='M6.00293%208.625C6.20997%208.62508%206.37793%208.79294%206.37793%209C6.37793%209.20706%206.20997%209.37492%206.00293%209.375H6C5.79289%209.375%205.625%209.20711%205.625%209C5.625%208.79289%205.79289%208.625%206%208.625H6.00293Z'%20fill='currentColor'/%3e%3cpath%20d='M5.625%207.5V3C5.625%202.79289%205.79289%202.625%206%202.625C6.20711%202.625%206.375%202.79289%206.375%203V7.5C6.375%207.70711%206.20711%207.875%206%207.875C5.79289%207.875%205.625%207.70711%205.625%207.5Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ut=`:host{font:var(--text-caption,400 12px/14px "Inter");color:var(--color-fg-default,#111);contain:content;padding:var(--spacing-x2,4px) 0px;display:inline-block}:host([hidden]){display:none!important}:host([level=warn i]){color:var(--sd-field-validation-message-warn-color,var(--color-fg-default,#111))!important}:host([level=suggest i]){color:var(--sd-field-validation-message-suggest-color,var(--color-fg-warning,#bf8c0d))!important}:host([level=error i]){color:var(--sd-field-validation-message-error-color,var(--color-fg-danger,#a90014))!important}.icon{width:1em;height:1em;padding-right:var(--spacing-x2,4px);color:inherit;flex:1 0 auto;margin-bottom:.2em;overflow:hidden}`,X=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20color='var(--color-fg-warning,%20%23bf8c0d)'%3e%3cpath%20d='M6.11915%208.7675H6.12235M6.11915%204.49268V7.47362M1.67018%2010.4927H10.5681C10.8955%2010.4927%2011.1035%2010.1423%2010.9468%209.85485L6.49778%201.6984C6.33432%201.39871%205.90399%201.39871%205.74053%201.6984L1.29155%209.85485C1.13479%2010.1423%201.34281%2010.4927%201.67018%2010.4927Z'%20stroke='currentColor'%20stroke-width='0.862584'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Wt=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20color='var(--color-fg-weak,%20%23565656)'%3e%3cpath%20d='M10.625%206C10.625%205.39269%2010.5048%204.79156%2010.2725%204.23047C10.04%203.66934%209.69998%203.15896%209.27051%202.72949C8.84104%202.30002%208.33066%201.95997%207.76953%201.72754C7.20844%201.49515%206.60731%201.375%206%201.375C4.77337%201.375%203.59685%201.86214%202.72949%202.72949C1.86214%203.59685%201.375%204.77337%201.375%206C1.375%207.22663%201.86214%208.40315%202.72949%209.27051C3.59685%2010.1379%204.77337%2010.625%206%2010.625C6.60731%2010.625%207.20844%2010.5048%207.76953%2010.2725C8.33066%2010.04%208.84104%209.69998%209.27051%209.27051C9.69998%208.84104%2010.04%208.33066%2010.2725%207.76953C10.5048%207.20844%2010.625%206.60731%2010.625%206ZM11.375%206C11.375%206.70577%2011.2359%207.40458%2010.9658%208.05664C10.6957%208.70877%2010.2999%209.30167%209.80078%209.80078C9.30167%2010.2999%208.70877%2010.6957%208.05664%2010.9658C7.40458%2011.2359%206.70577%2011.375%206%2011.375C4.57446%2011.375%203.20723%2010.8088%202.19922%209.80078C1.19121%208.79277%200.625%207.42554%200.625%206C0.625%204.57446%201.19121%203.20723%202.19922%202.19922C3.20723%201.19121%204.57446%200.625%206%200.625C6.70577%200.625%207.40458%200.764123%208.05664%201.03418C8.70877%201.3043%209.30167%201.7001%209.80078%202.19922C10.2999%202.69833%2010.6957%203.29123%2010.9658%203.94336C11.2359%204.59542%2011.375%205.29423%2011.375%206Z'%20fill='currentColor'/%3e%3cpath%20d='M6.00293%208.625C6.20997%208.62508%206.37793%208.79294%206.37793%209C6.37793%209.20706%206.20997%209.37492%206.00293%209.375H6C5.79289%209.375%205.625%209.20711%205.625%209C5.625%208.79289%205.79289%208.625%206%208.625H6.00293Z'%20fill='currentColor'/%3e%3cpath%20d='M5.625%207.5V3C5.625%202.79289%205.79289%202.625%206%202.625C6.20711%202.625%206.375%202.79289%206.375%203V7.5C6.375%207.70711%206.20711%207.875%206%207.875C5.79289%207.875%205.625%207.70711%205.625%207.5Z'%20fill='currentColor'/%3e%3c/svg%3e`;function Gt(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Kt(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var qt={Warn:`warn`,Suggest:`suggest`,Error:`error`},Jt=class e extends J{static{this.ID=`sd-field-validation-message`}static{this.ensureDefined=()=>{customElements.get(e.ID)||(customElements.define(e.ID,e),Qe.ensureDefined())}}static parseLevel(e){if(e==null)return;let t=e.toLowerCase();return Object.values(qt).find(e=>e===t)}static{this.levelConverter={fromAttribute(t){return e.parseLevel(t)},toAttribute(e){return e?.toLowerCase()}}}static get styles(){return[it`
|
|
27
|
+
${rt(Ut)}
|
|
28
|
+
`]}render(){return B`${this.iconToUse!=null&&this.iconToUse.length>0?B`<sd-image-embed class="icon" src="${this.iconToUse}" />`:H}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(e){return e.has(`level`)&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(e)}get iconForLevel(){switch(e.parseLevel(this.level)){case qt.Warn:return Wt;case qt.Suggest:return X;case qt.Error:return Ht;default:return}}};Kt([Y({type:String,attribute:!0}),Gt(`design:type`,Object)],Jt.prototype,`message`,void 0),Kt([Y({type:String,attribute:!0}),Gt(`design:type`,Object)],Jt.prototype,`icon`,void 0),Kt([Y({converter:Jt.levelConverter,reflect:!0}),Gt(`design:type`,Object)],Jt.prototype,`level`,void 0),Jt.ensureDefined();var Yt=e=>e??H,Xt=`:host{display:block}:host,.label,.checkbox{outline:none}:host([disabled]){pointer-events:none}:host([disabled]) .root{cursor:default}:host([disabled]) .root circle.inner-bg{fill:var(--color-bg-interaction-disabled,#e7e7e7)}:host([disabled]) .root circle.inner{fill:var(--color-fg-interaction-disabled,#999)}:host([disabled]) .root circle.outer{stroke:var(--color-border-interaction-disabled,#c6c6c6)!important}:host([disabled]) .root .label{color:var(--color-fg-interaction-disabled,#999)}:host([checked]) circle.inner{display:block!important}:host([checked]) circle.outer{stroke:var(--sd-radio-button-checked-color,var(--color-fg-selection-accent-default,#1467ba))!important}:host([oneline]){max-width:100%}:host([oneline]) .label{white-space:pre;text-overflow:ellipsis;overflow:hidden}.root{vertical-align:middle;width:100%;padding:var(--sd-radio-button-padding,0px);align-items:center;gap:var(--spacing-x4,8px);display:inline-flex}.root .radio-button-container{box-sizing:border-box;cursor:pointer;flex-shrink:0;width:28px;height:28px;display:inline-block;position:relative}.root .radio-button-container input{opacity:0;position:absolute;top:0;left:0}.root .radio-button-container circle.inner{fill:var(--sd-radio-button-checked-color,var(--color-fg-selection-accent-default,#1467ba))}.root .radio-button-container circle.outer{stroke:var(--sd-radio-button-unchecked-color,var(--color-border-selection-neutral-default,#999))}.root .label{font:var(--text-body);color:var(--color-fg-selection-neutral-default,#111);text-overflow:ellipsis;-webkit-user-select:none;user-select:none;cursor:pointer;padding-top:2px;padding-bottom:2px;padding-right:var(--spacing-x4,8px);overflow-x:hidden}`;function Z(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Zt=0,Qt=class e extends J{static{this.ID=`sd-radio-button`}static{this.ensureDefined=()=>{customElements.get(e.ID)||customElements.define(e.ID,e)}}constructor(){super(),this.checked=!1,this.value=``,this.disabled=!1,this.label=``,this.handleClick=e=>{e.preventDefault()},this.a11yID=e.ID+`_`+ Zt++}static get styles(){return[it`
|
|
29
|
+
${rt(Xt)}
|
|
30
|
+
`]}render(){return B`
|
|
31
|
+
<div class="root">
|
|
32
|
+
<div class="radio-button-container">
|
|
33
|
+
<input
|
|
34
|
+
type="radio"
|
|
35
|
+
id="${this.a11yID}"
|
|
36
|
+
.checked="${this.checked}"
|
|
37
|
+
?disabled="${this.disabled}"
|
|
38
|
+
@click="${this.handleClick}"
|
|
39
|
+
class="radio-button"
|
|
40
|
+
/>
|
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-14 -14 28 28">
|
|
42
|
+
<circle
|
|
43
|
+
class="inner-bg"
|
|
44
|
+
r="8px"
|
|
45
|
+
style="${this.disabled?``:`display:none`}"
|
|
46
|
+
stroke="none"
|
|
47
|
+
></circle>
|
|
48
|
+
<circle class="inner" r="6px" style="display:none" stroke="none"></circle>
|
|
49
|
+
<circle class="outer" r="9px" fill="transparent" stroke-width="2px"></circle>
|
|
50
|
+
</svg>
|
|
51
|
+
</div>
|
|
52
|
+
<label class="label" for="${this.a11yID}" @click="${this.handleClick}">${this.label}</label>
|
|
53
|
+
</div>
|
|
54
|
+
`}};Q([Y({type:Boolean,reflect:!0,attribute:!0}),Z(`design:type`,Object)],Qt.prototype,`checked`,void 0),Q([Y({type:String,reflect:!0,attribute:!0}),Z(`design:type`,Object)],Qt.prototype,`value`,void 0),Q([Y({type:Boolean,reflect:!0,attribute:!0}),Z(`design:type`,Object)],Qt.prototype,`disabled`,void 0),Q([Y({type:String,reflect:!0,attribute:!0}),Z(`design:type`,Object)],Qt.prototype,`label`,void 0);var $t=`:host{display:block}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px);border-radius:var(--radius-s,4px);z-index:10!important}.buttons-container{align-items:start;gap:var(--sd-radio-button-group-gap,0);border-radius:var(--radius-s,4px);max-width:100%;display:inline-flex}.buttons-container.vertical{flex-direction:column}.validation-message{margin-left:5px}`,$=class e extends J{constructor(...e){super(...e),this.layout=`horizontal`,this.value=``,this.uncheckAllowed=!1,this.disabled=!1,this._buttons=[],this._focusIndex=-1,this._checkedButton=void 0,this.handleSlotChange=()=>{this._buttons=this.buttonsSlot.assignedElements(),this._buttons.forEach(e=>{!e.hasAttribute(`disabled`)&&this.disabled&&e.setAttribute(`disabled`,``),e.setAttribute(`tabIndex`,`-1`),this.updateCheckedButton(e)})},this.handleFocusIn=e=>{let t=e.target,n=this._buttons.findIndex(e=>e==t);this.focusIndex=this.focusIndex>=0?this.focusIndex:this.getNextFocusIndex(n===-1?0:n),this.updateFocused(void 0,this._buttons[this.focusIndex])},this.handleFocusOut=()=>{this.updateFocused(this._buttons[this.focusIndex])},this.handleButtonClick=e=>{this.focus();let t=this._buttons.find(t=>t.contains(e.target));if(t?.matches(`[disabled], [aria-disabled='true']`))return;let n=this._buttons.findIndex(e=>e==t);n>=0&&(this.focusIndex=n,this.updateChecked())},this.handleKeyDown=e=>{let t=!0;switch(e.key){case`Down`:case`ArrowDown`:case`Right`:case`ArrowRight`:this.focusNext();break;case`Up`:case`ArrowUp`:case`Left`:case`ArrowLeft`:this.focusPrevious();break;case`Enter`:this.updateChecked();break;default:t=!1}t&&(e.preventDefault(),e.stopPropagation())}}static{this.ID=`sd-radio-button-group`}static{this.ensureDefined=()=>{Qt.ensureDefined(),customElements.get(e.ID)||customElements.define(e.ID,e)}}get focusIndex(){return this._focusIndex}set focusIndex(e){if(e>=-1&&e<this.childElementCount){let t=this._focusIndex;if(this._focusIndex=e,t!==e){let e=this._buttons[t],n=this._buttons[this.focusIndex];this.updateFocused(e,n)}}}firstUpdated(e){super.firstUpdated(e),this.buttonsSlot.addEventListener(`slotchange`,this.handleSlotChange),this.addEventListener(`focusin`,this.handleFocusIn),this.addEventListener(`focusout`,this.handleFocusOut),this.addEventListener(`keydown`,this.handleKeyDown)}updated(e){super.updated(e),e.has(`disabled`)&&(this.disabled?this.disableButtons():this.enableButtons())}static get styles(){return[it`
|
|
55
|
+
${rt($t)}
|
|
56
|
+
`]}render(){return B`
|
|
57
|
+
<div
|
|
58
|
+
class="buttons-container ${this.layout===`vertical`?`vertical`:`horizontal`}"
|
|
59
|
+
@click="${Yt(this.disabled?void 0:this.handleButtonClick)}"
|
|
60
|
+
>
|
|
61
|
+
<slot></slot>
|
|
62
|
+
</div>
|
|
63
|
+
${this.validationMessage&&B`
|
|
64
|
+
<br />
|
|
65
|
+
<sd-field-validation-message
|
|
66
|
+
class="validation-message"
|
|
67
|
+
.message=${this.validationMessage}
|
|
68
|
+
.icon=${this.validationIconSrc}
|
|
69
|
+
.level=${this.validationLevel}
|
|
70
|
+
>
|
|
71
|
+
</sd-field-validation-message>
|
|
72
|
+
`}
|
|
73
|
+
`}updateCheckedButton(e){!this._checkedButton&&this.isChecked(e)?(this._checkedButton=e,this.updateValue(e.getAttribute(`value`))):this._checkedButton!==e&&this.uncheckButton(e)}disableButtons(){this._buttons?.forEach(e=>{e.setAttribute(`disabled`,``)})}enableButtons(){this._buttons?.forEach(e=>{e.removeAttribute(`disabled`)})}fireValueChangeEvent(){this.dispatchEvent(new CustomEvent(`sd-radio-button-group-value-change`,{detail:{value:this.value,selectedIndex:this.selectedIndex}}))}focusNext(){let e=this.getNextFocusIndex(this.focusIndex+1);this.focusIndex=e===-1?this.getNextFocusIndex(0):e,this.uncheckAllowed||this.updateChecked()}focusPrevious(){let e=this.getPreviousFocusIndex(this.focusIndex-1);this.focusIndex=e===-1?this.getPreviousFocusIndex(this.childElementCount-1):e,this.uncheckAllowed||this.updateChecked()}getNextFocusIndex(e){for(let t=e;t<this.childElementCount;t++){let e=this._buttons[t];if(e!=null&&this.isFocusable(e))return t}return-1}getPreviousFocusIndex(e){for(let t=e;t>=0;t--){let e=this._buttons[t];if(e!=null&&this.isFocusable(e))return t}return-1}isFocusable(e){return!e.matches(`[disabled], [aria-disabled='true']`)}updateChecked(){let e=this._checkedButton,t=this._buttons[this.focusIndex];!t||t.matches(`[disabled], [aria-disabled='true']`)||(this._checkedButton=t,e&&e!==t&&this.uncheckButton(e),t&&this.toggleButton(t))}toggleButton(e){this.isChecked(e)?this.uncheckAllowed&&(this.uncheckButton(e),this._checkedButton=void 0,this.updateValue(``)):(this.checkButton(e),this.updateValue(e.getAttribute(`value`)))}updateValue(e){this.value=e??void 0,this.fireValueChangeEvent()}updateFocused(e,t){e?.removeAttribute?.(`focused`),t?.setAttribute?.(`focused`,``)}isRadioButton(e){return e.localName===Qt.ID}isChecked(e){return this.isRadioButton(e)?e.hasAttribute(`checked`):e.getAttribute(`aria-pressed`)===`true`}checkButton(e){this.isRadioButton(e)?e.setAttribute(`checked`,``):e.setAttribute(`aria-pressed`,`true`)}uncheckButton(e){this.isRadioButton(e)?e.removeAttribute(`checked`):e.setAttribute(`aria-pressed`,`false`)}get buttonsSlot(){return this.shadowRoot&&!this._buttonsSlot&&(this._buttonsSlot=this.shadowRoot.querySelector(`slot`)??void 0),this._buttonsSlot}get selectedIndex(){return this._buttons==null||this._checkedButton==null?-1:this._buttons.indexOf(this._checkedButton)}};Q([Y({type:String,reflect:!0,attribute:!0}),Z(`design:type`,Object)],$.prototype,`layout`,void 0),Q([Y({type:String}),Z(`design:type`,Object)],$.prototype,`value`,void 0),Q([Y({type:Boolean,reflect:!0,attribute:`uncheck-allowed`}),Z(`design:type`,Object)],$.prototype,`uncheckAllowed`,void 0),Q([Y({type:Boolean,reflect:!0,attribute:!0}),Z(`design:type`,Object)],$.prototype,`disabled`,void 0),Q([Y({type:String}),Z(`design:type`,Object)],$.prototype,`validationMessage`,void 0),Q([Y({type:String}),Z(`design:type`,Object)],$.prototype,`validationIconSrc`,void 0),Q([Y({type:{fromAttribute(e){return Jt.parseLevel(e)},toAttribute(e){return e?.toLowerCase()}},reflect:!0}),Z(`design:type`,Object)],$.prototype,`validationLevel`,void 0),$.ensureDefined();export{Qe as t};
|
|
@@ -3,7 +3,7 @@ import { LitElement as t, css as n, html as r, unsafeCSS as i } from "lit";
|
|
|
3
3
|
import { property as a } from "lit/decorators/property.js";
|
|
4
4
|
import { ifDefined as o } from "lit/directives/if-defined.js";
|
|
5
5
|
//#region scss/button.scss?inline
|
|
6
|
-
var s = ":host{display:block}:host,.label,.checkbox{outline:none}:host([disabled]){pointer-events:none}:host([disabled]) .root{cursor:default}:host([disabled]) .root circle.inner-bg{fill:var(--color-bg-interaction-disabled,#e7e7e7)}:host([disabled]) .root circle.inner{fill:var(--color-fg-interaction-disabled,#999)}:host([disabled]) .root circle.outer{stroke:var(--color-border-interaction-disabled,#c6c6c6)!important}:host([disabled]) .root .label{color:var(--color-fg-interaction-disabled,#999)}:host([checked]) circle.inner{display:block!important}:host([checked]) circle.outer{stroke:var(--sd-radio-button-checked-color,#1467ba)!important}:host([oneline]){max-width:100%}:host([oneline]) .label{white-space:pre;text-overflow:ellipsis;overflow:hidden}.root{vertical-align:middle;width:100%;padding:var(--sd-radio-button-padding,0px);align-items:center;gap:var(--spacing-x4,8px);display:inline-flex}.root .radio-button-container{box-sizing:border-box;cursor:pointer;flex-shrink:0;width:28px;height:28px;display:inline-block;position:relative}.root .radio-button-container input{opacity:0;position:absolute;top:0;left:0}.root .radio-button-container circle.inner{fill:var(--sd-radio-button-checked-color,#1467ba)}.root .radio-button-container circle.outer{stroke:var(--sd-radio-button-unchecked-color,#
|
|
6
|
+
var s = ":host{display:block}:host,.label,.checkbox{outline:none}:host([disabled]){pointer-events:none}:host([disabled]) .root{cursor:default}:host([disabled]) .root circle.inner-bg{fill:var(--color-bg-interaction-disabled,#e7e7e7)}:host([disabled]) .root circle.inner{fill:var(--color-fg-interaction-disabled,#999)}:host([disabled]) .root circle.outer{stroke:var(--color-border-interaction-disabled,#c6c6c6)!important}:host([disabled]) .root .label{color:var(--color-fg-interaction-disabled,#999)}:host([checked]) circle.inner{display:block!important}:host([checked]) circle.outer{stroke:var(--sd-radio-button-checked-color,var(--color-fg-selection-accent-default,#1467ba))!important}:host([oneline]){max-width:100%}:host([oneline]) .label{white-space:pre;text-overflow:ellipsis;overflow:hidden}.root{vertical-align:middle;width:100%;padding:var(--sd-radio-button-padding,0px);align-items:center;gap:var(--spacing-x4,8px);display:inline-flex}.root .radio-button-container{box-sizing:border-box;cursor:pointer;flex-shrink:0;width:28px;height:28px;display:inline-block;position:relative}.root .radio-button-container input{opacity:0;position:absolute;top:0;left:0}.root .radio-button-container circle.inner{fill:var(--sd-radio-button-checked-color,var(--color-fg-selection-accent-default,#1467ba))}.root .radio-button-container circle.outer{stroke:var(--sd-radio-button-unchecked-color,var(--color-border-selection-neutral-default,#999))}.root .label{font:var(--text-body);color:var(--color-fg-selection-neutral-default,#111);text-overflow:ellipsis;-webkit-user-select:none;user-select:none;cursor:pointer;padding-top:2px;padding-bottom:2px;padding-right:var(--spacing-x4,8px);overflow-x:hidden}";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region \0@oxc-project+runtime@0.122.0/helpers/decorateMetadata.js
|
|
9
9
|
function c(e, t) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-group.mjs","names":[],"sources":["../scss/button.scss?inline","../radio-button.ts","../scss/group.scss?inline","../radio-button-group.ts"],"sourcesContent":["@use \"@cas-smartdesign/styles/scss/variables/colors\";\n\n:host {\n\tdisplay: block;\n}\n\n:host,\n.label,\n.checkbox {\n\toutline: none;\n}\n\n:host([disabled]) {\n\tpointer-events: none;\n\n\t.root {\n\t\tcursor: default;\n\n\t\tcircle.inner-bg {\n\t\t\tfill: var(--color-bg-interaction-disabled, #e7e7e7);\n\t\t}\n\n\t\tcircle.inner {\n\t\t\tfill: var(--color-fg-interaction-disabled, #999999);\n\t\t}\n\n\t\tcircle.outer {\n\t\t\tstroke: var(--color-border-interaction-disabled, #c6c6c6) !important;\n\t\t}\n\n\t\t.label {\n\t\t\tcolor: var(--color-fg-interaction-disabled, #999999);\n\t\t}\n\t}\n}\n\n:host([checked]) {\n\tcircle.inner {\n\t\tdisplay: block !important;\n\t}\n\tcircle.outer {\n\t\tstroke: var(--sd-radio-button-checked-color, colors.$sd-blue) !important;\n\t}\n}\n\n:host([oneline]) {\n\tmax-width: 100%;\n}\n\n:host([oneline]) .label {\n\twhite-space: pre;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.root {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tvertical-align: middle;\n\twidth: 100%;\n\tpadding: var(--sd-radio-button-padding, 0px);\n\tgap: var(--spacing-x4, 8px);\n\n\t.radio-button-container {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 28px;\n\t\theight: 28px;\n\t\tbox-sizing: border-box;\n\t\tcursor: pointer;\n\t\tflex-shrink: 0;\n\n\t\tinput {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\topacity: 0;\n\t\t}\n\t\tcircle.inner {\n\t\t\tfill: var(--sd-radio-button-checked-color, colors.$sd-blue);\n\t\t}\n\t\tcircle.outer {\n\t\t\tstroke: var(--sd-radio-button-unchecked-color, colors.$sd-grey);\n\t\t}\n\t}\n\n\t.label {\n\t\tfont: var(--text-body);\n\t\tcolor: var(--color-fg-selection-neutral-default, #111111);\n\t\ttext-overflow: ellipsis;\n\t\toverflow-x: hidden;\n\t\tuser-select: none;\n\t\tcursor: pointer;\n\t\tpadding-top: 2px;\n\t\tpadding-bottom: 2px;\n\t\tpadding-right: var(--spacing-x4, 8px);\n\t}\n}\n","import { LitElement, type TemplateResult, html, unsafeCSS, css } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [RadioButton.ID]: RadioButton;\n }\n}\n\nimport style from \"./scss/button.scss?inline\";\nlet idCounter = 0;\n\nexport class RadioButton extends LitElement {\n public static readonly ID = \"sd-radio-button\";\n public static ensureDefined = (): void => {\n if (!customElements.get(RadioButton.ID)) {\n customElements.define(RadioButton.ID, RadioButton);\n }\n };\n @property({ type: Boolean, reflect: true, attribute: true })\n public checked = false;\n @property({ type: String, reflect: true, attribute: true })\n public value = \"\";\n @property({ type: Boolean, reflect: true, attribute: true })\n public disabled = false;\n @property({ type: String, reflect: true, attribute: true })\n public label = \"\";\n\n private a11yID;\n\n constructor() {\n super();\n this.a11yID = RadioButton.ID + \"_\" + idCounter++;\n }\n\n static override get styles() {\n return [\n css`\n ${unsafeCSS(style)}\n `,\n ];\n }\n\n public override render(): TemplateResult {\n return html`\n <div class=\"root\">\n <div class=\"radio-button-container\">\n <input\n type=\"radio\"\n id=\"${this.a11yID}\"\n .checked=\"${this.checked}\"\n ?disabled=\"${this.disabled}\"\n @click=\"${this.handleClick}\"\n class=\"radio-button\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-14 -14 28 28\">\n <circle\n class=\"inner-bg\"\n r=\"8px\"\n style=\"${this.disabled ? \"\" : \"display:none\"}\"\n stroke=\"none\"\n ></circle>\n <circle class=\"inner\" r=\"6px\" style=\"display:none\" stroke=\"none\"></circle>\n <circle class=\"outer\" r=\"9px\" fill=\"transparent\" stroke-width=\"2px\"></circle>\n </svg>\n </div>\n <label class=\"label\" for=\"${this.a11yID}\" @click=\"${this.handleClick}\">${this.label}</label>\n </div>\n `;\n }\n\n private handleClick = (event: MouseEvent): void => {\n event.preventDefault();\n };\n}\n",":host {\n\tdisplay: block;\n}\n\n:host(:focus) {\n\toutline: none;\n}\n\n:host(:focus-visible) ::slotted([focused]) {\n\toutline: 1px solid var(--color-border-interaction-focus, #111);\n\toutline-offset: var(--spacing-x1, 2px);\n\tborder-radius: var(--radius-s, 4px);\n\tz-index: 10 !important;\n}\n\n.buttons-container {\n\tdisplay: inline-flex;\n\talign-items: start;\n\tgap: var(--sd-radio-button-group-gap, 0);\n\tborder-radius: var(--radius-s, 4px);\n\tmax-width: 100%;\n}\n\n.buttons-container.vertical {\n\tflex-direction: column;\n}\n\n.validation-message {\n\tmargin-left: 5px;\n}\n","import SDFieldValidationMessage, { ValidationLevel } from \"@cas-smartdesign/field-validation-message\";\nimport {\n LitElement,\n type TemplateResult,\n html,\n type PropertyValues,\n type ComplexAttributeConverter,\n unsafeCSS,\n css,\n} from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\n\nimport type { LayoutType, IValueChangeEvent } from \"./types\";\n\nimport { RadioButton } from \"./radio-button\";\n\nexport { RadioButton } from \"./radio-button\";\nexport type * from \"./types\";\n\nimport style from \"./scss/group.scss?inline\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [RadioButtonGroup.ID]: RadioButtonGroup;\n }\n interface HTMLElementEventMap {\n \"sd-radio-button-group-value-change\": CustomEvent<IValueChangeEvent>;\n }\n}\n\nexport class RadioButtonGroup extends LitElement {\n public static readonly ID = \"sd-radio-button-group\";\n public static ensureDefined = (): void => {\n RadioButton.ensureDefined();\n if (!customElements.get(RadioButtonGroup.ID)) {\n customElements.define(RadioButtonGroup.ID, RadioButtonGroup);\n }\n };\n @property({ type: String, reflect: true, attribute: true })\n public layout: LayoutType = \"horizontal\";\n @property({ type: String })\n public value: string | undefined = \"\";\n @property({ type: Boolean, reflect: true, attribute: \"uncheck-allowed\" })\n public uncheckAllowed = false;\n @property({ type: Boolean, reflect: true, attribute: true })\n public disabled = false;\n @property({ type: String })\n public validationMessage: string | undefined;\n @property({ type: String })\n public validationIconSrc: string | undefined;\n @property({\n type: {\n fromAttribute(value: string): ValidationLevel | undefined {\n return SDFieldValidationMessage.parseLevel(value);\n },\n toAttribute(value: ValidationLevel | undefined): string | undefined {\n return value != null ? value.toLowerCase() : undefined;\n },\n } as ComplexAttributeConverter,\n reflect: true,\n })\n public validationLevel: ValidationLevel | undefined;\n\n private _buttonsSlot: HTMLSlotElement | undefined;\n private _buttons: HTMLElement[] = [];\n private _focusIndex = -1;\n private _checkedButton: HTMLElement | undefined = undefined;\n\n public get focusIndex(): number {\n return this._focusIndex;\n }\n\n public set focusIndex(index: number) {\n if (index >= -1 && index < this.childElementCount) {\n const oldValue = this._focusIndex;\n this._focusIndex = index;\n if (oldValue !== index) {\n const previousButton = this._buttons[oldValue];\n const currentButton = this._buttons[this.focusIndex];\n this.updateFocused(previousButton, currentButton);\n }\n }\n }\n\n protected override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.buttonsSlot!.addEventListener(\"slotchange\", this.handleSlotChange);\n this.addEventListener(\"focusin\", this.handleFocusIn);\n this.addEventListener(\"focusout\", this.handleFocusOut);\n this.addEventListener(\"keydown\", this.handleKeyDown);\n }\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has(\"disabled\")) {\n if (this.disabled) {\n this.disableButtons();\n } else {\n this.enableButtons();\n }\n }\n }\n\n static override get styles() {\n return [\n css`\n ${unsafeCSS(style)}\n `,\n ];\n }\n public override render(): TemplateResult {\n return html`\n <div\n class=\"buttons-container ${this.layout === \"vertical\" ? \"vertical\" : \"horizontal\"}\"\n @click=\"${ifDefined(this.disabled ? undefined : this.handleButtonClick)}\"\n >\n <slot></slot>\n </div>\n ${this.validationMessage &&\n html`\n <br />\n <sd-field-validation-message\n class=\"validation-message\"\n .message=${this.validationMessage}\n .icon=${this.validationIconSrc}\n .level=${this.validationLevel}\n >\n </sd-field-validation-message>\n `}\n `;\n }\n\n private handleSlotChange = (): void => {\n this._buttons = this.buttonsSlot!.assignedElements() as HTMLElement[];\n this._buttons.forEach((button) => {\n if (!button.hasAttribute(\"disabled\") && this.disabled) {\n button.setAttribute(\"disabled\", \"\");\n }\n // prevent radio buttons to be able to get focus by tabbing\n // as focus is handled by this element\n button.setAttribute(\"tabIndex\", \"-1\");\n this.updateCheckedButton(button);\n });\n };\n\n private updateCheckedButton(button: HTMLElement): void {\n if (!this._checkedButton && this.isChecked(button)) {\n this._checkedButton = button;\n this.updateValue(button.getAttribute(\"value\"));\n } else if (this._checkedButton !== button) {\n // single selection: the first checked button wins; this also\n // initializes aria-pressed=\"false\" on plain (non-radio) buttons\n this.uncheckButton(button);\n }\n }\n\n private handleFocusIn = (event: FocusEvent): void => {\n const target = event.target as HTMLElement;\n const ind = this._buttons.findIndex((button) => button == target);\n this.focusIndex = this.focusIndex >= 0 ? this.focusIndex : this.getNextFocusIndex(ind !== -1 ? ind : 0);\n this.updateFocused(undefined, this._buttons[this.focusIndex]);\n };\n\n private handleFocusOut = (): void => {\n this.updateFocused(this._buttons[this.focusIndex]);\n };\n\n private disableButtons(): void {\n this._buttons?.forEach((button) => {\n button.setAttribute(\"disabled\", \"\");\n });\n }\n\n private enableButtons(): void {\n this._buttons?.forEach((button) => {\n button.removeAttribute(\"disabled\");\n });\n }\n\n private handleButtonClick = (event: MouseEvent): void => {\n // the individual buttons are not focusable\n this.focus();\n const target = this._buttons.find((button) => button.contains(event.target as Node));\n if (target?.matches(\"[disabled], [aria-disabled='true']\")) {\n return;\n }\n const targetIndex = this._buttons.findIndex((button) => button == target);\n if (targetIndex >= 0) {\n this.focusIndex = targetIndex;\n this.updateChecked();\n }\n };\n\n private fireValueChangeEvent(): void {\n this.dispatchEvent(\n new CustomEvent<IValueChangeEvent>(\"sd-radio-button-group-value-change\", {\n detail: {\n value: this.value,\n selectedIndex: this.selectedIndex,\n },\n }),\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n let shouldPrevent = true;\n switch (event.key) {\n case \"Down\":\n case \"ArrowDown\":\n case \"Right\":\n case \"ArrowRight\": {\n this.focusNext();\n break;\n }\n case \"Up\":\n case \"ArrowUp\":\n case \"Left\":\n case \"ArrowLeft\": {\n this.focusPrevious();\n break;\n }\n case \"Enter\": {\n this.updateChecked();\n break;\n }\n default: {\n shouldPrevent = false;\n }\n }\n if (shouldPrevent) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private focusNext() {\n const newIndex = this.getNextFocusIndex(this.focusIndex + 1);\n this.focusIndex = newIndex !== -1 ? newIndex : this.getNextFocusIndex(0);\n if (!this.uncheckAllowed) {\n this.updateChecked();\n }\n }\n\n private focusPrevious() {\n const newIndex = this.getPreviousFocusIndex(this.focusIndex - 1);\n this.focusIndex = newIndex !== -1 ? newIndex : this.getPreviousFocusIndex(this.childElementCount - 1);\n if (!this.uncheckAllowed) {\n this.updateChecked();\n }\n }\n\n private getNextFocusIndex(index: number): number {\n for (let i = index; i < this.childElementCount; i++) {\n const button = this._buttons[i];\n if (button != null && this.isFocusable(button)) {\n return i;\n }\n }\n\n return -1;\n }\n\n private getPreviousFocusIndex(index: number): number {\n for (let i = index; i >= 0; i--) {\n const button = this._buttons[i];\n if (button != null && this.isFocusable(button)) {\n return i;\n }\n }\n\n return -1;\n }\n\n private isFocusable(button: HTMLElement): boolean {\n return !button.matches(\"[disabled], [aria-disabled='true']\");\n }\n\n private updateChecked(): void {\n const previousChecked = this._checkedButton;\n const currentChecked = this._buttons[this.focusIndex];\n if (!currentChecked || currentChecked.matches(\"[disabled], [aria-disabled='true']\")) {\n return;\n }\n this._checkedButton = currentChecked;\n if (previousChecked && previousChecked !== currentChecked) {\n this.uncheckButton(previousChecked);\n }\n if (currentChecked) {\n this.toggleButton(currentChecked);\n }\n }\n\n private toggleButton(button: HTMLElement): void {\n const checked = this.isChecked(button);\n if (checked) {\n if (this.uncheckAllowed) {\n this.uncheckButton(button);\n this._checkedButton = undefined;\n this.updateValue(\"\");\n }\n } else {\n this.checkButton(button);\n this.updateValue(button.getAttribute(\"value\"));\n }\n }\n\n private updateValue(newValue: string | null | undefined): void {\n this.value = newValue ?? undefined;\n this.fireValueChangeEvent();\n }\n\n private updateFocused(previousFocused?: HTMLElement, currentFocused?: HTMLElement): void {\n previousFocused?.removeAttribute?.(\"focused\");\n currentFocused?.setAttribute?.(\"focused\", \"\");\n }\n\n private isRadioButton(button: HTMLElement): boolean {\n return button.localName === RadioButton.ID;\n }\n\n private isChecked(button: HTMLElement): boolean {\n return this.isRadioButton(button)\n ? button.hasAttribute(\"checked\")\n : button.getAttribute(\"aria-pressed\") === \"true\";\n }\n\n private checkButton(button: HTMLElement): void {\n if (this.isRadioButton(button)) {\n button.setAttribute(\"checked\", \"\");\n } else {\n button.setAttribute(\"aria-pressed\", \"true\");\n }\n }\n\n private uncheckButton(button: HTMLElement): void {\n if (this.isRadioButton(button)) {\n button.removeAttribute(\"checked\");\n } else {\n button.setAttribute(\"aria-pressed\", \"false\");\n }\n }\n\n private get buttonsSlot(): HTMLSlotElement | undefined {\n if (this.shadowRoot && !this._buttonsSlot) {\n this._buttonsSlot = this.shadowRoot.querySelector(\"slot\") ?? undefined;\n }\n return this._buttonsSlot;\n }\n\n private get selectedIndex(): number {\n if (this._buttons == undefined || this._checkedButton == undefined) {\n return -1;\n }\n return this._buttons.indexOf(this._checkedButton);\n }\n}\n\nRadioButtonGroup.ensureDefined();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AC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AS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAM,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAE3D,EAAS,EAAE,MAAM,QAAQ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,qBAAA,KAAA,EAAA,KAE1B,EAAS,EAAE,MAAM,QAAQ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,qBAAA,KAAA,EAAA,KAE1B,EAAS;CACN,MAAM;EACF,cAAc,GAA4C;AACtD,UAAO,EAAyB,WAAW,EAAM;;EAErD,YAAY,GAAwD;AAChE,UAAO,GAAsB,aAAa;;EAEjD;CACD,SAAS;CACZ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,mBAAA,KAAA,EAAA,EAySN,EAAiB,eAAe"}
|
|
1
|
+
{"version":3,"file":"radio-button-group.mjs","names":[],"sources":["../scss/button.scss?inline","../radio-button.ts","../scss/group.scss?inline","../radio-button-group.ts"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n\n:host,\n.label,\n.checkbox {\n\toutline: none;\n}\n\n:host([disabled]) {\n\tpointer-events: none;\n\n\t.root {\n\t\tcursor: default;\n\n\t\tcircle.inner-bg {\n\t\t\tfill: var(--color-bg-interaction-disabled, #e7e7e7);\n\t\t}\n\n\t\tcircle.inner {\n\t\t\tfill: var(--color-fg-interaction-disabled, #999999);\n\t\t}\n\n\t\tcircle.outer {\n\t\t\tstroke: var(--color-border-interaction-disabled, #c6c6c6) !important;\n\t\t}\n\n\t\t.label {\n\t\t\tcolor: var(--color-fg-interaction-disabled, #999999);\n\t\t}\n\t}\n}\n\n:host([checked]) {\n\tcircle.inner {\n\t\tdisplay: block !important;\n\t}\n\tcircle.outer {\n\t\tstroke: var(--sd-radio-button-checked-color, var(--color-fg-selection-accent-default, #1467ba)) !important;\n\t}\n}\n\n:host([oneline]) {\n\tmax-width: 100%;\n}\n\n:host([oneline]) .label {\n\twhite-space: pre;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.root {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tvertical-align: middle;\n\twidth: 100%;\n\tpadding: var(--sd-radio-button-padding, 0px);\n\tgap: var(--spacing-x4, 8px);\n\n\t.radio-button-container {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 28px;\n\t\theight: 28px;\n\t\tbox-sizing: border-box;\n\t\tcursor: pointer;\n\t\tflex-shrink: 0;\n\n\t\tinput {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\topacity: 0;\n\t\t}\n\t\tcircle.inner {\n\t\t\tfill: var(--sd-radio-button-checked-color, var(--color-fg-selection-accent-default, #1467ba));\n\t\t}\n\t\tcircle.outer {\n\t\t\tstroke: var(--sd-radio-button-unchecked-color, var(--color-border-selection-neutral-default, #999999));\n\t\t}\n\t}\n\n\t.label {\n\t\tfont: var(--text-body);\n\t\tcolor: var(--color-fg-selection-neutral-default, #111111);\n\t\ttext-overflow: ellipsis;\n\t\toverflow-x: hidden;\n\t\tuser-select: none;\n\t\tcursor: pointer;\n\t\tpadding-top: 2px;\n\t\tpadding-bottom: 2px;\n\t\tpadding-right: var(--spacing-x4, 8px);\n\t}\n}\n","import { LitElement, type TemplateResult, html, unsafeCSS, css } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [RadioButton.ID]: RadioButton;\n }\n}\n\nimport style from \"./scss/button.scss?inline\";\nlet idCounter = 0;\n\nexport class RadioButton extends LitElement {\n public static readonly ID = \"sd-radio-button\";\n public static ensureDefined = (): void => {\n if (!customElements.get(RadioButton.ID)) {\n customElements.define(RadioButton.ID, RadioButton);\n }\n };\n @property({ type: Boolean, reflect: true, attribute: true })\n public checked = false;\n @property({ type: String, reflect: true, attribute: true })\n public value = \"\";\n @property({ type: Boolean, reflect: true, attribute: true })\n public disabled = false;\n @property({ type: String, reflect: true, attribute: true })\n public label = \"\";\n\n private a11yID;\n\n constructor() {\n super();\n this.a11yID = RadioButton.ID + \"_\" + idCounter++;\n }\n\n static override get styles() {\n return [\n css`\n ${unsafeCSS(style)}\n `,\n ];\n }\n\n public override render(): TemplateResult {\n return html`\n <div class=\"root\">\n <div class=\"radio-button-container\">\n <input\n type=\"radio\"\n id=\"${this.a11yID}\"\n .checked=\"${this.checked}\"\n ?disabled=\"${this.disabled}\"\n @click=\"${this.handleClick}\"\n class=\"radio-button\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-14 -14 28 28\">\n <circle\n class=\"inner-bg\"\n r=\"8px\"\n style=\"${this.disabled ? \"\" : \"display:none\"}\"\n stroke=\"none\"\n ></circle>\n <circle class=\"inner\" r=\"6px\" style=\"display:none\" stroke=\"none\"></circle>\n <circle class=\"outer\" r=\"9px\" fill=\"transparent\" stroke-width=\"2px\"></circle>\n </svg>\n </div>\n <label class=\"label\" for=\"${this.a11yID}\" @click=\"${this.handleClick}\">${this.label}</label>\n </div>\n `;\n }\n\n private handleClick = (event: MouseEvent): void => {\n event.preventDefault();\n };\n}\n",":host {\n\tdisplay: block;\n}\n\n:host(:focus) {\n\toutline: none;\n}\n\n:host(:focus-visible) ::slotted([focused]) {\n\toutline: 1px solid var(--color-border-interaction-focus, #111);\n\toutline-offset: var(--spacing-x1, 2px);\n\tborder-radius: var(--radius-s, 4px);\n\tz-index: 10 !important;\n}\n\n.buttons-container {\n\tdisplay: inline-flex;\n\talign-items: start;\n\tgap: var(--sd-radio-button-group-gap, 0);\n\tborder-radius: var(--radius-s, 4px);\n\tmax-width: 100%;\n}\n\n.buttons-container.vertical {\n\tflex-direction: column;\n}\n\n.validation-message {\n\tmargin-left: 5px;\n}\n","import SDFieldValidationMessage, { ValidationLevel } from \"@cas-smartdesign/field-validation-message\";\nimport {\n LitElement,\n type TemplateResult,\n html,\n type PropertyValues,\n type ComplexAttributeConverter,\n unsafeCSS,\n css,\n} from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\n\nimport type { LayoutType, IValueChangeEvent } from \"./types\";\n\nimport { RadioButton } from \"./radio-button\";\n\nexport { RadioButton } from \"./radio-button\";\nexport type * from \"./types\";\n\nimport style from \"./scss/group.scss?inline\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [RadioButtonGroup.ID]: RadioButtonGroup;\n }\n interface HTMLElementEventMap {\n \"sd-radio-button-group-value-change\": CustomEvent<IValueChangeEvent>;\n }\n}\n\nexport class RadioButtonGroup extends LitElement {\n public static readonly ID = \"sd-radio-button-group\";\n public static ensureDefined = (): void => {\n RadioButton.ensureDefined();\n if (!customElements.get(RadioButtonGroup.ID)) {\n customElements.define(RadioButtonGroup.ID, RadioButtonGroup);\n }\n };\n @property({ type: String, reflect: true, attribute: true })\n public layout: LayoutType = \"horizontal\";\n @property({ type: String })\n public value: string | undefined = \"\";\n @property({ type: Boolean, reflect: true, attribute: \"uncheck-allowed\" })\n public uncheckAllowed = false;\n @property({ type: Boolean, reflect: true, attribute: true })\n public disabled = false;\n @property({ type: String })\n public validationMessage: string | undefined;\n @property({ type: String })\n public validationIconSrc: string | undefined;\n @property({\n type: {\n fromAttribute(value: string): ValidationLevel | undefined {\n return SDFieldValidationMessage.parseLevel(value);\n },\n toAttribute(value: ValidationLevel | undefined): string | undefined {\n return value != null ? value.toLowerCase() : undefined;\n },\n } as ComplexAttributeConverter,\n reflect: true,\n })\n public validationLevel: ValidationLevel | undefined;\n\n private _buttonsSlot: HTMLSlotElement | undefined;\n private _buttons: HTMLElement[] = [];\n private _focusIndex = -1;\n private _checkedButton: HTMLElement | undefined = undefined;\n\n public get focusIndex(): number {\n return this._focusIndex;\n }\n\n public set focusIndex(index: number) {\n if (index >= -1 && index < this.childElementCount) {\n const oldValue = this._focusIndex;\n this._focusIndex = index;\n if (oldValue !== index) {\n const previousButton = this._buttons[oldValue];\n const currentButton = this._buttons[this.focusIndex];\n this.updateFocused(previousButton, currentButton);\n }\n }\n }\n\n protected override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.buttonsSlot!.addEventListener(\"slotchange\", this.handleSlotChange);\n this.addEventListener(\"focusin\", this.handleFocusIn);\n this.addEventListener(\"focusout\", this.handleFocusOut);\n this.addEventListener(\"keydown\", this.handleKeyDown);\n }\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has(\"disabled\")) {\n if (this.disabled) {\n this.disableButtons();\n } else {\n this.enableButtons();\n }\n }\n }\n\n static override get styles() {\n return [\n css`\n ${unsafeCSS(style)}\n `,\n ];\n }\n public override render(): TemplateResult {\n return html`\n <div\n class=\"buttons-container ${this.layout === \"vertical\" ? \"vertical\" : \"horizontal\"}\"\n @click=\"${ifDefined(this.disabled ? undefined : this.handleButtonClick)}\"\n >\n <slot></slot>\n </div>\n ${this.validationMessage &&\n html`\n <br />\n <sd-field-validation-message\n class=\"validation-message\"\n .message=${this.validationMessage}\n .icon=${this.validationIconSrc}\n .level=${this.validationLevel}\n >\n </sd-field-validation-message>\n `}\n `;\n }\n\n private handleSlotChange = (): void => {\n this._buttons = this.buttonsSlot!.assignedElements() as HTMLElement[];\n this._buttons.forEach((button) => {\n if (!button.hasAttribute(\"disabled\") && this.disabled) {\n button.setAttribute(\"disabled\", \"\");\n }\n // prevent radio buttons to be able to get focus by tabbing\n // as focus is handled by this element\n button.setAttribute(\"tabIndex\", \"-1\");\n this.updateCheckedButton(button);\n });\n };\n\n private updateCheckedButton(button: HTMLElement): void {\n if (!this._checkedButton && this.isChecked(button)) {\n this._checkedButton = button;\n this.updateValue(button.getAttribute(\"value\"));\n } else if (this._checkedButton !== button) {\n // single selection: the first checked button wins; this also\n // initializes aria-pressed=\"false\" on plain (non-radio) buttons\n this.uncheckButton(button);\n }\n }\n\n private handleFocusIn = (event: FocusEvent): void => {\n const target = event.target as HTMLElement;\n const ind = this._buttons.findIndex((button) => button == target);\n this.focusIndex = this.focusIndex >= 0 ? this.focusIndex : this.getNextFocusIndex(ind !== -1 ? ind : 0);\n this.updateFocused(undefined, this._buttons[this.focusIndex]);\n };\n\n private handleFocusOut = (): void => {\n this.updateFocused(this._buttons[this.focusIndex]);\n };\n\n private disableButtons(): void {\n this._buttons?.forEach((button) => {\n button.setAttribute(\"disabled\", \"\");\n });\n }\n\n private enableButtons(): void {\n this._buttons?.forEach((button) => {\n button.removeAttribute(\"disabled\");\n });\n }\n\n private handleButtonClick = (event: MouseEvent): void => {\n // the individual buttons are not focusable\n this.focus();\n const target = this._buttons.find((button) => button.contains(event.target as Node));\n if (target?.matches(\"[disabled], [aria-disabled='true']\")) {\n return;\n }\n const targetIndex = this._buttons.findIndex((button) => button == target);\n if (targetIndex >= 0) {\n this.focusIndex = targetIndex;\n this.updateChecked();\n }\n };\n\n private fireValueChangeEvent(): void {\n this.dispatchEvent(\n new CustomEvent<IValueChangeEvent>(\"sd-radio-button-group-value-change\", {\n detail: {\n value: this.value,\n selectedIndex: this.selectedIndex,\n },\n }),\n );\n }\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n let shouldPrevent = true;\n switch (event.key) {\n case \"Down\":\n case \"ArrowDown\":\n case \"Right\":\n case \"ArrowRight\": {\n this.focusNext();\n break;\n }\n case \"Up\":\n case \"ArrowUp\":\n case \"Left\":\n case \"ArrowLeft\": {\n this.focusPrevious();\n break;\n }\n case \"Enter\": {\n this.updateChecked();\n break;\n }\n default: {\n shouldPrevent = false;\n }\n }\n if (shouldPrevent) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private focusNext() {\n const newIndex = this.getNextFocusIndex(this.focusIndex + 1);\n this.focusIndex = newIndex !== -1 ? newIndex : this.getNextFocusIndex(0);\n if (!this.uncheckAllowed) {\n this.updateChecked();\n }\n }\n\n private focusPrevious() {\n const newIndex = this.getPreviousFocusIndex(this.focusIndex - 1);\n this.focusIndex = newIndex !== -1 ? newIndex : this.getPreviousFocusIndex(this.childElementCount - 1);\n if (!this.uncheckAllowed) {\n this.updateChecked();\n }\n }\n\n private getNextFocusIndex(index: number): number {\n for (let i = index; i < this.childElementCount; i++) {\n const button = this._buttons[i];\n if (button != null && this.isFocusable(button)) {\n return i;\n }\n }\n\n return -1;\n }\n\n private getPreviousFocusIndex(index: number): number {\n for (let i = index; i >= 0; i--) {\n const button = this._buttons[i];\n if (button != null && this.isFocusable(button)) {\n return i;\n }\n }\n\n return -1;\n }\n\n private isFocusable(button: HTMLElement): boolean {\n return !button.matches(\"[disabled], [aria-disabled='true']\");\n }\n\n private updateChecked(): void {\n const previousChecked = this._checkedButton;\n const currentChecked = this._buttons[this.focusIndex];\n if (!currentChecked || currentChecked.matches(\"[disabled], [aria-disabled='true']\")) {\n return;\n }\n this._checkedButton = currentChecked;\n if (previousChecked && previousChecked !== currentChecked) {\n this.uncheckButton(previousChecked);\n }\n if (currentChecked) {\n this.toggleButton(currentChecked);\n }\n }\n\n private toggleButton(button: HTMLElement): void {\n const checked = this.isChecked(button);\n if (checked) {\n if (this.uncheckAllowed) {\n this.uncheckButton(button);\n this._checkedButton = undefined;\n this.updateValue(\"\");\n }\n } else {\n this.checkButton(button);\n this.updateValue(button.getAttribute(\"value\"));\n }\n }\n\n private updateValue(newValue: string | null | undefined): void {\n this.value = newValue ?? undefined;\n this.fireValueChangeEvent();\n }\n\n private updateFocused(previousFocused?: HTMLElement, currentFocused?: HTMLElement): void {\n previousFocused?.removeAttribute?.(\"focused\");\n currentFocused?.setAttribute?.(\"focused\", \"\");\n }\n\n private isRadioButton(button: HTMLElement): boolean {\n return button.localName === RadioButton.ID;\n }\n\n private isChecked(button: HTMLElement): boolean {\n return this.isRadioButton(button)\n ? button.hasAttribute(\"checked\")\n : button.getAttribute(\"aria-pressed\") === \"true\";\n }\n\n private checkButton(button: HTMLElement): void {\n if (this.isRadioButton(button)) {\n button.setAttribute(\"checked\", \"\");\n } else {\n button.setAttribute(\"aria-pressed\", \"true\");\n }\n }\n\n private uncheckButton(button: HTMLElement): void {\n if (this.isRadioButton(button)) {\n button.removeAttribute(\"checked\");\n } else {\n button.setAttribute(\"aria-pressed\", \"false\");\n }\n }\n\n private get buttonsSlot(): HTMLSlotElement | undefined {\n if (this.shadowRoot && !this._buttonsSlot) {\n this._buttonsSlot = this.shadowRoot.querySelector(\"slot\") ?? undefined;\n }\n return this._buttonsSlot;\n }\n\n private get selectedIndex(): number {\n if (this._buttons == undefined || this._checkedButton == undefined) {\n return -1;\n }\n return this._buttons.indexOf(this._checkedButton);\n }\n}\n\nRadioButtonGroup.ensureDefined();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;ACUA,IAAI,IAAY,GAEH,IAAb,MAAa,UAAoB,EAAW;;YACZ;;;6BACc;AACtC,GAAK,eAAe,IAAI,EAAY,GAAG,IACnC,eAAe,OAAO,EAAY,IAAI,EAAY;;;CAc1D,cAAc;AAEV,EADA,OAAO,iBAXM,iBAEF,oBAEG,iBAEH,wBA6CQ,MAA4B;AAC/C,KAAM,gBAAgB;KAxCtB,KAAK,SAAS,EAAY,KAAK,MAAM;;CAGzC,WAAoB,SAAS;AACzB,SAAO,CACH,CAAG;kBACG,EAAU,EAAM,CAAC;cAE1B;;CAGL,SAAyC;AACrC,SAAO,CAAI;;;;;8BAKW,KAAK,OAAO;oCACN,KAAK,QAAQ;qCACZ,KAAK,SAAS;kCACjB,KAAK,YAAY;;;;;;;qCAOd,KAAK,WAAW,KAAK,eAAe;;;;;;;4CAO7B,KAAK,OAAO,YAAY,KAAK,YAAY,IAAI,KAAK,MAAM;;;;;GA/C/F,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAM,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,WAAA,KAAA,EAAA,KAE3D,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;CAAM,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAA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kB,OAC9C,KAEJ,KAAK,SAAS,QAAQ,KAAK,eAAe;;;GA3TpD,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;CAAM,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,UAAA,KAAA,EAAA,KAE1D,EAAS,EAAE,MAAM,QAAQ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,SAAA,KAAA,EAAA,KAE1B,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAmB,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,kBAAA,KAAA,EAAA,KAExE,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAM,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,YAAA,KAAA,EAAA,KAE3D,EAAS,EAAE,MAAM,QAAQ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,qBAAA,KAAA,EAAA,KAE1B,EAAS,EAAE,MAAM,QAAQ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,qBAAA,KAAA,EAAA,KAE1B,EAAS;CACN,MAAM;EACF,cAAc,GAA4C;AACtD,UAAO,EAAyB,WAAW,EAAM;;EAErD,YAAY,GAAwD;AAChE,UAAO,GAAsB,aAAa;;EAEjD;CACD,SAAS;CACZ,CAAC,EAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,mBAAA,KAAA,EAAA,EAySN,EAAiB,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cas-smartdesign/radio-button-group",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Radio button and radio button group elements with SmartDesign look & feel",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"files": [
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"lit": "^3.3.2",
|
|
20
|
-
"@cas-smartdesign/field-validation-message": "^
|
|
21
|
-
"@cas-smartdesign/styles": "^3.9.0"
|
|
20
|
+
"@cas-smartdesign/field-validation-message": "^7.0.0"
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
24
23
|
"@cas-smartdesign/button": "^7.1.1",
|