@aurodesignsystem-dev/auro-formkit 0.0.0-pr802.0 → 0.0.0-pr805.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 (44) hide show
  1. package/components/bibtemplate/dist/index.js +1 -1
  2. package/components/bibtemplate/dist/registered.js +1 -1
  3. package/components/checkbox/demo/api.md +2 -1
  4. package/components/checkbox/demo/api.min.js +7 -0
  5. package/components/checkbox/demo/index.min.js +7 -0
  6. package/components/checkbox/dist/index.js +7 -0
  7. package/components/checkbox/dist/registered.js +7 -0
  8. package/components/combobox/demo/api.md +2 -0
  9. package/components/combobox/demo/api.min.js +11 -63
  10. package/components/combobox/demo/index.min.js +11 -63
  11. package/components/combobox/dist/auro-combobox.d.ts +2 -4
  12. package/components/combobox/dist/index.js +11 -63
  13. package/components/combobox/dist/registered.js +11 -63
  14. package/components/counter/demo/api.md +2 -0
  15. package/components/counter/demo/api.min.js +31 -61
  16. package/components/counter/demo/index.min.js +31 -61
  17. package/components/counter/dist/auro-counter-group.d.ts +10 -0
  18. package/components/counter/dist/index.js +31 -61
  19. package/components/counter/dist/registered.js +31 -61
  20. package/components/datepicker/README.md +1 -1
  21. package/components/datepicker/demo/api.md +41 -19
  22. package/components/datepicker/demo/api.min.js +242 -159
  23. package/components/datepicker/demo/index.md +4 -4
  24. package/components/datepicker/demo/index.min.js +242 -159
  25. package/components/datepicker/demo/readme.md +1 -1
  26. package/components/datepicker/dist/auro-datepicker.d.ts +73 -12
  27. package/components/datepicker/dist/index.js +242 -159
  28. package/components/datepicker/dist/registered.js +242 -159
  29. package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
  30. package/components/dropdown/demo/api.md +1 -1
  31. package/components/dropdown/demo/api.min.js +10 -60
  32. package/components/dropdown/demo/index.min.js +10 -60
  33. package/components/dropdown/dist/auro-dropdown.d.ts +0 -7
  34. package/components/dropdown/dist/index.js +10 -60
  35. package/components/dropdown/dist/registered.js +10 -60
  36. package/components/select/demo/api.md +46 -64
  37. package/components/select/demo/api.min.js +32 -72
  38. package/components/select/demo/index.md +1057 -137
  39. package/components/select/demo/index.min.js +32 -72
  40. package/components/select/dist/auro-select.d.ts +10 -5
  41. package/components/select/dist/index.js +32 -72
  42. package/components/select/dist/registered.js +32 -72
  43. package/package.json +1 -1
  44. /package/components/datepicker/dist/styles/{default → classic}/color-css.d.ts +0 -0
@@ -1852,7 +1852,7 @@ class AuroBibtemplate extends LitElement {
1852
1852
  /**
1853
1853
  * @private
1854
1854
  */
1855
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
1855
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
1856
1856
  }
1857
1857
 
