q2-tecton-elements 1.25.2 → 1.25.4

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 (65) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/q2-badge_2.cjs.entry.js +1 -1
  3. package/dist/cjs/q2-btn_2.cjs.entry.js +5 -3
  4. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  5. package/dist/cjs/q2-optgroup_2.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-option-list_2.cjs.entry.js +9 -5
  7. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-select.cjs.entry.js +19 -15
  9. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/q2-btn/index.js +22 -3
  13. package/dist/collection/components/q2-calendar/helpers.js +2 -2
  14. package/dist/collection/components/q2-calendar/index.js +1 -1
  15. package/dist/collection/components/q2-input/index.js +12 -7
  16. package/dist/collection/components/q2-option/index.js +1 -1
  17. package/dist/collection/components/q2-option-list/index.js +33 -25
  18. package/dist/collection/components/q2-pill/index.js +1 -1
  19. package/dist/collection/components/q2-popover/styles.css +2 -3
  20. package/dist/collection/components/q2-select/index.js +36 -14
  21. package/dist/collection/components/q2-select/styles.css +41 -3
  22. package/dist/collection/components/q2-tag/index.js +1 -1
  23. package/dist/components/index12.js +1 -1
  24. package/dist/components/index13.js +10 -6
  25. package/dist/components/index14.js +1 -1
  26. package/dist/components/index5.js +6 -3
  27. package/dist/components/index8.js +2 -2
  28. package/dist/components/q2-calendar.js +3 -3
  29. package/dist/components/q2-pill.js +1 -1
  30. package/dist/components/q2-select.js +21 -16
  31. package/dist/components/q2-tag.js +1 -1
  32. package/dist/docs.json +56 -28
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/q2-badge_2.entry.js +1 -1
  35. package/dist/esm/q2-btn_2.entry.js +5 -3
  36. package/dist/esm/q2-calendar.entry.js +3 -3
  37. package/dist/esm/q2-optgroup_2.entry.js +1 -1
  38. package/dist/esm/q2-option-list_2.entry.js +10 -6
  39. package/dist/esm/q2-pill.entry.js +1 -1
  40. package/dist/esm/q2-select.entry.js +20 -16
  41. package/dist/esm/q2-tag.entry.js +1 -1
  42. package/dist/esm/q2-tecton-elements.js +1 -1
  43. package/dist/q2-tecton-elements/p-1f16d0f8.entry.js +1 -0
  44. package/dist/q2-tecton-elements/p-2ee8d7ae.entry.js +1 -0
  45. package/dist/q2-tecton-elements/p-30391257.entry.js +1 -0
  46. package/dist/q2-tecton-elements/p-933dc856.entry.js +1 -0
  47. package/dist/q2-tecton-elements/{p-8b5639a1.entry.js → p-954534b8.entry.js} +1 -1
  48. package/dist/q2-tecton-elements/{p-f0a716dd.entry.js → p-c24aa7d6.entry.js} +1 -1
  49. package/dist/q2-tecton-elements/p-f3dad195.entry.js +1 -0
  50. package/dist/q2-tecton-elements/p-f8423314.entry.js +1 -0
  51. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  52. package/dist/test/helpers.js +7 -0
  53. package/dist/types/components/q2-btn/index.d.ts +2 -0
  54. package/dist/types/components/q2-input/index.d.ts +3 -2
  55. package/dist/types/components/q2-option-list/index.d.ts +5 -1
  56. package/dist/types/components/q2-select/index.d.ts +4 -3
  57. package/dist/types/components.d.ts +17 -4
  58. package/dist/types/workspace/workspace/tecton-production_release_1.25.x/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -1
  59. package/package.json +3 -3
  60. package/dist/q2-tecton-elements/p-0a394c3b.entry.js +0 -1
  61. package/dist/q2-tecton-elements/p-3fe98171.entry.js +0 -1
  62. package/dist/q2-tecton-elements/p-471e5d58.entry.js +0 -1
  63. package/dist/q2-tecton-elements/p-721d0aee.entry.js +0 -1
  64. package/dist/q2-tecton-elements/p-aafb9537.entry.js +0 -1
  65. package/dist/q2-tecton-elements/p-fa8cb091.entry.js +0 -1
