@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.17 → 0.0.0-pr624.18

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 (31) hide show
  1. package/components/bibtemplate/dist/buttonVersion.d.ts +1 -1
  2. package/components/bibtemplate/dist/index.js +61 -10
  3. package/components/bibtemplate/dist/registered.js +61 -10
  4. package/components/combobox/demo/api.min.js +134 -20
  5. package/components/combobox/demo/index.min.js +134 -20
  6. package/components/combobox/dist/index.js +122 -20
  7. package/components/combobox/dist/registered.js +122 -20
  8. package/components/counter/demo/api.min.js +159 -33
  9. package/components/counter/demo/index.min.js +159 -33
  10. package/components/counter/dist/auro-counter.d.ts +6 -0
  11. package/components/counter/dist/index.js +159 -33
  12. package/components/counter/dist/registered.js +159 -33
  13. package/components/datepicker/demo/api.min.js +181 -28
  14. package/components/datepicker/demo/index.min.js +181 -28
  15. package/components/datepicker/dist/index.js +181 -28
  16. package/components/datepicker/dist/registered.js +181 -28
  17. package/components/input/demo/api.min.js +60 -9
  18. package/components/input/demo/index.min.js +60 -9
  19. package/components/input/dist/index.js +60 -9
  20. package/components/input/dist/registered.js +60 -9
  21. package/components/menu/demo/api.min.js +12 -0
  22. package/components/menu/demo/index.min.js +12 -0
  23. package/components/menu/dist/auro-menu.d.ts +6 -0
  24. package/components/menu/dist/index.js +12 -0
  25. package/components/menu/dist/registered.js +12 -0
  26. package/components/select/demo/api.min.js +94 -17
  27. package/components/select/demo/index.min.js +94 -17
  28. package/components/select/dist/auro-select.d.ts +7 -0
  29. package/components/select/dist/index.js +82 -17
  30. package/components/select/dist/registered.js +82 -17
  31. package/package.json +3 -3
@@ -419,7 +419,6 @@ let AuroElement$5 = class AuroElement extends i$2 {
419
419
  * @private
420
420
  */
421
421
  wrapper: {
422
- type: HTMLElement,
423
422
  attribute: false,
424
423
  reflect: false
425
424
  }
@@ -857,7 +856,7 @@ let AuroLoader$1 = class AuroLoader extends i$2 {
857
856
 
858
857
  var loaderVersion$1 = '5.0.0';
859
858
 
860
- /* eslint-disable max-lines, curly */
859
+ /* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
861
860
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
862
861
  // See LICENSE in the project root for license information.
863
862
 
@@ -924,6 +923,21 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
924
923
  * @private
925
924
  */
926
925
  this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
926
+
927
+ /**
928
+ * @private
929
+ */
930
+ this.buttonHref = undefined;
931
+
932
+ /**
933
+ * @private
934
+ */
935
+ this.buttonTarget = undefined;
936
+
937
+ /**
938
+ * @private
939
+ */
940
+ this.buttonRel = undefined;
927
941
  }
928
942
 
929
943
  static get styles() {
@@ -990,13 +1004,23 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
990
1004
  },
991
1005
 
992
1006
  /**
993
- * Populates `tabIndex` to define the focusable sequence in keyboard navigation.
1007
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
994
1008
  */
995
1009
  tIndex: {
996
1010
  type: String,
997
1011
  reflect: true
998
1012
  },
999
1013
 
1014
+ /**
1015
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
1016
+ * Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
1017
+ * Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
1018
+ */
1019
+ tabindex: {
1020
+ type: String,
1021
+ reflect: false
1022
+ },
1023
+
1000
1024
  /**
1001
1025
  * Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
1002
1026
  */
@@ -1029,6 +1053,27 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
1029
1053
  type: String,
1030
1054
  reflect: true
1031
1055
  },
