@aurodesignsystem-dev/auro-formkit 0.0.0-pr776.1 → 0.0.0-pr783.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1257,9 +1257,9 @@ var shapeSizeCss$2 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-class
1257
1257
 
1258
1258
  var classicLayoutColor = css``;
1259
1259
 
1260
- var snowflakeStyle = css`.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}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;max-width:250px;margin:0 auto}.inputSection:not(:is(.disabled,.hasFocus,.hasValue)) .inputDivider{display:none}.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}:host([disabled]) .inputSection{display:none}:host([layout*=snowflake]) [auro-input]{flex:1;text-align:center}:host([layout*=snowflake]) [auro-input]::part(label),:host([layout*=snowflake]) [auro-input]::part(accent-left),:host([layout*=snowflake]) [auro-input]::part(accent-right){display:none}:host([layout*=snowflake]) [auro-input]::part(input){padding-bottom:unset;text-align:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);transition:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper){min-height:unset;max-height:unset;box-shadow:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper) .mainContent{padding-bottom:unset}:host([layout*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake]) [auro-dropdown]::part(trigger){width:100%}:host([layout*=snowflake]) .dpTriggerContent{width:100%}:host([layout*=snowflake]) .wrapper{height:60px;width:calc(100% - 48px);display:flex;flex-direction:row;justify-content:space-between;padding-left:24px;padding-right:24px}:host([layout*=snowflake]) label{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);font-weight:450;letter-spacing:0}:host([layout*=snowflake]) label.hasFocus,:host([layout*=snowflake]) label.hasValue{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-height-xs, 1rem)}:host([layout*=snowflake]) .inputDivider{height:18px;margin:4px 12px;width:2px}`;
1260
+ var snowflakeStyle = css`.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}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;max-width:250px;margin:0 auto}.inputSection:not(:is(.disabled,.hasFocus,.hasValue)) .inputDivider{display:none}.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}:host([disabled]) .inputSection{display:none}:host([layout*=snowflake]) [auro-input]{flex:1;text-align:center}:host([layout*=snowflake]) [auro-input]::part(label),:host([layout*=snowflake]) [auro-input]::part(accent-left),:host([layout*=snowflake]) [auro-input]::part(accent-right){display:none}:host([layout*=snowflake]) [auro-input]::part(input){padding-bottom:unset;text-align:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);transition:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper){min-height:unset;max-height:unset;box-shadow:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper) .mainContent{padding-bottom:unset}:host([layout*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake]) [auro-input]::part(displayValue){justify-content:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem)}:host([layout*=snowflake]) [auro-dropdown]::part(trigger){width:100%}:host([layout*=snowflake]) .dpTriggerContent{width:100%}:host([layout*=snowflake]) .wrapper{height:60px;width:calc(100% - 48px);display:flex;flex-direction:row;justify-content:space-between;padding-left:24px;padding-right:24px}:host([layout*=snowflake]) label{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);font-weight:450;letter-spacing:0}:host([layout*=snowflake]) label.hasFocus,:host([layout*=snowflake]) label.hasValue{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-height-xs, 1rem)}:host([layout*=snowflake]) .inputDivider{height:18px;margin:4px 12px;width:2px}`;
1261
1261
 
1262
- var snowflakeColors = css`:host([layout=snowflake])[disabled] .mainContent label ::slotted(*){color:var(--ds-auro-icon-color)}:host([layout=snowflake]) label{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .inputDivider{background-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .error{color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout=snowflake]) [auro-input]::part(input)::placeholder{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) [auro-dropdown]:not(:is([error],.hasFocus))::part(wrapper){--ds-auro-dropdown-trigger-border-color: transparent}`;
1262
+ var snowflakeColors = css`:host([layout=snowflake])[disabled] .mainContent label ::slotted(*){color:var(--ds-auro-icon-color)}:host([layout=snowflake]) label{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .inputDivider{background-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .error{color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout=snowflake]) [auro-input]::part(input)::placeholder{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) [auro-input]::part(displayValue){background-color:inherit}:host([layout=snowflake]) [auro-dropdown]:not(:is([error],.hasFocus))::part(wrapper){--ds-auro-dropdown-trigger-border-color: transparent}`;
1263
1263
 