@@ -11,7 +11,7 @@ export function formatDateShort(value) {
11
11
  if (!isValidDate(date))
12
12
  return;
13
13
  const isoDate = date.toISOString();
14
- return new Intl.DateTimeFormat('default', {
14
+ return new Intl.DateTimeFormat('en-US', {
15
15
  month: '2-digit',
16
16
  day: '2-digit',
17
17
  year: 'numeric',
@@ -22,7 +22,7 @@ export function formatDateLong(value) {
22
22
  const date = new Date(value);
23
23
  if (!isValidDate(date))
24
24
  return;
25
- return new Intl.DateTimeFormat('default', {
25
+ return new Intl.DateTimeFormat('en-US', {
26
26
  month: 'short',
27
27
  day: 'numeric',
28
28
  year: 'numeric',
@@ -350,7 +350,7 @@ export class Q2Calendar {
350
350
  return '';
351
351
  if (displayFormat)
352
352
  return format(dateValue, convertMomentFormat(displayFormat));
353
- return new Intl.DateTimeFormat('default', {
353
+ return new Intl.DateTimeFormat('en-US', {
354
354
  year: 'numeric',
355
355
  month: '2-digit',
356
356
  day: '2-digit',
@@ -97,8 +97,8 @@ export class Q2Input {
97
97
  this.textHidden = undefined;
98
98
  this.badgeValue = undefined;
99
99
  this.badgeTheme = undefined;
100
- this.ariaControls = undefined;
101
100
  this.role = undefined;
101
+ this.ariaControls = undefined;
102
102
  this.ariaOwns = undefined;
103
103
  this.ariaLabel = undefined;
104
104
  this.ariaHaspopup = undefined;
@@ -857,9 +857,14 @@ export class Q2Input {
857
857
  "type": "string",
858
858
  "mutable": false,
859
859
  "complexType": {
860
- "original": "'primary' | 'secondary' | 'tertiary'",
860
+ "original": "Q2Badge['theme']",
861
861
  "resolved": "\"primary\" | \"secondary\" | \"tertiary\"",
862
- "references": {}
862
+ "references": {
863
+ "Q2Badge": {
864
+ "location": "import",
865
+ "path": "../q2-badge"
866
+ }
867
+ }
863
868
  },
864
869
  "required": false,
865
870
  "optional": false,
@@ -870,7 +875,7 @@ export class Q2Input {
870
875
  "attribute": "badge-theme",
871
876
  "reflect": true
872
877
  },
873
- "ariaControls": {
878
+ "role": {
874
879
  "type": "string",
875
880
  "mutable": false,
876
881
  "complexType": {
@@ -884,10 +889,10 @@ export class Q2Input {
884
889
  "tags": [],
885
890
  "text": ""
886
891
  },
887
- "attribute": "aria-controls",
892
+ "attribute": "role",
888
893
  "reflect": false
889
894
  },
890
- "role": {
895
+ "ariaControls": {
891
896
  "type": "string",
892
897
  "mutable": false,
893
898
  "complexType": {
@@ -901,7 +906,7 @@ export class Q2Input {
901
906
  "tags": [],
902
907
  "text": ""
903
908
  },
904
- "attribute": "role",
909
+ "attribute": "aria-controls",
905
910
  "reflect": false
906
911
  },
907
912
  "ariaOwns": {
@@ -23,7 +23,7 @@ export class Q2Option {
23
23
  render() {
24
24
  const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
25
25
  const isDisabled = disabled || disabledGroup;
26
- return (h(Host, { tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": selected ? 'true' : undefined, "aria-hidden": _multiSelectHidden ? 'true' : undefined }, this.selected && h("q2-icon", { type: "checkmark" }), h("div", { class: "content" }, h("slot", null))));
26
+ return (h(Host, { tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined }, this.selected && h("q2-icon", { type: "checkmark" }), h("div", { class: "content" }, h("slot", null))));
27
27
  }
28
28
  static get is() { return "q2-option"; }
29
29
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,5 @@
1
1
  import { h, Host, } from '@stencil/core';
2
- import { isEventFromElement, nextPaint, overrideFocus, waitForNextPaint } from 'src/utils';
2
+ import { isEventFromElement, loc, nextPaint, overrideFocus, waitForNextPaint } from 'src/utils';
3
3
  export class Q2OptionList {
4
4
  constructor() {
5
5
  this.scheduledAfterRender = [];
@@ -18,21 +18,23 @@ export class Q2OptionList {
18
18
  this.searchOptions(key, true);
19
19
  break;
20
20
  }
21
- else if (this.role === 'menu') {
21
+ else if (this.type === 'menu') {
22
22
  this.activeIndex = 0;
23
23
  this.openDropdownWithActiveElement(0);
24
24
  }
25
25
  else {
26
26
  this.setDefaultActiveElement();
27
+ nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));
27
28
  }
28
29
  break;
29
30
  case 'Enter':
30
- if (this.role === 'menu') {
31
+ if (this.type === 'menu') {
31
32
  this.activeIndex = 0;
32
33
  this.openDropdownWithActiveElement(0);
33
34
  }
34
35
  else {
35
36
  this.setDefaultActiveElement();
37
+ nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));
36
38
  }
37
39
  break;
38
40
  case 'ArrowUp':
@@ -162,6 +164,8 @@ export class Q2OptionList {
162
164
  case 'Tab':
163
165
  if (shiftKey)
164
166
  break;
167
+ if (this.multiple && this.type === 'listbox')
168
+ break;
165
169
  newOption = allOptions.find(element => element.active);
166
170
  if (!newOption || newOption.disabled)
167
171
  return;
@@ -196,7 +200,6 @@ export class Q2OptionList {
196
200
  const option = target.closest('q2-option');
197
201
  this.selectOption(option);
198
202
  };
199
- this.role = 'listbox';
200
203
  this.customSearch = undefined;
201
204
  this.noSelect = undefined;
202
205
  this.align = undefined;
@@ -204,7 +207,8 @@ export class Q2OptionList {
204
207
  this.multiple = undefined;
205
208
  this.disabled = undefined;
206
209
  this.showSelected = undefined;
207
- this.type = undefined;
210
+ this.type = 'listbox';
211
+ this.label = loc('tecton.element.optionList.label');
208
212
  this.hasOptions = undefined;
209
213
  }
210
214
  /// LifeCycle Hooks ///
@@ -493,24 +497,6 @@ export class Q2OptionList {
493
497
  }
494
498
  static get properties() {
495
499
  return {
496
- "role": {
497
- "type": "string",
498
- "mutable": false,
499
- "complexType": {
500
- "original": "'listbox' | 'menu'",
501
- "resolved": "\"listbox\" | \"menu\"",
502
- "references": {}
503
- },
504
- "required": false,
505
- "optional": false,
506
- "docs": {
507
- "tags": [],
508
- "text": ""
509
- },
510
- "attribute": "role",
511
- "reflect": true,
512
- "defaultValue": "'listbox'"
513
- },
514
500
  "customSearch": {
515
501
  "type": "boolean",
516
502
  "mutable": false,
@@ -643,12 +629,34 @@ export class Q2OptionList {
643
629
  },
644
630
  "required": false,
645
631
  "optional": false,
632
+ "docs": {
633
+ "tags": [{
634
+ "name": "type",
635
+ "text": "{('menu' | 'listbox')}"
636
+ }],
637
+ "text": "Translates to the role of the option list"
638
+ },
639
+ "attribute": "type",
640
+ "reflect": false,
641
+ "defaultValue": "'listbox'"
642
+ },
643
+ "label": {
644
+ "type": "string",
645
+ "mutable": false,
646
+ "complexType": {
647
+ "original": "string",
648
+ "resolved": "string",
649
+ "references": {}
650
+ },
651
+ "required": false,
652
+ "optional": false,
646
653
  "docs": {
647
654
  "tags": [],
648
655
  "text": ""
649
656
  },
650
- "attribute": "type",
651
- "reflect": false
657
+ "attribute": "label",
658
+ "reflect": false,
659
+ "defaultValue": "loc('tecton.element.optionList.label')"
652
660
  }
653
661
  };
654
662
  }
@@ -176,7 +176,7 @@ export class Q2Pill {
176
176
  wrapperClassNames.push('has-icon');
177
177
  if (hasOptions)
178
178
  wrapperClassNames.push('has-options');
179
- return (h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' ') }, h("div", { class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { class: "btn-primary", "test-id": "btn-control", type: "button", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, disabled: this.disabled, "aria-selected": !hasOptions && active ? 'true' : 'false', "aria-roledescription": !hasOptions && 'filter', "aria-controls": hasOptions && 'option-list', "aria-haspopup": hasOptions && 'true', "aria-expanded": (hasOptions && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent }, this.truncatedButtonContent, !hasOptions && active && h("span", { class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon()), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { role: "menu", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements() }, h("slot", null))))));
179
+ return (h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' ') }, h("div", { class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { class: "btn-primary", "test-id": "btn-control", type: "button", role: "combobox", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, disabled: this.disabled, "aria-selected": !hasOptions && active ? 'true' : 'false', "aria-roledescription": !hasOptions && 'filter', "aria-controls": hasOptions && 'option-list', "aria-haspopup": hasOptions && 'true', "aria-expanded": (hasOptions && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent }, this.truncatedButtonContent, !hasOptions && active && h("span", { class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon()), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements() }, h("slot", null))))));
180
180
  }
181
181
  static get is() { return "q2-pill"; }
182
182
  static get encapsulation() { return "shadow"; }
@@ -127,14 +127,13 @@ button {
127
127
  text-align: end;
128
128
  left: unset;
129
129
  }
130
- .container :host([open]) {
131
- display: block;
130
+ :host([open]) .container {
131
+ visibility: visible;
132
132
  }
133
133
  :host([open]) .container.show {
134
134
  height: auto;
135
135
  overflow: auto;
136
136
  opacity: 1;
137
- visibility: visible;
138
137
  }
139
138
  .container.up {
140
139
  bottom: var(--comp-pop-offset);
@@ -5,12 +5,10 @@ export class Q2Select {
5
5
  constructor() {
6
6
  var _a;
7
7
  this.scheduledAfterRender = [];
8
- this.showSelectedOptions = (event) => {
9
- event.stopPropagation();
8
+ this.showSelectedOptions = () => {
10
9
  this.showSelected = true;
11
10
  };
12
- this.showAllOptions = (event) => {
13
- event === null || event === void 0 ? void 0 : event.stopPropagation();
11
+ this.showAllOptions = () => {
14
12
  this.showSelected = false;
15
13
  };
16
14
  this.onMutationObserved = () => {
@@ -60,17 +58,20 @@ export class Q2Select {
60
58
  return;
61
59
  if (this.shouldClearSearchText(event))
62
60
  this.clearSearchText();
61
+ // Prevent click event from firing when spacebar is pressed
62
+ if (event.key === ' ')
63
+ event.preventDefault();
63
64
  this.optionList.handleExternalKeydown(event);
64
65
  };
65
66
  this.visibilityToggleKeyDown = (event) => {
66
- const keysForOptionListToHandle = ['ArrowDown', 'ArrowUp'];
67
- const keysThatTriggerClick = ['Enter', ' '];
68
67
  const key = event.key;
69
- if (keysForOptionListToHandle.includes(key)) {
70
- this.optionList.handleExternalKeydown(event);
71
- }
72
- else if (keysThatTriggerClick.includes(key)) {
73
- event.target.dispatchEvent(new MouseEvent('click'));
68
+ const isShiftTab = key === 'Tab' && event.shiftKey;
69
+ const isRadioControlKey = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(key);
70
+ if (isRadioControlKey)
71
+ event.stopPropagation();
72
+ if (isShiftTab) {
73
+ event.stopPropagation();
74
+ this.optionList.setDefaultActiveElement();
74
75
  }
75
76
  };
76
77
  this.inputClickHandler = async (event) => {
@@ -126,6 +127,7 @@ export class Q2Select {
126
127
  this.disabled = false;
127
128
  this.readonly = false;
128
129
  this.invalid = undefined;
130
+ this.listLabel = loc('tecton.element.select.listLabel');
129
131
  this.errors = undefined;
130
132
  this.multiple = false;
131
133
  this.minRows = 3;
@@ -454,16 +456,18 @@ export class Q2Select {
454
456
  this.errors.length > 0 &&
455
457
  this.errors.map(error => loc(error))) ||
456
458
  (this.invalid && ['tecton.element.select.invalid']) ||
457
- [], disabled: this.disabled, optional: this.optional, readonly: this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${!!this.open}`, ariaOwns: "option-list", ariaHaspopup: "listbox", role: this.searchable ? 'combobox' : null, pseudo: showAsPseudo, "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined }, this.renderCustomDisplay()), h("div", { class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { name: "q2-select-display" })), this.optionsDropdown()));
459
+ [], disabled: this.disabled, optional: this.optional, readonly: this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", role: "combobox", pseudo: showAsPseudo, "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined }, this.renderCustomDisplay()), h("div", { class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { name: "q2-select-display" })), this.optionsDropdown()));
458
460
  }
459
461
  optionsDropdown() {
460
- return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputField, open: this.open, minHeight: this.popoverMinHeight, direction: this.popDirection, onPopoverStateChanged: this.popoverStateChanged, block: true }, this.multiple ? this.visibilityToggle() : '', h("q2-option-list", { ref: el => (this.optionList = el), id: "option-list", "show-selected": this.showSelected, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null))));
462
+ return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputField, open: this.open, minHeight: this.popoverMinHeight, direction: this.popDirection, onPopoverStateChanged: this.popoverStateChanged, block: true }, h("div", { class: "popover-content", tabindex: "-1" }, h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, "aria-label": this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), this.multiple && this.visibilityToggle())));
461
463
  }
462
464
  visibilityToggle() {
463
465
  var _a, _b;
464
466
  const selectedOptionsCount = (_b = (_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
465
467
  const { showSelected } = this;
466
- return (h("div", { class: "multi-select-header", ref: el => (this.multiSelectHeader = el) }, h("span", null, loc('tecton.element.select.multiHeader.showing')), h("q2-btn", { class: showSelected ? '' : 'selected', badge: true, "aria-selected": !showSelected || undefined, "test-id": "allOptionsButton", onClick: this.showAllOptions, onKeyDown: this.visibilityToggleKeyDown, label: loc('tecton.element.select.multiHeader.allAriaLabel'), "hide-label": true }, loc('tecton.element.select.multiHeader.all')), h("q2-btn", { class: showSelected ? 'selected' : '', "aria-selected": showSelected || undefined, disabled: selectedOptionsCount === 0, badge: true, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown, label: loc('tecton.element.select.multiHeader.selectedAriaLabel', [selectedOptionsCount]), "hide-label": true }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))));
468
+ return (h("div", { class: "multi-select-header", ref: el => (this.multiSelectHeader = el) }, h("fieldset", null, h("legend", { "aria-label": loc('tecton.element.select.multiHeader.showing') }, loc('tecton.element.select.multiHeader.showing')), h("div", null, h("input", { class: "sr", type: "radio", id: "all", name: "viewDisplay", value: "all", checked: !showSelected, "aria-label": loc('tecton.element.select.multiHeader.allAriaLabel'), "test-id": "allOptionsButton", onClick: this.showAllOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "all" }, loc('tecton.element.select.multiHeader.all'))), h("div", null, h("input", { class: "sr", type: "radio", id: "selected", disabled: selectedOptionsCount === 0, name: "viewDisplay", value: "selected", "aria-label": loc('tecton.element.select.multiHeader.selectedAriaLabel', [
469
+ selectedOptionsCount,
470
+ ]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
467
471
  }
468
472
  static get is() { return "q2-select"; }
469
473
  static get encapsulation() { return "shadow"; }
@@ -616,6 +620,24 @@ export class Q2Select {
616
620
  "attribute": "invalid",
617
621
  "reflect": true
618
622
  },
623
+ "listLabel": {
624
+ "type": "string",
625
+ "mutable": false,
626
+ "complexType": {
627
+ "original": "string",
628
+ "resolved": "string",
629
+ "references": {}
630
+ },
631
+ "required": false,
632
+ "optional": false,
633
+ "docs": {
634
+ "tags": [],
635
+ "text": ""
636
+ },
637
+ "attribute": "list-label",
638
+ "reflect": false,
639
+ "defaultValue": "loc('tecton.element.select.listLabel')"
640
+ },
619
641
  "errors": {
620
642
  "type": "unknown",
621
643
  "mutable": false,
@@ -171,14 +171,52 @@ button {
171
171
  width: calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)));
172
172
  }
173
173
 
174
+ .popover-content {
175
+ display: flex;
176
+ flex-direction: column-reverse;
177
+ }
178
+
174
179
  .multi-select-header {
175
- padding: var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));
180
+ padding: var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));
176
181
  position: sticky;
177
182
  top: 0;
178
183
  z-index: 5;
179
184
  background: var(--app-white);
180
- display: inline-grid;
181
- grid-template-columns: repeat(3, auto);
185
+ display: flex;
182
186
  gap: var(--app-scale-2x, 10px);
183
187
  align-items: center;
188
+ }
189
+ .multi-select-header fieldset {
190
+ margin: 0;
191
+ padding: 0;
192
+ border: 0;
193
+ display: flex;
194
+ gap: var(--app-scale-2x, 10px);
195
+ }
196
+ .multi-select-header legend {
197
+ padding: 0;
198
+ float: left;
199
+ }
200
+ .multi-select-header label {
201
+ cursor: pointer;
202
+ padding: var(--tct-select-multi-select-option-padding, var(--t-select-multi-select-option-padding, var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px))));
203
+ font-size: var(--tct-select-multi-select-option-font-size, var(--t-select-multi-select-option-font-size, var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, inherit))));
204
+ border-radius: var(--tct-select-multi-select-option-radius, var(--t-select-multi-select-option-radius, var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--app-border-radius-1, 3px)))));
205
+ background-color: var(--tct-select-multi-select-option-bg, var(--t-select-multi-select-option-bg, var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent))));
206
+ color: var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))));
207
+ }
208
+ .multi-select-header label:hover {
209
+ background-color: var(--tct-select-multi-select-option-hover-background-color, var(--t-select-multi-select-option-hover-background-color, var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--app-gray-l3, #f2f2f2)))))));
210
+ color: var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--app-gray-d2, #404040)))))));
211
+ }
212
+ .multi-select-header input:checked + label, .multi-select-header input:checked + label:enabled:hover {
213
+ background-color: var(--tct-select-multi-select-option-active-background-color, var(--t-select-multi-select-option-active-background-color, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e))));
214
+ color: var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--app-white, #ffffff)))));
215
+ }
216
+ .multi-select-header input:disabled + label {
217
+ opacity: var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--app-disabled-opacity, 0.4)))));
218
+ cursor: not-allowed;
219
+ }
220
+ .multi-select-header input:focus + label {
221
+ box-shadow: var(--const-double-focus-ring);
184
222
  }
@@ -99,7 +99,7 @@ export class Q2Tag {
99
99
  const wrapperClassNames = ['tag-wrapper'];
100
100
  if (hasOptions)
101
101
  wrapperClassNames.push('has-options');
102
- return (h(Host, { role: "listitem" }, h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' '), onClick: e => e.stopPropagation() }, h("div", { class: "tag" }, this.label), this.hasOptions && (h("div", { class: "btn-wrapper", onClick: this.handleWrapperClick }, h("button", { ref: el => (this.dropdownBtn = el), "test-id": "btn-control", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-haspopup": "true", "aria-expanded": open ? 'true' : 'false', "aria-label": loc('tecton.element.tag.viewOptions') }, h("q2-icon", { type: "options" }))))), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { id: "option-list", role: "menu", ref: el => (this.optionList = el), onChange: this.handleChange, align: "right", type: "menu", "no-select": true }, h("slot", null)))))));
102
+ return (h(Host, { role: "listitem" }, h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' '), onClick: e => e.stopPropagation() }, h("div", { class: "tag" }, this.label), this.hasOptions && (h("div", { class: "btn-wrapper", onClick: this.handleWrapperClick }, h("button", { ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-haspopup": "true", "aria-expanded": open ? 'true' : 'false', "aria-label": loc('tecton.element.tag.viewOptions') }, h("q2-icon", { type: "options" }))))), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", "no-select": true }, h("slot", null)))))));
103
103
  }
104
104
  static get is() { return "q2-tag"; }
105
105
  static get encapsulation() { return "shadow"; }
@@ -30,7 +30,7 @@ const Q2Option = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
30
30
  render() {
31
31
  const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
32
32
  const isDisabled = disabled || disabledGroup;
33
- return (h(Host, { tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": selected ? 'true' : undefined, "aria-hidden": _multiSelectHidden ? 'true' : undefined }, this.selected && h("q2-icon", { type: "checkmark" }), h("div", { class: "content" }, h("slot", null))));
33
+ return (h(Host, { tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined }, this.selected && h("q2-icon", { type: "checkmark" }), h("div", { class: "content" }, h("slot", null))));
34
34
  }
35
35
  get hostElement() { return this; }
36
36
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { o as overrideFocus, w as waitForNextPaint, n as nextPaint, a as isEventFromElement } from './index15.js';
2
+ import { n as nextPaint, l as loc, o as overrideFocus, w as waitForNextPaint, a as isEventFromElement } from './index15.js';
3
3
 
4
4
  const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block;line-height:var(--tct-option-list-line-height, var(--t-option-list-line-height, var(--app-line-height, 1.428571429em)))}.content{text-align:start}:host([is-sizeable]) .content{display:block;height:auto}";
5
5
 
@@ -27,21 +27,23 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
27
27
  this.searchOptions(key, true);
28
28
  break;
29
29
  }
30
- else if (this.role === 'menu') {
30
+ else if (this.type === 'menu') {
31
31
  this.activeIndex = 0;
32
32
  this.openDropdownWithActiveElement(0);
33
33
  }
34
34
  else {
35
35
  this.setDefaultActiveElement();
36
+ nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));
36
37
  }
37
38
  break;
38
39
  case 'Enter':
39
- if (this.role === 'menu') {
40
+ if (this.type === 'menu') {
40
41
  this.activeIndex = 0;
41
42
  this.openDropdownWithActiveElement(0);
42
43
  }
43
44
  else {
44
45
  this.setDefaultActiveElement();
46
+ nextPaint(() => this.popoverState.emit({ open: true, action: 'open' }));
45
47
  }
46
48
  break;
47
49
  case 'ArrowUp':
@@ -171,6 +173,8 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
171
173
  case 'Tab':
172
174
  if (shiftKey)
173
175
  break;
176
+ if (this.multiple && this.type === 'listbox')
177
+ break;
174
178
  newOption = allOptions.find(element => element.active);
175
179
  if (!newOption || newOption.disabled)
176
180
  return;
@@ -205,7 +209,6 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
205
209
  const option = target.closest('q2-option');
206
210
  this.selectOption(option);
207
211
  };
208
- this.role = 'listbox';
209
212
  this.customSearch = undefined;
210
213
  this.noSelect = undefined;
211
214
  this.align = undefined;
@@ -213,7 +216,8 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
213
216
  this.multiple = undefined;
214
217
  this.disabled = undefined;
215
218
  this.showSelected = undefined;
216
- this.type = undefined;
219
+ this.type = 'listbox';
220
+ this.label = loc('tecton.element.optionList.label');
217
221
  this.hasOptions = undefined;
218
222
  }
219
223
  /// LifeCycle Hooks ///
@@ -495,7 +499,6 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
495
499
  }; }
496
500
  static get style() { return stylesCss; }
497
501
  }, [1, "q2-option-list", {
498
- "role": [513],
499
502
  "customSearch": [516, "custom-search"],
500
503
  "noSelect": [516, "no-select"],
501
504
  "align": [513],
@@ -504,6 +507,7 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
504
507
  "disabled": [516],
505
508
  "showSelected": [1540, "show-selected"],
506
509
  "type": [1],
510
+ "label": [1],
507
511
  "hasOptions": [32],
508
512
  "setDefaultActiveElement": [64],
509
513
  "setActiveElement": [64],
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { r as resizeIframe, w as waitForNextPaint } from './index15.js';
3
3
 
4
- const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;width:100%}:host([align=right]){display:block;position:absolute;right:0;text-align:end;left:unset}.container{display:none;overflow:hidden;opacity:0;height:0;position:absolute;top:var(--tct-popover-top, var(--t-popover-top, initial));visibility:hidden;background-color:var(--tct-popover-background-color, var(--t-popover-background-color, var(--app-white, #ffffff)));color:var(--tct-popover-text-color, var(--t-popover-text-color, var(--t-text, #4d4d4d)));z-index:var(--tct-popover-z-index, var(--t-popover-z-index, 100));width:max-content;min-width:var(--tct-popover-min-width, var(--t-popover-min-width, 135px));box-shadow:var(--tct-popover-box-shadow, var(--t-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));text-align:start;left:0;transition:opacity var(--app-tween-1, 0.2s ease), max-height var(--app-tween-1, 0.2s ease);border-radius:var(--tct-popover-border-radius, var(--t-popover-border-radius, 0));max-height:var(--comp-pop-max-height);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([block]) .container{left:unset;right:unset;width:100%;min-width:unset}:host([align=right]) .container{right:0;text-align:end;left:unset}.container :host([open]){display:block}:host([open]) .container.show{height:auto;overflow:auto;opacity:1;visibility:visible}.container.up{bottom:var(--comp-pop-offset)}click-elsewhere{position:relative;display:block}.content{height:auto}";
4
+ const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;width:100%}:host([align=right]){display:block;position:absolute;right:0;text-align:end;left:unset}.container{display:none;overflow:hidden;opacity:0;height:0;position:absolute;top:var(--tct-popover-top, var(--t-popover-top, initial));visibility:hidden;background-color:var(--tct-popover-background-color, var(--t-popover-background-color, var(--app-white, #ffffff)));color:var(--tct-popover-text-color, var(--t-popover-text-color, var(--t-text, #4d4d4d)));z-index:var(--tct-popover-z-index, var(--t-popover-z-index, 100));width:max-content;min-width:var(--tct-popover-min-width, var(--t-popover-min-width, 135px));box-shadow:var(--tct-popover-box-shadow, var(--t-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));text-align:start;left:0;transition:opacity var(--app-tween-1, 0.2s ease), max-height var(--app-tween-1, 0.2s ease);border-radius:var(--tct-popover-border-radius, var(--t-popover-border-radius, 0));max-height:var(--comp-pop-max-height);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([block]) .container{left:unset;right:unset;width:100%;min-width:unset}:host([align=right]) .container{right:0;text-align:end;left:unset}:host([open]) .container{visibility:visible}:host([open]) .container.show{height:auto;overflow:auto;opacity:1}.container.up{bottom:var(--comp-pop-offset)}click-elsewhere{position:relative;display:block}.content{height:auto}";
5
5
 
6
6
  const Q2Popover = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -16,6 +16,7 @@ const Q2Btn = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
16
16
  this.ariaHasPopup = undefined;
17
17
  this.ariaControls = undefined;
18
18
  this.ariaSelected = undefined;
19
+ this.ariaPressed = undefined;
19
20
  this.label = undefined;
20
21
  this.hideLabel = undefined;
21
22
  this.ariaLabel = undefined;
@@ -80,19 +81,20 @@ const Q2Btn = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
80
81
  this.iconPosition = iconPosition;
81
82
  }
82
83
  render() {
83
- const { ariaExpanded, ariaHasPopup, ariaSelected, disabled, type, tabindex } = this.buttonAttributes;
84
+ const { ariaExpanded, ariaHasPopup, ariaSelected, ariaPressed, disabled, type, tabindex } = this.buttonAttributes;
84
85
  const { iconPosition, loading, badge, label, hideLabel } = this;
85
86
  const renderLoadingSpinner = iconPosition || loading;
86
87
  const isLoadingSpinnerInline = !iconPosition || badge;
87
- return (h("button", { "aria-expanded": ariaExpanded, "aria-haspopup": ariaHasPopup, "aria-label": hideLabel && loc(label), "aria-selected": ariaSelected, disabled: disabled, type: type, tabindex: tabindex, "test-id": "q2BtnInnerButton", class: iconPosition ? `icon-${iconPosition}` : '' }, h("div", null, renderLoadingSpinner && (h("q2-loading", { hidden: !loading, modifiers: isLoadingSpinnerInline ? 'inline' : undefined })), !hideLabel && label ? loc(label) : h("slot", { onSlotchange: this.handleSlotChange }))));
88
+ return (h("button", { "aria-expanded": ariaExpanded, "aria-haspopup": ariaHasPopup, "aria-label": hideLabel && loc(label), "aria-selected": ariaSelected, "aria-pressed": ariaPressed, disabled: disabled, type: type, tabindex: tabindex, "test-id": "q2BtnInnerButton", class: iconPosition ? `icon-${iconPosition}` : '' }, h("div", null, renderLoadingSpinner && (h("q2-loading", { hidden: !loading, modifiers: isLoadingSpinnerInline ? 'inline' : undefined })), !hideLabel && label ? loc(label) : h("slot", { onSlotchange: this.handleSlotChange }))));
88
89
  }
89
90
  get buttonAttributes() {
90
- var _a, _b, _c;
91
+ var _a, _b, _c, _d;
91
92
  return {
92
93
  ariaExpanded: this.ariaExpanded !== undefined ? `${((_a = this.ariaExpanded) === null || _a === void 0 ? void 0 : _a.toString()) === 'true'}` : undefined,
93
94
  ariaHasPopup: this.ariaHasPopup !== undefined ? `${((_b = this.ariaHasPopup) === null || _b === void 0 ? void 0 : _b.toString()) === 'true'}` : undefined,
94
95
  ariaLabel: this.label && this.hideLabel ? loc(this.label) : undefined,
95
96
  ariaSelected: this.ariaSelected !== undefined ? `${((_c = this.ariaSelected) === null || _c === void 0 ? void 0 : _c.toString()) === 'true'}` : undefined,
97
+ ariaPressed: this.ariaPressed !== undefined ? `${((_d = this.ariaPressed) === null || _d === void 0 ? void 0 : _d.toString()) === 'true'}` : undefined,
96
98
  disabled: this.disabled || false,
97
99
  type: this.type || 'button',
98
100
  tabindex: this.tabIndex || undefined,
@@ -108,6 +110,7 @@ const Q2Btn = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
108
110
  "ariaHasPopup": [1, "aria-has-popup"],
109
111
  "ariaControls": [1, "aria-controls"],
110
112
  "ariaSelected": [1, "aria-selected"],
113
+ "ariaPressed": [1, "aria-pressed"],
111
114
  "label": [1537],
112
115
  "hideLabel": [1540, "hide-label"],
113
116
  "ariaLabel": [1537, "aria-label"],
@@ -2967,8 +2967,8 @@ const Q2Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
2967
2967
  this.textHidden = undefined;
2968
2968
  this.badgeValue = undefined;
2969
2969
  this.badgeTheme = undefined;
2970
- this.ariaControls = undefined;
2971
2970
  this.role = undefined;
2971
+ this.ariaControls = undefined;
2972
2972
  this.ariaOwns = undefined;
2973
2973
  this.ariaLabel = undefined;
2974
2974
  this.ariaHaspopup = undefined;
@@ -3334,8 +3334,8 @@ const Q2Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
3334
3334
  "textHidden": [1540, "text-hidden"],
3335
3335
  "badgeValue": [513, "badge-value"],
3336
3336
  "badgeTheme": [513, "badge-theme"],
3337
- "ariaControls": [1, "aria-controls"],
3338
3337
  "role": [1],
3338
+ "ariaControls": [1, "aria-controls"],
3339
3339
  "ariaOwns": [1, "aria-owns"],
3340
3340
  "ariaLabel": [1537, "aria-label"],
3341
3341
  "ariaHaspopup": [1, "aria-haspopup"],
@@ -2672,7 +2672,7 @@ function formatDateShort(value) {
2672
2672
  if (!isValid(date))
2673
2673
  return;
2674
2674
  const isoDate = date.toISOString();
2675
- return new Intl.DateTimeFormat('default', {
2675
+ return new Intl.DateTimeFormat('en-US', {
2676
2676
  month: '2-digit',
2677
2677
  day: '2-digit',
2678
2678
  year: 'numeric',
@@ -2683,7 +2683,7 @@ function formatDateLong(value) {
2683
2683
  const date = new Date(value);
2684
2684
  if (!isValid(date))
2685
2685
  return;
2686
- return new Intl.DateTimeFormat('default', {
2686
+ return new Intl.DateTimeFormat('en-US', {
2687
2687
  month: 'short',
2688
2688
  day: 'numeric',
2689
2689
  year: 'numeric',
@@ -3400,7 +3400,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
3400
3400
  return '';
3401
3401
  if (displayFormat)
3402
3402
  return format(dateValue, convertMomentFormat(displayFormat));
3403
- return new Intl.DateTimeFormat('default', {
3403
+ return new Intl.DateTimeFormat('en-US', {
3404
3404
  year: 'numeric',
3405
3405
  month: '2-digit',
3406
3406
  day: '2-digit',
@@ -187,7 +187,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
187
187
  wrapperClassNames.push('has-icon');
188
188
  if (hasOptions)
189
189
  wrapperClassNames.push('has-options');
190
- return (h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' ') }, h("div", { class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { class: "btn-primary", "test-id": "btn-control", type: "button", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, disabled: this.disabled, "aria-selected": !hasOptions && active ? 'true' : 'false', "aria-roledescription": !hasOptions && 'filter', "aria-controls": hasOptions && 'option-list', "aria-haspopup": hasOptions && 'true', "aria-expanded": (hasOptions && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent }, this.truncatedButtonContent, !hasOptions && active && h("span", { class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon()), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { role: "menu", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements() }, h("slot", null))))));
190
+ return (h("click-elsewhere", { onChange: this.onClickElsewhere }, h("div", { class: wrapperClassNames.join(' ') }, h("div", { class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { class: "btn-primary", "test-id": "btn-control", type: "button", role: "combobox", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, disabled: this.disabled, "aria-selected": !hasOptions && active ? 'true' : 'false', "aria-roledescription": !hasOptions && 'filter', "aria-controls": hasOptions && 'option-list', "aria-haspopup": hasOptions && 'true', "aria-expanded": (hasOptions && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent }, this.truncatedButtonContent, !hasOptions && active && h("span", { class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon()), this.hasOptions && (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: "right" }, h("q2-option-list", { type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements() }, h("slot", null))))));
191
191
  }
192
192
  get hostElement() { return this; }
193
193
  static get watchers() { return {