@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.77 → 0.0.0-pr624.79
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/checkbox/demo/api.min.js +2 -2
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +6 -61
- package/components/combobox/demo/index.min.js +6 -61
- package/components/combobox/dist/index.js +5 -60
- package/components/combobox/dist/registered.js +5 -60
- package/components/counter/demo/api.min.js +6 -61
- package/components/counter/demo/index.min.js +6 -61
- package/components/counter/dist/index.js +5 -60
- package/components/counter/dist/registered.js +5 -60
- package/components/datepicker/demo/api.min.js +74 -95
- package/components/datepicker/demo/index.min.js +74 -95
- package/components/datepicker/dist/auro-datepicker.d.ts +14 -1
- package/components/datepicker/dist/index.js +73 -94
- package/components/datepicker/dist/registered.js +73 -94
- package/components/dropdown/demo/api.min.js +6 -61
- package/components/dropdown/demo/index.min.js +6 -61
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -7
- package/components/dropdown/dist/index.js +5 -60
- package/components/dropdown/dist/registered.js +5 -60
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/radio/demo/api.min.js +2 -2
- package/components/radio/demo/index.min.js +2 -2
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +6 -61
- package/components/select/demo/index.min.js +6 -61
- package/components/select/dist/index.js +5 -60
- package/components/select/dist/registered.js +5 -60
- package/package.json +4 -4
|
@@ -32,7 +32,7 @@ const t$3=globalThis,e$4=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.na
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$2=a$2.trustedTypes,l$2=c$2?c$2.emptyScript:"",p$2=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$4={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$4,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$2(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$3(s));}else void 0!==s&&i.push(c$3(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$4).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$4;this._$Em=e
|
|
35
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$2=a$2.trustedTypes,l$2=c$2?c$2.emptyScript:"",p$2=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$4={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$4,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$2(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$3(s));}else void 0!==s&&i.push(c$3(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$4).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$4;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$2?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
@@ -2793,6 +2793,7 @@ class AuroFloatingUI {
|
|
|
2793
2793
|
this.element.bib.style.left = "0px";
|
|
2794
2794
|
this.element.bib.style.width = '';
|
|
2795
2795
|
this.element.bib.style.height = '';
|
|
2796
|
+
this.element.style.contain = '';
|
|
2796
2797
|
|
|
2797
2798
|
// reset the size that was mirroring `size` css-part
|
|
2798
2799
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2817,6 +2818,7 @@ class AuroFloatingUI {
|
|
|
2817
2818
|
this.element.bib.style.position = '';
|
|
2818
2819
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2819
2820
|
this.element.isBibFullscreen = false;
|
|
2821
|
+
this.element.style.contain = 'layout';
|
|
2820
2822
|
}
|
|
2821
2823
|
|
|
2822
2824
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4431,6 +4433,7 @@ let AuroElement$4 = class AuroElement extends i$2 {
|
|
|
4431
4433
|
// See LICENSE in the project root for license information.
|
|
4432
4434
|
|
|
4433
4435
|
|
|
4436
|
+
|
|
4434
4437
|
/*
|
|
4435
4438
|
* @slot - Default slot for the popover content.
|
|
4436
4439
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -5013,64 +5016,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5013
5016
|
this.hasFocus = false;
|
|
5014
5017
|
}
|
|
5015
5018
|
|
|
5016
|
-
/**
|
|
5017
|
-
* Determines if the element or any children are focusable.
|
|
5018
|
-
* @private
|
|
5019
|
-
* @param {HTMLElement} element - Element to check.
|
|
5020
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5021
|
-
*/
|
|
5022
|
-
containsFocusableElement(element) {
|
|
5023
|
-
this.showTriggerBorders = true;
|
|
5024
|
-
|
|
5025
|
-
const nodes = [
|
|
5026
|
-
element,
|
|
5027
|
-
...element.children
|
|
5028
|
-
];
|
|
5029
|
-
|
|
5030
|
-
const focusableElements = [
|
|
5031
|
-
'a',
|
|
5032
|
-
'auro-hyperlink',
|
|
5033
|
-
'button',
|
|
5034
|
-
'auro-button',
|
|
5035
|
-
'input',
|
|
5036
|
-
'auro-input',
|
|
5037
|
-
];
|
|
5038
|
-
|
|
5039
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
5040
|
-
|
|
5041
|
-
const result = nodes.some((node) => {
|
|
5042
|
-
const tagName = node.tagName.toLowerCase();
|
|
5043
|
-
|
|
5044
|
-
if (node.tabIndex > -1) {
|
|
5045
|
-
return true;
|
|
5046
|
-
}
|
|
5047
|
-
|
|
5048
|
-
if (focusableElements.includes(tagName)) {
|
|
5049
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
5050
|
-
return true;
|
|
5051
|
-
}
|
|
5052
|
-
if (!node.hasAttribute('disabled')) {
|
|
5053
|
-
return true;
|
|
5054
|
-
}
|
|
5055
|
-
}
|
|
5056
|
-
|
|
5057
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
5058
|
-
return true;
|
|
5059
|
-
}
|
|
5060
|
-
|
|
5061
|
-
return false;
|
|
5062
|
-
});
|
|
5063
|
-
|
|
5064
|
-
if (result) {
|
|
5065
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
5066
|
-
const tagName = node.tagName.toLowerCase();
|
|
5067
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
5068
|
-
});
|
|
5069
|
-
}
|
|
5070
|
-
|
|
5071
|
-
return result;
|
|
5072
|
-
}
|
|
5073
|
-
|
|
5074
5019
|
/**
|
|
5075
5020
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5076
5021
|
* @private
|
|
@@ -5182,7 +5127,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5182
5127
|
if (triggerContentNodes) {
|
|
5183
5128
|
|
|
5184
5129
|
// See if any of them are focusable elements
|
|
5185
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5130
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5186
5131
|
|
|
5187
5132
|
// If any of them are focusable elements
|
|
5188
5133
|
if (this.triggerContentFocusable) {
|
|
@@ -5254,7 +5199,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5254
5199
|
<div
|
|
5255
5200
|
id="trigger"
|
|
5256
5201
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5257
|
-
tabindex="${this.tabIndex}"
|
|
5202
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5258
5203
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5259
5204
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5260
5205
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -2724,6 +2724,7 @@ class AuroFloatingUI {
|
|
|
2724
2724
|
this.element.bib.style.left = "0px";
|
|
2725
2725
|
this.element.bib.style.width = '';
|
|
2726
2726
|
this.element.bib.style.height = '';
|
|
2727
|
+
this.element.style.contain = '';
|
|
2727
2728
|
|
|
2728
2729
|
// reset the size that was mirroring `size` css-part
|
|
2729
2730
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2748,6 +2749,7 @@ class AuroFloatingUI {
|
|
|
2748
2749
|
this.element.bib.style.position = '';
|
|
2749
2750
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2750
2751
|
this.element.isBibFullscreen = false;
|
|
2752
|
+
this.element.style.contain = 'layout';
|
|
2751
2753
|
}
|
|
2752
2754
|
|
|
2753
2755
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4362,6 +4364,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
|
|
|
4362
4364
|
// See LICENSE in the project root for license information.
|
|
4363
4365
|
|
|
4364
4366
|
|
|
4367
|
+
|
|
4365
4368
|
/*
|
|
4366
4369
|
* @slot - Default slot for the popover content.
|
|
4367
4370
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -4944,64 +4947,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4944
4947
|
this.hasFocus = false;
|
|
4945
4948
|
}
|
|
4946
4949
|
|
|
4947
|
-
/**
|
|
4948
|
-
* Determines if the element or any children are focusable.
|
|
4949
|
-
* @private
|
|
4950
|
-
* @param {HTMLElement} element - Element to check.
|
|
4951
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4952
|
-
*/
|
|
4953
|
-
containsFocusableElement(element) {
|
|
4954
|
-
this.showTriggerBorders = true;
|
|
4955
|
-
|
|
4956
|
-
const nodes = [
|
|
4957
|
-
element,
|
|
4958
|
-
...element.children
|
|
4959
|
-
];
|
|
4960
|
-
|
|
4961
|
-
const focusableElements = [
|
|
4962
|
-
'a',
|
|
4963
|
-
'auro-hyperlink',
|
|
4964
|
-
'button',
|
|
4965
|
-
'auro-button',
|
|
4966
|
-
'input',
|
|
4967
|
-
'auro-input',
|
|
4968
|
-
];
|
|
4969
|
-
|
|
4970
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4971
|
-
|
|
4972
|
-
const result = nodes.some((node) => {
|
|
4973
|
-
const tagName = node.tagName.toLowerCase();
|
|
4974
|
-
|
|
4975
|
-
if (node.tabIndex > -1) {
|
|
4976
|
-
return true;
|
|
4977
|
-
}
|
|
4978
|
-
|
|
4979
|
-
if (focusableElements.includes(tagName)) {
|
|
4980
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4981
|
-
return true;
|
|
4982
|
-
}
|
|
4983
|
-
if (!node.hasAttribute('disabled')) {
|
|
4984
|
-
return true;
|
|
4985
|
-
}
|
|
4986
|
-
}
|
|
4987
|
-
|
|
4988
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4989
|
-
return true;
|
|
4990
|
-
}
|
|
4991
|
-
|
|
4992
|
-
return false;
|
|
4993
|
-
});
|
|
4994
|
-
|
|
4995
|
-
if (result) {
|
|
4996
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4997
|
-
const tagName = node.tagName.toLowerCase();
|
|
4998
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4999
|
-
});
|
|
5000
|
-
}
|
|
5001
|
-
|
|
5002
|
-
return result;
|
|
5003
|
-
}
|
|
5004
|
-
|
|
5005
4950
|
/**
|
|
5006
4951
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5007
4952
|
* @private
|
|
@@ -5113,7 +5058,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5113
5058
|
if (triggerContentNodes) {
|
|
5114
5059
|
|
|
5115
5060
|
// See if any of them are focusable elements
|
|
5116
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5061
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5117
5062
|
|
|
5118
5063
|
// If any of them are focusable elements
|
|
5119
5064
|
if (this.triggerContentFocusable) {
|
|
@@ -5185,7 +5130,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5185
5130
|
<div
|
|
5186
5131
|
id="trigger"
|
|
5187
5132
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
5188
|
-
tabindex="${this.tabIndex}"
|
|
5133
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5189
5134
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5190
5135
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5191
5136
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -2724,6 +2724,7 @@ class AuroFloatingUI {
|
|
|
2724
2724
|
this.element.bib.style.left = "0px";
|
|
2725
2725
|
this.element.bib.style.width = '';
|
|
2726
2726
|
this.element.bib.style.height = '';
|
|
2727
|
+
this.element.style.contain = '';
|
|
2727
2728
|
|
|
2728
2729
|
// reset the size that was mirroring `size` css-part
|
|
2729
2730
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2748,6 +2749,7 @@ class AuroFloatingUI {
|
|
|
2748
2749
|
this.element.bib.style.position = '';
|
|
2749
2750
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2750
2751
|
this.element.isBibFullscreen = false;
|
|
2752
|
+
this.element.style.contain = 'layout';
|
|
2751
2753
|
}
|
|
2752
2754
|
|
|
2753
2755
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4362,6 +4364,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
|
|
|
4362
4364
|
// See LICENSE in the project root for license information.
|
|
4363
4365
|
|
|
4364
4366
|
|
|
4367
|
+
|
|
4365
4368
|
/*
|
|
4366
4369
|
* @slot - Default slot for the popover content.
|
|
4367
4370
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -4944,64 +4947,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4944
4947
|
this.hasFocus = false;
|
|
4945
4948
|
}
|
|
4946
4949
|
|
|
4947
|
-
/**
|
|
4948
|
-
* Determines if the element or any children are focusable.
|
|
4949
|
-
* @private
|
|
4950
|
-
* @param {HTMLElement} element - Element to check.
|
|
4951
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4952
|
-
*/
|
|
4953
|
-
containsFocusableElement(element) {
|
|
4954
|
-
this.showTriggerBorders = true;
|
|
4955
|
-
|
|
4956
|
-
const nodes = [
|
|
4957
|
-
element,
|
|
4958
|
-
...element.children
|
|
4959
|
-
];
|
|
4960
|
-
|
|
4961
|
-
const focusableElements = [
|
|
4962
|
-
'a',
|
|
4963
|
-
'auro-hyperlink',
|
|
4964
|
-
'button',
|
|
4965
|
-
'auro-button',
|
|
4966
|
-
'input',
|
|
4967
|
-
'auro-input',
|
|
4968
|
-
];
|
|
4969
|
-
|
|
4970
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4971
|
-
|
|
4972
|
-
const result = nodes.some((node) => {
|
|
4973
|
-
const tagName = node.tagName.toLowerCase();
|
|
4974
|
-
|
|
4975
|
-
if (node.tabIndex > -1) {
|
|
4976
|
-
return true;
|
|
4977
|
-
}
|
|
4978
|
-
|
|
4979
|
-
if (focusableElements.includes(tagName)) {
|
|
4980
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4981
|
-
return true;
|
|
4982
|
-
}
|
|
4983
|
-
if (!node.hasAttribute('disabled')) {
|
|
4984
|
-
return true;
|
|
4985
|
-
}
|
|
4986
|
-
}
|
|
4987
|
-
|
|
4988
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4989
|
-
return true;
|
|
4990
|
-
}
|
|
4991
|
-
|
|
4992
|
-
return false;
|
|
4993
|
-
});
|
|
4994
|
-
|
|
4995
|
-
if (result) {
|
|
4996
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4997
|
-
const tagName = node.tagName.toLowerCase();
|
|
4998
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4999
|
-
});
|
|
5000
|
-
}
|
|
5001
|
-
|
|
5002
|
-
return result;
|
|
5003
|
-
}
|
|
5004
|
-
|
|
5005
4950
|
/**
|
|
5006
4951
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5007
4952
|
* @private
|
|
@@ -5113,7 +5058,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5113
5058
|
if (triggerContentNodes) {
|
|
5114
5059
|
|
|
5115
5060
|
// See if any of them are focusable elements
|
|
5116
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5061
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5117
5062
|
|
|
5118
5063
|
// If any of them are focusable elements
|
|
5119
5064
|
if (this.triggerContentFocusable) {
|
|
@@ -5185,7 +5130,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5185
5130
|
<div
|
|
5186
5131
|
id="trigger"
|
|
5187
5132
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
5188
|
-
tabindex="${this.tabIndex}"
|
|
5133
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5189
5134
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5190
5135
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5191
5136
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -9,7 +9,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e
|
|
12
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;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$2.reactiveElementVersions??=[]).push("2.1.1");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -4946,6 +4946,7 @@ class AuroFloatingUI {
|
|
|
4946
4946
|
this.element.bib.style.left = "0px";
|
|
4947
4947
|
this.element.bib.style.width = '';
|
|
4948
4948
|
this.element.bib.style.height = '';
|
|
4949
|
+
this.element.style.contain = '';
|
|
4949
4950
|
|
|
4950
4951
|
// reset the size that was mirroring `size` css-part
|
|
4951
4952
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -4970,6 +4971,7 @@ class AuroFloatingUI {
|
|
|
4970
4971
|
this.element.bib.style.position = '';
|
|
4971
4972
|
this.element.bib.removeAttribute('isfullscreen');
|
|
4972
4973
|
this.element.isBibFullscreen = false;
|
|
4974
|
+
this.element.style.contain = 'layout';
|
|
4973
4975
|
}
|
|
4974
4976
|
|
|
4975
4977
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -6584,6 +6586,7 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
6584
6586
|
// See LICENSE in the project root for license information.
|
|
6585
6587
|
|
|
6586
6588
|
|
|
6589
|
+
|
|
6587
6590
|
/*
|
|
6588
6591
|
* @slot - Default slot for the popover content.
|
|
6589
6592
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -7166,64 +7169,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7166
7169
|
this.hasFocus = false;
|
|
7167
7170
|
}
|
|
7168
7171
|
|
|
7169
|
-
/**
|
|
7170
|
-
* Determines if the element or any children are focusable.
|
|
7171
|
-
* @private
|
|
7172
|
-
* @param {HTMLElement} element - Element to check.
|
|
7173
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
7174
|
-
*/
|
|
7175
|
-
containsFocusableElement(element) {
|
|
7176
|
-
this.showTriggerBorders = true;
|
|
7177
|
-
|
|
7178
|
-
const nodes = [
|
|
7179
|
-
element,
|
|
7180
|
-
...element.children
|
|
7181
|
-
];
|
|
7182
|
-
|
|
7183
|
-
const focusableElements = [
|
|
7184
|
-
'a',
|
|
7185
|
-
'auro-hyperlink',
|
|
7186
|
-
'button',
|
|
7187
|
-
'auro-button',
|
|
7188
|
-
'input',
|
|
7189
|
-
'auro-input',
|
|
7190
|
-
];
|
|
7191
|
-
|
|
7192
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
7193
|
-
|
|
7194
|
-
const result = nodes.some((node) => {
|
|
7195
|
-
const tagName = node.tagName.toLowerCase();
|
|
7196
|
-
|
|
7197
|
-
if (node.tabIndex > -1) {
|
|
7198
|
-
return true;
|
|
7199
|
-
}
|
|
7200
|
-
|
|
7201
|
-
if (focusableElements.includes(tagName)) {
|
|
7202
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
7203
|
-
return true;
|
|
7204
|
-
}
|
|
7205
|
-
if (!node.hasAttribute('disabled')) {
|
|
7206
|
-
return true;
|
|
7207
|
-
}
|
|
7208
|
-
}
|
|
7209
|
-
|
|
7210
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
7211
|
-
return true;
|
|
7212
|
-
}
|
|
7213
|
-
|
|
7214
|
-
return false;
|
|
7215
|
-
});
|
|
7216
|
-
|
|
7217
|
-
if (result) {
|
|
7218
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
7219
|
-
const tagName = node.tagName.toLowerCase();
|
|
7220
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
7221
|
-
});
|
|
7222
|
-
}
|
|
7223
|
-
|
|
7224
|
-
return result;
|
|
7225
|
-
}
|
|
7226
|
-
|
|
7227
7172
|
/**
|
|
7228
7173
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
7229
7174
|
* @private
|
|
@@ -7335,7 +7280,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7335
7280
|
if (triggerContentNodes) {
|
|
7336
7281
|
|
|
7337
7282
|
// See if any of them are focusable elements
|
|
7338
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
7283
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
7339
7284
|
|
|
7340
7285
|
// If any of them are focusable elements
|
|
7341
7286
|
if (this.triggerContentFocusable) {
|
|
@@ -7407,7 +7352,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7407
7352
|
<div
|
|
7408
7353
|
id="trigger"
|
|
7409
7354
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
7410
|
-
tabindex="${this.tabIndex}"
|
|
7355
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
7411
7356
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
7412
7357
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
7413
7358
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -9,7 +9,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e
|
|
12
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;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$2.reactiveElementVersions??=[]).push("2.1.1");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -4946,6 +4946,7 @@ class AuroFloatingUI {
|
|
|
4946
4946
|
this.element.bib.style.left = "0px";
|
|
4947
4947
|
this.element.bib.style.width = '';
|
|
4948
4948
|
this.element.bib.style.height = '';
|
|
4949
|
+
this.element.style.contain = '';
|
|
4949
4950
|
|
|
4950
4951
|
// reset the size that was mirroring `size` css-part
|
|
4951
4952
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -4970,6 +4971,7 @@ class AuroFloatingUI {
|
|
|
4970
4971
|
this.element.bib.style.position = '';
|
|
4971
4972
|
this.element.bib.removeAttribute('isfullscreen');
|
|
4972
4973
|
this.element.isBibFullscreen = false;
|
|
4974
|
+
this.element.style.contain = 'layout';
|
|
4973
4975
|
}
|
|
4974
4976
|
|
|
4975
4977
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -6584,6 +6586,7 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
6584
6586
|
// See LICENSE in the project root for license information.
|
|
6585
6587
|
|
|
6586
6588
|
|
|
6589
|
+
|
|
6587
6590
|
/*
|
|
6588
6591
|
* @slot - Default slot for the popover content.
|
|
6589
6592
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -7166,64 +7169,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7166
7169
|
this.hasFocus = false;
|
|
7167
7170
|
}
|
|
7168
7171
|
|
|
7169
|
-
/**
|
|
7170
|
-
* Determines if the element or any children are focusable.
|
|
7171
|
-
* @private
|
|
7172
|
-
* @param {HTMLElement} element - Element to check.
|
|
7173
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
7174
|
-
*/
|
|
7175
|
-
containsFocusableElement(element) {
|
|
7176
|
-
this.showTriggerBorders = true;
|
|
7177
|
-
|
|
7178
|
-
const nodes = [
|
|
7179
|
-
element,
|
|
7180
|
-
...element.children
|
|
7181
|
-
];
|
|
7182
|
-
|
|
7183
|
-
const focusableElements = [
|
|
7184
|
-
'a',
|
|
7185
|
-
'auro-hyperlink',
|
|
7186
|
-
'button',
|
|
7187
|
-
'auro-button',
|
|
7188
|
-
'input',
|
|
7189
|
-
'auro-input',
|
|
7190
|
-
];
|
|
7191
|
-
|
|
7192
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
7193
|
-
|
|
7194
|
-
const result = nodes.some((node) => {
|
|
7195
|
-
const tagName = node.tagName.toLowerCase();
|
|
7196
|
-
|
|
7197
|
-
if (node.tabIndex > -1) {
|
|
7198
|
-
return true;
|
|
7199
|
-
}
|
|
7200
|
-
|
|
7201
|
-
if (focusableElements.includes(tagName)) {
|
|
7202
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
7203
|
-
return true;
|
|
7204
|
-
}
|
|
7205
|
-
if (!node.hasAttribute('disabled')) {
|
|
7206
|
-
return true;
|
|
7207
|
-
}
|
|
7208
|
-
}
|
|
7209
|
-
|
|
7210
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
7211
|
-
return true;
|
|
7212
|
-
}
|
|
7213
|
-
|
|
7214
|
-
return false;
|
|
7215
|
-
});
|
|
7216
|
-
|
|
7217
|
-
if (result) {
|
|
7218
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
7219
|
-
const tagName = node.tagName.toLowerCase();
|
|
7220
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
7221
|
-
});
|
|
7222
|
-
}
|
|
7223
|
-
|
|
7224
|
-
return result;
|
|
7225
|
-
}
|
|
7226
|
-
|
|
7227
7172
|
/**
|
|
7228
7173
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
7229
7174
|
* @private
|
|
@@ -7335,7 +7280,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7335
7280
|
if (triggerContentNodes) {
|
|
7336
7281
|
|
|
7337
7282
|
// See if any of them are focusable elements
|
|
7338
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
7283
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
7339
7284
|
|
|
7340
7285
|
// If any of them are focusable elements
|
|
7341
7286
|
if (this.triggerContentFocusable) {
|
|
@@ -7407,7 +7352,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
7407
7352
|
<div
|
|
7408
7353
|
id="trigger"
|
|
7409
7354
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
7410
|
-
tabindex="${this.tabIndex}"
|
|
7355
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
7411
7356
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
7412
7357
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
7413
7358
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|