@aurodesignsystem-dev/auro-formkit 0.0.0-pr783.1 → 0.0.0-pr785.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.
Files changed (64) hide show
  1. package/components/checkbox/demo/api.html +10 -16
  2. package/components/checkbox/demo/api.min.js +2 -2
  3. package/components/checkbox/demo/index.html +10 -16
  4. package/components/checkbox/demo/index.min.js +2 -2
  5. package/components/checkbox/demo/readme.html +9 -16
  6. package/components/checkbox/dist/index.js +2 -2
  7. package/components/checkbox/dist/registered.js +2 -2
  8. package/components/combobox/demo/api.html +10 -16
  9. package/components/combobox/demo/api.min.js +15 -32
  10. package/components/combobox/demo/index.html +10 -16
  11. package/components/combobox/demo/index.min.js +15 -32
  12. package/components/combobox/demo/readme.html +9 -16
  13. package/components/combobox/dist/index.js +15 -32
  14. package/components/combobox/dist/registered.js +15 -32
  15. package/components/counter/demo/api.html +10 -16
  16. package/components/counter/demo/api.min.js +13 -31
  17. package/components/counter/demo/index.html +10 -16
  18. package/components/counter/demo/index.min.js +13 -31
  19. package/components/counter/demo/readme.html +9 -16
  20. package/components/counter/dist/index.js +13 -31
  21. package/components/counter/dist/registered.js +13 -31
  22. package/components/datepicker/demo/api.html +10 -16
  23. package/components/datepicker/demo/api.md +1 -0
  24. package/components/datepicker/demo/api.min.js +16 -44
  25. package/components/datepicker/demo/index.html +10 -16
  26. package/components/datepicker/demo/index.min.js +16 -44
  27. package/components/datepicker/demo/readme.html +9 -16
  28. package/components/datepicker/dist/auro-datepicker.d.ts +2 -3
  29. package/components/datepicker/dist/index.js +16 -44
  30. package/components/datepicker/dist/registered.js +16 -44
  31. package/components/dropdown/demo/api.html +10 -16
  32. package/components/dropdown/demo/api.min.js +13 -30
  33. package/components/dropdown/demo/index.html +10 -16
  34. package/components/dropdown/demo/index.min.js +13 -30
  35. package/components/dropdown/demo/readme.html +9 -16
  36. package/components/dropdown/dist/auro-dropdown.d.ts +0 -6
  37. package/components/dropdown/dist/index.js +13 -30
  38. package/components/dropdown/dist/registered.js +13 -30
  39. package/components/form/demo/api.html +9 -16
  40. package/components/form/demo/autocomplete.html +3 -19
  41. package/components/form/demo/index.html +9 -16
  42. package/components/form/demo/readme.html +9 -16
  43. package/components/form/demo/working.html +13 -19
  44. package/components/input/demo/api.html +10 -16
  45. package/components/input/demo/api.min.js +2 -2
  46. package/components/input/demo/index.html +10 -16
  47. package/components/input/demo/index.min.js +2 -2
  48. package/components/input/demo/readme.html +9 -16
  49. package/components/input/dist/index.js +2 -2
  50. package/components/input/dist/registered.js +2 -2
  51. package/components/menu/demo/api.html +32 -16
  52. package/components/menu/demo/index.html +10 -16
  53. package/components/menu/demo/readme.html +9 -16
  54. package/components/radio/demo/api.html +10 -16
  55. package/components/radio/demo/index.html +10 -16
  56. package/components/radio/demo/readme.html +9 -16
  57. package/components/select/demo/api.html +10 -16
  58. package/components/select/demo/api.min.js +13 -30
  59. package/components/select/demo/index.html +11 -16
  60. package/components/select/demo/index.min.js +13 -30
  61. package/components/select/demo/readme.html +9 -16
  62. package/components/select/dist/index.js +13 -30
  63. package/components/select/dist/registered.js +13 -30
  64. package/package.json +3 -4
