@aurodesignsystem/auro-formkit 3.3.0-beta.1 → 3.3.0
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/CHANGELOG.md +86 -1
- package/components/bibtemplate/dist/headerVersion.d.ts +1 -1
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +10 -80
- package/components/bibtemplate/dist/registered.js +10 -80
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +1 -0
- package/components/checkbox/demo/api.md +4 -5
- package/components/checkbox/demo/api.min.js +66 -15
- package/components/checkbox/demo/index.html +1 -0
- package/components/checkbox/demo/index.min.js +66 -15
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +23 -2
- package/components/checkbox/dist/index.js +59 -8
- package/components/checkbox/dist/registered.js +59 -8
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.min.js +154 -189
- package/components/combobox/demo/index.html +1 -0
- package/components/combobox/demo/index.min.js +154 -189
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +2 -10
- package/components/combobox/dist/index.js +130 -165
- package/components/combobox/dist/registered.js +130 -165
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.html +1 -0
- package/components/counter/demo/api.min.js +59 -120
- package/components/counter/demo/index.html +1 -0
- package/components/counter/demo/index.min.js +59 -120
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +40 -101
- package/components/counter/dist/registered.js +40 -101
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.html +1 -0
- package/components/datepicker/demo/api.min.js +105 -153
- package/components/datepicker/demo/index.html +1 -0
- package/components/datepicker/demo/index.min.js +105 -153
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +8 -0
- package/components/datepicker/dist/index.js +79 -127
- package/components/datepicker/dist/registered.js +79 -127
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.html +1 -0
- package/components/dropdown/demo/api.min.js +18 -16
- package/components/dropdown/demo/index.html +1 -0
- package/components/dropdown/demo/index.min.js +18 -16
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +7 -5
- package/components/dropdown/dist/registered.js +7 -5
- package/components/form/README.md +1 -1
- package/components/form/demo/api.min.js +5 -5
- package/components/form/demo/index.min.js +5 -5
- package/components/form/demo/readme.md +1 -1
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.html +1 -0
- package/components/input/demo/api.min.js +69 -57
- package/components/input/demo/index.html +1 -0
- package/components/input/demo/index.min.js +69 -57
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/base-input.d.ts +8 -0
- package/components/input/dist/index.js +31 -19
- package/components/input/dist/registered.js +31 -19
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.html +1 -0
- package/components/menu/demo/api.min.js +10 -10
- package/components/menu/demo/index.html +1 -0
- package/components/menu/demo/index.min.js +10 -10
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +3 -3
- package/components/menu/dist/registered.js +3 -3
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.html +1 -0
- package/components/radio/demo/api.md +1 -0
- package/components/radio/demo/api.min.js +42 -18
- package/components/radio/demo/index.html +1 -0
- package/components/radio/demo/index.md +42 -0
- package/components/radio/demo/index.min.js +42 -18
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/auro-radio-group.d.ts +8 -0
- package/components/radio/dist/auro-radio.d.ts +5 -0
- package/components/radio/dist/index.js +35 -11
- package/components/radio/dist/registered.js +35 -11
- package/components/select/README.md +1 -1
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.md +4 -5
- package/components/select/demo/api.min.js +84 -132
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.min.js +84 -132
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/auro-select.d.ts +16 -2
- package/components/select/dist/index.js +65 -113
- package/components/select/dist/registered.js +65 -113
- package/package.json +3 -3
|
@@ -28,26 +28,26 @@ function resetStateExample() {
|
|
|
28
28
|
* Copyright 2019 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*/
|
|
31
|
-
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$
|
|
31
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$3)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:
|
|
37
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.0");
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2017 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
43
|
*/
|
|
44
|
-
const t$1=globalThis,i$3=t$1.trustedTypes,s$
|
|
44
|
+
const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.0");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2017 Google LLC
|
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/class
|
|
50
|
+
*/const s$1=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.0");
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* @license
|
|
@@ -164,7 +164,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
164
164
|
*/
|
|
165
165
|
|
|
166
166
|
// build the component class
|
|
167
|
-
class AuroRadio extends
|
|
167
|
+
class AuroRadio extends i$2 {
|
|
168
168
|
constructor() {
|
|
169
169
|
super();
|
|
170
170
|
this.checked = false;
|
|
@@ -173,6 +173,7 @@ class AuroRadio extends r {
|
|
|
173
173
|
this.error = false;
|
|
174
174
|
this.onDark = false;
|
|
175
175
|
this.tabIndex = -1;
|
|
176
|
+
this.touched = false;
|
|
176
177
|
|
|
177
178
|
/**
|
|
178
179
|
* @private
|
|
@@ -218,6 +219,10 @@ class AuroRadio extends r {
|
|
|
218
219
|
tabIndex: {
|
|
219
220
|
type: Number,
|
|
220
221
|
reflect: true
|
|
222
|
+
},
|
|
223
|
+
touched: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
reflect: true
|
|
221
226
|
}
|
|
222
227
|
};
|
|
223
228
|
}
|
|
@@ -269,6 +274,7 @@ class AuroRadio extends r {
|
|
|
269
274
|
* @returns {void}
|
|
270
275
|
*/
|
|
271
276
|
handleFocus(event) {
|
|
277
|
+
this.touched = true;
|
|
272
278
|
this.dispatchEvent(new CustomEvent('focusSelected', {
|
|
273
279
|
bubbles: true,
|
|
274
280
|
composed: true,
|
|
@@ -295,6 +301,7 @@ class AuroRadio extends r {
|
|
|
295
301
|
* @returns {void}
|
|
296
302
|
*/
|
|
297
303
|
reset() {
|
|
304
|
+
this.touched = false;
|
|
298
305
|
this.checked = false;
|
|
299
306
|
this.error = false;
|
|
300
307
|
}
|
|
@@ -832,6 +839,7 @@ class AuroFormValidation {
|
|
|
832
839
|
reset(elem) {
|
|
833
840
|
elem.validity = undefined;
|
|
834
841
|
elem.value = undefined;
|
|
842
|
+
elem.touched = false;
|
|
835
843
|
|
|
836
844
|
// Resets the second value of the datepicker in range state
|
|
837
845
|
if (elem.valueEnd) {
|
|
@@ -969,7 +977,7 @@ class AuroFormValidation {
|
|
|
969
977
|
} else if (elem.type === 'date' && elem.value?.length > 0) {
|
|
970
978
|
|
|
971
979
|
// Guard Clause: if the value is too short
|
|
972
|
-
if (elem.value
|
|
980
|
+
if (elem.value?.length < elem.lengthForType) {
|
|
973
981
|
|
|
974
982
|
elem.validity = 'tooShort';
|
|
975
983
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
@@ -1039,11 +1047,17 @@ class AuroFormValidation {
|
|
|
1039
1047
|
this.getAuroInputs(elem);
|
|
1040
1048
|
|
|
1041
1049
|
// Validate only if noValidate is not true and the input does not have focus
|
|
1042
|
-
|
|
1050
|
+
let validationShouldRun =
|
|
1051
|
+
force ||
|
|
1052
|
+
(!elem.contains(document.activeElement) &&
|
|
1053
|
+
(elem.touched ||
|
|
1054
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1055
|
+
elem.validateOnInput;
|
|
1043
1056
|
|
|
1044
1057
|
if (elem.hasAttribute('error')) {
|
|
1045
1058
|
elem.validity = 'customError';
|
|
1046
1059
|
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1060
|
+
validationShouldRun = false;
|
|
1047
1061
|
} else if (validationShouldRun) {
|
|
1048
1062
|
elem.validity = 'valid';
|
|
1049
1063
|
elem.errorMessage = '';
|
|
@@ -1064,7 +1078,7 @@ class AuroFormValidation {
|
|
|
1064
1078
|
}
|
|
1065
1079
|
}
|
|
1066
1080
|
|
|
1067
|
-
if (!hasValue && elem.required) {
|
|
1081
|
+
if (!hasValue && elem.required && elem.touched) {
|
|
1068
1082
|
elem.validity = 'valueMissing';
|
|
1069
1083
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1070
1084
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -1075,7 +1089,7 @@ class AuroFormValidation {
|
|
|
1075
1089
|
}
|
|
1076
1090
|
}
|
|
1077
1091
|
|
|
1078
|
-
if (this.auroInputElements?.length > 0) {
|
|
1092
|
+
if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
|
|
1079
1093
|
elem.validity = this.auroInputElements[0].validity;
|
|
1080
1094
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1081
1095
|
|
|
@@ -1154,7 +1168,7 @@ class AuroFormValidation {
|
|
|
1154
1168
|
}
|
|
1155
1169
|
}
|
|
1156
1170
|
} else {
|
|
1157
|
-
elem.errorMessage =
|
|
1171
|
+
elem.errorMessage = '';
|
|
1158
1172
|
}
|
|
1159
1173
|
}
|
|
1160
1174
|
}
|
|
@@ -1201,7 +1215,7 @@ class AuroDependencyVersioning {
|
|
|
1201
1215
|
|
|
1202
1216
|
var colorCss = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1203
1217
|
|
|
1204
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0
|
|
1218
|
+
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1205
1219
|
|
|
1206
1220
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1207
1221
|
|
|
@@ -1284,7 +1298,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
1284
1298
|
*
|
|
1285
1299
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
1286
1300
|
*/
|
|
1287
|
-
class AuroHelpText extends
|
|
1301
|
+
class AuroHelpText extends i$2 {
|
|
1288
1302
|
|
|
1289
1303
|
constructor() {
|
|
1290
1304
|
super();
|
|
@@ -1433,7 +1447,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1433
1447
|
* @event input - Notifies every time the value prop of the element is changed.
|
|
1434
1448
|
*/
|
|
1435
1449
|
|
|
1436
|
-
class AuroRadioGroup extends
|
|
1450
|
+
class AuroRadioGroup extends i$2 {
|
|
1437
1451
|
constructor() {
|
|
1438
1452
|
super();
|
|
1439
1453
|
this.disabled = false;
|
|
@@ -1443,6 +1457,7 @@ class AuroRadioGroup extends r {
|
|
|
1443
1457
|
this.value = undefined;
|
|
1444
1458
|
this.optionSelected = undefined;
|
|
1445
1459
|
this.onDark = false;
|
|
1460
|
+
this.touched = false;
|
|
1446
1461
|
|
|
1447
1462
|
/**
|
|
1448
1463
|
* @private
|
|
@@ -1524,6 +1539,18 @@ class AuroRadioGroup extends r {
|
|
|
1524
1539
|
},
|
|
1525
1540
|
optionSelected: {
|
|
1526
1541
|
type: Object
|
|
1542
|
+
},
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Indicates whether the radio group is in a dirty state (has been interacted with).
|
|
1546
|
+
* @type {boolean}
|
|
1547
|
+
* @default false
|
|
1548
|
+
* @private
|
|
1549
|
+
*/
|
|
1550
|
+
touched: {
|
|
1551
|
+
type: Boolean,
|
|
1552
|
+
reflect: true,
|
|
1553
|
+
attribute: false
|
|
1527
1554
|
}
|
|
1528
1555
|
};
|
|
1529
1556
|
}
|
|
@@ -1579,10 +1606,7 @@ class AuroRadioGroup extends r {
|
|
|
1579
1606
|
* @returns {void}
|
|
1580
1607
|
*/
|
|
1581
1608
|
handleRadioBlur() {
|
|
1582
|
-
|
|
1583
|
-
this.value = '';
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1609
|
+
this.touched = true;
|
|
1586
1610
|
this.validation.validate(this);
|
|
1587
1611
|
}
|
|
1588
1612
|
|
|
@@ -1689,7 +1713,7 @@ class AuroRadioGroup extends r {
|
|
|
1689
1713
|
* @returns {void}
|
|
1690
1714
|
*/
|
|
1691
1715
|
handleItems() {
|
|
1692
|
-
this.items = [...this.querySelectorAll(':scope
|
|
1716
|
+
this.items = [...this.querySelectorAll(':scope auro-radio, :scope [auro-radio]')];
|
|
1693
1717
|
this.initializeIndex();
|
|
1694
1718
|
|
|
1695
1719
|
if (this.disabled) {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
|
|
27
27
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
28
28
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
29
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/essentials-as.css" />
|
|
29
30
|
</head>
|
|
30
31
|
<body class="auro-markdown">
|
|
31
32
|
<main></main>
|
|
@@ -105,4 +105,46 @@ This is a default configuration using the `<auro-radio-group>` and `<auro-radio>
|
|
|
105
105
|
<auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
|
|
106
106
|
</auro-radio-group>
|
|
107
107
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
|
+
</auro-accordion>
|
|
109
|
+
|
|
110
|
+
### Accordion Nested Group
|
|
111
|
+
|
|
112
|
+
This example shows how to use `<auro-accordion>` with the `<auro-radio-group>` and `<auro-radio>` elements for
|
|
113
|
+
nested/optional groups (such as a "More Options" section in a payment processor).
|
|
114
|
+
|
|
115
|
+
<div class="exampleWrapper">
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/accordionExample.html) -->
|
|
117
|
+
<!-- The below content is automatically added from ./../apiExamples/accordionExample.html -->
|
|
118
|
+
<auro-radio-group>
|
|
119
|
+
<span slot="legend">Accordion Test</span>
|
|
120
|
+
<auro-radio id="basicGroupRadio1" label="Credit or debit card" name="creditordebit" value="credit"></auro-radio>
|
|
121
|
+
<auro-radio id="basicGroupRadio2" label="Apple Pay" name="applePay" value="applePay"></auro-radio>
|
|
122
|
+
<auro-radio id="basicGroupRadio3" label="Alaska Airlines Commercial Account" name="alaskaCommercial" value="alaskaCommercial"></auro-radio>
|
|
123
|
+
<auro-accordion>
|
|
124
|
+
<span slot="trigger">More payment options</span>
|
|
125
|
+
<auro-radio id="basicGroupRadio4" label="Click to pay" name="manualCredit" value="manualCredit"></auro-radio>
|
|
126
|
+
<auro-radio id="basicGroupRadio5" label="Google Pay" name="googlePay" value="googlePay"></auro-radio>
|
|
127
|
+
</auro-accordion>
|
|
128
|
+
</auro-radio-group>
|
|
129
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
130
|
+
</div>
|
|
131
|
+
<auro-accordion alignRight>
|
|
132
|
+
<span slot="trigger">See code</span>
|
|
133
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/accordionExample.html) -->
|
|
134
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/accordionExample.html -->
|
|
135
|
+
|
|
136
|
+
```html
|
|
137
|
+
<auro-radio-group>
|
|
138
|
+
<span slot="legend">Accordion Test</span>
|
|
139
|
+
<auro-radio id="basicGroupRadio1" label="Credit or debit card" name="creditordebit" value="credit"></auro-radio>
|
|
140
|
+
<auro-radio id="basicGroupRadio2" label="Apple Pay" name="applePay" value="applePay"></auro-radio>
|
|
141
|
+
<auro-radio id="basicGroupRadio3" label="Alaska Airlines Commercial Account" name="alaskaCommercial" value="alaskaCommercial"></auro-radio>
|
|
142
|
+
<auro-accordion>
|
|
143
|
+
<span slot="trigger">More payment options</span>
|
|
144
|
+
<auro-radio id="basicGroupRadio4" label="Click to pay" name="manualCredit" value="manualCredit"></auro-radio>
|
|
145
|
+
<auro-radio id="basicGroupRadio5" label="Google Pay" name="googlePay" value="googlePay"></auro-radio>
|
|
146
|
+
</auro-accordion>
|
|
147
|
+
</auro-radio-group>
|
|
148
|
+
```
|
|
149
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
150
|
</auro-accordion>
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$
|
|
6
|
+
const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$3)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:
|
|
12
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.0");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const t$1=globalThis,i$3=t$1.trustedTypes,s$
|
|
19
|
+
const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.0");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/class
|
|
25
|
+
*/const s$1=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.0");
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
@@ -139,7 +139,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
139
139
|
*/
|
|
140
140
|
|
|
141
141
|
// build the component class
|
|
142
|
-
class AuroRadio extends
|
|
142
|
+
class AuroRadio extends i$2 {
|
|
143
143
|
constructor() {
|
|
144
144
|
super();
|
|
145
145
|
this.checked = false;
|
|
@@ -148,6 +148,7 @@ class AuroRadio extends r {
|
|
|
148
148
|
this.error = false;
|
|
149
149
|
this.onDark = false;
|
|
150
150
|
this.tabIndex = -1;
|
|
151
|
+
this.touched = false;
|
|
151
152
|
|
|
152
153
|
/**
|
|
153
154
|
* @private
|
|
@@ -193,6 +194,10 @@ class AuroRadio extends r {
|
|
|
193
194
|
tabIndex: {
|
|
194
195
|
type: Number,
|
|
195
196
|
reflect: true
|
|
197
|
+
},
|
|
198
|
+
touched: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
reflect: true
|
|
196
201
|
}
|
|
197
202
|
};
|
|
198
203
|
}
|
|
@@ -244,6 +249,7 @@ class AuroRadio extends r {
|
|
|
244
249
|
* @returns {void}
|
|
245
250
|
*/
|
|
246
251
|
handleFocus(event) {
|
|
252
|
+
this.touched = true;
|
|
247
253
|
this.dispatchEvent(new CustomEvent('focusSelected', {
|
|
248
254
|
bubbles: true,
|
|
249
255
|
composed: true,
|
|
@@ -270,6 +276,7 @@ class AuroRadio extends r {
|
|
|
270
276
|
* @returns {void}
|
|
271
277
|
*/
|
|
272
278
|
reset() {
|
|
279
|
+
this.touched = false;
|
|
273
280
|
this.checked = false;
|
|
274
281
|
this.error = false;
|
|
275
282
|
}
|
|
@@ -807,6 +814,7 @@ class AuroFormValidation {
|
|
|
807
814
|
reset(elem) {
|
|
808
815
|
elem.validity = undefined;
|
|
809
816
|
elem.value = undefined;
|
|
817
|
+
elem.touched = false;
|
|
810
818
|
|
|
811
819
|
// Resets the second value of the datepicker in range state
|
|
812
820
|
if (elem.valueEnd) {
|
|
@@ -944,7 +952,7 @@ class AuroFormValidation {
|
|
|
944
952
|
} else if (elem.type === 'date' && elem.value?.length > 0) {
|
|
945
953
|
|
|
946
954
|
// Guard Clause: if the value is too short
|
|
947
|
-
if (elem.value
|
|
955
|
+
if (elem.value?.length < elem.lengthForType) {
|
|
948
956
|
|
|
949
957
|
elem.validity = 'tooShort';
|
|
950
958
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
@@ -1014,11 +1022,17 @@ class AuroFormValidation {
|
|
|
1014
1022
|
this.getAuroInputs(elem);
|
|
1015
1023
|
|
|
1016
1024
|
// Validate only if noValidate is not true and the input does not have focus
|
|
1017
|
-
|
|
1025
|
+
let validationShouldRun =
|
|
1026
|
+
force ||
|
|
1027
|
+
(!elem.contains(document.activeElement) &&
|
|
1028
|
+
(elem.touched ||
|
|
1029
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1030
|
+
elem.validateOnInput;
|
|
1018
1031
|
|
|
1019
1032
|
if (elem.hasAttribute('error')) {
|
|
1020
1033
|
elem.validity = 'customError';
|
|
1021
1034
|
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1035
|
+
validationShouldRun = false;
|
|
1022
1036
|
} else if (validationShouldRun) {
|
|
1023
1037
|
elem.validity = 'valid';
|
|
1024
1038
|
elem.errorMessage = '';
|
|
@@ -1039,7 +1053,7 @@ class AuroFormValidation {
|
|
|
1039
1053
|
}
|
|
1040
1054
|
}
|
|
1041
1055
|
|
|
1042
|
-
if (!hasValue && elem.required) {
|
|
1056
|
+
if (!hasValue && elem.required && elem.touched) {
|
|
1043
1057
|
elem.validity = 'valueMissing';
|
|
1044
1058
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1045
1059
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -1050,7 +1064,7 @@ class AuroFormValidation {
|
|
|
1050
1064
|
}
|
|
1051
1065
|
}
|
|
1052
1066
|
|
|
1053
|
-
if (this.auroInputElements?.length > 0) {
|
|
1067
|
+
if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
|
|
1054
1068
|
elem.validity = this.auroInputElements[0].validity;
|
|
1055
1069
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1056
1070
|
|
|
@@ -1129,7 +1143,7 @@ class AuroFormValidation {
|
|
|
1129
1143
|
}
|
|
1130
1144
|
}
|
|
1131
1145
|
} else {
|
|
1132
|
-
elem.errorMessage =
|
|
1146
|
+
elem.errorMessage = '';
|
|
1133
1147
|
}
|
|
1134
1148
|
}
|
|
1135
1149
|
}
|
|
@@ -1176,7 +1190,7 @@ class AuroDependencyVersioning {
|
|
|
1176
1190
|
|
|
1177
1191
|
var colorCss = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1178
1192
|
|
|
1179
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0
|
|
1193
|
+
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px)}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1180
1194
|
|
|
1181
1195
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1182
1196
|
|
|
@@ -1259,7 +1273,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
1259
1273
|
*
|
|
1260
1274
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
1261
1275
|
*/
|
|
1262
|
-
class AuroHelpText extends
|
|
1276
|
+
class AuroHelpText extends i$2 {
|
|
1263
1277
|
|
|
1264
1278
|
constructor() {
|
|
1265
1279
|
super();
|
|
@@ -1408,7 +1422,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1408
1422
|
* @event input - Notifies every time the value prop of the element is changed.
|
|
1409
1423
|
*/
|
|
1410
1424
|
|
|
1411
|
-
class AuroRadioGroup extends
|
|
1425
|
+
class AuroRadioGroup extends i$2 {
|
|
1412
1426
|
constructor() {
|
|
1413
1427
|
super();
|
|
1414
1428
|
this.disabled = false;
|
|
@@ -1418,6 +1432,7 @@ class AuroRadioGroup extends r {
|
|
|
1418
1432
|
this.value = undefined;
|
|
1419
1433
|
this.optionSelected = undefined;
|
|
1420
1434
|
this.onDark = false;
|
|
1435
|
+
this.touched = false;
|
|
1421
1436
|
|
|
1422
1437
|
/**
|
|
1423
1438
|
* @private
|
|
@@ -1499,6 +1514,18 @@ class AuroRadioGroup extends r {
|
|
|
1499
1514
|
},
|
|
1500
1515
|
optionSelected: {
|
|
1501
1516
|
type: Object
|
|
1517
|
+
},
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Indicates whether the radio group is in a dirty state (has been interacted with).
|
|
1521
|
+
* @type {boolean}
|
|
1522
|
+
* @default false
|
|
1523
|
+
* @private
|
|
1524
|
+
*/
|
|
1525
|
+
touched: {
|
|
1526
|
+
type: Boolean,
|
|
1527
|
+
reflect: true,
|
|
1528
|
+
attribute: false
|
|
1502
1529
|
}
|
|
1503
1530
|
};
|
|
1504
1531
|
}
|
|
@@ -1554,10 +1581,7 @@ class AuroRadioGroup extends r {
|
|
|
1554
1581
|
* @returns {void}
|
|
1555
1582
|
*/
|
|
1556
1583
|
handleRadioBlur() {
|
|
1557
|
-
|
|
1558
|
-
this.value = '';
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1584
|
+
this.touched = true;
|
|
1561
1585
|
this.validation.validate(this);
|
|
1562
1586
|
}
|
|
1563
1587
|
|
|
@@ -1664,7 +1688,7 @@ class AuroRadioGroup extends r {
|
|
|
1664
1688
|
* @returns {void}
|
|
1665
1689
|
*/
|
|
1666
1690
|
handleItems() {
|
|
1667
|
-
this.items = [...this.querySelectorAll(':scope
|
|
1691
|
+
this.items = [...this.querySelectorAll(':scope auro-radio, :scope [auro-radio]')];
|
|
1668
1692
|
this.initializeIndex();
|
|
1669
1693
|
|
|
1670
1694
|
if (this.disabled) {
|
|
@@ -100,7 +100,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
100
100
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.
|
|
103
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.3.0-beta.2/auro-radio/+esm"></script>
|
|
104
104
|
```
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|