@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
@@ -1258,7 +1258,7 @@ class UtilitiesCalendarRender {
1258
1258
  }
1259
1259
  }
1260
1260
 
1261
- var styleCss$e = css`.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}}`;
1261
+ var styleCss$e = css`.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}}`;
1262
1262
 
1263
1263
  var colorCss$d = css`.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)}`;
1264
1264
 
@@ -16091,6 +16091,7 @@ class AuroFloatingUI {
16091
16091
  this.element.bib.style.left = "0px";
16092
16092
  this.element.bib.style.width = '';
16093
16093
  this.element.bib.style.height = '';
16094
+ this.element.style.contain = '';
16094
16095
 
16095
16096
  // reset the size that was mirroring `size` css-part
16096
16097
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -16115,6 +16116,7 @@ class AuroFloatingUI {
16115
16116
  this.element.bib.style.position = '';
16116
16117
  this.element.bib.removeAttribute('isfullscreen');
16117
16118
  this.element.isBibFullscreen = false;
16119
+ this.element.style.contain = 'layout';
16118
16120
  }
16119
16121
 
16120
16122
  const isChanged = this.strategy && this.strategy !== value;
@@ -17729,6 +17731,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
17729
17731
  // See LICENSE in the project root for license information.
17730
17732
 
17731
17733
 
17734
+
17732
17735
  /*
17733
17736
  * @slot - Default slot for the popover content.
17734
17737
  * @slot helpText - Defines the content of the helpText.
@@ -18311,64 +18314,6 @@ class AuroDropdown extends AuroElement$4 {
18311
18314
  this.hasFocus = false;
18312
18315
  }
18313
18316
 
18314
- /**
18315
- * Determines if the element or any children are focusable.
18316
- * @private
18317
- * @param {HTMLElement} element - Element to check.
18318
- * @returns {Boolean} - True if the element or any children are focusable.
18319
- */
18320
- containsFocusableElement(element) {
18321
- this.showTriggerBorders = true;
18322
-
18323
- const nodes = [
18324
- element,
18325
- ...element.children
18326
- ];
18327
-
18328
- const focusableElements = [
18329
- 'a',
18330
- 'auro-hyperlink',
18331
- 'button',
18332
- 'auro-button',
18333
- 'input',
18334
- 'auro-input',
18335
- ];
18336
-
18337
- const focusableElementsThatNeedBorders = ['auro-input'];
18338
-
18339
- const result = nodes.some((node) => {
18340
- const tagName = node.tagName.toLowerCase();
18341
-
18342
- if (node.tabIndex > -1) {
18343
- return true;
18344
- }
18345
-
18346
- if (focusableElements.includes(tagName)) {
18347
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
18348
- return true;
18349
- }
18350
- if (!node.hasAttribute('disabled')) {
18351
- return true;
18352
- }
18353
- }
18354
-
18355
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
18356
- return true;
18357
- }
18358
-
18359
- return false;
18360
- });
18361
-
18362
- if (result) {
18363
- this.showTriggerBorders = !nodes.some((node) => {
18364
- const tagName = node.tagName.toLowerCase();
18365
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
18366
- });
18367
- }
18368
-
18369
- return result;
18370
- }
18371
-
18372
18317
  /**
18373
18318
  * Creates and dispatches a duplicate focus event on the trigger element.
18374
18319
  * @private
@@ -18480,7 +18425,7 @@ class AuroDropdown extends AuroElement$4 {
18480
18425
  if (triggerContentNodes) {
18481
18426
 
18482
18427
  // See if any of them are focusable elements
18483
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
18428
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
18484
18429
 
18485
18430
  // If any of them are focusable elements
18486
18431
  if (this.triggerContentFocusable) {
@@ -18552,7 +18497,7 @@ class AuroDropdown extends AuroElement$4 {
18552
18497
  <div
18553
18498
  id="trigger"
18554
18499
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
18555
- tabindex="${this.tabIndex}"
18500
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
18556
18501
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
18557
18502
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
18558
18503
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -27887,6 +27832,9 @@ class AuroDatePicker extends AuroElement$1 {
27887
27832
  */
27888
27833
  this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
27889
27834
 
27835
+ /** @private */
27836
+ this.handleClick = this.handleClick.bind(this);
27837
+
27890
27838
  // Layout Config
27891
27839
  this.layout = 'classic';
27892
27840
  this.shape = 'classic';