1056
+
1057
+ /**
1058
+ * @private
1059
+ */
1060
+ buttonHref: {
1061
+ type: String,
1062
+ },
1063
+
1064
+ /**
1065
+ * @private
1066
+ */
1067
+ buttonTarget: {
1068
+ type: String,
1069
+ },
1070
+
1071
+ /**
1072
+ * @private
1073
+ */
1074
+ buttonRel: {
1075
+ type: String,
1076
+ },
1032
1077
  };
1033
1078
  }
1034
1079
 
@@ -1119,14 +1164,17 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
1119
1164
  loading: this.loading,
1120
1165
  };
1121
1166
 
1167
+ const tag = this.buttonHref ? i$1`a` : i$1`button`;
1168
+ const part = this.buttonHref ? 'link' : 'button';
1169
+
1122
1170
  return u`
1123
- <button
1124
- part="button"
1171
+ <${tag}
1172
+ part="${part}"
1125
1173
  aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
1126
1174
  aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
1127
- tabIndex="${o(this.tIndex)}"
1175
+ tabindex="${o(this.tIndex || this.tabindex)}"
1128
1176
  ?autofocus="${this.autofocus}"
1129
- class="${e(classes)}"
1177
+ class=${e(classes)}
1130
1178
  ?disabled="${this.disabled || this.loading}"
1131
1179
  ?onDark="${this.onDark}"
1132
1180
  title="${o(this.title ? this.title : undefined)}"
@@ -1135,6 +1183,9 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
1135
1183
  variant="${o(this.variant ? this.variant : undefined)}"
1136
1184
  .value="${o(this.value ? this.value : undefined)}"
1137
1185
  @click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
1186
+ href="${o(this.buttonHref || undefined)}"
1187
+ target="${o(this.buttonTarget || undefined)}"
1188
+ rel="${o(this.buttonRel || undefined)}"
1138
1189
  >
1139
1190
  ${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
1140
1191
 
@@ -1143,12 +1194,12 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
1143
1194
  <slot></slot>
1144
1195
  </span>
1145
1196
  </span>
1146
- </button>
1197
+ </${tag}>
1147
1198
  `;
1148
1199
  }
1149
1200
 
1150
1201
  /**
1151
- * Renders the layout of the button
1202
+ * Renders the layout of the button.
1152
1203
  * @returns {TemplateResult}
1153
1204
  * @private
1154
1205
  */
