@aurodesignsystem-dev/auro-formkit 0.0.0-pr1160.0 → 0.0.0-pr1166.0

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.
@@ -14284,15 +14284,6 @@ class AuroCalendar extends RangeDatepicker {
14284
14284
  type: Object
14285
14285
  },
14286
14286
 
14287
- /**
14288
- * Mobile breakpoint for responsive design.
14289
- * @private
14290
- */
14291
- mobileBreakpoint: {
14292
- type: Number,
14293
- reflect: false
14294
- },
14295
-
14296
14287
  /**
14297
14288
  * @private
14298
14289
  */
@@ -29066,21 +29057,11 @@ class AuroDatePicker extends AuroElement$1 {
29066
29057
  this.dropdown.addEventListener('auroDropdown-toggled', () => {
29067
29058
  this.notifyDatepickerToggled();
29068
29059
 
29069
- // This forces the calendar to render when the dropdown is opened.
29070
- // It is not rendered by default
29071
29060
  this.calendar.visible = this.dropdown.isPopoverVisible;
29072
29061
 
29073
- // If on mobile, and the calendar is opened, scroll the focus date into view if the flag is set
29074
- if (this.dropdown.isPopoverVisible && this.forceScrollOnNextMobileCalendarRender) {
29075
-
29076
- // Since the calendar is not rendered until the dropdown is opened,
29077
- // and the auroDropdown-toggled event fires before the popover is actually open,
29078
- // we need to wait until the next frame to ensure the calendar is fully rendered
29079
- // and the area we're trying to scroll to is present in the DOM.
29080
- setTimeout(() => {
29081
- this.calendar.scrollMonthIntoView(this.formattedFocusDate);
29082
- this.forceScrollOnNextMobileCalendarRender = false;
29083
- }, 0);
29062
+ if (this.dropdown.getAttribute('data-show') && this.forceScrollOnNextMobileCalendarRender) {
29063
+ this.calendar.scrollMonthIntoView(this.formattedFocusDate);
29064
+ this.forceScrollOnNextMobileCalendarRender = false;
29084
29065
  }
29085
29066
  });
29086
29067
  }
@@ -29239,13 +29220,10 @@ class AuroDatePicker extends AuroElement$1 {
29239
29220
  handleReadOnly() {
29240
29221
  // --ds-grid-breakpoint-sm
29241
29222
  const docStyle = getComputedStyle(document.documentElement);
29242
-
29243
- // We need to store this so that we can pass it to calendar
29244
- this.mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
29245
- const isMobile = window.innerWidth < this.mobileBreakpoint;
29223
+ const mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
29246
29224
 
29247
29225
  this.inputList.forEach((input) => {
29248
- if (isMobile) {
29226
+ if (window.innerWidth < mobileBreakpoint) {
29249
29227
  input.setAttribute('readonly', true);
29250
29228
  } else {
29251
29229
  input.removeAttribute('readonly');
@@ -29432,9 +29410,6 @@ class AuroDatePicker extends AuroElement$1 {
29432
29410
  if (!this.calendarFocusDate && this.util.validDateStr(this.value, this.format)) {
29433
29411
  if (!this.dropdown.isPopoverVisible) {
29434
29412
  this.calendarFocusDate = this.value;
29435
-
29436
- // Let the calendar know to scroll to the focus date when it is next rendered on mobile
29437
- this.forceScrollOnNextMobileCalendarRender = true;
29438
29413
  }
29439
29414
  }
29440
29415
 
@@ -29886,6 +29861,7 @@ class AuroDatePicker extends AuroElement$1 {
29886
29861
  `
29887
29862
  : undefined
29888
29863
  }
29864
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29889
29865
  <span slot="label"><slot name="fromLabel"></slot></span>
29890
29866
  </${this.inputTag}>
29891
29867
  </div>
@@ -29927,6 +29903,7 @@ class AuroDatePicker extends AuroElement$1 {
29927
29903
  `
29928
29904
  : undefined
29929
29905
  }
29906
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29930
29907
  <span slot="label"><slot name="toLabel"></slot></span>
29931
29908
  </${this.inputTag}>
29932
29909
  </div>
@@ -30057,7 +30034,6 @@ class AuroDatePicker extends AuroElement$1 {
30057
30034
  .maxDate="${this.maxDate}"
30058
30035
  .minDate="${this.minDate}"
30059
30036
  .monthNames="${this.monthNames}"
30060
- .mobileBreakpoint="${this.mobileBreakpoint}"
30061
30037
  part="calendar"
30062
30038
  >
30063
30039
  <slot name="ariaLabel.bib.close" slot="ariaLabel.close" @slotchange="${this.handleSlotToSlot}">Close</slot>
@@ -14025,15 +14025,6 @@ class AuroCalendar extends RangeDatepicker {
14025
14025
  type: Object
14026
14026
  },
14027
14027
 
14028
- /**
14029
- * Mobile breakpoint for responsive design.
14030
- * @private
14031
- */
14032
- mobileBreakpoint: {
14033
- type: Number,
14034
- reflect: false
14035
- },
14036
-
14037
14028
  /**
14038
14029
  * @private
14039
14030
  */
@@ -28807,21 +28798,11 @@ class AuroDatePicker extends AuroElement$1 {
28807
28798
  this.dropdown.addEventListener('auroDropdown-toggled', () => {
28808
28799
  this.notifyDatepickerToggled();
28809
28800
 
28810
- // This forces the calendar to render when the dropdown is opened.
28811
- // It is not rendered by default
28812
28801
  this.calendar.visible = this.dropdown.isPopoverVisible;
28813
28802
 
28814
- // If on mobile, and the calendar is opened, scroll the focus date into view if the flag is set
28815
- if (this.dropdown.isPopoverVisible && this.forceScrollOnNextMobileCalendarRender) {
28816
-
28817
- // Since the calendar is not rendered until the dropdown is opened,
28818
- // and the auroDropdown-toggled event fires before the popover is actually open,
28819
- // we need to wait until the next frame to ensure the calendar is fully rendered
28820
- // and the area we're trying to scroll to is present in the DOM.
28821
- setTimeout(() => {
28822
- this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28823
- this.forceScrollOnNextMobileCalendarRender = false;
28824
- }, 0);
28803
+ if (this.dropdown.getAttribute('data-show') && this.forceScrollOnNextMobileCalendarRender) {
28804
+ this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28805
+ this.forceScrollOnNextMobileCalendarRender = false;
28825
28806
  }
28826
28807
  });
28827
28808
  }
@@ -28980,13 +28961,10 @@ class AuroDatePicker extends AuroElement$1 {
28980
28961
  handleReadOnly() {
28981
28962
  // --ds-grid-breakpoint-sm
28982
28963
  const docStyle = getComputedStyle(document.documentElement);
28983
-
28984
- // We need to store this so that we can pass it to calendar
28985
- this.mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28986
- const isMobile = window.innerWidth < this.mobileBreakpoint;
28964
+ const mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28987
28965
 
28988
28966
  this.inputList.forEach((input) => {
28989
- if (isMobile) {
28967
+ if (window.innerWidth < mobileBreakpoint) {
28990
28968
  input.setAttribute('readonly', true);
28991
28969
  } else {
28992
28970
  input.removeAttribute('readonly');
@@ -29173,9 +29151,6 @@ class AuroDatePicker extends AuroElement$1 {
29173
29151
  if (!this.calendarFocusDate && this.util.validDateStr(this.value, this.format)) {
29174
29152
  if (!this.dropdown.isPopoverVisible) {
29175
29153
  this.calendarFocusDate = this.value;
29176
-
29177
- // Let the calendar know to scroll to the focus date when it is next rendered on mobile
29178
- this.forceScrollOnNextMobileCalendarRender = true;
29179
29154
  }
29180
29155
  }
29181
29156
 
@@ -29627,6 +29602,7 @@ class AuroDatePicker extends AuroElement$1 {
29627
29602
  `
29628
29603
  : undefined
29629
29604
  }
29605
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29630
29606
  <span slot="label"><slot name="fromLabel"></slot></span>
29631
29607
  </${this.inputTag}>
29632
29608
  </div>
@@ -29668,6 +29644,7 @@ class AuroDatePicker extends AuroElement$1 {
29668
29644
  `
29669
29645
  : undefined
29670
29646
  }
29647
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29671
29648
  <span slot="label"><slot name="toLabel"></slot></span>
29672
29649
  </${this.inputTag}>
29673
29650
  </div>
@@ -29798,7 +29775,6 @@ class AuroDatePicker extends AuroElement$1 {
29798
29775
  .maxDate="${this.maxDate}"
29799
29776
  .minDate="${this.minDate}"
29800
29777
  .monthNames="${this.monthNames}"
29801
- .mobileBreakpoint="${this.mobileBreakpoint}"
29802
29778
  part="calendar"
29803
29779
  >
29804
29780
  <slot name="ariaLabel.bib.close" slot="ariaLabel.close" @slotchange="${this.handleSlotToSlot}">Close</slot>
@@ -62,14 +62,6 @@ export class AuroCalendar extends RangeDatepicker {
62
62
  dropdown: {
63
63
  type: ObjectConstructor;
64
64
  };
65
- /**
66
- * Mobile breakpoint for responsive design.
67
- * @private
68
- */
69
- mobileBreakpoint: {
70
- type: NumberConstructor;
71
- reflect: boolean;
72
- };
73
65
  /**
74
66
  * @private
75
67
  */
@@ -541,7 +541,6 @@ export class AuroDatePicker extends AuroElement {
541
541
  * @returns {void}
542
542
  */
543
543
  private handleReadOnly;
544
- mobileBreakpoint: number;
545
544
  /**
546
545
  * Keep the datepicker in sync with the calendar's central date.
547
546
  * @private
@@ -13975,15 +13975,6 @@ class AuroCalendar extends RangeDatepicker {
13975
13975
  type: Object
13976
13976
  },
13977
13977
 
13978
- /**
13979
- * Mobile breakpoint for responsive design.
13980
- * @private
13981
- */
13982
- mobileBreakpoint: {
13983
- type: Number,
13984
- reflect: false
13985
- },
13986
-
13987
13978
  /**
13988
13979
  * @private
13989
13980
  */
@@ -28732,21 +28723,11 @@ class AuroDatePicker extends AuroElement$1 {
28732
28723
  this.dropdown.addEventListener('auroDropdown-toggled', () => {
28733
28724
  this.notifyDatepickerToggled();
28734
28725
 
28735
- // This forces the calendar to render when the dropdown is opened.
28736
- // It is not rendered by default
28737
28726
  this.calendar.visible = this.dropdown.isPopoverVisible;
28738
28727
 
28739
- // If on mobile, and the calendar is opened, scroll the focus date into view if the flag is set
28740
- if (this.dropdown.isPopoverVisible && this.forceScrollOnNextMobileCalendarRender) {
28741
-
28742
- // Since the calendar is not rendered until the dropdown is opened,
28743
- // and the auroDropdown-toggled event fires before the popover is actually open,
28744
- // we need to wait until the next frame to ensure the calendar is fully rendered
28745
- // and the area we're trying to scroll to is present in the DOM.
28746
- setTimeout(() => {
28747
- this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28748
- this.forceScrollOnNextMobileCalendarRender = false;
28749
- }, 0);
28728
+ if (this.dropdown.getAttribute('data-show') && this.forceScrollOnNextMobileCalendarRender) {
28729
+ this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28730
+ this.forceScrollOnNextMobileCalendarRender = false;
28750
28731
  }
28751
28732
  });
28752
28733
  }
@@ -28905,13 +28886,10 @@ class AuroDatePicker extends AuroElement$1 {
28905
28886
  handleReadOnly() {
28906
28887
  // --ds-grid-breakpoint-sm
28907
28888
  const docStyle = getComputedStyle(document.documentElement);
28908
-
28909
- // We need to store this so that we can pass it to calendar
28910
- this.mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28911
- const isMobile = window.innerWidth < this.mobileBreakpoint;
28889
+ const mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28912
28890
 
28913
28891
  this.inputList.forEach((input) => {
28914
- if (isMobile) {
28892
+ if (window.innerWidth < mobileBreakpoint) {
28915
28893
  input.setAttribute('readonly', true);
28916
28894
  } else {
28917
28895
  input.removeAttribute('readonly');
@@ -29098,9 +29076,6 @@ class AuroDatePicker extends AuroElement$1 {
29098
29076
  if (!this.calendarFocusDate && this.util.validDateStr(this.value, this.format)) {
29099
29077
  if (!this.dropdown.isPopoverVisible) {
29100
29078
  this.calendarFocusDate = this.value;
29101
-
29102
- // Let the calendar know to scroll to the focus date when it is next rendered on mobile
29103
- this.forceScrollOnNextMobileCalendarRender = true;
29104
29079
  }
29105
29080
  }
29106
29081
 
@@ -29552,6 +29527,7 @@ class AuroDatePicker extends AuroElement$1 {
29552
29527
  `
29553
29528
  : undefined
29554
29529
  }
29530
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29555
29531
  <span slot="label"><slot name="fromLabel"></slot></span>
29556
29532
  </${this.inputTag}>
29557
29533
  </div>
@@ -29593,6 +29569,7 @@ class AuroDatePicker extends AuroElement$1 {
29593
29569
  `
29594
29570
  : undefined
29595
29571
  }
29572
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29596
29573
  <span slot="label"><slot name="toLabel"></slot></span>
29597
29574
  </${this.inputTag}>
29598
29575
  </div>
@@ -29723,7 +29700,6 @@ class AuroDatePicker extends AuroElement$1 {
29723
29700
  .maxDate="${this.maxDate}"
29724
29701
  .minDate="${this.minDate}"
29725
29702
  .monthNames="${this.monthNames}"
29726
- .mobileBreakpoint="${this.mobileBreakpoint}"
29727
29703
  part="calendar"
29728
29704
  >
29729
29705
  <slot name="ariaLabel.bib.close" slot="ariaLabel.close" @slotchange="${this.handleSlotToSlot}">Close</slot>
@@ -13975,15 +13975,6 @@ class AuroCalendar extends RangeDatepicker {
13975
13975
  type: Object
13976
13976
  },
13977
13977
 
13978
- /**
13979
- * Mobile breakpoint for responsive design.
13980
- * @private
13981
- */
13982
- mobileBreakpoint: {
13983
- type: Number,
13984
- reflect: false
13985
- },
13986
-
13987
13978
  /**
13988
13979
  * @private
13989
13980
  */
@@ -28732,21 +28723,11 @@ class AuroDatePicker extends AuroElement$1 {
28732
28723
  this.dropdown.addEventListener('auroDropdown-toggled', () => {
28733
28724
  this.notifyDatepickerToggled();
28734
28725
 
28735
- // This forces the calendar to render when the dropdown is opened.
28736
- // It is not rendered by default
28737
28726
  this.calendar.visible = this.dropdown.isPopoverVisible;
28738
28727
 
28739
- // If on mobile, and the calendar is opened, scroll the focus date into view if the flag is set
28740
- if (this.dropdown.isPopoverVisible && this.forceScrollOnNextMobileCalendarRender) {
28741
-
28742
- // Since the calendar is not rendered until the dropdown is opened,
28743
- // and the auroDropdown-toggled event fires before the popover is actually open,
28744
- // we need to wait until the next frame to ensure the calendar is fully rendered
28745
- // and the area we're trying to scroll to is present in the DOM.
28746
- setTimeout(() => {
28747
- this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28748
- this.forceScrollOnNextMobileCalendarRender = false;
28749
- }, 0);
28728
+ if (this.dropdown.getAttribute('data-show') && this.forceScrollOnNextMobileCalendarRender) {
28729
+ this.calendar.scrollMonthIntoView(this.formattedFocusDate);
28730
+ this.forceScrollOnNextMobileCalendarRender = false;
28750
28731
  }
28751
28732
  });
28752
28733
  }
@@ -28905,13 +28886,10 @@ class AuroDatePicker extends AuroElement$1 {
28905
28886
  handleReadOnly() {
28906
28887
  // --ds-grid-breakpoint-sm
28907
28888
  const docStyle = getComputedStyle(document.documentElement);
28908
-
28909
- // We need to store this so that we can pass it to calendar
28910
- this.mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28911
- const isMobile = window.innerWidth < this.mobileBreakpoint;
28889
+ const mobileBreakpoint = Number(docStyle.getPropertyValue('--ds-grid-breakpoint-sm').replace("px", ""));
28912
28890
 
28913
28891
  this.inputList.forEach((input) => {
28914
- if (isMobile) {
28892
+ if (window.innerWidth < mobileBreakpoint) {
28915
28893
  input.setAttribute('readonly', true);
28916
28894
  } else {
28917
28895
  input.removeAttribute('readonly');
@@ -29098,9 +29076,6 @@ class AuroDatePicker extends AuroElement$1 {
29098
29076
  if (!this.calendarFocusDate && this.util.validDateStr(this.value, this.format)) {
29099
29077
  if (!this.dropdown.isPopoverVisible) {
29100
29078
  this.calendarFocusDate = this.value;
29101
-
29102
- // Let the calendar know to scroll to the focus date when it is next rendered on mobile
29103
- this.forceScrollOnNextMobileCalendarRender = true;
29104
29079
  }
29105
29080
  }
29106
29081
 
@@ -29552,6 +29527,7 @@ class AuroDatePicker extends AuroElement$1 {
29552
29527
  `
29553
29528
  : undefined
29554
29529
  }
29530
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29555
29531
  <span slot="label"><slot name="fromLabel"></slot></span>
29556
29532
  </${this.inputTag}>
29557
29533
  </div>
@@ -29593,6 +29569,7 @@ class AuroDatePicker extends AuroElement$1 {
29593
29569
  `
29594
29570
  : undefined
29595
29571
  }
29572
+ <span slot="ariaLabel.clear">${i18n(this.lang, 'clearInput')}</span>
29596
29573
  <span slot="label"><slot name="toLabel"></slot></span>
29597
29574
  </${this.inputTag}>
29598
29575
  </div>
@@ -29723,7 +29700,6 @@ class AuroDatePicker extends AuroElement$1 {
29723
29700
  .maxDate="${this.maxDate}"
29724
29701
  .minDate="${this.minDate}"
29725
29702
  .monthNames="${this.monthNames}"
29726
- .mobileBreakpoint="${this.mobileBreakpoint}"
29727
29703
  part="calendar"
29728
29704
  >
29729
29705
  <slot name="ariaLabel.bib.close" slot="ariaLabel.close" @slotchange="${this.handleSlotToSlot}">Close</slot>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr1160.0",
3
+ "version": "0.0.0-pr1166.0",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {