@aurodesignsystem-dev/auro-formkit 0.0.0-pr1411.0 → 0.0.0-pr1411.2

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 (39) hide show
  1. package/components/checkbox/demo/api.min.js +1 -1
  2. package/components/checkbox/demo/index.min.js +1 -1
  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 +27 -7
  6. package/components/combobox/demo/index.min.js +27 -7
  7. package/components/combobox/dist/index.js +27 -7
  8. package/components/combobox/dist/registered.js +27 -7
  9. package/components/counter/demo/api.min.js +26 -6
  10. package/components/counter/demo/index.min.js +26 -6
  11. package/components/counter/dist/index.js +26 -6
  12. package/components/counter/dist/registered.js +26 -6
  13. package/components/datepicker/demo/api.min.js +27 -7
  14. package/components/datepicker/demo/index.min.js +27 -7
  15. package/components/datepicker/dist/index.js +27 -7
  16. package/components/datepicker/dist/registered.js +27 -7
  17. package/components/dropdown/demo/api.md +29 -28
  18. package/components/dropdown/demo/api.min.js +25 -5
  19. package/components/dropdown/demo/index.min.js +25 -5
  20. package/components/dropdown/dist/auro-dropdown.d.ts +8 -0
  21. package/components/dropdown/dist/index.js +25 -5
  22. package/components/dropdown/dist/registered.js +25 -5
  23. package/components/form/demo/api.min.js +159 -54
  24. package/components/form/demo/index.min.js +159 -54
  25. package/components/input/demo/api.min.js +1 -1
  26. package/components/input/demo/index.min.js +1 -1
  27. package/components/input/dist/index.js +1 -1
  28. package/components/input/dist/registered.js +1 -1
  29. package/components/radio/demo/api.min.js +1 -1
  30. package/components/radio/demo/index.min.js +1 -1
  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 +76 -31
  34. package/components/select/demo/index.min.js +76 -31
  35. package/components/select/dist/index.js +76 -31
  36. package/components/select/dist/registered.js +76 -31
  37. package/components/select/dist/selectKeyboardStrategy.d.ts +4 -3
  38. package/custom-elements.json +20 -1
  39. package/package.json +5 -5
