@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
@@ -10918,22 +10918,17 @@ class BaseInput extends AuroElement$2$1 {
10918
10918
  * @returns {void}
10919
10919
  */
10920
10920
  getPlaceholder() {
10921
- const isFocused = this.inputElement === this.getActiveElement();
10921
+ this.inputElement === this.getActiveElement();
10922
10922
 
10923
10923
  // console.warn('isFocused', isFocused);
10924
10924
  // console.warn(this.inputElement);
10925
10925
  // console.warn(this.getActiveElement());
10926
10926
 
10927
- if (!isFocused) {
10928
- if (this.placeholder) {
10929
- this.placeholderStr = this.placeholder;
10930
- // return this.placeholder;
10931
- } else if (this.type === 'date') {
10932
- this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
10933
- // return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
10934
- }
10935
- } else {
10936
- this.placeholderStr = '';
10927
+ // if (!isFocused) {
10928
+ if (this.placeholder) {
10929
+ this.placeholderStr = this.placeholder;
10930
+ } else if (this.type === 'date') {
10931
+ this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
10937
10932
  }
10938
10933
 
10939
10934
  this.requestUpdate();
@@ -11920,7 +11915,6 @@ let AuroElement$3 = class AuroElement extends i$2 {
11920
11915
  * @private
11921
11916
  */
11922
11917
  wrapper: {
11923
- type: HTMLElement,
11924
11918
  attribute: false,
11925
11919
  reflect: false
11926
11920
  }
@@ -12229,7 +12223,7 @@ let AuroLoader$1 = class AuroLoader extends i$2 {
12229
12223
 
12230
12224
  var loaderVersion$1 = '5.0.0';
12231
12225
 
12232
- /* eslint-disable max-lines, curly */
12226
+ /* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
12233
12227
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
12234
12228
  // See LICENSE in the project root for license information.
12235
12229
 
@@ -12296,6 +12290,21 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12296
12290
  * @private
12297
12291
  */
12298
12292
  this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
12293
+
12294
+ /**
12295
+ * @private
12296
+ */
12297
+ this.buttonHref = undefined;
12298
+
12299
+ /**
12300
+ * @private
12301
+ */
12302
+ this.buttonTarget = undefined;
12303
+
12304
+ /**
12305
+ * @private
12306
+ */
12307
+ this.buttonRel = undefined;
12299
12308
  }
12300
12309
 
12301
12310
  static get styles() {
@@ -12362,13 +12371,23 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12362
12371
  },
12363
12372
 
12364
12373
  /**
12365
- * Populates `tabIndex` to define the focusable sequence in keyboard navigation.
12374
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
12366
12375
  */
12367
12376
  tIndex: {
12368
12377
  type: String,
12369
12378
  reflect: true
12370
12379
  },
12371
12380
 
12381
+ /**
12382
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
12383
+ * Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
12384
+ * Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
12385
+ */
12386
+ tabindex: {
12387
+ type: String,
12388
+ reflect: false
12389
+ },
12390
+
12372
12391
  /**
12373
12392
  * Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
12374
12393
  */
@@ -12401,6 +12420,27 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12401
12420
  type: String,
12402
12421
  reflect: true
12403
12422
  },
12423
+
12424
+ /**
12425
+ * @private
12426
+ */
12427
+ buttonHref: {
12428
+ type: String,
12429
+ },
12430
+
12431
+ /**
12432
+ * @private
12433
+ */
12434
+ buttonTarget: {
12435
+ type: String,
12436
+ },
12437
+
12438
+ /**
12439
+ * @private
12440
+ */
12441
+ buttonRel: {
12442
+ type: String,
12443
+ },
12404
12444
  };
12405
12445
  }
12406
12446
 
@@ -12491,14 +12531,17 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12491
12531
  loading: this.loading,
12492
12532
  };
12493
12533
 
12534
+ const tag = this.buttonHref ? i$1`a` : i$1`button`;
12535
+ const part = this.buttonHref ? 'link' : 'button';
12536
+
12494
12537
  return u$2`
12495
- <button
12496
- part="button"
12538
+ <${tag}
12539
+ part="${part}"
12497
12540
  aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
12498
12541
  aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
12499
- tabIndex="${o(this.tIndex)}"
12542
+ tabindex="${o(this.tIndex || this.tabindex)}"
12500
12543
  ?autofocus="${this.autofocus}"
12501
- class="${e(classes)}"
12544
+ class=${e(classes)}
12502
12545
  ?disabled="${this.disabled || this.loading}"
12503
12546
  ?onDark="${this.onDark}"
12504
12547
  title="${o(this.title ? this.title : undefined)}"
@@ -12507,6 +12550,9 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12507
12550
  variant="${o(this.variant ? this.variant : undefined)}"
12508
12551
  .value="${o(this.value ? this.value : undefined)}"
12509
12552
  @click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
12553
+ href="${o(this.buttonHref || undefined)}"
12554
+ target="${o(this.buttonTarget || undefined)}"
12555
+ rel="${o(this.buttonRel || undefined)}"
12510
12556
  >
12511
12557
  ${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
12512
12558
 
@@ -12515,12 +12561,12 @@ let AuroButton$1 = class AuroButton extends AuroElement$3 {
12515
12561
  <slot></slot>
12516
12562
  </span>
12517
12563
  </span>
12518
- </button>
12564
+ </${tag}>
12519
12565
  `;
