@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.
Files changed (37) hide show
  1. package/components/checkbox/demo/api.min.js +2 -2
  2. package/components/checkbox/demo/index.min.js +2 -2
  3. package/components/checkbox/dist/index.js +1 -1
  4. package/components/checkbox/dist/registered.js +1 -1
  5. package/components/combobox/demo/api.min.js +6 -61
  6. package/components/combobox/demo/index.min.js +6 -61
  7. package/components/combobox/dist/index.js +5 -60
  8. package/components/combobox/dist/registered.js +5 -60
  9. package/components/counter/demo/api.min.js +6 -61
  10. package/components/counter/demo/index.min.js +6 -61
  11. package/components/counter/dist/index.js +5 -60
  12. package/components/counter/dist/registered.js +5 -60
  13. package/components/datepicker/demo/api.min.js +74 -95
  14. package/components/datepicker/demo/index.min.js +74 -95
  15. package/components/datepicker/dist/auro-datepicker.d.ts +14 -1
  16. package/components/datepicker/dist/index.js +73 -94
  17. package/components/datepicker/dist/registered.js +73 -94
  18. package/components/dropdown/demo/api.min.js +6 -61
  19. package/components/dropdown/demo/index.min.js +6 -61
  20. package/components/dropdown/dist/auro-dropdown.d.ts +0 -7
  21. package/components/dropdown/dist/index.js +5 -60
  22. package/components/dropdown/dist/registered.js +5 -60
  23. package/components/form/demo/api.min.js +1 -1
  24. package/components/form/demo/index.min.js +1 -1
  25. package/components/input/demo/api.min.js +1 -1
  26. package/components/input/demo/index.min.js +1 -1
  27. package/components/menu/demo/api.min.js +1 -1
  28. package/components/menu/demo/index.min.js +1 -1
  29. package/components/radio/demo/api.min.js +2 -2
  30. package/components/radio/demo/index.min.js +2 -2
  31. package/components/radio/dist/index.js +1 -1
  32. package/components/radio/dist/registered.js +1 -1
  33. package/components/select/demo/api.min.js +6 -61
  34. package/components/select/demo/index.min.js +6 -61
  35. package/components/select/dist/index.js +5 -60
  36. package/components/select/dist/registered.js +5 -60
  37. package/package.json +4 -4