@@ -28286,10 +28234,10 @@ class AuroDatePicker extends AuroElement$1 {
28286
28234
  * @returns {void}
28287
28235
  */
28288
28236
  focus(focusInput = '') {
28237
+ this.hasFocus = true;
28289
28238
  this.range && focusInput === 'endDate' ? this.inputList[1].focus() : this.inputList[0].focus();
28290
28239
  }
28291
28240
 
28292
-
28293
28241
  /**
28294
28242
  * Converts valid time number to format used by wc-date-range API.
28295
28243
  * @private
@@ -28491,15 +28439,18 @@ class AuroDatePicker extends AuroElement$1 {
28491
28439
  this.hasFocus = true;
28492
28440
  });
28493
28441
 
28494
- this.addEventListener('focusout', (evt) => {
28442
+ this.addEventListener('focusout', () => {
28495
28443
  this.hasFocus = false;
28496
- if (!this.noValidate && !evt.detail.expanded && this.touched) {
28497
- if (!this.contains(document.activeElement)) {
28498
- this.validation.validate(this.inputList[0]);
28499
28444
 
28500
- if (this.inputList[1] && this.inputList[1].touched) {
28501
- this.validation.validate(this.inputList[1]);
28502
- }
28445
+ if (this.noValidate) {
28446
+ return;
28447
+ }
28448
+
28449
+ if (!this.contains(document.activeElement)) {
28450
+ this.validation.validate(this.inputList[0]);
28451
+
28452
+ if (this.inputList[1]) {
28453
+ this.validation.validate(this.inputList[1]);
28503
28454
  }
28504
28455
  }
28505
28456
  });
@@ -28751,8 +28702,8 @@ class AuroDatePicker extends AuroElement$1 {
28751
28702
  this.calendarRenderUtil.updateCentralDate(this, this.formattedValue);
28752
28703
  }
28753
28704
 
28754
- this.validate();
28755
28705
  this.setHasValue();
28706
+ this.validate();
28756
28707
  }
28757
28708
 
28758
28709
  if (changedProperties.has('valueEnd') && this.inputList[1]) {
@@ -28908,6 +28859,39 @@ class AuroDatePicker extends AuroElement$1 {
28908
28859
  this.calendar.injectSlot(event.target.name, slot.cloneNode(true));
28909
28860
  }
28910
28861
 
28862
+ /**
28863
+ * Handles click events on the datepicker.
28864
+ * @param {PointerEvent} event - The pointer event object.
28865
+ * @private
28866
+ * @returns {void}
28867
+ */
28868
+ handleClick(event) {
28869
+
28870
+ // Get the initial target of the click event
28871
+ const [initTarget] = event.composedPath();
28872
+
28873
+ // Determine if the current layout requires special handling
28874
+ const layoutRequiresHandling = ['snowflake'].includes(this.layout);
28875
+
28876
+ // Determine if the target is an input element
28877
+ const targetIsInput = initTarget.tagName === 'INPUT';
28878
+
28879
+ if (layoutRequiresHandling && !targetIsInput) {
28880
+
28881
+ // Focus the first input
28882
+ this.inputList[0].focus();
28883
+ }
28884
+ }
28885
+
28886
+ /**
28887
+ * Set up click handling for the datepicker.
28888
+ * @private
28889
+ * @returns {void}
28890
+ */
28891
+ configureClickHandler() {
28892
+ this.addEventListener('click', this.handleClick);
28893
+ }
28894
+
28911
28895
  firstUpdated() {
28912
28896
  // Add the tag name as an attribute if it is different than the component name
28913
28897
  this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
@@ -28916,6 +28900,7 @@ class AuroDatePicker extends AuroElement$1 {
28916
28900
  this.configureInput();
28917
28901
  this.configureCalendar();
28918
28902
  this.configureDatepicker();
28903
+ this.configureClickHandler();
28919
28904
 
28920
28905
  window.addEventListener('resize', () => {
28921
28906
  this.handleReadOnly();
@@ -28926,11 +28911,6 @@ class AuroDatePicker extends AuroElement$1 {
28926
28911
  super.connectedCallback();
28927
28912
 
28928
28913
  this.monthFirst = this.format.indexOf('mm') < this.format.indexOf('yyyy');
28929
-
28930
- // setup focus/blur event listeners
28931
- this.addEventListener('focus', () => {
28932
- this.focus();
28933
- }, true);
28934
28914
  }
28935
28915
 
28936
28916
  // layout render methods
@@ -28975,9 +28955,9 @@ class AuroDatePicker extends AuroElement$1 {
28975
28955
  </div>
28976
28956
  <div class="accents right ${classMap(accentsClassMap)}">
28977
28957
  ${this.hasError
28978
- ? this.renderHtmlIconError()
28979
- : this.renderHtmlActionClear()
28980
- }
28958
+ ? this.renderHtmlIconError()
28959
+ : this.renderHtmlActionClear()
28960
+ }
28981
28961
  </div>
28982
28962
  </div>
28983
28963
  `;
@@ -29022,9 +29002,9 @@ class AuroDatePicker extends AuroElement$1 {
29022
29002
  </div>
29023
29003
  <div class="accents right ${classMap(accentsClassMap)}">
29024
29004
  ${this.hasError
29025
- ? this.renderHtmlIconError()
29026
- : this.renderHtmlActionClear()
29027
- }
29005
+ ? this.renderHtmlIconError()
29006
+ : this.renderHtmlActionClear()
29007
+ }
29028
29008
  </div>
29029
29009
  </div>
29030
29010
  `;
@@ -29074,9 +29054,9 @@ class AuroDatePicker extends AuroElement$1 {
29074
29054
  <div>
29075
29055
  <div class="displayValueText">
29076
29056
  ${dateValue && this.util.validDateStr(dateValue, this.format)
29077
- ? this.formatShortDate(dateValue)
29078
- : undefined
29079
- }
29057
+ ? this.formatShortDate(dateValue)
29058
+ : undefined
29059
+ }
29080
29060
  </div>
29081
29061
  </div>
29082
29062
  `;
@@ -29118,13 +29098,13 @@ class AuroDatePicker extends AuroElement$1 {
29118
29098
  inputmode="${ifDefined(this.inputmode)}"
29119
29099
  >
29120
29100
  ${this.layout !== "classic"
29121
- ? html$1`
29101
+ ? html$1`
29122
29102
  <span slot="displayValue">
29123
29103
  ${this.renderDisplayTextDate(this.value)}
29124
29104
  </span>
29125
29105
  `
29126
- : undefined
29127
- }
29106
+ : undefined
29107
+ }
29128
29108
  <span slot="label"><slot name="fromLabel"></slot></span>
29129
29109
  </${this.inputTag}>
29130
29110
  </div>
@@ -29155,13 +29135,13 @@ class AuroDatePicker extends AuroElement$1 {
29155
29135
  ?disabled="${this.disabled}"
29156
29136
  part="input">
29157
29137
  ${this.layout !== "classic"
29158
- ? html$1`
29138
+ ? html$1`
29159
29139
  <span slot="displayValue">
29160
29140
  ${this.renderDisplayTextDate(this.valueEnd)}
29161
29141
  </span>
29162
29142
  `
29163
- : undefined
29164
- }
29143
+ : undefined
29144
+ }
29165
29145
  <span slot="label"><slot name="toLabel"></slot></span>
29166
29146
  </${this.inputTag}>
29167
29147
  </div>
@@ -29201,7 +29181,6 @@ class AuroDatePicker extends AuroElement$1 {
29201
29181
  ?customColor="${this.onDark}"
29202
29182
  category="interface"
29203
29183
  name="x-lg"
29204
- slot="icon"
29205
29184
  >
29206
29185
  </${this.iconTag}>
29207
29186
  </${this.buttonTag}>
@@ -29258,21 +29237,21 @@ class AuroDatePicker extends AuroElement$1 {
29258
29237
  renderHtmlHelpText() {
29259
29238
  return html$1`
29260
29239
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
29261
- ? html$1`
29240
+ ? html$1`
29262
29241
  <${this.helpTextTag} ?onDark="${this.onDark}">
29263
29242
  <p id="${this.uniqueId}" part="helpText">
29264
29243
  <slot name="helpText"></slot>
29265
29244
  </p>
29266
29245
  </${this.helpTextTag}>
29267
29246
  `
29268
- : html$1`
29247
+ : html$1`
29269
29248
  <${this.helpTextTag} error ?onDark="${this.onDark}">
29270
29249
  <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
29271
29250
  ${this.errorMessage}
29272
29251
  </p>
29273
29252
  </${this.helpTextTag}>
29274
29253
  `
29275
- }
29254
+ }
29276
29255
  `;
29277
29256
  }
29278
29257
 
@@ -1258,7 +1258,7 @@ class UtilitiesCalendarRender {
1258
1258
  }
1259
1259
  }
1260
1260
 
1261
- var styleCss$e = css`.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}}`;
1261
+ var styleCss$e = css`.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}}`;
1262
1262
 
1263
1263
  var colorCss$d = css`.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)}`;
1264
1264
 
@@ -16091,6 +16091,7 @@ class AuroFloatingUI {
16091
16091
  this.element.bib.style.left = "0px";
16092
16092
  this.element.bib.style.width = '';
16093
16093
  this.element.bib.style.height = '';
16094
+ this.element.style.contain = '';
16094
16095
 
16095
16096
  // reset the size that was mirroring `size` css-part
16096
16097
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -16115,6 +16116,7 @@ class AuroFloatingUI {
16115
16116
  this.element.bib.style.position = '';
16116
16117
  this.element.bib.removeAttribute('isfullscreen');
16117
16118
  this.element.isBibFullscreen = false;
16119
+ this.element.style.contain = 'layout';
16118
16120
  }
16119
16121
 
16120
16122
  const isChanged = this.strategy && this.strategy !== value;
@@ -17729,6 +17731,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
17729
17731
  // See LICENSE in the project root for license information.
17730
17732
 
17731
17733
 
17734
+
17732
17735
  /*
17733
17736
  * @slot - Default slot for the popover content.
17734
17737
  * @slot helpText - Defines the content of the helpText.
@@ -18311,64 +18314,6 @@ class AuroDropdown extends AuroElement$4 {
18311
18314
  this.hasFocus = false;
18312
18315
  }
18313
18316
 
18314
- /**
18315
- * Determines if the element or any children are focusable.
18316
- * @private
18317
- * @param {HTMLElement} element - Element to check.
18318
- * @returns {Boolean} - True if the element or any children are focusable.
18319
- */
18320
- containsFocusableElement(element) {
18321
- this.showTriggerBorders = true;
18322
-
18323
- const nodes = [
18324
- element,
18325
- ...element.children
18326
- ];
18327
-
18328
- const focusableElements = [
18329
- 'a',
18330
- 'auro-hyperlink',
18331
- 'button',
18332
- 'auro-button',
18333
- 'input',
18334
- 'auro-input',
18335
- ];
18336
-
18337
- const focusableElementsThatNeedBorders = ['auro-input'];
18338
-
18339
- const result = nodes.some((node) => {
18340
- const tagName = node.tagName.toLowerCase();
18341
-
18342
- if (node.tabIndex > -1) {
18343
- return true;
18344
- }
18345
-
18346
- if (focusableElements.includes(tagName)) {
18347
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
18348
- return true;
18349
- }
18350
- if (!node.hasAttribute('disabled')) {
18351
- return true;
18352
- }
18353
- }
18354
-
18355
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
18356
- return true;
18357
- }
18358
-
18359
- return false;
18360
- });
18361
-
18362
- if (result) {
18363
- this.showTriggerBorders = !nodes.some((node) => {
18364
- const tagName = node.tagName.toLowerCase();
18365
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
18366
- });
18367
- }
18368
-
18369
- return result;
18370
- }
18371
-
18372
18317
  /**
18373
18318
  * Creates and dispatches a duplicate focus event on the trigger element.
18374
18319
  * @private
@@ -18480,7 +18425,7 @@ class AuroDropdown extends AuroElement$4 {
18480
18425
  if (triggerContentNodes) {
18481
18426
 
18482
18427
  // See if any of them are focusable elements
18483
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
18428
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
18484
18429
 
18485
18430
  // If any of them are focusable elements
18486
18431
  if (this.triggerContentFocusable) {
@@ -18552,7 +18497,7 @@ class AuroDropdown extends AuroElement$4 {
18552
18497
  <div
18553
18498
  id="trigger"
18554
18499
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
18555
- tabindex="${this.tabIndex}"
18500
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
18556
18501
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
18557
18502
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
18558
18503
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -27887,6 +27832,9 @@ class AuroDatePicker extends AuroElement$1 {
27887
27832
  */
27888
27833
  this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
27889
27834
 
27835
+ /** @private */
27836
+ this.handleClick = this.handleClick.bind(this);
27837
+
27890
27838
  // Layout Config
27891
27839
  this.layout = 'classic';
27892
27840
  this.shape = 'classic';
@@ -28286,10 +28234,10 @@ class AuroDatePicker extends AuroElement$1 {
28286
28234
  * @returns {void}
28287
28235
  */
28288
28236
  focus(focusInput = '') {
28237
+ this.hasFocus = true;
28289
28238
  this.range && focusInput === 'endDate' ? this.inputList[1].focus() : this.inputList[0].focus();
28290
28239
  }
28291
28240
 
28292
-
28293
28241
  /**
28294
28242
  * Converts valid time number to format used by wc-date-range API.
28295
28243
  * @private
@@ -28491,15 +28439,18 @@ class AuroDatePicker extends AuroElement$1 {
28491
28439
  this.hasFocus = true;
28492
28440
  });
28493
28441
 
28494
- this.addEventListener('focusout', (evt) => {
28442
+ this.addEventListener('focusout', () => {
28495
28443
  this.hasFocus = false;
28496
- if (!this.noValidate && !evt.detail.expanded && this.touched) {
28497
- if (!this.contains(document.activeElement)) {
28498
- this.validation.validate(this.inputList[0]);
28499
28444
 
28500
- if (this.inputList[1] && this.inputList[1].touched) {
28501
- this.validation.validate(this.inputList[1]);
28502
- }
28445
+ if (this.noValidate) {
28446
+ return;
28447
+ }
28448
+
28449
+ if (!this.contains(document.activeElement)) {
28450
+ this.validation.validate(this.inputList[0]);
28451
+
28452
+ if (this.inputList[1]) {
28453
+ this.validation.validate(this.inputList[1]);
28503
28454
  }
28504
28455
  }
28505
28456
  });
@@ -28751,8 +28702,8 @@ class AuroDatePicker extends AuroElement$1 {
28751
28702
  this.calendarRenderUtil.updateCentralDate(this, this.formattedValue);
28752
28703
  }
28753
28704
 
28754
- this.validate();
28755
28705
  this.setHasValue();
28706
+ this.validate();
28756
28707
  }
28757
28708
 
28758
28709
  if (changedProperties.has('valueEnd') && this.inputList[1]) {
@@ -28908,6 +28859,39 @@ class AuroDatePicker extends AuroElement$1 {
28908
28859
  this.calendar.injectSlot(event.target.name, slot.cloneNode(true));
28909
28860
  }
28910
28861
 
28862
+ /**
28863
+ * Handles click events on the datepicker.
28864
+ * @param {PointerEvent} event - The pointer event object.
28865
+ * @private
28866
+ * @returns {void}
28867
+ */
28868
+ handleClick(event) {
28869
+
28870
+ // Get the initial target of the click event
28871
+ const [initTarget] = event.composedPath();
28872
+
28873
+ // Determine if the current layout requires special handling
28874
+ const layoutRequiresHandling = ['snowflake'].includes(this.layout);
28875
+
28876
+ // Determine if the target is an input element
28877
+ const targetIsInput = initTarget.tagName === 'INPUT';
28878
+
28879
+ if (layoutRequiresHandling && !targetIsInput) {
28880
+
28881
+ // Focus the first input
28882
+ this.inputList[0].focus();
28883
+ }
28884
+ }
28885
+
28886
+ /**
28887
+ * Set up click handling for the datepicker.
28888
+ * @private
28889
+ * @returns {void}
28890
+ */
28891
+ configureClickHandler() {
28892
+ this.addEventListener('click', this.handleClick);
28893
+ }
28894
+
28911
28895
  firstUpdated() {
28912
28896
  // Add the tag name as an attribute if it is different than the component name
28913
28897
  this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
@@ -28916,6 +28900,7 @@ class AuroDatePicker extends AuroElement$1 {
28916
28900
  this.configureInput();
28917
28901
  this.configureCalendar();
28918
28902
  this.configureDatepicker();
28903
+ this.configureClickHandler();
28919
28904
 
28920
28905
  window.addEventListener('resize', () => {
28921
28906
  this.handleReadOnly();
@@ -28926,11 +28911,6 @@ class AuroDatePicker extends AuroElement$1 {
28926
28911
  super.connectedCallback();
28927
28912
 
28928
28913
  this.monthFirst = this.format.indexOf('mm') < this.format.indexOf('yyyy');
28929
-
28930
- // setup focus/blur event listeners
28931
- this.addEventListener('focus', () => {
28932
- this.focus();
28933
- }, true);
28934
28914
  }
28935
28915
 
28936
28916
  // layout render methods
@@ -28975,9 +28955,9 @@ class AuroDatePicker extends AuroElement$1 {
28975
28955
  </div>
28976
28956
  <div class="accents right ${classMap(accentsClassMap)}">
28977
28957
  ${this.hasError
28978
- ? this.renderHtmlIconError()
28979
- : this.renderHtmlActionClear()
28980
- }
28958
+ ? this.renderHtmlIconError()
28959
+ : this.renderHtmlActionClear()
28960
+ }
28981
28961
  </div>
28982
28962
  </div>
28983
28963
  `;