@@ -2864,7 +2864,7 @@ class AuroFloatingUI {
2864
2864
  return;
2865
2865
  }
2866
2866
 
2867
- this.hideBib("keydown");
2867
+ this.hideBib();
2868
2868
  }
2869
2869
 
2870
2870
  setupHideHandlers() {
@@ -2889,7 +2889,7 @@ class AuroFloatingUI {
2889
2889
  document.expandedAuroFormkitDropdown = null;
2890
2890
  document.expandedAuroFloater = this;
2891
2891
  } else {
2892
- this.hideBib("click");
2892
+ this.hideBib();
2893
2893
  }
2894
2894
  }
2895
2895
  };
@@ -2902,7 +2902,7 @@ class AuroFloatingUI {
2902
2902
  // if something else is open, let it handle itself
2903
2903
  return;
2904
2904
  }
2905
- this.hideBib("keydown");
2905
+ this.hideBib();
2906
2906
  }
2907
2907
  };
2908
2908
 
@@ -2985,11 +2985,7 @@ class AuroFloatingUI {
2985
2985
  }
2986
2986
  }
2987
2987
 
2988
- /**
2989
- * Hides the floating UI element.
2990
- * @param {String} eventType - The event type that triggered the hiding action.
2991
- */
2992
- hideBib(eventType = "unknown") {
2988
+ hideBib() {
2993
2989
  if (!this.element.disabled && !this.element.noToggle) {
2994
2990
  this.lockScroll(false);
2995
2991
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -3000,7 +2996,7 @@ class AuroFloatingUI {
3000
2996
  if (this.showing) {
3001
2997
  this.cleanupHideHandlers();
3002
2998
  this.showing = false;
3003
- this.dispatchEventDropdownToggle(eventType);
2999
+ this.dispatchEventDropdownToggle();
3004
3000
  }
3005
3001
  }
3006
3002
  document.expandedAuroFloater = null;
@@ -3009,13 +3005,11 @@ class AuroFloatingUI {
3009
3005
  /**
3010
3006
  * @private
3011
3007
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
3012
- * @param {String} eventType - The event type that triggered the toggle action.
3013
3008
  */
3014
- dispatchEventDropdownToggle(eventType) {
3009
+ dispatchEventDropdownToggle() {
3015
3010
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
3016
3011
  detail: {
3017
3012
  expanded: this.showing,
3018
- eventType: eventType || "unknown",
3019
3013
  },
3020
3014
  composed: true
3021
3015
  });
@@ -3025,7 +3019,7 @@ class AuroFloatingUI {
3025
3019
 
3026
3020
  handleClick() {
3027
3021
  if (this.element.isPopoverVisible) {
3028
- this.hideBib("click");
3022
+ this.hideBib();
3029
3023
  } else {
3030
3024
  this.showBib();
3031
3025
  }
@@ -3061,7 +3055,7 @@ class AuroFloatingUI {
3061
3055
  break;
3062
3056
  case 'mouseleave':
3063
3057
  if (this.element.hoverToggle) {
3064
- this.hideBib("mouseleave");
3058
+ this.hideBib();
3065
3059
  }
3066
3060
  break;
3067
3061
  case 'focus':
@@ -4449,9 +4443,6 @@ class AuroDropdown extends AuroElement$4 {
4449
4443
 
4450
4444
  this.parentBorder = false;
4451
4445
 
4452
- /** @private */
4453
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4454
-
4455
4446
  this.privateDefaults();
4456
4447
  }
4457
4448
 
@@ -4885,19 +4876,12 @@ class AuroDropdown extends AuroElement$4 {
4885
4876
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4886
4877
  this.handleTriggerContentSlotChange();
4887
4878
  }
4888
- }
4889
4879
 
4890
- /**
4891
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4892
- * @private
4893
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4894
- */
4895
- handleDropdownToggle(event) {
4896
- this.updateFocusTrap();
4897
- this.isPopoverVisible = event.detail.expanded;
4898
- const eventType = event.detail.eventType || "unknown";
4899
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4900
- this.trigger.focus();
4880
+ if (changedProperties.has('isPopoverVisible')) {
4881
+ this.updateFocusTrap();
4882
+ if (!this.isPopoverVisible && this.hasFocus) {
4883
+ this.trigger.focus();
4884
+ }
4901
4885
  }
4902
4886
  }
4903
4887
 
@@ -4905,7 +4889,6 @@ class AuroDropdown extends AuroElement$4 {
4905
4889
 
4906
4890
  // Configure the floater to, this will generate the ID for the bib
4907
4891
  this.floater.configure(this, 'auroDropdown');
4908
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4909
4892
 
4910
4893
  /**
4911
4894
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -10895,9 +10878,9 @@ class BaseInput extends AuroElement$2$1 {
10895
10878
  if (!this.shadowRoot.contains(this.getActiveElement())) {
10896
10879
  this.validation.validate(this);
10897
10880
  }
10898
- }
10899
10881
 
10900
- this.notifyValueChanged();
10882
+ this.notifyValueChanged();
10883
+ }
10901
10884
  }
10902
10885
 
10903
10886
  if (changedProperties.has('error')) {
@@ -16,24 +16,17 @@
16
16
  <head>
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
- <title>Auro Web Component Demo | auro-combobox</title>
20
-
21
- <!-- Prism.js Stylesheet -->
22
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
-
24
- <!-- Legacy reference is still needed to support auro-combobox's use of legacy token values at this time -->
25
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
-
27
- <!-- Design Token Alaska Theme -->
28
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
-
30
- <!-- Webcore Stylesheet Alaska Theme -->
31
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
-
33
- <!-- Demo Specific Styles -->
19
+ <title>Auro Web Component Generator | auro-combobox custom element</title>
20
+ <link
21
+ rel="stylesheet"
22
+ type="text/css"
23
+ href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
+ />
25
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
26
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
34
27
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
28
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
- </head>
29
+ </head>
37
30
  <body class="auro-markdown">
38
31
  <main></main>
39
32
 
@@ -2795,7 +2795,7 @@ class AuroFloatingUI {
2795
2795
  return;
2796
2796
  }
2797
2797
 
2798
- this.hideBib("keydown");
2798
+ this.hideBib();
2799
2799
  }
2800
2800
 
2801
2801
  setupHideHandlers() {
@@ -2820,7 +2820,7 @@ class AuroFloatingUI {
2820
2820
  document.expandedAuroFormkitDropdown = null;
2821
2821
  document.expandedAuroFloater = this;
2822
2822
  } else {
2823
- this.hideBib("click");
2823
+ this.hideBib();
2824
2824
  }
2825
2825
  }
2826
2826
  };
@@ -2833,7 +2833,7 @@ class AuroFloatingUI {
2833
2833
  // if something else is open, let it handle itself
2834
2834
  return;
2835
2835
  }
2836
- this.hideBib("keydown");
2836
+ this.hideBib();
2837
2837
  }
2838
2838
  };
2839
2839
 
@@ -2916,11 +2916,7 @@ class AuroFloatingUI {
2916
2916
  }
2917
2917
  }
2918
2918
 
2919
- /**
2920
- * Hides the floating UI element.
2921
- * @param {String} eventType - The event type that triggered the hiding action.
2922
- */
2923
- hideBib(eventType = "unknown") {
2919
+ hideBib() {
2924
2920
  if (!this.element.disabled && !this.element.noToggle) {
2925
2921
  this.lockScroll(false);
2926
2922
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2931,7 +2927,7 @@ class AuroFloatingUI {
2931
2927
  if (this.showing) {
2932
2928
  this.cleanupHideHandlers();
2933
2929
  this.showing = false;
2934
- this.dispatchEventDropdownToggle(eventType);
2930
+ this.dispatchEventDropdownToggle();
2935
2931
  }
2936
2932
  }
2937
2933
  document.expandedAuroFloater = null;
@@ -2940,13 +2936,11 @@ class AuroFloatingUI {
2940
2936
  /**
2941
2937
  * @private
2942
2938
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2943
- * @param {String} eventType - The event type that triggered the toggle action.
2944
2939
  */
2945
- dispatchEventDropdownToggle(eventType) {
2940
+ dispatchEventDropdownToggle() {
2946
2941
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2947
2942
  detail: {
2948
2943
  expanded: this.showing,
2949
- eventType: eventType || "unknown",
2950
2944
  },
2951
2945
  composed: true
2952
2946
  });
@@ -2956,7 +2950,7 @@ class AuroFloatingUI {
2956
2950
 
2957
2951
  handleClick() {
2958
2952
  if (this.element.isPopoverVisible) {
2959
- this.hideBib("click");
2953
+ this.hideBib();
2960
2954
  } else {
2961
2955
  this.showBib();
2962
2956
  }
@@ -2992,7 +2986,7 @@ class AuroFloatingUI {
2992
2986
  break;
2993
2987
  case 'mouseleave':
2994
2988
  if (this.element.hoverToggle) {
2995
- this.hideBib("mouseleave");
2989
+ this.hideBib();
2996
2990
  }
2997
2991
  break;
2998
2992
  case 'focus':
@@ -4380,9 +4374,6 @@ class AuroDropdown extends AuroElement$4 {
4380
4374
 
4381
4375
  this.parentBorder = false;
4382
4376
 
4383
- /** @private */
4384
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4385
-
4386
4377
  this.privateDefaults();
4387
4378
  }
4388
4379
 
@@ -4816,19 +4807,12 @@ class AuroDropdown extends AuroElement$4 {
4816
4807
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4817
4808
  this.handleTriggerContentSlotChange();
4818
4809
  }
4819
- }
4820
4810
 
4821
- /**
4822
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4823
- * @private
4824
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4825
- */
4826
- handleDropdownToggle(event) {
4827
- this.updateFocusTrap();
4828
- this.isPopoverVisible = event.detail.expanded;
4829
- const eventType = event.detail.eventType || "unknown";
4830
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4831
- this.trigger.focus();
4811
+ if (changedProperties.has('isPopoverVisible')) {
4812
+ this.updateFocusTrap();
4813
+ if (!this.isPopoverVisible && this.hasFocus) {
4814
+ this.trigger.focus();
4815
+ }
4832
4816
  }
4833
4817
  }
4834
4818
 
@@ -4836,7 +4820,6 @@ class AuroDropdown extends AuroElement$4 {
4836
4820
 
4837
4821
  // Configure the floater to, this will generate the ID for the bib
4838
4822
  this.floater.configure(this, 'auroDropdown');
4839
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4840
4823
 
4841
4824
  /**
4842
4825
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -10813,9 +10796,9 @@ class BaseInput extends AuroElement$2$1 {
10813
10796
  if (!this.shadowRoot.contains(this.getActiveElement())) {
10814
10797
  this.validation.validate(this);
10815
10798
  }
10816
- }
10817
10799
 
10818
- this.notifyValueChanged();
10800
+ this.notifyValueChanged();
10801
+ }
10819
10802
  }
10820
10803
 
10821
10804
  if (changedProperties.has('error')) {
@@ -2795,7 +2795,7 @@ class AuroFloatingUI {
2795
2795
  return;
2796
2796
  }
2797
2797
 
2798
- this.hideBib("keydown");
2798
+ this.hideBib();
2799
2799
  }
2800
2800
 
2801
2801
  setupHideHandlers() {
@@ -2820,7 +2820,7 @@ class AuroFloatingUI {
2820
2820
  document.expandedAuroFormkitDropdown = null;
2821
2821
  document.expandedAuroFloater = this;
2822
2822
  } else {
2823
- this.hideBib("click");
2823
+ this.hideBib();
2824
2824
  }
2825
2825
  }
2826
2826
  };
@@ -2833,7 +2833,7 @@ class AuroFloatingUI {
2833
2833
  // if something else is open, let it handle itself
2834
2834
  return;
2835
2835
  }
2836
- this.hideBib("keydown");
2836
+ this.hideBib();
2837
2837
  }
2838
2838
  };
2839
2839
 
@@ -2916,11 +2916,7 @@ class AuroFloatingUI {
2916
2916
  }
2917
2917
  }
2918
2918
 
2919
- /**
2920
- * Hides the floating UI element.
2921
- * @param {String} eventType - The event type that triggered the hiding action.
2922
- */
2923
- hideBib(eventType = "unknown") {
2919
+ hideBib() {
2924
2920
  if (!this.element.disabled && !this.element.noToggle) {
2925
2921
  this.lockScroll(false);
2926
2922
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2931,7 +2927,7 @@ class AuroFloatingUI {
2931
2927
  if (this.showing) {
2932
2928
  this.cleanupHideHandlers();
2933
2929
  this.showing = false;
2934
- this.dispatchEventDropdownToggle(eventType);
2930
+ this.dispatchEventDropdownToggle();
2935
2931
  }
2936
2932
  }
2937
2933
  document.expandedAuroFloater = null;
@@ -2940,13 +2936,11 @@ class AuroFloatingUI {
2940
2936
  /**
2941
2937
  * @private
2942
2938
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2943
- * @param {String} eventType - The event type that triggered the toggle action.
2944
2939
  */
2945
- dispatchEventDropdownToggle(eventType) {
2940
+ dispatchEventDropdownToggle() {
2946
2941
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2947
2942
  detail: {
2948
2943
  expanded: this.showing,
2949
- eventType: eventType || "unknown",
2950
2944
  },
2951
2945
  composed: true
2952
2946
  });
@@ -2956,7 +2950,7 @@ class AuroFloatingUI {
2956
2950
 
2957
2951
  handleClick() {
2958
2952
  if (this.element.isPopoverVisible) {
2959
- this.hideBib("click");
2953
+ this.hideBib();
2960
2954
  } else {
2961
2955
  this.showBib();
2962
2956
  }
@@ -2992,7 +2986,7 @@ class AuroFloatingUI {
2992
2986
  break;
2993
2987
  case 'mouseleave':
2994
2988
  if (this.element.hoverToggle) {
2995
- this.hideBib("mouseleave");
2989
+ this.hideBib();
2996
2990
  }
2997
2991
  break;
2998
2992
  case 'focus':
@@ -4380,9 +4374,6 @@ class AuroDropdown extends AuroElement$4 {
4380
4374
 
4381
4375
  this.parentBorder = false;
4382
4376
 
4383
- /** @private */
4384
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4385
-
4386
4377
  this.privateDefaults();
4387
4378
  }
4388
4379
 
@@ -4816,19 +4807,12 @@ class AuroDropdown extends AuroElement$4 {
4816
4807
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4817
4808
  this.handleTriggerContentSlotChange();
4818
4809
  }
4819
- }
4820
4810
 
4821
- /**
4822
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
4823
- * @private
4824
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
4825
- */
4826
- handleDropdownToggle(event) {
4827
- this.updateFocusTrap();
4828
- this.isPopoverVisible = event.detail.expanded;
4829
- const eventType = event.detail.eventType || "unknown";
4830
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
4831
- this.trigger.focus();
4811
+ if (changedProperties.has('isPopoverVisible')) {
4812
+ this.updateFocusTrap();
4813
+ if (!this.isPopoverVisible && this.hasFocus) {
4814
+ this.trigger.focus();
4815
+ }
4832
4816
  }
4833
4817
  }
4834
4818
 
@@ -4836,7 +4820,6 @@ class AuroDropdown extends AuroElement$4 {
4836
4820
 
4837
4821
  // Configure the floater to, this will generate the ID for the bib
4838
4822
  this.floater.configure(this, 'auroDropdown');
4839
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
4840
4823
 
4841
4824
  /**
4842
4825
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -10813,9 +10796,9 @@ class BaseInput extends AuroElement$2$1 {
10813
10796
  if (!this.shadowRoot.contains(this.getActiveElement())) {
10814
10797
  this.validation.validate(this);
10815
10798
  }
10816
- }
10817
10799
 
10818
- this.notifyValueChanged();
10800
+ this.notifyValueChanged();
10801
+ }
10819
10802
  }
10820
10803
 
10821
10804
  if (changedProperties.has('error')) {
@@ -16,24 +16,18 @@
16
16
  <head>
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
- <title>Auro Web Component Demo | auro-counter</title>
20
-
21
- <!-- Prism.js Stylesheet -->
22
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
-
24
- <!-- Legacy reference is still needed to support auro-counter's use of legacy token values at this time -->
25
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
-
27
- <!-- Design Token Alaska Theme -->
28
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
-
30
- <!-- Webcore Stylesheet Alaska Theme -->
31
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
-
33
- <!-- Demo Specific Styles -->
19
+ <title>Auro Web Component Generator | auro-counter custom element</title>
20
+ <link
21
+ rel="stylesheet"
22
+ type="text/css"
23
+ href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
+ />
25
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
26
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
34
27
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
28
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
- </head>
29
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/essentials-as.css" />
30
+ </head>
37
31
  <body class="auro-markdown">
38
32
  <main></main>
39
33
 
@@ -3020,7 +3020,6 @@ class AuroCounter extends i$2 {
3020
3020
  aria-describedby="counter-description"
3021
3021
  tabindex="${this.disabled ? '-1' : '0'}"
3022
3022
  role="spinbutton"
3023
- aria-disabled="${this.disabled ? 'true' : 'false'}"
3024
3023
  aria-valuemin="${this.min}"
3025
3024
  aria-valuemax="${this.max}"
3026
3025
  aria-valuenow="${this.value}"
@@ -4967,7 +4966,7 @@ class AuroFloatingUI {
4967
4966
  return;
4968
4967
  }
4969
4968
 
4970
- this.hideBib("keydown");
4969
+ this.hideBib();
4971
4970
  }
4972
4971
 
4973
4972
  setupHideHandlers() {
@@ -4992,7 +4991,7 @@ class AuroFloatingUI {
4992
4991
  document.expandedAuroFormkitDropdown = null;
4993
4992
  document.expandedAuroFloater = this;
4994
4993
  } else {
4995
- this.hideBib("click");
4994
+ this.hideBib();
4996
4995
  }
4997
4996
  }
4998
4997
  };
@@ -5005,7 +5004,7 @@ class AuroFloatingUI {
5005
5004
  // if something else is open, let it handle itself
5006
5005
  return;
5007
5006
  }
5008
- this.hideBib("keydown");
5007
+ this.hideBib();
5009
5008
  }
5010
5009
  };
5011
5010
 
@@ -5088,11 +5087,7 @@ class AuroFloatingUI {
5088
5087
  }
5089
5088
  }
5090
5089
 
5091
- /**
5092
- * Hides the floating UI element.
5093
- * @param {String} eventType - The event type that triggered the hiding action.
5094
- */
5095
- hideBib(eventType = "unknown") {
5090
+ hideBib() {
5096
5091
  if (!this.element.disabled && !this.element.noToggle) {
5097
5092
  this.lockScroll(false);
5098
5093
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -5103,7 +5098,7 @@ class AuroFloatingUI {
5103
5098
  if (this.showing) {
5104
5099
  this.cleanupHideHandlers();
5105
5100
  this.showing = false;
5106
- this.dispatchEventDropdownToggle(eventType);
5101
+ this.dispatchEventDropdownToggle();
5107
5102
  }
5108
5103
  }
5109
5104
  document.expandedAuroFloater = null;
@@ -5112,13 +5107,11 @@ class AuroFloatingUI {
5112
5107
  /**
5113
5108
  * @private
5114
5109
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
5115
- * @param {String} eventType - The event type that triggered the toggle action.
5116
5110
  */
5117
- dispatchEventDropdownToggle(eventType) {
5111
+ dispatchEventDropdownToggle() {
5118
5112
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
5119
5113
  detail: {
5120
5114
  expanded: this.showing,
5121
- eventType: eventType || "unknown",
5122
5115
  },
5123
5116
  composed: true
5124
5117
  });
@@ -5128,7 +5121,7 @@ class AuroFloatingUI {
5128
5121
 
5129
5122
  handleClick() {
5130
5123
  if (this.element.isPopoverVisible) {
5131
- this.hideBib("click");
5124
+ this.hideBib();
5132
5125
  } else {
5133
5126
  this.showBib();
5134
5127
  }
@@ -5164,7 +5157,7 @@ class AuroFloatingUI {
5164
5157
  break;
5165
5158
  case 'mouseleave':
5166
5159
  if (this.element.hoverToggle) {
5167
- this.hideBib("mouseleave");
5160
+ this.hideBib();
5168
5161
  }
5169
5162
  break;
5170
5163
  case 'focus':
@@ -6552,9 +6545,6 @@ class AuroDropdown extends AuroElement$3 {
6552
6545
 
6553
6546
  this.parentBorder = false;
6554
6547
 
6555
- /** @private */
6556
- this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
6557
-
6558
6548
  this.privateDefaults();
6559
6549
  }
6560
6550
 
@@ -6988,19 +6978,12 @@ class AuroDropdown extends AuroElement$3 {
6988
6978
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
6989
6979
  this.handleTriggerContentSlotChange();
6990
6980
  }
6991
- }
6992
6981
 
6993
- /**
6994
- * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
6995
- * @private
6996
- * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
6997
- */
6998
- handleDropdownToggle(event) {
6999
- this.updateFocusTrap();
7000
- this.isPopoverVisible = event.detail.expanded;
7001
- const eventType = event.detail.eventType || "unknown";
7002
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
7003
- this.trigger.focus();
6982
+ if (changedProperties.has('isPopoverVisible')) {
6983
+ this.updateFocusTrap();
6984
+ if (!this.isPopoverVisible && this.hasFocus) {
6985
+ this.trigger.focus();
6986
+ }
7004
6987
  }
7005
6988
  }
7006
6989
 
@@ -7008,7 +6991,6 @@ class AuroDropdown extends AuroElement$3 {
7008
6991
 
7009
6992
  // Configure the floater to, this will generate the ID for the bib
7010
6993
  this.floater.configure(this, 'auroDropdown');
7011
- this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
7012
6994
 
7013
6995
  /**
7014
6996
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -16,24 +16,18 @@
16
16
  <head>
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
- <title>Auro Web Component Demo | auro-counter</title>
20
-
21
- <!-- Prism.js Stylesheet -->
22
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
-
24
- <!-- Legacy reference is still needed to support auro-counter's use of legacy token values at this time -->
25
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
-
27
- <!-- Design Token Alaska Theme -->
28
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
-
30
- <!-- Webcore Stylesheet Alaska Theme -->
31
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
-
33
- <!-- Demo Specific Styles -->
19
+ <title>Auro Web Component Generator | auro-counter custom element</title>
20
+ <link
21
+ rel="stylesheet"
22
+ type="text/css"
23
+ href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
+ />
25
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
26
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
34
27
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
28
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
- </head>
29
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/essentials-as.css" />
30
+ </head>
37
31
  <body class="auro-markdown">
38
32
  <main></main>
39
33