@aurodesignsystem-dev/auro-formkit 0.0.0-pr802.0 → 0.0.0-pr806.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 (57) 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 +8 -1
  5. package/components/checkbox/demo/index.min.js +8 -1
  6. package/components/checkbox/dist/index.js +8 -1
  7. package/components/checkbox/dist/registered.js +8 -1
  8. package/components/combobox/demo/api.md +2 -0
  9. package/components/combobox/demo/api.min.js +87 -73
  10. package/components/combobox/demo/index.min.js +87 -73
  11. package/components/combobox/dist/auro-combobox.d.ts +2 -4
  12. package/components/combobox/dist/index.js +86 -72
  13. package/components/combobox/dist/registered.js +86 -72
  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 +341 -188
  23. package/components/datepicker/demo/index.md +4 -4
  24. package/components/datepicker/demo/index.min.js +341 -188
  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 +341 -188
  28. package/components/datepicker/dist/registered.js +341 -188
  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/input/demo/api.min.js +75 -9
  37. package/components/input/demo/index.min.js +75 -9
  38. package/components/input/dist/auro-input.d.ts +24 -0
  39. package/components/input/dist/index.js +75 -9
  40. package/components/input/dist/registered.js +75 -9
  41. package/components/menu/demo/api.min.js +1 -1
  42. package/components/menu/demo/index.min.js +1 -1
  43. package/components/menu/dist/index.js +1 -1
  44. package/components/menu/dist/registered.js +1 -1
  45. package/components/radio/demo/api.min.js +1 -1
  46. package/components/radio/demo/index.min.js +1 -1
  47. package/components/radio/dist/index.js +1 -1
  48. package/components/radio/dist/registered.js +1 -1
  49. package/components/select/demo/api.md +46 -64
  50. package/components/select/demo/api.min.js +61 -76
  51. package/components/select/demo/index.md +1057 -137
  52. package/components/select/demo/index.min.js +61 -76
  53. package/components/select/dist/auro-select.d.ts +22 -5
  54. package/components/select/dist/index.js +60 -75
  55. package/components/select/dist/registered.js +60 -75
  56. package/package.json +2 -2
  57. /package/components/datepicker/dist/styles/{default → classic}/color-css.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -48,7 +48,7 @@
48
48
  |-----------------------------|--------------------------------------|--------------------------------------------------|
49
49
  | `auroDropdown-idAdded` | `Object<key : 'id', value: string>` | |
50
50
  | `auroDropdown-toggled` | | Notifies that the visibility of the dropdown bib has changed. |
51
- | `auroDropdown-triggerClick` | | Notifies that the trigger has been clicked. |
51
+ | `auroDropdown-triggerClick` | `CustomEvent<any>` | Notifies that the trigger has been clicked. |
52
52
 
53
53
  ## Slots
54
54
 
