@aurodesignsystem/auro-formkit 2.0.3-beta.1 → 2.1.0-beta.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 (66) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/components/bibtemplate/dist/index.js +148 -8
  3. package/components/bibtemplate/dist/registered.js +148 -8
  4. package/components/checkbox/README.md +1 -1
  5. package/components/checkbox/demo/api.min.js +1 -1
  6. package/components/checkbox/demo/index.min.js +1 -1
  7. package/components/checkbox/demo/readme.md +1 -1
  8. package/components/checkbox/dist/index.js +1 -1
  9. package/components/checkbox/dist/registered.js +1 -1
  10. package/components/combobox/README.md +1 -1
  11. package/components/combobox/demo/api.min.js +644 -113
  12. package/components/combobox/demo/index.min.js +644 -113
  13. package/components/combobox/demo/readme.md +1 -1
  14. package/components/combobox/dist/index.js +511 -50
  15. package/components/combobox/dist/registered.js +511 -50
  16. package/components/counter/README.md +1 -1
  17. package/components/counter/demo/api.min.js +500 -39
  18. package/components/counter/demo/index.js +1 -0
  19. package/components/counter/demo/index.min.js +501 -39
  20. package/components/counter/demo/readme.md +1 -1
  21. package/components/counter/dist/index.js +500 -39
  22. package/components/counter/dist/registered.js +500 -39
  23. package/components/datepicker/README.md +1 -1
  24. package/components/datepicker/demo/api.md +30 -0
  25. package/components/datepicker/demo/api.min.js +1281 -207
  26. package/components/datepicker/demo/index.min.js +1281 -207
  27. package/components/datepicker/demo/readme.md +1 -1
  28. package/components/datepicker/dist/auro-calendar.d.ts +5 -1
  29. package/components/datepicker/dist/auro-datepicker.d.ts +7 -0
  30. package/components/datepicker/dist/buttonVersion.d.ts +2 -0
  31. package/components/datepicker/dist/index.js +1281 -207
  32. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  33. package/components/datepicker/dist/registered.js +1281 -207
  34. package/components/dropdown/README.md +1 -1
  35. package/components/dropdown/demo/api.min.js +81 -10
  36. package/components/dropdown/demo/index.min.js +81 -10
  37. package/components/dropdown/demo/readme.md +1 -1
  38. package/components/dropdown/dist/index.js +81 -10
  39. package/components/dropdown/dist/registered.js +81 -10
  40. package/components/form/README.md +1 -1
  41. package/components/form/demo/readme.md +1 -1
  42. package/components/input/README.md +1 -1
  43. package/components/input/demo/api.min.js +263 -13
  44. package/components/input/demo/index.min.js +263 -13
  45. package/components/input/demo/readme.md +1 -1
  46. package/components/input/dist/index.js +263 -13
  47. package/components/input/dist/registered.js +263 -13
  48. package/components/menu/README.md +1 -1
  49. package/components/menu/demo/api.min.js +77 -7
  50. package/components/menu/demo/index.min.js +77 -7
  51. package/components/menu/demo/readme.md +1 -1
  52. package/components/menu/dist/index.js +77 -7
  53. package/components/menu/dist/registered.js +77 -7
  54. package/components/radio/README.md +1 -1
  55. package/components/radio/demo/api.min.js +1 -1
  56. package/components/radio/demo/index.min.js +1 -1
  57. package/components/radio/demo/readme.md +1 -1
  58. package/components/radio/dist/index.js +1 -1
  59. package/components/radio/dist/registered.js +1 -1
  60. package/components/select/README.md +1 -1
  61. package/components/select/demo/api.min.js +319 -38
  62. package/components/select/demo/index.min.js +319 -38
  63. package/components/select/demo/readme.md +1 -1
  64. package/components/select/dist/index.js +240 -29
  65. package/components/select/dist/registered.js +240 -29
  66. package/package.json +2 -2
@@ -10,7 +10,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
10
10
 
11
11
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
12
12
 
13
- let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
13
+ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
14
14
 
15
15
  /* eslint-disable jsdoc/require-param */
16
16
 
@@ -79,7 +79,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
79
79
 