@@ -29022,9 +29002,9 @@ class AuroDatePicker extends AuroElement$1 {
29022
29002
  </div>
29023
29003
  <div class="accents right ${classMap(accentsClassMap)}">
29024
29004
  ${this.hasError
29025
- ? this.renderHtmlIconError()
29026
- : this.renderHtmlActionClear()
29027
- }
29005
+ ? this.renderHtmlIconError()
29006
+ : this.renderHtmlActionClear()
29007
+ }
29028
29008
  </div>
29029
29009
  </div>
29030
29010
  `;
@@ -29074,9 +29054,9 @@ class AuroDatePicker extends AuroElement$1 {
29074
29054
  <div>
29075
29055
  <div class="displayValueText">
29076
29056
  ${dateValue && this.util.validDateStr(dateValue, this.format)
29077
- ? this.formatShortDate(dateValue)
29078
- : undefined
29079
- }
29057
+ ? this.formatShortDate(dateValue)
29058
+ : undefined
29059
+ }
29080
29060
  </div>
29081
29061
  </div>
29082
29062
  `;
@@ -29118,13 +29098,13 @@ class AuroDatePicker extends AuroElement$1 {
29118
29098
  inputmode="${ifDefined(this.inputmode)}"
29119
29099
  >
29120
29100
  ${this.layout !== "classic"
29121
- ? html$1`
29101
+ ? html$1`
29122
29102
  <span slot="displayValue">
29123
29103
  ${this.renderDisplayTextDate(this.value)}
29124
29104
  </span>
29125
29105
  `
29126
- : undefined
29127
- }
29106
+ : undefined
29107
+ }
29128
29108
  <span slot="label"><slot name="fromLabel"></slot></span>
29129
29109
  </${this.inputTag}>
29130
29110
  </div>
@@ -29155,13 +29135,13 @@ class AuroDatePicker extends AuroElement$1 {
29155
29135
  ?disabled="${this.disabled}"
29156
29136
  part="input">
29157
29137
  ${this.layout !== "classic"
29158
- ? html$1`
29138
+ ? html$1`
29159
29139
  <span slot="displayValue">
29160
29140
  ${this.renderDisplayTextDate(this.valueEnd)}
29161
29141
  </span>
29162
29142
  `
29163
- : undefined
29164
- }
29143
+ : undefined
29144
+ }
29165
29145
  <span slot="label"><slot name="toLabel"></slot></span>
