@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
|
@@ -11,26 +11,26 @@ function resetStateExample() {
|
|
|
11
11
|
* Copyright 2019 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/
|
|
14
|
-
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$
|
|
14
|
+
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;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2017 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:
|
|
20
|
+
*/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");
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @license
|
|
24
24
|
* Copyright 2017 Google LLC
|
|
25
25
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
26
26
|
*/
|
|
27
|
-
const t$1=globalThis,i$3=t$1.trustedTypes,s$
|
|
27
|
+
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};
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/class
|
|
33
|
+
*/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");
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
@@ -142,18 +142,28 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
142
142
|
*/
|
|
143
143
|
|
|
144
144
|
// build the component class
|
|
145
|
-
class AuroCheckbox extends
|
|
145
|
+
class AuroCheckbox extends i$2 {
|
|
146
146
|
constructor() {
|
|
147
147
|
super();
|
|
148
148
|
this.checked = false;
|
|
149
149
|
this.disabled = false;
|
|
150
150
|
this.error = false;
|
|
151
151
|
this.onDark = false;
|
|
152
|
+
this.touched = false;
|
|
152
153
|
|
|
153
154
|
/**
|
|
154
155
|
* @private
|
|
155
156
|
*/
|
|
156
157
|
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @private
|
|
161
|
+
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
162
|
+
*/
|
|
163
|
+
this.constructor.shadowRootOptions = {
|
|
164
|
+
...i$2.shadowRootOptions,
|
|
165
|
+
delegatesFocus: true,
|
|
166
|
+
};
|
|
157
167
|
}
|
|
158
168
|
|
|
159
169
|
static get styles() {
|
|
@@ -216,6 +226,15 @@ class AuroCheckbox extends r {
|
|
|
216
226
|
value: {
|
|
217
227
|
type: String,
|
|
218
228
|
reflect: true
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Indicates whether the checkbox has been interacted with.
|
|
233
|
+
* @type {boolean}
|
|
234
|
+
*/
|
|
235
|
+
touched: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
reflect: true
|
|
219
238
|
}
|
|
220
239
|
};
|
|
221
240
|
}
|
|
@@ -232,8 +251,14 @@ class AuroCheckbox extends r {
|
|
|
232
251
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroCheckbox);
|
|
233
252
|
}
|
|
234
253
|
|
|
235
|
-
|
|
236
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Handles the change event for the checkbox input.
|
|
256
|
+
* Updates the checked state and dispatches a corresponding custom event.
|
|
257
|
+
* This custom event is only for the purpose of supporting IE
|
|
258
|
+
* @private
|
|
259
|
+
* @param {Event} event - The change event from the checkbox input.
|
|
260
|
+
* @returns {void}
|
|
261
|
+
*/
|
|
237
262
|
handleChange(event) {
|
|
238
263
|
this.checked = event.target.checked;
|
|
239
264
|
const customEvent = new CustomEvent(event.type, event);
|
|
@@ -241,6 +266,13 @@ class AuroCheckbox extends r {
|
|
|
241
266
|
this.dispatchEvent(customEvent);
|
|
242
267
|
}
|
|
243
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Handles the input event for the checkbox input.
|
|
271
|
+
* Updates the checked state and dispatches a custom 'auroCheckbox-input' event.
|
|
272
|
+
* @private
|
|
273
|
+
* @param {Event} event - The input event from the checkbox input.
|
|
274
|
+
* @returns {void}
|
|
275
|
+
*/
|
|
244
276
|
handleInput(event) {
|
|
245
277
|
this.checked = event.target.checked;
|
|
246
278
|
|
|
@@ -257,6 +289,7 @@ class AuroCheckbox extends r {
|
|
|
257
289
|
* @returns {void}
|
|
258
290
|
*/
|
|
259
291
|
handleFocusin() {
|
|
292
|
+
this.touched = true;
|
|
260
293
|
this.dispatchEvent(new CustomEvent('auroCheckbox-focusin', {
|
|
261
294
|
bubbles: true,
|
|
262
295
|
cancelable: false,
|
|
@@ -285,6 +318,7 @@ class AuroCheckbox extends r {
|
|
|
285
318
|
reset() {
|
|
286
319
|
this.checked = false;
|
|
287
320
|
this.error = false;
|
|
321
|
+
this.touched = false;
|
|
288
322
|
}
|
|
289
323
|
|
|
290
324
|
firstUpdated() {
|
|
@@ -774,6 +808,7 @@ class AuroFormValidation {
|
|
|
774
808
|
reset(elem) {
|
|
775
809
|
elem.validity = undefined;
|
|
776
810
|
elem.value = undefined;
|
|
811
|
+
elem.touched = false;
|
|
777
812
|
|
|
778
813
|
// Resets the second value of the datepicker in range state
|
|
779
814
|
if (elem.valueEnd) {
|
|
@@ -911,7 +946,7 @@ class AuroFormValidation {
|
|
|
911
946
|
} else if (elem.type === 'date' && elem.value?.length > 0) {
|
|
912
947
|
|
|
913
948
|
// Guard Clause: if the value is too short
|
|
914
|
-
if (elem.value
|
|
949
|
+
if (elem.value?.length < elem.lengthForType) {
|
|
915
950
|
|
|
916
951
|
elem.validity = 'tooShort';
|
|
917
952
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
@@ -981,11 +1016,17 @@ class AuroFormValidation {
|
|
|
981
1016
|
this.getAuroInputs(elem);
|
|
982
1017
|
|
|
983
1018
|
// Validate only if noValidate is not true and the input does not have focus
|
|
984
|
-
|
|
1019
|
+
let validationShouldRun =
|
|
1020
|
+
force ||
|
|
1021
|
+
(!elem.contains(document.activeElement) &&
|
|
1022
|
+
(elem.touched ||
|
|
1023
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1024
|
+
elem.validateOnInput;
|
|
985
1025
|
|
|
986
1026
|
if (elem.hasAttribute('error')) {
|
|
987
1027
|
elem.validity = 'customError';
|
|
988
1028
|
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1029
|
+
validationShouldRun = false;
|
|
989
1030
|
} else if (validationShouldRun) {
|
|
990
1031
|
elem.validity = 'valid';
|
|
991
1032
|
elem.errorMessage = '';
|
|
@@ -1006,7 +1047,7 @@ class AuroFormValidation {
|
|
|
1006
1047
|
}
|
|
1007
1048
|
}
|
|
1008
1049
|
|
|
1009
|
-
if (!hasValue && elem.required) {
|
|
1050
|
+
if (!hasValue && elem.required && elem.touched) {
|
|
1010
1051
|
elem.validity = 'valueMissing';
|
|
1011
1052
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1012
1053
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -1017,7 +1058,7 @@ class AuroFormValidation {
|
|
|
1017
1058
|
}
|
|
1018
1059
|
}
|
|
1019
1060
|
|
|
1020
|
-
if (this.auroInputElements?.length > 0) {
|
|
1061
|
+
if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
|
|
1021
1062
|
elem.validity = this.auroInputElements[0].validity;
|
|
1022
1063
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1023
1064
|
|
|
@@ -1096,7 +1137,7 @@ class AuroFormValidation {
|
|
|
1096
1137
|
}
|
|
1097
1138
|
}
|
|
1098
1139
|
} else {
|
|
1099
|
-
elem.errorMessage =
|
|
1140
|
+
elem.errorMessage = '';
|
|
1100
1141
|
}
|
|
1101
1142
|
}
|
|
1102
1143
|
}
|
|
@@ -1147,7 +1188,7 @@ var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host(
|
|
|
1147
1188
|
|
|
1148
1189
|
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)}`;
|
|
1149
1190
|
|
|
1150
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0
|
|
1191
|
+
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}`;
|
|
1151
1192
|
|
|
1152
1193
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1153
1194
|
|
|
@@ -1230,7 +1271,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
1230
1271
|
*
|
|
1231
1272
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
1232
1273
|
*/
|
|
1233
|
-
class AuroHelpText extends
|
|
1274
|
+
class AuroHelpText extends i$2 {
|
|
1234
1275
|
|
|
1235
1276
|
constructor() {
|
|
1236
1277
|
super();
|
|
@@ -1366,7 +1407,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1366
1407
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1367
1408
|
*/
|
|
1368
1409
|
|
|
1369
|
-
class AuroCheckboxGroup extends
|
|
1410
|
+
class AuroCheckboxGroup extends i$2 {
|
|
1370
1411
|
constructor() {
|
|
1371
1412
|
super();
|
|
1372
1413
|
|
|
@@ -1376,6 +1417,14 @@ class AuroCheckboxGroup extends r {
|
|
|
1376
1417
|
this.horizontal = false;
|
|
1377
1418
|
this.onDark = false;
|
|
1378
1419
|
|
|
1420
|
+
/**
|
|
1421
|
+
* Indicates whether the checkbox group is in a dirty state (has been interacted with).
|
|
1422
|
+
* @type {boolean}
|
|
1423
|
+
* @default false
|
|
1424
|
+
* @private
|
|
1425
|
+
*/
|
|
1426
|
+
this.touched = false;
|
|
1427
|
+
|
|
1379
1428
|
/**
|
|
1380
1429
|
* @private
|
|
1381
1430
|
*/
|
|
@@ -1565,6 +1614,8 @@ class AuroCheckboxGroup extends r {
|
|
|
1565
1614
|
};
|
|
1566
1615
|
|
|
1567
1616
|
this.addEventListener('auroCheckbox-focusin', () => {
|
|
1617
|
+
this.touched = true;
|
|
1618
|
+
|
|
1568
1619
|
if (!this.value) {
|
|
1569
1620
|
this.value = [];
|
|
1570
1621
|
}
|
|
@@ -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>
|
|
@@ -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
|
|
@@ -134,18 +134,28 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
134
134
|
*/
|
|
135
135
|
|
|
136
136
|
// build the component class
|
|
137
|
-
class AuroCheckbox extends
|
|
137
|
+
class AuroCheckbox extends i$2 {
|
|
138
138
|
constructor() {
|
|
139
139
|
super();
|
|
140
140
|
this.checked = false;
|
|
141
141
|
this.disabled = false;
|
|
142
142
|
this.error = false;
|
|
143
143
|
this.onDark = false;
|
|
144
|
+
this.touched = false;
|
|
144
145
|
|
|
145
146
|
/**
|
|
146
147
|
* @private
|
|
147
148
|
*/
|
|
148
149
|
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @private
|
|
153
|
+
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
154
|
+
*/
|
|
155
|
+
this.constructor.shadowRootOptions = {
|
|
156
|
+
...i$2.shadowRootOptions,
|
|
157
|
+
delegatesFocus: true,
|
|
158
|
+
};
|
|
149
159
|
}
|
|
150
160
|
|
|
151
161
|
static get styles() {
|
|
@@ -208,6 +218,15 @@ class AuroCheckbox extends r {
|
|
|
208
218
|
value: {
|
|
209
219
|
type: String,
|
|
210
220
|
reflect: true
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Indicates whether the checkbox has been interacted with.
|
|
225
|
+
* @type {boolean}
|
|
226
|
+
*/
|
|
227
|
+
touched: {
|
|
228
|
+
type: Boolean,
|
|
229
|
+
reflect: true
|
|
211
230
|
}
|
|
212
231
|
};
|
|
213
232
|
}
|
|
@@ -224,8 +243,14 @@ class AuroCheckbox extends r {
|
|
|
224
243
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroCheckbox);
|
|
225
244
|
}
|
|
226
245
|
|
|
227
|
-
|
|
228
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Handles the change event for the checkbox input.
|
|
248
|
+
* Updates the checked state and dispatches a corresponding custom event.
|
|
249
|
+
* This custom event is only for the purpose of supporting IE
|
|
250
|
+
* @private
|
|
251
|
+
* @param {Event} event - The change event from the checkbox input.
|
|
252
|
+
* @returns {void}
|
|
253
|
+
*/
|
|
229
254
|
handleChange(event) {
|
|
230
255
|
this.checked = event.target.checked;
|
|
231
256
|
const customEvent = new CustomEvent(event.type, event);
|
|
@@ -233,6 +258,13 @@ class AuroCheckbox extends r {
|
|
|
233
258
|
this.dispatchEvent(customEvent);
|
|
234
259
|
}
|
|
235
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Handles the input event for the checkbox input.
|
|
263
|
+
* Updates the checked state and dispatches a custom 'auroCheckbox-input' event.
|
|
264
|
+
* @private
|
|
265
|
+
* @param {Event} event - The input event from the checkbox input.
|
|
266
|
+
* @returns {void}
|
|
267
|
+
*/
|
|
236
268
|
handleInput(event) {
|
|
237
269
|
this.checked = event.target.checked;
|
|
238
270
|
|
|
@@ -249,6 +281,7 @@ class AuroCheckbox extends r {
|
|
|
249
281
|
* @returns {void}
|
|
250
282
|
*/
|
|
251
283
|
handleFocusin() {
|
|
284
|
+
this.touched = true;
|
|
252
285
|
this.dispatchEvent(new CustomEvent('auroCheckbox-focusin', {
|
|
253
286
|
bubbles: true,
|
|
254
287
|
cancelable: false,
|
|
@@ -277,6 +310,7 @@ class AuroCheckbox extends r {
|
|
|
277
310
|
reset() {
|
|
278
311
|
this.checked = false;
|
|
279
312
|
this.error = false;
|
|
313
|
+
this.touched = false;
|
|
280
314
|
}
|
|
281
315
|
|
|
282
316
|
firstUpdated() {
|
|
@@ -766,6 +800,7 @@ class AuroFormValidation {
|
|
|
766
800
|
reset(elem) {
|
|
767
801
|
elem.validity = undefined;
|
|
768
802
|
elem.value = undefined;
|
|
803
|
+
elem.touched = false;
|
|
769
804
|
|
|
770
805
|
// Resets the second value of the datepicker in range state
|
|
771
806
|
if (elem.valueEnd) {
|
|
@@ -903,7 +938,7 @@ class AuroFormValidation {
|
|
|
903
938
|
} else if (elem.type === 'date' && elem.value?.length > 0) {
|
|
904
939
|
|
|
905
940
|
// Guard Clause: if the value is too short
|
|
906
|
-
if (elem.value
|
|
941
|
+
if (elem.value?.length < elem.lengthForType) {
|
|
907
942
|
|
|
908
943
|
elem.validity = 'tooShort';
|
|
909
944
|
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
@@ -973,11 +1008,17 @@ class AuroFormValidation {
|
|
|
973
1008
|
this.getAuroInputs(elem);
|
|
974
1009
|
|
|
975
1010
|
// Validate only if noValidate is not true and the input does not have focus
|
|
976
|
-
|
|
1011
|
+
let validationShouldRun =
|
|
1012
|
+
force ||
|
|
1013
|
+
(!elem.contains(document.activeElement) &&
|
|
1014
|
+
(elem.touched ||
|
|
1015
|
+
(!elem.touched && typeof elem.value !== "undefined"))) ||
|
|
1016
|
+
elem.validateOnInput;
|
|
977
1017
|
|
|
978
1018
|
if (elem.hasAttribute('error')) {
|
|
979
1019
|
elem.validity = 'customError';
|
|
980
1020
|
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
1021
|
+
validationShouldRun = false;
|
|
981
1022
|
} else if (validationShouldRun) {
|
|
982
1023
|
elem.validity = 'valid';
|
|
983
1024
|
elem.errorMessage = '';
|
|
@@ -998,7 +1039,7 @@ class AuroFormValidation {
|
|
|
998
1039
|
}
|
|
999
1040
|
}
|
|
1000
1041
|
|
|
1001
|
-
if (!hasValue && elem.required) {
|
|
1042
|
+
if (!hasValue && elem.required && elem.touched) {
|
|
1002
1043
|
elem.validity = 'valueMissing';
|
|
1003
1044
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1004
1045
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -1009,7 +1050,7 @@ class AuroFormValidation {
|
|
|
1009
1050
|
}
|
|
1010
1051
|
}
|
|
1011
1052
|
|
|
1012
|
-
if (this.auroInputElements?.length > 0) {
|
|
1053
|
+
if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
|
|
1013
1054
|
elem.validity = this.auroInputElements[0].validity;
|
|
1014
1055
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1015
1056
|
|
|
@@ -1088,7 +1129,7 @@ class AuroFormValidation {
|
|
|
1088
1129
|
}
|
|
1089
1130
|
}
|
|
1090
1131
|
} else {
|
|
1091
|
-
elem.errorMessage =
|
|
1132
|
+
elem.errorMessage = '';
|
|
1092
1133
|
}
|
|
1093
1134
|
}
|
|
1094
1135
|
}
|
|
@@ -1139,7 +1180,7 @@ var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host(
|
|
|
1139
1180
|
|
|
1140
1181
|
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)}`;
|
|
1141
1182
|
|
|
1142
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:var(--ds-text-body-size-xs, 0
|
|
1183
|
+
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}`;
|
|
1143
1184
|
|
|
1144
1185
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1145
1186
|
|
|
@@ -1222,7 +1263,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
1222
1263
|
*
|
|
1223
1264
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
1224
1265
|
*/
|
|
1225
|
-
class AuroHelpText extends
|
|
1266
|
+
class AuroHelpText extends i$2 {
|
|
1226
1267
|
|
|
1227
1268
|
constructor() {
|
|
1228
1269
|
super();
|
|
@@ -1358,7 +1399,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1358
1399
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1359
1400
|
*/
|
|
1360
1401
|
|
|
1361
|
-
class AuroCheckboxGroup extends
|
|
1402
|
+
class AuroCheckboxGroup extends i$2 {
|
|
1362
1403
|
constructor() {
|
|
1363
1404
|
super();
|
|
1364
1405
|
|
|
@@ -1368,6 +1409,14 @@ class AuroCheckboxGroup extends r {
|
|
|
1368
1409
|
this.horizontal = false;
|
|
1369
1410
|
this.onDark = false;
|
|
1370
1411
|
|
|
1412
|
+
/**
|
|
1413
|
+
* Indicates whether the checkbox group is in a dirty state (has been interacted with).
|
|
1414
|
+
* @type {boolean}
|
|
1415
|
+
* @default false
|
|
1416
|
+
* @private
|
|
1417
|
+
*/
|
|
1418
|
+
this.touched = false;
|
|
1419
|
+
|
|
1371
1420
|
/**
|
|
1372
1421
|
* @private
|
|
1373
1422
|
*/
|
|
@@ -1557,6 +1606,8 @@ class AuroCheckboxGroup extends r {
|
|
|
1557
1606
|
};
|
|
1558
1607
|
|
|
1559
1608
|
this.addEventListener('auroCheckbox-focusin', () => {
|
|
1609
|
+
this.touched = true;
|
|
1610
|
+
|
|
1560
1611
|
if (!this.value) {
|
|
1561
1612
|
this.value = [];
|
|
1562
1613
|
}
|
|
@@ -106,7 +106,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
106
106
|
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.
|
|
107
107
|
|
|
108
108
|
```html
|
|
109
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.
|
|
109
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.3.0-beta.2/auro-checkbox/+esm"></script>
|
|
110
110
|
```
|
|
111
111
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
112
112
|
|
|
@@ -91,6 +91,13 @@ export class AuroCheckboxGroup extends LitElement {
|
|
|
91
91
|
required: boolean;
|
|
92
92
|
horizontal: boolean;
|
|
93
93
|
onDark: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Indicates whether the checkbox group is in a dirty state (has been interacted with).
|
|
96
|
+
* @type {boolean}
|
|
97
|
+
* @default false
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private touched;
|
|
94
101
|
/**
|
|
95
102
|
* @private
|
|
96
103
|
*/
|