@@ -1795,6 +1795,11 @@ class AuroFloatingUI {
1795
1795
  this.clickHandler = null;
1796
1796
  this.keyDownHandler = null;
1797
1797
 
1798
+ /**
1799
+ * @private
1800
+ */
1801
+ this.enableKeyboardHandling = true;
1802
+
1798
1803
  /**
1799
1804
  * @private
1800
1805
  */
@@ -2129,7 +2134,9 @@ class AuroFloatingUI {
2129
2134
  document.addEventListener("focusin", this.focusHandler);
2130
2135
  }
2131
2136
 
2132
- document.addEventListener("keydown", this.keyDownHandler);
2137
+ if (this.enableKeyboardHandling) {
2138
+ document.addEventListener("keydown", this.keyDownHandler);
2139
+ }
2133
2140
 
2134
2141
  // send this task to the end of queue to prevent conflicting
2135
2142
  // it conflicts if showBib gets call from a button that's not this.element.trigger
@@ -2385,8 +2392,9 @@ class AuroFloatingUI {
2385
2392
  this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
2386
2393
  }
2387
2394
 
2388
- configure(elem, eventPrefix) {
2395
+ configure(elem, eventPrefix, enableKeyboardHandling = true) {
2389
2396
  AuroFloatingUI.setupMousePressChecker();
2397
+ this.enableKeyboardHandling = enableKeyboardHandling;
2390
2398
 
2391
2399
  this.eventPrefix = eventPrefix;
2392
2400
  if (this.element !== elem) {
@@ -2419,7 +2427,9 @@ class AuroFloatingUI {
2419
2427
 
2420
2428
  this.handleEvent = this.handleEvent.bind(this);
2421
2429
  if (this.element.trigger) {
2422
- this.element.trigger.addEventListener("keydown", this.handleEvent);
2430
+ if (this.enableKeyboardHandling) {
2431
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
2432
+ }
2423
2433
  this.element.trigger.addEventListener("click", this.handleEvent);
2424
2434
  this.element.trigger.addEventListener("mouseenter", this.handleEvent);
2425
2435
  this.element.trigger.addEventListener("mouseleave", this.handleEvent);
@@ -3573,7 +3583,7 @@ class AuroHelpText extends LitElement {
3573
3583
  }
3574
3584
  }
3575
3585
 
3576
- var formkitVersion = '202604021512';
3586
+ var formkitVersion = '202604021752';
3577
3587
 
3578
3588
  class AuroElement extends LitElement {
3579
3589
  static get properties() {
@@ -3754,6 +3764,7 @@ class AuroDropdown extends AuroElement {
3754
3764
  this.appearance = 'default';
3755
3765
  this.chevron = false;
3756
3766
  this.disabled = false;
3767
+ this.disableKeyboardHandling = false;
3757
3768
  this.error = false;
3758
3769
  this.tabIndex = 0;
3759
3770
  this.noToggle = false;
@@ -3965,6 +3976,14 @@ class AuroDropdown extends AuroElement {
3965
3976
  reflect: true
3966
3977
  },
3967
3978
 
3979
+ /**
3980
+ * If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
3981
+ */
3982
+ disableKeyboardHandling: {
3983
+ type: Boolean,
3984
+ reflect: true
3985
+ },
3986
+
3968
3987
  /**
3969
3988
  * @private
3970
3989
  */
@@ -4270,7 +4289,7 @@ class AuroDropdown extends AuroElement {
4270
4289
 
4271
4290
  firstUpdated() {
4272
4291
  // Configure the floater to, this will generate the ID for the bib
4273
- this.floater.configure(this, 'auroDropdown');
4292
+ this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
4274
4293
 
4275
4294
  // Prevent `contain: layout` on the dropdown host. Layout containment
4276
4295
  // creates a containing block for position:fixed descendants (the bib),
@@ -4578,6 +4597,7 @@ class AuroDropdown extends AuroElement {
4578
4597
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4579
4598
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
4580
4599
  aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
4600
+ aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
4581
4601
  @focusin="${this.handleFocusin}"
4582
4602
  @blur="${this.handleFocusOut}">
4583
4603
  <div class="triggerContentWrapper" id="triggerLabel">
@@ -1795,6 +1795,11 @@ class AuroFloatingUI {
1795
1795
  this.clickHandler = null;
1796
1796
  this.keyDownHandler = null;
1797
1797
 
1798
+ /**
1799
+ * @private
1800
+ */
1801
+ this.enableKeyboardHandling = true;
1802
+
1798
1803
  /**
1799
1804
  * @private
1800
1805
  */
@@ -2129,7 +2134,9 @@ class AuroFloatingUI {
2129
2134
  document.addEventListener("focusin", this.focusHandler);
2130
2135
  }
2131
2136
 
2132
- document.addEventListener("keydown", this.keyDownHandler);
2137
+ if (this.enableKeyboardHandling) {
2138
+ document.addEventListener("keydown", this.keyDownHandler);
2139
+ }
2133
2140
 
2134
2141
  // send this task to the end of queue to prevent conflicting
2135
2142
  // it conflicts if showBib gets call from a button that's not this.element.trigger
@@ -2385,8 +2392,9 @@ class AuroFloatingUI {
2385
2392
  this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
2386
2393
  }
2387
2394
 
2388
- configure(elem, eventPrefix) {
2395
+ configure(elem, eventPrefix, enableKeyboardHandling = true) {
2389
2396
  AuroFloatingUI.setupMousePressChecker();
2397
+ this.enableKeyboardHandling = enableKeyboardHandling;
2390
2398
 
2391
2399
  this.eventPrefix = eventPrefix;
2392
2400
  if (this.element !== elem) {
@@ -2419,7 +2427,9 @@ class AuroFloatingUI {
2419
2427
 
2420
2428
  this.handleEvent = this.handleEvent.bind(this);
2421
2429
  if (this.element.trigger) {
2422
- this.element.trigger.addEventListener("keydown", this.handleEvent);
2430
+ if (this.enableKeyboardHandling) {
2431
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
2432
+ }
2423
2433
  this.element.trigger.addEventListener("click", this.handleEvent);
2424
2434
  this.element.trigger.addEventListener("mouseenter", this.handleEvent);
2425
2435
  this.element.trigger.addEventListener("mouseleave", this.handleEvent);
@@ -3573,7 +3583,7 @@ class AuroHelpText extends LitElement {
3573
3583
  }
3574
3584
  }
3575
3585
 
3576
- var formkitVersion = '202604021512';
3586
+ var formkitVersion = '202604021752';
3577
3587
 
3578
3588
  class AuroElement extends LitElement {
3579
3589
  static get properties() {
@@ -3754,6 +3764,7 @@ class AuroDropdown extends AuroElement {
3754
3764
  this.appearance = 'default';
3755
3765
  this.chevron = false;
3756
3766
  this.disabled = false;
3767
+ this.disableKeyboardHandling = false;
3757
3768
  this.error = false;
3758
3769
  this.tabIndex = 0;
3759
3770
  this.noToggle = false;
@@ -3965,6 +3976,14 @@ class AuroDropdown extends AuroElement {
3965
3976
  reflect: true
3966
3977
  },
3967
3978
 
3979
+ /**
3980
+ * If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior.
3981
+ */
3982
+ disableKeyboardHandling: {
3983
+ type: Boolean,
3984
+ reflect: true
3985
+ },
3986
+
3968
3987
  /**
3969
3988
  * @private
3970
3989
  */
@@ -4270,7 +4289,7 @@ class AuroDropdown extends AuroElement {
4270
4289
 
4271
4290
  firstUpdated() {
4272
4291
  // Configure the floater to, this will generate the ID for the bib
4273
- this.floater.configure(this, 'auroDropdown');
4292
+ this.floater.configure(this, 'auroDropdown', !this.disableKeyboardHandling);
4274
4293
 
4275
4294
  // Prevent `contain: layout` on the dropdown host. Layout containment
4276
4295
  // creates a containing block for position:fixed descendants (the bib),
@@ -4578,6 +4597,7 @@ class AuroDropdown extends AuroElement {
4578
4597
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4579
4598
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
4580
4599
  aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
4600
+ aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
4581
4601
  @focusin="${this.handleFocusin}"
4582
4602
  @blur="${this.handleFocusOut}">
4583
4603
  <div class="triggerContentWrapper" id="triggerLabel">