@@ -4899,6 +4899,7 @@ class AuroFloatingUI {
4899
4899
  this.element.bib.style.left = "0px";
4900
4900
  this.element.bib.style.width = '';
4901
4901
  this.element.bib.style.height = '';
4902
+ this.element.style.contain = '';
4902
4903
 
4903
4904
  // reset the size that was mirroring `size` css-part
4904
4905
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -4923,6 +4924,7 @@ class AuroFloatingUI {
4923
4924
  this.element.bib.style.position = '';
4924
4925
  this.element.bib.removeAttribute('isfullscreen');
4925
4926
  this.element.isBibFullscreen = false;
4927
+ this.element.style.contain = 'layout';
4926
4928
  }
4927
4929
 
4928
4930
  const isChanged = this.strategy && this.strategy !== value;
@@ -6537,6 +6539,7 @@ let AuroElement$3 = class AuroElement extends LitElement {
6537
6539
  // See LICENSE in the project root for license information.
6538
6540
 
6539
6541
 
6542
+
6540
6543
  /*
6541
6544
  * @slot - Default slot for the popover content.
6542
6545
  * @slot helpText - Defines the content of the helpText.
@@ -7119,64 +7122,6 @@ class AuroDropdown extends AuroElement$3 {
7119
7122
  this.hasFocus = false;
7120
7123
  }
7121
7124
 
7122
- /**
7123
- * Determines if the element or any children are focusable.
7124
- * @private
7125
- * @param {HTMLElement} element - Element to check.
7126
- * @returns {Boolean} - True if the element or any children are focusable.
7127
- */
7128
- containsFocusableElement(element) {
7129
- this.showTriggerBorders = true;
7130
-
7131
- const nodes = [
7132
- element,
7133
- ...element.children
7134
- ];
7135
-
7136
- const focusableElements = [
7137
- 'a',
7138
- 'auro-hyperlink',
7139
- 'button',
7140
- 'auro-button',
7141
- 'input',
7142
- 'auro-input',
7143
- ];
7144
-
7145
- const focusableElementsThatNeedBorders = ['auro-input'];
7146
-
7147
- const result = nodes.some((node) => {
7148
- const tagName = node.tagName.toLowerCase();
7149
-
7150
- if (node.tabIndex > -1) {
7151
- return true;
7152
- }
7153
-
7154
- if (focusableElements.includes(tagName)) {
7155
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
7156
- return true;
7157
- }
7158
- if (!node.hasAttribute('disabled')) {
7159
- return true;
7160
- }
7161
- }
7162
-
7163
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
7164
- return true;
7165
- }
7166
-
7167
- return false;
7168
- });
7169
-
7170
- if (result) {
7171
- this.showTriggerBorders = !nodes.some((node) => {
7172
- const tagName = node.tagName.toLowerCase();
7173
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
7174
- });
7175
- }
7176
-
7177
- return result;
7178
- }
7179
-
7180
7125
  /**
7181
7126
  * Creates and dispatches a duplicate focus event on the trigger element.
7182
7127
  * @private
@@ -7288,7 +7233,7 @@ class AuroDropdown extends AuroElement$3 {
7288
7233
  if (triggerContentNodes) {
7289
7234
 
7290
7235
  // See if any of them are focusable elements
7291
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
7236
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
7292
7237
 
7293
7238
  // If any of them are focusable elements
7294
7239
  if (this.triggerContentFocusable) {
@@ -7360,7 +7305,7 @@ class AuroDropdown extends AuroElement$3 {
7360
7305
  <div
7361
7306
  id="trigger"
7362
7307
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
7363
- tabindex="${this.tabIndex}"
7308
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
7364
7309
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
7365
7310
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
7366
7311
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -4899,6 +4899,7 @@ class AuroFloatingUI {
4899
4899
  this.element.bib.style.left = "0px";
4900
4900
  this.element.bib.style.width = '';
4901
4901
  this.element.bib.style.height = '';
4902
+ this.element.style.contain = '';
4902
4903
 
4903
4904
  // reset the size that was mirroring `size` css-part
4904
4905
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -4923,6 +4924,7 @@ class AuroFloatingUI {
4923
4924
  this.element.bib.style.position = '';
4924
4925
  this.element.bib.removeAttribute('isfullscreen');
4925
4926
  this.element.isBibFullscreen = false;
4927
+ this.element.style.contain = 'layout';
4926
4928
  }
4927
4929
 
4928
4930
  const isChanged = this.strategy && this.strategy !== value;
@@ -6537,6 +6539,7 @@ let AuroElement$3 = class AuroElement extends LitElement {
6537
6539
  // See LICENSE in the project root for license information.
6538
6540
 
6539
6541
 
6542
+
6540
6543
  /*
6541
6544
  * @slot - Default slot for the popover content.
6542
6545
  * @slot helpText - Defines the content of the helpText.
@@ -7119,64 +7122,6 @@ class AuroDropdown extends AuroElement$3 {
7119
7122
  this.hasFocus = false;
7120
7123
  }
7121
7124
 
7122
- /**
7123
- * Determines if the element or any children are focusable.
7124
- * @private
7125
- * @param {HTMLElement} element - Element to check.
7126
- * @returns {Boolean} - True if the element or any children are focusable.
7127
- */
7128
- containsFocusableElement(element) {
7129
- this.showTriggerBorders = true;
7130
-
7131
- const nodes = [
7132
- element,
7133
- ...element.children
7134
- ];
7135
-
7136
- const focusableElements = [
7137
- 'a',
7138
- 'auro-hyperlink',
7139
- 'button',
7140
- 'auro-button',
7141
- 'input',
7142
- 'auro-input',
7143
- ];
7144
-
7145
- const focusableElementsThatNeedBorders = ['auro-input'];
7146
-
7147
- const result = nodes.some((node) => {
7148
- const tagName = node.tagName.toLowerCase();
7149
-
7150
- if (node.tabIndex > -1) {
7151
- return true;
7152
- }
7153
-
7154
- if (focusableElements.includes(tagName)) {
7155
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
7156
- return true;
7157
- }
7158
- if (!node.hasAttribute('disabled')) {
7159
- return true;
7160
- }
7161
- }
7162
-
7163
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
7164
- return true;
7165
- }
7166
-
7167
- return false;
7168
- });
7169
-
7170
- if (result) {
7171
- this.showTriggerBorders = !nodes.some((node) => {
7172
- const tagName = node.tagName.toLowerCase();
7173
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
7174
- });
7175
- }
7176
-
7177
- return result;
7178
- }
7179
-
7180
7125
  /**
7181
7126
  * Creates and dispatches a duplicate focus event on the trigger element.
7182
7127
  * @private
@@ -7288,7 +7233,7 @@ class AuroDropdown extends AuroElement$3 {
7288
7233
  if (triggerContentNodes) {
7289
7234
 
7290
7235
  // See if any of them are focusable elements
7291
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
7236
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
7292
7237
 
7293
7238
  // If any of them are focusable elements
7294
7239
  if (this.triggerContentFocusable) {
@@ -7360,7 +7305,7 @@ class AuroDropdown extends AuroElement$3 {
7360
7305
  <div
7361
7306
  id="trigger"
7362
7307
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
7363
- tabindex="${this.tabIndex}"
7308
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
7364
7309
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
7365
7310
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
7366
7311
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -1392,7 +1392,7 @@ const t$1=globalThis,e$1=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.na
1392
1392
  * @license
1393
1393
  * Copyright 2017 Google LLC
1394
1394
  * SPDX-License-Identifier: BSD-3-Clause
1395
- */const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$1}=Object,a=globalThis,c$1=a.trustedTypes,l=c$1?c$1.emptyScript:"",p$1=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p$1?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.0");
1395
+ */const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$1}=Object,a=globalThis,c$1=a.trustedTypes,l=c$1?c$1.emptyScript:"",p$1=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$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)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p$1?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
1396
1396
 