@@ -2662,6 +2713,18 @@ class AuroCounter extends i$2 {
2662
2713
 
2663
2714
  firstUpdated() {
2664
2715
  this.initValue();
2716
+ this.setTagAttribute("auro-counter");
2717
+ }
2718
+
2719
+ /**
2720
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
2721
+ * @param {string} tagName - The tag name to set as an attribute.
2722
+ * @private
2723
+ */
2724
+ setTagAttribute(tagName) {
2725
+ if (this.tagName.toLowerCase() !== tagName) {
2726
+ this.setAttribute(tagName, true);
2727
+ }
2665
2728
  }
2666
2729
 
2667
2730
  /**
@@ -2702,14 +2765,24 @@ class AuroCounter extends i$2 {
2702
2765
  <label id="counter-label" class="label"><slot @slotchange="${this.onDefaultSlotChange}" ></slot></label>
2703
2766
  <slot id="counter-description" name="description"></slot>
2704
2767
  </div>
2705
- <div part="counterControl" aria-labelledby="counter-label" aria-describedby="counter-description" tabindex="${this.disabled ? '-1' : '0'}" role="spinbutton" aria-valuemin="${this.min}" aria-valuemax="${this.max}" aria-valuenow="${this.value}">
2768
+ <div
2769
+ part="counterControl"
2770
+ aria-labelledby="counter-label"
2771
+ aria-describedby="counter-description"
2772
+ tabindex="${this.disabled ? '-1' : '0'}"
2773
+ role="spinbutton"
2774
+ aria-valuemin="${this.min}"
2775
+ aria-valuemax="${this.max}"
2776
+ aria-valuenow="${this.value}"
2777
+ aria-valuetext="${this.value !== undefined ? this.value : this.min}"
2778
+ >
2706
2779
  <auro-counter-button
2707
- aria-hidden="true"
2708
- tindex="-1"
2709
- part="controlMinus"
2710
- @click="${() => this.decrement()}"
2711
- ?onDark="${this.onDark}"
2712
- ?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
2780
+ aria-hidden="true"
2781
+ .tabindex="${'-1'}"
2782
+ part="controlMinus"
2783
+ @click="${() => this.decrement()}"
2784
+ ?onDark="${this.onDark}"
2785
+ ?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
2713
2786
  >
2714
2787
  <${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
2715
2788
  </auro-counter-button>
@@ -2719,12 +2792,12 @@ class AuroCounter extends i$2 {
2719
2792
  </div>
2720
2793
 
2721
2794
  <auro-counter-button
2722
- aria-hidden="true"
2723
- tindex="-1"
2724
- part="controlPlus"
2725
- @click="${() => this.increment()}"
2726
- ?onDark="${this.onDark}"
2727
- ?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
2795
+ aria-hidden="true"
2796
+ .tabindex="${'-1'}"
2797
+ part="controlPlus"
2798
+ @click="${() => this.increment()}"
2799
+ ?onDark="${this.onDark}"
2800
+ ?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
2728
2801
  >
2729
2802
  <${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
2730
2803
  </auro-counter-button>
@@ -7351,7 +7424,6 @@ let AuroElement$1 = class AuroElement extends i$2 {
7351
7424
  * @private
7352
7425
  */
7353
7426
  wrapper: {
7354
- type: HTMLElement,
7355
7427
  attribute: false,
7356
7428
  reflect: false
7357
7429
  }
@@ -7660,7 +7732,7 @@ class AuroLoader extends i$2 {
7660
7732
 
7661
7733
  var loaderVersion = '5.0.0';
7662
7734
 
7663
- /* eslint-disable max-lines, curly */
7735
+ /* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
7664
7736
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
7665
7737
  // See LICENSE in the project root for license information.
7666
7738
 
@@ -7727,6 +7799,21 @@ class AuroButton extends AuroElement$1 {
7727
7799
  * @private
7728
7800
  */
7729
7801
  this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
7802
+
7803
+ /**
7804
+ * @private
7805
+ */
7806
+ this.buttonHref = undefined;
7807
+
7808
+ /**
7809
+ * @private
7810
+ */
7811
+ this.buttonTarget = undefined;
7812
+
7813
+ /**
7814
+ * @private
7815
+ */
7816
+ this.buttonRel = undefined;
7730
7817
  }
7731
7818
 
7732
7819
  static get styles() {
@@ -7793,13 +7880,23 @@ class AuroButton extends AuroElement$1 {
7793
7880
  },
7794
7881
 
7795
7882
  /**
7796
- * Populates `tabIndex` to define the focusable sequence in keyboard navigation.
7883
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
7797
7884
  */
7798
7885
  tIndex: {
7799
7886
  type: String,
7800
7887
  reflect: true
7801
7888
  },
7802
7889
 
7890
+ /**
7891
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
7892
+ * Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
7893
+ * Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
7894
+ */
7895
+ tabindex: {
7896
+ type: String,
7897
+ reflect: false
7898
+ },
7899
+
7803
7900
  /**
7804
7901
  * Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
7805
7902
  */
@@ -7832,6 +7929,27 @@ class AuroButton extends AuroElement$1 {
7832
7929
  type: String,
7833
7930
  reflect: true
7834
7931
  },
7932
+
7933
+ /**
7934
+ * @private
7935
+ */
7936
+ buttonHref: {
7937
+ type: String,
7938
+ },
7939
+
7940
+ /**
7941
+ * @private
7942
+ */
7943
+ buttonTarget: {
7944
+ type: String,
7945
+ },
7946
+
7947
+ /**
7948
+ * @private
7949
+ */
7950
+ buttonRel: {
7951
+ type: String,
7952
+ },
7835
7953
  };
7836
7954
  }