1858
1858
  static get styles() {
@@ -1852,7 +1852,7 @@ class AuroBibtemplate extends LitElement {
1852
1852
  /**
1853
1853
  * @private
1854
1854
  */
1855
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
1855
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
1856
1856
  }
1857
1857
 
1858
1858
  static get styles() {
@@ -70,7 +70,8 @@ Custom element for the purpose of allowing users to select one or more options o
70
70
  |-------------------------|--------------------|
71
71
  | `auroCheckbox-focusin` | `CustomEvent<any>` |
72
72
  | `auroCheckbox-focusout` | `CustomEvent<any>` |
73
- | `auroCheckbox-input` | `CustomEvent<any>` |
73
+ | `auroCheckbox-input` | `CustomEvent<any>` |
74
+ | [input](#input) | `CustomEvent<any>` |
74
75
 
75
76
  ## CSS Shadow Parts
76
77
 
@@ -287,6 +287,13 @@ class AuroCheckbox extends i$2 {
287
287
  handleInput(event) {
288
288
  this.checked = event.target.checked;
289
289
 
290
+ this.dispatchEvent(new CustomEvent('input', {
291
+ bubbles: true,
292
+ cancelable: false,
293
+ composed: true,
294
+ }));
295
+
296
+ // Old event we need to deprecate
290
297
  this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
291
298
  bubbles: true,
292
299
  cancelable: false,
@@ -279,6 +279,13 @@ class AuroCheckbox extends i$2 {
279
279
  handleInput(event) {
280
280
  this.checked = event.target.checked;
281
281
 
282
+ this.dispatchEvent(new CustomEvent('input', {
283
+ bubbles: true,
284
+ cancelable: false,
285
+ composed: true,
286
+ }));
287
+
288
+ // Old event we need to deprecate
282
289
  this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
283
290
  bubbles: true,
284
291
  cancelable: false,
@@ -239,6 +239,13 @@ class AuroCheckbox extends LitElement {
239
239
  handleInput(event) {
240
240
  this.checked = event.target.checked;
241
241
 
242
+ this.dispatchEvent(new CustomEvent('input', {
243
+ bubbles: true,
244
+ cancelable: false,
245
+ composed: true,
246
+ }));
247
+
248
+ // Old event we need to deprecate
242
249
  this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
243
250
  bubbles: true,
244
251
  cancelable: false,
@@ -239,6 +239,13 @@ class AuroCheckbox extends LitElement {
239
239
  handleInput(event) {
240
240
  this.checked = event.target.checked;
241
241
 
242
+ this.dispatchEvent(new CustomEvent('input', {
243
+ bubbles: true,
244
+ cancelable: false,
245
+ composed: true,
246
+ }));
247
+
248
+ // Old event we need to deprecate
242
249
  this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
243
250
  bubbles: true,
244
251
  cancelable: false,
@@ -41,8 +41,10 @@
41
41
  |------------|----------------------------------------|--------------------------------------------------|
42
42
  | [clear](#clear) | `(): void` | Clears the current value of the combobox. |
43
43
  | [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
44
+ | [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
44
45
  | [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
45
46
  | [reset](#reset) | `(): void` | Resets component to initial state. |
47
+ | [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
46
48
  | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
47
49
 
48
50
  ## Events
@@ -4573,6 +4573,7 @@ let AuroElement$4 = class AuroElement extends i$2 {
4573
4573
  // See LICENSE in the project root for license information.
4574
4574
 
4575
4575
 
4576
+
4576
4577
  /*
4577
4578
  * @slot - Default slot for the popover content.
4578
4579
  * @slot helpText - Defines the content of the helpText.
@@ -5076,6 +5077,13 @@ class AuroDropdown extends AuroElement$4 {
5076
5077
 
5077
5078
  // Add the tag name as an attribute if it is different than the component name
5078
5079
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
5080
+
5081
+ this.trigger.addEventListener('click', () => {
5082
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
5083
+ bubbles: true,
5084
+ composed: true
5085
+ }));
5086
+ });
5079
5087
  }
5080
5088
 
5081
5089
  /**
@@ -5148,64 +5156,6 @@ class AuroDropdown extends AuroElement$4 {
5148
5156
  this.hasFocus = false;
5149
5157
  }
5150
5158
 
5151
- /**
5152
- * Determines if the element or any children are focusable.
5153
- * @private
5154
- * @param {HTMLElement} element - Element to check.
5155
- * @returns {Boolean} - True if the element or any children are focusable.
5156
- */
5157
- containsFocusableElement(element) {
5158
- this.showTriggerBorders = true;
5159
-
5160
- const nodes = [
5161
- element,
5162
- ...element.children
5163
- ];
5164
-
5165
- const focusableElements = [
5166
- 'a',
5167
- 'auro-hyperlink',
5168
- 'button',
5169
- 'auro-button',
5170
- 'input',
5171
- 'auro-input',
5172
- ];
5173
-
5174
- const focusableElementsThatNeedBorders = ['auro-input'];
5175
-
5176
- const result = nodes.some((node) => {
5177
- const tagName = node.tagName.toLowerCase();
5178
-
5179
- if (node.tabIndex > -1) {
5180
- return true;
5181
- }
5182
-
5183
- if (focusableElements.includes(tagName)) {
5184
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
5185
- return true;
5186
- }
5187
- if (!node.hasAttribute('disabled')) {
5188
- return true;
5189
- }
5190
- }
5191
-
5192
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
5193
- return true;
5194
- }
5195
-
5196
- return false;
5197
- });
5198
-
5199
- if (result) {
5200
- this.showTriggerBorders = !nodes.some((node) => {
5201
- const tagName = node.tagName.toLowerCase();
5202
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
5203
- });
5204
- }
5205
-
5206
- return result;
5207
- }
5208
-
5209
5159
  /**
5210
5160
  * Creates and dispatches a duplicate focus event on the trigger element.
5211
5161
  * @private
@@ -5317,7 +5267,7 @@ class AuroDropdown extends AuroElement$4 {
5317
5267
  if (triggerContentNodes) {
5318
5268
 
5319
5269
  // See if any of them are focusable elements
5320
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
5270
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
5321
5271
 
5322
5272
  // If any of them are focusable elements
5323
5273
  if (this.triggerContentFocusable) {
@@ -5389,7 +5339,7 @@ class AuroDropdown extends AuroElement$4 {
5389
5339
  <div
5390
5340
  id="trigger"
5391
5341
  class="${e(this.commonWrapperClasses)}" part="wrapper"
5392
- tabindex="${this.tabIndex}"
5342
+ tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
5393
5343
  role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
5394
5344
  aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
5395
5345
  aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -15641,7 +15591,7 @@ class AuroBibtemplate extends i$2 {
15641
15591
  /**
15642
15592
  * @private
15643
15593
  */
15644
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
15594
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
15645
15595
  }
15646
15596
 
15647
15597
  static get styles() {
@@ -16552,7 +16502,6 @@ class AuroCombobox extends AuroElement$1 {
16552
16502
 
16553
16503
  /**
16554
16504
  * Hides the dropdown bib if its open.
16555
- * @private
16556
16505
  * @returns {void}
16557
16506
  */
16558
16507
  hideBib() {
@@ -16563,7 +16512,6 @@ class AuroCombobox extends AuroElement$1 {
16563
16512
 
16564
16513
  /**
16565
16514
  * Shows the dropdown bib if there are options to show.
16566
- * @private
16567
16515
  * @returns {void}
16568
16516
  */
16569
16517
  showBib() {
@@ -4431,6 +4431,7 @@ let AuroElement$4 = class AuroElement extends i$2 {
4431
4431
  // See LICENSE in the project root for license information.
4432
4432
 
4433
4433
 
4434
+
4434
4435
  /*
4435
4436
  * @slot - Default slot for the popover content.
4436
4437
  * @slot helpText - Defines the content of the helpText.
@@ -4934,6 +4935,13 @@ class AuroDropdown extends AuroElement$4 {
4934
4935
 
4935
4936
  // Add the tag name as an attribute if it is different than the component name
4936
4937
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
4938
+
4939
+ this.trigger.addEventListener('click', () => {
4940
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
4941
+ bubbles: true,
4942
+ composed: true
4943
+ }));
4944
+ });
4937
4945
  }
4938
4946
 
4939
4947
  /**
@@ -5006,64 +5014,6 @@ class AuroDropdown extends AuroElement$4 {
5006
5014
  this.hasFocus = false;
5007
5015
  }
5008
5016
 
5009
- /**
5010
- * Determines if the element or any children are focusable.
5011
- * @private
5012
- * @param {HTMLElement} element - Element to check.
5013
- * @returns {Boolean} - True if the element or any children are focusable.
5014
- */
5015
- containsFocusableElement(element) {
5016
- this.showTriggerBorders = true;
5017
-
5018
- const nodes = [
5019
- element,
5020
- ...element.children
5021
- ];
5022
-
5023
- const focusableElements = [
5024
- 'a',
5025
- 'auro-hyperlink',
5026
- 'button',
5027
- 'auro-button',
5028
- 'input',
5029
- 'auro-input',
5030
- ];
5031
-
5032
- const focusableElementsThatNeedBorders = ['auro-input'];
5033
-
5034
- const result = nodes.some((node) => {
5035
- const tagName = node.tagName.toLowerCase();
5036
-
5037
- if (node.tabIndex > -1) {
5038
- return true;
5039
- }
5040
-
5041
- if (focusableElements.includes(tagName)) {
5042
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
5043
- return true;
5044
- }
5045
- if (!node.hasAttribute('disabled')) {
5046
- return true;
5047
- }
5048
- }
5049
-
5050
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
5051
- return true;
5052
- }
5053
-
5054
- return false;
5055
- });
5056
-
5057
- if (result) {
5058
- this.showTriggerBorders = !nodes.some((node) => {
5059
- const tagName = node.tagName.toLowerCase();
5060
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
5061
- });
5062
- }
5063
-
5064
- return result;
5065
- }
5066
-
5067
5017
  /**
5068
5018
  * Creates and dispatches a duplicate focus event on the trigger element.
5069
5019
  * @private
@@ -5175,7 +5125,7 @@ class AuroDropdown extends AuroElement$4 {
5175
5125
  if (triggerContentNodes) {
5176
5126
 
5177
5127
  // See if any of them are focusable elements
5178
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
5128
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
5179
5129
 
5180
5130
  // If any of them are focusable elements
5181
5131
  if (this.triggerContentFocusable) {
@@ -5247,7 +5197,7 @@ class AuroDropdown extends AuroElement$4 {
5247
5197
  <div
5248
5198
  id="trigger"
5249
5199
  class="${e(this.commonWrapperClasses)}" part="wrapper"
5250
- tabindex="${this.tabIndex}"
5200
+ tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
5251
5201
  role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
5252
5202
  aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
5253
5203
  aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -15499,7 +15449,7 @@ class AuroBibtemplate extends i$2 {
15499
15449
  /**
15500
15450
  * @private
15501
15451
  */
15502
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
15452
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
15503
15453
  }
15504
15454
 
15505
15455
  static get styles() {
@@ -16410,7 +16360,6 @@ class AuroCombobox extends AuroElement$1 {
16410
16360
 
16411
16361
  /**
16412
16362
  * Hides the dropdown bib if its open.
16413
- * @private
16414
16363
  * @returns {void}
16415
16364
  */
16416
16365
  hideBib() {
@@ -16421,7 +16370,6 @@ class AuroCombobox extends AuroElement$1 {
16421
16370
 
16422
16371
  /**
16423
16372
  * Shows the dropdown bib if there are options to show.
16424
- * @private
16425
16373
  * @returns {void}
16426
16374
  */
16427
16375
  showBib() {
@@ -313,16 +313,14 @@ export class AuroCombobox extends AuroElement {
313
313
  options: any[] | NodeListOf<Element>;
314
314
  /**
315
315
  * Hides the dropdown bib if its open.
316
- * @private
317
316
  * @returns {void}
318
317
  */
319
- private hideBib;
318
+ hideBib(): void;
320
319
  /**
321
320
  * Shows the dropdown bib if there are options to show.
322
- * @private
323
321
  * @returns {void}
324
322
  */
325
- private showBib;
323
+ showBib(): void;
326
324
  /**
327
325
  * Binds all behavior needed to the dropdown after rendering.
328
326
  * @private
@@ -4362,6 +4362,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
4362
4362
  // See LICENSE in the project root for license information.
4363
4363
 
4364
4364
 
4365
+
4365
4366
  /*
4366
4367
  * @slot - Default slot for the popover content.
4367
4368
  * @slot helpText - Defines the content of the helpText.
@@ -4865,6 +4866,13 @@ class AuroDropdown extends AuroElement$4 {
4865
4866
 
4866
4867
  // Add the tag name as an attribute if it is different than the component name
4867
4868
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
4869
+
4870
+ this.trigger.addEventListener('click', () => {
4871
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
4872
+ bubbles: true,
4873
+ composed: true
4874
+ }));
4875
+ });
4868
4876
  }
4869
4877
 
4870
4878
  /**
@@ -4937,64 +4945,6 @@ class AuroDropdown extends AuroElement$4 {
4937
4945
  this.hasFocus = false;
4938
4946
  }
4939
4947
 
4940
- /**
4941
- * Determines if the element or any children are focusable.
4942
- * @private
4943
- * @param {HTMLElement} element - Element to check.
4944
- * @returns {Boolean} - True if the element or any children are focusable.
4945
- */
4946
- containsFocusableElement(element) {
4947
- this.showTriggerBorders = true;
4948
-
4949
- const nodes = [
4950
- element,
4951
- ...element.children
4952
- ];
4953
-
4954
- const focusableElements = [
4955
- 'a',
4956
- 'auro-hyperlink',
4957
- 'button',
4958
- 'auro-button',
4959
- 'input',
4960
- 'auro-input',
4961
- ];
4962
-
4963
- const focusableElementsThatNeedBorders = ['auro-input'];
4964
-
4965
- const result = nodes.some((node) => {
4966
- const tagName = node.tagName.toLowerCase();
4967
-
4968
- if (node.tabIndex > -1) {
4969
- return true;
4970
- }
4971
-
4972
- if (focusableElements.includes(tagName)) {
4973
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4974
- return true;
4975
- }
4976
- if (!node.hasAttribute('disabled')) {
4977
- return true;
4978
- }
4979
- }
4980
-
4981
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4982
- return true;
4983
- }
4984
-
4985
- return false;
4986
- });
4987
-
4988
- if (result) {
4989
- this.showTriggerBorders = !nodes.some((node) => {
4990
- const tagName = node.tagName.toLowerCase();
4991
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4992
- });
4993
- }
4994
-
4995
- return result;
4996
- }
4997
-
4998
4948
  /**
4999
4949
  * Creates and dispatches a duplicate focus event on the trigger element.
5000
4950
  * @private
@@ -5106,7 +5056,7 @@ class AuroDropdown extends AuroElement$4 {
5106
5056
  if (triggerContentNodes) {
5107
5057
 
5108
5058
  // See if any of them are focusable elements
5109
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
5059
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
5110
5060
 
5111
5061
  // If any of them are focusable elements
5112
5062
  if (this.triggerContentFocusable) {
@@ -5178,7 +5128,7 @@ class AuroDropdown extends AuroElement$4 {
5178
5128
  <div
5179
5129
  id="trigger"
5180
5130
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
5181
- tabindex="${this.tabIndex}"
5131
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
5182
5132
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
5183
5133
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
5184
5134
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -15417,7 +15367,7 @@ class AuroBibtemplate extends LitElement {
15417
15367
  /**
15418
15368
  * @private
15419
15369
  */
15420
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
15370
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
15421
15371
  }
15422
15372
 
15423
15373
  static get styles() {
@@ -16328,7 +16278,6 @@ class AuroCombobox extends AuroElement {
16328
16278
 
16329
16279
  /**
16330
16280
  * Hides the dropdown bib if its open.
16331
- * @private
16332
16281
  * @returns {void}
16333
16282
  */
16334
16283
  hideBib() {
@@ -16339,7 +16288,6 @@ class AuroCombobox extends AuroElement {
16339
16288
 
16340
16289
  /**
16341
16290
  * Shows the dropdown bib if there are options to show.
16342
- * @private
16343
16291
  * @returns {void}
16344
16292
  */
16345
16293
  showBib() {
@@ -4362,6 +4362,7 @@ let AuroElement$4 = class AuroElement extends LitElement {
4362
4362
  // See LICENSE in the project root for license information.
4363
4363
 
4364
4364
 
4365
+
4365
4366
  /*
4366
4367
  * @slot - Default slot for the popover content.
4367
4368
  * @slot helpText - Defines the content of the helpText.
@@ -4865,6 +4866,13 @@ class AuroDropdown extends AuroElement$4 {
4865
4866
 
4866
4867
  // Add the tag name as an attribute if it is different than the component name
4867
4868
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
4869
+
4870
+ this.trigger.addEventListener('click', () => {
4871
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
4872
+ bubbles: true,
4873
+ composed: true
4874
+ }));
4875
+ });
4868
4876
  }
4869
4877
 
4870
4878
  /**
@@ -4937,64 +4945,6 @@ class AuroDropdown extends AuroElement$4 {
4937
4945
  this.hasFocus = false;
4938
4946
  }
4939
4947
 
4940
- /**
4941
- * Determines if the element or any children are focusable.
4942
- * @private
4943
- * @param {HTMLElement} element - Element to check.
4944
- * @returns {Boolean} - True if the element or any children are focusable.
4945
- */
4946
- containsFocusableElement(element) {
4947
- this.showTriggerBorders = true;
4948
-
4949
- const nodes = [
4950
- element,
4951
- ...element.children
4952
- ];
4953
-
4954
- const focusableElements = [
4955
- 'a',
4956
- 'auro-hyperlink',
4957
- 'button',
4958
- 'auro-button',
4959
- 'input',
4960
- 'auro-input',
4961
- ];
4962
-
4963
- const focusableElementsThatNeedBorders = ['auro-input'];
4964
-
4965
- const result = nodes.some((node) => {
4966
- const tagName = node.tagName.toLowerCase();
4967
-
4968
- if (node.tabIndex > -1) {
4969
- return true;
4970
- }
4971
-
4972
- if (focusableElements.includes(tagName)) {
4973
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4974
- return true;
4975
- }
4976
- if (!node.hasAttribute('disabled')) {
4977
- return true;
4978
- }
4979
- }
4980
-
4981
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4982
- return true;
4983
- }
4984
-
4985
- return false;
4986
- });
4987
-
4988
- if (result) {
4989
- this.showTriggerBorders = !nodes.some((node) => {
4990
- const tagName = node.tagName.toLowerCase();
4991
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4992
- });
4993
- }
4994
-
4995
- return result;
4996
- }
4997
-
4998
4948
  /**
4999
4949
  * Creates and dispatches a duplicate focus event on the trigger element.
5000
4950
  * @private
@@ -5106,7 +5056,7 @@ class AuroDropdown extends AuroElement$4 {
5106
5056
  if (triggerContentNodes) {
5107
5057
 
5108
5058
  // See if any of them are focusable elements
5109
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
5059
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
5110
5060
 
5111
5061
  // If any of them are focusable elements
5112
5062
  if (this.triggerContentFocusable) {
@@ -5178,7 +5128,7 @@ class AuroDropdown extends AuroElement$4 {
5178
5128
  <div
5179
5129
  id="trigger"
5180
5130
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
5181
- tabindex="${this.tabIndex}"
5131
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
5182
5132
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
5183
5133
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
5184
5134
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -15417,7 +15367,7 @@ class AuroBibtemplate extends LitElement {
15417
15367
  /**
15418
15368
  * @private
15419
15369
  */
15420
- this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
15370
+ this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
15421
15371
  }
15422
15372
 
15423
15373
  static get styles() {
@@ -16328,7 +16278,6 @@ class AuroCombobox extends AuroElement {
16328
16278
 
16329
16279
  /**
16330
16280
  * Hides the dropdown bib if its open.
16331
- * @private
16332
16281
  * @returns {void}
16333
16282
  */
16334
16283
  hideBib() {
@@ -16339,7 +16288,6 @@ class AuroCombobox extends AuroElement {
16339
16288
 
16340
16289
  /**
16341
16290
  * Shows the dropdown bib if there are options to show.
16342
- * @private
16343
16291
  * @returns {void}
16344
16292
  */
16345
16293
  showBib() {
@@ -63,6 +63,8 @@
63
63
 
64
64
  | Method | Type | Description |
65
65
  |------------|----------------------------------------|--------------------------------------------------|
66
+ | [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
67
+ | [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
66
68
  | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
67
69
 
68
70
  ## Events