1264
1264
  var styleCss$d = css`:host{--calendar-width: 336px;--mobile-footer-height: 150px;--mobile-header-height: 68px;height:100vh;height:100dvh}.calendars{display:flex;flex-direction:row}.calendarNavButtons{position:absolute;top:var(--ds-size-200, 1rem);right:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem)}.calendarNavBtn{display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.prevMonth,.nextMonth{position:absolute;top:0}.prevMonth{left:0}.nextMonth{right:0}.headerActions{padding:0 var(--ds-size-200, 1rem)}.mobileHeader{width:100%;height:var(--mobile-header-height);z-index:1;align-items:center;flex-direction:row}.headerDateFrom{display:flex;height:var(--mobile-header-height);flex:1;flex-direction:column;justify-content:center;padding:0 var(--ds-size-150, 0.75rem) 0 var(--ds-size-200, 1rem)}.mobileDateLabel{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}.headerDateTo{height:calc(var(--mobile-header-height) - var(--ds-size-300, 1.5rem));padding:var(--ds-size-300, 1.5rem) var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host(:not([noRange])) .headerDateTo{position:relative;display:flex;flex:1;flex-direction:column;justify-content:center}:host(:not([noRange])) .headerDateTo:after{position:absolute;top:calc(50% + 10px);left:0;display:block;width:1px;height:var(--ds-size-300, 1.5rem);content:"";transform:translateY(-50%)}.mobileFooter{display:none;width:100%;align-items:flex-end;flex-direction:column;justify-content:flex-end}.mobileFooterActions{position:relative;bottom:0;left:50%;display:none;width:calc(100% - var(--ds-size-200, 1rem)*2);align-items:flex-end;flex-direction:column;justify-content:flex-end;padding:var(--ds-size-150) calc(var(--ds-size-200, 1rem));transform:translateX(-50%)}.mobileFooterActions auro-button{width:100%}:host([isfullscreen]){width:100%;max-height:100dvh;overflow:hidden}:host([isfullscreen]) .prevMonth,:host([isfullscreen]) .nextMonth{display:none}:host([isfullscreen]) .mobileHeader,:host([isfullscreen]) .mobileFooter,:host([isfullscreen]) .mobileFooterActions{display:flex}:host([isfullscreen]) .calendarWrapper{display:flex;flex-direction:column}:host([isfullscreen]) .calendars{display:flex;flex-direction:column;flex:1;align-items:center;width:100%;overscroll-behavior:contain}:host([isfullscreen]) .calendars:after{display:block;width:100%;height:var(--mobile-footer-height);content:""}`;
1265
1265
 
@@ -15795,7 +15795,7 @@ class AuroFloatingUI {
15795
15795
  */
15796
15796
  mirrorSize() {
15797
15797
  // mirror the boxsize from bibSizer
15798
- if (this.element.bibSizer) {
15798
+ if (this.element.bibSizer && this.element.matchWidth) {
15799
15799
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
15800
15800
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
15801
15801
  if (sizerStyle.width !== '0px') {
@@ -16007,13 +16007,13 @@ class AuroFloatingUI {
16007
16007
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
16008
16008
  return;
16009
16009
  }
16010
-
16010
+
16011
16011
  // if fullscreen bib is in fullscreen mode, do not close
16012
16012
  if (this.element.bib.hasAttribute('isfullscreen')) {
16013
16013
  return;
16014
16014
  }
16015
16015
 
16016
- this.hideBib();
16016
+ this.hideBib("keydown");
16017
16017
  }
16018
16018
 
16019
16019
  setupHideHandlers() {
@@ -16038,7 +16038,7 @@ class AuroFloatingUI {
16038
16038
  document.expandedAuroFormkitDropdown = null;
16039
16039
  document.expandedAuroFloater = this;
16040
16040
  } else {
16041
- this.hideBib();
16041
+ this.hideBib("click");
16042
16042
  }
16043
16043
  }
16044
16044
  };
@@ -16051,7 +16051,7 @@ class AuroFloatingUI {
16051
16051
  // if something else is open, let it handle itself
16052
16052
  return;
16053
16053
  }
16054
- this.hideBib();
16054
+ this.hideBib("keydown");
16055
16055
  }
16056
16056
  };
16057
16057
 
@@ -16134,7 +16134,11 @@ class AuroFloatingUI {
16134
16134
  }
16135
16135
  }
16136
16136
 
