@aurodesignsystem/auro-formkit 6.2.1 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -2
- package/components/bibtemplate/dist/index.js +9 -7
- package/components/bibtemplate/dist/registered.js +9 -7
- package/components/checkbox/demo/customize.min.js +8 -4
- package/components/checkbox/demo/demo-support.min.js +1303 -643
- package/components/checkbox/demo/getting-started.min.js +8 -4
- package/components/checkbox/demo/index.min.js +8 -4
- package/components/checkbox/dist/index.js +7 -3
- package/components/checkbox/dist/registered.js +7 -3
- package/components/combobox/demo/customize.min.js +516 -193
- package/components/combobox/demo/demo-support.min.js +1303 -643
- package/components/combobox/demo/getting-started.min.js +516 -193
- package/components/combobox/demo/index.min.js +516 -193
- package/components/combobox/dist/auro-combobox.d.ts +14 -0
- package/components/combobox/dist/index.js +421 -178
- package/components/combobox/dist/registered.js +421 -178
- package/components/counter/demo/api.md +0 -1
- package/components/counter/demo/customize.md +4 -4
- package/components/counter/demo/customize.min.js +341 -182
- package/components/counter/demo/demo-support.min.js +1303 -643
- package/components/counter/demo/getting-started.min.js +341 -182
- package/components/counter/demo/index.min.js +341 -182
- package/components/counter/dist/auro-counter-group.d.ts +0 -7
- package/components/counter/dist/index.js +339 -180
- package/components/counter/dist/registered.js +339 -180
- package/components/datepicker/demo/customize.min.js +425 -192
- package/components/datepicker/demo/demo-support.min.js +1303 -643
- package/components/datepicker/demo/getting-started.min.js +425 -192
- package/components/datepicker/demo/index.min.js +425 -192
- package/components/datepicker/dist/index.js +423 -190
- package/components/datepicker/dist/registered.js +423 -190
- package/components/dropdown/demo/customize.min.js +313 -154
- package/components/dropdown/demo/demo-support.min.js +1303 -643
- package/components/dropdown/demo/getting-started.min.js +375 -168
- package/components/dropdown/demo/index.min.js +313 -154
- package/components/dropdown/dist/index.js +311 -152
- package/components/dropdown/dist/registered.js +311 -152
- package/components/form/demo/customize.min.js +1702 -763
- package/components/form/demo/demo-support.min.js +1303 -643
- package/components/form/demo/getting-started.min.js +1702 -763
- package/components/form/demo/index.min.js +1702 -763
- package/components/form/demo/registerDemoDeps.min.js +1702 -763
- package/components/input/demo/customize.min.js +64 -16
- package/components/input/demo/demo-support.min.js +1303 -643
- package/components/input/demo/getting-started.min.js +64 -16
- package/components/input/demo/index.min.js +64 -16
- package/components/input/dist/auro-input.d.ts +14 -0
- package/components/input/dist/index.js +62 -14
- package/components/input/dist/registered.js +62 -14
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/demo-support.min.js +1303 -643
- package/components/menu/demo/index.min.js +93 -13
- package/components/menu/dist/auro-menu-utils.d.ts +15 -2
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +92 -12
- package/components/menu/dist/registered.js +92 -12
- package/components/radio/demo/customize.min.js +8 -4
- package/components/radio/demo/demo-support.min.js +1303 -643
- package/components/radio/demo/getting-started.min.js +8 -4
- package/components/radio/demo/index.min.js +8 -4
- package/components/radio/dist/index.js +7 -3
- package/components/radio/dist/registered.js +7 -3
- package/components/select/demo/customize.min.js +433 -187
- package/components/select/demo/demo-support.min.js +1303 -643
- package/components/select/demo/getting-started.min.js +433 -187
- package/components/select/demo/index.min.js +433 -187
- package/components/select/dist/index.js +339 -173
- package/components/select/dist/registered.js +339 -173
- package/custom-elements.json +7551 -7498
- package/package.json +56 -56
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$2=globalThis,i$5=t=>t,s$4=t$2.trustedTypes,e$6=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=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x(1),E$1=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$6?e$6.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$1(t,i,s=t,e){if(i===E$1)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$1(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$1(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++;}}let k$1 = 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$1(this,t,i),a$2(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E$1&&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$1(this,t,i,0),o=!a$2(t)||t!==this._$AH&&t!==E$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$1(this,e[s+n],i,n),r===E$1&&(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$1(this,t,i,0)??A)===E$1)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$1(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S$1,k$1),(t$2.litHtmlVersions??=[]).push("3.3.
|
|
6
|
+
const t$2=globalThis,i$5=t=>t,s$4=t$2.trustedTypes,e$6=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=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x(1),E$1=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$6?e$6.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$1(t,i,s=t,e){if(i===E$1)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$1(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$1(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++;}}let k$1 = 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$1(this,t,i),a$2(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E$1&&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$1(this,t,i,0),o=!a$2(t)||t!==this._$AH&&t!==E$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$1(this,e[s+n],i,n),r===E$1&&(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$1(this,t,i,0)??A)===E$1)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$1(this,t);}}const B=t$2.litHtmlPolyfillSupport;B?.(S$1,k$1),(t$2.litHtmlVersions??=[]).push("3.3.3");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$1(i.insertBefore(c$3(),t),t,void 0,s??{});}return h._$AI(t),h};
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
@@ -41,7 +41,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$5=t=>(...e)=>({_$litDirective$:t,values:e});le
|
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2020 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const e$3=()=>new h$1;let h$1 = class h{};const o$4=new WeakMap,n$2=e$5(class extends f$2{render(i){return A}update(i,[s]){const e=s!==this.G;return e&&
|
|
44
|
+
*/const e$3=()=>new h$1;let h$1 = class h{};const o$4=new WeakMap,n$2=e$5(class extends f$2{render(i){return A}update(i,[s]){const e=s!==this.G;return e&&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(void 0!==this.G)if(this.isConnected||(t=void 0),"function"==typeof this.G){const i=this.ht??globalThis;let s=o$4.get(i);void 0===s&&(s=new WeakMap,o$4.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$4.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});
|
|
45
45
|
|
|
46
46
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
47
47
|
// See LICENSE in the project root for license information.
|
|
@@ -226,12 +226,12 @@ function getOppositePlacement(placement) {
|
|
|
226
226
|
return oppositeSideMap[side] + placement.slice(side.length);
|
|
227
227
|
}
|
|
228
228
|
function expandPaddingObject(padding) {
|
|
229
|
+
var _padding$top, _padding$right, _padding$bottom, _padding$left;
|
|
229
230
|
return {
|
|
230
|
-
top: 0,
|
|
231
|
-
right: 0,
|
|
232
|
-
bottom: 0,
|
|
233
|
-
left: 0
|
|
234
|
-
...padding
|
|
231
|
+
top: (_padding$top = padding.top) != null ? _padding$top : 0,
|
|
232
|
+
right: (_padding$right = padding.right) != null ? _padding$right : 0,
|
|
233
|
+
bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
|
|
234
|
+
left: (_padding$left = padding.left) != null ? _padding$left : 0
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
function getPaddingObject(padding) {
|
|
@@ -306,13 +306,9 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
306
306
|
y: reference.y
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
break;
|
|
313
|
-
case 'end':
|
|
314
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
315
|
-
break;
|
|
309
|
+
const alignment = getAlignment(placement);
|
|
310
|
+
if (alignment) {
|
|
311
|
+
coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
|
|
316
312
|
}
|
|
317
313
|
return coords;
|
|
318
314
|
}
|
|
@@ -361,10 +357,7 @@ async function detectOverflow(state, options) {
|
|
|
361
357
|
height: rects.floating.height
|
|
362
358
|
} : rects.reference;
|
|
363
359
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
364
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)))
|
|
365
|
-
x: 1,
|
|
366
|
-
y: 1
|
|
367
|
-
} : {
|
|
360
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
368
361
|
x: 1,
|
|
369
362
|
y: 1
|
|
370
363
|
};
|
|
@@ -519,13 +512,11 @@ const autoPlacement$1 = function (options) {
|
|
|
519
512
|
...detectOverflowOptions
|
|
520
513
|
} = evaluate(options, state);
|
|
521
514
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
522
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
523
515
|
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
524
516
|
const currentPlacement = placements$1[currentIndex];
|
|
525
517
|
if (currentPlacement == null) {
|
|
526
518
|
return {};
|
|
527
519
|
}
|
|
528
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
529
520
|
|
|
530
521
|
// Make `computeCoords` start from the right place.
|
|
531
522
|
if (placement !== currentPlacement) {
|
|
@@ -535,6 +526,8 @@ const autoPlacement$1 = function (options) {
|
|
|
535
526
|
}
|
|
536
527
|
};
|
|
537
528
|
}
|
|
529
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
530
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
538
531
|
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
539
532
|
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
540
533
|
placement: currentPlacement,
|
|
@@ -842,23 +835,16 @@ const shift$1 = function (options) {
|
|
|
842
835
|
y
|
|
843
836
|
};
|
|
844
837
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
845
|
-
const crossAxis = getSideAxis(
|
|
838
|
+
const crossAxis = getSideAxis(placement);
|
|
846
839
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
847
840
|
let mainAxisCoord = coords[mainAxis];
|
|
848
841
|
let crossAxisCoord = coords[crossAxis];
|
|
842
|
+
const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
|
|
849
843
|
if (checkMainAxis) {
|
|
850
|
-
|
|
851
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
852
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
853
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
854
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
844
|
+
mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
|
|
855
845
|
}
|
|
856
846
|
if (checkCrossAxis) {
|
|
857
|
-
|
|
858
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
859
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
860
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
861
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
847
|
+
crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
|
|
862
848
|
}
|
|
863
849
|
const limitedCoords = limiter.fn({
|
|
864
850
|
...state,
|
|
@@ -1015,7 +1001,7 @@ function getParentNode(node) {
|
|
|
1015
1001
|
function getNearestOverflowAncestor(node) {
|
|
1016
1002
|
const parentNode = getParentNode(node);
|
|
1017
1003
|
if (isLastTraversableNode(parentNode)) {
|
|
1018
|
-
return node.ownerDocument
|
|
1004
|
+
return (node.ownerDocument || node).body;
|
|
1019
1005
|
}
|
|
1020
1006
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1021
1007
|
return parentNode;
|
|
@@ -1112,10 +1098,7 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
|
1112
1098
|
if (isFixed === void 0) {
|
|
1113
1099
|
isFixed = false;
|
|
1114
1100
|
}
|
|
1115
|
-
|
|
1116
|
-
return false;
|
|
1117
|
-
}
|
|
1118
|
-
return isFixed;
|
|
1101
|
+
return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
|
|
1119
1102
|
}
|
|
1120
1103
|
|
|
1121
1104
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
@@ -1142,12 +1125,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1142
1125
|
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1143
1126
|
let width = clientRect.width / scale.x;
|
|
1144
1127
|
let height = clientRect.height / scale.y;
|
|
1145
|
-
if (domElement) {
|
|
1128
|
+
if (domElement && offsetParent) {
|
|
1146
1129
|
const win = getWindow(domElement);
|
|
1147
|
-
const offsetWin =
|
|
1130
|
+
const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1148
1131
|
let currentWin = win;
|
|
1149
1132
|
let currentIFrame = getFrameElement(currentWin);
|
|
1150
|
-
while (currentIFrame &&
|
|
1133
|
+
while (currentIFrame && offsetWin !== currentWin) {
|
|
1151
1134
|
const iframeScale = getScale(currentIFrame);
|
|
1152
1135
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1153
1136
|
const css = getComputedStyle$1(currentIFrame);
|
|
@@ -1211,7 +1194,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1211
1194
|
let scale = createCoords(1);
|
|
1212
1195
|
const offsets = createCoords(0);
|
|
1213
1196
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1214
|
-
if (isOffsetParentAnElement || !
|
|
1197
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1215
1198
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1216
1199
|
scroll = getNodeScroll(offsetParent);
|
|
1217
1200
|
}
|
|
@@ -1232,18 +1215,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1232
1215
|
}
|
|
1233
1216
|
|
|
1234
1217
|
function getClientRects(element) {
|
|
1235
|
-
return Array.from(element.getClientRects());
|
|
1218
|
+
return element.getClientRects ? Array.from(element.getClientRects()) : [];
|
|
1236
1219
|
}
|
|
1237
1220
|
|
|
1238
1221
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
1239
1222
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1240
|
-
function getDocumentRect(
|
|
1241
|
-
const
|
|
1242
|
-
const
|
|
1243
|
-
const body = element.ownerDocument.body;
|
|
1223
|
+
function getDocumentRect(html) {
|
|
1224
|
+
const scroll = getNodeScroll(html);
|
|
1225
|
+
const body = html.ownerDocument.body;
|
|
1244
1226
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1245
1227
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1246
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(
|
|
1228
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(html);
|
|
1247
1229
|
const y = -scroll.scrollTop;
|
|
1248
1230
|
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1249
1231
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
@@ -1260,7 +1242,11 @@ function getDocumentRect(element) {
|
|
|
1260
1242
|
// calculation is affected by unusual styles.
|
|
1261
1243
|
// Most scrollbars leave 15-18px of space.
|
|
1262
1244
|
const SCROLLBAR_MAX = 25;
|
|
1263
|
-
function getViewportRect(element, strategy) {
|
|
1245
|
+
function getViewportRect(element, strategy, rootBoundary) {
|
|
1246
|
+
if (rootBoundary === void 0) {
|
|
1247
|
+
rootBoundary = 'viewport';
|
|
1248
|
+
}
|
|
1249
|
+
const isLayoutViewport = rootBoundary === 'layoutViewport';
|
|
1264
1250
|
const win = getWindow(element);
|
|
1265
1251
|
const html = getDocumentElement(element);
|
|
1266
1252
|
const visualViewport = win.visualViewport;
|
|
@@ -1269,31 +1255,42 @@ function getViewportRect(element, strategy) {
|
|
|
1269
1255
|
let x = 0;
|
|
1270
1256
|
let y = 0;
|
|
1271
1257
|
if (visualViewport) {
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1258
|
+
// Client coordinates are relative to the layout viewport, except in
|
|
1259
|
+
// WebKit with an `absolute` strategy, where they are relative to the
|
|
1260
|
+
// visual viewport.
|
|
1261
|
+
const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
|
|
1262
|
+
if (isLayoutViewport) {
|
|
1263
|
+
if (!layoutRelativeClientCoords) {
|
|
1264
|
+
x = -visualViewport.offsetLeft;
|
|
1265
|
+
y = -visualViewport.offsetTop;
|
|
1266
|
+
}
|
|
1267
|
+
} else {
|
|
1268
|
+
width = visualViewport.width;
|
|
1269
|
+
height = visualViewport.height;
|
|
1270
|
+
if (layoutRelativeClientCoords) {
|
|
1271
|
+
x = visualViewport.offsetLeft;
|
|
1272
|
+
y = visualViewport.offsetTop;
|
|
1273
|
+
}
|
|
1278
1274
|
}
|
|
1279
1275
|
}
|
|
1280
1276
|
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1281
|
-
//
|
|
1282
|
-
// visual width
|
|
1283
|
-
//
|
|
1277
|
+
// `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
|
|
1278
|
+
// the visual width but isn't reflected in `html.clientWidth`, so subtract it.
|
|
1279
|
+
// Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
|
|
1280
|
+
// reserves an empty inline-start gutter that clips nothing, so exclude just
|
|
1281
|
+
// the one scrollbar-side gutter — halve the measured (two-gutter) total. A
|
|
1282
|
+
// left-side scrollbar (`windowScrollbarX > 0`) is already handled by
|
|
1283
|
+
// `getHTMLOffset`/`visualViewport.width`; skip it here.
|
|
1284
1284
|
if (windowScrollbarX <= 0) {
|
|
1285
1285
|
const doc = html.ownerDocument;
|
|
1286
1286
|
const body = doc.body;
|
|
1287
1287
|
const bodyStyles = getComputedStyle(body);
|
|
1288
1288
|
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1291
|
-
|
|
1289
|
+
const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1290
|
+
const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
|
|
1291
|
+
if (gutter <= SCROLLBAR_MAX) {
|
|
1292
|
+
width -= gutter;
|
|
1292
1293
|
}
|
|
1293
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1294
|
-
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
1295
|
-
// by the scrollbar amount so there isn't extra space on the right.
|
|
1296
|
-
width += windowScrollbarX;
|
|
1297
1294
|
}
|
|
1298
1295
|
return {
|
|
1299
1296
|
width,
|
|
@@ -1308,7 +1305,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
1308
1305
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1309
1306
|
const top = clientRect.top + element.clientTop;
|
|
1310
1307
|
const left = clientRect.left + element.clientLeft;
|
|
1311
|
-
const scale =
|
|
1308
|
+
const scale = getScale(element);
|
|
1312
1309
|
const width = element.clientWidth * scale.x;
|
|
1313
1310
|
const height = element.clientHeight * scale.y;
|
|
1314
1311
|
const x = left * scale.x;
|
|
@@ -1322,8 +1319,8 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
1322
1319
|
}
|
|
1323
1320
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1324
1321
|
let rect;
|
|
1325
|
-
if (clippingAncestor === 'viewport') {
|
|
1326
|
-
rect = getViewportRect(element, strategy);
|
|
1322
|
+
if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
|
|
1323
|
+
rect = getViewportRect(element, strategy, clippingAncestor);
|
|
1327
1324
|
} else if (clippingAncestor === 'document') {
|
|
1328
1325
|
rect = getDocumentRect(getDocumentElement(element));
|
|
1329
1326
|
} else if (isElement(clippingAncestor)) {
|
|
@@ -1339,13 +1336,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
1339
1336
|
}
|
|
1340
1337
|
return rectToClientRect(rect);
|
|
1341
1338
|
}
|
|
1342
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1343
|
-
const parentNode = getParentNode(element);
|
|
1344
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1345
|
-
return false;
|
|
1346
|
-
}
|
|
1347
|
-
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1348
|
-
}
|
|
1349
1339
|
|
|
1350
1340
|
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1351
1341
|
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
@@ -1356,7 +1346,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1356
1346
|
return cachedResult;
|
|
1357
1347
|
}
|
|
1358
1348
|
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1359
|
-
let
|
|
1349
|
+
let lastKeptComputedStyle = null;
|
|
1360
1350
|
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1361
1351
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1362
1352
|
|
|
@@ -1364,16 +1354,20 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1364
1354
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1365
1355
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
1366
1356
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1357
|
+
// Position of the containing block chain below the current node. A fixed
|
|
1358
|
+
// element whose containing block hasn't been found yet is a fixed chain.
|
|
1359
|
+
const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
|
|
1360
|
+
|
|
1361
|
+
// A non-containing ancestor does not clip the element when the chain
|
|
1362
|
+
// below it escapes it: a fixed chain escapes all ancestors up to the
|
|
1363
|
+
// next containing block, an absolute chain escapes static ancestors.
|
|
1364
|
+
const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
|
|
1371
1365
|
if (shouldDropCurrentNode) {
|
|
1372
1366
|
// Drop non-containing blocks.
|
|
1373
1367
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1374
1368
|
} else {
|
|
1375
|
-
//
|
|
1376
|
-
|
|
1369
|
+
// The kept node carries the chain position for the next iteration.
|
|
1370
|
+
lastKeptComputedStyle = computedStyle;
|
|
1377
1371
|
}
|
|
1378
1372
|
currentNode = getParentNode(currentNode);
|
|
1379
1373
|
}
|
|
@@ -1433,13 +1427,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1433
1427
|
scrollTop: 0
|
|
1434
1428
|
};
|
|
1435
1429
|
const offsets = createCoords(0);
|
|
1436
|
-
|
|
1437
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1438
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1439
|
-
function setLeftRTLScrollbarOffset() {
|
|
1440
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1441
|
-
}
|
|
1442
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1430
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1443
1431
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1444
1432
|
scroll = getNodeScroll(offsetParent);
|
|
1445
1433
|
}
|
|
@@ -1447,12 +1435,13 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1447
1435
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1448
1436
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1449
1437
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1450
|
-
} else if (documentElement) {
|
|
1451
|
-
setLeftRTLScrollbarOffset();
|
|
1452
1438
|
}
|
|
1453
1439
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1440
|
+
|
|
1441
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1442
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1443
|
+
if (!isOffsetParentAnElement && documentElement) {
|
|
1444
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1456
1445
|
}
|
|
1457
1446
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1458
1447
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
@@ -1552,7 +1541,7 @@ function rectsAreEqual(a, b) {
|
|
|
1552
1541
|
}
|
|
1553
1542
|
|
|
1554
1543
|
// https://samthor.au/2021/observing-dom/
|
|
1555
|
-
function observeMove(element, onMove) {
|
|
1544
|
+
function observeMove(element, onMove, ancestorResize) {
|
|
1556
1545
|
let io = null;
|
|
1557
1546
|
let timeoutId;
|
|
1558
1547
|
const root = getDocumentElement(element);
|
|
@@ -1595,13 +1584,22 @@ function observeMove(element, onMove) {
|
|
|
1595
1584
|
let isFirstUpdate = true;
|
|
1596
1585
|
function handleObserve(entries) {
|
|
1597
1586
|
const ratio = entries[0].intersectionRatio;
|
|
1587
|
+
|
|
1588
|
+
// The entry is a snapshot, so the reference may have moved since the
|
|
1589
|
+
// intersection was computed (under performance constraints, or between
|
|
1590
|
+
// consecutive frames of a multi-frame layout shift). The reported ratio
|
|
1591
|
+
// and the observed area are stale in that case and cannot be trusted to
|
|
1592
|
+
// detect subsequent movement, so refresh regardless of the ratio.
|
|
1593
|
+
if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1594
|
+
return refresh();
|
|
1595
|
+
}
|
|
1598
1596
|
if (ratio !== threshold) {
|
|
1599
1597
|
if (!isFirstUpdate) {
|
|
1600
1598
|
return refresh();
|
|
1601
1599
|
}
|
|
1602
1600
|
if (!ratio) {
|
|
1603
|
-
// If the reference is clipped, the ratio is 0. Throttle
|
|
1604
|
-
// to prevent an infinite loop of updates.
|
|
1601
|
+
// If the reference is clipped in place, the ratio is 0. Throttle
|
|
1602
|
+
// the refresh to prevent an infinite loop of updates.
|
|
1605
1603
|
timeoutId = setTimeout(() => {
|
|
1606
1604
|
refresh(false, 1e-7);
|
|
1607
1605
|
}, 1000);
|
|
@@ -1609,16 +1607,6 @@ function observeMove(element, onMove) {
|
|
|
1609
1607
|
refresh(false, ratio);
|
|
1610
1608
|
}
|
|
1611
1609
|
}
|
|
1612
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1613
|
-
// It's possible that even though the ratio is reported as 1, the
|
|
1614
|
-
// element is not actually fully within the IntersectionObserver's root
|
|
1615
|
-
// area anymore. This can happen under performance constraints. This may
|
|
1616
|
-
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1617
|
-
// work around this, we compare the element's bounding rect now with
|
|
1618
|
-
// what it was at the time we created the IntersectionObserver. If they
|
|
1619
|
-
// are not equal then the element moved, so we refresh.
|
|
1620
|
-
refresh();
|
|
1621
|
-
}
|
|
1622
1610
|
isFirstUpdate = false;
|
|
1623
1611
|
}
|
|
1624
1612
|
|
|
@@ -1635,8 +1623,18 @@ function observeMove(element, onMove) {
|
|
|
1635
1623
|
}
|
|
1636
1624
|
io.observe(element);
|
|
1637
1625
|
}
|
|
1626
|
+
const win = getWindow(element);
|
|
1627
|
+
// The window is a resize ancestor, so when `ancestorResize` is enabled its
|
|
1628
|
+
// listener already runs the update on resize. Here we only need to rebuild
|
|
1629
|
+
// the `IntersectionObserver` for the new root size, skipping a redundant
|
|
1630
|
+
// update. When `ancestorResize` is disabled, this becomes the sole update.
|
|
1631
|
+
const handleResize = () => refresh(ancestorResize);
|
|
1632
|
+
win.addEventListener('resize', handleResize);
|
|
1638
1633
|
refresh(true);
|
|
1639
|
-
return
|
|
1634
|
+
return () => {
|
|
1635
|
+
win.removeEventListener('resize', handleResize);
|
|
1636
|
+
cleanup();
|
|
1637
|
+
};
|
|
1640
1638
|
}
|
|
1641
1639
|
|
|
1642
1640
|
/**
|
|
@@ -1661,12 +1659,10 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1661
1659
|
const referenceEl = unwrapElement(reference);
|
|
1662
1660
|
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
1663
1661
|
ancestors.forEach(ancestor => {
|
|
1664
|
-
ancestorScroll && ancestor.addEventListener('scroll', update
|
|
1665
|
-
passive: true
|
|
1666
|
-
});
|
|
1662
|
+
ancestorScroll && ancestor.addEventListener('scroll', update);
|
|
1667
1663
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1668
1664
|
});
|
|
1669
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1665
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
|
|
1670
1666
|
let reobserveFrame = -1;
|
|
1671
1667
|
let resizeObserver = null;
|
|
1672
1668
|
if (elementResize) {
|
|
@@ -1761,11 +1757,9 @@ const computePosition = (reference, floating, options) => {
|
|
|
1761
1757
|
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1762
1758
|
// single call. If other functions become expensive, we can add them as well.
|
|
1763
1759
|
const cache = new Map();
|
|
1764
|
-
const mergedOptions = {
|
|
1765
|
-
platform,
|
|
1766
|
-
...options
|
|
1767
|
-
};
|
|
1760
|
+
const mergedOptions = options != null ? options : {};
|
|
1768
1761
|
const platformWithCache = {
|
|
1762
|
+
...platform,
|
|
1769
1763
|
...mergedOptions.platform,
|
|
1770
1764
|
_c: cache
|
|
1771
1765
|
};
|
|
@@ -2104,30 +2098,61 @@ class AuroFloatingUI {
|
|
|
2104
2098
|
|
|
2105
2099
|
/**
|
|
2106
2100
|
* @private
|
|
2107
|
-
*
|
|
2108
|
-
*
|
|
2101
|
+
* Mirrors `aria-modal` onto the `<dialog>` inside the bib, tracking the page
|
|
2102
|
+
* scroll lock: an overlay that holds the page hides it from assistive tech.
|
|
2103
|
+
*
|
|
2104
|
+
* The removal is called only from inside lockScroll()'s ownership guard: run
|
|
2105
|
+
* outside it, it fired on every autoUpdate tick of every NON-owning instance,
|
|
2106
|
+
* and a repositioning dropdown stripped `aria-modal` off an open modal dialog
|
|
2107
|
+
* it had nothing to do with. The write is unguarded by design — see the call
|
|
2108
|
+
* site — but is skipped when the attribute already reads correctly, so the
|
|
2109
|
+
* repeat costs no mutation record.
|
|
2110
|
+
* @param {Boolean} modal - True to mark the dialog modal; false to unmark it.
|
|
2109
2111
|
*/
|
|
2110
|
-
|
|
2112
|
+
mirrorAriaModal(modal) {
|
|
2111
2113
|
const element = this.element;
|
|
2114
|
+
const dialog = element?.bib
|
|
2115
|
+
? (element.bib?.shadowRoot || element.bib || element).querySelector(
|
|
2116
|
+
"dialog",
|
|
2117
|
+
)
|
|
2118
|
+
: undefined;
|
|
2112
2119
|
|
|
2113
|
-
if (!
|
|
2120
|
+
if (!dialog) {
|
|
2114
2121
|
return;
|
|
2115
2122
|
}
|
|
2116
2123
|
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
element.bib ||
|
|
2120
|
-
element
|
|
2121
|
-
).querySelector("dialog");
|
|
2122
|
-
if (dialog) {
|
|
2123
|
-
if (lock) {
|
|
2124
|
+
if (modal) {
|
|
2125
|
+
if (dialog.getAttribute("aria-modal") !== "true") {
|
|
2124
2126
|
dialog.setAttribute("aria-modal", "true");
|
|
2125
|
-
} else {
|
|
2126
|
-
dialog.removeAttribute("aria-modal");
|
|
2127
2127
|
}
|
|
2128
|
+
} else {
|
|
2129
|
+
dialog.removeAttribute("aria-modal");
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/**
|
|
2134
|
+
* @private
|
|
2135
|
+
* Controls whether to lock the scrolling for the document's body.
|
|
2136
|
+
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
2137
|
+
*/
|
|
2138
|
+
lockScroll(lock = true) {
|
|
2139
|
+
const element = this.element;
|
|
2140
|
+
|
|
2141
|
+
// Locking needs a bib to lock around; unlocking must not, or a bib that has
|
|
2142
|
+
// already been detached would leave the page frozen with no way back.
|
|
2143
|
+
if (lock && !element?.bib) {
|
|
2144
|
+
return;
|
|
2128
2145
|
}
|
|
2129
2146
|
|
|
2130
2147
|
if (lock) {
|
|
2148
|
+
// Re-asserted on every lock call rather than only on the unlocked ->
|
|
2149
|
+
// locked transition. If the bib's inner <dialog> is replaced while this
|
|
2150
|
+
// instance still holds the lock, the replacement would otherwise go
|
|
2151
|
+
// unmarked until a full unlock/lock cycle. Safe to repeat: it targets
|
|
2152
|
+
// this instance's own element, so it cannot reach another overlay's
|
|
2153
|
+
// dialog, and mirrorAriaModal() skips the write when already correct.
|
|
2154
|
+
this.mirrorAriaModal(true);
|
|
2155
|
+
|
|
2131
2156
|
if (!this._scrollLocked) {
|
|
2132
2157
|
this._scrollLocked = true;
|
|
2133
2158
|
this._savedScrollY = window.scrollY;
|
|
@@ -2185,6 +2210,8 @@ class AuroFloatingUI {
|
|
|
2185
2210
|
}
|
|
2186
2211
|
} else {
|
|
2187
2212
|
if (this._scrollLocked) {
|
|
2213
|
+
this.mirrorAriaModal(false);
|
|
2214
|
+
|
|
2188
2215
|
if (this._viewportHandler && window.visualViewport) {
|
|
2189
2216
|
window.visualViewport.removeEventListener(
|
|
2190
2217
|
"resize",
|
|
@@ -2297,15 +2324,47 @@ class AuroFloatingUI {
|
|
|
2297
2324
|
} else if (this.configureTrial < MAX_CONFIGURATION_COUNT) {
|
|
2298
2325
|
this.configureTrial += 1;
|
|
2299
2326
|
|
|
2300
|
-
|
|
2327
|
+
// The id is retained so disconnect() can cancel it. A retry that fires
|
|
2328
|
+
// after teardown re-enters this method with isPopoverVisible still true
|
|
2329
|
+
// — nothing clears it on the teardown path — and takes the page scroll
|
|
2330
|
+
// lock back, with no owner left to release it.
|
|
2331
|
+
//
|
|
2332
|
+
// This is not the rare timing race it reads as: the lookup above wants
|
|
2333
|
+
// a `.container` inside the BIB's own shadow root, which only a bib
|
|
2334
|
+
// that is itself a custom element has. A consumer whose bib is a plain
|
|
2335
|
+
// element (auro-dialog's `#bib` is a div, with its `.container` a
|
|
2336
|
+
// sibling in the host's shadow root) can never satisfy it, so it
|
|
2337
|
+
// retries the full MAX_CONFIGURATION_COUNT every time. Correcting the
|
|
2338
|
+
// lookup would change bib sizing for those consumers and is tracked
|
|
2339
|
+
// separately; cancelling the timer is what keeps it from freezing the
|
|
2340
|
+
// page.
|
|
2341
|
+
this._configureRetryId = setTimeout(() => {
|
|
2342
|
+
this._configureRetryId = undefined;
|
|
2301
2343
|
this.configureBibStrategy(value);
|
|
2302
2344
|
}, 0);
|
|
2303
2345
|
}
|
|
2304
2346
|
|
|
2305
2347
|
if (element.isPopoverVisible) {
|
|
2306
|
-
|
|
2348
|
+
// Positioning strategy is not scroll ownership. Both "fullscreen" and
|
|
2349
|
+
// "dialog" lay the bib over the page and trap focus inside it, so both
|
|
2350
|
+
// must freeze the page behind them (AB#1647843). Gating this on
|
|
2351
|
+
// "fullscreen" alone left dismissible desktop dialogs and drawers
|
|
2352
|
+
// scrollable, and actively released the lock on every reposition
|
|
2353
|
+
// (AB#1625424, AB#1625435). The nested "cover" strategy takes the else
|
|
2354
|
+
// branch and stays scrollable by design — it sits inside its parent
|
|
2355
|
+
// rather than over the page.
|
|
2356
|
+
this.lockScroll(true);
|
|
2307
2357
|
}
|
|
2308
2358
|
} else {
|
|
2359
|
+
// The mirror of the lock above: a strategy that does not own the page must
|
|
2360
|
+
// hand the lock back, not merely decline to take it. autoUpdate re-runs
|
|
2361
|
+
// this method on every resize tick, and getPositioningStrategy() flips
|
|
2362
|
+
// "fullscreen" -> "floating" across the breakpoint for dropdown behavior —
|
|
2363
|
+
// so an overlay that locked while narrow can land here while still open.
|
|
2364
|
+
// Without this, the page stays frozen behind a small floating bib until
|
|
2365
|
+
// hideBib() happens to run.
|
|
2366
|
+
this.lockScroll(false);
|
|
2367
|
+
|
|
2309
2368
|
element.bib.style.position = "";
|
|
2310
2369
|
element.bib.removeAttribute("isfullscreen");
|
|
2311
2370
|
element.isBibFullscreen = false;
|
|
@@ -2415,6 +2474,46 @@ class AuroFloatingUI {
|
|
|
2415
2474
|
this.hideBib("focusloss");
|
|
2416
2475
|
}
|
|
2417
2476
|
|
|
2477
|
+
/**
|
|
2478
|
+
* @private
|
|
2479
|
+
* Installs the handlers that dismiss an open overlay.
|
|
2480
|
+
*
|
|
2481
|
+
* Shared by showBib(), which opens the overlay, and configure(), which has to
|
|
2482
|
+
* put these back after a rewire tore them down under an overlay that is still
|
|
2483
|
+
* open. A non-modal overlay dismisses on outside click, focus loss and
|
|
2484
|
+
* Escape; a modal one instead swallows Escape so the native dialog's
|
|
2485
|
+
* CloseWatcher never sees it (AB#1613688).
|
|
2486
|
+
*/
|
|
2487
|
+
setupDismissHandlers() {
|
|
2488
|
+
const element = this.element;
|
|
2489
|
+
if (!element) {
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
if (!element.modal) {
|
|
2494
|
+
this.setupHideHandlers();
|
|
2495
|
+
return;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
if (this.keyDownHandler) {
|
|
2499
|
+
document.removeEventListener("keydown", this.keyDownHandler);
|
|
2500
|
+
}
|
|
2501
|
+
this.keyDownHandler = (evt) => {
|
|
2502
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
2503
|
+
// Intercept at keydown so CloseWatcher never sees the keystroke.
|
|
2504
|
+
// Canceling `cancel` alone is insufficient — a second Esc with no
|
|
2505
|
+
// intervening user activation triggers the anti-trap and fires `close`
|
|
2506
|
+
// directly, bypassing any `cancel` preventDefault (AB#1613688).
|
|
2507
|
+
// stopImmediatePropagation is intentional: it prevents other document
|
|
2508
|
+
// keydown handlers (e.g. consumer code, auro-dialog) from also acting
|
|
2509
|
+
// on Escape while the modal owns the key.
|
|
2510
|
+
evt.preventDefault();
|
|
2511
|
+
evt.stopImmediatePropagation();
|
|
2512
|
+
}
|
|
2513
|
+
};
|
|
2514
|
+
document.addEventListener("keydown", this.keyDownHandler);
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2418
2517
|
setupHideHandlers() {
|
|
2419
2518
|
const element = this.element;
|
|
2420
2519
|
if (!element) {
|
|
@@ -2587,27 +2686,7 @@ class AuroFloatingUI {
|
|
|
2587
2686
|
|
|
2588
2687
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
2589
2688
|
if (!this.showing) {
|
|
2590
|
-
|
|
2591
|
-
this.setupHideHandlers();
|
|
2592
|
-
} else {
|
|
2593
|
-
if (this.keyDownHandler) {
|
|
2594
|
-
document.removeEventListener("keydown", this.keyDownHandler);
|
|
2595
|
-
}
|
|
2596
|
-
this.keyDownHandler = (evt) => {
|
|
2597
|
-
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
2598
|
-
// Intercept at keydown so CloseWatcher never sees the keystroke.
|
|
2599
|
-
// Canceling `cancel` alone is insufficient — a second Esc with no
|
|
2600
|
-
// intervening user activation triggers the anti-trap and fires `close`
|
|
2601
|
-
// directly, bypassing any `cancel` preventDefault (AB#1613688).
|
|
2602
|
-
// stopImmediatePropagation is intentional: it prevents other document
|
|
2603
|
-
// keydown handlers (e.g. consumer code, auro-dialog) from also acting
|
|
2604
|
-
// on Escape while the modal owns the key.
|
|
2605
|
-
evt.preventDefault();
|
|
2606
|
-
evt.stopImmediatePropagation();
|
|
2607
|
-
}
|
|
2608
|
-
};
|
|
2609
|
-
document.addEventListener("keydown", this.keyDownHandler);
|
|
2610
|
-
}
|
|
2689
|
+
this.setupDismissHandlers();
|
|
2611
2690
|
this.showing = true;
|
|
2612
2691
|
element.isPopoverVisible = true;
|
|
2613
2692
|
this.position();
|
|
@@ -2847,7 +2926,35 @@ class AuroFloatingUI {
|
|
|
2847
2926
|
this.enableKeyboardHandling = enableKeyboardHandling;
|
|
2848
2927
|
|
|
2849
2928
|
this.eventPrefix = eventPrefix;
|
|
2850
|
-
|
|
2929
|
+
|
|
2930
|
+
// A retained scroll lock's saved body styles were captured for whichever
|
|
2931
|
+
// element held it, so only a same-element rewire may keep it. An actual
|
|
2932
|
+
// element swap has to take the full teardown, or this instance is left
|
|
2933
|
+
// holding a lock that no longer describes the page it points at — with no
|
|
2934
|
+
// owner able to release it (AB#1647843).
|
|
2935
|
+
const rewiringSameElement = this.element === elem;
|
|
2936
|
+
|
|
2937
|
+
if (!rewiringSameElement) {
|
|
2938
|
+
// Tear down against the outgoing element, before this.element is
|
|
2939
|
+
// repointed. Everything disconnect() releases is element-scoped:
|
|
2940
|
+
// aria-modal on that element's inner dialog, the bib transform saved for
|
|
2941
|
+
// it, its autoUpdate loop and its trigger listeners. Repointing first
|
|
2942
|
+
// aimed all of it at the incoming element — the outgoing dialog kept
|
|
2943
|
+
// aria-modal="true" for good, its bib stayed transformed, and the
|
|
2944
|
+
// incoming bib had the outgoing element's saved transform written onto
|
|
2945
|
+
// it. The trigger gate below read the incoming element's trigger, which
|
|
2946
|
+
// is not assigned until later in this method, so on a swap teardown was
|
|
2947
|
+
// usually skipped outright and the page stayed locked with no owner.
|
|
2948
|
+
if (this.element?.trigger) {
|
|
2949
|
+
this.disconnect({ teardown: true });
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
// disconnect() does not clear this.showing, and the rewire block at the
|
|
2953
|
+
// end of this method only runs for a same-element rewire. Left true, the
|
|
2954
|
+
// incoming element's first showBib() is silently dropped by its
|
|
2955
|
+
// `!this.showing` guard and the overlay never opens.
|
|
2956
|
+
this.showing = false;
|
|
2957
|
+
|
|
2851
2958
|
this.element = elem;
|
|
2852
2959
|
}
|
|
2853
2960
|
|
|
@@ -2860,8 +2967,10 @@ class AuroFloatingUI {
|
|
|
2860
2967
|
this.behavior = element.behavior;
|
|
2861
2968
|
}
|
|
2862
2969
|
|
|
2863
|
-
if (element.trigger) {
|
|
2864
|
-
|
|
2970
|
+
if (rewiringSameElement && element.trigger) {
|
|
2971
|
+
// Rewiring, not tearing down — an overlay that is open right now keeps
|
|
2972
|
+
// its page scroll lock across a trigger change.
|
|
2973
|
+
this.disconnect({ teardown: false });
|
|
2865
2974
|
}
|
|
2866
2975
|
element.trigger =
|
|
2867
2976
|
element.triggerElement ||
|
|
@@ -2890,11 +2999,61 @@ class AuroFloatingUI {
|
|
|
2890
2999
|
element.trigger.addEventListener("focus", this.handleEvent);
|
|
2891
3000
|
element.trigger.addEventListener("blur", this.handleEvent);
|
|
2892
3001
|
}
|
|
3002
|
+
|
|
3003
|
+
// disconnect() above stripped the dismissal handlers and killed the
|
|
3004
|
+
// autoUpdate loop; the trigger listeners re-registered here replace
|
|
3005
|
+
// neither. An overlay that is open right now would otherwise be left on
|
|
3006
|
+
// screen with outside-click, focus-loss and Escape all dead and its
|
|
3007
|
+
// position frozen — and, since the lock is deliberately retained, holding
|
|
3008
|
+
// the page with only its original trigger able to give it back.
|
|
3009
|
+
if (rewiringSameElement && this.showing) {
|
|
3010
|
+
this.setupDismissHandlers();
|
|
3011
|
+
|
|
3012
|
+
if (element.bib && (element.trigger || element.parentNode)) {
|
|
3013
|
+
element.cleanup = autoUpdate(
|
|
3014
|
+
element.trigger || element.parentNode,
|
|
3015
|
+
element.bib,
|
|
3016
|
+
() => {
|
|
3017
|
+
this.position();
|
|
3018
|
+
},
|
|
3019
|
+
);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
2893
3022
|
}
|
|
2894
3023
|
|
|
2895
|
-
|
|
3024
|
+
/**
|
|
3025
|
+
* Tears the floater's connections down.
|
|
3026
|
+
*
|
|
3027
|
+
* Two callers with different intent share this: a real teardown, which must
|
|
3028
|
+
* release the page scroll lock, and configure(), which re-runs it purely to
|
|
3029
|
+
* rewire a changed trigger and must leave an open overlay's lock alone.
|
|
3030
|
+
* @param {Object} [options] - Teardown options.
|
|
3031
|
+
* @param {Boolean} [options.teardown] - False when only rewiring; keeps the
|
|
3032
|
+
* page scroll lock held for an overlay that is still open.
|
|
3033
|
+
* @returns {void}
|
|
3034
|
+
*/
|
|
3035
|
+
disconnect({ teardown = true } = {}) {
|
|
2896
3036
|
this.cleanupHideHandlers();
|
|
2897
3037
|
|
|
3038
|
+
// Cancel any pending configureBibStrategy() retry. It would otherwise fire
|
|
3039
|
+
// a macrotask after the unlock below, re-lock the page, and leave it frozen
|
|
3040
|
+
// with the floater already gone. Cancelled on a rewire too: configure()
|
|
3041
|
+
// re-runs position() itself, so a stale retry has nothing to contribute.
|
|
3042
|
+
if (this._configureRetryId !== undefined) {
|
|
3043
|
+
clearTimeout(this._configureRetryId);
|
|
3044
|
+
this._configureRetryId = undefined;
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
// Tearing down while the bib is still open would otherwise strand
|
|
3048
|
+
// body{position:fixed} and leave the page permanently unscrollable —
|
|
3049
|
+
// hideBib() is the only other unlock, and it never runs in this path.
|
|
3050
|
+
// Skipped when merely rewiring: configure() routes through here on every
|
|
3051
|
+
// triggerElement change, and releasing the lock there would unlock the page
|
|
3052
|
+
// behind an overlay that is still open (AB#1625424, AB#1625435).
|
|
3053
|
+
if (teardown) {
|
|
3054
|
+
this.lockScroll(false);
|
|
3055
|
+
}
|
|
3056
|
+
|
|
2898
3057
|
const element = this.element;
|
|
2899
3058
|
if (!element) {
|
|
2900
3059
|
return;
|
|
@@ -3911,7 +4070,7 @@ class AuroHelpText extends i {
|
|
|
3911
4070
|
}
|
|
3912
4071
|
}
|
|
3913
4072
|
|
|
3914
|
-
var formkitVersion = '
|
|
4073
|
+
var formkitVersion = '202610081824';
|
|
3915
4074
|
|
|
3916
4075
|
/**
|
|
3917
4076
|
* AuroElement is the shared base class for layout-aware Auro form components.
|