1397
1397
  /**
1398
1398
  * @license
@@ -1556,7 +1556,7 @@ class UtilitiesCalendarRender {
1556
1556
  }
1557
1557
  }
1558
1558
 
1559
- var styleCss$e = i$2`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.accents{flex-grow:0;flex-shrink:0;display:flex;align-items:center;justify-content:center}.accents.left{padding-right:var(--ds-size-100, 0.5rem)}.accents.right{width:var(--ds-size-400, 2rem)}.mainContent{height:100%;max-height:100%;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;margin:0 auto}.inputContainer{display:flex;flex-direction:row;align-items:center;width:100%}.inputContainer:first-of-type{justify-content:flex-end}.inputContainer:last-of-type{justify-content:flex-start}.dpTriggerContent{width:100%}@media screen and (max-width: 576px){::part(popover){position:fixed !important;top:0 !important;left:0 !important;width:100vw !important;height:100vh !important;margin-bottom:var(--ds-size-200, 1rem);transform:unset !important}.calendarWrapper{display:flex;height:100dvh;flex-direction:row;justify-content:center}}`;
1559
+ var styleCss$e = i$2`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.accents{flex-grow:0;flex-shrink:0;display:flex;align-items:center;justify-content:center}.accents.left{padding-right:var(--ds-size-100, 0.5rem)}.accents.right{width:var(--ds-size-400, 2rem)}.accents .notification:not(.util_displayHidden){display:flex;align-items:center;justify-content:center}.mainContent{height:100%;max-height:100%;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;margin:0 auto}.inputContainer{display:flex;flex-direction:row;align-items:center;width:100%}.inputContainer:first-of-type{justify-content:flex-end}.inputContainer:last-of-type{justify-content:flex-start}.dpTriggerContent{width:100%}@media screen and (max-width: 576px){::part(popover){position:fixed !important;top:0 !important;left:0 !important;width:100vw !important;height:100vh !important;margin-bottom:var(--ds-size-200, 1rem);transform:unset !important}.calendarWrapper{display:flex;height:100dvh;flex-direction:row;justify-content:center}}`;
1560
1560
 
1561
1561
  var colorCss$d = i$2`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host label{color:var(--ds-auro-datepicker-label-text-color)}:host .inputDivider{background-color:var(--ds-auro-datepicker-range-input-divider-color)}:host .error{color:var(--ds-auro-datepicker-error-icon-color)}[auro-input]::part(wrapper){--ds-auro-input-border-color: transparent;--ds-auro-input-container-color: transparent}.dpTriggerContent [auro-input]:nth-child(2):before{background-color:var(--ds-auro-datepicker-range-input-divider-color)}:host(:not([ondark])[disabled]){--ds-auro-datepicker-border-color: var(--ds-basic-color-border-subtle, #dddddd);--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-datepicker-placeholder-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([ondark][disabled]){--ds-auro-datepicker-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-datepicker-placeholder-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
1562
1562
 
@@ -16401,6 +16401,7 @@ class AuroFloatingUI {
16401
16401
  this.element.bib.style.left = "0px";
16402
16402
  this.element.bib.style.width = '';
16403
16403
  this.element.bib.style.height = '';
16404
+ this.element.style.contain = '';
16404
16405
 
16405
16406
  // reset the size that was mirroring `size` css-part
16406
16407
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -16425,6 +16426,7 @@ class AuroFloatingUI {
16425
16426
  this.element.bib.style.position = '';
16426
16427
  this.element.bib.removeAttribute('isfullscreen');
16427
16428
  this.element.isBibFullscreen = false;
16429
+ this.element.style.contain = 'layout';
16428
16430
  }
16429
16431
 
16430
16432
  const isChanged = this.strategy && this.strategy !== value;
@@ -18039,6 +18041,7 @@ let AuroElement$4 = class AuroElement extends i {
18039
18041
  // See LICENSE in the project root for license information.
18040
18042
 
18041
18043
 
18044
+
18042
18045
  /*
18043
18046
  * @slot - Default slot for the popover content.
18044
18047
  * @slot helpText - Defines the content of the helpText.
@@ -18621,64 +18624,6 @@ class AuroDropdown extends AuroElement$4 {
18621
18624
  this.hasFocus = false;
18622
18625
  }
18623
18626
 
18624
- /**
18625
- * Determines if the element or any children are focusable.
18626
- * @private
18627
- * @param {HTMLElement} element - Element to check.
18628
- * @returns {Boolean} - True if the element or any children are focusable.
18629
- */
18630
- containsFocusableElement(element) {
18631
- this.showTriggerBorders = true;
18632
-
18633
- const nodes = [
18634
- element,
18635
- ...element.children
18636
- ];
18637
-
18638
- const focusableElements = [
18639
- 'a',
18640
- 'auro-hyperlink',
18641
- 'button',
18642
- 'auro-button',
18643
- 'input',
18644
- 'auro-input',
18645
- ];
18646
-
18647
- const focusableElementsThatNeedBorders = ['auro-input'];
18648
-
18649
- const result = nodes.some((node) => {
18650
- const tagName = node.tagName.toLowerCase();
18651
-
18652
- if (node.tabIndex > -1) {
18653
- return true;
18654
- }
18655
-
18656
- if (focusableElements.includes(tagName)) {
18657
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
18658
- return true;
18659
- }
18660
- if (!node.hasAttribute('disabled')) {
18661
- return true;
18662
- }
18663
- }
18664
-
18665
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
18666
- return true;
18667
- }
18668
-
18669
- return false;
18670
- });
18671
-
18672
- if (result) {
18673
- this.showTriggerBorders = !nodes.some((node) => {
18674
- const tagName = node.tagName.toLowerCase();
18675
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
18676
- });
18677
- }
18678
-
18679
- return result;
18680
- }
18681
-
18682
18627
  /**
18683
18628
  * Creates and dispatches a duplicate focus event on the trigger element.
18684
18629
  * @private
@@ -18790,7 +18735,7 @@ class AuroDropdown extends AuroElement$4 {
18790
18735
  if (triggerContentNodes) {
18791
18736
 
18792
18737
  // See if any of them are focusable elements
18793
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
18738
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
18794
18739
 
18795
18740
  // If any of them are focusable elements
18796
18741
  if (this.triggerContentFocusable) {
@@ -18862,7 +18807,7 @@ class AuroDropdown extends AuroElement$4 {
18862
18807
  <div
18863
18808
  id="trigger"
18864
18809
  class="${e$2(this.commonWrapperClasses)}" part="wrapper"
18865
- tabindex="${this.tabIndex}"
18810
+ tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
18866
18811
  role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
18867
18812
  aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
18868
18813
  aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -28210,6 +28155,9 @@ class AuroDatePicker extends AuroElement$1 {
28210
28155
  */
