@aurodesignsystem-dev/auro-formkit 0.0.0-pr785.3 → 0.0.0-pr788.1
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/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 +136 -121
- package/components/bibtemplate/dist/registered.js +136 -121
- package/components/checkbox/demo/api.md +2 -1
- package/components/checkbox/demo/api.min.js +25 -7
- package/components/checkbox/demo/index.min.js +25 -7
- package/components/checkbox/dist/index.js +24 -6
- package/components/checkbox/dist/registered.js +24 -6
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.md +9 -0
- package/components/combobox/demo/api.min.js +317 -265
- package/components/combobox/demo/index.md +12 -0
- package/components/combobox/demo/index.min.js +317 -265
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +9 -4
- package/components/combobox/dist/index.js +310 -258
- package/components/combobox/dist/registered.js +310 -258
- package/components/counter/demo/api.md +11 -0
- package/components/counter/demo/api.min.js +289 -238
- package/components/counter/demo/index.md +6 -0
- package/components/counter/demo/index.min.js +289 -238
- package/components/counter/dist/auro-counter-group.d.ts +11 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +283 -232
- package/components/counter/dist/registered.js +283 -232
- package/components/datepicker/README.md +2 -1
- package/components/datepicker/demo/api.md +53 -19
- package/components/datepicker/demo/api.min.js +652 -369
- package/components/datepicker/demo/index.md +16 -4
- package/components/datepicker/demo/index.min.js +652 -369
- package/components/datepicker/demo/readme.md +2 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +79 -12
- package/components/datepicker/dist/index.js +651 -368
- package/components/datepicker/dist/registered.js +651 -368
- package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +13 -61
- package/components/dropdown/demo/index.min.js +13 -61
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -7
- package/components/dropdown/dist/index.js +12 -60
- package/components/dropdown/dist/registered.js +12 -60
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/input/README.md +1 -0
- package/components/input/demo/api.md +16 -7
- package/components/input/demo/api.min.js +117 -52
- package/components/input/demo/index.md +7 -0
- package/components/input/demo/index.min.js +117 -52
- package/components/input/demo/readme.md +1 -0
- package/components/input/dist/auro-input.d.ts +0 -6
- package/components/input/dist/base-input.d.ts +8 -2
- package/components/input/dist/index.js +116 -51
- package/components/input/dist/registered.js +116 -51
- package/components/menu/demo/api.min.js +3 -3
- package/components/menu/demo/index.min.js +3 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +2 -2
- package/components/menu/dist/registered.js +2 -2
- package/components/radio/demo/api.md +32 -1
- package/components/radio/demo/api.min.js +19 -8
- package/components/radio/demo/index.min.js +19 -8
- package/components/radio/dist/index.js +18 -7
- package/components/radio/dist/registered.js +18 -7
- package/components/select/README.md +1 -0
- package/components/select/demo/api.md +49 -64
- package/components/select/demo/api.min.js +202 -210
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +1065 -137
- package/components/select/demo/index.min.js +202 -210
- package/components/select/demo/readme.md +1 -0
- package/components/select/dist/auro-select.d.ts +11 -5
- package/components/select/dist/index.js +195 -203
- package/components/select/dist/registered.js +195 -203
- package/package.json +8 -8
- /package/components/datepicker/dist/styles/{default → classic}/color-css.d.ts +0 -0
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|-----------------------------|--------------------------------------|--------------------------------------------------|
|
|
49
49
|
| `auroDropdown-idAdded` | `Object<key : 'id', value: string>` | |
|
|
50
50
|
| `auroDropdown-toggled` | | Notifies that the visibility of the dropdown bib has changed. |
|
|
51
|
-
| `auroDropdown-triggerClick` |
|
|
51
|
+
| `auroDropdown-triggerClick` | `CustomEvent<any>` | Notifies that the trigger has been clicked. |
|
|
52
52
|
|
|
53
53
|
## Slots
|
|
54
54
|
|
|
@@ -61,7 +61,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
-
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o$2,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={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=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;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(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(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(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(t),...o$2(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$1(s));}else void 0!==s&&i.push(c$1(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).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;this._$Em=e
|
|
64
|
+
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o$2,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={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=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;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(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(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(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(t),...o$2(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$1(s));}else void 0!==s&&i.push(c$1(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).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;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){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
@@ -1891,6 +1891,7 @@ class AuroFloatingUI {
|
|
|
1891
1891
|
this.element.bib.style.left = "0px";
|
|
1892
1892
|
this.element.bib.style.width = '';
|
|
1893
1893
|
this.element.bib.style.height = '';
|
|
1894
|
+
this.element.style.contain = '';
|
|
1894
1895
|
|
|
1895
1896
|
// reset the size that was mirroring `size` css-part
|
|
1896
1897
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -1915,6 +1916,7 @@ class AuroFloatingUI {
|
|
|
1915
1916
|
this.element.bib.style.position = '';
|
|
1916
1917
|
this.element.bib.removeAttribute('isfullscreen');
|
|
1917
1918
|
this.element.isBibFullscreen = false;
|
|
1919
|
+
this.element.style.contain = 'layout';
|
|
1918
1920
|
}
|
|
1919
1921
|
|
|
1920
1922
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3535,6 +3537,7 @@ class AuroElement extends i {
|
|
|
3535
3537
|
// See LICENSE in the project root for license information.
|
|
3536
3538
|
|
|
3537
3539
|
|
|
3540
|
+
|
|
3538
3541
|
/*
|
|
3539
3542
|
* @slot - Default slot for the popover content.
|
|
3540
3543
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -4038,6 +4041,13 @@ class AuroDropdown extends AuroElement {
|
|
|
4038
4041
|
|
|
4039
4042
|
// Add the tag name as an attribute if it is different than the component name
|
|
4040
4043
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
4044
|
+
|
|
4045
|
+
this.trigger.addEventListener('click', () => {
|
|
4046
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
4047
|
+
bubbles: true,
|
|
4048
|
+
composed: true
|
|
4049
|
+
}));
|
|
4050
|
+
});
|
|
4041
4051
|
}
|
|
4042
4052
|
|
|
4043
4053
|
/**
|
|
@@ -4110,64 +4120,6 @@ class AuroDropdown extends AuroElement {
|
|
|
4110
4120
|
this.hasFocus = false;
|
|
4111
4121
|
}
|
|
4112
4122
|
|
|
4113
|
-
/**
|
|
4114
|
-
* Determines if the element or any children are focusable.
|
|
4115
|
-
* @private
|
|
4116
|
-
* @param {HTMLElement} element - Element to check.
|
|
4117
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4118
|
-
*/
|
|
4119
|
-
containsFocusableElement(element) {
|
|
4120
|
-
this.showTriggerBorders = true;
|
|
4121
|
-
|
|
4122
|
-
const nodes = [
|
|
4123
|
-
element,
|
|
4124
|
-
...element.children
|
|
4125
|
-
];
|
|
4126
|
-
|
|
4127
|
-
const focusableElements = [
|
|
4128
|
-
'a',
|
|
4129
|
-
'auro-hyperlink',
|
|
4130
|
-
'button',
|
|
4131
|
-
'auro-button',
|
|
4132
|
-
'input',
|
|
4133
|
-
'auro-input',
|
|
4134
|
-
];
|
|
4135
|
-
|
|
4136
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4137
|
-
|
|
4138
|
-
const result = nodes.some((node) => {
|
|
4139
|
-
const tagName = node.tagName.toLowerCase();
|
|
4140
|
-
|
|
4141
|
-
if (node.tabIndex > -1) {
|
|
4142
|
-
return true;
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
if (focusableElements.includes(tagName)) {
|
|
4146
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4147
|
-
return true;
|
|
4148
|
-
}
|
|
4149
|
-
if (!node.hasAttribute('disabled')) {
|
|
4150
|
-
return true;
|
|
4151
|
-
}
|
|
4152
|
-
}
|
|
4153
|
-
|
|
4154
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4155
|
-
return true;
|
|
4156
|
-
}
|
|
4157
|
-
|
|
4158
|
-
return false;
|
|
4159
|
-
});
|
|
4160
|
-
|
|
4161
|
-
if (result) {
|
|
4162
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4163
|
-
const tagName = node.tagName.toLowerCase();
|
|
4164
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4165
|
-
});
|
|
4166
|
-
}
|
|
4167
|
-
|
|
4168
|
-
return result;
|
|
4169
|
-
}
|
|
4170
|
-
|
|
4171
4123
|
/**
|
|
4172
4124
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4173
4125
|
* @private
|
|
@@ -4279,7 +4231,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4279
4231
|
if (triggerContentNodes) {
|
|
4280
4232
|
|
|
4281
4233
|
// See if any of them are focusable elements
|
|
4282
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
4234
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4283
4235
|
|
|
4284
4236
|
// If any of them are focusable elements
|
|
4285
4237
|
if (this.triggerContentFocusable) {
|
|
@@ -4351,7 +4303,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4351
4303
|
<div
|
|
4352
4304
|
id="trigger"
|
|
4353
4305
|
class="${e$2(this.commonWrapperClasses)}" part="wrapper"
|
|
4354
|
-
tabindex="${this.tabIndex}"
|
|
4306
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4355
4307
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4356
4308
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4357
4309
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -36,7 +36,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o$2,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={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=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;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(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(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(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(t),...o$2(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$1(s));}else void 0!==s&&i.push(c$1(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).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;this._$Em=e
|
|
39
|
+
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o$2,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={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=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;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(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(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(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(t),...o$2(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$1(s));}else void 0!==s&&i.push(c$1(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).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;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){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* @license
|
|
@@ -1866,6 +1866,7 @@ class AuroFloatingUI {
|
|
|
1866
1866
|
this.element.bib.style.left = "0px";
|
|
1867
1867
|
this.element.bib.style.width = '';
|
|
1868
1868
|
this.element.bib.style.height = '';
|
|
1869
|
+
this.element.style.contain = '';
|
|
1869
1870
|
|
|
1870
1871
|
// reset the size that was mirroring `size` css-part
|
|
1871
1872
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -1890,6 +1891,7 @@ class AuroFloatingUI {
|
|
|
1890
1891
|
this.element.bib.style.position = '';
|
|
1891
1892
|
this.element.bib.removeAttribute('isfullscreen');
|
|
1892
1893
|
this.element.isBibFullscreen = false;
|
|
1894
|
+
this.element.style.contain = 'layout';
|
|
1893
1895
|
}
|
|
1894
1896
|
|
|
1895
1897
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3510,6 +3512,7 @@ class AuroElement extends i {
|
|
|
3510
3512
|
// See LICENSE in the project root for license information.
|
|
3511
3513
|
|
|
3512
3514
|
|
|
3515
|
+
|
|
3513
3516
|
/*
|
|
3514
3517
|
* @slot - Default slot for the popover content.
|
|
3515
3518
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -4013,6 +4016,13 @@ class AuroDropdown extends AuroElement {
|
|
|
4013
4016
|
|
|
4014
4017
|
// Add the tag name as an attribute if it is different than the component name
|
|
4015
4018
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
4019
|
+
|
|
4020
|
+
this.trigger.addEventListener('click', () => {
|
|
4021
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
4022
|
+
bubbles: true,
|
|
4023
|
+
composed: true
|
|
4024
|
+
}));
|
|
4025
|
+
});
|
|
4016
4026
|
}
|
|
4017
4027
|
|
|
4018
4028
|
/**
|
|
@@ -4085,64 +4095,6 @@ class AuroDropdown extends AuroElement {
|
|
|
4085
4095
|
this.hasFocus = false;
|
|
4086
4096
|
}
|
|
4087
4097
|
|
|
4088
|
-
/**
|
|
4089
|
-
* Determines if the element or any children are focusable.
|
|
4090
|
-
* @private
|
|
4091
|
-
* @param {HTMLElement} element - Element to check.
|
|
4092
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4093
|
-
*/
|
|
4094
|
-
containsFocusableElement(element) {
|
|
4095
|
-
this.showTriggerBorders = true;
|
|
4096
|
-
|
|
4097
|
-
const nodes = [
|
|
4098
|
-
element,
|
|
4099
|
-
...element.children
|
|
4100
|
-
];
|
|
4101
|
-
|
|
4102
|
-
const focusableElements = [
|
|
4103
|
-
'a',
|
|
4104
|
-
'auro-hyperlink',
|
|
4105
|
-
'button',
|
|
4106
|
-
'auro-button',
|
|
4107
|
-
'input',
|
|
4108
|
-
'auro-input',
|
|
4109
|
-
];
|
|
4110
|
-
|
|
4111
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4112
|
-
|
|
4113
|
-
const result = nodes.some((node) => {
|
|
4114
|
-
const tagName = node.tagName.toLowerCase();
|
|
4115
|
-
|
|
4116
|
-
if (node.tabIndex > -1) {
|
|
4117
|
-
return true;
|
|
4118
|
-
}
|
|
4119
|
-
|
|
4120
|
-
if (focusableElements.includes(tagName)) {
|
|
4121
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4122
|
-
return true;
|
|
4123
|
-
}
|
|
4124
|
-
if (!node.hasAttribute('disabled')) {
|
|
4125
|
-
return true;
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
|
|
4129
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4130
|
-
return true;
|
|
4131
|
-
}
|
|
4132
|
-
|
|
4133
|
-
return false;
|
|
4134
|
-
});
|
|
4135
|
-
|
|
4136
|
-
if (result) {
|
|
4137
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4138
|
-
const tagName = node.tagName.toLowerCase();
|
|
4139
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4140
|
-
});
|
|
4141
|
-
}
|
|
4142
|
-
|
|
4143
|
-
return result;
|
|
4144
|
-
}
|
|
4145
|
-
|
|
4146
4098
|
/**
|
|
4147
4099
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4148
4100
|
* @private
|
|
@@ -4254,7 +4206,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4254
4206
|
if (triggerContentNodes) {
|
|
4255
4207
|
|
|
4256
4208
|
// See if any of them are focusable elements
|
|
4257
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
4209
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4258
4210
|
|
|
4259
4211
|
// If any of them are focusable elements
|
|
4260
4212
|
if (this.triggerContentFocusable) {
|
|
@@ -4326,7 +4278,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4326
4278
|
<div
|
|
4327
4279
|
id="trigger"
|
|
4328
4280
|
class="${e$2(this.commonWrapperClasses)}" part="wrapper"
|
|
4329
|
-
tabindex="${this.tabIndex}"
|
|
4281
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4330
4282
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4331
4283
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4332
4284
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -348,13 +348,6 @@ export class AuroDropdown extends AuroElement {
|
|
|
348
348
|
* @return {void}
|
|
349
349
|
*/
|
|
350
350
|
private handleFocusout;
|
|
351
|
-
/**
|
|
352
|
-
* Determines if the element or any children are focusable.
|
|
353
|
-
* @private
|
|
354
|
-
* @param {HTMLElement} element - Element to check.
|
|
355
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
356
|
-
*/
|
|
357
|
-
private containsFocusableElement;
|
|
358
351
|
/**
|
|
359
352
|
* Sets up event listeners to deliver focus and blur events from nested Auro components within the trigger slot to trigger.
|
|
360
353
|
* This ensures that focus/blur events originating from within these components are propagated to the trigger element itself.
|
|
@@ -1825,6 +1825,7 @@ class AuroFloatingUI {
|
|
|
1825
1825
|
this.element.bib.style.left = "0px";
|
|
1826
1826
|
this.element.bib.style.width = '';
|
|
1827
1827
|
this.element.bib.style.height = '';
|
|
1828
|
+
this.element.style.contain = '';
|
|
1828
1829
|
|
|
1829
1830
|
// reset the size that was mirroring `size` css-part
|
|
1830
1831
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -1849,6 +1850,7 @@ class AuroFloatingUI {
|
|
|
1849
1850
|
this.element.bib.style.position = '';
|
|
1850
1851
|
this.element.bib.removeAttribute('isfullscreen');
|
|
1851
1852
|
this.element.isBibFullscreen = false;
|
|
1853
|
+
this.element.style.contain = 'layout';
|
|
1852
1854
|
}
|
|
1853
1855
|
|
|
1854
1856
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3463,6 +3465,7 @@ class AuroElement extends LitElement {
|
|
|
3463
3465
|
// See LICENSE in the project root for license information.
|
|
3464
3466
|
|
|
3465
3467
|
|
|
3468
|
+
|
|
3466
3469
|
/*
|
|
3467
3470
|
* @slot - Default slot for the popover content.
|
|
3468
3471
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -3966,6 +3969,13 @@ class AuroDropdown extends AuroElement {
|
|
|
3966
3969
|
|
|
3967
3970
|
// Add the tag name as an attribute if it is different than the component name
|
|
3968
3971
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
3972
|
+
|
|
3973
|
+
this.trigger.addEventListener('click', () => {
|
|
3974
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
3975
|
+
bubbles: true,
|
|
3976
|
+
composed: true
|
|
3977
|
+
}));
|
|
3978
|
+
});
|
|
3969
3979
|
}
|
|
3970
3980
|
|
|
3971
3981
|
/**
|
|
@@ -4038,64 +4048,6 @@ class AuroDropdown extends AuroElement {
|
|
|
4038
4048
|
this.hasFocus = false;
|
|
4039
4049
|
}
|
|
4040
4050
|
|
|
4041
|
-
/**
|
|
4042
|
-
* Determines if the element or any children are focusable.
|
|
4043
|
-
* @private
|
|
4044
|
-
* @param {HTMLElement} element - Element to check.
|
|
4045
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4046
|
-
*/
|
|
4047
|
-
containsFocusableElement(element) {
|
|
4048
|
-
this.showTriggerBorders = true;
|
|
4049
|
-
|
|
4050
|
-
const nodes = [
|
|
4051
|
-
element,
|
|
4052
|
-
...element.children
|
|
4053
|
-
];
|
|
4054
|
-
|
|
4055
|
-
const focusableElements = [
|
|
4056
|
-
'a',
|
|
4057
|
-
'auro-hyperlink',
|
|
4058
|
-
'button',
|
|
4059
|
-
'auro-button',
|
|
4060
|
-
'input',
|
|
4061
|
-
'auro-input',
|
|
4062
|
-
];
|
|
4063
|
-
|
|
4064
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4065
|
-
|
|
4066
|
-
const result = nodes.some((node) => {
|
|
4067
|
-
const tagName = node.tagName.toLowerCase();
|
|
4068
|
-
|
|
4069
|
-
if (node.tabIndex > -1) {
|
|
4070
|
-
return true;
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
if (focusableElements.includes(tagName)) {
|
|
4074
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4075
|
-
return true;
|
|
4076
|
-
}
|
|
4077
|
-
if (!node.hasAttribute('disabled')) {
|
|
4078
|
-
return true;
|
|
4079
|
-
}
|
|
4080
|
-
}
|
|
4081
|
-
|
|
4082
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4083
|
-
return true;
|
|
4084
|
-
}
|
|
4085
|
-
|
|
4086
|
-
return false;
|
|
4087
|
-
});
|
|
4088
|
-
|
|
4089
|
-
if (result) {
|
|
4090
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4091
|
-
const tagName = node.tagName.toLowerCase();
|
|
4092
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4093
|
-
});
|
|
4094
|
-
}
|
|
4095
|
-
|
|
4096
|
-
return result;
|
|
4097
|
-
}
|
|
4098
|
-
|
|
4099
4051
|
/**
|
|
4100
4052
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4101
4053
|
* @private
|
|
@@ -4207,7 +4159,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4207
4159
|
if (triggerContentNodes) {
|
|
4208
4160
|
|
|
4209
4161
|
// See if any of them are focusable elements
|
|
4210
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
4162
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4211
4163
|
|
|
4212
4164
|
// If any of them are focusable elements
|
|
4213
4165
|
if (this.triggerContentFocusable) {
|
|
@@ -4279,7 +4231,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4279
4231
|
<div
|
|
4280
4232
|
id="trigger"
|
|
4281
4233
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4282
|
-
tabindex="${this.tabIndex}"
|
|
4234
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4283
4235
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4284
4236
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4285
4237
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -1825,6 +1825,7 @@ class AuroFloatingUI {
|
|
|
1825
1825
|
this.element.bib.style.left = "0px";
|
|
1826
1826
|
this.element.bib.style.width = '';
|
|
1827
1827
|
this.element.bib.style.height = '';
|
|
1828
|
+
this.element.style.contain = '';
|
|
1828
1829
|
|
|
1829
1830
|
// reset the size that was mirroring `size` css-part
|
|
1830
1831
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -1849,6 +1850,7 @@ class AuroFloatingUI {
|
|
|
1849
1850
|
this.element.bib.style.position = '';
|
|
1850
1851
|
this.element.bib.removeAttribute('isfullscreen');
|
|
1851
1852
|
this.element.isBibFullscreen = false;
|
|
1853
|
+
this.element.style.contain = 'layout';
|
|
1852
1854
|
}
|
|
1853
1855
|
|
|
1854
1856
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3463,6 +3465,7 @@ class AuroElement extends LitElement {
|
|
|
3463
3465
|
// See LICENSE in the project root for license information.
|
|
3464
3466
|
|
|
3465
3467
|
|
|
3468
|
+
|
|
3466
3469
|
/*
|
|
3467
3470
|
* @slot - Default slot for the popover content.
|
|
3468
3471
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -3966,6 +3969,13 @@ class AuroDropdown extends AuroElement {
|
|
|
3966
3969
|
|
|
3967
3970
|
// Add the tag name as an attribute if it is different than the component name
|
|
3968
3971
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
3972
|
+
|
|
3973
|
+
this.trigger.addEventListener('click', () => {
|
|
3974
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
3975
|
+
bubbles: true,
|
|
3976
|
+
composed: true
|
|
3977
|
+
}));
|
|
3978
|
+
});
|
|
3969
3979
|
}
|
|
3970
3980
|
|
|
3971
3981
|
/**
|
|
@@ -4038,64 +4048,6 @@ class AuroDropdown extends AuroElement {
|
|
|
4038
4048
|
this.hasFocus = false;
|
|
4039
4049
|
}
|
|
4040
4050
|
|
|
4041
|
-
/**
|
|
4042
|
-
* Determines if the element or any children are focusable.
|
|
4043
|
-
* @private
|
|
4044
|
-
* @param {HTMLElement} element - Element to check.
|
|
4045
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4046
|
-
*/
|
|
4047
|
-
containsFocusableElement(element) {
|
|
4048
|
-
this.showTriggerBorders = true;
|
|
4049
|
-
|
|
4050
|
-
const nodes = [
|
|
4051
|
-
element,
|
|
4052
|
-
...element.children
|
|
4053
|
-
];
|
|
4054
|
-
|
|
4055
|
-
const focusableElements = [
|
|
4056
|
-
'a',
|
|
4057
|
-
'auro-hyperlink',
|
|
4058
|
-
'button',
|
|
4059
|
-
'auro-button',
|
|
4060
|
-
'input',
|
|
4061
|
-
'auro-input',
|
|
4062
|
-
];
|
|
4063
|
-
|
|
4064
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4065
|
-
|
|
4066
|
-
const result = nodes.some((node) => {
|
|
4067
|
-
const tagName = node.tagName.toLowerCase();
|
|
4068
|
-
|
|
4069
|
-
if (node.tabIndex > -1) {
|
|
4070
|
-
return true;
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
if (focusableElements.includes(tagName)) {
|
|
4074
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4075
|
-
return true;
|
|
4076
|
-
}
|
|
4077
|
-
if (!node.hasAttribute('disabled')) {
|
|
4078
|
-
return true;
|
|
4079
|
-
}
|
|
4080
|
-
}
|
|
4081
|
-
|
|
4082
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4083
|
-
return true;
|
|
4084
|
-
}
|
|
4085
|
-
|
|
4086
|
-
return false;
|
|
4087
|
-
});
|
|
4088
|
-
|
|
4089
|
-
if (result) {
|
|
4090
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4091
|
-
const tagName = node.tagName.toLowerCase();
|
|
4092
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4093
|
-
});
|
|
4094
|
-
}
|
|
4095
|
-
|
|
4096
|
-
return result;
|
|
4097
|
-
}
|
|
4098
|
-
|
|
4099
4051
|
/**
|
|
4100
4052
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4101
4053
|
* @private
|
|
@@ -4207,7 +4159,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4207
4159
|
if (triggerContentNodes) {
|
|
4208
4160
|
|
|
4209
4161
|
// See if any of them are focusable elements
|
|
4210
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
4162
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4211
4163
|
|
|
4212
4164
|
// If any of them are focusable elements
|
|
4213
4165
|
if (this.triggerContentFocusable) {
|
|
@@ -4279,7 +4231,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4279
4231
|
<div
|
|
4280
4232
|
id="trigger"
|
|
4281
4233
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4282
|
-
tabindex="${this.tabIndex}"
|
|
4234
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4283
4235
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4284
4236
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4285
4237
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -9,7 +9,7 @@ const t$1=globalThis,e$2=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.na
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.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$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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
|
|
12
|
+
*/const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.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$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.1");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -9,7 +9,7 @@ const t$1=globalThis,e$2=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.na
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.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$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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
|
|
12
|
+
*/const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$1}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),b={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.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$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.1");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|