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

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 (40) 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 +164 -33
  5. package/components/combobox/demo/index.min.js +164 -33
  6. package/components/combobox/dist/index.js +152 -33
  7. package/components/combobox/dist/registered.js +152 -33
  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.md +9 -1
  14. package/components/datepicker/demo/api.min.js +791 -339
  15. package/components/datepicker/demo/index.md +68 -6
  16. package/components/datepicker/demo/index.min.js +791 -339
  17. package/components/datepicker/dist/auro-datepicker.d.ts +50 -11
  18. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  19. package/components/datepicker/dist/index.js +628 -176
  20. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  21. package/components/datepicker/dist/registered.js +628 -176
  22. package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
  23. package/components/input/demo/api.md +1 -0
  24. package/components/input/demo/api.min.js +90 -22
  25. package/components/input/demo/index.min.js +90 -22
  26. package/components/input/dist/auro-input.d.ts +174 -0
  27. package/components/input/dist/index.js +90 -22
  28. package/components/input/dist/registered.js +90 -22
  29. package/components/menu/demo/api.min.js +12 -0
  30. package/components/menu/demo/index.min.js +12 -0
  31. package/components/menu/dist/auro-menu.d.ts +6 -0
  32. package/components/menu/dist/index.js +12 -0
  33. package/components/menu/dist/registered.js +12 -0
  34. package/components/select/demo/api.min.js +94 -17
  35. package/components/select/demo/index.min.js +94 -17
  36. package/components/select/dist/auro-select.d.ts +7 -0
  37. package/components/select/dist/index.js +82 -17
  38. package/components/select/dist/registered.js +82 -17
  39. package/package.json +3 -3
  40. /package/components/datepicker/dist/styles/{emphasized/style-css.d.ts → snowflake/color-css.d.ts} +0 -0
@@ -5603,7 +5603,6 @@ let AuroElement$1 = class AuroElement extends LitElement {
5603
5603
  * @private
5604
5604
  */
5605
5605
  wrapper: {
5606
- type: HTMLElement,
5607
5606
  attribute: false,
5608
5607
  reflect: false
5609
5608
  }
@@ -5912,7 +5911,7 @@ class AuroLoader extends LitElement {
5912
5911
 
5913
5912
  var loaderVersion = '5.0.0';
5914
5913
 
5915
- /* eslint-disable max-lines, curly */
5914
+ /* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
5916
5915
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
5917
5916
  // See LICENSE in the project root for license information.
5918
5917
 
@@ -5979,6 +5978,21 @@ class AuroButton extends AuroElement$1 {
5979
5978
  * @private
5980
5979
  */
5981
5980
  this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
5981
+
5982
+ /**
5983
+ * @private
5984
+ */
5985
+ this.buttonHref = undefined;
5986
+
5987
+ /**
5988
+ * @private
5989
+ */
5990
+ this.buttonTarget = undefined;
5991
+
5992
+ /**
5993
+ * @private
5994
+ */
5995
+ this.buttonRel = undefined;
5982
5996
  }
5983
5997
 
5984
5998
  static get styles() {
@@ -6045,13 +6059,23 @@ class AuroButton extends AuroElement$1 {
6045
6059
  },
6046
6060
 
6047
6061
  /**
6048
- * Populates `tabIndex` to define the focusable sequence in keyboard navigation.
6062
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
6049
6063
  */
6050
6064
  tIndex: {
6051
6065
  type: String,
6052
6066
  reflect: true
6053
6067
  },
6054
6068
 
6069
+ /**
6070
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
6071
+ * Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
6072
+ * Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
6073
+ */
6074
+ tabindex: {
6075
+ type: String,
6076
+ reflect: false
6077
+ },
6078
+
6055
6079
  /**
6056
6080
  * Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
6057
6081
  */
@@ -6084,6 +6108,27 @@ class AuroButton extends AuroElement$1 {
6084
6108
  type: String,
6085
6109
  reflect: true
6086
6110
  },
6111
+
6112
+ /**
6113
+ * @private
6114
+ */
6115
+ buttonHref: {
6116
+ type: String,
6117
+ },
6118
+
6119
+ /**
6120
+ * @private
6121
+ */
6122
+ buttonTarget: {
6123
+ type: String,
6124
+ },
6125
+
6126
+ /**
6127
+ * @private
6128
+ */
6129
+ buttonRel: {
6130
+ type: String,
6131
+ },
6087
6132
  };
6088
6133
  }
6089
6134
 
@@ -6174,14 +6219,17 @@ class AuroButton extends AuroElement$1 {
6174
6219
  loading: this.loading,
6175
6220
  };
6176
6221
 