7837
7955
 
@@ -7922,14 +8040,17 @@ class AuroButton extends AuroElement$1 {
7922
8040
  loading: this.loading,
7923
8041
  };
7924
8042
 
8043
+ const tag = this.buttonHref ? i$1`a` : i$1`button`;
8044
+ const part = this.buttonHref ? 'link' : 'button';
8045
+
7925
8046
  return u`
7926
- <button
7927
- part="button"
8047
+ <${tag}
8048
+ part="${part}"
7928
8049
  aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
7929
8050
  aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
7930
- tabIndex="${o(this.tIndex)}"
8051
+ tabindex="${o(this.tIndex || this.tabindex)}"
7931
8052
  ?autofocus="${this.autofocus}"
7932
- class="${e(classes)}"
8053
+ class=${e(classes)}
7933
8054
  ?disabled="${this.disabled || this.loading}"
7934
8055
  ?onDark="${this.onDark}"
7935
8056
  title="${o(this.title ? this.title : undefined)}"
@@ -7938,6 +8059,9 @@ class AuroButton extends AuroElement$1 {
7938
8059
  variant="${o(this.variant ? this.variant : undefined)}"
7939
8060
  .value="${o(this.value ? this.value : undefined)}"
7940
8061
  @click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
8062
+ href="${o(this.buttonHref || undefined)}"
8063
+ target="${o(this.buttonTarget || undefined)}"
8064
+ rel="${o(this.buttonRel || undefined)}"
7941
8065
  >
7942
8066
  ${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
7943
8067
 
@@ -7946,12 +8070,12 @@ class AuroButton extends AuroElement$1 {
7946
8070
  <slot></slot>
7947
8071
  </span>
7948
8072
  </span>
7949
- </button>
8073
+ </${tag}>
7950
8074
  `;
7951
8075
  }
7952
8076
 
7953
8077
  /**
7954
- * Renders the layout of the button
8078
+ * Renders the layout of the button.
7955
8079
  * @returns {TemplateResult}
7956
8080
  * @private
7957
8081
  */
@@ -7960,7 +8084,7 @@ class AuroButton extends AuroElement$1 {
7960
8084
  }
7961
8085
  }
7962
8086
 
7963
- var buttonVersion = '11.0.0';
8087
+ var buttonVersion = '11.2.1';
7964
8088
 
7965
8089
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
7966
8090
  // See LICENSE in the project root for license information.
@@ -9114,7 +9238,7 @@ function isFocusableComponent(element) {
9114
9238
  const componentName = element.tagName.toLowerCase();
9115
9239
 
9116
9240
  // Guard Clause: Element is a focusable component
9117
- if (!FOCUSABLE_COMPONENTS.includes(componentName)) return false;
9241
+ if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
9118
9242
 
9119
9243
  // Guard Clause: Element is not disabled
9120
9244
  if (element.hasAttribute('disabled')) return false;
@@ -9435,6 +9559,8 @@ class AuroCounterGroup extends AuroElement {
9435
9559
  static get properties() {
9436
9560
  return {
9437
9561
 
9562
+ ...super.properties,
9563
+
9438
9564
  /**
9439
9565
  * If declared, bib's position will be automatically calculated where to appear.
9440
9566
  * @default false
@@ -83,6 +83,12 @@ export class AuroCounter extends LitElement {
83
83
  */
84
84
  private handleKeyDown;
85
85
  firstUpdated(): void;
86
+ /**
87
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
88
+ * @param {string} tagName - The tag name to set as an attribute.
89
+ * @private
90
+ */
91
+ private setTagAttribute;
86
92
  /**
87
93
  * Handles the change event for the default slot.
88
94
  * Updates the defaultSlot property with the trimmed text content of the first assigned node.