16137
- hideBib() {
16137
+ /**
16138
+ * Hides the floating UI element.
16139
+ * @param {String} eventType - The event type that triggered the hiding action.
16140
+ */
16141
+ hideBib(eventType = "unknown") {
16138
16142
  if (!this.element.disabled && !this.element.noToggle) {
16139
16143
  this.lockScroll(false);
16140
16144
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16145,7 +16149,7 @@ class AuroFloatingUI {
16145
16149
  if (this.showing) {
16146
16150
  this.cleanupHideHandlers();
16147
16151
  this.showing = false;
16148
- this.dispatchEventDropdownToggle();
16152
+ this.dispatchEventDropdownToggle(eventType);
16149
16153
  }
16150
16154
  }
16151
16155
  document.expandedAuroFloater = null;
@@ -16154,11 +16158,13 @@ class AuroFloatingUI {
16154
16158
  /**
16155
16159
  * @private
16156
16160
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16161
+ * @param {String} eventType - The event type that triggered the toggle action.
16157
16162
  */
16158
- dispatchEventDropdownToggle() {
16163
+ dispatchEventDropdownToggle(eventType) {
16159
16164
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16160
16165
  detail: {
16161
16166
  expanded: this.showing,
16167
+ eventType: eventType || "unknown",
16162
16168
  },
16163
16169
  composed: true
16164
16170
  });
@@ -16168,7 +16174,7 @@ class AuroFloatingUI {
16168
16174
 
16169
16175
  handleClick() {
16170
16176
  if (this.element.isPopoverVisible) {
16171
- this.hideBib();
16177
+ this.hideBib("click");
16172
16178
  } else {
16173
16179
  this.showBib();
16174
16180
  }
@@ -16195,7 +16201,7 @@ class AuroFloatingUI {
16195
16201
 
16196
16202
  event.preventDefault();
16197
16203
  this.handleClick();
16198
- }
16204
+ }
16199
16205
  break;
16200
16206
  case 'mouseenter':
16201
16207
  if (this.element.hoverToggle) {
@@ -16204,7 +16210,7 @@ class AuroFloatingUI {
16204
16210
  break;
16205
16211
  case 'mouseleave':
16206
16212
  if (this.element.hoverToggle) {
16207
- this.hideBib();
16213
+ this.hideBib("mouseleave");
16208
16214
  }
16209
16215
  break;
16210
16216
  case 'focus':
@@ -17592,6 +17598,9 @@ class AuroDropdown extends AuroElement$4 {
17592
17598
 
17593
17599
  this.parentBorder = false;
17594
17600
 
17601
+ /** @private */
17602
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
17603
+
17595
17604
  this.privateDefaults();
17596
17605
  }
17597
17606
 
@@ -18025,12 +18034,19 @@ class AuroDropdown extends AuroElement$4 {
18025
18034
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
18026
18035
  this.handleTriggerContentSlotChange();
18027
18036
  }
18037
+ }
18028
18038
 
18029
- if (changedProperties.has('isPopoverVisible')) {
18030
- this.updateFocusTrap();
18031
- if (!this.isPopoverVisible && this.hasFocus) {
18032
- this.trigger.focus();
18033
- }
18039
+ /**
18040
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18041
+ * @private
18042
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18043
+ */
18044
+ handleDropdownToggle(event) {
18045
+ this.updateFocusTrap();
18046
+ this.isPopoverVisible = event.detail.expanded;
18047
+ const eventType = event.detail.eventType || "unknown";
18048
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
18049
+ this.trigger.focus();
18034
18050
  }
18035
18051
  }
18036
18052
 
@@ -18038,6 +18054,7 @@ class AuroDropdown extends AuroElement$4 {
18038
18054
 
18039
18055
  // Configure the floater to, this will generate the ID for the bib
18040
18056
  this.floater.configure(this, 'auroDropdown');
18057
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
18041
18058
 
18042
18059
  /**
18043
18060
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -24014,9 +24031,9 @@ class BaseInput extends AuroElement$2 {
24014
24031
  if (!this.shadowRoot.contains(this.getActiveElement())) {
24015
24032
  this.validation.validate(this);
24016
24033
  }
24017
-
24018
- this.notifyValueChanged();
24019
24034
  }
24035
+
24036
+ this.notifyValueChanged();
24020
24037
  }
24021
24038
 
24022
24039
  if (changedProperties.has('error')) {
@@ -27650,6 +27667,15 @@ class AuroDatePicker extends AuroElement$1 {
27650
27667
  this.layout = 'classic';
27651
27668
  this.shape = 'classic';
27652
27669
  this.size = 'lg';
27670
+
27671
+ /**
27672
+ * @private
27673
+ * @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
27674
+ */
27675
+ this.constructor.shadowRootOptions = {
27676
+ ...LitElement.shadowRootOptions,
27677
+ delegatesFocus: true,
27678
+ };
27653
27679
  }
27654
27680
 
27655
27681
  // This function is to define props used within the scope of this component
@@ -28387,6 +28413,7 @@ class AuroDatePicker extends AuroElement$1 {
28387
28413
  }
28388
28414
 
28389
28415
  this.hasFocus = true;
28416
+ this.dropdown.show();
28390
28417
 
28391
28418
  // shadowroot active element is null if we focus the datepicker itself
28392
28419
  if (this.shadowRoot.activeElement === null) {
@@ -28710,6 +28737,9 @@ class AuroDatePicker extends AuroElement$1 {
28710
28737
  `;
28711
28738
  }
28712
28739
 
28740
+ /**
28741
+ * @private
28742
+ */
28713
28743
  renderLayoutFromAttributes() {
28714
28744
  switch (this.layout) {
28715
28745
  case 'snowflake':
@@ -28722,6 +28752,44 @@ class AuroDatePicker extends AuroElement$1 {
28722
28752
  }
28723
28753
  }
28724
28754
 
28755
+ // eslint-disable-next-line no-warning-comments
28756
+ // TODO: move this to date utility when time allows :(
28757
+ /**
28758
+ * Simple formatter that ONLY WORKS FOR US DATES.
28759
+ * Returns formatted date like Apr 21 or Dec 25.
28760
+ * @private
28761
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
28762
+ * @return {string}
28763
+ */
28764
+ formatShortDate(date) {
28765
+ // should render like Apr 21
28766
+ const options = {
28767
+ month: 'short',
28768
+ day: '2-digit'
28769
+ };
28770
+
28771
+ return new Date(date).toLocaleDateString('en-US', options).replace(',', '');
28772
+ }
28773
+
28774
+ /**
28775
+ * Format and render the provided date value.
28776
+ * @private
28777
+ * @param dateValue
28778
+ * @return {TemplateResult}
28779
+ */
28780
+ renderDisplayTextDate(dateValue) {
28781
+ return html$1`
28782
+ <div>
28783
+ <div class="displayValueText">
28784
+ ${dateValue && this.util.validDateStr(dateValue, this.format)
28785
+ ? this.formatShortDate(dateValue)
28786
+ : undefined
28787
+ }
28788
+ </div>
28789
+ </div>
28790
+ `;
28791
+ }
28792
+
28725
28793
  renderHtmlInputs() {
28726
28794
  const inputClasses = {
28727
28795
  "util_displayHiddenVisually": !this.hasValue && !this.hasFocus
@@ -28737,7 +28805,7 @@ class AuroDatePicker extends AuroElement$1 {
28737
28805
  .max="${this.maxDate}"
28738
28806
  .min="${this.minDate}"
28739
28807
  id="${this.generateRandomString(12)}"
28740
- placeholder="MM/DD"
28808
+ .placeholder="${this.placeholder}"
28741
28809
  simple
28742
28810
  bordered
28743
28811
  noValidate
@@ -28753,6 +28821,9 @@ class AuroDatePicker extends AuroElement$1 {
28753
28821
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
28754
28822
  inputmode="${ifDefined(this.inputmode)}"
28755
28823
  >
28824
+ <span slot="displayValue">
28825
+ ${this.renderDisplayTextDate(this.value)}
28826
+ </span>
28756
28827
  <span slot="label"><slot name="fromLabel"></slot></span>
28757
28828
  </${this.inputTag}>
28758
28829
  </div>
@@ -28783,6 +28854,9 @@ class AuroDatePicker extends AuroElement$1 {
28783
28854
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
28784
28855
  ?disabled="${this.disabled}"
28785
28856
  part="input">
28857
+ <span slot="displayValue">
28858
+ ${this.renderDisplayTextDate(this.valueEnd)}
28859
+ </span>
28786
28860
  <span slot="label"><slot name="toLabel"></slot></span>
28787
28861
  </${this.inputTag}>
28788
28862
  </div>
@@ -1257,9 +1257,9 @@ var shapeSizeCss$2 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-class
1257
1257
 
1258
1258
  var classicLayoutColor = css``;
1259
1259
 
1260
- var snowflakeStyle = css`.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}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;max-width:250px;margin:0 auto}.inputSection:not(:is(.disabled,.hasFocus,.hasValue)) .inputDivider{display:none}.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}:host([disabled]) .inputSection{display:none}:host([layout*=snowflake]) [auro-input]{flex:1;text-align:center}:host([layout*=snowflake]) [auro-input]::part(label),:host([layout*=snowflake]) [auro-input]::part(accent-left),:host([layout*=snowflake]) [auro-input]::part(accent-right){display:none}:host([layout*=snowflake]) [auro-input]::part(input){padding-bottom:unset;text-align:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);transition:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper){min-height:unset;max-height:unset;box-shadow:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper) .mainContent{padding-bottom:unset}:host([layout*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake]) [auro-dropdown]::part(trigger){width:100%}:host([layout*=snowflake]) .dpTriggerContent{width:100%}:host([layout*=snowflake]) .wrapper{height:60px;width:calc(100% - 48px);display:flex;flex-direction:row;justify-content:space-between;padding-left:24px;padding-right:24px}:host([layout*=snowflake]) label{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);font-weight:450;letter-spacing:0}:host([layout*=snowflake]) label.hasFocus,:host([layout*=snowflake]) label.hasValue{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-height-xs, 1rem)}:host([layout*=snowflake]) .inputDivider{height:18px;margin:4px 12px;width:2px}`;
1260
+ var snowflakeStyle = css`.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}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;max-width:250px;margin:0 auto}.inputSection:not(:is(.disabled,.hasFocus,.hasValue)) .inputDivider{display:none}.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}:host([disabled]) .inputSection{display:none}:host([layout*=snowflake]) [auro-input]{flex:1;text-align:center}:host([layout*=snowflake]) [auro-input]::part(label),:host([layout*=snowflake]) [auro-input]::part(accent-left),:host([layout*=snowflake]) [auro-input]::part(accent-right){display:none}:host([layout*=snowflake]) [auro-input]::part(input){padding-bottom:unset;text-align:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);transition:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper){min-height:unset;max-height:unset;box-shadow:unset}:host([layout*=snowflake]) [auro-input]::part(wrapper) .mainContent{padding-bottom:unset}:host([layout*=snowflake]) [auro-input]::part(inputHelpText){display:none}:host([layout*=snowflake]) [auro-input]::part(displayValue){justify-content:center;font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem)}:host([layout*=snowflake]) [auro-dropdown]::part(trigger){width:100%}:host([layout*=snowflake]) .dpTriggerContent{width:100%}:host([layout*=snowflake]) .wrapper{height:60px;width:calc(100% - 48px);display:flex;flex-direction:row;justify-content:space-between;padding-left:24px;padding-right:24px}:host([layout*=snowflake]) label{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);font-weight:450;letter-spacing:0}:host([layout*=snowflake]) label.hasFocus,:host([layout*=snowflake]) label.hasValue{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-height-xs, 1rem)}:host([layout*=snowflake]) .inputDivider{height:18px;margin:4px 12px;width:2px}`;
1261
1261
 
1262
- var snowflakeColors = css`:host([layout=snowflake])[disabled] .mainContent label ::slotted(*){color:var(--ds-auro-icon-color)}:host([layout=snowflake]) label{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .inputDivider{background-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .error{color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout=snowflake]) [auro-input]::part(input)::placeholder{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) [auro-dropdown]:not(:is([error],.hasFocus))::part(wrapper){--ds-auro-dropdown-trigger-border-color: transparent}`;
1262
+ var snowflakeColors = css`:host([layout=snowflake])[disabled] .mainContent label ::slotted(*){color:var(--ds-auro-icon-color)}:host([layout=snowflake]) label{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .inputDivider{background-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) .error{color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout=snowflake]) [auro-input]::part(input)::placeholder{color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([layout=snowflake]) [auro-input]::part(displayValue){background-color:inherit}:host([layout=snowflake]) [auro-dropdown]:not(:is([error],.hasFocus))::part(wrapper){--ds-auro-dropdown-trigger-border-color: transparent}`;
1263
1263
 
1264
1264
  var styleCss$d = css`:host{--calendar-width: 336px;--mobile-footer-height: 150px;--mobile-header-height: 68px;height:100vh;height:100dvh}.calendars{display:flex;flex-direction:row}.calendarNavButtons{position:absolute;top:var(--ds-size-200, 1rem);right:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem)}.calendarNavBtn{display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.prevMonth,.nextMonth{position:absolute;top:0}.prevMonth{left:0}.nextMonth{right:0}.headerActions{padding:0 var(--ds-size-200, 1rem)}.mobileHeader{width:100%;height:var(--mobile-header-height);z-index:1;align-items:center;flex-direction:row}.headerDateFrom{display:flex;height:var(--mobile-header-height);flex:1;flex-direction:column;justify-content:center;padding:0 var(--ds-size-150, 0.75rem) 0 var(--ds-size-200, 1rem)}.mobileDateLabel{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}.headerDateTo{height:calc(var(--mobile-header-height) - var(--ds-size-300, 1.5rem));padding:var(--ds-size-300, 1.5rem) var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host(:not([noRange])) .headerDateTo{position:relative;display:flex;flex:1;flex-direction:column;justify-content:center}:host(:not([noRange])) .headerDateTo:after{position:absolute;top:calc(50% + 10px);left:0;display:block;width:1px;height:var(--ds-size-300, 1.5rem);content:"";transform:translateY(-50%)}.mobileFooter{display:none;width:100%;align-items:flex-end;flex-direction:column;justify-content:flex-end}.mobileFooterActions{position:relative;bottom:0;left:50%;display:none;width:calc(100% - var(--ds-size-200, 1rem)*2);align-items:flex-end;flex-direction:column;justify-content:flex-end;padding:var(--ds-size-150) calc(var(--ds-size-200, 1rem));transform:translateX(-50%)}.mobileFooterActions auro-button{width:100%}:host([isfullscreen]){width:100%;max-height:100dvh;overflow:hidden}:host([isfullscreen]) .prevMonth,:host([isfullscreen]) .nextMonth{display:none}:host([isfullscreen]) .mobileHeader,:host([isfullscreen]) .mobileFooter,:host([isfullscreen]) .mobileFooterActions{display:flex}:host([isfullscreen]) .calendarWrapper{display:flex;flex-direction:column}:host([isfullscreen]) .calendars{display:flex;flex-direction:column;flex:1;align-items:center;width:100%;overscroll-behavior:contain}:host([isfullscreen]) .calendars:after{display:block;width:100%;height:var(--mobile-footer-height);content:""}`;
1265
1265
 
@@ -15795,7 +15795,7 @@ class AuroFloatingUI {
15795
15795
  */
15796
15796
  mirrorSize() {
15797
15797
  // mirror the boxsize from bibSizer
15798
- if (this.element.bibSizer) {
15798
+ if (this.element.bibSizer && this.element.matchWidth) {
15799
15799
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
15800
15800
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
15801
15801
  if (sizerStyle.width !== '0px') {
@@ -16007,13 +16007,13 @@ class AuroFloatingUI {
16007
16007
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
16008
16008
  return;
16009
16009
  }
16010
-
16010
+
16011
16011
  // if fullscreen bib is in fullscreen mode, do not close
16012
16012
  if (this.element.bib.hasAttribute('isfullscreen')) {
16013
16013
  return;
16014
16014
  }
16015
16015
 
16016
- this.hideBib();
16016
+ this.hideBib("keydown");
16017
16017
  }
16018
16018
 
16019
16019
  setupHideHandlers() {
@@ -16038,7 +16038,7 @@ class AuroFloatingUI {
16038
16038
  document.expandedAuroFormkitDropdown = null;
16039
16039
  document.expandedAuroFloater = this;
16040
16040
  } else {
16041
- this.hideBib();
16041
+ this.hideBib("click");
16042
16042
  }
16043
16043
  }
16044
16044
  };
@@ -16051,7 +16051,7 @@ class AuroFloatingUI {
16051
16051
  // if something else is open, let it handle itself
16052
16052
  return;
16053
16053
  }
16054
- this.hideBib();
16054
+ this.hideBib("keydown");
16055
16055
  }
16056
16056
  };
16057
16057
 
@@ -16134,7 +16134,11 @@ class AuroFloatingUI {
16134
16134
  }
16135
16135
  }
16136
16136
 
16137
- hideBib() {
16137
+ /**
16138
+ * Hides the floating UI element.
16139
+ * @param {String} eventType - The event type that triggered the hiding action.
16140
+ */
16141
+ hideBib(eventType = "unknown") {
16138
16142
  if (!this.element.disabled && !this.element.noToggle) {
16139
16143
  this.lockScroll(false);
16140
16144
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -16145,7 +16149,7 @@ class AuroFloatingUI {
16145
16149
  if (this.showing) {
16146
16150
  this.cleanupHideHandlers();
16147
16151
  this.showing = false;
16148
- this.dispatchEventDropdownToggle();
16152
+ this.dispatchEventDropdownToggle(eventType);
16149
16153
  }
16150
16154
  }
16151
16155
  document.expandedAuroFloater = null;
@@ -16154,11 +16158,13 @@ class AuroFloatingUI {
16154
16158
  /**
16155
16159
  * @private
16156
16160
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
16161
+ * @param {String} eventType - The event type that triggered the toggle action.
16157
16162
  */
16158
- dispatchEventDropdownToggle() {
16163
+ dispatchEventDropdownToggle(eventType) {
16159
16164
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
16160
16165
  detail: {
16161
16166
  expanded: this.showing,
16167
+ eventType: eventType || "unknown",
16162
16168
  },
16163
16169
  composed: true
16164
16170
  });
@@ -16168,7 +16174,7 @@ class AuroFloatingUI {
16168
16174
 
16169
16175
  handleClick() {
16170
16176
  if (this.element.isPopoverVisible) {
16171
- this.hideBib();
16177
+ this.hideBib("click");
16172
16178
  } else {
16173
16179
  this.showBib();
16174
16180
  }
@@ -16195,7 +16201,7 @@ class AuroFloatingUI {
16195
16201
 
16196
16202
  event.preventDefault();
16197
16203
  this.handleClick();
16198
- }
16204
+ }
16199
16205
  break;
16200
16206
  case 'mouseenter':
16201
16207
  if (this.element.hoverToggle) {
@@ -16204,7 +16210,7 @@ class AuroFloatingUI {
16204
16210
  break;
16205
16211
  case 'mouseleave':
16206
16212
  if (this.element.hoverToggle) {
16207
- this.hideBib();
16213
+ this.hideBib("mouseleave");
16208
16214
  }
16209
16215
  break;
16210
16216
  case 'focus':
@@ -17592,6 +17598,9 @@ class AuroDropdown extends AuroElement$4 {
17592
17598
 
17593
17599
  this.parentBorder = false;
17594
17600
 
17601
+ /** @private */
17602
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
17603
+
17595
17604
  this.privateDefaults();
17596
17605
  }
17597
17606
 
@@ -18025,12 +18034,19 @@ class AuroDropdown extends AuroElement$4 {
18025
18034
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
18026
18035
  this.handleTriggerContentSlotChange();
18027
18036
  }
18037
+ }
18028
18038
 
18029
- if (changedProperties.has('isPopoverVisible')) {
18030
- this.updateFocusTrap();
18031
- if (!this.isPopoverVisible && this.hasFocus) {
18032
- this.trigger.focus();
18033
- }
18039
+ /**
18040
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
18041
+ * @private
18042
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
18043
+ */
18044
+ handleDropdownToggle(event) {
18045
+ this.updateFocusTrap();
18046
+ this.isPopoverVisible = event.detail.expanded;
18047
+ const eventType = event.detail.eventType || "unknown";
18048
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
18049
+ this.trigger.focus();
18034
18050
  }
18035
18051
  }
18036
18052
 
@@ -18038,6 +18054,7 @@ class AuroDropdown extends AuroElement$4 {
18038
18054
 
18039
18055
  // Configure the floater to, this will generate the ID for the bib
18040
18056
  this.floater.configure(this, 'auroDropdown');
18057
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
18041
18058
 
18042
18059
  /**
18043
18060
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -24014,9 +24031,9 @@ class BaseInput extends AuroElement$2 {
24014
24031
  if (!this.shadowRoot.contains(this.getActiveElement())) {
24015
24032
  this.validation.validate(this);
24016
24033
  }
24017
-
24018
- this.notifyValueChanged();
24019
24034
  }
24035
+
24036
+ this.notifyValueChanged();
24020
24037
  }
24021
24038
 
24022
24039
  if (changedProperties.has('error')) {
@@ -27650,6 +27667,15 @@ class AuroDatePicker extends AuroElement$1 {
27650
27667
  this.layout = 'classic';
27651
27668
  this.shape = 'classic';
27652
27669
  this.size = 'lg';
27670
+
27671
+ /**
27672
+ * @private
27673
+ * @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
27674
+ */
27675
+ this.constructor.shadowRootOptions = {
27676
+ ...LitElement.shadowRootOptions,
27677
+ delegatesFocus: true,
27678
+ };
27653
27679
  }
27654
27680
 
27655
27681
  // This function is to define props used within the scope of this component
@@ -28387,6 +28413,7 @@ class AuroDatePicker extends AuroElement$1 {
28387
28413
  }
28388
28414
 
28389
28415
  this.hasFocus = true;
28416
+ this.dropdown.show();
28390
28417
 
28391
28418
  // shadowroot active element is null if we focus the datepicker itself
28392
28419
  if (this.shadowRoot.activeElement === null) {
@@ -28710,6 +28737,9 @@ class AuroDatePicker extends AuroElement$1 {
28710
28737
  `;
28711
28738
  }
28712
28739
 
28740
+ /**
28741
+ * @private
28742
+ */
28713
28743
  renderLayoutFromAttributes() {
28714
28744
  switch (this.layout) {
28715
28745
  case 'snowflake':
@@ -28722,6 +28752,44 @@ class AuroDatePicker extends AuroElement$1 {
28722
28752
  }
28723
28753
  }
28724
28754
 
28755
+ // eslint-disable-next-line no-warning-comments
28756
+ // TODO: move this to date utility when time allows :(
28757
+ /**
28758
+ * Simple formatter that ONLY WORKS FOR US DATES.
28759
+ * Returns formatted date like Apr 21 or Dec 25.
28760
+ * @private
28761
+ * @param {string} date - Date format should be in a format Date constructor accepts, like '2023-04-21' or '2023/04/21'.
28762
+ * @return {string}
28763
+ */
28764
+ formatShortDate(date) {
28765
+ // should render like Apr 21
28766
+ const options = {
28767
+ month: 'short',
28768
+ day: '2-digit'
28769
+ };
28770
+
28771
+ return new Date(date).toLocaleDateString('en-US', options).replace(',', '');
28772
+ }
28773
+
28774
+ /**
28775
+ * Format and render the provided date value.
28776
+ * @private
28777
+ * @param dateValue
28778
+ * @return {TemplateResult}
28779
+ */
28780
+ renderDisplayTextDate(dateValue) {
28781
+ return html$1`
28782
+ <div>
28783
+ <div class="displayValueText">
28784
+ ${dateValue && this.util.validDateStr(dateValue, this.format)
28785
+ ? this.formatShortDate(dateValue)
28786
+ : undefined
28787
+ }
28788
+ </div>
28789
+ </div>
28790
+ `;
28791
+ }
28792
+
28725
28793
  renderHtmlInputs() {
28726
28794
  const inputClasses = {
28727
28795
  "util_displayHiddenVisually": !this.hasValue && !this.hasFocus
@@ -28737,7 +28805,7 @@ class AuroDatePicker extends AuroElement$1 {
28737
28805
  .max="${this.maxDate}"
28738
28806
  .min="${this.minDate}"
28739
28807
  id="${this.generateRandomString(12)}"
28740
- placeholder="MM/DD"
28808
+ .placeholder="${this.placeholder}"
28741
28809
  simple
28742
28810
  bordered
28743
28811
  noValidate
@@ -28753,6 +28821,9 @@ class AuroDatePicker extends AuroElement$1 {
28753
28821
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
28754
28822
  inputmode="${ifDefined(this.inputmode)}"
28755
28823
  >
28824
+ <span slot="displayValue">
28825
+ ${this.renderDisplayTextDate(this.value)}
28826
+ </span>
28756
28827
  <span slot="label"><slot name="fromLabel"></slot></span>
28757
28828
  </${this.inputTag}>
28758
28829
  </div>
@@ -28783,6 +28854,9 @@ class AuroDatePicker extends AuroElement$1 {
28783
28854
  setCustomValidityRangeUnderflow="${this.setCustomValidityRangeUnderflow}"
28784
28855
  ?disabled="${this.disabled}"
28785
28856
  part="input">
28857
+ <span slot="displayValue">
28858
+ ${this.renderDisplayTextDate(this.valueEnd)}
28859
+ </span>
28786
28860
  <span slot="label"><slot name="toLabel"></slot></span>
28787
28861
  </${this.inputTag}>
28788
28862
  </div>