12520
12566
  }
12521
12567
 
12522
12568
  /**
12523
- * Renders the layout of the button
12569
+ * Renders the layout of the button.
12524
12570
  * @returns {TemplateResult}
12525
12571
  * @private
12526
12572
  */
@@ -12775,6 +12821,20 @@ class AuroInput extends BaseInput {
12775
12821
  this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion$2, AuroIcon$2);
12776
12822
  }
12777
12823
 
12824
+ static get properties() {
12825
+ return {
12826
+ ...super.properties,
12827
+
12828
+ /**
12829
+ * @type {boolean}
12830
+ */
12831
+ hideInputVisually: {
12832
+ type: Boolean,
12833
+ reflect: true,
12834
+ }
12835
+ };
12836
+ }
12837
+
12778
12838
  static get styles() {
12779
12839
  return [
12780
12840
  i$5`${classicStyleCss}`,
@@ -12809,8 +12869,13 @@ class AuroInput extends BaseInput {
12809
12869
  * @returns {object} - Returns classmap.
12810
12870
  */
12811
12871
  get commonInputClasses() {
12872
+ console.log(`hideInputVisually: ${JSON.stringify(this.hideInputVisually)}`);
12812
12873
  return {
12813
- 'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
12874
+ 'util_displayHiddenVisually': this.hideInputVisually !== undefined
12875
+ ? this.hideInputVisually
12876
+ // eslint-disable-next-line no-warning-comments
12877
+ // TODO: refactor this to use a less brittle/forced solution.
12878
+ : this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
12814
12879
  };
12815
12880
  }
12816
12881
 
@@ -12822,7 +12887,10 @@ class AuroInput extends BaseInput {
12822
12887
  get legacyInputClasses() {
12823
12888
  return {
12824
12889
  ...this.commonInputClasses,
12825
- 'util_displayHiddenVisually': !this.hasFocus && !this.value
12890
+ 'util_displayHiddenVisually':
12891
+ this.hideInputVisually !== undefined
12892
+ ? this.hideInputVisually
12893
+ : !this.hasFocus && !this.value
12826
12894
  };
12827
12895
  }
12828
12896
 
@@ -13750,7 +13818,6 @@ let AuroElement$1$1 = class AuroElement extends i$2 {
13750
13818
  * @private
13751
13819
  */
13752
13820
  wrapper: {
13753
- type: HTMLElement,
13754
13821
  attribute: false,
13755
13822
  reflect: false
13756
13823
  }
@@ -14059,7 +14126,7 @@ class AuroLoader extends i$2 {
14059
14126
 
14060
14127
  var loaderVersion = '5.0.0';
14061
14128
 
14062
- /* eslint-disable max-lines, curly */
14129
+ /* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
14063
14130
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
14064
14131
  // See LICENSE in the project root for license information.
14065
14132
 
@@ -14126,6 +14193,21 @@ class AuroButton extends AuroElement$1$1 {
14126
14193
  * @private
14127
14194
  */
14128
14195
  this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
14196
+
14197
+ /**
14198
+ * @private
14199
+ */
14200
+ this.buttonHref = undefined;
14201
+
14202
+ /**
14203
+ * @private
14204
+ */
14205
+ this.buttonTarget = undefined;
14206
+
14207
+ /**
14208
+ * @private
14209
+ */
14210
+ this.buttonRel = undefined;
14129
14211
  }
14130
14212
 
14131
14213
  static get styles() {
@@ -14192,13 +14274,23 @@ class AuroButton extends AuroElement$1$1 {
14192
14274
  },
14193
14275
 
14194
14276
  /**
14195
- * Populates `tabIndex` to define the focusable sequence in keyboard navigation.
14277
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
14196
14278
  */
14197
14279
  tIndex: {
14198
14280
  type: String,
14199
14281
  reflect: true
14200
14282
  },
14201
14283
 
14284
+ /**
14285
+ * Populates `tabindex` to define the focusable sequence in keyboard navigation.
14286
+ * Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
14287
+ * Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
14288
+ */
14289
+ tabindex: {
14290
+ type: String,
14291
+ reflect: false
14292
+ },
14293
+
14202
14294
  /**
14203
14295
  * Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
14204
14296
  */
@@ -14231,6 +14323,27 @@ class AuroButton extends AuroElement$1$1 {
14231
14323
  type: String,
14232
14324
  reflect: true
14233
14325
  },
14326
+
14327
+ /**
14328
+ * @private
14329
+ */
14330
+ buttonHref: {
14331
+ type: String,
14332
+ },
14333
+
14334
+ /**
14335
+ * @private
14336
+ */
14337
+ buttonTarget: {
14338
+ type: String,
14339
+ },
14340
+
14341
+ /**
14342
+ * @private
14343
+ */
14344
+ buttonRel: {
14345
+ type: String,
14346
+ },
14234
14347
  };
14235
14348
  }
14236
14349
 
@@ -14321,14 +14434,17 @@ class AuroButton extends AuroElement$1$1 {
14321
14434
  loading: this.loading,
14322
14435
  };
14323
14436
 
14437
+ const tag = this.buttonHref ? i$1`a` : i$1`button`;
14438
+ const part = this.buttonHref ? 'link' : 'button';
14439
+
14324
14440
  return u$2`
14325
- <button
14326
- part="button"
14441
+ <${tag}
14442
+ part="${part}"
14327
14443
  aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
14328
14444
  aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
14329
- tabIndex="${o(this.tIndex)}"
14445
+ tabindex="${o(this.tIndex || this.tabindex)}"
14330
14446
  ?autofocus="${this.autofocus}"
14331
- class="${e(classes)}"
14447
+ class=${e(classes)}
14332
14448
  ?disabled="${this.disabled || this.loading}"
14333
14449
  ?onDark="${this.onDark}"
14334
14450
  title="${o(this.title ? this.title : undefined)}"
@@ -14337,6 +14453,9 @@ class AuroButton extends AuroElement$1$1 {
14337
14453
  variant="${o(this.variant ? this.variant : undefined)}"
14338
14454
  .value="${o(this.value ? this.value : undefined)}"
14339
14455
  @click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
14456
+ href="${o(this.buttonHref || undefined)}"
14457
+ target="${o(this.buttonTarget || undefined)}"
14458
+ rel="${o(this.buttonRel || undefined)}"
14340
14459
  >
14341
14460
  ${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
14342
14461
 
@@ -14345,12 +14464,12 @@ class AuroButton extends AuroElement$1$1 {
14345
14464
  <slot></slot>
14346
14465
  </span>
14347
14466
  </span>
14348
- </button>
14467
+ </${tag}>
14349
14468
  `;
14350
14469
  }
14351
14470
 
14352
14471
  /**
14353
- * Renders the layout of the button
14472
+ * Renders the layout of the button.
14354
14473
  * @returns {TemplateResult}
14355
14474
  * @private
14356
14475
  */
@@ -14359,7 +14478,7 @@ class AuroButton extends AuroElement$1$1 {
14359
14478
  }
14360
14479
  }
14361
14480
 
14362
- var buttonVersion = '11.0.0';
14481
+ var buttonVersion = '11.2.1';
14363
14482
 
14364
14483
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
14365
14484
  // See LICENSE in the project root for license information.
@@ -16255,10 +16374,10 @@ class AuroCombobox extends AuroElement$1 {
16255
16374
  this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
16256
16375
  this.input = this.dropdown.querySelector(this.inputTag._$litStatic$);
16257
16376
 
16258
- this.configureMenu();
16259
16377
  this.configureInput();
16260
16378
  this.configureDropdown();
16261
16379
  this.configureCombobox();
16380
+ this.configureMenu();
16262
16381
 
16263
16382
  // Set the initial value in auro-menu if defined
16264
16383
  if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
@@ -16717,6 +16836,7 @@ class AuroMenu extends AuroElement$1 {
16717
16836
  this.addEventListener('mousedown', this.handleMouseSelect);
16718
16837
  this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
16719
16838
  this.addEventListener('slotchange', this.handleSlotChange);
16839
+ this.setTagAttribute("auro-menu");
16720
16840
  }
16721
16841
 
16722
16842
  disconnectedCallback() {
@@ -16735,6 +16855,17 @@ class AuroMenu extends AuroElement$1 {
16735
16855
  this.initializeMenu();
16736
16856
  }
16737
16857
 
16858
+ /**
16859
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
16860
+ * @param {string} tagName - The tag name to set as an attribute.
16861
+ * @private
16862
+ */
16863
+ setTagAttribute(tagName) {
16864
+ if (this.tagName.toLowerCase() !== tagName) {
16865
+ this.setAttribute(tagName, true);
16866
+ }
16867
+ }
16868
+
16738
16869
  updated(changedProperties) {
16739
16870
  super.updated(changedProperties);
16740
16871