6222
+ const tag = this.buttonHref ? literal`a` : literal`button`;
6223
+ const part = this.buttonHref ? 'link' : 'button';
6224
+
6177
6225
  return html`
6178
- <button
6179
- part="button"
6226
+ <${tag}
6227
+ part="${part}"
6180
6228
  aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
6181
6229
  aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
6182
- tabIndex="${ifDefined(this.tIndex)}"
6230
+ tabindex="${ifDefined(this.tIndex || this.tabindex)}"
6183
6231
  ?autofocus="${this.autofocus}"
6184
- class="${classMap(classes)}"
6232
+ class=${classMap(classes)}
6185
6233
  ?disabled="${this.disabled || this.loading}"
6186
6234
  ?onDark="${this.onDark}"
6187
6235
  title="${ifDefined(this.title ? this.title : undefined)}"
@@ -6190,6 +6238,9 @@ class AuroButton extends AuroElement$1 {
6190
6238
  variant="${ifDefined(this.variant ? this.variant : undefined)}"
6191
6239
  .value="${ifDefined(this.value ? this.value : undefined)}"
6192
6240
  @click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
6241
+ href="${ifDefined(this.buttonHref || undefined)}"
6242
+ target="${ifDefined(this.buttonTarget || undefined)}"
6243
+ rel="${ifDefined(this.buttonRel || undefined)}"
6193
6244
  >
6194
6245
  ${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
6195
6246
 
@@ -6198,12 +6249,12 @@ class AuroButton extends AuroElement$1 {
6198
6249
  <slot></slot>
6199
6250
  </span>
6200
6251
  </span>
6201
- </button>
6252
+ </${tag}>
6202
6253
  `;
6203
6254
  }
6204
6255
 
6205
6256
  /**
6206
- * Renders the layout of the button
6257
+ * Renders the layout of the button.
6207
6258
  * @returns {TemplateResult}
6208
6259
  * @private
6209
6260
  */
@@ -6212,7 +6263,7 @@ class AuroButton extends AuroElement$1 {
6212
6263
  }
6213
6264
  }
6214
6265
 
6215
- var buttonVersion = '11.0.0';
6266
+ var buttonVersion = '11.2.1';
6216
6267
 
6217
6268
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
6218
6269
  // See LICENSE in the project root for license information.
@@ -8022,10 +8073,25 @@ class AuroSelect extends AuroElement$3 {
8022
8073
  // Set the initial value in auro-menu if defined
8023
8074
  if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
8024
8075
  this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
8025
- this.menu.value = this.value;
8076
+ if (this.menu) {
8077
+ this.menu.value = this.value;
8078
+ }
8026
8079
  }
8027
8080
  }
8028
8081
 
8082
+ /**
8083
+ * Update the menu value. With checks for menu existence. Awaits value update.
8084
+ * @param {string} value - The value to set in the menu.
8085
+ * @returns void
8086
+ * @private
8087
+ */
8088
+ async updateMenuValue(value) {
8089
+ if (!this.menu) return;
8090
+
8091
+ this.menu.value = value;
8092
+ await this.menu.updateComplete;
8093
+ }
8094
+
8029
8095
  async updated(changedProperties) {
8030
8096
  if (changedProperties.has('multiSelect')) {
8031
8097
  this.clearSelection();
@@ -8035,14 +8101,13 @@ class AuroSelect extends AuroElement$3 {
8035
8101
  if (this.value) {
8036
8102
  this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
8037
8103
 
8038
- this.menu.value = this.value;
8104
+ await this.updateMenuValue(this.value);
8039
8105
 
8040
- // Wait for menu to finish updating its value
8041
- await this.menu.updateComplete;
8042
-
8043
- this.optionSelected = this.menu.optionSelected;
8106
+ if (this.menu) {
8107
+ this.optionSelected = this.menu.optionSelected;
8108
+ }
8044
8109
  } else {
8045
- this.menu.value = undefined;
8110
+ await this.updateMenuValue(undefined);
8046
8111
  }
8047
8112
 
8048
8113
  this._updateNativeSelect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr624.17",
3
+ "version": "0.0.0-pr624.19",
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,7 @@
52
52
  "deploy-demo": "npm run build && sh ./deploy-components.sh"
53
53
  },
54
54
  "dependencies": {
55
- "@aurodesignsystem/auro-library": "^5.1.0",
55
+ "@aurodesignsystem/auro-library": "^5.2.0",
56
56
  "@lit/reactive-element": "^2.1.0",
57
57
  "lit": "^3.2.1"
58
58
  },
@@ -60,9 +60,9 @@
60
60
  "@rollup/rollup-linux-x64-gnu": "*"
61
61
  },
62
62
  "devDependencies": {
63
+ "@aurodesignsystem/design-tokens": "^8.2.0",
63
64
  "@aurodesignsystem/eslint-config": "^1.3.4",
64
65
  "@aurodesignsystem/webcorestylesheets": "^8.1.1",
65
- "@aurodesignsystem/design-tokens": "^8.2.0",
66
66
  "@commitlint/cli": "^19.8.0",
67
67
  "@commitlint/config-conventional": "^19.8.0",
68
68
  "@open-wc/testing": "^4.0.0",