@aurodesignsystem/auro-formkit 5.9.4 → 5.10.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 +22 -2
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +10 -0
- package/components/bibtemplate/dist/buttonVersion.d.ts +1 -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 +26 -16
- package/components/bibtemplate/dist/registered.js +26 -16
- package/components/checkbox/demo/api.md +7 -0
- package/components/checkbox/demo/api.min.js +17 -14
- package/components/checkbox/demo/index.min.js +17 -14
- package/components/checkbox/dist/auro-checkbox-group.d.ts +4 -3
- package/components/checkbox/dist/auro-checkbox.d.ts +2 -0
- package/components/checkbox/dist/index.js +8 -5
- package/components/checkbox/dist/registered.js +8 -5
- package/components/combobox/demo/api.js +2 -2
- package/components/combobox/demo/api.md +80 -0
- package/components/combobox/demo/api.min.js +552 -356
- package/components/combobox/demo/index.min.js +533 -351
- package/components/combobox/dist/auro-combobox.d.ts +1 -1
- package/components/combobox/dist/index.js +421 -240
- package/components/combobox/dist/registered.js +421 -240
- package/components/counter/demo/api.min.js +434 -258
- package/components/counter/demo/index.min.js +434 -258
- package/components/counter/dist/auro-counter-button.d.ts +11 -2
- package/components/counter/dist/index.js +391 -219
- package/components/counter/dist/registered.js +391 -219
- package/components/datepicker/demo/api.md +2 -2
- package/components/datepicker/demo/api.min.js +576 -399
- package/components/datepicker/demo/index.min.js +576 -399
- package/components/datepicker/dist/auro-datepicker.d.ts +1 -1
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +1 -1
- package/components/datepicker/dist/index.js +437 -260
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +437 -260
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +362 -202
- package/components/dropdown/demo/index.min.js +362 -202
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +349 -189
- package/components/dropdown/dist/registered.js +349 -189
- package/components/form/demo/api.min.js +13 -11
- package/components/form/demo/index.min.js +13 -11
- package/components/form/dist/auro-form.d.ts +8 -0
- package/components/form/dist/index.js +8 -6
- package/components/form/dist/registered.js +8 -6
- package/components/input/demo/api.md +5 -1
- package/components/input/demo/api.min.js +87 -80
- package/components/input/demo/index.min.js +87 -80
- package/components/input/dist/auro-input.d.ts +23 -0
- package/components/input/dist/base-input.d.ts +2 -18
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +42 -35
- package/components/input/dist/registered.js +42 -35
- package/components/menu/demo/api.md +3 -3
- package/components/menu/demo/api.min.js +18 -17
- package/components/menu/demo/index.min.js +18 -17
- package/components/menu/dist/auro-menuoption.d.ts +2 -1
- package/components/menu/dist/index.js +7 -6
- package/components/menu/dist/registered.js +7 -6
- package/components/radio/demo/api.min.js +11 -11
- package/components/radio/demo/index.min.js +11 -11
- package/components/radio/dist/index.js +2 -2
- package/components/radio/dist/registered.js +2 -2
- package/components/select/demo/api.min.js +406 -235
- package/components/select/demo/index.min.js +406 -235
- package/components/select/dist/index.js +377 -207
- package/components/select/dist/registered.js +377 -207
- package/custom-elements.json +18148 -0
- package/package.json +42 -10
|
@@ -30,14 +30,14 @@ function customExample() {
|
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
32
|
*/
|
|
33
|
-
const t$2=globalThis,i$5=t$2.trustedTypes,s$4
|
|
33
|
+
const t$2=globalThis,i$5=t=>t,s$4=t$2.trustedTypes,e$5=s$4?s$4.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$3="$lit$",o$7=`lit$${Math.random().toFixed(9).slice(2)}$`,n$5="?"+o$7,r$4=`<${n$5}>`,l$2=document,c$3=()=>l$2.createComment(""),a$2=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$3=Array.isArray,d$1=t=>u$3(t)||"function"==typeof t?.[Symbol.iterator],f$3="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$1=/>/g,p$2=RegExp(`>|${f$3}(?:([^\\s"'>=/]+)(${f$3}*=${f$3}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$1=/'/g,$=/"/g,y$2=/^(?:script|style|textarea|title)$/i,x$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x$1(1),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l$2.createTreeWalker(l$2,129);function V(t,i){if(!u$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$5?e$5.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_$1:void 0!==u[1]?c=m$1:void 0!==u[2]?(y$2.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$2):void 0!==u[3]&&(c=p$2):c===p$2?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$2:'"'===u[3]?$:g$1):c===$||c===g$1?c=p$2:c===_$1||c===m$1?c=v:(c=p$2,n=void 0);const x=c===p$2&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r$4:d>=0?(e.push(a),s.slice(0,d)+h$3+s.slice(d)+o$7+x):s+o$7+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$1 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$3)){const i=v[a++],s=r.getAttribute(t).split(o$7),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z$1:H}),r.removeAttribute(t);}else t.startsWith(o$7)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y$2.test(r.tagName)){const t=r.textContent.split(o$7),i=t.length-1;if(i>0){r.textContent=s$4?s$4.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$3()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$3());}}}else if(8===r.nodeType)if(r.data===n$5)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$7,t+1));)d.push({type:7,index:l}),t+=o$7.length-1;}l++;}}static createElement(t,i){const s=l$2.createElement("template");return s.innerHTML=t,s}};function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$2(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=M(t,h._$AS(t,i.values),h,e)),i}class R{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??l$2).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$2,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 k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,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=M(this,t,i),a$2(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$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!==A&&a$2(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$2.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=S$1.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S$1(t)),i}k(t){u$3(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 k(this.O(c$3()),this.O(c$3()),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,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$5(t).nextSibling;i$5(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,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=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M(this,t,i,0),o=!a$2(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a$2(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}let z$1 = class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||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){M(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S$1,k),(t$2.litHtmlVersions??=[]).push("3.3.2");const D=(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 k(i.insertBefore(c$3(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2020 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
39
|
*/
|
|
40
|
-
const a$1=Symbol.for(""),o$6=t=>{if(t?.r===a$1)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce((
|
|
40
|
+
const a$1=Symbol.for(""),o$6=t=>{if(t?.r===a$1)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$1}),i$4=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a$1}),l$1=new Map,n$4=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$6(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$2=n$4(b$1);
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
@@ -50,44 +50,44 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$4=t=>(...e)=>({_$litDirective$:t,values:e});le
|
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2018 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/const e$3=e$4(class extends i$3{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(
|
|
53
|
+
*/const e$3=e$4(class extends i$3{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2019 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
const t=globalThis,e$2=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)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$2&&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$
|
|
60
|
+
const t=globalThis,e$2=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)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$2&&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$3=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$2=(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$2)},S=(s,o)=>{if(e$2)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$2?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/const{is:i$1,defineProperty:e$1,getOwnPropertyDescriptor:h$2,getOwnPropertyNames:r$
|
|
66
|
+
*/const{is:i$1,defineProperty:e$1,getOwnPropertyDescriptor:h$2,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a=globalThis,c$1=a.trustedTypes,l=c$1?c$1.emptyScript:"",p$1=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l: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$2=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a.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$1(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$2(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("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("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(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(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$1).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$1;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$2)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$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("elementProperties")]=new Map,y$1[d("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a.reactiveElementVersions??=[]).push("2.1.2");
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2017 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/const s$1=globalThis;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=
|
|
72
|
+
*/const s$1=globalThis;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=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}}i._$litElement$=true,i["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i});const o$3=s$1.litElementPolyfillSupport;o$3?.({LitElement:i});(s$1.litElementVersions??=[]).push("4.2.2");
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @license
|
|
76
76
|
* Copyright 2020 Google LLC
|
|
77
77
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
78
|
-
*/const
|
|
78
|
+
*/const r$1=o=>void 0===o.strings;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2017 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/const s=(i,t)=>{const e=i._$AN;if(void 0===e)return false;for(const i of e)i._$AO?.(t,false),s(i,t);return true},o$2=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t);}};function h$1(i){ void 0!==this._$AN?(o$2(this),this._$AM=i,r(this)):this._$AM=i;}function n$1(i,t=false,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],false),o$2(r[i]);else null!=r&&(s(r,false),o$2(r));else s(this,i);}const c=i=>{i.type==t$1.CHILD&&(i._$AP??=n$1,i._$AQ??=h$1);};let f$1 = class f extends i$3{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU;}_$AO(i,t=true){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o$2(this));}setValue(t){if(
|
|
84
|
+
*/const s=(i,t)=>{const e=i._$AN;if(void 0===e)return false;for(const i of e)i._$AO?.(t,false),s(i,t);return true},o$2=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t);}};function h$1(i){ void 0!==this._$AN?(o$2(this),this._$AM=i,r(this)):this._$AM=i;}function n$1(i,t=false,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],false),o$2(r[i]);else null!=r&&(s(r,false),o$2(r));else s(this,i);}const c=i=>{i.type==t$1.CHILD&&(i._$AP??=n$1,i._$AQ??=h$1);};let f$1 = class f extends i$3{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU;}_$AO(i,t=true){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o$2(this));}setValue(t){if(r$1(this._$Ct))this._$Ct._$AI(t,this);else {const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0);}}disconnected(){}reconnected(){}};
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2020 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/const e=()=>new h;class h{}const o$1=new WeakMap,n=e$4(class extends f$1{render(i){return
|
|
90
|
+
*/const e=()=>new h;class h{}const o$1=new WeakMap,n=e$4(class extends f$1{render(i){return A}update(i,[s]){const e=s!==this.G;return e&&void 0!==this.G&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),A}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const i=this.ht??globalThis;let s=o$1.get(i);void 0===s&&(s=new WeakMap,o$1.set(i,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t);}else this.G.value=t;}get lt(){return "function"==typeof this.G?o$1.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});
|
|
91
91
|
|
|
92
92
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
93
93
|
// See LICENSE in the project root for license information.
|
|
@@ -216,8 +216,9 @@ function getOppositeAxis(axis) {
|
|
|
216
216
|
function getAxisLength(axis) {
|
|
217
217
|
return axis === 'y' ? 'height' : 'width';
|
|
218
218
|
}
|
|
219
|
+
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
219
220
|
function getSideAxis(placement) {
|
|
220
|
-
return
|
|
221
|
+
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
221
222
|
}
|
|
222
223
|
function getAlignmentAxis(placement) {
|
|
223
224
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -242,19 +243,19 @@ function getExpandedPlacements(placement) {
|
|
|
242
243
|
function getOppositeAlignmentPlacement(placement) {
|
|
243
244
|
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
244
245
|
}
|
|
246
|
+
const lrPlacement = ['left', 'right'];
|
|
247
|
+
const rlPlacement = ['right', 'left'];
|
|
248
|
+
const tbPlacement = ['top', 'bottom'];
|
|
249
|
+
const btPlacement = ['bottom', 'top'];
|
|
245
250
|
function getSideList(side, isStart, rtl) {
|
|
246
|
-
const lr = ['left', 'right'];
|
|
247
|
-
const rl = ['right', 'left'];
|
|
248
|
-
const tb = ['top', 'bottom'];
|
|
249
|
-
const bt = ['bottom', 'top'];
|
|
250
251
|
switch (side) {
|
|
251
252
|
case 'top':
|
|
252
253
|
case 'bottom':
|
|
253
|
-
if (rtl) return isStart ?
|
|
254
|
-
return isStart ?
|
|
254
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
255
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
255
256
|
case 'left':
|
|
256
257
|
case 'right':
|
|
257
|
-
return isStart ?
|
|
258
|
+
return isStart ? tbPlacement : btPlacement;
|
|
258
259
|
default:
|
|
259
260
|
return [];
|
|
260
261
|
}
|
|
@@ -365,6 +366,71 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
365
366
|
return coords;
|
|
366
367
|
}
|
|
367
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
371
|
+
* element is overflowing a given clipping boundary on each side.
|
|
372
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
373
|
+
* - negative = how many pixels left before it will overflow
|
|
374
|
+
* - 0 = lies flush with the boundary
|
|
375
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
376
|
+
*/
|
|
377
|
+
async function detectOverflow(state, options) {
|
|
378
|
+
var _await$platform$isEle;
|
|
379
|
+
if (options === void 0) {
|
|
380
|
+
options = {};
|
|
381
|
+
}
|
|
382
|
+
const {
|
|
383
|
+
x,
|
|
384
|
+
y,
|
|
385
|
+
platform,
|
|
386
|
+
rects,
|
|
387
|
+
elements,
|
|
388
|
+
strategy
|
|
389
|
+
} = state;
|
|
390
|
+
const {
|
|
391
|
+
boundary = 'clippingAncestors',
|
|
392
|
+
rootBoundary = 'viewport',
|
|
393
|
+
elementContext = 'floating',
|
|
394
|
+
altBoundary = false,
|
|
395
|
+
padding = 0
|
|
396
|
+
} = evaluate(options, state);
|
|
397
|
+
const paddingObject = getPaddingObject(padding);
|
|
398
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
399
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
400
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
401
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
402
|
+
boundary,
|
|
403
|
+
rootBoundary,
|
|
404
|
+
strategy
|
|
405
|
+
}));
|
|
406
|
+
const rect = elementContext === 'floating' ? {
|
|
407
|
+
x,
|
|
408
|
+
y,
|
|
409
|
+
width: rects.floating.width,
|
|
410
|
+
height: rects.floating.height
|
|
411
|
+
} : rects.reference;
|
|
412
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
413
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
414
|
+
x: 1,
|
|
415
|
+
y: 1
|
|
416
|
+
} : {
|
|
417
|
+
x: 1,
|
|
418
|
+
y: 1
|
|
419
|
+
};
|
|
420
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
421
|
+
elements,
|
|
422
|
+
rect,
|
|
423
|
+
offsetParent,
|
|
424
|
+
strategy
|
|
425
|
+
}) : rect);
|
|
426
|
+
return {
|
|
427
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
428
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
429
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
430
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
368
434
|
/**
|
|
369
435
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
370
436
|
* next to a given reference element.
|
|
@@ -394,6 +460,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
394
460
|
let middlewareData = {};
|
|
395
461
|
let resetCount = 0;
|
|
396
462
|
for (let i = 0; i < validMiddleware.length; i++) {
|
|
463
|
+
var _platform$detectOverf;
|
|
397
464
|
const {
|
|
398
465
|
name,
|
|
399
466
|
fn
|
|
@@ -411,7 +478,10 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
411
478
|
strategy,
|
|
412
479
|
middlewareData,
|
|
413
480
|
rects,
|
|
414
|
-
platform
|
|
481
|
+
platform: {
|
|
482
|
+
...platform,
|
|
483
|
+
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
484
|
+
},
|
|
415
485
|
elements: {
|
|
416
486
|
reference,
|
|
417
487
|
floating
|
|
@@ -456,71 +526,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
456
526
|
};
|
|
457
527
|
};
|
|
458
528
|
|
|
459
|
-
/**
|
|
460
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
461
|
-
* element is overflowing a given clipping boundary on each side.
|
|
462
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
463
|
-
* - negative = how many pixels left before it will overflow
|
|
464
|
-
* - 0 = lies flush with the boundary
|
|
465
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
466
|
-
*/
|
|
467
|
-
async function detectOverflow(state, options) {
|
|
468
|
-
var _await$platform$isEle;
|
|
469
|
-
if (options === void 0) {
|
|
470
|
-
options = {};
|
|
471
|
-
}
|
|
472
|
-
const {
|
|
473
|
-
x,
|
|
474
|
-
y,
|
|
475
|
-
platform,
|
|
476
|
-
rects,
|
|
477
|
-
elements,
|
|
478
|
-
strategy
|
|
479
|
-
} = state;
|
|
480
|
-
const {
|
|
481
|
-
boundary = 'clippingAncestors',
|
|
482
|
-
rootBoundary = 'viewport',
|
|
483
|
-
elementContext = 'floating',
|
|
484
|
-
altBoundary = false,
|
|
485
|
-
padding = 0
|
|
486
|
-
} = evaluate(options, state);
|
|
487
|
-
const paddingObject = getPaddingObject(padding);
|
|
488
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
489
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
490
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
491
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
492
|
-
boundary,
|
|
493
|
-
rootBoundary,
|
|
494
|
-
strategy
|
|
495
|
-
}));
|
|
496
|
-
const rect = elementContext === 'floating' ? {
|
|
497
|
-
x,
|
|
498
|
-
y,
|
|
499
|
-
width: rects.floating.width,
|
|
500
|
-
height: rects.floating.height
|
|
501
|
-
} : rects.reference;
|
|
502
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
503
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
504
|
-
x: 1,
|
|
505
|
-
y: 1
|
|
506
|
-
} : {
|
|
507
|
-
x: 1,
|
|
508
|
-
y: 1
|
|
509
|
-
};
|
|
510
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
511
|
-
elements,
|
|
512
|
-
rect,
|
|
513
|
-
offsetParent,
|
|
514
|
-
strategy
|
|
515
|
-
}) : rect);
|
|
516
|
-
return {
|
|
517
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
518
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
519
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
520
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
|
|
524
529
|
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
525
530
|
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
526
531
|
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
@@ -560,7 +565,7 @@ const autoPlacement$1 = function (options) {
|
|
|
560
565
|
...detectOverflowOptions
|
|
561
566
|
} = evaluate(options, state);
|
|
562
567
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
563
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
568
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
564
569
|
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
565
570
|
const currentPlacement = placements$1[currentIndex];
|
|
566
571
|
if (currentPlacement == null) {
|
|
@@ -674,7 +679,7 @@ const flip$1 = function (options) {
|
|
|
674
679
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
675
680
|
}
|
|
676
681
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
677
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
682
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
678
683
|
const overflows = [];
|
|
679
684
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
680
685
|
if (checkMainAxis) {
|
|
@@ -695,16 +700,22 @@ const flip$1 = function (options) {
|
|
|
695
700
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
696
701
|
const nextPlacement = placements[nextIndex];
|
|
697
702
|
if (nextPlacement) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
703
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
704
|
+
if (!ignoreCrossAxisOverflow ||
|
|
705
|
+
// We leave the current main axis only if every placement on that axis
|
|
706
|
+
// overflows the main axis.
|
|
707
|
+
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
708
|
+
// Try next placement and re-run the lifecycle.
|
|
709
|
+
return {
|
|
710
|
+
data: {
|
|
711
|
+
index: nextIndex,
|
|
712
|
+
overflows: overflowsData
|
|
713
|
+
},
|
|
714
|
+
reset: {
|
|
715
|
+
placement: nextPlacement
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
}
|
|
708
719
|
}
|
|
709
720
|
|
|
710
721
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -750,6 +761,8 @@ const flip$1 = function (options) {
|
|
|
750
761
|
};
|
|
751
762
|
};
|
|
752
763
|
|
|
764
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
765
|
+
|
|
753
766
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
754
767
|
// Derivable.
|
|
755
768
|
|
|
@@ -763,7 +776,7 @@ async function convertValueToCoords(state, options) {
|
|
|
763
776
|
const side = getSide(placement);
|
|
764
777
|
const alignment = getAlignment(placement);
|
|
765
778
|
const isVertical = getSideAxis(placement) === 'y';
|
|
766
|
-
const mainAxisMulti =
|
|
779
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
767
780
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
768
781
|
const rawValue = evaluate(options, state);
|
|
769
782
|
|
|
@@ -850,7 +863,8 @@ const shift$1 = function (options) {
|
|
|
850
863
|
const {
|
|
851
864
|
x,
|
|
852
865
|
y,
|
|
853
|
-
placement
|
|
866
|
+
placement,
|
|
867
|
+
platform
|
|
854
868
|
} = state;
|
|
855
869
|
const {
|
|
856
870
|
mainAxis: checkMainAxis = true,
|
|
@@ -873,7 +887,7 @@ const shift$1 = function (options) {
|
|
|
873
887
|
x,
|
|
874
888
|
y
|
|
875
889
|
};
|
|
876
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
890
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
877
891
|
const crossAxis = getSideAxis(getSide(placement));
|
|
878
892
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
879
893
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -956,6 +970,7 @@ function isShadowRoot(value) {
|
|
|
956
970
|
}
|
|
957
971
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
958
972
|
}
|
|
973
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
959
974
|
function isOverflowElement(element) {
|
|
960
975
|
const {
|
|
961
976
|
overflow,
|
|
@@ -963,27 +978,32 @@ function isOverflowElement(element) {
|
|
|
963
978
|
overflowY,
|
|
964
979
|
display
|
|
965
980
|
} = getComputedStyle$1(element);
|
|
966
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
981
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
967
982
|
}
|
|
983
|
+
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
968
984
|
function isTableElement(element) {
|
|
969
|
-
return
|
|
985
|
+
return tableElements.has(getNodeName(element));
|
|
970
986
|
}
|
|
987
|
+
const topLayerSelectors = [':popover-open', ':modal'];
|
|
971
988
|
function isTopLayer(element) {
|
|
972
|
-
return
|
|
989
|
+
return topLayerSelectors.some(selector => {
|
|
973
990
|
try {
|
|
974
991
|
return element.matches(selector);
|
|
975
|
-
} catch (
|
|
992
|
+
} catch (_e) {
|
|
976
993
|
return false;
|
|
977
994
|
}
|
|
978
995
|
});
|
|
979
996
|
}
|
|
997
|
+
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
998
|
+
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
999
|
+
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
980
1000
|
function isContainingBlock(elementOrCss) {
|
|
981
1001
|
const webkit = isWebKit();
|
|
982
1002
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
983
1003
|
|
|
984
1004
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
985
1005
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
986
|
-
return
|
|
1006
|
+
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
|
|
987
1007
|
}
|
|
988
1008
|
function getContainingBlock(element) {
|
|
989
1009
|
let currentNode = getParentNode(element);
|
|
@@ -1001,8 +1021,9 @@ function isWebKit() {
|
|
|
1001
1021
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
1002
1022
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
1003
1023
|
}
|
|
1024
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
1004
1025
|
function isLastTraversableNode(node) {
|
|
1005
|
-
return
|
|
1026
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
1006
1027
|
}
|
|
1007
1028
|
function getComputedStyle$1(element) {
|
|
1008
1029
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -1202,14 +1223,9 @@ function getWindowScrollBarX(element, rect) {
|
|
|
1202
1223
|
return rect.left + leftScroll;
|
|
1203
1224
|
}
|
|
1204
1225
|
|
|
1205
|
-
function getHTMLOffset(documentElement, scroll
|
|
1206
|
-
if (ignoreScrollbarX === void 0) {
|
|
1207
|
-
ignoreScrollbarX = false;
|
|
1208
|
-
}
|
|
1226
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
1209
1227
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
1210
|
-
const x = htmlRect.left + scroll.scrollLeft - (
|
|
1211
|
-
// RTL <body> scrollbar.
|
|
1212
|
-
getWindowScrollBarX(documentElement, htmlRect));
|
|
1228
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1213
1229
|
const y = htmlRect.top + scroll.scrollTop;
|
|
1214
1230
|
return {
|
|
1215
1231
|
x,
|
|
@@ -1248,7 +1264,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1248
1264
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1249
1265
|
}
|
|
1250
1266
|
}
|
|
1251
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll
|
|
1267
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1252
1268
|
return {
|
|
1253
1269
|
width: rect.width * scale.x,
|
|
1254
1270
|
height: rect.height * scale.y,
|
|
@@ -1282,6 +1298,10 @@ function getDocumentRect(element) {
|
|
|
1282
1298
|
};
|
|
1283
1299
|
}
|
|
1284
1300
|
|
|
1301
|
+
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
1302
|
+
// calculation is affected by unusual styles.
|
|
1303
|
+
// Most scrollbars leave 15-18px of space.
|
|
1304
|
+
const SCROLLBAR_MAX = 25;
|
|
1285
1305
|
function getViewportRect(element, strategy) {
|
|
1286
1306
|
const win = getWindow(element);
|
|
1287
1307
|
const html = getDocumentElement(element);
|
|
@@ -1299,6 +1319,24 @@ function getViewportRect(element, strategy) {
|
|
|
1299
1319
|
y = visualViewport.offsetTop;
|
|
1300
1320
|
}
|
|
1301
1321
|
}
|
|
1322
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1323
|
+
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
1324
|
+
// visual width of the <html> but this is not considered in the size
|
|
1325
|
+
// of `html.clientWidth`.
|
|
1326
|
+
if (windowScrollbarX <= 0) {
|
|
1327
|
+
const doc = html.ownerDocument;
|
|
1328
|
+
const body = doc.body;
|
|
1329
|
+
const bodyStyles = getComputedStyle(body);
|
|
1330
|
+
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1331
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1332
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
1333
|
+
width -= clippingStableScrollbarWidth;
|
|
1334
|
+
}
|
|
1335
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1336
|
+
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
1337
|
+
// by the scrollbar amount so there isn't extra space on the right.
|
|
1338
|
+
width += windowScrollbarX;
|
|
1339
|
+
}
|
|
1302
1340
|
return {
|
|
1303
1341
|
width,
|
|
1304
1342
|
height,
|
|
@@ -1307,6 +1345,7 @@ function getViewportRect(element, strategy) {
|
|
|
1307
1345
|
};
|
|
1308
1346
|
}
|
|
1309
1347
|
|
|
1348
|
+
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
1310
1349
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1311
1350
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1312
1351
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -1371,7 +1410,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1371
1410
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1372
1411
|
currentContainingBlockComputedStyle = null;
|
|
1373
1412
|
}
|
|
1374
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
1413
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1375
1414
|
if (shouldDropCurrentNode) {
|
|
1376
1415
|
// Drop non-containing blocks.
|
|
1377
1416
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -1434,6 +1473,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1434
1473
|
scrollTop: 0
|
|
1435
1474
|
};
|
|
1436
1475
|
const offsets = createCoords(0);
|
|
1476
|
+
|
|
1477
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1478
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1479
|
+
function setLeftRTLScrollbarOffset() {
|
|
1480
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1481
|
+
}
|
|
1437
1482
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1438
1483
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1439
1484
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -1443,11 +1488,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1443
1488
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1444
1489
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1445
1490
|
} else if (documentElement) {
|
|
1446
|
-
|
|
1447
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1448
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1491
|
+
setLeftRTLScrollbarOffset();
|
|
1449
1492
|
}
|
|
1450
1493
|
}
|
|
1494
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1495
|
+
setLeftRTLScrollbarOffset();
|
|
1496
|
+
}
|
|
1451
1497
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1452
1498
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1453
1499
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -1624,7 +1670,7 @@ function observeMove(element, onMove) {
|
|
|
1624
1670
|
// Handle <iframe>s
|
|
1625
1671
|
root: root.ownerDocument
|
|
1626
1672
|
});
|
|
1627
|
-
} catch (
|
|
1673
|
+
} catch (_e) {
|
|
1628
1674
|
io = new IntersectionObserver(handleObserve, options);
|
|
1629
1675
|
}
|
|
1630
1676
|
io.observe(element);
|
|
@@ -2415,32 +2461,32 @@ class AuroFloatingUI {
|
|
|
2415
2461
|
|
|
2416
2462
|
// Selectors for focusable elements
|
|
2417
2463
|
const FOCUSABLE_SELECTORS = [
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2464
|
+
"a[href]",
|
|
2465
|
+
"button:not([disabled])",
|
|
2466
|
+
"textarea:not([disabled])",
|
|
2467
|
+
"input:not([disabled])",
|
|
2468
|
+
"select:not([disabled])",
|
|
2423
2469
|
'[role="tab"]:not([disabled])',
|
|
2424
2470
|
'[role="link"]:not([disabled])',
|
|
2425
2471
|
'[role="button"]:not([disabled])',
|
|
2426
2472
|
'[tabindex]:not([tabindex="-1"])',
|
|
2427
|
-
'[contenteditable]:not([contenteditable="false"])'
|
|
2473
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
2428
2474
|
];
|
|
2429
2475
|
|
|
2430
2476
|
// List of custom components that are known to be focusable
|
|
2431
2477
|
const FOCUSABLE_COMPONENTS = [
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
'auro-menu',
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2478
|
+
"auro-checkbox",
|
|
2479
|
+
"auro-radio",
|
|
2480
|
+
"auro-dropdown",
|
|
2481
|
+
"auro-button",
|
|
2482
|
+
"auro-combobox",
|
|
2483
|
+
"auro-input",
|
|
2484
|
+
"auro-counter",
|
|
2485
|
+
// 'auro-menu', // Auro menu is not focusable by default, it uses a different interaction model
|
|
2486
|
+
"auro-select",
|
|
2487
|
+
"auro-datepicker",
|
|
2488
|
+
"auro-hyperlink",
|
|
2489
|
+
"auro-accordion",
|
|
2444
2490
|
];
|
|
2445
2491
|
|
|
2446
2492
|
/**
|
|
@@ -2454,21 +2500,43 @@ function isFocusableComponent(element) {
|
|
|
2454
2500
|
const componentName = element.tagName.toLowerCase();
|
|
2455
2501
|
|
|
2456
2502
|
// Guard Clause: Element is a focusable component
|
|
2457
|
-
if (
|
|
2503
|
+
if (
|
|
2504
|
+
!FOCUSABLE_COMPONENTS.some(
|
|
2505
|
+
(name) => element.hasAttribute(name) || componentName === name,
|
|
2506
|
+
)
|
|
2507
|
+
)
|
|
2508
|
+
return false;
|
|
2458
2509
|
|
|
2459
2510
|
// Guard Clause: Element is not disabled
|
|
2460
|
-
if (element.hasAttribute(
|
|
2511
|
+
if (element.hasAttribute("disabled")) return false;
|
|
2461
2512
|
|
|
2462
2513
|
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
2463
|
-
if (componentName.match("hyperlink") && !element.hasAttribute(
|
|
2514
|
+
if (componentName.match("hyperlink") && !element.hasAttribute("href"))
|
|
2515
|
+
return false;
|
|
2464
2516
|
|
|
2465
2517
|
// If all guard clauses pass, the element is a focusable component
|
|
2466
2518
|
return true;
|
|
2467
2519
|
}
|
|
2468
2520
|
|
|
2521
|
+
/**
|
|
2522
|
+
* Safely get a numeric tabindex for an element.
|
|
2523
|
+
* Returns a number if the tabindex is a valid integer, otherwise null.
|
|
2524
|
+
*
|
|
2525
|
+
* @param {HTMLElement} element The element whose tabindex to read.
|
|
2526
|
+
* @returns {?number} The numeric tabindex or null if missing/invalid.
|
|
2527
|
+
*/
|
|
2528
|
+
function getNumericTabIndex(element) {
|
|
2529
|
+
const raw = element.getAttribute("tabindex");
|
|
2530
|
+
if (raw == null) return null;
|
|
2531
|
+
|
|
2532
|
+
const value = Number.parseInt(raw, 10);
|
|
2533
|
+
return Number.isNaN(value) ? null : value;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2469
2536
|
/**
|
|
2470
2537
|
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
2471
2538
|
* Returns a unique, ordered array of elements that can receive focus.
|
|
2539
|
+
* Also sorts elements with tabindex first, preserving their order.
|
|
2472
2540
|
*
|
|
2473
2541
|
* @param {HTMLElement} container The container to search within
|
|
2474
2542
|
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
@@ -2502,14 +2570,14 @@ function getFocusableElements(container) {
|
|
|
2502
2570
|
if (root.shadowRoot) {
|
|
2503
2571
|
// Process shadow DOM children in order
|
|
2504
2572
|
if (root.shadowRoot.children) {
|
|
2505
|
-
Array.from(root.shadowRoot.children).forEach(child => {
|
|
2573
|
+
Array.from(root.shadowRoot.children).forEach((child) => {
|
|
2506
2574
|
collectFocusableElements(child);
|
|
2507
2575
|
});
|
|
2508
2576
|
}
|
|
2509
2577
|
}
|
|
2510
2578
|
|
|
2511
2579
|
// Process slots and their assigned nodes in order
|
|
2512
|
-
if (root.tagName ===
|
|
2580
|
+
if (root.tagName === "SLOT") {
|
|
2513
2581
|
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
2514
2582
|
for (const node of assignedNodes) {
|
|
2515
2583
|
collectFocusableElements(node);
|
|
@@ -2517,7 +2585,7 @@ function getFocusableElements(container) {
|
|
|
2517
2585
|
} else {
|
|
2518
2586
|
// Process light DOM children in order
|
|
2519
2587
|
if (root.children) {
|
|
2520
|
-
Array.from(root.children).forEach(child => {
|
|
2588
|
+
Array.from(root.children).forEach((child) => {
|
|
2521
2589
|
collectFocusableElements(child);
|
|
2522
2590
|
});
|
|
2523
2591
|
}
|
|
@@ -2540,7 +2608,37 @@ function getFocusableElements(container) {
|
|
|
2540
2608
|
}
|
|
2541
2609
|
}
|
|
2542
2610
|
|
|
2543
|
-
|
|
2611
|
+
// Move tab-indexed elements to the front while preserving their order
|
|
2612
|
+
// This ensures that elements with tabindex are prioritized in the focus order
|
|
2613
|
+
|
|
2614
|
+
// First extract elements with valid positive tabindex
|
|
2615
|
+
const elementsWithTabindex = uniqueElements.filter((el) => {
|
|
2616
|
+
const tabindex = getNumericTabIndex(el);
|
|
2617
|
+
return tabindex !== null && tabindex > 0;
|
|
2618
|
+
});
|
|
2619
|
+
|
|
2620
|
+
// Sort these elements by their tabindex value
|
|
2621
|
+
elementsWithTabindex.sort((a, b) => {
|
|
2622
|
+
const aIndex = getNumericTabIndex(a) ?? 0;
|
|
2623
|
+
const bIndex = getNumericTabIndex(b) ?? 0;
|
|
2624
|
+
return aIndex - bIndex;
|
|
2625
|
+
});
|
|
2626
|
+
|
|
2627
|
+
// Elements without tabindex (preserving their original order)
|
|
2628
|
+
const elementsWithoutTabindex = uniqueElements.filter((el) => {
|
|
2629
|
+
const tabindex = getNumericTabIndex(el);
|
|
2630
|
+
|
|
2631
|
+
// Elements without tabindex or with tabindex of 0 stay in DOM order
|
|
2632
|
+
return tabindex === null || tabindex === 0;
|
|
2633
|
+
});
|
|
2634
|
+
|
|
2635
|
+
// Combine both arrays with tabindex elements first
|
|
2636
|
+
const tabIndexedUniqueElements = [
|
|
2637
|
+
...elementsWithTabindex,
|
|
2638
|
+
...elementsWithoutTabindex,
|
|
2639
|
+
];
|
|
2640
|
+
|
|
2641
|
+
return tabIndexedUniqueElements;
|
|
2544
2642
|
}
|
|
2545
2643
|
|
|
2546
2644
|
/**
|
|
@@ -2553,15 +2651,17 @@ class FocusTrap {
|
|
|
2553
2651
|
* Initializes event listeners and prepares the container for focus management.
|
|
2554
2652
|
*
|
|
2555
2653
|
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
2654
|
+
* @param {boolean} [controlTabOrder=false] If true enables manual control of the tab order by the FocusTrap.
|
|
2556
2655
|
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
2557
2656
|
*/
|
|
2558
|
-
constructor(container) {
|
|
2657
|
+
constructor(container, controlTabOrder = false) {
|
|
2559
2658
|
if (!container || !(container instanceof HTMLElement)) {
|
|
2560
2659
|
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
2561
2660
|
}
|
|
2562
2661
|
|
|
2563
2662
|
this.container = container;
|
|
2564
|
-
this.tabDirection =
|
|
2663
|
+
this.tabDirection = "forward"; // or 'backward';
|
|
2664
|
+
this.controlTabOrder = controlTabOrder;
|
|
2565
2665
|
|
|
2566
2666
|
this._init();
|
|
2567
2667
|
}
|
|
@@ -2573,58 +2673,119 @@ class FocusTrap {
|
|
|
2573
2673
|
* @private
|
|
2574
2674
|
*/
|
|
2575
2675
|
_init() {
|
|
2576
|
-
|
|
2577
2676
|
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
2578
|
-
if (
|
|
2677
|
+
if ("inert" in HTMLElement.prototype) {
|
|
2579
2678
|
this.container.inert = false; // Ensure the container isn't inert
|
|
2580
|
-
this.container.setAttribute(
|
|
2679
|
+
this.container.setAttribute("data-focus-trap-container", true); // Mark for identification
|
|
2581
2680
|
}
|
|
2582
2681
|
|
|
2583
2682
|
// Track tab direction
|
|
2584
|
-
this.container.addEventListener(
|
|
2683
|
+
this.container.addEventListener("keydown", this._onKeydown);
|
|
2585
2684
|
}
|
|
2586
2685
|
|
|
2587
2686
|
/**
|
|
2588
|
-
*
|
|
2589
|
-
*
|
|
2590
|
-
*
|
|
2591
|
-
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
2687
|
+
* Gets an array of currently active (focused) elements in the document and shadow DOM.
|
|
2688
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
2592
2689
|
* @private
|
|
2593
2690
|
*/
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
while (activeElement?.shadowRoot?.activeElement) {
|
|
2607
|
-
actives.push(activeElement.shadowRoot.activeElement);
|
|
2608
|
-
activeElement = activeElement.shadowRoot.activeElement;
|
|
2609
|
-
}
|
|
2691
|
+
_getActiveElements() {
|
|
2692
|
+
// Get the active element(s) in the document and shadow root
|
|
2693
|
+
// This will include the active element in the shadow DOM if it exists
|
|
2694
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
2695
|
+
let { activeElement } = document;
|
|
2696
|
+
const actives = [activeElement];
|
|
2697
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
2698
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
2699
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
2700
|
+
}
|
|
2701
|
+
return actives;
|
|
2702
|
+
}
|
|
2610
2703
|
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2704
|
+
/**
|
|
2705
|
+
* Gets the next focus index based on the current index and focusable elements.
|
|
2706
|
+
* @param {number} currentIndex The current index of the focused element.
|
|
2707
|
+
* @param {Array<HTMLElement>} focusables The array of focusable elements.
|
|
2708
|
+
* @returns {number|null} The next focus index or null if not determined.
|
|
2709
|
+
*/
|
|
2710
|
+
_getNextFocusIndex(currentIndex, focusables, actives) {
|
|
2711
|
+
if (this.controlTabOrder) {
|
|
2712
|
+
// Calculate the new index based on the current index and tab direction
|
|
2713
|
+
let newFocusIndex =
|
|
2714
|
+
currentIndex + (this.tabDirection === "forward" ? 1 : -1);
|
|
2715
|
+
|
|
2716
|
+
// Wrap-around logic
|
|
2717
|
+
if (newFocusIndex < 0) newFocusIndex = focusables.length - 1;
|
|
2718
|
+
if (newFocusIndex >= focusables.length) newFocusIndex = 0;
|
|
2719
|
+
|
|
2720
|
+
// Early return with the new index
|
|
2721
|
+
return newFocusIndex;
|
|
2627
2722
|
}
|
|
2723
|
+
|
|
2724
|
+
// Determine if we need to wrap
|
|
2725
|
+
const atFirst =
|
|
2726
|
+
actives.includes(focusables[0]) || actives.includes(this.container);
|
|
2727
|
+
const atLast = actives.includes(focusables[focusables.length - 1]);
|
|
2728
|
+
|
|
2729
|
+
// Only wrap if at the ends
|
|
2730
|
+
if (this.tabDirection === "backward" && atFirst) {
|
|
2731
|
+
return focusables.length - 1;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
if (this.tabDirection === "forward" && atLast) {
|
|
2735
|
+
return 0;
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
// No wrap, so don't change focus, return early
|
|
2739
|
+
return null;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* Handles the Tab key press event to manage focus within the container.
|
|
2744
|
+
* @param {KeyboardEvent} e The keyboard event triggered by the user.
|
|
2745
|
+
* @returns {void}
|
|
2746
|
+
*/
|
|
2747
|
+
_handleTabKey(e) {
|
|
2748
|
+
// Update the focusable elements
|
|
2749
|
+
const focusables = this._getFocusableElements();
|
|
2750
|
+
|
|
2751
|
+
// If there are no focusable elements, exit
|
|
2752
|
+
if (!focusables.length) return;
|
|
2753
|
+
|
|
2754
|
+
// Set the tab direction based on the key pressed
|
|
2755
|
+
this.tabDirection = e.shiftKey ? "backward" : "forward";
|
|
2756
|
+
|
|
2757
|
+
// Get the active elements that are currently focused
|
|
2758
|
+
const actives = this._getActiveElements();
|
|
2759
|
+
|
|
2760
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
2761
|
+
let focusIndex = focusables.findIndex((el) => actives.includes(el));
|
|
2762
|
+
|
|
2763
|
+
// Fallback if we have no focused element
|
|
2764
|
+
if (focusIndex === -1) focusIndex = 0;
|
|
2765
|
+
|
|
2766
|
+
// Get the next focus index based on the current focus index, tab direction, and controlTabOrder setting
|
|
2767
|
+
// Is null if no new focus index is determined
|
|
2768
|
+
const newFocusIndex = this._getNextFocusIndex(
|
|
2769
|
+
focusIndex,
|
|
2770
|
+
focusables,
|
|
2771
|
+
actives,
|
|
2772
|
+
);
|
|
2773
|
+
|
|
2774
|
+
// If we have a new focus index, set focus to that element
|
|
2775
|
+
if (newFocusIndex !== null) {
|
|
2776
|
+
e.preventDefault();
|
|
2777
|
+
focusables[newFocusIndex].focus();
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* Catches the keydown event
|
|
2783
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
2784
|
+
* @private
|
|
2785
|
+
*/
|
|
2786
|
+
_onKeydown = (e) => {
|
|
2787
|
+
// Handle tab
|
|
2788
|
+
if (e.key === "Tab") this._handleTabKey(e);
|
|
2628
2789
|
};
|
|
2629
2790
|
|
|
2630
2791
|
/**
|
|
@@ -2637,8 +2798,8 @@ class FocusTrap {
|
|
|
2637
2798
|
_getFocusableElements() {
|
|
2638
2799
|
// Use the imported utility function to get focusable elements
|
|
2639
2800
|
const elements = getFocusableElements(this.container);
|
|
2640
|
-
|
|
2641
|
-
//
|
|
2801
|
+
|
|
2802
|
+
// Return the elements found
|
|
2642
2803
|
return elements;
|
|
2643
2804
|
}
|
|
2644
2805
|
|
|
@@ -2665,12 +2826,11 @@ class FocusTrap {
|
|
|
2665
2826
|
* Call this method to clean up when the focus trap is no longer needed.
|
|
2666
2827
|
*/
|
|
2667
2828
|
disconnect() {
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
this.container.removeAttribute('data-focus-trap-container');
|
|
2829
|
+
if (this.container.hasAttribute("data-focus-trap-container")) {
|
|
2830
|
+
this.container.removeAttribute("data-focus-trap-container");
|
|
2671
2831
|
}
|
|
2672
2832
|
|
|
2673
|
-
this.container.removeEventListener(
|
|
2833
|
+
this.container.removeEventListener("keydown", this._onKeydown);
|
|
2674
2834
|
}
|
|
2675
2835
|
}
|
|
2676
2836
|
|
|
@@ -2718,21 +2878,21 @@ class AuroDependencyVersioning {
|
|
|
2718
2878
|
* @license
|
|
2719
2879
|
* Copyright 2018 Google LLC
|
|
2720
2880
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2721
|
-
*/const o=o=>o??
|
|
2881
|
+
*/const o=o=>o??A;
|
|
2722
2882
|
|
|
2723
|
-
class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends i{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=i$2`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
|
|
2724
|
-
`;class z extends m{constructor(){super(),this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w}async fetchIcon(t,a){let e="";e="logos"===t?await f(`${this.uri}/${t}/${a}.svg`):await f(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}i$2`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
|
|
2883
|
+
class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}getSlotText(t,a){const e=t.shadowRoot?.querySelector(`slot[name="${a}"]`);return (e?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim()||null}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends i{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=i$2`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
|
|
2884
|
+
`;class z extends m{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w}async fetchIcon(t,a){let e="";e="logos"===t?await f(`${this.uri}/${t}/${a}.svg`):await f(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}i$2`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
|
|
2725
2885
|
`;var y=i$2`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
|
|
2726
|
-
`;var
|
|
2727
|
-
`;class
|
|
2886
|
+
`;var x=i$2`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
|
|
2887
|
+
`;class _ extends z{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p;}static get properties(){return {...z.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [z.styles,y,w,x]}static register(t="auro-icon"){p.prototype.registerComponent(t,_);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return b$1`
|
|
2728
2888
|
<div class="componentWrapper">
|
|
2729
2889
|
<div
|
|
2730
2890
|
class="${e$3({svgWrapper:true})}"
|
|
2731
2891
|
title="${o(this.title||void 0)}">
|
|
2732
2892
|
<span aria-hidden="${o(this.ariaHidden||true)}" part="svg">
|
|
2733
|
-
${this.customSvg?
|
|
2893
|
+
${this.customSvg?b$1`
|
|
2734
2894
|
<slot name="svg"></slot>
|
|
2735
|
-
`:
|
|
2895
|
+
`:b$1`
|
|
2736
2896
|
${this.svg}
|
|
2737
2897
|
`}
|
|
2738
2898
|
</span>
|
|
@@ -2744,7 +2904,7 @@ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,cl
|
|
|
2744
2904
|
</div>
|
|
2745
2905
|
`}}
|
|
2746
2906
|
|
|
2747
|
-
var iconVersion = '9.1.
|
|
2907
|
+
var iconVersion = '9.1.2';
|
|
2748
2908
|
|
|
2749
2909
|
var styleCss$2 = i$2`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
2750
2910
|
|
|
@@ -3177,7 +3337,7 @@ class AuroHelpText extends i {
|
|
|
3177
3337
|
|
|
3178
3338
|
// function that renders the HTML and CSS into the scope of the component
|
|
3179
3339
|
render() {
|
|
3180
|
-
return
|
|
3340
|
+
return b$1`
|
|
3181
3341
|
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
3182
3342
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
3183
3343
|
</div>
|
|
@@ -3185,7 +3345,7 @@ class AuroHelpText extends i {
|
|
|
3185
3345
|
}
|
|
3186
3346
|
}
|
|
3187
3347
|
|
|
3188
|
-
var formkitVersion = '
|
|
3348
|
+
var formkitVersion = '202602140013';
|
|
3189
3349
|
|
|
3190
3350
|
class AuroElement extends i {
|
|
3191
3351
|
static get properties() {
|
|
@@ -3413,7 +3573,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3413
3573
|
/**
|
|
3414
3574
|
* @private
|
|
3415
3575
|
*/
|
|
3416
|
-
this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion,
|
|
3576
|
+
this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion, _);
|
|
3417
3577
|
|
|
3418
3578
|
/**
|
|
3419
3579
|
* @private
|
|
@@ -3480,7 +3640,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3480
3640
|
* The value for the role attribute of the trigger element.
|
|
3481
3641
|
*/
|
|
3482
3642
|
a11yRole: {
|
|
3483
|
-
type: String
|
|
3643
|
+
type: String,
|
|
3484
3644
|
attribute: false,
|
|
3485
3645
|
reflect: false
|
|
3486
3646
|
},
|