28211
28156
  this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
28212
28157
 
28158
+ /** @private */
28159
+ this.handleClick = this.handleClick.bind(this);
28160
+
28213
28161
  // Layout Config
28214
28162
  this.layout = 'classic';
28215
28163
  this.shape = 'classic';
@@ -28609,10 +28557,10 @@ class AuroDatePicker extends AuroElement$1 {
28609
28557
  * @returns {void}
28610
28558
  */
28611
28559
  focus(focusInput = '') {
28560
+ this.hasFocus = true;
28612
28561
  this.range && focusInput === 'endDate' ? this.inputList[1].focus() : this.inputList[0].focus();
28613
28562
  }
28614
28563
 
28615
-
28616
28564
  /**
28617
28565
  * Converts valid time number to format used by wc-date-range API.
28618
28566
  * @private
@@ -28814,15 +28762,18 @@ class AuroDatePicker extends AuroElement$1 {
28814
28762
  this.hasFocus = true;
28815
28763
  });
28816
28764
 
28817
- this.addEventListener('focusout', (evt) => {
28765
+ this.addEventListener('focusout', () => {
28818
28766
  this.hasFocus = false;
28819
- if (!this.noValidate && !evt.detail.expanded && this.touched) {
28820
- if (!this.contains(document.activeElement)) {
28821
- this.validation.validate(this.inputList[0]);
28822
28767
 
28823
- if (this.inputList[1] && this.inputList[1].touched) {
28824
- this.validation.validate(this.inputList[1]);
28825
- }
28768
+ if (this.noValidate) {
28769
+ return;
28770
+ }
28771
+
28772
+ if (!this.contains(document.activeElement)) {
28773
+ this.validation.validate(this.inputList[0]);
28774
+
28775
+ if (this.inputList[1]) {
28776
+ this.validation.validate(this.inputList[1]);
28826
28777
  }
28827
28778
  }
28828
28779
  });
@@ -29074,8 +29025,8 @@ class AuroDatePicker extends AuroElement$1 {
29074
29025
  this.calendarRenderUtil.updateCentralDate(this, this.formattedValue);
29075
29026
  }
29076
29027
 
29077
- this.validate();
29078
29028
  this.setHasValue();
29029
+ this.validate();
29079
29030
  }
29080
29031
 
29081
29032
  if (changedProperties.has('valueEnd') && this.inputList[1]) {
@@ -29231,6 +29182,39 @@ class AuroDatePicker extends AuroElement$1 {
29231
29182
  this.calendar.injectSlot(event.target.name, slot.cloneNode(true));
29232
29183
  }
29233
29184
 
29185
+ /**
29186
+ * Handles click events on the datepicker.
29187
+ * @param {PointerEvent} event - The pointer event object.
29188
+ * @private
29189
+ * @returns {void}
29190
+ */
29191
+ handleClick(event) {
29192
+
29193
+ // Get the initial target of the click event
29194
+ const [initTarget] = event.composedPath();
29195
+
29196
+ // Determine if the current layout requires special handling
29197
+ const layoutRequiresHandling = ['snowflake'].includes(this.layout);
29198
+
29199
+ // Determine if the target is an input element
29200
+ const targetIsInput = initTarget.tagName === 'INPUT';
29201
+
29202
+ if (layoutRequiresHandling && !targetIsInput) {
29203
+
29204
+ // Focus the first input
29205
+ this.inputList[0].focus();
29206
+ }
29207
+ }
29208
+
29209
+ /**
29210
+ * Set up click handling for the datepicker.
29211
+ * @private
29212
+ * @returns {void}
29213
+ */
29214
+ configureClickHandler() {
29215
+ this.addEventListener('click', this.handleClick);
29216
+ }
29217
+
29234
29218
  firstUpdated() {
29235
29219
  // Add the tag name as an attribute if it is different than the component name
29236
29220
  this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
@@ -29239,6 +29223,7 @@ class AuroDatePicker extends AuroElement$1 {
29239
29223
  this.configureInput();
29240
29224
  this.configureCalendar();
29241
29225
  this.configureDatepicker();
29226
+ this.configureClickHandler();
29242
29227
 
29243
29228
  window.addEventListener('resize', () => {
29244
29229
  this.handleReadOnly();
@@ -29249,11 +29234,6 @@ class AuroDatePicker extends AuroElement$1 {
29249
29234
  super.connectedCallback();
29250
29235
 
29251
29236
  this.monthFirst = this.format.indexOf('mm') < this.format.indexOf('yyyy');
29252
-
29253
- // setup focus/blur event listeners
29254
- this.addEventListener('focus', () => {
29255
- this.focus();
29256
- }, true);
29257
29237
  }
29258
29238
 
29259
29239
  // layout render methods
@@ -29298,9 +29278,9 @@ class AuroDatePicker extends AuroElement$1 {
29298
29278
  </div>
29299
29279
  <div class="accents right ${e$2(accentsClassMap)}">
29300
29280
  ${this.hasError
29301
- ? this.renderHtmlIconError()
29302
- : this.renderHtmlActionClear()
29303
- }
29281
+ ? this.renderHtmlIconError()
29282
+ : this.renderHtmlActionClear()
29283
+ }
29304
29284
  </div>
29305
29285
  </div>
29306
29286
  `;
@@ -29345,9 +29325,9 @@ class AuroDatePicker extends AuroElement$1 {
29345
29325
  </div>
29346
29326
  <div class="accents right ${e$2(accentsClassMap)}">
29347
29327
  ${this.hasError
29348
- ? this.renderHtmlIconError()
29349
- : this.renderHtmlActionClear()
29350
- }
29328
+ ? this.renderHtmlIconError()
29329
+ : this.renderHtmlActionClear()
29330
+ }
29351
29331
  </div>
29352
29332
  </div>
29353
29333
  `;
@@ -29397,9 +29377,9 @@ class AuroDatePicker extends AuroElement$1 {
29397
29377
  <div>
29398
29378
  <div class="displayValueText">
29399
29379
  ${dateValue && this.util.validDateStr(dateValue, this.format)
29400
- ? this.formatShortDate(dateValue)
29401
- : undefined
29402
- }
29380
+ ? this.formatShortDate(dateValue)
29381
+ : undefined
29382
+ }
29403
29383
  </div>
29404
29384
  </div>
29405
29385
  `;
@@ -29441,13 +29421,13 @@ class AuroDatePicker extends AuroElement$1 {
29441
29421
  inputmode="${o(this.inputmode)}"
29442
29422
  >
29443
29423
  ${this.layout !== "classic"
29444
- ? u$3`
29424
+ ? u$3`
29445
29425
  <span slot="displayValue">
29446
29426
  ${this.renderDisplayTextDate(this.value)}
29447
29427
  </span>
29448
29428
  `
29449
- : undefined
29450
- }
29429
+ : undefined
29430
+ }
29451
29431
  <span slot="label"><slot name="fromLabel"></slot></span>
29452
29432
  </${this.inputTag}>
29453
29433
  </div>
@@ -29478,13 +29458,13 @@ class AuroDatePicker extends AuroElement$1 {
29478
29458
  ?disabled="${this.disabled}"
29479
29459
  part="input">
29480
29460
  ${this.layout !== "classic"
29481
- ? u$3`
29461
+ ? u$3`
29482
29462
  <span slot="displayValue">
29483
29463
  ${this.renderDisplayTextDate(this.valueEnd)}
29484
29464
  </span>
29485
29465
  `
29486
- : undefined
29487
- }
29466
+ : undefined
29467
+ }
29488
29468
  <span slot="label"><slot name="toLabel"></slot></span>
29489
29469
  </${this.inputTag}>
29490
29470
  </div>
@@ -29524,7 +29504,6 @@ class AuroDatePicker extends AuroElement$1 {
29524
29504
  ?customColor="${this.onDark}"
29525
29505
  category="interface"
29526
29506
  name="x-lg"
29527
- slot="icon"
29528
29507
  >
29529
29508
  </${this.iconTag}>
29530
29509
  </${this.buttonTag}>
@@ -29581,21 +29560,21 @@ class AuroDatePicker extends AuroElement$1 {
29581
29560
  renderHtmlHelpText() {
29582
29561
  return u$3`
29583
29562
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
29584
- ? u$3`
29563
+ ? u$3`
29585
29564
  <${this.helpTextTag} ?onDark="${this.onDark}">
29586
29565
  <p id="${this.uniqueId}" part="helpText">
29587
29566
  <slot name="helpText"></slot>
29588
29567
  </p>
29589
29568
  </${this.helpTextTag}>
29590
29569
  `
29591
- : u$3`
29570
+ : u$3`
29592
29571
  <${this.helpTextTag} error ?onDark="${this.onDark}">
29593
29572
  <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
29594
29573
  ${this.errorMessage}
29595
29574
  </p>
29596
29575
  </${this.helpTextTag}>
29597
29576
  `
29598
- }
29577
+ }
29599
29578
  `;
29600
29579
  }
29601
29580