@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
|
@@ -101,7 +101,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2017 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
-
*/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
|
|
104
|
+
*/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");
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* @license
|
|
@@ -2961,6 +2961,7 @@ class AuroFloatingUI {
|
|
|
2961
2961
|
this.element.bib.style.left = "0px";
|
|
2962
2962
|
this.element.bib.style.width = '';
|
|
2963
2963
|
this.element.bib.style.height = '';
|
|
2964
|
+
this.element.style.contain = '';
|
|
2964
2965
|
|
|
2965
2966
|
// reset the size that was mirroring `size` css-part
|
|
2966
2967
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2985,6 +2986,7 @@ class AuroFloatingUI {
|
|
|
2985
2986
|
this.element.bib.style.position = '';
|
|
2986
2987
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2987
2988
|
this.element.isBibFullscreen = false;
|
|
2989
|
+
this.element.style.contain = 'layout';
|
|
2988
2990
|
}
|
|
2989
2991
|
|
|
2990
2992
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4599,6 +4601,7 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
4599
4601
|
// See LICENSE in the project root for license information.
|
|
4600
4602
|
|
|
4601
4603
|
|
|
4604
|
+
|
|
4602
4605
|
/*
|
|
4603
4606
|
* @slot - Default slot for the popover content.
|
|
4604
4607
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -5181,64 +5184,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5181
5184
|
this.hasFocus = false;
|
|
5182
5185
|
}
|
|
5183
5186
|
|
|
5184
|
-
/**
|
|
5185
|
-
* Determines if the element or any children are focusable.
|
|
5186
|
-
* @private
|
|
5187
|
-
* @param {HTMLElement} element - Element to check.
|
|
5188
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5189
|
-
*/
|
|
5190
|
-
containsFocusableElement(element) {
|
|
5191
|
-
this.showTriggerBorders = true;
|
|
5192
|
-
|
|
5193
|
-
const nodes = [
|
|
5194
|
-
element,
|
|
5195
|
-
...element.children
|
|
5196
|
-
];
|
|
5197
|
-
|
|
5198
|
-
const focusableElements = [
|
|
5199
|
-
'a',
|
|
5200
|
-
'auro-hyperlink',
|
|
5201
|
-
'button',
|
|
5202
|
-
'auro-button',
|
|
5203
|
-
'input',
|
|
5204
|
-
'auro-input',
|
|
5205
|
-
];
|
|
5206
|
-
|
|
5207
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
5208
|
-
|
|
5209
|
-
const result = nodes.some((node) => {
|
|
5210
|
-
const tagName = node.tagName.toLowerCase();
|
|
5211
|
-
|
|
5212
|
-
if (node.tabIndex > -1) {
|
|
5213
|
-
return true;
|
|
5214
|
-
}
|
|
5215
|
-
|
|
5216
|
-
if (focusableElements.includes(tagName)) {
|
|
5217
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
5218
|
-
return true;
|
|
5219
|
-
}
|
|
5220
|
-
if (!node.hasAttribute('disabled')) {
|
|
5221
|
-
return true;
|
|
5222
|
-
}
|
|
5223
|
-
}
|
|
5224
|
-
|
|
5225
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
5226
|
-
return true;
|
|
5227
|
-
}
|
|
5228
|
-
|
|
5229
|
-
return false;
|
|
5230
|
-
});
|
|
5231
|
-
|
|
5232
|
-
if (result) {
|
|
5233
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
5234
|
-
const tagName = node.tagName.toLowerCase();
|
|
5235
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
5236
|
-
});
|
|
5237
|
-
}
|
|
5238
|
-
|
|
5239
|
-
return result;
|
|
5240
|
-
}
|
|
5241
|
-
|
|
5242
5187
|
/**
|
|
5243
5188
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5244
5189
|
* @private
|
|
@@ -5350,7 +5295,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5350
5295
|
if (triggerContentNodes) {
|
|
5351
5296
|
|
|
5352
5297
|
// See if any of them are focusable elements
|
|
5353
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5298
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5354
5299
|
|
|
5355
5300
|
// If any of them are focusable elements
|
|
5356
5301
|
if (this.triggerContentFocusable) {
|
|
@@ -5422,7 +5367,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5422
5367
|
<div
|
|
5423
5368
|
id="trigger"
|
|
5424
5369
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5425
|
-
tabindex="${this.tabIndex}"
|
|
5370
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5426
5371
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5427
5372
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5428
5373
|
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
|
|
@@ -2869,6 +2869,7 @@ class AuroFloatingUI {
|
|
|
2869
2869
|
this.element.bib.style.left = "0px";
|
|
2870
2870
|
this.element.bib.style.width = '';
|
|
2871
2871
|
this.element.bib.style.height = '';
|
|
2872
|
+
this.element.style.contain = '';
|
|
2872
2873
|
|
|
2873
2874
|
// reset the size that was mirroring `size` css-part
|
|
2874
2875
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2893,6 +2894,7 @@ class AuroFloatingUI {
|
|
|
2893
2894
|
this.element.bib.style.position = '';
|
|
2894
2895
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2895
2896
|
this.element.isBibFullscreen = false;
|
|
2897
|
+
this.element.style.contain = 'layout';
|
|
2896
2898
|
}
|
|
2897
2899
|
|
|
2898
2900
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4507,6 +4509,7 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
4507
4509
|
// See LICENSE in the project root for license information.
|
|
4508
4510
|
|
|
4509
4511
|
|
|
4512
|
+
|
|
4510
4513
|
/*
|
|
4511
4514
|
* @slot - Default slot for the popover content.
|
|
4512
4515
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -5089,64 +5092,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5089
5092
|
this.hasFocus = false;
|
|
5090
5093
|
}
|
|
5091
5094
|
|
|
5092
|
-
/**
|
|
5093
|
-
* Determines if the element or any children are focusable.
|
|
5094
|
-
* @private
|
|
5095
|
-
* @param {HTMLElement} element - Element to check.
|
|
5096
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5097
|
-
*/
|
|
5098
|
-
containsFocusableElement(element) {
|
|
5099
|
-
this.showTriggerBorders = true;
|
|
5100
|
-
|
|
5101
|
-
const nodes = [
|
|
5102
|
-
element,
|
|
5103
|
-
...element.children
|
|
5104
|
-
];
|
|
5105
|
-
|
|
5106
|
-
const focusableElements = [
|
|
5107
|
-
'a',
|
|
5108
|
-
'auro-hyperlink',
|
|
5109
|
-
'button',
|
|
5110
|
-
'auro-button',
|
|
5111
|
-
'input',
|
|
5112
|
-
'auro-input',
|
|
5113
|
-
];
|
|
5114
|
-
|
|
5115
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
5116
|
-
|
|
5117
|
-
const result = nodes.some((node) => {
|
|
5118
|
-
const tagName = node.tagName.toLowerCase();
|
|
5119
|
-
|
|
5120
|
-
if (node.tabIndex > -1) {
|
|
5121
|
-
return true;
|
|
5122
|
-
}
|
|
5123
|
-
|
|
5124
|
-
if (focusableElements.includes(tagName)) {
|
|
5125
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
5126
|
-
return true;
|
|
5127
|
-
}
|
|
5128
|
-
if (!node.hasAttribute('disabled')) {
|
|
5129
|
-
return true;
|
|
5130
|
-
}
|
|
5131
|
-
}
|
|
5132
|
-
|
|
5133
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
5134
|
-
return true;
|
|
5135
|
-
}
|
|
5136
|
-
|
|
5137
|
-
return false;
|
|
5138
|
-
});
|
|
5139
|
-
|
|
5140
|
-
if (result) {
|
|
5141
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
5142
|
-
const tagName = node.tagName.toLowerCase();
|
|
5143
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
5144
|
-
});
|
|
5145
|
-
}
|
|
5146
|
-
|
|
5147
|
-
return result;
|
|
5148
|
-
}
|
|
5149
|
-
|
|
5150
5095
|
/**
|
|
5151
5096
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5152
5097
|
* @private
|
|
@@ -5258,7 +5203,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5258
5203
|
if (triggerContentNodes) {
|
|
5259
5204
|
|
|
5260
5205
|
// See if any of them are focusable elements
|
|
5261
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5206
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5262
5207
|
|
|
5263
5208
|
// If any of them are focusable elements
|
|
5264
5209
|
if (this.triggerContentFocusable) {
|
|
@@ -5330,7 +5275,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5330
5275
|
<div
|
|
5331
5276
|
id="trigger"
|
|
5332
5277
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5333
|
-
tabindex="${this.tabIndex}"
|
|
5278
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5334
5279
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5335
5280
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5336
5281
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -2823,6 +2823,7 @@ class AuroFloatingUI {
|
|
|
2823
2823
|
this.element.bib.style.left = "0px";
|
|
2824
2824
|
this.element.bib.style.width = '';
|
|
2825
2825
|
this.element.bib.style.height = '';
|
|
2826
|
+
this.element.style.contain = '';
|
|
2826
2827
|
|
|
2827
2828
|
// reset the size that was mirroring `size` css-part
|
|
2828
2829
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2847,6 +2848,7 @@ class AuroFloatingUI {
|
|
|
2847
2848
|
this.element.bib.style.position = '';
|
|
2848
2849
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2849
2850
|
this.element.isBibFullscreen = false;
|
|
2851
|
+
this.element.style.contain = 'layout';
|
|
2850
2852
|
}
|
|
2851
2853
|
|
|
2852
2854
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4461,6 +4463,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4461
4463
|
// See LICENSE in the project root for license information.
|
|
4462
4464
|
|
|
4463
4465
|
|
|
4466
|
+
|
|
4464
4467
|
/*
|
|
4465
4468
|
* @slot - Default slot for the popover content.
|
|
4466
4469
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -5043,64 +5046,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5043
5046
|
this.hasFocus = false;
|
|
5044
5047
|
}
|
|
5045
5048
|
|
|
5046
|
-
/**
|
|
5047
|
-
* Determines if the element or any children are focusable.
|
|
5048
|
-
* @private
|
|
5049
|
-
* @param {HTMLElement} element - Element to check.
|
|
5050
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5051
|
-
*/
|
|
5052
|
-
containsFocusableElement(element) {
|
|
5053
|
-
this.showTriggerBorders = true;
|
|
5054
|
-
|
|
5055
|
-
const nodes = [
|
|
5056
|
-
element,
|
|
5057
|
-
...element.children
|
|
5058
|
-
];
|
|
5059
|
-
|
|
5060
|
-
const focusableElements = [
|
|
5061
|
-
'a',
|
|
5062
|
-
'auro-hyperlink',
|
|
5063
|
-
'button',
|
|
5064
|
-
'auro-button',
|
|
5065
|
-
'input',
|
|
5066
|
-
'auro-input',
|
|
5067
|
-
];
|
|
5068
|
-
|
|
5069
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
5070
|
-
|
|
5071
|
-
const result = nodes.some((node) => {
|
|
5072
|
-
const tagName = node.tagName.toLowerCase();
|
|
5073
|
-
|
|
5074
|
-
if (node.tabIndex > -1) {
|
|
5075
|
-
return true;
|
|
5076
|
-
}
|
|
5077
|
-
|
|
5078
|
-
if (focusableElements.includes(tagName)) {
|
|
5079
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
5080
|
-
return true;
|
|
5081
|
-
}
|
|
5082
|
-
if (!node.hasAttribute('disabled')) {
|
|
5083
|
-
return true;
|
|
5084
|
-
}
|
|
5085
|
-
}
|
|
5086
|
-
|
|
5087
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
5088
|
-
return true;
|
|
5089
|
-
}
|
|
5090
|
-
|
|
5091
|
-
return false;
|
|
5092
|
-
});
|
|
5093
|
-
|
|
5094
|
-
if (result) {
|
|
5095
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
5096
|
-
const tagName = node.tagName.toLowerCase();
|
|
5097
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
5098
|
-
});
|
|
5099
|
-
}
|
|
5100
|
-
|
|
5101
|
-
return result;
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
5049
|
/**
|
|
5105
5050
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5106
5051
|
* @private
|
|
@@ -5212,7 +5157,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5212
5157
|
if (triggerContentNodes) {
|
|
5213
5158
|
|
|
5214
5159
|
// See if any of them are focusable elements
|
|
5215
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5160
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5216
5161
|
|
|
5217
5162
|
// If any of them are focusable elements
|
|
5218
5163
|
if (this.triggerContentFocusable) {
|
|
@@ -5284,7 +5229,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5284
5229
|
<div
|
|
5285
5230
|
id="trigger"
|
|
5286
5231
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
5287
|
-
tabindex="${this.tabIndex}"
|
|
5232
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5288
5233
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5289
5234
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5290
5235
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -2823,6 +2823,7 @@ class AuroFloatingUI {
|
|
|
2823
2823
|
this.element.bib.style.left = "0px";
|
|
2824
2824
|
this.element.bib.style.width = '';
|
|
2825
2825
|
this.element.bib.style.height = '';
|
|
2826
|
+
this.element.style.contain = '';
|
|
2826
2827
|
|
|
2827
2828
|
// reset the size that was mirroring `size` css-part
|
|
2828
2829
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2847,6 +2848,7 @@ class AuroFloatingUI {
|
|
|
2847
2848
|
this.element.bib.style.position = '';
|
|
2848
2849
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2849
2850
|
this.element.isBibFullscreen = false;
|
|
2851
|
+
this.element.style.contain = 'layout';
|
|
2850
2852
|
}
|
|
2851
2853
|
|
|
2852
2854
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -4461,6 +4463,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
4461
4463
|
// See LICENSE in the project root for license information.
|
|
4462
4464
|
|
|
4463
4465
|
|
|
4466
|
+
|
|
4464
4467
|
/*
|
|
4465
4468
|
* @slot - Default slot for the popover content.
|
|
4466
4469
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -5043,64 +5046,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5043
5046
|
this.hasFocus = false;
|
|
5044
5047
|
}
|
|
5045
5048
|
|
|
5046
|
-
/**
|
|
5047
|
-
* Determines if the element or any children are focusable.
|
|
5048
|
-
* @private
|
|
5049
|
-
* @param {HTMLElement} element - Element to check.
|
|
5050
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5051
|
-
*/
|
|
5052
|
-
containsFocusableElement(element) {
|
|
5053
|
-
this.showTriggerBorders = true;
|
|
5054
|
-
|
|
5055
|
-
const nodes = [
|
|
5056
|
-
element,
|
|
5057
|
-
...element.children
|
|
5058
|
-
];
|
|
5059
|
-
|
|
5060
|
-
const focusableElements = [
|
|
5061
|
-
'a',
|
|
5062
|
-
'auro-hyperlink',
|
|
5063
|
-
'button',
|
|
5064
|
-
'auro-button',
|
|
5065
|
-
'input',
|
|
5066
|
-
'auro-input',
|
|
5067
|
-
];
|
|
5068
|
-
|
|
5069
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
5070
|
-
|
|
5071
|
-
const result = nodes.some((node) => {
|
|
5072
|
-
const tagName = node.tagName.toLowerCase();
|
|
5073
|
-
|
|
5074
|
-
if (node.tabIndex > -1) {
|
|
5075
|
-
return true;
|
|
5076
|
-
}
|
|
5077
|
-
|
|
5078
|
-
if (focusableElements.includes(tagName)) {
|
|
5079
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
5080
|
-
return true;
|
|
5081
|
-
}
|
|
5082
|
-
if (!node.hasAttribute('disabled')) {
|
|
5083
|
-
return true;
|
|
5084
|
-
}
|
|
5085
|
-
}
|
|
5086
|
-
|
|
5087
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
5088
|
-
return true;
|
|
5089
|
-
}
|
|
5090
|
-
|
|
5091
|
-
return false;
|
|
5092
|
-
});
|
|
5093
|
-
|
|
5094
|
-
if (result) {
|
|
5095
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
5096
|
-
const tagName = node.tagName.toLowerCase();
|
|
5097
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
5098
|
-
});
|
|
5099
|
-
}
|
|
5100
|
-
|
|
5101
|
-
return result;
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
5049
|
/**
|
|
5105
5050
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
5106
5051
|
* @private
|
|
@@ -5212,7 +5157,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5212
5157
|
if (triggerContentNodes) {
|
|
5213
5158
|
|
|
5214
5159
|
// See if any of them are focusable elements
|
|
5215
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5160
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5216
5161
|
|
|
5217
5162
|
// If any of them are focusable elements
|
|
5218
5163
|
if (this.triggerContentFocusable) {
|
|
@@ -5284,7 +5229,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5284
5229
|
<div
|
|
5285
5230
|
id="trigger"
|
|
5286
5231
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
5287
|
-
tabindex="${this.tabIndex}"
|
|
5232
|
+
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5288
5233
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5289
5234
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5290
5235
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem-dev/auro-formkit",
|
|
3
|
-
"version": "0.0.0-pr624.
|
|
3
|
+
"version": "0.0.0-pr624.79",
|
|
4
4
|
"description": "A collection of web components used to build forms.",
|
|
5
5
|
"homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"local-demo": "npm run build && sh ./local-demo.sh --zip"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aurodesignsystem/auro-library": "^5.3.
|
|
57
|
-
"@lit/reactive-element": "^2.1.
|
|
56
|
+
"@aurodesignsystem/auro-library": "^5.3.1",
|
|
57
|
+
"@lit/reactive-element": "^2.1.1",
|
|
58
58
|
"lit": "^3.2.1"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@aurodesignsystem/design-tokens": "^8.2.1",
|
|
65
65
|
"@aurodesignsystem/eslint-config": "^1.3.5",
|
|
66
|
-
"@aurodesignsystem/webcorestylesheets": "^10.0.
|
|
66
|
+
"@aurodesignsystem/webcorestylesheets": "^10.0.1",
|
|
67
67
|
"@commitlint/cli": "^19.8.1",
|
|
68
68
|
"@commitlint/config-conventional": "^19.8.1",
|
|
69
69
|
"@open-wc/testing": "^4.0.0",
|