@@ -3535,6 +3535,7 @@ class AuroElement extends i {
3535
3535
  // See LICENSE in the project root for license information.
3536
3536
 
3537
3537
 
3538
+
3538
3539
  /*
3539
3540
  * @slot - Default slot for the popover content.
3540
3541
  * @slot helpText - Defines the content of the helpText.
@@ -4038,6 +4039,13 @@ class AuroDropdown extends AuroElement {
4038
4039
 
4039
4040
  // Add the tag name as an attribute if it is different than the component name
4040
4041
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
4042
+
4043
+ this.trigger.addEventListener('click', () => {
4044
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
4045
+ bubbles: true,
4046
+ composed: true
4047
+ }));
4048
+ });
4041
4049
  }
4042
4050
 
4043
4051
  /**
@@ -4110,64 +4118,6 @@ class AuroDropdown extends AuroElement {
4110
4118
  this.hasFocus = false;
4111
4119
  }
4112
4120
 
4113
- /**
4114
- * Determines if the element or any children are focusable.
4115
- * @private
4116
- * @param {HTMLElement} element - Element to check.
4117
- * @returns {Boolean} - True if the element or any children are focusable.
4118
- */
4119
- containsFocusableElement(element) {
4120
- this.showTriggerBorders = true;
4121
-
4122
- const nodes = [
4123
- element,
4124
- ...element.children
4125
- ];
4126
-
4127
- const focusableElements = [
4128
- 'a',
4129
- 'auro-hyperlink',
4130
- 'button',
4131
- 'auro-button',
4132
- 'input',
4133
- 'auro-input',
4134
- ];
4135
-
4136
- const focusableElementsThatNeedBorders = ['auro-input'];
4137
-
4138
- const result = nodes.some((node) => {
4139
- const tagName = node.tagName.toLowerCase();
4140
-
4141
- if (node.tabIndex > -1) {
4142
- return true;
4143
- }
4144
-
4145
- if (focusableElements.includes(tagName)) {
4146
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4147
- return true;
4148
- }
4149
- if (!node.hasAttribute('disabled')) {
4150
- return true;
4151
- }
4152
- }
4153
-
4154
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4155
- return true;
4156
- }
4157
-
4158
- return false;
4159
- });
4160
-
4161
- if (result) {
4162
- this.showTriggerBorders = !nodes.some((node) => {
4163
- const tagName = node.tagName.toLowerCase();
4164
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4165
- });
4166
- }
4167
-
4168
- return result;
4169
- }
4170
-
4171
4121
  /**
4172
4122
  * Creates and dispatches a duplicate focus event on the trigger element.
4173
4123
  * @private
@@ -4279,7 +4229,7 @@ class AuroDropdown extends AuroElement {
4279
4229
  if (triggerContentNodes) {
4280
4230
 
4281
4231
  // See if any of them are focusable elements
4282
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
4232
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
4283
4233
 
4284
4234
  // If any of them are focusable elements
4285
4235
  if (this.triggerContentFocusable) {
@@ -4351,7 +4301,7 @@ class AuroDropdown extends AuroElement {
4351
4301
  <div
4352
4302
  id="trigger"
4353
4303
  class="${e$2(this.commonWrapperClasses)}" part="wrapper"
4354
- tabindex="${this.tabIndex}"
4304
+ tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
4355
4305
  role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
4356
4306
  aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4357
4307
  aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -3510,6 +3510,7 @@ class AuroElement extends i {
3510
3510
  // See LICENSE in the project root for license information.
3511
3511
 
3512
3512
 
3513
+
3513
3514
  /*
3514
3515
  * @slot - Default slot for the popover content.
3515
3516
  * @slot helpText - Defines the content of the helpText.
@@ -4013,6 +4014,13 @@ class AuroDropdown extends AuroElement {
4013
4014
 
4014
4015
  // Add the tag name as an attribute if it is different than the component name
4015
4016
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
4017
+
4018
+ this.trigger.addEventListener('click', () => {
4019
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
4020
+ bubbles: true,
4021
+ composed: true
4022
+ }));
4023
+ });
4016
4024
  }
4017
4025
 
4018
4026
  /**
@@ -4085,64 +4093,6 @@ class AuroDropdown extends AuroElement {
4085
4093
  this.hasFocus = false;
4086
4094
  }
4087
4095
 
4088
- /**
4089
- * Determines if the element or any children are focusable.
4090
- * @private
4091
- * @param {HTMLElement} element - Element to check.
4092
- * @returns {Boolean} - True if the element or any children are focusable.
4093
- */
4094
- containsFocusableElement(element) {
4095
- this.showTriggerBorders = true;
4096
-
4097
- const nodes = [
4098
- element,
4099
- ...element.children
4100
- ];
4101
-
4102
- const focusableElements = [
4103
- 'a',
4104
- 'auro-hyperlink',
4105
- 'button',
4106
- 'auro-button',
4107
- 'input',
4108
- 'auro-input',
4109
- ];
4110
-
4111
- const focusableElementsThatNeedBorders = ['auro-input'];
4112
-
4113
- const result = nodes.some((node) => {
4114
- const tagName = node.tagName.toLowerCase();
4115
-
4116
- if (node.tabIndex > -1) {
4117
- return true;
4118
- }
4119
-
4120
- if (focusableElements.includes(tagName)) {
4121
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4122
- return true;
4123
- }
4124
- if (!node.hasAttribute('disabled')) {
4125
- return true;
4126
- }
4127
- }
4128
-
4129
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4130
- return true;
4131
- }
4132
-
4133
- return false;
4134
- });
4135
-
4136
- if (result) {
4137
- this.showTriggerBorders = !nodes.some((node) => {
4138
- const tagName = node.tagName.toLowerCase();
4139
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4140
- });
4141
- }
4142
-
4143
- return result;
4144
- }
4145
-
4146
4096
  /**
4147
4097
  * Creates and dispatches a duplicate focus event on the trigger element.
4148
4098
  * @private
@@ -4254,7 +4204,7 @@ class AuroDropdown extends AuroElement {
4254
4204
  if (triggerContentNodes) {
4255
4205
 
4256
4206
  // See if any of them are focusable elements
4257
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
4207
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
4258
4208
 
4259
4209
  // If any of them are focusable elements
4260
4210
  if (this.triggerContentFocusable) {
@@ -4326,7 +4276,7 @@ class AuroDropdown extends AuroElement {
4326
4276
  <div
4327
4277
  id="trigger"
4328
4278
  class="${e$2(this.commonWrapperClasses)}" part="wrapper"
4329
- tabindex="${this.tabIndex}"
4279
+ tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
4330
4280
  role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
4331
4281
  aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4332
4282
  aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -348,13 +348,6 @@ export class AuroDropdown extends AuroElement {
348
348
  * @return {void}
349
349
  */