80
80
  class AuroFormValidation {
81
81
  constructor() {
82
- this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
82
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
83
83
  }
84
84
 
85
85
  /**
@@ -431,7 +431,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
431
431
 
432
432
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
433
433
 
434
- let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
434
+ let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
435
435
 
436
436
  /* eslint-disable jsdoc/require-param */
437
437
 
@@ -2244,11 +2244,11 @@ class AuroFloatingUI {
2244
2244
 
2245
2245
  updateCurrentExpandedDropdown() {
2246
2246
  // Close any other dropdown that is already open
2247
- if (document.expandedAuroDropdown) {
2248
- this.hideBib(document.expandedAuroDropdown);
2247
+ if (document.expandedAuroFormkitDropdown) {
2248
+ document.expandedAuroFormkitDropdown.hide;
2249
2249
  }
2250
2250
 
2251
- document.expandedAuroDropdown = this;
2251
+ document.expandedAuroFormkitDropdown = this;
2252
2252
  }
2253
2253
 
2254
2254
  showBib() {
@@ -2623,6 +2623,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
2623
2623
 
2624
2624
  var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
2625
2625
 
2626
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2627
+ // See LICENSE in the project root for license information.
2628
+
2629
+ // ---------------------------------------------------------------------
2630
+
2631
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
2632
+
2633
+ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
2634
+
2635
+ /* eslint-disable jsdoc/require-param */
2636
+
2637
+ /**
2638
+ * This will register a new custom element with the browser.
2639
+ * @param {String} name - The name of the custom element.
2640
+ * @param {Object} componentClass - The class to register as a custom element.
2641
+ * @returns {void}
2642
+ */
2643
+ registerComponent(name, componentClass) {
2644
+ if (!customElements.get(name)) {
2645
+ customElements.define(name, class extends componentClass {});
2646
+ }
2647
+ }
2648
+
2649
+ /**
2650
+ * Finds and returns the closest HTML Element based on a selector.
2651
+ * @returns {void}
2652
+ */
2653
+ closestElement(
2654
+ selector, // selector like in .closest()
2655
+ base = this, // extra functionality to skip a parent
2656
+ __Closest = (el, found = el && el.closest(selector)) =>
2657
+ !el || el === document || el === window
2658
+ ? null // standard .closest() returns null for non-found selectors also
2659
+ : found
2660
+ ? found // found a selector INside this element
2661
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
2662
+ ) {
2663
+ return __Closest(base);
2664
+ }
2665
+ /* eslint-enable jsdoc/require-param */
2666
+
2667
+ /**
2668
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
2669
+ * @param {Object} elem - The element to check.
2670
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
2671
+ * @returns {void}
2672
+ */
2673
+ handleComponentTagRename(elem, tagName) {
2674
+ const tag = tagName.toLowerCase();
2675
+ const elemTag = elem.tagName.toLowerCase();
2676
+
2677
+ if (elemTag !== tag) {
2678
+ elem.setAttribute(tag, true);
2679
+ }
2680
+ }
2681
+
2682
+ /**
2683
+ * Validates if an element is a specific Auro component.
2684
+ * @param {Object} elem - The element to validate.
2685
+ * @param {String} tagName - The name of the Auro component to check against.
2686
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
2687
+ */
2688
+ elementMatch(elem, tagName) {
2689
+ const tag = tagName.toLowerCase();
2690
+ const elemTag = elem.tagName.toLowerCase();
2691
+
2692
+ return elemTag === tag || elem.hasAttribute(tag);
2693
+ }
2694
+ };
2695
+
2626
2696
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2627
2697
  // See LICENSE in the project root for license information.
2628
2698
 
@@ -2655,7 +2725,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
2655
2725
  this.tertiary = false;
2656
2726
  this.warning = false;
2657
2727
  this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
2658
- this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
2728
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
2659
2729
  }
2660
2730
 
2661
2731
  // function to define props used within the scope of this component
@@ -2817,7 +2887,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
2817
2887
  *
2818
2888
  */
2819
2889
  static register(name = "auro-icon") {
2820
- AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
2890
+ AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
2821
2891
  }
2822
2892
 
2823
2893
  connectedCallback() {
@@ -2919,7 +2989,7 @@ class AuroDropdownBib extends LitElement {
2919
2989
  */
2920
2990
  this._mobileBreakpointValue = undefined;
2921
2991
 
2922
- AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2992
+ AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2923
2993
  }
2924
2994
 
2925
2995
  static get styles() {
@@ -3027,7 +3097,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-color-text-tertia
3027
3097
 
3028
3098
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
3029
3099
 
3030
- let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
3100
+ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
3031
3101
 
3032
3102
  /* eslint-disable jsdoc/require-param */
3033
3103
 
@@ -3107,7 +3177,7 @@ class AuroHelpText extends LitElement {
3107
3177
  this.error = false;
3108
3178
  this.hasTextContent = false;
3109
3179
 
3110
- AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-helptext');
3180
+ AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
3111
3181
  }
3112
3182
 
3113
3183
  static get styles() {
@@ -3155,7 +3225,7 @@ class AuroHelpText extends LitElement {
3155
3225
  *
3156
3226
  */
3157
3227
  static register(name = "auro-helptext") {
3158
- AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHelpText);
3228
+ AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
3159
3229
  }
3160
3230
 
3161
3231
  updated() {
@@ -3288,7 +3358,7 @@ class AuroDropdown extends LitElement {
3288
3358
  /**
3289
3359
  * @private
3290
3360
  */
3291
- this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3361
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
3292
3362
 
3293
3363
  /**
3294
3364
  * @private
@@ -3313,17 +3383,17 @@ class AuroDropdown extends LitElement {
3313
3383
  /**
3314
3384
  * @private
3315
3385
  */
3316
- this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
3386
+ this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion$1, AuroIcon$1);
3317
3387
 
3318
3388
  /**
3319
3389
  * @private
3320
3390
  */
3321
- this.dropdownBibTag = versioning.generateTag('auro-dropdownbib', dropdownVersion$1, AuroDropdownBib);
3391
+ this.dropdownBibTag = versioning.generateTag('auro-formkit-dropdown-dropdownbib', dropdownVersion$1, AuroDropdownBib);
3322
3392
 
3323
3393
  /**
3324
3394
  * @private
3325
3395
  */
3326
- this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
3396
+ this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
3327
3397
  }
3328
3398
 
3329
3399
  /**
@@ -3526,7 +3596,7 @@ class AuroDropdown extends LitElement {
3526
3596
  *
3527
3597
  */
3528
3598
  static register(name = "auro-dropdown") {
3529
- AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
3599
+ AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
3530
3600
  }
3531
3601
 
3532
3602
  connectedCallback() {
@@ -3549,6 +3619,7 @@ class AuroDropdown extends LitElement {
3549
3619
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
3550
3620
  this.handleTriggerContentSlotChange();
3551
3621
  }
3622
+
3552
3623
  }
3553
3624
 
3554
3625
  firstUpdated() {
@@ -3794,7 +3865,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
3794
3865
 
3795
3866
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
3796
3867
 
3797
- class AuroLibraryRuntimeUtils {
3868
+ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
3798
3869
 
3799
3870
  /* eslint-disable jsdoc/require-param */
3800
3871
 
@@ -3855,7 +3926,7 @@ class AuroLibraryRuntimeUtils {
3855
3926
 
3856
3927
  return elemTag === tag || elem.hasAttribute(tag);
3857
3928
  }
3858
- }
3929
+ };
3859
3930
 
3860
3931
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3861
3932
  // See LICENSE in the project root for license information.
@@ -4048,6 +4119,76 @@ var tokensCss$1 = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
4048
4119
 
4049
4120
  var colorCss$2 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
4050
4121
 
4122
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
4123
+ // See LICENSE in the project root for license information.
4124
+
4125
+ // ---------------------------------------------------------------------
4126
+
4127
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
4128
+
4129
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
4130
+
4131
+ /* eslint-disable jsdoc/require-param */
4132
+
4133
+ /**
4134
+ * This will register a new custom element with the browser.
4135
+ * @param {String} name - The name of the custom element.
4136
+ * @param {Object} componentClass - The class to register as a custom element.
4137
+ * @returns {void}
4138
+ */
4139
+ registerComponent(name, componentClass) {
4140
+ if (!customElements.get(name)) {
4141
+ customElements.define(name, class extends componentClass {});
4142
+ }
4143
+ }
4144
+
4145
+ /**
4146
+ * Finds and returns the closest HTML Element based on a selector.
4147
+ * @returns {void}
4148
+ */
4149
+ closestElement(
4150
+ selector, // selector like in .closest()
4151
+ base = this, // extra functionality to skip a parent
4152
+ __Closest = (el, found = el && el.closest(selector)) =>
4153
+ !el || el === document || el === window
4154
+ ? null // standard .closest() returns null for non-found selectors also
4155
+ : found
4156
+ ? found // found a selector INside this element
4157
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
4158
+ ) {
4159
+ return __Closest(base);
4160
+ }
4161
+ /* eslint-enable jsdoc/require-param */
4162
+
4163
+ /**
4164
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
4165
+ * @param {Object} elem - The element to check.
4166
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
4167
+ * @returns {void}
4168
+ */
4169
+ handleComponentTagRename(elem, tagName) {
4170
+ const tag = tagName.toLowerCase();
4171
+ const elemTag = elem.tagName.toLowerCase();
4172
+
4173
+ if (elemTag !== tag) {
4174
+ elem.setAttribute(tag, true);
4175
+ }
4176
+ }
4177
+
4178
+ /**
4179
+ * Validates if an element is a specific Auro component.
4180
+ * @param {Object} elem - The element to validate.
4181
+ * @param {String} tagName - The name of the Auro component to check against.
4182
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
4183
+ */
4184
+ elementMatch(elem, tagName) {
4185
+ const tag = tagName.toLowerCase();
4186
+ const elemTag = elem.tagName.toLowerCase();
4187
+
4188
+ return elemTag === tag || elem.hasAttribute(tag);
4189
+ }
4190
+ };
4191
+
4051
4192
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
4052
4193
  // See LICENSE in the project root for license information.
4053
4194
 
@@ -4080,7 +4221,7 @@ class AuroIcon extends BaseIcon {
4080
4221
  this.tertiary = false;
4081
4222
  this.warning = false;
4082
4223
  this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
4083
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
4224
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
4084
4225
  }
4085
4226
 
4086
4227
  // function to define props used within the scope of this component
@@ -4242,7 +4383,7 @@ class AuroIcon extends BaseIcon {
4242
4383
  *
4243
4384
  */
4244
4385
  static register(name = "auro-icon") {
4245
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
4386
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
4246
4387
  }
4247
4388
 
4248
4389
  connectedCallback() {
@@ -4310,6 +4451,76 @@ class AuroIcon extends BaseIcon {
4310
4451
 
4311
4452
  var iconVersion = '7.0.1';
4312
4453
 
4454
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
4455
+ // See LICENSE in the project root for license information.
4456
+
4457
+ // ---------------------------------------------------------------------
4458
+
4459
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
4460
+
4461
+ class AuroLibraryRuntimeUtils {
4462
+
4463
+ /* eslint-disable jsdoc/require-param */
4464
+
4465
+ /**
4466
+ * This will register a new custom element with the browser.
4467
+ * @param {String} name - The name of the custom element.
4468
+ * @param {Object} componentClass - The class to register as a custom element.
4469
+ * @returns {void}
4470
+ */
4471
+ registerComponent(name, componentClass) {
4472
+ if (!customElements.get(name)) {
4473
+ customElements.define(name, class extends componentClass {});
4474
+ }
4475
+ }
4476
+
4477
+ /**
4478
+ * Finds and returns the closest HTML Element based on a selector.
4479
+ * @returns {void}
4480
+ */
4481
+ closestElement(
4482
+ selector, // selector like in .closest()
4483
+ base = this, // extra functionality to skip a parent
4484
+ __Closest = (el, found = el && el.closest(selector)) =>
4485
+ !el || el === document || el === window
4486
+ ? null // standard .closest() returns null for non-found selectors also
4487
+ : found
4488
+ ? found // found a selector INside this element
4489
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
4490
+ ) {
4491
+ return __Closest(base);
4492
+ }
4493
+ /* eslint-enable jsdoc/require-param */
4494
+
4495
+ /**
4496
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
4497
+ * @param {Object} elem - The element to check.
4498
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
4499
+ * @returns {void}
4500
+ */
4501
+ handleComponentTagRename(elem, tagName) {
4502
+ const tag = tagName.toLowerCase();
4503
+ const elemTag = elem.tagName.toLowerCase();
4504
+
4505
+ if (elemTag !== tag) {
4506
+ elem.setAttribute(tag, true);
4507
+ }
4508
+ }
4509
+
4510
+ /**
4511
+ * Validates if an element is a specific Auro component.
4512
+ * @param {Object} elem - The element to validate.
4513
+ * @param {String} tagName - The name of the Auro component to check against.
4514
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
4515
+ */
4516
+ elementMatch(elem, tagName) {
4517
+ const tag = tagName.toLowerCase();
4518
+ const elemTag = elem.tagName.toLowerCase();
4519
+
4520
+ return elemTag === tag || elem.hasAttribute(tag);
4521
+ }
4522
+ }
4523
+
4313
4524
  var styleCss$3 = css`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
4314
4525
 
4315
4526
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
@@ -4463,11 +4674,11 @@ class AuroBibtemplate extends LitElement {
4463
4674
  constructor() {
4464
4675
  super();
4465
4676
 
4466
- AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
4677
+ AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
4467
4678
 
4468
4679
  const versioning = new AuroDependencyVersioning();
4469
- this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
4470
- this.headerTag = versioning.generateTag('auro-header', headerVersion, AuroHeader);
4680
+ this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
4681
+ this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
4471
4682
  }
4472
4683
 
4473
4684
  static get styles() {
@@ -4502,7 +4713,7 @@ class AuroBibtemplate extends LitElement {
4502
4713
  *
4503
4714
  */
4504
4715
  static register(name = "auro-bibtemplate") {
4505
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
4716
+ AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
4506
4717
  }
4507
4718
 
4508
4719
  /**
@@ -4741,7 +4952,7 @@ class AuroSelect extends LitElement {
4741
4952
  /**
4742
4953
  * @private
4743
4954
  */
4744
- this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
4955
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
4745
4956
 
4746
4957
  /**
4747
4958
  * Generate unique names for dependency components.
@@ -4751,12 +4962,12 @@ class AuroSelect extends LitElement {
4751
4962
  /**
4752
4963
  * @private
4753
4964
  */
4754
- this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
4965
+ this.dropdownTag = versioning.generateTag('auro-formkit-select-dropdown', dropdownVersion, AuroDropdown);
4755
4966
 
4756
4967
  /**
4757
4968
  * @private
4758
4969
  */
4759
- this.bibtemplateTag = versioning.generateTag('auro-bibtemplate', bibTemplateVersion, AuroBibtemplate);
4970
+ this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
4760
4971
 
4761
4972
  /**
4762
4973
  * @private
@@ -4959,7 +5170,7 @@ class AuroSelect extends LitElement {
4959
5170
  *
4960
5171
  */
4961
5172
  static register(name = "auro-select") {
4962
- AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroSelect);
5173
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroSelect);
4963
5174
  }
4964
5175
 
4965
5176
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-formkit",
3
- "version": "2.0.3-beta.1",
3
+ "version": "2.1.0-beta.2",
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": {
@@ -52,7 +52,6 @@
52
52
  "deploy-demo": "npm run build && sh ./deploy-components.sh"
53
53
  },
54
54
  "dependencies": {
55
- "@aurodesignsystem/auro-library": "^3.0.10",
56
55
  "lit": "^3.2.1",
57
56
  "@lit/reactive-element": "^2.0.4"
58
57
  },
@@ -60,6 +59,7 @@
60
59
  "@rollup/rollup-linux-x64-gnu": "*"
61
60
  },
62
61
  "devDependencies": {
62
+ "@aurodesignsystem/auro-library": "^3.0.13",
63
63
  "@aurodesignsystem/eslint-config": "^1.3.3",
64
64
  "@commitlint/cli": "^19.6.1",
65
65
  "@commitlint/config-conventional": "^19.6.0",