29166
29146
  </${this.inputTag}>
29167
29147
  </div>
@@ -29201,7 +29181,6 @@ class AuroDatePicker extends AuroElement$1 {
29201
29181
  ?customColor="${this.onDark}"
29202
29182
  category="interface"
29203
29183
  name="x-lg"
29204
- slot="icon"
29205
29184
  >
29206
29185
  </${this.iconTag}>
29207
29186
  </${this.buttonTag}>
@@ -29258,21 +29237,21 @@ class AuroDatePicker extends AuroElement$1 {
29258
29237
  renderHtmlHelpText() {
29259
29238
  return html$1`
29260
29239
  ${!this.validity || this.validity === undefined || this.validity === 'valid'
29261
- ? html$1`
29240
+ ? html$1`
29262
29241
  <${this.helpTextTag} ?onDark="${this.onDark}">
29263
29242
  <p id="${this.uniqueId}" part="helpText">
29264
29243
  <slot name="helpText"></slot>
29265
29244
  </p>
29266
29245
  </${this.helpTextTag}>
29267
29246
  `
29268
- : html$1`
29247
+ : html$1`
29269
29248
  <${this.helpTextTag} error ?onDark="${this.onDark}">
29270
29249
  <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
29271
29250
  ${this.errorMessage}
29272
29251
  </p>
29273
29252
  </${this.helpTextTag}>
29274
29253
  `
29275
- }
29254
+ }
29276
29255
  `;
29277
29256
  }
29278
29257