350
350
  private handleFocusout;
351
- /**
352
- * Determines if the element or any children are focusable.
353
- * @private
354
- * @param {HTMLElement} element - Element to check.
355
- * @returns {Boolean} - True if the element or any children are focusable.
356
- */
357
- private containsFocusableElement;
358
351
  /**
359
352
  * Sets up event listeners to deliver focus and blur events from nested Auro components within the trigger slot to trigger.
360
353
  * This ensures that focus/blur events originating from within these components are propagated to the trigger element itself.
@@ -3463,6 +3463,7 @@ class AuroElement extends LitElement {
3463
3463
  // See LICENSE in the project root for license information.
3464
3464
 
3465
3465
 
3466
+
3466
3467
  /*
3467
3468
  * @slot - Default slot for the popover content.
3468
3469
  * @slot helpText - Defines the content of the helpText.
@@ -3966,6 +3967,13 @@ class AuroDropdown extends AuroElement {
3966
3967
 
3967
3968
  // Add the tag name as an attribute if it is different than the component name
3968
3969
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
3970
+
3971
+ this.trigger.addEventListener('click', () => {
3972
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
3973
+ bubbles: true,
3974
+ composed: true
3975
+ }));
3976
+ });
3969
3977
  }
3970
3978
 
3971
3979
  /**
@@ -4038,64 +4046,6 @@ class AuroDropdown extends AuroElement {
4038
4046
  this.hasFocus = false;
4039
4047
  }
4040
4048
 
4041
- /**
4042
- * Determines if the element or any children are focusable.
4043
- * @private
4044
- * @param {HTMLElement} element - Element to check.
4045
- * @returns {Boolean} - True if the element or any children are focusable.
4046
- */
4047
- containsFocusableElement(element) {
4048
- this.showTriggerBorders = true;
4049
-
4050
- const nodes = [
4051
- element,
4052
- ...element.children
4053
- ];
4054
-
4055
- const focusableElements = [
4056
- 'a',
4057
- 'auro-hyperlink',
4058
- 'button',
4059
- 'auro-button',
4060
- 'input',
4061
- 'auro-input',
4062
- ];
4063
-
4064
- const focusableElementsThatNeedBorders = ['auro-input'];
4065
-
4066
- const result = nodes.some((node) => {
4067
- const tagName = node.tagName.toLowerCase();
4068
-
4069
- if (node.tabIndex > -1) {
4070
- return true;
4071
- }
4072
-
4073
- if (focusableElements.includes(tagName)) {
4074
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4075
- return true;
4076
- }
4077
- if (!node.hasAttribute('disabled')) {
4078
- return true;
4079
- }
4080
- }
4081
-
4082
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4083
- return true;
4084
- }
4085
-
4086
- return false;
4087
- });
4088
-
4089
- if (result) {
4090
- this.showTriggerBorders = !nodes.some((node) => {
4091
- const tagName = node.tagName.toLowerCase();
4092
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4093
- });
4094
- }
4095
-
4096
- return result;
4097
- }
4098
-
4099
4049
  /**
4100
4050
  * Creates and dispatches a duplicate focus event on the trigger element.
4101
4051
  * @private
@@ -4207,7 +4157,7 @@ class AuroDropdown extends AuroElement {
4207
4157
  if (triggerContentNodes) {
4208
4158
 
4209
4159
  // See if any of them are focusable elements
4210
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
4160
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
4211
4161
 
4212
4162
  // If any of them are focusable elements
4213
4163
  if (this.triggerContentFocusable) {
@@ -4279,7 +4229,7 @@ class AuroDropdown extends AuroElement {
4279
4229
  <div
4280
4230
  id="trigger"
4281
4231
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
4282
- tabindex="${this.tabIndex}"
4232
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
4283
4233
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
4284
4234
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4285
4235
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
@@ -3463,6 +3463,7 @@ class AuroElement extends LitElement {
3463
3463
  // See LICENSE in the project root for license information.
3464
3464
 
3465
3465
 
3466
+
3466
3467
  /*
3467
3468
  * @slot - Default slot for the popover content.
3468
3469
  * @slot helpText - Defines the content of the helpText.
@@ -3966,6 +3967,13 @@ class AuroDropdown extends AuroElement {
3966
3967
 
3967
3968
  // Add the tag name as an attribute if it is different than the component name
3968
3969
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
3970
+
3971
+ this.trigger.addEventListener('click', () => {
3972
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
3973
+ bubbles: true,
3974
+ composed: true
3975
+ }));
3976
+ });
3969
3977
  }
3970
3978
 
3971
3979
  /**
@@ -4038,64 +4046,6 @@ class AuroDropdown extends AuroElement {
4038
4046
  this.hasFocus = false;
4039
4047
  }
4040
4048
 
4041
- /**
4042
- * Determines if the element or any children are focusable.
4043
- * @private
4044
- * @param {HTMLElement} element - Element to check.
4045
- * @returns {Boolean} - True if the element or any children are focusable.
4046
- */
4047
- containsFocusableElement(element) {
4048
- this.showTriggerBorders = true;
4049
-
4050
- const nodes = [
4051
- element,
4052
- ...element.children
4053
- ];
4054
-
4055
- const focusableElements = [
4056
- 'a',
4057
- 'auro-hyperlink',
4058
- 'button',
4059
- 'auro-button',
4060
- 'input',
4061
- 'auro-input',
4062
- ];
4063
-
4064
- const focusableElementsThatNeedBorders = ['auro-input'];
4065
-
4066
- const result = nodes.some((node) => {
4067
- const tagName = node.tagName.toLowerCase();
4068
-
4069
- if (node.tabIndex > -1) {
4070
- return true;
4071
- }
4072
-
4073
- if (focusableElements.includes(tagName)) {
4074
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
4075
- return true;
4076
- }
4077
- if (!node.hasAttribute('disabled')) {
4078
- return true;
4079
- }
4080
- }
4081
-
4082
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
4083
- return true;
4084
- }
4085
-
4086
- return false;
4087
- });
4088
-
4089
- if (result) {
4090
- this.showTriggerBorders = !nodes.some((node) => {
4091
- const tagName = node.tagName.toLowerCase();
4092
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
4093
- });
4094
- }
4095
-
4096
- return result;
4097
- }
4098
-
4099
4049
  /**
4100
4050
  * Creates and dispatches a duplicate focus event on the trigger element.
4101
4051
  * @private
@@ -4207,7 +4157,7 @@ class AuroDropdown extends AuroElement {
4207
4157
  if (triggerContentNodes) {
4208
4158
 
4209
4159
  // See if any of them are focusable elements
4210
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
4160
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
4211
4161
 
4212
4162
  // If any of them are focusable elements
4213
4163
  if (this.triggerContentFocusable) {
@@ -4279,7 +4229,7 @@ class AuroDropdown extends AuroElement {
4279
4229
  <div
4280
4230
  id="trigger"
4281
4231
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
4282
- tabindex="${this.tabIndex}"
4232
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
4283
4233
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
4284
4234
  aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4285
4235
  aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"